@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,97 +1,98 @@
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";
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as G, useMemo as D, useId as J, useState as R, useRef as Q, useEffect as T } from "react";
3
+ import { I as U } from "../../../../index-CYWNqEqR.mjs";
4
+ import { c as F } from "../../../../index-L8X2o7IH.mjs";
5
+ import { mergeRefs as V } from "../../../../lib/utils.js";
6
+ import { useLevelContext as X } from "../../providers/LevelProvider/LevelProvider.js";
7
+ import { useContextMenuContext as Z } from "../../ContextMenu.context.js";
8
+ import { hasItemIcon as O } from "../../utils/hasItemIcon/hasItemIcon.js";
9
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
10
10
  import "../Content/Content.utils.js";
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);
11
+ import { useContextMenuItemFocus as $ } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
12
+ import { ContextMenuItemProvider as ee } from "./Item.context.js";
13
+ import '../../../../assets/Item2.css';const te = "_item_zkanf_1", _ = {
14
+ item: te
15
+ }, s = "ContextMenu.Item", ne = G((t, p) => {
16
+ const { hasItemWithIcon: M } = X(s);
17
17
  if ("isSelectable" in t && t.isSelectable === !1) {
18
18
  const {
19
19
  className: e,
20
- children: b,
21
- isSelectable: q,
22
- hasIconCheckFn: z = R,
23
- ...B
24
- } = t, K = y(() => z(b), [b]);
25
- return /* @__PURE__ */ p(
20
+ children: C,
21
+ isSelectable: B,
22
+ hasIconCheckFn: K = O,
23
+ ...W
24
+ } = t, Y = D(() => K(C), [C]);
25
+ return /* @__PURE__ */ b(
26
26
  "div",
27
27
  {
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
28
+ ref: p,
29
+ className: F(_.item, e),
30
+ "data-not-selectable": !B,
31
+ "data-no-icon-align": Y || !M ? "" : void 0,
32
+ ...W,
33
+ children: C
34
34
  }
35
35
  );
36
36
  }
37
37
  const {
38
- className: _,
39
- children: a,
40
- isDisabled: M,
41
- isDanger: w,
42
- hasIconCheckFn: A = R,
43
- onSelect: i,
38
+ className: w,
39
+ children: i,
40
+ isDisabled: x,
41
+ isDanger: A,
42
+ hasIconCheckFn: E = O,
43
+ onSelect: a,
44
44
  onClick: r,
45
45
  onFocus: c,
46
46
  onMouseEnter: m,
47
47
  onBlur: u,
48
48
  onMouseLeave: l,
49
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,
50
+ isCloseMenuOnClick: S = !0,
51
+ ...H
52
+ } = t, L = J(), [v, N] = R(!1), [n, P] = R(!1), o = Q(null), j = D(() => E(i), [i]), { closeMenuImmediately: k, isCloseOnClick: y } = Z(s), {
53
+ dataHighlighted: q,
53
54
  onFocus: f,
54
55
  onMouseEnter: h,
55
56
  onBlur: g,
56
57
  onMouseLeave: I
57
- } = X({
58
+ } = $({
58
59
  displayName: s,
59
- id: H,
60
- isDisabled: M,
61
- hasSubmenu: o
60
+ id: L,
61
+ isDisabled: x,
62
+ hasSubmenu: n
62
63
  });
63
- J(() => {
64
- if (!n.current)
64
+ T(() => {
65
+ if (!o.current)
65
66
  return;
66
- const e = n.current.querySelector("[data-submenu-trigger]");
67
- L(!!e);
68
- }, [n]);
69
- const j = (e) => {
70
- o && e.key === "ArrowRight" && v(!0), d == null || d(e);
67
+ const e = o.current.querySelector("[data-submenu-trigger]");
68
+ P(!!e);
69
+ }, [o]);
70
+ const z = (e) => {
71
+ n && e.key === "ArrowRight" && N(!0), d == null || d(e);
71
72
  };
72
- return /* @__PURE__ */ p(
73
- Z,
73
+ return /* @__PURE__ */ b(
74
+ ee,
74
75
  {
75
- hasSubmenu: o,
76
- subMenuOpen: S,
77
- setSubMenuOpen: v,
78
- children: /* @__PURE__ */ p(
79
- Q,
76
+ hasSubmenu: n,
77
+ subMenuOpen: v,
78
+ setSubMenuOpen: N,
79
+ children: /* @__PURE__ */ b(
80
+ U,
80
81
  {
81
- ref: T(x, n),
82
- className: D(F.item, _),
83
- disabled: M,
82
+ ref: V(p, o),
83
+ className: F(_.item, w),
84
+ disabled: x,
84
85
  "data-item": !0,
85
- "data-danger": w ? "" : void 0,
86
- "data-no-icon-align": O || !C ? "" : void 0,
87
- "data-has-submenu": o ? "" : void 0,
86
+ "data-danger": A ? "" : void 0,
87
+ "data-no-icon-align": j || !M ? "" : void 0,
88
+ "data-has-submenu": n ? "" : void 0,
88
89
  onSelect: (e) => {
89
- i == null || i(e), N(!0);
90
+ a == null || a(e), y && S && k(!0);
90
91
  },
91
92
  onClick: (e) => {
92
- e.preventDefault(), r == null || r(e), N(!0);
93
+ e.preventDefault(), r == null || r(e), y && S && k(!0);
93
94
  },
94
- "data-highlighted": S || P,
95
+ "data-highlighted": v || q,
95
96
  onFocus: (e) => {
96
97
  f == null || f(), c == null || c(e);
97
98
  },
@@ -104,15 +105,15 @@ import '../../../../assets/Item2.css';const $ = "_item_zkanf_1", F = {
104
105
  onMouseLeave: (e) => {
105
106
  I == null || I(e), l == null || l(e);
106
107
  },
107
- onKeyDown: j,
108
- ...E,
109
- children: a
108
+ onKeyDown: z,
109
+ ...H,
110
+ children: i
110
111
  }
111
112
  )
112
113
  }
113
114
  );
114
115
  });
115
- ee.displayName = s;
116
+ ne.displayName = s;
116
117
  export {
117
- ee as Item
118
+ ne as Item
118
119
  };
@@ -15,6 +15,12 @@ export type SelectableItemProps = RadixItemProps & {
15
15
  * By default, the `hasItemIcon` from utils is used.
16
16
  */
17
17
  hasIconCheckFn?: (children: React.ReactNode) => boolean;
18
+ /**
19
+ * Whether the item should close the menu when clicked.
20
+ *
21
+ * @default true
22
+ */
23
+ isCloseMenuOnClick?: boolean;
18
24
  };
19
25
  export type NotSelectableItemProps = React.ComponentPropsWithRef<'div'> & {
20
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Item.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,KAAK,cAAc,GAAG,IAAI,CACxB,KAAK,CAAC,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,EACzD,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG;IACxE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAErE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
1
+ {"version":3,"file":"Item.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,KAAK,cAAc,GAAG,IAAI,CACxB,KAAK,CAAC,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,EACzD,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;IACxD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG;IACxE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAErE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as c, useRef as f, useEffect as a } from "react";
3
- import { e as d } from "../../../../index-BA3njR2k.mjs";
3
+ import { e as d } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as p } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { mergeRefs as I } from "../../../../lib/utils.js";
6
6
  import { useLevelContext as l } from "../../providers/LevelProvider/LevelProvider.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import { L as n } from "../../../../index-BA3njR2k.mjs";
3
+ import { L as n } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c } from "../../../../index-L8X2o7IH.mjs";
5
5
  import { useLevelContext as i } from "../../providers/LevelProvider/LevelProvider.js";
6
6
  import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
@@ -1,4 +1,4 @@
1
- import { P as o } from "../../../../index-BA3njR2k.mjs";
1
+ import { P as o } from "../../../../index-CYWNqEqR.mjs";
2
2
  const t = "ContextMenu.Portal", a = o;
3
3
  a.displayName = t;
4
4
  export {
@@ -0,0 +1,5 @@
1
+ import { RadioGroupContextProps } from './RadioGroup.props';
2
+ declare const DISPLAY_NAME = "ContextMenu.RadioGroup";
3
+ declare const RadioGroupProvider: import('../../../../lib/react/createComponentContext').ContextProps<RadioGroupContextProps>, useRadioGroupContext: (consumerName: string) => RadioGroupContextProps;
4
+ export { RadioGroupProvider, useRadioGroupContext, DISPLAY_NAME };
5
+ //# sourceMappingURL=RadioGroup.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.context.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,QAAA,MAAM,YAAY,2BAA2B,CAAC;AAE9C,QAAA,MAAO,kBAAkB,+FAAE,oBAAoB,kDACe,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { createComponentContext as o } from "../../../../lib/react/createComponentContext/createComponentContext.js";
2
+ const t = "ContextMenu.RadioGroup", [r, n] = o(t);
3
+ export {
4
+ t as DISPLAY_NAME,
5
+ r as RadioGroupProvider,
6
+ n as useRadioGroupContext
7
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAIrD,eAAO,MAAM,UAAU;4BAGpB,eAAe,GAAG,GAAG,CAAC,OAAO;;CAc/B,CAAC"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,UAAU;4BAGpB,eAAe,GAAG,GAAG,CAAC,OAAO;;CAmB/B,CAAC"}
@@ -1,14 +1,24 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { a as n } from "../../../../index-BA3njR2k.mjs";
3
- const r = "ContextMenu.RadioGroup", i = ({
4
- onChange: t,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { a as n } from "../../../../index-CYWNqEqR.mjs";
3
+ import { RadioGroupProvider as i, DISPLAY_NAME as p } from "./RadioGroup.context.js";
4
+ const s = ({
5
+ onChange: o,
5
6
  ...e
6
- }) => /* @__PURE__ */ a(n, { ...e, onValueChange: (o) => {
7
- t && t({
8
- target: { value: o }
9
- });
10
- } });
11
- i.displayName = r;
7
+ }) => {
8
+ const r = (a) => {
9
+ o && o({
10
+ target: { value: a }
11
+ });
12
+ };
13
+ return /* @__PURE__ */ t(i, { onChange: r, children: /* @__PURE__ */ t(
14
+ n,
15
+ {
16
+ ...e,
17
+ onValueChange: r
18
+ }
19
+ ) });
20
+ };
21
+ s.displayName = p;
12
22
  export {
13
- i as RadioGroup
23
+ s as RadioGroup
14
24
  };
@@ -8,5 +8,13 @@ export type RadioGroupProps = RadixRadioGroupProps & {
8
8
  */
9
9
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
10
10
  };
11
+ export type RadioGroupContextProps = {
12
+ /**
13
+ * Handler for the selected value.
14
+ *
15
+ * Automatically applied to all Radio buttons.
16
+ */
17
+ onChange: (value: string) => void;
18
+ };
11
19
  export {};
12
20
  //# sourceMappingURL=RadioGroup.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE/F,KAAK,oBAAoB,GAAG,IAAI,CAC9B,wBAAwB,CAAC,OAAO,2BAA2B,CAAC,EAC5D,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC"}
1
+ {"version":3,"file":"RadioGroup.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE/F,KAAK,oBAAoB,GAAG,IAAI,CAC9B,wBAAwB,CAAC,OAAO,2BAA2B,CAAC,EAC5D,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { RadioGroup } from './RadioGroup';
2
2
  export { type RadioGroupProps } from './RadioGroup.props';
3
+ export { RadioGroupProvider, useRadioGroupContext, DISPLAY_NAME, } from './RadioGroup.context';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
@@ -1,4 +1,8 @@
1
- import { RadioGroup as p } from "./RadioGroup.js";
1
+ import { RadioGroup as e } from "./RadioGroup.js";
2
+ import { DISPLAY_NAME as d, RadioGroupProvider as i, useRadioGroupContext as t } from "./RadioGroup.context.js";
2
3
  export {
3
- p as RadioGroup
4
+ d as DISPLAY_NAME,
5
+ e as RadioGroup,
6
+ i as RadioGroupProvider,
7
+ t as useRadioGroupContext
4
8
  };
@@ -275,5 +275,6 @@ export declare const RadioItem: React.ForwardRefExoticComponent<{
275
275
  } & {
276
276
  isDisabled?: boolean;
277
277
  hasIconCheckFn?: (children: React.ReactNode) => boolean;
278
+ isCloseMenuOnClick?: boolean;
278
279
  } & React.RefAttributes<HTMLDivElement>>;
279
280
  //# sourceMappingURL=RadioItem.d.ts.map
@@ -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;wCA0EJ,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;AAoB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAJO,SAAS;;wCAkGrC,CAAC"}
@@ -1,70 +1,79 @@
1
- import { jsx as A } from "react/jsx-runtime";
2
- import { forwardRef as j, useId as u, useMemo as w } from "react";
3
- import { f as H } from "../../../../index-BA3njR2k.mjs";
4
- import { c as P } from "../../../../index-L8X2o7IH.mjs";
5
- import { useLevelContext as W } from "../../providers/LevelProvider/LevelProvider.js";
6
- import { useContextMenuContext as Y } from "../../ContextMenu.context.js";
7
- import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
8
- import "../../../../useContentPositioning-DAKfbddS.mjs";
1
+ import { jsx as G } from "react/jsx-runtime";
2
+ import { forwardRef as H, useId as P, useMemo as W } from "react";
3
+ import { f as Y } from "../../../../index-CYWNqEqR.mjs";
4
+ import { c as b } from "../../../../index-L8X2o7IH.mjs";
5
+ import { useLevelContext as q } from "../../providers/LevelProvider/LevelProvider.js";
6
+ import { useContextMenuContext as z } from "../../ContextMenu.context.js";
7
+ import { hasItemIcon as J } from "../../utils/hasItemIcon/hasItemIcon.js";
8
+ import "../../../../useContentPositioning-BLEFxO0N.mjs";
9
9
  import "../Content/Content.utils.js";
10
- import { useContextMenuItemFocus as k } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
- import '../../../../assets/RadioItem.css';const q = "_radio_item_14d4r_1", z = {
12
- radio_item: q
13
- }, i = "ContextMenu.RadioItem", D = j(
10
+ import { useContextMenuItemFocus as K } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
11
+ import "../RadioGroup/RadioGroup.js";
12
+ import { useRadioGroupContext as O } from "../RadioGroup/RadioGroup.context.js";
13
+ import '../../../../assets/RadioItem.css';const Q = "_radio_item_14d4r_1", T = {
14
+ radio_item: Q
15
+ }, o = "ContextMenu.RadioItem", U = H(
14
16
  ({
15
- className: I,
17
+ className: h,
16
18
  children: m,
17
- isDisabled: x,
18
- hasIconCheckFn: _ = b,
19
- onFocus: o,
20
- onMouseEnter: a,
21
- onBlur: r,
19
+ isDisabled: I,
20
+ hasIconCheckFn: u = J,
21
+ onFocus: i,
22
+ onMouseEnter: r,
23
+ onBlur: a,
22
24
  onMouseLeave: s,
23
25
  onSelect: d,
24
- ...g
25
- }, n) => {
26
- const C = u(), { hasItemWithIcon: N } = W(i), { closeMenuImmediately: R } = Y(i), {
27
- dataHighlighted: h,
28
- onFocus: p,
29
- onMouseEnter: f,
30
- onBlur: c,
31
- onMouseLeave: e
32
- } = k({
33
- displayName: i,
34
- id: C,
35
- isDisabled: x
36
- }), y = w(() => _(m), [m]);
37
- return /* @__PURE__ */ A(
38
- H,
26
+ onClick: p,
27
+ isCloseMenuOnClick: _ = !0,
28
+ value: g,
29
+ ...C
30
+ }, N) => {
31
+ const y = P(), { hasItemWithIcon: A } = q(o), { closeMenuImmediately: n, isCloseOnClick: R } = z(o), {
32
+ dataHighlighted: j,
33
+ onFocus: f,
34
+ onMouseEnter: e,
35
+ onBlur: x,
36
+ onMouseLeave: c
37
+ } = K({
38
+ displayName: o,
39
+ id: y,
40
+ isDisabled: I
41
+ }), w = W(() => u(m), [m]), { onChange: D } = O(o);
42
+ return /* @__PURE__ */ G(
43
+ Y,
39
44
  {
40
- ref: n,
41
- className: P(z.radio_item, I),
42
- disabled: x,
45
+ ref: N,
46
+ className: b(T.radio_item, h),
47
+ disabled: I,
43
48
  "data-item": !0,
44
- "data-no-icon-align": y || !N ? "" : void 0,
45
- "data-highlighted": h,
49
+ "data-no-icon-align": w || !A ? "" : void 0,
50
+ "data-highlighted": j,
46
51
  onSelect: (t) => {
47
- R(!0), d == null || d(t);
52
+ d == null || d(t), R && _ && n(!0);
53
+ },
54
+ onClick: (t) => {
55
+ t.preventDefault(), D(g), p == null || p(t), R && _ && n(!0);
48
56
  },
49
57
  onFocus: (t) => {
50
- p == null || p(), o == null || o(t);
58
+ f == null || f(), i == null || i(t);
51
59
  },
52
60
  onMouseEnter: (t) => {
53
- f == null || f(t), a == null || a(t);
61
+ e == null || e(t), r == null || r(t);
54
62
  },
55
63
  onBlur: (t) => {
56
- c == null || c(), r == null || r(t);
64
+ x == null || x(), a == null || a(t);
57
65
  },
58
66
  onMouseLeave: (t) => {
59
- e == null || e(t), s == null || s(t);
67
+ c == null || c(t), s == null || s(t);
60
68
  },
61
- ...g,
69
+ value: g,
70
+ ...C,
62
71
  children: m
63
72
  }
64
73
  );
65
74
  }
66
75
  );
67
- D.displayName = i;
76
+ U.displayName = o;
68
77
  export {
69
- D as RadioItem
78
+ U as RadioItem
70
79
  };
@@ -12,6 +12,10 @@ export type RadioItemProps = RadixRadioItemProps & {
12
12
  * By default, the `hasItemIcon` from utils is used.
13
13
  */
14
14
  hasIconCheckFn?: (children: React.ReactNode) => boolean;
15
+ /**
16
+ * Whether the RadioItem should close the menu when clicked.
17
+ */
18
+ isCloseMenuOnClick?: boolean;
15
19
  };
16
20
  export {};
17
21
  //# sourceMappingURL=RadioItem.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioItem.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F,KAAK,mBAAmB,GAAG,IAAI,CAC7B,wBAAwB,CAAC,OAAO,0BAA0B,CAAC,EAC3D,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;CACzD,CAAC"}
1
+ {"version":3,"file":"RadioItem.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F,KAAK,mBAAmB,GAAG,IAAI,CAC7B,wBAAwB,CAAC,OAAO,0BAA0B,CAAC,EAC3D,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;IACxD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as e } from "react";
3
- import { g as s } from "../../../../index-BA3njR2k.mjs";
3
+ import { g as s } from "../../../../index-CYWNqEqR.mjs";
4
4
  import { c as p } from "../../../../index-L8X2o7IH.mjs";
5
5
  import '../../../../assets/Separator.css';const m = "_separator_1k8lw_1", c = {
6
6
  separator: m
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { SubProps } from './Sub.props';
3
- export declare const Sub: {
4
- ({ children, mode, onOpen, defaultOpen, ...rest }: SubProps): React.JSX.Element;
5
- displayName: string;
6
- };
2
+ import { ContextMenuSubHandle } from './Sub.types';
3
+ export declare const Sub: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dropdown-menu').DropdownMenuSubProps, "onOpenChange"> & {
4
+ mode?: import('../..').ContextMenuModeType;
5
+ onOpen?: (open: boolean) => void;
6
+ } & React.RefAttributes<ContextMenuSubHandle>>;
7
7
  //# sourceMappingURL=Sub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sub.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/Sub.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,eAAO,MAAM,GAAG;uDAOb,QAAQ;;CAwCV,CAAC"}
1
+ {"version":3,"file":"Sub.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/Sub.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,GAAG;;;8CAiDf,CAAC"}