diff --git a/CHANGELOG.md b/CHANGELOG.md index be4690b996e..3d90818e282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,82 +9,367 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### ⚠ BREAKING CHANGES +- **modal:** Renamed `color` property and updated values. + +* Renamed the property `color`, use `kind` instead. +* Updated the accepted values of `kind` to `brand`, `danger`, `info`, + `success`, and `warning`. + +* **tab-nav, tab-title:** Removed `event.detail` payload from events. + +- TabNav +- Removed the `event.detail` property on the event `calciteTabChange`, + use `event.target` instead. +- TabTitle +- Removed the `event.detail` property on the event + `calciteTabsActivate`, use `event.target` instead. + +* **tree:** Removed `event.detail` payload from events and added + `selectedItems` property. + +- Added property `selectedItems`. +- Removed the `event.detail` property on the event `calciteTreeSelect`, + use `event.target` instead. + +- **pagination:** Removed `event.detail` payload from events. + + - Removed the `event.detail` property on the event + `calcitePaginationChange`, use `event.target` instead. + +- **dropdown:** Removed `event.detail` payload from events. + + - Removed the `event.detail` property on the event + `calciteDropdownSelect`, use `event.target` instead. + +- **rating:** Removed `event.detail` payload from events. + + - Removed the `event.detail` property on the event + `calciteRatingChange`, use `event.target` instead. + +- **inline-editable,input,input-text,input-number:** Removed deprecated `intl\*` & accessible label properties. + +- **inline-editable:** + + - Removed the property` intlEnableEditing`, use `messsageOverrides.enableEditing` instead. + - Removed the property `intlCancelEditing`, use `messageOverrides.cancelEditing` instead. + - Removed the property `intlConfirmChanges`, use `messageOverrides.confirmChanges` instead. + +- **input-number:** + + - Removed the property `intlClear`, use `messsageOverrides.clear` instead. + - Removed the property `intlLoading`, use `messsageOverrides.loading` instead. + +- **input-text:** + + - Removed the property `intlClear`, use `messsageOverrides.clear` instead. + - Removed the property `intlLoading`, use `messsageOverrides.loading` instead. + +- **input:** + + - Removed the property `intlClear`, use `messsageOverrides.clear` instead. + - Removed the property `intlLoading`, use `messsageOverrides.loading` instead. + +- **scrim,rating,time-picker,input-time-picker,value-list:** Removed deprecated `intl\*` & accessible label properties. + +- **rating:** + + - Removed the property `intlStars` , use `messsageOverrides.stars` instead. + - Removed the property `intlRating` , use `messsageOverrides.rating` instead. + +- **scrim:** + + - Removed the property `intlLoading` , use `messsageOverrides.loading` instead. + +- **time-picker:** + + - Removed the property `intlHour`, use `messsageOverrides.hour` instead. + - Removed the property `intlHourDown`, use `messsageOverrides.hourDown` instead. + - Removed the property `intlHourUp`, use `messsageOverrides.hourUp` instead. + - Removed the property `intlMeridiem`, use `messsageOverrides.meridiem` instead. + - Removed the property `intlMeridiemDown`, use `messsageOverrides.meridiemDown` instead. + - Removed the property `intlMeridiemUp`, use `messsageOverrides.meridiemUp` instead. + - Removed the property `intlMinute`, use `messsageOverrides.minute` instead. + - Removed the property `intlMinuteUp`, use `messsageOverrides.minuteUp` instead. + - Removed the property `intlMinuteDown`, use `messsageOverrides.minuteDown` instead. + - Removed the property `intlSecond`, use `messsageOverrides.second` instead. + - Removed the property `intlSecondUp`, use `messsageOverrides.secondUp` instead. + - Removed the property `intlSecondDown`, use `messsageOverrides.secondDown` instead. + +- **input-time-picker:** + + - Removed the property `intlHour`, use `messsageOverrides.hour` instead. + - Removed the property `intlHourDown`, use `messsageOverrides.hourDown` instead. + - Removed the property `intlHourUp`, use `messsageOverrides.hourUp` instead. + - Removed the property `intlMeridiem`, use `messsageOverrides.meridiem` instead. + - Removed the property `intlMeridiemDown`, use`messsageOverrides.meridiemDown` instead. + - Removed the property `intlMeridiemUp`, use `messsageOverrides.meridiemUp` instead. + - Removed the property `intlMinute`, use `messsageOverrides.minute` instead. + - Removed the property `intlMinuteUp`, use `messsageOverrides.minuteUp` instead. + - Removed the property `intlMinuteDown`, use `messsageOverrides.minuteDown` instead. + - Removed the property `intlSecond`, use `messsageOverrides.second` instead. + - Removed the property `intlSecondUp`, use `messsageOverrides.secondUp` instead. + - Removed the property `intlSecondDown`, use `messsageOverrides.secondDown` instead. + +- **value-list:** + + - Removed the property `intlDragHandleActive`, use `messsageOverrides.dragHandleActive` instead. + - Removed the property `intlDragHandleChange`, use `messsageOverrides.dragHandleChange` instead. + - Removed the property `intlDragHandleCommit`, use `messsageOverrides.dragHandleCommit` instead. + - Removed the property `intlDragHandleIdle`, use `messsageOverrides.dragHandleIdle` instead. + +- **chip,card,combobox,date-picker,flow,flow-item,filter, input-date-picker:** Removed deprecated `intl\*` & accessible label properties. + +- **card**: + + - Removed the property `intlLoading` , use `messsageOverrides.loading` + instead. + - Removed the property `intlSelect` use `messageOverrides.select` + instead. + - Removed the property `intlDeselect` use `messageOverrides.deselect` + instead. + +- **chip**: + + - Removed the property `dismissLabel` , use + `messsageOverrides.dismissLabel ` instead. + +- **color-picker:** + + - Removed the property `intlB` , use `messsageOverrides.b` instead. + - Removed the property `intlBlue` , use `messsageOverrides.blue` + instead. + - Removed the property `intlDeleteColor` , use + `messsageOverrides.deleteColor` instead. + - Removed the property `intlG` , use `messsageOverrides.g` instead. + - Removed the property `intlGreen` , use `messsageOverrides.green` + instead. + - Removed the property `intlH` , use `messsageOverrides.h` instead. + - Removed the property `intlHsv` , use `messsageOverrides.hsv` instead. + - Removed the property `intlHex` , use `messsageOverrides.hex` instead. + - Removed the property `intlHue` , use `messsageOverrides.hue` instead. + - Removed the property `intlNoColor` , use `messsageOverrides.noColor` + instead. + - Removed the property `intlR` , use `messsageOverrides.r` instead. + - Removed the property `intlRed` , use `messsageOverrides.red` instead. + - Removed the property `intlRgb` , use `messsageOverrides.rgb` instead. + - Removed the property `intlS` , use `messsageOverrides.s` instead. + - Removed the property `intlSaturation` , use + `messsageOverrides.saturation` instead. + - Removed the property `intlSaveColor` , use + `messsageOverrides.saveColor` instead. + - Removed the property `intlSaved` , use `messsageOverrides.saved` + instead. + - Removed the property `intlV` , use `messsageOverrides.v` instead. + - Removed the property `intlValue` , use `messsageOverrides.value` + instead. + +- **combobox:** + + - Removed the property `intlRemoveTag` , use + `messsageOverrides.removeTag` instead. + +- **date-picker:** + + - Removed the property `intlNextMonth`, use `messageOverrides.nextMonth` + instead. + - Removed the property `intlPrevMonth`, use `messageOverrides.prevMonth` + instead. + - Removed the property `intlYear`, use `messageOverrides.year` instead. + +- **flow-item:** + + - Removed the property `intlBack` , use `messsageOverrides.back` + instead. + - Removed the property `intlClose`, use `messageOverrides.close` + instead. + - Removed the property `intlOptions` , use `messsageOverrides.options` + instead. + +- **filter:** + + - Removed the property `intlClear`, use `messsageOverrides.clear` + instead. + - Removed the property `intlLabel`, use `messageOverrides.label` + instead. + +- **input-date-picker:** + + - Removed the property `intlNextMonth`, use `messageOverrides.nextMonth` + instead. + - Removed the property `intlPrevMonth`, use `messageOverrides.prevMonth` + instead. + - Removed the property `intlYear`, use `messageOverrides.year` instead. + +- **action,action-bar,action-group,action-pad,alert,block-section,block,button:** Removed deprecated `intl*` properties , use + `messageOverrides` property instead. + +- **action:** + + - Removed the property `intlLoading` , use `messsageOverrides.loading` + instead. + - Removed the property `intlIndicator`, use `messageOverrides.indicator` + instead. + +- **action-bar:** + + - Removed the property `intlExpand` , use `messsageOverrides.expand` + instead. + - Removed the property `intlCollapse`, use `messageOverrides.collapse` + instead. + +- **action-group:** + + - Removed the property `intlMore` , use `messsageOverrides.more` + instead. + +- **action-pad**: + + - Removed the property `intlExpand` , use `messsageOverrides.expand` + instead. + - Removed the property `intlCollapse`, use `messageOverrides.collapse` + instead. + +- **alert**: + + - Removed the property `intlClose`, use `messageOverrides.close` + instead. + +- **block**: + + - Removed the property `intlExpand` , use `messsageOverrides.expand` + instead. + - Removed the property `intlCollapse`, use `messageOverrides.collapse` + instead. + - Removed the property `intlLoading` , use `messsageOverrides.loading` + instead. + - Removed the property `intlOptions`, use `messageOverrides.options` + instead. + +- **block-section:** + + - Removed the property `intlExpand` , use `messsageOverrides.expand` + instead. + - Removed the property `intlCollapse`, use `messageOverrides.collapse` + instead. + +- **button:** + + - Removed the property `intlLoading` , use `messsageOverrides.loading` + instead. + +- **popover, dropdown, modal, pick-list-item, value-list-item:** Renamed `disable*` properties. + +- **dropdown:** + + - Renamed the property `disableCloseOnSelect`, use + `closeOnSelectDisabled` instead. + +- **modal:** + + - Renamed the property `disableCloseButton`, use `closeButtonDisabled` + instead. + - Renamed the property `disableFocusTrap`, use `focusTrapDisabled` + instead. + - Renamed the property `disableOutsideClose`, use `outsideCloseDisabled` + instead. + - Renamed the property `disableEscape`, use `escapeDisabled` instead. + +- **pick-list-item:** + + - Renamed the property `disableDeselect`, use `deselectDisabled` + instead. + +- **popover:** + + - Renamed the property `disableFlip`, use `flipDisabled` instead. + - Renamed the property `disableFocusTrap`, use `focusTrapDisabled` + instead. + - Renamed the property `disablePointer`, use `pointerDisabled` instead. + +- **value-list-item:** + + - Renamed the property `disableDeselect`, use `deselectDisabled` + instead. + +- **input-date-picker:** Removed the `calciteDatePickerChange` event, use + `calciteInputDatePickerChange` instead. + - **date-picker:** Removed the `start` and `end` properties, set `value` as an array with the start as the first value and the end as the second value instead. -* **combobox:** Renamed event. +- **combobox:** Renamed event. -- Renamed the event `calciteComboboxChipDismiss`, use - `calciteComboboxChipClose` instead. + - Renamed the event `calciteComboboxChipDismiss`, use + `calciteComboboxChipClose` instead. -* **alert:** Renamed properties. +- **alert:** Renamed properties. -- Renamed the property `autoDismiss`, use `autoClose` instead. -- Renamed the property `autoDismissDuration`, use `autoCloseDuration` - instead. + - Renamed the property `autoDismiss`, use `autoClose` instead. + - Renamed the property `autoDismissDuration`, use `autoCloseDuration` + instead. -* **combobox:** Removed `event.detail` payload from events and added +- **combobox:** Removed `event.detail` payload from events and added properties `selectedItems` and `filteredItems`. -- Removed the `event.detail` property on the event - `calciteComboboxChange`, use `event.target.selectedItems` instead. -- Removed the `event.detail` property on the event - `calciteComboboxFilterChange`, use `event.target.filteredItems` or - `event.target.value` instead. + - Removed the `event.detail` property on the event + `calciteComboboxChange`, use `event.target.selectedItems` instead. + - Removed the `event.detail` property on the event + `calciteComboboxFilterChange`, use `event.target.filteredItems` or + `event.target.value` instead. -* **chip:** Renamed event. +- **chip:** Renamed event. -- Renamed the event `calciteChipDismiss`, use `calciteChipClose` - instead. + - Renamed the event `calciteChipDismiss`, use `calciteChipClose` + instead. -* **tip:** Renamed property. +- **tip:** Renamed property. -- Renamed the property `nonDismissible`, use `closeDisabled` instead. + - Renamed the property `nonDismissible`, use `closeDisabled` instead. -* **date-picker:** Removed `event.detail` payload from events. +- **date-picker:** Removed `event.detail` payload from events. -- Removed the `event.detail` property on the event - `calciteDatePickerChange`, use `event.target` instead. -- Removed the `event.detail` property on the event - `calciteDatePickerRangeChange`, use `event.target` instead. + - Removed the `event.detail` property on the event + `calciteDatePickerChange`, use `event.target` instead. + - Removed the `event.detail` property on the event + `calciteDatePickerRangeChange`, use `event.target` instead. - **modal:** Removed deprecated properties and method. -* Removed the property `active`, use `open` instead. -* Removed the property noPadding, use `--calcite-modal-padding` CSS - property instead. -* Removed the method `focusElement`, use `setFocus` method instead. -* Removed the CSS property ` --calcite-modal-content-text`. -* Removed the CSS property `--calcite-modal-padding-large`. -* Removed the CSS property `--calcite-modal-title-text`. + - Removed the property `active`, use `open` instead. + - Removed the property noPadding, use `--calcite-modal-padding` CSS + property instead. + - Removed the method `focusElement`, use `setFocus` method instead. + - Removed the CSS property ` --calcite-modal-content-text`. + - Removed the CSS property `--calcite-modal-padding-large`. + - Removed the CSS property `--calcite-modal-title-text`. - **pagination:** Removed deprecated event. -Removed the event `calcitePaginationUpdate` event, use -`calcitePaginationChange` event instead. + - Removed the event `calcitePaginationUpdate` event, use + `calcitePaginationChange` event instead. - **loader:** Removed deprecated properties. -* Removed the property `active`, use global attribute `hidden` instead. -* Removed the property `noPadding`, use `--calcite-loader-padding` CSS - property instead. + - Removed the property `active`, use global attribute `hidden` instead. + - Removed the property `noPadding`, use `--calcite-loader-padding` CSS + property instead. -* **label:** The default display for label is now `flex` instead of +- **label:** The default display for label is now `flex` instead of `inline`. - Use `--calcite-label-margin-bottom` CSS variable to disable space when in `layout` is `inline`. -* **tabs:** Removed slot. +- **tabs:** Removed slot. - Removed the slot `tab-nav`, use `title-group` instead. -* **dropdown:** Removed slot. +- **dropdown:** Removed slot. - Removed the slot `dropdown-trigger`, use `trigger` instead. -* **action-menu:** Removed event. +- **action-menu:** Removed event. - Removed the event `calciteActionMenuOpenChange`, use `calciteActionMenuOpen` instead. @@ -337,25 +622,27 @@ Removed the event `calcitePaginationUpdate` event, use ### Features -- **dropdown-item:** Add `calciteDropdownItemSelect` event ([#6015](https://github.com/Esri/calcite-components/issues/6015)) ([b565ac9](https://github.com/Esri/calcite-components/commit/b565ac97e0d8b63527767fa10a75dce78d7f5a4b)), closes [#5940](https://github.com/Esri/calcite-components/issues/5940) [#5940](https://github.com/Esri/calcite-components/issues/5940) +- add built-in translations ([#5471](https://github.com/Esri/calcite-components/issues/5471)) ([d754b29](https://github.com/Esri/calcite-components/commit/d754b29467d40f8081eb7793fb13c1b4de9f7ebf)), closes [#4961](https://github.com/Esri/calcite-components/issues/4961) + +* **dropdown-item:** Add `calciteDropdownItemSelect` event ([#6015](https://github.com/Esri/calcite-components/issues/6015)) ([b565ac9](https://github.com/Esri/calcite-components/commit/b565ac97e0d8b63527767fa10a75dce78d7f5a4b)), closes [#5940](https://github.com/Esri/calcite-components/issues/5940) [#5940](https://github.com/Esri/calcite-components/issues/5940) -- **input, input-number, input-text:** add inputMode and enterKeyHint properties ([#5976](https://github.com/Esri/calcite-components/issues/5976)) ([d567a9f](https://github.com/Esri/calcite-components/commit/d567a9fde5b3619f308133555ba0bae20ca85168)), closes [#5917](https://github.com/Esri/calcite-components/issues/5917) +* **input, input-number, input-text:** add inputMode and enterKeyHint properties ([#5976](https://github.com/Esri/calcite-components/issues/5976)) ([d567a9f](https://github.com/Esri/calcite-components/commit/d567a9fde5b3619f308133555ba0bae20ca85168)), closes [#5917](https://github.com/Esri/calcite-components/issues/5917) -- **action:** add built-in translation support for indicator text ([#5895](https://github.com/Esri/calcite-components/issues/5895)) ([704db6d](https://github.com/Esri/calcite-components/commit/704db6dfbe3a875fbd5b20c9b0eb0975aca24258)), closes [#4813](https://github.com/Esri/calcite-components/issues/4813) +* **action:** add built-in translation support for indicator text ([#5895](https://github.com/Esri/calcite-components/issues/5895)) ([704db6d](https://github.com/Esri/calcite-components/commit/704db6dfbe3a875fbd5b20c9b0eb0975aca24258)), closes [#4813](https://github.com/Esri/calcite-components/issues/4813) -- **list-item:** Add content slot for specialized content ([#5876](https://github.com/Esri/calcite-components/issues/5876)) ([a510773](https://github.com/Esri/calcite-components/commit/a510773ba87994010e84184f7709c84ce40f2d2c)), closes [#3032](https://github.com/Esri/calcite-components/issues/3032) [#3032](https://github.com/Esri/calcite-components/issues/3032) +* **list-item:** Add content slot for specialized content ([#5876](https://github.com/Esri/calcite-components/issues/5876)) ([a510773](https://github.com/Esri/calcite-components/commit/a510773ba87994010e84184f7709c84ce40f2d2c)), closes [#3032](https://github.com/Esri/calcite-components/issues/3032) [#3032](https://github.com/Esri/calcite-components/issues/3032) -- **textarea:** add default message bundle ([#5870](https://github.com/Esri/calcite-components/issues/5870)) ([c7a8495](https://github.com/Esri/calcite-components/commit/c7a84955b4f3cd09dbf7315ea59e0edaa7be2a6c)), closes [#863](https://github.com/Esri/calcite-components/issues/863) +* **textarea:** add default message bundle ([#5870](https://github.com/Esri/calcite-components/issues/5870)) ([c7a8495](https://github.com/Esri/calcite-components/commit/c7a84955b4f3cd09dbf7315ea59e0edaa7be2a6c)), closes [#863](https://github.com/Esri/calcite-components/issues/863) -- **input, input-text, input-number:** add attributes autocomplete, accept, multiple, pattern ([#5807](https://github.com/Esri/calcite-components/issues/5807)) ([feb4fce](https://github.com/Esri/calcite-components/commit/feb4fce9528920041d836446ef437f0f1c0e8ce2)), closes [#4079](https://github.com/Esri/calcite-components/issues/4079) +* **input, input-text, input-number:** add attributes autocomplete, accept, multiple, pattern ([#5807](https://github.com/Esri/calcite-components/issues/5807)) ([feb4fce](https://github.com/Esri/calcite-components/commit/feb4fce9528920041d836446ef437f0f1c0e8ce2)), closes [#4079](https://github.com/Esri/calcite-components/issues/4079) -- **alert:** support actions-end ([#5750](https://github.com/Esri/calcite-components/issues/5750)) ([2447e16](https://github.com/Esri/calcite-components/commit/2447e167eb731f3a59775a5692530137bf9a70fd)) -- **list, list-item, list-item-group:** Adds support for selecting and filtering list items. Improves accessibility by using aria "treegrid" role. ([#4527](https://github.com/Esri/calcite-components/issues/4527)) ([f489c57](https://github.com/Esri/calcite-components/commit/f489c57095ec21df1f427176d2d635675eea95d3)) -- **pick-list, value-list:** Add calciteListFilter event, filteredItems prop, filterText prop and filteredData prop. ([#5681](https://github.com/Esri/calcite-components/issues/5681)) ([943d208](https://github.com/Esri/calcite-components/commit/943d2088b7cf447a12ebcd0babab145f543538a2)), closes [#4333](https://github.com/Esri/calcite-components/issues/4333) -- **popover:** Add focus-trap to popover and disableFocusTrap property. ([#5725](https://github.com/Esri/calcite-components/issues/5725)) ([a8ef353](https://github.com/Esri/calcite-components/commit/a8ef353bc031630b373f2bdd1bdc1cafd7e35be9)), closes [#2133](https://github.com/Esri/calcite-components/issues/2133) -- **popover:** Escape key should close open popovers. ([#5726](https://github.com/Esri/calcite-components/issues/5726)) ([2e2621d](https://github.com/Esri/calcite-components/commit/2e2621d57c4701f7a7e84f74d801c543ad4f45c0)) -- **tabs:** Add support for navigating with Home and End keys ([#5727](https://github.com/Esri/calcite-components/issues/5727)) ([823c429](https://github.com/Esri/calcite-components/commit/823c429439ec9f8cd1d6a1ff2aedf0b2da9c741b)), closes [#5661](https://github.com/Esri/calcite-components/issues/5661) -- **tooltip:** Add tooltip open, close, beforeOpen, and beforeClose events ([#5772](https://github.com/Esri/calcite-components/issues/5772)) ([64b5675](https://github.com/Esri/calcite-components/commit/64b56751d68f69d31ea943415f5d0d08bae634cc)), closes [#5734](https://github.com/Esri/calcite-components/issues/5734) +* **alert:** support actions-end ([#5750](https://github.com/Esri/calcite-components/issues/5750)) ([2447e16](https://github.com/Esri/calcite-components/commit/2447e167eb731f3a59775a5692530137bf9a70fd)) +* **list, list-item, list-item-group:** Adds support for selecting and filtering list items. Improves accessibility by using aria "treegrid" role. ([#4527](https://github.com/Esri/calcite-components/issues/4527)) ([f489c57](https://github.com/Esri/calcite-components/commit/f489c57095ec21df1f427176d2d635675eea95d3)) +* **pick-list, value-list:** Add calciteListFilter event, filteredItems prop, filterText prop and filteredData prop. ([#5681](https://github.com/Esri/calcite-components/issues/5681)) ([943d208](https://github.com/Esri/calcite-components/commit/943d2088b7cf447a12ebcd0babab145f543538a2)), closes [#4333](https://github.com/Esri/calcite-components/issues/4333) +* **popover:** Add focus-trap to popover and disableFocusTrap property. ([#5725](https://github.com/Esri/calcite-components/issues/5725)) ([a8ef353](https://github.com/Esri/calcite-components/commit/a8ef353bc031630b373f2bdd1bdc1cafd7e35be9)), closes [#2133](https://github.com/Esri/calcite-components/issues/2133) +* **popover:** Escape key should close open popovers. ([#5726](https://github.com/Esri/calcite-components/issues/5726)) ([2e2621d](https://github.com/Esri/calcite-components/commit/2e2621d57c4701f7a7e84f74d801c543ad4f45c0)) +* **tabs:** Add support for navigating with Home and End keys ([#5727](https://github.com/Esri/calcite-components/issues/5727)) ([823c429](https://github.com/Esri/calcite-components/commit/823c429439ec9f8cd1d6a1ff2aedf0b2da9c741b)), closes [#5661](https://github.com/Esri/calcite-components/issues/5661) +* **tooltip:** Add tooltip open, close, beforeOpen, and beforeClose events ([#5772](https://github.com/Esri/calcite-components/issues/5772)) ([64b5675](https://github.com/Esri/calcite-components/commit/64b56751d68f69d31ea943415f5d0d08bae634cc)), closes [#5734](https://github.com/Esri/calcite-components/issues/5734) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index a77bb934ee5..5d96b12f61d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@esri/calcite-components", - "version": "1.0.0-next.678", + "version": "1.0.0-next.685", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@esri/calcite-components", - "version": "1.0.0-next.678", + "version": "1.0.0-next.685", "license": "SEE LICENSE IN copyright.txt", "dependencies": { "@floating-ui/dom": "1.0.10", diff --git a/package.json b/package.json index 55d3fa983b8..6d41b3a81a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "1.0.0-next.678", + "version": "1.0.0-next.685", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", "module": "dist/index.js", diff --git a/src/components/action-bar/action-bar.tsx b/src/components/action-bar/action-bar.tsx index 4c8f484d85e..45a8b97e840 100755 --- a/src/components/action-bar/action-bar.tsx +++ b/src/components/action-bar/action-bar.tsx @@ -88,20 +88,6 @@ export class ActionBar this.conditionallyOverflowActions(); } - /** - * Specifies the label of the expand icon when the component is collapsed. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlExpand: string; - - /** - * Specifies the label of the collapse icon when the component is expanded. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlCollapse: string; - /** * The layout direction of the actions. */ @@ -141,8 +127,6 @@ export class ActionBar */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlCollapse") - @Watch("intlExpand") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ @@ -343,7 +327,6 @@ export class ActionBar ; - @Watch("intlMore") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/action-group/readme.md b/src/components/action-group/readme.md index 363ac3f64df..3ea63fe0a1b 100755 --- a/src/components/action-group/readme.md +++ b/src/components/action-group/readme.md @@ -6,14 +6,14 @@ The `calcite-action-group` is a wrapper for multiple `calcite-action`s and house ## Properties -| Property | Attribute | Description | Type | Default | -| ---------- | ----------- | ------------------------------------------------------ | -------------------------------------- | ------------ | -| `columns` | `columns` | Indicates number of columns. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `expanded` | `expanded` | When `true`, the component is expanded. | `boolean` | `false` | -| `intlMore` | `intl-more` | Specifies a text string for the `calcite-action-menu`. | `string` | `undefined` | -| `layout` | `layout` | Indicates the layout of the component. | `"grid" \| "horizontal" \| "vertical"` | `"vertical"` | -| `menuOpen` | `menu-open` | When `true`, the `calcite-action-menu` is open. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the `calcite-action-menu`. | `"l" \| "m" \| "s"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | ----------------------------------------------------------------------- | -------------------------------------- | ------------ | +| `columns` | `columns` | Indicates number of columns. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | +| `expanded` | `expanded` | When `true`, the component is expanded. | `boolean` | `false` | +| `layout` | `layout` | Indicates the layout of the component. | `"grid" \| "horizontal" \| "vertical"` | `"vertical"` | +| `menuOpen` | `menu-open` | When `true`, the `calcite-action-menu` is open. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `scale` | `scale` | Specifies the size of the `calcite-action-menu`. | `"l" \| "m" \| "s"` | `undefined` | ## Slots diff --git a/src/components/action-menu/action-menu.tsx b/src/components/action-menu/action-menu.tsx index 6ea00650e7a..6d1fd2ea944 100755 --- a/src/components/action-menu/action-menu.tsx +++ b/src/components/action-menu/action-menu.tsx @@ -299,14 +299,14 @@ export class ActionMenu implements LoadableComponent { return (
; - @Watch("intlCollapse") - @Watch("intlExpand") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/action-pad/readme.md b/src/components/action-pad/readme.md index 30da678ef25..8bfd464744f 100755 --- a/src/components/action-pad/readme.md +++ b/src/components/action-pad/readme.md @@ -50,15 +50,14 @@ Renders a group of `calcite-action`s contained in a `calcite-action-group`. Acti ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------- | ----------------- | ------------------------------------------------------------------------ | -------------------------------------- | ------------ | -| `expandDisabled` | `expand-disabled` | When `true`, the expand-toggling behavior is disabled. | `boolean` | `false` | -| `expanded` | `expanded` | When `true`, the component is expanded. | `boolean` | `false` | -| `intlCollapse` | `intl-collapse` | Specifies the label of the collapse icon when the component is expanded. | `string` | `undefined` | -| `intlExpand` | `intl-expand` | Specifies the label of the expand icon when the component is collapsed. | `string` | `undefined` | -| `layout` | `layout` | Indicates the layout of the component. | `"grid" \| "horizontal" \| "vertical"` | `"vertical"` | -| `position` | `position` | Arranges the component depending on the element's `dir` property. | `"end" \| "start"` | `undefined` | -| `scale` | `scale` | Specifies the size of the expand `calcite-action`. | `"l" \| "m" \| "s"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | ----------------------------------------------------------------------- | -------------------------------------- | ------------ | +| `expandDisabled` | `expand-disabled` | When `true`, the expand-toggling behavior is disabled. | `boolean` | `false` | +| `expanded` | `expanded` | When `true`, the component is expanded. | `boolean` | `false` | +| `layout` | `layout` | Indicates the layout of the component. | `"grid" \| "horizontal" \| "vertical"` | `"vertical"` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `position` | `position` | Arranges the component depending on the element's `dir` property. | `"end" \| "start"` | `undefined` | +| `scale` | `scale` | Specifies the size of the expand `calcite-action`. | `"l" \| "m" \| "s"` | `undefined` | ## Events diff --git a/src/components/action/action.e2e.ts b/src/components/action/action.e2e.ts index 636f90ac166..13b6db46546 100755 --- a/src/components/action/action.e2e.ts +++ b/src/components/action/action.e2e.ts @@ -1,6 +1,6 @@ import { newE2EPage } from "@stencil/core/testing"; import { accessible, disabled, hidden, renders, slots, t9n, defaults } from "../../tests/commonTests"; -import { CSS, SLOTS, TEXT } from "./resources"; +import { CSS, SLOTS } from "./resources"; describe("calcite-action", () => { it("has property defaults", async () => @@ -136,7 +136,7 @@ describe("calcite-action", () => { await page.setContent(``); const button = await page.find(`calcite-action >>> .${CSS.button}`); - expect(button.getAttribute("aria-label")).toBe(`hello world (${TEXT.indicator})`); + expect(button.getAttribute("aria-label")).toBe(`hello world (Indicator present)`); }); it("should have label", async () => { @@ -192,6 +192,6 @@ describe("calcite-action", () => { expect(liveRegion.getAttribute("aria-live")).toBe("polite"); expect(liveRegion.getAttribute("role")).toBe("region"); - expect(liveRegion.textContent).toBe(TEXT.indicator); + expect(liveRegion.textContent).toBe("Indicator present"); }); }); diff --git a/src/components/action/action.tsx b/src/components/action/action.tsx old mode 100755 new mode 100644 index ea096fe8cc7..781e7a362e4 --- a/src/components/action/action.tsx +++ b/src/components/action/action.tsx @@ -12,7 +12,7 @@ import { Build } from "@stencil/core"; import { Alignment, Appearance, Scale } from "../interfaces"; -import { CSS, TEXT, SLOTS } from "./resources"; +import { CSS, SLOTS } from "./resources"; import { guid } from "../../utils/guid"; import { createObserver } from "../../utils/observers"; import { InteractiveComponent, updateHostInteraction } from "../../utils/interactive"; @@ -82,21 +82,6 @@ export class Action */ @Prop({ reflect: true }) indicator = false; - /** - * When `indicator` is `true`, specifies the accessible context of the `indicator`. - * - * @default "Indicator present" - */ - @Prop() intlIndicator: string = TEXT.indicator; - - /** - * Specifies the text label to display while loading. - * - * @default "Loading" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlLoading?: string; - /** * Specifies the label of the component. If no label is provided, the label inherits what's provided for the `text` prop. */ @@ -134,8 +119,6 @@ export class Action */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlLoading") - @Watch("intlIndicator") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ @@ -295,7 +278,6 @@ export class Action buttonId, messages } = this; - const ariaLabel = `${label || text}${indicator ? ` (${messages.indicator})` : ""}`; const buttonClasses = { diff --git a/src/components/action/assets/action/t9n/messages_en.json b/src/components/action/assets/action/t9n/messages_en.json index 53151fbbab3..7b1107df302 100644 --- a/src/components/action/assets/action/t9n/messages_en.json +++ b/src/components/action/assets/action/t9n/messages_en.json @@ -1,3 +1,4 @@ { - "loading": "Loading" + "loading": "Loading", + "indicator": "Indicator present" } diff --git a/src/components/action/readme.md b/src/components/action/readme.md index 7bfd56abc0e..7e1a36488b7 100755 --- a/src/components/action/readme.md +++ b/src/components/action/readme.md @@ -42,22 +42,21 @@ Renders a `calcite-action` that displays only an icon. ## Properties -| Property | Attribute | Description | Type | Default | -| ------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ---------------- | -| `active` | `active` | When `true`, the component is highlighted. | `boolean` | `false` | -| `alignment` | `alignment` | Specifies the horizontal alignment of button elements with text content. | `"center" \| "end" \| "start"` | `undefined` | -| `appearance` | `appearance` | Specifies the appearance of the component. | `"solid" \| "transparent"` | `"solid"` | -| `compact` | `compact` | When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `icon` | `icon` | Specifies an icon to display. | `string` | `undefined` | -| `indicator` | `indicator` | When `true`, displays a visual indicator. | `boolean` | `false` | -| `intlIndicator` | `intl-indicator` | When `indicator` is `true`, specifies the accessible context of the `indicator`. | `string` | `TEXT.indicator` | -| `intlLoading` | `intl-loading` | Specifies the text label to display while loading. | `string` | `TEXT.loading` | -| `label` | `label` | Specifies the label of the component. If no label is provided, the label inherits what's provided for the `text` prop. | `string` | `undefined` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `text` _(required)_ | `text` | Specifies text that accompanies the icon. | `string` | `undefined` | -| `textEnabled` | `text-enabled` | Indicates whether the text is displayed. | `boolean` | `false` | +| Property | Attribute | Description | Type | Default | +| ------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----------- | +| `active` | `active` | When `true`, the component is highlighted. | `boolean` | `false` | +| `alignment` | `alignment` | Specifies the horizontal alignment of button elements with text content. | `"center" \| "end" \| "start"` | `undefined` | +| `appearance` | `appearance` | Specifies the appearance of the component. | `"solid" \| "transparent"` | `"solid"` | +| `compact` | `compact` | When `true`, the side padding of the component is reduced. Compact mode is used internally by components, e.g. `calcite-block-section`. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `icon` | `icon` | Specifies an icon to display. | `string` | `undefined` | +| `indicator` | `indicator` | When `true`, displays a visual indicator. | `boolean` | `false` | +| `label` | `label` | Specifies the label of the component. If no label is provided, the label inherits what's provided for the `text` prop. | `string` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `text` _(required)_ | `text` | Specifies text that accompanies the icon. | `string` | `undefined` | +| `textEnabled` | `text-enabled` | Indicates whether the text is displayed. | `boolean` | `false` | ## Methods diff --git a/src/components/action/resources.ts b/src/components/action/resources.ts index a50419b8dc0..ddabbf437aa 100644 --- a/src/components/action/resources.ts +++ b/src/components/action/resources.ts @@ -10,11 +10,6 @@ export const CSS = { textContainerVisible: "text-container--visible" }; -export const TEXT = { - loading: "Loading", - indicator: "indicator present" -}; - export const SLOTS = { tooltip: "tooltip" }; diff --git a/src/components/alert/alert.tsx b/src/components/alert/alert.tsx index 81507120713..1f708610d67 100644 --- a/src/components/alert/alert.tsx +++ b/src/components/alert/alert.tsx @@ -109,14 +109,6 @@ export class Alert implements OpenCloseComponent, LoadableComponent, T9nComponen */ @Prop({ reflect: true }) icon: string | boolean; - /** - * Specifies the text label for the close button. - * - * @default "Close" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlClose: string; - /** Specifies an accessible name for the component. */ @Prop() label!: string; @@ -143,7 +135,6 @@ export class Alert implements OpenCloseComponent, LoadableComponent, T9nComponen */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlClose") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/alert/readme.md b/src/components/alert/readme.md index cd73fef6fd6..f243b1047a9 100644 --- a/src/components/alert/readme.md +++ b/src/components/alert/readme.md @@ -18,18 +18,18 @@ A single instance of an alert. Multiple alerts will aggregate in a queue. ## Properties -| Property | Attribute | Description | Type | Default | -| --------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| `autoDismiss` | `auto-close` | When `true`, the component closes automatically (recommended for passive, non-blocking alerts). | `boolean` | `false` | -| `autoDismissDuration` | `auto-close-duration` | Specifies the duration before the component automatically closes (only use with `autoDismiss`). | `"fast" \| "medium" \| "slow"` | `this.autoDismiss ? "medium" : null` | -| `color` | `color` | Specifies the color for the component (will apply to top border and icon). | `"blue" \| "green" \| "red" \| "yellow"` | `"blue"` | -| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | -| `intlClose` | `intl-close` | Specifies the text label for the close button. | `string` | `TEXT.intlClose` | -| `label` _(required)_ | `label` | Specifies an accessible name for the component. | `string` | `undefined` | -| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | -| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | -| `placement` | `placement` | Specifies the placement of the component | `"bottom" \| "bottom-end" \| "bottom-start" \| "top" \| "top-end" \| "top-start"` | `"bottom"` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| Property | Attribute | Description | Type | Default | +| -------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `autoClose` | `auto-close` | When `true`, the component closes automatically (recommended for passive, non-blocking alerts). | `boolean` | `false` | +| `autoCloseDuration` | `auto-close-duration` | Specifies the duration before the component automatically closes (only use with `autoClose`). | `"fast" \| "medium" \| "slow"` | `this.autoClose ? "medium" : null` | +| `color` | `color` | Specifies the color for the component (will apply to top border and icon). | `"blue" \| "green" \| "red" \| "yellow"` | `"blue"` | +| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | +| `label` _(required)_ | `label` | Specifies an accessible name for the component. | `string` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | +| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | +| `placement` | `placement` | Specifies the placement of the component | `"bottom" \| "bottom-end" \| "bottom-start" \| "top" \| "top-end" \| "top-start"` | `"bottom"` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | ## Events diff --git a/src/components/block-section/block-section.tsx b/src/components/block-section/block-section.tsx index 9726328a0be..0846e1b6a8d 100644 --- a/src/components/block-section/block-section.tsx +++ b/src/components/block-section/block-section.tsx @@ -43,20 +43,6 @@ export class BlockSection implements LocalizedComponent, T9nComponent { // // -------------------------------------------------------------------------- - /** - * Accessible name for the component's collapse button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlCollapse: string; - - /** - * Accessible name for the component's expand button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlExpand: string; - /** * When `true`, expands the component and its contents. */ @@ -93,8 +79,6 @@ export class BlockSection implements LocalizedComponent, T9nComponent { */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlCollapse") - @Watch("intlExpand") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/block-section/readme.md b/src/components/block-section/readme.md index bfbcc2c8a12..5676ab2b4f9 100644 --- a/src/components/block-section/readme.md +++ b/src/components/block-section/readme.md @@ -6,14 +6,13 @@ The `calcite-block-section` component is a child element of `calcite-block`. Sec ## Properties -| Property | Attribute | Description | Type | Default | -| --------------- | ---------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- | -| `intlCollapse` | `intl-collapse` | Accessible name for the component's collapse button. | `string` | `undefined` | -| `intlExpand` | `intl-expand` | Accessible name for the component's expand button. | `string` | `undefined` | -| `open` | `open` | When `true`, expands the component and its contents. | `boolean` | `false` | -| `status` | `status` | Displays a status-related indicator icon. | `"idle" \| "invalid" \| "valid"` | `undefined` | -| `text` | `text` | The component header text. | `string` | `undefined` | -| `toggleDisplay` | `toggle-display` | Specifies the component's toggle display - `"button"` (selectable header), or `"switch"` (toggle switch). | `"button" \| "switch"` | `"button"` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `open` | `open` | When `true`, expands the component and its contents. | `boolean` | `false` | +| `status` | `status` | Displays a status-related indicator icon. | `"idle" \| "invalid" \| "valid"` | `undefined` | +| `text` | `text` | The component header text. | `string` | `undefined` | +| `toggleDisplay` | `toggle-display` | Specifies the component's toggle display - `"button"` (selectable header), or `"switch"` (toggle switch). | `"button" \| "switch"` | `"button"` | ## Events diff --git a/src/components/block/block.stories.ts b/src/components/block/block.stories.ts index 7b62f8bdafb..7893a899019 100644 --- a/src/components/block/block.stories.ts +++ b/src/components/block/block.stories.ts @@ -85,22 +85,6 @@ const createBlockAttributes: (options?: { exceptions: string[] }) => Attributes delete this.build; return this; } - }, - { - name: "intl-collapse", - commit(): Attribute { - this.value = text("intlCollapse", "Collapse", group); - delete this.build; - return this; - } - }, - { - name: "intl-expand", - commit(): Attribute { - this.value = text("intlExpand", "Expand", group); - delete this.build; - return this; - } } ], exceptions @@ -123,14 +107,6 @@ const createSectionAttributes: () => Attributes = () => { { name: "toggle-display", value: select("toggleDisplay", toggleDisplayOptions, toggleDisplayOptions[0], group) - }, - { - name: "intl-collapse", - value: text("intlCollapse", "Collapse", group) - }, - { - name: "intl-expand", - value: text("intlExpand", "Expand", group) } ]; }; diff --git a/src/components/block/block.tsx b/src/components/block/block.tsx index d78d2f71e05..7e7848b0b10 100644 --- a/src/components/block/block.tsx +++ b/src/components/block/block.tsx @@ -77,38 +77,6 @@ export class Block */ @Prop({ reflect: true }) headingLevel: HeadingLevel; - /** - * Accessible name for the component's collapse button. - * - * @default "Collapse" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlCollapse?: string; - - /** - * Accessible name for the component's expand button. - * - * @default "Expand" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlExpand?: string; - - /** - * Accessible name when the component is loading. - * - * @default "Loading" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlLoading?: string; - - /** - * Accessible name for the component's options button. - * - * @default "Options" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlOptions?: string; - /** * When `true`, a busy indicator is displayed. */ @@ -141,10 +109,6 @@ export class Block */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlCollapse") - @Watch("intlExpand") - @Watch("intlLoading") - @Watch("intlOptions") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/block/readme.md b/src/components/block/readme.md index ebee6aaf638..1a6d6124156 100644 --- a/src/components/block/readme.md +++ b/src/components/block/readme.md @@ -56,21 +56,18 @@ Renders a header and icon with the icon. ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------------------------------- | --------------- | -| `collapsible` | `collapsible` | When `true`, the component is collapsible. | `boolean` | `false` | -| `description` | `description` | A description for the component, which displays below the heading. | `string` | `undefined` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `dragHandle` | `drag-handle` | When `true`, displays a drag handle in the header. | `boolean` | `false` | -| `heading` _(required)_ | `heading` | The component header text. | `string` | `undefined` | -| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `intlCollapse` | `intl-collapse` | Accessible name for the component's collapse button. | `string` | `TEXT.collapse` | -| `intlExpand` | `intl-expand` | Accessible name for the component's expand button. | `string` | `TEXT.expand` | -| `intlLoading` | `intl-loading` | Accessible name when the component is loading. | `string` | `TEXT.loading` | -| `intlOptions` | `intl-options` | Accessible name for the component's options button. | `string` | `TEXT.options` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `open` | `open` | When `true`, expands the component and its contents. | `boolean` | `false` | -| `status` | `status` | Displays a status-related indicator icon. | `"idle" \| "invalid" \| "valid"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------------- | ------------------- | ---------------------------------------------------------------------------------------- | -------------------------------- | ----------- | +| `collapsible` | `collapsible` | When `true`, the component is collapsible. | `boolean` | `false` | +| `description` | `description` | A description for the component, which displays below the heading. | `string` | `undefined` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `dragHandle` | `drag-handle` | When `true`, displays a drag handle in the header. | `boolean` | `false` | +| `heading` _(required)_ | `heading` | The component header text. | `string` | `undefined` | +| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `open` | `open` | When `true`, expands the component and its contents. | `boolean` | `false` | +| `status` | `status` | Displays a status-related indicator icon. | `"idle" \| "invalid" \| "valid"` | `undefined` | ## Events diff --git a/src/components/button/button.tsx b/src/components/button/button.tsx index bcb424d4f19..92bd41e8534 100644 --- a/src/components/button/button.tsx +++ b/src/components/button/button.tsx @@ -86,14 +86,6 @@ export class Button /** Specifies an icon to display at the start of the component. */ @Prop({ reflect: true }) iconStart: string; - /** - * Accessible name when the component is loading. - * - * @default "Loading" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlLoading?: string; - /** * When `true`, a busy indicator is displayed and interaction is disabled. */ @@ -166,7 +158,6 @@ export class Button } } - @Watch("intlLoading") @Watch("messageOverrides") onMessagesChange(): void { /** referred in t9n util */ diff --git a/src/components/button/readme.md b/src/components/button/readme.md index e314e38eff5..2d635783c80 100644 --- a/src/components/button/readme.md +++ b/src/components/button/readme.md @@ -61,28 +61,28 @@ Any additional attributes set on `` are passed to the internal ` ## Properties -| Property | Attribute | Description | Type | Default | -| ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------- | -| `alignment` | `alignment` | Specifies the alignment of the component's elements. | `"center" \| "end" \| "icon-end-space-between" \| "icon-start-space-between" \| "space-between" \| "start"` | `"center"` | -| `appearance` | `appearance` | Specifies the appearance style of the component. | `"clear" \| "minimal" \| "outline" \| "solid" \| "transparent"` | `"solid"` | -| `color` | `color` | Specifies the color of the component. | `"blue" \| "inverse" \| "neutral" \| "red"` | `"blue"` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `form` | `form` | **[DEPRECATED]** – The property is no longer needed if the component is placed inside a form.

