@kaizen/components 1.66.0 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/README.md +5 -0
- package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +255 -0
- package/codemods/upgradeIconV1/index.ts +33 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.spec.ts +83 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.ts +53 -0
- package/codemods/upgradeIconV1/transformIcon.spec.ts +181 -0
- package/codemods/upgradeIconV1/transformIcon.ts +115 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.spec.ts +81 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.ts +41 -0
- package/codemods/upgradeIconV1/upgradeIconV1.spec.ts +306 -0
- package/codemods/upgradeIconV1/upgradeIconV1.ts +94 -0
- package/codemods/utils/createProp.spec.ts +83 -0
- package/codemods/utils/createProp.ts +51 -0
- package/codemods/utils/getKaioTagName.spec.ts +85 -0
- package/codemods/utils/getKaioTagName.ts +129 -0
- package/codemods/utils/index.ts +3 -1
- package/codemods/utils/transformComponentsInDir.ts +32 -16
- package/codemods/utils/transformSource.ts +10 -5
- package/codemods/utils/updateJsxElementWithNewProps.ts +4 -3
- package/codemods/utils/updateKaioImports.spec.ts +223 -0
- package/codemods/utils/updateKaioImports.ts +233 -0
- package/dist/cjs/Avatar/Avatar.cjs +16 -13
- package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +9 -7
- package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +9 -7
- package/dist/cjs/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +9 -7
- package/dist/cjs/Checkbox/Checkbox/Checkbox.cjs +5 -11
- package/dist/cjs/ClearButton/ClearButton.cjs +5 -4
- package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +4 -7
- package/dist/cjs/DateInput/DateInputWithIconButton/DateInputWithIconButton.cjs +5 -4
- package/dist/cjs/DateRangePicker/DateRangePicker.cjs +5 -4
- package/dist/cjs/ErrorPage/ErrorPage.cjs +9 -7
- package/dist/cjs/FieldMessage/FieldMessage.cjs +5 -11
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -5
- package/dist/cjs/Filter/FilterButton/FilterButton/FilterButton.cjs +4 -7
- package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +5 -5
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
- package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +5 -4
- package/dist/cjs/Illustration/utils/usePausePlay.cjs +5 -8
- package/dist/cjs/Input/InputSearch/InputSearch.cjs +4 -3
- package/dist/cjs/LikertScaleLegacy/LikertScaleLegacy.cjs +5 -6
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +31 -26
- package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +4 -5
- package/dist/cjs/MultiSelect/subcomponents/Checkbox/Checkbox.cjs +7 -17
- package/dist/cjs/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.cjs +4 -7
- package/dist/cjs/Notification/subcomponents/CancelButton/CancelButton.cjs +4 -3
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +33 -38
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.cjs +6 -0
- package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +11 -19
- package/dist/cjs/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.cjs +4 -5
- package/dist/cjs/Popover/Popover.cjs +5 -4
- package/dist/cjs/Popover/utils/classMappers.cjs +21 -16
- package/dist/cjs/RichTextEditor/RichTextEditor/utils/controlmap.cjs +29 -25
- package/dist/cjs/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.cjs +10 -12
- package/dist/cjs/Select/Select.cjs +8 -10
- package/dist/cjs/SplitButton/subcomponents/DropdownButton/DropdownButton.cjs +4 -4
- package/dist/cjs/Table/Table.cjs +11 -10
- package/dist/cjs/Tag/Tag.cjs +21 -17
- package/dist/cjs/TextField/TextField.cjs +5 -4
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +8 -7
- package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +9 -12
- package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +7 -7
- package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +10 -15
- package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +7 -7
- package/dist/cjs/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +5 -5
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +13 -18
- package/dist/cjs/__future__/Icon/Icon.cjs +47 -0
- package/dist/cjs/__future__/Icon/Icon.module.css.cjs +10 -0
- package/dist/cjs/__future__/Icon/constants.cjs +8 -0
- package/dist/cjs/__future__/Select/subcomponents/Option/Option.cjs +4 -5
- package/dist/cjs/__future__/Select/subcomponents/SelectToggle/SelectToggle.cjs +5 -9
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
- package/dist/cjs/future.cjs +2 -0
- package/dist/esm/Avatar/Avatar.mjs +16 -13
- package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +9 -7
- package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +9 -7
- package/dist/esm/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +9 -7
- package/dist/esm/Checkbox/Checkbox/Checkbox.mjs +5 -11
- package/dist/esm/ClearButton/ClearButton.mjs +5 -4
- package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +5 -8
- package/dist/esm/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +5 -4
- package/dist/esm/DateRangePicker/DateRangePicker.mjs +5 -4
- package/dist/esm/ErrorPage/ErrorPage.mjs +10 -8
- package/dist/esm/FieldMessage/FieldMessage.mjs +6 -12
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -5
- package/dist/esm/Filter/FilterButton/FilterButton/FilterButton.mjs +5 -8
- package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +5 -5
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
- package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +5 -4
- package/dist/esm/Illustration/utils/usePausePlay.mjs +5 -8
- package/dist/esm/Input/InputSearch/InputSearch.mjs +4 -3
- package/dist/esm/LikertScaleLegacy/LikertScaleLegacy.mjs +5 -6
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +31 -26
- package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +4 -5
- package/dist/esm/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +7 -17
- package/dist/esm/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +5 -8
- package/dist/esm/Notification/subcomponents/CancelButton/CancelButton.mjs +4 -3
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +33 -38
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.mjs +4 -0
- package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +11 -19
- package/dist/esm/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +4 -5
- package/dist/esm/Popover/Popover.mjs +5 -4
- package/dist/esm/Popover/utils/classMappers.mjs +21 -16
- package/dist/esm/RichTextEditor/RichTextEditor/utils/controlmap.mjs +33 -29
- package/dist/esm/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +10 -12
- package/dist/esm/Select/Select.mjs +9 -11
- package/dist/esm/SplitButton/subcomponents/DropdownButton/DropdownButton.mjs +4 -4
- package/dist/esm/Table/Table.mjs +11 -10
- package/dist/esm/Tag/Tag.mjs +21 -17
- package/dist/esm/TextField/TextField.mjs +5 -4
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +8 -7
- package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +9 -12
- package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +7 -7
- package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +13 -18
- package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +7 -7
- package/dist/esm/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +5 -5
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +16 -21
- package/dist/esm/__future__/Icon/Icon.mjs +38 -0
- package/dist/esm/__future__/Icon/Icon.module.css.mjs +8 -0
- package/dist/esm/__future__/Icon/constants.mjs +6 -0
- package/dist/esm/__future__/Select/subcomponents/Option/Option.mjs +4 -5
- package/dist/esm/__future__/Select/subcomponents/SelectToggle/SelectToggle.mjs +6 -10
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
- package/dist/esm/future.mjs +1 -0
- package/dist/styles.css +585 -561
- package/dist/types/__future__/Icon/Icon.d.ts +21 -0
- package/dist/types/__future__/Icon/constants.d.ts +5 -0
- package/dist/types/__future__/Icon/index.d.ts +1 -0
- package/dist/types/__future__/Icon/types.d.ts +4 -0
- package/dist/types/__future__/index.d.ts +1 -0
- package/package.json +10 -10
- package/src/Avatar/Avatar.module.scss +6 -8
- package/src/Avatar/Avatar.tsx +14 -5
- package/src/BrandMoment/_docs/BrandMoment.stories.tsx +6 -10
- package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
- package/src/Calendar/CalendarRange/CalendarRange.tsx +7 -3
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +7 -3
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +7 -3
- package/src/Calendar/baseCalendarClassNames.module.scss +0 -4
- package/src/Checkbox/Checkbox/Checkbox.module.scss +0 -8
- package/src/Checkbox/Checkbox/Checkbox.tsx +6 -8
- package/src/ClearButton/ClearButton.tsx +2 -2
- package/src/Collapsible/Collapsible/Collapsible.tsx +5 -6
- package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +2 -2
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +2 -7
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +2 -2
- package/src/DateRangePicker/DateRangePicker.tsx +2 -2
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +8 -2
- package/src/EmptyState/_docs/EmptyState.stories.tsx +4 -2
- package/src/ErrorPage/ErrorPage.tsx +5 -3
- package/src/FieldMessage/FieldMessage.tsx +6 -14
- package/src/Filter/FilterBar/FilterBar.spec.tsx +12 -12
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +2 -2
- package/src/Filter/FilterButton/FilterButton/FilterButton.module.scss +1 -1
- package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +5 -6
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +0 -1
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +2 -1
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
- package/src/GuidanceBlock/GuidanceBlock.tsx +6 -2
- package/src/Icon/_docs/{Icon.stories.tsx → Icon.docs.stories.tsx} +1 -1
- package/src/Icon/_docs/Icon.mdx +1 -2
- package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
- package/src/Illustration/utils/usePausePlay.tsx +7 -5
- package/src/Input/Input/_docs/Input.stickersheet.stories.tsx +7 -5
- package/src/Input/Input/_docs/Input.stories.tsx +5 -3
- package/src/Input/InputSearch/InputSearch.tsx +2 -2
- package/src/Label/Label.module.scss +4 -0
- package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
- package/src/MultiSelect/MultiSelect.spec.tsx +7 -3
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +0 -6
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +10 -9
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +11 -7
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +5 -7
- package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +2 -2
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +3 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +22 -16
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +0 -4
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +13 -12
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.scss +0 -1
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.tsx +2 -2
- package/src/Popover/Popover.module.scss +3 -3
- package/src/Popover/Popover.tsx +2 -2
- package/src/Popover/utils/classMappers.tsx +6 -11
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stickersheet.stories.tsx +7 -7
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stories.tsx +2 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.spec.tsx +7 -4
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.stories.tsx +18 -12
- package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +25 -18
- package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.tsx +4 -8
- package/src/Select/Select.module.scss +2 -0
- package/src/Select/Select.tsx +10 -7
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +4 -5
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.tsx +2 -2
- package/src/Table/Table.tsx +4 -8
- package/src/Table/_docs/Table.stickersheet.stories.tsx +4 -4
- package/src/Table/_docs/Table.stories.tsx +3 -3
- package/src/Tag/Tag.module.scss +2 -0
- package/src/Tag/Tag.tsx +7 -13
- package/src/Text/Text.module.scss +2 -0
- package/src/TextField/TextField.spec.tsx +9 -4
- package/src/TextField/TextField.tsx +2 -2
- package/src/TextField/_docs/TextField.stories.tsx +4 -3
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
- package/src/TitleBlockZen/TitleBlockZen.module.scss +1 -0
- package/src/TitleBlockZen/TitleBlockZen.spec.tsx +1 -1
- package/src/TitleBlockZen/TitleBlockZen.tsx +6 -9
- package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +5 -5
- package/src/TitleBlockZen/subcomponents/MainActions.tsx +5 -3
- package/src/TitleBlockZen/subcomponents/MobileActions.tsx +13 -16
- package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +3 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +2 -2
- package/src/Workflow/_docs/Workflow.stories.tsx +4 -5
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +4 -5
- package/src/Workflow/_docs/controls/controls.tsx +4 -4
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +6 -31
- package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +5 -5
- package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +6 -5
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +6 -6
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +4 -4
- package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +6 -5
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +4 -4
- package/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx +6 -6
- package/src/__actions__/Menu/v1/_docs/examples.tsx +5 -5
- package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +1 -3
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +46 -45
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +1 -1
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +21 -23
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -15
- package/src/__future__/Icon/Icon.module.css +35 -0
- package/src/__future__/Icon/Icon.spec.tsx +36 -0
- package/src/__future__/Icon/Icon.tsx +85 -0
- package/src/__future__/Icon/_docs/Icon--api-specification.mdx +98 -0
- package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +145 -0
- package/src/__future__/Icon/_docs/Icon.docs.module.css +17 -0
- package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +524 -0
- package/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx +126 -0
- package/src/__future__/Icon/_docs/assets/interface-dont.png +0 -0
- package/src/__future__/Icon/_docs/assets/tooltip-dont.png +0 -0
- package/src/__future__/Icon/constants.ts +149 -0
- package/src/__future__/Icon/index.ts +1 -0
- package/src/__future__/Icon/material-symbols-metadata.json +3370 -0
- package/src/__future__/Icon/types.ts +11 -0
- package/src/__future__/Select/subcomponents/Option/Option.tsx +2 -2
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +1 -1
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +6 -9
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +0 -56
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +2 -12
- package/src/__future__/Tag/Tag/Tag.module.scss +1 -1
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +6 -17
- package/src/__future__/Tag/Tag/_docs/Tag.stickersheet.stories.tsx +5 -2
- package/src/__future__/Tag/Tag/_docs/Tag.stories.tsx +13 -6
- package/src/__future__/index.ts +1 -0
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +7 -4
- package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -11
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +3 -3
- package/codemods/utils/getTagName.spec.ts +0 -24
- package/codemods/utils/getTagName.ts +0 -32
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.mjs +0 -15
- package/dist/types/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.d.ts +0 -2
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import iconsMetadata from "./material-symbols-metadata.json"
|
|
2
|
+
|
|
3
|
+
// Icon names are from https://github.com/marella/material-symbols/blob/main/metadata/versions.json
|
|
4
|
+
// Update `material-symbols-metadata.json` for new icons.
|
|
5
|
+
// Last updated: 28 Aug 2024
|
|
6
|
+
type MaterialIconNames = keyof typeof iconsMetadata
|
|
7
|
+
|
|
8
|
+
// `auto_awesome` is not listed as part of Material Symbols, however is
|
|
9
|
+
// available in Material Icons, which appears to still work.
|
|
10
|
+
// https://fonts.google.com/icons?icon.query=auto+awesome&icon.set=Material+Icons&icon.size=20&icon.color=%23000000&selected=Material+Icons+Outlined:auto_awesome:
|
|
11
|
+
export type IconNames = MaterialIconNames | "auto_awesome"
|
|
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from "react"
|
|
|
2
2
|
import { FocusableElement } from "@react-types/shared"
|
|
3
3
|
import classnames from "classnames"
|
|
4
4
|
import { mergeProps, useFocusRing, useOption } from "react-aria"
|
|
5
|
-
import {
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
7
7
|
import { useSelectContext } from "../../context"
|
|
8
8
|
import { SelectOption, SelectOptionNode } from "../../types"
|
|
@@ -56,7 +56,7 @@ export const Option = <Option extends SelectOption = SelectOption>({
|
|
|
56
56
|
<span
|
|
57
57
|
className={classnames(styles.icon, isSelected && styles.isSelected)}
|
|
58
58
|
>
|
|
59
|
-
{isSelected && <
|
|
59
|
+
{isSelected && <Icon name="check" isPresentational />}
|
|
60
60
|
</span>
|
|
61
61
|
</li>
|
|
62
62
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import { DOMAttributes, FocusableElement } from "@react-types/shared"
|
|
3
3
|
import classnames from "classnames"
|
|
4
|
-
import { ChevronDownIcon, ChevronUpIcon } from "~components/Icon"
|
|
5
4
|
import { Label } from "~components/Label"
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
7
7
|
import styles from "./SelectToggle.module.scss"
|
|
8
8
|
|
|
@@ -69,14 +69,11 @@ export const SelectToggle = React.forwardRef<
|
|
|
69
69
|
<span {...valueProps} className={styles.value}>
|
|
70
70
|
{value ?? placeholder}
|
|
71
71
|
</span>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
classNameOverride={styles.icon}
|
|
78
|
-
/>
|
|
79
|
-
)}
|
|
72
|
+
<Icon
|
|
73
|
+
name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
74
|
+
isPresentational
|
|
75
|
+
className={styles.icon}
|
|
76
|
+
/>
|
|
80
77
|
</button>
|
|
81
78
|
</div>
|
|
82
79
|
)
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
// import { AcademyIcon, ActionOffIcon, AddIcon, TagIcon } from "~components/Icon"
|
|
3
|
-
// import { TagColorKeys } from "../../Tag/types"
|
|
4
2
|
import { RemovableTag } from "../RemovableTag"
|
|
5
3
|
|
|
6
4
|
const meta = {
|
|
@@ -20,19 +18,6 @@ export default meta
|
|
|
20
18
|
type Story = StoryObj<typeof meta>
|
|
21
19
|
|
|
22
20
|
export const Playground: Story = {
|
|
23
|
-
// This can be added when we add Icon support
|
|
24
|
-
// argTypes: {
|
|
25
|
-
// icon: {
|
|
26
|
-
// options: ["AcademyIcon", "ActionOffIcon", "AddIcon", "TagIcon"],
|
|
27
|
-
// control: { type: "radio" },
|
|
28
|
-
// mapping: {
|
|
29
|
-
// AcademyIcon: <AcademyIcon role="presentation" />,
|
|
30
|
-
// ActionOffIcon: <ActionOffIcon role="presentation" />,
|
|
31
|
-
// AddIcon: <AddIcon role="presentation" />,
|
|
32
|
-
// TagIcon: <TagIcon role="presentation" />,
|
|
33
|
-
// },
|
|
34
|
-
// },
|
|
35
|
-
// },
|
|
36
21
|
parameters: {
|
|
37
22
|
docs: {
|
|
38
23
|
canvas: {
|
|
@@ -46,68 +31,6 @@ export const Children: Story = {
|
|
|
46
31
|
args: { children: "This text is the children" },
|
|
47
32
|
}
|
|
48
33
|
|
|
49
|
-
// Colors and Icons may be added in at a later time.
|
|
50
|
-
//
|
|
51
|
-
// export const Color: Story = {
|
|
52
|
-
// render: () => (
|
|
53
|
-
// <>
|
|
54
|
-
// {TagColorKeys.map(color => (
|
|
55
|
-
// <RemovableTag
|
|
56
|
-
// color={color}
|
|
57
|
-
// icon={<TagIcon role="presentation" />}
|
|
58
|
-
// key={color}
|
|
59
|
-
// removeButtonProps={{
|
|
60
|
-
// ariaLabel: "close",
|
|
61
|
-
// onClick: () => alert("Clicked"),
|
|
62
|
-
// }}
|
|
63
|
-
// >
|
|
64
|
-
// {color}
|
|
65
|
-
// </RemovableTag>
|
|
66
|
-
// ))}
|
|
67
|
-
// </>
|
|
68
|
-
// ),
|
|
69
|
-
// parameters: {
|
|
70
|
-
// docs: {
|
|
71
|
-
// source: { type: "dynamic" },
|
|
72
|
-
// },
|
|
73
|
-
// },
|
|
74
|
-
// }
|
|
75
|
-
// export const Icon: Story = {
|
|
76
|
-
// render: () => (
|
|
77
|
-
// <>
|
|
78
|
-
// <RemovableTag
|
|
79
|
-
// icon={<AcademyIcon role="presentation" />}
|
|
80
|
-
// removeButtonProps={{
|
|
81
|
-
// ariaLabel: "close",
|
|
82
|
-
// onClick: () => alert("Clicked"),
|
|
83
|
-
// }}
|
|
84
|
-
// >
|
|
85
|
-
// AcademyIcon
|
|
86
|
-
// </RemovableTag>
|
|
87
|
-
// <RemovableTag
|
|
88
|
-
/// / color="yellow"
|
|
89
|
-
// icon={<ActionOffIcon role="presentation" />}
|
|
90
|
-
// removeButtonProps={{
|
|
91
|
-
// ariaLabel: "close",
|
|
92
|
-
// onClick: () => alert("Clicked"),
|
|
93
|
-
// }}
|
|
94
|
-
// >
|
|
95
|
-
// ActionOffIcon
|
|
96
|
-
// </RemovableTag>
|
|
97
|
-
// <RemovableTag
|
|
98
|
-
/// / color="green"
|
|
99
|
-
// icon={<AddIcon role="presentation" />}
|
|
100
|
-
// removeButtonProps={{
|
|
101
|
-
// ariaLabel: "close",
|
|
102
|
-
// onClick: () => alert("Clicked"),
|
|
103
|
-
// }}
|
|
104
|
-
// >
|
|
105
|
-
// AddIcon
|
|
106
|
-
// </RemovableTag>
|
|
107
|
-
// </>
|
|
108
|
-
// ),
|
|
109
|
-
// }
|
|
110
|
-
|
|
111
34
|
export const ClassNameOverride: Story = {
|
|
112
35
|
args: {
|
|
113
36
|
classNameOverride: "border-red-500 border-solid border-",
|
|
@@ -44,59 +44,3 @@
|
|
|
44
44
|
color: $color-purple-800;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
// .gray {
|
|
49
|
-
// &:hover,
|
|
50
|
-
// &:focus,
|
|
51
|
-
// &:focus-visible {
|
|
52
|
-
// background-color: rgba($color-gray-600-rgb, 0.2);
|
|
53
|
-
// }
|
|
54
|
-
// }
|
|
55
|
-
|
|
56
|
-
// .blue {
|
|
57
|
-
// &:hover,
|
|
58
|
-
// &:focus,
|
|
59
|
-
// &:focus-visible {
|
|
60
|
-
// background-color: rgba($color-blue-500-rgb, 0.3);
|
|
61
|
-
// }
|
|
62
|
-
// }
|
|
63
|
-
|
|
64
|
-
// .green {
|
|
65
|
-
// &:hover,
|
|
66
|
-
// &:focus,
|
|
67
|
-
// &:focus-visible {
|
|
68
|
-
// background-color: rgba($color-green-500-rgb, 0.3);
|
|
69
|
-
// }
|
|
70
|
-
// }
|
|
71
|
-
|
|
72
|
-
// .yellow {
|
|
73
|
-
// &:hover,
|
|
74
|
-
// &:focus,
|
|
75
|
-
// &:focus-visible {
|
|
76
|
-
// background-color: rgba($color-yellow-500-rgb, 0.5);
|
|
77
|
-
// }
|
|
78
|
-
// }
|
|
79
|
-
|
|
80
|
-
// .orange {
|
|
81
|
-
// &:hover,
|
|
82
|
-
// &:focus,
|
|
83
|
-
// &:focus-visible {
|
|
84
|
-
// background-color: rgba($color-orange-500-rgb, 0.3);
|
|
85
|
-
// }
|
|
86
|
-
// }
|
|
87
|
-
|
|
88
|
-
// .red {
|
|
89
|
-
// &:hover,
|
|
90
|
-
// &:focus,
|
|
91
|
-
// &:focus-visible {
|
|
92
|
-
// background-color: rgba($color-red-500-rgb, 0.3);
|
|
93
|
-
// }
|
|
94
|
-
// }
|
|
95
|
-
|
|
96
|
-
// .purple {
|
|
97
|
-
// &:hover,
|
|
98
|
-
// &:focus,
|
|
99
|
-
// &:focus-visible {
|
|
100
|
-
// background-color: rgba($color-purple-500-rgb, 0.3);
|
|
101
|
-
// }
|
|
102
|
-
// }
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
3
4
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
4
|
-
import { RemoveTagIcon } from "./RemoveTagIcon"
|
|
5
5
|
import styles from "./RemoveButton.module.scss"
|
|
6
6
|
|
|
7
|
-
// type RemoveButtonColor =
|
|
8
|
-
// | "gray"
|
|
9
|
-
// | "blue"
|
|
10
|
-
// | "green"
|
|
11
|
-
// | "yellow"
|
|
12
|
-
// | "orange"
|
|
13
|
-
// | "red"
|
|
14
|
-
// | "purple"
|
|
15
|
-
|
|
16
7
|
export type RemoveButtonBaseProps = {
|
|
17
|
-
// color?: RemoveButtonColor
|
|
18
8
|
ariaLabel: string
|
|
19
9
|
onClick: () => void
|
|
20
10
|
}
|
|
@@ -37,7 +27,7 @@ export const RemoveButton = ({
|
|
|
37
27
|
onClick={onClick}
|
|
38
28
|
{...restProps}
|
|
39
29
|
>
|
|
40
|
-
<
|
|
30
|
+
<Icon name="close" isPresentational />
|
|
41
31
|
</button>
|
|
42
32
|
)
|
|
43
33
|
|
|
@@ -2,14 +2,9 @@ import React from "react"
|
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { fn } from "@storybook/test"
|
|
4
4
|
import { Avatar } from "~components/Avatar"
|
|
5
|
-
import {
|
|
6
|
-
CautionIcon,
|
|
7
|
-
ExclamationIcon,
|
|
8
|
-
InformationIcon,
|
|
9
|
-
SuccessIcon,
|
|
10
|
-
LiveIcon,
|
|
11
|
-
} from "~components/Icon"
|
|
5
|
+
import { LiveIcon } from "~components/Icon"
|
|
12
6
|
import styles from "~components/Tag/Tag.module.scss"
|
|
7
|
+
import { Icon } from "~components/__future__/Icon"
|
|
13
8
|
import { Tag, RemovableTag } from "../.."
|
|
14
9
|
|
|
15
10
|
const meta = {
|
|
@@ -148,25 +143,19 @@ export const ValidationMigration: StoryObj = {
|
|
|
148
143
|
<>
|
|
149
144
|
<Tag
|
|
150
145
|
color="green"
|
|
151
|
-
icon={<
|
|
146
|
+
icon={<Icon name="check_circle" isFilled alt="Success," />}
|
|
152
147
|
>
|
|
153
148
|
Tag
|
|
154
149
|
</Tag>
|
|
155
|
-
<Tag
|
|
156
|
-
color="blue"
|
|
157
|
-
icon={<InformationIcon role="img" aria-label="Note," />}
|
|
158
|
-
>
|
|
150
|
+
<Tag color="blue" icon={<Icon name="info" isFilled alt="Note," />}>
|
|
159
151
|
Tag
|
|
160
152
|
</Tag>
|
|
161
|
-
<Tag
|
|
162
|
-
color="red"
|
|
163
|
-
icon={<ExclamationIcon role="img" aria-label="Error," />}
|
|
164
|
-
>
|
|
153
|
+
<Tag color="red" icon={<Icon name="error" isFilled alt="Error," />}>
|
|
165
154
|
Tag
|
|
166
155
|
</Tag>
|
|
167
156
|
<Tag
|
|
168
157
|
color="yellow"
|
|
169
|
-
icon={<
|
|
158
|
+
icon={<Icon name="warning" isFilled alt="Warning," />}
|
|
170
159
|
>
|
|
171
160
|
Tag
|
|
172
161
|
</Tag>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import {
|
|
5
5
|
StickerSheet,
|
|
6
6
|
StickerSheetStory,
|
|
@@ -26,7 +26,10 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
26
26
|
<Tag color={color}>
|
|
27
27
|
{color.charAt(0).toUpperCase() + color.slice(1)}
|
|
28
28
|
</Tag>
|
|
29
|
-
<Tag
|
|
29
|
+
<Tag
|
|
30
|
+
icon={<Icon name="label" isPresentational isFilled />}
|
|
31
|
+
color={color}
|
|
32
|
+
>
|
|
30
33
|
{color.charAt(0).toUpperCase() + color.slice(1)}
|
|
31
34
|
</Tag>
|
|
32
35
|
</StickerSheet.Row>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { TagColorKeys } from "../types"
|
|
5
5
|
import { Tag } from ".."
|
|
6
6
|
|
|
@@ -34,7 +34,11 @@ export const Color: StoryObj = {
|
|
|
34
34
|
render: () => (
|
|
35
35
|
<div className="flex gap-16">
|
|
36
36
|
{TagColorKeys.map(color => (
|
|
37
|
-
<Tag
|
|
37
|
+
<Tag
|
|
38
|
+
color={color}
|
|
39
|
+
icon={<Icon name="label" isPresentational isFilled />}
|
|
40
|
+
key={color}
|
|
41
|
+
>
|
|
38
42
|
{color}
|
|
39
43
|
</Tag>
|
|
40
44
|
))}
|
|
@@ -47,14 +51,17 @@ export const Color: StoryObj = {
|
|
|
47
51
|
},
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
export const
|
|
54
|
+
export const IconStory: StoryObj = {
|
|
55
|
+
name: "Icon",
|
|
51
56
|
render: () => (
|
|
52
57
|
<div className="flex gap-16">
|
|
53
|
-
<Tag icon={<
|
|
54
|
-
|
|
58
|
+
<Tag icon={<Icon name="school" isPresentational isFilled />}>
|
|
59
|
+
AcademyIcon
|
|
60
|
+
</Tag>
|
|
61
|
+
<Tag color="yellow" icon={<Icon name="flash_on" isPresentational />}>
|
|
55
62
|
ActionOffIcon
|
|
56
63
|
</Tag>
|
|
57
|
-
<Tag color="green" icon={<
|
|
64
|
+
<Tag color="green" icon={<Icon name="add" isPresentational />}>
|
|
58
65
|
AddIcon
|
|
59
66
|
</Tag>
|
|
60
67
|
</div>
|
package/src/__future__/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Decorator, Meta } from "@storybook/react"
|
|
3
3
|
import isChromatic from "chromatic/isChromatic"
|
|
4
|
-
import { MeatballsIcon } from "~components/Icon"
|
|
5
4
|
import { IconButton } from "~components/__actions__/v2"
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import {
|
|
7
7
|
StickerSheet,
|
|
8
8
|
StickerSheetStory,
|
|
@@ -38,7 +38,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
38
38
|
<Tooltip {...props} position="above" text="Tooltip label">
|
|
39
39
|
<IconButton
|
|
40
40
|
label="Label"
|
|
41
|
-
icon={<
|
|
41
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
42
42
|
/>
|
|
43
43
|
</Tooltip>
|
|
44
44
|
</StickerSheet.Cell>
|
|
@@ -46,7 +46,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
46
46
|
<Tooltip {...props} position="below" text="Tooltip label">
|
|
47
47
|
<IconButton
|
|
48
48
|
label="Label"
|
|
49
|
-
icon={<
|
|
49
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
50
50
|
/>
|
|
51
51
|
</Tooltip>
|
|
52
52
|
</StickerSheet.Cell>
|
|
@@ -54,7 +54,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
54
54
|
<Tooltip {...props} position="left" text="Tooltip label">
|
|
55
55
|
<IconButton
|
|
56
56
|
label="Label"
|
|
57
|
-
icon={<
|
|
57
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
58
58
|
/>
|
|
59
59
|
</Tooltip>
|
|
60
60
|
</StickerSheet.Cell>
|
|
@@ -67,7 +67,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
67
67
|
>
|
|
68
68
|
<IconButton
|
|
69
69
|
label="Label"
|
|
70
|
-
icon={<
|
|
70
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
71
71
|
/>
|
|
72
72
|
</Tooltip>
|
|
73
73
|
</StickerSheet.Cell>
|
|
@@ -90,7 +90,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
90
90
|
<Tooltip {...props} text="Tooltip label" mood="default">
|
|
91
91
|
<IconButton
|
|
92
92
|
label="Label"
|
|
93
|
-
icon={<
|
|
93
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
94
94
|
/>
|
|
95
95
|
</Tooltip>
|
|
96
96
|
</StickerSheet.Cell>
|
|
@@ -98,7 +98,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
98
98
|
<Tooltip {...props} text="Tooltip label" mood="informative">
|
|
99
99
|
<IconButton
|
|
100
100
|
label="Label"
|
|
101
|
-
icon={<
|
|
101
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
102
102
|
/>
|
|
103
103
|
</Tooltip>
|
|
104
104
|
</StickerSheet.Cell>
|
|
@@ -106,7 +106,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
106
106
|
<Tooltip {...props} text="Tooltip label" mood="positive">
|
|
107
107
|
<IconButton
|
|
108
108
|
label="Label"
|
|
109
|
-
icon={<
|
|
109
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
110
110
|
/>
|
|
111
111
|
</Tooltip>
|
|
112
112
|
</StickerSheet.Cell>
|
|
@@ -114,7 +114,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
114
114
|
<Tooltip {...props} text="Tooltip label" mood="highlight">
|
|
115
115
|
<IconButton
|
|
116
116
|
label="Label"
|
|
117
|
-
icon={<
|
|
117
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
118
118
|
/>
|
|
119
119
|
</Tooltip>
|
|
120
120
|
</StickerSheet.Cell>
|
|
@@ -122,7 +122,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
122
122
|
<Tooltip {...props} text="Tooltip label" mood="cautionary">
|
|
123
123
|
<IconButton
|
|
124
124
|
label="Label"
|
|
125
|
-
icon={<
|
|
125
|
+
icon={<Icon name="more_horiz" isPresentational />}
|
|
126
126
|
/>
|
|
127
127
|
</Tooltip>
|
|
128
128
|
</StickerSheet.Cell>
|
|
@@ -3,7 +3,6 @@ import { Meta, StoryObj } from "@storybook/react"
|
|
|
3
3
|
import { ButtonGroup } from "~components/ButtonGroup"
|
|
4
4
|
import { CheckboxField } from "~components/Checkbox"
|
|
5
5
|
import { FilterButtonBase } from "~components/Filter/FilterButton/subcomponents/FilterButtonBase"
|
|
6
|
-
import { InformationIcon, RemoveLinkIcon, QuestionIcon } from "~components/Icon"
|
|
7
6
|
import {
|
|
8
7
|
TableContainer,
|
|
9
8
|
TableHeader,
|
|
@@ -12,6 +11,7 @@ import {
|
|
|
12
11
|
} from "~components/Table"
|
|
13
12
|
import { Text } from "~components/Text"
|
|
14
13
|
import { Button, IconButton } from "~components/__actions__/v2"
|
|
14
|
+
import { Icon } from "~components/__future__"
|
|
15
15
|
import { Tag } from "~components/__future__/Tag"
|
|
16
16
|
import { Tooltip } from "../index"
|
|
17
17
|
|
|
@@ -106,7 +106,7 @@ export const OverflowScroll: Story = {
|
|
|
106
106
|
}}
|
|
107
107
|
>
|
|
108
108
|
<Tooltip {...props} display="inline" text="Tooltip label">
|
|
109
|
-
<
|
|
109
|
+
<Icon name="info" alt="Info" isFilled />
|
|
110
110
|
</Tooltip>
|
|
111
111
|
</div>
|
|
112
112
|
</div>
|
|
@@ -159,12 +159,15 @@ export const ButtonsWithTooltip: Story = {
|
|
|
159
159
|
render: args => (
|
|
160
160
|
<>
|
|
161
161
|
<Tooltip {...args} text="Contact customer support.">
|
|
162
|
-
<Button
|
|
162
|
+
<Button
|
|
163
|
+
label="Help"
|
|
164
|
+
icon={<Icon name="help" isPresentational isFilled />}
|
|
165
|
+
/>
|
|
163
166
|
</Tooltip>
|
|
164
167
|
<Tooltip {...args} text="Remove the link from current selection.">
|
|
165
168
|
<IconButton
|
|
166
169
|
label="Remove link"
|
|
167
|
-
icon={<
|
|
170
|
+
icon={<Icon name="link_off" isPresentational />}
|
|
168
171
|
/>
|
|
169
172
|
</Tooltip>
|
|
170
173
|
</>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { vi } from "vitest"
|
|
3
|
-
import { ArrowRightIcon } from "~components/Icon"
|
|
4
3
|
import { Button, IconButton } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__"
|
|
5
5
|
import { isSemanticElement } from "./isSemanticElement"
|
|
6
|
+
|
|
6
7
|
describe("isSemanticElement", () => {
|
|
7
8
|
it("returns true if provided a native element with a semantic role", () => {
|
|
8
9
|
expect(
|
|
@@ -48,15 +49,7 @@ describe("isSemanticElement", () => {
|
|
|
48
49
|
})
|
|
49
50
|
|
|
50
51
|
it("returns false if provided an element using a role 'presentation' or 'none'", () => {
|
|
51
|
-
expect(isSemanticElement(<
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
expect(
|
|
55
|
-
isSemanticElement(
|
|
56
|
-
<span role="none">
|
|
57
|
-
<ArrowRightIcon role="presentation" />
|
|
58
|
-
</span>
|
|
59
|
-
)
|
|
60
|
-
).toBe(false)
|
|
52
|
+
expect(isSemanticElement(<Icon name="add" isPresentational />)).toBe(false)
|
|
53
|
+
expect(isSemanticElement(<span role="none">Hello</span>)).toBe(false)
|
|
61
54
|
})
|
|
62
55
|
})
|
|
@@ -2,11 +2,11 @@ import React from "react"
|
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import isChromatic from "chromatic"
|
|
4
4
|
import { FieldMessage } from "~components/FieldMessage"
|
|
5
|
-
import { AddIcon, QuestionIcon } from "~components/Icon"
|
|
6
5
|
import { Input } from "~components/Input"
|
|
7
6
|
import { Label } from "~components/Label"
|
|
8
7
|
import { Text } from "~components/Text"
|
|
9
8
|
import { Button, IconButton } from "~components/__actions__/v2"
|
|
9
|
+
import { Icon } from "~components/__future__/Icon"
|
|
10
10
|
import { Focusable } from "~components/__overlays__/v3"
|
|
11
11
|
import { Tooltip, TooltipTrigger } from "../index"
|
|
12
12
|
import * as TestStories from "./Tooltip.spec.stories"
|
|
@@ -49,7 +49,7 @@ export const Primary: Story = {
|
|
|
49
49
|
<TooltipTrigger>
|
|
50
50
|
<IconButton
|
|
51
51
|
label="Add something"
|
|
52
|
-
icon={<
|
|
52
|
+
icon={<Icon name="add" isPresentational />}
|
|
53
53
|
primary
|
|
54
54
|
// Negate the aria description (added by RAC) as it should be the
|
|
55
55
|
// same as the accessible name, therefore no need to duplicate it
|
|
@@ -86,12 +86,12 @@ export const DontFieldTooltip: Story = {
|
|
|
86
86
|
<Focusable>
|
|
87
87
|
<Label>
|
|
88
88
|
Password{" "}
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
<Icon
|
|
90
|
+
name="help"
|
|
91
|
+
isPresentational
|
|
92
|
+
isFilled
|
|
93
|
+
className="text-paragraph"
|
|
94
|
+
/>
|
|
95
95
|
</Label>
|
|
96
96
|
</Focusable>
|
|
97
97
|
<Tooltip>Password must be at least 8 characters</Tooltip>
|
|
@@ -114,7 +114,7 @@ export const DoConcise: Story = {
|
|
|
114
114
|
<TooltipTrigger>
|
|
115
115
|
<IconButton
|
|
116
116
|
label="Add topic"
|
|
117
|
-
icon={<
|
|
117
|
+
icon={<Icon name="add" isPresentational />}
|
|
118
118
|
primary
|
|
119
119
|
// Negate the aria description (added by RAC) as it should be the
|
|
120
120
|
// same as the accessible name, therefore no need to duplicate it
|
|
@@ -137,7 +137,7 @@ export const DontConcise: Story = {
|
|
|
137
137
|
<TooltipTrigger>
|
|
138
138
|
<IconButton
|
|
139
139
|
label="Add something"
|
|
140
|
-
icon={<
|
|
140
|
+
icon={<Icon name="add" isPresentational />}
|
|
141
141
|
primary
|
|
142
142
|
// Negate the aria description (added by RAC) as it should be the
|
|
143
143
|
// same as the accessible name, therefore no need to duplicate it
|
|
@@ -2,10 +2,10 @@ import React from "react"
|
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { expect, userEvent, waitFor, within } from "@storybook/test"
|
|
4
4
|
import isChromatic from "chromatic"
|
|
5
|
-
import { AddIcon } from "~components/Icon"
|
|
6
5
|
import { Tab, TabList, TabPanel, TabPanels, Tabs } from "~components/Tabs"
|
|
7
6
|
import { Text } from "~components/Text"
|
|
8
7
|
import { Button, IconButton } from "~components/__actions__/v2"
|
|
8
|
+
import { Icon } from "~components/__future__/Icon"
|
|
9
9
|
import { Tag } from "~components/__future__/Tag"
|
|
10
10
|
import { Focusable } from "~components/__overlays__/v3"
|
|
11
11
|
import { Tooltip, TooltipTrigger } from "../index"
|
|
@@ -87,7 +87,7 @@ export const OnButtonWithDesc: Story = {
|
|
|
87
87
|
<TooltipTrigger defaultOpen={defaultOpen} isOpen={isOpen}>
|
|
88
88
|
<IconButton
|
|
89
89
|
label="(TESTING) Add label"
|
|
90
|
-
icon={<
|
|
90
|
+
icon={<Icon name="add" isPresentational />}
|
|
91
91
|
primary
|
|
92
92
|
aria-describedby="blah"
|
|
93
93
|
/>
|
|
@@ -105,7 +105,7 @@ export const OnIconButton: Story = {
|
|
|
105
105
|
<TooltipTrigger defaultOpen={defaultOpen} isOpen={isOpen}>
|
|
106
106
|
<IconButton
|
|
107
107
|
label="Add something"
|
|
108
|
-
icon={<
|
|
108
|
+
icon={<Icon name="add" isPresentational />}
|
|
109
109
|
primary
|
|
110
110
|
// Negate the aria description (added by RAC) as it should be the
|
|
111
111
|
// same as the accessible name, therefore no need to duplicate it
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { parseJsx } from "../__tests__/utils"
|
|
2
|
-
import { getTagName } from "./getTagName"
|
|
3
|
-
|
|
4
|
-
describe("getTagName", () => {
|
|
5
|
-
it("returns the import name if it matches the target specifier", () => {
|
|
6
|
-
const input = parseJsx('import { Well } from "@kaizen/components"')
|
|
7
|
-
const tagName = getTagName(input, "Well")
|
|
8
|
-
expect(tagName).toBe("Well")
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
it("returns the import alias if it matches the target specifier", () => {
|
|
12
|
-
const input = parseJsx(
|
|
13
|
-
'import { Well as KaizenWell } from "@kaizen/components"'
|
|
14
|
-
)
|
|
15
|
-
const tagName = getTagName(input, "Well")
|
|
16
|
-
expect(tagName).toBe("KaizenWell")
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
it("returns undefined if there is no match to the target specifier", () => {
|
|
20
|
-
const input = parseJsx('import { Well } from "@kaizen/well"')
|
|
21
|
-
const tagName = getTagName(input, "Well")
|
|
22
|
-
expect(tagName).toBe(undefined)
|
|
23
|
-
})
|
|
24
|
-
})
|