@televet/kibble-ui 5.0.2-beta.menu.3 → 5.0.2-beta.menu.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 (63) hide show
  1. package/dist/chunks/{avatarGroup.component-DvpCFAzZ.js → avatarGroup.component-BsSYSCvd.js} +2 -2
  2. package/dist/chunks/{avatarGroup.component-DvpCFAzZ.js.map → avatarGroup.component-BsSYSCvd.js.map} +1 -1
  3. package/dist/chunks/{avatarGroup.component-BpwmnR02.js → avatarGroup.component-DlZ_W4X2.js} +2 -2
  4. package/dist/chunks/{avatarGroup.component-BpwmnR02.js.map → avatarGroup.component-DlZ_W4X2.js.map} +1 -1
  5. package/dist/chunks/{buttonGroup.component-DJ7RLC9Y.js → buttonGroup.component-BNz4WUw7.js} +2 -2
  6. package/dist/chunks/{buttonGroup.component-DJ7RLC9Y.js.map → buttonGroup.component-BNz4WUw7.js.map} +1 -1
  7. package/dist/chunks/{buttonGroup.component-CmdgeMRX.js → buttonGroup.component-usIh5lX2.js} +2 -2
  8. package/dist/chunks/{buttonGroup.component-CmdgeMRX.js.map → buttonGroup.component-usIh5lX2.js.map} +1 -1
  9. package/dist/chunks/{calendar.component-Dm6b_z9j.js → calendar.component-D6J2i_cO.js} +2 -2
  10. package/dist/chunks/{calendar.component-Dm6b_z9j.js.map → calendar.component-D6J2i_cO.js.map} +1 -1
  11. package/dist/chunks/{calendar.component-BKYpZfH3.js → calendar.component-DVRqqMvE.js} +2 -2
  12. package/dist/chunks/{calendar.component-BKYpZfH3.js.map → calendar.component-DVRqqMvE.js.map} +1 -1
  13. package/dist/chunks/{conversationCard.component-BIYLeiiS.js → conversationCard.component-CHjyfNdi.js} +2 -2
  14. package/dist/chunks/{conversationCard.component-BIYLeiiS.js.map → conversationCard.component-CHjyfNdi.js.map} +1 -1
  15. package/dist/chunks/{conversationCard.component-Yb7McOBu.js → conversationCard.component-JT-22yfm.js} +2 -2
  16. package/dist/chunks/{conversationCard.component-Yb7McOBu.js.map → conversationCard.component-JT-22yfm.js.map} +1 -1
  17. package/dist/chunks/{datePicker.component-BgZaBVYt.js → datePicker.component-CMdflzUQ.js} +2 -2
  18. package/dist/chunks/{datePicker.component-BgZaBVYt.js.map → datePicker.component-CMdflzUQ.js.map} +1 -1
  19. package/dist/chunks/{datePicker.component-DzTQdhru.js → datePicker.component-JPVhk_HN.js} +2 -2
  20. package/dist/chunks/{datePicker.component-DzTQdhru.js.map → datePicker.component-JPVhk_HN.js.map} +1 -1
  21. package/dist/chunks/{datePicker.provider-D5C-lpgW.js → datePicker.provider-B6P-8oYG.js} +2 -2
  22. package/dist/chunks/{datePicker.provider-D5C-lpgW.js.map → datePicker.provider-B6P-8oYG.js.map} +1 -1
  23. package/dist/chunks/{datePicker.provider-BIYTNRtD.js → datePicker.provider-GATPk0cu.js} +2 -2
  24. package/dist/chunks/{datePicker.provider-BIYTNRtD.js.map → datePicker.provider-GATPk0cu.js.map} +1 -1
  25. package/dist/chunks/{dateTimePicker.component-Bj_1PBnq.js → dateTimePicker.component-Cvabv683.js} +2 -2
  26. package/dist/chunks/{dateTimePicker.component-Bj_1PBnq.js.map → dateTimePicker.component-Cvabv683.js.map} +1 -1
  27. package/dist/chunks/{dateTimePicker.component-CEMqEKXq.js → dateTimePicker.component-DZMiafCE.js} +2 -2
  28. package/dist/chunks/{dateTimePicker.component-CEMqEKXq.js.map → dateTimePicker.component-DZMiafCE.js.map} +1 -1
  29. package/dist/chunks/{menu.component-DXw7H-8j.js → menu.component-DLmcpMoj.js} +2 -2
  30. package/dist/chunks/{menu.component-DXw7H-8j.js.map → menu.component-DLmcpMoj.js.map} +1 -1
  31. package/dist/chunks/{menu.component-DgJSzOB8.js → menu.component-D_Fd8OGb.js} +38 -35
  32. package/dist/chunks/{menu.component-DgJSzOB8.js.map → menu.component-D_Fd8OGb.js.map} +1 -1
  33. package/dist/chunks/{radioGroup.types-DR0BEU8s.js → radioGroup.types-BR_YJiyV.js} +2 -2
  34. package/dist/chunks/{radioGroup.types-DR0BEU8s.js.map → radioGroup.types-BR_YJiyV.js.map} +1 -1
  35. package/dist/chunks/{radioGroup.types-3WDwvOcO.js → radioGroup.types-D8hjIwAr.js} +2 -2
  36. package/dist/chunks/{radioGroup.types-3WDwvOcO.js.map → radioGroup.types-D8hjIwAr.js.map} +1 -1
  37. package/dist/chunks/{tagBlock.component-C88f0ff4.js → tagBlock.component-BE1G-gUo.js} +2 -2
  38. package/dist/chunks/{tagBlock.component-C88f0ff4.js.map → tagBlock.component-BE1G-gUo.js.map} +1 -1
  39. package/dist/chunks/{tagBlock.component-qIaw8BI-.js → tagBlock.component-CbqCZu-K.js} +2 -2
  40. package/dist/chunks/{tagBlock.component-qIaw8BI-.js.map → tagBlock.component-CbqCZu-K.js.map} +1 -1
  41. package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
  42. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  43. package/dist/cjs/components/Calendar/index.cjs +1 -1
  44. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  45. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  46. package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
  47. package/dist/cjs/components/Menu/index.cjs +1 -1
  48. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  49. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  50. package/dist/cjs/components/index.cjs +1 -1
  51. package/dist/cjs/index.cjs +1 -1
  52. package/dist/esm/components/AvatarGroup/index.js +1 -1
  53. package/dist/esm/components/ButtonGroup/index.js +1 -1
  54. package/dist/esm/components/Calendar/index.js +1 -1
  55. package/dist/esm/components/ConversationCard/index.js +1 -1
  56. package/dist/esm/components/DatePicker/index.js +2 -2
  57. package/dist/esm/components/DateTimePicker/index.js +1 -1
  58. package/dist/esm/components/Menu/index.js +1 -1
  59. package/dist/esm/components/RadioGroup/index.js +1 -1
  60. package/dist/esm/components/TagBlock/index.js +1 -1
  61. package/dist/esm/components/index.js +10 -10
  62. package/dist/esm/index.js +10 -10
  63. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import st, { forwardRef as h, useEffect as G, useId as Y, useRef as le, useCallback as j, useState as B, useMemo as D } from "react";