The form ID to associate with the component. | `string` | `undefined` | -| `href` | `href` | Specifies the URL of the linked resource, which can be set as an absolute or relative path. | `string` | `undefined` | -| `iconEnd` | `icon-end` | Specifies an icon to display at the end of the component. | `string` | `undefined` | -| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `"both" \| "end" \| "start"` | `undefined` | -| `iconStart` | `icon-start` | Specifies an icon to display at the start of the component. | `string` | `undefined` | -| `intlLoading` | `intl-loading` | Accessible name when the component is loading. | `string` | `TEXT.loading` | -| `label` | `label` | Accessible name for the component. | `string` | `undefined` | -| `loading` | `loading` | When `true`, a busy indicator is displayed and interaction is disabled. | `boolean` | `false` | -| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | -| `rel` | `rel` | Defines the relationship between the `href` value and the current document. | `string` | `undefined` | -| `round` | `round` | When `true`, adds a round style to the component. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `splitChild` | `split-child` | Specifies if the component is a child of a `calcite-split-button`. | `"primary" \| "secondary" \| boolean` | `false` | -| `target` | `target` | Specifies where to open the linked document defined in the `href` property. | `string` | `undefined` | -| `type` | `type` | Specifies the default behavior of the button. | `string` | `"button"` | -| `width` | `width` | Specifies the width of the component. | `"auto" \| "full" \| "half"` | `"auto"` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- | +| `alignment` | `alignment` | Specifies the alignment of the component's elements. | `"center" \| "end" \| "icon-end-space-between" \| "icon-start-space-between" \| "space-between" \| "start"` | `"center"` | +| `appearance` | `appearance` | Specifies the appearance style of the component. | `"clear" \| "minimal" \| "outline" \| "solid" \| "transparent"` | `"solid"` | +| `color` | `color` | Specifies the color of the component. | `"blue" \| "inverse" \| "neutral" \| "red"` | `"blue"` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `form` | `form` | **[DEPRECATED]** – The property is no longer needed if the component is placed inside a form.

