@kommo-crm/crm-react-ui-kit 1.1.1-beta.6 → 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 (40) 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 +83 -80
  6. package/dist/components/ContextMenu/ContextMenu.props.d.ts +14 -0
  7. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  8. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +1 -1
  9. package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
  10. package/dist/components/ContextMenu/components/Content/Content.js +1 -1
  11. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  12. package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
  13. package/dist/components/ContextMenu/components/Item/Item.js +75 -71
  14. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +1 -1
  15. package/dist/components/ContextMenu/components/Sub/Sub.js +2 -1
  16. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  17. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +67 -64
  18. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +4 -0
  19. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  20. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +1 -1
  21. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
  22. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +38 -40
  23. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
  24. package/dist/components/ContextMenu/hooks/index.js +1 -1
  25. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  26. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts +2 -1
  27. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  28. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +72 -61
  29. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +4 -0
  30. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.d.ts.map +1 -1
  32. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +51 -49
  33. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts +1 -1
  34. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
  35. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +71 -63
  36. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts +4 -0
  37. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.d.ts.map +1 -1
  38. package/dist/components/ContextMenu/index.js +1 -1
  39. package/dist/{useContentPositioning-DO7ZotnD.mjs → useContentPositioning-DAKfbddS.mjs} +66 -65
  40. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
- import { ContextMenuContextProps } from './ContextMenu.props';
1
+ import { ContextMenuContextProps, ContextMenuRootContextProps } from './ContextMenu.props';
2
2
  declare const DISPLAY_NAME = "ContextMenu";
3
3
  declare const ContextMenuProvider: import('../../lib/react/createComponentContext').ContextProps<ContextMenuContextProps>, useContextMenuContext: (consumerName: string) => ContextMenuContextProps;
4
- export { ContextMenuProvider, useContextMenuContext, DISPLAY_NAME };
4
+ declare const ROOT_DISPLAY_NAME = "ContextMenu.Root";
5
+ declare const ContextMenuRootProvider: import('../../lib/react/createComponentContext').ContextProps<ContextMenuRootContextProps>, useContextMenuRootContext: (consumerName: string) => ContextMenuRootContextProps;
6
+ export { ContextMenuProvider, useContextMenuContext, DISPLAY_NAME, ContextMenuRootProvider, useContextMenuRootContext, ROOT_DISPLAY_NAME, };
5
7
  //# sourceMappingURL=ContextMenu.context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.context.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,QAAA,MAAM,YAAY,gBAAgB,CAAC;AAEnC,QAAA,MAAO,mBAAmB,0FAAE,qBAAqB,mDACc,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"ContextMenu.context.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.context.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY,gBAAgB,CAAC;AAEnC,QAAA,MAAO,mBAAmB,0FAAE,qBAAqB,mDACc,CAAC;AAEhE,QAAA,MAAM,iBAAiB,qBAAqB,CAAC;AAE7C,QAAA,MAAO,uBAAuB,8FAAE,yBAAyB,uDACe,CAAC;AAEzE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,GAClB,CAAC"}
@@ -1,7 +1,10 @@
1
1
  import { createComponentContext as t } from "../../lib/react/createComponentContext/createComponentContext.js";
