@kaizen/components 1.42.0 → 1.42.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/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs +15 -30
- package/dist/cjs/Illustration/subcomponents/VideoPlayer/VideoPlayer.cjs.map +1 -1
- package/dist/cjs/dts/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +1 -1
- package/dist/cjs/index.css +25 -25
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs +15 -30
- package/dist/esm/Illustration/subcomponents/VideoPlayer/VideoPlayer.mjs.map +1 -1
- package/dist/esm/dts/Filter/FilterMultiSelect/FilterMultiSelect.d.ts +1 -1
- package/dist/esm/index.css +25 -25
- package/dist/index.d.ts +3 -3
- package/dist/styles.css +1 -1
- package/package.json +16 -16
- package/src/ButtonGroup/_docs/ButtonGroup.mdx +23 -0
- package/src/ButtonGroup/_docs/ButtonGroup.stories.tsx +0 -23
- package/src/ErrorPage/_docs/ErrorPage.mdx +21 -0
- package/src/ErrorPage/_docs/ErrorPage.stories.tsx +0 -16
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx +10 -7
- package/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.tsx +9 -24
- package/src/LabelledMessage/_docs/LabelledMessage.mdx +21 -0
- package/src/LabelledMessage/_docs/LabelledMessage.stories.tsx +0 -19
- package/src/Workflow/_docs/ProgressStepper.mdx +41 -0
- package/src/Workflow/_docs/ProgressStepper.stories.tsx +0 -21
- package/src/Workflow/_docs/Workflow.mdx +1 -2
- package/src/Workflow/_docs/Workflow.stories.tsx +1 -1
- package/src/Workflow/_docs/WorkflowFooter.mdx +41 -0
- package/src/Workflow/_docs/WorkflowFooter.stories.tsx +0 -20
- package/src/Workflow/_docs/WorkflowHeader.mdx +31 -0
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +0 -20
- package/src/__future__/Workflow/_docs/Workflow.mdx +1 -1
- package/src/__future__/Workflow/_docs/Workflow.stories.tsx +1 -1
- package/src/Illustration/subcomponents/VideoPlayer/__snapshots__/VideoPlayer.spec.tsx.snap +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.1",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@react-stately/select": "^3.6.2",
|
|
48
48
|
"@react-types/shared": "^3.22.1",
|
|
49
49
|
"classnames": "^2.5.1",
|
|
50
|
-
"date-fns": "^3.
|
|
50
|
+
"date-fns": "^3.6.0",
|
|
51
51
|
"lodash.debounce": "^4.0.8",
|
|
52
52
|
"nanobus": "^4.5.0",
|
|
53
53
|
"prosemirror-commands": "^1.5.2",
|
|
54
|
-
"prosemirror-history": "^1.
|
|
54
|
+
"prosemirror-history": "^1.4.0",
|
|
55
55
|
"prosemirror-inputrules": "^1.4.0",
|
|
56
56
|
"prosemirror-keymap": "^1.2.2",
|
|
57
57
|
"prosemirror-model": "^1.19.4",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"prosemirror-state": "^1.4.3",
|
|
61
61
|
"prosemirror-transform": "^1.8.0",
|
|
62
62
|
"prosemirror-utils": "^1.2.1-0",
|
|
63
|
-
"prosemirror-view": "^1.33.
|
|
63
|
+
"prosemirror-view": "^1.33.3",
|
|
64
64
|
"react-animate-height": "^3.2.3",
|
|
65
65
|
"react-day-picker": "^8.10.0",
|
|
66
66
|
"react-focus-lock": "^2.11.2",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"react-day-picker": "Version locked until a11y gets fixed (https://github.com/gpbl/react-day-picker/pull/1708)"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@babel/plugin-transform-react-pure-annotations": "^7.
|
|
83
|
-
"@cultureamp/frontend-apis": "^9.4.
|
|
84
|
-
"@cultureamp/i18n-react-intl": "^2.5.
|
|
82
|
+
"@babel/plugin-transform-react-pure-annotations": "^7.24.1",
|
|
83
|
+
"@cultureamp/frontend-apis": "^9.4.3",
|
|
84
|
+
"@cultureamp/i18n-react-intl": "^2.5.5",
|
|
85
85
|
"@rollup/plugin-alias": "^5.1.0",
|
|
86
86
|
"@rollup/plugin-babel": "^6.0.4",
|
|
87
87
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -90,19 +90,19 @@
|
|
|
90
90
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
91
91
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
92
92
|
"@types/lodash.debounce": "^4.0.9",
|
|
93
|
-
"@types/react-dom": "^18.2.
|
|
93
|
+
"@types/react-dom": "^18.2.23",
|
|
94
94
|
"@types/react-textfit": "^1.1.4",
|
|
95
95
|
"@types/uuid": "^9.0.8",
|
|
96
96
|
"agadoo": "^3.0.0",
|
|
97
|
-
"autoprefixer": "^10.4.
|
|
97
|
+
"autoprefixer": "^10.4.19",
|
|
98
98
|
"babel-plugin-pure-static-props": "^0.2.0",
|
|
99
99
|
"concat-cli": "^4.0.0",
|
|
100
100
|
"query-string": "^9.0.0",
|
|
101
|
-
"react-intl": "^6.6.
|
|
102
|
-
"rollup": "^4.
|
|
101
|
+
"react-intl": "^6.6.4",
|
|
102
|
+
"rollup": "^4.13.2",
|
|
103
103
|
"rollup-plugin-dts": "^6.1.0",
|
|
104
104
|
"rollup-plugin-ignore": "^1.0.10",
|
|
105
|
-
"rollup-plugin-node-externals": "^7.
|
|
105
|
+
"rollup-plugin-node-externals": "^7.1.1",
|
|
106
106
|
"rollup-plugin-postcss": "^4.0.2",
|
|
107
107
|
"sass": "^1.72.0",
|
|
108
108
|
"serialize-query-params": "^2.0.2",
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
"ts-node": "^10.9.2",
|
|
112
112
|
"ts-patch": "^3.1.2",
|
|
113
113
|
"typescript-transform-paths": "^3.4.7",
|
|
114
|
-
"@kaizen/
|
|
115
|
-
"@kaizen/
|
|
114
|
+
"@kaizen/tailwind": "1.2.6",
|
|
115
|
+
"@kaizen/design-tokens": "10.3.20"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
|
-
"@cultureamp/i18n-react-intl": "^2.5.
|
|
118
|
+
"@cultureamp/i18n-react-intl": "^2.5.5",
|
|
119
119
|
"react": "^18.2.0",
|
|
120
|
-
"react-intl": "^6.6.
|
|
120
|
+
"react-intl": "^6.6.4"
|
|
121
121
|
},
|
|
122
122
|
"scripts": {
|
|
123
123
|
"build": "pnpm clean && pnpm prepublishOnly",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Canvas, Controls, Meta } from "@storybook/blocks"
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from "~storybook/components"
|
|
3
|
+
import * as ButtonGroupStories from "./ButtonGroup.stories"
|
|
4
|
+
|
|
5
|
+
<Meta of={ButtonGroupStories} />
|
|
6
|
+
|
|
7
|
+
# Button Group
|
|
8
|
+
|
|
9
|
+
<ResourceLinks
|
|
10
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/ButtonGroup"
|
|
11
|
+
figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=6-28579&t=bowQ0LWOQKOd0UYS-0"
|
|
12
|
+
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093959/Filters"
|
|
13
|
+
className="!mb-8"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<KAIOInstallation exportNames="ButtonGroup" />
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
Used to group buttons. Compatible with buttons wrapped by Tooltip. Currently only compatible with Filter Buttons.
|
|
21
|
+
|
|
22
|
+
<Canvas of={ButtonGroupStories.Playground} />
|
|
23
|
+
<Controls of={ButtonGroupStories.Playground} />
|
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { FilterButtonBase } from "~components/Filter/FilterButton/subcomponents/FilterButtonBase"
|
|
4
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
5
4
|
import { ButtonGroup } from ".."
|
|
6
5
|
|
|
7
6
|
const meta = {
|
|
8
|
-
tags: ["autodocs"],
|
|
9
7
|
// Not to be nested until full KAIO migration
|
|
10
8
|
// title: "Components/Button/Button Group",
|
|
11
9
|
title: "Components/Button Group",
|
|
12
10
|
component: ButtonGroup,
|
|
13
11
|
args: { children: undefined },
|
|
14
|
-
parameters: {
|
|
15
|
-
docs: {
|
|
16
|
-
container: ComponentDocsTemplate,
|
|
17
|
-
},
|
|
18
|
-
isInKaio: true,
|
|
19
|
-
installation: [
|
|
20
|
-
"pnpm add @kaizen/components",
|
|
21
|
-
"import { ButtonGroup } from `@kaizen/components`",
|
|
22
|
-
],
|
|
23
|
-
resourceLinks: {
|
|
24
|
-
sourceCode:
|
|
25
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/ButtonGroup",
|
|
26
|
-
figma:
|
|
27
|
-
"https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?type=design&node-id=6-28579&t=bowQ0LWOQKOd0UYS-0",
|
|
28
|
-
designGuidelines:
|
|
29
|
-
"https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093959/Filters",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
12
|
} satisfies Meta<typeof ButtonGroup>
|
|
33
13
|
|
|
34
14
|
export default meta
|
|
35
15
|
|
|
36
16
|
type Story = StoryObj<typeof meta>
|
|
37
17
|
|
|
38
|
-
/**
|
|
39
|
-
* Used to group buttons. Compatible with buttons wrapped by Tooltip. Currently only compatible with Filter Buttons.
|
|
40
|
-
*/
|
|
41
18
|
export const Playground: Story = {
|
|
42
19
|
render: args => (
|
|
43
20
|
<ButtonGroup {...args}>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Canvas, Controls, Meta } from "@storybook/blocks"
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from "~storybook/components"
|
|
3
|
+
import * as ErrorPageStories from "./ErrorPage.stories"
|
|
4
|
+
|
|
5
|
+
<Meta of={ErrorPageStories} />
|
|
6
|
+
|
|
7
|
+
# Error Page
|
|
8
|
+
|
|
9
|
+
<ResourceLinks
|
|
10
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/master/packages/components/src/ErrorPage"
|
|
11
|
+
className="!mb-8"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<KAIOInstallation exportNames="ErrorPage" />
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
Error pages for when things go wrong.
|
|
19
|
+
|
|
20
|
+
<Canvas of={ErrorPageStories.Playground} />
|
|
21
|
+
<Controls of={ErrorPageStories.Playground} />
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
3
2
|
import { statusCodes } from "../hooks"
|
|
4
3
|
import { ErrorPage } from "../index"
|
|
5
4
|
|
|
6
5
|
const meta = {
|
|
7
|
-
tags: ["autodocs"],
|
|
8
6
|
title: "Pages/Error Page",
|
|
9
7
|
component: ErrorPage,
|
|
10
|
-
parameters: {
|
|
11
|
-
docs: {
|
|
12
|
-
container: ComponentDocsTemplate,
|
|
13
|
-
},
|
|
14
|
-
installation: [
|
|
15
|
-
"npm install @kaizen/components",
|
|
16
|
-
"import { ErrorPage } from `@kaizen/components`",
|
|
17
|
-
],
|
|
18
|
-
resourceLinks: {
|
|
19
|
-
/** @todo: Add Github link (adjust as needed) */
|
|
20
|
-
sourceCode:
|
|
21
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/master/packages/components/src/ErrorPage",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
8
|
} satisfies Meta<typeof ErrorPage>
|
|
25
9
|
|
|
26
10
|
export default meta
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react"
|
|
2
2
|
import { render, screen } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
4
|
import { VideoPlayer } from "./VideoPlayer"
|
|
@@ -25,7 +25,6 @@ const mockPause = jest.fn()
|
|
|
25
25
|
|
|
26
26
|
describe("<VideoPlayer />", () => {
|
|
27
27
|
beforeEach(() => {
|
|
28
|
-
jest.clearAllMocks()
|
|
29
28
|
window.HTMLMediaElement.prototype.load = mockLoad
|
|
30
29
|
window.HTMLMediaElement.prototype.play = mockPlay
|
|
31
30
|
window.HTMLMediaElement.prototype.pause = mockPause
|
|
@@ -39,6 +38,10 @@ describe("<VideoPlayer />", () => {
|
|
|
39
38
|
})
|
|
40
39
|
})
|
|
41
40
|
|
|
41
|
+
afterEach(() => {
|
|
42
|
+
jest.clearAllMocks()
|
|
43
|
+
})
|
|
44
|
+
|
|
42
45
|
it("renders a video player in the document and autoplay", async () => {
|
|
43
46
|
render(
|
|
44
47
|
<VideoPlayer
|
|
@@ -49,7 +52,7 @@ describe("<VideoPlayer />", () => {
|
|
|
49
52
|
)
|
|
50
53
|
const videoPlayer = screen.getByTestId("kz-video-player")
|
|
51
54
|
expect(videoPlayer).toBeInTheDocument()
|
|
52
|
-
expect(mockPlay).
|
|
55
|
+
expect(mockPlay).toHaveBeenCalled()
|
|
53
56
|
})
|
|
54
57
|
|
|
55
58
|
describe("use-reduced-motion", () => {
|
|
@@ -65,8 +68,8 @@ describe("<VideoPlayer />", () => {
|
|
|
65
68
|
/>
|
|
66
69
|
)
|
|
67
70
|
const videoPlayer = screen.getByTestId("kz-video-player")
|
|
68
|
-
expect(videoPlayer).
|
|
69
|
-
expect(mockPause).
|
|
71
|
+
expect(videoPlayer).not.toHaveAttribute("autoplay")
|
|
72
|
+
expect(mockPause).toHaveBeenCalled()
|
|
70
73
|
})
|
|
71
74
|
|
|
72
75
|
it("defaults to autoplay when user does not set use-reduced-motion preferences", () => {
|
|
@@ -81,8 +84,8 @@ describe("<VideoPlayer />", () => {
|
|
|
81
84
|
/>
|
|
82
85
|
)
|
|
83
86
|
const videoPlayer = screen.getByTestId("kz-video-player")
|
|
84
|
-
expect(videoPlayer).
|
|
85
|
-
expect(mockPlay).
|
|
87
|
+
expect(videoPlayer).toHaveAttribute("autoplay")
|
|
88
|
+
expect(mockPlay).toHaveBeenCalled()
|
|
86
89
|
})
|
|
87
90
|
})
|
|
88
91
|
|
|
@@ -51,7 +51,6 @@ export const VideoPlayer = ({
|
|
|
51
51
|
const videoRef = useRef<HTMLVideoElement>(null)
|
|
52
52
|
const [prefersReducedMotion, setPrefersReducedMotion] =
|
|
53
53
|
React.useState<boolean>(true)
|
|
54
|
-
const [sourceEl, setSourceEl] = React.useState<React.ReactNode>()
|
|
55
54
|
|
|
56
55
|
useEffect(() => {
|
|
57
56
|
/**
|
|
@@ -150,32 +149,15 @@ export const VideoPlayer = ({
|
|
|
150
149
|
}
|
|
151
150
|
}, [videoRef])
|
|
152
151
|
|
|
153
|
-
useEffect(() => {
|
|
154
|
-
/**
|
|
155
|
-
* This seems counter-intuitive, but webm support is codec specific.
|
|
156
|
-
* Only offer webm if we are positive the browser supports it.
|
|
157
|
-
* Reference: https://bugs.webkit.org/show_bug.cgi?id=216652#c1
|
|
158
|
-
*/
|
|
159
|
-
canPlayWebm() ? (
|
|
160
|
-
setSourceEl(
|
|
161
|
-
<>
|
|
162
|
-
<source src={assetUrl(`${source}.webm`)} type="video/webm" />
|
|
163
|
-
<source src={assetUrl(`${source}.mp4`)} type="video/mp4" />
|
|
164
|
-
</>
|
|
165
|
-
)
|
|
166
|
-
) : (
|
|
167
|
-
<source src={assetUrl(`${source}.mp4`)} type="video/mp4" />
|
|
168
|
-
)
|
|
169
|
-
}, [setSourceEl])
|
|
170
|
-
|
|
171
152
|
const pausePlay = usePausePlay(videoRef)
|
|
172
153
|
|
|
173
154
|
return (
|
|
174
155
|
<figure
|
|
175
|
-
className={classnames(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
156
|
+
className={classnames(
|
|
157
|
+
styles.figure,
|
|
158
|
+
aspectRatio && styles[aspectRatio],
|
|
159
|
+
aspectRatio && styles.aspectRatioWrapper
|
|
160
|
+
)}
|
|
179
161
|
>
|
|
180
162
|
<video
|
|
181
163
|
muted={true}
|
|
@@ -191,7 +173,10 @@ export const VideoPlayer = ({
|
|
|
191
173
|
playsInline={true}
|
|
192
174
|
tabIndex={-1}
|
|
193
175
|
>
|
|
194
|
-
{
|
|
176
|
+
{canPlayWebm() && (
|
|
177
|
+
<source src={assetUrl(`${source}.webm`)} type="video/webm" />
|
|
178
|
+
)}
|
|
179
|
+
<source src={assetUrl(`${source}.mp4`)} type="video/mp4" />
|
|
195
180
|
</video>
|
|
196
181
|
<IconButton
|
|
197
182
|
onClick={(): void => pausePlay.toggle()}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Canvas, Controls, Meta } from "@storybook/blocks"
|
|
2
|
+
import { ResourceLinks, KAIOInstallation } from "~storybook/components"
|
|
3
|
+
import * as LabelledMessageStories from "./LabelledMessage.stories"
|
|
4
|
+
|
|
5
|
+
<Meta of={LabelledMessageStories} />
|
|
6
|
+
|
|
7
|
+
# Labelled Message
|
|
8
|
+
|
|
9
|
+
<ResourceLinks
|
|
10
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/LabelledMessage"
|
|
11
|
+
className="!mb-8"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<KAIOInstallation exportNames="LabelledMessage" />
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
A label and message with a separator in between. This component supports `dir="ltr"`.
|
|
19
|
+
|
|
20
|
+
<Canvas of={LabelledMessageStories.Playground} />
|
|
21
|
+
<Controls of={LabelledMessageStories.Playground} />
|
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
3
2
|
import { LabelledMessage } from "../LabelledMessage"
|
|
4
3
|
|
|
5
4
|
const meta = {
|
|
6
|
-
tags: ["autodocs"],
|
|
7
5
|
title: "Components/Utilities/Labelled Message",
|
|
8
6
|
component: LabelledMessage,
|
|
9
7
|
args: {
|
|
10
8
|
label: "Label",
|
|
11
9
|
message: "Custom message here",
|
|
12
10
|
},
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
container: ComponentDocsTemplate,
|
|
16
|
-
},
|
|
17
|
-
isInKaio: true,
|
|
18
|
-
installation: [
|
|
19
|
-
"npm install @kaizen/components",
|
|
20
|
-
'import { LabelledMessage } from "@kaizen/components"',
|
|
21
|
-
],
|
|
22
|
-
resourceLinks: {
|
|
23
|
-
sourceCode:
|
|
24
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/LabelledMessage",
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
11
|
} satisfies Meta<typeof LabelledMessage>
|
|
28
12
|
|
|
29
13
|
export default meta
|
|
30
14
|
|
|
31
|
-
/**
|
|
32
|
-
* A label and message with a separator in between. This component supports `dir="ltr"`.
|
|
33
|
-
*/
|
|
34
15
|
export const Playground: StoryObj<typeof meta> = {
|
|
35
16
|
parameters: {
|
|
36
17
|
docs: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
|
|
2
|
+
import { InlineNotification } from "~components/Notification"
|
|
3
|
+
import { KAIOInstallation, ResourceLinks } from "~storybook/components"
|
|
4
|
+
import * as ProgressStepperStories from "./ProgressStepper.stories"
|
|
5
|
+
|
|
6
|
+
<Meta of={ProgressStepperStories} />
|
|
7
|
+
|
|
8
|
+
# Progress Stepper
|
|
9
|
+
|
|
10
|
+
<ResourceLinks
|
|
11
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Workflow"
|
|
12
|
+
figma="https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1"
|
|
13
|
+
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation"
|
|
14
|
+
className="!mb-8"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<InlineNotification type="negative" persistent>
|
|
18
|
+
{`This version of the Workflow is deprecated and will be removed in the next major release.
|
|
19
|
+
Import from "@kaizen/components/future" for the latest version.`}
|
|
20
|
+
</InlineNotification>
|
|
21
|
+
|
|
22
|
+
<KAIOInstallation exportNames="Workflow" />
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
This component is used in the `Footer` to track progress of the Workflows steps.
|
|
27
|
+
|
|
28
|
+
It has no reverse variant and should only be used in the Worflow's `Footer` component.
|
|
29
|
+
|
|
30
|
+
<Canvas of={ProgressStepperStories.Playground} />
|
|
31
|
+
<Controls of={ProgressStepperStories.Playground} />
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
<DocsStory of={ProgressStepperStories.ProgressStates} />
|
|
36
|
+
|
|
37
|
+
<DocsStory of={ProgressStepperStories.AllStepsComplete} />
|
|
38
|
+
|
|
39
|
+
<DocsStory of={ProgressStepperStories.FewerSteps} />
|
|
40
|
+
|
|
41
|
+
<DocsStory of={ProgressStepperStories.EightSteps} />
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
4
3
|
import { Workflow } from "../"
|
|
5
4
|
|
|
6
5
|
const meta = {
|
|
7
|
-
tags: ["autodocs"],
|
|
8
6
|
title: "Pages/Workflow/Components/Progress Stepper",
|
|
9
7
|
component: Workflow.ProgressStepper,
|
|
10
8
|
args: {
|
|
@@ -12,25 +10,6 @@ const meta = {
|
|
|
12
10
|
steps: ["Settings", "Questions", "Preview", "Employees", "Schedule"],
|
|
13
11
|
isComplete: false,
|
|
14
12
|
},
|
|
15
|
-
parameters: {
|
|
16
|
-
docs: {
|
|
17
|
-
source: { type: "code" },
|
|
18
|
-
container: ComponentDocsTemplate,
|
|
19
|
-
},
|
|
20
|
-
installation: [
|
|
21
|
-
"pnpm add @kaizen/workflow",
|
|
22
|
-
"import { ProgressStepper } from `@kaizen/components`",
|
|
23
|
-
],
|
|
24
|
-
resourceLinks: {
|
|
25
|
-
sourceCode:
|
|
26
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/main/packages/workflow/",
|
|
27
|
-
figma:
|
|
28
|
-
"https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1",
|
|
29
|
-
/** @todo (optional): Add Confluence link */
|
|
30
|
-
designGuidelines:
|
|
31
|
-
"https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
13
|
decorators: [
|
|
35
14
|
Story => (
|
|
36
15
|
<div className="bg-blue-500 p-8">
|
|
@@ -5,7 +5,7 @@ import * as Workflow from "./Workflow.stories"
|
|
|
5
5
|
import * as WorkflowFooter from "./WorkflowFooter.stories"
|
|
6
6
|
import * as WorkflowHeader from "./WorkflowHeader.stories"
|
|
7
7
|
|
|
8
|
-
<Meta
|
|
8
|
+
<Meta of={Workflow} />
|
|
9
9
|
|
|
10
10
|
# Workflow
|
|
11
11
|
|
|
@@ -14,7 +14,6 @@ import * as WorkflowHeader from "./WorkflowHeader.stories"
|
|
|
14
14
|
className="!mb-8"
|
|
15
15
|
/>
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
<InlineNotification type="negative" persistent>
|
|
19
18
|
{`This version of the Workflow is deprecated and will be removed in the next major release.
|
|
20
19
|
Import from "@kaizen/components/future" for the latest version.`}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
|
|
2
|
+
import { InlineNotification } from "~components/Notification"
|
|
3
|
+
import { KAIOInstallation, ResourceLinks } from "~storybook/components"
|
|
4
|
+
import * as WorkflowFooterStories from "./WorkflowFooter.stories"
|
|
5
|
+
|
|
6
|
+
<Meta of={WorkflowFooterStories} />
|
|
7
|
+
|
|
8
|
+
# Footer
|
|
9
|
+
|
|
10
|
+
<ResourceLinks
|
|
11
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Workflow"
|
|
12
|
+
figma="https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1"
|
|
13
|
+
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation"
|
|
14
|
+
className="!mb-8"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<InlineNotification type="negative" persistent>
|
|
18
|
+
{`This version of the Workflow is deprecated and will be removed in the next major release.
|
|
19
|
+
Import from "@kaizen/components/future" for the latest version.`}
|
|
20
|
+
</InlineNotification>
|
|
21
|
+
|
|
22
|
+
<KAIOInstallation exportNames="Workflow" />
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
<Canvas of={WorkflowFooterStories.Playground} />
|
|
27
|
+
<Controls of={WorkflowFooterStories.Playground} />
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
<DocsStory of={WorkflowFooterStories.FirstStep} />
|
|
32
|
+
|
|
33
|
+
<DocsStory of={WorkflowFooterStories.NextStepDisabled} />
|
|
34
|
+
|
|
35
|
+
<DocsStory of={WorkflowFooterStories.LastStep} />
|
|
36
|
+
|
|
37
|
+
<DocsStory of={WorkflowFooterStories.AllStepsComplete} />
|
|
38
|
+
|
|
39
|
+
<DocsStory of={WorkflowFooterStories.FewerSteps} />
|
|
40
|
+
|
|
41
|
+
<DocsStory of={WorkflowFooterStories.EightSteps} />
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { Button } from "~components/Button"
|
|
4
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
5
4
|
import { Workflow } from "../"
|
|
6
5
|
import { WorkflowControls } from "./controls"
|
|
7
6
|
|
|
8
7
|
const meta = {
|
|
9
|
-
tags: ["autodocs"],
|
|
10
8
|
title: "Pages/Workflow/Components/Footer",
|
|
11
9
|
component: Workflow.Footer,
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
sourceState: "shown",
|
|
15
|
-
container: ComponentDocsTemplate,
|
|
16
|
-
},
|
|
17
|
-
installation: [
|
|
18
|
-
"pnpm add @kaizen/components",
|
|
19
|
-
"import { Workflow } from `@kaizen/components`",
|
|
20
|
-
],
|
|
21
|
-
resourceLinks: {
|
|
22
|
-
sourceCode:
|
|
23
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/main/packages/workflow/",
|
|
24
|
-
figma:
|
|
25
|
-
"https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1",
|
|
26
|
-
designGuidelines:
|
|
27
|
-
"https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
10
|
argTypes: {
|
|
31
11
|
nextAction: WorkflowControls.nextAction,
|
|
32
12
|
previousAction: WorkflowControls.previousAction,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
|
|
2
|
+
import { InlineNotification } from "~components/Notification"
|
|
3
|
+
import { KAIOInstallation, ResourceLinks } from "~storybook/components"
|
|
4
|
+
import * as WorkflowHeaderStories from "./WorkflowHeader.stories"
|
|
5
|
+
|
|
6
|
+
<Meta of={WorkflowHeaderStories} />
|
|
7
|
+
|
|
8
|
+
# Header
|
|
9
|
+
|
|
10
|
+
<ResourceLinks
|
|
11
|
+
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Workflow"
|
|
12
|
+
figma="https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1"
|
|
13
|
+
designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation"
|
|
14
|
+
className="!mb-8"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
<InlineNotification type="negative" persistent>
|
|
18
|
+
{`This version of the Workflow is deprecated and will be removed in the next major release.
|
|
19
|
+
Import from "@kaizen/components/future" for the latest version.`}
|
|
20
|
+
</InlineNotification>
|
|
21
|
+
|
|
22
|
+
<KAIOInstallation exportNames="Workflow" />
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
<Canvas of={WorkflowHeaderStories.Playground} />
|
|
27
|
+
<Controls of={WorkflowHeaderStories.Playground} />
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
<DocsStory of={WorkflowHeaderStories.MultipleActions} />
|
|
@@ -2,32 +2,12 @@ import React from "react"
|
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
3
|
import { Button } from "~components/Button"
|
|
4
4
|
import { CloseIcon, VisibleIcon } from "~components/Icon"
|
|
5
|
-
import { ComponentDocsTemplate } from "~storybook/components/DocsContainer"
|
|
6
5
|
import { Workflow } from "../"
|
|
7
6
|
import { WorkflowControls } from "./controls"
|
|
8
7
|
|
|
9
8
|
const meta = {
|
|
10
|
-
tags: ["autodocs"],
|
|
11
9
|
title: "Pages/Workflow/Components/Header",
|
|
12
10
|
component: Workflow.Header,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
sourceState: "shown",
|
|
16
|
-
container: ComponentDocsTemplate,
|
|
17
|
-
},
|
|
18
|
-
installation: [
|
|
19
|
-
"pnpm add @kaizen/components",
|
|
20
|
-
"import { Workflow } from `@kaizen/components`",
|
|
21
|
-
],
|
|
22
|
-
resourceLinks: {
|
|
23
|
-
sourceCode:
|
|
24
|
-
"https://github.com/cultureamp/kaizen-design-system/tree/main/packages/workflow/",
|
|
25
|
-
figma:
|
|
26
|
-
"https://www.figma.com/file/IJTy1JpS4Xyop5cQwroRje/%F0%9F%9B%A0%EF%B8%8F-Self-reflection%3A-Build-Handoff?node-id=188%3A62005&t=x4zyx07E2G3BmKGw-1",
|
|
27
|
-
designGuidelines:
|
|
28
|
-
"https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3064989884/Documentation",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
11
|
argTypes: {
|
|
32
12
|
headerActions: WorkflowControls.headerActions,
|
|
33
13
|
},
|