@kommo-crm/crm-react-ui-kit 1.16.1 → 1.18.0

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 (36) hide show
  1. package/dist/ContextMenu-DY7dE-m3.mjs +232 -0
  2. package/dist/assets/Button.css +1 -1
  3. package/dist/assets/Callout.css +1 -1
  4. package/dist/components/Button/Button.js +31 -31
  5. package/dist/components/Callout/Callout.d.ts.map +1 -1
  6. package/dist/components/Callout/Callout.js +31 -29
  7. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  8. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  9. package/dist/components/ContextMenu/ContextMenu.props.d.ts +10 -1
  10. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
  12. package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
  13. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts +11 -2
  14. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts.map +1 -1
  15. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +8 -8
  16. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts +1 -1
  17. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts.map +1 -1
  18. package/dist/components/ContextMenu/components/Sub/index.js +1 -1
  19. package/dist/components/ContextMenu/components/SubContent/SubContent.js +4 -4
  20. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  21. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +56 -55
  22. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +10 -1
  23. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  24. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +13 -13
  25. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +1 -1
  26. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
  27. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +13 -13
  28. package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts.map +1 -1
  29. package/dist/components/ContextMenu/components/Trigger/Trigger.js +45 -44
  30. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +53 -53
  32. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +1 -1
  33. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  34. package/dist/components/ContextMenu/index.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/ContextMenu-CsrSe_an.mjs +0 -230
@@ -1,61 +1,61 @@
1
- import { useId as Ce, useState as a, useRef as o, useEffect as y } from "react";
1
+ import { useId as Ce, useState as a, useRef as c, useEffect as y } from "react";
2
2
  import { a as pe, b as Re } from "../../../../index-DBS3EIVR.mjs";
3
3
  import { useFocusChange as Ie } from "../../../../hooks/useFocusChange/useFocusChange.js";
4
4
  import { noop as ge } from "../../../../utils/noop/noop.js";
5
5
  import { ContextMenuMode as i } from "../../ContextMenu.enums.js";
