@kaizen/components 1.66.1 → 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 +562 -538
- 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 +2 -2
- 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,126 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Meta } from "@storybook/react"
|
|
3
|
+
import { CheckboxField } from "~components/Checkbox"
|
|
4
|
+
import { Label } from "~components/Label"
|
|
5
|
+
import { Text } from "~components/Text"
|
|
6
|
+
import { Button as ButtonV2 } from "~components/__actions__/v2"
|
|
7
|
+
import { Button as ButtonV3 } from "~components/__actions__/v3"
|
|
8
|
+
import {
|
|
9
|
+
StickerSheet,
|
|
10
|
+
StickerSheetStory,
|
|
11
|
+
} from "~storybook/components/StickerSheet"
|
|
12
|
+
import { handledRtlIcons, iconDefaultSet } from "../constants"
|
|
13
|
+
import { Icon, IconProps } from "../index"
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: "Illustrations/Icon/Icon (Future)",
|
|
17
|
+
parameters: {
|
|
18
|
+
chromatic: { disable: false },
|
|
19
|
+
controls: { disable: true },
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta
|
|
22
|
+
|
|
23
|
+
const StickerSheetTemplate: StickerSheetStory = {
|
|
24
|
+
render: ({ isReversed }) => {
|
|
25
|
+
const defaultProps = {
|
|
26
|
+
name: "star",
|
|
27
|
+
isPresentational: true,
|
|
28
|
+
} satisfies IconProps
|
|
29
|
+
|
|
30
|
+
const mirrorInRTL = [
|
|
31
|
+
"arrow_forward",
|
|
32
|
+
"arrow_back",
|
|
33
|
+
...Object.keys(handledRtlIcons),
|
|
34
|
+
] satisfies Array<IconProps["name"]>
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<StickerSheet heading="Icon" isReversed={isReversed}>
|
|
39
|
+
<StickerSheet.Header
|
|
40
|
+
headings={["Outlined", "Filled", "Color"]}
|
|
41
|
+
hasVerticalHeadings
|
|
42
|
+
/>
|
|
43
|
+
<StickerSheet.Body>
|
|
44
|
+
{iconDefaultSet.map(name => (
|
|
45
|
+
<StickerSheet.Row key={name} rowTitle={name}>
|
|
46
|
+
<Icon {...defaultProps} name={name} />
|
|
47
|
+
<Icon {...defaultProps} name={name} isFilled />
|
|
48
|
+
<Icon {...defaultProps} name={name} className="text-blue-500" />
|
|
49
|
+
</StickerSheet.Row>
|
|
50
|
+
))}
|
|
51
|
+
</StickerSheet.Body>
|
|
52
|
+
</StickerSheet>
|
|
53
|
+
|
|
54
|
+
<StickerSheet heading="shouldMirrorInRTL" isReversed={isReversed}>
|
|
55
|
+
<StickerSheet.Header
|
|
56
|
+
headings={[
|
|
57
|
+
'true; dir=["ltr"]',
|
|
58
|
+
'true; dir=["rtl"]',
|
|
59
|
+
'false; dir=["rtl"]',
|
|
60
|
+
]}
|
|
61
|
+
hasVerticalHeadings
|
|
62
|
+
/>
|
|
63
|
+
<StickerSheet.Body>
|
|
64
|
+
{mirrorInRTL.map(name => (
|
|
65
|
+
<StickerSheet.Row key={name} rowTitle={name}>
|
|
66
|
+
<div dir="ltr" className="text-center">
|
|
67
|
+
<Icon {...defaultProps} name={name} shouldMirrorInRTL />
|
|
68
|
+
</div>
|
|
69
|
+
<div dir="rtl" className="text-center">
|
|
70
|
+
<Icon {...defaultProps} name={name} shouldMirrorInRTL />
|
|
71
|
+
</div>
|
|
72
|
+
<div dir="rtl" className="text-center">
|
|
73
|
+
<Icon {...defaultProps} name={name} />
|
|
74
|
+
</div>
|
|
75
|
+
</StickerSheet.Row>
|
|
76
|
+
))}
|
|
77
|
+
</StickerSheet.Body>
|
|
78
|
+
</StickerSheet>
|
|
79
|
+
|
|
80
|
+
<StickerSheet
|
|
81
|
+
heading="Alignment as children within other components"
|
|
82
|
+
isReversed={isReversed}
|
|
83
|
+
>
|
|
84
|
+
<StickerSheet.Body>
|
|
85
|
+
<StickerSheet.Row rowTitle="Text">
|
|
86
|
+
<Text variant="body">
|
|
87
|
+
Showcase alignment of an icon <Icon {...defaultProps} /> within
|
|
88
|
+
a sentence
|
|
89
|
+
</Text>
|
|
90
|
+
</StickerSheet.Row>
|
|
91
|
+
<StickerSheet.Row rowTitle="Label">
|
|
92
|
+
<Label>
|
|
93
|
+
Field label <Icon {...defaultProps} />
|
|
94
|
+
</Label>
|
|
95
|
+
</StickerSheet.Row>
|
|
96
|
+
<StickerSheet.Row rowTitle="CheckboxField">
|
|
97
|
+
<CheckboxField
|
|
98
|
+
labelText={
|
|
99
|
+
<>
|
|
100
|
+
Checkbox label <Icon {...defaultProps} />
|
|
101
|
+
</>
|
|
102
|
+
}
|
|
103
|
+
/>
|
|
104
|
+
</StickerSheet.Row>
|
|
105
|
+
<StickerSheet.Row rowTitle="Button (v2)">
|
|
106
|
+
<ButtonV2
|
|
107
|
+
label="Button label"
|
|
108
|
+
icon={<Icon {...defaultProps} />}
|
|
109
|
+
/>
|
|
110
|
+
</StickerSheet.Row>
|
|
111
|
+
<StickerSheet.Row rowTitle="Button (v3)">
|
|
112
|
+
<ButtonV3>
|
|
113
|
+
<Icon {...defaultProps} /> Button label
|
|
114
|
+
</ButtonV3>
|
|
115
|
+
</StickerSheet.Row>
|
|
116
|
+
</StickerSheet.Body>
|
|
117
|
+
</StickerSheet>
|
|
118
|
+
</>
|
|
119
|
+
)
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const StickerSheetDefault: StickerSheetStory = {
|
|
124
|
+
...StickerSheetTemplate,
|
|
125
|
+
name: "Sticker Sheet (Default)",
|
|
126
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { IconNames } from "./types"
|
|
2
|
+
|
|
3
|
+
/* eslint-disable camelcase */
|
|
4
|
+
export const handledRtlIcons = {
|
|
5
|
+
checklist: "checklist_rtl",
|
|
6
|
+
format_list_numbered: "format_list_numbered_rtl",
|
|
7
|
+
} satisfies Partial<Record<IconNames, IconNames>>
|
|
8
|
+
/* eslint-enable camelcase */
|
|
9
|
+
|
|
10
|
+
export const iconDefaultSet = [
|
|
11
|
+
"add",
|
|
12
|
+
"add_a_photo",
|
|
13
|
+
"add_comment",
|
|
14
|
+
"add_link",
|
|
15
|
+
"arrow_back",
|
|
16
|
+
"arrow_downward",
|
|
17
|
+
"arrow_drop_down",
|
|
18
|
+
"arrow_drop_up",
|
|
19
|
+
"arrow_forward",
|
|
20
|
+
"arrow_upward",
|
|
21
|
+
"assignment",
|
|
22
|
+
"assignment_add",
|
|
23
|
+
"assignment_ind",
|
|
24
|
+
"assignment_returned",
|
|
25
|
+
"assignment_turned_in",
|
|
26
|
+
"auto_awesome",
|
|
27
|
+
"backup",
|
|
28
|
+
"bar_chart",
|
|
29
|
+
"bookmark",
|
|
30
|
+
"brush",
|
|
31
|
+
"build",
|
|
32
|
+
"cached",
|
|
33
|
+
"cancel",
|
|
34
|
+
"chat_apps_script",
|
|
35
|
+
"chat_error",
|
|
36
|
+
"chat_paste_go",
|
|
37
|
+
"check",
|
|
38
|
+
"check_circle",
|
|
39
|
+
"chevron_left",
|
|
40
|
+
"chevron_right",
|
|
41
|
+
"close",
|
|
42
|
+
"close_fullscreen",
|
|
43
|
+
"cloud_download",
|
|
44
|
+
"comment_bank",
|
|
45
|
+
"content_copy",
|
|
46
|
+
"dashboard",
|
|
47
|
+
"date_range",
|
|
48
|
+
"delete",
|
|
49
|
+
"domain",
|
|
50
|
+
"draft",
|
|
51
|
+
"drag_indicator",
|
|
52
|
+
"edit",
|
|
53
|
+
"error",
|
|
54
|
+
"event",
|
|
55
|
+
"favorite",
|
|
56
|
+
"find_in_page",
|
|
57
|
+
"flag",
|
|
58
|
+
"flash_on",
|
|
59
|
+
"format_bold",
|
|
60
|
+
"format_indent_decrease",
|
|
61
|
+
"format_indent_increase",
|
|
62
|
+
"format_italic",
|
|
63
|
+
"format_list_bulleted",
|
|
64
|
+
"format_list_numbered",
|
|
65
|
+
"format_underlined",
|
|
66
|
+
"forum",
|
|
67
|
+
"forward",
|
|
68
|
+
"front_hand",
|
|
69
|
+
"grade",
|
|
70
|
+
"group",
|
|
71
|
+
"groups",
|
|
72
|
+
"help",
|
|
73
|
+
"history",
|
|
74
|
+
"home",
|
|
75
|
+
"horizontal_rule",
|
|
76
|
+
"info",
|
|
77
|
+
"key",
|
|
78
|
+
"keyboard_arrow_down",
|
|
79
|
+
"keyboard_arrow_up",
|
|
80
|
+
"keyboard_tab",
|
|
81
|
+
"keyboard_tab_rtl",
|
|
82
|
+
"label",
|
|
83
|
+
"lan",
|
|
84
|
+
"lightbulb",
|
|
85
|
+
"link_off",
|
|
86
|
+
"list",
|
|
87
|
+
"local_fire_department",
|
|
88
|
+
"lock",
|
|
89
|
+
"logout",
|
|
90
|
+
"mail",
|
|
91
|
+
"manage_accounts",
|
|
92
|
+
"menu",
|
|
93
|
+
"mms",
|
|
94
|
+
"more_horiz",
|
|
95
|
+
"more_vert",
|
|
96
|
+
"north_east",
|
|
97
|
+
"note_alt",
|
|
98
|
+
"notifications_active",
|
|
99
|
+
"open_in_full",
|
|
100
|
+
"open_in_new",
|
|
101
|
+
"pause",
|
|
102
|
+
"percent",
|
|
103
|
+
"person",
|
|
104
|
+
"person_add",
|
|
105
|
+
"person_cancel",
|
|
106
|
+
"person_check",
|
|
107
|
+
"play_circle",
|
|
108
|
+
"playlist_add_check",
|
|
109
|
+
"potted_plant",
|
|
110
|
+
"power",
|
|
111
|
+
"power_settings_new",
|
|
112
|
+
"print",
|
|
113
|
+
"privacy_tip",
|
|
114
|
+
"psychology_alt",
|
|
115
|
+
"radio_button_checked",
|
|
116
|
+
"radio_button_unchecked",
|
|
117
|
+
"rate_review",
|
|
118
|
+
"redo",
|
|
119
|
+
"reduce_capacity",
|
|
120
|
+
"refresh",
|
|
121
|
+
"remove",
|
|
122
|
+
"reviews",
|
|
123
|
+
"schedule",
|
|
124
|
+
"school",
|
|
125
|
+
"search",
|
|
126
|
+
"send",
|
|
127
|
+
"sensors",
|
|
128
|
+
"sentiment_dissatisfied",
|
|
129
|
+
"sentiment_neutral",
|
|
130
|
+
"sentiment_satisfied",
|
|
131
|
+
"sentiment_very_satisfied",
|
|
132
|
+
"settings",
|
|
133
|
+
"sms",
|
|
134
|
+
"south_east",
|
|
135
|
+
"star",
|
|
136
|
+
"support",
|
|
137
|
+
"thumb_down",
|
|
138
|
+
"thumb_up",
|
|
139
|
+
"today",
|
|
140
|
+
"translate",
|
|
141
|
+
"tune",
|
|
142
|
+
"undo",
|
|
143
|
+
"user_attributes",
|
|
144
|
+
"visibility",
|
|
145
|
+
"visibility_off",
|
|
146
|
+
"warning",
|
|
147
|
+
"zoom_in",
|
|
148
|
+
"zoom_out",
|
|
149
|
+
] satisfies IconNames[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Icon"
|