The form ID to associate with the component. | `string` | `undefined` | +| `href` | `href` | Specifies the URL of the linked resource, which can be set as an absolute or relative path. | `string` | `undefined` | +| `iconEnd` | `icon-end` | Specifies an icon to display at the end of the component. | `string` | `undefined` | +| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `"both" \| "end" \| "start"` | `undefined` | +| `iconStart` | `icon-start` | Specifies an icon to display at the start of the component. | `string` | `undefined` | +| `label` | `label` | Accessible name for the component. | `string` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed and interaction is disabled. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | +| `rel` | `rel` | Defines the relationship between the `href` value and the current document. | `string` | `undefined` | +| `round` | `round` | When `true`, adds a round style to the component. | `boolean` | `false` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `splitChild` | `split-child` | Specifies if the component is a child of a `calcite-split-button`. | `"primary" \| "secondary" \| boolean` | `false` | +| `target` | `target` | Specifies where to open the linked document defined in the `href` property. | `string` | `undefined` | +| `type` | `type` | Specifies the default behavior of the button. | `string` | `"button"` | +| `width` | `width` | Specifies the width of the component. | `"auto" \| "full" \| "half"` | `"auto"` | ## Methods diff --git a/src/components/card/card.tsx b/src/components/card/card.tsx index ed31c33cfa9..d6cfa010ef6 100644 --- a/src/components/card/card.tsx +++ b/src/components/card/card.tsx @@ -71,28 +71,6 @@ export class Card implements ConditionalSlotComponent, LocalizedComponent, T9nCo /** When `true`, the component is selectable. */ @Prop({ reflect: true }) selectable = false; - /** - * Accessible name when the component is loading. - * - * @default "Loading" - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlLoading?: string; - - /** - * When `selectable` is `true`, the accessible name for the component's checkbox for selection. - * - * @default "Select" - */ - @Prop({ reflect: false }) intlSelect?: string; - - /** - * When `selectable` is `true`, the accessible name for the component's checkbox for deselection. - * - * @default "Deselect" - */ - @Prop({ reflect: false }) intlDeselect?: string; - /** Sets the placement of the thumbnail defined in the `thumbnail` slot. */ @Prop({ reflect: true }) thumbnailPosition: LogicalFlowPosition = "block-start"; @@ -108,9 +86,6 @@ export class Card implements ConditionalSlotComponent, LocalizedComponent, T9nCo */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlLoading") - @Watch("intlDeselect") - @Watch("intlSelect") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/card/readme.md b/src/components/card/readme.md index d027cc2179c..01481405f8d 100644 --- a/src/components/card/readme.md +++ b/src/components/card/readme.md @@ -19,15 +19,13 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ------------------- | -------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------- | -| `intlDeselect` | `intl-deselect` | When `selectable` is `true`, the accessible name for the component's checkbox for deselection. | `string` | `TEXT.deselect` | -| `intlLoading` | `intl-loading` | Accessible name when the component is loading. | `string` | `TEXT.loading` | -| `intlSelect` | `intl-select` | When `selectable` is `true`, the accessible name for the component's checkbox for selection. | `string` | `TEXT.select` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `selectable` | `selectable` | When `true`, the component is selectable. | `boolean` | `false` | -| `selected` | `selected` | When `true`, the component is selected. | `boolean` | `false` | -| `thumbnailPosition` | `thumbnail-position` | Sets the placement of the thumbnail defined in the `thumbnail` slot. | `"block-end" \| "block-start" \| "inline-end" \| "inline-start"` | `"block-start"` | +| Property | Attribute | Description | Type | Default | +| ------------------- | -------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------- | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `selectable` | `selectable` | When `true`, the component is selectable. | `boolean` | `false` | +| `selected` | `selected` | When `true`, the component is selected. | `boolean` | `false` | +| `thumbnailPosition` | `thumbnail-position` | Sets the placement of the thumbnail defined in the `thumbnail` slot. | `"block-end" \| "block-start" \| "inline-end" \| "inline-start"` | `"block-start"` | ## Events diff --git a/src/components/chip/chip.e2e.ts b/src/components/chip/chip.e2e.ts index 44e1265dbc9..3bd9804f493 100644 --- a/src/components/chip/chip.e2e.ts +++ b/src/components/chip/chip.e2e.ts @@ -180,5 +180,5 @@ describe("calcite-chip", () => { }); }); - it("supports translation", () => t9n("calcite-chip", false, ["dismissLabel"])); + it("supports translation", () => t9n("calcite-chip")); }); diff --git a/src/components/chip/chip.tsx b/src/components/chip/chip.tsx index 6cc205a02c2..b13cd0dc62f 100644 --- a/src/components/chip/chip.tsx +++ b/src/components/chip/chip.tsx @@ -64,14 +64,6 @@ export class Chip /** When `true`, a close button is added to the component. */ @Prop({ reflect: true, mutable: true }) closable = false; - /** - * Accessible name for the component's close button. - * - * @default "Close" - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() dismissLabel?: string; - /** Specifies an icon to display. */ @Prop({ reflect: true }) icon: string; @@ -99,7 +91,6 @@ export class Chip */ @Prop({ mutable: true }) messages: Messages; - @Watch("dismissLabel") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ @@ -191,16 +182,6 @@ export class Chip private guid: string = guid(); - getExtraMessageOverrides(): Partial { - const extraOverrides: Partial = {}; - - if (this.dismissLabel) { - extraOverrides.dismissLabel = this.dismissLabel; - } - - return extraOverrides; - } - //-------------------------------------------------------------------------- // // Render Methods diff --git a/src/components/chip/readme.md b/src/components/chip/readme.md index d32586d7657..37279ea5c84 100644 --- a/src/components/chip/readme.md +++ b/src/components/chip/readme.md @@ -12,23 +12,23 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| -------------------- | --------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------ | -| `appearance` | `appearance` | Specifies the appearance style of the component. | `"solid" \| "transparent"` | `"solid"` | -| `closable` | `closable` | When `true`, a close button is added to the component. | `boolean` | `false` | -| `closed` | `closed` | When `true`, hides the component. | `boolean` | `false` | -| `color` | `color` | Specifies the color for the component. | `"blue" \| "green" \| "grey" \| "red" \| "yellow"` | `"grey"` | -| `dismissLabel` | `dismiss-label` | Accessible name for the component's close button. | `string` | `TEXT.close` | -| `icon` | `icon` | Specifies an icon to display. | `string` | `undefined` | -| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `value` _(required)_ | `value` | The component's value. | `any` | `undefined` | +| Property | Attribute | Description | Type | Default | +| -------------------- | ------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------- | ----------- | +| `appearance` | `appearance` | Specifies the appearance style of the component. | `"solid" \| "transparent"` | `"solid"` | +| `closable` | `closable` | When `true`, a close button is added to the component. | `boolean` | `false` | +| `closed` | `closed` | When `true`, hides the component. | `boolean` | `false` | +| `color` | `color` | Specifies the color for the component. | `"blue" \| "green" \| "grey" \| "red" \| "yellow"` | `"grey"` | +| `icon` | `icon` | Specifies an icon to display. | `string` | `undefined` | +| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `value` _(required)_ | `value` | The component's value. | `any` | `undefined` | ## Events -| Event | Description | Type | -| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `calciteChipClose` | Fires when the dismiss button is clicked. **Note:**: The `el` event payload props is deprecated, please use the event's `target`/`currentTarget` instead. | `CustomEvent` | +| Event | Description | Type | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `calciteChipClose` | Fires when the close button is clicked. **Note:**: The `el` event payload props is deprecated, please use the event's `target`/`currentTarget` instead. | `CustomEvent` | ## Methods diff --git a/src/components/color-picker/color-picker.tsx b/src/components/color-picker/color-picker.tsx index 815162adc5c..17057b7e8ba 100644 --- a/src/components/color-picker/color-picker.tsx +++ b/src/components/color-picker/color-picker.tsx @@ -133,140 +133,6 @@ export class ColorPicker /** When `true`, hides the saved colors section. */ @Prop({ reflect: true }) hideSaved = false; - /** - * Accessible name for the RGB section's blue channel. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlB: string; - - /** - * Accessible name for the RGB section's blue channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlBlue: string; - - /** - * Accessible name for the delete color button. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlDeleteColor: string; - - /** - * Accessible name for the RGB section's green channel. - * - * @default "G" - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlG: string; - - /** - * Accessible name for the RGB section's green channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlGreen: string; - - /** - * Accessible name for the HSV section's hue channel. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlH: string; - - /** - * Accessible name for the HSV mode. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHsv: string; - - /** - * Accessible name for the Hex input. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHex: string; - - /** - * Accessible name for the HSV section's hue channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHue: string; - - /** - * Accessible name for the Hex input when there is no color selected. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlNoColor: string; - - /** - * Accessible name for the RGB section's red channel. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlR: string; - - /** - * Accessible name for the RGB section's red channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlRed: string; - - /** - * Accessible name for the RGB mode. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlRgb: string; - - /** - * Accessible name for the HSV section's saturation channel. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlS: string; - - /** - * Accessible name for the HSV section's saturation channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSaturation: string; - - /** - * Accessible name for the save color button. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSaveColor: string; - - /** - * Accessible name for the saved colors section. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSaved: string; - - /** - * Accessible name for the HSV section's value channel. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlV: string; - - /** - * Accessible name for the HSV section's value channel description. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlValue: string; - /** Specifies the size of the component. */ @Prop({ reflect: true }) scale: Scale = "m"; @@ -284,26 +150,6 @@ export class ColorPicker */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlG") - @Watch("intlB") - @Watch("intlV") - @Watch("intlBlue") - @Watch("intlDeleteColor") - @Watch("intlGreen") - @Watch("intlH") - @Watch("intlHsv") - @Watch("intlHex") - @Watch("intlHue") - @Watch("intlNoColor") - @Watch("intlR") - @Watch("intlRed") - @Watch("intlRgb") - @Watch("intlS") - @Watch("intlSaturation") - @Watch("intlSaveColor") - @Watch("intlSaved") - @Watch("intlV") - @Watch("intlValue") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/color-picker/readme.md b/src/components/color-picker/readme.md index 1bd0e8861c2..695f1d9fa40 100644 --- a/src/components/color-picker/readme.md +++ b/src/components/color-picker/readme.md @@ -20,38 +20,20 @@ For a minimal design, you can hide unused color formats and options: ## Properties -| Property | Attribute | Description | Type | Default | -| ----------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `allowEmpty` | `allow-empty` | When `false`, an empty color (`null`) will be allowed as a `value`. Otherwise, a color value is enforced on the component. When `true`, a color value is enforced, and clearing the input or blurring will restore the last valid `value`. When `false`, an empty color (`null`) will be allowed as a `value`. | `boolean` | `false` | -| `appearance` | `appearance` | Specifies the appearance style of the component - `"solid"` (containing border) or `"minimal"` (no containing border). | `"default" \| "minimal" \| "solid"` | `"solid"` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `format` | `format` | The format of `value`. When `"auto"`, the format will be inferred from `value` when set. | `"auto" \| "hex" \| "hexa" \| "hsl" \| "hsl-css" \| "hsla" \| "hsla-css" \| "hsv" \| "hsva" \| "rgb" \| "rgb-css" \| "rgba" \| "rgba-css"` | `defaultFormat` | -| `hideChannels` | `hide-channels` | When `true`, hides the RGB/HSV channel inputs. | `boolean` | `false` | -| `hideHex` | `hide-hex` | When `true`, hides the Hex input. | `boolean` | `false` | -| `hideSaved` | `hide-saved` | When `true`, hides the saved colors section. | `boolean` | `false` | -| `intlB` | `intl-b` | Accessible name for the RGB section's blue channel. | `string` | `TEXT.b` | -| `intlBlue` | `intl-blue` | Accessible name for the RGB section's blue channel description. | `string` | `TEXT.blue` | -| `intlDeleteColor` | `intl-delete-color` | Accessible name for the delete color button. | `string` | `TEXT.deleteColor` | -| `intlG` | `intl-g` | Accessible name for the RGB section's green channel. | `string` | `TEXT.g` | -| `intlGreen` | `intl-green` | Accessible name for the RGB section's green channel description. | `string` | `TEXT.green` | -| `intlH` | `intl-h` | Accessible name for the HSV section's hue channel. | `string` | `TEXT.h` | -| `intlHex` | `intl-hex` | Accessible name for the Hex input. | `string` | `TEXT.hex` | -| `intlHsv` | `intl-hsv` | Accessible name for the HSV mode. | `string` | `TEXT.hsv` | -| `intlHue` | `intl-hue` | Accessible name for the HSV section's hue channel description. | `string` | `TEXT.hue` | -| `intlNoColor` | `intl-no-color` | Accessible name for the Hex input when there is no color selected. | `string` | `TEXT.noColor` | -| `intlR` | `intl-r` | Accessible name for the RGB section's red channel. | `string` | `TEXT.r` | -| `intlRed` | `intl-red` | Accessible name for the RGB section's red channel description. | `string` | `TEXT.red` | -| `intlRgb` | `intl-rgb` | Accessible name for the RGB mode. | `string` | `TEXT.rgb` | -| `intlS` | `intl-s` | Accessible name for the HSV section's saturation channel. | `string` | `TEXT.s` | -| `intlSaturation` | `intl-saturation` | Accessible name for the HSV section's saturation channel description. | `string` | `TEXT.saturation` | -| `intlSaveColor` | `intl-save-color` | Accessible name for the save color button. | `string` | `TEXT.saveColor` | -| `intlSaved` | `intl-saved` | Accessible name for the saved colors section. | `string` | `TEXT.saved` | -| `intlV` | `intl-v` | Accessible name for the HSV section's value channel. | `string` | `TEXT.v` | -| `intlValue` | `intl-value` | Accessible name for the HSV section's value channel description. | `string` | `TEXT.value` | -| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `storageId` | `storage-id` | Specifies the storage ID for colors. | `string` | `undefined` | -| `value` | `value` | The component's value, where the value can be a CSS color string, or a RGB, HSL or HSV object. The type will be preserved as the color is updated. | `HSL \| HSL & ObjectWithAlpha \| HSV \| HSV & ObjectWithAlpha \| RGB \| RGB & ObjectWithAlpha \| string` | `defaultValue` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | +| `allowEmpty` | `allow-empty` | When `false`, an empty color (`null`) will be allowed as a `value`. Otherwise, a color value is enforced on the component. When `true`, a color value is enforced, and clearing the input or blurring will restore the last valid `value`. When `false`, an empty color (`null`) will be allowed as a `value`. | `boolean` | `false` | +| `appearance` | `appearance` | Specifies the appearance style of the component - `"solid"` (containing border) or `"minimal"` (no containing border). | `"default" \| "minimal" \| "solid"` | `"solid"` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `format` | `format` | The format of `value`. When `"auto"`, the format will be inferred from `value` when set. | `"auto" \| "hex" \| "hexa" \| "hsl" \| "hsl-css" \| "hsla" \| "hsla-css" \| "hsv" \| "hsva" \| "rgb" \| "rgb-css" \| "rgba" \| "rgba-css"` | `defaultFormat` | +| `hideChannels` | `hide-channels` | When `true`, hides the RGB/HSV channel inputs. | `boolean` | `false` | +| `hideHex` | `hide-hex` | When `true`, hides the Hex input. | `boolean` | `false` | +| `hideSaved` | `hide-saved` | When `true`, hides the saved colors section. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `storageId` | `storage-id` | Specifies the storage ID for colors. | `string` | `undefined` | +| `value` | `value` | The component's value, where the value can be a CSS color string, or a RGB, HSL or HSV object. The type will be preserved as the color is updated. | `HSL \| HSL & ObjectWithAlpha \| HSV \| HSV & ObjectWithAlpha \| RGB \| RGB & ObjectWithAlpha \| string` | `defaultValue` | ## Events diff --git a/src/components/combobox/combobox.tsx b/src/components/combobox/combobox.tsx index d868a7c11f3..2962bdab696 100644 --- a/src/components/combobox/combobox.tsx +++ b/src/components/combobox/combobox.tsx @@ -213,14 +213,6 @@ export class Combobox } } - /** - * Accessible name for the component's remove tag when a `calcite-combobox-item` is selected. - * - * @default "Remove tag" - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop({ reflect: false }) intlRemoveTag: string; - /** * Defines the available placements that can be used when a flip occurs. */ @@ -238,7 +230,6 @@ export class Combobox */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlRemoveTag") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ @@ -1074,10 +1065,10 @@ export class Combobox this.calciteChipCloseHandler(item)} scale={scale} title={label} diff --git a/src/components/combobox/readme.md b/src/components/combobox/readme.md index 5b7795646ee..ca60818538f 100644 --- a/src/components/combobox/readme.md +++ b/src/components/combobox/readme.md @@ -55,34 +55,36 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| -------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ---------------- | -| `allowCustomValues` | `allow-custom-values` | When `true`, allows entry of custom values, which are not in the original set of items. | `boolean` | `undefined` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `flipPlacements` | -- | Defines the available placements that can be used when a flip occurs. | `Placement[]` | `undefined` | -| `intlRemoveTag` | `intl-remove-tag` | Accessible name for the component's remove tag when a `calcite-combobox-item` is selected. | `string` | `TEXT.removeTag` | -| `label` _(required)_ | `label` | Accessible name for the component. | `string` | `undefined` | -| `maxItems` | `max-items` | Specifies the maximum number of `calcite-combobox-item`s (including nested children) to display before displaying a scrollbar. | `number` | `0` | -| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | -| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | -| `overlayPositioning` | `overlay-positioning` | Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. | `"absolute" \| "fixed"` | `"absolute"` | -| `placeholder` | `placeholder` | Specifies the placeholder text for the input. | `string` | `undefined` | -| `placeholderIcon` | `placeholder-icon` | Specifies the placeholder icon for the input. | `string` | `undefined` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `selectionMode` | `selection-mode` | specify the selection mode - multiple: allow any number of selected items (default) - single: only one selection) - ancestors: like multiple, but show ancestors of selected items as selected, only deepest children shown in chips | `"ancestors" \| "multi" \| "multiple" \| "single"` | `"multi"` | -| `value` | `value` | The component's value(s) from the selected `calcite-combobox-item`(s). | `string \| string[]` | `null` | +| Property | Attribute | Description | Type | Default | +| -------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------ | +| `allowCustomValues` | `allow-custom-values` | When `true`, allows entry of custom values, which are not in the original set of items. | `boolean` | `undefined` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `filteredItems` | -- | Specifies the component's filtered items. | `HTMLCalciteComboboxItemElement[]` | `[]` | +| `flipPlacements` | -- | Defines the available placements that can be used when a flip occurs. | `Placement[]` | `undefined` | +| `label` _(required)_ | `label` | Accessible name for the component. | `string` | `undefined` | +| `maxItems` | `max-items` | Specifies the maximum number of `calcite-combobox-item`s (including nested children) to display before displaying a scrollbar. | `number` | `0` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | +| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | +| `overlayPositioning` | `overlay-positioning` | Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. | `"absolute" \| "fixed"` | `"absolute"` | +| `placeholder` | `placeholder` | Specifies the placeholder text for the input. | `string` | `undefined` | +| `placeholderIcon` | `placeholder-icon` | Specifies the placeholder icon for the input. | `string` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `selectedItems` | -- | Specifies the component's selected items. | `HTMLCalciteComboboxItemElement[]` | `[]` | +| `selectionMode` | `selection-mode` | specify the selection mode - multiple: allow any number of selected items (default) - single: only one selection) - ancestors: like multiple, but show ancestors of selected items as selected, only deepest children shown in chips | `"ancestors" \| "multi" \| "multiple" \| "single"` | `"multi"` | +| `value` | `value` | The component's value(s) from the selected `calcite-combobox-item`(s). | `string \| string[]` | `null` | ## Events -| Event | Description | Type | -| ----------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `calciteComboboxBeforeClose` | Fires when the component is requested to be closed, and before the closing transition begins. | `CustomEvent` | -| `calciteComboboxBeforeOpen` | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. | `CustomEvent` | -| `calciteComboboxChange` | Fires when the selected item(s) changes. | `CustomEvent<{ selectedItems: HTMLCalciteComboboxItemElement[]; }>` | -| `calciteComboboxChipClose` | Fires when a selected item in the component is dismissed via its `calcite-chip`. | `CustomEvent` | -| `calciteComboboxClose` | Fires when the component is closed and animation is complete. | `CustomEvent` | -| `calciteComboboxFilterChange` | Fires when text is added to filter the options list. | `CustomEvent<{ visibleItems: HTMLCalciteComboboxItemElement[]; text: string; }>` | -| `calciteComboboxOpen` | Fires when the component is open and animation is complete. | `CustomEvent` | +| Event | Description | Type | +| ----------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------- | +| `calciteComboboxBeforeClose` | Fires when the component is requested to be closed, and before the closing transition begins. | `CustomEvent` | +| `calciteComboboxBeforeOpen` | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. | `CustomEvent` | +| `calciteComboboxChange` | Fires when the selected item(s) changes. | `CustomEvent` | +| `calciteComboboxChipClose` | Fires when a selected item in the component is closed via its `calcite-chip`. | `CustomEvent` | +| `calciteComboboxClose` | Fires when the component is closed and animation is complete. | `CustomEvent` | +| `calciteComboboxFilterChange` | Fires when text is added to filter the options list. | `CustomEvent` | +| `calciteComboboxOpen` | Fires when the component is open and animation is complete. | `CustomEvent` | ## Methods diff --git a/src/components/date-picker-month-header/readme.md b/src/components/date-picker-month-header/readme.md index 3b7cf599a8f..78204ee9b6f 100644 --- a/src/components/date-picker-month-header/readme.md +++ b/src/components/date-picker-month-header/readme.md @@ -4,18 +4,15 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| --------------- | ----------------- | ------------------------------------------------------------------------ | ---------------------------- | ----------- | -| `activeDate` | -- | Focused date with indicator (will become selected date if user proceeds) | `Date` | `undefined` | -| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `intlNextMonth` | `intl-next-month` | Accessible name for the component's next month button. | `string` | `undefined` | -| `intlPrevMonth` | `intl-prev-month` | Accessible name for the component's previous month button. | `string` | `undefined` | -| `intlYear` | `intl-year` | Accessible name for the component's year input. | `string` | `undefined` | -| `localeData` | -- | CLDR locale data for translated calendar info | `DateLocaleData` | `undefined` | -| `max` | -- | Specifies the latest allowed date (`"yyyy-mm-dd"`). | `Date` | `undefined` | -| `min` | -- | Specifies the earliest allowed date (`"yyyy-mm-dd"`). | `Date` | `undefined` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `undefined` | -| `selectedDate` | -- | Already selected date. | `Date` | `undefined` | +| Property | Attribute | Description | Type | Default | +| -------------- | --------------- | ------------------------------------------------------------------------ | ---------------------------- | ----------- | +| `activeDate` | -- | Focused date with indicator (will become selected date if user proceeds) | `Date` | `undefined` | +| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | +| `localeData` | -- | CLDR locale data for translated calendar info | `DateLocaleData` | `undefined` | +| `max` | -- | Specifies the latest allowed date (`"yyyy-mm-dd"`). | `Date` | `undefined` | +| `min` | -- | Specifies the earliest allowed date (`"yyyy-mm-dd"`). | `Date` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `undefined` | +| `selectedDate` | -- | Already selected date. | `Date` | `undefined` | ## Events diff --git a/src/components/date-picker/date-picker.stories.ts b/src/components/date-picker/date-picker.stories.ts index 65fe322bdca..0095963ff6e 100644 --- a/src/components/date-picker/date-picker.stories.ts +++ b/src/components/date-picker/date-picker.stories.ts @@ -38,22 +38,6 @@ const createAttributes: (options?: { exceptions: string[] }) => Attributes = ({ return this; } }, - { - name: "intl-next-month", - commit(): Attribute { - this.value = text("intl-next-month", "Next month"); - delete this.build; - return this; - } - }, - { - name: "intl-prev-month", - commit(): Attribute { - this.value = text("intl-prev-month", "Previous month"); - delete this.build; - return this; - } - }, { name: "lang", commit(): Attribute { diff --git a/src/components/date-picker/date-picker.tsx b/src/components/date-picker/date-picker.tsx index 9da27021ba0..18fab4cff9f 100644 --- a/src/components/date-picker/date-picker.tsx +++ b/src/components/date-picker/date-picker.tsx @@ -144,30 +144,6 @@ export class DatePicker implements LocalizedComponent, T9nComponent { } } - /** - * Accessible name for the component's previous month button. - * - * @default "Previous month" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlPrevMonth?: string; - - /** - * Accessible name for the component's next month button. - * - * @default "Next month" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlNextMonth?: string; - - /** - * Accessible name for the component's year input. - * - * @default "Year" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlYear?: string; - /** * Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. * @@ -195,9 +171,6 @@ export class DatePicker implements LocalizedComponent, T9nComponent { */ @Prop({ mutable: true }) messages: Messages; - @Watch("intlNextMonth") - @Watch("intlPrevMonth") - @Watch("intlYear") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/date-picker/readme.md b/src/components/date-picker/readme.md index 44a8d86f2d5..3a64dab920f 100644 --- a/src/components/date-picker/readme.md +++ b/src/components/date-picker/readme.md @@ -16,43 +16,39 @@ You can set a min and max range, as well as an initial value with ISO 8601 forma ### Range -You can also add range property to activate date range mode. In this mode, you can specify start and end instead of the single value property. +You can also add range property to activate date range mode. In this mode, you will have to set the value property directly on the component's instance to an array of date strings. ```html - + ``` ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -| `activeDate` | -- | Specifies the component's active date. | `Date` | `undefined` | -| `activeRange` | `active-range` | When `range` is true, specifies the active `range`. Where `"start"` specifies the starting range date and `"end"` the ending range date. | `"end" \| "start"` | `undefined` | -| `end` | `end` | **[DEPRECATED]** use `value` instead.

