@kommo-crm/crm-react-ui-kit 1.16.0 → 1.17.1

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 (38) 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/Badge/Badge.props.d.ts +1 -1
  5. package/dist/components/Badge/Badge.props.d.ts.map +1 -1
  6. package/dist/components/Button/Button.js +31 -31
  7. package/dist/components/Callout/Callout.d.ts.map +1 -1
  8. package/dist/components/Callout/Callout.js +31 -29
  9. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  10. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  11. package/dist/components/ContextMenu/ContextMenu.props.d.ts +10 -1
  12. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  13. package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
  14. package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
  15. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts +11 -2
  16. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts.map +1 -1
  17. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +8 -8
  18. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts +1 -1
  19. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts.map +1 -1
  20. package/dist/components/ContextMenu/components/Sub/index.js +1 -1
  21. package/dist/components/ContextMenu/components/SubContent/SubContent.js +4 -4
  22. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  23. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +56 -55
  24. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +10 -1
  25. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  26. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +13 -13
  27. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +1 -1
  28. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
  29. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +13 -13
  30. package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/components/Trigger/Trigger.js +45 -44
  32. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +53 -53
  34. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +1 -1
  35. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  36. package/dist/components/ContextMenu/index.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/ContextMenu-CsrSe_an.mjs +0 -230
