@workday/canvas-kit-docs 14.0.0-alpha.1165-next.0 → 14.0.0-alpha.1168-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.
@@ -1,4 +1,4 @@
1
- export { AIIndicator } from './lib/AIIndicator';
1
+ export { StorybookStatusIndicator } from './lib/StorybookStatusIndicator';
2
2
  export { DownloadLLMFile } from './lib/DownloadLLMFile';
3
3
  export { ExampleCodeBlock } from './lib/ExampleCodeBlock';
4
4
  export * from './lib/specs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AACxD,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AACxD,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
package/dist/es6/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { AIIndicator } from './lib/AIIndicator';
1
+ export { StorybookStatusIndicator } from './lib/StorybookStatusIndicator';
2
2
  export { DownloadLLMFile } from './lib/DownloadLLMFile';
3
3
  export { ExampleCodeBlock } from './lib/ExampleCodeBlock';
4
4
  export * from './lib/specs';
@@ -0,0 +1,4 @@
1
+ export declare const StorybookStatusIndicator: ({ type }: {
2
+ type: 'ai' | 'deprecated';
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=StorybookStatusIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorybookStatusIndicator.d.ts","sourceRoot":"","sources":["../../../lib/StorybookStatusIndicator.tsx"],"names":[],"mappings":"AAqCA,eAAO,MAAM,wBAAwB;UAAmB,IAAI,GAAG,YAAY;6CAW1E,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StatusIndicator } from '@workday/canvas-kit-preview-react/status-indicator';
3
+ import { system } from '@workday/canvas-tokens-web';
4
+ import { sparkleSingleSmallIcon } from '@workday/canvas-system-icons-web';
5
+ import { createStencil } from '@workday/canvas-kit-styling';
6
+ import { systemIconStencil } from '@workday/canvas-kit-react/icon';
7
+ const storybookStatusIndicatorStencil = createStencil({
8
+ base: {
9
+ borderRadius: system.shape.round,
10
+ padding: `${system.space.zero} ${system.space.x2}`,
11
+ [systemIconStencil.vars.color]: 'currentColor',
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
+ });
26
+ const content = {
27
+ ai: {
28
+ icon: sparkleSingleSmallIcon,
29
+ label: 'AI Content',
30
+ },
31
+ deprecated: {
32
+ icon: undefined,
33
+ label: 'Deprecated',
34
+ },
35
+ };
36
+ export const StorybookStatusIndicator = ({ type }) => {
37
+ const { icon, label } = content[type];
38
+ return (_jsxs(StatusIndicator, { className: "sb-unstyled cnvs-title-status-indicator", cs: storybookStatusIndicatorStencil({ type }), children: [icon && _jsx(StatusIndicator.Icon, { icon: icon }), _jsx(StatusIndicator.Label, { children: label })] }));
39
+ };