@televet/kibble-ui 4.0.0-beta.41 → 4.0.0-beta.42

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 (61) hide show
  1. package/dist/chunks/button.component-BWlRjD5a.js.map +1 -1
  2. package/dist/chunks/button.component-ytAmAAJg.js.map +1 -1
  3. package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js → buttonGroup.component-BW2Axhrx.js} +2 -2
  4. package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js.map → buttonGroup.component-BW2Axhrx.js.map} +1 -1
  5. package/dist/chunks/{buttonGroup.component-DBpnBBOa.js → buttonGroup.component-DNfCCrv0.js} +2 -2
  6. package/dist/chunks/{buttonGroup.component-DBpnBBOa.js.map → buttonGroup.component-DNfCCrv0.js.map} +1 -1
  7. package/dist/chunks/{conversationCard.component-D2k7g7wc.js → conversationCard.component-CgwVfDma.js} +2 -2
  8. package/dist/chunks/{conversationCard.component-D2k7g7wc.js.map → conversationCard.component-CgwVfDma.js.map} +1 -1
  9. package/dist/chunks/{conversationCard.component-CMudlOxC.js → conversationCard.component-ayXnLFsK.js} +2 -2
  10. package/dist/chunks/{conversationCard.component-CMudlOxC.js.map → conversationCard.component-ayXnLFsK.js.map} +1 -1
  11. package/dist/chunks/{datePicker.component-CAd5ouvo.js → datePicker.component-D4Sge9Xp.js} +2 -2
  12. package/dist/chunks/{datePicker.component-CAd5ouvo.js.map → datePicker.component-D4Sge9Xp.js.map} +1 -1
  13. package/dist/chunks/{datePicker.component-Btc-TcGV.js → datePicker.component-D5TadaSO.js} +2 -2
  14. package/dist/chunks/{datePicker.component-Btc-TcGV.js.map → datePicker.component-D5TadaSO.js.map} +1 -1
  15. package/dist/chunks/icon.component-4aaCABoX.js.map +1 -1
  16. package/dist/chunks/icon.component-BmcWaysM.js.map +1 -1
  17. package/dist/chunks/{menu.component-B5OYYpa8.js → menu.component-CSpIl19i.js} +186 -178
  18. package/dist/chunks/menu.component-CSpIl19i.js.map +1 -0
  19. package/dist/chunks/menu.component-CTehgjjv.js +2 -0
  20. package/dist/chunks/menu.component-CTehgjjv.js.map +1 -0
  21. package/dist/chunks/{radioGroup.component-BqJ9MJq_.js → radioGroup.component-Cisdr-Ir.js} +2 -2
  22. package/dist/chunks/{radioGroup.component-BqJ9MJq_.js.map → radioGroup.component-Cisdr-Ir.js.map} +1 -1
  23. package/dist/chunks/{radioGroup.component-aQ5WaHHz.js → radioGroup.component-O06WADTy.js} +2 -2
  24. package/dist/chunks/{radioGroup.component-aQ5WaHHz.js.map → radioGroup.component-O06WADTy.js.map} +1 -1
  25. package/dist/chunks/{tagBlock.component-DjIgrPCX.js → tagBlock.component-CglDWBFU.js} +2 -2
  26. package/dist/chunks/{tagBlock.component-DjIgrPCX.js.map → tagBlock.component-CglDWBFU.js.map} +1 -1
  27. package/dist/chunks/{tagBlock.component-D_3b0Ebn.js → tagBlock.component-P4wTaTqP.js} +2 -2
  28. package/dist/chunks/{tagBlock.component-D_3b0Ebn.js.map → tagBlock.component-P4wTaTqP.js.map} +1 -1
  29. package/dist/chunks/{theme.provider-DHyAAmb8.js → theme.provider-C1ydkJtd.js} +143 -146
  30. package/dist/chunks/{theme.provider-DHyAAmb8.js.map → theme.provider-C1ydkJtd.js.map} +1 -1
  31. package/dist/chunks/{theme.provider-CGOc_ofu.js → theme.provider-CUQEVC68.js} +2 -2
  32. package/dist/chunks/{theme.provider-CGOc_ofu.js.map → theme.provider-CUQEVC68.js.map} +1 -1
  33. package/dist/cjs/chakra/index.cjs +1 -1
  34. package/dist/cjs/chakra/index.cjs.map +1 -1
  35. package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
  36. package/dist/cjs/components/ConversationCard/index.cjs +1 -1
  37. package/dist/cjs/components/DatePicker/index.cjs +1 -1
  38. package/dist/cjs/components/Menu/index.cjs +1 -1
  39. package/dist/cjs/components/RadioGroup/index.cjs +1 -1
  40. package/dist/cjs/components/TagBlock/index.cjs +1 -1
  41. package/dist/cjs/components/index.cjs +1 -1
  42. package/dist/cjs/index.cjs +1 -1
  43. package/dist/cjs/theme/index.cjs +1 -1
  44. package/dist/esm/chakra/index.js +101 -95
  45. package/dist/esm/chakra/index.js.map +1 -1
  46. package/dist/esm/components/ButtonGroup/index.js +1 -1
  47. package/dist/esm/components/ConversationCard/index.js +1 -1
  48. package/dist/esm/components/DatePicker/index.js +1 -1
  49. package/dist/esm/components/Menu/index.js +1 -1
  50. package/dist/esm/components/RadioGroup/index.js +1 -1
  51. package/dist/esm/components/TagBlock/index.js +1 -1
  52. package/dist/esm/components/index.js +6 -6
  53. package/dist/esm/index.js +7 -7
  54. package/dist/esm/theme/index.js +1 -1
  55. package/dist/types/chakra/index.d.ts +1 -1
  56. package/dist/types/components/Menu/components/MenuItem/menuItem.component.d.ts +3 -2
  57. package/dist/types/components/Menu/menu.component.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/dist/chunks/menu.component-B5OYYpa8.js.map +0 -1
  60. package/dist/chunks/menu.component-BsPmuH77.js +0 -2
  61. package/dist/chunks/menu.component-BsPmuH77.js.map +0 -1
