@kommo-crm/crm-react-ui-kit 1.1.1-beta.1 → 1.1.1-beta.4
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/assets/ItemRightSlot.css +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +64 -43
- package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Content/Content.js +1 -1
- package/dist/components/ContextMenu/components/Content/index.js +1 -1
- package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Item/Item.js +77 -58
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js +44 -21
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +60 -33
- package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +64 -52
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +83 -74
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +58 -36
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +82 -60
- package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +40 -22
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +57 -57
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +40 -40
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.d.ts +11 -10
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.js +17 -15
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.d.ts +3 -0
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.d.ts.map +1 -0
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.js +1 -0
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/useContentPositioning-BLCC-Xty.mjs +213 -0
- package/package.json +2 -2
- package/dist/useContentPositioning-27D32n5u.mjs +0 -185
|
@@ -1,63 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { u as
|
|
5
|
-
import { c as
|
|
6
|
-
import { LevelProvider as
|
|
7
|
-
import { useContextMenuSubContext as
|
|
8
|
-
import { useContextMenuContext as
|
|
9
|
-
import '../../../../assets/SubContent.css';const
|
|
10
|
-
sub_content:
|
|
11
|
-
},
|
|
12
|
-
({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useState as c, useLayoutEffect as f } from "react";
|
|
3
|
+
import { c as P } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { u as F, e as O, a as w } from "../../../../react-spring_web.modern-Dnq1lqN5.mjs";
|
|
5
|
+
import { c as D } from "../../../../index-L8X2o7IH.mjs";
|
|
6
|
+
import { LevelProvider as E } from "../../providers/LevelProvider/LevelProvider.js";
|
|
7
|
+
import { useContextMenuSubContext as R } from "../Sub/Sub.context.js";
|
|
8
|
+
import { useContextMenuContext as W } from "../../ContextMenu.context.js";
|
|
9
|
+
import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q = {
|
|
10
|
+
sub_content: j
|
|
11
|
+
}, m = "ContextMenu.SubContent", z = N(
|
|
12
|
+
({
|
|
13
|
+
className: d,
|
|
14
|
+
children: p,
|
|
15
|
+
sideOffset: l = 4,
|
|
16
|
+
collisionPadding: I = 10,
|
|
17
|
+
onMouseEnter: e,
|
|
18
|
+
onMouseLeave: n,
|
|
19
|
+
...b
|
|
20
|
+
}, _) => {
|
|
21
|
+
const [S, x] = c(null), {
|
|
22
|
+
animatedOpen: i,
|
|
23
|
+
startAnimation: A,
|
|
24
|
+
onMouseEnter: o,
|
|
25
|
+
onMouseLeave: s,
|
|
26
|
+
defaultOpen: u
|
|
27
|
+
} = R(m), { animationDuration: C } = W(m), [y, g] = c(!1), [h, a] = c(!1);
|
|
28
|
+
f(() => {
|
|
29
|
+
A();
|
|
30
|
+
}, []), f(() => {
|
|
31
|
+
let t;
|
|
32
|
+
return i ? (a(!1), t = requestAnimationFrame(() => {
|
|
33
|
+
a(!0);
|
|
34
|
+
})) : a(!1), () => {
|
|
35
|
+
t && cancelAnimationFrame(t);
|
|
28
36
|
};
|
|
29
|
-
}, [
|
|
30
|
-
const
|
|
31
|
-
opacity:
|
|
32
|
-
config:
|
|
37
|
+
}, [i]);
|
|
38
|
+
const v = F({
|
|
39
|
+
opacity: h && i || u !== void 0 ? 1 : 0,
|
|
40
|
+
config: u === void 0 ? { duration: C, easing: O.easeInOutCubic } : { duration: 0 }
|
|
33
41
|
});
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
42
|
+
return /* @__PURE__ */ r(
|
|
43
|
+
E,
|
|
36
44
|
{
|
|
37
|
-
hasItemWithIcon:
|
|
38
|
-
setHasItemWithIcon:
|
|
39
|
-
activeItemId:
|
|
40
|
-
setActiveItemId:
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
|
|
45
|
+
hasItemWithIcon: y,
|
|
46
|
+
setHasItemWithIcon: g,
|
|
47
|
+
activeItemId: S,
|
|
48
|
+
setActiveItemId: x,
|
|
49
|
+
children: /* @__PURE__ */ r(
|
|
50
|
+
w.div,
|
|
43
51
|
{
|
|
44
52
|
style: {
|
|
45
53
|
position: "fixed",
|
|
46
54
|
zIndex: Number.MAX_SAFE_INTEGER,
|
|
47
|
-
...
|
|
55
|
+
...v
|
|
56
|
+
},
|
|
57
|
+
onMouseEnter: (t) => {
|
|
58
|
+
o == null || o(t), e == null || e(t);
|
|
59
|
+
},
|
|
60
|
+
onMouseLeave: (t) => {
|
|
61
|
+
s == null || s(t), n == null || n(t);
|
|
48
62
|
},
|
|
49
|
-
onMouseEnter: x,
|
|
50
|
-
onMouseLeave: _,
|
|
51
63
|
"data-content-wrapper": !0,
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
|
|
64
|
+
children: /* @__PURE__ */ r(
|
|
65
|
+
P,
|
|
54
66
|
{
|
|
55
|
-
ref:
|
|
56
|
-
className:
|
|
57
|
-
sideOffset:
|
|
58
|
-
collisionPadding:
|
|
59
|
-
...
|
|
60
|
-
children:
|
|
67
|
+
ref: _,
|
|
68
|
+
className: D(q.sub_content, d),
|
|
69
|
+
sideOffset: l,
|
|
70
|
+
collisionPadding: I,
|
|
71
|
+
...b,
|
|
72
|
+
children: p
|
|
61
73
|
}
|
|
62
74
|
)
|
|
63
75
|
}
|
|
@@ -66,7 +78,7 @@ import '../../../../assets/SubContent.css';const w = "_sub_content_y6v65_1", D =
|
|
|
66
78
|
);
|
|
67
79
|
}
|
|
68
80
|
);
|
|
69
|
-
|
|
81
|
+
z.displayName = m;
|
|
70
82
|
export {
|
|
71
|
-
|
|
83
|
+
z as SubContent
|
|
72
84
|
};
|
|
@@ -4,7 +4,7 @@ import { R as T } from "../../../../index-BA3njR2k.mjs";
|
|
|
4
4
|
import { useContextMenuContext as w, ContextMenuProvider as L } from "../../ContextMenu.context.js";
|
|
5
5
|
import { ContextMenuMode as P } from "../../ContextMenu.enums.js";
|
|
6
6
|
import { useContextMenuSubMenu as j } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
|
|
7
|
-
import "../../../../useContentPositioning-
|
|
7
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
8
8
|
import "../Content/Content.utils.js";
|
|
9
9
|
import "../../providers/LevelProvider/LevelProvider.js";
|
|
10
10
|
import { useContextMenuItemContext as B } from "../Item/Item.context.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA4BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA4BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkHnB,CAAC"}
|
|
@@ -1,87 +1,96 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { C as
|
|
4
|
-
import { c as
|
|
5
|
-
import { u as
|
|
6
|
-
import { mergeRefs as
|
|
7
|
-
import { LevelProvider as
|
|
8
|
-
import { useContextMenuContext as
|
|
9
|
-
import { ContextMenuMode as
|
|
10
|
-
import { focusParentItem as
|
|
11
|
-
import { u as
|
|
12
|
-
import { Direction as
|
|
13
|
-
import { directionToSide as
|
|
14
|
-
const
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as L, useState as C } from "react";
|
|
3
|
+
import { C as j } from "../../../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as k } from "../../../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { u as w, e as z, a as F } from "../../../../../../react-spring_web.modern-Dnq1lqN5.mjs";
|
|
6
|
+
import { mergeRefs as M } from "../../../../../../lib/utils.js";
|
|
7
|
+
import { LevelProvider as X } from "../../../../providers/LevelProvider/LevelProvider.js";
|
|
8
|
+
import { useContextMenuContext as Y } from "../../../../ContextMenu.context.js";
|
|
9
|
+
import { ContextMenuMode as g } from "../../../../ContextMenu.enums.js";
|
|
10
|
+
import { focusParentItem as q } from "../../../../utils/focusParentItem/focusParentItem.js";
|
|
11
|
+
import { u as J, s as K } from "../../../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
12
|
+
import { Direction as Q } from "../../../Content/Content.enums.js";
|
|
13
|
+
import { directionToSide as U } from "../../../Content/Content.utils.js";
|
|
14
|
+
const x = "ContextMenu.Content", V = L(
|
|
15
15
|
({
|
|
16
|
-
style:
|
|
17
|
-
className:
|
|
18
|
-
children:
|
|
19
|
-
alignOffset:
|
|
20
|
-
arrowPadding:
|
|
21
|
-
collisionBoundary:
|
|
22
|
-
direction:
|
|
23
|
-
disableAutoPositioning:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
|
|
16
|
+
style: N,
|
|
17
|
+
className: R,
|
|
18
|
+
children: s,
|
|
19
|
+
alignOffset: S,
|
|
20
|
+
arrowPadding: h = 5,
|
|
21
|
+
collisionBoundary: a,
|
|
22
|
+
direction: f = Q.DOWN_RIGHT,
|
|
23
|
+
disableAutoPositioning: c = !1,
|
|
24
|
+
onMouseEnter: e,
|
|
25
|
+
onMouseLeave: r,
|
|
26
|
+
onKeyDown: o,
|
|
27
|
+
...y
|
|
28
|
+
}, A) => {
|
|
29
|
+
const [O, v] = C(!1), [P, _] = C(null), {
|
|
30
|
+
triggerRef: p,
|
|
31
|
+
contentRef: d,
|
|
32
|
+
animatedOpen: H,
|
|
33
|
+
animationDuration: T,
|
|
34
|
+
mode: I,
|
|
35
|
+
temporaryHoverClose: l,
|
|
36
|
+
onMouseEnter: i,
|
|
37
|
+
onMouseLeave: n,
|
|
38
|
+
closeMenuImmediately: W
|
|
39
|
+
} = Y(x), { align: b, labelOffset: D, isPositioned: u } = J({
|
|
40
|
+
direction: f,
|
|
41
|
+
alignOffset: S,
|
|
42
|
+
disableAutoPositioning: c,
|
|
43
|
+
triggerRef: p,
|
|
44
|
+
contentRef: d,
|
|
45
|
+
collisionBoundary: a,
|
|
46
|
+
children: s
|
|
47
|
+
}), E = w({
|
|
48
|
+
opacity: u && (I === g.CLICK && !l || H) ? 1 : 0,
|
|
49
|
+
config: I === g.CLICK && !l ? { duration: 0 } : { duration: T, easing: z.easeInOutCubic }
|
|
50
|
+
}), G = (t) => {
|
|
51
|
+
t.key === "ArrowLeft" && (W(), q(p.current)), o == null || o(t);
|
|
49
52
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
|
|
53
|
+
return /* @__PURE__ */ m(
|
|
54
|
+
X,
|
|
52
55
|
{
|
|
53
|
-
hasItemWithIcon:
|
|
54
|
-
setHasItemWithIcon:
|
|
55
|
-
activeItemId:
|
|
56
|
-
setActiveItemId:
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
|
|
56
|
+
hasItemWithIcon: O,
|
|
57
|
+
setHasItemWithIcon: v,
|
|
58
|
+
activeItemId: P,
|
|
59
|
+
setActiveItemId: _,
|
|
60
|
+
children: /* @__PURE__ */ m(
|
|
61
|
+
F.div,
|
|
59
62
|
{
|
|
60
63
|
style: {
|
|
61
64
|
zIndex: Number.MAX_SAFE_INTEGER,
|
|
62
65
|
position: "fixed",
|
|
63
|
-
...
|
|
66
|
+
...E
|
|
64
67
|
},
|
|
65
68
|
"data-content-wrapper": !0,
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
69
|
+
children: /* @__PURE__ */ m(
|
|
70
|
+
j,
|
|
68
71
|
{
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
72
|
+
ref: M(d, A),
|
|
73
|
+
className: k(K.content, R),
|
|
71
74
|
style: {
|
|
72
|
-
...
|
|
73
|
-
pointerEvents:
|
|
75
|
+
...N || {},
|
|
76
|
+
pointerEvents: c || u ? "auto" : "none"
|
|
74
77
|
},
|
|
75
|
-
collisionBoundary:
|
|
76
|
-
side:
|
|
77
|
-
align:
|
|
78
|
-
arrowPadding:
|
|
79
|
-
alignOffset:
|
|
80
|
-
onMouseEnter:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
collisionBoundary: a,
|
|
79
|
+
side: U[f],
|
|
80
|
+
align: b,
|
|
81
|
+
arrowPadding: h,
|
|
82
|
+
alignOffset: D,
|
|
83
|
+
onMouseEnter: (t) => {
|
|
84
|
+
i == null || i(t), e == null || e(t);
|
|
85
|
+
},
|
|
86
|
+
onMouseLeave: (t) => {
|
|
87
|
+
n == null || n(t), r == null || r(t);
|
|
88
|
+
},
|
|
89
|
+
onKeyDown: (t) => {
|
|
90
|
+
G(t);
|
|
91
|
+
},
|
|
92
|
+
...y,
|
|
93
|
+
children: s
|
|
85
94
|
}
|
|
86
95
|
)
|
|
87
96
|
}
|
|
@@ -90,7 +99,7 @@ const u = "ContextMenu.Content", J = P(
|
|
|
90
99
|
);
|
|
91
100
|
}
|
|
92
101
|
);
|
|
93
|
-
|
|
102
|
+
V.displayName = x;
|
|
94
103
|
export {
|
|
95
|
-
|
|
104
|
+
V as Content
|
|
96
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,eAAO,MAAM,OAAO,kMA+EnB,CAAC"}
|
|
@@ -1,50 +1,72 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { T as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ContextMenuMode as D } from "../../../../ContextMenu.enums.js";
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v } from "react";
|
|
3
|
+
import { T as y } from "../../../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { mergeRefs as A } from "../../../../../../lib/utils.js";
|
|
5
|
+
import { useContextMenuContext as E } from "../../../../ContextMenu.context.js";
|
|
6
|
+
import { ContextMenuMode as H } from "../../../../ContextMenu.enums.js";
|
|
8
7
|
import "../../../../providers/LevelProvider/LevelProvider.js";
|
|
9
|
-
import "../../../../../../useContentPositioning-
|
|
8
|
+
import "../../../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
10
9
|
import "../../../Content/Content.utils.js";
|
|
11
|
-
import { useContextMenuItemFocus as
|
|
12
|
-
const
|
|
13
|
-
({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
import { useContextMenuItemFocus as h } from "../../../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
const s = "ContextMenu.Trigger", j = v(
|
|
12
|
+
({
|
|
13
|
+
className: d,
|
|
14
|
+
children: x,
|
|
15
|
+
onFocus: r,
|
|
16
|
+
onBlur: e,
|
|
17
|
+
onMouseEnter: i,
|
|
18
|
+
onMouseLeave: o,
|
|
19
|
+
onPointerDown: g,
|
|
20
|
+
...u
|
|
21
|
+
}, C) => {
|
|
22
|
+
const {
|
|
23
|
+
triggerRef: n,
|
|
24
|
+
mode: M,
|
|
25
|
+
onMouseEnter: R,
|
|
26
|
+
onMouseLeave: T,
|
|
27
|
+
triggerId: N
|
|
28
|
+
} = E(s), {
|
|
29
|
+
dataHighlighted: b,
|
|
30
|
+
onFocus: m,
|
|
31
|
+
onMouseEnter: p,
|
|
32
|
+
onBlur: a,
|
|
33
|
+
onMouseLeave: f
|
|
34
|
+
} = h({
|
|
35
|
+
displayName: s,
|
|
36
|
+
id: N || "",
|
|
22
37
|
isDisabled: !1,
|
|
23
|
-
onMouseEnter:
|
|
24
|
-
onMouseLeave:
|
|
38
|
+
onMouseEnter: R,
|
|
39
|
+
onMouseLeave: T
|
|
25
40
|
});
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
41
|
+
return /* @__PURE__ */ c(
|
|
42
|
+
y,
|
|
28
43
|
{
|
|
29
|
-
ref:
|
|
30
|
-
className:
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
ref: A(n, C),
|
|
45
|
+
className: d,
|
|
46
|
+
"data-highlighted": b,
|
|
47
|
+
onPointerDown: (t) => {
|
|
48
|
+
M === H.HOVER && t.preventDefault(), t.stopPropagation(), g == null || g(t);
|
|
33
49
|
},
|
|
34
|
-
onMouseEnter:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
onMouseEnter: (t) => {
|
|
51
|
+
p == null || p(t), i == null || i(t);
|
|
52
|
+
},
|
|
53
|
+
onMouseLeave: (t) => {
|
|
54
|
+
f == null || f(t), o == null || o(t);
|
|
55
|
+
},
|
|
56
|
+
onFocus: (t) => {
|
|
57
|
+
t.preventDefault(), t.stopPropagation(), m == null || m(), r == null || r(t);
|
|
58
|
+
},
|
|
59
|
+
onBlur: (t) => {
|
|
60
|
+
a == null || a(), e == null || e(t);
|
|
38
61
|
},
|
|
39
|
-
onBlur: M,
|
|
40
62
|
"data-submenu-trigger": !0,
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
63
|
+
...u,
|
|
64
|
+
children: x
|
|
43
65
|
}
|
|
44
66
|
);
|
|
45
67
|
}
|
|
46
68
|
);
|
|
47
|
-
|
|
69
|
+
j.displayName = s;
|
|
48
70
|
export {
|
|
49
|
-
|
|
71
|
+
j as Trigger
|
|
50
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubTrigger/SubTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAoB1C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SubTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubTrigger/SubTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAoB1C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAyItB,CAAC"}
|
|
@@ -1,77 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { b as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { useContextMenuSubContext as
|
|
7
|
-
import { hasItemIcon as
|
|
8
|
-
import { ContextMenuMode as
|
|
9
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as R } from "react";
|
|
3
|
+
import { b as H } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as j } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as z } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { useContextMenuSubContext as D } from "../Sub/Sub.context.js";
|
|
7
|
+
import { hasItemIcon as V } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
|
+
import { ContextMenuMode as i } from "../../ContextMenu.enums.js";
|
|
9
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
10
10
|
import "../Content/Content.utils.js";
|
|
11
11
|
import "../../ContextMenu.context.js";
|
|
12
|
-
import { useContextMenuItemFocus as
|
|
13
|
-
import '../../../../assets/SubTrigger.css';const
|
|
14
|
-
sub_trigger:
|
|
15
|
-
},
|
|
16
|
-
({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onMouseEnter:
|
|
37
|
-
onMouseLeave:
|
|
12
|
+
import { useContextMenuItemFocus as W } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
13
|
+
import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_d2xgz_1", q = {
|
|
14
|
+
sub_trigger: Y
|
|
15
|
+
}, a = "ContextMenu.SubTrigger", w = R(
|
|
16
|
+
({
|
|
17
|
+
className: S,
|
|
18
|
+
children: v,
|
|
19
|
+
isDisabled: n,
|
|
20
|
+
onKeyDown: p,
|
|
21
|
+
onFocus: s,
|
|
22
|
+
onBlur: g,
|
|
23
|
+
onClick: e,
|
|
24
|
+
onPointerEnter: f,
|
|
25
|
+
onPointerMove: m,
|
|
26
|
+
onPointerLeave: u,
|
|
27
|
+
onMouseEnter: d,
|
|
28
|
+
onMouseLeave: C,
|
|
29
|
+
...h
|
|
30
|
+
}, l) => {
|
|
31
|
+
const { hasItemWithIcon: A } = z(a), {
|
|
32
|
+
mode: r,
|
|
33
|
+
open: x,
|
|
34
|
+
defaultOpen: o,
|
|
35
|
+
setOpen: N,
|
|
36
|
+
onMouseEnter: O,
|
|
37
|
+
onMouseLeave: T,
|
|
38
|
+
triggerId: y,
|
|
39
|
+
onOpenByKeyboard: L
|
|
40
|
+
} = D(a), {
|
|
41
|
+
dataHighlighted: K,
|
|
42
|
+
onFocus: b,
|
|
43
|
+
onMouseEnter: c,
|
|
44
|
+
onBlur: I,
|
|
45
|
+
onMouseLeave: _
|
|
46
|
+
} = W({
|
|
47
|
+
displayName: a,
|
|
48
|
+
id: y,
|
|
49
|
+
isDisabled: n,
|
|
50
|
+
onMouseEnter: O,
|
|
51
|
+
onMouseLeave: T
|
|
38
52
|
});
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
53
|
+
return /* @__PURE__ */ M(
|
|
54
|
+
H,
|
|
41
55
|
{
|
|
42
|
-
ref:
|
|
43
|
-
className:
|
|
44
|
-
disabled:
|
|
56
|
+
ref: l,
|
|
57
|
+
className: j(q.sub_trigger, S),
|
|
58
|
+
disabled: n,
|
|
45
59
|
"data-item": !0,
|
|
46
|
-
"data-no-icon-align":
|
|
47
|
-
"data-highlighted":
|
|
60
|
+
"data-no-icon-align": V(v) || !A ? "" : void 0,
|
|
61
|
+
"data-highlighted": x || K === "" || r === i.CLICK && x ? "" : void 0,
|
|
48
62
|
"data-submenu-trigger": !0,
|
|
49
|
-
onMouseEnter:
|
|
50
|
-
|
|
51
|
-
o === t.HOVER && (["Enter", " ", "ArrowRight"].includes(e.key) ? p(!0) : e.key === "ArrowLeft" && (p(!1), e.currentTarget.focus())), n == null || n(e);
|
|
63
|
+
onMouseEnter: (t) => {
|
|
64
|
+
c == null || c(t), d == null || d(t);
|
|
52
65
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
onMouseLeave: h,
|
|
56
|
-
onClick: (e) => {
|
|
57
|
-
(o === t.CLICK || r !== void 0) && (e.preventDefault(), e.stopPropagation(), r === void 0 && c(!a));
|
|
66
|
+
onMouseLeave: (t) => {
|
|
67
|
+
_ == null || _(t), C == null || C(t);
|
|
58
68
|
},
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
onKeyDown: (t) => {
|
|
70
|
+
r === i.HOVER && (["Enter", " ", "ArrowRight"].includes(t.key) ? L(!0) : t.key === "ArrowLeft" && (L(!1), t.currentTarget.focus())), p == null || p(t);
|
|
61
71
|
},
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
onFocus: (t) => {
|
|
73
|
+
b == null || b(), s == null || s(t);
|
|
64
74
|
},
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
onBlur: (t) => {
|
|
76
|
+
I == null || I(), g == null || g(t);
|
|
67
77
|
},
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
onClick: (t) => {
|
|
79
|
+
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation(), o === void 0 && N(!x)), e == null || e(t);
|
|
80
|
+
},
|
|
81
|
+
onPointerEnter: (t) => {
|
|
82
|
+
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation()), f == null || f(t);
|
|
83
|
+
},
|
|
84
|
+
onPointerMove: (t) => {
|
|
85
|
+
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation()), m == null || m(t);
|
|
86
|
+
},
|
|
87
|
+
onPointerLeave: (t) => {
|
|
88
|
+
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation()), u == null || u(t);
|
|
89
|
+
},
|
|
90
|
+
...h,
|
|
91
|
+
children: v
|
|
70
92
|
}
|
|
71
93
|
);
|
|
72
94
|
}
|
|
73
95
|
);
|
|
74
|
-
|
|
96
|
+
w.displayName = a;
|
|
75
97
|
export {
|
|
76
|
-
|
|
98
|
+
w as SubTrigger
|
|
77
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAc1C,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAc1C,eAAO,MAAM,OAAO,kMA8DnB,CAAC"}
|