@kommo-crm/crm-react-ui-kit 1.1.1-beta.5 → 1.1.1-beta.7
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/CheckboxItem.css +1 -1
- package/dist/assets/Item2.css +1 -1
- package/dist/assets/ItemRightSlot.css +1 -1
- package/dist/assets/Label2.css +1 -1
- package/dist/assets/RadioItem.css +1 -1
- package/dist/assets/SubTrigger.css +1 -1
- package/dist/components/ContextMenu/ContextMenu.context.d.ts +4 -2
- package/dist/components/ContextMenu/ContextMenu.context.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.context.js +7 -4
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +83 -80
- package/dist/components/ContextMenu/ContextMenu.props.d.ts +14 -0
- package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +28 -28
- 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 +73 -69
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js +13 -13
- package/dist/components/ContextMenu/components/Label/Label.js +8 -8
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +16 -16
- package/dist/components/ContextMenu/components/Sub/Sub.js +2 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +67 -64
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +4 -0
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +38 -40
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +25 -25
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts +2 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +72 -61
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +4 -0
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +51 -49
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +71 -63
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +4 -0
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/{useContentPositioning-BLCC-Xty.mjs → useContentPositioning-DAKfbddS.mjs} +67 -66
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as v, useRef as E, useState as _, useEffect as H } from "react";
|
|
3
3
|
import { c as I } from "../../../../index-L8X2o7IH.mjs";
|
|
4
4
|
import { mergeRefs as M } from "../../../../lib/utils.js";
|
|
5
5
|
import { useStopContextMenuEvents as N } from "../../hooks/useStopContextMenuEvents/useStopContextMenuEvents.js";
|
|
6
|
-
import '../../../../assets/ItemRightSlot.css';const
|
|
7
|
-
rightSlot:
|
|
8
|
-
},
|
|
6
|
+
import '../../../../assets/ItemRightSlot.css';const y = "_rightSlot_n7bd4_1", A = {
|
|
7
|
+
rightSlot: y
|
|
8
|
+
}, C = "ContextMenu.ItemRightSlot", j = v(
|
|
9
9
|
({
|
|
10
10
|
className: s,
|
|
11
11
|
children: e,
|
|
@@ -19,13 +19,13 @@ import '../../../../assets/ItemRightSlot.css';const q = "_rightSlot_13wq6_1", w
|
|
|
19
19
|
onPointerLeave: l,
|
|
20
20
|
onPointerMove: g,
|
|
21
21
|
...S
|
|
22
|
-
},
|
|
23
|
-
const t = E(null), [o,
|
|
22
|
+
}, d) => {
|
|
23
|
+
const t = E(null), [o, p] = _(!1);
|
|
24
24
|
H(() => {
|
|
25
25
|
if (!t.current)
|
|
26
26
|
return;
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const b = t.current.querySelector("[data-submenu-trigger]");
|
|
28
|
+
p(!!b);
|
|
29
29
|
}, [e]);
|
|
30
30
|
const r = {
|
|
31
31
|
onClick: n,
|
|
@@ -38,11 +38,11 @@ import '../../../../assets/ItemRightSlot.css';const q = "_rightSlot_13wq6_1", w
|
|
|
38
38
|
onPointerLeave: l,
|
|
39
39
|
onPointerMove: g
|
|
40
40
|
}, h = N(r), R = o ? h : r;
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ x(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
|
-
ref: M(t,
|
|
45
|
-
className: I(
|
|
44
|
+
ref: M(t, d),
|
|
45
|
+
className: I(A.rightSlot, s),
|
|
46
46
|
"data-submenu-right-slot": o ? "" : void 0,
|
|
47
47
|
...R,
|
|
48
48
|
...S,
|
|
@@ -51,7 +51,7 @@ import '../../../../assets/ItemRightSlot.css';const q = "_rightSlot_13wq6_1", w
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
|
|
54
|
+
j.displayName = C;
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
j as ItemRightSlot
|
|
57
57
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
3
|
import { L as n } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
-
import { c
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { hasItemIcon as
|
|
7
|
-
import '../../../../assets/Label2.css';const
|
|
8
|
-
label:
|
|
4
|
+
import { c } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as i } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
7
|
+
import '../../../../assets/Label2.css';const f = "_label_1sne1_1", p = {
|
|
8
|
+
label: f
|
|
9
9
|
}, t = "ContextMenu.Label", L = s(
|
|
10
10
|
({ className: a, children: o, ...e }, r) => {
|
|
11
|
-
const { hasItemWithIcon: l } =
|
|
11
|
+
const { hasItemWithIcon: l } = i(t);
|
|
12
12
|
return /* @__PURE__ */ m(
|
|
13
13
|
n,
|
|
14
14
|
{
|
|
15
15
|
ref: r,
|
|
16
|
-
className:
|
|
17
|
-
"data-no-icon-align":
|
|
16
|
+
className: c(p.label, a),
|
|
17
|
+
"data-no-icon-align": b(o) || !l ? "" : void 0,
|
|
18
18
|
"data-label": !0,
|
|
19
19
|
...e,
|
|
20
20
|
children: o
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as j, useId as
|
|
3
|
-
import { f as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { useContextMenuContext as
|
|
7
|
-
import { hasItemIcon as
|
|
8
|
-
import "../../../../useContentPositioning-
|
|
2
|
+
import { forwardRef as j, useId as u, useMemo as w } from "react";
|
|
3
|
+
import { f as H } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { c as P } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as W } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { useContextMenuContext as Y } from "../../ContextMenu.context.js";
|
|
7
|
+
import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
|
+
import "../../../../useContentPositioning-DAKfbddS.mjs";
|
|
9
9
|
import "../Content/Content.utils.js";
|
|
10
|
-
import { useContextMenuItemFocus as
|
|
11
|
-
import '../../../../assets/RadioItem.css';const
|
|
12
|
-
radio_item:
|
|
10
|
+
import { useContextMenuItemFocus as k } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
import '../../../../assets/RadioItem.css';const q = "_radio_item_14d4r_1", z = {
|
|
12
|
+
radio_item: q
|
|
13
13
|
}, i = "ContextMenu.RadioItem", D = j(
|
|
14
14
|
({
|
|
15
15
|
className: I,
|
|
16
16
|
children: m,
|
|
17
17
|
isDisabled: x,
|
|
18
|
-
hasIconCheckFn: _ =
|
|
18
|
+
hasIconCheckFn: _ = b,
|
|
19
19
|
onFocus: o,
|
|
20
20
|
onMouseEnter: a,
|
|
21
21
|
onBlur: r,
|
|
@@ -23,22 +23,22 @@ import '../../../../assets/RadioItem.css';const b = "_radio_item_zek17_1", q = {
|
|
|
23
23
|
onSelect: d,
|
|
24
24
|
...g
|
|
25
25
|
}, n) => {
|
|
26
|
-
const C =
|
|
26
|
+
const C = u(), { hasItemWithIcon: N } = W(i), { closeMenuImmediately: R } = Y(i), {
|
|
27
27
|
dataHighlighted: h,
|
|
28
28
|
onFocus: p,
|
|
29
29
|
onMouseEnter: f,
|
|
30
30
|
onBlur: c,
|
|
31
31
|
onMouseLeave: e
|
|
32
|
-
} =
|
|
32
|
+
} = k({
|
|
33
33
|
displayName: i,
|
|
34
34
|
id: C,
|
|
35
35
|
isDisabled: x
|
|
36
|
-
}), y =
|
|
36
|
+
}), y = w(() => _(m), [m]);
|
|
37
37
|
return /* @__PURE__ */ A(
|
|
38
|
-
|
|
38
|
+
H,
|
|
39
39
|
{
|
|
40
40
|
ref: n,
|
|
41
|
-
className: z
|
|
41
|
+
className: P(z.radio_item, I),
|
|
42
42
|
disabled: x,
|
|
43
43
|
"data-item": !0,
|
|
44
44
|
"data-no-icon-align": y || !N ? "" : void 0,
|
|
@@ -3,7 +3,8 @@ import { S as l } from "../../../../index-BA3njR2k.mjs";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { ContextMenuMode as x } from "../../ContextMenu.enums.js";
|
|
5
5
|
import "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
-
import "
|
|
6
|
+
import "../../ContextMenu.context.js";
|
|
7
|
+
import "../../../../useContentPositioning-DAKfbddS.mjs";
|
|
7
8
|
import "../Content/Content.utils.js";
|
|
8
9
|
import { useContextMenuSub as C } from "../../hooks/useContextMenuSub/useContextMenuSub.js";
|
|
9
10
|
import { ContextMenuSubProvider as O, DISPLAY_NAME as t } from "./Sub.context.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,eAAO,MAAM,OAAO,EA4Ff,sBAAsB,CAAC"}
|
|
@@ -1,94 +1,97 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { R as
|
|
4
|
-
import { useContextMenuContext as
|
|
5
|
-
import { ContextMenuMode as
|
|
6
|
-
import { useContextMenuSubMenu as
|
|
7
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useImperativeHandle as T } from "react";
|
|
3
|
+
import { R as w } from "../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { useContextMenuContext as L, ContextMenuProvider as P } from "../../ContextMenu.context.js";
|
|
5
|
+
import { ContextMenuMode as j } from "../../ContextMenu.enums.js";
|
|
6
|
+
import { useContextMenuSubMenu as B } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
|
|
7
|
+
import "../../../../useContentPositioning-DAKfbddS.mjs";
|
|
8
8
|
import "../Content/Content.utils.js";
|
|
9
9
|
import "../../providers/LevelProvider/LevelProvider.js";
|
|
10
|
-
import { useContextMenuItemContext as
|
|
11
|
-
import { Trigger as
|
|
12
|
-
import { Content as
|
|
13
|
-
const
|
|
10
|
+
import { useContextMenuItemContext as K } from "../Item/Item.context.js";
|
|
11
|
+
import { Trigger as V } from "./components/Trigger/Trigger.js";
|
|
12
|
+
import { Content as Y } from "./components/Content/Content.js";
|
|
13
|
+
const o = "ContextMenu.SubRoot", t = N(
|
|
14
14
|
({
|
|
15
|
-
children:
|
|
16
|
-
mode:
|
|
17
|
-
onOpen:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
children: l,
|
|
16
|
+
mode: M = j.HOVER,
|
|
17
|
+
onOpen: d,
|
|
18
|
+
onAnimatedOpen: C,
|
|
19
|
+
defaultOpen: f,
|
|
20
|
+
isCloseWithRootMenu: c = !1,
|
|
21
|
+
...x
|
|
22
|
+
}, y) => {
|
|
22
23
|
const {
|
|
23
24
|
animationDuration: n,
|
|
24
25
|
hoverCloseDelay: r,
|
|
25
|
-
closeMenuImmediately:
|
|
26
|
-
} =
|
|
27
|
-
mode:
|
|
28
|
-
open:
|
|
26
|
+
closeMenuImmediately: O
|
|
27
|
+
} = L(o), { subMenuOpen: e, setSubMenuOpen: m } = K(o), b = c ? O : void 0, {
|
|
28
|
+
mode: R,
|
|
29
|
+
open: i,
|
|
29
30
|
onOpenChange: g,
|
|
30
|
-
triggerRef:
|
|
31
|
-
contentRef:
|
|
32
|
-
inheritedArrowColor:
|
|
33
|
-
animatedOpen:
|
|
34
|
-
temporaryHoverClose:
|
|
35
|
-
closeMenuImmediately:
|
|
36
|
-
onMouseEnter:
|
|
37
|
-
onMouseLeave:
|
|
31
|
+
triggerRef: I,
|
|
32
|
+
contentRef: v,
|
|
33
|
+
inheritedArrowColor: S,
|
|
34
|
+
animatedOpen: h,
|
|
35
|
+
temporaryHoverClose: H,
|
|
36
|
+
closeMenuImmediately: s,
|
|
37
|
+
onMouseEnter: A,
|
|
38
|
+
onMouseLeave: D,
|
|
38
39
|
enableTemporaryHoverClose: u,
|
|
39
|
-
triggerId:
|
|
40
|
-
onOpenByKeyboard:
|
|
41
|
-
} =
|
|
42
|
-
displayName:
|
|
43
|
-
mode:
|
|
44
|
-
defaultOpen:
|
|
45
|
-
onOpen:
|
|
40
|
+
triggerId: E,
|
|
41
|
+
onOpenByKeyboard: p
|
|
42
|
+
} = B({
|
|
43
|
+
displayName: o,
|
|
44
|
+
mode: M,
|
|
45
|
+
defaultOpen: f,
|
|
46
|
+
onOpen: d,
|
|
47
|
+
onAnimatedOpen: C,
|
|
46
48
|
animationDuration: n,
|
|
47
|
-
subMenuOpen:
|
|
49
|
+
subMenuOpen: e,
|
|
48
50
|
setSubMenuOpen: m,
|
|
49
51
|
hoverCloseDelay: r,
|
|
50
|
-
closeRootMenuImmediately:
|
|
52
|
+
closeRootMenuImmediately: b
|
|
51
53
|
});
|
|
52
|
-
return
|
|
53
|
-
closeMenuImmediately:
|
|
54
|
+
return T(y, () => ({
|
|
55
|
+
closeMenuImmediately: s,
|
|
54
56
|
enableTemporaryHoverClose: u,
|
|
55
|
-
onOpenByKeyboard:
|
|
56
|
-
})), /* @__PURE__ */
|
|
57
|
-
|
|
57
|
+
onOpenByKeyboard: p
|
|
58
|
+
})), /* @__PURE__ */ a(
|
|
59
|
+
P,
|
|
58
60
|
{
|
|
59
|
-
mode:
|
|
60
|
-
triggerRef:
|
|
61
|
-
contentRef:
|
|
62
|
-
inheritedArrowColor:
|
|
63
|
-
animatedOpen:
|
|
61
|
+
mode: R,
|
|
62
|
+
triggerRef: I,
|
|
63
|
+
contentRef: v,
|
|
64
|
+
inheritedArrowColor: S,
|
|
65
|
+
animatedOpen: h,
|
|
64
66
|
animationDuration: n,
|
|
65
67
|
hoverCloseDelay: r,
|
|
66
|
-
temporaryHoverClose:
|
|
67
|
-
closeMenuImmediately:
|
|
68
|
-
onMouseEnter:
|
|
69
|
-
onMouseLeave:
|
|
68
|
+
temporaryHoverClose: H,
|
|
69
|
+
closeMenuImmediately: s,
|
|
70
|
+
onMouseEnter: A,
|
|
71
|
+
onMouseLeave: D,
|
|
70
72
|
enableTemporaryHoverClose: u,
|
|
71
|
-
subMenuOpen:
|
|
73
|
+
subMenuOpen: e,
|
|
72
74
|
setSubMenuOpen: m,
|
|
73
|
-
triggerId:
|
|
74
|
-
onOpenByKeyboard:
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
triggerId: E,
|
|
76
|
+
onOpenByKeyboard: p,
|
|
77
|
+
isOpen: e || i,
|
|
78
|
+
children: /* @__PURE__ */ a(
|
|
79
|
+
w,
|
|
77
80
|
{
|
|
78
|
-
open:
|
|
81
|
+
open: i || e,
|
|
79
82
|
onOpenChange: g,
|
|
80
83
|
modal: !1,
|
|
81
|
-
...
|
|
82
|
-
children:
|
|
84
|
+
...x,
|
|
85
|
+
children: l
|
|
83
86
|
}
|
|
84
87
|
)
|
|
85
88
|
}
|
|
86
89
|
);
|
|
87
90
|
}
|
|
88
91
|
);
|
|
89
|
-
t.displayName =
|
|
90
|
-
t.Trigger =
|
|
91
|
-
t.Content =
|
|
92
|
+
t.displayName = o;
|
|
93
|
+
t.Trigger = V;
|
|
94
|
+
t.Content = Y;
|
|
92
95
|
export {
|
|
93
96
|
t as SubRoot
|
|
94
97
|
};
|
|
@@ -5,6 +5,10 @@ export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenCh
|
|
|
5
5
|
* Called whenever the open state of the menu changes.
|
|
6
6
|
*/
|
|
7
7
|
onOpen?: (open: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Called whenever the animated open state of the menu changes.
|
|
10
|
+
*/
|
|
11
|
+
onAnimatedOpen?: (open: boolean) => void;
|
|
8
12
|
/**
|
|
9
13
|
* Defines how the menu is triggered.
|
|
10
14
|
*
|
|
@@ -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,CACzB,GAAG;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"}
|
|
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,CACzB,GAAG;IACF;;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;IACzC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { LevelProvider as X } from "../../../../providers/LevelProvider/LevelPro
|
|
|
8
8
|
import { useContextMenuContext as Y } from "../../../../ContextMenu.context.js";
|
|
9
9
|
import { ContextMenuMode as g } from "../../../../ContextMenu.enums.js";
|
|
10
10
|
import { focusParentItem as q } from "../../../../utils/focusParentItem/focusParentItem.js";
|
|
11
|
-
import { u as J, s as K } from "../../../../../../useContentPositioning-
|
|
11
|
+
import { u as J, s as K } from "../../../../../../useContentPositioning-DAKfbddS.mjs";
|
|
12
12
|
import { Direction as Q } from "../../../Content/Content.enums.js";
|
|
13
13
|
import { directionToSide as U } from "../../../Content/Content.utils.js";
|
|
14
14
|
const x = "ContextMenu.Content", V = L(
|
|
@@ -61,7 +61,7 @@ const x = "ContextMenu.Content", V = L(
|
|
|
61
61
|
F.div,
|
|
62
62
|
{
|
|
63
63
|
style: {
|
|
64
|
-
zIndex: Number.MAX_SAFE_INTEGER,
|
|
64
|
+
zIndex: Number.MAX_SAFE_INTEGER - 10,
|
|
65
65
|
position: "fixed",
|
|
66
66
|
...E
|
|
67
67
|
},
|
|
@@ -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;AAe1C,eAAO,MAAM,OAAO,
|
|
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,kMA6EnB,CAAC"}
|
|
@@ -1,72 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { T as
|
|
4
|
-
import { mergeRefs as
|
|
5
|
-
import { useContextMenuContext as
|
|
6
|
-
import { ContextMenuMode as
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { T as v } from "../../../../../../index-BA3njR2k.mjs";
|
|
4
|
+
import { mergeRefs as y } from "../../../../../../lib/utils.js";
|
|
5
|
+
import { useContextMenuContext as A } from "../../../../ContextMenu.context.js";
|
|
6
|
+
import { ContextMenuMode as E } from "../../../../ContextMenu.enums.js";
|
|
7
7
|
import "../../../../providers/LevelProvider/LevelProvider.js";
|
|
8
|
-
import "../../../../../../useContentPositioning-
|
|
8
|
+
import "../../../../../../useContentPositioning-DAKfbddS.mjs";
|
|
9
9
|
import "../../../Content/Content.utils.js";
|
|
10
|
-
import { useContextMenuItemFocus as
|
|
11
|
-
const
|
|
10
|
+
import { useContextMenuItemFocus as j } from "../../../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
const a = "ContextMenu.Trigger", D = c(
|
|
12
12
|
({
|
|
13
|
-
className:
|
|
14
|
-
children:
|
|
13
|
+
className: x,
|
|
14
|
+
children: u,
|
|
15
15
|
onFocus: r,
|
|
16
16
|
onBlur: e,
|
|
17
|
-
onMouseEnter:
|
|
18
|
-
onMouseLeave:
|
|
19
|
-
onPointerDown:
|
|
20
|
-
...
|
|
21
|
-
},
|
|
17
|
+
onMouseEnter: o,
|
|
18
|
+
onMouseLeave: i,
|
|
19
|
+
onPointerDown: m,
|
|
20
|
+
...C
|
|
21
|
+
}, n) => {
|
|
22
22
|
const {
|
|
23
|
-
triggerRef:
|
|
24
|
-
mode:
|
|
23
|
+
triggerRef: M,
|
|
24
|
+
mode: d,
|
|
25
25
|
onMouseEnter: R,
|
|
26
26
|
onMouseLeave: T,
|
|
27
27
|
triggerId: N
|
|
28
|
-
} =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
displayName: s,
|
|
28
|
+
} = A(a), {
|
|
29
|
+
onFocus: p,
|
|
30
|
+
onMouseEnter: f,
|
|
31
|
+
onBlur: g,
|
|
32
|
+
onMouseLeave: s
|
|
33
|
+
} = j({
|
|
34
|
+
displayName: a,
|
|
36
35
|
id: N || "",
|
|
37
36
|
isDisabled: !1,
|
|
38
37
|
onMouseEnter: R,
|
|
39
38
|
onMouseLeave: T
|
|
40
39
|
});
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
40
|
+
return /* @__PURE__ */ b(
|
|
41
|
+
v,
|
|
43
42
|
{
|
|
44
|
-
ref:
|
|
45
|
-
className:
|
|
46
|
-
"data-highlighted": b,
|
|
43
|
+
ref: y(M, n),
|
|
44
|
+
className: x,
|
|
47
45
|
onPointerDown: (t) => {
|
|
48
|
-
|
|
46
|
+
d === E.HOVER && t.preventDefault(), t.stopPropagation(), m == null || m(t);
|
|
49
47
|
},
|
|
50
48
|
onMouseEnter: (t) => {
|
|
51
|
-
|
|
49
|
+
f == null || f(t), o == null || o(t);
|
|
52
50
|
},
|
|
53
51
|
onMouseLeave: (t) => {
|
|
54
|
-
|
|
52
|
+
s == null || s(t), i == null || i(t);
|
|
55
53
|
},
|
|
56
54
|
onFocus: (t) => {
|
|
57
|
-
t.preventDefault(), t.stopPropagation(),
|
|
55
|
+
t.preventDefault(), t.stopPropagation(), p == null || p(), r == null || r(t);
|
|
58
56
|
},
|
|
59
57
|
onBlur: (t) => {
|
|
60
|
-
|
|
58
|
+
g == null || g(), e == null || e(t);
|
|
61
59
|
},
|
|
62
60
|
"data-submenu-trigger": !0,
|
|
63
|
-
...
|
|
64
|
-
children:
|
|
61
|
+
...C,
|
|
62
|
+
children: u
|
|
65
63
|
}
|
|
66
64
|
);
|
|
67
65
|
}
|
|
68
66
|
);
|
|
69
|
-
|
|
67
|
+
D.displayName = a;
|
|
70
68
|
export {
|
|
71
|
-
|
|
69
|
+
D as Trigger
|
|
72
70
|
};
|
|
@@ -2,22 +2,22 @@ import { jsx as M } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as R } from "react";
|
|
3
3
|
import { b as H } from "../../../../index-BA3njR2k.mjs";
|
|
4
4
|
import { c as j } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
-
import { useLevelContext as
|
|
5
|
+
import { useLevelContext as q } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
6
|
import { useContextMenuSubContext as D } from "../Sub/Sub.context.js";
|
|
7
7
|
import { hasItemIcon as V } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
8
|
import { ContextMenuMode as i } from "../../ContextMenu.enums.js";
|
|
9
|
-
import "../../../../useContentPositioning-BLCC-Xty.mjs";
|
|
10
|
-
import "../Content/Content.utils.js";
|
|
11
9
|
import "../../ContextMenu.context.js";
|
|
10
|
+
import "../../../../useContentPositioning-DAKfbddS.mjs";
|
|
11
|
+
import "../Content/Content.utils.js";
|
|
12
12
|
import { useContextMenuItemFocus as W } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
13
|
-
import '../../../../assets/SubTrigger.css';const Y = "
|
|
13
|
+
import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_ip3hq_1", w = {
|
|
14
14
|
sub_trigger: Y
|
|
15
|
-
},
|
|
15
|
+
}, p = "ContextMenu.SubTrigger", z = R(
|
|
16
16
|
({
|
|
17
|
-
className:
|
|
17
|
+
className: L,
|
|
18
18
|
children: v,
|
|
19
|
-
isDisabled:
|
|
20
|
-
onKeyDown:
|
|
19
|
+
isDisabled: h,
|
|
20
|
+
onKeyDown: a,
|
|
21
21
|
onFocus: s,
|
|
22
22
|
onBlur: g,
|
|
23
23
|
onClick: e,
|
|
@@ -26,27 +26,27 @@ import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_d2xgz_1", q =
|
|
|
26
26
|
onPointerLeave: u,
|
|
27
27
|
onMouseEnter: d,
|
|
28
28
|
onMouseLeave: C,
|
|
29
|
-
...
|
|
29
|
+
...S
|
|
30
30
|
}, l) => {
|
|
31
|
-
const { hasItemWithIcon: A } =
|
|
31
|
+
const { hasItemWithIcon: A } = q(p), {
|
|
32
32
|
mode: r,
|
|
33
|
-
open:
|
|
33
|
+
open: b,
|
|
34
34
|
defaultOpen: o,
|
|
35
35
|
setOpen: N,
|
|
36
36
|
onMouseEnter: O,
|
|
37
37
|
onMouseLeave: T,
|
|
38
38
|
triggerId: y,
|
|
39
|
-
onOpenByKeyboard:
|
|
40
|
-
} = D(
|
|
39
|
+
onOpenByKeyboard: n
|
|
40
|
+
} = D(p), {
|
|
41
41
|
dataHighlighted: K,
|
|
42
|
-
onFocus:
|
|
42
|
+
onFocus: x,
|
|
43
43
|
onMouseEnter: c,
|
|
44
44
|
onBlur: I,
|
|
45
45
|
onMouseLeave: _
|
|
46
46
|
} = W({
|
|
47
|
-
displayName:
|
|
47
|
+
displayName: p,
|
|
48
48
|
id: y,
|
|
49
|
-
isDisabled:
|
|
49
|
+
isDisabled: h,
|
|
50
50
|
onMouseEnter: O,
|
|
51
51
|
onMouseLeave: T
|
|
52
52
|
});
|
|
@@ -54,11 +54,11 @@ import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_d2xgz_1", q =
|
|
|
54
54
|
H,
|
|
55
55
|
{
|
|
56
56
|
ref: l,
|
|
57
|
-
className: j(
|
|
58
|
-
disabled:
|
|
57
|
+
className: j(w.sub_trigger, L),
|
|
58
|
+
disabled: h,
|
|
59
59
|
"data-item": !0,
|
|
60
60
|
"data-no-icon-align": V(v) || !A ? "" : void 0,
|
|
61
|
-
"data-highlighted":
|
|
61
|
+
"data-highlighted": b || K === "" || r === i.CLICK && b ? "" : void 0,
|
|
62
62
|
"data-submenu-trigger": !0,
|
|
63
63
|
onMouseEnter: (t) => {
|
|
64
64
|
c == null || c(t), d == null || d(t);
|
|
@@ -67,16 +67,16 @@ import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_d2xgz_1", q =
|
|
|
67
67
|
_ == null || _(t), C == null || C(t);
|
|
68
68
|
},
|
|
69
69
|
onKeyDown: (t) => {
|
|
70
|
-
r === i.HOVER && (["Enter", " ", "ArrowRight"].includes(t.key) ?
|
|
70
|
+
r === i.HOVER && (["Enter", " ", "ArrowRight"].includes(t.key) ? n(!0) : t.key === "ArrowLeft" && (n(!1), t.currentTarget.focus())), a == null || a(t);
|
|
71
71
|
},
|
|
72
72
|
onFocus: (t) => {
|
|
73
|
-
|
|
73
|
+
x == null || x(), s == null || s(t);
|
|
74
74
|
},
|
|
75
75
|
onBlur: (t) => {
|
|
76
76
|
I == null || I(), g == null || g(t);
|
|
77
77
|
},
|
|
78
78
|
onClick: (t) => {
|
|
79
|
-
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation(), o === void 0 && N(!
|
|
79
|
+
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation(), o === void 0 && N(!b)), e == null || e(t);
|
|
80
80
|
},
|
|
81
81
|
onPointerEnter: (t) => {
|
|
82
82
|
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation()), f == null || f(t);
|
|
@@ -87,13 +87,13 @@ import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_d2xgz_1", q =
|
|
|
87
87
|
onPointerLeave: (t) => {
|
|
88
88
|
(r === i.CLICK || o !== void 0) && (t.preventDefault(), t.stopPropagation()), u == null || u(t);
|
|
89
89
|
},
|
|
90
|
-
...
|
|
90
|
+
...S,
|
|
91
91
|
children: v
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
|
-
|
|
96
|
+
z.displayName = p;
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
z as SubTrigger
|
|
99
99
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useContextMenu as t } from "./useContextMenu/useContextMenu.js";
|
|
2
2
|
import { useContextMenuSubMenu as u } from "./useContextMenuSubMenu/useContextMenuSubMenu.js";
|
|
3
3
|
import { useInheritedArrowColor as s } from "./useInheritedArrowColor/useInheritedArrowColor.js";
|
|
4
|
-
import { u as m } from "../../../useContentPositioning-
|
|
4
|
+
import { u as m } from "../../../useContentPositioning-DAKfbddS.mjs";
|
|
5
5
|
import { useContextMenuSub as p } from "./useContextMenuSub/useContextMenuSub.js";
|
|
6
6
|
import { useContextMenuItemFocus as i } from "./useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
7
7
|
import { useIsTouchDevice as c } from "./useIsTouchDevice/useIsTouchDevice.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import { u as n } from "../../../../useContentPositioning-
|
|
2
|
+
import { u as n } from "../../../../useContentPositioning-DAKfbddS.mjs";
|
|
3
3
|
import "../../components/Content/Content.enums.js";
|
|
4
4
|
import "../../components/Content/Content.utils.js";
|
|
5
5
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContextMenuMode } from '../../ContextMenu.enums';
|
|
2
2
|
import { UseContextMenuOptions } from './useContextMenu.types';
|
|
3
|
-
export declare const useContextMenu: ({ mode: rootMode, defaultOpen, animationDuration, hoverCloseDelay, onOpen, }: UseContextMenuOptions) => {
|
|
3
|
+
export declare const useContextMenu: ({ mode: rootMode, defaultOpen, animationDuration, hoverCloseDelay, onOpen, onAnimatedOpen, }: UseContextMenuOptions) => {
|
|
4
4
|
open: boolean;
|
|
5
5
|
mode: ContextMenuMode;
|
|
6
6
|
onOpenChange: (value: boolean) => void;
|
|
@@ -16,5 +16,6 @@ export declare const useContextMenu: ({ mode: rootMode, defaultOpen, animationDu
|
|
|
16
16
|
onMouseEnter: () => void;
|
|
17
17
|
onMouseLeave: () => void;
|
|
18
18
|
enableTemporaryHoverClose: () => void;
|
|
19
|
+
onChildClickOpen: (value: boolean) => void;
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useContextMenu.d.ts.map
|