Specifies the selected end date. | `string` | `undefined` | -| `endAsDate` | -- | **[DEPRECATED]** use `valueAsDate` instead.

Specifies the selected end date as a full date object. | `Date` | `undefined` | -| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `intlNextMonth` | `intl-next-month` | Accessible name for the component's next month button. | `string` | `TEXT.nextMonth` | -| `intlPrevMonth` | `intl-prev-month` | Accessible name for the component's previous month button. | `string` | `TEXT.prevMonth` | -| `intlYear` | `intl-year` | Accessible name for the component's year input. | `string` | `TEXT.year` | -| `max` | `max` | Specifies the latest allowed date (`"yyyy-mm-dd"`). | `string` | `undefined` | -| `maxAsDate` | -- | Specifies the latest allowed date as a full date object (`new Date("yyyy-mm-dd")`). | `Date` | `undefined` | -| `min` | `min` | Specifies the earliest allowed date (`"yyyy-mm-dd"`). | `string` | `undefined` | -| `minAsDate` | -- | Specifies the earliest allowed date as a full date object (`new Date("yyyy-mm-dd")`). | `Date` | `undefined` | -| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | -| `proximitySelectionDisabled` | `proximity-selection-disabled` | When `true`, disables the default behavior on the third click of narrowing or extending the range and instead starts a new range. | `boolean` | `false` | -| `range` | `range` | When `true`, activates the component's range mode to allow a start and end date. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `start` | `start` | **[DEPRECATED]** use `value` instead.

