@workday/canvas-kit-react 9.1.24 → 9.1.25
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.
|
@@ -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
|
|
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}`),
|
|
@@ -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
|
|
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':
|
|
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}`),
|
|
@@ -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
|
|
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':
|
|
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.
|
|
3
|
+
"version": "9.1.25",
|
|
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.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^9.1.25",
|
|
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": "
|
|
69
|
+
"gitHead": "14663d9ff82f3112d0e992e91f0308ff048b209e"
|
|
70
70
|
}
|