@kaizen/components 1.68.7 → 1.68.8

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.
Files changed (127) hide show
  1. package/codemods/README.md +2 -1
  2. package/dist/cjs/__overlays__/Tooltip/v3/Tooltip.cjs +1 -1
  3. package/dist/esm/__overlays__/Tooltip/v3/Tooltip.mjs +1 -1
  4. package/dist/styles.css +62 -62
  5. package/dist/types/__overlays__/Tooltip/v3/Tooltip.d.ts +1 -1
  6. package/package.json +25 -25
  7. package/src/Avatar/_docs/Avatar.mdx +3 -4
  8. package/src/AvatarGroup/_docs/AvatarGroup.mdx +3 -3
  9. package/src/Badge/_docs/Badge.mdx +3 -3
  10. package/src/Brand/_docs/Brand.mdx +3 -4
  11. package/src/BrandMoment/_docs/BrandMoment.mdx +3 -3
  12. package/src/ButtonGroup/_docs/ButtonGroup.mdx +3 -3
  13. package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +3 -3
  14. package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +3 -3
  15. package/src/Card/_docs/Card.mdx +5 -4
  16. package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +4 -5
  17. package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +5 -3
  18. package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +4 -3
  19. package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +3 -3
  20. package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +8 -7
  21. package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +3 -3
  22. package/src/Container/_docs/Container.mdx +6 -4
  23. package/src/Content/_docs/Content.mdx +6 -4
  24. package/src/DatePicker/_docs/DatePicker.mdx +3 -3
  25. package/src/DateRangePicker/_docs/DateRangePicker.mdx +3 -4
  26. package/src/Divider/_docs/Divider.mdx +3 -3
  27. package/src/EmptyState/_docs/EmptyState.mdx +3 -3
  28. package/src/ErrorPage/_docs/ErrorPage.mdx +3 -3
  29. package/src/FieldGroup/_docs/FieldGroup.mdx +6 -4
  30. package/src/FieldMessage/_docs/FieldMessage.mdx +3 -4
  31. package/src/Filter/Filter/_docs/Filter.mdx +13 -14
  32. package/src/Filter/FilterBar/_docs/FilterBar.mdx +49 -48
  33. package/src/Filter/FilterButton/_docs/filter-buttons.mdx +5 -5
  34. package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +8 -3
  35. package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +9 -3
  36. package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +90 -39
  37. package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx +1 -0
  38. package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +4 -4
  39. package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +3 -3
  40. package/src/Heading/_docs/Heading.mdx +4 -4
  41. package/src/Icon/_docs/Icon.mdx +5 -7
  42. package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +10 -3
  43. package/src/Illustration/Scene/_docs/Scene.mdx +5 -8
  44. package/src/Illustration/Spot/_docs/Spot.mdx +4 -4
  45. package/src/Input/Input/_docs/Input.mdx +8 -4
  46. package/src/Input/InputRange/_docs/InputRange.mdx +3 -3
  47. package/src/Input/InputSearch/_docs/InputSearch.mdx +4 -3
  48. package/src/KaizenProvider/_docs/KaizenProvider.mdx +9 -9
  49. package/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx +10 -11
  50. package/src/Label/_docs/Label.mdx +9 -3
  51. package/src/LabelledMessage/_docs/LabelledMessage.mdx +3 -3
  52. package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +3 -3
  53. package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +5 -5
  54. package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +3 -3
  55. package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +3 -3
  56. package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +3 -3
  57. package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +3 -4
  58. package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +3 -3
  59. package/src/Modal/ContextModal/_docs/ContextModal.mdx +6 -3
  60. package/src/Modal/GenericModal/_docs/GenericModal.mdx +5 -4
  61. package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +3 -4
  62. package/src/MultiSelect/_docs/MultiSelect.mdx +3 -4
  63. package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +3 -3
  64. package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +3 -4
  65. package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +3 -3
  66. package/src/Pagination/_docs/Pagination.mdx +3 -3
  67. package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +3 -3
  68. package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +3 -3
  69. package/src/Popover/_docs/Popover.mdx +12 -10
  70. package/src/ProgressBar/_docs/ProgressBar.mdx +3 -4
  71. package/src/Radio/Radio/_docs/Radio.mdx +4 -4
  72. package/src/Radio/RadioField/_docs/RadioField.mdx +3 -3
  73. package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +3 -3
  74. package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +7 -10
  75. package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +3 -5
  76. package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +7 -9
  77. package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +3 -3
  78. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +3 -3
  79. package/src/SearchField/_docs/SearchField.mdx +3 -3
  80. package/src/Select/_docs/Select.mdx +7 -3
  81. package/src/Skirt/_docs/Skirt.mdx +4 -4
  82. package/src/Slider/_docs/Slider.mdx +3 -3
  83. package/src/SplitButton/_docs/SplitButton.mdx +4 -3
  84. package/src/Table/_docs/Table.mdx +19 -6
  85. package/src/Tabs/_docs/Tabs.mdx +4 -7
  86. package/src/Tag/_docs/Tag.mdx +16 -5
  87. package/src/Text/_docs/Text.mdx +3 -3
  88. package/src/TextArea/_docs/TextArea.mdx +5 -4
  89. package/src/TextAreaField/_docs/TextAreaField.mdx +9 -4
  90. package/src/TextField/_docs/TextField.mdx +9 -4
  91. package/src/Tile/InformationTile/_docs/InformationTile.mdx +5 -4
  92. package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +5 -3
  93. package/src/Tile/TileGrid/_docs/TileGrid.mdx +3 -3
  94. package/src/TimeField/_docs/TimeField.mdx +3 -3
  95. package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +5 -3
  96. package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +3 -3
  97. package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +3 -3
  98. package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +6 -4
  99. package/src/Well/_docs/Well.mdx +5 -5
  100. package/src/Workflow/_docs/ProgressStepper.mdx +3 -3
  101. package/src/Workflow/_docs/Workflow.mdx +25 -19
  102. package/src/Workflow/_docs/WorkflowFooter.mdx +3 -3
  103. package/src/Workflow/_docs/WorkflowHeader.mdx +3 -3
  104. package/src/__actions__/Button/v1/Button/_docs/Button.mdx +4 -4
  105. package/src/__actions__/Button/v1/IconButton/_docs/IconButton.mdx +3 -3
  106. package/src/__actions__/Button/v2/Button/_docs/Button.mdx +4 -4
  107. package/src/__actions__/Button/v2/IconButton/_docs/IconButton.mdx +3 -3
  108. package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +49 -17
  109. package/src/__actions__/Button/v3/_docs/Button--usage-guidelines.mdx +8 -6
  110. package/src/__actions__/Menu/v1/_docs/Menu.mdx +3 -4
  111. package/src/__actions__/Menu/v2/_docs/Menu.mdx +8 -4
  112. package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +35 -24
  113. package/src/__actions__/Menu/v3/_docs/Menu.mdx +52 -39
  114. package/src/__future__/Icon/_docs/Icon--api-specification.mdx +17 -10
  115. package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +5 -4
  116. package/src/__future__/Select/_docs/Select.mdx +9 -5
  117. package/src/__future__/Tabs/_docs/Tabs--api-specification.mdx +4 -8
  118. package/src/__future__/Tabs/_docs/Tabs--migration-guide.mdx +11 -4
  119. package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.mdx +4 -6
  120. package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.mdx +12 -20
  121. package/src/__future__/Tag/Tag/_docs/Tag.mdx +3 -4
  122. package/src/__overlays__/Focusable/v3/_docs/ApiSpecification.mdx +14 -13
  123. package/src/__overlays__/Tooltip/v1/_docs/Tooltip.mdx +5 -7
  124. package/src/__overlays__/Tooltip/v2/_docs/Tooltip.mdx +5 -6
  125. package/src/__overlays__/Tooltip/v3/Tooltip.tsx +3 -2
  126. package/src/__overlays__/Tooltip/v3/_docs/ApiSpecification.mdx +50 -46
  127. package/src/__overlays__/Tooltip/v3/_docs/Tooltip.mdx +63 -48
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as TileGridStories from "./TileGrid.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as TileGridStories from './TileGrid.stories'
4
4
 
