@workday/canvas-kit-docs 14.0.0-alpha.1230-next.0 → 14.0.0-alpha.1234-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/docs.js +138 -980
- package/dist/es6/mdx/installBlock.d.ts.map +1 -1
- package/dist/es6/mdx/installBlock.js +4 -1
- package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
- package/dist/es6/mdx/welcomePage.js +1 -1
- package/dist/mdx/14.0-UPGRADE-GUIDE.mdx +84 -36
- package/dist/mdx/MAINTAINING.mdx +4 -4
- package/dist/mdx/PACKAGES.mdx +9 -10
- package/dist/mdx/labs-react/combobox/Combobox.mdx +1 -1
- package/dist/mdx/labs-react/search-form/SearchForm.mdx +21 -4
- package/dist/mdx/preview-react/_examples/mdx/examples/TextInputWithFormik.tsx +35 -28
- package/dist/mdx/preview-react/_examples/mdx/examples/TextInputWithReactHookForm.tsx +27 -21
- package/dist/mdx/preview-react/divider/Divider.mdx +15 -5
- package/dist/mdx/preview-react/pill/Pill.mdx +4 -4
- package/dist/mdx/preview-react/radio/Radio.mdx +2 -2
- package/dist/mdx/preview-react/select/Select.mdx +1 -1
- package/dist/mdx/preview-react/status-indicator/StatusIndicator.mdx +2 -2
- package/dist/mdx/react/_examples/mdx/Layouts.mdx +1 -1
- package/dist/mdx/react/_examples/mdx/examples/common/FilterListWithLiveStatus.tsx +8 -5
- package/dist/mdx/react/_examples/mdx/examples/common/HiddenLiveRegion.tsx +8 -5
- package/dist/mdx/react/_examples/mdx/examples/common/TextInputWithLiveError.tsx +11 -8
- package/dist/mdx/react/_examples/mdx/examples/common/VisibleLiveRegion.tsx +9 -5
- package/dist/mdx/react/avatar/avatar/Avatar.mdx +10 -4
- package/dist/mdx/react/button/button/Button.mdx +21 -16
- package/dist/mdx/react/card/card.mdx +1 -1
- package/dist/mdx/react/checkbox/Checkbox.mdx +5 -5
- package/dist/mdx/react/combobox/Combobox.mdx +2 -2
- package/dist/mdx/react/form-field/FormField.mdx +2 -2
- package/dist/mdx/react/select/Select.mdx +6 -6
- package/dist/mdx/react/status-indicator/StatusIndicator.mdx +1 -1
- package/dist/mdx/react/switch/Switch.mdx +5 -5
- package/dist/mdx/react/table/Table.mdx +26 -13
- package/dist/mdx/react/text/BodyText.mdx +2 -2
- package/dist/mdx/react/text/Heading.mdx +2 -2
- package/dist/mdx/react/text/Subtext.mdx +2 -2
- package/dist/mdx/react/text/Text.mdx +2 -2
- package/dist/mdx/react/text/Title.mdx +2 -2
- package/dist/mdx/style-props/STYLE_PROPS.mdx +1 -1
- package/dist/mdx/styling/mdx/CustomizingStyles.mdx +8 -8
- package/dist/mdx/styling/mdx/Overview.mdx +7 -3
- package/dist/mdx/tokens/TokenMigrationFinal.mdx +1 -1
- package/package.json +6 -6
- package/dist/mdx/preview-react/text-area/TextArea.mdx +0 -136
- package/dist/mdx/preview-react/text-area/examples/Alert.tsx +0 -35
- package/dist/mdx/preview-react/text-area/examples/Basic.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/Disabled.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/Error.tsx +0 -40
- package/dist/mdx/preview-react/text-area/examples/Grow.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/HiddenLabel.tsx +0 -22
- package/dist/mdx/preview-react/text-area/examples/LabelPositionHorizontal.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/LabelPositionVertical.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/Placeholder.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/RefForwarding.tsx +0 -28
- package/dist/mdx/preview-react/text-area/examples/Required.tsx +0 -17
- package/dist/mdx/preview-react/text-area/examples/ResizeConstraints.tsx +0 -22
- package/dist/mdx/preview-react/text-input/TextInput.mdx +0 -170
- package/dist/mdx/preview-react/text-input/examples/Alert.tsx +0 -33
- package/dist/mdx/preview-react/text-input/examples/Basic.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/Disabled.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/Error.tsx +0 -40
- package/dist/mdx/preview-react/text-input/examples/Grow.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/Hidden.tsx +0 -11
- package/dist/mdx/preview-react/text-input/examples/HiddenLabel.tsx +0 -22
- package/dist/mdx/preview-react/text-input/examples/LabelPositionHorizontal.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/LabelPositionVertical.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/Password.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/Placeholder.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/ReadOnly.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/RefForwarding.tsx +0 -28
- package/dist/mdx/preview-react/text-input/examples/Required.tsx +0 -17
- package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +0 -51
- package/dist/mdx/preview-react/text-input/examples/ThemedError.tsx +0 -40
- package/dist/mdx/react/_examples/mdx/SearchForm.mdx +0 -19
- package/dist/mdx/react/_examples/mdx/examples/SearchFormBasic.tsx +0 -35
|
@@ -28,9 +28,9 @@ information to help with scanning and organization.
|
|
|
28
28
|
|
|
29
29
|
### Basic Pills
|
|
30
30
|
|
|
31
|
-
By default a Pill is considered interactive. All leading
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
By default a Pill is considered interactive. All leading elements (icons or avatars) are intended to
|
|
32
|
+
be descriptive, helping support the label. Do not rely on the leading element to indicate the
|
|
33
|
+
interaction behavior.
|
|
34
34
|
|
|
35
35
|
#### Icon
|
|
36
36
|
|
|
@@ -101,7 +101,7 @@ accordingly.
|
|
|
101
101
|
### Custom Styles
|
|
102
102
|
|
|
103
103
|
`Pill` supports custom styling via the `cs` prop. For more information, check our
|
|
104
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
104
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs)
|
|
105
105
|
or view the example below.
|
|
106
106
|
|
|
107
107
|
<ExampleCodeBlock code={CustomStyles} />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
|
|
2
2
|
|
|
3
3
|
import Basic from './examples/Basic';
|
|
4
4
|
import Alert from './examples/Alert';
|
|
@@ -139,7 +139,7 @@ how to use `RadioGroup` with React Hook Form.
|
|
|
139
139
|
|
|
140
140
|
Radio and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
141
141
|
our
|
|
142
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
142
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
143
143
|
|
|
144
144
|
## Component API
|
|
145
145
|
|
|
@@ -32,7 +32,7 @@ import GrowLeft from './examples/Left Label/GrowLeft';
|
|
|
32
32
|
use `Select` in Main instead.
|
|
33
33
|
</InformationHighlight.Body>
|
|
34
34
|
<InformationHighlight.Link href="https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--docs">
|
|
35
|
-
|
|
35
|
+
Select (main) Docs
|
|
36
36
|
</InformationHighlight.Link>
|
|
37
37
|
</InformationHighlight>
|
|
38
38
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
|
|
2
2
|
|
|
3
3
|
import Basic from './examples/Basic';
|
|
4
4
|
import Emphasis from './examples/Emphasis';
|
|
@@ -75,7 +75,7 @@ The background color dictated by the `variant` will be dark or light based on th
|
|
|
75
75
|
|
|
76
76
|
Status Indicator and its subcomponents support custom styling via the `cs` prop. For more
|
|
77
77
|
information, check our
|
|
78
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
78
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
79
79
|
|
|
80
80
|
## Component API
|
|
81
81
|
|
|
@@ -14,7 +14,7 @@ import Tiled4and2Columns from './examples/layout/Tiled4and2Columns';
|
|
|
14
14
|
|
|
15
15
|
Below are layout examples to reference as you build your own. For more in-depth information on our
|
|
16
16
|
`Grid` component, please reference our
|
|
17
|
-
[`Grid` documentation](https://workday.github.io/canvas-kit
|
|
17
|
+
[`Grid` documentation](https://workday.github.io/canvas-kit/?path=/docs/components-layout-grid--docs).
|
|
18
18
|
|
|
19
19
|
## Area Column Positioning
|
|
20
20
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, {useState} from 'react';
|
|
2
|
-
import {TextInput} from '@workday/canvas-kit-
|
|
2
|
+
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
3
3
|
import {BodyText, Heading} from '@workday/canvas-kit-react/text';
|
|
4
4
|
import {AriaLiveRegion} from '@workday/canvas-kit-react/common';
|
|
5
5
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import {system} from '@workday/canvas-tokens-web';
|
|
7
7
|
import {createStyles, px2rem} from '@workday/canvas-kit-styling';
|
|
8
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
8
9
|
|
|
9
10
|
const fruits = [
|
|
10
11
|
'Apples',
|
|
@@ -49,10 +50,12 @@ export default () => {
|
|
|
49
50
|
</BodyText>
|
|
50
51
|
</AriaLiveRegion>
|
|
51
52
|
</Flex>
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
53
|
+
<FormField>
|
|
54
|
+
<FormField.Label>Filter Items:</FormField.Label>
|
|
55
|
+
<FormField.Field>
|
|
56
|
+
<FormField.Input as={TextInput} value={filter} onChange={handleFilter} />
|
|
57
|
+
</FormField.Field>
|
|
58
|
+
</FormField>
|
|
56
59
|
<ul style={listStyles}>
|
|
57
60
|
{filteredFruits.map(i => (
|
|
58
61
|
<BodyText size="small" as="li" cs={listItemStyles} key={i}>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, {useState, useRef} from 'react';
|
|
2
2
|
import {AriaLiveRegion, AccessibleHide} from '@workday/canvas-kit-react/common';
|
|
3
3
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {TextInput} from '@workday/canvas-kit-
|
|
4
|
+
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
5
5
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
7
8
|
|
|
8
9
|
export default () => {
|
|
9
10
|
const [message, setMessage] = useState('This is an ARIA Live Region!');
|
|
@@ -16,10 +17,12 @@ export default () => {
|
|
|
16
17
|
return (
|
|
17
18
|
<>
|
|
18
19
|
<Flex gap={`var(${system.space.x4})`} alignItems="flex-end">
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
20
|
+
<FormField>
|
|
21
|
+
<FormField.Label>Type your message:</FormField.Label>
|
|
22
|
+
<FormField.Field>
|
|
23
|
+
<FormField.Input as={TextInput} ref={inputRef} />
|
|
24
|
+
</FormField.Field>
|
|
25
|
+
</FormField>
|
|
23
26
|
<PrimaryButton onClick={handleSendMessage}>Send Message</PrimaryButton>
|
|
24
27
|
</Flex>
|
|
25
28
|
<AriaLiveRegion>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, {useState, useRef} from 'react';
|
|
2
|
-
import {TextInput} from '@workday/canvas-kit-
|
|
2
|
+
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
3
3
|
import {AriaLiveRegion, changeFocus} from '@workday/canvas-kit-react/common';
|
|
4
4
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
5
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
5
6
|
|
|
6
7
|
export default () => {
|
|
7
8
|
const errMsg = 'Error: First name is required.';
|
|
@@ -12,13 +13,15 @@ export default () => {
|
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
15
|
<>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
<FormField error={hasError ? 'error' : undefined} isRequired={true}>
|
|
17
|
+
<FormField.Label>First Name:</FormField.Label>
|
|
18
|
+
<FormField.Field>
|
|
19
|
+
<FormField.Input onBlur={handleBlur} as={TextInput} ref={inputRef} />
|
|
20
|
+
<FormField.Hint>
|
|
21
|
+
<AriaLiveRegion>{hasError && errMsg}</AriaLiveRegion>
|
|
22
|
+
</FormField.Hint>
|
|
23
|
+
</FormField.Field>
|
|
24
|
+
</FormField>
|
|
22
25
|
<PrimaryButton onClick={handleSubmit}>Continue</PrimaryButton>
|
|
23
26
|
</>
|
|
24
27
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, {useState, useRef} from 'react';
|
|
2
2
|
import {AriaLiveRegion} from '@workday/canvas-kit-react/common';
|
|
3
3
|
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
4
|
-
import {
|
|
4
|
+
import {FormField} from '@workday/canvas-kit-react/form-field';
|
|
5
|
+
import {TextInput} from '@workday/canvas-kit-react/text-input';
|
|
5
6
|
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
6
7
|
import {Text} from '@workday/canvas-kit-react/text';
|
|
7
8
|
import {system} from '@workday/canvas-tokens-web';
|
|
@@ -18,6 +19,7 @@ const liveRegionStyle = createStyles({
|
|
|
18
19
|
export default () => {
|
|
19
20
|
const [message, setMessage] = useState('This is an ARIA Live Region!');
|
|
20
21
|
const inputRef = useRef();
|
|
22
|
+
|
|
21
23
|
function handleSendMessage() {
|
|
22
24
|
setMessage(inputRef.current.value);
|
|
23
25
|
inputRef.current.value = '';
|
|
@@ -29,10 +31,12 @@ export default () => {
|
|
|
29
31
|
<Text cs={liveRegionStyle}>{message}</Text>
|
|
30
32
|
</AriaLiveRegion>
|
|
31
33
|
<Flex gap={`var(${system.space.x4})`} alignItems="flex-end">
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
34
|
+
<FormField>
|
|
35
|
+
<FormField.Label>Type your message:</FormField.Label>
|
|
36
|
+
<FormField.Field>
|
|
37
|
+
<FormField.Input as={TextInput} ref={inputRef} />
|
|
38
|
+
</FormField.Field>
|
|
39
|
+
</FormField>
|
|
36
40
|
<PrimaryButton onClick={handleSendMessage}>Send Message</PrimaryButton>
|
|
37
41
|
</Flex>
|
|
38
42
|
</>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Specifications,
|
|
3
|
+
SymbolDoc,
|
|
4
|
+
SymbolDescription,
|
|
5
|
+
ExampleCodeBlock,
|
|
6
|
+
StorybookStatusIndicator,
|
|
7
|
+
} from '@workday/canvas-kit-docs';
|
|
2
8
|
import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
|
|
3
9
|
|
|
4
10
|
import Basic from './examples/Basic';
|
|
@@ -16,9 +22,9 @@ import CustomStyles from './examples/CustomStyles';
|
|
|
16
22
|
<InformationHighlight className="sb-unstyled" variant="caution" cs={{p: {marginBlock: 0}}}>
|
|
17
23
|
<InformationHighlight.Icon />
|
|
18
24
|
<InformationHighlight.Body>
|
|
19
|
-
`Avatar` in Main has been deprecated and will be removed in a future major version.
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
`Avatar` in Main has been deprecated and will be removed in a future major version. Please use
|
|
26
|
+
[Avatar](https://workday.github.io/canvas-kit/?path=/docs/preview-avatar--docs) in Preview
|
|
27
|
+
instead.
|
|
22
28
|
</InformationHighlight.Body>
|
|
23
29
|
</InformationHighlight>
|
|
24
30
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
ExampleCodeBlock,
|
|
3
|
+
Specifications,
|
|
4
|
+
SymbolDoc,
|
|
5
|
+
SymbolDescription,
|
|
6
6
|
} from '@workday/canvas-kit-docs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import {Pill} from '@workday/canvas-kit-preview-react/pill';
|
|
8
|
+
import {accessibilityIcon} from '@workday/canvas-system-icons-web';
|
|
9
9
|
|
|
10
10
|
import Primary from './examples/Primary';
|
|
11
11
|
import PrimaryInverse from './examples/PrimaryInverse';
|
|
@@ -89,27 +89,31 @@ the width of the button to the width of its container.
|
|
|
89
89
|
### Custom Styles
|
|
90
90
|
|
|
91
91
|
All of our buttons support custom styling via the `cs` prop. For more information, check our
|
|
92
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
92
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs)
|
|
93
93
|
or view the example below.
|
|
94
94
|
|
|
95
95
|
<ExampleCodeBlock code={CustomStyles} />
|
|
96
96
|
|
|
97
97
|
### Theme Overrides
|
|
98
98
|
|
|
99
|
-
The most common way to theme our buttons is to pass a `theme` object at the root level of the
|
|
99
|
+
The most common way to theme our buttons is to pass a `theme` object at the root level of the
|
|
100
|
+
application via the `CanvasProvider`. In the example below, our buttons use our `brand.action.**`
|
|
101
|
+
tokens with the fallback being `brand.primary.**`.
|
|
100
102
|
|
|
101
|
-
> **Caution:** Setting `--cnvs-brand-action**` tokens at the `:root` CSS will override all
|
|
103
|
+
> **Caution:** Setting `--cnvs-brand-action**` tokens at the `:root` CSS will override all
|
|
104
|
+
> `PrimaryButton` theme colors set at the `CanvasProvider` level.
|
|
102
105
|
|
|
103
|
-
> **Note:** You should **not** individually theme components wrapping them with the
|
|
106
|
+
> **Note:** You should **not** individually theme components wrapping them with the
|
|
107
|
+
> `CanvasProvider`, but rather theme at the root level of the application.
|
|
104
108
|
|
|
105
109
|
<ExampleCodeBlock code={ThemeOverrides} />
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
## Accessibility
|
|
108
112
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
<Pill className="sb-unstyled">
|
|
114
|
+
<Pill.Icon icon={accessibilityIcon} />
|
|
115
|
+
<Pill.Label>WAI-ARIA Reference</Pill.Label>
|
|
116
|
+
</Pill>
|
|
113
117
|
|
|
114
118
|
### Accessible Use of the `as` Prop
|
|
115
119
|
|
|
@@ -120,7 +124,8 @@ should be used for navigation.
|
|
|
120
124
|
|
|
121
125
|
### Role
|
|
122
126
|
|
|
123
|
-
By default buttons have a `role` of `button`. If you wish to use buttons in the context of a form,
|
|
127
|
+
By default buttons have a `role` of `button`. If you wish to use buttons in the context of a form,
|
|
128
|
+
the role should be set to type `submit`.
|
|
124
129
|
|
|
125
130
|
## Component API
|
|
126
131
|
|
|
@@ -48,7 +48,7 @@ grayish background to create visual separation from the page background.
|
|
|
48
48
|
### Custom Styles
|
|
49
49
|
|
|
50
50
|
Card and its subcomponents support custom styling via the `cs` prop. For more information, check our
|
|
51
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
51
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
52
52
|
|
|
53
53
|
<ExampleCodeBlock code={WithCustomStyles} />
|
|
54
54
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
ExampleCodeBlock,
|
|
3
|
+
SymbolDoc,
|
|
4
|
+
Specifications,
|
|
5
|
+
InformationHighlight,
|
|
6
6
|
} from '@workday/canvas-kit-docs';
|
|
7
7
|
import Alert from './examples/Alert';
|
|
8
8
|
import Basic from './examples/Basic';
|
|
@@ -104,7 +104,7 @@ or `Checkbox.ErrorType.Error` if Form Field is not being used.
|
|
|
104
104
|
### Custom Styles
|
|
105
105
|
|
|
106
106
|
Checkbox supports custom styling via the `cs` prop. For more information, check our
|
|
107
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
107
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
108
108
|
|
|
109
109
|
## Component API
|
|
110
110
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ExampleCodeBlock, SymbolDoc, Specifications} from '@workday/canvas-kit-docs';
|
|
2
2
|
import Autocomplete from './examples/Autocomplete';
|
|
3
3
|
|
|
4
4
|
# Combobox
|
|
@@ -72,7 +72,7 @@ An Autocomplete is an example of an arbitrary combobox.
|
|
|
72
72
|
|
|
73
73
|
Combobox and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
74
74
|
our
|
|
75
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
75
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
76
76
|
|
|
77
77
|
## Component API
|
|
78
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ExampleCodeBlock, Specifications, SymbolDoc} from '@workday/canvas-kit-docs';
|
|
2
2
|
import Basic from './examples/Basic';
|
|
3
3
|
import Alert from './examples/Alert';
|
|
4
4
|
import Error from './examples/Error';
|
|
@@ -202,7 +202,7 @@ You can theme your error rings by wrapping an input in a `CanvasProvider` and de
|
|
|
202
202
|
|
|
203
203
|
Form Field and its subcomponents support custom styling via the `cs` prop. For more information,
|
|
204
204
|
check our
|
|
205
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
205
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
206
206
|
|
|
207
207
|
## Component API
|
|
208
208
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
ExampleCodeBlock,
|
|
3
|
+
InformationHighlight,
|
|
4
|
+
SymbolDoc,
|
|
5
|
+
Specifications,
|
|
6
6
|
} from '@workday/canvas-kit-docs';
|
|
7
7
|
import Alert from './examples/Alert';
|
|
8
8
|
import Basic from './examples/Basic';
|
|
@@ -20,7 +20,7 @@ import HoistedModel from './examples/HoistedModel';
|
|
|
20
20
|
import RefForwarding from './examples/RefForwarding';
|
|
21
21
|
import FetchingDynamicItems from './examples/FetchingDynamicItems';
|
|
22
22
|
import Placeholder from './examples/Placeholder';
|
|
23
|
-
import InitialSelectedItem from './examples/InitialSelectedItem';import {
|
|
23
|
+
import InitialSelectedItem from './examples/InitialSelectedItem';import {Table} from '@workday/canvas-kit-react/table';
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
# Canvas Kit Select
|
|
@@ -305,7 +305,7 @@ prop as well as the `value` DOM property and will update the model accordingly.
|
|
|
305
305
|
|
|
306
306
|
Select and its subcomponents support custom styling via the `cs` prop. For more information, check
|
|
307
307
|
our
|
|
308
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
308
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
309
309
|
|
|
310
310
|
## Component API
|
|
311
311
|
|
|
@@ -13,7 +13,7 @@ import MaxWidth from './examples/MaxWidth';
|
|
|
13
13
|
<InformationHighlight.Body>
|
|
14
14
|
`StatusIndicator` in Main has been deprecated and will be removed in a future major version.
|
|
15
15
|
Please use [Status
|
|
16
|
-
Indicator](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--
|
|
16
|
+
Indicator](https://workday.github.io/canvas-kit/?path=/docs/preview-status-indicator--docs) in
|
|
17
17
|
Preview instead.
|
|
18
18
|
</InformationHighlight.Body>
|
|
19
19
|
</InformationHighlight>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
ExampleCodeBlock,
|
|
3
|
+
SymbolDoc,
|
|
4
|
+
Specifications,
|
|
5
|
+
InformationHighlight,
|
|
6
6
|
} from '@workday/canvas-kit-docs';
|
|
7
7
|
import Alert from './examples/Alert';
|
|
8
8
|
import Basic from './examples/Basic';
|
|
@@ -73,7 +73,7 @@ The `error` prop may be applied directly to the Switch with a value of `Switch.E
|
|
|
73
73
|
### Custom Styles
|
|
74
74
|
|
|
75
75
|
Switch supports custom styling via the `cs` prop. For more information, check our
|
|
76
|
-
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-
|
|
76
|
+
["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
|
|
77
77
|
|
|
78
78
|
## Component API
|
|
79
79
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
26
|
-
[
|
|
27
|
-
|
|
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
|
|
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)
|
|
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
|
|
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
|
|
71
|
-
- [Selectable Rows ](/docs/examples-tables
|
|
72
|
-
- [
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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
|
|