@workday/canvas-kit-docs 14.2.0-0055-next.0 → 14.2.0-0058-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es6/lib/StorybookStatusIndicator.d.ts +1 -1
- package/dist/es6/lib/StorybookStatusIndicator.d.ts.map +1 -1
- package/dist/es6/lib/StorybookStatusIndicator.js +12 -14
- package/dist/es6/lib/docs.js +3457 -147
- package/dist/mdx/labs-react/side-panel/SidePanel.mdx +256 -0
- package/dist/mdx/labs-react/side-panel/examples/AlwaysOpen.tsx +52 -0
- package/dist/mdx/labs-react/side-panel/examples/Basic.tsx +55 -0
- package/dist/mdx/labs-react/side-panel/examples/ExternalControl.tsx +75 -0
- package/dist/mdx/labs-react/side-panel/examples/HiddenName.tsx +41 -0
- package/dist/mdx/labs-react/side-panel/examples/OnStateTransition.tsx +49 -0
- package/dist/mdx/labs-react/side-panel/examples/RightOrigin.tsx +73 -0
- package/dist/mdx/labs-react/side-panel/examples/Variant.tsx +60 -0
- package/dist/mdx/labs-react/side-panel/examples/useDirection.ts +23 -0
- package/dist/mdx/preview-react/side-panel/SidePanel.mdx +15 -3
- package/lib/StorybookStatusIndicator.tsx +17 -14
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
|
|
1
|
+
import {ExampleCodeBlock, SymbolDoc, Specifications, StorybookStatusIndicator} from '@workday/canvas-kit-docs';import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight'
|
|
2
|
+
|
|
2
3
|
import Basic from './examples/Basic';
|
|
3
4
|
import HiddenName from './examples/HiddenName';
|
|
4
5
|
import AlternatePanel from './examples/Variant';
|
|
@@ -9,9 +10,20 @@ import OnExpandedChange from './examples/OnExpandedChange';
|
|
|
9
10
|
import OnStateTransition from './examples/OnStateTransition';
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
# Canvas Kit Side Panel
|
|
13
|
+
# Canvas Kit Side Panel <StorybookStatusIndicator type="deprecated" />
|
|
14
|
+
|
|
15
|
+
<InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
|
|
16
|
+
<InformationHighlight.Icon />
|
|
17
|
+
<InformationHighlight.Body>
|
|
18
|
+
`SidePanel` in Preview has been deprecated and will be removed in a future major version. Please
|
|
19
|
+
use `SidePanel` in Labs instead.
|
|
20
|
+
</InformationHighlight.Body>
|
|
21
|
+
<InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/docs/labs-side-panel--docs">
|
|
22
|
+
View SidePanel Docs
|
|
23
|
+
</InformationHighlight.Link>
|
|
24
|
+
</InformationHighlight>
|
|
13
25
|
|
|
14
|
-
`SidePanel` is a
|
|
26
|
+
`SidePanel` is a collapsible container that anchors to the left or right side of the screen.
|
|
15
27
|
|
|
16
28
|
[> Workday Design Reference](https://design.workday.com/components/containers/side-panel)
|
|
17
29
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
StatusIndicator,
|
|
3
|
+
type StatusIndicatorVariant,
|
|
4
|
+
} from '@workday/canvas-kit-preview-react/status-indicator';
|
|
2
5
|
import {system} from '@workday/canvas-tokens-web';
|
|
3
6
|
import {sparkleSingleSmallIcon} from '@workday/canvas-system-icons-web';
|
|
4
7
|
import {createStencil} from '@workday/canvas-kit-styling';
|
|
@@ -10,18 +13,6 @@ const storybookStatusIndicatorStencil = createStencil({
|
|
|
10
13
|
padding: `${system.space.zero} ${system.space.x2}`,
|
|
11
14
|
[systemIconStencil.vars.color]: 'currentColor',
|
|
12
15
|
},
|
|
13
|
-
modifiers: {
|
|
14
|
-
type: {
|
|
15
|
-
ai: {
|
|
16
|
-
background: system.color.bg.ai.default,
|
|
17
|
-
color: system.color.fg.ai,
|
|
18
|
-
},
|
|
19
|
-
deprecated: {
|
|
20
|
-
background: system.color.static.amber.soft,
|
|
21
|
-
color: system.color.static.amber.stronger,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
16
|
});
|
|
26
17
|
|
|
27
18
|
const content = {
|
|
@@ -33,14 +24,26 @@ const content = {
|
|
|
33
24
|
icon: undefined,
|
|
34
25
|
label: 'Deprecated',
|
|
35
26
|
},
|
|
27
|
+
new: {
|
|
28
|
+
icon: undefined,
|
|
29
|
+
label: 'New',
|
|
30
|
+
},
|
|
36
31
|
};
|
|
37
32
|
|
|
38
|
-
export const StorybookStatusIndicator = ({type}: {type: 'ai' | 'deprecated'}) => {
|
|
33
|
+
export const StorybookStatusIndicator = ({type}: {type: 'ai' | 'deprecated' | 'new'}) => {
|
|
39
34
|
const {icon, label} = content[type];
|
|
35
|
+
const variantMapping = {
|
|
36
|
+
ai: 'ai',
|
|
37
|
+
deprecated: 'caution',
|
|
38
|
+
new: 'positive',
|
|
39
|
+
};
|
|
40
|
+
console.log(variantMapping[type]);
|
|
40
41
|
return (
|
|
41
42
|
<StatusIndicator
|
|
42
43
|
className="sb-unstyled cnvs-title-status-indicator"
|
|
43
44
|
cs={storybookStatusIndicatorStencil({type})}
|
|
45
|
+
variant={variantMapping[type] as StatusIndicatorVariant}
|
|
46
|
+
emphasis="low"
|
|
44
47
|
>
|
|
45
48
|
{icon && <StatusIndicator.Icon icon={icon} />}
|
|
46
49
|
<StatusIndicator.Label>{label}</StatusIndicator.Label>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "14.2.0-
|
|
3
|
+
"version": "14.2.0-0058-next.0",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@stackblitz/sdk": "^1.11.0",
|
|
47
47
|
"@storybook/csf": "0.0.1",
|
|
48
|
-
"@workday/canvas-kit-labs-react": "^14.2.0-
|
|
49
|
-
"@workday/canvas-kit-preview-react": "^14.2.0-
|
|
50
|
-
"@workday/canvas-kit-react": "^14.2.0-
|
|
51
|
-
"@workday/canvas-kit-styling": "^14.2.0-
|
|
48
|
+
"@workday/canvas-kit-labs-react": "^14.2.0-0058-next.0",
|
|
49
|
+
"@workday/canvas-kit-preview-react": "^14.2.0-0058-next.0",
|
|
50
|
+
"@workday/canvas-kit-react": "^14.2.0-0058-next.0",
|
|
51
|
+
"@workday/canvas-kit-styling": "^14.2.0-0058-next.0",
|
|
52
52
|
"@workday/canvas-system-icons-web": "^3.0.36",
|
|
53
53
|
"@workday/canvas-tokens-web": "^3.1.1",
|
|
54
54
|
"markdown-to-jsx": "^7.2.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"mkdirp": "^1.0.3",
|
|
62
62
|
"typescript": "5.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "464d89a31875769371724f0db9031cef57340f80"
|
|
65
65
|
}
|