@workday/canvas-kit-react 16.0.0-alpha.0483-next.0 → 16.0.0-alpha.0485-next.0
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.
- package/common/lib/utils/useConstant.ts +1 -1
- package/dist/commonjs/common/lib/utils/useConstant.js +1 -1
- package/dist/commonjs/menu/lib/Submenu.js +2 -2
- package/dist/commonjs/tooltip/lib/useTooltip.js +1 -1
- package/dist/es6/common/lib/utils/useConstant.js +1 -1
- package/dist/es6/menu/lib/Submenu.js +2 -2
- package/dist/es6/tooltip/lib/useTooltip.js +1 -1
- package/menu/lib/Submenu.tsx +2 -2
- package/package.json +5 -5
- package/tooltip/lib/useTooltip.tsx +1 -1
|
@@ -25,7 +25,7 @@ exports.SubmenuPopper = (0, common_1.createSubcomponent)('div')({
|
|
|
25
25
|
return ((0, jsx_runtime_1.jsx)(popup_1.Popper, { placement: "right-start", popperOptions: MenuPopper_1.defaultMenuPopperOptions, ...elemProps, children: children }));
|
|
26
26
|
});
|
|
27
27
|
const useIntentTimer = (fn, waitMs = 0) => {
|
|
28
|
-
const timer = react_1.default.useRef();
|
|
28
|
+
const timer = react_1.default.useRef(undefined);
|
|
29
29
|
const start = () => {
|
|
30
30
|
timer.current = window.setTimeout(fn, waitMs);
|
|
31
31
|
};
|
|
@@ -50,7 +50,7 @@ exports.useSubmenuTargetItem = (0, common_1.composeHooks)((0, common_1.subModelH
|
|
|
50
50
|
ref: elementRef,
|
|
51
51
|
};
|
|
52
52
|
}), (0, common_1.subModelHook)(model => model.UNSTABLE_parentModel, collection_1.useListItemRegister), (0, common_1.createElemPropsHook)(useMenuModel_1.useMenuModel)(model => {
|
|
53
|
-
const currentTargetIdRef = react_1.default.useRef();
|
|
53
|
+
const currentTargetIdRef = react_1.default.useRef(undefined);
|
|
54
54
|
const mouseEnterTimer = useIntentTimer(() => {
|
|
55
55
|
model.UNSTABLE_parentModel.events.goTo({ id: currentTargetIdRef.current || '' });
|
|
56
56
|
model.events.show(event);
|
|
@@ -28,7 +28,7 @@ const React = __importStar(require("react"));
|
|
|
28
28
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
29
29
|
const popup_1 = require("@workday/canvas-kit-react/popup");
|
|
30
30
|
const useIntentTimer = (fn, waitMs = 0) => {
|
|
31
|
-
const timer = React.useRef();
|
|
31
|
+
const timer = React.useRef(undefined);
|
|
32
32
|
const start = () => {
|
|
33
33
|
timer.current = window.setTimeout(fn, waitMs);
|
|
34
34
|
};
|
|
@@ -19,7 +19,7 @@ export const SubmenuPopper = createSubcomponent('div')({
|
|
|
19
19
|
return (_jsx(Popper, { placement: "right-start", popperOptions: defaultMenuPopperOptions, ...elemProps, children: children }));
|
|
20
20
|
});
|
|
21
21
|
const useIntentTimer = (fn, waitMs = 0) => {
|
|
22
|
-
const timer = React.useRef();
|
|
22
|
+
const timer = React.useRef(undefined);
|
|
23
23
|
const start = () => {
|
|
24
24
|
timer.current = window.setTimeout(fn, waitMs);
|
|
25
25
|
};
|
|
@@ -44,7 +44,7 @@ export const useSubmenuTargetItem = composeHooks(subModelHook(model => model.UNS
|
|
|
44
44
|
ref: elementRef,
|
|
45
45
|
};
|
|
46
46
|
}), subModelHook(model => model.UNSTABLE_parentModel, useListItemRegister), createElemPropsHook(useMenuModel)(model => {
|
|
47
|
-
const currentTargetIdRef = React.useRef();
|
|
47
|
+
const currentTargetIdRef = React.useRef(undefined);
|
|
48
48
|
const mouseEnterTimer = useIntentTimer(() => {
|
|
49
49
|
model.UNSTABLE_parentModel.events.goTo({ id: currentTargetIdRef.current || '' });
|
|
50
50
|
model.events.show(event);
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { useUniqueId } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { useAlwaysCloseOnOutsideClick, useCloseOnEscape, useCloseOnFullscreenExit, useCloseOnTargetHidden, usePopupModel, } from '@workday/canvas-kit-react/popup';
|
|
4
4
|
const useIntentTimer = (fn, waitMs = 0) => {
|
|
5
|
-
const timer = React.useRef();
|
|
5
|
+
const timer = React.useRef(undefined);
|
|
6
6
|
const start = () => {
|
|
7
7
|
timer.current = window.setTimeout(fn, waitMs);
|
|
8
8
|
};
|
package/menu/lib/Submenu.tsx
CHANGED
|
@@ -45,7 +45,7 @@ export const SubmenuPopper = createSubcomponent('div')({
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
const useIntentTimer = (fn: Function, waitMs: number = 0): {start(): void; clear(): void} => {
|
|
48
|
-
const timer = React.useRef
|
|
48
|
+
const timer = React.useRef<number | undefined>(undefined);
|
|
49
49
|
|
|
50
50
|
const start = () => {
|
|
51
51
|
timer.current = window.setTimeout(fn, waitMs);
|
|
@@ -81,7 +81,7 @@ export const useSubmenuTargetItem = composeHooks(
|
|
|
81
81
|
}),
|
|
82
82
|
subModelHook(model => (model as any).UNSTABLE_parentModel!, useListItemRegister),
|
|
83
83
|
createElemPropsHook(useMenuModel)(model => {
|
|
84
|
-
const currentTargetIdRef = React.useRef<string>();
|
|
84
|
+
const currentTargetIdRef = React.useRef<string | undefined>(undefined);
|
|
85
85
|
const mouseEnterTimer = useIntentTimer(() => {
|
|
86
86
|
model.UNSTABLE_parentModel.events.goTo({id: currentTargetIdRef.current || ''});
|
|
87
87
|
model.events.show(event);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "16.0.0-alpha.
|
|
3
|
+
"version": "16.0.0-alpha.0485-next.0",
|
|
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",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@tanstack/react-virtual": "^3.13.9",
|
|
54
54
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
55
55
|
"@workday/canvas-expressive-icons-web": "1.0.2",
|
|
56
|
-
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.
|
|
57
|
-
"@workday/canvas-kit-styling": "^16.0.0-alpha.
|
|
58
|
-
"@workday/canvas-system-icons-web": "
|
|
56
|
+
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.0485-next.0",
|
|
57
|
+
"@workday/canvas-kit-styling": "^16.0.0-alpha.0485-next.0",
|
|
58
|
+
"@workday/canvas-system-icons-web": "5.0.1",
|
|
59
59
|
"@workday/canvas-tokens-web": "4.4.0-beta.7",
|
|
60
60
|
"@workday/design-assets-types": "^0.3.0",
|
|
61
61
|
"chroma-js": "^2.2.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
70
70
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "4dfa841c465972c75aae17c5c3ea162295a32d53"
|
|
73
73
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@workday/canvas-kit-react/popup';
|
|
11
11
|
|
|
12
12
|
const useIntentTimer = (fn: Function, waitMs: number = 0): {start(): void; clear(): void} => {
|
|
13
|
-
const timer = React.useRef
|
|
13
|
+
const timer = React.useRef<number | undefined>(undefined);
|
|
14
14
|
|
|
15
15
|
const start = () => {
|
|
16
16
|
timer.current = window.setTimeout(fn, waitMs);
|