2
+ import st, { forwardRef as h, useEffect as _, useId as Y, useRef as le, useCallback as j, useState as B, useMemo as D } from "react";
3
3
  import { B as T } from "./index-9BerxEcw.js";
4
4
  import { B as Z } from "./button.component-BO6oee_V.js";
5
5
  import { I as he } from "./icon.component-PV_nHBId.js";
@@ -12,11 +12,11 @@ import { u as it } from "./usePortalContentRef-DO_jc4W9.js";
12
12
  import { u as te, s as fe, c as Me, d as Pe, P as ut } from "./index-C9UYIjEB.js";
13
13
  import { c as lt } from "./create-slot-recipe-context-D_FXDJGp.js";
14
14
  import { d as dt } from "./icons-CoSqruIn.js";
15
- import { a as _, d as g, b as O, e as pt, u as mt, f as xt, g as ht, n as gt } from "./use-locale-context-Bw4Gg9Z0.js";
15
+ import { a as O, d as g, b as $, e as pt, u as mt, f as xt, g as ht, n as gt } from "./use-locale-context-Bw4Gg9Z0.js";
16
16
  import { m as ft, c as Mt } from "./index-CbVKVxMW.js";
17
17
  import { a6 as p } from "./index-fHSGm2nC.js";
18
18
  import { W as Pt } from "./checkbox.component-DE35wBj-.js";