@@ -1 +1 @@
1
- {"version":3,"file":"useContextMenuSub.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,C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E,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE;;OAEG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
1
+ {"version":3,"file":"useContextMenuSub.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,wBAAwB,EAAE,CAAC,CAAC,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC/D;;OAEG;IACH,gBAAgB,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC;;OAEG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC3E;;OAEG;IACH,aAAa,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,uBAAuB,EAAE,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE;;OAEG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
@@ -1,4 +1,4 @@
1
- import { S } from "../../../../ContextMenu-CsrSe_an.mjs";
1
+ import { S } from "../../../../ContextMenu-DY7dE-m3.mjs";
2
2
  export {
3
3
  S as Sub
4
4
  };
@@ -25,12 +25,12 @@ import '../../../../assets/SubContent.css';const me = "_sub_content_scelo_1", fe
25
25
  onEscapeKeyDown: u,
26
26
  onPointerDownOutside: r,
27
27
  ...P
28
- } = M, [y, D] = Z(null), m = $(!1), N = () => m.current, L = (e) => {
28
+ } = M, [D, y] = Z(null), m = $(!1), N = () => m.current, L = (e) => {
29
29
  m.current = e;
30
30
  }, {
31
31
  isAnimatedOpen: f,
32
32
  mode: w,
33
- defaultOpen: p,
33
+ isDefaultOpen: p,
34
34
  isOpen: E,
35
35
  triggerRef: C,
36
36
  contentRef: g,
@@ -71,8 +71,8 @@ import '../../../../assets/SubContent.css';const me = "_sub_content_scelo_1", fe
71
71
  return /* @__PURE__ */ l(
72
72
  ce,
73
73
  {
74
- activeItemId: y,
75
- setActiveItemId: D,
74
+ activeItemId: D,
75
+ setActiveItemId: y,
76
76
  onChildOpen: W,
77
77
  onSubRootOpen: j,
78
78
  shouldCloseCurrentMenuOnSelect: F,
@@ -1 +1 @@
1
- {"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,eAAO,MAAM,sBAAsB;YAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EpE,CAAC"}
1
+ {"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAI1D,eAAO,MAAM,sBAAsB;YAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFpE,CAAC"}
@@ -1,79 +1,80 @@
1
- import { jsx as t, jsxs as D } from "react/jsx-runtime";
2
- import { a as E } from "../../../../index-SjVEUQPm.mjs";
3
- import { ContextMenuProvider as F } from "../../ContextMenu.context.js";
4
- import { ContextMenuMode as N } from "../../ContextMenu.enums.js";
5
- import { FocusBlocker as j } from "../FocusBlocker/FocusBlocker.js";
6
- import { useContextMenuSubMenu as k } from "./hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
- import { Trigger as B } from "./components/Trigger/Trigger.js";
8
- import { Content as L } from "./components/Content/Content.js";
1
+ import { jsx as t, jsxs as E } from "react/jsx-runtime";
2
+ import { a as F } from "../../../../index-SjVEUQPm.mjs";
3
+ import { ContextMenuProvider as N } from "../../ContextMenu.context.js";
4
+ import { ContextMenuMode as j } from "../../ContextMenu.enums.js";
5
+ import { FocusBlocker as k } from "../FocusBlocker/FocusBlocker.js";
6
+ import { useContextMenuSubMenu as B } from "./hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
+ import { Trigger as L } from "./components/Trigger/Trigger.js";
8
+ import { Content as P } from "./components/Content/Content.js";
9
9
  const r = "ContextMenu.__experimental_SubRoot", o = (i) => {
10
10
  const {
11
11
  children: m,
12
- defaultOpen: u,
13
- mode: s = N.HOVER,
14
- shouldCloseCurrentMenuOnSelect: p = !0,
15
- shouldCloseRootMenuOnSelect: d = !0,
16
- onOpen: l,
17
- onAnimatedOpen: a,
18
- ...c
12
+ isDefaultOpen: u,
13
+ defaultOpen: s,
14
+ mode: p = j.HOVER,
15
+ shouldCloseCurrentMenuOnSelect: l = !0,
16
+ shouldCloseRootMenuOnSelect: a = !0,
17
+ onOpen: d,
18
+ onAnimatedOpen: c,
19
+ ...C
19
20
  } = i, {
20
- mode: C,
21
+ mode: O,
21
22
  isOpen: e,
22
- triggerRef: M,
23
- contentRef: O,
24
- isAnimatedOpen: f,
25
- triggerId: h,
26
- itemWithFocusedInput: g,
27
- animationDuration: x,
28
- hoverCloseDelay: S,
23
+ triggerRef: f,
24
+ contentRef: M,
25
+ isAnimatedOpen: h,
26
+ triggerId: g,
27
+ itemWithFocusedInput: x,
28
+ animationDuration: S,
29
+ hoverCloseDelay: I,
29
30
  closeMenuImmediately: n,
30
- setItemWithFocusedInput: I,
31
- setIsSubMenuOpen: R,
32
- onOpenChange: _,
33
- onContentEnter: b,
34
- onContentLeave: y,
31
+ setItemWithFocusedInput: R,
32
+ setIsSubMenuOpen: _,
33
+ onOpenChange: b,
34
+ onContentEnter: y,
35
+ onContentLeave: D,
35
36
  onOpenByKeyboard: A,
36
37
  onChildOpen: v
37
- } = k({
38
+ } = B({
38
39
  displayName: r,
39
- mode: s,
40
- defaultOpen: u,
41
- onOpen: l,
42
- onAnimatedOpen: a
40
+ mode: p,
41
+ isDefaultOpen: u ?? s,
42
+ onOpen: d,
43
+ onAnimatedOpen: c
43
44
  });
44
45
  return /* @__PURE__ */ t(
45
- F,
46
+ N,
46
47
  {
47
- mode: C,
48
- triggerRef: M,
49
- contentRef: O,
50
- isAnimatedOpen: f,
51
- animationDuration: x,
52
- hoverCloseDelay: S,
48
+ mode: O,
49
+ triggerRef: f,
50
+ contentRef: M,
51
+ isAnimatedOpen: h,
52
+ animationDuration: S,
53
+ hoverCloseDelay: I,
53
54
  closeMenuImmediately: n,
54
- onContentEnter: b,
55
- onContentLeave: y,
55
+ onContentEnter: y,
56
+ onContentLeave: D,
56
57
  isSubMenuOpen: e,
57
- setIsSubMenuOpen: R,
58
- triggerId: h,
58
+ setIsSubMenuOpen: _,
59
+ triggerId: g,
59
60
  onOpenByKeyboard: A,
60
- shouldCloseCurrentMenuOnSelect: p,
61
- shouldCloseRootMenuOnSelect: d,
61
+ shouldCloseCurrentMenuOnSelect: l,
62
+ shouldCloseRootMenuOnSelect: a,
62
63
  onChildOpen: v,
63
64
  isOpen: e,
64
- itemWithFocusedInput: g,
65
- setItemWithFocusedInput: I,
66
- children: /* @__PURE__ */ D(
67
- E,
65
+ itemWithFocusedInput: x,
66
+ setItemWithFocusedInput: R,
67
+ children: /* @__PURE__ */ E(
68
+ F,
68
69
  {
69
70
  open: e,
70
- onOpenChange: _,
71
+ onOpenChange: b,
71
72
  modal: !1,
72
- ...c,
73
+ ...C,
73
74
  children: [
74
75
  m,
75
76
  e && /* @__PURE__ */ t(
76
- j,
77
+ k,
77
78
  {
78
79
  onClick: () => {
79
80
  n();
@@ -87,8 +88,8 @@ const r = "ContextMenu.__experimental_SubRoot", o = (i) => {
87
88
  );
88
89
  };
89
90
  o.displayName = r;
90
- o.Trigger = B;
91
- o.Content = L;
91
+ o.Trigger = L;
92
+ o.Content = P;
92
93
  export {
93
94
  o as __experimental_SubRoot
94
95
  };
@@ -1,6 +1,15 @@
1
1
  import { DropdownMenuProps as RadixDropdownMenuRootProps } from '@radix-ui/react-dropdown-menu';
2
2
  import { ContextMenuModeType } from '../../ContextMenu.types';
3
- export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenChange' | 'modal'> & {
3
+ export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenChange' | 'modal' | 'defaultOpen'> & {
4
+ /**
5
+ * The open state of the submenu when it is initially rendered.
6
+ * Use when you do not need to control its open state.
7
+ */
8
+ isDefaultOpen?: boolean;
9
+ /**
10
+ * @deprecated Use `isDefaultOpen` instead.
11
+ */
12
+ defaultOpen?: boolean;
4
13
  /**
5
14
  * Called whenever the open state of the menu changes.
6
15
  */
@@ -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,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C,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,GAAG,aAAa,CACzC,GAAG;IACF;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC"}
@@ -1,5 +1,5 @@
1
- import { useId as se, useState as a, useRef as I, useLayoutEffect as oe, useEffect as c } from "react";
2
- import { a as ie } from "../../../../../../index-DBS3EIVR.mjs";
1
+ import { useId as se, useState as a, useRef as I, useLayoutEffect as ie, useEffect as c } from "react";
2
+ import { a as oe } from "../../../../../../index-DBS3EIVR.mjs";
3
3
  import { focusFirstFocusableItem as ce } from "../../../../utils/focusFirstFocusableItem/focusFirstFocusableItem.js";
4
4
  import { ContextMenuMode as s } from "../../../../ContextMenu.enums.js";
5
5
  import { useLevelContext as le } from "../../../../providers/LevelProvider/LevelProvider.js";
@@ -10,7 +10,7 @@ const ye = (Q) => {
10
10
  const {
11
11
  displayName: h,
12
12
  mode: U,
13
- defaultOpen: R,
13
+ isDefaultOpen: R,
14
14
  onOpen: e,
15
15
  onAnimatedOpen: E
16
16
  } = Q, L = se(), {
@@ -22,22 +22,22 @@ const ye = (Q) => {
22
22
  } = fe(h), [d, N] = a(m || R || !1), [v, f] = a(!1), [P, C] = a(!1), [F, Y] = a(!1), [T, Z] = a(null), [K, _] = a(null), {
23
23
  level: $,
24
24
  isAnimatedOpen: b,
25
- onChildOpen: o,
25
+ onChildOpen: i,
26
26
  onSubRootOpen: M,
27
27
  isAiming: p,
28
28
  isChildAiming: A,
29
29
  setActiveItemId: S
30
- } = le(h), { onSubmenuOpen: H, animationDuration: j, hoverCloseDelay: V } = ae(h), { closeRootMenuImmediately: B } = me(h), W = I(null), x = I(null), t = I(null), i = I(null), k = I(!0), n = ie() ? s.CLICK : U, l = m || d, O = (u) => {
30
+ } = le(h), { onSubmenuOpen: H, animationDuration: j, hoverCloseDelay: V } = ae(h), { closeRootMenuImmediately: B } = me(h), W = I(null), x = I(null), t = I(null), o = I(null), k = I(!0), n = oe() ? s.CLICK : U, l = m || d, O = (u) => {
31
31
  $ > 1 && (H == null || H(u)), setTimeout(() => M == null ? void 0 : M(u), 0);
32
32
  }, w = () => {
33
- t.current && (clearTimeout(t.current), t.current = null), i.current && (clearTimeout(i.current), i.current = null);
33
+ t.current && (clearTimeout(t.current), t.current = null), o.current && (clearTimeout(o.current), o.current = null);
34
34
  }, z = (u = !1) => {
35
35
  r == null || r(!1), N(!1), e == null || e(!1), C(!1), u && (B == null || B());
36
36
  }, q = () => {
37
37
  if (w(), n === s.HOVER) {
38
38
  if (F && T === s.CLICK || K !== null)
39
39
  return;
40
- f(!1), i.current = setTimeout(() => {
40
+ f(!1), o.current = setTimeout(() => {
41
41
  z();
42
42
  }, j);
43
43
  } else
@@ -50,17 +50,17 @@ const ye = (Q) => {
50
50
  N(R);
51
51
  return;
52
52
  } else u || J(W.current);
53
- u ? (i.current && (clearTimeout(i.current), i.current = null), n === s.HOVER && f(!0), r == null || r(!0), e == null || e(!0)) : q();
53
+ u ? (o.current && (clearTimeout(o.current), o.current = null), n === s.HOVER && f(!0), r == null || r(!0), e == null || e(!0)) : q();
54
54
  }, G = (u) => {
55
55
  y == null || y(u);
56
56
  }, te = () => {
57
- D(!1), n === s.HOVER && ((p != null && p() || A != null && A()) && !d || (i.current && (clearTimeout(i.current), i.current = null, f(!0)), d || (t.current && (clearTimeout(t.current), t.current = null), f(!0), r == null || r(!0), e == null || e(!0)), C(!0)));
57
+ D(!1), n === s.HOVER && ((p != null && p() || A != null && A()) && !d || (o.current && (clearTimeout(o.current), o.current = null, f(!0)), d || (t.current && (clearTimeout(t.current), t.current = null), f(!0), r == null || r(!0), e == null || e(!0)), C(!0)));
58
58
  }, re = () => {
59
59
  D(!1), n === s.HOVER && (t.current && (clearTimeout(t.current), t.current = null), C(!1));
60
60
  }, ne = (u, ue) => {
61
61
  Y(u), Z(ue);
62
62
  };
63
- return oe(() => {
63
+ return ie(() => {
64
64
  m !== void 0 && f(m);
65
65
  }, [m]), c(() => {
66
66
  !d && !v || n === s.CLICK || g || (P ? t.current && (clearTimeout(t.current), t.current = null) : t.current || (t.current = setTimeout(() => {
@@ -69,16 +69,16 @@ const ye = (Q) => {
69
69
  }, [n, d, P, V]), c(() => {
70
70
  E == null || E(v);
71
71
  }, [v]), c(() => {
72
- o(l, n), O(l);
72
+ i(l, n), O(l);
73
73
  }, [l, n]), c(() => {
74
- K !== null && (o == null || o(!0, s.CLICK));
74
+ K !== null && (i == null || i(!0, s.CLICK));
75
75
  }, [K]), c(() => {
76
76
  if (T !== null) {
77
77
  if (k.current) {
78
78
  k.current = !1;
79
79
  return;
80
80
  }
81
- F && T === s.CLICK ? o == null || o(!0, T) : o == null || o(l, n);
81
+ F && T === s.CLICK ? i == null || i(!0, T) : i == null || i(l, n);
82
82
  }
83
83
  }, [F, T]), c(() => {
84
84
  b || q();
@@ -13,7 +13,7 @@ export interface UseContextMenuSubMenuOptions {
13
13
  * The open state of the dropdown menu when it is initially rendered.
14
14
  * Use when you do not need to control its open state.
15
15
  */
16
- defaultOpen?: boolean;
16
+ isDefaultOpen?: boolean;
17
17
  /**
18
18
  * The callback function to be called when the context menu is opened.
19
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useContextMenuSubMenu.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;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.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,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;CAC1C;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACzC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC3E;;OAEG;IACH,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C"}
@@ -32,7 +32,7 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
32
32
  } = c, {
33
33
  mode: u,
34
34
  isOpen: m,
35
- defaultOpen: p,
35
+ isDefaultOpen: p,
36
36
  triggerId: R,
37
37
  triggerRef: _,
38
38
  setIsOpen: y,
@@ -43,11 +43,11 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
43
43
  dataHighlighted: S,
44
44
  onFocus: T,
45
45
  onMouseEnter: o,
46
- onBlur: F,
47
- onMouseLeave: K,
48
- onPointerEnter: N,
49
- onPointerLeave: A,
50
- onPointerMove: B
46
+ onBlur: D,
47
+ onMouseLeave: F,
48
+ onPointerEnter: K,
49
+ onPointerLeave: N,
50
+ onPointerMove: A
51
51
  } = q({
52
52
  displayName: g,
53
53
  id: R,
@@ -63,7 +63,7 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
63
63
  onPointerEnter: C,
64
64
  onPointerLeave: E,
65
65
  onPointerMove: I
66
- }), D = (e) => {
66
+ }), B = (e) => {
67
67
  u === d.HOVER && ([
68
68
  t.ENTER,
69
69
  t.SPACE,
@@ -83,16 +83,16 @@ import '../../../../assets/SubTrigger.css';const z = "_sub_trigger_mnh19_1", J =
83
83
  "data-highlighted": m || S === "" || u === d.CLICK && m ? "" : void 0,
84
84
  "data-item": !0,
85
85
  "data-submenu-trigger": !0,
86
- onKeyDown: D,
86
+ onKeyDown: B,
87
87
  onClick: k,
88
88
  onFocus: T,
89
89
  onMouseEnter: o,
90
90
  onMouseMove: H,
91
- onBlur: F,
92
- onMouseLeave: K,
93
- onPointerEnter: N,
94
- onPointerMove: B,
95
- onPointerLeave: A,
91
+ onBlur: D,
92
+ onMouseLeave: F,
93
+ onPointerEnter: K,
94
+ onPointerMove: A,
95
+ onPointerLeave: N,
96
96
  ...L,
97
97
  children: b
98
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAoB1C,eAAO,MAAM,OAAO,kMAuHlB,CAAC"}
1
+ {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAoBpD,eAAO,MAAM,OAAO,kMAkIlB,CAAC"}
@@ -1,13 +1,13 @@
1
- import { jsx as L } from "react/jsx-runtime";
2
- import { forwardRef as w } from "react";
3
- import { T as y } from "../../../../index-SjVEUQPm.mjs";
4
- import { c as I } from "../../../../index-L8X2o7IH.mjs";
5
- import { mergeRefs as K } from "../../../../lib/utils.js";
6
- import { KeyboardKey as a } from "../../../../lib/keyboard/index.js";
7
- import { useContextMenuContext as O } from "../../ContextMenu.context.js";
1
+ import { jsx as w } from "react/jsx-runtime";
2
+ import { forwardRef as y, useState as H } from "react";
3
+ import { T as K } from "../../../../index-SjVEUQPm.mjs";
4
+ import { c as O } from "../../../../index-L8X2o7IH.mjs";
5
+ import { mergeRefs as S } from "../../../../lib/utils.js";
6
+ import { KeyboardKey as f } from "../../../../lib/keyboard/index.js";
7
+ import { useContextMenuContext as F } from "../../ContextMenu.context.js";
8
8
  import { ContextMenuMode as u } from "../../ContextMenu.enums.js";
9
- import { focusFirstFocusableItem as F } from "../../utils/focusFirstFocusableItem/focusFirstFocusableItem.js";
10
- const l = "ContextMenu.Trigger", S = w((d, g) => {
9
+ import { focusFirstFocusableItem as W } from "../../utils/focusFirstFocusableItem/focusFirstFocusableItem.js";
10
+ const l = "ContextMenu.Trigger", _ = y((g, h) => {
11
11
  const {
12
12
  className: C,
13
13
  children: M,
@@ -16,50 +16,51 @@ const l = "ContextMenu.Trigger", S = w((d, g) => {
16
16
  onMouseLeave: n,
17
17
  onMouseMove: s,
18
18
  onPointerDown: i,
19
- onPointerUp: m,
19
+ onPointerUp: a,
20
20
  ...R
21
- } = d, {
22
- triggerRef: h,
21
+ } = g, {
22
+ triggerRef: v,
23
23
  contentRef: x,
24
- mode: f,
25
- isOpen: c,
26
- onContentEnter: p,
24
+ mode: c,
25
+ isOpen: m,
26
+ onContentEnter: d,
27
27
  onContentLeave: E,
28
- onOpenByKeyboard: e
29
- } = O(l), N = (o) => {
30
- o.preventDefault(), o.stopPropagation(), i == null || i(o);
31
- }, P = (o) => {
32
- f === u.HOVER && (o.stopPropagation(), [a.ENTER, a.SPACE, a.ARROW_DOWN].includes(
33
- o.key
34
- ) && (e(!0), setTimeout(() => {
35
- F(x.current);
36
- }, 0))), t == null || t(o);
37
- }, T = (o) => {
38
- p(o), r == null || r(o);
39
- }, D = (o) => {
40
- E(o), n == null || n(o);
41
- }, v = (o) => {
42
- c || p(o), s == null || s(o);
43
- }, A = (o) => {
44
- f === u.CLICK && (e == null || e(!c)), m == null || m(o);
28
+ onOpenByKeyboard: o
29
+ } = F(l), [N, p] = H(!1), P = (e) => {
30
+ e.preventDefault(), e.stopPropagation(), i == null || i(e);
31
+ }, T = (e) => {
32
+ c === u.HOVER && (e.stopPropagation(), [f.ENTER, f.SPACE, f.ARROW_DOWN].includes(
33
+ e.key
34
+ ) && (o(!0), setTimeout(() => {
35
+ W(x.current);
36
+ }, 0))), t == null || t(e);
37
+ }, D = (e) => {
38
+ p(!0), d(e), r == null || r(e);
39
+ }, A = (e) => {
40
+ p(!1), E(e), n == null || n(e);
41
+ }, I = (e) => {
42
+ m || d(e), s == null || s(e);
43
+ }, L = (e) => {
44
+ c === u.CLICK && (o == null || o(!m)), a == null || a(e);
45
45
  };
46
- return /* @__PURE__ */ L(
47
- y,
46
+ return /* @__PURE__ */ w(
47
+ K,
48
48
  {
49
- ref: K(h, g),
50
- className: I(C),
51
- onPointerDown: N,
52
- onPointerUp: A,
53
- onKeyDown: P,
54
- onMouseEnter: T,
55
- onMouseLeave: D,
56
- onMouseMove: v,
49
+ ref: S(v, h),
50
+ className: O(C),
51
+ "data-highlighted": m || N ? "" : void 0,
52
+ onPointerDown: P,
53
+ onPointerUp: L,
54
+ onKeyDown: T,
55
+ onMouseEnter: D,
56
+ onMouseLeave: A,
57
+ onMouseMove: I,
57
58
  ...R,
58
59
  children: M
59
60
  }
60
61
  );
61
62
  });
62
- S.displayName = l;
63
+ _.displayName = l;
63
64
  export {
64
- S as Trigger
65
+ _ as Trigger
65
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,cAAc,YAChB,qBAAqB,KAC7B,oBAqmBF,CAAC"}
1
+ {"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/hooks/useContextMenu/useContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,cAAc,YAChB,qBAAqB,KAC7B,oBA6mBF,CAAC"}