@workday/canvas-kit-react 9.1.24 → 9.1.26

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.
@@ -31,15 +31,19 @@ const getPrimaryButtonColors = (variant: 'inverse' | undefined, theme: EmotionCa
31
31
  },
32
32
  hover: {
33
33
  background: themePrimary.dark,
34
+ label: themePrimary.contrast,
34
35
  },
35
36
  active: {
36
37
  background: themePrimary.darkest,
38
+ label: themePrimary.contrast,
37
39
  },
38
40
  focus: {
39
41
  background: themePrimary.main,
42
+ label: themePrimary.contrast,
40
43
  },
41
44
  disabled: {
42
45
  background: themePrimary.main,
46
+ label: themePrimary.contrast,
43
47
  },
44
48
  };
45
49
 
@@ -94,7 +94,7 @@ export const useListItemRegister = createElemPropsHook(useListModel)(
94
94
  disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
95
95
  item: null, // remove `item` from prop list
96
96
  virtual: null, // remove `virtual` from prop list
97
- 'aria-setsize': elemProps.virtual?.size,
97
+ 'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
98
98
  'aria-posinset': elemProps.virtual ? elemProps.item!.index + 1 : undefined,
99
99
  style,
100
100
  id: slugify(`${state.id}-${localId}`),
@@ -1 +1 @@
1
- {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAa,eAAe,EAAsC,MAAM,cAAc,CAAC;AA0E9F,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,cAAc,EAAE,eAAe;IACpF;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,2FA+CxB,CAAC"}
1
+ {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAa,eAAe,EAAsC,MAAM,cAAc,CAAC;AA8E9F,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,cAAc,EAAE,eAAe;IACpF;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,2FA+CxB,CAAC"}
@@ -37,15 +37,19 @@ const getPrimaryButtonColors = (variant, theme) => {
37
37
  },
38
38
  hover: {
39
39
  background: themePrimary.dark,
40
+ label: themePrimary.contrast,
40
41
  },
41
42
  active: {
42
43
  background: themePrimary.darkest,
44
+ label: themePrimary.contrast,
43
45
  },
44
46
  focus: {
45
47
  background: themePrimary.main,
48
+ label: themePrimary.contrast,
46
49
  },
47
50
  disabled: {
48
51
  background: themePrimary.main,
52
+ label: themePrimary.contrast,
49
53
  },
50
54
  };
51
55
  case 'inverse':
@@ -21,7 +21,7 @@ const useListModel_1 = require("./useListModel");
21
21
  * ```
22
22
  */
23
23
  exports.useListItemRegister = common_1.createElemPropsHook(useListModel_1.useListModel)(({ state, events }, ref, elemProps = {}) => {
24
- var _a, _b, _c;
24
+ var _a, _b;
25
25
  const [localId, setLocalId] = react_1.default.useState(elemProps['data-id'] || ((_a = elemProps.item) === null || _a === void 0 ? void 0 : _a.id) || '');
26
26
  const { localRef, elementRef } = common_1.useLocalRef(common_1.useForkRef(ref, (_b = elemProps.virtual) === null || _b === void 0 ? void 0 : _b.measureRef));
27
27
  // if the list is virtual, force the correct styling. Without this, weird things happen...
@@ -71,7 +71,7 @@ exports.useListItemRegister = common_1.createElemPropsHook(useListModel_1.useLis
71
71
  disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
72
72
  item: null,
73
73
  virtual: null,
74
- 'aria-setsize': (_c = elemProps.virtual) === null || _c === void 0 ? void 0 : _c.size,
74
+ 'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
75
75
  'aria-posinset': elemProps.virtual ? elemProps.item.index + 1 : undefined,
76
76
  style,
77
77
  id: common_1.slugify(`${state.id}-${localId}`),
@@ -1 +1 @@
1
- {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,cAAc,EAEd,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA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3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,2FA+CxB,CAAC"}
@@ -15,15 +15,19 @@ const getPrimaryButtonColors = (variant, theme) => {
15
15
  },
16
16
  hover: {
17
17
  background: themePrimary.dark,
18
+ label: themePrimary.contrast,
18
19
  },
19
20
  active: {
20
21
  background: themePrimary.darkest,
22
+ label: themePrimary.contrast,
21
23
  },
22
24
  focus: {
23
25
  background: themePrimary.main,
26
+ label: themePrimary.contrast,
24
27
  },
25
28
  disabled: {
26
29
  background: themePrimary.main,
30
+ label: themePrimary.contrast,
27
31
  },
28
32
  };
29
33
  case 'inverse':
@@ -15,7 +15,7 @@ import { useListModel } from './useListModel';
15
15
  * ```
16
16
  */
17
17
  export const useListItemRegister = createElemPropsHook(useListModel)(({ state, events }, ref, elemProps = {}) => {
18
- var _a, _b, _c;
18
+ var _a, _b;
19
19
  const [localId, setLocalId] = React.useState(elemProps['data-id'] || ((_a = elemProps.item) === null || _a === void 0 ? void 0 : _a.id) || '');
20
20
  const { localRef, elementRef } = useLocalRef(useForkRef(ref, (_b = elemProps.virtual) === null || _b === void 0 ? void 0 : _b.measureRef));
21
21
  // if the list is virtual, force the correct styling. Without this, weird things happen...
@@ -65,7 +65,7 @@ export const useListItemRegister = createElemPropsHook(useListModel)(({ state, e
65
65
  disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
66
66
  item: null,
67
67
  virtual: null,
68
- 'aria-setsize': (_c = elemProps.virtual) === null || _c === void 0 ? void 0 : _c.size,
68
+ 'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
69
69
  'aria-posinset': elemProps.virtual ? elemProps.item.index + 1 : undefined,
70
70
  style,
71
71
  id: slugify(`${state.id}-${localId}`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "9.1.24",
3
+ "version": "9.1.26",
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.24",
52
+ "@workday/canvas-kit-popup-stack": "^9.1.26",
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": "823e15c48ab64f2997706232a523f503d87c80df"
69
+ "gitHead": "31edd94369a02b5c8d5411b617c4526e6c2289d5"
70
70
  }