@televet/kibble-ui 5.0.31 → 5.0.32-ne.0
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.
- package/dist/chunks/{avatarGroup.component-ClqXmemB.js → avatarGroup.component-CmVL5P6U.js} +2 -2
- package/dist/chunks/{avatarGroup.component-ClqXmemB.js.map → avatarGroup.component-CmVL5P6U.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-Dvq2vG4z.js → avatarGroup.component-D11DeW7v.js} +2 -2
- package/dist/chunks/{avatarGroup.component-Dvq2vG4z.js.map → avatarGroup.component-D11DeW7v.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-Ce5TKLEN.js → buttonGroup.component-B0aITG8l.js} +2 -2
- package/dist/chunks/{buttonGroup.component-Ce5TKLEN.js.map → buttonGroup.component-B0aITG8l.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-BRafsTrY.js → buttonGroup.component-DU6vLWb8.js} +2 -2
- package/dist/chunks/{buttonGroup.component-BRafsTrY.js.map → buttonGroup.component-DU6vLWb8.js.map} +1 -1
- package/dist/chunks/{calendar.component-D0IcPD3-.js → calendar.component-CraOSJrP.js} +2 -2
- package/dist/chunks/{calendar.component-D0IcPD3-.js.map → calendar.component-CraOSJrP.js.map} +1 -1
- package/dist/chunks/{calendar.component-Dt452bDI.js → calendar.component-DBf462dd.js} +2 -2
- package/dist/chunks/{calendar.component-Dt452bDI.js.map → calendar.component-DBf462dd.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CXEHIrKJ.js → conversationCard.component-BwnANqAs.js} +2 -2
- package/dist/chunks/{conversationCard.component-CXEHIrKJ.js.map → conversationCard.component-BwnANqAs.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-sKlfIP1V.js → conversationCard.component-FImxU2or.js} +2 -2
- package/dist/chunks/{conversationCard.component-sKlfIP1V.js.map → conversationCard.component-FImxU2or.js.map} +1 -1
- package/dist/chunks/{datePicker.component-C-rCSpQD.js → datePicker.component-3BLIgqtC.js} +2 -2
- package/dist/chunks/{datePicker.component-C-rCSpQD.js.map → datePicker.component-3BLIgqtC.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CLkxmQLL.js → datePicker.component-D9xUr5e7.js} +2 -2
- package/dist/chunks/{datePicker.component-CLkxmQLL.js.map → datePicker.component-D9xUr5e7.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-CcGhcyCp.js → datePicker.provider-CdrTfoem.js} +2 -2
- package/dist/chunks/{datePicker.provider-CcGhcyCp.js.map → datePicker.provider-CdrTfoem.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-rPzC-iBh.js → datePicker.provider-nQBNT52b.js} +2 -2
- package/dist/chunks/{datePicker.provider-rPzC-iBh.js.map → datePicker.provider-nQBNT52b.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-CYFud4bA.js → dateTimePicker.component-BCCUPilQ.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-CYFud4bA.js.map → dateTimePicker.component-BCCUPilQ.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-DS_GGUy_.js → dateTimePicker.component-DV9iQjYb.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-DS_GGUy_.js.map → dateTimePicker.component-DV9iQjYb.js.map} +1 -1
- package/dist/chunks/menu.component-FO_IaQrY.js +2 -0
- package/dist/chunks/menu.component-FO_IaQrY.js.map +1 -0
- package/dist/chunks/{menu.component-8gDv-vKT.js → menu.component-f_E3xGpR.js} +201 -195
- package/dist/chunks/menu.component-f_E3xGpR.js.map +1 -0
- package/dist/chunks/{radioGroup.types-BIhmFPWh.js → radioGroup.types-UVzl0SAh.js} +2 -2
- package/dist/chunks/{radioGroup.types-BIhmFPWh.js.map → radioGroup.types-UVzl0SAh.js.map} +1 -1
- package/dist/chunks/{radioGroup.types-BM87sySx.js → radioGroup.types-khflhs4Z.js} +2 -2
- package/dist/chunks/{radioGroup.types-BM87sySx.js.map → radioGroup.types-khflhs4Z.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-R6Ee1sH9.js → tagBlock.component-BjnJ-IwL.js} +2 -2
- package/dist/chunks/{tagBlock.component-R6Ee1sH9.js.map → tagBlock.component-BjnJ-IwL.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-DFnrBQW3.js → tagBlock.component-DhvIcKi9.js} +2 -2
- package/dist/chunks/{tagBlock.component-DFnrBQW3.js.map → tagBlock.component-DhvIcKi9.js.map} +1 -1
- package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/Calendar/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/Calendar/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +2 -2
- package/dist/esm/components/DateTimePicker/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/index.js +10 -10
- package/dist/esm/index.js +10 -10
- package/package.json +1 -1
- package/dist/chunks/menu.component-8gDv-vKT.js.map +0 -1
- package/dist/chunks/menu.component-B_rE1WZ2.js +0 -2
- package/dist/chunks/menu.component-B_rE1WZ2.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import st, { forwardRef as
|
|
2
|
+
import st, { forwardRef as x, useEffect as F, useId as Z, useRef as le, useCallback as j, useState as z, useMemo as K } from "react";
|
|
3
3
|
import { B as T } from "./index-9BerxEcw.js";
|
|
4
|
-
import { B as
|
|
5
|
-
import { I as
|
|
6
|
-
import { W as
|
|
4
|
+
import { B as ee } from "./button.component-BO6oee_V.js";
|
|
5
|
+
import { I as xe } from "./icon.component-PV_nHBId.js";
|
|
6
|
+
import { W as te } from "./text.component-DbJw4Y9-.js";
|
|
7
7
|
import { T as ge } from "./tooltip.component-BWCTmG_j.js";
|
|
8
|
-
import { F as
|
|
8
|
+
import { F as W } from "./flex-CX-8gE9T.js";
|
|
9
9
|
import { W as ct } from "./textInput.component-Co3pNJhe.js";
|
|
10
10
|
import { S as at } from "./spinner.component-BxtAqNQO.js";
|
|
11
11
|
import { u as it } from "./usePortalContentRef-DO_jc4W9.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as ne, s as fe, c as Me, d as Pe, P as ut } from "./index-DcmJgLUo.js";
|
|
13
13
|
import { c as lt } from "./create-slot-recipe-context-D_FXDJGp.js";
|
|
14
14
|
import { d as dt } from "./icons-CEVtpQAi.js";
|
|
15
|
-
import { a as _, d as g, b as
|
|
15
|
+
import { a as _, d as g, b as $, e as pt, u as mt, f as ht, g as xt, n as gt } from "./use-locale-context-DmcfCmf9.js";
|
|
16
16
|
import { m as ft, c as Mt } from "./index-CmREf48Z.js";
|
|
17
17
|
import { a6 as p } from "./index-BcafYtXX.js";
|
|
18
18
|
import { W as Pt } from "./checkbox.component-BoqZIgZE.js";
|
|
@@ -21,26 +21,26 @@ const [ve, m] = _({
|
|
|
21
21
|
hookName: "useMenuContext",
|
|
22
22
|
providerName: "<MenuProvider />",
|
|
23
23
|
strict: !1
|
|
24
|
-
}),
|
|
24
|
+
}), Ce = x((o, n) => {
|
|
25
25
|
const t = m(), s = p(t.getArrowProps(), o);
|
|
26
26
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
27
27
|
});
|
|
28
|
-
|
|
29
|
-
const
|
|
28
|
+
Ce.displayName = "MenuArrow";
|
|
29
|
+
const je = x((o, n) => {
|
|
30
30
|
const t = m(), s = p(t.getArrowTipProps(), o);
|
|
31
31
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
const [
|
|
33
|
+
je.displayName = "MenuArrowTip";
|
|
34
|
+
const [oe, Zt] = _({
|
|
35
35
|
name: "MenuItemContext",
|
|
36
36
|
hookName: "useMenuItemContext",
|
|
37
37
|
providerName: "<MenuItemProvider />"
|
|
38
|
-
}), [
|
|
38
|
+
}), [re, Ie] = _({
|
|
39
39
|
name: "MenuItemPropsContext",
|
|
40
40
|
hookName: "useMenuItemPropsContext",
|
|
41
41
|
providerName: "<MenuItemPropsProvider />"
|
|
42
|
-
}), be =
|
|
43
|
-
const [t, s] =
|
|
42
|
+
}), be = x((o, n) => {
|
|
43
|
+
const [t, s] = $()(o, [
|
|
44
44
|
"checked",
|
|
45
45
|
"closeOnSelect",
|
|
46
46
|
"disabled",
|
|
@@ -51,66 +51,66 @@ const [ne, Zt] = _({
|
|
|
51
51
|
...t,
|
|
52
52
|
type: "checkbox"
|
|
53
53
|
}, u = m(), a = p(u.getOptionItemProps(c), s), i = u.getOptionItemState(c);
|
|
54
|
-
return /* @__PURE__ */ e.jsx(
|
|
54
|
+
return /* @__PURE__ */ e.jsx(re, { value: c, children: /* @__PURE__ */ e.jsx(oe, { value: i, children: /* @__PURE__ */ e.jsx(g.div, { ...a, ref: n }) }) });
|
|
55
55
|
});
|
|
56
56
|
be.displayName = "MenuCheckboxItem";
|
|
57
|
-
const ke =
|
|
58
|
-
const t = m(), s =
|
|
57
|
+
const ke = x((o, n) => {
|
|
58
|
+
const t = m(), s = ne(), c = p(t.getContentProps(), s.getPresenceProps(), o);
|
|
59
59
|
return s.unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...c, ref: pt(s.ref, n) });
|
|
60
60
|
});
|
|
61
61
|
ke.displayName = "MenuContent";
|
|
62
|
-
const Se =
|
|
62
|
+
const Se = x((o, n) => {
|
|
63
63
|
const t = m(), s = p(t.getContextTriggerProps(), o);
|
|
64
64
|
return /* @__PURE__ */ e.jsx(g.button, { ...s, ref: n });
|
|
65
65
|
});
|
|
66
66
|
Se.displayName = "MenuContextTrigger";
|
|
67
|
-
const we =
|
|
67
|
+
const we = x((o, n) => {
|
|
68
68
|
const t = m(), s = p(t.getIndicatorProps(), o);
|
|
69
69
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
70
70
|
});
|
|
71
71
|
we.displayName = "MenuIndicator";
|
|
72
|
-
const Ne =
|
|
73
|
-
const [t, s] =
|
|
72
|
+
const Ne = x((o, n) => {
|
|
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
|
|
80
|
+
return F(() => c.addItemListener({ id: a.id, onSelect: t.onSelect }), [a.id, t.onSelect]), /* @__PURE__ */ e.jsx(re, { value: t, children: /* @__PURE__ */ e.jsx(oe, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) }) });
|
|
81
81
|
});
|
|
82
82
|
Ne.displayName = "MenuItem";
|
|
83
83
|
const [ye, Ae] = _({
|
|
84
84
|
name: "MenuItemGroupContext",
|
|
85
85
|
hookName: "useMenuItemGroupContext",
|
|
86
86
|
providerName: "<MenuItemGroupProvider />"
|
|
87
|
-
}), Te =
|
|
88
|
-
const [t, s] =
|
|
87
|
+
}), Te = x((o, n) => {
|
|
88
|
+
const [t, s] = $()(o, ["id"]), c = m(), a = { id: Z(), ...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";
|
|
92
|
-
const Ge =
|
|
92
|
+
const Ge = x((o, n) => {
|
|
93
93
|
const t = m(), s = Ae(), c = p(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
94
94
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
95
95
|
});
|
|
96
96
|
Ge.displayName = "MenuItemGroupLabel";
|
|
97
|
-
const
|
|
97
|
+
const Oe = x((o, n) => {
|
|
98
98
|
const t = m(), s = Ie(), c = p(t.getItemIndicatorProps(s), o);
|
|
99
99
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
100
100
|
});
|
|
101
|
-
|
|
102
|
-
const
|
|
101
|
+
Oe.displayName = "MenuItemIndicator";
|
|
102
|
+
const _e = x((o, n) => {
|
|
103
103
|
const t = m(), s = Ie(), c = p(t.getItemTextProps(s), o);
|
|
104
104
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
105
105
|
});
|
|
106
|
-
|
|
107
|
-
const $e =
|
|
106
|
+
_e.displayName = "MenuItemText";
|
|
107
|
+
const $e = x((o, n) => {
|
|
108
108
|
const t = m(), s = p(t.getPositionerProps(), o);
|
|
109
|
-
return
|
|
109
|
+
return ne().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
110
110
|
});
|
|
111
111
|
$e.displayName = "MenuPositioner";
|
|
112
|
-
const Re =
|
|
113
|
-
const [t, s] =
|
|
112
|
+
const Re = x((o, n) => {
|
|
113
|
+
const [t, s] = $()(o, [
|
|
114
114
|
"closeOnSelect",
|
|
115
115
|
"disabled",
|
|
116
116
|
"value",
|
|
@@ -121,45 +121,45 @@ const Re = h((o, n) => {
|
|
|
121
121
|
type: "radio",
|
|
122
122
|
onCheckedChange: () => u.onValueChange?.({ value: t.value })
|
|
123
123
|
}, i = p(c.getOptionItemProps(a), s), f = c.getOptionItemState(a);
|
|
124
|
-
return /* @__PURE__ */ e.jsx(
|
|
124
|
+
return /* @__PURE__ */ e.jsx(re, { value: a, children: /* @__PURE__ */ e.jsx(oe, { value: f, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) }) });
|
|
125
125
|
});
|
|
126
126
|
Re.displayName = "MenuRadioItem";
|
|
127
|
-
const Le =
|
|
128
|
-
const [t, s] =
|
|
127
|
+
const Le = x((o, n) => {
|
|
128
|
+
const [t, s] = $()(o, [
|
|
129
129
|
"id",
|
|
130
130
|
"onValueChange",
|
|
131
131
|
"value"
|
|
132
|
-
]), c = m(), a = { id:
|
|
132
|
+
]), c = m(), a = { id: Z(), ...t }, i = p(c.getItemGroupProps({ id: a.id }), s);
|
|
133
133
|
return /* @__PURE__ */ e.jsx(ye, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
|
|
134
134
|
});
|
|
135
135
|
Le.displayName = "MenuRadioItemGroup";
|
|
136
136
|
const Be = (o) => {
|
|
137
137
|
const n = le(o), t = le(!1);
|
|
138
|
-
|
|
138
|
+
F(() => {
|
|
139
139
|
n.current = o;
|
|
140
|
-
}),
|
|
140
|
+
}), F(() => {
|
|
141
141
|
t.current !== !0 && (t.current = !0, n.current());
|
|
142
142
|
}, []);
|
|
143
143
|
}, vt = (o) => {
|
|
144
|
-
const n =
|
|
144
|
+
const n = Z(), { getRootNode: t } = mt(), { dir: s } = ht(), c = {
|
|
145
145
|
id: n,
|
|
146
146
|
dir: s,
|
|
147
147
|
getRootNode: t,
|
|
148
148
|
...o
|
|
149
|
-
}, u =
|
|
149
|
+
}, u = xt(ft, c);
|
|
150
150
|
return { api: Mt(u, gt), service: u };
|
|
151
151
|
}, [ze, Fe] = _({
|
|
152
152
|
name: "MenuMachineContext",
|
|
153
153
|
hookName: "useMenuMachineContext",
|
|
154
154
|
providerName: "<MenuMachineProvider />",
|
|
155
155
|
strict: !1
|
|
156
|
-
}), [We,
|
|
156
|
+
}), [We, Ct] = _({
|
|
157
157
|
name: "MenuMachineContext",
|
|
158
158
|
hookName: "useMenuMachineContext",
|
|
159
159
|
providerName: "<MenuMachineProvider />",
|
|
160
160
|
strict: !1
|
|
161
|
-
}),
|
|
162
|
-
const [n, t] = fe(o), [s, c] =
|
|
161
|
+
}), jt = (o) => {
|
|
162
|
+
const [n, t] = fe(o), [s, c] = $()(t, [
|
|
163
163
|
"anchorPoint",
|
|
164
164
|
"aria-label",
|
|
165
165
|
"closeOnSelect",
|
|
@@ -181,26 +181,26 @@ const Be = (o) => {
|
|
|
181
181
|
"open",
|
|
182
182
|
"positioning",
|
|
183
183
|
"typeahead"
|
|
184
|
-
]), u = m(), a = Fe(), { api: i, service: f } = vt(s),
|
|
184
|
+
]), u = m(), a = Fe(), { api: i, service: f } = vt(s), S = Me(p({ present: i.open }, n));
|
|
185
185
|
Be(() => {
|
|
186
186
|
a && u && (u.setChild(f), i.setParent(a));
|
|
187
187
|
});
|
|
188
|
-
const
|
|
189
|
-
return /* @__PURE__ */ e.jsx(We, { value:
|
|
188
|
+
const N = j(() => u?.getTriggerItemProps(i), [i, u]);
|
|
189
|
+
return /* @__PURE__ */ e.jsx(We, { value: N, children: /* @__PURE__ */ e.jsx(ze, { value: f, children: /* @__PURE__ */ e.jsx(ve, { value: i, children: /* @__PURE__ */ e.jsx(Pe, { value: S, ...c }) }) }) });
|
|
190
190
|
}, It = (o) => {
|
|
191
191
|
const n = m(), t = Fe(), [s, { value: c, children: u }] = fe(o), { api: a, service: i } = c, f = Me(p({ present: a.open }, s));
|
|
192
192
|
Be(() => {
|
|
193
193
|
t && n && (n.setChild(i), a.setParent(t));
|
|
194
194
|
});
|
|
195
|
-
const
|
|
196
|
-
return /* @__PURE__ */ e.jsx(We, { value:
|
|
197
|
-
}, Ee =
|
|
195
|
+
const S = j(() => n?.getTriggerItemProps(a), [a, n]);
|
|
196
|
+
return /* @__PURE__ */ e.jsx(We, { value: S, children: /* @__PURE__ */ e.jsx(ze, { value: i, children: /* @__PURE__ */ e.jsx(ve, { value: a, children: /* @__PURE__ */ e.jsx(Pe, { value: f, children: u }) }) }) });
|
|
197
|
+
}, Ee = x((o, n) => {
|
|
198
198
|
const t = m(), s = p(t.getSeparatorProps(), o);
|
|
199
199
|
return /* @__PURE__ */ e.jsx(g.hr, { ...s, ref: n });
|
|
200
200
|
});
|
|
201
201
|
Ee.displayName = "MenuSeparator";
|
|
202
|
-
const De =
|
|
203
|
-
const t = m(), s =
|
|
202
|
+
const De = x((o, n) => {
|
|
203
|
+
const t = m(), s = ne(), c = p(
|
|
204
204
|
{
|
|
205
205
|
...t.getTriggerProps(),
|
|
206
206
|
"aria-controls": s.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
|
|
@@ -210,80 +210,80 @@ const De = h((o, n) => {
|
|
|
210
210
|
return /* @__PURE__ */ e.jsx(g.button, { ...c, ref: n });
|
|
211
211
|
});
|
|
212
212
|
De.displayName = "MenuTrigger";
|
|
213
|
-
const Ve =
|
|
214
|
-
const t =
|
|
213
|
+
const Ve = x((o, n) => {
|
|
214
|
+
const t = Ct(), s = p(t?.() ?? {}, o);
|
|
215
215
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
216
216
|
});
|
|
217
217
|
Ve.displayName = "MenuTriggerItem";
|
|
218
218
|
const {
|
|
219
219
|
withRootProvider: He,
|
|
220
|
-
withContext:
|
|
220
|
+
withContext: h
|
|
221
221
|
} = lt({ key: "menu" });
|
|
222
222
|
He(
|
|
223
223
|
It
|
|
224
224
|
);
|
|
225
|
-
const bt = He(
|
|
225
|
+
const bt = He(jt, {
|
|
226
226
|
defaultProps: { lazyMount: !0, unmountOnExit: !0 }
|
|
227
|
-
}), kt =
|
|
227
|
+
}), kt = h(
|
|
228
228
|
De,
|
|
229
229
|
"trigger",
|
|
230
230
|
{ forwardAsChild: !0 }
|
|
231
231
|
);
|
|
232
|
-
|
|
233
|
-
const St =
|
|
232
|
+
h(Se, "contextTrigger", { forwardAsChild: !0 });
|
|
233
|
+
const St = h(
|
|
234
234
|
$e,
|
|
235
235
|
"positioner",
|
|
236
236
|
{ forwardAsChild: !0 }
|
|
237
237
|
);
|
|
238
|
-
|
|
238
|
+
h(
|
|
239
239
|
Ee,
|
|
240
240
|
"separator",
|
|
241
241
|
{ forwardAsChild: !0 }
|
|
242
242
|
);
|
|
243
|
-
const wt =
|
|
243
|
+
const wt = h(
|
|
244
244
|
ke,
|
|
245
245
|
"content",
|
|
246
246
|
{ forwardAsChild: !0 }
|
|
247
|
-
), Nt =
|
|
248
|
-
|
|
247
|
+
), Nt = h(
|
|
248
|
+
je,
|
|
249
249
|
"arrowTip",
|
|
250
250
|
{ forwardAsChild: !0 }
|
|
251
251
|
);
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
h(
|
|
253
|
+
Ce,
|
|
254
254
|
"arrow",
|
|
255
255
|
{ forwardAsChild: !0, defaultProps: { children: /* @__PURE__ */ e.jsx(Nt, {}) } }
|
|
256
256
|
);
|
|
257
|
-
|
|
257
|
+
h(
|
|
258
258
|
we,
|
|
259
259
|
"indicator",
|
|
260
260
|
{ forwardAsChild: !0 }
|
|
261
261
|
);
|
|
262
|
-
const yt =
|
|
262
|
+
const yt = h(
|
|
263
263
|
Te,
|
|
264
264
|
"itemGroup",
|
|
265
265
|
{ forwardAsChild: !0 }
|
|
266
|
-
), At =
|
|
266
|
+
), At = h(Ge, "itemGroupLabel", { forwardAsChild: !0 }), de = h(
|
|
267
267
|
Ne,
|
|
268
268
|
"item",
|
|
269
269
|
{ forwardAsChild: !0 }
|
|
270
|
-
), Tt =
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
), Tt = h(Ve, "item", { forwardAsChild: !0 });
|
|
271
|
+
h(
|
|
272
|
+
_e,
|
|
273
273
|
"itemText",
|
|
274
274
|
{ forwardAsChild: !0 }
|
|
275
275
|
);
|
|
276
|
-
|
|
276
|
+
h(
|
|
277
277
|
"kbd",
|
|
278
278
|
"itemCommand"
|
|
279
279
|
);
|
|
280
|
-
|
|
280
|
+
h(Oe, "itemIndicator", {
|
|
281
281
|
forwardAsChild: !0,
|
|
282
282
|
defaultProps: { children: /* @__PURE__ */ e.jsx(dt, { boxSize: "4" }) }
|
|
283
283
|
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
h(be, "item", { forwardAsChild: !0 });
|
|
285
|
+
h(Le, "itemGroup", { forwardAsChild: !0 });
|
|
286
|
+
h(
|
|
287
287
|
Re,
|
|
288
288
|
"item",
|
|
289
289
|
{ forwardAsChild: !0 }
|
|
@@ -298,7 +298,7 @@ const Ke = ({
|
|
|
298
298
|
["data-testid"]: a = "kibble-menu-button",
|
|
299
299
|
...i
|
|
300
300
|
}) => /* @__PURE__ */ e.jsxs(
|
|
301
|
-
|
|
301
|
+
ee,
|
|
302
302
|
{
|
|
303
303
|
className: "Menu__Button",
|
|
304
304
|
"data-testid": a,
|
|
@@ -311,7 +311,7 @@ const Ke = ({
|
|
|
311
311
|
},
|
|
312
312
|
children: [
|
|
313
313
|
t && /* @__PURE__ */ e.jsx(
|
|
314
|
-
|
|
314
|
+
te,
|
|
315
315
|
{
|
|
316
316
|
className: "Menu__ButtonText",
|
|
317
317
|
"data-testid": `${a}-text`,
|
|
@@ -323,16 +323,16 @@ const Ke = ({
|
|
|
323
323
|
children: t
|
|
324
324
|
}
|
|
325
325
|
),
|
|
326
|
-
!o && /* @__PURE__ */ e.jsx(
|
|
326
|
+
!o && /* @__PURE__ */ e.jsx(W, { className: "Menu__ButtonCaret", "data-testid": `${a}-caret`, children: /* @__PURE__ */ e.jsx(xe, { name: "chevronDown", size: n === "lg" ? "sm" : "xs" }) })
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
), Gt = ({ tooltipProps: o, isMenuOpen: n, ...t }) => {
|
|
330
|
-
const [s, c] =
|
|
330
|
+
const [s, c] = z(!1), u = j(() => {
|
|
331
331
|
n || c(!0);
|
|
332
332
|
}, [n]), a = j(() => {
|
|
333
333
|
n || c(!1);
|
|
334
334
|
}, [n]);
|
|
335
|
-
return
|
|
335
|
+
return F(() => {
|
|
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,
|
|
@@ -345,7 +345,7 @@ const Ke = ({
|
|
|
345
345
|
children: /* @__PURE__ */ e.jsx(Ke, { ...t })
|
|
346
346
|
}
|
|
347
347
|
) });
|
|
348
|
-
},
|
|
348
|
+
}, Ot = ({
|
|
349
349
|
label: o,
|
|
350
350
|
leftElement: n,
|
|
351
351
|
onSelect: t,
|
|
@@ -355,38 +355,42 @@ const Ke = ({
|
|
|
355
355
|
["data-testid"]: a = "kibble-menu-item",
|
|
356
356
|
...i
|
|
357
357
|
}) => {
|
|
358
|
-
const [f,
|
|
358
|
+
const [f, S] = z(!1), N = j(() => {
|
|
359
359
|
t && t(i.value);
|
|
360
360
|
}, [t, i.value]);
|
|
361
361
|
if (c === "submenu") {
|
|
362
362
|
const {
|
|
363
|
-
valueText:
|
|
364
|
-
listProps:
|
|
365
|
-
|
|
363
|
+
valueText: w,
|
|
364
|
+
listProps: I,
|
|
365
|
+
positioning: M,
|
|
366
|
+
positionerProps: y,
|
|
366
367
|
portalled: A = !0,
|
|
367
|
-
open:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
368
|
+
open: P,
|
|
369
|
+
onOpenChange: q,
|
|
370
|
+
lazyMount: b = !0,
|
|
371
|
+
unmountOnExit: R = !0
|
|
372
|
+
} = i, E = (G) => {
|
|
373
|
+
P === void 0 && !G.open && S(!1), q?.(G);
|
|
374
|
+
};
|
|
371
375
|
return /* @__PURE__ */ e.jsx(
|
|
372
|
-
|
|
376
|
+
_t,
|
|
373
377
|
{
|
|
374
|
-
lazyMount:
|
|
375
|
-
unmountOnExit:
|
|
378
|
+
lazyMount: b,
|
|
379
|
+
unmountOnExit: R,
|
|
376
380
|
submenuTrigger: /* @__PURE__ */ e.jsxs(
|
|
377
381
|
Tt,
|
|
378
382
|
{
|
|
379
383
|
className: "Menu__Item--Submenu",
|
|
380
384
|
"data-testid": `${a}-submenu`,
|
|
381
385
|
justifyContent: "space-between",
|
|
382
|
-
"aria-valuetext":
|
|
386
|
+
"aria-valuetext": w,
|
|
383
387
|
position: "relative",
|
|
384
388
|
onClick: () => {
|
|
385
|
-
|
|
389
|
+
P !== void 0 && t ? t(i.value) : S(!f);
|
|
386
390
|
},
|
|
387
391
|
children: [
|
|
388
392
|
/* @__PURE__ */ e.jsx(
|
|
389
|
-
|
|
393
|
+
Y,
|
|
390
394
|
{
|
|
391
395
|
label: o,
|
|
392
396
|
leftElement: n,
|
|
@@ -394,40 +398,42 @@ const Ke = ({
|
|
|
394
398
|
variant: u
|
|
395
399
|
}
|
|
396
400
|
),
|
|
397
|
-
/* @__PURE__ */ e.jsx(
|
|
401
|
+
/* @__PURE__ */ e.jsx(xe, { name: "chevronRight", size: "sm" })
|
|
398
402
|
]
|
|
399
403
|
}
|
|
400
404
|
),
|
|
401
405
|
portalled: A,
|
|
402
|
-
open:
|
|
403
|
-
|
|
404
|
-
|
|
406
|
+
open: P !== void 0 ? P : f,
|
|
407
|
+
onOpenChange: E,
|
|
408
|
+
listProps: I,
|
|
409
|
+
positioning: M,
|
|
410
|
+
positionerProps: y
|
|
405
411
|
}
|
|
406
412
|
);
|
|
407
413
|
}
|
|
408
414
|
if (c === "checkbox") {
|
|
409
|
-
const { checked:
|
|
415
|
+
const { checked: w, value: I, disabled: M, tooltipLabel: y, ...A } = i;
|
|
410
416
|
return /* @__PURE__ */ e.jsxs(
|
|
411
417
|
de,
|
|
412
418
|
{
|
|
413
419
|
className: "Menu__Item--Checkbox",
|
|
414
420
|
"data-testid": `${a}-checkbox`,
|
|
415
|
-
value:
|
|
421
|
+
value: I,
|
|
416
422
|
closeOnSelect: !1,
|
|
417
|
-
onSelect: M ? void 0 :
|
|
423
|
+
onSelect: M ? void 0 : N,
|
|
418
424
|
gap: 3,
|
|
419
425
|
disabled: M,
|
|
420
|
-
...
|
|
426
|
+
...A,
|
|
421
427
|
children: [
|
|
422
|
-
/* @__PURE__ */ e.jsx(Pt, { checked: !!
|
|
428
|
+
/* @__PURE__ */ e.jsx(Pt, { checked: !!w, disabled: M, size: "md", fullWidth: !1 }),
|
|
423
429
|
/* @__PURE__ */ e.jsx(
|
|
424
|
-
|
|
430
|
+
Y,
|
|
425
431
|
{
|
|
426
432
|
label: o,
|
|
427
433
|
leftElement: n,
|
|
428
434
|
shouldTruncateText: s,
|
|
429
435
|
variant: u,
|
|
430
|
-
tooltipLabel:
|
|
436
|
+
tooltipLabel: y
|
|
431
437
|
}
|
|
432
438
|
)
|
|
433
439
|
]
|
|
@@ -435,41 +441,41 @@ const Ke = ({
|
|
|
435
441
|
);
|
|
436
442
|
}
|
|
437
443
|
if (c === "default") {
|
|
438
|
-
const { selected:
|
|
444
|
+
const { selected: w = !1, disabled: I, value: M, tooltipLabel: y, ...A } = i;
|
|
439
445
|
return /* @__PURE__ */ e.jsx(
|
|
440
446
|
de,
|
|
441
447
|
{
|
|
442
448
|
className: "Menu__Item--Default",
|
|
443
449
|
"data-testid": `${a}-default`,
|
|
444
450
|
value: M,
|
|
445
|
-
onSelect:
|
|
446
|
-
disabled:
|
|
447
|
-
...
|
|
448
|
-
...
|
|
451
|
+
onSelect: I ? void 0 : N,
|
|
452
|
+
disabled: I,
|
|
453
|
+
...w && { bgColor: "background.secondaryAlpha.hover" },
|
|
454
|
+
...A,
|
|
449
455
|
children: /* @__PURE__ */ e.jsx(
|
|
450
|
-
|
|
456
|
+
Y,
|
|
451
457
|
{
|
|
452
458
|
label: o,
|
|
453
459
|
leftElement: n,
|
|
454
460
|
shouldTruncateText: s,
|
|
455
|
-
variant:
|
|
456
|
-
tooltipLabel:
|
|
461
|
+
variant: w ? "info" : u,
|
|
462
|
+
tooltipLabel: y
|
|
457
463
|
}
|
|
458
464
|
)
|
|
459
465
|
}
|
|
460
466
|
);
|
|
461
467
|
}
|
|
462
468
|
return /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
463
|
-
},
|
|
469
|
+
}, Y = ({
|
|
464
470
|
label: o,
|
|
465
471
|
leftElement: n,
|
|
466
472
|
shouldTruncateText: t,
|
|
467
473
|
variant: s,
|
|
468
474
|
tooltipLabel: c
|
|
469
475
|
}) => {
|
|
470
|
-
const u = /* @__PURE__ */ e.jsxs(
|
|
476
|
+
const u = /* @__PURE__ */ e.jsxs(W, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
|
|
471
477
|
n,
|
|
472
|
-
typeof o == "string" ? /* @__PURE__ */ e.jsx(
|
|
478
|
+
typeof o == "string" ? /* @__PURE__ */ e.jsx(te, { size: "sm", truncated: t, variant: s, children: o }) : o
|
|
473
479
|
] });
|
|
474
480
|
return c ? /* @__PURE__ */ e.jsx(ge, { label: c, children: u }) : u;
|
|
475
481
|
}, pe = ({
|
|
@@ -479,12 +485,12 @@ const Ke = ({
|
|
|
479
485
|
["data-testid"]: s = "kibble-menu-toggle-buttons"
|
|
480
486
|
}) => {
|
|
481
487
|
const c = !!o;
|
|
482
|
-
return /* @__PURE__ */ e.jsx(T, { className: "Menu__ToggleButtons", "data-testid": s, ...c && { textAlign: "right", w: "50%" }, children: c ? /* @__PURE__ */ e.jsx(e.Fragment, { children: n ? /* @__PURE__ */ e.jsx(
|
|
488
|
+
return /* @__PURE__ */ e.jsx(T, { className: "Menu__ToggleButtons", "data-testid": s, ...c && { textAlign: "right", w: "50%" }, children: c ? /* @__PURE__ */ e.jsx(e.Fragment, { children: n ? /* @__PURE__ */ e.jsx(he, { hasSelectedItems: n, groupName: o, onToggle: t }) : /* @__PURE__ */ e.jsx(me, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(W, { justifyContent: "space-between", children: [
|
|
483
489
|
/* @__PURE__ */ e.jsx(me, { groupName: o, onToggle: t }),
|
|
484
|
-
/* @__PURE__ */ e.jsx(
|
|
490
|
+
/* @__PURE__ */ e.jsx(he, { hasSelectedItems: n, groupName: o, onToggle: t })
|
|
485
491
|
] }) });
|
|
486
|
-
}, me = ({ groupName: o, onToggle: n }) => /* @__PURE__ */ e.jsx(
|
|
487
|
-
|
|
492
|
+
}, me = ({ groupName: o, onToggle: n }) => /* @__PURE__ */ e.jsx(ee, { variant: "ghost", size: "xs", onClick: () => n({ groupName: o, clear: !1 }), children: "Select All" }), he = ({ hasSelectedItems: o, groupName: n, onToggle: t }) => /* @__PURE__ */ e.jsx(
|
|
493
|
+
ee,
|
|
488
494
|
{
|
|
489
495
|
variant: "ghostNeutral",
|
|
490
496
|
iconName: "arrowCircle",
|
|
@@ -493,7 +499,7 @@ const Ke = ({
|
|
|
493
499
|
onClick: () => t({ groupName: n, clear: !0 }),
|
|
494
500
|
children: "Clear All"
|
|
495
501
|
}
|
|
496
|
-
),
|
|
502
|
+
), _t = ({
|
|
497
503
|
buttonProps: o,
|
|
498
504
|
listProps: n,
|
|
499
505
|
positionerProps: t,
|
|
@@ -504,89 +510,89 @@ const Ke = ({
|
|
|
504
510
|
["data-testid"]: i = "kibble-menu",
|
|
505
511
|
...f
|
|
506
512
|
}) => {
|
|
507
|
-
const { contentRef:
|
|
508
|
-
canSelectAll:
|
|
509
|
-
canSelectGroups:
|
|
510
|
-
emptyState:
|
|
513
|
+
const { contentRef: S } = it(), {
|
|
514
|
+
canSelectAll: N,
|
|
515
|
+
canSelectGroups: w,
|
|
516
|
+
emptyState: I = "No results found",
|
|
511
517
|
groupSortOrder: M,
|
|
512
|
-
loading:
|
|
513
|
-
maxH:
|
|
514
|
-
menuItems:
|
|
515
|
-
minW:
|
|
516
|
-
onSearch:
|
|
517
|
-
onSelect:
|
|
518
|
-
onSelectAll:
|
|
519
|
-
searchable:
|
|
518
|
+
loading: y,
|
|
519
|
+
maxH: A = "480px",
|
|
520
|
+
menuItems: P = [],
|
|
521
|
+
minW: q = "240px",
|
|
522
|
+
onSearch: b,
|
|
523
|
+
onSelect: R,
|
|
524
|
+
onSelectAll: E,
|
|
525
|
+
searchable: G,
|
|
520
526
|
searchPlaceholder: qe = "Search...",
|
|
521
527
|
shouldTruncateText: Je,
|
|
522
528
|
...se
|
|
523
|
-
} = n || {}, [Qe, Ue] =
|
|
529
|
+
} = n || {}, [Qe, Ue] = z(!1), [J, Q] = z(""), [D, U] = z(P), ce = K(() => {
|
|
524
530
|
const r = {};
|
|
525
|
-
return
|
|
526
|
-
const d = l.groupLabel || "default",
|
|
527
|
-
r[d] || (r[d] = {}), r[d][
|
|
531
|
+
return D?.forEach((l) => {
|
|
532
|
+
const d = l.groupLabel || "default", v = l.type === "checkbox" ? "checkbox" : "default";
|
|
533
|
+
r[d] || (r[d] = {}), r[d][v] || (r[d][v] = []), r[d][v].push(l);
|
|
528
534
|
}), r;
|
|
529
|
-
}, [
|
|
535
|
+
}, [D]), ae = K(() => {
|
|
530
536
|
const r = Object.entries(ce);
|
|
531
537
|
return !M || M.length === 0 ? r : r.sort(([l], [d]) => {
|
|
532
|
-
const
|
|
533
|
-
return
|
|
538
|
+
const v = M.indexOf(l), C = M.indexOf(d);
|
|
539
|
+
return v !== -1 && C !== -1 ? v - C : v !== -1 ? -1 : C !== -1 ? 1 : 0;
|
|
534
540
|
});
|
|
535
|
-
}, [ce, M]),
|
|
536
|
-
(r) =>
|
|
537
|
-
[
|
|
538
|
-
),
|
|
541
|
+
}, [ce, M]), L = K(() => P?.filter((r) => r.type === "checkbox") || [], [P]), X = j(
|
|
542
|
+
(r) => L.some((l) => l.value === r && l.checked),
|
|
543
|
+
[L]
|
|
544
|
+
), k = K(() => L.filter((r) => r.checked), [L]), ie = j(
|
|
539
545
|
({ groupName: r, clear: l }) => {
|
|
540
546
|
let d;
|
|
541
|
-
const
|
|
547
|
+
const v = D.filter((C) => C.type === "checkbox" && !C.disabled);
|
|
542
548
|
if (r) {
|
|
543
|
-
const
|
|
544
|
-
d = l ?
|
|
549
|
+
const C = v.filter((V) => V.groupLabel === r);
|
|
550
|
+
d = l ? k.filter((V) => V.groupLabel !== r) : (
|
|
545
551
|
// Otherwise, add the items in the group to the selected items
|
|
546
|
-
[.../* @__PURE__ */ new Set([...
|
|
552
|
+
[.../* @__PURE__ */ new Set([...k, ...C])]
|
|
547
553
|
);
|
|
548
554
|
} else
|
|
549
|
-
d = l ? [] :
|
|
550
|
-
|
|
555
|
+
d = l ? [] : v.map((C) => ({ ...C, checked: !0 }));
|
|
556
|
+
E?.({ allSelectedItems: d });
|
|
551
557
|
},
|
|
552
|
-
[
|
|
558
|
+
[E, D, k]
|
|
553
559
|
), Xe = j(
|
|
554
560
|
(r) => {
|
|
555
561
|
if (r.type === "checkbox") {
|
|
556
|
-
const l =
|
|
562
|
+
const l = X(r.value) ? k.filter((d) => d.value !== r.value) : [...k, r];
|
|
557
563
|
if (r.onSelect) {
|
|
558
564
|
r.onSelect(r.value);
|
|
559
565
|
return;
|
|
560
566
|
}
|
|
561
|
-
|
|
567
|
+
R?.({ item: r, allSelectedItems: l });
|
|
562
568
|
return;
|
|
563
569
|
}
|
|
564
570
|
if (r.onSelect) {
|
|
565
571
|
r.onSelect(r.value);
|
|
566
572
|
return;
|
|
567
573
|
}
|
|
568
|
-
|
|
574
|
+
R?.({ item: r, allSelectedItems: [r] });
|
|
569
575
|
},
|
|
570
|
-
[
|
|
576
|
+
[R, X, k]
|
|
571
577
|
), ue = j((r, l) => r === "" || !r ? l : l.filter((d) => !!(typeof d.label == "string" ? d.label : d.valueText)?.toLowerCase().includes(r.toLowerCase())), []), Ye = j(
|
|
572
578
|
(r) => {
|
|
573
579
|
const l = r.target.value;
|
|
574
|
-
|
|
580
|
+
Q(l), b && b(r);
|
|
575
581
|
},
|
|
576
|
-
[
|
|
582
|
+
[b]
|
|
577
583
|
), Ze = j(() => {
|
|
578
|
-
|
|
584
|
+
Q(""), b && b({
|
|
579
585
|
target: { value: "" }
|
|
580
586
|
});
|
|
581
|
-
}, [
|
|
587
|
+
}, [b]), et = j(
|
|
582
588
|
(r) => {
|
|
583
|
-
Ue(r), r || (
|
|
589
|
+
Ue(r), r || (Q(""), U(P)), a && a({ open: r, allSelectedItems: k });
|
|
584
590
|
},
|
|
585
|
-
[
|
|
591
|
+
[P, a, k]
|
|
586
592
|
);
|
|
587
|
-
return
|
|
588
|
-
|
|
589
|
-
}, [
|
|
593
|
+
return F(() => {
|
|
594
|
+
U(b ? P : ue(J, P));
|
|
595
|
+
}, [J, b, ue, P]), /* @__PURE__ */ e.jsxs(
|
|
590
596
|
bt,
|
|
591
597
|
{
|
|
592
598
|
lazyMount: u,
|
|
@@ -597,20 +603,20 @@ const Ke = ({
|
|
|
597
603
|
...f,
|
|
598
604
|
children: [
|
|
599
605
|
c || /* @__PURE__ */ e.jsx(kt, { asChild: !0, className: "Menu__Trigger", "data-testid": `${i}-trigger`, children: o?.showTooltip ? /* @__PURE__ */ e.jsx(Gt, { isMenuOpen: Qe, ...o }) : /* @__PURE__ */ e.jsx(Ke, { ...o }) }),
|
|
600
|
-
/* @__PURE__ */ e.jsx(ut, { disabled: !s, container:
|
|
606
|
+
/* @__PURE__ */ e.jsx(ut, { disabled: !s, container: S || void 0, children: /* @__PURE__ */ e.jsx(St, { className: "Menu", "data-testid": i, ...t, children: /* @__PURE__ */ e.jsxs(
|
|
601
607
|
wt,
|
|
602
608
|
{
|
|
603
609
|
className: "Menu__Content",
|
|
604
610
|
"data-testid": `${i}-content`,
|
|
605
|
-
maxH:
|
|
606
|
-
minW:
|
|
611
|
+
maxH: A,
|
|
612
|
+
minW: q,
|
|
607
613
|
...se,
|
|
608
|
-
...
|
|
614
|
+
...G && { pt: "0" },
|
|
609
615
|
onClick: (r) => {
|
|
610
616
|
r.stopPropagation(), se?.onClick?.(r);
|
|
611
617
|
},
|
|
612
618
|
children: [
|
|
613
|
-
|
|
619
|
+
G && /* @__PURE__ */ e.jsx(
|
|
614
620
|
T,
|
|
615
621
|
{
|
|
616
622
|
className: "Menu__SearchBarContainer",
|
|
@@ -629,7 +635,7 @@ const Ke = ({
|
|
|
629
635
|
placeholder: qe,
|
|
630
636
|
onChange: Ye,
|
|
631
637
|
size: "sm",
|
|
632
|
-
value:
|
|
638
|
+
value: J,
|
|
633
639
|
clearable: !0,
|
|
634
640
|
onClear: Ze,
|
|
635
641
|
onKeyDown: (r) => {
|
|
@@ -639,31 +645,31 @@ const Ke = ({
|
|
|
639
645
|
)
|
|
640
646
|
}
|
|
641
647
|
),
|
|
642
|
-
|
|
648
|
+
N && /* @__PURE__ */ e.jsx(
|
|
643
649
|
T,
|
|
644
650
|
{
|
|
645
651
|
className: "Menu__CheckboxGroupHeader",
|
|
646
652
|
"data-testid": `${i}-checkbox-group-header`,
|
|
647
653
|
px: 3,
|
|
648
|
-
mt:
|
|
649
|
-
children:
|
|
654
|
+
mt: G ? 1 : 2,
|
|
655
|
+
children: N && !!L.length && /* @__PURE__ */ e.jsx(
|
|
650
656
|
pe,
|
|
651
657
|
{
|
|
652
658
|
onToggle: ie,
|
|
653
|
-
hasSelectedItems: !!
|
|
659
|
+
hasSelectedItems: !!k.length
|
|
654
660
|
}
|
|
655
661
|
)
|
|
656
662
|
}
|
|
657
663
|
),
|
|
658
|
-
|
|
664
|
+
y && /* @__PURE__ */ e.jsx(W, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(at, { fullScreen: !0 }) }),
|
|
659
665
|
/* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children: ae.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ae.map(([r, l]) => {
|
|
660
|
-
const d = r === "default",
|
|
661
|
-
(
|
|
666
|
+
const d = r === "default", v = Object.keys(l), C = d ? st.Fragment : yt, tt = l.checkbox?.map((B) => B.value)?.some(
|
|
667
|
+
(B) => k.some((H) => H.value === B && H.checked)
|
|
662
668
|
);
|
|
663
|
-
return /* @__PURE__ */ e.jsxs(
|
|
664
|
-
!d && /* @__PURE__ */ e.jsx(At, { children: /* @__PURE__ */ e.jsxs(
|
|
669
|
+
return /* @__PURE__ */ e.jsxs(C, { children: [
|
|
670
|
+
!d && /* @__PURE__ */ e.jsx(At, { children: /* @__PURE__ */ e.jsxs(W, { alignItems: "center", justifyContent: "space-between", children: [
|
|
665
671
|
r,
|
|
666
|
-
|
|
672
|
+
w && v.includes("checkbox") && /* @__PURE__ */ e.jsx(
|
|
667
673
|
pe,
|
|
668
674
|
{
|
|
669
675
|
groupName: r,
|
|
@@ -673,28 +679,28 @@ const Ke = ({
|
|
|
673
679
|
)
|
|
674
680
|
] }) }),
|
|
675
681
|
Object.entries(l).map(
|
|
676
|
-
([
|
|
677
|
-
const { groupLabel: ot, ...rt } =
|
|
682
|
+
([B, H]) => H.map((O, nt) => {
|
|
683
|
+
const { groupLabel: ot, ...rt } = O;
|
|
678
684
|
return /* @__PURE__ */ e.jsx(
|
|
679
|
-
|
|
685
|
+
Ot,
|
|
680
686
|
{
|
|
681
687
|
shouldTruncateText: Je,
|
|
682
|
-
...
|
|
683
|
-
checked:
|
|
688
|
+
...O.type === "checkbox" && {
|
|
689
|
+
checked: X(O.value)
|
|
684
690
|
},
|
|
685
|
-
onSelect: () => Xe(
|
|
686
|
-
...
|
|
691
|
+
onSelect: () => Xe(O),
|
|
692
|
+
...O.type === "submenu" && {
|
|
687
693
|
positionerProps: t
|
|
688
694
|
},
|
|
689
695
|
...rt,
|
|
690
|
-
"data-testid": `${i}-item-${
|
|
696
|
+
"data-testid": `${i}-item-${O.label}`
|
|
691
697
|
},
|
|
692
|
-
`menu-item-${ot}-${
|
|
698
|
+
`menu-item-${ot}-${B}-${nt}`
|
|
693
699
|
);
|
|
694
700
|
})
|
|
695
701
|
)
|
|
696
702
|
] }, r);
|
|
697
|
-
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(T, { p: 3, children: typeof
|
|
703
|
+
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(T, { p: 3, children: typeof I == "string" ? /* @__PURE__ */ e.jsx(T, { textAlign: "center", children: /* @__PURE__ */ e.jsx(te, { size: "sm", variant: "subtle", "data-testid": `${i}-empty-state`, children: I }) }) : I }) }) })
|
|
698
704
|
]
|
|
699
705
|
}
|
|
700
706
|
) }) })
|
|
@@ -703,6 +709,6 @@ const Ke = ({
|
|
|
703
709
|
);
|
|
704
710
|
};
|
|
705
711
|
export {
|
|
706
|
-
|
|
712
|
+
_t as M
|
|
707
713
|
};
|
|
708
|
-
//# sourceMappingURL=menu.component-
|
|
714
|
+
//# sourceMappingURL=menu.component-f_E3xGpR.js.map
|