diff --git a/package-lock.json b/package-lock.json index b365c5c4c0e..e94322ede2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3910,7 +3910,6 @@ "version": "3.28.2", "resolved": "https://registry.npmjs.org/@esri/calcite-ui-icons/-/calcite-ui-icons-3.28.2.tgz", "integrity": "sha512-XllnLkjjjbnjaYPn1XlsU5ufs8L5Ye/Yo+X/m1+/RaHW/sRYC2h4jXnPRYU3Nhh1yU5ZR8pfgC/BepmZas0FyA==", - "dev": true, "bin": { "spriter": "bin/spriter.js" } @@ -36916,6 +36915,7 @@ "version": "2.10.2-next.1", "license": "SEE LICENSE.md", "dependencies": { + "@esri/calcite-ui-icons": "3.28.2", "@floating-ui/dom": "1.6.5", "@stencil/core": "4.18.3", "@types/color": "3.0.6", @@ -36930,7 +36930,6 @@ }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.1", - "@esri/calcite-ui-icons": "3.28.2", "@esri/eslint-plugin-calcite-components": "^1.2.1-next.3", "@stencil-community/eslint-plugin": "0.7.2", "@stencil-community/postcss": "2.2.0", diff --git a/packages/calcite-components/.eslintrc.cjs b/packages/calcite-components/.eslintrc.cjs index 75c1fcfcd12..b5ceb4e7075 100644 --- a/packages/calcite-components/.eslintrc.cjs +++ b/packages/calcite-components/.eslintrc.cjs @@ -70,6 +70,7 @@ module.exports = { ], }, ], + "@typescript-eslint/lines-between-class-members": ["error", "always"], "@typescript-eslint/method-signature-style": ["error", "property"], "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-unused-vars": "error", @@ -84,7 +85,7 @@ module.exports = { "jsdoc/require-property-type": "off", "jsdoc/require-returns-type": "off", "jsdoc/tag-lines": ["error", "any", { startLines: 1 }], - "lines-between-class-members": ["error", "always"], + "lines-between-class-members": "off", "no-eval": "error", "no-implied-eval": "error", "no-multiple-empty-lines": [ diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index 4293d2c5352..2cbe84f28ab 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -63,6 +63,7 @@ "directory": "packages/calcite-components" }, "dependencies": { + "@esri/calcite-ui-icons": "3.28.2", "@floating-ui/dom": "1.6.5", "@stencil/core": "4.18.3", "@types/color": "3.0.6", @@ -77,7 +78,6 @@ }, "devDependencies": { "@esri/calcite-design-tokens": "^2.2.1-next.1", - "@esri/calcite-ui-icons": "3.28.2", "@esri/eslint-plugin-calcite-components": "^1.2.1-next.3", "@stencil-community/eslint-plugin": "0.7.2", "@stencil-community/postcss": "2.2.0", diff --git a/packages/calcite-components/src/components.d.ts b/packages/calcite-components/src/components.d.ts index c5ada57ac20..0546404fefd 100644 --- a/packages/calcite-components/src/components.d.ts +++ b/packages/calcite-components/src/components.d.ts @@ -7,87 +7,187 @@ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; import { Alignment, Appearance, CollapseDirection, FlipContext, IconType, Kind, Layout, LogicalFlowPosition, Position, Scale, SelectionAppearance as SelectionAppearance1, SelectionMode, Status, Width } from "./components/interfaces"; import { RequestedItem } from "./components/accordion/interfaces"; +import { IconName } from "./components/icon/interfaces"; import { RequestedItem as RequestedItem1 } from "./components/accordion-item/interfaces"; +import { ActionMessages } from "./components/action/assets/action/t9n"; import { FlipPlacement, LogicalPlacement, MenuPlacement, OverlayPositioning, ReferenceElement } from "./utils/floating-ui"; +import { ActionBarMessages } from "./components/action-bar/assets/action-bar/t9n"; import { Columns } from "./components/action-group/interfaces"; +import { ActionGroupMessages } from "./components/action-group/assets/action-group/t9n"; +import { ActionPadMessages } from "./components/action-pad/assets/action-pad/t9n"; import { AlertDuration, Sync } from "./components/alert/interfaces"; import { NumberingSystem } from "./utils/locale"; +import { AlertMessages } from "./components/alert/assets/alert/t9n"; import { HeadingLevel } from "./components/functional/Heading"; +import { BlockMessages } from "./components/block/assets/block/t9n"; import { BlockSectionToggleDisplay } from "./components/block-section/interfaces"; +import { BlockSectionMessages } from "./components/block-section/assets/block-section/t9n"; import { ButtonAlignment, DropdownIconType } from "./components/button/interfaces"; +import { ButtonMessages } from "./components/button/assets/button/t9n"; +import { CardMessages } from "./components/card/assets/card/t9n"; import { ArrowType, AutoplayType } from "./components/carousel/interfaces"; +import { CarouselMessages } from "./components/carousel/assets/carousel/t9n"; import { MutableValidityState } from "./utils/form"; +import { ChipMessages } from "./components/chip/assets/chip/t9n"; import { ColorValue, InternalColor } from "./components/color-picker/interfaces"; import { Format } from "./components/color-picker/utils"; +import { ColorPickerMessages } from "./components/color-picker/assets/color-picker/t9n"; import { ComboboxChildElement, SelectionDisplay } from "./components/combobox/interfaces"; +import { ComboboxMessages } from "./components/combobox/assets/combobox/t9n"; +import { DatePickerMessages } from "./components/date-picker/assets/date-picker/t9n"; import { DateLocaleData } from "./components/date-picker/utils"; import { HoverRange } from "./utils/date"; import { RequestedItem as RequestedItem2 } from "./components/dropdown-group/interfaces"; import { ItemKeyboardEvent } from "./components/dropdown/interfaces"; +import { FilterMessages } from "./components/filter/assets/filter/t9n"; import { FlowItemLikeElement } from "./components/flow/interfaces"; +import { FlowItemMessages } from "./components/flow-item/assets/flow-item/t9n"; import { ColorStop, DataSeries } from "./components/graph/interfaces"; +import { HandleMessages } from "./components/handle/assets/handle/t9n"; import { HandleChange, HandleNudge } from "./components/handle/interfaces"; +import { InlineEditableMessages } from "./components/inline-editable/assets/inline-editable/t9n"; import { InputPlacement } from "./components/input/interfaces"; +import { InputMessages } from "./components/input/assets/input/t9n"; +import { InputDatePickerMessages } from "./components/input-date-picker/assets/input-date-picker/t9n"; +import { InputNumberMessages } from "./components/input-number/assets/input-number/t9n"; +import { InputTextMessages } from "./components/input-text/assets/input-text/t9n"; +import { InputTimePickerMessages } from "./components/input-time-picker/assets/input-time-picker/t9n"; +import { TimePickerMessages } from "./components/time-picker/assets/time-picker/t9n"; +import { InputTimeZoneMessages } from "./components/input-time-zone/assets/input-time-zone/t9n"; import { OffsetStyle, TimeZoneMode } from "./components/input-time-zone/interfaces"; import { ListDragDetail } from "./components/list/interfaces"; import { ItemData } from "./components/list-item/interfaces"; +import { ListMessages } from "./components/list/assets/list/t9n"; import { SelectionAppearance } from "./components/list/resources"; +import { ListItemMessages } from "./components/list-item/assets/list-item/t9n"; +import { MenuMessages } from "./components/menu/assets/menu/t9n"; +import { MenuItemMessages } from "./components/menu-item/assets/menu-item/t9n"; import { MenuItemCustomEvent } from "./components/menu-item/interfaces"; import { MeterFillType, MeterLabelType } from "./components/meter/interfaces"; +import { ModalMessages } from "./components/modal/assets/modal/t9n"; +import { NoticeMessages } from "./components/notice/assets/notice/t9n"; +import { PaginationMessages } from "./components/pagination/assets/pagination/t9n"; +import { PanelMessages } from "./components/panel/assets/panel/t9n"; import { ItemData as ItemData1, ListFocusId } from "./components/pick-list/shared-list-logic"; import { ICON_TYPES } from "./components/pick-list/resources"; +import { PickListItemMessages } from "./components/pick-list-item/assets/pick-list-item/t9n"; +import { PopoverMessages } from "./components/popover/assets/popover/t9n"; +import { RatingMessages } from "./components/rating/assets/rating/t9n"; +import { ScrimMessages } from "./components/scrim/assets/scrim/t9n"; import { DisplayMode } from "./components/sheet/interfaces"; import { DisplayMode as DisplayMode1 } from "./components/shell-panel/interfaces"; +import { ShellPanelMessages } from "./components/shell-panel/assets/shell-panel/t9n"; import { DragDetail } from "./utils/sortableComponent"; import { StepperItemChangeEventDetail, StepperItemEventDetail, StepperItemKeyEventDetail, StepperLayout } from "./components/stepper/interfaces"; +import { StepperMessages } from "./components/stepper/assets/stepper/t9n"; +import { StepperItemMessages } from "./components/stepper-item/assets/stepper-item/t9n"; import { TabID, TabLayout, TabPosition } from "./components/tabs/interfaces"; +import { TabNavMessages } from "./components/tab-nav/assets/tab-nav/t9n"; import { TabChangeEventDetail, TabCloseEventDetail } from "./components/tab/interfaces"; +import { TabTitleMessages } from "./components/tab-title/assets/tab-title/t9n"; import { RowType, TableInteractionMode, TableLayout, TableRowFocusEvent, TableSelectionDisplay } from "./components/table/interfaces"; +import { TableMessages } from "./components/table/assets/table/t9n"; +import { TableCellMessages } from "./components/table-cell/assets/table-cell/t9n"; +import { TableHeaderMessages } from "./components/table-header/assets/table-header/t9n"; +import { TextAreaMessages } from "./components/text-area/assets/text-area/t9n"; import { TileSelectType } from "./components/tile-select/interfaces"; import { TileSelectGroupLayout } from "./components/tile-select-group/interfaces"; +import { TipMessages } from "./components/tip/assets/tip/t9n"; +import { TipManagerMessages } from "./components/tip-manager/assets/tip-manager/t9n"; import { TreeItemSelectDetail } from "./components/tree-item/interfaces"; +import { ValueListMessages } from "./components/value-list/assets/value-list/t9n"; import { ListItemAndHandle } from "./components/value-list-item/interfaces"; export { Alignment, Appearance, CollapseDirection, FlipContext, IconType, Kind, Layout, LogicalFlowPosition, Position, Scale, SelectionAppearance as SelectionAppearance1, SelectionMode, Status, Width } from "./components/interfaces"; export { RequestedItem } from "./components/accordion/interfaces"; +export { IconName } from "./components/icon/interfaces"; export { RequestedItem as RequestedItem1 } from "./components/accordion-item/interfaces"; +export { ActionMessages } from "./components/action/assets/action/t9n"; export { FlipPlacement, LogicalPlacement, MenuPlacement, OverlayPositioning, ReferenceElement } from "./utils/floating-ui"; +export { ActionBarMessages } from "./components/action-bar/assets/action-bar/t9n"; export { Columns } from "./components/action-group/interfaces"; +export { ActionGroupMessages } from "./components/action-group/assets/action-group/t9n"; +export { ActionPadMessages } from "./components/action-pad/assets/action-pad/t9n"; export { AlertDuration, Sync } from "./components/alert/interfaces"; export { NumberingSystem } from "./utils/locale"; +export { AlertMessages } from "./components/alert/assets/alert/t9n"; export { HeadingLevel } from "./components/functional/Heading"; +export { BlockMessages } from "./components/block/assets/block/t9n"; export { BlockSectionToggleDisplay } from "./components/block-section/interfaces"; +export { BlockSectionMessages } from "./components/block-section/assets/block-section/t9n"; export { ButtonAlignment, DropdownIconType } from "./components/button/interfaces"; +export { ButtonMessages } from "./components/button/assets/button/t9n"; +export { CardMessages } from "./components/card/assets/card/t9n"; export { ArrowType, AutoplayType } from "./components/carousel/interfaces"; +export { CarouselMessages } from "./components/carousel/assets/carousel/t9n"; export { MutableValidityState } from "./utils/form"; +export { ChipMessages } from "./components/chip/assets/chip/t9n"; export { ColorValue, InternalColor } from "./components/color-picker/interfaces"; export { Format } from "./components/color-picker/utils"; +export { ColorPickerMessages } from "./components/color-picker/assets/color-picker/t9n"; export { ComboboxChildElement, SelectionDisplay } from "./components/combobox/interfaces"; +export { ComboboxMessages } from "./components/combobox/assets/combobox/t9n"; +export { DatePickerMessages } from "./components/date-picker/assets/date-picker/t9n"; export { DateLocaleData } from "./components/date-picker/utils"; export { HoverRange } from "./utils/date"; export { RequestedItem as RequestedItem2 } from "./components/dropdown-group/interfaces"; export { ItemKeyboardEvent } from "./components/dropdown/interfaces"; +export { FilterMessages } from "./components/filter/assets/filter/t9n"; export { FlowItemLikeElement } from "./components/flow/interfaces"; +export { FlowItemMessages } from "./components/flow-item/assets/flow-item/t9n"; export { ColorStop, DataSeries } from "./components/graph/interfaces"; +export { HandleMessages } from "./components/handle/assets/handle/t9n"; export { HandleChange, HandleNudge } from "./components/handle/interfaces"; +export { InlineEditableMessages } from "./components/inline-editable/assets/inline-editable/t9n"; export { InputPlacement } from "./components/input/interfaces"; +export { InputMessages } from "./components/input/assets/input/t9n"; +export { InputDatePickerMessages } from "./components/input-date-picker/assets/input-date-picker/t9n"; +export { InputNumberMessages } from "./components/input-number/assets/input-number/t9n"; +export { InputTextMessages } from "./components/input-text/assets/input-text/t9n"; +export { InputTimePickerMessages } from "./components/input-time-picker/assets/input-time-picker/t9n"; +export { TimePickerMessages } from "./components/time-picker/assets/time-picker/t9n"; +export { InputTimeZoneMessages } from "./components/input-time-zone/assets/input-time-zone/t9n"; export { OffsetStyle, TimeZoneMode } from "./components/input-time-zone/interfaces"; export { ListDragDetail } from "./components/list/interfaces"; export { ItemData } from "./components/list-item/interfaces"; +export { ListMessages } from "./components/list/assets/list/t9n"; export { SelectionAppearance } from "./components/list/resources"; +export { ListItemMessages } from "./components/list-item/assets/list-item/t9n"; +export { MenuMessages } from "./components/menu/assets/menu/t9n"; +export { MenuItemMessages } from "./components/menu-item/assets/menu-item/t9n"; export { MenuItemCustomEvent } from "./components/menu-item/interfaces"; export { MeterFillType, MeterLabelType } from "./components/meter/interfaces"; +export { ModalMessages } from "./components/modal/assets/modal/t9n"; +export { NoticeMessages } from "./components/notice/assets/notice/t9n"; +export { PaginationMessages } from "./components/pagination/assets/pagination/t9n"; +export { PanelMessages } from "./components/panel/assets/panel/t9n"; export { ItemData as ItemData1, ListFocusId } from "./components/pick-list/shared-list-logic"; export { ICON_TYPES } from "./components/pick-list/resources"; +export { PickListItemMessages } from "./components/pick-list-item/assets/pick-list-item/t9n"; +export { PopoverMessages } from "./components/popover/assets/popover/t9n"; +export { RatingMessages } from "./components/rating/assets/rating/t9n"; +export { ScrimMessages } from "./components/scrim/assets/scrim/t9n"; export { DisplayMode } from "./components/sheet/interfaces"; export { DisplayMode as DisplayMode1 } from "./components/shell-panel/interfaces"; +export { ShellPanelMessages } from "./components/shell-panel/assets/shell-panel/t9n"; export { DragDetail } from "./utils/sortableComponent"; export { StepperItemChangeEventDetail, StepperItemEventDetail, StepperItemKeyEventDetail, StepperLayout } from "./components/stepper/interfaces"; +export { StepperMessages } from "./components/stepper/assets/stepper/t9n"; +export { StepperItemMessages } from "./components/stepper-item/assets/stepper-item/t9n"; export { TabID, TabLayout, TabPosition } from "./components/tabs/interfaces"; +export { TabNavMessages } from "./components/tab-nav/assets/tab-nav/t9n"; export { TabChangeEventDetail, TabCloseEventDetail } from "./components/tab/interfaces"; +export { TabTitleMessages } from "./components/tab-title/assets/tab-title/t9n"; export { RowType, TableInteractionMode, TableLayout, TableRowFocusEvent, TableSelectionDisplay } from "./components/table/interfaces"; +export { TableMessages } from "./components/table/assets/table/t9n"; +export { TableCellMessages } from "./components/table-cell/assets/table-cell/t9n"; +export { TableHeaderMessages } from "./components/table-header/assets/table-header/t9n"; +export { TextAreaMessages } from "./components/text-area/assets/text-area/t9n"; export { TileSelectType } from "./components/tile-select/interfaces"; export { TileSelectGroupLayout } from "./components/tile-select-group/interfaces"; +export { TipMessages } from "./components/tip/assets/tip/t9n"; +export { TipManagerMessages } from "./components/tip-manager/assets/tip-manager/t9n"; export { TreeItemSelectDetail } from "./components/tree-item/interfaces"; +export { ValueListMessages } from "./components/value-list/assets/value-list/t9n"; export { ListItemAndHandle } from "./components/value-list-item/interfaces"; export namespace Components { interface CalciteAccordion { @@ -135,7 +235,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -147,7 +247,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Specifies the type of the icon in the header inherited from the `calcite-accordion`. */ @@ -185,7 +285,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -412,7 +512,7 @@ export namespace Components { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon": string | boolean; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -515,7 +615,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -523,7 +623,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * When `true`, a busy indicator is displayed. */ @@ -558,7 +658,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -566,7 +666,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Use this property to override individual strings used by the component. */ @@ -628,7 +728,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -636,7 +736,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Specifies the kind of the component, which will apply to the border and background if applicable. */ @@ -912,7 +1012,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -1190,7 +1290,7 @@ export namespace Components { /** * Specifies the placeholder icon for the input. */ - "placeholderIcon": string; + "placeholderIcon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -1240,7 +1340,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -1284,7 +1384,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -1623,7 +1723,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -1631,7 +1731,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Accessible name for the component. */ @@ -1674,7 +1774,7 @@ export namespace Components { * Specifies an icon to display. * @default "plus" */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -1918,7 +2018,7 @@ export namespace Components { * Displays a specific icon. * @see [Icons](https://esri.github.io/calcite-ui-icons) */ - "icon": string; + "icon": IconName; /** * Specifies the size of the component. */ @@ -2017,7 +2117,7 @@ export namespace Components { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon": string | boolean; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -2155,7 +2255,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2278,7 +2378,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2302,7 +2402,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": boolean | string; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -2358,7 +2458,7 @@ export namespace Components { * Specifies an icon to display. * @futureBreaking Remove boolean type as it is not supported. */ - "icon": string | boolean; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -2473,7 +2573,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2527,7 +2627,7 @@ export namespace Components { * Specifies an icon to display. * @futureBreaking Remove boolean type as it is not supported. */ - "icon": string | boolean; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -2614,7 +2714,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2714,7 +2814,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2802,7 +2902,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -2853,7 +2953,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -2861,7 +2961,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Specifies the relationship to the linked document defined in `href`. */ @@ -3142,7 +3242,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -3150,7 +3250,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; "isTopLevelItem": boolean; /** * Accessible name for the component. @@ -3381,7 +3481,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -3451,7 +3551,7 @@ export namespace Components { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon": string | boolean; + "icon": IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -3971,7 +4071,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -4090,7 +4190,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -4122,7 +4222,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -4130,7 +4230,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * Defines the layout of the component inherited from parent `calcite-segmented-control`, defaults to `horizontal`. */ @@ -4185,7 +4285,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -4533,7 +4633,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the primary button. */ - "primaryIconEnd": string; + "primaryIconEnd": IconName; /** * Displays the `primaryIconStart` and/or `primaryIconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -4541,7 +4641,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the primary button. */ - "primaryIconStart": string; + "primaryIconStart": IconName; /** * Accessible name for the primary button. */ @@ -4803,7 +4903,7 @@ export namespace Components { /** * Specifies an icon to display at the end of the component. */ - "iconEnd": string; + "iconEnd": IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -4811,7 +4911,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; "layout": TabLayout; /** * Use this property to override individual strings used by the component. @@ -5139,7 +5239,7 @@ export namespace Components { /** * Specifies the validation icon to display under the component. */ - "validationIcon": string | boolean; + "validationIcon": IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -5194,7 +5294,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -5296,7 +5396,7 @@ export namespace Components { /** * Specifies an icon to display. */ - "icon": string; + "icon": IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -5524,7 +5624,7 @@ export namespace Components { /** * Specifies an icon to display at the start of the component. */ - "iconStart": string; + "iconStart": IconName; /** * In ancestor selection mode, show as indeterminate when only some children are selected. */ @@ -7897,7 +7997,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -7909,7 +8009,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Specifies the type of the icon in the header inherited from the `calcite-accordion`. */ @@ -7945,7 +8045,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -8160,7 +8260,7 @@ declare namespace LocalJSX { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon"?: string | boolean; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -8283,7 +8383,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -8291,7 +8391,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * When `true`, a busy indicator is displayed. */ @@ -8343,7 +8443,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -8351,7 +8451,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Use this property to override individual strings used by the component. */ @@ -8413,7 +8513,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -8421,7 +8521,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Specifies the kind of the component, which will apply to the border and background if applicable. */ @@ -8710,7 +8810,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -9027,7 +9127,7 @@ declare namespace LocalJSX { /** * Specifies the placeholder icon for the input. */ - "placeholderIcon"?: string; + "placeholderIcon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -9067,7 +9167,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -9111,7 +9211,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -9487,7 +9587,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -9495,7 +9595,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Accessible name for the component. */ @@ -9541,7 +9641,7 @@ declare namespace LocalJSX { * Specifies an icon to display. * @default "plus" */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -9779,7 +9879,7 @@ declare namespace LocalJSX { * Displays a specific icon. * @see [Icons](https://esri.github.io/calcite-ui-icons) */ - "icon"?: string; + "icon"?: IconName; /** * Specifies the size of the component. */ @@ -9883,7 +9983,7 @@ declare namespace LocalJSX { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon"?: string | boolean; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -10023,7 +10123,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10157,7 +10257,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10181,7 +10281,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: boolean | string; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -10237,7 +10337,7 @@ declare namespace LocalJSX { * Specifies an icon to display. * @futureBreaking Remove boolean type as it is not supported. */ - "icon"?: string | boolean; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -10354,7 +10454,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10408,7 +10508,7 @@ declare namespace LocalJSX { * Specifies an icon to display. * @futureBreaking Remove boolean type as it is not supported. */ - "icon"?: string | boolean; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -10500,7 +10600,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10611,7 +10711,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10718,7 +10818,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -10772,7 +10872,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -10780,7 +10880,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Specifies the relationship to the linked document defined in `href`. */ @@ -11096,7 +11196,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -11104,7 +11204,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; "isTopLevelItem"?: boolean; /** * Accessible name for the component. @@ -11338,7 +11438,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -11400,7 +11500,7 @@ declare namespace LocalJSX { /** * When `true`, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon. */ - "icon"?: string | boolean; + "icon"?: IconName | boolean; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -11950,7 +12050,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -12069,7 +12169,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -12101,7 +12201,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -12109,7 +12209,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * Defines the layout of the component inherited from parent `calcite-segmented-control`, defaults to `horizontal`. */ @@ -12168,7 +12268,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -12542,7 +12642,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the primary button. */ - "primaryIconEnd"?: string; + "primaryIconEnd"?: IconName; /** * Displays the `primaryIconStart` and/or `primaryIconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -12550,7 +12650,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the primary button. */ - "primaryIconStart"?: string; + "primaryIconStart"?: IconName; /** * Accessible name for the primary button. */ @@ -12790,7 +12890,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the end of the component. */ - "iconEnd"?: string; + "iconEnd"?: IconName; /** * Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @@ -12798,7 +12898,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; "layout"?: TabLayout; /** * Use this property to override individual strings used by the component. @@ -13151,7 +13251,7 @@ declare namespace LocalJSX { /** * Specifies the validation icon to display under the component. */ - "validationIcon"?: string | boolean; + "validationIcon"?: IconName | boolean; /** * Specifies the validation message to display under the component. */ @@ -13206,7 +13306,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -13313,7 +13413,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display. */ - "icon"?: string; + "icon"?: IconName; /** * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @@ -13555,7 +13655,7 @@ declare namespace LocalJSX { /** * Specifies an icon to display at the start of the component. */ - "iconStart"?: string; + "iconStart"?: IconName; /** * In ancestor selection mode, show as indeterminate when only some children are selected. */ diff --git a/packages/calcite-components/src/components/accordion-item/accordion-item.tsx b/packages/calcite-components/src/components/accordion-item/accordion-item.tsx index 973e9374f3a..c8e99f9512b 100644 --- a/packages/calcite-components/src/components/accordion-item/accordion-item.tsx +++ b/packages/calcite-components/src/components/accordion-item/accordion-item.tsx @@ -30,6 +30,7 @@ import { setComponentLoaded, setUpLoadableComponent, } from "../../utils/loadable"; +import { IconName } from "../icon/interfaces"; import { SLOTS, CSS, IDS } from "./resources"; import { RequestedItem } from "./interfaces"; @@ -60,10 +61,10 @@ export class AccordionItem implements ConditionalSlotComponent, LoadableComponen @Prop() description: string; /** Specifies an icon to display at the start of the component. */ - @Prop({ reflect: true }) iconStart: string; + @Prop({ reflect: true }) iconStart: IconName; /** Specifies an icon to display at the end of the component. */ - @Prop({ reflect: true }) iconEnd: string; + @Prop({ reflect: true }) iconEnd: IconName; /** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl: FlipContext; diff --git a/packages/calcite-components/src/components/action-group/resources.ts b/packages/calcite-components/src/components/action-group/resources.ts index c43144a4821..7d8be4ba27e 100644 --- a/packages/calcite-components/src/components/action-group/resources.ts +++ b/packages/calcite-components/src/components/action-group/resources.ts @@ -5,7 +5,7 @@ export const SLOTS = { export const ICONS = { menu: "ellipsis", -}; +} as const; export const CSS = { container: "container", diff --git a/packages/calcite-components/src/components/action-menu/resources.ts b/packages/calcite-components/src/components/action-menu/resources.ts index d10c0e03549..38223214d32 100644 --- a/packages/calcite-components/src/components/action-menu/resources.ts +++ b/packages/calcite-components/src/components/action-menu/resources.ts @@ -10,6 +10,6 @@ export const SLOTS = { export const ICONS = { menu: "ellipsis", -}; +} as const; export const activeAttr = "data-active"; diff --git a/packages/calcite-components/src/components/action/action.tsx b/packages/calcite-components/src/components/action/action.tsx index 64e3169ffcd..59acf41142a 100644 --- a/packages/calcite-components/src/components/action/action.tsx +++ b/packages/calcite-components/src/components/action/action.tsx @@ -37,6 +37,7 @@ import { updateMessages, } from "../../utils/t9n"; import { Alignment, Appearance, Scale } from "../interfaces"; +import { IconName } from "../icon/interfaces"; import { ActionMessages } from "./assets/action/t9n"; import { CSS, SLOTS } from "./resources"; @@ -83,7 +84,7 @@ export class Action @Prop({ reflect: true }) disabled = false; /** Specifies an icon to display. */ - @Prop() icon: string; + @Prop() icon: IconName; /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl = false; diff --git a/packages/calcite-components/src/components/alert/alert.tsx b/packages/calcite-components/src/components/alert/alert.tsx index 366fd9b6a81..d70a9677195 100644 --- a/packages/calcite-components/src/components/alert/alert.tsx +++ b/packages/calcite-components/src/components/alert/alert.tsx @@ -42,6 +42,7 @@ import { } from "../../utils/t9n"; import { Kind, Scale } from "../interfaces"; import { KindIcons } from "../resources"; +import { IconName } from "../icon/interfaces"; import { AlertMessages } from "./assets/alert/t9n"; import { AlertDuration, Sync, Unregister } from "./interfaces"; import { CSS, DURATIONS, SLOTS } from "./resources"; @@ -102,7 +103,7 @@ export class Alert implements OpenCloseComponent, LoadableComponent, T9nComponen * When `true`, shows a default recommended icon. Alternatively, * pass a Calcite UI Icon name to display a specific icon. */ - @Prop({ reflect: true }) icon: string | boolean; + @Prop({ reflect: true }) icon: IconName | boolean; /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */ @Prop({ reflect: true }) iconFlipRtl = false; @@ -308,7 +309,7 @@ export class Alert implements OpenCloseComponent, LoadableComponent, T9nComponen ); } - private renderIcon(icon: string): VNode { + private renderIcon(icon: IconName): VNode { return (