@kaizen/components 0.0.0-canary-fix-select-focus-add-small-delay-20241013230007 → 0.0.0-canary-codemod-tsx-20241030002309
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/bin/codemod.sh +2 -2
- package/codemods/README.md +12 -4
- 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/context/FilterBarContext.cjs +17 -2
- package/dist/cjs/Filter/FilterBar/context/reducer/filterBarStateReducer.cjs +4 -0
- package/dist/cjs/Filter/FilterBar/context/reducer/setupFilterBarState.cjs +2 -1
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +16 -6
- package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.cjs +12 -1
- package/dist/cjs/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.cjs +13 -2
- 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/FilterMultiSelect.cjs +4 -2
- package/dist/cjs/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.cjs +4 -2
- 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/Loading/LoadingSpinner/LoadingSpinner.cjs +6 -42
- package/dist/cjs/Loading/LoadingSpinner/LoadingSpinner.module.css.cjs +10 -0
- package/dist/cjs/Loading/LoadingSpinner/subcomponents/SpinnerIcon.cjs +80 -0
- 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/TextArea/TextArea.cjs +20 -52
- package/dist/cjs/TextArea/TextArea.module.css.cjs +14 -0
- package/dist/cjs/TextField/TextField.cjs +7 -6
- package/dist/cjs/TextField/TextField.module.scss.cjs +4 -6
- 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/ListBox/ListBox.cjs +7 -10
- 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/context/FilterBarContext.mjs +17 -2
- package/dist/esm/Filter/FilterBar/context/reducer/filterBarStateReducer.mjs +4 -0
- package/dist/esm/Filter/FilterBar/context/reducer/setupFilterBarState.mjs +2 -1
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +17 -7
- package/dist/esm/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.mjs +13 -2
- package/dist/esm/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.mjs +14 -3
- 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/FilterMultiSelect.mjs +4 -2
- package/dist/esm/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.mjs +4 -2
- 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/Loading/LoadingSpinner/LoadingSpinner.mjs +6 -42
- package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.css.mjs +8 -0
- package/dist/esm/Loading/LoadingSpinner/subcomponents/SpinnerIcon.mjs +72 -0
- 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/TextArea/TextArea.mjs +21 -53
- package/dist/esm/TextArea/TextArea.module.css.mjs +12 -0
- package/dist/esm/TextField/TextField.mjs +7 -6
- package/dist/esm/TextField/TextField.module.scss.mjs +4 -6
- 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/ListBox/ListBox.mjs +7 -10
- 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 +1026 -1699
- package/dist/types/Filter/FilterBar/context/FilterBarContext.d.ts +2 -0
- package/dist/types/Filter/FilterBar/context/reducer/filterBarStateReducer.d.ts +3 -0
- package/dist/types/Filter/FilterBar/context/types.d.ts +1 -0
- package/dist/types/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +2 -1
- package/dist/types/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.d.ts +2 -1
- package/dist/types/Loading/LoadingSpinner/LoadingSpinner.d.ts +2 -2
- package/dist/types/Loading/LoadingSpinner/subcomponents/SpinnerIcon.d.ts +5 -0
- package/dist/types/Loading/LoadingSpinner/subcomponents/index.d.ts +1 -0
- package/dist/types/TextArea/TextArea.d.ts +4 -0
- 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 +34 -35
- package/src/Avatar/Avatar.module.scss +10 -12
- 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 +2 -10
- 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 +99 -12
- package/src/Filter/FilterBar/context/FilterBarContext.tsx +11 -2
- package/src/Filter/FilterBar/context/reducer/filterBarStateReducer.ts +7 -0
- package/src/Filter/FilterBar/context/reducer/setupFilterBarState.ts +1 -0
- package/src/Filter/FilterBar/context/types.ts +1 -0
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +14 -4
- package/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.tsx +10 -2
- package/src/Filter/FilterBar/subcomponents/FilterBarMultiSelect/FilterBarMultiSelect.tsx +18 -3
- 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/FilterMultiSelect.tsx +3 -1
- package/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.tsx +4 -1
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
- package/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectionControlButton.module.scss +9 -10
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
- package/src/GuidanceBlock/GuidanceBlock.module.scss +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/Icon/bin/update-icons.sh +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/InputRange/InputRange.module.scss +4 -4
- package/src/Input/InputSearch/InputSearch.module.scss +21 -21
- package/src/Input/InputSearch/InputSearch.tsx +2 -2
- package/src/Label/Label.module.scss +4 -0
- package/src/LikertScaleLegacy/LikertScaleLegacy.module.scss +7 -8
- package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
- package/src/Loading/LoadingSpinner/LoadingSpinner.module.css +32 -0
- package/src/Loading/LoadingSpinner/LoadingSpinner.tsx +10 -54
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +7 -2
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stickersheet.stories.tsx +2 -1
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.stories.tsx +19 -0
- package/src/Loading/LoadingSpinner/subcomponents/SpinnerIcon.tsx +87 -0
- package/src/Loading/LoadingSpinner/subcomponents/index.ts +1 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
- package/src/Modal/ContextModal/ContextModal.module.scss +4 -4
- package/src/Modal/GenericModal/GenericModal.module.scss +8 -8
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.module.scss +2 -2
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
- package/src/Modal/InputEditModal/InputEditModal.module.scss +4 -4
- 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 +9 -8
- 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/RichTextEditor.module.scss +2 -2
- 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 +9 -7
- 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.module.scss +11 -7
- 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/TextArea/TextArea.module.css +142 -0
- package/src/TextArea/TextArea.tsx +25 -53
- package/src/TextField/TextField.module.scss +10 -36
- package/src/TextField/TextField.spec.tsx +9 -4
- package/src/TextField/TextField.tsx +4 -6
- package/src/TextField/_docs/TextField.stickersheet.stories.tsx +9 -1
- package/src/TextField/_docs/TextField.stories.tsx +4 -3
- package/src/Tile/subcomponents/GenericTile/GenericTile.module.scss +7 -8
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
- package/src/TitleBlockZen/TitleBlockZen.module.scss +15 -21
- 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.module.scss +2 -2
- 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.mdx +1 -1
- package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +6 -6
- package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +7 -6
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +7 -7
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +5 -5
- package/src/__actions__/Button/v2/Button/_docs/Button.mdx +1 -1
- package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +7 -6
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +5 -5
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.mdx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +1 -1
- package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +3 -3
- package/src/__actions__/Button/v3/_docs/Button.stories.tsx +1 -1
- 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/ListBox/ListBox.tsx +4 -7
- 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 +1 -58
- 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/Loading/LoadingSpinner/LoadingSpinner.module.scss.cjs +0 -7
- package/dist/cjs/TextArea/TextArea.module.scss.cjs +0 -13
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
- package/dist/esm/Loading/LoadingSpinner/LoadingSpinner.module.scss.mjs +0 -5
- package/dist/esm/TextArea/TextArea.module.scss.mjs +0 -11
- 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/Loading/LoadingSpinner/LoadingSpinner.module.scss +0 -16
- package/src/TextArea/TextArea.module.scss +0 -137
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import { FilterIcon, MeatballsIcon, TrashIcon } from "~components/Icon"
|
|
4
3
|
import { ButtonProps } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import {
|
|
6
6
|
StickerSheet,
|
|
7
7
|
StickerSheetStory,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { IconButton, IconButtonProps } from "../index"
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: "Actions/IconButton/v1",
|
|
12
|
+
title: "Actions/IconButton/IconButton (v1)",
|
|
13
13
|
parameters: {
|
|
14
14
|
chromatic: { disable: false },
|
|
15
15
|
controls: { disable: true },
|
|
@@ -30,14 +30,14 @@ const REVERSED__VARIANT_PROPS: Array<{
|
|
|
30
30
|
title: "Default",
|
|
31
31
|
props: {
|
|
32
32
|
label: "Default label",
|
|
33
|
-
icon: <
|
|
33
|
+
icon: <Icon name="more_horiz" isPresentational />,
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
title: "Primary",
|
|
38
38
|
props: {
|
|
39
39
|
label: "Primary label",
|
|
40
|
-
icon: <
|
|
40
|
+
icon: <Icon name="more_horiz" isPresentational />,
|
|
41
41
|
primary: true,
|
|
42
42
|
},
|
|
43
43
|
},
|
|
@@ -45,7 +45,7 @@ const REVERSED__VARIANT_PROPS: Array<{
|
|
|
45
45
|
title: "Destructive",
|
|
46
46
|
props: {
|
|
47
47
|
label: "Label",
|
|
48
|
-
icon: <
|
|
48
|
+
icon: <Icon name="delete" isPresentational isFilled />,
|
|
49
49
|
destructive: true,
|
|
50
50
|
},
|
|
51
51
|
},
|
|
@@ -53,7 +53,7 @@ const REVERSED__VARIANT_PROPS: Array<{
|
|
|
53
53
|
title: "Secondary",
|
|
54
54
|
props: {
|
|
55
55
|
label: "Label",
|
|
56
|
-
icon: <
|
|
56
|
+
icon: <Icon name="tune" isPresentational />,
|
|
57
57
|
secondary: true,
|
|
58
58
|
},
|
|
59
59
|
},
|
|
@@ -72,7 +72,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
72
72
|
title: "Secondary Destructive",
|
|
73
73
|
props: {
|
|
74
74
|
label: "Label",
|
|
75
|
-
icon: <
|
|
75
|
+
icon: <Icon name="delete" isPresentational isFilled />,
|
|
76
76
|
secondary: true,
|
|
77
77
|
destructive: true,
|
|
78
78
|
},
|
|
@@ -1,24 +1,24 @@
|
|
|
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 { IconButton } from "../index"
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: "Actions/IconButton/v1",
|
|
7
|
+
title: "Actions/IconButton/IconButton (v1)",
|
|
8
8
|
component: IconButton,
|
|
9
9
|
argTypes: {
|
|
10
10
|
icon: {
|
|
11
11
|
options: ["MeatballsIcon", "AddIcon"],
|
|
12
12
|
control: { type: "radio" },
|
|
13
13
|
mapping: {
|
|
14
|
-
MeatballsIcon: <
|
|
15
|
-
AddIcon: <
|
|
14
|
+
MeatballsIcon: <Icon name="more_horiz" isPresentational />,
|
|
15
|
+
AddIcon: <Icon name="add" isPresentational />,
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
args: {
|
|
20
20
|
label: "icon button",
|
|
21
|
-
icon: <
|
|
21
|
+
icon: <Icon name="more_horiz" isPresentational />,
|
|
22
22
|
},
|
|
23
23
|
} satisfies Meta<typeof IconButton>
|
|
24
24
|
|
|
@@ -47,7 +47,7 @@ A disabled Button prevents user interaction. It doesn't appear in the tab order,
|
|
|
47
47
|
|
|
48
48
|
Use any <LinkTo pageId="components-icons">Icon</LinkTo> component in the `icon` prop.
|
|
49
49
|
|
|
50
|
-
<Canvas of={ButtonStories.
|
|
50
|
+
<Canvas of={ButtonStories.IconStory} />
|
|
51
51
|
|
|
52
52
|
#### Icon position
|
|
53
53
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { StoryObj, Meta } from "@storybook/react"
|
|
3
|
-
import { ArrowForwardIcon, ArrowRightIcon } from "~components/Icon"
|
|
4
3
|
import { LoadingInput } from "~components/Loading"
|
|
5
4
|
import { TextField } from "~components/TextField"
|
|
5
|
+
import { Icon } from "~components/__future__/Icon"
|
|
6
6
|
import { Button } from "../index"
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
9
|
-
title: "Actions/Button/v2",
|
|
9
|
+
title: "Actions/Button/Button (v2)",
|
|
10
10
|
component: Button,
|
|
11
11
|
args: {
|
|
12
12
|
label: "Label",
|
|
@@ -65,12 +65,13 @@ export const Disabled: Story = {
|
|
|
65
65
|
const sourceCodeIcon = `
|
|
66
66
|
import { Button, ArrowForwardIcon } from "@kaizen/components"
|
|
67
67
|
|
|
68
|
-
<Button label="Label" icon={<
|
|
68
|
+
<Button label="Label" icon={<Icon name="arrow_forward" isPresentational shouldMirrorInRTL />} />
|
|
69
69
|
`
|
|
70
70
|
|
|
71
|
-
export const
|
|
71
|
+
export const IconStory: Story = {
|
|
72
|
+
name: "Icon",
|
|
72
73
|
args: {
|
|
73
|
-
icon: <
|
|
74
|
+
icon: <Icon name="arrow_forward" isPresentational shouldMirrorInRTL />,
|
|
74
75
|
},
|
|
75
76
|
parameters: {
|
|
76
77
|
docs: { source: { code: sourceCodeIcon } },
|
|
@@ -79,7 +80,7 @@ export const Icon: Story = {
|
|
|
79
80
|
|
|
80
81
|
export const IconPosition: Story = {
|
|
81
82
|
args: {
|
|
82
|
-
icon: <
|
|
83
|
+
icon: <Icon name="arrow_forward" isPresentational shouldMirrorInRTL />,
|
|
83
84
|
iconPosition: "end",
|
|
84
85
|
},
|
|
85
86
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
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 { IconButton } from "../index"
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: "Actions/IconButton/v2",
|
|
7
|
+
title: "Actions/IconButton/IconButton (v2)",
|
|
8
8
|
component: IconButton,
|
|
9
9
|
argTypes: {
|
|
10
10
|
icon: {
|
|
11
11
|
options: ["MeatballsIcon", "AddIcon"],
|
|
12
12
|
control: { type: "radio" },
|
|
13
13
|
mapping: {
|
|
14
|
-
MeatballsIcon: <
|
|
15
|
-
AddIcon: <
|
|
14
|
+
MeatballsIcon: <Icon name="more_horiz" isPresentational />,
|
|
15
|
+
AddIcon: <Icon name="add" isPresentational />,
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
args: {
|
|
20
20
|
label: "icon button",
|
|
21
|
-
icon: <
|
|
21
|
+
icon: <Icon name="more_horiz" isPresentational />,
|
|
22
22
|
},
|
|
23
23
|
} satisfies Meta<typeof IconButton>
|
|
24
24
|
|
|
@@ -3,7 +3,7 @@ import { ResourceLinks, SbContent, KAIOInstallation } from "~storybook/component
|
|
|
3
3
|
import * as docsStories from "./Button.docs.stories"
|
|
4
4
|
import * as exampleStories from "./Button.stories"
|
|
5
5
|
|
|
6
|
-
<Meta title="Actions/Button/v3/API Specification" />
|
|
6
|
+
<Meta title="Actions/Button/Button (v3)/API Specification" />
|
|
7
7
|
|
|
8
8
|
<SbContent>
|
|
9
9
|
# Button API Specification (v3)
|
|
@@ -2,7 +2,7 @@ import { Canvas, Meta, Controls } from "@storybook/blocks"
|
|
|
2
2
|
import { ResourceLinks, SbContent, Installation } from "~storybook/components"
|
|
3
3
|
import * as Button from "./Button.stories"
|
|
4
4
|
|
|
5
|
-
<Meta title="Actions/Button/v3/Usage Guidelines" />
|
|
5
|
+
<Meta title="Actions/Button/Button (v3)/Usage Guidelines" />
|
|
6
6
|
|
|
7
7
|
<SbContent>
|
|
8
8
|
# Button (v3)
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { Button } from "../index"
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
title: "Actions/Button/v3/Tests",
|
|
12
|
+
title: "Actions/Button/Button (v3)/Tests",
|
|
13
13
|
parameters: {
|
|
14
14
|
chromatic: { disable: false },
|
|
15
15
|
controls: { disable: true },
|
|
@@ -82,7 +82,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
82
82
|
<ArrowForwardIcon role="presentation" />
|
|
83
83
|
</Button>
|
|
84
84
|
<Button size="small" isDisabled>
|
|
85
|
-
<LoadingSpinner size="
|
|
85
|
+
<LoadingSpinner size="xs" accessibilityLabel="submitting label" />
|
|
86
86
|
</Button>
|
|
87
87
|
</StickerSheet.Row>
|
|
88
88
|
<StickerSheet.Row rowTitle="Icon only small">
|
|
@@ -93,7 +93,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
93
93
|
<TrashIcon role="img" aria-label="Remove label" />
|
|
94
94
|
</Button>
|
|
95
95
|
<Button size="small" isDisabled>
|
|
96
|
-
<LoadingSpinner size="
|
|
96
|
+
<LoadingSpinner size="xs" accessibilityLabel="Removing label" />
|
|
97
97
|
</Button>
|
|
98
98
|
</StickerSheet.Row>
|
|
99
99
|
</StickerSheet.Body>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import { ChevronDownIcon } from "~components/Icon"
|
|
4
3
|
import { Button } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import {
|
|
6
6
|
StickerSheet,
|
|
7
7
|
StickerSheetStory,
|
|
@@ -30,7 +30,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
30
30
|
button={
|
|
31
31
|
<Button
|
|
32
32
|
label="Menu"
|
|
33
|
-
icon={<
|
|
33
|
+
icon={<Icon name="keyboard_arrow_down" isPresentational />}
|
|
34
34
|
iconPosition="end"
|
|
35
35
|
/>
|
|
36
36
|
}
|
|
@@ -45,7 +45,7 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
45
45
|
button={
|
|
46
46
|
<Button
|
|
47
47
|
label="Menu"
|
|
48
|
-
icon={<
|
|
48
|
+
icon={<Icon name="keyboard_arrow_down" isPresentational />}
|
|
49
49
|
iconPosition="end"
|
|
50
50
|
/>
|
|
51
51
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { ChevronDownIcon, DuplicateIcon } from "~components/Icon"
|
|
4
3
|
import { Button } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import { Menu } from "../index"
|
|
6
6
|
import { MenuHeading } from "../subcomponents/MenuHeading"
|
|
7
7
|
import { MenuItem } from "../subcomponents/MenuItem"
|
|
@@ -14,7 +14,7 @@ const meta = {
|
|
|
14
14
|
button: (
|
|
15
15
|
<Button
|
|
16
16
|
label="Actions"
|
|
17
|
-
icon={<
|
|
17
|
+
icon={<Icon name="keyboard_arrow_down" isPresentational />}
|
|
18
18
|
iconPosition="end"
|
|
19
19
|
/>
|
|
20
20
|
),
|
|
@@ -24,7 +24,7 @@ const meta = {
|
|
|
24
24
|
onClick={() => {
|
|
25
25
|
alert("Duplicated!")
|
|
26
26
|
}}
|
|
27
|
-
icon={<
|
|
27
|
+
icon={<Icon name="content_copy" isPresentational isFilled />}
|
|
28
28
|
label="Duplicate item"
|
|
29
29
|
/>
|
|
30
30
|
<MenuList heading={<MenuHeading>Extra links</MenuHeading>}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
3
3
|
import { MenuHeading } from "../subcomponents/MenuHeading"
|
|
4
4
|
import { MenuItem } from "../subcomponents/MenuItem"
|
|
5
5
|
import { MenuList } from "../subcomponents/MenuList"
|
|
@@ -34,7 +34,7 @@ export const MenuContentExample = ({
|
|
|
34
34
|
alert("Hello")
|
|
35
35
|
e.preventDefault()
|
|
36
36
|
}}
|
|
37
|
-
icon={<
|
|
37
|
+
icon={<Icon name="edit" isPresentational isFilled />}
|
|
38
38
|
label="Menu button"
|
|
39
39
|
/>
|
|
40
40
|
<MenuItem
|
|
@@ -46,7 +46,7 @@ export const MenuContentExample = ({
|
|
|
46
46
|
): void => {
|
|
47
47
|
e.preventDefault()
|
|
48
48
|
}}
|
|
49
|
-
icon={<
|
|
49
|
+
icon={<Icon name="content_copy" isPresentational isFilled />}
|
|
50
50
|
label="Menu button but the label is too long"
|
|
51
51
|
/>
|
|
52
52
|
<MenuItem
|
|
@@ -58,7 +58,7 @@ export const MenuContentExample = ({
|
|
|
58
58
|
): void => {
|
|
59
59
|
e.preventDefault()
|
|
60
60
|
}}
|
|
61
|
-
icon={<
|
|
61
|
+
icon={<Icon name="delete" isPresentational isFilled />}
|
|
62
62
|
destructive
|
|
63
63
|
label="Destructive Menu button"
|
|
64
64
|
/>
|
|
@@ -71,7 +71,7 @@ export const MenuContentExample = ({
|
|
|
71
71
|
): void => {
|
|
72
72
|
e.preventDefault()
|
|
73
73
|
}}
|
|
74
|
-
icon={<
|
|
74
|
+
icon={<Icon name="delete" isPresentational isFilled />}
|
|
75
75
|
disabled
|
|
76
76
|
label="Disabled Menu button"
|
|
77
77
|
/>
|
|
@@ -84,7 +84,7 @@ export const MenuContentExample = ({
|
|
|
84
84
|
): void => {
|
|
85
85
|
e.preventDefault()
|
|
86
86
|
}}
|
|
87
|
-
icon={<
|
|
87
|
+
icon={<Icon name="delete" isPresentational isFilled />}
|
|
88
88
|
disabled
|
|
89
89
|
destructive
|
|
90
90
|
label="Disabled Destructive Menu button"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { action } from "@storybook/addon-actions"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { MenuItem, MenuList } from "../"
|
|
5
5
|
|
|
6
6
|
export const exampleActionButtonPropsButton = {
|
|
@@ -16,12 +16,12 @@ export const exampleActionButtonPropsAnchor = {
|
|
|
16
16
|
export const exampleDropdownContentEnabled = (
|
|
17
17
|
<MenuList>
|
|
18
18
|
<MenuItem
|
|
19
|
-
icon={<
|
|
19
|
+
icon={<Icon name="edit" isPresentational isFilled />}
|
|
20
20
|
label="Menu Item 1"
|
|
21
21
|
onClick={action("clicked")}
|
|
22
22
|
/>
|
|
23
23
|
<MenuItem
|
|
24
|
-
icon={<
|
|
24
|
+
icon={<Icon name="content_copy" isPresentational isFilled />}
|
|
25
25
|
label="Menu Item 2"
|
|
26
26
|
/>
|
|
27
27
|
</MenuList>
|
|
@@ -30,12 +30,12 @@ export const exampleDropdownContentEnabled = (
|
|
|
30
30
|
export const exampleDropdownContentOneDisabled = (
|
|
31
31
|
<MenuList>
|
|
32
32
|
<MenuItem
|
|
33
|
-
icon={<
|
|
33
|
+
icon={<Icon name="edit" isPresentational isFilled />}
|
|
34
34
|
label="Menu Item 1"
|
|
35
35
|
disabled
|
|
36
36
|
/>
|
|
37
37
|
<MenuItem
|
|
38
|
-
icon={<
|
|
38
|
+
icon={<Icon name="content_copy" isPresentational isFilled />}
|
|
39
39
|
label="Menu Item 2"
|
|
40
40
|
/>
|
|
41
41
|
</MenuList>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { ChevronDownIcon, DuplicateIcon } from "~components/Icon"
|
|
4
3
|
import { Button } from "~components/__actions__/v2"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import * as MenuV1Stories from "../../v1/_docs/Menu.stories"
|
|
6
6
|
import { Menu, MenuList, MenuItem, MenuHeading } from "../index"
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ const meta = {
|
|
|
12
12
|
button: (
|
|
13
13
|
<Button
|
|
14
14
|
label="Actions"
|
|
15
|
-
icon={<
|
|
15
|
+
icon={<Icon name="keyboard_arrow_down" isPresentational />}
|
|
16
16
|
iconPosition="end"
|
|
17
17
|
/>
|
|
18
18
|
),
|
|
@@ -22,7 +22,7 @@ const meta = {
|
|
|
22
22
|
onClick={() => {
|
|
23
23
|
alert("Duplicated!")
|
|
24
24
|
}}
|
|
25
|
-
icon={<
|
|
25
|
+
icon={<Icon name="content_copy" isPresentational isFilled />}
|
|
26
26
|
label="Duplicate item"
|
|
27
27
|
/>
|
|
28
28
|
<MenuList heading={<MenuHeading>Extra links</MenuHeading>}>
|
|
@@ -42,7 +42,7 @@ import * as exampleStories from "./Menu.stories"
|
|
|
42
42
|
of={exampleStories.Basic}
|
|
43
43
|
source={{code: `
|
|
44
44
|
<MenuTrigger>
|
|
45
|
-
<Button><
|
|
45
|
+
<Button><Icon name="more_horiz" alt="Actions" /></Button>
|
|
46
46
|
<Popover>
|
|
47
47
|
<Menu>
|
|
48
48
|
<MenuItem href="#">Menu Item</MenuItem>
|
|
@@ -94,5 +94,3 @@ Menu items can be disabled with the `isDisabled` prop.
|
|
|
94
94
|
By default, the open/closed state of the menu is handled under the hood. In cases where you need control over the open state, use the `isOpen` and `onOpenChange` props on the `MenuTrigger` component (both props must be used for this to work).
|
|
95
95
|
|
|
96
96
|
<Canvas className="mb-24" of={exampleStories.Controlled} />
|
|
97
|
-
|
|
98
|
-
|
|
@@ -2,17 +2,8 @@ import React, { FunctionComponent, ReactNode } from "react"
|
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import isChromatic from "chromatic"
|
|
4
4
|
import { Popover } from "react-aria-components"
|
|
5
|
-
import {
|
|
6
|
-
ArrowDownIcon,
|
|
7
|
-
ArrowUpIcon,
|
|
8
|
-
BookmarkOffIcon,
|
|
9
|
-
CheckIcon,
|
|
10
|
-
ChevronDownIcon,
|
|
11
|
-
EditIcon,
|
|
12
|
-
MeatballsIcon,
|
|
13
|
-
TrashIcon,
|
|
14
|
-
} from "~components/Icon"
|
|
15
5
|
import { Button } from "~components/__actions__/v3"
|
|
6
|
+
import { Icon } from "~components/__future__/Icon"
|
|
16
7
|
import { Menu, MenuItem, MenuTrigger } from "../index"
|
|
17
8
|
|
|
18
9
|
const meta = {
|
|
@@ -31,19 +22,27 @@ type Story = StoryObj<typeof meta>
|
|
|
31
22
|
|
|
32
23
|
const DefaultMenuItems = (): ReactNode => (
|
|
33
24
|
<>
|
|
34
|
-
<MenuItem icon={<
|
|
35
|
-
<MenuItem icon={<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<MenuItem icon={<
|
|
25
|
+
<MenuItem icon={<Icon name="bookmark" isPresentational />}>Save</MenuItem>
|
|
26
|
+
<MenuItem icon={<Icon name="edit" isPresentational isFilled />}>
|
|
27
|
+
Edit
|
|
28
|
+
</MenuItem>
|
|
29
|
+
<MenuItem icon={<Icon name="arrow_upward" isPresentational />}>
|
|
30
|
+
Move up
|
|
31
|
+
</MenuItem>
|
|
32
|
+
<MenuItem icon={<Icon name="arrow_downward" isPresentational />}>
|
|
33
|
+
Move down
|
|
34
|
+
</MenuItem>
|
|
35
|
+
<MenuItem icon={<Icon name="delete" isPresentational isFilled />}>
|
|
36
|
+
Delete
|
|
37
|
+
</MenuItem>
|
|
39
38
|
</>
|
|
40
39
|
)
|
|
41
40
|
|
|
42
41
|
export const Actions: Story = {
|
|
43
42
|
render: ({ defaultOpen: _, ...args }) => (
|
|
44
43
|
<MenuTrigger {...args}>
|
|
45
|
-
<Button>
|
|
46
|
-
<
|
|
44
|
+
<Button className="[--icon-size:24]">
|
|
45
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
47
46
|
</Button>
|
|
48
47
|
<Popover>
|
|
49
48
|
<Menu>
|
|
@@ -60,8 +59,8 @@ export const Actions: Story = {
|
|
|
60
59
|
export const ItemsDo: Story = {
|
|
61
60
|
render: ({ defaultOpen, ...args }) => (
|
|
62
61
|
<MenuTrigger defaultOpen={defaultOpen} {...args}>
|
|
63
|
-
<Button>
|
|
64
|
-
<
|
|
62
|
+
<Button className="[--icon-size:24]">
|
|
63
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
65
64
|
</Button>
|
|
66
65
|
<Popover>
|
|
67
66
|
<Menu>
|
|
@@ -75,12 +74,14 @@ export const ItemsDo: Story = {
|
|
|
75
74
|
export const ItemsDont: Story = {
|
|
76
75
|
render: ({ defaultOpen, ...args }) => (
|
|
77
76
|
<MenuTrigger defaultOpen={defaultOpen} {...args}>
|
|
78
|
-
<Button>
|
|
79
|
-
<
|
|
77
|
+
<Button className="[--icon-size:24]">
|
|
78
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
80
79
|
</Button>
|
|
81
80
|
<Popover>
|
|
82
81
|
<Menu>
|
|
83
|
-
<MenuItem icon={<
|
|
82
|
+
<MenuItem icon={<Icon name="delete" isPresentational isFilled />}>
|
|
83
|
+
Delete
|
|
84
|
+
</MenuItem>
|
|
84
85
|
</Menu>
|
|
85
86
|
</Popover>
|
|
86
87
|
</MenuTrigger>
|
|
@@ -90,13 +91,13 @@ export const ItemsDont: Story = {
|
|
|
90
91
|
export const SelectionDont: Story = {
|
|
91
92
|
render: ({ defaultOpen, ...args }) => (
|
|
92
93
|
<MenuTrigger defaultOpen={defaultOpen} {...args}>
|
|
93
|
-
<Button>
|
|
94
|
+
<Button className="[--icon-size:24]">
|
|
94
95
|
Sort by
|
|
95
|
-
<
|
|
96
|
+
<Icon name="keyboard_arrow_down" isPresentational />
|
|
96
97
|
</Button>
|
|
97
98
|
<Popover>
|
|
98
99
|
<Menu>
|
|
99
|
-
<MenuItem icon={<
|
|
100
|
+
<MenuItem icon={<Icon name="check" isPresentational />}>
|
|
100
101
|
Recommended
|
|
101
102
|
</MenuItem>
|
|
102
103
|
<MenuItem>Most recent</MenuItem>
|
|
@@ -110,9 +111,9 @@ export const LabelChevronDo: Story = {
|
|
|
110
111
|
render: ({ defaultOpen, ...args }) => (
|
|
111
112
|
<MenuTrigger defaultOpen={defaultOpen} {...args}>
|
|
112
113
|
{/* Replace with Kaizen Button once we have v3 or backwards compatibility */}
|
|
113
|
-
<Button>
|
|
114
|
+
<Button className="[--icon-size:24]">
|
|
114
115
|
Edit item
|
|
115
|
-
<
|
|
116
|
+
<Icon name="keyboard_arrow_down" isPresentational />
|
|
116
117
|
</Button>
|
|
117
118
|
<Popover>
|
|
118
119
|
<Menu>
|
|
@@ -139,9 +140,9 @@ export const LabelChevronDont: Story = {
|
|
|
139
140
|
export const LabelDo: Story = {
|
|
140
141
|
render: ({ defaultOpen, ...args }) => (
|
|
141
142
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
142
|
-
<Button>
|
|
143
|
+
<Button className="[--icon-size:24]">
|
|
143
144
|
Actions [visually hidden], conversation with Harper[/visually hidden]
|
|
144
|
-
<
|
|
145
|
+
<Icon name="keyboard_arrow_down" isPresentational />
|
|
145
146
|
</Button>
|
|
146
147
|
<Popover>
|
|
147
148
|
<Menu {...args}>
|
|
@@ -155,9 +156,9 @@ export const LabelDo: Story = {
|
|
|
155
156
|
export const LabelDont: Story = {
|
|
156
157
|
render: ({ defaultOpen, ...args }) => (
|
|
157
158
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
158
|
-
<Button>
|
|
159
|
+
<Button className="[--icon-size:24]">
|
|
159
160
|
Open menu
|
|
160
|
-
<
|
|
161
|
+
<Icon name="keyboard_arrow_down" isPresentational />
|
|
161
162
|
</Button>
|
|
162
163
|
<Popover>
|
|
163
164
|
<Menu {...args}>
|
|
@@ -171,15 +172,15 @@ export const LabelDont: Story = {
|
|
|
171
172
|
export const IconsDont: Story = {
|
|
172
173
|
render: ({ defaultOpen, ...args }) => (
|
|
173
174
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
174
|
-
<Button>
|
|
175
|
-
<
|
|
175
|
+
<Button className="[--icon-size:24]">
|
|
176
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
176
177
|
</Button>
|
|
177
178
|
<Popover>
|
|
178
179
|
<Menu {...args}>
|
|
179
|
-
<MenuItem icon={<
|
|
180
|
+
<MenuItem icon={<Icon name="edit" isPresentational isFilled />}>
|
|
180
181
|
Edit ‘Strengths’
|
|
181
182
|
</MenuItem>
|
|
182
|
-
<MenuItem icon={<
|
|
183
|
+
<MenuItem icon={<Icon name="edit" isPresentational isFilled />}>
|
|
183
184
|
Edit ‘Weaknesses’
|
|
184
185
|
</MenuItem>
|
|
185
186
|
<MenuItem>Export PDF</MenuItem>
|
|
@@ -193,8 +194,8 @@ export const IconsDont: Story = {
|
|
|
193
194
|
export const MenuItemLabelsDont: Story = {
|
|
194
195
|
render: ({ defaultOpen, ...args }) => (
|
|
195
196
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
196
|
-
<Button>
|
|
197
|
-
<
|
|
197
|
+
<Button className="[--icon-size:24]">
|
|
198
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
198
199
|
</Button>
|
|
199
200
|
<Popover>
|
|
200
201
|
<Menu {...args}>
|
|
@@ -211,8 +212,8 @@ export const SentenceCaseDo: Story = {
|
|
|
211
212
|
render: ({ defaultOpen, ...args }) => (
|
|
212
213
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
213
214
|
{/* Replace with Kaizen Button once we have v3 or backwards compatibility */}
|
|
214
|
-
<Button>
|
|
215
|
-
<
|
|
215
|
+
<Button className="[--icon-size:24]">
|
|
216
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
216
217
|
</Button>
|
|
217
218
|
<Popover>
|
|
218
219
|
<Menu {...args}>
|
|
@@ -229,8 +230,8 @@ export const SentenceCaseDont: Story = {
|
|
|
229
230
|
render: ({ defaultOpen, ...args }) => (
|
|
230
231
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
231
232
|
{/* Replace with Kaizen Button once we have v3 or backwards compatibility */}
|
|
232
|
-
<Button>
|
|
233
|
-
<
|
|
233
|
+
<Button className="[--icon-size:24]">
|
|
234
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
234
235
|
</Button>
|
|
235
236
|
<Popover>
|
|
236
237
|
<Menu {...args}>
|
|
@@ -247,8 +248,8 @@ export const ElipsesDo: Story = {
|
|
|
247
248
|
render: ({ defaultOpen, ...args }) => (
|
|
248
249
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
249
250
|
{/* Replace with Kaizen Button once we have v3 or backwards compatibility */}
|
|
250
|
-
<Button>
|
|
251
|
-
<
|
|
251
|
+
<Button className="[--icon-size:24]">
|
|
252
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
252
253
|
</Button>
|
|
253
254
|
<Popover>
|
|
254
255
|
<Menu {...args}>
|
|
@@ -265,8 +266,8 @@ export const ElipsesDont: Story = {
|
|
|
265
266
|
render: ({ defaultOpen, ...args }) => (
|
|
266
267
|
<MenuTrigger defaultOpen={defaultOpen}>
|
|
267
268
|
{/* Replace with Kaizen Button once we have v3 or backwards compatibility */}
|
|
268
|
-
<Button>
|
|
269
|
-
<
|
|
269
|
+
<Button className="[--icon-size:24]">
|
|
270
|
+
<Icon name="more_horiz" alt="Additional actions" />
|
|
270
271
|
</Button>
|
|
271
272
|
<Popover>
|
|
272
273
|
<Menu {...args}>
|