@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 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._rightSlot_13wq6_1{display:flex;align-items:center;margin-left:auto;padding-left:16px;gap:8px}._rightSlot_13wq6_1[data-submenu-right-slot]{padding-left:0}
|
|
@@ -3,7 +3,7 @@ import { forwardRef as M, useImperativeHandle as y } from "react";
|
|
|
3
3
|
import { R as v } from "../../index-BA3njR2k.mjs";
|
|
4
4
|
import { useContextMenu as x } from "./hooks/useContextMenu/useContextMenu.js";
|
|
5
5
|
import "./providers/LevelProvider/LevelProvider.js";
|
|
6
|
-
import { C as D } from "../../useContentPositioning-
|
|
6
|
+
import { C as D } from "../../useContentPositioning-BLCC-Xty.mjs";
|
|
7
7
|
import "./components/Content/Content.utils.js";
|
|
8
8
|
import { ContextMenuProvider as O, DISPLAY_NAME as T } from "./ContextMenu.context.js";
|
|
9
9
|
import { Trigger as L } from "./components/Trigger/Trigger.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/CheckboxItem/CheckboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAJM,WAAW;;;
|
|
1
|
+
{"version":3,"file":"CheckboxItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/CheckboxItem/CheckboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAJM,WAAW;;;sCAkBpC,SACN;wCAuEC,CAAC"}
|
|
@@ -1,57 +1,78 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { d as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { useContextMenuContext as
|
|
7
|
-
import { hasItemIcon as
|
|
8
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as j } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as q, useId as u, useMemo as v } from "react";
|
|
3
|
+
import { d as w } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as H } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as P } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { useContextMenuContext as R } from "../../ContextMenu.context.js";
|
|
7
|
+
import { hasItemIcon as W } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
9
9
|
import "../Content/Content.utils.js";
|
|
10
|
-
import { useContextMenuItemFocus as
|
|
11
|
-
import '../../../../assets/CheckboxItem.css';const
|
|
12
|
-
checkbox_item:
|
|
13
|
-
},
|
|
10
|
+
import { useContextMenuItemFocus as Y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
import '../../../../assets/CheckboxItem.css';const z = "_checkbox_item_16brq_1", D = {
|
|
12
|
+
checkbox_item: z
|
|
13
|
+
}, m = "ContextMenu.CheckboxItem", G = q(
|
|
14
14
|
({
|
|
15
|
-
className:
|
|
15
|
+
className: k,
|
|
16
16
|
children: o,
|
|
17
|
-
onChange:
|
|
18
|
-
isDisabled:
|
|
19
|
-
isChecked:
|
|
20
|
-
hasIconCheckFn:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
onChange: d,
|
|
18
|
+
isDisabled: f,
|
|
19
|
+
isChecked: C,
|
|
20
|
+
hasIconCheckFn: b = W,
|
|
21
|
+
onFocus: c,
|
|
22
|
+
onMouseEnter: i,
|
|
23
|
+
onBlur: e,
|
|
24
|
+
onMouseLeave: r,
|
|
25
|
+
onSelect: s,
|
|
26
|
+
...n
|
|
27
|
+
}, I) => {
|
|
28
|
+
const _ = u(), { hasItemWithIcon: g } = P(m), { closeMenuImmediately: N } = R(m), {
|
|
29
|
+
dataHighlighted: y,
|
|
30
|
+
onFocus: a,
|
|
31
|
+
onMouseEnter: x,
|
|
32
|
+
onBlur: p,
|
|
33
|
+
onMouseLeave: h
|
|
34
|
+
} = Y({
|
|
35
|
+
displayName: m,
|
|
36
|
+
id: _,
|
|
37
|
+
isDisabled: f
|
|
38
|
+
}), A = v(() => b(o), [o]);
|
|
39
|
+
return /* @__PURE__ */ j(
|
|
40
|
+
w,
|
|
30
41
|
{
|
|
31
|
-
ref:
|
|
32
|
-
className:
|
|
33
|
-
disabled:
|
|
34
|
-
checked:
|
|
42
|
+
ref: I,
|
|
43
|
+
className: H(D.checkbox_item, k),
|
|
44
|
+
disabled: f,
|
|
45
|
+
checked: C,
|
|
35
46
|
"data-item": !0,
|
|
36
|
-
"data-no-icon-align":
|
|
37
|
-
onCheckedChange: (
|
|
38
|
-
|
|
39
|
-
target: { checked:
|
|
47
|
+
"data-no-icon-align": A || !g ? "" : void 0,
|
|
48
|
+
onCheckedChange: (t) => {
|
|
49
|
+
d && d({
|
|
50
|
+
target: { checked: t }
|
|
40
51
|
});
|
|
41
52
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
"data-highlighted": y,
|
|
54
|
+
onSelect: (t) => {
|
|
55
|
+
N(!0), s == null || s(t);
|
|
56
|
+
},
|
|
57
|
+
onFocus: (t) => {
|
|
58
|
+
a == null || a(), c == null || c(t);
|
|
59
|
+
},
|
|
60
|
+
onMouseEnter: (t) => {
|
|
61
|
+
x == null || x(t), i == null || i(t);
|
|
62
|
+
},
|
|
63
|
+
onBlur: (t) => {
|
|
64
|
+
p == null || p(), e == null || e(t);
|
|
65
|
+
},
|
|
66
|
+
onMouseLeave: (t) => {
|
|
67
|
+
h == null || h(t), r == null || r(t);
|
|
68
|
+
},
|
|
69
|
+
...n,
|
|
49
70
|
children: o
|
|
50
71
|
}
|
|
51
72
|
);
|
|
52
73
|
}
|
|
53
74
|
);
|
|
54
|
-
|
|
75
|
+
G.displayName = m;
|
|
55
76
|
export {
|
|
56
|
-
|
|
77
|
+
G as CheckboxItem
|
|
57
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoGnB,CAAC"}
|
|
@@ -7,7 +7,7 @@ import "../../../../lib/utils.js";
|
|
|
7
7
|
import "../../providers/LevelProvider/LevelProvider.js";
|
|
8
8
|
import "../../ContextMenu.context.js";
|
|
9
9
|
import "../../ContextMenu.enums.js";
|
|
10
|
-
import { C as b } from "../../../../useContentPositioning-
|
|
10
|
+
import { C as b } from "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
11
11
|
import "./Content.enums.js";
|
|
12
12
|
import "./Content.utils.js";
|
|
13
13
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e } from "../../../../useContentPositioning-
|
|
1
|
+
import { C as e } from "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
2
2
|
import { Direction as i } from "./Content.enums.js";
|
|
3
3
|
import { directionToSide as f } from "./Content.utils.js";
|
|
4
4
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnE,eAAO,MAAM,IAAI,wKAgJf,CAAC"}
|
|
@@ -1,95 +1,114 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { I as
|
|
4
|
-
import { c as
|
|
5
|
-
import { mergeRefs as
|
|
6
|
-
import { useLevelContext as
|
|
7
|
-
import { useContextMenuContext as
|
|
8
|
-
import { hasItemIcon as
|
|
9
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useMemo as N, useId as Y, useState as v, useRef as z, useEffect as G } from "react";
|
|
3
|
+
import { I as J } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as y } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { mergeRefs as Q } from "../../../../lib/utils.js";
|
|
6
|
+
import { useLevelContext as T } from "../../providers/LevelProvider/LevelProvider.js";
|
|
7
|
+
import { useContextMenuContext as U } from "../../ContextMenu.context.js";
|
|
8
|
+
import { hasItemIcon as k } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
9
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
10
10
|
import "../Content/Content.utils.js";
|
|
11
|
-
import { useContextMenuItemFocus as
|
|
12
|
-
import { ContextMenuItemProvider as
|
|
13
|
-
import '../../../../assets/Item2.css';const
|
|
14
|
-
item:
|
|
15
|
-
}, s = "ContextMenu.Item",
|
|
16
|
-
const { hasItemWithIcon:
|
|
11
|
+
import { useContextMenuItemFocus as V } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
12
|
+
import { ContextMenuItemProvider as X } from "./Item.context.js";
|
|
13
|
+
import '../../../../assets/Item2.css';const Z = "_item_128tk_1", R = {
|
|
14
|
+
item: Z
|
|
15
|
+
}, s = "ContextMenu.Item", $ = W((t, p) => {
|
|
16
|
+
const { hasItemWithIcon: x } = T(s);
|
|
17
17
|
if ("isSelectable" in t && t.isSelectable === !1) {
|
|
18
18
|
const {
|
|
19
19
|
className: e,
|
|
20
|
-
children:
|
|
21
|
-
isSelectable:
|
|
22
|
-
hasIconCheckFn:
|
|
20
|
+
children: I,
|
|
21
|
+
isSelectable: j,
|
|
22
|
+
hasIconCheckFn: q = k,
|
|
23
23
|
...B
|
|
24
|
-
} = t,
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
} = t, K = N(() => q(I), [I]);
|
|
25
|
+
return /* @__PURE__ */ b(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
29
|
-
className:
|
|
30
|
-
"data-not-selectable": !
|
|
31
|
-
"data-no-icon-align":
|
|
28
|
+
ref: p,
|
|
29
|
+
className: y(R.item, e),
|
|
30
|
+
"data-not-selectable": !j,
|
|
31
|
+
"data-no-icon-align": K || !x ? "" : void 0,
|
|
32
32
|
...B,
|
|
33
|
-
children:
|
|
33
|
+
children: I
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
const {
|
|
38
|
-
className:
|
|
38
|
+
className: D,
|
|
39
39
|
children: a,
|
|
40
|
-
isDisabled:
|
|
41
|
-
isDanger:
|
|
42
|
-
hasIconCheckFn:
|
|
40
|
+
isDisabled: C,
|
|
41
|
+
isDanger: F,
|
|
42
|
+
hasIconCheckFn: _ = k,
|
|
43
43
|
onSelect: i,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
onFocus: r,
|
|
45
|
+
onMouseEnter: c,
|
|
46
|
+
onBlur: m,
|
|
47
|
+
onMouseLeave: u,
|
|
48
|
+
onKeyDown: l,
|
|
49
|
+
...w
|
|
50
|
+
} = t, A = Y(), [M, S] = v(!1), [o, E] = v(!1), n = z(null), H = N(() => _(a), [a]), { closeMenuImmediately: L } = U(s), {
|
|
51
|
+
dataHighlighted: O,
|
|
52
|
+
onFocus: d,
|
|
53
|
+
onMouseEnter: f,
|
|
54
|
+
onBlur: h,
|
|
55
|
+
onMouseLeave: g
|
|
56
|
+
} = V({
|
|
46
57
|
displayName: s,
|
|
47
|
-
id:
|
|
48
|
-
isDisabled:
|
|
58
|
+
id: A,
|
|
59
|
+
isDisabled: C,
|
|
49
60
|
hasSubmenu: o
|
|
50
61
|
});
|
|
51
|
-
|
|
62
|
+
G(() => {
|
|
52
63
|
if (!n.current)
|
|
53
64
|
return;
|
|
54
65
|
const e = n.current.querySelector("[data-submenu-trigger]");
|
|
55
|
-
|
|
66
|
+
E(!!e);
|
|
56
67
|
}, [n]);
|
|
57
|
-
const
|
|
58
|
-
o && e.key === "ArrowRight" &&
|
|
68
|
+
const P = (e) => {
|
|
69
|
+
o && e.key === "ArrowRight" && S(!0), l == null || l(e);
|
|
59
70
|
};
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
71
|
+
return /* @__PURE__ */ b(
|
|
72
|
+
X,
|
|
62
73
|
{
|
|
63
74
|
hasSubmenu: o,
|
|
64
|
-
subMenuOpen:
|
|
65
|
-
setSubMenuOpen:
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
75
|
+
subMenuOpen: M,
|
|
76
|
+
setSubMenuOpen: S,
|
|
77
|
+
children: /* @__PURE__ */ b(
|
|
78
|
+
J,
|
|
68
79
|
{
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
71
|
-
disabled:
|
|
80
|
+
ref: Q(p, n),
|
|
81
|
+
className: y(R.item, D),
|
|
82
|
+
disabled: C,
|
|
72
83
|
"data-item": !0,
|
|
73
|
-
"data-danger":
|
|
74
|
-
"data-no-icon-align":
|
|
84
|
+
"data-danger": F ? "" : void 0,
|
|
85
|
+
"data-no-icon-align": H || !x ? "" : void 0,
|
|
75
86
|
"data-has-submenu": o ? "" : void 0,
|
|
76
87
|
onSelect: (e) => {
|
|
77
|
-
i == null || i(e),
|
|
88
|
+
i == null || i(e), L(!0);
|
|
78
89
|
},
|
|
79
|
-
"data-highlighted":
|
|
80
|
-
onFocus:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
"data-highlighted": M || O,
|
|
91
|
+
onFocus: (e) => {
|
|
92
|
+
d == null || d(), r == null || r(e);
|
|
93
|
+
},
|
|
94
|
+
onMouseEnter: (e) => {
|
|
95
|
+
f == null || f(e), c == null || c(e);
|
|
96
|
+
},
|
|
97
|
+
onBlur: (e) => {
|
|
98
|
+
h == null || h(), m == null || m(e);
|
|
99
|
+
},
|
|
100
|
+
onMouseLeave: (e) => {
|
|
101
|
+
g == null || g(e), u == null || u(e);
|
|
102
|
+
},
|
|
103
|
+
onKeyDown: P,
|
|
104
|
+
...w,
|
|
86
105
|
children: a
|
|
87
106
|
}
|
|
88
107
|
)
|
|
89
108
|
}
|
|
90
109
|
);
|
|
91
110
|
});
|
|
92
|
-
|
|
111
|
+
$.displayName = s;
|
|
93
112
|
export {
|
|
94
|
-
|
|
113
|
+
$ as Item
|
|
95
114
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemRightSlot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ItemRightSlot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,eAAO,MAAM,aAAa,2FA0DzB,CAAC"}
|
|
@@ -1,34 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { mergeRefs as
|
|
5
|
-
import { useStopContextMenuEvents as
|
|
6
|
-
import '../../../../assets/ItemRightSlot.css';const
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
({
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, useRef as E, useState as _, useEffect as H } from "react";
|
|
3
|
+
import { c as I } from "../../../../index-L8X2o7IH.mjs";
|
|
4
|
+
import { mergeRefs as M } from "../../../../lib/utils.js";
|
|
5
|
+
import { useStopContextMenuEvents as N } from "../../hooks/useStopContextMenuEvents/useStopContextMenuEvents.js";
|
|
6
|
+
import '../../../../assets/ItemRightSlot.css';const q = "_rightSlot_13wq6_1", w = {
|
|
7
|
+
rightSlot: q
|
|
8
|
+
}, y = "ContextMenu.ItemRightSlot", A = v(
|
|
9
|
+
({
|
|
10
|
+
className: s,
|
|
11
|
+
children: e,
|
|
12
|
+
onClick: n,
|
|
13
|
+
onKeyDown: u,
|
|
14
|
+
onKeyUp: m,
|
|
15
|
+
onKeyPress: a,
|
|
16
|
+
onPointerDown: i,
|
|
17
|
+
onPointerUp: c,
|
|
18
|
+
onPointerEnter: f,
|
|
19
|
+
onPointerLeave: l,
|
|
20
|
+
onPointerMove: g,
|
|
21
|
+
...S
|
|
22
|
+
}, p) => {
|
|
23
|
+
const t = E(null), [o, d] = _(!1);
|
|
24
|
+
H(() => {
|
|
12
25
|
if (!t.current)
|
|
13
26
|
return;
|
|
14
|
-
const
|
|
15
|
-
|
|
27
|
+
const x = t.current.querySelector("[data-submenu-trigger]");
|
|
28
|
+
d(!!x);
|
|
16
29
|
}, [e]);
|
|
17
|
-
const
|
|
18
|
-
|
|
30
|
+
const r = {
|
|
31
|
+
onClick: n,
|
|
32
|
+
onKeyDown: u,
|
|
33
|
+
onKeyUp: m,
|
|
34
|
+
onKeyPress: a,
|
|
35
|
+
onPointerDown: i,
|
|
36
|
+
onPointerUp: c,
|
|
37
|
+
onPointerEnter: f,
|
|
38
|
+
onPointerLeave: l,
|
|
39
|
+
onPointerMove: g
|
|
40
|
+
}, h = N(r), R = o ? h : r;
|
|
41
|
+
return /* @__PURE__ */ b(
|
|
19
42
|
"div",
|
|
20
43
|
{
|
|
21
|
-
ref:
|
|
22
|
-
className:
|
|
44
|
+
ref: M(t, p),
|
|
45
|
+
className: I(w.rightSlot, s),
|
|
23
46
|
"data-submenu-right-slot": o ? "" : void 0,
|
|
24
|
-
...
|
|
25
|
-
...
|
|
47
|
+
...R,
|
|
48
|
+
...S,
|
|
26
49
|
children: e
|
|
27
50
|
}
|
|
28
51
|
);
|
|
29
52
|
}
|
|
30
53
|
);
|
|
31
|
-
|
|
54
|
+
A.displayName = y;
|
|
32
55
|
export {
|
|
33
|
-
|
|
56
|
+
A as ItemRightSlot
|
|
34
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAFqB,SAEtC;
|
|
1
|
+
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAFqB,SAEtC;wCA0EJ,CAAC"}
|
|
@@ -1,43 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { f as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { useContextMenuContext as
|
|
7
|
-
import { hasItemIcon as
|
|
8
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useId as k, useMemo as u } from "react";
|
|
3
|
+
import { f as w } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as z } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as H } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { useContextMenuContext as P } from "../../ContextMenu.context.js";
|
|
7
|
+
import { hasItemIcon as W } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
9
9
|
import "../Content/Content.utils.js";
|
|
10
|
-
import { useContextMenuItemFocus as
|
|
11
|
-
import '../../../../assets/RadioItem.css';const
|
|
12
|
-
radio_item:
|
|
13
|
-
},
|
|
14
|
-
({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
import { useContextMenuItemFocus as Y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
import '../../../../assets/RadioItem.css';const b = "_radio_item_zek17_1", q = {
|
|
12
|
+
radio_item: b
|
|
13
|
+
}, i = "ContextMenu.RadioItem", D = j(
|
|
14
|
+
({
|
|
15
|
+
className: I,
|
|
16
|
+
children: m,
|
|
17
|
+
isDisabled: x,
|
|
18
|
+
hasIconCheckFn: _ = W,
|
|
19
|
+
onFocus: o,
|
|
20
|
+
onMouseEnter: a,
|
|
21
|
+
onBlur: r,
|
|
22
|
+
onMouseLeave: s,
|
|
23
|
+
onSelect: d,
|
|
24
|
+
...g
|
|
25
|
+
}, n) => {
|
|
26
|
+
const C = k(), { hasItemWithIcon: N } = H(i), { closeMenuImmediately: R } = P(i), {
|
|
27
|
+
dataHighlighted: h,
|
|
28
|
+
onFocus: p,
|
|
29
|
+
onMouseEnter: f,
|
|
30
|
+
onBlur: c,
|
|
31
|
+
onMouseLeave: e
|
|
32
|
+
} = Y({
|
|
33
|
+
displayName: i,
|
|
34
|
+
id: C,
|
|
35
|
+
isDisabled: x
|
|
36
|
+
}), y = u(() => _(m), [m]);
|
|
37
|
+
return /* @__PURE__ */ A(
|
|
38
|
+
w,
|
|
22
39
|
{
|
|
23
40
|
ref: n,
|
|
24
|
-
className:
|
|
25
|
-
disabled:
|
|
41
|
+
className: z(q.radio_item, I),
|
|
42
|
+
disabled: x,
|
|
26
43
|
"data-item": !0,
|
|
27
|
-
"data-no-icon-align":
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
"data-no-icon-align": y || !N ? "" : void 0,
|
|
45
|
+
"data-highlighted": h,
|
|
46
|
+
onSelect: (t) => {
|
|
47
|
+
R(!0), d == null || d(t);
|
|
48
|
+
},
|
|
49
|
+
onFocus: (t) => {
|
|
50
|
+
p == null || p(), o == null || o(t);
|
|
51
|
+
},
|
|
52
|
+
onMouseEnter: (t) => {
|
|
53
|
+
f == null || f(t), a == null || a(t);
|
|
54
|
+
},
|
|
55
|
+
onBlur: (t) => {
|
|
56
|
+
c == null || c(), r == null || r(t);
|
|
57
|
+
},
|
|
58
|
+
onMouseLeave: (t) => {
|
|
59
|
+
e == null || e(t), s == null || s(t);
|
|
60
|
+
},
|
|
61
|
+
...g,
|
|
62
|
+
children: m
|
|
36
63
|
}
|
|
37
64
|
);
|
|
38
65
|
}
|
|
39
66
|
);
|
|
40
|
-
|
|
67
|
+
D.displayName = i;
|
|
41
68
|
export {
|
|
42
|
-
|
|
69
|
+
D as RadioItem
|
|
43
70
|
};
|
|
@@ -3,7 +3,7 @@ import { S as b } from "../../../../index-BA3njR2k.mjs";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { ContextMenuMode as l } from "../../ContextMenu.enums.js";
|
|
5
5
|
import "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
-
import "../../../../useContentPositioning-
|
|
6
|
+
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
7
7
|
import "../Content/Content.utils.js";
|
|
8
8
|
import { useContextMenuSub as x } from "../../hooks/useContextMenuSub/useContextMenuSub.js";
|
|
9
9
|
import { ContextMenuSubProvider as C, DISPLAY_NAME as t } from "./Sub.context.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubContent/SubContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAiBrE,eAAO,MAAM,UAAU,+
|
|
1
|
+
{"version":3,"file":"SubContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubContent/SubContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAiBrE,eAAO,MAAM,UAAU,+LAoGtB,CAAC"}
|