Specifies the selected start date. | `string` | `undefined` | -| `startAsDate` | -- | **[DEPRECATED]** use `valueAsDate` instead.

Specifies the selected start date as a full date object. | `Date` | `undefined` | -| `value` | `value` | Specifies the selected date as a string (`"yyyy-mm-dd"`), or an array of strings for `range` values (`["yyyy-mm-dd", "yyyy-mm-dd"]`). | `string \| string[]` | `undefined` | -| `valueAsDate` | -- | Specifies the selected date as a full date object (`new Date("yyyy-mm-dd")`), or an array containing full date objects (`[new Date("yyyy-mm-dd"), new Date("yyyy-mm-dd")]`). | `Date \| Date[]` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | +| `activeDate` | -- | Specifies the component's active date. | `Date` | `undefined` | +| `activeRange` | `active-range` | When `range` is true, specifies the active `range`. Where `"start"` specifies the starting range date and `"end"` the ending range date. | `"end" \| "start"` | `undefined` | +| `endAsDate` | -- | **[DEPRECATED]** use `valueAsDate` instead.

Specifies the selected end date as a full date object. | `Date` | `undefined` | +| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | +| `max` | `max` | Specifies the latest allowed date (`"yyyy-mm-dd"`). | `string` | `undefined` | +| `maxAsDate` | -- | Specifies the latest allowed date as a full date object (`new Date("yyyy-mm-dd")`). | `Date` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `min` | `min` | Specifies the earliest allowed date (`"yyyy-mm-dd"`). | `string` | `undefined` | +| `minAsDate` | -- | Specifies the earliest allowed date as a full date object (`new Date("yyyy-mm-dd")`). | `Date` | `undefined` | +| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | +| `proximitySelectionDisabled` | `proximity-selection-disabled` | When `true`, disables the default behavior on the third click of narrowing or extending the range and instead starts a new range. | `boolean` | `false` | +| `range` | `range` | When `true`, activates the component's range mode to allow a start and end date. | `boolean` | `false` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `startAsDate` | -- | **[DEPRECATED]** use `valueAsDate` instead.

