@kommo-crm/crm-react-ui-kit 1.1.1-beta.1 → 1.1.1-beta.4

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 (43) hide show
  1. package/dist/assets/ItemRightSlot.css +1 -1
  2. package/dist/components/ContextMenu/ContextMenu.js +1 -1
  3. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
  4. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +64 -43
  5. package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
  6. package/dist/components/ContextMenu/components/Content/Content.js +1 -1
  7. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  8. package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
  9. package/dist/components/ContextMenu/components/Item/Item.js +77 -58
  10. package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js +44 -21
  12. package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
  13. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +60 -33
  14. package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
  15. package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts.map +1 -1
  16. package/dist/components/ContextMenu/components/SubContent/SubContent.js +64 -52
  17. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +1 -1
  18. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.d.ts.map +1 -1
  19. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +83 -74
  20. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts.map +1 -1
  21. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +58 -36
  22. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts.map +1 -1
  23. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +82 -60
  24. package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts.map +1 -1
  25. package/dist/components/ContextMenu/components/Trigger/Trigger.js +40 -22
  26. package/dist/components/ContextMenu/hooks/index.js +1 -1
  27. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.d.ts.map +1 -1
  28. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  29. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  30. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +57 -57
  31. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
  32. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +40 -40
  34. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.d.ts +11 -10
  35. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.d.ts.map +1 -1
  36. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.js +17 -15
  37. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.d.ts +3 -0
  38. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.d.ts.map +1 -0
  39. package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.js +1 -0
  40. package/dist/components/ContextMenu/index.js +1 -1
  41. package/dist/useContentPositioning-BLCC-Xty.mjs +213 -0
  42. package/package.json +2 -2
  43. package/dist/useContentPositioning-27D32n5u.mjs +0 -185
@@ -1 +1 @@
1
- ._right_slot_1wtgk_1{display:flex;align-items:center;margin-left:auto;padding-left:16px;gap:8px}._right_slot_1wtgk_1[data-submenu-right-slot]{padding-left:0}
1
+ ._rightSlot_13wq6_1{display:flex;align-items:center;margin-left:auto;padding-left:16px;gap:8px}._rightSlot_13wq6_1[data-submenu-right-slot]{padding-left:0}
@@ -3,7 +3,7 @@ import { forwardRef as M, useImperativeHandle as y } from "react";
3
3
  import { R as v } from "../../index-BA3njR2k.mjs";
4
4
  import { useContextMenu as x } from "./hooks/useContextMenu/useContextMenu.js";
5
5
  import "./providers/LevelProvider/LevelProvider.js";
6
- import { C as D } from "../../useContentPositioning-27D32n5u.mjs";
6
+ import { C as D } from "../../useContentPositioning-BLCC-Xty.mjs";
7
7
  import "./components/Content/Content.utils.js";
8
8
  import { ContextMenuProvider as O, DISPLAY_NAME as T } from "./ContextMenu.context.js";
9
9
  import { Trigger as L } from "./components/Trigger/Trigger.js";
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/CheckboxItem/CheckboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAJM,WAAW;;;sCAmBd,SAAQ;wCAyCnC,CAAC"}
1
+ {"version":3,"file":"CheckboxItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/CheckboxItem/CheckboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAJM,WAAW;;;sCAkBpC,SACN;wCAuEC,CAAC"}
@@ -1,57 +1,78 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import { forwardRef as b, useId as M, useMemo as _ } from "react";
3
- import { d as g } from "../../../../index-BA3njR2k.mjs";
4
- import { c as v } from "../../../../index-L8X2o7IH.mjs";
5
- import { useLevelContext as N } from "../../providers/LevelProvider/LevelProvider.js";
6
- import { useContextMenuContext as y } from "../../ContextMenu.context.js";
7
- import { hasItemIcon as L } from "../../utils/hasItemIcon/hasItemIcon.js";
8
- import "../../../../useContentPositioning-27D32n5u.mjs";
1
+ import { jsx as j } from "react/jsx-runtime";
2
+ import { forwardRef as q, useId as u, useMemo as v } from "react";
3
+ import { d as w } from "../../../../index-BA3njR2k.mjs";
4
+ import { c as H } from "../../../../index-L8X2o7IH.mjs";
5
+ import { useLevelContext as P } from "../../providers/LevelProvider/LevelProvider.js";
6
+ import { useContextMenuContext as R } from "../../ContextMenu.context.js";
7
+ import { hasItemIcon as W } from "../../utils/hasItemIcon/hasItemIcon.js";
8
+ import "../../../../useContentPositioning-BLCC-Xty.mjs";
9
9
  import "../Content/Content.utils.js";
