@workday/canvas-kit-react 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.
@@ -13,7 +13,7 @@ const retryEachFrame = (cb: () => boolean, iterations: number) => {
13
13
 
14
14
  /**
15
15
  * This elemProps hook is used for cursor navigation by using [Roving
16
- * Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the
16
+ * Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the
17
17
  * collection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the
18
18
  * corresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook
19
19
  * should be applied to an `*.Item` component.
@@ -23,7 +23,7 @@ export type ListItemProps = {
23
23
  * mapping. Think of the cursor as the focus item within the list. If the list has browser focus, the
24
24
  * cursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the
25
25
  * active tab stop of the list. For more information, see
26
- * [Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`
26
+ * [Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`
27
27
  * adds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is
28
28
  * used to map new cursor ids to these events. The `ListModel` takes an optional `navigation`
29
29
  * configuration to change the default navigation behavior. The default navigation manager is a
@@ -56,11 +56,8 @@ export const useComboboxInput = composeHooks(
56
56
  dispatchInputEvent(event.currentTarget as HTMLElement, '');
57
57
  }
58
58
  if (event.key === 'Enter' && !event.metaKey && model.state.visibility === 'visible') {
59
- if (
60
- document
61
- .querySelector(`[data-id="${model.state.cursorId}"]`)
62
- ?.getAttribute('aria-disabled') !== 'true'
63
- ) {
59
+ const element = document.querySelector(`[data-id="${model.state.cursorId}"]`);
60
+ if (element && element?.getAttribute('aria-disabled') !== 'true') {
64
61
  model.events.select({id: model.state.cursorId});
65
62
  if (model.state.mode === 'single') {
66
63
  model.events.hide(event);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  /**
3
3
  * This elemProps hook is used for cursor navigation by using [Roving
4
- * Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the
4
+ * Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the
5
5
  * collection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the
6
6
  * corresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook
7
7
  * should be applied to an `*.Item` component.
@@ -16,7 +16,7 @@ const retryEachFrame = (cb, iterations) => {
16
16
  };
17
17
  /**
18
18
  * This elemProps hook is used for cursor navigation by using [Roving
19
- * Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the
19
+ * Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the
20
20
  * collection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the
21
21
  * corresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook
22
22
  * should be applied to an `*.Item` component.
@@ -14,7 +14,7 @@ export declare type ListItemProps = {
14
14
  * mapping. Think of the cursor as the focus item within the list. If the list has browser focus, the
15
15
  * cursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the
16
16
  * active tab stop of the list. For more information, see
17
- * [Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`
17
+ * [Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`
18
18
  * adds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is
19
19
  * used to map new cursor ids to these events. The `ListModel` takes an optional `navigation`
20
20
  * configuration to change the default navigation behavior. The default navigation manager is a
@@ -12,7 +12,7 @@ const useSelectionListModel_1 = require("./useSelectionListModel");
12
12
  * mapping. Think of the cursor as the focus item within the list. If the list has browser focus, the
13
13
  * cursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the
14
14
  * active tab stop of the list. For more information, see
15
- * [Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`
15
+ * [Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`
16
16
  * adds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is
17
17
  * used to map new cursor ids to these events. The `ListModel` takes an optional `navigation`
18
18
  * configuration to change the default navigation behavior. The default navigation manager is a
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BN,mBAAmB;6BAoBtB,gBAAgB;;8BAIf,gBAAgB;;;;;;;;;;;;;;;;;;EAmBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
1
+ {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BN,mBAAmB;6BAiBtB,gBAAgB;;8BAIf,gBAAgB;;;;;;;;;;;;;;;;;;EAmBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
@@ -41,13 +41,12 @@ exports.useComboboxInput = common_1.composeHooks(common_1.createElemPropsHook(us
41
41
  }, [model.state.cursorId]);
42
42
  return {
43
43
  onKeyDown(event) {
44
- var _a;
45
44
  if (event.key === 'Escape') {
46
45
  common_1.dispatchInputEvent(event.currentTarget, '');
47
46
  }
48
47
  if (event.key === 'Enter' && !event.metaKey && model.state.visibility === 'visible') {
49
- if (((_a = document
50
- .querySelector(`[data-id="${model.state.cursorId}"]`)) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-disabled')) !== 'true') {
48
+ const element = document.querySelector(`[data-id="${model.state.cursorId}"]`);
49
+ if (element && (element === null || element === void 0 ? void 0 : element.getAttribute('aria-disabled')) !== 'true') {
51
50
  model.events.select({ id: model.state.cursorId });
52
51
  if (model.state.mode === 'single') {
53
52
  model.events.hide(event);
@@ -8,7 +8,7 @@ export interface MenuProps {
8
8
  /**
9
9
  * `Menu` is a combination of a popup and a list. It usually has some type of target element that
10
10
  * expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
11
- * using [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum
11
+ * using [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum
12
12
  * compatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both
13
13
  * how many items can be selected as well as the default behavior when a `menuitem` is clicked. For
14
14
  * the `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`
@@ -16,7 +16,7 @@ const MenuDivider_1 = require("./MenuDivider");
16
16
  /**
17
17
  * `Menu` is a combination of a popup and a list. It usually has some type of target element that
18
18
  * expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
19
- * using [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum
19
+ * using [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum
20
20
  * compatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both
21
21
  * how many items can be selected as well as the default behavior when a `menuitem` is clicked. For
22
22
  * the `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  /**
3
3
  * This elemProps hook is used for cursor navigation by using [Roving
4
- * Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the
4
+ * Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the
5
5
  * collection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the
6
6
  * corresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook
7
7
  * should be applied to an `*.Item` component.
@@ -10,7 +10,7 @@ const retryEachFrame = (cb, iterations) => {
10
10
  };
11
11
  /**
12
12
  * This elemProps hook is used for cursor navigation by using [Roving
13
- * Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). Only a single item in the
13
+ * Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). Only a single item in the
14
14
  * collection has a tab stop. Pressing an arrow key moves the tab stop to a different item in the
15
15
  * corresponding direction. See the [Roving Tabindex](#roving-tabindex) example. This elemProps hook
16
16
  * should be applied to an `*.Item` component.
@@ -14,7 +14,7 @@ export declare type ListItemProps = {
14
14
  * mapping. Think of the cursor as the focus item within the list. If the list has browser focus, the
15
15
  * cursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the
16
16
  * active tab stop of the list. For more information, see
17
- * [Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`
17
+ * [Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`
18
18
  * adds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is
19
19
  * used to map new cursor ids to these events. The `ListModel` takes an optional `navigation`
20
20
  * configuration to change the default navigation behavior. The default navigation manager is a
@@ -9,7 +9,7 @@ import { useSelectionListModel } from './useSelectionListModel';
9
9
  * mapping. Think of the cursor as the focus item within the list. If the list has browser focus, the
10
10
  * cursor will map to browser focus. Behaviors such as `useListRovingFocus` will map the cursor to the
11
11
  * active tab stop of the list. For more information, see
12
- * [Roving Tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex). `useListRovingFocus`
12
+ * [Roving Tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex). `useListRovingFocus`
13
13
  * adds keyboard events that map to navigation events. A [Navigation Manager](#navigation-manager) is
14
14
  * used to map new cursor ids to these events. The `ListModel` takes an optional `navigation`
15
15
  * configuration to change the default navigation behavior. The default navigation manager is a
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BN,mBAAmB;6BAoBtB,gBAAgB;;8BAIf,gBAAgB;;;;;;;;;;;;;;;;;;EAmBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
1
+ {"version":3,"file":"ComboboxInput.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BN,mBAAmB;6BAiBtB,gBAAgB;;8BAIf,gBAAgB;;;;;;;;;;;;;;;;;;EAmBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
@@ -35,13 +35,12 @@ export const useComboboxInput = composeHooks(createElemPropsHook(useComboboxMode
35
35
  }, [model.state.cursorId]);
36
36
  return {
37
37
  onKeyDown(event) {
38
- var _a;
39
38
  if (event.key === 'Escape') {
40
39
  dispatchInputEvent(event.currentTarget, '');
41
40
  }
42
41
  if (event.key === 'Enter' && !event.metaKey && model.state.visibility === 'visible') {
43
- if (((_a = document
44
- .querySelector(`[data-id="${model.state.cursorId}"]`)) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-disabled')) !== 'true') {
42
+ const element = document.querySelector(`[data-id="${model.state.cursorId}"]`);
43
+ if (element && (element === null || element === void 0 ? void 0 : element.getAttribute('aria-disabled')) !== 'true') {
45
44
  model.events.select({ id: model.state.cursorId });
46
45
  if (model.state.mode === 'single') {
47
46
  model.events.hide(event);
@@ -8,7 +8,7 @@ export interface MenuProps {
8
8
  /**
9
9
  * `Menu` is a combination of a popup and a list. It usually has some type of target element that
10
10
  * expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
11
- * using [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum
11
+ * using [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum
12
12
  * compatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both
13
13
  * how many items can be selected as well as the default behavior when a `menuitem` is clicked. For
14
14
  * the `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`
@@ -10,7 +10,7 @@ import { MenuDivider } from './MenuDivider';
10
10
  /**
11
11
  * `Menu` is a combination of a popup and a list. It usually has some type of target element that
12
12
  * expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
13
- * using [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum
13
+ * using [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum
14
14
  * compatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both
15
15
  * how many items can be selected as well as the default behavior when a `menuitem` is clicked. For
16
16
  * the `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`
package/menu/lib/Menu.tsx CHANGED
@@ -20,7 +20,7 @@ export interface MenuProps {
20
20
  /**
21
21
  * `Menu` is a combination of a popup and a list. It usually has some type of target element that
22
22
  * expands/collapses the menu and a `menu` role and and several `menuitem` roles. Focus is managed
23
- * using [roving tabindex](https://w3c.github.io/aria-practices/#kbd_roving_tabindex) for maximum
23
+ * using [roving tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex) for maximum
24
24
  * compatibility. A `Menu` can have two modes: `single` and `multiple`. This mode determines both
25
25
  * how many items can be selected as well as the default behavior when a `menuitem` is clicked. For
26
26
  * the `single` mode, selecting a `menuitem` will select and close the menu. For the `multiple`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@emotion/styled": "^11.6.0",
50
50
  "@popperjs/core": "^2.5.4",
51
51
  "@workday/canvas-colors-web": "^2.0.0",
52
- "@workday/canvas-kit-popup-stack": "^9.1.1",
52
+ "@workday/canvas-kit-popup-stack": "^9.1.3",
53
53
  "@workday/canvas-system-icons-web": "^3.0.0",
54
54
  "@workday/design-assets-types": "^0.2.8",
55
55
  "chroma-js": "^2.1.0",
@@ -66,5 +66,5 @@
66
66
  "@workday/canvas-accent-icons-web": "^3.0.0",
67
67
  "@workday/canvas-applet-icons-web": "^2.0.0"
68
68
  },
69
- "gitHead": "1fd1ede048d1977dbf565ad9e78dcd3786a7b5c2"
69
+ "gitHead": "e05ca047d5cb85ed194a626c92d143e9e0805733"
70
70
  }