Specifies the selected start date as a full date object. | `Date` | `undefined` | +| `value` | `value` | Specifies the selected date as a string (`"yyyy-mm-dd"`), or an array of strings for `range` values (`["yyyy-mm-dd", "yyyy-mm-dd"]`). | `string \| string[]` | `undefined` | +| `valueAsDate` | -- | Specifies the selected date as a full date object (`new Date("yyyy-mm-dd")`), or an array containing full date objects (`[new Date("yyyy-mm-dd"), new Date("yyyy-mm-dd")]`). | `Date \| Date[]` | `undefined` | ## Events -| Event | Description | Type | -| ------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -| `calciteDatePickerChange` | Emits when a user changes the component's date. For `range` events, use `calciteDatePickerRangeChange`. | `CustomEvent` | -| `calciteDatePickerRangeChange` | Emits when a user changes the component's date `range`. For components without `range` use `calciteDatePickerChange`. | `CustomEvent` | +| Event | Description | Type | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------- | +| `calciteDatePickerChange` | Emits when a user changes the component's date. For `range` events, use `calciteDatePickerRangeChange`. | `CustomEvent` | +| `calciteDatePickerRangeChange` | Emits when a user changes the component's date `range`. For components without `range` use `calciteDatePickerChange`. | `CustomEvent` | ## Dependencies diff --git a/src/components/dropdown/dropdown.e2e.ts b/src/components/dropdown/dropdown.e2e.ts index 6955c85b2ba..3a43f9e53e2 100644 --- a/src/components/dropdown/dropdown.e2e.ts +++ b/src/components/dropdown/dropdown.e2e.ts @@ -4,7 +4,6 @@ import dedent from "dedent"; import { html } from "../../../support/formatting"; import { CSS } from "./resources"; import { GlobalTestProps } from "../../tests/utils"; -import { Selection } from "./interfaces"; describe("calcite-dropdown", () => { it("renders", () => @@ -52,11 +51,6 @@ describe("calcite-dropdown", () => { * IDs from items to assert selection */ expectedItemIds: string[]; - - /** - * If testing on the event payload, the most recent ID is used to assert the - */ - mostRecentId?: string; } /** @@ -67,24 +61,14 @@ describe("calcite-dropdown", () => { * @param page * @param root0 * @param root0.expectedItemIds - * @param root0.mostRecentId */ - async function assertSelectedItems( - page: E2EPage, - { expectedItemIds, mostRecentId }: SelectedItemsAssertionOptions - ): Promise { + async function assertSelectedItems(page: E2EPage, { expectedItemIds }: SelectedItemsAssertionOptions): Promise { await page.waitForTimeout(100); const selectedItemIds = await page.evaluate(() => { const dropdown = document.querySelector("calcite-dropdown"); return dropdown.selectedItems.map((item) => item.id); }); - if (mostRecentId) { - const selectedItemId = await page.evaluate(() => { - return (window as SelectionEventTestWindow).eventDetail.item.id; - }); - expect(selectedItemId).toBe(mostRecentId); - } expect(selectedItemIds).toHaveLength(expectedItemIds.length); expectedItemIds.forEach((itemId, index) => expect(selectedItemIds[index]).toEqual(itemId)); @@ -260,24 +244,21 @@ describe("calcite-dropdown", () => { await item1.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-2"], - mostRecentId: "item-1" + expectedItemIds: ["item-1", "item-2"] }); await trigger.click(); await page.waitForChanges(); await item2.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1"], - mostRecentId: "item-2" + expectedItemIds: ["item-1"] }); await trigger.click(); await page.waitForChanges(); await item3.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3"], - mostRecentId: "item-3" + expectedItemIds: ["item-1", "item-3"] }); expect(item1).toHaveAttribute("selected"); @@ -312,16 +293,14 @@ describe("calcite-dropdown", () => { await item1.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1"], - mostRecentId: "item-1" + expectedItemIds: ["item-1"] }); await trigger.click(); await page.waitForChanges(); await item3.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-3"], - mostRecentId: "item-3" + expectedItemIds: ["item-3"] }); expect(item1).not.toHaveAttribute("selected"); @@ -353,15 +332,15 @@ describe("calcite-dropdown", () => { await trigger.click(); await item1.click(); await page.waitForChanges(); - await assertSelectedItems(page, { expectedItemIds: [], mostRecentId: "item-1" }); + await assertSelectedItems(page, { expectedItemIds: [] }); await trigger.click(); await item2.click(); await page.waitForChanges(); - await assertSelectedItems(page, { expectedItemIds: [], mostRecentId: "item-2" }); + await assertSelectedItems(page, { expectedItemIds: [] }); await trigger.click(); await item3.click(); await page.waitForChanges(); - await assertSelectedItems(page, { expectedItemIds: [], mostRecentId: "item-3" }); + await assertSelectedItems(page, { expectedItemIds: [] }); expect(item1).not.toHaveAttribute("selected"); expect(item2).not.toHaveAttribute("selected"); @@ -417,56 +396,49 @@ describe("calcite-dropdown", () => { await item1.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-2", "item-5"], - mostRecentId: "item-1" + expectedItemIds: ["item-1", "item-2", "item-5"] }); await trigger.click(); await page.waitForChanges(); await item2.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-5"], - mostRecentId: "item-2" + expectedItemIds: ["item-1", "item-5"] }); await trigger.click(); await page.waitForChanges(); await item3.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3", "item-5"], - mostRecentId: "item-3" + expectedItemIds: ["item-1", "item-3", "item-5"] }); await trigger.click(); await page.waitForChanges(); await item4.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3", "item-4"], - mostRecentId: "item-4" + expectedItemIds: ["item-1", "item-3", "item-4"] }); await trigger.click(); await page.waitForChanges(); await item6.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3", "item-6"], - mostRecentId: "item-6" + expectedItemIds: ["item-1", "item-3", "item-6"] }); await trigger.click(); await page.waitForChanges(); await item7.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3", "item-6"], - mostRecentId: "item-7" + expectedItemIds: ["item-1", "item-3", "item-6"] }); await trigger.click(); await page.waitForChanges(); await item9.click(); await page.waitForChanges(); await assertSelectedItems(page, { - expectedItemIds: ["item-1", "item-3", "item-6"], - mostRecentId: "item-9" + expectedItemIds: ["item-1", "item-3", "item-6"] }); expect(item1).toHaveAttribute("selected"); @@ -692,9 +664,9 @@ describe("calcite-dropdown", () => { expect(await dropdownWrapper.isVisible()).toBe(false); }); - it("remains open when disable-close-on-select is requested and selected item is not in a selection-mode:none group", async () => { + it("remains open when close-on-select-disabled is requested and selected item is not in a selection-mode:none group", async () => { const page = await newE2EPage(); - await page.setContent(html` + await page.setContent(html` Open dropdown Dropdown Item Content @@ -722,9 +694,9 @@ describe("calcite-dropdown", () => { expect(await dropdownWrapper.isVisible()).toBe(true); }); - it("closes when disable-close-on-select is requested and selected item is in a selection-mode:none group", async () => { + it("closes when close-on-select-disabled is requested and selected item is in a selection-mode:none group", async () => { const page = await newE2EPage(); - await page.setContent(html` + await page.setContent(html` Open dropdown @@ -983,7 +955,7 @@ describe("calcite-dropdown", () => { it("item selection should work when placed inside shadow DOM (#992)", async () => { const wrappedDropdownTemplateHTML = html` - + Open 1 diff --git a/src/components/dropdown/dropdown.stories.ts b/src/components/dropdown/dropdown.stories.ts index 5ff10821f87..8143c3ebb51 100644 --- a/src/components/dropdown/dropdown.stories.ts +++ b/src/components/dropdown/dropdown.stories.ts @@ -25,7 +25,7 @@ export const simple = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -46,7 +46,7 @@ export const simpleAutoWidth = (): string => html` placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -70,7 +70,7 @@ export const simpleFullWidth = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -93,7 +93,7 @@ export const withIcons = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -131,7 +131,7 @@ export const groupsAndSelectionModes = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -159,7 +159,7 @@ export const itemsAsLinks = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -197,7 +197,7 @@ export const darkThemeRTL_TestOnly = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -232,7 +232,7 @@ export const itemsAsLinksDarkTheme = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -271,7 +271,7 @@ export const scrollingAfterCertainItems_TestOnly = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -398,7 +398,7 @@ export const alignedCenter_TestOnly = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown @@ -427,7 +427,7 @@ export const alignedCenterRTL_TestOnly = (): string => html` scale="${select("scale", ["s", "m", "l"], "m")}" width="${select("width", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" - ${boolean("disable-close-on-select", false)} + ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} > Open Dropdown diff --git a/src/components/dropdown/dropdown.tsx b/src/components/dropdown/dropdown.tsx index f70dc3a7cf8..7cca2f1c879 100644 --- a/src/components/dropdown/dropdown.tsx +++ b/src/components/dropdown/dropdown.tsx @@ -11,7 +11,7 @@ import { VNode, Watch } from "@stencil/core"; -import { ItemKeyboardEvent, Selection } from "./interfaces"; +import { ItemKeyboardEvent } from "./interfaces"; import { focusElement, isPrimaryPointerButton, toAriaBoolean } from "../../utils/dom"; import { @@ -95,7 +95,7 @@ export class Dropdown implements InteractiveComponent, OpenCloseComponent, Float * If the `selectionMode` of the selected `calcite-dropdown-item`'s containing `calcite-dropdown-group` is `"none"`, the component will always close. * */ - @Prop({ reflect: true }) disableCloseOnSelect = false; + @Prop({ reflect: true }) closeOnSelectDisabled = false; /** * When `true`, interaction is prevented and the component is displayed with lower opacity. @@ -289,7 +289,7 @@ export class Dropdown implements InteractiveComponent, OpenCloseComponent, Float //-------------------------------------------------------------------------- /** Fires when a `calcite-dropdown-item`'s selection changes. */ - @Event({ cancelable: false }) calciteDropdownSelect: EventEmitter; + @Event({ cancelable: false }) calciteDropdownSelect: EventEmitter; /** Fires when the component is requested to be closed and before the closing transition begins. */ @Event({ cancelable: false }) calciteDropdownBeforeClose: EventEmitter; @@ -382,11 +382,9 @@ export class Dropdown implements InteractiveComponent, OpenCloseComponent, Float handleItemSelect(event: CustomEvent): void { this.updateSelectedItems(); event.stopPropagation(); - this.calciteDropdownSelect.emit({ - item: event.detail.requestedDropdownItem - }); + this.calciteDropdownSelect.emit(); if ( - !this.disableCloseOnSelect || + !this.closeOnSelectDisabled || event.detail.requestedDropdownGroup.selectionMode === "none" ) { this.closeCalciteDropdown(); diff --git a/src/components/dropdown/interfaces.ts b/src/components/dropdown/interfaces.ts index 0812a137428..706431488e5 100644 --- a/src/components/dropdown/interfaces.ts +++ b/src/components/dropdown/interfaces.ts @@ -1,10 +1,3 @@ export interface ItemKeyboardEvent { keyboardEvent: KeyboardEvent; } - -export interface Selection { - /** - * The item that caused a selection event to emit. - */ - item: HTMLCalciteDropdownItemElement; -} diff --git a/src/components/dropdown/readme.md b/src/components/dropdown/readme.md index 6bf290f4af1..52c699cc0cb 100644 --- a/src/components/dropdown/readme.md +++ b/src/components/dropdown/readme.md @@ -21,10 +21,10 @@ A `calcite-dropdown` can be used to provide an absolutely positioned set of sele ### Disabling-close-on-select -You can choose to leave the dropdown open when an item is selected with the `disable-close-on-select` attribute. Note that this will only apply when the `calcite-dropdown-group` selection mode is set to `single` or `multi` - dropdowns will always close when an item in `none` selection mode is selected. +You can choose to leave the dropdown open when an item is selected with the `close-on-select-disabled` attribute. Note that this will only apply when the `calcite-dropdown-group` selection mode is set to `single` or `multi` - dropdowns will always close when an item in `none` selection mode is selected. ```html - + Open dropdown Dropdown Item Content @@ -60,19 +60,19 @@ You can combine groups in a single dropdown, with varying selection modes: ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ---------------------- | -| `disableCloseOnSelect` | `disable-close-on-select` | When `true`, the component will remain open after a selection is made. If the `selectionMode` of the selected `calcite-dropdown-item`'s containing `calcite-dropdown-group` is `"none"`, the component will always close. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `flipPlacements` | -- | Defines the available placements that can be used when a flip occurs. | `Placement[]` | `undefined` | -| `maxItems` | `max-items` | Specifies the maximum number of `calcite-dropdown-item`s to display before showing a scroller. Value must be greater than `0`, and does not include `groupTitle`'s from `calcite-dropdown-group`. | `number` | `0` | -| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | -| `overlayPositioning` | `overlay-positioning` | Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. | `"absolute" \| "fixed"` | `"absolute"` | -| `placement` | `placement` | Determines where the component will be positioned relative to the container element. | `"bottom" \| "bottom-end" \| "bottom-start" \| "top" \| "top-end" \| "top-start"` | `defaultMenuPlacement` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `selectedItems` | -- | Specifies the component's selected items. | `HTMLCalciteDropdownItemElement[]` | `[]` | -| `type` | `type` | Specifies the action to open the component from the container element. | `"click" \| "hover"` | `"click"` | -| `width` | `width` | Specifies the width of the component. | `"l" \| "m" \| "s"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ----------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ---------------------- | +| `closeOnSelectDisabled` | `close-on-select-disabled` | When `true`, the component will remain open after a selection is made. If the `selectionMode` of the selected `calcite-dropdown-item`'s containing `calcite-dropdown-group` is `"none"`, the component will always close. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `flipPlacements` | -- | Defines the available placements that can be used when a flip occurs. | `Placement[]` | `undefined` | +| `maxItems` | `max-items` | Specifies the maximum number of `calcite-dropdown-item`s to display before showing a scroller. Value must be greater than `0`, and does not include `groupTitle`'s from `calcite-dropdown-group`. | `number` | `0` | +| `open` | `open` | When `true`, displays and positions the component. | `boolean` | `false` | +| `overlayPositioning` | `overlay-positioning` | Determines the type of positioning to use for the overlaid content. Using `"absolute"` will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. `"fixed"` should be used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`. | `"absolute" \| "fixed"` | `"absolute"` | +| `placement` | `placement` | Determines where the component will be positioned relative to the container element. | `"bottom" \| "bottom-end" \| "bottom-start" \| "top" \| "top-end" \| "top-start"` | `defaultMenuPlacement` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `selectedItems` | -- | Specifies the component's selected items. | `HTMLCalciteDropdownItemElement[]` | `[]` | +| `type` | `type` | Specifies the action to open the component from the container element. | `"click" \| "hover"` | `"click"` | +| `width` | `width` | Specifies the width of the component. | `"l" \| "m" \| "s"` | `undefined` | ## Events diff --git a/src/components/dropdown/usage/Disabling-close-on-select.md b/src/components/dropdown/usage/Disabling-close-on-select.md index b0e2469873e..cb3d543b2e2 100644 --- a/src/components/dropdown/usage/Disabling-close-on-select.md +++ b/src/components/dropdown/usage/Disabling-close-on-select.md @@ -1,7 +1,7 @@ -You can choose to leave the dropdown open when an item is selected with the `disable-close-on-select` attribute. Note that this will only apply when the `calcite-dropdown-group` selection mode is set to `single` or `multi` - dropdowns will always close when an item in `none` selection mode is selected. +You can choose to leave the dropdown open when an item is selected with the `close-on-select-disabled` attribute. Note that this will only apply when the `calcite-dropdown-group` selection mode is set to `single` or `multi` - dropdowns will always close when an item in `none` selection mode is selected. ```html - + Open dropdown Dropdown Item Content diff --git a/src/components/filter/filter.tsx b/src/components/filter/filter.tsx index 09af471fe1c..0bba5bb1b34 100644 --- a/src/components/filter/filter.tsx +++ b/src/components/filter/filter.tsx @@ -76,20 +76,6 @@ export class Filter */ @Prop({ mutable: true }) filteredItems: object[] = []; - /** - * A text label that will appear on the clear button. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlClear: string; - - /** - * Accessible name for the component. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlLabel: string; - /** * Specifies placeholder text for the input element. */ @@ -117,8 +103,6 @@ export class Filter */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlClear") - @Watch("intlLabel") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ @@ -264,7 +248,7 @@ export class Filter clearable={true} disabled={disabled} icon={ICONS.search} - intlClear={this.messages.clear} + messageOverrides={{ clear: this.messages.clear }} onCalciteInputInput={this.inputHandler} onKeyDown={this.keyDownHandler} placeholder={this.placeholder} diff --git a/src/components/filter/readme.md b/src/components/filter/readme.md index 76f3bdf64cd..19c20e0b40d 100644 --- a/src/components/filter/readme.md +++ b/src/components/filter/readme.md @@ -4,22 +4,21 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------- | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `filteredItems` | -- | The component's resulting items after filtering. | `object[]` | `[]` | -| `intlClear` | `intl-clear` | Accessible name for the component's clear button. | `string` | `undefined` | -| `intlLabel` | `intl-label` | Accessible name for the component. | `string` | `undefined` | -| `items` | -- | Defines the items to filter. The component uses the values as the starting point, and returns items that contain the string entered in the input, using a partial match and recursive search. This property is needed to conduct filtering. | `object[]` | `[]` | -| `placeholder` | `placeholder` | Specifies placeholder text for the input element. | `string` | `undefined` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `value` | `value` | The component's value. | `string` | `""` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------- | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `filteredItems` | -- | The component's resulting items after filtering. | `object[]` | `[]` | +| `items` | -- | Defines the items to filter. The component uses the values as the starting point, and returns items that contain the string entered in the input, using a partial match and recursive search. This property is needed to conduct filtering. | `object[]` | `[]` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `placeholder` | `placeholder` | Specifies placeholder text for the input element. | `string` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `value` | `value` | The component's value. | `string` | `""` | ## Events -| Event | Description | Type | -| --------------------- | ---------------------------------------- | ------------------- | -| `calciteFilterChange` | Fires when the component's text changes. | `CustomEvent` | +| Event | Description | Type | +| --------------------- | ---------------------------------------------- | ------------------- | +| `calciteFilterChange` | This event fires when the filter text changes. | `CustomEvent` | ## Methods diff --git a/src/components/flow-item/flow-item.tsx b/src/components/flow-item/flow-item.tsx index c9d3da0c88d..e737c63d617 100644 --- a/src/components/flow-item/flow-item.tsx +++ b/src/components/flow-item/flow-item.tsx @@ -92,25 +92,6 @@ export class FlowItem */ @Prop({ reflect: true }) heightScale: Scale; - /** - * When `showBackButton` is `true`, the accessible name for the component's back button. - * - * @deprecated use `calcite-flow-item` instead. - */ - @Prop() intlBack: string; - - /** - * When `closable` is `true`, the accessible name for the component's close button. - */ - @Prop() intlClose: string; - - /** - * Accessible name for the component's actions menu. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlOptions: string; - /** * When `true`, a busy indicator is displayed. */ @@ -126,9 +107,6 @@ export class FlowItem */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlBack") - @Watch("intlClose") - @Watch("intlOptions") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/flow-item/readme.md b/src/components/flow-item/readme.md index bf1acf24e97..a9f2914949b 100644 --- a/src/components/flow-item/readme.md +++ b/src/components/flow-item/readme.md @@ -4,23 +4,21 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------- | ------------------ | --------------------------------------------------------------------------------------------- | ---------------------------- | ----------- | -| `beforeBack` | -- | When provided, the method will be called before it is removed from its parent `calcite-flow`. | `() => Promise` | `undefined` | -| `closable` | `closable` | When `true`, displays a close button in the trailing side of the component's header. | `boolean` | `false` | -| `closed` | `closed` | When `true`, the component will be hidden. | `boolean` | `false` | -| `description` | `description` | A description for the component. | `string` | `undefined` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `heading` | `heading` | The component header text. | `string` | `undefined` | -| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `heightScale` | `height-scale` | Specifies the maximum height of the component. | `"l" \| "m" \| "s"` | `undefined` | -| `intlBack` | `intl-back` | When `showBackButton` is `true`, the accessible name for the component's back button. | `string` | `undefined` | -| `intlClose` | `intl-close` | When `closable` is `true`, the accessible name for the component's close button. | `string` | `undefined` | -| `intlOptions` | `intl-options` | Accessible name for the component's actions menu. | `string` | `undefined` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `menuOpen` | `menu-open` | When `true`, the action menu items in the `header-menu-actions` slot are open. | `boolean` | `false` | -| `showBackButton` | `show-back-button` | When `true`, displays a back button in the component's header. | `boolean` | `false` | -| `widthScale` | `width-scale` | Specifies the width of the component. | `"l" \| "m" \| "s"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------- | ----------- | +| `beforeBack` | -- | When provided, the method will be called before it is removed from its parent `calcite-flow`. | `() => Promise` | `undefined` | +| `closable` | `closable` | When `true`, displays a close button in the trailing side of the component's header. | `boolean` | `false` | +| `closed` | `closed` | When `true`, the component will be hidden. | `boolean` | `false` | +| `description` | `description` | A description for the component. | `string` | `undefined` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `heading` | `heading` | The component header text. | `string` | `undefined` | +| `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | +| `heightScale` | `height-scale` | Specifies the maximum height of the component. | `"l" \| "m" \| "s"` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `menuOpen` | `menu-open` | When `true`, the action menu items in the `header-menu-actions` slot are open. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `showBackButton` | `show-back-button` | When true, displays a back button in the header. When `true`, displays a back button in the component's header. | `boolean` | `false` | +| `widthScale` | `width-scale` | Specifies the width of the component. | `"l" \| "m" \| "s"` | `undefined` | ## Events diff --git a/src/components/inline-editable/inline-editable.stories.ts b/src/components/inline-editable/inline-editable.stories.ts index 63a4be2a671..f3e0ab51f42 100644 --- a/src/components/inline-editable/inline-editable.stories.ts +++ b/src/components/inline-editable/inline-editable.stories.ts @@ -20,9 +20,6 @@ export const simple = (): string => html` ${boolean("editing-enabled", false, "InlineEditable") && "editing-enabled"} ${boolean("loading", false, "InlineEditable") && "loading"} ${boolean("disabled", false, "InlineEditable") && "disabled"} - intl-cancel-editing="${text("intl-cancel-editing", "Cancelar", "InlineEditable")}" - intl-enable-editing="${text("intl-enable-editing", "Haga clic para editar", "InlineEditable")}" - intl-confirm-changes="${text("intl-confirm-changes", "Guardar", "InlineEditable")}" > html` ${boolean("editing-enabled", false, "InlineEditable") && "editing-enabled"} ${boolean("loading", false, "InlineEditable") && "loading"} ${boolean("disabled", false, "InlineEditable") && "disabled"} - intl-cancel-editing="${text("intl-cancel-editing", "Cancelar", "InlineEditable")}" - intl-enable-editing="${text("intl-enable-editing", "Haga clic para editar", "InlineEditable")}" - intl-confirm-changes="${text("intl-confirm-changes", "Guardar", "InlineEditable")}" > ; - @Watch("intlCancelEditing") - @Watch("intlConfirmChanges") - @Watch("intlEnableEditing") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/inline-editable/readme.md b/src/components/inline-editable/readme.md index 9705c3407c0..6d20d858e66 100644 --- a/src/components/inline-editable/readme.md +++ b/src/components/inline-editable/readme.md @@ -35,17 +35,18 @@ There is no need to set a theme or scale on the `` comp ## Properties -| Property | Attribute | Description | Type | Default | -| -------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- | -------------------------- | -| `afterConfirm` | -- | Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. | `() => Promise` | `undefined` | -| `controls` | `controls` | When `true` and `editingEnabled` is `true`, displays save and cancel controls on the component. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `editingEnabled` | `editing-enabled` | When `true`, inline editing is enabled on the component. | `boolean` | `false` | -| `intlCancelEditing` | `intl-cancel-editing` | Accessible name for the component's cancel editing button. | `string` | `TEXT.intlCancelEditing` | -| `intlConfirmChanges` | `intl-confirm-changes` | Accessible name for the component's confirm edits button. | `string` | `TEXT.intlConfirmChanges` | -| `intlEnableEditing` | `intl-enable-editing` | Accessible name for the component's enable editing button. | `string` | `TEXT.intlEnablingEditing` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. Defaults to the scale of the wrapped `calcite-input` or the scale of the closest wrapping component with a set scale. | `"l" \| "m" \| "s"` | `undefined` | +| Property | Attribute | Description | Type | Default | +| -------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------- | +| `afterConfirm` | -- | Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. | `() => Promise` | `undefined` | +| `controls` | `controls` | When `true` and `editingEnabled` is `true`, displays save and cancel controls on the component. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `editingEnabled` | `editing-enabled` | When `true`, inline editing is enabled on the component. | `boolean` | `false` | +| `intlCancelEditing` | `intl-cancel-editing` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name for the component's cancel editing button. | `string` | `undefined` | +| `intlConfirmChanges` | `intl-confirm-changes` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name for the component's confirm edits button. | `string` | `undefined` | +| `intlEnableEditing` | `intl-enable-editing` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name for the component's enable editing button. | `string` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `scale` | `scale` | Specifies the size of the component. Defaults to the scale of the wrapped `calcite-input` or the scale of the closest wrapping component with a set scale. | `"l" \| "m" \| "s"` | `undefined` | ## Events diff --git a/src/components/input-date-picker/input-date-picker.e2e.ts b/src/components/input-date-picker/input-date-picker.e2e.ts index 1904d5586b4..55ab27d61cb 100644 --- a/src/components/input-date-picker/input-date-picker.e2e.ts +++ b/src/components/input-date-picker/input-date-picker.e2e.ts @@ -45,7 +45,6 @@ describe("calcite-input-date-picker", () => { const input = await page.find("calcite-input-date-picker"); const changeEvent = await page.spyOnEvent("calciteInputDatePickerChange"); - const deprecatedChangeEvent = await page.spyOnEvent("calciteDatePickerChange"); expect(await input.getProperty("value")).toBe(""); @@ -67,7 +66,6 @@ describe("calcite-input-date-picker", () => { expect(await input.getProperty("valueAsDate")).toBeDefined(); expect(changeEvent).toHaveReceivedEventTimes(1); - expect(deprecatedChangeEvent).toHaveReceivedEventTimes(1); await page.keyboard.press("Backspace"); await page.keyboard.press("Backspace"); @@ -83,7 +81,6 @@ describe("calcite-input-date-picker", () => { await page.waitForChanges(); expect(changeEvent).toHaveReceivedEventTimes(2); - expect(deprecatedChangeEvent).toHaveReceivedEventTimes(2); expect(await input.getProperty("value")).toBe(""); expect(await input.getProperty("valueAsDate")).toBeUndefined(); @@ -96,10 +93,8 @@ describe("calcite-input-date-picker", () => { element.setProperty("value", ""); await page.waitForChanges(); const changeEvent = await page.spyOnEvent("calciteInputDatePickerChange"); - const deprecatedChangeEvent = await page.spyOnEvent("calciteDatePickerChange"); expect(changeEvent).toHaveReceivedEventTimes(0); - expect(deprecatedChangeEvent).toHaveReceivedEventTimes(0); expect(await element.getProperty("value")).toBe(""); expect(await element.getProperty("valueAsDate")).toBeUndefined(); }); diff --git a/src/components/input-date-picker/input-date-picker.stories.ts b/src/components/input-date-picker/input-date-picker.stories.ts index bb1bf6a070f..7e742b5eed3 100644 --- a/src/components/input-date-picker/input-date-picker.stories.ts +++ b/src/components/input-date-picker/input-date-picker.stories.ts @@ -22,8 +22,6 @@ export const simple = (): string => html` min="${text("min", "2016-08-09")}" max="${text("max", "2023-12-18")}" lang="${select("locale", locales, "en")}" - intl-next-month="${text("intl-next-month", "Next month")}" - intl-prev-month="${text("intl-prev-month", "Previous month")}" placement="${select("placement", menuPlacements, defaultMenuPlacement)}" > diff --git a/src/components/input-date-picker/input-date-picker.tsx b/src/components/input-date-picker/input-date-picker.tsx index 648be453e2c..f6ede9ccf85 100644 --- a/src/components/input-date-picker/input-date-picker.tsx +++ b/src/components/input-date-picker/input-date-picker.tsx @@ -243,30 +243,6 @@ export class InputDatePicker */ @Prop({ reflect: true }) name: string; - /** - * Accessible name for the component's previous month button. - * - * @default "Previous month" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlPrevMonth?: string; - - /** - * Accessible name for the component's next month button. - * - * @default "Next month" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlNextMonth?: string; - - /** - * Accessible name for the component's year input. - * - * @default "Year" - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlYear?: string; - /** * Specifies the Unicode numeral system used by the component for localization. This property cannot be dynamically changed. * @@ -376,12 +352,6 @@ export class InputDatePicker // Events // //-------------------------------------------------------------------------- - /** - * Fires when a user changes the date. - * - * @deprecated use `calciteInputDatePickerChange` instead. - */ - @Event({ cancelable: false }) calciteDatePickerChange: EventEmitter; /** * Fires when a user changes the date range. @@ -582,10 +552,6 @@ export class InputDatePicker activeRange={this.focusedInput} endAsDate={this.endAsDate} headingLevel={this.headingLevel} - //t9n props are used here to forward the messages only. - intlNextMonth={this.intlNextMonth} - intlPrevMonth={this.intlPrevMonth} - intlYear={this.intlYear} max={this.max} maxAsDate={this.maxAsDate} messageOverrides={this.messageOverrides} @@ -1012,9 +978,8 @@ export class InputDatePicker this.value = newValue || ""; const changeEvent = this.calciteInputDatePickerChange.emit(); - const deprecatedDatePickerChangeEvent = this.calciteDatePickerChange.emit(value as Date); - if (changeEvent.defaultPrevented || deprecatedDatePickerChangeEvent.defaultPrevented) { + if (changeEvent.defaultPrevented) { this.value = oldValue; this.setInputValue(oldValue as string); } diff --git a/src/components/input-date-picker/readme.md b/src/components/input-date-picker/readme.md index 35bb9406c0a..2858671403c 100644 --- a/src/components/input-date-picker/readme.md +++ b/src/components/input-date-picker/readme.md @@ -32,12 +32,10 @@ | `endAsDate` | -- | **[DEPRECATED]** use `valueAsDate` instead.