6
- import { contextMenuBus as h } from "./utils/contextMenuBus/contextMenuBus.js";
7
- const De = (X) => {
6
+ import { contextMenuBus as C } from "./utils/contextMenuBus/contextMenuBus.js";
7
+ const Be = (X) => {
8
8
  const {
9
9
  mode: Y,
10
- defaultOpen: x,
11
- animationDuration: C,
10
+ isDefaultOpen: x,
11
+ animationDuration: p,
12
12
  hoverCloseDelay: V,
13
- isOpen: R,
13
+ isOpen: d,
14
14
  onOpen: s,
15
- onAnimatedOpen: B,
16
- onAiming: D,
15
+ onAnimatedOpen: D,
16
+ onAiming: B,
17
17
  onFocusOutside: Z,
18
18
  aimingTolerance: _,
19
19
  aimingIdleTimeout: $
20
20
  } = X, I = Ce(), [l, A] = a(
21
- R ?? x ?? !1
22
- ), [K, f] = a(!1), [ee, q] = a(!1), [L, g] = a(!1), [W, P] = a(!1), [j, te] = a(!1), [ne, re] = a(null), [se, M] = a(!1), [w, ue] = a(null), d = o(!1), z = o(null), n = o(null), c = o(null), S = o(!1), r = o(!1), T = o(null), O = o(!1), b = o(!1), G = o(ge), F = o(Z), u = pe() ? i.CLICK : Y, v = () => {
23
- n.current && (clearTimeout(n.current), n.current = null), c.current && (clearTimeout(c.current), c.current = null), T.current && (clearTimeout(T.current), T.current = null);
24
- }, m = () => {
25
- v(), r.current = !1, b.current = !1, A(!1), s == null || s(!1), g(!1), d.current = !1, M(!1);
26
- }, ce = (e) => {
27
- D == null || D(e), h.emitAimingChange(e), !e && r.current && !d.current && !O.current && (r.current = !1, f(!1), c.current = setTimeout(() => {
28
- m();
29
- }, C));
21
+ d ?? x ?? !1
22
+ ), [K, f] = a(!1), [ee, q] = a(!1), [L, g] = a(!1), [W, P] = a(!1), [j, te] = a(!1), [ne, re] = a(null), [se, M] = a(!1), [w, ue] = a(null), m = c(!1), z = c(null), n = c(null), o = c(null), S = c(!1), r = c(!1), T = c(null), v = c(!1), O = c(!1), G = c(ge), F = c(Z), u = pe() ? i.CLICK : Y, b = () => {
23
+ n.current && (clearTimeout(n.current), n.current = null), o.current && (clearTimeout(o.current), o.current = null), T.current && (clearTimeout(T.current), T.current = null);
24
+ }, h = () => {
25
+ b(), r.current = !1, O.current = !1, A(!1), s == null || s(!1), g(!1), m.current = !1, M(!1);
26
+ }, oe = (e) => {
27
+ B == null || B(e), C.emitAimingChange(e), !e && r.current && !m.current && !v.current && (r.current = !1, f(!1), o.current = setTimeout(() => {
28
+ h();
29
+ }, p));
30
30
  }, { isAiming: E, ref: H } = Re({
31
31
  isEnabled: l && u === i.HOVER,
32
- onChange: ce,
32
+ onChange: oe,
33
33
  tolerance: _,
34
34
  idleTimeout: $
35
- }), oe = () => O.current, ie = (e) => {
36
- O.current = e, !e && r.current && !d.current && !E() && (r.current = !1, f(!1), c.current = setTimeout(() => {
37
- m();
38
- }, C));
35
+ }), ce = () => v.current, ie = (e) => {
36
+ v.current = e, !e && r.current && !m.current && !E() && (r.current = !1, f(!1), o.current = setTimeout(() => {
37
+ h();
38
+ }, p));
39
39
  }, J = () => {
40
- if (v(), q(!1), u === i.HOVER) {
40
+ if (b(), q(!1), u === i.HOVER) {
41
41
  if (j && ne === i.CLICK || w !== null)
42
42
  return;
43
43
  if (L) {
44
- f(!1), c.current = setTimeout(() => {
45
- m();
46
- }, C);
44
+ f(!1), o.current = setTimeout(() => {
45
+ h();
46
+ }, p);
47
47
  return;
48
48
  }
49
- r.current = !0, !E() && !O.current && (r.current = !1, f(!1), c.current = setTimeout(() => {
50
- m();
51
- }, C));
49
+ r.current = !0, !E() && !v.current && (r.current = !1, f(!1), o.current = setTimeout(() => {
50
+ h();
51
+ }, p));
52
52
  } else
53
- m();
53
+ h();
54
54
  }, k = ({
55
55
  preventFocusRestore: e = !1,
56
56
  skipAnimationFlag: t = !1
57
57
  }) => {
58
- S.current = e, v(), r.current = !1, b.current = !1, q(t), f(!1), A(!1), s == null || s(!1), g(!1), d.current = !1, M(!1);
58
+ S.current = e, b(), r.current = !1, O.current = !1, q(t), f(!1), A(!1), s == null || s(!1), g(!1), m.current = !1, M(!1);
59
59
  };
60
60
  y(() => {
61
61
  l && (S.current = !1);
@@ -63,22 +63,22 @@ const De = (X) => {
63
63
  const le = (e) => {
64
64
  M(e);
65
65
  }, N = (e) => {
66
- if (!(u === i.CLICK && x !== void 0)) {
66
+ if (d === void 0 && !(u === i.CLICK && x !== void 0)) {
67
67
  if (e) {
68
- c.current && (clearTimeout(c.current), c.current = null), r.current && (v(), r.current = !1), u === i.HOVER && f(!0), A(!0), s == null || s(!0), R !== !1 && h.emit({
68
+ o.current && (clearTimeout(o.current), o.current = null), r.current && (b(), r.current = !1), u === i.HOVER && f(!0), A(!0), s == null || s(!0), d !== !1 && C.emit({
69
69
  id: I,
70
70
  isAiming: E
71
71
  });
72
72
  return;
73
73
  }
74
- u === i.HOVER ? J() : m();
74
+ u === i.HOVER ? J() : h();
75
75
  }
76
76
  }, fe = (e) => {
77
77
  P(e), N(e);
78
78
  }, Q = () => {
79
79
  var e, t;
80
- b.current = !0, !(u !== i.HOVER || (t = (e = h).isAiming) != null && t.call(e) && h.activeMenuId !== I) && (P(!1), v(), r.current = !1, l ? (g(!0), d.current = !0, f(!0)) : (n.current && (clearTimeout(n.current), n.current = null), f(!0), A(!0), s == null || s(!0), g(!0), d.current = !0, T.current = setTimeout(() => {
81
- T.current = null, R !== !1 && h.emit({
80
+ O.current = !0, !(u !== i.HOVER || (t = (e = C).isAiming) != null && t.call(e) && C.activeMenuId !== I) && (P(!1), b(), r.current = !1, l ? (g(!0), m.current = !0, f(!0)) : (n.current && (clearTimeout(n.current), n.current = null), f(!0), A(!0), s == null || s(!0), g(!0), m.current = !0, T.current = setTimeout(() => {
81
+ T.current = null, d !== !1 && C.emit({
82
82
  id: I,
83
83
  isAiming: E
84
84
  });
@@ -86,25 +86,25 @@ const De = (X) => {
86
86
  };
87
87
  G.current = Q;
88
88
  const ae = () => {
89
- b.current = !1, u === i.HOVER && (P(!1), g(!1), d.current = !1, n.current && (clearTimeout(n.current), n.current = null), r.current && !E() && !O.current && (r.current = !1, f(!1), c.current = setTimeout(() => {
90
- m();
91
- }, C)));
89
+ O.current = !1, u === i.HOVER && (P(!1), g(!1), m.current = !1, n.current && (clearTimeout(n.current), n.current = null), r.current && !E() && !v.current && (r.current = !1, f(!1), o.current = setTimeout(() => {
90
+ h();
91
+ }, p)));
92
92
  }, de = (e, t) => {
93
93
  e || M(!1), te(e), re(t);
94
94
  };
95
- y(() => R === !1 ? void 0 : h.subscribe(({ id: t }) => {
95
+ y(() => d !== void 0 ? void 0 : C.subscribe(({ id: t }) => {
96
96
  t !== I && k({
97
97
  preventFocusRestore: !0,
98
98
  skipAnimationFlag: !0
99
99
  });
100
- }), [I, R]), y(() => u !== i.HOVER ? void 0 : h.subscribeAimingChange((t) => {
101
- !t && b.current && G.current();
100
+ }), [I, d]), y(() => u !== i.HOVER ? void 0 : C.subscribeAimingChange((t) => {
101
+ !t && O.current && G.current();
102
102
  }), [u]), y(() => {
103
103
  !l || u !== i.HOVER || W || (L ? n.current && (clearTimeout(n.current), n.current = null) : n.current || (n.current = setTimeout(() => {
104
104
  J();
105
105
  }, V)));
106
106
  }, [u, l, L, V, W]), y(() => {
107
- B == null || B(K);
107
+ D == null || D(K);
108
108
  }, [K]);
109
109
  const me = () => {
110
110
  const e = [];
@@ -116,24 +116,24 @@ const De = (X) => {
116
116
  };
117
117
  return Ie({
118
118
  elements: l ? [H, z] : [],
119
- enabled: l,
119
+ enabled: l && d === void 0,
120
120
  onFocusOutside: (e) => {
121
121
  var U;
122
122
  const t = e.target;
123
123
  if (!l || t === document.body)
124
124
  return;
125
- if (!me().some((p) => t ? p === t || p.contains(t) : !1)) {
126
- let p = !1;
125
+ if (!me().some((R) => t ? R === t || R.contains(t) : !1)) {
126
+ let R = !1;
127
127
  const he = {
128
128
  target: t,
129
129
  preventDefault: () => {
130
- p = !0;
130
+ R = !0;
131
131
  },
132
132
  get defaultPrevented() {
133
- return p;
133
+ return R;
134
134
  }
135
135
  };
136
- if ((U = F.current) == null || U.call(F, he), p)
136
+ if ((U = F.current) == null || U.call(F, he), R)
137
137
  return;
138
138
  k({ preventFocusRestore: !0 });
139
139
  }
@@ -147,10 +147,10 @@ const De = (X) => {
147
147
  contentRef: H,
148
148
  isAnimatedOpen: K,
149
149
  skipAnimation: ee,
150
- animationDuration: C,
150
+ animationDuration: p,
151
151
  hoverCloseDelay: V,
152
152
  closeMenuImmediately: (e) => {
153
- k({ preventFocusRestore: e });
153
+ d === void 0 && k({ preventFocusRestore: e });
154
154
  },
155
155
  onContentEnter: Q,
156
156
  onContentLeave: ae,
@@ -164,10 +164,10 @@ const De = (X) => {
164
164
  setOnFocusOutside: (e) => {
165
165
  F.current = e;
166
166
  },
167
- isChildAiming: oe,
167
+ isChildAiming: ce,
168
168
  onChildAiming: ie
169
169
  };
170
170
  };
171
171
  export {
172
- De as useContextMenu
172
+ Be as useContextMenu
173
173
  };
@@ -11,7 +11,7 @@ export interface UseContextMenuOptions {
11
11
  * The open state of the dropdown menu when it is initially rendered.
12
12
  * Use when you do not need to control its open state.
13
13
  */
14
- defaultOpen?: boolean;
14
+ isDefaultOpen?: boolean;
15
15
  /**
16
16
  * The duration of the animation.
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useContextMenu.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;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;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,I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I,CAAC;IACpC;;OAEG;IACH,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,yBAAyB,EAAE,MAAM,OAAO,CAAC;IACzC;;OAEG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC,GAAG,SAAS,KACtD,IAAI,CAAC;IACV;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B;;OAEG;IACH,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
1
+ {"version":3,"file":"useContextMenu.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;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;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,E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E,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,yBAAyB,EAAE,MAAM,OAAO,CAAC;IACzC;;OAEG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC,GAAG,SAAS,KACtD,IAAI,CAAC;IACV;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B;;OAEG;IACH,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
@@ -1,4 +1,4 @@
1
- import { C as t } from "../../ContextMenu-CsrSe_an.mjs";
1
+ import { C as t } from "../../ContextMenu-DY7dE-m3.mjs";
2
2
  export {
3
3
  t as ContextMenu
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kommo-crm/crm-react-ui-kit",
3
3
  "description": "Ready-to-use React components which implements Kommo design",
4
- "version": "1.16.1",
4
+ "version": "1.18.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "engines": {
@@ -1,230 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { S as B, a as K } from "./index-SjVEUQPm.mjs";
3
- import { useContextMenu as j } from "./components/ContextMenu/hooks/useContextMenu/useContextMenu.js";
4
- import "react";
5
- import { C as H } from "./useContentPositioning-Dvz908Jg.mjs";
6
- import "./components/ContextMenu/components/Content/Content.utils.js";
7
- import "./components/ContextMenu/providers/LevelProvider/LevelProvider.js";
8
- import "./components/ContextMenu/providers/SubMenuProvider/SubMenuProvider.js";
9
- import { useContextMenuKeyboardNavigation as V } from "./components/ContextMenu/hooks/useContextMenuKeyboardNavigation/useContextMenuKeyboardNavigation.js";
10
- import { Trigger as $ } from "./components/ContextMenu/components/Trigger/Trigger.js";
11
- import { Portal as q } from "./components/ContextMenu/components/Portal/Portal.js";
12
- import { ContextMenuMode as z } from "./components/ContextMenu/ContextMenu.enums.js";
13
- import { SubTrigger as J } from "./components/ContextMenu/components/SubTrigger/SubTrigger.js";
14
- import { SubContent as Q } from "./components/ContextMenu/components/SubContent/SubContent.js";
15
- import { Arrow as X } from "./components/ContextMenu/components/Arrow/Arrow.js";
16
- import { Item as Z } from "./components/ContextMenu/components/Item/Item.js";
17
- import { ItemRightSlot as ee } from "./components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js";
18
- import { Group as oe } from "./components/ContextMenu/components/Group/Group.js";
19
- import { Label as ne } from "./components/ContextMenu/components/Label/Label.js";
20
- import { CheckboxItem as te } from "./components/ContextMenu/components/CheckboxItem/CheckboxItem.js";
21
- import { ItemIndicator as ie } from "./components/ContextMenu/components/ItemIndicator/ItemIndicator.js";
22
- import { RadioGroup as re } from "./components/ContextMenu/components/RadioGroup/RadioGroup.js";
23
- import { RadioItem as me } from "./components/ContextMenu/components/RadioItem/RadioItem.js";
24
- import { Separator as se } from "./components/ContextMenu/components/Separator/Separator.js";
25
- import { ItemIcon as ae } from "./components/ContextMenu/components/ItemIcon/ItemIcon.js";
26
- import { __experimental_SubRoot as pe } from "./components/ContextMenu/components/SubRoot/SubRoot.js";
27
- import { DISPLAY_NAME as ue, ContextMenuRootProvider as de, ContextMenuProvider as le } from "./components/ContextMenu/ContextMenu.context.js";
28
- import { useContextMenuSub as ce } from "./components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js";
29
- import { ContextMenuSubProvider as Ce, DISPLAY_NAME as N } from "./components/ContextMenu/components/Sub/Sub.context.js";
30
- const T = (s) => {
31
- const {
32
- children: a,
33
- mode: p = z.HOVER,
34
- onOpen: e,
35
- defaultOpen: t,
36
- shouldCloseRootMenuOnSelect: u = !0,
37
- shouldCloseCurrentMenuOnSelect: d = !0,
38
- onAiming: l,
39
- aimingTolerance: c = v,
40
- aimingIdleTimeout: C = P,
41
- ...O
42
- } = s, {
43
- mode: f,
44
- isOpen: i,
45
- setIsOpen: o,
46
- isAnimatedOpen: I,
47
- handleContentEnter: h,
48
- handleContentLeave: r,
49
- handleOpenChange: g,
50
- triggerId: A,
51
- onOpenByKeyboard: M,
52
- contentRef: R,
53
- triggerRef: S,
54
- onChildOpen: b,
55
- onSubRootOpen: m,
56
- closeMenuImmediately: E,
57
- itemWithFocusedInput: D,
58
- setItemWithFocusedInput: _,
59
- isAiming: x,
60
- handlePointerDownOutside: y
61
- } = ce({
62
- displayName: N,
63
- mode: p,
64
- defaultOpen: t,
65
- onOpen: e,
66
- onAiming: l,
67
- aimingTolerance: c,
68
- aimingIdleTimeout: C
69
- });
70
- return /* @__PURE__ */ n(
71
- Ce,
72
- {
73
- mode: f,
74
- isOpen: i,
75
- setIsOpen: o,
76
- isAnimatedOpen: I,
77
- defaultOpen: t,
78
- onContentEnter: h,
79
- onContentLeave: r,
80
- onOpenByKeyboard: M,
81
- triggerId: A,
82
- contentRef: R,
83
- triggerRef: S,
84
- onChildOpen: b,
85
- onSubRootOpen: m,
86
- shouldCloseRootMenuOnSelect: u,
87
- shouldCloseCurrentMenuOnSelect: d,
88
- closeMenuImmediately: E,
89
- itemWithFocusedInput: D,
90
- setItemWithFocusedInput: _,
91
- isAiming: x,
92
- onPointerDownOutside: y,
93
- children: /* @__PURE__ */ n(
94
- B,
95
- {
96
- open: i,
97
- onOpenChange: g,
98
- ...O,
99
- children: a
100
- }
101
- )
102
- }
103
- );
104
- };
105
- T.displayName = N;
106
- const Oe = 200, fe = 150, v = 20, P = 200, L = (s) => {
107
- const {
108
- children: a,
109
- mode: p,
110
- isOpen: e,
111
- defaultOpen: t,
112
- shouldCloseCurrentMenuOnSelect: u = !0,
113
- onOpen: d,
114
- onAnimatedOpen: l,
115
- onAiming: c,
116
- aimingTolerance: C = v,
117
- aimingIdleTimeout: O = P,
118
- ...f
119
- } = s, {
120
- mode: i,
121
- isOpen: o,
122
- triggerRef: I,
123
- contentRef: h,
124
- isAnimatedOpen: r,
125
- skipAnimation: g,
126
- animationDuration: A,
127
- hoverCloseDelay: M,
128
- isRootContentBlocked: R,
129
- isChildOpen: S,
130
- itemWithFocusedInput: b,
131
- closeMenuImmediately: m,
132
- onOpenChange: E,
133
- onContentEnter: D,
134
- onContentLeave: _,
135
- onOpenByKeyboard: x,
136
- onChildOpen: y,
137
- onSubmenuOpen: F,
138
- setItemWithFocusedInput: G,
139
- shouldPreventFocusRestore: U,
140
- setOnFocusOutside: W,
141
- isChildAiming: Y,
142
- onChildAiming: k
143
- } = j({
144
- mode: p,
145
- defaultOpen: t,
146
- animationDuration: fe,
147
- hoverCloseDelay: Oe,
148
- isOpen: e,
149
- onOpen: d,
150
- onAnimatedOpen: l,
151
- onAiming: c,
152
- aimingTolerance: C,
153
- aimingIdleTimeout: O
154
- }), { navigationContentRef: w } = V({
155
- isOpen: e ?? o,
156
- isAnimatedOpen: r
157
- });
158
- return /* @__PURE__ */ n(
159
- de,
160
- {
161
- closeRootMenuImmediately: m,
162
- navigationContentRef: w,
163
- children: /* @__PURE__ */ n(
164
- le,
165
- {
166
- mode: i,
167
- triggerRef: I,
168
- contentRef: h,
169
- isAnimatedOpen: r,
170
- skipAnimation: g,
171
- animationDuration: A,
172
- hoverCloseDelay: M,
173
- closeMenuImmediately: m,
174
- onContentEnter: D,
175
- onContentLeave: _,
176
- onOpenByKeyboard: x,
177
- shouldCloseCurrentMenuOnSelect: u,
178
- onChildOpen: y,
179
- isOpen: o,
180
- onSubmenuOpen: F,
181
- isRootContentBlocked: R,
182
- isChildOpen: S,
183
- itemWithFocusedInput: b,
184
- setItemWithFocusedInput: G,
185
- shouldPreventFocusRestore: U,
186
- setOnFocusOutside: W,
187
- isChildAiming: Y,
188
- onChildAiming: k,
189
- children: /* @__PURE__ */ n(
190
- K,
191
- {
192
- open: e ?? o,
193
- onOpenChange: E,
194
- modal: !1,
195
- ...f,
196
- children: a
197
- }
198
- )
199
- }
200
- )
201
- }
202
- );
203
- }, Ve = Object.assign(L, {
204
- displayName: ue,
205
- Root: L,
206
- experimental_SubRoot: pe,
207
- Trigger: $,
208
- Content: H,
209
- Portal: q,
210
- Sub: T,
211
- SubTrigger: J,
212
- SubContent: Q,
213
- Arrow: X,
214
- Item: Z,
215
- ItemRightSlot: ee,
216
- Group: oe,
217
- Label: ne,
218
- CheckboxItem: te,
219
- RadioGroup: re,
220
- RadioItem: me,
221
- ItemIndicator: ie,
222
- Separator: se,
223
- ItemIcon: ae
224
- });
225
- export {
226
- Ve as C,
227
- v as D,
228
- T as S,
229
- P as a
230
- };