@workday/canvas-kit-react 8.6.24 → 8.6.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.
|
@@ -86,7 +86,7 @@ export const useListItemRegister = createElemPropsHook(useListModel)(
|
|
|
86
86
|
disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
|
|
87
87
|
item: null, // remove `item` from prop list
|
|
88
88
|
virtual: null, // remove `virtual` from prop list
|
|
89
|
-
'aria-setsize': elemProps.virtual
|
|
89
|
+
'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
|
|
90
90
|
'aria-posinset': elemProps.virtual ? elemProps.item!.index + 1 : undefined,
|
|
91
91
|
style,
|
|
92
92
|
};
|
|
@@ -21,11 +21,11 @@ var useListModel_1 = require("./useListModel");
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
exports.useListItemRegister = common_1.createElemPropsHook(useListModel_1.useListModel)(function (_a, ref, elemProps) {
|
|
24
|
-
var _b, _c
|
|
24
|
+
var _b, _c;
|
|
25
25
|
var state = _a.state, events = _a.events, getId = _a.getId;
|
|
26
26
|
if (elemProps === void 0) { elemProps = {}; }
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var _d = react_1.default.useState(elemProps['data-id'] || ((_b = elemProps.item) === null || _b === void 0 ? void 0 : _b.id) || ''), localId = _d[0], setLocalId = _d[1];
|
|
28
|
+
var _e = common_1.useLocalRef(common_1.useForkRef(ref, (_c = elemProps.virtual) === null || _c === void 0 ? void 0 : _c.measureRef)), localRef = _e.localRef, elementRef = _e.elementRef;
|
|
29
29
|
// if the list is virtual, force the correct styling. Without this, weird things happen...
|
|
30
30
|
var style = elemProps.virtual
|
|
31
31
|
? {
|
|
@@ -69,7 +69,7 @@ exports.useListItemRegister = common_1.createElemPropsHook(useListModel_1.useLis
|
|
|
69
69
|
disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
|
|
70
70
|
item: null,
|
|
71
71
|
virtual: null,
|
|
72
|
-
'aria-setsize':
|
|
72
|
+
'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
|
|
73
73
|
'aria-posinset': elemProps.virtual ? elemProps.item.index + 1 : undefined,
|
|
74
74
|
style: style,
|
|
75
75
|
};
|
|
@@ -15,11 +15,11 @@ import { useListModel } from './useListModel';
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
export var useListItemRegister = createElemPropsHook(useListModel)(function (_a, ref, elemProps) {
|
|
18
|
-
var _b, _c
|
|
18
|
+
var _b, _c;
|
|
19
19
|
var state = _a.state, events = _a.events, getId = _a.getId;
|
|
20
20
|
if (elemProps === void 0) { elemProps = {}; }
|
|
21
|
-
var
|
|
22
|
-
var
|
|
21
|
+
var _d = React.useState(elemProps['data-id'] || ((_b = elemProps.item) === null || _b === void 0 ? void 0 : _b.id) || ''), localId = _d[0], setLocalId = _d[1];
|
|
22
|
+
var _e = useLocalRef(useForkRef(ref, (_c = elemProps.virtual) === null || _c === void 0 ? void 0 : _c.measureRef)), localRef = _e.localRef, elementRef = _e.elementRef;
|
|
23
23
|
// if the list is virtual, force the correct styling. Without this, weird things happen...
|
|
24
24
|
var style = elemProps.virtual
|
|
25
25
|
? {
|
|
@@ -63,7 +63,7 @@ export var useListItemRegister = createElemPropsHook(useListModel)(function (_a,
|
|
|
63
63
|
disabled: elemProps.disabled || state.nonInteractiveIds.includes(localId) ? true : undefined,
|
|
64
64
|
item: null,
|
|
65
65
|
virtual: null,
|
|
66
|
-
'aria-setsize':
|
|
66
|
+
'aria-setsize': elemProps.virtual ? state.UNSTABLE_virtual.totalSize : undefined,
|
|
67
67
|
'aria-posinset': elemProps.virtual ? elemProps.item.index + 1 : undefined,
|
|
68
68
|
style: style,
|
|
69
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.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": "^8.6.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^8.6.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",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
68
68
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "c0a7022440bb891c8de4e07621d24d443949550d"
|
|
71
71
|
}
|