@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.
Files changed (49) hide show
  1. package/dist/assets/CheckboxItem.css +1 -1
  2. package/dist/assets/Item2.css +1 -1
  3. package/dist/assets/ItemRightSlot.css +1 -1
  4. package/dist/assets/Label2.css +1 -1
  5. package/dist/assets/RadioItem.css +1 -1
  6. package/dist/assets/SubTrigger.css +1 -1
  7. package/dist/components/ContextMenu/ContextMenu.context.d.ts +4 -2
  8. package/dist/components/ContextMenu/ContextMenu.context.d.ts.map +1 -1
  9. package/dist/components/ContextMenu/ContextMenu.context.js +7 -4
  10. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/ContextMenu.js +83 -80
  12. package/dist/components/ContextMenu/ContextMenu.props.d.ts +14 -0
  13. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  14. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +28 -28
  15. package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
  16. package/dist/components/ContextMenu/components/Content/Content.js +1 -1
  17. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  18. package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
  19. package/dist/components/ContextMenu/components/Item/Item.js +73 -69
  20. package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js +13 -13
  21. package/dist/components/ContextMenu/components/Label/Label.js +8 -8
  22. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +16 -16
  23. package/dist/components/ContextMenu/components/Sub/Sub.js +2 -1
  24. package/dist/components/ContextMenu/components/SubContent/SubContent.js +1 -1
  25. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  26. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +67 -64
  27. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +4 -0
  28. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  29. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
  30. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +38 -40
  32. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +25 -25
  33. package/dist/components/ContextMenu/hooks/index.js +1 -1
  34. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  35. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts +2 -1
  36. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  37. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +72 -61
  38. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +4 -0
  39. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  40. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.d.ts.map +1 -1
  41. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +51 -49
  42. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts +1 -1
  43. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
  44. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +71 -63
  45. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +4 -0
  46. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
  47. package/dist/components/ContextMenu/index.js +1 -1
  48. package/dist/{useContentPositioning-BLCC-Xty.mjs → useContentPositioning-DAKfbddS.mjs} +67 -66
  49. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { jsx as b } from "react/jsx-runtime";
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 q = "_rightSlot_13wq6_1", w = {
7
- rightSlot: q
8
- }, y = "ContextMenu.ItemRightSlot", A = v(
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
- }, p) => {
23
- const t = E(null), [o, d] = _(!1);
22
+ }, d) => {
23
+ const t = E(null), [o, p] = _(!1);
24
24
  H(() => {
25
25
  if (!t.current)
26
26
  return;
27
- const x = t.current.querySelector("[data-submenu-trigger]");
28
- d(!!x);
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__ */ b(
41
+ return /* @__PURE__ */ x(
42
42
  "div",
43
43
  {
44
- ref: M(t, p),
45
- className: I(w.rightSlot, s),
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
- A.displayName = y;
54
+ j.displayName = C;
55
55
  export {
56
- A as ItemRightSlot
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 as i } from "../../../../index-L8X2o7IH.mjs";
5
- import { useLevelContext as c } from "../../providers/LevelProvider/LevelProvider.js";
6
- import { hasItemIcon as p } from "../../utils/hasItemIcon/hasItemIcon.js";
7
- import '../../../../assets/Label2.css';const b = "_label_1ik2p_1", f = {
8
- label: b
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 } = c(t);
11
+ const { hasItemWithIcon: l } = i(t);
12
12
  return /* @__PURE__ */ m(
13
13
  n,
14
14
  {
15
15
  ref: r,
16
- className: i(f.label, a),
17
- "data-no-icon-align": p(o) || !l ? "" : void 0,
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 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";
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 Y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
- import '../../../../assets/RadioItem.css';const b = "_radio_item_zek17_1", q = {
12
- radio_item: b
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: _ = W,
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 = k(), { hasItemWithIcon: N } = H(i), { closeMenuImmediately: R } = P(i), {
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
- } = Y({
32
+ } = k({
33
33
  displayName: i,
34
34
  id: C,
35
35
  isDisabled: x
36
- }), y = u(() => _(m), [m]);
36
+ }), y = w(() => _(m), [m]);
37
37
  return /* @__PURE__ */ A(
38
- w,
38
+ H,
39
39
  {
40
40
  ref: n,
41
- className: z(q.radio_item, I),
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 "../../../../useContentPositioning-BLCC-Xty.mjs";
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";
@@ -51,7 +51,7 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
51
51
  {
52
52
  style: {
53
53
  position: "fixed",
54
- zIndex: Number.MAX_SAFE_INTEGER,
54
+ zIndex: Number.MAX_SAFE_INTEGER - 10,
55
55
  ...v
56
56
  },
57
57
  onMouseEnter: (t) => {
@@ -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,EAuFf,sBAAsB,CAAC"}
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 p } from "react/jsx-runtime";
2
- import { forwardRef as E, useImperativeHandle as N } from "react";
3
- import { R as T } from "../../../../index-BA3njR2k.mjs";
4
- import { useContextMenuContext as w, ContextMenuProvider as L } from "../../ContextMenu.context.js";
5
- import { ContextMenuMode as P } from "../../ContextMenu.enums.js";
6
- import { useContextMenuSubMenu as j } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
- import "../../../../useContentPositioning-BLCC-Xty.mjs";
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 B } from "../Item/Item.context.js";
11
- import { Trigger as K } from "./components/Trigger/Trigger.js";
12
- import { Content as V } from "./components/Content/Content.js";
13
- const e = "ContextMenu.SubRoot", t = E(
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: a,
16
- mode: l = P.HOVER,
17
- onOpen: M,
18
- defaultOpen: d,
19
- isCloseWithRootMenu: C = !1,
20
- ...f
21
- }, x) => {
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: c
26
- } = w(e), { subMenuOpen: o, setSubMenuOpen: m } = B(e), y = C ? c : void 0, {
27
- mode: b,
28
- open: R,
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: O,
31
- contentRef: I,
32
- inheritedArrowColor: v,
33
- animatedOpen: S,
34
- temporaryHoverClose: h,
35
- closeMenuImmediately: i,
36
- onMouseEnter: H,
37
- onMouseLeave: A,
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: D,
40
- onOpenByKeyboard: s
41
- } = j({
42
- displayName: e,
43
- mode: l,
44
- defaultOpen: d,
45
- onOpen: M,
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: o,
49
+ subMenuOpen: e,
48
50
  setSubMenuOpen: m,
49
51
  hoverCloseDelay: r,
50
- closeRootMenuImmediately: y
52
+ closeRootMenuImmediately: b
51
53
  });
52
- return N(x, () => ({
53
- closeMenuImmediately: i,
54
+ return T(y, () => ({
55
+ closeMenuImmediately: s,
54
56
  enableTemporaryHoverClose: u,
55
- onOpenByKeyboard: s
56
- })), /* @__PURE__ */ p(
57
- L,
57
+ onOpenByKeyboard: p
58
+ })), /* @__PURE__ */ a(
59
+ P,
58
60
  {
59
- mode: b,
60
- triggerRef: O,
61
- contentRef: I,
62
- inheritedArrowColor: v,
63
- animatedOpen: S,
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: h,
67
- closeMenuImmediately: i,
68
- onMouseEnter: H,
69
- onMouseLeave: A,
68
+ temporaryHoverClose: H,
69
+ closeMenuImmediately: s,
70
+ onMouseEnter: A,
71
+ onMouseLeave: D,
70
72
  enableTemporaryHoverClose: u,
71
- subMenuOpen: o,
73
+ subMenuOpen: e,
72
74
  setSubMenuOpen: m,
73
- triggerId: D,
74
- onOpenByKeyboard: s,
75
- children: /* @__PURE__ */ p(
76
- T,
75
+ triggerId: E,
76
+ onOpenByKeyboard: p,
77
+ isOpen: e || i,
78
+ children: /* @__PURE__ */ a(
79
+ w,
77
80
  {
78
- open: R || o,
81
+ open: i || e,
79
82
  onOpenChange: g,
80
83
  modal: !1,
81
- ...f,
82
- children: a
84
+ ...x,
85
+ children: l
83
86
  }
84
87
  )
85
88
  }
86
89
  );
87
90
  }
88
91
  );
89
- t.displayName = e;
90
- t.Trigger = K;
91
- t.Content = V;
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-BLCC-Xty.mjs";
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,kMA+EnB,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,kMA6EnB,CAAC"}
@@ -1,72 +1,70 @@
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";
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-BLCC-Xty.mjs";
8
+ import "../../../../../../useContentPositioning-DAKfbddS.mjs";
9
9
  import "../../../Content/Content.utils.js";
10
- import { useContextMenuItemFocus as h } from "../../../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
- const s = "ContextMenu.Trigger", j = v(
10
+ import { useContextMenuItemFocus as j } from "../../../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
+ const a = "ContextMenu.Trigger", D = c(
12
12
  ({
13
- className: d,
14
- children: x,
13
+ className: x,
14
+ children: u,
15
15
  onFocus: r,
16
16
  onBlur: e,
17
- onMouseEnter: i,
18
- onMouseLeave: o,
19
- onPointerDown: g,
20
- ...u
21
- }, C) => {
17
+ onMouseEnter: o,
18
+ onMouseLeave: i,
19
+ onPointerDown: m,
20
+ ...C
21
+ }, n) => {
22
22
  const {
23
- triggerRef: n,
24
- mode: M,
23
+ triggerRef: M,
24
+ mode: d,
25
25
  onMouseEnter: R,
26
26
  onMouseLeave: T,
27
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,
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__ */ c(
42
- y,
40
+ return /* @__PURE__ */ b(
41
+ v,
43
42
  {
44
- ref: A(n, C),
45
- className: d,
46
- "data-highlighted": b,
43
+ ref: y(M, n),
44
+ className: x,
47
45
  onPointerDown: (t) => {
48
- M === H.HOVER && t.preventDefault(), t.stopPropagation(), g == null || g(t);
46
+ d === E.HOVER && t.preventDefault(), t.stopPropagation(), m == null || m(t);
49
47
  },
50
48
  onMouseEnter: (t) => {
51
- p == null || p(t), i == null || i(t);
49
+ f == null || f(t), o == null || o(t);
52
50
  },
53
51
  onMouseLeave: (t) => {
54
- f == null || f(t), o == null || o(t);
52
+ s == null || s(t), i == null || i(t);
55
53
  },
56
54
  onFocus: (t) => {
57
- t.preventDefault(), t.stopPropagation(), m == null || m(), r == null || r(t);
55
+ t.preventDefault(), t.stopPropagation(), p == null || p(), r == null || r(t);
58
56
  },
59
57
  onBlur: (t) => {
60
- a == null || a(), e == null || e(t);
58
+ g == null || g(), e == null || e(t);
61
59
  },
62
60
  "data-submenu-trigger": !0,
63
- ...u,
64
- children: x
61
+ ...C,
62
+ children: u
65
63
  }
66
64
  );
67
65
  }
68
66
  );
69
- j.displayName = s;
67
+ D.displayName = a;
70
68
  export {
71
- j as Trigger
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 z } from "../../providers/LevelProvider/LevelProvider.js";
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 = "_sub_trigger_d2xgz_1", q = {
13
+ import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_ip3hq_1", w = {
14
14
  sub_trigger: Y
15
- }, a = "ContextMenu.SubTrigger", w = R(
15
+ }, p = "ContextMenu.SubTrigger", z = R(
16
16
  ({
17
- className: S,
17
+ className: L,
18
18
  children: v,
19
- isDisabled: n,
20
- onKeyDown: p,
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
- ...h
29
+ ...S
30
30
  }, l) => {
31
- const { hasItemWithIcon: A } = z(a), {
31
+ const { hasItemWithIcon: A } = q(p), {
32
32
  mode: r,
33
- open: x,
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: L
40
- } = D(a), {
39
+ onOpenByKeyboard: n
40
+ } = D(p), {
41
41
  dataHighlighted: K,
42
- onFocus: b,
42
+ onFocus: x,
43
43
  onMouseEnter: c,
44
44
  onBlur: I,
45
45
  onMouseLeave: _
46
46
  } = W({
47
- displayName: a,
47
+ displayName: p,
48
48
  id: y,
49
- isDisabled: n,
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(q.sub_trigger, S),
58
- disabled: n,
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": x || K === "" || r === i.CLICK && x ? "" : void 0,
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) ? L(!0) : t.key === "ArrowLeft" && (L(!1), t.currentTarget.focus())), p == null || p(t);
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
- b == null || b(), s == null || s(t);
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(!x)), e == null || e(t);
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
- ...h,
90
+ ...S,
91
91
  children: v
92
92
  }
93
93
  );
94
94
  }
95
95
  );
96
- w.displayName = a;
96
+ z.displayName = p;
97
97
  export {
98
- w as SubTrigger
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-BLCC-Xty.mjs";
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-BLCC-Xty.mjs";
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