10
- import { useContextMenuItemFocus as A } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
- import '../../../../assets/CheckboxItem.css';const E = "_checkbox_item_16brq_1", F = {
12
- checkbox_item: E
13
- }, e = "ContextMenu.CheckboxItem", S = b(
10
+ import { useContextMenuItemFocus as Y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
+ import '../../../../assets/CheckboxItem.css';const z = "_checkbox_item_16brq_1", D = {
12
+ checkbox_item: z
13
+ }, m = "ContextMenu.CheckboxItem", G = q(
14
14
  ({
15
- className: c,
15
+ className: k,
16
16
  children: o,
17
- onChange: t,
18
- isDisabled: m,
19
- isChecked: n,
20
- hasIconCheckFn: s = L,
21
- ...r
22
- }, i) => {
23
- const a = M(), { hasItemWithIcon: u } = N(e), { closeMenuImmediately: h } = y(e), { dataHighlighted: d, onFocus: x, onMouseEnter: p, onBlur: I, onMouseLeave: f } = A({
24
- displayName: e,
25
- id: a,
26
- isDisabled: m
27
- }), k = _(() => s(o), [o]);
28
- return /* @__PURE__ */ C(
29
- g,
17
+ onChange: d,
18
+ isDisabled: f,
19
+ isChecked: C,
20
+ hasIconCheckFn: b = W,
21
+ onFocus: c,
22
+ onMouseEnter: i,
23
+ onBlur: e,
24
+ onMouseLeave: r,
25
+ onSelect: s,
26
+ ...n
27
+ }, I) => {
28
+ const _ = u(), { hasItemWithIcon: g } = P(m), { closeMenuImmediately: N } = R(m), {
29
+ dataHighlighted: y,
30
+ onFocus: a,
31
+ onMouseEnter: x,
32
+ onBlur: p,
33
+ onMouseLeave: h
34
+ } = Y({
35
+ displayName: m,
36
+ id: _,
37
+ isDisabled: f
38
+ }), A = v(() => b(o), [o]);
39
+ return /* @__PURE__ */ j(
40
+ w,
30
41
  {
31
- ref: i,
32
- className: v(F.checkbox_item, c),
33
- disabled: m,
34
- checked: n,
42
+ ref: I,
43
+ className: H(D.checkbox_item, k),
44
+ disabled: f,
45
+ checked: C,
35
46
  "data-item": !0,
36
- "data-no-icon-align": k || !u ? "" : void 0,
37
- onCheckedChange: (l) => {
38
- t && t({
39
- target: { checked: l }
47
+ "data-no-icon-align": A || !g ? "" : void 0,
48
+ onCheckedChange: (t) => {
49
+ d && d({
50
+ target: { checked: t }
40
51
  });
41
52
  },
42
- onSelect: () => h(!0),
43
- "data-highlighted": d,
44
- onFocus: x,
45
- onMouseEnter: p,
46
- onBlur: I,
47
- onMouseLeave: f,
48
- ...r,
53
+ "data-highlighted": y,
54
+ onSelect: (t) => {
55
+ N(!0), s == null || s(t);
56
+ },
57
+ onFocus: (t) => {
58
+ a == null || a(), c == null || c(t);
59
+ },
60
+ onMouseEnter: (t) => {
61
+ x == null || x(t), i == null || i(t);
62
+ },
63
+ onBlur: (t) => {
64
+ p == null || p(), e == null || e(t);
65
+ },
66
+ onMouseLeave: (t) => {
67
+ h == null || h(t), r == null || r(t);
68
+ },
69
+ ...n,
49
70
  children: o
50
71
  }
51
72
  );
52
73
  }
53
74
  );
54
- S.displayName = e;
75
+ G.displayName = m;
55
76
  export {
56
- S as CheckboxItem
77
+ G as CheckboxItem
57
78
  };
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0FnB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAoGnB,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-27D32n5u.mjs";
10
+ import { C as b } from "../../../../useContentPositioning-BLCC-Xty.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-27D32n5u.mjs";
1
+ import { C as e } from "../../../../useContentPositioning-BLCC-Xty.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,wKAoHf,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,wKAgJf,CAAC"}
@@ -1,95 +1,114 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { forwardRef as K, useMemo as f, useId as O, useState as I, useRef as P, useEffect as j } from "react";
3
- import { I as q } from "../../../../index-BA3njR2k.mjs";
4
- import { c as g } from "../../../../index-L8X2o7IH.mjs";
5
- import { mergeRefs as W } from "../../../../lib/utils.js";
6
- import { useLevelContext as Y } from "../../providers/LevelProvider/LevelProvider.js";
7
- import { useContextMenuContext as z } from "../../ContextMenu.context.js";
8
- import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
9
- import "../../../../useContentPositioning-27D32n5u.mjs";
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as W, useMemo as N, useId as Y, useState as v, useRef as z, 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-BLCC-Xty.mjs";
10
10
  import "../Content/Content.utils.js";
11
- import { useContextMenuItemFocus as G } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
12
- import { ContextMenuItemProvider as J } from "./Item.context.js";
13
- import '../../../../assets/Item2.css';const Q = "_item_128tk_1", p = {
14
- item: Q
15
- }, s = "ContextMenu.Item", T = K((t, m) => {
16
- const { hasItemWithIcon: u } = Y(s);
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_128tk_1", R = {
14
+ item: Z
15
+ }, s = "ContextMenu.Item", $ = W((t, p) => {
16
+ const { hasItemWithIcon: x } = T(s);
17
17
  if ("isSelectable" in t && t.isSelectable === !1) {
18
18
  const {
19
19
  className: e,
20
- children: r,
21
- isSelectable: E,
22
- hasIconCheckFn: L = b,
20
+ children: I,
21
+ isSelectable: j,
22
+ hasIconCheckFn: q = k,
23
23
  ...B
24
- } = t, H = f(() => L(r), [r]);
25
- return /* @__PURE__ */ c(
24
+ } = t, K = N(() => q(I), [I]);
25
+ return /* @__PURE__ */ b(
26
26
  "div",
27
27
  {
28
- ref: m,
29
- className: g(p.item, e),
30
- "data-not-selectable": !E,
31
- "data-no-icon-align": H || !u ? "" : void 0,
28
+ ref: p,
29
+ className: y(R.item, e),
30
+ "data-not-selectable": !j,
31
+ "data-no-icon-align": K || !x ? "" : void 0,
32
32
  ...B,
33
- children: r
33
+ children: I
34
34
  }
35
35
  );
36
36
  }
37
37
  const {
38
- className: M,
38
+ className: D,
39
39
  children: a,
40
- isDisabled: l,
41
- isDanger: x,
42
- hasIconCheckFn: C = b,
40
+ isDisabled: C,
41
+ isDanger: F,
42
+ hasIconCheckFn: _ = k,
43
43
  onSelect: i,
44
- ...S
45
- } = t, v = O(), [d, h] = I(!1), [o, N] = I(!1), n = P(null), y = f(() => C(a), [a]), { closeMenuImmediately: k } = z(s), { dataHighlighted: D, onFocus: F, onMouseEnter: R, onBlur: w, onMouseLeave: _ } = G({
44
+ onFocus: r,
45
+ onMouseEnter: c,
46
+ onBlur: m,
47
+ onMouseLeave: u,
48
+ onKeyDown: l,
49
+ ...w
50
+ } = t, A = Y(), [M, S] = v(!1), [o, E] = v(!1), n = z(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({
46
57
  displayName: s,
47
- id: v,
48
- isDisabled: l,
58
+ id: A,
59
+ isDisabled: C,
49
60
  hasSubmenu: o
50
61
  });
51
- j(() => {
62
+ G(() => {
52
63
  if (!n.current)
53
64
  return;
54
65
  const e = n.current.querySelector("[data-submenu-trigger]");
55
- N(!!e);
66
+ E(!!e);
56
67
  }, [n]);
57
- const A = (e) => {
58
- o && e.key === "ArrowRight" && h(!0);
68
+ const P = (e) => {
69
+ o && e.key === "ArrowRight" && S(!0), l == null || l(e);
59
70
  };
60
- return /* @__PURE__ */ c(
61
- J,
71
+ return /* @__PURE__ */ b(
72
+ X,
62
73
  {
63
74
  hasSubmenu: o,
64
- subMenuOpen: d,
65
- setSubMenuOpen: h,
66
- children: /* @__PURE__ */ c(
67
- q,
75
+ subMenuOpen: M,
76
+ setSubMenuOpen: S,
77
+ children: /* @__PURE__ */ b(
78
+ J,
68
79
  {
69
- ref: W(m, n),
70
- className: g(p.item, M),
71
- disabled: l,
80
+ ref: Q(p, n),
81
+ className: y(R.item, D),
82
+ disabled: C,
72
83
  "data-item": !0,
73
- "data-danger": x ? "" : void 0,
74
- "data-no-icon-align": y || !u ? "" : void 0,
84
+ "data-danger": F ? "" : void 0,
85
+ "data-no-icon-align": H || !x ? "" : void 0,
75
86
  "data-has-submenu": o ? "" : void 0,
76
87
  onSelect: (e) => {
77
- i == null || i(e), k(!0);
88
+ i == null || i(e), L(!0);
78
89
  },
79
- "data-highlighted": d || D,
80
- onFocus: F,
81
- onMouseEnter: R,
82
- onBlur: w,
83
- onMouseLeave: _,
84
- onKeyDown: A,
85
- ...S,
90
+ "data-highlighted": M || O,
91
+ onFocus: (e) => {
92
+ d == null || d(), r == null || r(e);
93
+ },
94
+ onMouseEnter: (e) => {
95
+ f == null || f(e), c == null || c(e);
96
+ },
97
+ onBlur: (e) => {
98
+ h == null || h(), m == null || m(e);
99
+ },
100
+ onMouseLeave: (e) => {
101
+ g == null || g(e), u == null || u(e);
102
+ },
103
+ onKeyDown: P,
104
+ ...w,
86
105
  children: a
87
106
  }
88
107
  )
89
108
  }
90
109
  );
91
110
  });
92
- T.displayName = s;
111
+ $.displayName = s;
93
112
  export {
94
- T as Item
113
+ $ as Item
95
114
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ItemRightSlot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,eAAO,MAAM,aAAa,2FA8BzB,CAAC"}
1
+ {"version":3,"file":"ItemRightSlot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE,eAAO,MAAM,aAAa,2FA0DzB,CAAC"}
@@ -1,34 +1,57 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as a, useRef as g, useState as l, useEffect as p } from "react";
3
- import { c as S } from "../../../../index-L8X2o7IH.mjs";
4
- import { mergeRefs as _ } from "../../../../lib/utils.js";
5
- import { useStopContextMenuEvents as h } from "../../hooks/useStopContextMenuEvents/useStopContextMenuEvents.js";
6
- import '../../../../assets/ItemRightSlot.css';const R = "_right_slot_1wtgk_1", d = {
7
- right_slot: R
8
- }, v = "ContextMenu.ItemRightSlot", x = a(
9
- ({ className: s, children: e, ...r }, n) => {
10
- const t = g(null), [o, u] = l(!1);
11
- p(() => {
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as v, useRef as E, useState as _, useEffect as H } from "react";
3
+ import { c as I } from "../../../../index-L8X2o7IH.mjs";
4
+ import { mergeRefs as M } from "../../../../lib/utils.js";
5
+ import { useStopContextMenuEvents as N } from "../../hooks/useStopContextMenuEvents/useStopContextMenuEvents.js";
6
+ import '../../../../assets/ItemRightSlot.css';const q = "_rightSlot_13wq6_1", w = {
7
+ rightSlot: q
8
+ }, y = "ContextMenu.ItemRightSlot", A = v(
9
+ ({
10
+ className: s,
11
+ children: e,
12
+ onClick: n,
13
+ onKeyDown: u,
14
+ onKeyUp: m,
15
+ onKeyPress: a,
16
+ onPointerDown: i,
17
+ onPointerUp: c,
18
+ onPointerEnter: f,
19
+ onPointerLeave: l,
20
+ onPointerMove: g,
21
+ ...S
22
+ }, p) => {
23
+ const t = E(null), [o, d] = _(!1);
24
+ H(() => {
12
25
  if (!t.current)
13
26
  return;
14
- const c = t.current.querySelector("[data-submenu-trigger]");
15
- u(!!c);
27
+ const x = t.current.querySelector("[data-submenu-trigger]");
28
+ d(!!x);
16
29
  }, [e]);
17
- const m = h(), i = o ? m : {};
18
- return /* @__PURE__ */ f(
30
+ const r = {
31
+ onClick: n,
32
+ onKeyDown: u,
33
+ onKeyUp: m,
34
+ onKeyPress: a,
35
+ onPointerDown: i,
36
+ onPointerUp: c,
37
+ onPointerEnter: f,
38
+ onPointerLeave: l,
39
+ onPointerMove: g
40
+ }, h = N(r), R = o ? h : r;
41
+ return /* @__PURE__ */ b(
19
42
  "div",
20
43
  {
21
- ref: _(t, n),
22
- className: S(d.right_slot, s),
44
+ ref: M(t, p),
45
+ className: I(w.rightSlot, s),
23
46
  "data-submenu-right-slot": o ? "" : void 0,
24
- ...i,
25
- ...r,
47
+ ...R,
48
+ ...S,
26
49
  children: e
27
50
  }
28
51
  );
29
52
  }
30
53
  );
31
- x.displayName = v;
54
+ A.displayName = y;
32
55
  export {
33
- x as ItemRightSlot
56
+ A as ItemRightSlot
34
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAFqB,SAEtC;wCAsCJ,CAAC"}
1
+ {"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAFqB,SAEtC;wCA0EJ,CAAC"}
@@ -1,43 +1,70 @@
1
- import { jsx as x } from "react/jsx-runtime";
2
- import { forwardRef as M, useId as _, useMemo as h } from "react";
3
- import { f as g } from "../../../../index-BA3njR2k.mjs";
4
- import { c as C } from "../../../../index-L8X2o7IH.mjs";
5
- import { useLevelContext as N } from "../../providers/LevelProvider/LevelProvider.js";
6
- import { useContextMenuContext as R } from "../../ContextMenu.context.js";
7
- import { hasItemIcon as v } from "../../utils/hasItemIcon/hasItemIcon.js";
8
- import "../../../../useContentPositioning-27D32n5u.mjs";
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { forwardRef as j, useId as k, useMemo as u } from "react";
3
+ import { f as w } from "../../../../index-BA3njR2k.mjs";
4
+ import { c as z } from "../../../../index-L8X2o7IH.mjs";
5
+ import { useLevelContext as H } from "../../providers/LevelProvider/LevelProvider.js";
6
+ import { useContextMenuContext as P } from "../../ContextMenu.context.js";
7
+ import { hasItemIcon as W } from "../../utils/hasItemIcon/hasItemIcon.js";
8
+ import "../../../../useContentPositioning-BLCC-Xty.mjs";
9
9
  import "../Content/Content.utils.js";
10
- import { useContextMenuItemFocus as y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
- import '../../../../assets/RadioItem.css';const L = "_radio_item_zek17_1", A = {
12
- radio_item: L
13
- }, o = "ContextMenu.RadioItem", E = M(
14
- ({ className: m, children: t, isDisabled: e, hasIconCheckFn: i = v, ...a }, n) => {
15
- const r = _(), { hasItemWithIcon: s } = N(o), { closeMenuImmediately: d } = R(o), { dataHighlighted: c, onFocus: u, onMouseEnter: p, onBlur: I, onMouseLeave: f } = y({
16
- displayName: o,
17
- id: r,
18
- isDisabled: e
19
- }), l = h(() => i(t), [t]);
20
- return /* @__PURE__ */ x(
21
- g,
10
+ import { useContextMenuItemFocus as Y } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
+ import '../../../../assets/RadioItem.css';const b = "_radio_item_zek17_1", q = {
12
+ radio_item: b
13
+ }, i = "ContextMenu.RadioItem", D = j(
14
+ ({
15
+ className: I,
16
+ children: m,
17
+ isDisabled: x,
18
+ hasIconCheckFn: _ = W,
19
+ onFocus: o,
20
+ onMouseEnter: a,
21
+ onBlur: r,
22
+ onMouseLeave: s,
23
+ onSelect: d,
24
+ ...g
25
+ }, n) => {
26
+ const C = k(), { hasItemWithIcon: N } = H(i), { closeMenuImmediately: R } = P(i), {
27
+ dataHighlighted: h,
28
+ onFocus: p,
29
+ onMouseEnter: f,
30
+ onBlur: c,
31
+ onMouseLeave: e
32
+ } = Y({
33
+ displayName: i,
34
+ id: C,
35
+ isDisabled: x
36
+ }), y = u(() => _(m), [m]);
37
+ return /* @__PURE__ */ A(
38
+ w,
22
39
  {
23
40
  ref: n,
24
- className: C(A.radio_item, m),
25
- disabled: e,
41
+ className: z(q.radio_item, I),
42
+ disabled: x,
26
43
  "data-item": !0,
27
- "data-no-icon-align": l || !s ? "" : void 0,
28
- onSelect: () => d(!0),
29
- "data-highlighted": c,
30
- onFocus: u,
31
- onMouseEnter: p,
32
- onBlur: I,
33
- onMouseLeave: f,
34
- ...a,
35
- children: t
44
+ "data-no-icon-align": y || !N ? "" : void 0,
45
+ "data-highlighted": h,
46
+ onSelect: (t) => {
47
+ R(!0), d == null || d(t);
48
+ },
49
+ onFocus: (t) => {
50
+ p == null || p(), o == null || o(t);
51
+ },
52
+ onMouseEnter: (t) => {
53
+ f == null || f(t), a == null || a(t);
54
+ },
55
+ onBlur: (t) => {
56
+ c == null || c(), r == null || r(t);
57
+ },
58
+ onMouseLeave: (t) => {
59
+ e == null || e(t), s == null || s(t);
60
+ },
61
+ ...g,
62
+ children: m
36
63
  }
37
64
  );
38
65
  }
39
66
  );
40
- E.displayName = o;
67
+ D.displayName = i;
41
68
  export {
42
- E as RadioItem
69
+ D as RadioItem
43
70
  };
@@ -3,7 +3,7 @@ import { S as b } from "../../../../index-BA3njR2k.mjs";
3
3
  import "react";
4
4
  import { ContextMenuMode as l } from "../../ContextMenu.enums.js";
5
5
  import "../../providers/LevelProvider/LevelProvider.js";
6
- import "../../../../useContentPositioning-27D32n5u.mjs";
6
+ import "../../../../useContentPositioning-BLCC-Xty.mjs";
7
7
  import "../Content/Content.utils.js";
8
8
  import { useContextMenuSub as x } from "../../hooks/useContextMenuSub/useContextMenuSub.js";
9
9
  import { ContextMenuSubProvider as C, DISPLAY_NAME as t } from "./Sub.context.js";
@@ -1 +1 @@
1
- {"version":3,"file":"SubContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubContent/SubContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAiBrE,eAAO,MAAM,UAAU,+LAoFtB,CAAC"}
1
+ {"version":3,"file":"SubContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubContent/SubContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAiBrE,eAAO,MAAM,UAAU,+LAoGtB,CAAC"}