@kommo-crm/crm-react-ui-kit 1.1.1-beta.7 → 1.1.1-beta.9

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 (65) hide show
  1. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  2. package/dist/components/ContextMenu/ContextMenu.js +84 -75
  3. package/dist/components/ContextMenu/ContextMenu.props.d.ts +8 -0
  4. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  5. package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
  6. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +3 -1
  7. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
  8. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +61 -55
  9. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts +6 -2
  10. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/components/Content/Content.js +2 -2
  12. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  13. package/dist/components/ContextMenu/components/Group/Group.js +1 -1
  14. package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
  15. package/dist/components/ContextMenu/components/Item/Item.js +69 -68
  16. package/dist/components/ContextMenu/components/Item/Item.props.d.ts +6 -0
  17. package/dist/components/ContextMenu/components/Item/Item.props.d.ts.map +1 -1
  18. package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
  19. package/dist/components/ContextMenu/components/Label/Label.js +1 -1
  20. package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
  21. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.d.ts +5 -0
  22. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.d.ts.map +1 -0
  23. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.js +7 -0
  24. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  25. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +21 -11
  26. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.d.ts +8 -0
  27. package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.d.ts.map +1 -1
  28. package/dist/components/ContextMenu/components/RadioGroup/index.d.ts +1 -0
  29. package/dist/components/ContextMenu/components/RadioGroup/index.d.ts.map +1 -1
  30. package/dist/components/ContextMenu/components/RadioGroup/index.js +6 -2
  31. package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -0
  32. package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +55 -46
  34. package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts +4 -0
  35. package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts.map +1 -1
  36. package/dist/components/ContextMenu/components/Separator/Separator.js +1 -1
  37. package/dist/components/ContextMenu/components/Sub/Sub.d.ts +5 -5
  38. package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
  39. package/dist/components/ContextMenu/components/Sub/Sub.js +53 -55
  40. package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts +7 -0
  41. package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts.map +1 -0
  42. package/dist/components/ContextMenu/components/Sub/Sub.types.js +1 -0
  43. package/dist/components/ContextMenu/components/Sub/index.d.ts +1 -0
  44. package/dist/components/ContextMenu/components/Sub/index.d.ts.map +1 -1
  45. package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts.map +1 -1
  46. package/dist/components/ContextMenu/components/SubContent/SubContent.js +26 -25
  47. package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
  48. package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +45 -43
  49. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +4 -0
  50. package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
  51. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
  52. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +2 -2
  53. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
  54. package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
  55. package/dist/components/ContextMenu/hooks/index.js +1 -1
  56. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  57. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +1 -1
  58. package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
  59. package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
  60. package/dist/components/ContextMenu/index.d.ts +1 -0
  61. package/dist/components/ContextMenu/index.d.ts.map +1 -1
  62. package/dist/components/ContextMenu/index.js +1 -1
  63. package/dist/{index-BA3njR2k.mjs → index-CYWNqEqR.mjs} +1 -1
  64. package/dist/{useContentPositioning-DAKfbddS.mjs → useContentPositioning-BLEFxO0N.mjs} +1 -1
  65. package/package.json +1 -1
@@ -1,62 +1,60 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { S as l } from "../../../../index-BA3njR2k.mjs";
3
- import "react";
4
- import { ContextMenuMode as x } from "../../ContextMenu.enums.js";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as b, useImperativeHandle as x } from "react";
3
+ import { S as C } from "../../../../index-CYWNqEqR.mjs";
4
+ import { ContextMenuMode as O } from "../../ContextMenu.enums.js";
5
5
  import "../../providers/LevelProvider/LevelProvider.js";
6
6
  import "../../ContextMenu.context.js";
7
- import "../../../../useContentPositioning-DAKfbddS.mjs";
7
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
8
8
  import "../Content/Content.utils.js";
