@workday/canvas-kit-docs 14.0.0-alpha.1167-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
+ };
@@ -1,4 +1,10 @@
1
- import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
1
+ import {
2
+ ExampleCodeBlock,
3
+ StorybookStatusIndicator,
4
+ SymbolDoc,
5
+ Specifications,
6
+ } from '@workday/canvas-kit-docs';
7
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
2
8
  import Default from './examples/Top Label/Default';
3
9
  import DefaultWithCustomOptions from './examples/Top Label/DefaultWithCustomOptions';
4
10
  import DefaultWithSimpleOptions from './examples/Top Label/DefaultWithSimpleOptions';
@@ -17,8 +23,20 @@ import ErrorLeft from './examples/Left Label/ErrorLeft';
17
23
  import GrowLeft from './examples/Left Label/GrowLeft';
18
24
 
19
25
 
26
+ # Canvas Kit Select <StorybookStatusIndicator type="deprecated" />
20
27
 
21
- # Canvas Kit Select
28
+ <InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
29
+ <InformationHighlight.Icon />
30
+ <InformationHighlight.Body>
31
+ `Select` in Preview has been deprecated and will be removed in a future major version. Please
32
+ use `Select` in Main instead.
33
+ </InformationHighlight.Body>
34
+ <InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--docs">
35
+ Form Field Docs
36
+ </InformationHighlight.Link>
37
+ </InformationHighlight>
38
+
39
+ <br />
22
40
 
23
41
  ## Top Label
24
42
 
@@ -1,4 +1,10 @@
1
- import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
1
+ import {
2
+ ExampleCodeBlock,
3
+ StorybookStatusIndicator,
4
+ SymbolDoc,
5
+ Specifications,
6
+ } from '@workday/canvas-kit-docs';
7
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
2
8
 
3
9
  import Alert from './examples/Alert';
4
10
  import Basic from './examples/Basic';
@@ -14,15 +20,18 @@ import Required from './examples/Required';
14
20
  import ResizeConstraints from './examples/ResizeConstraints';
15
21
 
16
22
 
17
- # Canvas Kit Text Area
23
+ # Canvas Kit Text Area <StorybookStatusIndicator type="deprecated" />
18
24
 
19
- <StatusIndicator variant="red">
20
- <StatusIndicator.Label>Deprecated</StatusIndicator.Label>
21
- </StatusIndicator>
22
-
23
- `TextArea` in Preview has been deprecated and will be removed in a future major version. Please use
24
- [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic)
25
- instead.
25
+ <InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
26
+ <InformationHighlight.Icon />
27
+ <InformationHighlight.Body>
28
+ `TextArea` in Preview has been deprecated and will be removed in a future major version. Please
29
+ use `FormField` instead.
30
+ </InformationHighlight.Body>
31
+ <InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/story/components-inputs-form-field--docs">
32
+ Form Field Docs
33
+ </InformationHighlight.Link>
34
+ </InformationHighlight>
26
35
 
27
36
  TextArea's allow users to enter and edit multiple lines of text.
28
37
 
@@ -1,4 +1,10 @@
1
- import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
1
+ import {
2
+ ExampleCodeBlock,
3
+ StorybookStatusIndicator,
4
+ SymbolDoc,
5
+ Specifications,
6
+ } from '@workday/canvas-kit-docs';
7
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
2
8
 
3
9
  import Basic from './examples/Basic';
4
10
  import Disabled from './examples/Disabled';
@@ -18,15 +24,18 @@ import Error from './examples/Error';
18
24
  import Alert from './examples/Alert';
19
25
 
20
26
 
21
- # Canvas Kit Text Input
27
+ # Canvas Kit Text Input <StorybookStatusIndicator type="deprecated" />
22
28
 