The component's end date as a full date object. | `Date` | `undefined` | | `flipPlacements` | -- | Defines the available placements that can be used when a flip occurs. | `Placement[]` | `undefined` | | `headingLevel` | `heading-level` | Specifies the number at which section headings should start. | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `undefined` | -| `intlNextMonth` | `intl-next-month` | Accessible name for the component's next month button. | `string` | `TEXT.nextMonth` | -| `intlPrevMonth` | `intl-prev-month` | Accessible name for the component's previous month button. | `string` | `TEXT.prevMonth` | -| `intlYear` | `intl-year` | Accessible name for the component's year input. | `string` | `TEXT.year` | | `layout` | `layout` | Defines the layout of the component. | `"horizontal" \| "vertical"` | `"horizontal"` | | `max` | `max` | Specifies the latest allowed date ("yyyy-mm-dd"). | `string` | `undefined` | | `maxAsDate` | -- | Specifies the latest allowed date as a full date object. | `Date` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | | `min` | `min` | Specifies the earliest allowed date ("yyyy-mm-dd"). | `string` | `undefined` | | `minAsDate` | -- | Specifies the earliest allowed date as a full date object. | `Date` | `undefined` | | `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | @@ -58,7 +56,6 @@ | Event | Description | Type | | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -| `calciteDatePickerChange` | **[DEPRECATED]** use `calciteInputDatePickerChange` instead.

Fires when a user changes the date. | `CustomEvent` | | `calciteDatePickerRangeChange` | **[DEPRECATED]** use `calciteInputDatePickerChange` instead.

Fires when a user changes the date range. | `CustomEvent` | | `calciteInputDatePickerBeforeClose` | Fires when the component is requested to be closed and before the closing transition begins. | `CustomEvent` | | `calciteInputDatePickerBeforeOpen` | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. | `CustomEvent` | diff --git a/src/components/input-number/input-number.tsx b/src/components/input-number/input-number.tsx index fb16e4377cd..bf688cd9dc3 100644 --- a/src/components/input-number/input-number.tsx +++ b/src/components/input-number/input-number.tsx @@ -135,21 +135,6 @@ export class InputNumber */ @Prop({ reflect: true }) icon: string | boolean; - /** - * A text label that will appear on the clear button for screen readers. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlClear: string; - - /** - * Accessible name that will appear while loading. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - * @default "Loading" - */ - @Prop() intlLoading?: string; - /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl = false; @@ -301,8 +286,6 @@ export class InputNumber */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlClear") - @Watch("intlLoading") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/input-number/readme.md b/src/components/input-number/readme.md index 6a467768453..2f1eaf02d2a 100644 --- a/src/components/input-number/readme.md +++ b/src/components/input-number/readme.md @@ -4,39 +4,40 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | -| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | -| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | -| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `groupSeparator` | `group-separator` | When `true`, number values are displayed with a group separator corresponding to the language and country format. | `boolean` | `false` | -| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | -| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | -| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | -| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"decimal"` | -| `intlClear` | `intl-clear` | A text label that will appear on the clear button for screen readers. | `string` | `undefined` | -| `intlLoading` | `intl-loading` | Accessible name that will appear while loading. | `string` | `COMMON_TEXT.loading` | -| `label` | `label` | Accessible name for the component's button or hyperlink. | `string` | `undefined` | -| `loading` | `loading` | When `true`, the component is in the loading state and `calcite-progress` is displayed. | `boolean` | `false` | -| `max` | `max` | Specifies the maximum value. | `number` | `undefined` | -| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | -| `min` | `min` | Specifies the minimum value. | `number` | `undefined` | -| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | -| `name` | `name` | Specifies the name of the component. | `string` | `undefined` | -| `numberButtonType` | `number-button-type` | Specifies the placement of the buttons. | `"horizontal" \| "none" \| "vertical"` | `"vertical"` | -| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | -| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | -| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | -| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | -| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | -| `step` | `step` | Specifies the granularity that the component's value must adhere to. | `"any" \| number` | `undefined` | -| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | -| `value` | `value` | The component's value. | `string` | `""` | +| Property | Attribute | Description | Type | Default | +| ------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | +| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | +| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | +| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `groupSeparator` | `group-separator` | When `true`, number values are displayed with a group separator corresponding to the language and country format. | `boolean` | `false` | +| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | +| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | +| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | +| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"decimal"` | +| `intlClear` | `intl-clear` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