5
5
  <Meta of={TileGridStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as TimeFieldStories from "./TimeField.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as TimeFieldStories from './TimeField.stories'
4
4
 
5
5
  <Meta of={TimeFieldStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as TitleBlockZenStories from "./TitleBlockZen.stories"
1
+ import { Canvas, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as TitleBlockZenStories from './TitleBlockZen.stories'
4
4
 
5
5
  <Meta of={TitleBlockZenStories} />
6
6
 
@@ -48,6 +48,7 @@ in the dropdown menu when you click it. (`MenuItemProps` is a type imported from
48
48
  ## secondaryActions & secondaryOverflowMenuItems
49
49
 
50
50
  Secondary Actions sit below the Primary Actions, and consist of
51
+
51
52
  - actions/links (just a button),
52
53
  - menus (a menu button), and
53
54
  - the overflow menu (a menu button with a "meatballs" icon).
@@ -70,5 +71,6 @@ Each object can be a MenuGroup (see code snippet for `primaryAction` above) or a
70
71
  ```
71
72
  type SecondaryActionsProps = Array<MenuGroup | TitleBlockButtonProps>;
72
73
  ```
74
+
73
75
  The order of elements in the array will determine the visual order on the page, so
74
76
  please be aware of the intended order mentioned above.
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
3
- import * as ToggleSwitchStories from "./ToggleSwitch.stories"
1
+ import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
3
+ import * as ToggleSwitchStories from './ToggleSwitch.stories'
4
4
 
5
5
  <Meta of={ToggleSwitchStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as ToggleSwitchFieldStories from "./ToggleSwitchField.stories"
1
+ import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as ToggleSwitchFieldStories from './ToggleSwitchField.stories'
4
4
 
5
5
  <Meta of={ToggleSwitchFieldStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as VisuallyHiddenStories from "./VisuallyHidden.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as VisuallyHiddenStories from './VisuallyHidden.stories'
4
4
 
5
5
  <Meta of={VisuallyHiddenStories} />
6
6
 
@@ -31,5 +31,7 @@ Visual users can see the name of the survey to the left of the link, but screen
31
31
  The context can be added like so:
32
32
 
33
33
  ```jsx
34
- <a href="/path">View report<VisuallyHidden> for Camper Check-in 2023</VisuallyHidden></a>
34
+ <a href="/path">
35
+ View report<VisuallyHidden> for Camper Check-in 2023</VisuallyHidden>
36
+ </a>
35
37
  ```
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as WellStories from "./Well.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as WellStories from './Well.stories'
4
4
 
5
5
  <Meta of={WellStories} />
6
6
 
@@ -32,10 +32,10 @@ All `variant`s have a corresponding `color` value, with some minor update to ens
32
32
 
33
33
  <Canvas of={WellStories.Colors} />
34
34
 
35
-
36
35
  ### Border Styles
36
+
37
37
  <Canvas of={WellStories.BorderStyles} />
38
38
 
39
39
  ### No Margin
40
- <Canvas of={WellStories.NoMargin} />
41
40
 
41
+ <Canvas of={WellStories.NoMargin} />
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
2
- import { Installation, ResourceLinks } from "~storybook/components"
3
- import * as ProgressStepperStories from "./ProgressStepper.stories"
1
+ import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
2
+ import { Installation, ResourceLinks } from '~storybook/components'
3
+ import * as ProgressStepperStories from './ProgressStepper.stories'
4
4
 
5
5
  <Meta of={ProgressStepperStories} />
6
6
 
@@ -1,8 +1,8 @@
1
- import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
2
- import { Installation, ResourceLinks } from "~storybook/components"
3
- import * as Workflow from "./Workflow.stories"
4
- import * as WorkflowFooter from "./WorkflowFooter.stories"
5
- import * as WorkflowHeader from "./WorkflowHeader.stories"
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks'
2
+ import { Installation, ResourceLinks } from '~storybook/components'
3
+ import * as Workflow from './Workflow.stories'
4
+ import * as WorkflowFooter from './WorkflowFooter.stories'
5
+ import * as WorkflowHeader from './WorkflowHeader.stories'
6
6
 
7
7
  <Meta of={Workflow} />
8
8
 
@@ -30,14 +30,15 @@ To ensure at readability at 400% zoom (See WCAG's [Reflow criteria](https://www.
30
30
 
31
31
  ## Header actions
32
32
 
33
- The `headerActions` prop takes array of JSX elements that will render in the top right of the `Header` component.
33
+ The `headerActions` prop takes array of JSX elements that will render in the top right of the `Header` component.
34
34
 
35
35
  While the number of JSX elements is not limited, is important to consider the real estate in the `Header` and how larger strings or components may be rendered on smaller screen sizes.
36
36
 
37
37
  <Canvas
38
38
  layout="fullscreen"
39
39
  of={WorkflowHeader.MultipleActions}
40
- source={{code: `<Workflow
40
+ source={{
41
+ code: `<Workflow
41
42
  headerActions={[
42
43
  <Button
43
44
  key="would-use-uui-1"
@@ -57,10 +58,10 @@ While the number of JSX elements is not limited, is important to consider the re
57
58
  {...otherProps}
58
59
  >
59
60
  <MockContent />
60
- </Workflow>`}}
61
+ </Workflow>`,
62
+ }}
61
63
  />
62
64
 
63
-
64
65
  ## Handling a Workflow exit
65
66
 
66
67
  A common pattern identified is a Workflow Exit button. An implementation of this component should be passed to the `headerActions` an array to handle a user leaving a Workflow. We've provided an example below that combines a Kaizen `Button` with the `ConfirmationModal` component.
@@ -68,7 +69,8 @@ A common pattern identified is a Workflow Exit button. An implementation of this
68
69
  <Canvas
69
70
  layout="fullscreen"
70
71
  of={WorkflowHeader.Playground}
71
- source={{code: `
72
+ source={{
73
+ code: `
72
74
  const [showModal, setShowModal] = useState<boolean>(false)
73
75
  ...
74
76
  return (
@@ -97,7 +99,7 @@ A common pattern identified is a Workflow Exit button. An implementation of this
97
99
  </div>
98
100
  </ConfirmationModal>
99
101
  </>
100
- )`
102
+ )`,
101
103
  }}
102
104
  />
103
105
 
@@ -108,7 +110,8 @@ The Footer tracks the progress of the form by using finding the index of the `cu
108
110
  <Canvas
109
111
  layout="fullscreen"
110
112
  of={WorkflowFooter.FirstStep}
111
- source={{code: `<Workflow
113
+ source={{
114
+ code: `<Workflow
112
115
  currentStepId="settings-step"
113
116
  steps={[
114
117
  { label: "Settings", id: "settings-step" },
@@ -120,24 +123,26 @@ The Footer tracks the progress of the form by using finding the index of the `cu
120
123
  {...otherProps}
121
124
  >
122
125
  <MockContent />
123
- </Workflow>`}}
126
+ </Workflow>`,
127
+ }}
124
128
  />
125
129
 
126
130
  The Footer is agnostic to the JSX elements that are used in the `previousAction` and `nextAction`. While we recommend using the Kaizen Button, a button-like component can be used in its place to satisfy project-specific requirements.
127
131
 
128
-
129
132
  To hide, disable or change the appearance of the Footer buttons you can leverage the props available for the `@kaizen/button` or pass in undefined to not render the component.
130
133
 
131
134
  <Canvas
132
135
  layout="fullscreen"
133
136
  of={WorkflowFooter.LastStep}
134
- source={{code: `<Workflow
137
+ source={{
138
+ code: `<Workflow
135
139
  nextAction={<Button disabled label="Finish" primary />}
136
140
  previousAction={<Button label="Back" />}
137
141
  {...otherProps}
138
142
  >
139
143
  <MockContent />
140
- </Workflow>`}}
144
+ </Workflow>`,
145
+ }}
141
146
  />
142
147
 
143
148
  In Instances where users are returning to a completed workflow you can pass the `isComplete` prop to set the indicators to their "complete" status. This will also be reflected in their Aria title.
@@ -145,12 +150,14 @@ In Instances where users are returning to a completed workflow you can pass the
145
150
  <Canvas
146
151
  layout="fullscreen"
147
152
  of={WorkflowFooter.AllStepsComplete}
148
- source={{code: `<Workflow
153
+ source={{
154
+ code: `<Workflow
149
155
  isComplete
150
156
  {...otherProps}
151
157
  >
152
158
  <MockContent />
153
- </Workflow>`}}
159
+ </Workflow>`,
160
+ }}
154
161
  />
155
162
 
156
163
  ## Composable Worflow
@@ -159,7 +166,6 @@ While we do not advise this path, a composable Workflow may be created if requir
159
166
 
160
167
  <Canvas layout="fullscreen" of={Workflow.ComposableWorkflow} />
161
168
 
162
-
163
169
  ## Worflow API at a glance
164
170
 
165
171
  <ArgTypes of={Workflow.Playground} />
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
2
- import { Installation, ResourceLinks } from "~storybook/components"
3
- import * as WorkflowFooterStories from "./WorkflowFooter.stories"
1
+ import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
2
+ import { Installation, ResourceLinks } from '~storybook/components'
3
+ import * as WorkflowFooterStories from './WorkflowFooter.stories'
4
4
 
5
5
  <Meta of={WorkflowFooterStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
2
- import { Installation, ResourceLinks } from "~storybook/components"
3
- import * as WorkflowHeaderStories from "./WorkflowHeader.stories"
1
+ import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
2
+ import { Installation, ResourceLinks } from '~storybook/components'
3
+ import * as WorkflowHeaderStories from './WorkflowHeader.stories'
4
4
 
5
5
  <Meta of={WorkflowHeaderStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
3
- import * as ButtonStories from "./Button.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
3
+ import * as ButtonStories from './Button.stories'
4
4
 
5
5
  <Meta of={ButtonStories} />
6
6
 
@@ -13,7 +13,6 @@ import * as ButtonStories from "./Button.stories"
13
13
 
14
14
  />
15
15
 
16
-
17
16
  <KAIOInstallation exportNames="Button" family="actions" version="1" />
18
17
 
19
18
  ## Overview
@@ -79,6 +78,7 @@ Alternatively use the `workingLabelHidden` prop to hide the button label all tog
79
78
  <Canvas of={ButtonStories.Working} />
80
79
 
81
80
  ### Controlling the working state
81
+
82
82
  Here is an example of controlling whether the button is 'working' or not, using state.
83
83
 
84
84
  <Canvas of={ButtonStories.ResolveWorking} />
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
3
- import * as IconButtonStories from "./IconButton.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
3
+ import * as IconButtonStories from './IconButton.stories'
4
4
 
5
5
  <Meta of={IconButtonStories} />
6
6
 
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
3
- import * as ButtonStories from "./Button.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
3
+ import * as ButtonStories from './Button.stories'
4
4
 
5
5
  <Meta of={ButtonStories} />
6
6
 
@@ -13,7 +13,6 @@ import * as ButtonStories from "./Button.stories"
13
13
 
14
14
  />
15
15
 
16
-
17
16
  <KAIOInstallation exportNames="Button" family="actions" version="2" />
18
17
 
19
18
  ## Overview
@@ -79,6 +78,7 @@ Alternatively use the `workingLabelHidden` prop to hide the button label all tog
79
78
  <Canvas of={ButtonStories.Working} />
80
79
 
81
80
  ### Controlling the working state
81
+
82
82
  Here is an example of controlling whether the button is 'working' or not, using state.
83
83
 
84
84
  <Canvas of={ButtonStories.ResolveWorking} />
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
3
- import * as IconButtonStories from "./IconButton.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
3
+ import * as IconButtonStories from './IconButton.stories'
4
4
 
5
5
  <Meta of={IconButtonStories} />
6
6
 
@@ -1,7 +1,7 @@
1
- import { Canvas, Meta, Controls, ArgTypes, DocsStory } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as exampleStories from "./Button.docs.stories"
4
- import * as specStories from "./Button.spec.stories"
1
+ import { Canvas, Meta, Controls, ArgTypes, DocsStory } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as exampleStories from './Button.docs.stories'
4
+ import * as specStories from './Button.spec.stories'
5
5
 
6
6
  <Meta title="Actions/Button/Button (v3)/API Specification" />
7
7
 
@@ -15,7 +15,7 @@ Updated Nov 19, 2024
15
15
  designGuidelines="/?path=/docs/actions-button-button-v3-usage-guidelines--docs"
16
16
  />
17
17
 
18
- <KAIOInstallation exportNames={["Button" ]} family="actions" version="3" />
18
+ <KAIOInstallation exportNames={['Button']} family="actions" version="3" />
19
19
 
20
20
  ## Overview
21
21
 
@@ -25,7 +25,26 @@ The following example and table showcases the essential props that enable the co
25
25
 
26
26
  <Canvas of={exampleStories.Playground} />
27
27
 
28
- <Controls of={exampleStories.Playground} className="mb-64" include={["children", "hasHiddenLabel", "className", "size", "variant", "isReversed", "onPress", "icon", "iconPosition", "isFullWidth", "isDisabled", "isPending","pendingLabel", "hasHiddenPendingLabel" ]} />
28
+ <Controls
29
+ of={exampleStories.Playground}
30
+ className="mb-64"
31
+ include={[
32
+ 'children',
33
+ 'hasHiddenLabel',
34
+ 'className',
35
+ 'size',
36
+ 'variant',
37
+ 'isReversed',
38
+ 'onPress',
39
+ 'icon',
40
+ 'iconPosition',
41
+ 'isFullWidth',
42
+ 'isDisabled',
43
+ 'isPending',
44
+ 'pendingLabel',
45
+ 'hasHiddenPendingLabel',
46
+ ]}
47
+ />
29
48
 
30
49
  ## Buttons and links
31
50
 
@@ -50,8 +69,8 @@ Reversed variants are handled via the `ReversedColors` Provider.
50
69
  To enable the reversed theme, you will need to wrap the component or application in the `ReversedColors` provider, ie:
51
70
 
52
71
  ```tsx
53
- import { Button } from "@kaizen/components/v3/actions"
54
- import { ReversedColors } from "@kaizen/components/v3/utilities"
72
+ import { Button } from '@kaizen/components/v3/actions'
73
+ import { ReversedColors } from '@kaizen/components/v3/utilities'
55
74
  // application code
56
75
 
57
76
  return (
@@ -74,15 +93,13 @@ One key change to the `Button`&apos;s API is the shift from `onClick` to React A
74
93
  Functionally this does not change the way we pass actions into `Button`. Consumers can safely replace `onClick` with `onPress` without any additional changes, ie:
75
94
 
76
95
  ```tsx
77
- <Button label="Submit" onClick={e => sumbit(e)}/>
96
+ <Button label="Submit" onClick={(e) => sumbit(e)} />
78
97
  ```
79
98
 
80
99
  Can safely be replaced with the following:
81
100
 
82
101
  ```tsx
83
- <Button onPress={e => submit(e)}>
84
- Submit
85
- </Button>
102
+ <Button onPress={(e) => submit(e)}>Submit</Button>
86
103
  ```
87
104
 
88
105
  ### Button content and children
@@ -90,7 +107,7 @@ Can safely be replaced with the following:
90
107
  Labels and any button content can be passed into the `Button` as `children`. Content wrapped by the `Button` will be spaced evenly relative to the `size` prop.
91
108
 
92
109
  ```tsx
93
- <Button variant="secondary" onPress={e => submit(e)}>
110
+ <Button variant="secondary" onPress={(e) => submit(e)}>
94
111
  Label
95
112
  </Button>
96
113
  ```
@@ -107,12 +124,11 @@ Set the position of the icon using the `iconPosition` prop. This will ensure con
107
124
 
108
125
  <Canvas of={exampleStories.ButtonWithIconEnd} />
109
126
 
110
-
111
127
  ### Icon-only `Button` and `hasHiddenLabel`
112
128
 
113
129
  To achieve an icon-only `Button` (previously: `IconButton`) use the `icon` prop and set `hasHiddenLabel` to `true`. This will visually hide the button's `children` and `pendingLabel`, while still announcing the content to screen readers.
114
130
 
115
- <Canvas of={exampleStories.IconButton} className="mb-32" />
131
+ <Canvas of={exampleStories.IconButton} className="mb-32" />
116
132
 
117
133
  This pattern ensures that the `Button`'s accessible name is determined by its children, which helps to announce relevant content to the screen readers, as with the [pending state](#pending-state). You can learn more about this [accessible pattern here](https://cultureamp.atlassian.net/wiki/spaces/PA/pages/3833331831/Accessible+button+and+link+labels).
118
134
 
@@ -132,7 +148,6 @@ As mentioned in the [previous section](#icon-only-button-and-hashiddenlabel), an
132
148
 
133
149
  <Canvas of={specStories.PendingIconButton} />
134
150
 
135
-
136
151
  ### Full width Buttons
137
152
 
138
153
  If a button is statically the full width of a container you can use the `isFullWidth` property.
@@ -147,4 +162,21 @@ The following table is a collection of additional React Aria and native HTML pro
147
162
 
148
163
  You can learn more about React Aria's Button API and advance configuration options [here](https://react-spectrum.adobe.com/react-aria/Button.html#props).
149
164
 
150
- <ArgTypes of={exampleStories.Playground} exclude={["children", "hasHiddenLabel", "className", "size", "variant", "onPress", "icon", "iconPosition", "isFullWidth", "isDisabled", "isPending", "pendingLabel", "hasHiddenPendingLabel" ]} />
165
+ <ArgTypes
166
+ of={exampleStories.Playground}
167
+ exclude={[
168
+ 'children',
169
+ 'hasHiddenLabel',
170
+ 'className',
171
+ 'size',
172
+ 'variant',
173
+ 'onPress',
174
+ 'icon',
175
+ 'iconPosition',
176
+ 'isFullWidth',
177
+ 'isDisabled',
178
+ 'isPending',
179
+ 'pendingLabel',
180
+ 'hasHiddenPendingLabel',
181
+ ]}
182
+ />
@@ -1,6 +1,6 @@
1
- import { Canvas, Meta, Controls } from "@storybook/blocks"
2
- import { ResourceLinks, Installation } from "~storybook/components"
3
- import * as Button from "./Button.docs.stories"
1
+ import { Canvas, Meta, Controls } from '@storybook/blocks'
2
+ import { ResourceLinks, Installation } from '~storybook/components'
3
+ import * as Button from './Button.docs.stories'
4
4
 
5
5
  <Meta title="Actions/Button/Button (v3)/Usage Guidelines" />
6
6
 
@@ -25,6 +25,8 @@ Buttons allow users to perform an action. They have multiple styles for various
25
25
 
26
26
  <Canvas of={Button.Playground} />
27
27
 
28
- <Controls of={Button.Playground} include={["children", "variant", "size", "isDisabled", "icon", "iconPosition"]} className="mb-64" />
29
-
30
-
28
+ <Controls
29
+ of={Button.Playground}
30
+ include={['children', 'variant', 'size', 'isDisabled', 'icon', 'iconPosition']}
31
+ className="mb-64"
32
+ />
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, Installation } from "~storybook/components"
3
- import * as MenuStories from "./Menu.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, Installation } from '~storybook/components'
3
+ import * as MenuStories from './Menu.stories'
4
4
 
5
5
  <Meta of={MenuStories} />
6
6
 
@@ -26,4 +26,3 @@ A menu contains links to places or button actions. It does NOT show a selected i
26
26
 
27
27
  <Canvas of={MenuStories.Playground} />
28
28
  <Controls of={MenuStories.Playground} />
29
-
@@ -1,6 +1,6 @@
1
- import { Canvas, Controls, Meta } from "@storybook/blocks"
2
- import { ResourceLinks, KAIOInstallation } from "~storybook/components"
3
- import * as MenuStories from "./Menu.stories"
1
+ import { Canvas, Controls, Meta } from '@storybook/blocks'
2
+ import { ResourceLinks, KAIOInstallation } from '~storybook/components'
3
+ import * as MenuStories from './Menu.stories'
4
4
 
5
5
  <Meta of={MenuStories} />
6
6
 
@@ -13,7 +13,11 @@ import * as MenuStories from "./Menu.stories"
13
13
 
14
14
  />
15
15
 
16
- <KAIOInstallation exportNames={["Menu", "MenuDropdown", "MenuList", "MenuItem"]} family="actions" version="2" />
16
+ <KAIOInstallation
17
+ exportNames={['Menu', 'MenuDropdown', 'MenuList', 'MenuItem']}
18
+ family="actions"
19
+ version="2"
20
+ />
17
21
 
18
22
  ## Overview
19
23