@workday/canvas-kit-docs 16.2.11 → 16.2.14

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.
@@ -132365,13 +132365,13 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
132365
132365
  {
132366
132366
  "kind": "property",
132367
132367
  "name": "children",
132368
- "required": true,
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",
@@ -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.11",
22
- "@workday/canvas-kit-preview-react": "16.2.11",
23
- "@workday/canvas-kit-react": "16.2.11",
24
- "@workday/canvas-kit-react-fonts": "^16.2.11",
25
- "@workday/canvas-kit-styling": "16.2.11",
21
+ "@workday/canvas-kit-labs-react": "16.2.14",
22
+ "@workday/canvas-kit-preview-react": "16.2.14",
23
+ "@workday/canvas-kit-react": "16.2.14",
24
+ "@workday/canvas-kit-react-fonts": "^16.2.14",
25
+ "@workday/canvas-kit-styling": "16.2.14",
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.11",
23
- "@workday/canvas-kit-preview-react": "16.2.11",
24
- "@workday/canvas-kit-react": "16.2.11",
25
- "@workday/canvas-kit-react-fonts": "^16.2.11",
26
- "@workday/canvas-kit-styling": "16.2.11",
22
+ "@workday/canvas-kit-labs-react": "16.2.14",
23
+ "@workday/canvas-kit-preview-react": "16.2.14",
24
+ "@workday/canvas-kit-react": "16.2.14",
25
+ "@workday/canvas-kit-react-fonts": "^16.2.14",
26
+ "@workday/canvas-kit-styling": "16.2.14",
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
- ### Accessibility
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
- through the text referenced by `aria-describedby`. Make sure that text names the problem.
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.11",
3
+ "version": "16.2.14",
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.11",
51
- "@workday/canvas-kit-preview-react": "^16.2.11",
52
- "@workday/canvas-kit-react": "^16.2.11",
53
- "@workday/canvas-kit-styling": "^16.2.11",
51
+ "@workday/canvas-kit-labs-react": "^16.2.14",
52
+ "@workday/canvas-kit-preview-react": "^16.2.14",
53
+ "@workday/canvas-kit-react": "^16.2.14",
54
+ "@workday/canvas-kit-styling": "^16.2.14",
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": "21b0c64e5227e1a6aa3208ad52495c8ae543aa55"
67
+ "gitHead": "534f0c35450d9cfe8cc544d83b265a18089c74a5"
67
68
  }