A text label that will appear on the clear button for screen readers. | `string` | `undefined` | +| `intlLoading` | `intl-loading` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name that will appear while loading. | `string` | `undefined` | +| `label` | `label` | Accessible name for the component's button or hyperlink. | `string` | `undefined` | +| `loading` | `loading` | When `true`, the component is in the loading state and `calcite-progress` is displayed. | `boolean` | `false` | +| `max` | `max` | Specifies the maximum value. | `number` | `undefined` | +| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `min` | `min` | Specifies the minimum value. | `number` | `undefined` | +| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | +| `name` | `name` | Specifies the name of the component. | `string` | `undefined` | +| `numberButtonType` | `number-button-type` | Specifies the placement of the buttons. | `"horizontal" \| "none" \| "vertical"` | `"vertical"` | +| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | +| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | +| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | +| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | +| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | +| `step` | `step` | Specifies the granularity that the component's value must adhere to. | `"any" \| number` | `undefined` | +| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | +| `value` | `value` | The component's value. | `string` | `""` | ## Events diff --git a/src/components/input-text/input-text.e2e.ts b/src/components/input-text/input-text.e2e.ts index 0bd227acf29..9aaec710d40 100644 --- a/src/components/input-text/input-text.e2e.ts +++ b/src/components/input-text/input-text.e2e.ts @@ -11,7 +11,6 @@ import { t9n } from "../../tests/commonTests"; import { html } from "../../../support/formatting"; -import { TEXT } from "./resources"; describe("calcite-input-text", () => { it("is labelable", async () => labelable("calcite-input-text")); @@ -167,7 +166,7 @@ describe("calcite-input-text", () => { await page.setContent(html``); const clearButton = await page.find("calcite-input-text >>> .clear-button"); expect(clearButton).not.toBe(null); - expect(clearButton.getAttribute("aria-label")).toBe(TEXT.clear); + expect(clearButton.getAttribute("aria-label")).toBe("Clear value"); }); it("does not render clear button when clearable is requested and value is not populated", async () => { diff --git a/src/components/input-text/input-text.tsx b/src/components/input-text/input-text.tsx index 36930b062eb..f14eb69e384 100644 --- a/src/components/input-text/input-text.tsx +++ b/src/components/input-text/input-text.tsx @@ -113,21 +113,6 @@ export class InputText */ @Prop({ reflect: true }) icon: string | boolean; - /** - * A text label that will appear on the clear button for screen readers. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlClear: string; - - /** - * Accessible name that will appear while loading. - * - * @default "Loading" - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlLoading?: string; - /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl = false; @@ -239,8 +224,6 @@ export class InputText */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlClear") - @Watch("intlLoading") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/input-text/readme.md b/src/components/input-text/readme.md index 5b450e3392c..fe84b99ac3c 100644 --- a/src/components/input-text/readme.md +++ b/src/components/input-text/readme.md @@ -4,34 +4,35 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| -------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | --------------------- | -| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | -| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | -| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | -| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | -| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | -| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"text"` | -| `intlClear` | `intl-clear` | A text label that will appear on the clear button for screen readers. | `string` | `undefined` | -| `intlLoading` | `intl-loading` | Accessible name that will appear while loading. | `string` | `COMMON_TEXT.loading` | -| `label` | `label` | Accessible name for the component's button or hyperlink. | `string` | `undefined` | -| `loading` | `loading` | When `true`, the component is in the loading state and `calcite-progress` is displayed. | `boolean` | `false` | -| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | -| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | -| `name` | `name` | Specifies the name of the component. | `string` | `undefined` | -| `pattern` | `pattern` | Specifies a regex pattern the component's `value` must match for validation. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | -| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | -| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | -| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | -| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | -| `value` | `value` | The component's value. | `string` | `""` | +| Property | Attribute | Description | Type | Default | +| ------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- | +| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | +| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | +| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | +| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | +| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | +| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"text"` | +| `intlClear` | `intl-clear` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

A text label that will appear on the clear button for screen readers. | `string` | `undefined` | +| `intlLoading` | `intl-loading` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name that will appear while loading. | `string` | `undefined` | +| `label` | `label` | Accessible name for the component's button or hyperlink. | `string` | `undefined` | +| `loading` | `loading` | When `true`, the component is in the loading state and `calcite-progress` is displayed. | `boolean` | `false` | +| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | +| `name` | `name` | Specifies the name of the component. | `string` | `undefined` | +| `pattern` | `pattern` | Specifies a regex pattern the component's `value` must match for validation. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | +| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | +| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | +| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | +| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | +| `value` | `value` | The component's value. | `string` | `""` | ## Events diff --git a/src/components/input-text/resources.ts b/src/components/input-text/resources.ts index 7e65872c704..b7d97f61eb5 100644 --- a/src/components/input-text/resources.ts +++ b/src/components/input-text/resources.ts @@ -15,7 +15,3 @@ export const CSS = { export const SLOTS = { action: "action" }; - -export const TEXT = { - clear: "Clear value" -}; diff --git a/src/components/input-time-picker/input-time-picker.tsx b/src/components/input-time-picker/input-time-picker.tsx index e284ba17832..63bca7869c1 100644 --- a/src/components/input-time-picker/input-time-picker.tsx +++ b/src/components/input-time-picker/input-time-picker.tsx @@ -106,94 +106,8 @@ export class InputTimePicker } } - /** - * Accessible name for the component's hour input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHour?: string; - - /** - * Accessible name for the component's hour down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourDown?: string; - - /** - * Accessible name for the component's hour up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlHourUp?: string; - - /** - * Accessible name for the component's meridiem (am/pm) input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiem?: string; - - /** - * Accessible name for the component's meridiem (am/pm) down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemDown?: string; - - /** - * Accessible name for the component's meridiem (am/pm) up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMeridiemUp?: string; - - /** - * Accessible name for the component's minute input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinute?: string; - - /** - * Accessible name for the component's minute down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteDown?: string; - - /** - * Accessible name for the component's minute up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlMinuteUp?: string; - - /** - * Accessible name for the component's second input. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecond?: string; - - /** - * Accessible name for the component's second down button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecondDown?: string; - - /** - * Accessible name for the component's second up button. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` - */ - @Prop() intlSecondUp?: string; - /** * Use this property to override individual strings used by the component. - * - * @deprecated - translations are now built-in, if you need to override a string, please use `messageOverrides` */ @Prop() messagesOverrides: Partial; @@ -609,7 +523,7 @@ export class InputTimePicker />
**[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's hour input. | `string` | `undefined` | +| `intlHourDown` | `intl-hour-down` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's hour down button. | `string` | `undefined` | +| `intlHourUp` | `intl-hour-up` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's hour up button. | `string` | `undefined` | +| `intlMeridiem` | `intl-meridiem` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's meridiem (am/pm) input. | `string` | `undefined` | +| `intlMeridiemDown` | `intl-meridiem-down` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's meridiem (am/pm) down button. | `string` | `undefined` | +| `intlMeridiemUp` | `intl-meridiem-up` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's meridiem (am/pm) up button. | `string` | `undefined` | +| `intlMinute` | `intl-minute` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's minute input. | `string` | `undefined` | +| `intlMinuteDown` | `intl-minute-down` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's minute down button. | `string` | `undefined` | +| `intlMinuteUp` | `intl-minute-up` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's minute up button. | `string` | `undefined` | +| `intlSecond` | `intl-second` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's second input. | `string` | `undefined` | +| `intlSecondDown` | `intl-second-down` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's second down button. | `string` | `undefined` | +| `intlSecondUp` | `intl-second-up` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Accessible name for the component's second up button. | `string` | `undefined` | +| `messagesOverrides` | `messages-overrides` | **[DEPRECATED]** - translations are now built-in, if you need to override a string, please use `messageOverrides`

Use this property to override individual strings used by the component. | `Messages` | `undefined` | | `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | | `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | | `open` | `open` | When `true`, displays the `calcite-time-picker` component. | `boolean` | `false` | diff --git a/src/components/input/input.e2e.ts b/src/components/input/input.e2e.ts index bd4f7d59cd0..d6d642d2762 100644 --- a/src/components/input/input.e2e.ts +++ b/src/components/input/input.e2e.ts @@ -15,7 +15,6 @@ import { letterKeys, numberKeys } from "../../utils/key"; import { locales, numberStringFormatter } from "../../utils/locale"; import { getElementXY } from "../../tests/utils"; import { KeyInput } from "puppeteer"; -import { TEXT } from "./resources"; describe("calcite-input", () => { const delayFor2UpdatesInMs = 200; @@ -697,7 +696,7 @@ describe("calcite-input", () => { await page.setContent(html``); const clearButton = await page.find("calcite-input >>> .clear-button"); expect(clearButton).not.toBe(null); - expect(clearButton.getAttribute("aria-label")).toBe(TEXT.clear); + expect(clearButton.getAttribute("aria-label")).toBe("Clear value"); }); it("does not render clear button when clearable is requested and value is not populated", async () => { diff --git a/src/components/input/input.tsx b/src/components/input/input.tsx index 1cc8105c8e5..18f09e07f8d 100644 --- a/src/components/input/input.tsx +++ b/src/components/input/input.tsx @@ -136,21 +136,6 @@ export class Input */ @Prop({ reflect: true }) icon: string | boolean; - /** - * Accessible name for the component's clear button. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - */ - @Prop() intlClear: string; - - /** - * Accessible name when the component is loading. - * - * @deprecated – translations are now built-in, if you need to override a string, please use `messageOverrides`. - * @default "Loading" - */ - @Prop() intlLoading?: string; - /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl = false; @@ -352,8 +337,6 @@ export class Input */ @Prop({ mutable: true }) messageOverrides: Partial; - @Watch("intlClear") - @Watch("intlLoading") @Watch("messageOverrides") onMessagesChange(): void { /* wired up by t9n util */ diff --git a/src/components/input/readme.md b/src/components/input/readme.md index 6e458ca839f..6cec6f6ec77 100644 --- a/src/components/input/readme.md +++ b/src/components/input/readme.md @@ -59,43 +59,44 @@ function logChange() { ## Properties -| Property | Attribute | Description | Type | Default | -| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | -| `accept` | `accept` | Specifies a comma separated list of unique file type specifiers for limiting accepted file types. This property only has an effect when `type` is "file". Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | -| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | -| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. The clear button shows by default for `"search"`, `"time"`, and `"date"` types, and will not display for the `"textarea"` type. | `boolean` | `false` | -| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | -| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `groupSeparator` | `group-separator` | When `true`, number values are displayed with a group separator corresponding to the language and country format. | `boolean` | `false` | -| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | -| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | -| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | -| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"text"` | -| `intlClear` | `intl-clear` | Accessible name for the component's clear button. | `string` | `undefined` | -| `intlLoading` | `intl-loading` | Accessible name when the component is loading. | `string` | `COMMON_TEXT.loading` | -| `label` | `label` | Accessible name for the component. | `string` | `undefined` | -| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | -| `max` | `max` | Specifies the maximum value for type "number". | `number` | `undefined` | -| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | -| `min` | `min` | Specifies the minimum value for `type="number"`. | `number` | `undefined` | -| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | -| `multiple` | `multiple` | When `true`, the component can accept more than one value. This property only has an effect when `type` is "email" or "file". Read the native attribute's documentation on MDN for more info. | `boolean` | `false` | -| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | -| `numberButtonType` | `number-button-type` | Specifies the placement of the buttons for `type="number"`. | `"horizontal" \| "none" \| "vertical"` | `"vertical"` | -| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | -| `pattern` | `pattern` | Specifies a regex pattern the component's `value` must match for validation. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | -| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | -| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | -| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | -| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | -| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | -| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | -| `step` | `step` | Specifies the granularity the component's value must adhere to. | `"any" \| number` | `undefined` | -| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | -| `type` | `type` | Specifies the component type. Note that the following `type`s add type-specific icons by default: `"date"`, `"email"`, `"password"`, `"search"`, `"tel"`, `"time"`. | `"color" \| "date" \| "datetime-local" \| "email" \| "file" \| "image" \| "month" \| "number" \| "password" \| "search" \| "tel" \| "text" \| "textarea" \| "time" \| "url" \| "week"` | `"text"` | -| `value` | `value` | The component's value. | `string` | `""` | +| Property | Attribute | Description | Type | Default | +| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | +| `accept` | `accept` | Specifies a comma separated list of unique file type specifiers for limiting accepted file types. This property only has an effect when `type` is "file". Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `alignment` | `alignment` | Specifies the text alignment of the component's value. | `"end" \| "start"` | `"start"` | +| `autocomplete` | `autocomplete` | Specifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `autofocus` | `autofocus` | When `true`, the component is focused on page load. | `boolean` | `false` | +| `clearable` | `clearable` | When `true`, a clear button is displayed when the component has a value. The clear button shows by default for `"search"`, `"time"`, and `"date"` types, and will not display for the `"textarea"` type. | `boolean` | `false` | +| `disabled` | `disabled` | When `true`, interaction is prevented and the component is displayed with lower opacity. | `boolean` | `false` | +| `enterKeyHint` | `enter-key-hint` | Specifies the action label or icon for the Enter key on virtual keyboards. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `groupSeparator` | `group-separator` | When `true`, number values are displayed with a group separator corresponding to the language and country format. | `boolean` | `false` | +| `hidden` | `hidden` | When `true`, the component will not be visible. | `boolean` | `false` | +| `icon` | `icon` | When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. | `boolean \| string` | `undefined` | +| `iconFlipRtl` | `icon-flip-rtl` | When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). | `boolean` | `false` | +| `inputMode` | `input-mode` | Specifies the type of content to help devices display an appropriate virtual keyboard. Read the native attribute's documentation on MDN for more info. | `string` | `"text"` | +| `intlClear` | `intl-clear` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name for the component's clear button. | `string` | `undefined` | +| `intlLoading` | `intl-loading` | **[DEPRECATED]** – translations are now built-in, if you need to override a string, please use `messageOverrides`.

Accessible name when the component is loading. | `string` | `undefined` | +| `label` | `label` | Accessible name for the component. | `string` | `undefined` | +| `loading` | `loading` | When `true`, a busy indicator is displayed. | `boolean` | `false` | +| `max` | `max` | Specifies the maximum value for type "number". | `number` | `undefined` | +| `maxLength` | `max-length` | Specifies the maximum length of text for the component's value. | `number` | `undefined` | +| `messageOverrides` | `message-overrides` | Use this property to override individual strings used by the component. | `Messages` | `undefined` | +| `min` | `min` | Specifies the minimum value for `type="number"`. | `number` | `undefined` | +| `minLength` | `min-length` | Specifies the minimum length of text for the component's value. | `number` | `undefined` | +| `multiple` | `multiple` | When `true`, the component can accept more than one value. This property only has an effect when `type` is "email" or "file". Read the native attribute's documentation on MDN for more info. | `boolean` | `false` | +| `name` | `name` | Specifies the name of the component on form submission. | `string` | `undefined` | +| `numberButtonType` | `number-button-type` | Specifies the placement of the buttons for `type="number"`. | `"horizontal" \| "none" \| "vertical"` | `"vertical"` | +| `numberingSystem` | `numbering-system` | Specifies the Unicode numeral system used by the component for localization. | `"arab" \| "arabext" \| "bali" \| "beng" \| "deva" \| "fullwide" \| "gujr" \| "guru" \| "hanidec" \| "khmr" \| "knda" \| "laoo" \| "latn" \| "limb" \| "mlym" \| "mong" \| "mymr" \| "orya" \| "tamldec" \| "telu" \| "thai" \| "tibt"` | `undefined` | +| `pattern` | `pattern` | Specifies a regex pattern the component's `value` must match for validation. Read the native attribute's documentation on MDN for more info. | `string` | `undefined` | +| `placeholder` | `placeholder` | Specifies placeholder text for the component. | `string` | `undefined` | +| `prefixText` | `prefix-text` | Adds text to the start of the component. | `string` | `undefined` | +| `readOnly` | `read-only` | When `true`, the component's value can be read, but cannot be modified. | `boolean` | `false` | +| `required` | `required` | When `true`, the component must have a value in order for the form to submit. | `boolean` | `false` | +| `scale` | `scale` | Specifies the size of the component. | `"l" \| "m" \| "s"` | `"m"` | +| `status` | `status` | Specifies the status of the input field, which determines message and icons. | `"idle" \| "invalid" \| "valid"` | `"idle"` | +| `step` | `step` | Specifies the granularity the component's value must adhere to. | `"any" \| number` | `undefined` | +| `suffixText` | `suffix-text` | Adds text to the end of the component. | `string` | `undefined` | +| `type` | `type` | Specifies the component type. Note that the following `type`s add type-specific icons by default: `"date"`, `"email"`, `"password"`, `"search"`, `"tel"`, `"time"`. | `"color" \| "date" \| "datetime-local" \| "email" \| "file" \| "image" \| "month" \| "number" \| "password" \| "search" \| "tel" \| "text" \| "textarea" \| "time" \| "url" \| "week"` | `"text"` | +| `value` | `value` | The component's value. | `string` | `""` | ## Events diff --git a/src/components/input/resources.ts b/src/components/input/resources.ts index 054b2500588..fd44427a4c5 100644 --- a/src/components/input/resources.ts +++ b/src/components/input/resources.ts @@ -27,7 +27,3 @@ export const INPUT_TYPE_ICONS = { export const SLOTS = { action: "action" }; - -export const TEXT = { - clear: "Clear value" -}; diff --git a/src/components/interfaces.ts b/src/components/interfaces.ts index 0d612d648c0..26f29222962 100644 --- a/src/components/interfaces.ts +++ b/src/components/interfaces.ts @@ -4,6 +4,7 @@ export type Alignment = "start" | "center" | "end"; export type Appearance = "solid" | "clear" | "outline" | "transparent" | "minimal"; export type Columns = 1 | 2 | 3 | 4 | 5 | 6; export type FlipContext = "both" | "start" | "end"; +export type Kind = "brand" | "danger" | "info" | "warning" | "success"; export type Layout = "horizontal" | "vertical" | "grid"; export type LogicalFlowPosition = "inline-start" | "inline-end" | "block-start" | "block-end"; export type Position = "start" | "end"; diff --git a/src/components/modal/modal.e2e.ts b/src/components/modal/modal.e2e.ts index 017a843c765..5c2ee336cf9 100644 --- a/src/components/modal/modal.e2e.ts +++ b/src/components/modal/modal.e2e.ts @@ -22,7 +22,7 @@ describe("calcite-modal properties", () => { const page = await newE2EPage(); await page.setContent(""); const modal = await page.find("calcite-modal"); - modal.setProperty("disableCloseButton", true); + modal.setProperty("closeButtonDisabled", true); await page.waitForChanges(); const closeButton = await page.find("calcite-modal >>> .close"); expect(closeButton).toBe(null); @@ -294,7 +294,7 @@ describe("calcite-modal accessibility checks", () => { it("traps focus within the modal when open and disabled close button", async () => { const page = await newE2EPage(); await page.setContent( - ` + `
@@ -338,7 +338,7 @@ describe("calcite-modal accessibility checks", () => { })); it("focuses content if there is no close button", async () => - focusable(createModalHTML(focusableContentHTML, "disable-close-button"), { + focusable(createModalHTML(focusableContentHTML, "close-button-disabled"), { focusTargetSelector: `.${focusableContentTargetClass}` })); @@ -423,7 +423,7 @@ describe("calcite-modal accessibility checks", () => { it("should not close when the scrim is clicked", async () => { const page = await newE2EPage(); - await page.setContent(``); + await page.setContent(``); const modal = await page.find("calcite-modal"); modal.setProperty("open", true); await page.waitForChanges(); @@ -433,9 +433,9 @@ describe("calcite-modal accessibility checks", () => { expect(await modal.getProperty("open")).toBe(true); }); - it("does not close when Escape is pressed and disable-escape is set", async () => { + it("does not close when Escape is pressed and escape-disabled is set", async () => { const page = await newE2EPage(); - await page.setContent(``); + await page.setContent(``); const modal = await page.find("calcite-modal"); await modal.setProperty("open", true); await page.waitForChanges(); diff --git a/src/components/modal/modal.scss b/src/components/modal/modal.scss index bf833e0508b..910d286a731 100644 --- a/src/components/modal/modal.scss +++ b/src/components/modal/modal.scss @@ -310,28 +310,38 @@ slot[name="primary"] { } .close { - border-start-end-radius: var(--calcite-border-radius); } } } /** - * Colors + * Kinds */ -:host([color="red"]) { - .modal { - @apply border-color-danger; - } +:host([kind="brand"]) .modal { + @apply border-color-brand; } -:host([color="blue"]) { - .modal { - @apply border-color-info; - } +:host([kind="danger"]) .modal { + @apply border-color-danger; +} + +:host([kind="info"]) .modal { + @apply border-color-info; +} + +:host([kind="success"]) .modal { + @apply border-color-success; +} + +:host([kind="warning"]) .modal { + @apply border-color-warning; } -:host([color="red"]), -:host([color="blue"]) { +:host([kind="brand"]), +:host([kind="danger"]), +:host([kind="info"]), +:host([kind="success"]), +:host([kind="warning"]) { .modal { @apply border-0 border-t-4 border-solid; } diff --git a/src/components/modal/modal.stories.ts b/src/components/modal/modal.stories.ts index c7afe12ba14..a7f869f6b1f 100644 --- a/src/components/modal/modal.stories.ts +++ b/src/components/modal/modal.stories.ts @@ -18,13 +18,13 @@ export default { export const simple = (): string => html`

Small Modal

@@ -44,13 +44,13 @@ export const darkThemeRTLCustomSize_TestOnly = (): string => html` class="calcite-theme-dark" dir="rtl" ${boolean("open", true)} - color="${select("color", { blue: "blue", red: "red", none: "" }, "")}" + kind="${select("kind", ["brand", "danger", "info", "success", "warning"], "")}" background-color="${select("background-color", ["white", "grey"], "white")}" scale="${select("scale", ["s", "m", "l"], "m")}" width="${number("width", 300)}" ${boolean("fullscreen", false)} ${boolean("docked", false)} - ${boolean("disable-escape", false)} + ${boolean("escape-disabled", false)} intl-close="${text("intl-close", "Close")}" >

Small Modal

diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index ed9b3a8f303..5bbbc180041 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -13,7 +13,7 @@ import { Watch } from "@stencil/core"; import { ensureId, focusElement, getSlotted } from "../../utils/dom"; -import { Scale } from "../interfaces"; +import { Kind, Scale } from "../interfaces"; import { ModalBackgroundColor } from "./interfaces"; import { CSS, ICONS, SLOTS } from "./resources"; import { createObserver } from "../../utils/observers"; @@ -92,24 +92,24 @@ export class Modal beforeClose: (el: HTMLElement) => Promise = () => Promise.resolve(); /** When `true`, disables the component's close button. */ - @Prop({ reflect: true }) disableCloseButton = false; + @Prop({ reflect: true }) closeButtonDisabled = false; /** * When `true`, prevents focus trapping. */ - @Prop({ reflect: true }) disableFocusTrap = false; + @Prop({ reflect: true }) focusTrapDisabled = false; - @Watch("disableFocusTrap") - handleDisableFocusTrap(disableFocusTrap: boolean): void { + @Watch("focusTrapDisabled") + handlefocusTrapDisabled(focusTrapDisabled: boolean): void { if (!this.open) { return; } - disableFocusTrap ? deactivateFocusTrap(this) : activateFocusTrap(this); + focusTrapDisabled ? deactivateFocusTrap(this) : activateFocusTrap(this); } /** When `true`, disables the closing of the component when clicked outside. */ - @Prop({ reflect: true }) disableOutsideClose = false; + @Prop({ reflect: true }) outsideCloseDisabled = false; /** * Accessible name for the component's close button. @@ -122,7 +122,7 @@ export class Modal @Prop({ reflect: true }) docked: boolean; /** When `true`, disables the default close on escape behavior. */ - @Prop({ reflect: true }) disableEscape = false; + @Prop({ reflect: true }) escapeDisabled = false; /** Specifies the size of the component. */ @Prop({ reflect: true }) scale: Scale = "m"; @@ -133,11 +133,8 @@ export class Modal /** Sets the component to always be fullscreen (overrides `width`). */ @Prop({ reflect: true }) fullscreen: boolean; - /** - * Adds a color bar to the top of component for visual impact. - * Use color to add importance to destructive or workflow dialogs. - */ - @Prop({ reflect: true }) color: "red" | "blue"; + /** Specifies the kind of the component (will apply to top border). */ + @Prop({ reflect: true }) kind: Kind; /** Sets the background color of the component's content. */ @Prop({ reflect: true }) backgroundColor: ModalBackgroundColor = "white"; @@ -252,7 +249,7 @@ export class Modal } renderCloseButton(): VNode { - return !this.disableCloseButton ? ( + return !this.closeButtonDisabled ? (