19
- const [ve, m] = _({
19
+ const [ve, m] = O({
20
20
  name: "MenuContext",
21
21
  hookName: "useMenuContext",
22
22
  providerName: "<MenuProvider />",
@@ -31,16 +31,16 @@ const Ce = h((o, n) => {
31
31
  return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
32
32
  });
33
33
  Ce.displayName = "MenuArrowTip";
34
- const [ne, Zt] = _({
34
+ const [ne, Zt] = O({
35
35
  name: "MenuItemContext",
36
36
  hookName: "useMenuItemContext",
37
37
  providerName: "<MenuItemProvider />"
38
- }), [oe, Ie] = _({
38
+ }), [oe, Ie] = O({
39
39
  name: "MenuItemPropsContext",
40
40
  hookName: "useMenuItemPropsContext",
41
41
  providerName: "<MenuItemPropsProvider />"
42
42
  }), be = h((o, n) => {
43
- const [t, s] = O()(o, [
43
+ const [t, s] = $()(o, [
44
44
  "checked",
45
45
  "closeOnSelect",
46
46
  "disabled",
@@ -70,22 +70,22 @@ const we = h((o, n) => {
70
70
  });
71
71
  we.displayName = "MenuIndicator";
72
72
  const Ne = h((o, n) => {
73
- const [t, s] = O()(o, [
73
+ const [t, s] = $()(o, [
74
74
  "closeOnSelect",
75
75
  "disabled",
76
76
  "value",
77
77
  "valueText",
78
78
  "onSelect"
79
79
  ]), c = m(), u = p(c.getItemProps(t), s), a = c.getItemState(t);
80
- return G(() => c.addItemListener({ id: a.id, onSelect: t.onSelect }), [a.id, t.onSelect]), /* @__PURE__ */ e.jsx(oe, { value: t, children: /* @__PURE__ */ e.jsx(ne, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) }) });
80
+ return _(() => c.addItemListener({ id: a.id, onSelect: t.onSelect }), [a.id, t.onSelect]), /* @__PURE__ */ e.jsx(oe, { value: t, children: /* @__PURE__ */ e.jsx(ne, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) }) });
81
81
  });
82
82
  Ne.displayName = "MenuItem";
83
- const [ye, Ae] = _({
83
+ const [ye, Ae] = O({
84
84
  name: "MenuItemGroupContext",
85
85
  hookName: "useMenuItemGroupContext",
86
86
  providerName: "<MenuItemGroupProvider />"
87
87
  }), Te = h((o, n) => {
88
- const [t, s] = O()(o, ["id"]), c = m(), a = { id: Y(), ...t }, i = p(c.getItemGroupProps(a), s);
88
+ const [t, s] = $()(o, ["id"]), c = m(), a = { id: Y(), ...t }, i = p(c.getItemGroupProps(a), s);
89
89
  return /* @__PURE__ */ e.jsx(ye, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
90
90
  });
91
91
  Te.displayName = "MenuItemGroup";
@@ -110,7 +110,7 @@ const $e = h((o, n) => {
110
110
  });
111
111
  $e.displayName = "MenuPositioner";
112
112
  const Re = h((o, n) => {
113
- const [t, s] = O()(o, [
113
+ const [t, s] = $()(o, [
114
114
  "closeOnSelect",
115
115
  "disabled",
116
116
  "value",
@@ -125,7 +125,7 @@ const Re = h((o, n) => {
125
125
  });
126
126
  Re.displayName = "MenuRadioItem";
127
127
  const Le = h((o, n) => {
128
- const [t, s] = O()(o, [
128
+ const [t, s] = $()(o, [
129
129
  "id",
130
130
  "onValueChange",
131
131
  "value"
@@ -135,9 +135,9 @@ const Le = h((o, n) => {
135
135
  Le.displayName = "MenuRadioItemGroup";
136
136
  const Be = (o) => {
137
137
  const n = le(o), t = le(!1);
138
- G(() => {
138
+ _(() => {
139
139
  n.current = o;
140
- }), G(() => {
140
+ }), _(() => {
141
141
  t.current !== !0 && (t.current = !0, n.current());
142
142
  }, []);
143
143
  }, vt = (o) => {
@@ -148,18 +148,18 @@ const Be = (o) => {
148
148
  ...o
149
149
  }, u = ht(ft, c);
150
150
  return { api: Mt(u, gt), service: u };
151
- }, [ze, Fe] = _({
151
+ }, [ze, Fe] = O({
152
152
  name: "MenuMachineContext",
153
153
  hookName: "useMenuMachineContext",
154
154
  providerName: "<MenuMachineProvider />",
155
155
  strict: !1
156
- }), [We, jt] = _({
156
+ }), [We, jt] = O({
157
157
  name: "MenuMachineContext",
158
158
  hookName: "useMenuMachineContext",
159
159
  providerName: "<MenuMachineProvider />",
160
160
  strict: !1
161
161
  }), Ct = (o) => {
162
- const [n, t] = fe(o), [s, c] = O()(t, [
162
+ const [n, t] = fe(o), [s, c] = $()(t, [
163
163
  "anchorPoint",
164
164
  "aria-label",
165
165
  "closeOnSelect",
@@ -332,7 +332,7 @@ const Ke = ({
332
332
  }, [n]), a = j(() => {
333
333
  n || c(!1);
334
334
  }, [n]);
335
- return G(() => {
335
+ return _(() => {
336
336
  n && c(!1);
337
337
  }, [n]), /* @__PURE__ */ e.jsx(ge, { label: t.text || "", open: s && !n, ...o, children: /* @__PURE__ */ e.jsx(
338
338
  T,
@@ -521,7 +521,7 @@ const Ke = ({
521
521
  shouldTruncateText: Je,
522
522
  ...se
523
523
  } = n || {}, [Qe, Ue] = B(!1), [q, J] = B(""), [F, Q] = B(I);
524
- G(() => {
524
+ _(() => {
525
525
  console.log("positionerProps", t);
526
526
  }, [t]);
527
527
  const ce = D(() => {
@@ -536,10 +536,10 @@ const Ke = ({
536
536
  const P = M.indexOf(l), v = M.indexOf(d);
537
537
  return P !== -1 && v !== -1 ? P - v : P !== -1 ? -1 : v !== -1 ? 1 : 0;
538
538
  });
539
- }, [ce, M]), $ = D(() => I?.filter((r) => r.type === "checkbox") || [], [I]), U = j(
540
- (r) => $.some((l) => l.value === r && l.checked),
541
- [$]
542
- ), b = D(() => $.filter((r) => r.checked), [$]), ie = j(
539
+ }, [ce, M]), R = D(() => I?.filter((r) => r.type === "checkbox") || [], [I]), U = j(
540
+ (r) => R.some((l) => l.value === r && l.checked),
541
+ [R]
542
+ ), b = D(() => R.filter((r) => r.checked), [R]), ie = j(
543
543
  ({ groupName: r, clear: l }) => {
544
544
  let d;
545
545
  const P = F.filter((v) => v.type === "checkbox" && !v.disabled);
@@ -588,7 +588,7 @@ const Ke = ({
588
588
  },
589
589
  [I, a, b]
590
590
  );
591
- return G(() => {
591
+ return _(() => {
592
592
  Q(w ? I : ue(q, I));
593
593
  }, [q, w, ue, I]), /* @__PURE__ */ e.jsxs(
594
594
  bt,
@@ -650,7 +650,7 @@ const Ke = ({
650
650
  "data-testid": `${i}-checkbox-group-header`,
651
651
  px: 3,
652
652
  mt: K ? 1 : 2,
653
- children: y && !!$.length && /* @__PURE__ */ e.jsx(
653
+ children: y && !!R.length && /* @__PURE__ */ e.jsx(
654
654
  pe,
655
655
  {
656
656
  onToggle: ie,
@@ -661,8 +661,8 @@ const Ke = ({
661
661
  ),
662
662
  A && /* @__PURE__ */ e.jsx(z, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(at, { fullScreen: !0 }) }),
663
663
  /* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children: ae.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ae.map(([r, l]) => {
664
- const d = r === "default", P = Object.keys(l), v = d ? st.Fragment : yt, tt = l.checkbox?.map((R) => R.value)?.some(
665
- (R) => b.some((E) => E.value === R && E.checked)
664
+ const d = r === "default", P = Object.keys(l), v = d ? st.Fragment : yt, tt = l.checkbox?.map((L) => L.value)?.some(
665
+ (L) => b.some((E) => E.value === L && E.checked)
666
666
  );
667
667
  return /* @__PURE__ */ e.jsxs(v, { children: [
668
668
  !d && /* @__PURE__ */ e.jsx(At, { children: /* @__PURE__ */ e.jsxs(z, { alignItems: "center", justifyContent: "space-between", children: [
@@ -677,20 +677,23 @@ const Ke = ({
677
677
  )
678
678
  ] }) }),
679
679
  Object.entries(l).map(
680
- ([R, E]) => E.map((L, nt) => {
681
- const { groupLabel: ot, ...rt } = L;
680
+ ([L, E]) => E.map((G, nt) => {
681
+ const { groupLabel: ot, ...rt } = G;
682
682
  return /* @__PURE__ */ e.jsx(
683
683
  _t,
684
684
  {
685
685
  ...rt,
686
686
  shouldTruncateText: Je,
687
- ...L.type === "checkbox" && {
688
- checked: U(L.value)
687
+ ...G.type === "checkbox" && {
688
+ checked: U(G.value)
689
689
  },
690
- "data-testid": `${i}-item-${L.label}`,
691
- onSelect: () => Xe(L)
690
+ "data-testid": `${i}-item-${G.label}`,
691
+ onSelect: () => Xe(G),
692
+ ...G.type === "submenu" && {
693
+ positionerProps: t
694
+ }
692
695
  },
693
- `menu-item-${ot}-${R}-${nt}`
696
+ `menu-item-${ot}-${L}-${nt}`
694
697
  );
695
698
  })
696
699
  )
@@ -706,4 +709,4 @@ const Ke = ({
706
709
  export {
707
710
  Ot as M
708
711
  };
709
- //# sourceMappingURL=menu.component-DgJSzOB8.js.map
712
+ //# sourceMappingURL=menu.component-D_Fd8OGb.js.map