@workday/canvas-kit-react 9.1.36 → 9.1.38

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.
@@ -83,6 +83,7 @@ export const useComboboxInput = composeHooks(
83
83
  'aria-expanded': model.state.visibility === 'visible',
84
84
  'aria-autocomplete': 'list',
85
85
  'aria-controls': `${model.state.id}-list`,
86
+ 'aria-activedescendant': model.state.visibility === 'hidden' ? null : undefined, // Removes activedescendant on menu close
86
87
  id: model.state.id,
87
88
  ref: elementRef,
88
89
  } as const;
@@ -92,6 +92,7 @@ export declare const useComboboxInput: import("@workday/canvas-kit-react/common"
92
92
  readonly 'aria-expanded': boolean;
93
93
  readonly 'aria-autocomplete': "list";
94
94
  readonly 'aria-controls': `${string}-list`;
95
+ readonly 'aria-activedescendant': null | undefined;
95
96
  readonly id: string;
96
97
  readonly ref: (instance: unknown) => void;
97
98
  } & {
@@ -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;6BAiBtB,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;;;;;;;;;;;;;;;;;;;EAoBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
@@ -71,6 +71,7 @@ exports.useComboboxInput = common_1.composeHooks(common_1.createElemPropsHook(us
71
71
  'aria-expanded': model.state.visibility === 'visible',
72
72
  'aria-autocomplete': 'list',
73
73
  'aria-controls': `${model.state.id}-list`,
74
+ 'aria-activedescendant': model.state.visibility === 'hidden' ? null : undefined,
74
75
  id: model.state.id,
75
76
  ref: elementRef,
76
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAcF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
1
+ {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAeF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
@@ -72,8 +72,9 @@ exports.findEllipsisElement = findEllipsisElement;
72
72
  const isOverflowed = (element) => {
73
73
  const overflowElement = exports.findEllipsisElement(element) || exports.findOverflowElement(element);
74
74
  if (overflowElement) {
75
- return (overflowElement.scrollWidth > overflowElement.clientWidth ||
76
- overflowElement.scrollHeight > overflowElement.clientHeight);
75
+ const clientRect = overflowElement.getBoundingClientRect();
76
+ return (overflowElement.scrollWidth > clientRect.width ||
77
+ overflowElement.scrollHeight > clientRect.height);
77
78
  }
78
79
  return false;
79
80
  };
@@ -92,6 +92,7 @@ export declare const useComboboxInput: import("@workday/canvas-kit-react/common"
92
92
  readonly 'aria-expanded': boolean;
93
93
  readonly 'aria-autocomplete': "list";
94
94
  readonly 'aria-controls': `${string}-list`;
95
+ readonly 'aria-activedescendant': null | undefined;
95
96
  readonly id: string;
96
97
  readonly ref: (instance: unknown) => void;
97
98
  } & {
@@ -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;6BAiBtB,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;;;;;;;;;;;;;;;;;;;EAoBpC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC"}
@@ -65,6 +65,7 @@ export const useComboboxInput = composeHooks(createElemPropsHook(useComboboxMode
65
65
  'aria-expanded': model.state.visibility === 'visible',
66
66
  'aria-autocomplete': 'list',
67
67
  'aria-controls': `${model.state.id}-list`,
68
+ 'aria-activedescendant': model.state.visibility === 'hidden' ? null : undefined,
68
69
  id: model.state.id,
69
70
  ref: elementRef,
70
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAcF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
1
+ {"version":3,"file":"OverflowTooltip.d.ts","sourceRoot":"","sources":["../../../../tooltip/lib/OverflowTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EAGV,MAAM,iCAAiC,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAmBhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,OAAO,GAAG,IAahE,CAAC;AAeF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/F;;;;;;;OAOG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CAClC;AAiBD,eAAO,MAAM,eAAe,8DAKzB,oBAAoB,gBAwCtB,CAAC"}
@@ -48,8 +48,9 @@ export const findEllipsisElement = (element) => {
48
48
  const isOverflowed = (element) => {
49
49
  const overflowElement = findEllipsisElement(element) || findOverflowElement(element);
50
50
  if (overflowElement) {
51
- return (overflowElement.scrollWidth > overflowElement.clientWidth ||
52
- overflowElement.scrollHeight > overflowElement.clientHeight);
51
+ const clientRect = overflowElement.getBoundingClientRect();
52
+ return (overflowElement.scrollWidth > clientRect.width ||
53
+ overflowElement.scrollHeight > clientRect.height);
53
54
  }
54
55
  return false;
55
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "9.1.36",
3
+ "version": "9.1.38",
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.36",
52
+ "@workday/canvas-kit-popup-stack": "^9.1.38",
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": "fd75984b9875504e4db280fe59bea0b4e74c2742"
69
+ "gitHead": "932e6b6918cdebda0791da400020c03d680a8134"
70
70
  }
@@ -59,9 +59,10 @@ const isOverflowed = (element: Element) => {
59
59
  const overflowElement = findEllipsisElement(element) || findOverflowElement(element);
60
60
 
61
61
  if (overflowElement) {
62
+ const clientRect = overflowElement.getBoundingClientRect();
62
63
  return (
63
- overflowElement.scrollWidth > overflowElement.clientWidth ||
64
- overflowElement.scrollHeight > overflowElement.clientHeight
64
+ overflowElement.scrollWidth > clientRect.width ||
65
+ overflowElement.scrollHeight > clientRect.height
65
66
  );
66
67
  }
67
68
  return false;