@workday/canvas-kit-docs 16.2.12 → 16.2.15
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 +43 -2
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +5 -5
- package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +5 -5
- package/dist/mdx/labs-react/accessory/Accessory.mdx +1 -13
- package/dist/mdx/labs-react/selection-group/SelectionGroup.mdx +7 -4
- package/dist/mdx/react/action-bar/ActionBar.mdx +9 -0
- package/dist/mdx/react/action-bar/examples/IconOnly.tsx +15 -0
- package/dist/mdx/react/action-bar/examples/index.ts +1 -0
- package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +1 -1
- package/package.json +8 -7
package/dist/es6/lib/docs.js
CHANGED
|
@@ -132365,13 +132365,13 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
132365
132365
|
{
|
|
132366
132366
|
"kind": "property",
|
|
132367
132367
|
"name": "children",
|
|
132368
|
-
"required":
|
|
132368
|
+
"required": false,
|
|
132369
132369
|
"type": {
|
|
132370
132370
|
"kind": "external",
|
|
132371
132371
|
"name": "ReactNode",
|
|
132372
132372
|
"url": "https://reactjs.org/docs/rendering-elements.html"
|
|
132373
132373
|
},
|
|
132374
|
-
"description": "The contents of the action item. This will be the accessible name of the action for screen readers.\n\n```tsx\n<ActionBar.Item>First Action</ActionBar.Item>\n```",
|
|
132374
|
+
"description": "The contents of the action item. This will be the accessible name of the action for screen readers.\nOmit it to render an icon-only button, and provide an `aria-label` instead.\n\n```tsx\n<ActionBar.Item>First Action</ActionBar.Item>\n<ActionBar.Item icon={trashIcon} aria-label=\"Delete\" />\n```",
|
|
132375
132375
|
"declarations": [
|
|
132376
132376
|
{
|
|
132377
132377
|
"name": "children",
|
|
@@ -505076,6 +505076,47 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
505076
505076
|
],
|
|
505077
505077
|
"tags": {}
|
|
505078
505078
|
},
|
|
505079
|
+
{
|
|
505080
|
+
"kind": "property",
|
|
505081
|
+
"name": "onKeyDown",
|
|
505082
|
+
"type": {
|
|
505083
|
+
"kind": "function",
|
|
505084
|
+
"parameters": [
|
|
505085
|
+
{
|
|
505086
|
+
"kind": "parameter",
|
|
505087
|
+
"name": "event",
|
|
505088
|
+
"type": {
|
|
505089
|
+
"kind": "symbol",
|
|
505090
|
+
"name": "React.KeyboardEvent",
|
|
505091
|
+
"value": "KeyboardEvent<T>"
|
|
505092
|
+
},
|
|
505093
|
+
"required": true,
|
|
505094
|
+
"rest": false,
|
|
505095
|
+
"description": "",
|
|
505096
|
+
"declarations": [
|
|
505097
|
+
{
|
|
505098
|
+
"name": "event",
|
|
505099
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/useTooltip.tsx"
|
|
505100
|
+
}
|
|
505101
|
+
],
|
|
505102
|
+
"tags": {}
|
|
505103
|
+
}
|
|
505104
|
+
],
|
|
505105
|
+
"members": [],
|
|
505106
|
+
"returnType": {
|
|
505107
|
+
"kind": "primitive",
|
|
505108
|
+
"value": "void"
|
|
505109
|
+
}
|
|
505110
|
+
},
|
|
505111
|
+
"description": "",
|
|
505112
|
+
"declarations": [
|
|
505113
|
+
{
|
|
505114
|
+
"name": "onKeyDown",
|
|
505115
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/useTooltip.tsx"
|
|
505116
|
+
}
|
|
505117
|
+
],
|
|
505118
|
+
"tags": {}
|
|
505119
|
+
},
|
|
505079
505120
|
{
|
|
505080
505121
|
"kind": "property",
|
|
505081
505122
|
"name": "onFocus",
|
|
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
|
|
|
18
18
|
"@emotion/react": "11.11.4",
|
|
19
19
|
"@types/react": "18.2.60",
|
|
20
20
|
"@types/react-dom": "18.2.19",
|
|
21
|
-
"@workday/canvas-kit-labs-react": "16.2.
|
|
22
|
-
"@workday/canvas-kit-preview-react": "16.2.
|
|
23
|
-
"@workday/canvas-kit-react": "16.2.
|
|
24
|
-
"@workday/canvas-kit-react-fonts": "^16.2.
|
|
25
|
-
"@workday/canvas-kit-styling": "16.2.
|
|
21
|
+
"@workday/canvas-kit-labs-react": "16.2.15",
|
|
22
|
+
"@workday/canvas-kit-preview-react": "16.2.15",
|
|
23
|
+
"@workday/canvas-kit-react": "16.2.15",
|
|
24
|
+
"@workday/canvas-kit-react-fonts": "^16.2.15",
|
|
25
|
+
"@workday/canvas-kit-styling": "16.2.15",
|
|
26
26
|
"@workday/canvas-system-icons-web": "^5.0.3",
|
|
27
27
|
"@workday/canvas-expressive-icons-web": "1.0.1",
|
|
28
28
|
"@workday/canvas-tokens-web": "4.4.0-beta.11"
|
|
@@ -19,11 +19,11 @@ export const packageJSONFile = `{
|
|
|
19
19
|
"@emotion/react": "11.11.4",
|
|
20
20
|
"@types/react": "18.2.60",
|
|
21
21
|
"@types/react-dom": "18.2.19",
|
|
22
|
-
"@workday/canvas-kit-labs-react": "16.2.
|
|
23
|
-
"@workday/canvas-kit-preview-react": "16.2.
|
|
24
|
-
"@workday/canvas-kit-react": "16.2.
|
|
25
|
-
"@workday/canvas-kit-react-fonts": "^16.2.
|
|
26
|
-
"@workday/canvas-kit-styling": "16.2.
|
|
22
|
+
"@workday/canvas-kit-labs-react": "16.2.15",
|
|
23
|
+
"@workday/canvas-kit-preview-react": "16.2.15",
|
|
24
|
+
"@workday/canvas-kit-react": "16.2.15",
|
|
25
|
+
"@workday/canvas-kit-react-fonts": "^16.2.15",
|
|
26
|
+
"@workday/canvas-kit-styling": "16.2.15",
|
|
27
27
|
"@workday/canvas-system-icons-web": "^5.0.3",
|
|
28
28
|
"@workday/canvas-expressive-icons-web": "1.0.1",
|
|
29
29
|
"@workday/canvas-tokens-web": "4.4.0-beta.11"
|
|
@@ -101,7 +101,7 @@ at `medium`, `large`, and `extraLarge`. `outline` adds a default border at those
|
|
|
101
101
|
|
|
102
102
|
<ExampleCodeBlock code={Variants} />
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
## Accessibility
|
|
105
105
|
|
|
106
106
|
Accessory components are presentational and always `aria-hidden`. Images use an empty `alt` because
|
|
107
107
|
assistive technology does not see content inside that tile. Name the item in adjacent text instead
|
|
@@ -109,28 +109,16 @@ of on the accessory. They are not buttons and do not take click or keyboard hand
|
|
|
109
109
|
|
|
110
110
|
## Component API
|
|
111
111
|
|
|
112
|
-
### Accessory
|
|
113
|
-
|
|
114
112
|
<SymbolDoc name="Accessory" fileName="/labs-react/" />
|
|
115
113
|
|
|
116
|
-
### AccessoryIcon
|
|
117
|
-
|
|
118
114
|
<SymbolDoc name="AccessoryIcon" fileName="/labs-react/" />
|
|
119
115
|
|
|
120
|
-
### AccessoryFile
|
|
121
|
-
|
|
122
116
|
<SymbolDoc name="AccessoryFile" fileName="/labs-react/" />
|
|
123
117
|
|
|
124
|
-
### AccessoryMedia
|
|
125
|
-
|
|
126
118
|
<SymbolDoc name="AccessoryMedia" fileName="/labs-react/" />
|
|
127
119
|
|
|
128
|
-
### AccessoryFavicon
|
|
129
|
-
|
|
130
120
|
<SymbolDoc name="AccessoryFavicon" fileName="/labs-react/" />
|
|
131
121
|
|
|
132
|
-
### AccessoryCalendar
|
|
133
|
-
|
|
134
122
|
<SymbolDoc name="AccessoryCalendar" fileName="/labs-react/" />
|
|
135
123
|
|
|
136
124
|
## Specifications
|
|
@@ -117,14 +117,17 @@ via the `dir` attribute on a parent element.
|
|
|
117
117
|
follow the [checkbox keyboard pattern](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/): every
|
|
118
118
|
item is in the tab order and <kbd>Space</kbd> toggles it.
|
|
119
119
|
- The icon always renders, in both modes and in both selected states. Selection is communicated by
|
|
120
|
-
the checkmark inside the icon _and_ a color change, never by color alone.
|
|
120
|
+
the checkmark inside the icon _and_ a color change, never by color alone. The icon is the
|
|
121
|
+
non-color state indicator and satisfies WCAG 1.4.1 (Use of Color).
|
|
121
122
|
- `aria-invalid` is only set on a single-select group. The `group` role that a multi-select group
|
|
122
|
-
renders does not allow the attribute, so a multi-select group communicates its error state
|
|
123
|
-
|
|
123
|
+
renders does not allow the attribute, so a multi-select group communicates its error state through
|
|
124
|
+
the text referenced by `aria-describedby`. Make sure that text names the problem.
|
|
124
125
|
- A group label is required. Provide it with `aria-label` or `aria-labelledby` on
|
|
125
126
|
`SelectionGroup.List`, or wrap the group in a `FormField` with a visible label. The label must
|
|
126
127
|
state the selection mode — "Select one" versus "Select all that apply" — so the mode is clear
|
|
127
|
-
before interacting
|
|
128
|
+
before interacting and users relying on assistive technology or keyboard navigation aren't left
|
|
129
|
+
guessing before they interact.
|
|
130
|
+
- Don't add a selected border. It conflicts with the focus indicator.
|
|
128
131
|
|
|
129
132
|
## Component API
|
|
130
133
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
|
|
2
2
|
import Basic from './examples/Basic';
|
|
3
3
|
import DeleteAction from './examples/DeleteAction';
|
|
4
|
+
import IconOnly from './examples/IconOnly';
|
|
4
5
|
import Icons from './examples/Icons';
|
|
5
6
|
import OverflowActionBar from './examples/OverflowActionBar';
|
|
6
7
|
import OverflowActionBarCustomButtonCount from './examples/OverflowActionBarCustomButtonCount';
|
|
@@ -39,6 +40,14 @@ with `ActionBar.Item` such as `icon` or `size`.
|
|
|
39
40
|
|
|
40
41
|
<ExampleCodeBlock code={Icons} />
|
|
41
42
|
|
|
43
|
+
### Icon-Only Example
|
|
44
|
+
|
|
45
|
+
An `ActionBar.Item` can render an icon-only button by passing an `icon` without `children`. Because
|
|
46
|
+
there is no visible text, provide an `aria-label` so the action has an accessible name. Wrapping the
|
|
47
|
+
item in a [Tooltip](/components/popups/tooltip/) also shows the label to sighted users.
|
|
48
|
+
|
|
49
|
+
<ExampleCodeBlock code={IconOnly} />
|
|
50
|
+
|
|
42
51
|
### Delete Action Example
|
|
43
52
|
|
|
44
53
|
`ActionBar.Item` is a `SecondaryButton` by default but it's possible to change it to another
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {ActionBar} from '@workday/canvas-kit-react/action-bar';
|
|
2
|
+
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
3
|
+
import {editIcon, trashIcon} from '@workday/canvas-system-icons-web';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
return (
|
|
7
|
+
<ActionBar>
|
|
8
|
+
<ActionBar.List position="relative" as="section" aria-label="Icon-only Action Bar">
|
|
9
|
+
<ActionBar.Item as={PrimaryButton}>Save</ActionBar.Item>
|
|
10
|
+
<ActionBar.Item icon={editIcon} aria-label="Edit" />
|
|
11
|
+
<ActionBar.Item icon={trashIcon} aria-label="Delete" />
|
|
12
|
+
</ActionBar.List>
|
|
13
|
+
</ActionBar>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export {Basic} from './Basic';
|
|
2
2
|
export {DeleteAction} from './DeleteAction';
|
|
3
|
+
export {IconOnly} from './IconOnly';
|
|
3
4
|
export {Icons} from './Icons';
|
|
4
5
|
export {OverflowActionBar} from './OverflowActionBar';
|
|
5
6
|
export {OverflowActionBarCustomButtonCount} from './OverflowActionBarCustomButtonCount';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.15",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"typecheck:src": "tsc -p . --noEmit --incremental false"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
|
-
"access": "public"
|
|
35
|
+
"access": "public",
|
|
36
|
+
"timeout": 300000
|
|
36
37
|
},
|
|
37
38
|
"keywords": [
|
|
38
39
|
"canvas",
|
|
@@ -47,10 +48,10 @@
|
|
|
47
48
|
"@stackblitz/sdk": "^1.11.0",
|
|
48
49
|
"@storybook/csf": "0.0.1",
|
|
49
50
|
"@workday/canvas-expressive-icons-web": "1.0.2",
|
|
50
|
-
"@workday/canvas-kit-labs-react": "^16.2.
|
|
51
|
-
"@workday/canvas-kit-preview-react": "^16.2.
|
|
52
|
-
"@workday/canvas-kit-react": "^16.2.
|
|
53
|
-
"@workday/canvas-kit-styling": "^16.2.
|
|
51
|
+
"@workday/canvas-kit-labs-react": "^16.2.15",
|
|
52
|
+
"@workday/canvas-kit-preview-react": "^16.2.15",
|
|
53
|
+
"@workday/canvas-kit-react": "^16.2.15",
|
|
54
|
+
"@workday/canvas-kit-styling": "^16.2.15",
|
|
54
55
|
"@workday/canvas-system-icons-web": "^5.0.3",
|
|
55
56
|
"@workday/canvas-tokens-web": "^4.4.0",
|
|
56
57
|
"markdown-to-jsx": "^7.2.0",
|
|
@@ -63,5 +64,5 @@
|
|
|
63
64
|
"mkdirp": "^1.0.3",
|
|
64
65
|
"typescript": "5.0"
|
|
65
66
|
},
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2f76b6173c9b35e4c694d4829d541eb62a0e4e39"
|
|
67
68
|
}
|