@workday/canvas-kit-docs 14.0.0-alpha.1233-next.0 → 14.0.0-alpha.1237-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.
Files changed (39) hide show
  1. package/dist/es6/lib/ExampleCodeBlock.js +2 -2
  2. package/dist/es6/lib/docs.js +117 -57
  3. package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
  4. package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
  5. package/dist/es6/mdx/installBlock.d.ts.map +1 -1
  6. package/dist/es6/mdx/installBlock.js +4 -1
  7. package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
  8. package/dist/es6/mdx/welcomePage.js +1 -1
  9. package/dist/mdx/14.0-UPGRADE-GUIDE.mdx +9 -7
  10. package/dist/mdx/MAINTAINING.mdx +4 -4
  11. package/dist/mdx/PACKAGES.mdx +9 -10
  12. package/dist/mdx/labs-react/search-form/SearchForm.mdx +8 -3
  13. package/dist/mdx/preview-react/divider/Divider.mdx +15 -5
  14. package/dist/mdx/preview-react/pill/Pill.mdx +4 -4
  15. package/dist/mdx/preview-react/radio/Radio.mdx +2 -2
  16. package/dist/mdx/preview-react/select/Select.mdx +1 -1
  17. package/dist/mdx/preview-react/status-indicator/StatusIndicator.mdx +2 -2
  18. package/dist/mdx/react/_examples/mdx/Layouts.mdx +1 -1
  19. package/dist/mdx/react/avatar/avatar/Avatar.mdx +10 -4
  20. package/dist/mdx/react/button/button/Button.mdx +21 -16
  21. package/dist/mdx/react/card/card.mdx +1 -1
  22. package/dist/mdx/react/checkbox/Checkbox.mdx +5 -5
  23. package/dist/mdx/react/combobox/Combobox.mdx +2 -2
  24. package/dist/mdx/react/form-field/FormField.mdx +2 -2
  25. package/dist/mdx/react/select/Select.mdx +6 -6
  26. package/dist/mdx/react/status-indicator/StatusIndicator.mdx +1 -1
  27. package/dist/mdx/react/switch/Switch.mdx +5 -5
  28. package/dist/mdx/react/table/Table.mdx +26 -13
  29. package/dist/mdx/react/text/BodyText.mdx +2 -2
  30. package/dist/mdx/react/text/Heading.mdx +2 -2
  31. package/dist/mdx/react/text/Subtext.mdx +2 -2
  32. package/dist/mdx/react/text/Text.mdx +2 -2
  33. package/dist/mdx/react/text/Title.mdx +2 -2
  34. package/dist/mdx/style-props/STYLE_PROPS.mdx +1 -1
  35. package/dist/mdx/styling/mdx/CustomizingStyles.mdx +8 -8
  36. package/dist/mdx/styling/mdx/Overview.mdx +7 -3
  37. package/dist/mdx/tokens/TokenMigrationFinal.mdx +1 -1
  38. package/lib/ExampleCodeBlock.tsx +3 -3
  39. package/package.json +6 -6
@@ -1,16 +1,17 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Basic';
3
3
  import BasicWithHeading from './examples/BasicWithHeading';
4
4
  import FixedColumn from './examples/FixedColumn';
5
5
  import RightToLeft from './examples/RightToLeft';
6
- import BaseHtmlTable from './examples/BaseHtmlTable'
6
+ import BaseHtmlTable from './examples/BaseHtmlTable';
7
7
 
8
8
  # Canvas Kit Table
9
9
 
10
10
  `Table` is a simple styled compound component that renders a
11
11
  [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) element. It is used to
12
12
  present information in a two-dimensional table comprised of rows and columns of cells containing
