@kommo-crm/crm-react-ui-kit 1.1.1-beta.6 → 1.1.1-beta.8

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 (70) hide show
  1. package/dist/components/ContextMenu/ContextMenu.context.d.ts +4 -2
  2. package/dist/components/ContextMenu/ContextMenu.context.d.ts.map +1 -1
  3. package/dist/components/ContextMenu/ContextMenu.context.js +7 -4
  4. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  5. package/dist/components/ContextMenu/ContextMenu.js +102 -90
  6. package/dist/components/ContextMenu/ContextMenu.props.d.ts +22 -0
  7. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  8. package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
  9. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +1 -0
  10. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +45 -40
  12. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts +4 -0
  13. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts.map +1 -1
  14. package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
  15. package/dist/components/ContextMenu/components/Content/Content.js +2 -2
  16. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  17. package/dist/components/ContextMenu/components/Group/Group.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 +80 -75
  20. package/dist/components/ContextMenu/components/Item/Item.props.d.ts +6 -0
  21. package/dist/components/ContextMenu/components/Item/Item.props.d.ts.map +1 -1
  22. package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
  23. package/dist/components/ContextMenu/components/Label/Label.js +1 -1
  24. package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
  25. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +1 -1
  26. package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -0
  27. package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
  28. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +50 -45
  29. package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts +4 -0
  30. package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/components/Separator/Separator.js +1 -1
  32. package/dist/components/ContextMenu/components/Sub/Sub.d.ts +5 -5
  33. package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
  34. package/dist/components/ContextMenu/components/Sub/Sub.js +54 -55
  35. package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts +7 -0
  36. package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts.map +1 -0
  37. package/dist/components/ContextMenu/components/Sub/Sub.types.js +1 -0
  38. package/dist/components/ContextMenu/components/Sub/index.d.ts +1 -0
  39. package/dist/components/ContextMenu/components/Sub/index.d.ts.map +1 -1
  40. package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts.map +1 -1
  41. package/dist/components/ContextMenu/components/SubContent/SubContent.js +26 -25
  42. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  43. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +71 -66
  44. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +8 -0
  45. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  46. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
  47. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
  48. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +38 -40
  49. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +3 -3
  50. package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
  51. package/dist/components/ContextMenu/hooks/index.js +1 -1
  52. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  53. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts +2 -1
  54. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  55. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +72 -61
  56. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +4 -0
  57. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  58. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.d.ts.map +1 -1
  59. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +51 -49
  60. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts +1 -1
  61. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
  62. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +71 -63
  63. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +4 -0
  64. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
  65. package/dist/components/ContextMenu/index.d.ts +1 -0
  66. package/dist/components/ContextMenu/index.d.ts.map +1 -1
  67. package/dist/components/ContextMenu/index.js +1 -1
  68. package/dist/{index-BA3njR2k.mjs → index-CYWNqEqR.mjs} +1 -1
  69. package/dist/{useContentPositioning-DO7ZotnD.mjs → useContentPositioning-BLEFxO0N.mjs} +66 -65
  70. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
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(
2
+ import { forwardRef as P, useState as c, useLayoutEffect as f } from "react";
3
+ import { c as F } from "../../../../index-CYWNqEqR.mjs";
4
+ import { u as O, e as w, a as D } from "../../../../react-spring_web.modern-Dnq1lqN5.mjs";
5
+ import { c as E } from "../../../../index-L8X2o7IH.mjs";
6
+ import { LevelProvider as R } from "../../providers/LevelProvider/LevelProvider.js";
7
+ import { useContextMenuSubContext as W } from "../Sub/Sub.context.js";
8
+ import { useContextMenuContext as j } from "../../ContextMenu.context.js";
9
+ import '../../../../assets/SubContent.css';const q = "_sub_content_y6v65_1", z = {
10
+ sub_content: q
11
+ }, m = "ContextMenu.SubContent", G = P(
12
12
  ({
13
13
  className: d,
14
14
  children: p,
@@ -23,8 +23,9 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
23
23
  startAnimation: A,
24
24
  onMouseEnter: o,
25
25
  onMouseLeave: s,
26
- defaultOpen: u
27
- } = R(m), { animationDuration: C } = W(m), [y, g] = c(!1), [h, a] = c(!1);
26
+ defaultOpen: u,
27
+ open: C
28
+ } = W(m), { animationDuration: y } = j(m), [g, h] = c(!1), [v, a] = c(!1);
28
29
  f(() => {
29
30
  A();
30
31
  }, []), f(() => {
@@ -35,24 +36,24 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
35
36
  t && cancelAnimationFrame(t);
36
37
  };
37
38
  }, [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 }
39
+ const N = O({
40
+ opacity: v && i || u !== void 0 ? 1 : 0,
41
+ config: u === void 0 ? { duration: y, easing: w.easeInOutCubic } : { duration: 0 }
41
42
  });
42
43
  return /* @__PURE__ */ r(
43
- E,
44
+ R,
44
45
  {
45
- hasItemWithIcon: y,
46
- setHasItemWithIcon: g,
46
+ hasItemWithIcon: g,
47
+ setHasItemWithIcon: h,
47
48
  activeItemId: S,
48
49
  setActiveItemId: x,
49
- children: /* @__PURE__ */ r(
50
- w.div,
50
+ children: C && /* @__PURE__ */ r(
51
+ D.div,
51
52
  {
52
53
  style: {
53
54
  position: "fixed",
54
55
  zIndex: Number.MAX_SAFE_INTEGER - 10,
55
- ...v
56
+ ...N
56
57
  },
57
58
  onMouseEnter: (t) => {
58
59
  o == null || o(t), e == null || e(t);
@@ -62,10 +63,10 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
62
63
  },
63
64
  "data-content-wrapper": !0,
64
65
  children: /* @__PURE__ */ r(
65
- P,
66
+ F,
66
67
  {
67
68
  ref: _,
68
- className: D(q.sub_content, d),
69
+ className: E(z.sub_content, d),
69
70
  sideOffset: l,
70
71
  collisionPadding: I,
71
72
  ...b,
@@ -78,7 +79,7 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
78
79
  );
79
80
  }
80
81
  );
81
- z.displayName = m;
82
+ G.displayName = m;
82
83
  export {
83
- z as SubContent
84
+ G as SubContent
84
85
  };
@@ -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,EA+Ff,sBAAsB,CAAC"}
@@ -1,94 +1,99 @@
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-DO7ZotnD.mjs";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as T, useImperativeHandle as w } from "react";
3
+ import { R as L } from "../../../../index-CYWNqEqR.mjs";
4
+ import { useContextMenuContext as P, ContextMenuProvider as j } from "../../ContextMenu.context.js";
5
+ import { ContextMenuMode as B } from "../../ContextMenu.enums.js";
6
+ import { useContextMenuSubMenu as K } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
+ import "../../../../useContentPositioning-BLEFxO0N.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 V } from "../Item/Item.context.js";
11
+ import { Trigger as Y } from "./components/Trigger/Trigger.js";
12
+ import { Content as _ } from "./components/Content/Content.js";
13
+ const o = "ContextMenu.SubRoot", t = T(
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 = B.HOVER,
17
+ onOpen: d,
18
+ onAnimatedOpen: C,
19
+ defaultOpen: f,
20
+ isCloseWithRootMenu: c = !1,
21
+ isCloseOnClick: x = !0,
22
+ ...y
23
+ }, O) => {
22
24
  const {
23
25
  animationDuration: n,
24
26
  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,
29
- 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,
27
+ closeMenuImmediately: b
28
+ } = P(o), { subMenuOpen: e, setSubMenuOpen: m } = V(o), R = c ? b : void 0, {
29
+ mode: g,
30
+ open: i,
31
+ onOpenChange: I,
32
+ triggerRef: v,
33
+ contentRef: S,
34
+ inheritedArrowColor: h,
35
+ animatedOpen: H,
36
+ temporaryHoverClose: A,
37
+ closeMenuImmediately: s,
38
+ onMouseEnter: D,
39
+ onMouseLeave: E,
38
40
  enableTemporaryHoverClose: u,
39
- triggerId: D,
40
- onOpenByKeyboard: s
41
- } = j({
42
- displayName: e,
43
- mode: l,
44
- defaultOpen: d,
45
- onOpen: M,
41
+ triggerId: N,
42
+ onOpenByKeyboard: p
43
+ } = K({
44
+ displayName: o,
45
+ mode: M,
46
+ defaultOpen: f,
47
+ onOpen: d,
48
+ onAnimatedOpen: C,
46
49
  animationDuration: n,
47
- subMenuOpen: o,
50
+ subMenuOpen: e,
48
51
  setSubMenuOpen: m,
49
52
  hoverCloseDelay: r,
50
- closeRootMenuImmediately: y
53
+ closeRootMenuImmediately: R
51
54
  });
52
- return N(x, () => ({
53
- closeMenuImmediately: i,
55
+ return w(O, () => ({
56
+ closeMenuImmediately: s,
54
57
  enableTemporaryHoverClose: u,
55
- onOpenByKeyboard: s
56
- })), /* @__PURE__ */ p(
57
- L,
58
+ onOpenByKeyboard: p
59
+ })), /* @__PURE__ */ a(
60
+ j,
58
61
  {
59
- mode: b,
60
- triggerRef: O,
61
- contentRef: I,
62
- inheritedArrowColor: v,
63
- animatedOpen: S,
62
+ mode: g,
63
+ triggerRef: v,
64
+ contentRef: S,
65
+ inheritedArrowColor: h,
66
+ animatedOpen: H,
64
67
  animationDuration: n,
65
68
  hoverCloseDelay: r,
66
- temporaryHoverClose: h,
67
- closeMenuImmediately: i,
68
- onMouseEnter: H,
69
- onMouseLeave: A,
69
+ temporaryHoverClose: A,
70
+ closeMenuImmediately: s,
71
+ onMouseEnter: D,
72
+ onMouseLeave: E,
70
73
  enableTemporaryHoverClose: u,
71
- subMenuOpen: o,
74
+ subMenuOpen: e,
72
75
  setSubMenuOpen: m,
73
- triggerId: D,
74
- onOpenByKeyboard: s,
75
- children: /* @__PURE__ */ p(
76
- T,
76
+ triggerId: N,
77
+ onOpenByKeyboard: p,
78
+ isCloseOnClick: x,
79
+ isOpen: e || i,
80
+ children: /* @__PURE__ */ a(
81
+ L,
77
82
  {
78
- open: R || o,
79
- onOpenChange: g,
83
+ open: i || e,
84
+ onOpenChange: I,
80
85
  modal: !1,
81
- ...f,
82
- children: a
86
+ ...y,
87
+ children: l
83
88
  }
84
89
  )
85
90
  }
86
91
  );
87
92
  }
88
93
  );
89
- t.displayName = e;
90
- t.Trigger = K;
91
- t.Content = V;
94
+ t.displayName = o;
95
+ t.Trigger = Y;
96
+ t.Content = _;
92
97
  export {
93
98
  t as SubRoot
94
99
  };
@@ -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
  *
@@ -27,5 +31,9 @@ export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenCh
27
31
  * Whether the submenu should close when the root menu is closed.
28
32
  */
29
33
  isCloseWithRootMenu?: boolean;
34
+ /**
35
+ * Whether the menu should close when clicked.
36
+ */
37
+ isCloseOnClick?: boolean;
30
38
  };
31
39
  //# sourceMappingURL=SubRoot.props.d.ts.map
@@ -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;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as L, useState as C } from "react";
3
- import { C as j } from "../../../../../../index-BA3njR2k.mjs";
3
+ import { C as j } from "../../../../../../index-CYWNqEqR.mjs";
4
4
  import { c as k } from "../../../../../../index-L8X2o7IH.mjs";
5
5
  import { u as w, e as z, a as F } from "../../../../../../react-spring_web.modern-Dnq1lqN5.mjs";
6
6
  import { mergeRefs as M } from "../../../../../../lib/utils.js";
@@ -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-DO7ZotnD.mjs";
11
+ import { u as J, s as K } from "../../../../../../useContentPositioning-BLEFxO0N.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(
@@ -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-CYWNqEqR.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-DO7ZotnD.mjs";
8
+ import "../../../../../../useContentPositioning-BLEFxO0N.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
  };
@@ -1,14 +1,14 @@
1
1
  import { jsx as M } from "react/jsx-runtime";
2
2
  import { forwardRef as R } from "react";
3
- import { b as H } from "../../../../index-BA3njR2k.mjs";
3
+ import { b as H } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as j } from "../../../../index-L8X2o7IH.mjs";
5
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-DO7ZotnD.mjs";
10
- import "../Content/Content.utils.js";
11
9
  import "../../ContextMenu.context.js";
10
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
11
+ import "../Content/Content.utils.js";
12
12
  import { useContextMenuItemFocus as W } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
13
13
  import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_ip3hq_1", w = {
14
14
  sub_trigger: Y
@@ -1,6 +1,6 @@
1
1
  import { jsx as C } from "react/jsx-runtime";
2
2
  import { forwardRef as R } from "react";
3
- import { T as E } from "../../../../index-BA3njR2k.mjs";
3
+ import { T as E } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as T } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { mergeRefs as n } from "../../../../lib/utils.js";
6
6
  import { useContextMenuContext as A } from "../../ContextMenu.context.js";
@@ -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-DO7ZotnD.mjs";
4
+ import { u as m } from "../../../useContentPositioning-BLEFxO0N.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-DO7ZotnD.mjs";
2
+ import { u as n } from "../../../../useContentPositioning-BLEFxO0N.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
@@ -1 +1 @@
1
- {"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,cAAc,iFAMxB,qBAAqB;;;0BA8EW,OAAO;8BA2BP,OAAO;;;;;;;;;;;;CAmIzC,CAAC"}
1
+ {"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,cAAc,iGAOxB,qBAAqB;;;0BAmFW,OAAO;8BA2BP,OAAO;;;;;;;;;;;;8BAmEH,OAAO;CA8E7C,CAAC"}