@workday/canvas-kit-docs 9.1.1 → 9.1.3

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.
@@ -1245,7 +1245,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
1245
1245
  {
1246
1246
  "name": "Target",
1247
1247
  "symbol": "ExpandableTarget",
1248
- "description": "`Expandable.Target` creates a heading and a button. The heading is a semantic heading to\ndescribe the associated content. The button provides users the ability to toggle the\nassociated content.\n\nAs according to the [W3 disclosure\nspecification](https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure), the button has\n`aria-expanded` and `aria-controls` attributes set by default\n\nThis component should hold an `Expandable.Icon`, an optional `Expandable.Avatar`, and an\n`Expandable.Title`.",
1248
+ "description": "`Expandable.Target` creates a heading and a button. The heading is a semantic heading to\ndescribe the associated content. The button provides users the ability to toggle the\nassociated content.\n\nAs according to the [W3 disclosure\nspecification](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/), the button has\n`aria-expanded` and `aria-controls` attributes set by default\n\nThis component should hold an `Expandable.Icon`, an optional `Expandable.Avatar`, and an\n`Expandable.Title`.",
1249
1249
  "declarations": [
1250
1250
  {
1251
1251
  "name": "Target",
@@ -7169,7 +7169,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
7169
7169
  {
7170
7170
  "name": "DeprecatedMenu",
7171
7171
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/preview-react/menu/lib/Menu.tsx",
7172
- "description": "As of Canvas Kit v8, Menu is being deprecated.\nIt will be removed in v10. Please see the [upgrade\nguide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for\nmore information.\n\n`DeprecatedMenu` renders a styled `<ul role=\"menu\">` element within a {@link Card} and follows\nthe [Active Menu\npattern](https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions-active-descendant.html)\nusing `aria-activedescendant`.\n\nUndocumented props are spread to the underlying `<ul>` element.",
7172
+ "description": "As of Canvas Kit v8, Menu is being deprecated.\nIt will be removed in v10. Please see the [upgrade\nguide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for\nmore information.\n\n`DeprecatedMenu` renders a styled `<ul role=\"menu\">` element within a {@link Card} and follows\nthe [Active Menu\npattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions-active-descendant/)\nusing `aria-activedescendant`.\n\nUndocumented props are spread to the underlying `<ul>` element.",
7173
7173
  "declarations": [
7174
7174
  {
7175
7175
  "name": "DeprecatedMenu",
@@ -77499,7 +77499,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
77499
77499
  {
77500
77500
  "name": "useListItemRovingFocus",
77501
77501
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/collection/lib/useListItemRovingFocus.tsx",
77502
- "description": "This elemProps hook is used for cursor navigation by using [Roving\nTabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the\ncollection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the\ncorresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook\nshould be applied to an `*.Item` component.\n\n```ts\nconst useMyItem = composeHooks(\n useListItemRovingFocus, // adds the roving tabindex support\n useListItemRegister\n);\n```",
77502
+ "description": "This elemProps hook is used for cursor navigation by using [Roving\nTabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the\ncollection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the\ncorresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook\nshould be applied to an `*.Item` component.\n\n```ts\nconst useMyItem = composeHooks(\n useListItemRovingFocus, // adds the roving tabindex support\n useListItemRegister\n);\n```",
77503
77503
  "declarations": [
77504
77504
  {
77505
77505
  "name": "useListItemRovingFocus",
@@ -79029,7 +79029,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
79029
79029
  {
79030
79030
  "name": "useListModel",
79031
79031
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/collection/lib/useListModel.tsx",
79032
- "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
79032
+ "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
79033
79033
  "declarations": [
79034
79034
  {
79035
79035
  "name": "useListModel",
@@ -79483,7 +79483,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
79483
79483
  {
79484
79484
  "name": "ListModel",
79485
79485
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/collection/lib/useListModel.tsx",
79486
- "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
79486
+ "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
79487
79487
  "declarations": [
79488
79488
  {
79489
79489
  "name": "useListModel",
@@ -80643,7 +80643,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
80643
80643
  {
80644
80644
  "name": "ListModelConfig",
80645
80645
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/collection/lib/useListModel.tsx",
80646
- "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
80646
+ "description": "The List model contains the the state and events necessary to track items, selection, and a cursor.\nVarious hooks can be used for a List model to create common behaviors associated with lists, such as\nnavigating a list with a keyboard, selection (single and multiple), and virtualization.\n\nA list also has a \"cursor\". A cursor is often represented by focus, but it is not always a 1:1\nmapping. Think of the cursor as the focus item within the list. If the list has browser focus, the\ncursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the\nactive tab stop of the list. For more information, see\n[Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`\nadds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is\nused to map new cursor ids to these events. The `ListModel` takes an optional `navigation`\nconfiguration to change the default navigation behavior. The default navigation manager is a\n[wrappingNavigationManager](#wrappingnavigationmanager) meaning the cursor will wrap around the\nbeginning and the ends. The cursor also provides a [navigationManager](#navigationmanager) that does\nnot wrap. This is the default navigation for grids.\n\nThe cursor also adds the concept of `orientation` which defaults to `'vertical'`. A Tab list is an\nexample of a `'horizontal'` list.\n\n```tsx\nconst list = useListModel({\n // custom handling for selection. single and multi select are provided\n selection: mySelectionManager,\n // wrapping and non-wrapping navigation are provided\n navigation: myNavigationManager,\n items: [{ id: '1', text: 'First'}, { id: '2', text: 'Second' }],\n getId: item => item.id, // get the unique identifier of your item\n})\n```",
80647
80647
  "declarations": [
80648
80648
  {
80649
80649
  "name": "useListModel",
@@ -149484,7 +149484,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
149484
149484
  {
149485
149485
  "name": "Menu",
149486
149486
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/menu/lib/Menu.tsx",
149487
- "description": "`Menu` is a combination of a popup and a list. It usually has some type of target element that\nexpands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed\nusing [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum\ncompatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both\nhow many items can be selected as well as the default behavior when a `menuitem` is clicked. For\nthe `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`\nmode, clicking a `menuitem` will toggle selection and will not close the menu.\n\n```tsx\n<Menu>\n <Menu.Target>Open</Menu.Target>\n <Menu.Popper>\n <Menu.Card>\n <Menu.List>\n <Menu.Item data-id=\"first\">First Item</Menu.Item>\n <Menu.Item data-id=\"second\">Second Item</Menu.Item>\n </Menu.List>\n </Menu.Card>\n </Menu.Popper>\n</Menu>\n```",
149487
+ "description": "`Menu` is a combination of a popup and a list. It usually has some type of target element that\nexpands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed\nusing [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum\ncompatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both\nhow many items can be selected as well as the default behavior when a `menuitem` is clicked. For\nthe `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`\nmode, clicking a `menuitem` will toggle selection and will not close the menu.\n\n```tsx\n<Menu>\n <Menu.Target>Open</Menu.Target>\n <Menu.Popper>\n <Menu.Card>\n <Menu.List>\n <Menu.Item data-id=\"first\">First Item</Menu.Item>\n <Menu.Item data-id=\"second\">Second Item</Menu.Item>\n </Menu.List>\n </Menu.Card>\n </Menu.Popper>\n</Menu>\n```",
149488
149488
  "declarations": [
149489
149489
  {
149490
149490
  "name": "Menu",
@@ -516,6 +516,21 @@ module.exports = {specifications: [
516
516
  ]
517
517
  }
518
518
  ]
519
+ },
520
+ {
521
+ "type": "describe",
522
+ "name": "when the user types in a value not found",
523
+ "children": [
524
+ {
525
+ "type": "describe",
526
+ "name": "when the user hits the enter key",
527
+ "children": []
528
+ },
529
+ {
530
+ "type": "it",
531
+ "name": "should not clear the input"
532
+ }
533
+ ]
519
534
  }
520
535
  ]
521
536
  }
@@ -37,7 +37,7 @@ how you might implement that behavior using a [`Popup`](/components/popups/popup
37
37
  closing the `DeprecatedMenu`.
38
38
 
39
39
  `DeprecatedMenu` follows the
40
- [Actions Menu pattern](https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions-active-descendant.html)
40
+ [Actions Menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions-active-descendant/)
41
41
  using `aria-activedescendant`. Below is table of supported keyboard shortcuts and associated
42
42
  actions.
43
43
 
@@ -76,10 +76,11 @@ along to the collection component.
76
76
  #### Roving Tabindex
77
77
 
78
78
  The list system also includes a cursor that extends the list. A cursor is mostly used for focusing
79
- items. The [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) is a
80
- well-supported way to accomplish accessibility requirements for focusing items within a list. This
81
- example shows how to use `useListRovingFocus`. This example uses the `ListBox` component, but the
82
- default `ListBox.Item` is very basic. We have two options, we can either pass additional
79
+ items. The
80
+ [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex)
81
+ is a well-supported way to accomplish accessibility requirements for focusing items within a list.
82
+ This example shows how to use `useListRovingFocus`. This example uses the `ListBox` component, but
83
+ the default `ListBox.Item` is very basic. We have two options, we can either pass additional
83
84
  functionality via `elemPropsHook` or by creating a new item using our elemProps hook primitives.
84
85
  Both will be demonstrated. Creating a custom item is recommended if you create a custom component
85
86
  and export it. Using `elemPropsHook` with `ListBox.Item` is recommended only for one-off instances.
@@ -31,7 +31,7 @@ yarn add @workday/canvas-kit-react
31
31
  model which composes a list model and a popup model and sets up accessibility features for you.
32
32
 
33
33
  `Menu` follows the
34
- [Actions Menu pattern](https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions.html)
34
+ [Actions Menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions/)
35
35
  using roving tabindex. Below is table of supported keyboard shortcuts and associated actions.
36
36
 
37
37
  | Key | Action |
@@ -33,7 +33,7 @@ yarn add @workday/canvas-kit-react
33
33
 
34
34
  `Tabs` includes a container `Tabs` component and the following subcomponents which can be composed
35
35
  in a variety of ways: `Tabs.List`, `Tabs.Item` and `Tabs.Panel`. It follows the
36
- [W3 Tabs specification](https://www.w3.org/TR/wai-aria-practices/#tabpanel).
36
+ [W3 Tabs specification](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).
37
37
 
38
38
  In this example, we set up a basic `Tabs` component with five tabs. This example uses a static API
39
39
  that does not support overflow.
@@ -31,7 +31,7 @@ yarn add @workday/canvas-kit-react
31
31
  ## Usage
32
32
 
33
33
  This component follows the
34
- [W3 Tooltip specification](https://www.w3.org/TR/wai-aria-practices/#tooltip). Tooltips are used to
34
+ [W3 Tooltip specification](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/). Tooltips are used to
35
35
  label buttons with icons and provide additional context to elements.
36
36
 
37
37
  ### When to use tooltips
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -44,9 +44,9 @@
44
44
  "dependencies": {
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@storybook/csf": "0.0.1",
47
- "@workday/canvas-kit-labs-react": "^9.1.1",
48
- "@workday/canvas-kit-preview-react": "^9.1.1",
49
- "@workday/canvas-kit-react": "^9.1.1",
47
+ "@workday/canvas-kit-labs-react": "^9.1.3",
48
+ "@workday/canvas-kit-preview-react": "^9.1.3",
49
+ "@workday/canvas-kit-react": "^9.1.3",
50
50
  "@workday/canvas-system-icons-web": "^3.0.0",
51
51
  "markdown-to-jsx": "^6.10.3",
52
52
  "ts-node": "^10.9.1"
@@ -57,5 +57,5 @@
57
57
  "mkdirp": "^1.0.3",
58
58
  "typescript": "4.2"
59
59
  },
60
- "gitHead": "1fd1ede048d1977dbf565ad9e78dcd3786a7b5c2"
60
+ "gitHead": "e05ca047d5cb85ed194a626c92d143e9e0805733"
61
61
  }