13
- data. `Table` is built off of `BaseTable` and is using [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features.
13
+ data. `Table` is built off of `BaseTable` and is using
14
+ [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features.
14
15
 
15
16
  ## Installation
16
17
 
@@ -22,9 +23,10 @@ yarn add @workday/canvas-kit-react
22
23
 
23
24
  ### Basic Example
24
25
 
25
- Users may not want to use a `caption` so they can import [Heading](/components/text/heading/) or
26
- [Text](/components/text/text/) instead. This will give the user more flexibility around the
27
- customization of the title/heading of their table.
26
+ Users may not want to use a `caption` so they can import
27
+ [Heading](https://workday.github.io/canvas-kit/?path=/docs/components-text-heading--docs) or
28
+ [Text](https://workday.github.io/canvas-kit/?path=/docs/components-text-text--docs) instead. This
29
+ will give the user more flexibility around the customization of the title/heading of their table.
28
30
 
29
31
  <ExampleCodeBlock code={BasicWithHeading} />
30
32
 
@@ -53,29 +55,40 @@ Users may add styles to the `Table.Header` to render a fixed column. The example
53
55
 
54
56
  ### Base Html Table Example
55
57
 
56
- If a user needs a standard HTML [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) with no [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features, then they can use the `BaseTable` component.
58
+ If a user needs a standard HTML
59
+ [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) with no
60
+ [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features, then they can
61
+ use the `BaseTable` component.
57
62
 
58
63
  <ExampleCodeBlock code={BaseHtmlTable} />
59
64
 
60
65
  ### Which Component Should I Use?
61
66
 
62
- > If a user wants [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features with their Table, then use the [Table](/components/containers/table/) component.
67
+ > If a user wants [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout)
68
+ > features with their Table, then use the
69
+ > [Table](https://workday.github.io/canvas-kit/?path=/docs/components-containers-table--docs#basic-example)
70
+ > component.
63
71
 
64
- > If a user __does not__ want [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features with their Table, then use the [BaseTable](/components/text/heading/) component.
72
+ > If a user **does not** want
73
+ > [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout) features with their
74
+ > Table, then use the
75
+ > [BaseTable](https://workday.github.io/canvas-kit/?path=/docs/components-containers-table--docs#base-html-table-example)
76
+ > component.
65
77
 
66
78
  ### Advanced
67
79
 
68
80
  You can also find several advanced Table examples in our Storybook Examples section.
69
81
 
70
- - [Expandable Rows](/docs/examples-tables-advanced--expandable-rows)
71
- - [Selectable Rows ](/docs/examples-tables-advanced--selectable-rows)
72
- - [Sortable Column Headers](/docs/examples-tables-advanced--sortable-column-headers)
82
+ - [Expandable Rows](https://workday.github.io/canvas-kit/?path=/docs/guides-accessibility-examples-advanced-tables--docs#expandable-rows)
83
+ - [Selectable Rows ](https://workday.github.io/canvas-kit/?path=/docs/guides-accessibility-examples-advanced-tables--docs#selectable-rows)
84
+ - [Filterable Column Headers](https://workday.github.io/canvas-kit/?path=/docs/guides-accessibility-examples-advanced-tables--docs#filterable-column-headers)
85
+ - [Sortable Column Headers](https://workday.github.io/canvas-kit/?path=/docs/guides-accessibility-examples-advanced-tables--docs#sortable-column-headers)
73
86
 
74
87
  ### Custom Styles
75
88
 
76
89
  Table and its subcomponents support custom styling via the `cs` prop. For more information, check
77
90
  our
78
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
91
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
79
92
 
80
93
  ## Component API
81
94
 
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/BodyText/Basic';
3
3
 
4
4
  # Canvas Kit Body Text
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Body Text supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';import Basic from './examples/Heading/Basic';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';import Basic from './examples/Heading/Basic';
2
2
 
3
3
 
4
4
  # Canvas Kit Heading
@@ -29,7 +29,7 @@ according to the [Canvas type hierarchy](/tokens/type/#type-styles).
29
29
  ### Custom Styles
30
30
 
31
31
  Heading supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Subtext/Basic';
3
3
 
4
4
  # Canvas Kit Subtext
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Subtext supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Text/Basic';
3
3
  import TypeLevel from './examples/Text/TypeLevel';
4
4
  import Variant from './examples/Text/Variant';
@@ -44,7 +44,7 @@ understanding of the text being rendered.
44
44
  ### Custom Styles
45
45
 
46
46
  Text supports custom styling via the `cs` prop. For more information, check our
47
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
47
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
48
48
 
49
49
  ## Component API
50
50
 
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
  import Basic from './examples/Title/Basic';
3
3
 
4
4
  # Canvas Kit Title
@@ -29,7 +29,7 @@ You may override the rendered element using the `as` prop.
29
29
  ### Custom Styles
30
30
 
31
31
  Title supports custom styling via the `cs` prop. For more information, check our
32
- ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs).
32
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
33
33
 
34
34
  ## Component API
35
35
 
@@ -42,7 +42,7 @@ with props.
42
42
  <InformationHighlight.Icon />
43
43
  <InformationHighlight.Heading> Caution: Performance Hit</InformationHighlight.Heading>
44
44
  <InformationHighlight.Body>
45
- As we transition away from Emotion's runtime costs, we advise against using style props. Please use our <Hyperlink src="https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started--docs">styling utilities</Hyperlink> instead. For more information on this change, view our discussion on the <Hyperlink src="https://github.com/Workday/canvas-kit/discussions/2265">Future of Styling</Hyperlink>.
45
+ As we transition away from Emotion's runtime costs, we advise against using style props. Please use our <Hyperlink src="https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs">styling utilities</Hyperlink> instead. For more information on this change, view our discussion on the <Hyperlink src="https://github.com/Workday/canvas-kit/discussions/2265">Future of Styling</Hyperlink>.
46
46
  </InformationHighlight.Body>
47
47
  </InformationHighlight>
48
48
 
@@ -11,9 +11,9 @@ here are the following options:
11
11
 
12
12
  ### Using `createStyles` with `cs` prop
13
13
 
14
- Use `createStyles` in tandem with `cs` prop when you're overriding static styles and making small modifications to an
15
- existing Canvas Kit component like padding, color and flex properties. Take our `Text` component as
16
- an example.
14
+ Use `createStyles` in tandem with `cs` prop when you're overriding static styles and making small
15
+ modifications to an existing Canvas Kit component like padding, color and flex properties. Take our
16
+ `Text` component as an example.
17
17
 
18
18
  ```tsx
19
19
  import {createStyles} from '@Workday/canvas-kit-styling';
@@ -45,8 +45,8 @@ const uppercaseTextStyles = createStyles({
45
45
  <Text className={uppercaseTextStyles}>My uppercased text</Text>;
46
46
  ```
47
47
 
48
- If you need to dynamically apply styles based on some state or prop, use [Stencils](#stencils) instead.
49
-
48
+ If you need to dynamically apply styles based on some state or prop, use [Stencils](#stencils)
49
+ instead.
50
50
 
51
51
  ## Stencils
52
52
 
@@ -54,8 +54,8 @@ Stencils can be useful when applying dynamic styles or building your own reusabl
54
54
 
55
55
  ### Extending Stencils
56
56
 
57
- [Stencils](https://workday.github.io/canvas-kit/?path=/docs/styling-basics--create-stencil) help you
58
- organize the styling of reusable components into base styles, modifiers, and variables. The
57
+ [Stencils](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-create-stencil--docs)
58
+ help you organize the styling of reusable components into base styles, modifiers, and variables. The
59
59
  organization makes it more natural to produce static and clean CSS with optional extraction into CSS
60
60
  files.
61
61
 
@@ -175,5 +175,5 @@ const NavIcon = ({
175
175
  ```
176
176
 
177
177
  Another example of Stencil extension and customization is our
178
- [CustomButton](https://workday.github.io/canvas-kit/?path=/story/components-buttons--custom-styles)
178
+ [CustomButton](https://workday.github.io/canvas-kit/?path=/story/components-buttons--docs#custom-styles)
179
179
  example. This example highlights the power of inheritance that you get from extending stencils.
@@ -17,7 +17,7 @@ static parsing process for build time. This system offers several key benefits:
17
17
 
18
18
  The motivation behind this custom styling solution stems from the need to move beyond IE11 support
19
19
  and implement performance improvements using static styling methods. For more details, refer to the
20
- [Why Canvas Kit Styling](https://workday.github.io/canvas-kit/?path=/docs/styling-why-canvas-styling--docs)
20
+ [Why Canvas Kit Styling](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-why-canvas-styling--docs)
21
21
  section.
22
22
 
23
23
  ## Overview
@@ -326,7 +326,9 @@ together and applies `className` and `style` attributes to a React element.
326
326
  <InformationHighlight.Icon />
327
327
  <InformationHighlight.Heading>Information</InformationHighlight.Heading>
328
328
  <InformationHighlight.Body>
329
- For a more in depth overview, please view our <Hyperlink href="https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-create-styles--docs"> Create Styles </Hyperlink> docs.
329
+ For a more in depth overview, please view our [Create
330
+ Styles](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-create-styles--docs)
331
+ docs.
330
332
  </InformationHighlight.Body>
331
333
  </InformationHighlight>
332
334
 
@@ -396,6 +398,8 @@ const ThemedCard = ({isDarkTheme, headerColor, elemProps}) => {
396
398
  <InformationHighlight.Icon />
397
399
  <InformationHighlight.Heading>Information</InformationHighlight.Heading>
398
400
  <InformationHighlight.Body>
399
- For a more in depth overview, please view our <Hyperlink href="https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-create-stencil--docs">Create Stencil</Hyperlink> docs.
401
+ For a more in depth overview, please view our [Create
402
+ Stencil](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-create-stencil--docs)
403
+ docs.
400
404
  </InformationHighlight.Body>
401
405
  </InformationHighlight>
@@ -196,6 +196,6 @@ After completing the token migration:
196
196
  ## Resources
197
197
 
198
198
  - [Canvas Tokens Documentation](https://canvas.workday.com/styles/tokens/)
199
- - [Canvas Kit Styling Documentation](https://workday.github.io/canvas-kit/?path=/docs/features-styling-welcome--page)
199
+ - [Canvas Kit Styling Documentation](https://workday.github.io/canvas-kit/?path=/docs/styling-getting-started-overview--docs)
200
200
  - [Token Migration Discussion](https://github.com/Workday/canvas-tokens/discussions/77)
201
201
  - [Canvas Kit GitHub Repository](https://github.com/Workday/canvas-kit)
@@ -18,7 +18,7 @@ import eslintrc from '!!raw-loader!./stackblitzFiles/.eslintrc.cjs.txt';
18
18
  import tsconfigNodeFile from '!!raw-loader!./stackblitzFiles/tsconfig.node.json';
19
19
  import appFile from '!!raw-loader!./stackblitzFiles/App.tsx';
20
20
  import viteEnvFile from '!!raw-loader!./stackblitzFiles/vite-env.d.ts';
21
- import {CanvasProvider, defaultCanvasTheme} from '@workday/canvas-kit-react/common';
21
+ import {CanvasProvider, defaultBranding} from '@workday/canvas-kit-react/common';
22
22
 
23
23
  const cardStencil = createStencil({
24
24
  base: {
@@ -124,7 +124,7 @@ export const ExampleCodeBlock = ({code}: any) => {
124
124
  <div {...cardStencil({opened: isCodeDisplayed})}>
125
125
  <Card data-part="example-block" className="sb-unstyled">
126
126
  <Card.Body>
127
- <CanvasProvider theme={{canvas: defaultCanvasTheme}}>
127
+ <CanvasProvider className={defaultBranding}>
128
128
  {React.createElement(code)}
129
129
  {code && (
130
130
  <div data-part="code-toggle-stackblitz-btn-container">
@@ -144,7 +144,7 @@ export const ExampleCodeBlock = ({code}: any) => {
144
144
  </Card>
145
145
  <Card data-part="code-block" padding={0}>
146
146
  <Card.Body cs={{position: 'relative'}}>
147
- <CanvasProvider theme={{canvas: defaultCanvasTheme}}>
147
+ <CanvasProvider className={defaultBranding}>
148
148
  {code && (
149
149
  <div ref={textInput}>
150
150
  <SyntaxHighlighter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "14.0.0-alpha.1233-next.0",
3
+ "version": "14.0.0-alpha.1237-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.1233-next.0",
49
- "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1233-next.0",
50
- "@workday/canvas-kit-react": "^14.0.0-alpha.1233-next.0",
51
- "@workday/canvas-kit-styling": "^14.0.0-alpha.1233-next.0",
48
+ "@workday/canvas-kit-labs-react": "^14.0.0-alpha.1237-next.0",
49
+ "@workday/canvas-kit-preview-react": "^14.0.0-alpha.1237-next.0",
50
+ "@workday/canvas-kit-react": "^14.0.0-alpha.1237-next.0",
51
+ "@workday/canvas-kit-styling": "^14.0.0-alpha.1237-next.0",
52
52
  "@workday/canvas-system-icons-web": "^3.0.35",
53
53
  "@workday/canvas-tokens-web": "3.0.0-alpha.12",
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": "7ed1570b966cb8473b3db07695fb2bc86af7739c"
64
+ "gitHead": "8a03bc6fdf11ecb2672ad937247aaf18b7cee0ec"
65
65
  }