@kommo-crm/crm-react-ui-kit 1.16.1 → 1.17.1
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/dist/ContextMenu-DY7dE-m3.mjs +232 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Callout.css +1 -1
- package/dist/components/Button/Button.js +31 -31
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Callout/Callout.js +31 -29
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.props.d.ts +10 -1
- package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts +11 -2
- package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +8 -8
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts +1 -1
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Sub/index.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +4 -4
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +56 -55
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +10 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +13 -13
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +1 -1
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +13 -13
- package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +45 -44
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +53 -53
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/package.json +1 -1
- package/dist/ContextMenu-CsrSe_an.mjs +0 -230
|
@@ -25,12 +25,12 @@ import '../../../../assets/SubContent.css';const me = "_sub_content_scelo_1", fe
|
|
|
25
25
|
onEscapeKeyDown: u,
|
|
26
26
|
onPointerDownOutside: r,
|
|
27
27
|
...P
|
|
28
|
-
} = M, [
|
|
28
|
+
} = M, [D, y] = Z(null), m = $(!1), N = () => m.current, L = (e) => {
|
|
29
29
|
m.current = e;
|
|
30
30
|
}, {
|
|
31
31
|
isAnimatedOpen: f,
|
|
32
32
|
mode: w,
|
|
33
|
-
|
|
33
|
+
isDefaultOpen: p,
|
|
34
34
|
isOpen: E,
|
|
35
35
|
triggerRef: C,
|
|
36
36
|
contentRef: g,
|
|
@@ -71,8 +71,8 @@ import '../../../../assets/SubContent.css';const me = "_sub_content_scelo_1", fe
|
|
|
71
71
|
return /* @__PURE__ */ l(
|
|
72
72
|
ce,
|
|
73
73
|
{
|
|
74
|
-
activeItemId:
|
|
75
|
-
setActiveItemId:
|
|
74
|
+
activeItemId: D,
|
|
75
|
+
setActiveItemId: y,
|
|
76
76
|
onChildOpen: W,
|
|
77
77
|
onSubRootOpen: j,
|
|
78
78
|
shouldCloseCurrentMenuOnSelect: F,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,eAAO,MAAM,sBAAsB;YAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,eAAO,MAAM,sBAAsB;YAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFpE,CAAC"}
|
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { a as
|
|
3
|
-
import { ContextMenuProvider as
|
|
4
|
-
import { ContextMenuMode as
|
|
5
|
-
import { FocusBlocker as
|
|
6
|
-
import { useContextMenuSubMenu as
|
|
7
|
-
import { Trigger as
|
|
8
|
-
import { Content as
|
|
1
|
+
import { jsx as t, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { a as F } from "../../../../index-SjVEUQPm.mjs";
|
|
3
|
+
import { ContextMenuProvider as N } from "../../ContextMenu.context.js";
|
|
4
|
+
import { ContextMenuMode as j } from "../../ContextMenu.enums.js";
|
|
5
|
+
import { FocusBlocker as k } from "../FocusBlocker/FocusBlocker.js";
|
|
6
|
+
import { useContextMenuSubMenu as B } from "./hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
|
|
7
|
+
import { Trigger as L } from "./components/Trigger/Trigger.js";
|
|
8
|
+
import { Content as P } from "./components/Content/Content.js";
|
|
9
9
|
const r = "ContextMenu.__experimental_SubRoot", o = (i) => {
|
|
10
10
|
const {
|
|
11
11
|
children: m,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
isDefaultOpen: u,
|
|
13
|
+
defaultOpen: s,
|
|
14
|
+
mode: p = j.HOVER,
|
|
15
|
+
shouldCloseCurrentMenuOnSelect: l = !0,
|
|
16
|
+
shouldCloseRootMenuOnSelect: a = !0,
|
|
17
|
+
onOpen: d,
|
|
18
|
+
onAnimatedOpen: c,
|
|
19
|
+
...C
|
|
19
20
|
} = i, {
|
|
20
|
-
mode:
|
|
21
|
+
mode: O,
|
|
21
22
|
isOpen: e,
|
|
22
|
-
triggerRef:
|
|
23
|
-
contentRef:
|
|
24
|
-
isAnimatedOpen:
|
|
25
|
-
triggerId:
|
|
26
|
-
itemWithFocusedInput:
|
|
27
|
-
animationDuration:
|
|
28
|
-
hoverCloseDelay:
|
|
23
|
+
triggerRef: f,
|
|
24
|
+
contentRef: M,
|
|
25
|
+
isAnimatedOpen: h,
|
|
26
|
+
triggerId: g,
|
|
27
|
+
itemWithFocusedInput: x,
|
|
28
|
+
animationDuration: S,
|
|
29
|
+
hoverCloseDelay: I,
|
|
29
30
|
closeMenuImmediately: n,
|
|
30
|
-
setItemWithFocusedInput:
|
|
31
|
-
setIsSubMenuOpen:
|
|
32
|
-
onOpenChange:
|
|
33
|
-
onContentEnter:
|
|
34
|
-
onContentLeave:
|
|
31
|
+
setItemWithFocusedInput: R,
|
|
32
|
+
setIsSubMenuOpen: _,
|
|
33
|
+
onOpenChange: b,
|
|
34
|
+
onContentEnter: y,
|
|
35
|
+
onContentLeave: D,
|
|
35
36
|
onOpenByKeyboard: A,
|
|
36
37
|
onChildOpen: v
|
|
37
|
-
} =
|
|
38
|
+
} = B({
|
|
38
39
|
displayName: r,
|
|
39
|
-
mode:
|
|
40
|
-
|
|
41
|
-
onOpen:
|
|
42
|
-
onAnimatedOpen:
|
|
40
|
+
mode: p,
|
|
41
|
+
isDefaultOpen: u ?? s,
|
|
42
|
+
onOpen: d,
|
|
43
|
+
onAnimatedOpen: c
|
|
43
44
|
});
|
|
44
45
|
return /* @__PURE__ */ t(
|
|
45
|
-
|
|
46
|
+
N,
|
|
46
47
|
{
|
|
47
|
-
mode:
|
|
48
|
-
triggerRef:
|
|
49
|
-
contentRef:
|
|
50
|
-
isAnimatedOpen:
|
|
51
|
-
animationDuration:
|
|
52
|
-
hoverCloseDelay:
|
|
48
|
+
mode: O,
|
|
49
|
+
triggerRef: f,
|
|
50
|
+
contentRef: M,
|
|
51
|
+
isAnimatedOpen: h,
|
|
52
|
+
animationDuration: S,
|
|
53
|
+
hoverCloseDelay: I,
|
|
53
54
|
closeMenuImmediately: n,
|
|
54
|
-
onContentEnter:
|
|
55
|
-
onContentLeave:
|
|
55
|
+
onContentEnter: y,
|
|
56
|
+
onContentLeave: D,
|
|
56
57
|
isSubMenuOpen: e,
|
|
57
|
-
setIsSubMenuOpen:
|
|
58
|
-
triggerId:
|
|
58
|
+
setIsSubMenuOpen: _,
|
|
59
|
+
triggerId: g,
|
|
59
60
|
onOpenByKeyboard: A,
|
|
60
|
-
shouldCloseCurrentMenuOnSelect:
|
|
61
|
-
shouldCloseRootMenuOnSelect:
|
|
61
|
+
shouldCloseCurrentMenuOnSelect: l,
|
|
62
|
+
shouldCloseRootMenuOnSelect: a,
|
|
62
63
|
onChildOpen: v,
|
|
63
64
|
isOpen: e,
|
|
64
|
-
itemWithFocusedInput:
|
|
65
|
-
setItemWithFocusedInput:
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
65
|
+
itemWithFocusedInput: x,
|
|
66
|
+
setItemWithFocusedInput: R,
|
|
67
|
+
children: /* @__PURE__ */ E(
|
|
68
|
+
F,
|
|
68
69
|
{
|
|
69
70
|
open: e,
|
|
70
|
-
onOpenChange:
|
|
71
|
+
onOpenChange: b,
|
|
71
72
|
modal: !1,
|
|
72
|
-
...
|
|
73
|
+
...C,
|
|
73
74
|
children: [
|
|
74
75
|
m,
|
|
75
76
|
e && /* @__PURE__ */ t(
|
|
76
|
-
|
|
77
|
+
k,
|
|
77
78
|
{
|
|
78
79
|
onClick: () => {
|
|
79
80
|
n();
|
|
@@ -87,8 +88,8 @@ const r = "ContextMenu.__experimental_SubRoot", o = (i) => {
|
|
|
87
88
|
);
|
|
88
89
|
};
|
|
89
90
|
o.displayName = r;
|
|
90
|
-
o.Trigger =
|
|
91
|
-
o.Content =
|
|
91
|
+
o.Trigger = L;
|
|
92
|
+
o.Content = P;
|
|
92
93
|
export {
|
|
93
94
|
o as __experimental_SubRoot
|
|
94
95
|
};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { DropdownMenuProps as RadixDropdownMenuRootProps } from '@radix-ui/react-dropdown-menu';
|
|
2
2
|
import { ContextMenuModeType } from '../../ContextMenu.types';
|
|
3
|
-
export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenChange' | 'modal'> & {
|
|
3
|
+
export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenChange' | 'modal' | 'defaultOpen'> & {
|
|
4
|
+
/**
|
|
5
|
+
* The open state of the submenu when it is initially rendered.
|
|
6
|
+
* Use when you do not need to control its open state.
|
|
7
|
+
*/
|
|
8
|
+
isDefaultOpen?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `isDefaultOpen` instead.
|
|
11
|
+
*/
|
|
12
|
+
defaultOpen?: boolean;
|
|
4
13
|
/**
|
|
5
14
|
* Called whenever the open state of the menu changes.
|
|
6
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubRoot.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,0BAA0B,EAC1B,cAAc,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"SubRoot.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,0BAA0B,EAC1B,cAAc,GAAG,OAAO,GAAG,aAAa,CACzC,GAAG;IACF;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useId as se, useState as a, useRef as I, useLayoutEffect as
|
|
2
|
-
import { a as
|
|
1
|
+
import { useId as se, useState as a, useRef as I, useLayoutEffect as ie, useEffect as c } from "react";
|
|
2
|
+
import { a as oe } from "../../../../../../index-DBS3EIVR.mjs";
|
|
3
3
|
import { focusFirstFocusableItem as ce } from "../../../../utils/focusFirstFocusableItem/focusFirstFocusableItem.js";
|
|
4
4
|
import { ContextMenuMode as s } from "../../../../ContextMenu.enums.js";
|
|
5
5
|
import { useLevelContext as le } from "../../../../providers/LevelProvider/LevelProvider.js";
|
|
@@ -10,7 +10,7 @@ const ye = (Q) => {
|
|
|
10
10
|
const {
|
|
11
11
|
displayName: h,
|
|
12
12
|
mode: U,
|
|
13
|
-
|
|
13
|
+
isDefaultOpen: R,
|
|
14
14
|
onOpen: e,
|
|
15
15
|
onAnimatedOpen: E
|
|
16
16
|
} = Q, L = se(), {
|
|
@@ -22,22 +22,22 @@ const ye = (Q) => {
|
|
|
22
22
|
} = fe(h), [d, N] = a(m || R || !1), [v, f] = a(!1), [P, C] = a(!1), [F, Y] = a(!1), [T, Z] = a(null), [K, _] = a(null), {
|
|
23
23
|
level: $,
|
|
24
24
|
isAnimatedOpen: b,
|
|
25
|
-
onChildOpen:
|
|
25
|
+
onChildOpen: i,
|
|
26
26
|
onSubRootOpen: M,
|
|
27
27
|
isAiming: p,
|
|
28
28
|
isChildAiming: A,
|
|
29
29
|
setActiveItemId: S
|
|
30
|
-
} = le(h), { onSubmenuOpen: H, animationDuration: j, hoverCloseDelay: V } = ae(h), { closeRootMenuImmediately: B } = me(h), W = I(null), x = I(null), t = I(null),
|
|
30
|
+
} = le(h), { onSubmenuOpen: H, animationDuration: j, hoverCloseDelay: V } = ae(h), { closeRootMenuImmediately: B } = me(h), W = I(null), x = I(null), t = I(null), o = I(null), k = I(!0), n = oe() ? s.CLICK : U, l = m || d, O = (u) => {
|
|
31
31
|
$ > 1 && (H == null || H(u)), setTimeout(() => M == null ? void 0 : M(u), 0);
|
|
32
32
|
}, w = () => {
|
|
33
|
-
t.current && (clearTimeout(t.current), t.current = null),
|
|
33
|
+
t.current && (clearTimeout(t.current), t.current = null), o.current && (clearTimeout(o.current), o.current = null);
|
|
34
34
|
}, z = (u = !1) => {
|
|
35
35
|
r == null || r(!1), N(!1), e == null || e(!1), C(!1), u && (B == null || B());
|
|
36
36
|
}, q = () => {
|
|
37
37
|
if (w(), n === s.HOVER) {
|
|
38
38
|
if (F && T === s.CLICK || K !== null)
|
|
39
39
|
return;
|
|
40
|
-
f(!1),
|
|
40
|
+
f(!1), o.current = setTimeout(() => {
|
|
41
41
|
z();
|
|
42
42
|
}, j);
|
|
43
43
|
} else
|
|
@@ -50,17 +50,17 @@ const ye = (Q) => {
|
|
|
50
50
|
N(R);
|
|
51
51
|
return;
|
|
52
52
|
} else u || J(W.current);
|
|
53
|
-
u ? (
|
|
53
|
+
u ? (o.current && (clearTimeout(o.current), o.current = null), n === s.HOVER && f(!0), r == null || r(!0), e == null || e(!0)) : q();
|
|
54
54
|
}, G = (u) => {
|
|
55
55
|
y == null || y(u);
|
|
56
56
|
}, te = () => {
|
|
57
|
-
D(!1), n === s.HOVER && ((p != null && p() || A != null && A()) && !d || (
|
|
57
|
+
D(!1), n === s.HOVER && ((p != null && p() || A != null && A()) && !d || (o.current && (clearTimeout(o.current), o.current = null, f(!0)), d || (t.current && (clearTimeout(t.current), t.current = null), f(!0), r == null || r(!0), e == null || e(!0)), C(!0)));
|
|
58
58
|
}, re = () => {
|
|
59
59
|
D(!1), n === s.HOVER && (t.current && (clearTimeout(t.current), t.current = null), C(!1));
|
|
60
60
|
}, ne = (u, ue) => {
|
|
61
61
|
Y(u), Z(ue);
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return ie(() => {
|
|
64
64
|
m !== void 0 && f(m);
|
|
65
65
|
}, [m]), c(() => {
|
|
66
66
|
!d && !v || n === s.CLICK || g || (P ? t.current && (clearTimeout(t.current), t.current = null) : t.current || (t.current = setTimeout(() => {
|
|
@@ -69,16 +69,16 @@ const ye = (Q) => {
|
|
|
69
69
|
}, [n, d, P, V]), c(() => {
|
|
70
70
|
E == null || E(v);
|
|
71
71
|
}, [v]), c(() => {
|
|
72
|
-
|
|
72
|
+
i(l, n), O(l);
|
|
73
73
|
}, [l, n]), c(() => {
|
|
74
|
-
K !== null && (
|
|
74
|
+
K !== null && (i == null || i(!0, s.CLICK));
|
|
75
75
|
}, [K]), c(() => {
|
|
76
76
|
if (T !== null) {
|
|
77
77
|
if (k.current) {
|
|
78
78
|
k.current = !1;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
F && T === s.CLICK ?
|
|
81
|
+
F && T === s.CLICK ? i == null || i(!0, T) : i == null || i(l, n);
|
|
82
82
|
}
|
|
83
83
|
}, [F, T]), c(() => {
|
|
84
84
|
b || q();
|
|
@@ -13,7 +13,7 @@ export interface UseContextMenuSubMenuOptions {
|
|
|
13
13
|
* The open state of the dropdown menu when it is initially rendered.
|
|
14
14
|
* Use when you do not need to control its open state.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
isDefaultOpen?: boolean;
|
|
17
17
|
/**
|
|
18
18
|
* The callback function to be called when the context menu is opened.
|
|
19
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContextMenuSubMenu.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"useContextMenuSubMenu.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACzC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC3E;;OAEG;IACH,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C"}
|
|
@@ -32,7 +32,7 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
|
|
|
32
32
|
} = c, {
|
|
33
33
|
mode: u,
|
|
34
34
|
isOpen: m,
|
|
35
|
-
|
|
35
|
+
isDefaultOpen: p,
|
|
36
36
|
triggerId: R,
|
|
37
37
|
triggerRef: _,
|
|
38
38
|
setIsOpen: y,
|
|
@@ -43,11 +43,11 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
|
|
|
43
43
|
dataHighlighted: S,
|
|
44
44
|
onFocus: T,
|
|
45
45
|
onMouseEnter: o,
|
|
46
|
-
onBlur:
|
|
47
|
-
onMouseLeave:
|
|
48
|
-
onPointerEnter:
|
|
49
|
-
onPointerLeave:
|
|
50
|
-
onPointerMove:
|
|
46
|
+
onBlur: D,
|
|
47
|
+
onMouseLeave: F,
|
|
48
|
+
onPointerEnter: K,
|
|
49
|
+
onPointerLeave: N,
|
|
50
|
+
onPointerMove: A
|
|
51
51
|
} = q({
|
|
52
52
|
displayName: g,
|
|
53
53
|
id: R,
|
|
@@ -63,7 +63,7 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
|
|
|
63
63
|
onPointerEnter: C,
|
|
64
64
|
onPointerLeave: E,
|
|
65
65
|
onPointerMove: I
|
|
66
|
-
}),
|
|
66
|
+
}), B = (e) => {
|
|
67
67
|
u === d.HOVER && ([
|
|
68
68
|
t.ENTER,
|
|
69
69
|
t.SPACE,
|
|
@@ -83,16 +83,16 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
|
|
|
83
83
|
"data-highlighted": m || S === "" || u === d.CLICK && m ? "" : void 0,
|
|
84
84
|
"data-item": !0,
|
|
85
85
|
"data-submenu-trigger": !0,
|
|
86
|
-
onKeyDown:
|
|
86
|
+
onKeyDown: B,
|
|
87
87
|
onClick: k,
|
|
88
88
|
onFocus: T,
|
|
89
89
|
onMouseEnter: o,
|
|
90
90
|
onMouseMove: H,
|
|
91
|
-
onBlur:
|
|
92
|
-
onMouseLeave:
|
|
93
|
-
onPointerEnter:
|
|
94
|
-
onPointerMove:
|
|
95
|
-
onPointerLeave:
|
|
91
|
+
onBlur: D,
|
|
92
|
+
onMouseLeave: F,
|
|
93
|
+
onPointerEnter: K,
|
|
94
|
+
onPointerMove: A,
|
|
95
|
+
onPointerLeave: N,
|
|
96
96
|
...L,
|
|
97
97
|
children: b
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAoBpD,eAAO,MAAM,OAAO,kMAkIlB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { T as
|
|
4
|
-
import { c as
|
|
5
|
-
import { mergeRefs as
|
|
6
|
-
import { KeyboardKey as
|
|
7
|
-
import { useContextMenuContext as
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useState as H } from "react";
|
|
3
|
+
import { T as K } from "../../../../index-SjVEUQPm.mjs";
|
|
4
|
+
import { c as O } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { mergeRefs as S } from "../../../../lib/utils.js";
|
|
6
|
+
import { KeyboardKey as f } from "../../../../lib/keyboard/index.js";
|
|
7
|
+
import { useContextMenuContext as F } from "../../ContextMenu.context.js";
|
|
8
8
|
import { ContextMenuMode as u } from "../../ContextMenu.enums.js";
|
|
9
|
-
import { focusFirstFocusableItem as
|
|
10
|
-
const l = "ContextMenu.Trigger",
|
|
9
|
+
import { focusFirstFocusableItem as W } from "../../utils/focusFirstFocusableItem/focusFirstFocusableItem.js";
|
|
10
|
+
const l = "ContextMenu.Trigger", _ = y((g, h) => {
|
|
11
11
|
const {
|
|
12
12
|
className: C,
|
|
13
13
|
children: M,
|
|
@@ -16,50 +16,51 @@ const l = "ContextMenu.Trigger", S = w((d, g) => {
|
|
|
16
16
|
onMouseLeave: n,
|
|
17
17
|
onMouseMove: s,
|
|
18
18
|
onPointerDown: i,
|
|
19
|
-
onPointerUp:
|
|
19
|
+
onPointerUp: a,
|
|
20
20
|
...R
|
|
21
|
-
} =
|
|
22
|
-
triggerRef:
|
|
21
|
+
} = g, {
|
|
22
|
+
triggerRef: v,
|
|
23
23
|
contentRef: x,
|
|
24
|
-
mode:
|
|
25
|
-
isOpen:
|
|
26
|
-
onContentEnter:
|
|
24
|
+
mode: c,
|
|
25
|
+
isOpen: m,
|
|
26
|
+
onContentEnter: d,
|
|
27
27
|
onContentLeave: E,
|
|
28
|
-
onOpenByKeyboard:
|
|
29
|
-
} =
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
) && (
|
|
35
|
-
|
|
36
|
-
}, 0))), t == null || t(
|
|
37
|
-
},
|
|
38
|
-
p(
|
|
39
|
-
},
|
|
40
|
-
E(
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
28
|
+
onOpenByKeyboard: o
|
|
29
|
+
} = F(l), [N, p] = H(!1), P = (e) => {
|
|
30
|
+
e.preventDefault(), e.stopPropagation(), i == null || i(e);
|
|
31
|
+
}, T = (e) => {
|
|
32
|
+
c === u.HOVER && (e.stopPropagation(), [f.ENTER, f.SPACE, f.ARROW_DOWN].includes(
|
|
33
|
+
e.key
|
|
34
|
+
) && (o(!0), setTimeout(() => {
|
|
35
|
+
W(x.current);
|
|
36
|
+
}, 0))), t == null || t(e);
|
|
37
|
+
}, D = (e) => {
|
|
38
|
+
p(!0), d(e), r == null || r(e);
|
|
39
|
+
}, A = (e) => {
|
|
40
|
+
p(!1), E(e), n == null || n(e);
|
|
41
|
+
}, I = (e) => {
|
|
42
|
+
m || d(e), s == null || s(e);
|
|
43
|
+
}, L = (e) => {
|
|
44
|
+
c === u.CLICK && (o == null || o(!m)), a == null || a(e);
|
|
45
45
|
};
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
return /* @__PURE__ */ w(
|
|
47
|
+
K,
|
|
48
48
|
{
|
|
49
|
-
ref:
|
|
50
|
-
className:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
ref: S(v, h),
|
|
50
|
+
className: O(C),
|
|
51
|
+
"data-highlighted": m || N ? "" : void 0,
|
|
52
|
+
onPointerDown: P,
|
|
53
|
+
onPointerUp: L,
|
|
54
|
+
onKeyDown: T,
|
|
55
|
+
onMouseEnter: D,
|
|
56
|
+
onMouseLeave: A,
|
|
57
|
+
onMouseMove: I,
|
|
57
58
|
...R,
|
|
58
59
|
children: M
|
|
59
60
|
}
|
|
60
61
|
);
|
|
61
62
|
});
|
|
62
|
-
|
|
63
|
+
_.displayName = l;
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
_ as Trigger
|
|
65
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,cAAc,YAChB,qBAAqB,KAC7B,
|
|
1
|
+
{"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,cAAc,YAChB,qBAAqB,KAC7B,oBA6mBF,CAAC"}
|