23
- <StatusIndicator variant="red">
24
- <StatusIndicator.Label>Deprecated</StatusIndicator.Label>
25
- </StatusIndicator>
26
-
27
- `TextInput` in Preview has been deprecated and will be removed in a future major version. Please use
28
- [`FormField` in Preview](https://workday.github.io/canvas-kit/?path=/story/preview-inputs-form-field--basic)
29
- instead.
29
+ <InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
30
+ <InformationHighlight.Icon />
31
+ <InformationHighlight.Body>
32
+ `TextInput` in Preview has been deprecated and will be removed in a future major version. Please
33
+ use `FormField` instead.
34
+ </InformationHighlight.Body>
35
+ <InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/story/components-inputs-form-field--docs">
36
+ Form Field Docs
37
+ </InformationHighlight.Link>
38
+ </InformationHighlight>
30
39
 
31
40
  Text Inputs allow users to enter words or characters without styling.
32
41
 
@@ -78,7 +87,7 @@ Set `TextInput.Field`'s `type` prop to `hidden` to completly hide a field while
78
87
  value, often used for things like security tokens. Note: You will likely need to manually
79
88
  set`aria-describedby={undefined}`and`id={undefined}`
80
89
 
81
- <ExampleCodeBlock code={HiddenInput} />
90
+ <ExampleCodeBlock code={Hidden} />
82
91
 
83
92
  ### Ref Forwarding
84
93
 
@@ -1,21 +1,22 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
- import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
1
+ import {ExampleCodeBlock, StorybookStatusIndicator, SymbolDoc} from '@workday/canvas-kit-docs';
2
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
3
3
 
4
4
  import Basic from './examples/Basic';
5
5
  import Icon from './examples/Icon';
6
6
  import Emphasis from './examples/Emphasis';
7
7
  import MaxWidth from './examples/MaxWidth';
8
8
 
9
- # Canvas Kit Status Indicator
10
-
11
- <StatusIndicator variant="red">
12
- <StatusIndicator.Label>Deprecated</StatusIndicator.Label>
13
- </StatusIndicator>
14
-
15
- `StatusIndicator` in Main has been deprecated and will be removed in a future major version. Please
16
- use
17
- [`StatusIndicator`](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic)
18
- in Preview instead.
9
+ # Canvas Kit Status Indicator <StorybookStatusIndicator type="deprecated" />
10
+
11
+ <InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
12
+ <InformationHighlight.Icon />
13
+ <InformationHighlight.Body>
14
+ `StatusIndicator` in Main has been deprecated and will be removed in a future major version.
15
+ Please use [Status
16
+ Indicator](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--basic) in
17
+ Preview instead.
18
+ </InformationHighlight.Body>
19
+ </InformationHighlight>
19
20
 
20
21
  Status Indicators help the user quickly identify the status of a task, action, or page element.
21
22
 
@@ -1,18 +1,21 @@
1
- import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
- import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
1
+ import {ExampleCodeBlock, StorybookStatusIndicator, SymbolDoc} from '@workday/canvas-kit-docs';
2
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
3
3
  import Basic from './examples/LabelText/Basic';
4
4
  import Cursor from './examples/LabelText/Cursor';
5
5
  import Disabled from './examples/LabelText/Disabled';
6
6
 
7
- # Canvas Kit Label Text
8
-
9
- <StatusIndicator variant="red">
10
- <StatusIndicator.Label>Deprecated</StatusIndicator.Label>
11
- </StatusIndicator>
12
-
13
- `LabelText` has been deprecated and will be removed in a future major version. Please use
14
- [FormField.Label](https://workday.github.io/canvas-kit/?path=/docs/preview-inputs-form-field--basic)
15
- from Preview instead.
7
+ # Canvas Kit Label Text <StorybookStatusIndicator type="deprecated" />
8
+
9
+ <InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
10
+ <InformationHighlight.Icon />
11
+ <InformationHighlight.Body>
12
+ `LabelText` has been deprecated and will be removed in a future major version. Please use
13
+ `FormField.Label` instead.
14
+ </InformationHighlight.Body>
15
+ <InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/story/components-inputs-form-field--docs">
16
+ Form Field Docs
17
+ </InformationHighlight.Link>
18
+ </InformationHighlight>
16
19
 
17
20
  `LabelText` provides a simple way to render a label with built-in support for Canvas type tokens.
18
21
 
@@ -1,13 +1,12 @@
1
- import {ExampleCodeBlock} from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, StorybookStatusIndicator} from '@workday/canvas-kit-docs';
2
2
  import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';import {BorderRadius, Space, Depth, Colors, Type} from './examples/Tokens';
3
3
  import Overview from './examples/Overview';
4
4
 
5
5
 
6
- # Tokens
6
+ # Tokens <StorybookStatusIndicator type="deprecated" />
7
7
 
8
8
  <InformationHighlight variant="caution" className="sb-unstyled" cs={{p: {margin: 0}}}>
9
9
  <InformationHighlight.Icon />
10
- <InformationHighlight.Heading>React tokens have been deprecated!</InformationHighlight.Heading>
11
10
  <InformationHighlight.Body>
12
11
  The tokens documented below are deprecated and will be removed in a future release. You must
13
12
  migrate to the new Canvas Tokens Web package to ensure continued support and access to the
@@ -23,6 +22,8 @@ information. They enable building components and patterns with consistency acros
23
22
 
24
23
  <ExampleCodeBlock code={Overview} />
25
24
 
25
+ <br />
26
+
26
27
  ## Border Radius
27
28
 
28
29
  ### Usage
@@ -1,4 +1,4 @@
1
- import {AIIndicator, DownloadLLMFile} from '@workday/canvas-kit-docs';
1
+ import {StorybookStatusIndicator, DownloadLLMFile} from '@workday/canvas-kit-docs';
2
2
  import {StorybookInformationHighlight} from './StorybookInformationHighlight';
3
3
 
4
4
 
@@ -15,7 +15,7 @@ Canvas Kit v10+ introduces a new token system that replaces the old JavaScript-b
15
15
  Android
16
16
  - **Future-Proofing**: Aligns with modern CSS capabilities and Canvas Kit's long-term direction
17
17
 
18
- ## LLM Assisted Migration <AIIndicator />
18
+ ## LLM Assisted Migration <StorybookStatusIndicator type="ai" />
19
19
 
20
20
  We provide a **LLM migration mapping file** (`llm-token-migration.txt`) specifically designed for
21
21
  use with LLM-based code assistants (such as [Cursor](https://www.cursor.so/) or similar tools). This
@@ -23,8 +23,7 @@ file is not intended for direct human reference or team documentation, but rathe
23
23
  input for LLMs to automate and assist with your token migration process.
24
24
 
25
25
  > The LLM migration file is regularly updated to reflect the latest token mappings and best
26
- > practices.
27
- > For more details, see other sections of this migration guide.
26
+ > practices. For more details, see other sections of this migration guide.
28
27
 
29
28
  This file contains a comprehensive mapping of old Canvas Kit token usages to their new equivalents
30
29
  in `@workday/canvas-tokens-web`, along with migration tips and examples and formatted for optimal
package/index.ts 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,49 @@
1
+ import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
2
+ import {system} from '@workday/canvas-tokens-web';
3
+ import {sparkleSingleSmallIcon} from '@workday/canvas-system-icons-web';
4
+ import {createStencil} from '@workday/canvas-kit-styling';
5
+ import {systemIconStencil} from '@workday/canvas-kit-react/icon';
6
+
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
+
27
+ const content = {
28
+ ai: {
29
+ icon: sparkleSingleSmallIcon,
30
+ label: 'AI Content',
31
+ },
32
+ deprecated: {
33
+ icon: undefined,
34
+ label: 'Deprecated',
35
+ },
36
+ };
37
+
38
+ export const StorybookStatusIndicator = ({type}: {type: 'ai' | 'deprecated'}) => {
39
+ const {icon, label} = content[type];
40
+ return (
41
+ <StatusIndicator
42
+ className="sb-unstyled cnvs-title-status-indicator"
43
+ cs={storybookStatusIndicatorStencil({type})}
44
+ >
45
+ {icon && <StatusIndicator.Icon icon={icon} />}
46
+ <StatusIndicator.Label>{label}</StatusIndicator.Label>
47
+ </StatusIndicator>
48
+ );
49
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "14.0.0-alpha.1167-next.0",
3
+ "version": "14.0.0-alpha.1168-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.0.0-alpha.1167-next.0",
49
- "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1167-next.0",
50
- "@workday/canvas-kit-react": "^14.0.0-alpha.1167-next.0",
51
- "@workday/canvas-kit-styling": "^14.0.0-alpha.1167-next.0",
48
+ "@workday/canvas-kit-labs-react": "^14.0.0-alpha.1168-next.0",
49
+ "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1168-next.0",
50
+ "@workday/canvas-kit-react": "^14.0.0-alpha.1168-next.0",
51
+ "@workday/canvas-kit-styling": "^14.0.0-alpha.1168-next.0",
52
52
  "@workday/canvas-system-icons-web": "^3.0.35",
53
53
  "@workday/canvas-tokens-web": "3.0.0-alpha.5",
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": "25670463a46bad451356d0550adac0de8b5209b0"
64
+ "gitHead": "c7f43dc689c7377f48786bc8d99b0bace1431c86"
65
65
  }
@@ -1,2 +0,0 @@
1
- export declare const AIIndicator: () => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=AIIndicator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AIIndicator.d.ts","sourceRoot":"","sources":["../../../lib/AIIndicator.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,+CAgBvB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { systemIconStencil } from '@workday/canvas-kit-react/icon';
6
- export const AIIndicator = () => {
7
- return (_jsx(_Fragment, { children: _jsxs(StatusIndicator, { className: "sb-unstyled indicator", cs: {
8
- background: system.color.bg.ai.default,
9
- color: system.color.fg.ai,
10
- [systemIconStencil.vars.color]: system.color.fg.ai,
11
- }, children: [_jsx(StatusIndicator.Icon, { icon: sparkleSingleSmallIcon }), _jsx(StatusIndicator.Label, { children: "AI Content" })] }) }));
12
- };
@@ -1,22 +0,0 @@
1
- import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
2
- import {system} from '@workday/canvas-tokens-web';
3
- import {sparkleSingleSmallIcon} from '@workday/canvas-system-icons-web';
4
- import {systemIconStencil} from '@workday/canvas-kit-react/icon';
5
-
6
- export const AIIndicator = () => {
7
- return (
8
- <>
9
- <StatusIndicator
10
- className="sb-unstyled indicator"
11
- cs={{
12
- background: system.color.bg.ai.default,
13
- color: system.color.fg.ai,
14
- [systemIconStencil.vars.color]: system.color.fg.ai,
15
- }}
16
- >
17
- <StatusIndicator.Icon icon={sparkleSingleSmallIcon} />
18
- <StatusIndicator.Label>AI Content</StatusIndicator.Label>
19
- </StatusIndicator>
20
- </>
21
- );
22
- };