9
- import { useContextMenuSub as C } from "../../hooks/useContextMenuSub/useContextMenuSub.js";
10
- import { ContextMenuSubProvider as O, DISPLAY_NAME as t } from "./Sub.context.js";
11
- const f = ({
12
- children: i,
13
- mode: e = x.HOVER,
14
- onOpen: m,
15
- defaultOpen: o,
16
- ...p
17
- }) => {
18
- const {
19
- open: n,
20
- setOpen: a,
21
- animatedOpen: s,
22
- startAnimation: u,
23
- handleMouseEnter: d,
24
- handleMouseLeave: M,
25
- handleOpenChange: h,
26
- triggerId: S,
27
- onOpenByKeyboard: b
28
- } = C({
29
- displayName: t,
30
- mode: e,
31
- defaultOpen: o,
32
- onOpen: m
33
- });
34
- return /* @__PURE__ */ r(
35
- O,
36
- {
9
+ import { useContextMenuSub as g } from "../../hooks/useContextMenuSub/useContextMenuSub.js";
10
+ import { ContextMenuSubProvider as v, DISPLAY_NAME as m } from "./Sub.context.js";
11
+ const y = b(
12
+ ({ children: a, mode: e = O.HOVER, onOpen: i, defaultOpen: o, ...p }, s) => {
13
+ const {
14
+ open: r,
15
+ setOpen: n,
16
+ animatedOpen: u,
17
+ startAnimation: d,
18
+ handleMouseEnter: M,
19
+ handleMouseLeave: f,
20
+ handleOpenChange: h,
21
+ triggerId: l,
22
+ onOpenByKeyboard: S
23
+ } = g({
24
+ displayName: m,
37
25
  mode: e,
38
- open: n,
39
- setOpen: a,
40
- animatedOpen: s,
41
26
  defaultOpen: o,
42
- startAnimation: u,
43
- onMouseEnter: d,
44
- onMouseLeave: M,
45
- onOpenByKeyboard: b,
46
- triggerId: S,
47
- children: /* @__PURE__ */ r(
48
- l,
49
- {
50
- open: n,
51
- onOpenChange: h,
52
- ...p,
53
- children: i
54
- }
55
- )
56
- }
57
- );
58
- };
59
- f.displayName = t;
27
+ onOpen: i
28
+ });
29
+ return x(s, () => ({
30
+ setOpen: n
31
+ })), /* @__PURE__ */ t(
32
+ v,
33
+ {
34
+ mode: e,
35
+ open: r,
36
+ setOpen: n,
37
+ animatedOpen: u,
38
+ defaultOpen: o,
39
+ startAnimation: d,
40
+ onMouseEnter: M,
41
+ onMouseLeave: f,
42
+ onOpenByKeyboard: S,
43
+ triggerId: l,
44
+ children: /* @__PURE__ */ t(
45
+ C,
46
+ {
47
+ open: r,
48
+ onOpenChange: h,
49
+ ...p,
50
+ children: a
51
+ }
52
+ )
53
+ }
54
+ );
55
+ }
56
+ );
57
+ y.displayName = m;
60
58
  export {
61
- f as Sub
59
+ y as Sub
62
60
  };
@@ -0,0 +1,7 @@
1
+ export type ContextMenuSubHandle = {
2
+ /**
3
+ * Sets the open state of the submenu.
4
+ */
5
+ setOpen: (value: boolean) => void;
6
+ };
7
+ //# sourceMappingURL=Sub.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sub.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/Sub.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { Sub } from './Sub';
2
2
  export { type SubProps } from './Sub.props';
