@workday/canvas-kit-docs 15.0.0-alpha.0051-next.0 → 15.0.0-alpha.0060-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 +30085 -26779
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
- package/dist/es6/mdx/tokens/StorybookInformationHighlight/index.js +1 -1
- package/dist/mdx/14.0-UPGRADE-GUIDE.mdx +1 -1
- package/dist/mdx/15.0-UPGRADE-GUIDE.mdx +20 -1
- package/dist/mdx/labs-react/combobox/Combobox.mdx +1 -1
- package/dist/mdx/labs-react/search-form/SearchForm.mdx +1 -1
- 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/select/Select.mdx +1 -1
- package/dist/mdx/preview-react/side-panel/SidePanel.mdx +15 -3
- package/dist/mdx/react/avatar/avatar/Avatar.mdx +1 -1
- package/dist/mdx/react/common/mdx/Theming.mdx +16 -31
- package/dist/mdx/react/common/mdx/examples/Theming.tsx +25 -7
- package/dist/mdx/{preview-react → react}/information-highlight/InformationHighlight.mdx +4 -4
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Basic.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Body.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Caution.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Critical.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/CustomIconCritical.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Heading.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/Informational.tsx +1 -1
- package/dist/mdx/{preview-react → react}/information-highlight/examples/RTL.tsx +1 -1
- package/dist/mdx/react/radio/Radio.mdx +1 -1
- package/dist/mdx/react/status-indicator/StatusIndicator.mdx +1 -1
- package/dist/mdx/react/text/LabelText.mdx +1 -1
- package/dist/mdx/react/tokens/Tokens.mdx +1 -1
- package/dist/mdx/react/tooltip/Tooltip.mdx +2 -2
- package/dist/mdx/style-props/STYLE_PROPS.mdx +1 -1
- package/dist/mdx/style-props/stylePropsMigrationCodemod.mdx +1 -1
- package/dist/mdx/style-props/stylePropsMigrationOverview.mdx +2 -2
- package/dist/mdx/styling/mdx/CreateStyles.mdx +1 -1
- package/dist/mdx/styling/mdx/MergingStyles.mdx +1 -1
- package/dist/mdx/styling/mdx/Overview.mdx +1 -1
- package/dist/mdx/styling/mdx/Stencils.mdx +1 -1
- package/dist/mdx/tokens/TokenMigrationOverview.mdx +1 -1
- package/lib/StorybookStatusIndicator.tsx +17 -14
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorybookStatusIndicator.d.ts","sourceRoot":"","sources":["../../../lib/StorybookStatusIndicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StorybookStatusIndicator.d.ts","sourceRoot":"","sources":["../../../lib/StorybookStatusIndicator.tsx"],"names":[],"mappings":"AAgCA,eAAO,MAAM,wBAAwB;UAAmB,IAAI,GAAG,YAAY,GAAG,KAAK;6CAmBlF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { StatusIndicator } from '@workday/canvas-kit-preview-react/status-indicator';
|
|
2
|
+
import { StatusIndicator, } from '@workday/canvas-kit-preview-react/status-indicator';
|
|
3
3
|
import { system } from '@workday/canvas-tokens-web';
|
|
4
4
|
import { sparkleSingleSmallIcon } from '@workday/canvas-system-icons-web';
|
|
5
5
|
import { createStencil } from '@workday/canvas-kit-styling';
|
|
@@ -10,18 +10,6 @@ const storybookStatusIndicatorStencil = createStencil({
|
|
|
10
10
|
padding: `${system.space.zero} ${system.space.x2}`,
|
|
11
11
|
[systemIconStencil.vars.color]: 'currentColor',
|
|
12
12
|
},
|
|
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
13
|
});
|
|
26
14
|
const content = {
|
|
27
15
|
ai: {
|
|
@@ -32,8 +20,18 @@ const content = {
|
|
|
32
20
|
icon: undefined,
|
|
33
21
|
label: 'Deprecated',
|
|
34
22
|
},
|
|
23
|
+
new: {
|
|
24
|
+
icon: undefined,
|
|
25
|
+
label: 'New',
|
|
26
|
+
},
|
|
35
27
|
};
|
|
36
28
|
export const StorybookStatusIndicator = ({ type }) => {
|
|
37
29
|
const { icon, label } = content[type];
|
|
38
|
-
|
|
30
|
+
const variantMapping = {
|
|
31
|
+
ai: 'ai',
|
|
32
|
+
deprecated: 'caution',
|
|
33
|
+
new: 'positive',
|
|
34
|
+
};
|
|
35
|
+
console.log(variantMapping[type]);
|
|
36
|
+
return (_jsxs(StatusIndicator, { className: "sb-unstyled cnvs-title-status-indicator", cs: storybookStatusIndicatorStencil({ type }), variant: variantMapping[type], emphasis: "low", children: [icon && _jsx(StatusIndicator.Icon, { icon: icon }), _jsx(StatusIndicator.Label, { children: label })] }));
|
|
39
37
|
};
|