@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.
- package/codemods/README.md +2 -1
- package/dist/cjs/__overlays__/Tooltip/v3/Tooltip.cjs +1 -1
- package/dist/esm/__overlays__/Tooltip/v3/Tooltip.mjs +1 -1
- package/dist/styles.css +62 -62
- package/dist/types/__overlays__/Tooltip/v3/Tooltip.d.ts +1 -1
- package/package.json +25 -25
- package/src/Avatar/_docs/Avatar.mdx +3 -4
- package/src/AvatarGroup/_docs/AvatarGroup.mdx +3 -3
- package/src/Badge/_docs/Badge.mdx +3 -3
- package/src/Brand/_docs/Brand.mdx +3 -4
- package/src/BrandMoment/_docs/BrandMoment.mdx +3 -3
- package/src/ButtonGroup/_docs/ButtonGroup.mdx +3 -3
- package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +3 -3
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +3 -3
- package/src/Card/_docs/Card.mdx +5 -4
- package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +4 -5
- package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +5 -3
- package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +4 -3
- package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +3 -3
- package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +8 -7
- package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +3 -3
- package/src/Container/_docs/Container.mdx +6 -4
- package/src/Content/_docs/Content.mdx +6 -4
- package/src/DatePicker/_docs/DatePicker.mdx +3 -3
- package/src/DateRangePicker/_docs/DateRangePicker.mdx +3 -4
- package/src/Divider/_docs/Divider.mdx +3 -3
- package/src/EmptyState/_docs/EmptyState.mdx +3 -3
- package/src/ErrorPage/_docs/ErrorPage.mdx +3 -3
- package/src/FieldGroup/_docs/FieldGroup.mdx +6 -4
- package/src/FieldMessage/_docs/FieldMessage.mdx +3 -4
- package/src/Filter/Filter/_docs/Filter.mdx +13 -14
- package/src/Filter/FilterBar/_docs/FilterBar.mdx +49 -48
- package/src/Filter/FilterButton/_docs/filter-buttons.mdx +5 -5
- package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +8 -3
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +9 -3
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +90 -39
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx +1 -0
- package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +4 -4
- package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +3 -3
- package/src/Heading/_docs/Heading.mdx +4 -4
- package/src/Icon/_docs/Icon.mdx +5 -7
- package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +10 -3
- package/src/Illustration/Scene/_docs/Scene.mdx +5 -8
- package/src/Illustration/Spot/_docs/Spot.mdx +4 -4
- package/src/Input/Input/_docs/Input.mdx +8 -4
- package/src/Input/InputRange/_docs/InputRange.mdx +3 -3
- package/src/Input/InputSearch/_docs/InputSearch.mdx +4 -3
- package/src/KaizenProvider/_docs/KaizenProvider.mdx +9 -9
- package/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx +10 -11
- package/src/Label/_docs/Label.mdx +9 -3
- package/src/LabelledMessage/_docs/LabelledMessage.mdx +3 -3
- package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +3 -3
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +5 -5
- package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +3 -3
- package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +3 -3
- package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +3 -3
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +3 -4
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +3 -3
- package/src/Modal/ContextModal/_docs/ContextModal.mdx +6 -3
- package/src/Modal/GenericModal/_docs/GenericModal.mdx +5 -4
- package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +3 -4
- package/src/MultiSelect/_docs/MultiSelect.mdx +3 -4
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +3 -3
- package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +3 -4
- package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +3 -3
- package/src/Pagination/_docs/Pagination.mdx +3 -3
- package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +3 -3
- package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +3 -3
- package/src/Popover/_docs/Popover.mdx +12 -10
- package/src/ProgressBar/_docs/ProgressBar.mdx +3 -4
- package/src/Radio/Radio/_docs/Radio.mdx +4 -4
- package/src/Radio/RadioField/_docs/RadioField.mdx +3 -3
- package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +3 -3
- package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +7 -10
- package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +3 -5
- package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +7 -9
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +3 -3
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +3 -3
- package/src/SearchField/_docs/SearchField.mdx +3 -3
- package/src/Select/_docs/Select.mdx +7 -3
- package/src/Skirt/_docs/Skirt.mdx +4 -4
- package/src/Slider/_docs/Slider.mdx +3 -3
- package/src/SplitButton/_docs/SplitButton.mdx +4 -3
- package/src/Table/_docs/Table.mdx +19 -6
- package/src/Tabs/_docs/Tabs.mdx +4 -7
- package/src/Tag/_docs/Tag.mdx +16 -5
- package/src/Text/_docs/Text.mdx +3 -3
- package/src/TextArea/_docs/TextArea.mdx +5 -4
- package/src/TextAreaField/_docs/TextAreaField.mdx +9 -4
- package/src/TextField/_docs/TextField.mdx +9 -4
- package/src/Tile/InformationTile/_docs/InformationTile.mdx +5 -4
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +5 -3
- package/src/Tile/TileGrid/_docs/TileGrid.mdx +3 -3
- package/src/TimeField/_docs/TimeField.mdx +3 -3
- package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +5 -3
- package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +3 -3
- package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +3 -3
- package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +6 -4
- package/src/Well/_docs/Well.mdx +5 -5
- package/src/Workflow/_docs/ProgressStepper.mdx +3 -3
- package/src/Workflow/_docs/Workflow.mdx +25 -19
- package/src/Workflow/_docs/WorkflowFooter.mdx +3 -3
- package/src/Workflow/_docs/WorkflowHeader.mdx +3 -3
- package/src/__actions__/Button/v1/Button/_docs/Button.mdx +4 -4
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.mdx +3 -3
- package/src/__actions__/Button/v2/Button/_docs/Button.mdx +4 -4
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.mdx +3 -3
- package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +49 -17
- package/src/__actions__/Button/v3/_docs/Button--usage-guidelines.mdx +8 -6
- package/src/__actions__/Menu/v1/_docs/Menu.mdx +3 -4
- package/src/__actions__/Menu/v2/_docs/Menu.mdx +8 -4
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +35 -24
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +52 -39
- package/src/__future__/Icon/_docs/Icon--api-specification.mdx +17 -10
- package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +5 -4
- package/src/__future__/Select/_docs/Select.mdx +9 -5
- package/src/__future__/Tabs/_docs/Tabs--api-specification.mdx +4 -8
- package/src/__future__/Tabs/_docs/Tabs--migration-guide.mdx +11 -4
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.mdx +4 -6
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.mdx +12 -20
- package/src/__future__/Tag/Tag/_docs/Tag.mdx +3 -4
- package/src/__overlays__/Focusable/v3/_docs/ApiSpecification.mdx +14 -13
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.mdx +5 -7
- package/src/__overlays__/Tooltip/v2/_docs/Tooltip.mdx +5 -6
- package/src/__overlays__/Tooltip/v3/Tooltip.tsx +3 -2
- package/src/__overlays__/Tooltip/v3/_docs/ApiSpecification.mdx +50 -46
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.mdx +63 -48
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as PopoverStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as PopoverStories from './Popover.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={PopoverStories} />
|
|
6
6
|
|
|
@@ -30,12 +30,14 @@ User can interact with popover content, including selecting text or clicking lin
|
|
|
30
30
|
```jsx
|
|
31
31
|
const [referenceElementRef, Popover] = usePopover()
|
|
32
32
|
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
<button type="button" ref={referenceElementRef}>
|
|
36
|
+
Hello world
|
|
37
|
+
</button>
|
|
38
|
+
<Popover>Hello world</Popover>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
The purpose of this hook is to abstract away some of the awkwardness with the
|
|
@@ -43,4 +45,4 @@ requirement of passing in refs with popper. We need to use `useState` instead
|
|
|
43
45
|
of `useRef`, which may not be immediately intuitive.
|
|
44
46
|
|
|
45
47
|
The popper documentation to help provide more context:
|
|
46
|
-
|
|
48
|
+
https://popper.js.org/react-popper/v2/hook/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, DocsStory, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as ProgressBarStories from
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as ProgressBarStories from './ProgressBar.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={ProgressBarStories} />
|
|
6
6
|
|
|
@@ -46,5 +46,4 @@ While `value` and `max` can be used to represent progress as either a percentage
|
|
|
46
46
|
|
|
47
47
|
Due to the optional `label` prop, the progress bar does not have an accessible name. You can provide context for assistive technologies with aria attributes such as `aria-label` or `aria-labelledby`.
|
|
48
48
|
|
|
49
|
-
|
|
50
49
|
<Canvas of={ProgressBarStories.AccessibleName} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import { LinkTo } from
|
|
4
|
-
import * as RadioStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import { LinkTo } from '~storybook/components/LinkTo'
|
|
4
|
+
import * as RadioStories from './Radio.stories'
|
|
5
5
|
|
|
6
6
|
<Meta of={RadioStories} />
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as RadioFieldStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as RadioFieldStories from './RadioField.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={RadioFieldStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as RadioGroupStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as RadioGroupStories from './RadioGroup.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={RadioGroupStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as EditableRichTextContentStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as EditableRichTextContentStories from './EditableRichTextContent.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={EditableRichTextContentStories} />
|
|
6
6
|
|
|
@@ -26,12 +26,11 @@ The `EditableRichTextContent` indicates interactivity similar to a `text` or `te
|
|
|
26
26
|
|
|
27
27
|
This differs from the [RichTextContent](/docs/components-richtexteditor-richtextcontent--docs) component, which is used to render `RichTextEditor` content as read-only text.
|
|
28
28
|
|
|
29
|
-
|
|
30
29
|
```tsx
|
|
31
|
-
const [editMode, setEditMode] = useState<boolean>(false)
|
|
32
|
-
const [rteData, setRTEData] = useState<EditorContentArray>([])
|
|
30
|
+
const [editMode, setEditMode] = useState<boolean>(false)
|
|
31
|
+
const [rteData, setRTEData] = useState<EditorContentArray>([])
|
|
33
32
|
|
|
34
|
-
const handleOnChange: RichTextEditorProps[
|
|
33
|
+
const handleOnChange: RichTextEditorProps['onChange'] = (editorState) =>
|
|
35
34
|
setRTEData(editorState.toJSON().doc.content)
|
|
36
35
|
|
|
37
36
|
if (editMode) {
|
|
@@ -43,9 +42,7 @@ if (editMode) {
|
|
|
43
42
|
)
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
return (
|
|
47
|
-
<EditableRichTextContent content={rteData} onClick={() => setEditMode(true)} />
|
|
48
|
-
)
|
|
45
|
+
return <EditableRichTextContent content={rteData} onClick={() => setEditMode(true)} />
|
|
49
46
|
```
|
|
50
47
|
|
|
51
48
|
<Canvas of={EditableRichTextContentStories.UsageExample} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as RichTextContentStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as RichTextContentStories from './RichTextContent.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={RichTextContentStories} />
|
|
6
6
|
|
|
@@ -20,7 +20,6 @@ To render rich content as it appears in the [RichTextEditor](/docs/components-ri
|
|
|
20
20
|
<Canvas of={RichTextContentStories.Playground} />
|
|
21
21
|
<Controls of={RichTextContentStories.Playground} />
|
|
22
22
|
|
|
23
|
-
|
|
24
23
|
## Usage
|
|
25
24
|
|
|
26
25
|
A common use case of `RichTextContent` is to display user generated output as read-only text.
|
|
@@ -28,4 +27,3 @@ A common use case of `RichTextContent` is to display user generated output as re
|
|
|
28
27
|
<Canvas of={RichTextContentStories.ReadOnly} />
|
|
29
28
|
|
|
30
29
|
This should not be used out of the box to toggle between active and inactive states of the `RichTextEditor`. Instead we recommend using the [EditableRichTextContent](/docs/components-richtexteditor-editablerichtextcontent--docs#usage) pattern, which indicates interactivity to the user and ensures compliance with WCAG guidelines.
|
|
31
|
-
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Canvas, Controls, DocsStory, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as EditableRichTextContentStories from
|
|
4
|
-
import * as RichTextContentStories from
|
|
5
|
-
import * as RichTextEditorStories from
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as EditableRichTextContentStories from '../../EditableRichTextContent/_docs/EditableRichTextContent.stories'
|
|
4
|
+
import * as RichTextContentStories from '../../RichTextContent/_docs/RichTextContent.stories'
|
|
5
|
+
import * as RichTextEditorStories from './RichTextEditor.stories'
|
|
6
6
|
|
|
7
7
|
<Meta of={RichTextEditorStories} />
|
|
8
8
|
|
|
@@ -40,7 +40,6 @@ With all controls, the Kaizen `RichTextEditor` can create and render formatted t
|
|
|
40
40
|
|
|
41
41
|
<Canvas of={RichTextEditorStories.AllAvailableContent} />
|
|
42
42
|
|
|
43
|
-
|
|
44
43
|
### The EditorContentArray and defaultValue
|
|
45
44
|
|
|
46
45
|
The `defaultValue` is the initial content of the `RichTextEditor`. It accepts an array of objects in the [ProseMirror's rich text format](https://cultureamp.atlassian.net/wiki/spaces/TV/pages/3380543671/ProseMirror+rich+formatted+text+data+format).
|
|
@@ -64,13 +63,14 @@ For example: if your `defaultValue` contains bolded text, you must pass bold int
|
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
### Data errors and onDataError
|
|
66
|
+
|
|
67
67
|
When content is passed to the `defaultValue` that does not match to the `RichTextEditor`'s [schema](https://github.com/cultureamp/kaizen-design-system/blob/main/packages/components/src/RichTextEditor/RichTextEditor/schema.ts), the component will throw and render a generic error.
|
|
68
68
|
|
|
69
69
|
<Canvas of={RichTextEditorStories.MalformedContent} />
|
|
70
70
|
|
|
71
71
|
This will also throw if you have passed in an `EditorContentArray` that contains data that cannot map to the `controls` provided to the component.
|
|
72
72
|
|
|
73
|
-
<Canvas of={RichTextEditorStories.IncorrectDataForControls}/>
|
|
73
|
+
<Canvas of={RichTextEditorStories.IncorrectDataForControls} />
|
|
74
74
|
|
|
75
75
|
The `dataError` React Node and `onDataError` callback also allows you to handle these edge cases without breaking the page.
|
|
76
76
|
|
|
@@ -84,7 +84,6 @@ Sets the minimum height for the editable area of the RichTextEditor.
|
|
|
84
84
|
|
|
85
85
|
<DocsStory of={RichTextEditorStories.Validation} />
|
|
86
86
|
|
|
87
|
-
|
|
88
87
|
### Inactive states and read-only text
|
|
89
88
|
|
|
90
89
|
In addition to the `RichTextEditor`, there are two additional Kaizen components that support rendering data in the RTE format.
|
|
@@ -100,4 +99,3 @@ For rendering editable content that can toggle between an active and inactive st
|
|
|
100
99
|
For rendering content as read-only text we recommend using the [RichTextContent](/docs/components-richtexteditor-richtextcontent--docs).
|
|
101
100
|
|
|
102
101
|
<Canvas of={RichTextContentStories.Playground} />
|
|
103
|
-
|
package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as ToggleIconButtonStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as ToggleIconButtonStories from './ToggleIconButton.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={ToggleIconButtonStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as ToolbarStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as ToolbarStories from './Toolbar.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={ToolbarStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as SearchFieldStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as SearchFieldStories from './SearchField.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={SearchFieldStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as SelectStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as SelectStories from './Select.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={SelectStories} />
|
|
6
6
|
|
|
@@ -27,15 +27,19 @@ A select lets you choose options from an option menu. A single-select lets you c
|
|
|
27
27
|
## API
|
|
28
28
|
|
|
29
29
|
### Multi Select
|
|
30
|
+
|
|
30
31
|
<Canvas of={SelectStories.MultiSelect} />
|
|
31
32
|
|
|
32
33
|
### Grouped options
|
|
34
|
+
|
|
33
35
|
<Canvas of={SelectStories.Grouped} />
|
|
34
36
|
|
|
35
37
|
### Disabling options
|
|
38
|
+
|
|
36
39
|
Adding the `isDisabled: true` key to your option object will disabled the item and prevent it from being selected.
|
|
37
40
|
|
|
38
41
|
<Canvas of={SelectStories.Disabled} />
|
|
39
42
|
|
|
40
43
|
### Async
|
|
44
|
+
|
|
41
45
|
<Canvas of={SelectStories.Async} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as SkirtStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as SkirtStories from './Skirt.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={SkirtStories} />
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ import * as SkirtStories from "./Skirt.stories"
|
|
|
13
13
|
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
|
-
<KAIOInstallation exportNames={[
|
|
16
|
+
<KAIOInstallation exportNames={['Skirt', 'SkirtCard']} />
|
|
17
17
|
|
|
18
18
|
## Overview
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as SliderStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as SliderStories from './Slider.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={SliderStories} />
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, DocsStory, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation, LinkTo } from
|
|
3
|
-
import * as SplitButtonStories from
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
|
|
3
|
+
import * as SplitButtonStories from './SplitButton.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={SplitButtonStories} />
|
|
6
6
|
|
|
@@ -35,6 +35,7 @@ Disable both buttons with `disabled`.
|
|
|
35
35
|
#### Disabled MenuItem
|
|
36
36
|
|
|
37
37
|
If you only want to disable an option within the dropdown, add `disabled` to the
|
|
38
|
+
|
|
38
39
|
<LinkTo pageId="components-menu">MenuItem</LinkTo> instead of SplitButton.
|
|
39
40
|
|
|
40
41
|
<Canvas of={SplitButtonStories.DisabledMenuItem} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as TableStories from
|
|
1
|
+
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as TableStories from './Table.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={TableStories} />
|
|
6
6
|
|
|
@@ -14,7 +14,15 @@ import * as TableStories from "./Table.stories"
|
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
16
|
<KAIOInstallation
|
|
17
|
-
exportNames={[
|
|
17
|
+
exportNames={[
|
|
18
|
+
'TableCard',
|
|
19
|
+
'TableContainer',
|
|
20
|
+
'TableHeader',
|
|
21
|
+
'TableHeaderRow',
|
|
22
|
+
'TableHeaderRowCell',
|
|
23
|
+
'TableRow',
|
|
24
|
+
'TableRowCell',
|
|
25
|
+
]}
|
|
18
26
|
/>
|
|
19
27
|
|
|
20
28
|
## Overview
|
|
@@ -30,17 +38,21 @@ A table displays rows of data, including all data in a set, making it efficient
|
|
|
30
38
|
Controls the spacing in each cell within the table. Options available are `compact`, `default` and `data`.
|
|
31
39
|
|
|
32
40
|
#### Compact
|
|
41
|
+
|
|
33
42
|
<Canvas of={TableStories.Data} />
|
|
34
43
|
|
|
35
44
|
#### Default
|
|
45
|
+
|
|
36
46
|
<Canvas of={TableStories.Default} />
|
|
37
47
|
|
|
38
48
|
#### Data
|
|
49
|
+
|
|
39
50
|
<Canvas of={TableStories.Data} />
|
|
40
51
|
|
|
41
52
|
## TableHeaderRowCell API
|
|
42
53
|
|
|
43
54
|
### Sorting
|
|
55
|
+
|
|
44
56
|
<Canvas of={TableStories.Sorting} />
|
|
45
57
|
|
|
46
58
|
### Checkbox
|
|
@@ -56,6 +68,7 @@ When using providing `icon` to `TableHeaderRowCell` the `labelText` will be pass
|
|
|
56
68
|
<Canvas of={TableStories.IconVariant} />
|
|
57
69
|
|
|
58
70
|
### Align and wrapping
|
|
71
|
+
|
|
59
72
|
<Canvas of={TableStories.HeaderAlignmentAndWrapping} />
|
|
60
73
|
|
|
61
74
|
### Tooltips
|
|
@@ -67,11 +80,13 @@ While Tooltip content can be passed to any table header via the `tooltipInfo` pr
|
|
|
67
80
|
You can read more about the Tooltip component and accessibility limitation [here](https://cultureamp.design/?path=/docs/components-tooltip--docs#screen-reader-accessibility).
|
|
68
81
|
|
|
69
82
|
### Reversed
|
|
83
|
+
|
|
70
84
|
<Canvas of={TableStories.Reversed} />
|
|
71
85
|
|
|
72
86
|
## TableCard API
|
|
73
87
|
|
|
74
88
|
### Link
|
|
89
|
+
|
|
75
90
|
<Canvas of={TableStories.LinkVariant} />
|
|
76
91
|
|
|
77
92
|
### Expandable
|
|
@@ -79,5 +94,3 @@ You can read more about the Tooltip component and accessibility limitation [here
|
|
|
79
94
|
The `expandable` prop introduces known accessibility issues with nesting interactive elements as children of a `button` or `anchor` tag. We recommend avoiding this pattern if possible, or creating a tier 3 component that adheres to correct WCAG hierarchy.
|
|
80
95
|
|
|
81
96
|
<Canvas of={TableStories.Expandable} />
|
|
82
|
-
|
|
83
|
-
|
package/src/Tabs/_docs/Tabs.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as TabsStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as TabsStories from './Tabs.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={TabsStories} />
|
|
6
6
|
|
|
@@ -13,13 +13,10 @@ import * as TabsStories from "./Tabs.stories"
|
|
|
13
13
|
|
|
14
14
|
/>
|
|
15
15
|
|
|
16
|
-
<KAIOInstallation
|
|
17
|
-
exportNames={["Tabs", "TabList", "Tab", "TabPanels", "TabPanel"]}
|
|
18
|
-
/>
|
|
16
|
+
<KAIOInstallation exportNames={['Tabs', 'TabList', 'Tab', 'TabPanels', 'TabPanel']} />
|
|
19
17
|
|
|
20
18
|
## Overview
|
|
21
19
|
|
|
22
|
-
|
|
23
20
|
<Canvas of={TabsStories.Playground} />
|
|
24
21
|
<Controls of={TabsStories.Playground} />
|
|
25
22
|
|
package/src/Tag/_docs/Tag.mdx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Canvas, Controls
|
|
2
|
-
import { InlineNotification } from
|
|
3
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
4
|
-
import * as TagStories from
|
|
1
|
+
import { Canvas, Controls, Meta, Unstyled } from '@storybook/blocks'
|
|
2
|
+
import { InlineNotification } from '~components/Notification'
|
|
3
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
4
|
+
import * as TagStories from './Tag.stories'
|
|
5
5
|
|
|
6
6
|
<Meta of={TagStories} />
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ import * as TagStories from "./Tag.stories"
|
|
|
17
17
|
<Unstyled>
|
|
18
18
|
<InlineNotification type="cautionary" persistent>
|
|
19
19
|
{`This version of the Tag will soon be deprecated and will be removed in the next major release.
|
|
20
|
-
Import Tag from "@kaizen/components/future" for the latest version and veiw our migration guide in the Future folder`
|
|
20
|
+
Import Tag from "@kaizen/components/future" for the latest version and veiw our migration guide in the Future folder`}
|
|
21
21
|
</InlineNotification>
|
|
22
22
|
</Unstyled>
|
|
23
23
|
|
|
@@ -33,48 +33,59 @@ Tags help users quickly recognize important information about items that organiz
|
|
|
33
33
|
## API
|
|
34
34
|
|
|
35
35
|
### Variants
|
|
36
|
+
|
|
36
37
|
We have 3 different sets of combinations for various uses.
|
|
37
38
|
|
|
38
39
|
#### Status
|
|
40
|
+
|
|
39
41
|
Use status tags to show the status of surveys, reports, action plans, and performance feedback.
|
|
40
42
|
|
|
41
43
|
<Canvas of={TagStories.Status} />
|
|
42
44
|
|
|
43
45
|
#### Validation
|
|
46
|
+
|
|
44
47
|
Use validation tags for indicating the validation state such as the Cautionary style for cautioning users that the item has a validation warning that could be addressed.
|
|
45
48
|
|
|
46
49
|
<Canvas of={TagStories.Validation} />
|
|
47
50
|
|
|
48
51
|
#### Sentiments
|
|
52
|
+
|
|
49
53
|
Use sentiment tags only for sentiment or other employee feedback data.
|
|
50
54
|
|
|
51
55
|
<Canvas of={TagStories.Sentiments} />
|
|
52
56
|
|
|
53
57
|
### Sizes
|
|
58
|
+
|
|
54
59
|
**Note:** Icons and Avatars are not supported in `small` sizes.
|
|
55
60
|
|
|
56
61
|
<Canvas of={TagStories.Sizes} />
|
|
57
62
|
|
|
58
63
|
### Avatar
|
|
64
|
+
|
|
59
65
|
An Avatar can be added in two ways, either by importing the `<Avatar />` component and passing it in, or you can use the Avatar's props.
|
|
60
66
|
|
|
61
67
|
**Note:** Avatar are not supported in `small` sizes.
|
|
62
68
|
|
|
63
69
|
#### Import Avatar
|
|
70
|
+
|
|
64
71
|
<Canvas of={TagStories.ProfileWithAvatarImport} />
|
|
65
72
|
|
|
66
73
|
#### Avatar props
|
|
74
|
+
|
|
67
75
|
<Canvas of={TagStories.ProfileWithAvatarProps} />
|
|
68
76
|
|
|
69
77
|
### Dismissable
|
|
78
|
+
|
|
70
79
|
<Canvas of={TagStories.Dismissible} />
|
|
71
80
|
|
|
72
81
|
### TruncateWidth
|
|
82
|
+
|
|
73
83
|
A pixel width which sets a limit for when the text starts to truncate.
|
|
74
84
|
|
|
75
85
|
<Canvas of={TagStories.Truncate} />
|
|
76
86
|
|
|
77
87
|
### Inline
|
|
88
|
+
|
|
78
89
|
Removes the default right-hand margin.
|
|
79
90
|
|
|
80
91
|
<Canvas of={TagStories.Inline} />
|
package/src/Text/_docs/Text.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as TextStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as TextStories from './Text.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={TextStories} />
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import { LinkTo } from
|
|
4
|
-
import * as TextAreaStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import { LinkTo } from '~storybook/components/LinkTo'
|
|
4
|
+
import * as TextAreaStories from './TextArea.stories'
|
|
5
5
|
|
|
6
6
|
<Meta of={TextAreaStories} />
|
|
7
7
|
|
|
@@ -37,6 +37,7 @@ You can use our <LinkTo pageId="components-label">Label</LinkTo> component
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### Connecting a custom element
|
|
40
|
+
|
|
40
41
|
For linking text that isn't in a `Label` you can use `aria-labelledBy`
|
|
41
42
|
|
|
42
43
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as TextAreaFieldStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as TextAreaFieldStories from './TextAreaField.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={TextAreaFieldStories} />
|
|
6
6
|
|
|
@@ -25,18 +25,23 @@ A text area includes a label and a longer area you can type multiple lines of te
|
|
|
25
25
|
## API
|
|
26
26
|
|
|
27
27
|
### Variant
|
|
28
|
+
|
|
28
29
|
<Canvas of={TextAreaFieldStories.Variant} />
|
|
29
30
|
|
|
30
31
|
### Autogrow
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
Autogrow expands the textarea as the user's typing exceeds the minimum height of the text area.
|
|
32
34
|
|
|
33
35
|
<Canvas of={TextAreaFieldStories.Autogrow} />
|
|
34
36
|
|
|
35
37
|
### Description
|
|
38
|
+
|
|
36
39
|
<Canvas of={TextAreaFieldStories.Description} />
|
|
37
40
|
|
|
38
41
|
### Validation
|
|
42
|
+
|
|
39
43
|
<Canvas of={TextAreaFieldStories.Validation} />
|
|
40
44
|
|
|
41
45
|
### Reversed
|
|
46
|
+
|
|
42
47
|
<Canvas of={TextAreaFieldStories.Reversed} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import { LinkTo } from
|
|
4
|
-
import * as TextFieldStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import { LinkTo } from '~storybook/components/LinkTo'
|
|
4
|
+
import * as TextFieldStories from './TextField.stories'
|
|
5
5
|
|
|
6
6
|
<Meta of={TextFieldStories} />
|
|
7
7
|
|
|
@@ -28,16 +28,21 @@ Composed of <LinkTo pageId="components-label">Label</LinkTo>, <LinkTo pageId="co
|
|
|
28
28
|
## API
|
|
29
29
|
|
|
30
30
|
### Types
|
|
31
|
+
|
|
31
32
|
<Canvas of={TextFieldStories.Types} />
|
|
32
33
|
|
|
33
34
|
### Description
|
|
35
|
+
|
|
34
36
|
<Canvas of={TextFieldStories.Description} />
|
|
35
37
|
|
|
36
38
|
### Icon
|
|
39
|
+
|
|
37
40
|
<Canvas of={TextFieldStories.IconStory} />
|
|
38
41
|
|
|
39
42
|
### Validation
|
|
43
|
+
|
|
40
44
|
<Canvas of={TextFieldStories.Validation} />
|
|
41
45
|
|
|
42
46
|
### Reversed
|
|
47
|
+
|
|
43
48
|
<Canvas of={TextFieldStories.Reversed} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as InformationTileStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as InformationTileStories from './InformationTile.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={InformationTileStories} />
|
|
6
6
|
|
|
@@ -29,8 +29,9 @@ A visually interesting item in a list consisting of a card, visual, title, metad
|
|
|
29
29
|
<Canvas of={InformationTileStories.Variants} />
|
|
30
30
|
|
|
31
31
|
### Information
|
|
32
|
-
<Canvas of={InformationTileStories.Information} />
|
|
33
32
|
|
|
33
|
+
<Canvas of={InformationTileStories.Information} />
|
|
34
34
|
|
|
35
35
|
### Information Button Label
|
|
36
|
+
|
|
36
37
|
<Canvas of={InformationTileStories.TileWithCustomInfoLabel} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Controls, Meta } from
|
|
2
|
-
import { ResourceLinks, KAIOInstallation } from
|
|
3
|
-
import * as MultiActionTileStories from
|
|
1
|
+
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from '~storybook/components'
|
|
3
|
+
import * as MultiActionTileStories from './MultiActionTile.stories'
|
|
4
4
|
|
|
5
5
|
<Meta of={MultiActionTileStories} />
|
|
6
6
|
|
|
@@ -29,7 +29,9 @@ A visually interesting item in a list consisting of a card, visual, title, metad
|
|
|
29
29
|
<Canvas of={MultiActionTileStories.Variants} />
|
|
30
30
|
|
|
31
31
|
### Secondary Action
|
|
32
|
+
|
|
32
33
|
<Canvas of={MultiActionTileStories.SecondaryAction} />
|
|
33
34
|
|
|
34
35
|
### Information
|
|
36
|
+
|
|
35
37
|
<Canvas of={MultiActionTileStories.Information} />
|