@workday/canvas-kit-react 9.1.1 → 9.1.2

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.
@@ -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 +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);
@@ -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);
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.2",
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.2",
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": "a6373b653f90cdd16a25830ffbd34dff421940ac"
70
70
  }