@kaizen/components 1.55.2 → 1.56.1
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/dist/cjs/BrandMoment/BrandMoment.cjs +1 -2
- package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +1 -2
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -7
- package/dist/cjs/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.cjs +1 -2
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.cjs +1 -1
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.cjs +1 -2
- package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +1 -2
- package/dist/cjs/Icon/subcomponents/SVG/SVG.cjs +3 -2
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +1 -2
- package/dist/cjs/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.cjs +1 -2
- package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +1 -2
- package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +1 -1
- package/dist/cjs/Pagination/subcomponents/PaginationLink/PaginationLink.cjs +1 -1
- package/dist/cjs/RichTextEditor/utils/core/createRichTextEditor.cjs +2 -1
- package/dist/cjs/SplitButton/SplitButton.cjs +1 -5
- package/dist/cjs/Tile/subcomponents/GenericTile/Action.cjs +1 -2
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +1 -2
- package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +1 -2
- package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +4 -7
- package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +3 -5
- package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +4 -7
- package/dist/cjs/TitleBlockZen/subcomponents/TitleBlockMenuItem.cjs +1 -5
- package/dist/cjs/{Button → __actions__/Button/v1}/GenericButton/GenericButton.cjs +6 -6
- package/dist/cjs/__actions__/Button/v1/GenericButton/GenericButton.module.scss.cjs +28 -0
- package/dist/cjs/__actions__/Button/v3/Button.cjs +28 -0
- package/dist/cjs/__actions__/Button/v3/Button.module.scss.cjs +9 -0
- package/dist/cjs/__actions__/Menu/v1/index.cjs +20 -0
- package/dist/cjs/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss.cjs +7 -0
- package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.cjs +1 -1
- package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.module.scss.cjs +1 -1
- package/dist/cjs/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss.cjs +12 -0
- package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.module.scss.cjs +1 -1
- package/dist/cjs/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss.cjs +6 -0
- package/dist/cjs/__actions__/Menu/v3/Menu.cjs +26 -0
- package/dist/cjs/__actions__/Menu/v3/Menu.module.scss.cjs +6 -0
- package/dist/cjs/__actions__/Menu/v3/MenuItem.cjs +30 -0
- package/dist/cjs/__actions__/Menu/v3/MenuItem.module.scss.cjs +7 -0
- package/dist/cjs/__actions__/Menu/v3/MenuTrigger.cjs +19 -0
- package/dist/cjs/actionsV1.cjs +12 -0
- package/dist/cjs/actionsV2.cjs +18 -0
- package/dist/cjs/actionsV3.cjs +10 -0
- package/dist/cjs/index.cjs +10 -14
- package/dist/esm/BrandMoment/BrandMoment.mjs +1 -2
- package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +1 -2
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -7
- package/dist/esm/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.mjs +1 -2
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/ListBoxSection/ListBoxSection.mjs +1 -1
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.mjs +1 -2
- package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +1 -2
- package/dist/esm/Icon/subcomponents/SVG/SVG.mjs +3 -2
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +1 -2
- package/dist/esm/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.mjs +1 -2
- package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +1 -2
- package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +1 -1
- package/dist/esm/Pagination/subcomponents/PaginationLink/PaginationLink.mjs +1 -1
- package/dist/esm/RichTextEditor/utils/core/createRichTextEditor.mjs +2 -1
- package/dist/esm/SplitButton/SplitButton.mjs +1 -5
- package/dist/esm/Tile/subcomponents/GenericTile/Action.mjs +1 -2
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +1 -2
- package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +1 -2
- package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +4 -7
- package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +3 -5
- package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +4 -7
- package/dist/esm/TitleBlockZen/subcomponents/TitleBlockMenuItem.mjs +1 -5
- package/dist/esm/{Button → __actions__/Button/v1}/GenericButton/GenericButton.mjs +6 -6
- package/dist/esm/__actions__/Button/v1/GenericButton/GenericButton.module.scss.mjs +26 -0
- package/dist/esm/__actions__/Button/v3/Button.mjs +20 -0
- package/dist/esm/__actions__/Button/v3/Button.module.scss.mjs +7 -0
- package/dist/esm/__actions__/Menu/v1/index.mjs +14 -0
- package/dist/esm/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss.mjs +5 -0
- package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.mjs +1 -1
- package/dist/esm/__actions__/Menu/v1/subcomponents/MenuHeading/MenuHeading.module.scss.mjs +4 -0
- package/dist/esm/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss.mjs +10 -0
- package/dist/esm/__actions__/Menu/v1/subcomponents/MenuList/MenuList.module.scss.mjs +4 -0
- package/dist/esm/__actions__/Menu/v1/subcomponents/StatelessMenu/StatelessMenu.module.scss.mjs +4 -0
- package/dist/esm/__actions__/Menu/v3/Menu.mjs +18 -0
- package/dist/esm/__actions__/Menu/v3/Menu.module.scss.mjs +4 -0
- package/dist/esm/__actions__/Menu/v3/MenuItem.mjs +22 -0
- package/dist/esm/__actions__/Menu/v3/MenuItem.module.scss.mjs +5 -0
- package/dist/esm/__actions__/Menu/v3/MenuTrigger.mjs +11 -0
- package/dist/esm/actionsV1.mjs +3 -0
- package/dist/esm/actionsV2.mjs +8 -0
- package/dist/esm/actionsV3.mjs +4 -0
- package/dist/esm/index.mjs +3 -7
- package/dist/styles.css +12 -9
- package/dist/types/BrandMoment/BrandMoment.d.ts +1 -1
- package/dist/types/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.d.ts +1 -1
- package/dist/types/GuidanceBlock/GuidanceBlock.d.ts +1 -1
- package/dist/types/Icon/subcomponents/SVG/SVG.d.ts +2 -1
- package/dist/types/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.d.ts +1 -1
- package/dist/types/Pagination/subcomponents/DirectionalLink/DirectionalLink.d.ts +1 -1
- package/dist/types/Pagination/subcomponents/PaginationLink/PaginationLink.d.ts +1 -1
- package/dist/types/Tile/subcomponents/GenericTile/GenericTile.d.ts +1 -1
- package/dist/types/TitleBlockZen/subcomponents/MobileActions.d.ts +1 -1
- package/dist/types/TitleBlockZen/subcomponents/Toolbar.d.ts +1 -2
- package/dist/types/TitleBlockZen/types.d.ts +1 -2
- package/dist/types/__actions__/Button/v2/Button/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v2/GenericButton/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v2/IconButton/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v2/index.d.ts +3 -0
- package/dist/types/__actions__/Button/v3/Button.d.ts +11 -0
- package/dist/types/__actions__/Button/v3/index.d.ts +1 -0
- package/dist/types/{Menu → __actions__/Menu/v1}/Menu.d.ts +1 -1
- package/dist/types/__actions__/Menu/v1/index.d.ts +30 -0
- package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.d.ts +1 -1
- package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.d.ts +1 -1
- package/dist/types/__actions__/Menu/v2/index.d.ts +6 -0
- package/dist/types/__actions__/Menu/v3/Menu.d.ts +7 -0
- package/dist/types/__actions__/Menu/v3/MenuItem.d.ts +17 -0
- package/dist/types/__actions__/Menu/v3/MenuTrigger.d.ts +6 -0
- package/dist/types/__actions__/Menu/v3/SubmenuTrigger.d.ts +8 -0
- package/dist/types/__actions__/Menu/v3/index.d.ts +3 -0
- package/dist/types/__actions__/v1.d.ts +2 -0
- package/dist/types/__actions__/v2.d.ts +2 -0
- package/dist/types/__actions__/v3.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/package.json +29 -29
- package/src/BrandMoment/BrandMoment.tsx +1 -1
- package/src/BrandMoment/_docs/ExampleHeaders.tsx +1 -1
- package/src/Collapsible/Collapsible/Collapsible.tsx +1 -1
- package/src/DatePicker/_docs/DatePicker.stories.tsx +1 -1
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +1 -1
- package/src/EmptyState/_docs/EmptyState.stories.tsx +1 -1
- package/src/ErrorPage/ErrorPage.spec.tsx +142 -0
- package/src/ErrorPage/_docs/ErrorPage.stickersheet.stories.tsx +8 -26
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +1 -2
- package/src/Filter/FilterBar/subcomponents/ClearAllButton/ClearAllButton.tsx +1 -1
- package/src/Filter/FilterMultiSelect/subcomponents/LoadMoreButton/LoadMoreButton.tsx +1 -1
- package/src/GuidanceBlock/GuidanceBlock.tsx +1 -1
- package/src/Icon/subcomponents/SVG/SVG.tsx +4 -1
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +1 -1
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +1 -1
- package/src/Modal/ContextModal/ContextModal.tsx +1 -1
- package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.tsx +1 -1
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +1 -1
- package/src/Modal/InputEditModal/InputEditModal.tsx +1 -1
- package/src/Notification/ToastNotification/_docs/ToastNotification.stories.tsx +1 -1
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +2 -2
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +4 -1
- package/src/Pagination/subcomponents/PaginationLink/PaginationLink.module.scss +2 -2
- package/src/Pagination/subcomponents/PaginationLink/PaginationLink.tsx +4 -1
- package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.stories.tsx +1 -1
- package/src/RichTextEditor/utils/core/createRichTextEditor.ts +3 -1
- package/src/SplitButton/SplitButton.spec.tsx +1 -1
- package/src/SplitButton/SplitButton.tsx +1 -1
- package/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx +1 -1
- package/src/SplitButton/_docs/SplitButton.stories.tsx +1 -1
- package/src/Tabs/_docs/Tabs.stories.tsx +1 -1
- package/src/Tile/subcomponents/GenericTile/Action.tsx +1 -1
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +2 -2
- package/src/TitleBlockZen/TitleBlockZen.tsx +1 -1
- package/src/TitleBlockZen/subcomponents/MainActions.tsx +1 -2
- package/src/TitleBlockZen/subcomponents/MobileActions.tsx +6 -2
- package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +1 -2
- package/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.tsx +1 -1
- package/src/TitleBlockZen/subcomponents/Toolbar.tsx +1 -2
- package/src/TitleBlockZen/types.ts +5 -2
- package/src/Workflow/_docs/Workflow.stories.tsx +1 -1
- package/src/Workflow/_docs/WorkflowFooter.stories.tsx +1 -1
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +1 -1
- package/src/Workflow/_docs/controls/controls.tsx +1 -1
- package/src/{Button → __actions__/Button/v1}/Button/Button.module.scss +1 -1
- package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.mdx +2 -2
- package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.stickersheet.stories.tsx +1 -1
- package/src/{Button → __actions__/Button/v1}/Button/_docs/Button.stories.tsx +1 -1
- package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.module.scss +2 -2
- package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.mdx +2 -2
- package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.stickersheet.stories.tsx +2 -2
- package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.stories.tsx +1 -1
- package/src/{Button → __actions__/Button/v1}/utils/_variables.scss +2 -2
- package/src/__actions__/Button/v2/Button/_docs/Button.mdx +98 -0
- package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +170 -0
- package/src/__actions__/Button/v2/Button/index.ts +1 -0
- package/src/__actions__/Button/v2/GenericButton/index.ts +1 -0
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.mdx +24 -0
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +37 -0
- package/src/__actions__/Button/v2/IconButton/index.ts +1 -0
- package/src/__actions__/Button/v2/index.ts +3 -0
- package/src/__actions__/Button/v3/Button.module.scss +104 -0
- package/src/__actions__/Button/v3/Button.tsx +44 -0
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +173 -0
- package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +76 -0
- package/src/__actions__/Button/v3/_docs/Button.mdx +41 -0
- package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +193 -0
- package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +135 -0
- package/src/__actions__/Button/v3/_docs/Button.stories.tsx +98 -0
- package/src/__actions__/Button/v3/index.ts +1 -0
- package/src/{Menu → __actions__/Menu/v1}/Menu.spec.tsx +1 -1
- package/src/{Menu → __actions__/Menu/v1}/Menu.tsx +1 -1
- package/src/__actions__/Menu/v1/_docs/Menu.mdx +29 -0
- package/src/{Menu → __actions__/Menu/v1}/_docs/Menu.stickersheet.stories.tsx +2 -2
- package/src/{Menu → __actions__/Menu/v1}/_docs/Menu.stories.tsx +2 -2
- package/src/{Menu → __actions__/Menu/v1}/_docs/examples.tsx +1 -1
- package/src/__actions__/Menu/v1/index.ts +35 -0
- package/src/{Menu → __actions__/Menu/v2}/_docs/Menu.mdx +2 -2
- package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +54 -0
- package/src/__actions__/Menu/v2/index.ts +6 -0
- package/src/__actions__/Menu/v3/Menu.module.scss +32 -0
- package/src/__actions__/Menu/v3/Menu.tsx +28 -0
- package/src/__actions__/Menu/v3/MenuItem.module.scss +34 -0
- package/src/__actions__/Menu/v3/MenuItem.tsx +32 -0
- package/src/__actions__/Menu/v3/MenuTrigger.tsx +14 -0
- package/src/__actions__/Menu/v3/SubmenuTrigger.tsx +18 -0
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +98 -0
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +280 -0
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +202 -0
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +269 -0
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +69 -0
- package/src/__actions__/Menu/v3/index.ts +3 -0
- package/src/__actions__/v1.ts +2 -0
- package/src/__actions__/v2.ts +2 -0
- package/src/__actions__/v3.ts +2 -0
- package/src/__future__/Workflow/_docs/Workflow.stories.tsx +1 -1
- package/src/__future__/Workflow/_docs/WorkflowFooter.stories.tsx +1 -1
- package/src/__future__/Workflow/_docs/WorkflowHeader.stories.tsx +1 -1
- package/src/__future__/Workflow/_docs/controls/controls.tsx +1 -1
- package/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx +1 -1
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +1 -1
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +1 -1
- package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.stories.tsx +1 -1
- package/src/index.ts +2 -2
- package/v1/actions/package.json +5 -0
- package/v2/actions/package.json +5 -0
- package/v3/actions/package.json +5 -0
- package/v3/utilities/package.json +5 -0
- package/dist/cjs/Button/GenericButton/GenericButton.module.scss.cjs +0 -28
- package/dist/cjs/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss.cjs +0 -7
- package/dist/cjs/Menu/subcomponents/MenuItem/MenuItem.module.scss.cjs +0 -12
- package/dist/cjs/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss.cjs +0 -6
- package/dist/esm/Button/GenericButton/GenericButton.module.scss.mjs +0 -26
- package/dist/esm/Menu/subcomponents/MenuDropdown/MenuDropdown.module.scss.mjs +0 -5
- package/dist/esm/Menu/subcomponents/MenuHeading/MenuHeading.module.scss.mjs +0 -4
- package/dist/esm/Menu/subcomponents/MenuItem/MenuItem.module.scss.mjs +0 -10
- package/dist/esm/Menu/subcomponents/MenuList/MenuList.module.scss.mjs +0 -4
- package/dist/esm/Menu/subcomponents/StatelessMenu/StatelessMenu.module.scss.mjs +0 -4
- package/dist/types/Menu/index.d.ts +0 -5
- package/src/Menu/index.ts +0 -5
- /package/dist/cjs/{Button → __actions__/Button/v1}/Button/Button.cjs +0 -0
- /package/dist/cjs/{Button → __actions__/Button/v1}/IconButton/IconButton.cjs +0 -0
- /package/dist/cjs/{Menu → __actions__/Menu/v1}/Menu.cjs +0 -0
- /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.cjs +0 -0
- /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.cjs +0 -0
- /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.cjs +0 -0
- /package/dist/cjs/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.cjs +0 -0
- /package/dist/esm/{Button → __actions__/Button/v1}/Button/Button.mjs +0 -0
- /package/dist/esm/{Button → __actions__/Button/v1}/IconButton/IconButton.mjs +0 -0
- /package/dist/esm/{Menu → __actions__/Menu/v1}/Menu.mjs +0 -0
- /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.mjs +0 -0
- /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.mjs +0 -0
- /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.mjs +0 -0
- /package/dist/esm/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.mjs +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/Button/Button.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/Button/index.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/GenericButton/GenericButton.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/GenericButton/index.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/IconButton/IconButton.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/IconButton/index.d.ts +0 -0
- /package/dist/types/{Button → __actions__/Button/v1}/index.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/_docs/MenuContentExample.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/_docs/examples.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/index.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/index.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/index.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/index.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.d.ts +0 -0
- /package/dist/types/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/index.d.ts +0 -0
- /package/src/{Button → __actions__/Button/v1}/Button/Button.tsx +0 -0
- /package/src/{Button → __actions__/Button/v1}/Button/index.ts +0 -0
- /package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.spec.tsx +0 -0
- /package/src/{Button → __actions__/Button/v1}/GenericButton/GenericButton.tsx +0 -0
- /package/src/{Button → __actions__/Button/v1}/GenericButton/index.ts +0 -0
- /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.module.scss +0 -0
- /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.spec.tsx +0 -0
- /package/src/{Button → __actions__/Button/v1}/IconButton/IconButton.tsx +0 -0
- /package/src/{Button → __actions__/Button/v1}/IconButton/index.ts +0 -0
- /package/src/{Button → __actions__/Button/v1}/index.ts +0 -0
- /package/src/{Button → __actions__/Button/v1}/utils/_mixins.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/_docs/MenuContentExample.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.module.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/MenuDropdown.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuDropdown/index.ts +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.module.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/MenuHeading.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuHeading/index.ts +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.module.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/MenuItem.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuItem/index.ts +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.module.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.spec.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/MenuList.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/MenuList/index.ts +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.module.scss +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/StatelessMenu.tsx +0 -0
- /package/src/{Menu → __actions__/Menu/v1}/subcomponents/StatelessMenu/index.ts +0 -0
|
@@ -5,7 +5,10 @@ import {
|
|
|
5
5
|
EndIcon,
|
|
6
6
|
StartIcon,
|
|
7
7
|
} from "~components/Icon"
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
GenericButton,
|
|
10
|
+
GenericProps,
|
|
11
|
+
} from "~components/__actions__/Button/v2/GenericButton"
|
|
9
12
|
|
|
10
13
|
export type DirectionalLinkProps = {
|
|
11
14
|
label: string
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@import "~@kaizen/design-tokens/sass/border";
|
|
3
3
|
@import "~@kaizen/design-tokens/sass/color";
|
|
4
4
|
@import "~@kaizen/design-tokens/sass/spacing";
|
|
5
|
-
@import "../../../Button/utils/mixins";
|
|
6
|
-
@import "../../../Button/utils/variables";
|
|
5
|
+
@import "../../../__actions__/Button/v1/utils/mixins";
|
|
6
|
+
@import "../../../__actions__/Button/v1/utils/variables";
|
|
7
7
|
|
|
8
8
|
%circle-button {
|
|
9
9
|
width: 40px;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
GenericProps,
|
|
4
|
+
GenericButton,
|
|
5
|
+
} from "~components/__actions__/Button/v2/GenericButton"
|
|
3
6
|
|
|
4
7
|
export type PaginationLinkProps = GenericProps & {
|
|
5
8
|
pageNumber: number
|
package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.stories.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { fn } from "@storybook/test"
|
|
4
|
-
import { Button } from "~components/
|
|
4
|
+
import { Button } from "~components/__actions__/v2"
|
|
5
5
|
import {
|
|
6
6
|
EditorContentArray,
|
|
7
7
|
RichTextEditor,
|
|
@@ -31,6 +31,8 @@ export const createRichTextEditor = ({
|
|
|
31
31
|
attributes,
|
|
32
32
|
isEditable = () => true,
|
|
33
33
|
}: EditorArgs): EditorAPI => {
|
|
34
|
+
let editorView: ProseMirrorEditorView | null = null
|
|
35
|
+
|
|
34
36
|
// Handle transactions eminating from the EditorView instance
|
|
35
37
|
const dispatch = (tx: Transaction): void => {
|
|
36
38
|
const newEditorState = editorView && editorView.state.apply(tx)
|
|
@@ -52,7 +54,7 @@ export const createRichTextEditor = ({
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
editorView = new ProseMirrorEditorView(node, {
|
|
56
58
|
state: initialEditorState,
|
|
57
59
|
dispatchTransaction: dispatchCommandOrTransaction,
|
|
58
60
|
attributes,
|
|
@@ -2,7 +2,7 @@ import React from "react"
|
|
|
2
2
|
import { screen, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
4
|
import { renderWithIntl } from "~tests"
|
|
5
|
-
import { MenuItem, MenuList } from "~components/
|
|
5
|
+
import { MenuItem, MenuList } from "~components/__actions__/v2"
|
|
6
6
|
import { SplitButton, SplitButtonProps } from "./SplitButton"
|
|
7
7
|
|
|
8
8
|
const user = userEvent.setup()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { Menu } from "~components/
|
|
3
|
+
import { Menu } from "~components/__actions__/v2"
|
|
4
4
|
import { DataAttributes } from "~types/DataAttributes"
|
|
5
5
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
6
6
|
import { ActionButton, ActionButtonProps } from "./subcomponents/ActionButton"
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
exampleActionButtonPropsButton,
|
|
5
5
|
exampleDropdownContentEnabled,
|
|
6
6
|
exampleDropdownContentOneDisabled,
|
|
7
|
-
} from "~components/Menu/_docs/examples"
|
|
7
|
+
} from "~components/__actions__/Menu/v1/_docs/examples"
|
|
8
8
|
import { SplitButton } from "../index"
|
|
9
9
|
|
|
10
10
|
const meta = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { Button } from "~components/Button"
|
|
4
3
|
import { Card } from "~components/Card"
|
|
5
4
|
import { Text } from "~components/Text"
|
|
5
|
+
import { Button } from "~components/__actions__/v2"
|
|
6
6
|
import { Tab, TabList, TabPanel, TabPanels, Tabs } from "../index"
|
|
7
7
|
|
|
8
8
|
const meta = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { HTMLAttributes, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { IconButton } from "~components/Button"
|
|
4
|
-
import { GenericButtonProps } from "~components/Button/GenericButton"
|
|
5
3
|
import { AllowedHeadingTags, Heading } from "~components/Heading"
|
|
6
4
|
import { ArrowBackwardIcon, InformationIcon } from "~components/Icon"
|
|
7
5
|
import { Text } from "~components/Text"
|
|
6
|
+
import { GenericButtonProps } from "~components/__actions__/Button/v1/GenericButton"
|
|
7
|
+
import { IconButton } from "~components/__actions__/v2"
|
|
8
8
|
import { OverrideClassName } from "~types/OverrideClassName"
|
|
9
9
|
import Action from "./Action"
|
|
10
10
|
import { Moods } from "./types"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { Avatar } from "~components/Avatar"
|
|
4
|
-
import { IconButton } from "~components/Button"
|
|
5
4
|
import { Heading } from "~components/Heading"
|
|
6
5
|
import { ArrowLeftIcon, ArrowRightIcon, HamburgerIcon } from "~components/Icon"
|
|
7
6
|
import { Select } from "~components/Select"
|
|
8
7
|
import { Tag } from "~components/Tag"
|
|
8
|
+
import { IconButton } from "~components/__actions__/v2"
|
|
9
9
|
import { useMediaQueries } from "~utils/useMediaQueries"
|
|
10
10
|
import { MainActions } from "./subcomponents/MainActions"
|
|
11
11
|
import { MobileActions } from "./subcomponents/MobileActions"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { Button, IconButton } from "~components/Button"
|
|
3
2
|
import { ChevronDownIcon, MeatballsIcon } from "~components/Icon"
|
|
4
|
-
import { Menu, MenuList } from "~components/
|
|
3
|
+
import { Menu, MenuList, Button, IconButton } from "~components/__actions__/v2"
|
|
5
4
|
import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from "../constants"
|
|
6
5
|
import {
|
|
7
6
|
DefaultActionProps,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { FocusOn } from "react-focus-on"
|
|
4
|
-
import { ButtonProps } from "~components/Button"
|
|
5
4
|
import { ChevronDownIcon, ChevronUpIcon } from "~components/Icon"
|
|
6
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
MenuItem,
|
|
7
|
+
MenuList,
|
|
8
|
+
MenuHeading,
|
|
9
|
+
ButtonProps,
|
|
10
|
+
} from "~components/__actions__/v2"
|
|
7
11
|
import { TITLE_BLOCK_ZEN_OTHER_ACTIONS_HTML_ID } from "../constants"
|
|
8
12
|
import {
|
|
9
13
|
DefaultActionProps,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { Button, IconButton } from "~components/Button"
|
|
3
2
|
import { ChevronDownIcon, MeatballsIcon } from "~components/Icon"
|
|
4
|
-
import { Menu, MenuList } from "~components/
|
|
3
|
+
import { Menu, MenuList, Button, IconButton } from "~components/__actions__/v2"
|
|
5
4
|
import styles from "../TitleBlockZen.module.scss"
|
|
6
5
|
import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from "../constants"
|
|
7
6
|
import { SecondaryActionsProps, TitleBlockMenuItemProps } from "../types"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import classnames from "classnames"
|
|
3
|
-
import { MenuItem } from "~components/
|
|
3
|
+
import { MenuItem } from "~components/__actions__/v2"
|
|
4
4
|
import { TitleBlockMenuItemProps } from "../types"
|
|
5
5
|
import styles from "./TitleBlockMenuItem.module.scss"
|
|
6
6
|
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from "react"
|
|
6
6
|
import classnames from "classnames"
|
|
7
|
-
import { ButtonProps } from "~components/
|
|
8
|
-
import { MenuProps } from "~components/Menu"
|
|
7
|
+
import { MenuProps, ButtonProps } from "~components/__actions__/v2"
|
|
9
8
|
import styles from "./Toolbar.module.scss"
|
|
10
9
|
|
|
11
10
|
type ToolbarProps = {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CompanyAvatarProps, GenericAvatarProps } from "~components/Avatar"
|
|
2
|
-
import { ButtonProps, CustomButtonProps } from "~components/Button"
|
|
3
|
-
import { MenuItemProps } from "~components/Menu"
|
|
4
2
|
import { Select } from "~components/Select"
|
|
3
|
+
import {
|
|
4
|
+
ButtonProps,
|
|
5
|
+
CustomButtonProps,
|
|
6
|
+
MenuItemProps,
|
|
7
|
+
} from "~components/__actions__/v2"
|
|
5
8
|
import { NavigationTabProps } from "./subcomponents/NavigationTabs"
|
|
6
9
|
|
|
7
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { Button } from "~components/Button"
|
|
4
3
|
import { CloseIcon, VisibleIcon } from "~components/Icon"
|
|
5
4
|
import { TextField } from "~components/TextField"
|
|
5
|
+
import { Button } from "~components/__actions__/v2"
|
|
6
6
|
import { Workflow } from "../"
|
|
7
7
|
import { WorkflowControls } from "./controls"
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { Button } from "~components/Button"
|
|
4
3
|
import { CloseIcon, VisibleIcon } from "~components/Icon"
|
|
4
|
+
import { Button } from "~components/__actions__/v2"
|
|
5
5
|
import { Workflow } from "../"
|
|
6
6
|
import { WorkflowControls } from "./controls"
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { ArgTypes } from "@storybook/react"
|
|
3
|
-
import { Button } from "~components/Button"
|
|
4
3
|
import { CloseIcon, VisibleIcon } from "~components/Icon"
|
|
4
|
+
import { Button } from "~components/__actions__/v2"
|
|
5
5
|
|
|
6
6
|
export const WorkflowControls: Partial<ArgTypes> = {
|
|
7
7
|
headerActions: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@import "~@kaizen/design-tokens/sass/color";
|
|
3
3
|
@import "~@kaizen/design-tokens/sass/border";
|
|
4
4
|
@import "~@kaizen/design-tokens/sass/typography";
|
|
5
|
-
@import "
|
|
5
|
+
@import "../../../../../styles/utils/button-reset";
|
|
6
6
|
@import "../utils/mixins";
|
|
7
7
|
@import "../utils/variables";
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@ import * as ButtonStories from "./Button.stories"
|
|
|
4
4
|
|
|
5
5
|
<Meta of={ButtonStories} />
|
|
6
6
|
|
|
7
|
-
# Button
|
|
7
|
+
# Button (v1)
|
|
8
8
|
|
|
9
9
|
<ResourceLinks
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Button/Button"
|
|
@@ -14,7 +14,7 @@ import * as ButtonStories from "./Button.stories"
|
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
<KAIOInstallation exportNames="Button" />
|
|
17
|
+
<KAIOInstallation exportNames="Button" family="actions" version="1" />
|
|
18
18
|
|
|
19
19
|
## Overview
|
|
20
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import "../utils/variables";
|
|
2
2
|
@import "../Button/Button.module";
|
|
3
3
|
@import "../IconButton/IconButton.module";
|
|
4
|
-
@import "
|
|
5
|
-
@import "
|
|
4
|
+
@import "../../../../Pagination/subcomponents/PaginationLink/PaginationLink.module";
|
|
5
|
+
@import "../../../../Pagination/subcomponents/DirectionalLink/DirectionalLink.module";
|
|
6
6
|
|
|
7
7
|
.container {
|
|
8
8
|
display: inline-block;
|
|
@@ -4,7 +4,7 @@ import * as IconButtonStories from "./IconButton.stories"
|
|
|
4
4
|
|
|
5
5
|
<Meta of={IconButtonStories} />
|
|
6
6
|
|
|
7
|
-
# IconButton
|
|
7
|
+
# IconButton (v1)
|
|
8
8
|
|
|
9
9
|
<ResourceLinks
|
|
10
10
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Button/IconButton"
|
|
@@ -13,7 +13,7 @@ import * as IconButtonStories from "./IconButton.stories"
|
|
|
13
13
|
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
|
-
<KAIOInstallation exportNames="IconButton" />
|
|
16
|
+
<KAIOInstallation exportNames="IconButton" family="actions" version="1" />
|
|
17
17
|
|
|
18
18
|
## Overview
|
|
19
19
|
|
package/src/{Button → __actions__/Button/v1}/IconButton/_docs/IconButton.stickersheet.stories.tsx
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import { ButtonProps } from "~components/Button"
|
|
4
3
|
import { FilterIcon, MeatballsIcon, TrashIcon } from "~components/Icon"
|
|
4
|
+
import { ButtonProps } from "~components/__actions__/v2"
|
|
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: "
|
|
12
|
+
title: "Actions/IconButton/v1",
|
|
13
13
|
parameters: {
|
|
14
14
|
chromatic: { disable: false },
|
|
15
15
|
controls: { disable: true },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "~@kaizen/design-tokens/sass/spacing";
|
|
2
2
|
@import "~@kaizen/design-tokens/sass/border";
|
|
3
|
-
@import "
|
|
4
|
-
@import "
|
|
3
|
+
@import "../../../../../styles/utils/legacy/color";
|
|
4
|
+
@import "../../../../../styles/utils/legacy/layout";
|
|
5
5
|
|
|
6
6
|
$button-height: $spacing-xl;
|
|
7
7
|
$button-small-height: calc(#{$spacing-md} * 5 / 3);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Canvas, Controls, Meta } from "@storybook/blocks"
|
|
2
|
+
import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
|
|
3
|
+
import * as ButtonStories from "./Button.stories"
|
|
4
|
+
|
|
5
|
+
<Meta of={ButtonStories} />
|
|
6
|
+
|
|
7
|
+
# Button (v2)
|
|
8
|
+
|
|
9
|
+
<ResourceLinks
|
|
10
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Button/Button"
|
|
11
|
+
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery"
|
|
12
|
+
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button"
|
|
13
|
+
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<KAIOInstallation exportNames="Button" family="actions" version="2" />
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
Buttons perform actions.
|
|
22
|
+
If it needs to navigate somewhere and can be opened in a new tab, use a link instead.
|
|
23
|
+
|
|
24
|
+
<Canvas of={ButtonStories.Playground} />
|
|
25
|
+
<Controls of={ButtonStories.Playground} />
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
### Variants
|
|
30
|
+
|
|
31
|
+
`Default`, `Primary`, `Destructive`, `Secondary`
|
|
32
|
+
If no `variant` is specified, a `Default` button will be rendered.
|
|
33
|
+
|
|
34
|
+
<Canvas of={ButtonStories.Variants} />
|
|
35
|
+
|
|
36
|
+
#### Reversed
|
|
37
|
+
|
|
38
|
+
<Canvas of={ButtonStories.Reversed} />
|
|
39
|
+
|
|
40
|
+
### Disabled
|
|
41
|
+
|
|
42
|
+
A disabled Button prevents user interaction. It doesn't appear in the tab order, can't receive focus, and may not read aloud by a screenreader.
|
|
43
|
+
|
|
44
|
+
<Canvas of={ButtonStories.Disabled} />
|
|
45
|
+
|
|
46
|
+
### Icon
|
|
47
|
+
|
|
48
|
+
Use any <LinkTo pageId="components-icons">Icon</LinkTo> component in the `icon` prop.
|
|
49
|
+
|
|
50
|
+
<Canvas of={ButtonStories.Icon} />
|
|
51
|
+
|
|
52
|
+
#### Icon position
|
|
53
|
+
|
|
54
|
+
Change the icon placement with the `iconPosition` prop.
|
|
55
|
+
Default position is `start`.
|
|
56
|
+
|
|
57
|
+
<Canvas of={ButtonStories.IconPosition} />
|
|
58
|
+
|
|
59
|
+
### Badge
|
|
60
|
+
|
|
61
|
+
You can display a `Badge` component within the button using the `badge` prop.
|
|
62
|
+
|
|
63
|
+
<Canvas of={ButtonStories.Badge} />
|
|
64
|
+
|
|
65
|
+
### Full width
|
|
66
|
+
|
|
67
|
+
Buttons can be stretched to fill the full width of their container.
|
|
68
|
+
|
|
69
|
+
<Canvas of={ButtonStories.FullWidth} />
|
|
70
|
+
|
|
71
|
+
### Working
|
|
72
|
+
|
|
73
|
+
The `working` prop should be used in situations where a button action triggers a change in UI state but needs to wait for a server response, such as submitting a form.
|
|
74
|
+
|
|
75
|
+
In conjuction use the `workingLabel` prop to update the label of the button when the working state is triggered.
|
|
76
|
+
|
|
77
|
+
Alternatively use the `workingLabelHidden` prop to hide the button label all together.
|
|
78
|
+
|
|
79
|
+
<Canvas of={ButtonStories.Working} />
|
|
80
|
+
|
|
81
|
+
### Controlling the working state
|
|
82
|
+
Here is an example of controlling whether the button is 'working' or not, using state.
|
|
83
|
+
|
|
84
|
+
<Canvas of={ButtonStories.ResolveWorking} />
|
|
85
|
+
|
|
86
|
+
### Loading
|
|
87
|
+
|
|
88
|
+
Use the <LinkTo pageId="components-loading-states-loadinginput">LoadingInput</LinkTo> component for button placeholders.
|
|
89
|
+
|
|
90
|
+
<Canvas of={ButtonStories.Loading} />
|
|
91
|
+
|
|
92
|
+
### Native `form` attribute
|
|
93
|
+
|
|
94
|
+
Button extends native HTML "form" attributes for `button`.
|
|
95
|
+
|
|
96
|
+
You can use this to submit a `form` using `Button` with a matching form id.
|
|
97
|
+
|
|
98
|
+
<Canvas of={ButtonStories.NativeFormButton} />
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import { StoryObj, Meta } from "@storybook/react"
|
|
3
|
+
import { ArrowForwardIcon, ArrowRightIcon } from "~components/Icon"
|
|
4
|
+
import { LoadingInput } from "~components/Loading"
|
|
5
|
+
import { TextField } from "~components/TextField"
|
|
6
|
+
import { Button } from "../index"
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Actions/Button/v2",
|
|
10
|
+
component: Button,
|
|
11
|
+
args: {
|
|
12
|
+
label: "Label",
|
|
13
|
+
},
|
|
14
|
+
} satisfies Meta<typeof Button>
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof meta>
|
|
19
|
+
|
|
20
|
+
export const Playground: Story = {
|
|
21
|
+
parameters: {
|
|
22
|
+
docs: {
|
|
23
|
+
canvas: {
|
|
24
|
+
sourceState: "shown",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const Variants: Story = {
|
|
31
|
+
render: ({ reversed }) => (
|
|
32
|
+
<>
|
|
33
|
+
<Button label="Default" reversed={reversed} />
|
|
34
|
+
<Button label="Primary" primary reversed={reversed} />
|
|
35
|
+
<Button label="Destructive" destructive reversed={reversed} />
|
|
36
|
+
<Button label="Secondary" secondary reversed={reversed} />
|
|
37
|
+
{!reversed && (
|
|
38
|
+
<Button label="Secondary Destructive" secondary destructive />
|
|
39
|
+
)}
|
|
40
|
+
</>
|
|
41
|
+
),
|
|
42
|
+
decorators: [
|
|
43
|
+
Story => (
|
|
44
|
+
<div style={{ display: "flex", gap: "1rem" }}>
|
|
45
|
+
<Story />
|
|
46
|
+
</div>
|
|
47
|
+
),
|
|
48
|
+
],
|
|
49
|
+
parameters: { controls: { disable: true } },
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const Reversed: Story = {
|
|
53
|
+
...Variants,
|
|
54
|
+
args: { reversed: true },
|
|
55
|
+
parameters: {
|
|
56
|
+
...Variants.parameters,
|
|
57
|
+
backgrounds: { default: "Purple 700" },
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Disabled: Story = {
|
|
62
|
+
args: { disabled: true },
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const sourceCodeIcon = `
|
|
66
|
+
import { Button, ArrowForwardIcon } from "@kaizen/components"
|
|
67
|
+
|
|
68
|
+
<Button label="Label" icon={<ArrowForwardIcon role="presentation" />} />
|
|
69
|
+
`
|
|
70
|
+
|
|
71
|
+
export const Icon: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
icon: <ArrowForwardIcon role="presentation" />,
|
|
74
|
+
},
|
|
75
|
+
parameters: {
|
|
76
|
+
docs: { source: { code: sourceCodeIcon } },
|
|
77
|
+
},
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const IconPosition: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
icon: <ArrowRightIcon role="presentation" />,
|
|
83
|
+
iconPosition: "end",
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const Badge: Story = {
|
|
88
|
+
args: {
|
|
89
|
+
badge: { text: "3", variant: "active" },
|
|
90
|
+
secondary: true,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const FullWidth: Story = {
|
|
95
|
+
args: { fullWidth: true },
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export const Working: Story = {
|
|
99
|
+
render: () => (
|
|
100
|
+
<>
|
|
101
|
+
<Button label="Label" working workingLabel="Submitting" />
|
|
102
|
+
<Button
|
|
103
|
+
label="Label"
|
|
104
|
+
working
|
|
105
|
+
workingLabel="Submitting"
|
|
106
|
+
workingLabelHidden
|
|
107
|
+
/>
|
|
108
|
+
</>
|
|
109
|
+
),
|
|
110
|
+
decorators: [
|
|
111
|
+
Story => (
|
|
112
|
+
<div style={{ display: "flex", gap: "1rem" }}>
|
|
113
|
+
<Story />
|
|
114
|
+
</div>
|
|
115
|
+
),
|
|
116
|
+
],
|
|
117
|
+
parameters: { controls: { disable: true } },
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const Loading: Story = {
|
|
121
|
+
render: () => <LoadingInput isAnimated width={13} />,
|
|
122
|
+
parameters: { controls: { disable: true } },
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const NativeFormButton: Story = {
|
|
126
|
+
render: () => (
|
|
127
|
+
<>
|
|
128
|
+
<form className="mb-6" id="unique-form-id">
|
|
129
|
+
<TextField labelText="Sample text field" defaultValue="content" />
|
|
130
|
+
</form>
|
|
131
|
+
<Button
|
|
132
|
+
label="Submit"
|
|
133
|
+
type="submit"
|
|
134
|
+
form="unique-form-id"
|
|
135
|
+
formTarget="_blank"
|
|
136
|
+
formAction="/"
|
|
137
|
+
formMethod="get"
|
|
138
|
+
formEncType="text/plain"
|
|
139
|
+
formNoValidate={false}
|
|
140
|
+
/>
|
|
141
|
+
</>
|
|
142
|
+
),
|
|
143
|
+
parameters: { controls: { disable: true } },
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export const ResolveWorking: Story = {
|
|
147
|
+
render: () => {
|
|
148
|
+
const [state, setState] = useState<"Ready" | "Working" | "Completed">(
|
|
149
|
+
"Ready"
|
|
150
|
+
)
|
|
151
|
+
const handleClick = (): void => {
|
|
152
|
+
if (state === "Ready") {
|
|
153
|
+
setState("Working")
|
|
154
|
+
setTimeout(() => setState("Completed"), 3000)
|
|
155
|
+
} else {
|
|
156
|
+
setState("Ready")
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<Button
|
|
162
|
+
label={state}
|
|
163
|
+
working={state === "Working"}
|
|
164
|
+
workingLabel="Button is doing some work"
|
|
165
|
+
workingLabelHidden
|
|
166
|
+
onClick={handleClick}
|
|
167
|
+
/>
|
|
168
|
+
)
|
|
169
|
+
},
|
|
170
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../v1/Button"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../v1/GenericButton"
|