2
- const e = "ContextMenu", [n, r] = t(e);
2
+ const o = "ContextMenu", [x, C] = t(o), e = "ContextMenu.Root", [r, u] = t(e);
3
3
  export {
4
- n as ContextMenuProvider,
5
- e as DISPLAY_NAME,
6
- r as useContextMenuContext
4
+ x as ContextMenuProvider,
5
+ r as ContextMenuRootProvider,
6
+ o as DISPLAY_NAME,
7
+ e as ROOT_DISPLAY_NAME,
8
+ C as useContextMenuContext,
9
+ u as useContextMenuRootContext
7
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAqB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKzE,eAAO,MAAM,WAAW,EA8DnB,eAAe,CAAC"}
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAiCA,OAAO,EAAqB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKzE,eAAO,MAAM,WAAW,EAmEnB,eAAe,CAAC"}
@@ -1,107 +1,110 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { forwardRef as M, useImperativeHandle as y } from "react";
3
- import { R as v } from "../../index-BA3njR2k.mjs";
4
- import { useContextMenu as x } from "./hooks/useContextMenu/useContextMenu.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as v, useImperativeHandle as x } from "react";
3
+ import { R as y } from "../../index-BA3njR2k.mjs";
4
+ import { useContextMenu as D } from "./hooks/useContextMenu/useContextMenu.js";
5
5
  import "./providers/LevelProvider/LevelProvider.js";
6
- import { C as D } from "../../useContentPositioning-DO7ZotnD.mjs";
6
+ import { ContextMenuRootProvider as T, ContextMenuProvider as L, DISPLAY_NAME as E } from "./ContextMenu.context.js";
7
+ import { C as N } from "../../useContentPositioning-DAKfbddS.mjs";
7
8
  import "./components/Content/Content.utils.js";
8
- import { ContextMenuProvider as O, DISPLAY_NAME as T } from "./ContextMenu.context.js";
9
- import { Trigger as L } from "./components/Trigger/Trigger.js";
10
- import { Portal as E } from "./components/Portal/Portal.js";
11
- import { Sub as N } from "./components/Sub/Sub.js";
12
- import { SubTrigger as w } from "./components/SubTrigger/SubTrigger.js";
13
- import { SubContent as G } from "./components/SubContent/SubContent.js";
14
- import { Arrow as H } from "./components/Arrow/Arrow.js";
15
- import { Item as P } from "./components/Item/Item.js";
16
- import { ItemRightSlot as _ } from "./components/ItemRightSlot/ItemRightSlot.js";
17
- import { Group as k } from "./components/Group/Group.js";
18
- import { Label as Y } from "./components/Label/Label.js";
19
- import { CheckboxItem as j } from "./components/CheckboxItem/CheckboxItem.js";
20
- import { ItemIndicator as B } from "./components/ItemIndicator/ItemIndicator.js";
21
- import { RadioGroup as K } from "./components/RadioGroup/RadioGroup.js";
22
- import { RadioItem as U } from "./components/RadioItem/RadioItem.js";
23
- import { Separator as V } from "./components/Separator/Separator.js";
24
- import { ItemIcon as q } from "./components/ItemIcon/ItemIcon.js";
25
- import { SubRoot as z } from "./components/SubRoot/SubRoot.js";
26
- const F = 200, J = 150, o = M(
27
- ({ children: i, mode: n, onOpen: a, defaultOpen: p, ...f }, u) => {
9
+ import { Trigger as P } from "./components/Trigger/Trigger.js";
10
+ import { Portal as w } from "./components/Portal/Portal.js";
11
+ import { Sub as G } from "./components/Sub/Sub.js";
12
+ import { SubTrigger as H } from "./components/SubTrigger/SubTrigger.js";
13
+ import { SubContent as _ } from "./components/SubContent/SubContent.js";
14
+ import { Arrow as k } from "./components/Arrow/Arrow.js";
15
+ import { Item as Y } from "./components/Item/Item.js";
16
+ import { ItemRightSlot as j } from "./components/ItemRightSlot/ItemRightSlot.js";
17
+ import { Group as B } from "./components/Group/Group.js";
18
+ import { Label as K } from "./components/Label/Label.js";
19
+ import { CheckboxItem as U } from "./components/CheckboxItem/CheckboxItem.js";
20
+ import { ItemIndicator as V } from "./components/ItemIndicator/ItemIndicator.js";
21
+ import { RadioGroup as q } from "./components/RadioGroup/RadioGroup.js";
22
+ import { RadioItem as z } from "./components/RadioItem/RadioItem.js";
23
+ import { Separator as F } from "./components/Separator/Separator.js";
24
+ import { ItemIcon as J } from "./components/ItemIcon/ItemIcon.js";
25
+ import { SubRoot as Q } from "./components/SubRoot/SubRoot.js";
26
+ const W = 200, X = 150, o = v(
27
+ ({ children: n, mode: p, onOpen: a, defaultOpen: f, onAnimatedOpen: l, ...u }, d) => {
28
28
  const {
29
29
  mode: I,
30
- open: l,
31
- onOpenChange: d,
30
+ open: e,
31
+ onOpenChange: C,
32
32
  triggerRef: s,
33
- contentRef: C,
34
- inheritedArrowColor: R,
33
+ contentRef: R,
34
+ inheritedArrowColor: c,
35
35
  animatedOpen: b,
36
36
  animationDuration: S,
37
- hoverCloseDelay: c,
38
- temporaryHoverClose: g,
39
- closeMenuImmediately: r,
40
- onMouseEnter: h,
37
+ hoverCloseDelay: g,
38
+ temporaryHoverClose: h,
39
+ closeMenuImmediately: t,
40
+ onMouseEnter: M,
41
41
  onMouseLeave: A,
42
- enableTemporaryHoverClose: t,
43
- onOpenByKeyboard: e
44
- } = x({
45
- mode: n,
46
- defaultOpen: p,
42
+ enableTemporaryHoverClose: m,
43
+ onOpenByKeyboard: i,
44
+ onChildClickOpen: O
45
+ } = D({
46
+ mode: p,
47
+ defaultOpen: f,
47
48
  onOpen: a,
48
- animationDuration: J,
49
- hoverCloseDelay: F
49
+ onAnimatedOpen: l,
50
+ animationDuration: X,
51
+ hoverCloseDelay: W
50
52
  });
51
- return y(u, () => ({
52
- closeMenuImmediately: r,
53
- enableTemporaryHoverClose: t,
54
- onOpenByKeyboard: e
55
- })), /* @__PURE__ */ m(
56
- O,
53
+ return x(d, () => ({
54
+ closeMenuImmediately: t,
55
+ enableTemporaryHoverClose: m,
56
+ onOpenByKeyboard: i
57
+ })), /* @__PURE__ */ r(T, { onChildClickOpen: O, children: /* @__PURE__ */ r(
58
+ L,
57
59
  {
58
60
  mode: I,
59
61
  triggerRef: s,
60
- contentRef: C,
61
- inheritedArrowColor: R,
62
+ contentRef: R,
63
+ inheritedArrowColor: c,
62
64
  animatedOpen: b,
63
65
  animationDuration: S,
64
- hoverCloseDelay: c,
65
- temporaryHoverClose: g,
66
- closeMenuImmediately: r,
67
- onMouseEnter: h,
66
+ hoverCloseDelay: g,
67
+ temporaryHoverClose: h,
68
+ closeMenuImmediately: t,
69
+ onMouseEnter: M,
68
70
  onMouseLeave: A,
69
- enableTemporaryHoverClose: t,
70
- onOpenByKeyboard: e,
71
- children: /* @__PURE__ */ m(
72
- v,
71
+ enableTemporaryHoverClose: m,
72
+ onOpenByKeyboard: i,
73
+ isOpen: e,
74
+ children: /* @__PURE__ */ r(
75
+ y,
73
76
  {
74
- open: l,
75
- onOpenChange: d,
77
+ open: e,
78
+ onOpenChange: C,
76
79
  modal: !1,
77
- ...f,
78
- children: i
80
+ ...u,
81
+ children: n
79
82
  }
80
83
  )
81
84
  }
82
- );
85
+ ) });
83
86
  }
84
87
  );
85
- o.displayName = T;
88
+ o.displayName = E;
86
89
  o.Root = o;
87
- o.SubRoot = z;
88
- o.Trigger = L;
89
- o.Content = D;
90
- o.Portal = E;
91
- o.Sub = N;
92
- o.SubTrigger = w;
93
- o.SubContent = G;
94
- o.Arrow = H;
95
- o.Item = P;
96
- o.ItemRightSlot = _;
97
- o.Group = k;
98
- o.Label = Y;
99
- o.CheckboxItem = j;
100
- o.RadioGroup = K;
101
- o.RadioItem = U;
102
- o.ItemIndicator = B;
103
- o.Separator = V;
104
- o.ItemIcon = q;
90
+ o.SubRoot = Q;
91
+ o.Trigger = P;
92
+ o.Content = N;
93
+ o.Portal = w;
94
+ o.Sub = G;
95
+ o.SubTrigger = H;
96
+ o.SubContent = _;
97
+ o.Arrow = k;
98
+ o.Item = Y;
99
+ o.ItemRightSlot = j;
100
+ o.Group = B;
101
+ o.Label = K;
102
+ o.CheckboxItem = U;
103
+ o.RadioGroup = q;
104
+ o.RadioItem = z;
105
+ o.ItemIndicator = V;
106
+ o.Separator = F;
107
+ o.ItemIcon = J;
105
108
  export {
106
109
  o as ContextMenu
107
110
  };
@@ -5,6 +5,10 @@ export type ContextMenuRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenChang
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
  *
@@ -105,5 +109,15 @@ export interface ContextMenuContextProps {
105
109
  * The callback function to be called when the menu is opened by keyboard.
106
110
  */
107
111
  onOpenByKeyboard: (value: boolean) => void;
112
+ /**
113
+ * Whether the menu is open.
114
+ */
115
+ isOpen: boolean;
116
+ }
117
+ export interface ContextMenuRootContextProps {
118
+ /**
119
+ * The callback function to be called when the menu is opened by child click.
120
+ */
121
+ onChildClickOpen: (value: boolean) => void;
108
122
  }
109
123
  //# sourceMappingURL=ContextMenu.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.props.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,0BAA0B,EAC1B,cAAc,GAAG,OAAO,CACzB,GAAG;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;;;;OAKG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC;;;OAGG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,oBAAoB,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C"}
1
+ {"version":3,"file":"ContextMenu.props.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,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;;;;;OAKG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAC1B;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC;;;OAGG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,oBAAoB,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C"}
@@ -5,7 +5,7 @@ import { c as P } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { useLevelContext as R } from "../../providers/LevelProvider/LevelProvider.js";
6
6
  import { useContextMenuContext as W } from "../../ContextMenu.context.js";
7
7
  import { hasItemIcon as Y } from "../../utils/hasItemIcon/hasItemIcon.js";
8
- import "../../../../useContentPositioning-DO7ZotnD.mjs";
8
+ import "../../../../useContentPositioning-DAKfbddS.mjs";
9
9
  import "../Content/Content.utils.js";
10
10
  import { useContextMenuItemFocus as q } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
11
  import '../../../../assets/CheckboxItem.css';const z = "_checkbox_item_j9dmr_1", D = {
@@ -1 +1 @@
1
- {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoGnB,CAAC"}
1
+ {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Content/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0BpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAuGnB,CAAC"}
@@ -7,7 +7,7 @@ import "../../../../lib/utils.js";
7
7
  import "../../providers/LevelProvider/LevelProvider.js";
8
8
  import "../../ContextMenu.context.js";
9
9
  import "../../ContextMenu.enums.js";
10
- import { C as b } from "../../../../useContentPositioning-DO7ZotnD.mjs";
10
+ import { C as b } from "../../../../useContentPositioning-DAKfbddS.mjs";
11
11
  import "./Content.enums.js";
12
12
  import "./Content.utils.js";
13
13
  export {
@@ -1,4 +1,4 @@
1
- import { C as e } from "../../../../useContentPositioning-DO7ZotnD.mjs";
1
+ import { C as e } from "../../../../useContentPositioning-DAKfbddS.mjs";
2
2
  import { Direction as i } from "./Content.enums.js";
3
3
  import { directionToSide as f } from "./Content.utils.js";
4
4
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnE,eAAO,MAAM,IAAI,wKAgJf,CAAC"}
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnE,eAAO,MAAM,IAAI,wKAwJf,CAAC"}
@@ -1,114 +1,118 @@
1
- import { jsx as b } from "react/jsx-runtime";
2
- import { forwardRef as K, useMemo as N, useId as W, useState as v, useRef as Y, useEffect as G } from "react";
3
- import { I as J } from "../../../../index-BA3njR2k.mjs";
4
- import { c as y } from "../../../../index-L8X2o7IH.mjs";
5
- import { mergeRefs as Q } from "../../../../lib/utils.js";
6
- import { useLevelContext as T } from "../../providers/LevelProvider/LevelProvider.js";
7
- import { useContextMenuContext as U } from "../../ContextMenu.context.js";
8
- import { hasItemIcon as k } from "../../utils/hasItemIcon/hasItemIcon.js";
9
- import "../../../../useContentPositioning-DO7ZotnD.mjs";
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as W, useMemo as y, useId as Y, useState as k, useRef as G, useEffect as J } from "react";
3
+ import { I as Q } from "../../../../index-BA3njR2k.mjs";
4
+ import { c as D } from "../../../../index-L8X2o7IH.mjs";
5
+ import { mergeRefs as T } from "../../../../lib/utils.js";
6
+ import { useLevelContext as U } from "../../providers/LevelProvider/LevelProvider.js";
7
+ import { useContextMenuContext as V } from "../../ContextMenu.context.js";
8
+ import { hasItemIcon as R } from "../../utils/hasItemIcon/hasItemIcon.js";
9
+ import "../../../../useContentPositioning-DAKfbddS.mjs";
10
10
  import "../Content/Content.utils.js";
11
- import { useContextMenuItemFocus as V } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
12
- import { ContextMenuItemProvider as X } from "./Item.context.js";
13
- import '../../../../assets/Item2.css';const Z = "_item_zkanf_1", R = {
14
- item: Z
15
- }, s = "ContextMenu.Item", $ = K((t, p) => {
16
- const { hasItemWithIcon: x } = T(s);
11
+ import { useContextMenuItemFocus as X } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
12
+ import { ContextMenuItemProvider as Z } from "./Item.context.js";
13
+ import '../../../../assets/Item2.css';const $ = "_item_zkanf_1", F = {
14
+ item: $
15
+ }, s = "ContextMenu.Item", ee = W((t, x) => {
16
+ const { hasItemWithIcon: C } = U(s);
17
17
  if ("isSelectable" in t && t.isSelectable === !1) {
18
18
  const {
19
19
  className: e,
20
- children: I,
21
- isSelectable: j,
22
- hasIconCheckFn: q = k,
23
- ...z
24
- } = t, B = N(() => q(I), [I]);
25
- return /* @__PURE__ */ b(
20
+ children: b,
21
+ isSelectable: q,
22
+ hasIconCheckFn: z = R,
23
+ ...B
24
+ } = t, K = y(() => z(b), [b]);
25
+ return /* @__PURE__ */ p(
26
26
  "div",
27
27
  {
28
- ref: p,
29
- className: y(R.item, e),
30
- "data-not-selectable": !j,
31
- "data-no-icon-align": B || !x ? "" : void 0,
32
- ...z,
33
- children: I
28
+ ref: x,
29
+ className: D(F.item, e),
30
+ "data-not-selectable": !q,
31
+ "data-no-icon-align": K || !C ? "" : void 0,
32
+ ...B,
33
+ children: b
34
34
  }
35
35
  );
36
36
  }
37
37
  const {
38
- className: D,
38
+ className: _,
39
39
  children: a,
40
- isDisabled: C,
41
- isDanger: F,
42
- hasIconCheckFn: _ = k,
40
+ isDisabled: M,
41
+ isDanger: w,
42
+ hasIconCheckFn: A = R,
43
43
  onSelect: i,
44
- onFocus: r,
45
- onMouseEnter: c,
46
- onBlur: m,
47
- onMouseLeave: u,
48
- onKeyDown: l,
49
- ...w
50
- } = t, A = W(), [M, S] = v(!1), [o, E] = v(!1), n = Y(null), H = N(() => _(a), [a]), { closeMenuImmediately: L } = U(s), {
51
- dataHighlighted: O,
52
- onFocus: d,
53
- onMouseEnter: f,
54
- onBlur: h,
55
- onMouseLeave: g
56
- } = V({
44
+ onClick: r,
45
+ onFocus: c,
46
+ onMouseEnter: m,
47
+ onBlur: u,
48
+ onMouseLeave: l,
49
+ onKeyDown: d,
50
+ ...E
51
+ } = t, H = Y(), [S, v] = k(!1), [o, L] = k(!1), n = G(null), O = y(() => A(a), [a]), { closeMenuImmediately: N } = V(s), {
52
+ dataHighlighted: P,
53
+ onFocus: f,
54
+ onMouseEnter: h,
55
+ onBlur: g,
56
+ onMouseLeave: I
57
+ } = X({
57
58
  displayName: s,
58
- id: A,
59
- isDisabled: C,
59
+ id: H,
60
+ isDisabled: M,
60
61
  hasSubmenu: o
61
62
  });
62
- G(() => {
63
+ J(() => {
63
64
  if (!n.current)
64
65
  return;
65
66
  const e = n.current.querySelector("[data-submenu-trigger]");
66
- E(!!e);
67
+ L(!!e);
67
68
  }, [n]);
68
- const P = (e) => {
69
- o && e.key === "ArrowRight" && S(!0), l == null || l(e);
69
+ const j = (e) => {
70
+ o && e.key === "ArrowRight" && v(!0), d == null || d(e);
70
71
  };
71
- return /* @__PURE__ */ b(
72
- X,
72
+ return /* @__PURE__ */ p(
73
+ Z,
73
74
  {
74
75
  hasSubmenu: o,
75
- subMenuOpen: M,
76
- setSubMenuOpen: S,
77
- children: /* @__PURE__ */ b(
78
- J,
76
+ subMenuOpen: S,
77
+ setSubMenuOpen: v,
78
+ children: /* @__PURE__ */ p(
79
+ Q,
79
80
  {
80
- ref: Q(p, n),
81
- className: y(R.item, D),
82
- disabled: C,
81
+ ref: T(x, n),
82
+ className: D(F.item, _),
83
+ disabled: M,
83
84
  "data-item": !0,
84
- "data-danger": F ? "" : void 0,
85
- "data-no-icon-align": H || !x ? "" : void 0,
85
+ "data-danger": w ? "" : void 0,
86
+ "data-no-icon-align": O || !C ? "" : void 0,
86
87
  "data-has-submenu": o ? "" : void 0,
87
88
  onSelect: (e) => {
88
- i == null || i(e), L(!0);
89
+ i == null || i(e), N(!0);
89
90
  },
90
- "data-highlighted": M || O,
91
+ onClick: (e) => {
92
+ e.preventDefault(), r == null || r(e), N(!0);
93
+ },
94
+ "data-highlighted": S || P,
91
95
  onFocus: (e) => {
92
- d == null || d(), r == null || r(e);
96
+ f == null || f(), c == null || c(e);
93
97
  },
94
98
  onMouseEnter: (e) => {
95
- f == null || f(e), c == null || c(e);
99
+ h == null || h(e), m == null || m(e);
96
100
  },
97
101
  onBlur: (e) => {
98
- h == null || h(), m == null || m(e);
102
+ g == null || g(), u == null || u(e);
99
103
  },
100
104
  onMouseLeave: (e) => {
101
- g == null || g(e), u == null || u(e);
105
+ I == null || I(e), l == null || l(e);
102
106
  },
103
- onKeyDown: P,
104
- ...w,
107
+ onKeyDown: j,
108
+ ...E,
105
109
  children: a
106
110
  }
107
111
  )
108
112
  }
109
113
  );
110
114
  });
111
- $.displayName = s;
115
+ ee.displayName = s;
112
116
  export {
113
- $ as Item
117
+ ee as Item
114
118
  };
@@ -5,7 +5,7 @@ import { c as P } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { useLevelContext as W } from "../../providers/LevelProvider/LevelProvider.js";
6
6
  import { useContextMenuContext as Y } from "../../ContextMenu.context.js";
7
7
  import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
8
- import "../../../../useContentPositioning-DO7ZotnD.mjs";
8
+ import "../../../../useContentPositioning-DAKfbddS.mjs";
9
9
  import "../Content/Content.utils.js";
10
10
  import { useContextMenuItemFocus as k } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
11
  import '../../../../assets/RadioItem.css';const q = "_radio_item_14d4r_1", z = {
@@ -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-DO7ZotnD.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";
@@ -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"}