3
+ export { type ContextMenuSubHandle } from './Sub.types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -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,+LAoGtB,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,+LAuGtB,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as c, useLayoutEffect as f } from "react";
3
- import { c as P } from "../../../../index-BA3njR2k.mjs";
4
- import { u as F, e as O, a as w } from "../../../../react-spring_web.modern-Dnq1lqN5.mjs";
5
- import { c as D } from "../../../../index-L8X2o7IH.mjs";
6
- import { LevelProvider as E } from "../../providers/LevelProvider/LevelProvider.js";
7
- import { useContextMenuSubContext as R } from "../Sub/Sub.context.js";
8
- import { useContextMenuContext as W } from "../../ContextMenu.context.js";
9
- import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q = {
10
- sub_content: j
11
- }, m = "ContextMenu.SubContent", z = N(
2
+ import { forwardRef as P, useState as c, useLayoutEffect as f } from "react";
3
+ import { c as F } from "../../../../index-CYWNqEqR.mjs";
4
+ import { u as O, e as w, a as D } from "../../../../react-spring_web.modern-Dnq1lqN5.mjs";
5
+ import { c as E } from "../../../../index-L8X2o7IH.mjs";
6
+ import { LevelProvider as R } from "../../providers/LevelProvider/LevelProvider.js";
7
+ import { useContextMenuSubContext as W } from "../Sub/Sub.context.js";
8
+ import { useContextMenuContext as j } from "../../ContextMenu.context.js";
9
+ import '../../../../assets/SubContent.css';const q = "_sub_content_y6v65_1", z = {
10
+ sub_content: q
11
+ }, m = "ContextMenu.SubContent", G = P(
12
12
  ({
13
13
  className: d,
14
14
  children: p,
@@ -23,8 +23,9 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
23
23
  startAnimation: A,
24
24
  onMouseEnter: o,
25
25
  onMouseLeave: s,
26
- defaultOpen: u
27
- } = R(m), { animationDuration: C } = W(m), [y, g] = c(!1), [h, a] = c(!1);
26
+ defaultOpen: u,
27
+ open: C
28
+ } = W(m), { animationDuration: y } = j(m), [g, h] = c(!1), [v, a] = c(!1);
28
29
  f(() => {
29
30
  A();
30
31
  }, []), f(() => {
@@ -35,24 +36,24 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
35
36
  t && cancelAnimationFrame(t);
36
37
  };
37
38
  }, [i]);
38
- const v = F({
39
- opacity: h && i || u !== void 0 ? 1 : 0,
40
- config: u === void 0 ? { duration: C, easing: O.easeInOutCubic } : { duration: 0 }
39
+ const N = O({
40
+ opacity: v && i || u !== void 0 ? 1 : 0,
41
+ config: u === void 0 ? { duration: y, easing: w.easeInOutCubic } : { duration: 0 }
41
42
  });
42
43
  return /* @__PURE__ */ r(
43
- E,
44
+ R,
44
45
  {
45
- hasItemWithIcon: y,
46
- setHasItemWithIcon: g,
46
+ hasItemWithIcon: g,
47
+ setHasItemWithIcon: h,
47
48
  activeItemId: S,
48
49
  setActiveItemId: x,
49
- children: /* @__PURE__ */ r(
50
- w.div,
50
+ children: C && /* @__PURE__ */ r(
51
+ D.div,
51
52
  {
52
53
  style: {
53
54
  position: "fixed",
54
55
  zIndex: Number.MAX_SAFE_INTEGER - 10,
55
- ...v
56
+ ...N
56
57
  },
57
58
  onMouseEnter: (t) => {
58
59
  o == null || o(t), e == null || e(t);
@@ -62,10 +63,10 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
62
63
  },
63
64
  "data-content-wrapper": !0,
64
65
  children: /* @__PURE__ */ r(
65
- P,
66
+ F,
66
67
  {
67
68
  ref: _,
68
- className: D(q.sub_content, d),
69
+ className: E(z.sub_content, d),
69
70
  sideOffset: l,
70
71
  collisionPadding: I,
71
72
  ...b,
@@ -78,7 +79,7 @@ import '../../../../assets/SubContent.css';const j = "_sub_content_y6v65_1", q =
78
79
  );
79
80
  }
80
81
  );
81
- z.displayName = m;
82
+ G.displayName = m;
82
83
  export {
83
- z as SubContent
84
+ G as SubContent
84
85
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,eAAO,MAAM,OAAO,EA4Ff,sBAAsB,CAAC"}
1
+ {"version":3,"file":"SubRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,eAAO,MAAM,OAAO,EA+Ff,sBAAsB,CAAC"}
@@ -1,45 +1,46 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as N, useImperativeHandle as T } from "react";
3
- import { R as w } from "../../../../index-BA3njR2k.mjs";
4
- import { useContextMenuContext as L, ContextMenuProvider as P } from "../../ContextMenu.context.js";
5
- import { ContextMenuMode as j } from "../../ContextMenu.enums.js";
6
- import { useContextMenuSubMenu as B } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
- import "../../../../useContentPositioning-DAKfbddS.mjs";
2
+ import { forwardRef as T, useImperativeHandle as w } from "react";
3
+ import { R as L } from "../../../../index-CYWNqEqR.mjs";
4
+ import { useContextMenuContext as P, ContextMenuProvider as j } from "../../ContextMenu.context.js";
5
+ import { ContextMenuMode as B } from "../../ContextMenu.enums.js";
6
+ import { useContextMenuSubMenu as K } from "../../hooks/useContextMenuSubMenu/useContextMenuSubMenu.js";
7
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
8
8
  import "../Content/Content.utils.js";
9
9
  import "../../providers/LevelProvider/LevelProvider.js";
10
- import { useContextMenuItemContext as K } from "../Item/Item.context.js";
11
- import { Trigger as V } from "./components/Trigger/Trigger.js";
12
- import { Content as Y } from "./components/Content/Content.js";
13
- const o = "ContextMenu.SubRoot", t = N(
10
+ import { useContextMenuItemContext as V } from "../Item/Item.context.js";
11
+ import { Trigger as Y } from "./components/Trigger/Trigger.js";
12
+ import { Content as _ } from "./components/Content/Content.js";
13
+ const o = "ContextMenu.SubRoot", t = T(
14
14
  ({
15
15
  children: l,
16
- mode: M = j.HOVER,
16
+ mode: M = B.HOVER,
17
17
  onOpen: d,
18
18
  onAnimatedOpen: C,
19
19
  defaultOpen: f,
20
20
  isCloseWithRootMenu: c = !1,
21
- ...x
22
- }, y) => {
21
+ isCloseOnClick: x = !0,
22
+ ...y
23
+ }, O) => {
23
24
  const {
24
25
  animationDuration: n,
25
26
  hoverCloseDelay: r,
26
- closeMenuImmediately: O
27
- } = L(o), { subMenuOpen: e, setSubMenuOpen: m } = K(o), b = c ? O : void 0, {
28
- mode: R,
27
+ closeMenuImmediately: b
28
+ } = P(o), { subMenuOpen: e, setSubMenuOpen: m } = V(o), R = c ? b : void 0, {
29
+ mode: g,
29
30
  open: i,
30
- onOpenChange: g,
31
- triggerRef: I,
32
- contentRef: v,
33
- inheritedArrowColor: S,
34
- animatedOpen: h,
35
- temporaryHoverClose: H,
31
+ onOpenChange: I,
32
+ triggerRef: v,
33
+ contentRef: S,
34
+ inheritedArrowColor: h,
35
+ animatedOpen: H,
36
+ temporaryHoverClose: A,
36
37
  closeMenuImmediately: s,
37
- onMouseEnter: A,
38
- onMouseLeave: D,
38
+ onMouseEnter: D,
39
+ onMouseLeave: E,
39
40
  enableTemporaryHoverClose: u,
40
- triggerId: E,
41
+ triggerId: N,
41
42
  onOpenByKeyboard: p
42
- } = B({
43
+ } = K({
43
44
  displayName: o,
44
45
  mode: M,
45
46
  defaultOpen: f,
@@ -49,39 +50,40 @@ const o = "ContextMenu.SubRoot", t = N(
49
50
  subMenuOpen: e,
50
51
  setSubMenuOpen: m,
51
52
  hoverCloseDelay: r,
52
- closeRootMenuImmediately: b
53
+ closeRootMenuImmediately: R
53
54
  });
54
- return T(y, () => ({
55
+ return w(O, () => ({
55
56
  closeMenuImmediately: s,
56
57
  enableTemporaryHoverClose: u,
57
58
  onOpenByKeyboard: p
58
59
  })), /* @__PURE__ */ a(
59
- P,
60
+ j,
60
61
  {
61
- mode: R,
62
- triggerRef: I,
63
- contentRef: v,
64
- inheritedArrowColor: S,
65
- animatedOpen: h,
62
+ mode: g,
63
+ triggerRef: v,
64
+ contentRef: S,
65
+ inheritedArrowColor: h,
66
+ animatedOpen: H,
66
67
  animationDuration: n,
67
68
  hoverCloseDelay: r,
68
- temporaryHoverClose: H,
69
+ temporaryHoverClose: A,
69
70
  closeMenuImmediately: s,
70
- onMouseEnter: A,
71
- onMouseLeave: D,
71
+ onMouseEnter: D,
72
+ onMouseLeave: E,
72
73
  enableTemporaryHoverClose: u,
73
74
  subMenuOpen: e,
74
75
  setSubMenuOpen: m,
75
- triggerId: E,
76
+ triggerId: N,
76
77
  onOpenByKeyboard: p,
78
+ isCloseOnClick: x,
77
79
  isOpen: e || i,
78
80
  children: /* @__PURE__ */ a(
79
- w,
81
+ L,
80
82
  {
81
83
  open: i || e,
82
- onOpenChange: g,
84
+ onOpenChange: I,
83
85
  modal: !1,
84
- ...x,
86
+ ...y,
85
87
  children: l
86
88
  }
87
89
  )
@@ -90,8 +92,8 @@ const o = "ContextMenu.SubRoot", t = N(
90
92
  }
91
93
  );
92
94
  t.displayName = o;
93
- t.Trigger = V;
94
- t.Content = Y;
95
+ t.Trigger = Y;
96
+ t.Content = _;
95
97
  export {
96
98
  t as SubRoot
97
99
  };
@@ -31,5 +31,9 @@ export type ContextMenuSubRootProps = Omit<RadixDropdownMenuRootProps, 'onOpenCh
31
31
  * Whether the submenu should close when the root menu is closed.
32
32
  */
33
33
  isCloseWithRootMenu?: boolean;
34
+ /**
35
+ * Whether the menu should close when clicked.
36
+ */
37
+ isCloseOnClick?: boolean;
34
38
  };
35
39
  //# sourceMappingURL=SubRoot.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubRoot.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,0BAA0B,EAC1B,cAAc,GAAG,OAAO,CACzB,GAAG;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"SubRoot.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/SubRoot/SubRoot.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAErG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,0BAA0B,EAC1B,cAAc,GAAG,OAAO,CACzB,GAAG;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as L, useState as C } from "react";
3
- import { C as j } from "../../../../../../index-BA3njR2k.mjs";
3
+ import { C as j } from "../../../../../../index-CYWNqEqR.mjs";
4
4
  import { c as k } from "../../../../../../index-L8X2o7IH.mjs";
5
5
  import { u as w, e as z, a as F } from "../../../../../../react-spring_web.modern-Dnq1lqN5.mjs";
6
6
  import { mergeRefs as M } from "../../../../../../lib/utils.js";
@@ -8,7 +8,7 @@ import { LevelProvider as X } from "../../../../providers/LevelProvider/LevelPro
8
8
  import { useContextMenuContext as Y } from "../../../../ContextMenu.context.js";
9
9
  import { ContextMenuMode as g } from "../../../../ContextMenu.enums.js";
10
10
  import { focusParentItem as q } from "../../../../utils/focusParentItem/focusParentItem.js";
11
- import { u as J, s as K } from "../../../../../../useContentPositioning-DAKfbddS.mjs";
11
+ import { u as J, s as K } from "../../../../../../useContentPositioning-BLEFxO0N.mjs";
12
12
  import { Direction as Q } from "../../../Content/Content.enums.js";
13
13
  import { directionToSide as U } from "../../../Content/Content.utils.js";
14
14
  const x = "ContextMenu.Content", V = L(
@@ -1,11 +1,11 @@
1
1
  import { jsx as b } from "react/jsx-runtime";
2
2
  import { forwardRef as c } from "react";
3
- import { T as v } from "../../../../../../index-BA3njR2k.mjs";
3
+ import { T as v } from "../../../../../../index-CYWNqEqR.mjs";
4
4
  import { mergeRefs as y } from "../../../../../../lib/utils.js";
5
5
  import { useContextMenuContext as A } from "../../../../ContextMenu.context.js";
6
6
  import { ContextMenuMode as E } from "../../../../ContextMenu.enums.js";
7
7
  import "../../../../providers/LevelProvider/LevelProvider.js";
8
- import "../../../../../../useContentPositioning-DAKfbddS.mjs";
8
+ import "../../../../../../useContentPositioning-BLEFxO0N.mjs";
9
9
  import "../../../Content/Content.utils.js";
10
10
  import { useContextMenuItemFocus as j } from "../../../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
11
  const a = "ContextMenu.Trigger", D = c(
@@ -1,13 +1,13 @@
1
1
  import { jsx as M } from "react/jsx-runtime";
2
2
  import { forwardRef as R } from "react";
3
- import { b as H } from "../../../../index-BA3njR2k.mjs";
3
+ import { b as H } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as j } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { useLevelContext as q } from "../../providers/LevelProvider/LevelProvider.js";
6
6
  import { useContextMenuSubContext as D } from "../Sub/Sub.context.js";
7
7
  import { hasItemIcon as V } from "../../utils/hasItemIcon/hasItemIcon.js";
8
8
  import { ContextMenuMode as i } from "../../ContextMenu.enums.js";
9
9
  import "../../ContextMenu.context.js";
10
- import "../../../../useContentPositioning-DAKfbddS.mjs";
10
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
11
11
  import "../Content/Content.utils.js";
12
12
  import { useContextMenuItemFocus as W } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
13
13
  import '../../../../assets/SubTrigger.css';const Y = "_sub_trigger_ip3hq_1", w = {
@@ -1,6 +1,6 @@
1
1
  import { jsx as C } from "react/jsx-runtime";
2
2
  import { forwardRef as R } from "react";
3
- import { T as E } from "../../../../index-BA3njR2k.mjs";
3
+ import { T as E } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as T } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { mergeRefs as n } from "../../../../lib/utils.js";
6
6
  import { useContextMenuContext as A } from "../../ContextMenu.context.js";
@@ -1,7 +1,7 @@
1
1
  import { useContextMenu as t } from "./useContextMenu/useContextMenu.js";
2
2
  import { useContextMenuSubMenu as u } from "./useContextMenuSubMenu/useContextMenuSubMenu.js";
3
3
  import { useInheritedArrowColor as s } from "./useInheritedArrowColor/useInheritedArrowColor.js";
4
- import { u as m } from "../../../useContentPositioning-DAKfbddS.mjs";
4
+ import { u as m } from "../../../useContentPositioning-BLEFxO0N.mjs";
5
5
  import { useContextMenuSub as p } from "./useContextMenuSub/useContextMenuSub.js";
6
6
  import { useContextMenuItemFocus as i } from "./useContextMenuItemFocus/useContextMenuItemFocus.js";
7
7
  import { useIsTouchDevice as c } from "./useIsTouchDevice/useIsTouchDevice.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { u as n } from "../../../../useContentPositioning-DAKfbddS.mjs";
2
+ import { u as n } from "../../../../useContentPositioning-BLEFxO0N.mjs";
3
3
  import "../../components/Content/Content.enums.js";
4
4
  import "../../components/Content/Content.utils.js";
5
5
  export {
@@ -3,7 +3,7 @@ import { ContextMenuMode as l } from "../../ContextMenu.enums.js";
3
3
  import "../../providers/LevelProvider/LevelProvider.js";
4
4
  import "../../ContextMenu.context.js";
5
5
  import { useInheritedArrowColor as P } from "../useInheritedArrowColor/useInheritedArrowColor.js";
6
- import "../../../../useContentPositioning-DAKfbddS.mjs";
6
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
7
7
  import "../../components/Content/Content.utils.js";
8
8
  import { useIsTouchDevice as Q } from "../useIsTouchDevice/useIsTouchDevice.js";
9
9
  import { contextMenuBus as M } from "../../utils/contextMenuBus/contextMenuBus.js";
@@ -2,7 +2,7 @@ import { useId as S, useState as C, useRef as v, useEffect as I } from "react";
2
2
  import { ContextMenuMode as c } from "../../ContextMenu.enums.js";
3
3
  import { useLevelContext as q } from "../../providers/LevelProvider/LevelProvider.js";
4
4
  import { useContextMenuContext as j, useContextMenuRootContext as w } from "../../ContextMenu.context.js";
5
- import "../../../../useContentPositioning-DAKfbddS.mjs";
5
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
6
6
  import "../../components/Content/Content.utils.js";
7
7
  import { useIsTouchDevice as z } from "../useIsTouchDevice/useIsTouchDevice.js";
8
8
  function X({
@@ -1,7 +1,7 @@
1
1
  import { useId as $, useState as m, useRef as H, useLayoutEffect as k, useEffect as g } from "react";
2
2
  import { ContextMenuMode as u } from "../../ContextMenu.enums.js";
3
3
  import { useInheritedArrowColor as y } from "../useInheritedArrowColor/useInheritedArrowColor.js";
4
- import "../../../../useContentPositioning-DAKfbddS.mjs";
4
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
5
5
  import "../../components/Content/Content.utils.js";
6
6
  import { useContextMenuRootContext as A } from "../../ContextMenu.context.js";
7
7
  import { useLevelContext as N } from "../../providers/LevelProvider/LevelProvider.js";
@@ -3,4 +3,5 @@ export { type ContextMenuRootProps } from './ContextMenu.props';
3
3
  export { ContextMenuMode } from './ContextMenu.enums';
4
4
  export { Direction as ContextMenuDirection } from './components/Content';
5
5
  export { type ContextMenuType, type ContextMenuHandle, type ContextMenuModeType, } from './ContextMenu.types';
6
+ export { type ContextMenuSubHandle } from './components/Sub';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { ContextMenu as n } from "./ContextMenu.js";
2
2
  import { ContextMenuMode as x } from "./ContextMenu.enums.js";
3
- import "../../useContentPositioning-DAKfbddS.mjs";
3
+ import "../../useContentPositioning-BLEFxO0N.mjs";
4
4
  import { Direction as p } from "./components/Content/Content.enums.js";
5
5
  import "./components/Content/Content.utils.js";
6
6
  export {
@@ -532,7 +532,7 @@ function Oe(e) {
532
532
  const [t, n] = a.useState(Bo());
533
533
  return ce(() => {
534
534
  n((r) => r ?? String(Wo++));
535
- }, [e]), t ? `radix-${t}` : "";
535
+ }, [e]), e || (t ? `radix-${t}` : "");
536
536
  }
537
537
  const Uo = ["top", "right", "bottom", "left"], ae = Math.min, V = Math.max, Je = Math.round, Ge = Math.floor, J = (e) => ({
538
538
  x: e,
@@ -1,6 +1,6 @@
1
1
  import { forwardRef as F, useState as H, useLayoutEffect as v } from "react";
2
2
  import { jsx as P } from "react/jsx-runtime";
3
- import { C as R } from "./index-BA3njR2k.mjs";
3
+ import { C as R } from "./index-CYWNqEqR.mjs";
4
4
  import { c as U } from "./index-L8X2o7IH.mjs";
5
5
  import { u as k, a as S, e as z } from "./react-spring_web.modern-Dnq1lqN5.mjs";
6
6
  import { mergeRefs as B } from "./lib/utils.js";
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.1.1-beta.7",
4
+ "version": "1.1.1-beta.9",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "engines": {