@@ -1,42 +1,42 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import De, { forwardRef as x, useEffect as $, useId as B, useRef as Q, useCallback as j, useState as X, useMemo as y } from "react";
3
- import { B as F } from "./button.component-BWlRjD5a.js";
4
- import { I as te } from "./icon.component-BmcWaysM.js";
5
- import { W as L } from "./text.component-DZkwd4C0.js";
6
- import { F as w } from "./flex-C2d2LH-K.js";
2
+ import De, { forwardRef as x, useEffect as B, useId as F, useRef as X, useCallback as j, useState as Y, useMemo as y } from "react";
3
+ import { B as L } from "./button.component-BWlRjD5a.js";
4
+ import { I as ne } from "./icon.component-BmcWaysM.js";
5
+ import { W as V } from "./text.component-DZkwd4C0.js";
6
+ import { F as T } from "./flex-C2d2LH-K.js";
7
7
  import { W as Ee } from "./textInput.component-c9ySCd-c.js";
8
8
  import { S as He } from "./spinner.component-DRQDBF8j.js";
9
9
  import { B as A } from "./box-y05hq0PT.js";
10
10
  import { W as Ke, u as Ue } from "./checkbox.component-BTG2oHN_.js";
11
- import { a as k, f as g, b as S, u as V, h as qe, i as Je, j as Qe, k as Xe, n as Ye, s as ne, l as oe, m as se, P as Ze } from "./use-locale-context-zakBNK5b.js";
11
+ import { a as k, f as g, b as S, u as z, h as qe, i as Je, j as Qe, k as Xe, n as Ye, s as oe, l as se, m as re, P as Ze } from "./use-locale-context-zakBNK5b.js";
12
12
  import { c as et } from "./create-slot-recipe-context-DJkLYvCT.js";
13
13
  import { b as tt } from "./icons-grAfs3Oz.js";
14
14
  import { c as nt, m as ot } from "./index-sWaESJRS.js";
15
15
  import { U as d } from "./index-DLvqBeH6.js";
16
- const [re, m] = k({
16
+ const [ae, m] = k({
17
17
  name: "MenuContext",
18
18
  hookName: "useMenuContext",
19
19
  providerName: "<MenuProvider />",
20
20
  strict: !1
21
- }), ae = x((o, n) => {
21
+ }), ce = x((o, n) => {
22
22
  const t = m(), s = d(t.getArrowProps(), o);
23
23
  return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
24
24
  });
25
- ae.displayName = "MenuArrow";
26
- const ce = x((o, n) => {
25
+ ce.displayName = "MenuArrow";
26
+ const ue = x((o, n) => {
27
27
  const t = m(), s = d(t.getArrowTipProps(), o);
28
28
  return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
29
29
  });
30
- ce.displayName = "MenuArrowTip";
31
- const [z, Bt] = k({
30
+ ue.displayName = "MenuArrowTip";
31
+ const [W, Bt] = k({
32
32
  name: "MenuItemContext",
33
33
  hookName: "useMenuItemContext",
34
34
  providerName: "<MenuItemProvider />"
35
- }), [ue, ie] = k({
35
+ }), [ie, le] = k({
36
36
  name: "MenuOptionItemPropsContext",
37
37
  hookName: "useMenuOptionItemPropsContext",
38
38
  providerName: "<MenuOptionItemPropsProvider />"
39
- }), le = x((o, n) => {
39
+ }), de = x((o, n) => {
40
40
  const [t, s] = S()(o, [
41
41
  "checked",
42
42
  "closeOnSelect",
@@ -48,25 +48,25 @@ const [z, Bt] = k({
48
48
  ...t,
49
49
  type: "checkbox"
50
50
  }, u = m(), c = d(u.getOptionItemProps(r), s), l = u.getOptionItemState(r);
51
- return /* @__PURE__ */ e.jsx(ue, { value: r, children: /* @__PURE__ */ e.jsx(z, { value: l, children: /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n }) }) });
51
+ return /* @__PURE__ */ e.jsx(ie, { value: r, children: /* @__PURE__ */ e.jsx(W, { value: l, children: /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n }) }) });
52
52
  });
53
- le.displayName = "MenuCheckboxItem";
54
- const de = x((o, n) => {
55
- const t = m(), s = V(), r = d(t.getContentProps(), s.getPresenceProps(), o);
53
+ de.displayName = "MenuCheckboxItem";
54
+ const me = x((o, n) => {
55
+ const t = m(), s = z(), r = d(t.getContentProps(), s.getPresenceProps(), o);
56
56
  return s.unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...r, ref: qe(s.ref, n) });
57
57
  });
58
- de.displayName = "MenuContent";
59
- const me = x((o, n) => {
58
+ me.displayName = "MenuContent";
59
+ const pe = x((o, n) => {
60
60
  const t = m(), s = d(t.getContextTriggerProps(), o);
61
61
  return /* @__PURE__ */ e.jsx(g.button, { ...s, ref: n });
62
62
  });
63
- me.displayName = "MenuContextTrigger";
64
- const pe = x((o, n) => {
63
+ pe.displayName = "MenuContextTrigger";
64
+ const he = x((o, n) => {
65
65
  const t = m(), s = d(t.getIndicatorProps(), o);
66
66
  return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
67
67
  });
68
- pe.displayName = "MenuIndicator";
69
- const he = x((o, n) => {
68
+ he.displayName = "MenuIndicator";
69
+ const xe = x((o, n) => {
70
70
  const [t, s] = S()(o, [
71
71
  "closeOnSelect",
72
72
  "disabled",
@@ -74,89 +74,89 @@ const he = x((o, n) => {
74
74
  "valueText",
75
75
  "onSelect"
76
76
  ]), r = m(), u = d(r.getItemProps(t), s), c = r.getItemState(t);
77
- return $(() => r.addItemListener({ id: c.id, onSelect: t.onSelect }), [c.id, t.onSelect]), /* @__PURE__ */ e.jsx(z, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) });
77
+ return B(() => r.addItemListener({ id: c.id, onSelect: t.onSelect }), [c.id, t.onSelect]), /* @__PURE__ */ e.jsx(W, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) });
78
78
  });
79
- he.displayName = "MenuItem";
80
- const [xe, ge] = k({
79
+ xe.displayName = "MenuItem";
80
+ const [ge, Me] = k({
81
81
  name: "MenuItemGroupContext",
82
82
  hookName: "useMenuItemGroupContext",
83
83
  providerName: "<MenuItemGroupProvider />"
84
- }), Me = x((o, n) => {
85
- const [t, s] = S()(o, ["id"]), r = m(), c = { id: B(), ...t }, l = d(r.getItemGroupProps(c), s);
86
- return /* @__PURE__ */ e.jsx(xe, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
84
+ }), fe = x((o, n) => {
85
+ const [t, s] = S()(o, ["id"]), r = m(), c = { id: F(), ...t }, l = d(r.getItemGroupProps(c), s);
86
+ return /* @__PURE__ */ e.jsx(ge, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
87
87
  });
88
- Me.displayName = "MenuItemGroup";
89
- const fe = x((o, n) => {
90
- const t = m(), s = ge(), r = d(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
91
- return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
92
- });
93
- fe.displayName = "MenuItemGroupLabel";
88
+ fe.displayName = "MenuItemGroup";
94
89
  const Pe = x((o, n) => {
95
- const t = m(), s = ie(), r = d(t.getItemIndicatorProps(s), o);
90
+ const t = m(), s = Me(), r = d(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
96
91
  return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
97
92
  });
98
- Pe.displayName = "MenuItemIndicator";
93
+ Pe.displayName = "MenuItemGroupLabel";
99
94
  const Ie = x((o, n) => {
100
- const t = m(), s = ie(), r = d(t.getItemTextProps(s), o);
95
+ const t = m(), s = le(), r = d(t.getItemIndicatorProps(s), o);
101
96
  return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
102
97
  });
103
- Ie.displayName = "MenuItemText";
98
+ Ie.displayName = "MenuItemIndicator";
104
99
  const ve = x((o, n) => {
105
- const t = m(), s = d(t.getPositionerProps(), o);
106
- return V().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
100
+ const t = m(), s = le(), r = d(t.getItemTextProps(s), o);
101
+ return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
107
102
  });
108
- ve.displayName = "MenuPositioner";
103
+ ve.displayName = "MenuItemText";
109
104
  const Ce = x((o, n) => {
105
+ const t = m(), s = d(t.getPositionerProps(), o);
106
+ return z().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
107
+ });
108
+ Ce.displayName = "MenuPositioner";
109
+ const je = x((o, n) => {
110
110
  const [t, s] = S()(o, [
111
111
  "closeOnSelect",
112
112
  "disabled",
113
113
  "value",
114
114
  "valueText"
115
- ]), r = m(), u = ge(), c = {
115
+ ]), r = m(), u = Me(), c = {
116
116
  ...t,
117
117
  checked: u.value === t.value,
118
118
  type: "radio",
119
119
  onCheckedChange: () => u.onValueChange?.({ value: t.value })
120
- }, l = d(r.getOptionItemProps(c), s), f = r.getOptionItemState(c);
121
- return /* @__PURE__ */ e.jsx(ue, { value: c, children: /* @__PURE__ */ e.jsx(z, { value: f, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) }) });
120
+ }, l = d(r.getOptionItemProps(c), s), M = r.getOptionItemState(c);
121
+ return /* @__PURE__ */ e.jsx(ie, { value: c, children: /* @__PURE__ */ e.jsx(W, { value: M, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) }) });
122
122
  });
123
- Ce.displayName = "MenuRadioItem";
124
- const je = x((o, n) => {
123
+ je.displayName = "MenuRadioItem";
124
+ const be = x((o, n) => {
125
125
  const [t, s] = S()(o, [
126
126
  "id",
127
127
  "onValueChange",
128
128
  "value"
129
- ]), r = m(), c = { id: B(), ...t }, l = d(r.getItemGroupProps({ id: c.id }), s);
130
- return /* @__PURE__ */ e.jsx(xe, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
129
+ ]), r = m(), c = { id: F(), ...t }, l = d(r.getItemGroupProps({ id: c.id }), s);
130
+ return /* @__PURE__ */ e.jsx(ge, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
131
131
  });
132
- je.displayName = "MenuRadioItemGroup";
133
- const be = (o) => {
134
- const n = Q(o), t = Q(!1);
135
- $(() => {
132
+ be.displayName = "MenuRadioItemGroup";
133
+ const ke = (o) => {
134
+ const n = X(o), t = X(!1);
135
+ B(() => {
136
136
  n.current = o;
137
- }), $(() => {
137
+ }), B(() => {
138
138
  t.current !== !0 && (t.current = !0, n.current());
139
139
  }, []);
140
140
  }, st = (o) => {
141
- const n = B(), { getRootNode: t } = Je(), { dir: s } = Qe(), r = {
141
+ const n = F(), { getRootNode: t } = Je(), { dir: s } = Qe(), r = {
142
142
  id: n,
143
143
  dir: s,
144
144
  getRootNode: t,
145
145
  ...o
146
146
  }, u = Xe(ot, r);
147
147
  return { api: nt(u, Ye), service: u };
148
- }, [ke, Se] = k({
148
+ }, [Se, Ne] = k({
149
149
  name: "MenuMachineContext",
150
150
  hookName: "useMenuMachineContext",
151
151
  providerName: "<MenuMachineProvider />",
152
152
  strict: !1
153
- }), [Ne, rt] = k({
153
+ }), [Te, rt] = k({
154
154
  name: "MenuMachineContext",
155
155
  hookName: "useMenuMachineContext",
156
156
  providerName: "<MenuMachineProvider />",
157
157
  strict: !1
158
158
  }), at = (o) => {
159
- const [n, t] = ne(o), [s, r] = S()(t, [
159
+ const [n, t] = oe(o), [s, r] = S()(t, [
160
160
  "anchorPoint",
161
161
  "aria-label",
162
162
  "closeOnSelect",
@@ -178,26 +178,26 @@ const be = (o) => {
178
178
  "open",
179
179
  "positioning",
180
180
  "typeahead"
181
- ]), u = m(), c = Se(), { api: l, service: f } = st(s), v = oe(d({ present: l.open }, n));
182
- be(() => {
183
- c && u && (u.setChild(f), l.setParent(c));
181
+ ]), u = m(), c = Ne(), { api: l, service: M } = st(s), I = se(d({ present: l.open }, n));
182
+ ke(() => {
183
+ c && u && (u.setChild(M), l.setParent(c));
184
184
  });
185
185
  const P = j(() => u?.getTriggerItemProps(l), [l, u]);
186
- return /* @__PURE__ */ e.jsx(Ne, { value: P, children: /* @__PURE__ */ e.jsx(ke, { value: f, children: /* @__PURE__ */ e.jsx(re, { value: l, children: /* @__PURE__ */ e.jsx(se, { value: v, ...r }) }) }) });
186
+ return /* @__PURE__ */ e.jsx(Te, { value: P, children: /* @__PURE__ */ e.jsx(Se, { value: M, children: /* @__PURE__ */ e.jsx(ae, { value: l, children: /* @__PURE__ */ e.jsx(re, { value: I, ...r }) }) }) });
187
187
  }, ct = (o) => {
188
- const n = m(), t = Se(), [s, { value: r, children: u }] = ne(o), { api: c, service: l } = r, f = oe(d({ present: c.open }, s));
189
- be(() => {
188
+ const n = m(), t = Ne(), [s, { value: r, children: u }] = oe(o), { api: c, service: l } = r, M = se(d({ present: c.open }, s));
189
+ ke(() => {
190
190
  t && n && (n.setChild(l), c.setParent(t));
191
191
  });
192
- const v = j(() => n?.getTriggerItemProps(c), [c, n]);
193
- return /* @__PURE__ */ e.jsx(Ne, { value: v, children: /* @__PURE__ */ e.jsx(ke, { value: l, children: /* @__PURE__ */ e.jsx(re, { value: c, children: /* @__PURE__ */ e.jsx(se, { value: f, children: u }) }) }) });
192
+ const I = j(() => n?.getTriggerItemProps(c), [c, n]);
193
+ return /* @__PURE__ */ e.jsx(Te, { value: I, children: /* @__PURE__ */ e.jsx(Se, { value: l, children: /* @__PURE__ */ e.jsx(ae, { value: c, children: /* @__PURE__ */ e.jsx(re, { value: M, children: u }) }) }) });
194
194
  }, we = x((o, n) => {
195
195
  const t = m(), s = d(t.getSeparatorProps(), o);
196
196
  return /* @__PURE__ */ e.jsx(g.hr, { ...s, ref: n });
197
197
  });
198
198
  we.displayName = "MenuSeparator";
199
- const Te = x((o, n) => {
200
- const t = m(), s = V(), r = d(
199
+ const ye = x((o, n) => {
200
+ const t = m(), s = z(), r = d(
201
201
  {
202
202
  ...t.getTriggerProps(),
203
203
  "aria-controls": s.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
@@ -206,29 +206,29 @@ const Te = x((o, n) => {
206
206
  );
207
207
  return /* @__PURE__ */ e.jsx(g.button, { ...r, ref: n });
208
208
  });
209
- Te.displayName = "MenuTrigger";
210
- const ye = x((o, n) => {
209
+ ye.displayName = "MenuTrigger";
210
+ const Ae = x((o, n) => {
211
211
  const t = rt(), s = d(t?.() ?? {}, o);
212
212
  return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
213
213
  });
214
- ye.displayName = "MenuTriggerItem";
214
+ Ae.displayName = "MenuTriggerItem";
215
215
  const {
216
- withRootProvider: Ae,
216
+ withRootProvider: Ge,
217
217
  withContext: p
218
218
  } = et({ key: "menu" });
219
- Ae(
219
+ Ge(
220
220
  ct
221
221
  );
222
- const ut = Ae(at, {
222
+ const ut = Ge(at, {
223
223
  defaultProps: { lazyMount: !0, unmountOnExit: !0 }
224
224
  }), it = p(
225
- Te,
225
+ ye,
226
226
  "trigger",
227
227
  { forwardAsChild: !0 }
228
228
  );
229
- p(me, "contextTrigger", { forwardAsChild: !0 });
229
+ p(pe, "contextTrigger", { forwardAsChild: !0 });
230
230
  const lt = p(
231
- ve,
231
+ Ce,
232
232
  "positioner",
233
233
  { forwardAsChild: !0 }
234
234
  );
@@ -238,35 +238,35 @@ p(
238
238
  { forwardAsChild: !0 }
239
239
  );
240
240
  const dt = p(
241
- de,
241
+ me,
242
242
  "content",
243
243
  { forwardAsChild: !0 }
244
244
  ), mt = p(
245
- ce,
245
+ ue,
246
246
  "arrowTip",
247
247
  { forwardAsChild: !0 }
248
248
  );
249
249
  p(
250
- ae,
250
+ ce,
251
251
  "arrow",
252
252
  { forwardAsChild: !0, defaultProps: { children: /* @__PURE__ */ e.jsx(mt, {}) } }
253
253
  );
254
254
  p(
255
- pe,
255
+ he,
256
256
  "indicator",
257
257
  { forwardAsChild: !0 }
258
258
  );
259
259
  const pt = p(
260
- Me,
260
+ fe,
261
261
  "itemGroup",
262
262
  { forwardAsChild: !0 }
263
- ), ht = p(fe, "itemGroupLabel", { forwardAsChild: !0 }), xt = p(
264
- he,
263
+ ), ht = p(Pe, "itemGroupLabel", { forwardAsChild: !0 }), xt = p(
264
+ xe,
265
265
  "item",
266
266
  { forwardAsChild: !0 }
267
- ), gt = p(ye, "item", { forwardAsChild: !0 });
267
+ ), gt = p(Ae, "item", { forwardAsChild: !0 });
268
268
  p(
269
- Ie,
269
+ ve,
270
270
  "itemText",
271
271
  { forwardAsChild: !0 }
272
272
  );
@@ -274,14 +274,14 @@ p(
274
274
  "kbd",
275
275
  "itemCommand"
276
276
  );
277
- p(Pe, "itemIndicator", {
277
+ p(Ie, "itemIndicator", {
278
278
  forwardAsChild: !0,
279
279
  defaultProps: { children: /* @__PURE__ */ e.jsx(tt, { boxSize: "4" }) }
280
280
  });
281
- const Mt = p(le, "item", { forwardAsChild: !0 });
282
- p(je, "itemGroup", { forwardAsChild: !0 });
281
+ const Mt = p(de, "item", { forwardAsChild: !0 });
282
+ p(be, "itemGroup", { forwardAsChild: !0 });
283
283
  p(
284
- Ce,
284
+ je,
285
285
  "item",
286
286
  { forwardAsChild: !0 }
287
287
  );
@@ -293,7 +293,7 @@ const ft = ({
293
293
  variant: r,
294
294
  ...u
295
295
  }) => /* @__PURE__ */ e.jsxs(
296
- F,
296
+ L,
297
297
  {
298
298
  className: "Menu__Button",
299
299
  "data-testid": "kibble-menu-button",
@@ -302,7 +302,7 @@ const ft = ({
302
302
  ...u,
303
303
  children: [
304
304
  t && /* @__PURE__ */ e.jsx(
305
- L,
305
+ V,
306
306
  {
307
307
  className: "Menu__ButtonText",
308
308
  "data-testid": "kibble-menu-button-text",
@@ -315,11 +315,11 @@ const ft = ({
315
315
  }
316
316
  ),
317
317
  !o && /* @__PURE__ */ e.jsx(
318
- w,
318
+ T,
319
319
  {
320
320
  className: "Menu__ButtonCaret",
321
321
  "data-testid": "kibble-menu-button-caret",
322
- children: /* @__PURE__ */ e.jsx(te, { name: "chevronDown", size: n === "lg" ? "sm" : "xs" })
322
+ children: /* @__PURE__ */ e.jsx(ne, { name: "chevronDown", size: n === "lg" ? "sm" : "xs" })
323
323
  }
324
324
  )
325
325
  ]
@@ -336,7 +336,8 @@ const ft = ({
336
336
  const l = j(() => {
337
337
  t && t(c.value);
338
338
  }, [t, c.value]);
339
- if (r === "submenu")
339
+ if (r === "submenu") {
340
+ const { valueText: M, listProps: I } = c;
340
341
  return /* @__PURE__ */ e.jsx(
341
342
  It,
342
343
  {
@@ -346,9 +347,10 @@ const ft = ({
346
347
  className: "Menu__Item--Submenu",
347
348
  "data-testid": "kibble-menu-item-submenu",
348
349
  justifyContent: "space-between",
350
+ "aria-valuetext": M,
349
351
  children: [
350
352
  /* @__PURE__ */ e.jsx(
351
- R,
353
+ $,
352
354
  {
353
355
  label: o,
354
356
  leftElement: n,
@@ -356,30 +358,32 @@ const ft = ({
356
358
  variant: u
357
359
  }
358
360
  ),
359
- /* @__PURE__ */ e.jsx(te, { name: "chevronRight", size: "sm" })
361
+ /* @__PURE__ */ e.jsx(ne, { name: "chevronRight", size: "sm" })
360
362
  ]
361
363
  }
362
364
  ),
363
- ...c
365
+ portalled: !0,
366
+ listProps: I
364
367
  }
365
368
  );
369
+ }
366
370
  if (r === "checkbox") {
367
- const { checked: f, value: v, ...P } = c;
371
+ const { checked: M, value: I, closeOnSelect: P, ...G } = c;
368
372
  return /* @__PURE__ */ e.jsxs(
369
373
  Mt,
370
374
  {
371
375
  className: "Menu__Item--Checkbox",
372
376
  "data-testid": "kibble-menu-item-checkbox",
373
- value: v,
374
- checked: !!f,
377
+ value: I,
378
+ checked: !!M,
375
379
  onCheckedChange: l,
376
- closeOnSelect: c.closeOnSelect || !1,
380
+ closeOnSelect: P || !1,
377
381
  gap: 3,
378
- ...P,
382
+ ...G,
379
383
  children: [
380
- /* @__PURE__ */ e.jsx(Ke, { checked: !!f, size: "md" }),
384
+ /* @__PURE__ */ e.jsx(Ke, { checked: !!M, size: "md" }),
381
385
  /* @__PURE__ */ e.jsx(
382
- R,
386
+ $,
383
387
  {
384
388
  label: o,
385
389
  leftElement: n,
@@ -392,38 +396,42 @@ const ft = ({
392
396
  );
393
397
  }
394
398
  if (r === "default") {
395
- const { selected: f, value: v, ...P } = c;
399
+ const {
400
+ selected: M = !1,
401
+ value: I,
402
+ ...P
403
+ } = c;
396
404
  return /* @__PURE__ */ e.jsx(
397
405
  xt,
398
406
  {
399
407
  className: "Menu__Item--Default",
400
408
  "data-testid": "kibble-menu-item-default",
401
- value: v,
409
+ value: I,
402
410
  onSelect: l,
403
- ...f && { bgColor: "background.secondaryAlpha.hover" },
411
+ ...M && { bgColor: "background.secondaryAlpha.hover" },
404
412
  ...P,
405
413
  children: /* @__PURE__ */ e.jsx(
406
- R,
414
+ $,
407
415
  {
408
416
  label: o,
409
417
  leftElement: n,
410
418
  shouldTruncateText: s,
411
- variant: f ? "info" : u
419
+ variant: M ? "info" : u
412
420
  }
413
421
  )
414
422
  }
415
423
  );
416
424
  }
417
425
  return /* @__PURE__ */ e.jsx(e.Fragment, {});
418
- }, R = ({
426
+ }, $ = ({
419
427
  label: o,
420
428
  leftElement: n,
421
429
  shouldTruncateText: t,
422
430
  variant: s
423
- }) => /* @__PURE__ */ e.jsxs(w, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
431
+ }) => /* @__PURE__ */ e.jsxs(T, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
424
432
  n,
425
- typeof o == "string" ? /* @__PURE__ */ e.jsx(L, { size: "sm", truncated: t, variant: s, children: o }) : o
426
- ] }), Y = ({
433
+ typeof o == "string" ? /* @__PURE__ */ e.jsx(V, { size: "sm", truncated: t, variant: s, children: o }) : o
434
+ ] }), Z = ({
427
435
  groupName: o,
428
436
  hasSelectedItems: n = !1,
429
437
  onToggle: t
@@ -436,16 +444,16 @@ const ft = ({
436
444
  "data-testid": "kibble-menu-toggle-buttons",
437
445
  ...s ? { textAlign: "right", w: "50%" } : { mt: 2 },
438
446
  children: s ? /* @__PURE__ */ e.jsx(e.Fragment, { children: n ? /* @__PURE__ */ e.jsx(
439
- ee,
447
+ te,
440
448
  {
441
449
  hasSelectedItems: n,
442
450
  groupName: o,
443
451
  onToggle: t
444
452
  }
445
- ) : /* @__PURE__ */ e.jsx(Z, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(w, { justifyContent: "space-between", children: [
446
- /* @__PURE__ */ e.jsx(Z, { groupName: o, onToggle: t }),
453
+ ) : /* @__PURE__ */ e.jsx(ee, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(T, { justifyContent: "space-between", children: [
454
+ /* @__PURE__ */ e.jsx(ee, { groupName: o, onToggle: t }),
447
455
  /* @__PURE__ */ e.jsx(
448
- ee,
456
+ te,
449
457
  {
450
458
  hasSelectedItems: n,
451
459
  groupName: o,
@@ -455,23 +463,23 @@ const ft = ({
455
463
  ] })
456
464
  }
457
465
  );
458
- }, Z = ({
466
+ }, ee = ({
459
467
  groupName: o,
460
468
  onToggle: n
461
469
  }) => /* @__PURE__ */ e.jsx(
462
- F,
470
+ L,
463
471
  {
464
472
  variant: "ghost",
465
473
  size: "xs",
466
474
  onClick: () => n({ groupName: o, clear: !1 }),
467
475
  children: "Select All"
468
476
  }
469
- ), ee = ({
477
+ ), te = ({
470
478
  hasSelectedItems: o,
471
479
  groupName: n,
472
480
  onToggle: t
473
481
  }) => /* @__PURE__ */ e.jsx(
474
- F,
482
+ L,
475
483
  {
476
484
  variant: "ghostNeutral",
477
485
  iconName: "arrowCircle",
@@ -491,65 +499,65 @@ const ft = ({
491
499
  canSelectAll: u,
492
500
  canSelectGroups: c,
493
501
  emptyStateText: l = "No results found",
494
- loading: f,
495
- maxH: v = "480px",
502
+ loading: M,
503
+ maxH: I = "480px",
496
504
  menuItems: P = [],
497
- minW: Ge = "240px",
498
- onSearch: G,
499
- onSelect: W,
500
- onSelectAll: D,
501
- searchable: E,
505
+ minW: G = "240px",
506
+ onSearch: O,
507
+ onSelect: D,
508
+ onSelectAll: E,
509
+ searchable: H,
502
510
  searchPlaceholder: Oe = "Search...",
503
511
  shouldTruncateText: _e,
504
512
  ...Re
505
- } = n || {}, [$e, O] = X(""), [H, _] = X(P), K = y(() => {
513
+ } = n || {}, [$e, _] = Y(""), [K, R] = Y(P), U = y(() => {
506
514
  const a = {};
507
- return H?.forEach((i) => {
508
- const h = i.groupLabel || "default", M = i.type === "checkbox" ? "checkbox" : "default";
509
- a[h] || (a[h] = {}), a[h][M] || (a[h][M] = []), a[h][M].push(i);
515
+ return K?.forEach((i) => {
516
+ const h = i.groupLabel || "default", f = i.type === "checkbox" ? "checkbox" : "default";
517
+ a[h] || (a[h] = {}), a[h][f] || (a[h][f] = []), a[h][f].push(i);
510
518
  }), a;
511
- }, [H]), U = y(() => Object.entries(K), [K]), b = y(
519
+ }, [K]), q = y(() => Object.entries(U), [U]), b = y(
512
520
  () => P?.filter((a) => a.type === "checkbox") || [],
513
521
  [P]
514
- ), Be = y(() => (b?.filter((i) => i.checked) || []).map((i) => i.value), [b]), I = Ue({
522
+ ), Be = y(() => (b?.filter((i) => i.checked) || []).map((i) => i.value), [b]), v = Ue({
515
523
  defaultValue: Be
516
- }), q = j(
524
+ }), J = j(
517
525
  (a) => {
518
526
  const i = a.target.value;
519
- if (O(i), G)
520
- G(a);
527
+ if (_(i), O)
528
+ O(a);
521
529
  else if (i === "" || !i)
522
- _(P);
530
+ R(P);
523
531
  else {
524
- const h = P.filter((M) => !!(typeof M.label == "string" ? M.label : M.valueText)?.toLowerCase().includes(i.toLowerCase()));
525
- _(h);
532
+ const h = P.filter((f) => !!(typeof f.label == "string" ? f.label : f.valueText)?.toLowerCase().includes(i.toLowerCase()));
533
+ R(h);
526
534
  }
527
535
  },
528
- [P, G]
529
- ), J = j(
536
+ [P, O]
537
+ ), Q = j(
530
538
  ({ groupName: a, clear: i }) => {
531
539
  let h = [];
532
540
  if (a) {
533
- const M = b.filter((C) => C.groupLabel === a).map((C) => C.value);
534
- h = i ? I.value.filter((C) => !M.includes(C)) : [...I.value, ...M];
541
+ const f = b.filter((C) => C.groupLabel === a).map((C) => C.value);
542
+ h = i ? v.value.filter((C) => !f.includes(C)) : [...v.value, ...f];
535
543
  } else
536
- h = i ? [] : b.map((M) => M.value);
537
- D?.(h), I.setValue(h);
544
+ h = i ? [] : b.map((f) => f.value);
545
+ E?.(h), v.setValue(h);
538
546
  },
539
- [b, D, I]
547
+ [b, E, v]
540
548
  ), Fe = j(
541
549
  (a) => {
542
550
  a.onSelect?.(a.value);
543
- const i = I.value, h = I.isChecked(a.value);
544
- W?.(
551
+ const i = v.value, h = v.isChecked(a.value);
552
+ D?.(
545
553
  a.value,
546
- h ? i.filter((M) => M !== a.value) : [...i, a.value]
547
- ), a.type === "checkbox" && I.toggleValue(a.value);
554
+ h ? i.filter((f) => f !== a.value) : [...i, a.value]
555
+ ), a.type === "checkbox" && v.toggleValue(a.value);
548
556
  },
549
- [W, I]
557
+ [D, v]
550
558
  ), Le = j(
551
559
  (a) => {
552
- a || (O(""), _(P));
560
+ a || (_(""), R(P));
553
561
  },
554
562
  [P]
555
563
  );
@@ -575,29 +583,29 @@ const ft = ({
575
583
  {
576
584
  className: "Menu__Content",
577
585
  "data-testid": "kibble-menu-content",
578
- maxH: v,
579
- minW: Ge,
586
+ maxH: I,
587
+ minW: G,
580
588
  ...Re,
581
589
  children: [
582
- (E || u) && /* @__PURE__ */ e.jsxs(
590
+ (H || u) && /* @__PURE__ */ e.jsxs(
583
591
  A,
584
592
  {
585
593
  className: "Menu__Header",
586
594
  "data-testid": "kibble-menu-header",
587
595
  m: "0 12px 8px",
588
596
  children: [
589
- E && /* @__PURE__ */ e.jsx(
597
+ H && /* @__PURE__ */ e.jsx(
590
598
  Ee,
591
599
  {
592
600
  className: "Menu__SearchBar",
593
601
  "data-testid": "kibble-menu-search-bar",
594
602
  placeholder: Oe,
595
- onChange: q,
603
+ onChange: J,
596
604
  size: "sm",
597
605
  value: $e,
598
606
  clearable: !0,
599
607
  onClear: () => {
600
- O(""), q({
608
+ _(""), J({
601
609
  target: { value: "" }
602
610
  });
603
611
  },
@@ -605,34 +613,34 @@ const ft = ({
605
613
  }
606
614
  ),
607
615
  u && !!b.length && /* @__PURE__ */ e.jsx(
608
- Y,
616
+ Z,
609
617
  {
610
- onToggle: J,
611
- hasSelectedItems: !!I.value.length
618
+ onToggle: Q,
619
+ hasSelectedItems: !!v.value.length
612
620
  }
613
621
  )
614
622
  ]
615
623
  }
616
624
  ),
617
- f ? /* @__PURE__ */ e.jsx(w, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(He, {}) }) : /* @__PURE__ */ e.jsx(A, { className: "Menu__List", "data-testid": "kibble-menu-list", children: U.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: U.map(([a, i]) => {
618
- const h = a === "default", M = Object.keys(i), C = h ? De.Fragment : pt, Ve = i.checkbox?.map(
625
+ M ? /* @__PURE__ */ e.jsx(T, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(He, {}) }) : /* @__PURE__ */ e.jsx(A, { className: "Menu__List", "data-testid": "kibble-menu-list", children: q.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: q.map(([a, i]) => {
626
+ const h = a === "default", f = Object.keys(i), C = h ? De.Fragment : pt, Ve = i.checkbox?.map(
619
627
  (N) => N.value
620
628
  )?.some(
621
- (N) => I.value.includes(N)
629
+ (N) => v.value.includes(N)
622
630
  );
623
631
  return /* @__PURE__ */ e.jsxs(C, { children: [
624
632
  !h && /* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsxs(
625
- w,
633
+ T,
626
634
  {
627
635
  alignItems: "center",
628
636
  justifyContent: "space-between",
629
637
  children: [
630
638
  a,
631
- c && M.includes("checkbox") && /* @__PURE__ */ e.jsx(
632
- Y,
639
+ c && f.includes("checkbox") && /* @__PURE__ */ e.jsx(
640
+ Z,
633
641
  {
634
642
  groupName: a,
635
- onToggle: J,
643
+ onToggle: Q,
636
644
  hasSelectedItems: Ve
637
645
  }
638
646
  )
@@ -640,21 +648,21 @@ const ft = ({
640
648
  }
641
649
  ) }),
642
650
  Object.entries(i).map(
643
- ([N, ze]) => ze.map((T, We) => /* @__PURE__ */ e.jsx(
651
+ ([N, ze]) => ze.map((w, We) => /* @__PURE__ */ e.jsx(
644
652
  Pt,
645
653
  {
646
- ...T,
654
+ ...w,
647
655
  shouldTruncateText: _e,
648
- ...T.type === "checkbox" && {
649
- checked: I.isChecked(T.value)
656
+ ...w.type === "checkbox" && {
657
+ checked: v.isChecked(w.value)
650
658
  },
651
- onSelect: () => Fe(T)
659
+ onSelect: () => Fe(w)
652
660
  },
653
661
  `menu-item-${a}-${N}-${We}`
654
662
  ))
655
663
  )
656
664
  ] }, a);
657
- }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(A, { textAlign: "center", p: 3, children: /* @__PURE__ */ e.jsx(L, { size: "sm", variant: "subtle", children: l }) }) }) })
665
+ }) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(A, { textAlign: "center", p: 3, children: /* @__PURE__ */ e.jsx(V, { size: "sm", variant: "subtle", children: l }) }) }) })
658
666
  ]
659
667
  }
660
668
  ) }) })
@@ -665,4 +673,4 @@ const ft = ({
665
673
  export {
666
674
  It as M
667
675
  };
668
- //# sourceMappingURL=menu.component-B5OYYpa8.js.map
676
+ //# sourceMappingURL=menu.component-CSpIl19i.js.map