@televet/kibble-ui 5.0.2-beta.menu.8 → 5.0.2
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-COjOeEzP.js → avatarGroup.component-B-ZOhj7i.js} +2 -2
- package/dist/chunks/{avatarGroup.component-COjOeEzP.js.map → avatarGroup.component-B-ZOhj7i.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-CBvvdf0q.js → avatarGroup.component-CTBfGiSm.js} +2 -2
- package/dist/chunks/{avatarGroup.component-CBvvdf0q.js.map → avatarGroup.component-CTBfGiSm.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-o5tkiXFo.js → buttonGroup.component-CowJsbr7.js} +2 -2
- package/dist/chunks/{buttonGroup.component-o5tkiXFo.js.map → buttonGroup.component-CowJsbr7.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-w2gD_tRa.js → buttonGroup.component-DUK2FgFn.js} +2 -2
- package/dist/chunks/{buttonGroup.component-w2gD_tRa.js.map → buttonGroup.component-DUK2FgFn.js.map} +1 -1
- package/dist/chunks/{calendar.component-D4xLm7HX.js → calendar.component-CHIhplfO.js} +2 -2
- package/dist/chunks/{calendar.component-D4xLm7HX.js.map → calendar.component-CHIhplfO.js.map} +1 -1
- package/dist/chunks/{calendar.component-CGJ5x-Qv.js → calendar.component-tOoK1NrU.js} +2 -2
- package/dist/chunks/{calendar.component-CGJ5x-Qv.js.map → calendar.component-tOoK1NrU.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-iKr4a8HY.js → conversationCard.component-BrDGshOG.js} +2 -2
- package/dist/chunks/{conversationCard.component-iKr4a8HY.js.map → conversationCard.component-BrDGshOG.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-apjIrjQm.js → conversationCard.component-CMdqD3yN.js} +2 -2
- package/dist/chunks/{conversationCard.component-apjIrjQm.js.map → conversationCard.component-CMdqD3yN.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Dge05iNR.js → datePicker.component-C6cD1_HR.js} +2 -2
- package/dist/chunks/{datePicker.component-Dge05iNR.js.map → datePicker.component-C6cD1_HR.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Akxu5prm.js → datePicker.component-eHU7IZgC.js} +2 -2
- package/dist/chunks/{datePicker.component-Akxu5prm.js.map → datePicker.component-eHU7IZgC.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-C0ZPlS_w.js → datePicker.provider-BWHE-9FA.js} +2 -2
- package/dist/chunks/{datePicker.provider-C0ZPlS_w.js.map → datePicker.provider-BWHE-9FA.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-DRLTY1WB.js → datePicker.provider-DgarjPPd.js} +2 -2
- package/dist/chunks/{datePicker.provider-DRLTY1WB.js.map → datePicker.provider-DgarjPPd.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-DwxiI40o.js → dateTimePicker.component-Byjxg2lJ.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-DwxiI40o.js.map → dateTimePicker.component-Byjxg2lJ.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-B4PptH6R.js → dateTimePicker.component-REz9iX4S.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-B4PptH6R.js.map → dateTimePicker.component-REz9iX4S.js.map} +1 -1
- package/dist/chunks/menu.component-D4-4xRDj.js +2 -0
- package/dist/chunks/menu.component-D4-4xRDj.js.map +1 -0
- package/dist/chunks/{menu.component-BIFydd_a.js → menu.component-DwTen8Uv.js} +194 -198
- package/dist/chunks/menu.component-DwTen8Uv.js.map +1 -0
- package/dist/chunks/{radioGroup.types-Dy1foOMp.js → radioGroup.types-C7A8mLMz.js} +2 -2
- package/dist/chunks/{radioGroup.types-Dy1foOMp.js.map → radioGroup.types-C7A8mLMz.js.map} +1 -1
- package/dist/chunks/{radioGroup.types-pv_55Qu5.js → radioGroup.types-DJ68ERdO.js} +2 -2
- package/dist/chunks/{radioGroup.types-pv_55Qu5.js.map → radioGroup.types-DJ68ERdO.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-B_9Y9Mrj.js → tagBlock.component-BGEvRu81.js} +2 -2
- package/dist/chunks/{tagBlock.component-B_9Y9Mrj.js.map → tagBlock.component-BGEvRu81.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-CEjuZKgL.js → tagBlock.component-Cor6eakc.js} +2 -2
- package/dist/chunks/{tagBlock.component-CEjuZKgL.js.map → tagBlock.component-Cor6eakc.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-BIFydd_a.js.map +0 -1
- package/dist/chunks/menu.component-Di98aPH0.js +0 -2
- package/dist/chunks/menu.component-Di98aPH0.js.map +0 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import st, { forwardRef as
|
|
2
|
+
import st, { forwardRef as x, useEffect as B, useId as X, useRef as ue, useCallback as j, useState as L, useMemo as D } from "react";
|
|
3
3
|
import { B as T } from "./index-9BerxEcw.js";
|
|
4
|
-
import { B as
|
|
4
|
+
import { B as Y } from "./button.component-BO6oee_V.js";
|
|
5
5
|
import { I as he } from "./icon.component-PV_nHBId.js";
|
|
6
|
-
import { W as
|
|
7
|
-
import { T as
|
|
6
|
+
import { W as Z } from "./text.component-CdTyTFds.js";
|
|
7
|
+
import { T as xe } from "./tooltip.component-C_NS-AoH.js";
|
|
8
8
|
import { F as z } from "./flex-CX-8gE9T.js";
|
|
9
9
|
import { W as ct } from "./textInput.component-BC0Hi8R_.js";
|
|
10
10
|
import { S as at } from "./spinner.component-B3dkvoO9.js";
|
|
11
11
|
import { u as it } from "./usePortalContentRef-DO_jc4W9.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as ee, s as ge, c as fe, d as Me, 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
|
|
15
|
+
import { a as G, d as g, b as _, e as pt, u as mt, f as ht, g as xt, 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 [
|
|
19
|
+
const [Pe, m] = G({
|
|
20
20
|
name: "MenuContext",
|
|
21
21
|
hookName: "useMenuContext",
|
|
22
22
|
providerName: "<MenuProvider />",
|
|
23
23
|
strict: !1
|
|
24
|
-
}),
|
|
24
|
+
}), ve = 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
|
+
ve.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 [te, Zt] = G({
|
|
35
35
|
name: "MenuItemContext",
|
|
36
36
|
hookName: "useMenuItemContext",
|
|
37
37
|
providerName: "<MenuItemProvider />"
|
|
38
|
-
}), [
|
|
38
|
+
}), [ne, Ce] = G({
|
|
39
39
|
name: "MenuItemPropsContext",
|
|
40
40
|
hookName: "useMenuItemPropsContext",
|
|
41
41
|
providerName: "<MenuItemPropsProvider />"
|
|
42
|
-
}),
|
|
43
|
-
const [t, s] =
|
|
42
|
+
}), Ie = x((o, n) => {
|
|
43
|
+
const [t, s] = _()(o, [
|
|
44
44
|
"checked",
|
|
45
45
|
"closeOnSelect",
|
|
46
46
|
"disabled",
|
|
@@ -51,115 +51,115 @@ 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(ne, { value: c, children: /* @__PURE__ */ e.jsx(te, { value: i, children: /* @__PURE__ */ e.jsx(g.div, { ...a, ref: n }) }) });
|
|
55
55
|
});
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const t = m(), s =
|
|
56
|
+
Ie.displayName = "MenuCheckboxItem";
|
|
57
|
+
const be = x((o, n) => {
|
|
58
|
+
const t = m(), s = ee(), 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
|
-
|
|
62
|
-
const
|
|
61
|
+
be.displayName = "MenuContent";
|
|
62
|
+
const ke = 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
|
-
|
|
67
|
-
const
|
|
66
|
+
ke.displayName = "MenuContextTrigger";
|
|
67
|
+
const Se = 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
|
-
|
|
72
|
-
const
|
|
73
|
-
const [t, s] =
|
|
71
|
+
Se.displayName = "MenuIndicator";
|
|
72
|
+
const we = 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 B(() => c.addItemListener({ id: a.id, onSelect: t.onSelect }), [a.id, t.onSelect]), /* @__PURE__ */ e.jsx(
|
|
80
|
+
return B(() => c.addItemListener({ id: a.id, onSelect: t.onSelect }), [a.id, t.onSelect]), /* @__PURE__ */ e.jsx(ne, { value: t, children: /* @__PURE__ */ e.jsx(te, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) }) });
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
const [
|
|
82
|
+
we.displayName = "MenuItem";
|
|
83
|
+
const [Ne, ye] = G({
|
|
84
84
|
name: "MenuItemGroupContext",
|
|
85
85
|
hookName: "useMenuItemGroupContext",
|
|
86
86
|
providerName: "<MenuItemGroupProvider />"
|
|
87
|
-
}),
|
|
88
|
-
const [t, s] =
|
|
89
|
-
return /* @__PURE__ */ e.jsx(
|
|
87
|
+
}), Ae = x((o, n) => {
|
|
88
|
+
const [t, s] = _()(o, ["id"]), c = m(), a = { id: X(), ...t }, i = p(c.getItemGroupProps(a), s);
|
|
89
|
+
return /* @__PURE__ */ e.jsx(Ne, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
|
|
90
90
|
});
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
const t = m(), s =
|
|
91
|
+
Ae.displayName = "MenuItemGroup";
|
|
92
|
+
const Te = x((o, n) => {
|
|
93
|
+
const t = m(), s = ye(), c = p(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
94
94
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
95
95
|
});
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
const t = m(), s =
|
|
96
|
+
Te.displayName = "MenuItemGroupLabel";
|
|
97
|
+
const Ge = x((o, n) => {
|
|
98
|
+
const t = m(), s = Ce(), c = p(t.getItemIndicatorProps(s), o);
|
|
99
99
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
100
100
|
});
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
const t = m(), s =
|
|
101
|
+
Ge.displayName = "MenuItemIndicator";
|
|
102
|
+
const _e = x((o, n) => {
|
|
103
|
+
const t = m(), s = Ce(), c = p(t.getItemTextProps(s), o);
|
|
104
104
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
105
105
|
});
|
|
106
|
-
|
|
107
|
-
const
|
|
106
|
+
_e.displayName = "MenuItemText";
|
|
107
|
+
const Oe = x((o, n) => {
|
|
108
108
|
const t = m(), s = p(t.getPositionerProps(), o);
|
|
109
|
-
return
|
|
109
|
+
return ee().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
const [t, s] =
|
|
111
|
+
Oe.displayName = "MenuPositioner";
|
|
112
|
+
const $e = x((o, n) => {
|
|
113
|
+
const [t, s] = _()(o, [
|
|
114
114
|
"closeOnSelect",
|
|
115
115
|
"disabled",
|
|
116
116
|
"value",
|
|
117
117
|
"valueText"
|
|
118
|
-
]), c = m(), u =
|
|
118
|
+
]), c = m(), u = ye(), a = {
|
|
119
119
|
...t,
|
|
120
120
|
checked: u.value === t.value,
|
|
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(ne, { value: a, children: /* @__PURE__ */ e.jsx(te, { value: f, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) }) });
|
|
125
125
|
});
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
const [t, s] =
|
|
126
|
+
$e.displayName = "MenuRadioItem";
|
|
127
|
+
const Re = x((o, n) => {
|
|
128
|
+
const [t, s] = _()(o, [
|
|
129
129
|
"id",
|
|
130
130
|
"onValueChange",
|
|
131
131
|
"value"
|
|
132
|
-
]), c = m(), a = { id:
|
|
133
|
-
return /* @__PURE__ */ e.jsx(
|
|
132
|
+
]), c = m(), a = { id: X(), ...t }, i = p(c.getItemGroupProps({ id: a.id }), s);
|
|
133
|
+
return /* @__PURE__ */ e.jsx(Ne, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
const n =
|
|
135
|
+
Re.displayName = "MenuRadioItemGroup";
|
|
136
|
+
const Le = (o) => {
|
|
137
|
+
const n = ue(o), t = ue(!1);
|
|
138
138
|
B(() => {
|
|
139
139
|
n.current = o;
|
|
140
140
|
}), B(() => {
|
|
141
141
|
t.current !== !0 && (t.current = !0, n.current());
|
|
142
142
|
}, []);
|
|
143
143
|
}, vt = (o) => {
|
|
144
|
-
const n =
|
|
144
|
+
const n = X(), { 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
|
+
}, [Be, ze] = G({
|
|
152
152
|
name: "MenuMachineContext",
|
|
153
153
|
hookName: "useMenuMachineContext",
|
|
154
154
|
providerName: "<MenuMachineProvider />",
|
|
155
155
|
strict: !1
|
|
156
|
-
}), [
|
|
156
|
+
}), [Fe, jt] = G({
|
|
157
157
|
name: "MenuMachineContext",
|
|
158
158
|
hookName: "useMenuMachineContext",
|
|
159
159
|
providerName: "<MenuMachineProvider />",
|
|
160
160
|
strict: !1
|
|
161
161
|
}), Ct = (o) => {
|
|
162
|
-
const [n, t] =
|
|
162
|
+
const [n, t] = ge(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 =
|
|
185
|
-
|
|
184
|
+
]), u = m(), a = ze(), { api: i, service: f } = vt(s), N = fe(p({ present: i.open }, n));
|
|
185
|
+
Le(() => {
|
|
186
186
|
a && u && (u.setChild(f), i.setParent(a));
|
|
187
187
|
});
|
|
188
188
|
const y = j(() => u?.getTriggerItemProps(i), [i, u]);
|
|
189
|
-
return /* @__PURE__ */ e.jsx(
|
|
189
|
+
return /* @__PURE__ */ e.jsx(Fe, { value: y, children: /* @__PURE__ */ e.jsx(Be, { value: f, children: /* @__PURE__ */ e.jsx(Pe, { value: i, children: /* @__PURE__ */ e.jsx(Me, { value: N, ...c }) }) }) });
|
|
190
190
|
}, It = (o) => {
|
|
191
|
-
const n = m(), t =
|
|
192
|
-
|
|
191
|
+
const n = m(), t = ze(), [s, { value: c, children: u }] = ge(o), { api: a, service: i } = c, f = fe(p({ present: a.open }, s));
|
|
192
|
+
Le(() => {
|
|
193
193
|
t && n && (n.setChild(i), a.setParent(t));
|
|
194
194
|
});
|
|
195
195
|
const N = j(() => n?.getTriggerItemProps(a), [a, n]);
|
|
196
|
-
return /* @__PURE__ */ e.jsx(
|
|
197
|
-
},
|
|
196
|
+
return /* @__PURE__ */ e.jsx(Fe, { value: N, children: /* @__PURE__ */ e.jsx(Be, { value: i, children: /* @__PURE__ */ e.jsx(Pe, { value: a, children: /* @__PURE__ */ e.jsx(Me, { value: f, children: u }) }) }) });
|
|
197
|
+
}, We = 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
|
-
|
|
202
|
-
const
|
|
203
|
-
const t = m(), s =
|
|
201
|
+
We.displayName = "MenuSeparator";
|
|
202
|
+
const Ee = x((o, n) => {
|
|
203
|
+
const t = m(), s = ee(), c = p(
|
|
204
204
|
{
|
|
205
205
|
...t.getTriggerProps(),
|
|
206
206
|
"aria-controls": s.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
|
|
@@ -209,86 +209,86 @@ const De = h((o, n) => {
|
|
|
209
209
|
);
|
|
210
210
|
return /* @__PURE__ */ e.jsx(g.button, { ...c, ref: n });
|
|
211
211
|
});
|
|
212
|
-
|
|
213
|
-
const
|
|
212
|
+
Ee.displayName = "MenuTrigger";
|
|
213
|
+
const De = x((o, n) => {
|
|
214
214
|
const t = jt(), s = p(t?.() ?? {}, o);
|
|
215
215
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
216
216
|
});
|
|
217
|
-
|
|
217
|
+
De.displayName = "MenuTriggerItem";
|
|
218
218
|
const {
|
|
219
|
-
withRootProvider:
|
|
220
|
-
withContext:
|
|
219
|
+
withRootProvider: Ve,
|
|
220
|
+
withContext: h
|
|
221
221
|
} = lt({ key: "menu" });
|
|
222
|
-
|
|
222
|
+
Ve(
|
|
223
223
|
It
|
|
224
224
|
);
|
|
225
|
-
const bt =
|
|
225
|
+
const bt = Ve(Ct, {
|
|
226
226
|
defaultProps: { lazyMount: !0, unmountOnExit: !0 }
|
|
227
|
-
}), kt =
|
|
228
|
-
|
|
227
|
+
}), kt = h(
|
|
228
|
+
Ee,
|
|
229
229
|
"trigger",
|
|
230
230
|
{ forwardAsChild: !0 }
|
|
231
231
|
);
|
|
232
|
-
|
|
233
|
-
const St =
|
|
234
|
-
|
|
232
|
+
h(ke, "contextTrigger", { forwardAsChild: !0 });
|
|
233
|
+
const St = h(
|
|
234
|
+
Oe,
|
|
235
235
|
"positioner",
|
|
236
236
|
{ forwardAsChild: !0 }
|
|
237
237
|
);
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
h(
|
|
239
|
+
We,
|
|
240
240
|
"separator",
|
|
241
241
|
{ forwardAsChild: !0 }
|
|
242
242
|
);
|
|
243
|
-
const wt =
|
|
244
|
-
|
|
243
|
+
const wt = h(
|
|
244
|
+
be,
|
|
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
|
+
ve,
|
|
254
254
|
"arrow",
|
|
255
255
|
{ forwardAsChild: !0, defaultProps: { children: /* @__PURE__ */ e.jsx(Nt, {}) } }
|
|
256
256
|
);
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
h(
|
|
258
|
+
Se,
|
|
259
259
|
"indicator",
|
|
260
260
|
{ forwardAsChild: !0 }
|
|
261
261
|
);
|
|
262
|
-
const yt =
|
|
263
|
-
|
|
262
|
+
const yt = h(
|
|
263
|
+
Ae,
|
|
264
264
|
"itemGroup",
|
|
265
265
|
{ forwardAsChild: !0 }
|
|
266
|
-
), At =
|
|
267
|
-
|
|
266
|
+
), At = h(Te, "itemGroupLabel", { forwardAsChild: !0 }), le = h(
|
|
267
|
+
we,
|
|
268
268
|
"item",
|
|
269
269
|
{ forwardAsChild: !0 }
|
|
270
|
-
), Tt =
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
), Tt = h(De, "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(Ge, "itemIndicator", {
|
|
281
281
|
forwardAsChild: !0,
|
|
282
282
|
defaultProps: { children: /* @__PURE__ */ e.jsx(dt, { boxSize: "4" }) }
|
|
283
283
|
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
h(Ie, "item", { forwardAsChild: !0 });
|
|
285
|
+
h(Re, "itemGroup", { forwardAsChild: !0 });
|
|
286
|
+
h(
|
|
287
|
+
$e,
|
|
288
288
|
"item",
|
|
289
289
|
{ forwardAsChild: !0 }
|
|
290
290
|
);
|
|
291
|
-
const
|
|
291
|
+
const He = ({
|
|
292
292
|
hideCaret: o = !1,
|
|
293
293
|
size: n = "md",
|
|
294
294
|
text: t,
|
|
@@ -298,7 +298,7 @@ const Ke = ({
|
|
|
298
298
|
["data-testid"]: a = "kibble-menu-button",
|
|
299
299
|
...i
|
|
300
300
|
}) => /* @__PURE__ */ e.jsxs(
|
|
301
|
-
|
|
301
|
+
Y,
|
|
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
|
+
Z,
|
|
315
315
|
{
|
|
316
316
|
className: "Menu__ButtonText",
|
|
317
317
|
"data-testid": `${a}-text`,
|
|
@@ -334,7 +334,7 @@ const Ke = ({
|
|
|
334
334
|
}, [n]);
|
|
335
335
|
return B(() => {
|
|
336
336
|
n && c(!1);
|
|
337
|
-
}, [n]), /* @__PURE__ */ e.jsx(
|
|
337
|
+
}, [n]), /* @__PURE__ */ e.jsx(xe, { label: t.text || "", open: s && !n, ...o, children: /* @__PURE__ */ e.jsx(
|
|
338
338
|
T,
|
|
339
339
|
{
|
|
340
340
|
onClick: (i) => {
|
|
@@ -342,7 +342,7 @@ const Ke = ({
|
|
|
342
342
|
},
|
|
343
343
|
onMouseEnter: u,
|
|
344
344
|
onMouseLeave: a,
|
|
345
|
-
children: /* @__PURE__ */ e.jsx(
|
|
345
|
+
children: /* @__PURE__ */ e.jsx(He, { ...t })
|
|
346
346
|
}
|
|
347
347
|
) });
|
|
348
348
|
}, _t = ({
|
|
@@ -362,17 +362,16 @@ const Ke = ({
|
|
|
362
362
|
const {
|
|
363
363
|
valueText: S,
|
|
364
364
|
listProps: C,
|
|
365
|
-
|
|
366
|
-
portalled: A = !0,
|
|
365
|
+
portalled: M = !0,
|
|
367
366
|
open: k,
|
|
368
|
-
lazyMount:
|
|
369
|
-
unmountOnExit:
|
|
367
|
+
lazyMount: A = !0,
|
|
368
|
+
unmountOnExit: I = !0
|
|
370
369
|
} = i;
|
|
371
370
|
return /* @__PURE__ */ e.jsx(
|
|
372
371
|
Ot,
|
|
373
372
|
{
|
|
374
|
-
lazyMount:
|
|
375
|
-
unmountOnExit:
|
|
373
|
+
lazyMount: A,
|
|
374
|
+
unmountOnExit: I,
|
|
376
375
|
submenuTrigger: /* @__PURE__ */ e.jsxs(
|
|
377
376
|
Tt,
|
|
378
377
|
{
|
|
@@ -386,7 +385,7 @@ const Ke = ({
|
|
|
386
385
|
},
|
|
387
386
|
children: [
|
|
388
387
|
/* @__PURE__ */ e.jsx(
|
|
389
|
-
|
|
388
|
+
U,
|
|
390
389
|
{
|
|
391
390
|
label: o,
|
|
392
391
|
leftElement: n,
|
|
@@ -398,17 +397,16 @@ const Ke = ({
|
|
|
398
397
|
]
|
|
399
398
|
}
|
|
400
399
|
),
|
|
401
|
-
portalled:
|
|
400
|
+
portalled: M,
|
|
402
401
|
open: k !== void 0 ? k : f,
|
|
403
|
-
listProps: C
|
|
404
|
-
positionerProps: M
|
|
402
|
+
listProps: C
|
|
405
403
|
}
|
|
406
404
|
);
|
|
407
405
|
}
|
|
408
406
|
if (c === "checkbox") {
|
|
409
|
-
const { checked: S, value: C, disabled: M, tooltipLabel:
|
|
407
|
+
const { checked: S, value: C, disabled: M, tooltipLabel: k, ...A } = i;
|
|
410
408
|
return /* @__PURE__ */ e.jsxs(
|
|
411
|
-
|
|
409
|
+
le,
|
|
412
410
|
{
|
|
413
411
|
className: "Menu__Item--Checkbox",
|
|
414
412
|
"data-testid": `${a}-checkbox`,
|
|
@@ -417,17 +415,17 @@ const Ke = ({
|
|
|
417
415
|
onSelect: M ? void 0 : y,
|
|
418
416
|
gap: 3,
|
|
419
417
|
disabled: M,
|
|
420
|
-
...
|
|
418
|
+
...A,
|
|
421
419
|
children: [
|
|
422
420
|
/* @__PURE__ */ e.jsx(Pt, { checked: !!S, disabled: M, size: "md", fullWidth: !1 }),
|
|
423
421
|
/* @__PURE__ */ e.jsx(
|
|
424
|
-
|
|
422
|
+
U,
|
|
425
423
|
{
|
|
426
424
|
label: o,
|
|
427
425
|
leftElement: n,
|
|
428
426
|
shouldTruncateText: s,
|
|
429
427
|
variant: u,
|
|
430
|
-
tooltipLabel:
|
|
428
|
+
tooltipLabel: k
|
|
431
429
|
}
|
|
432
430
|
)
|
|
433
431
|
]
|
|
@@ -435,9 +433,9 @@ const Ke = ({
|
|
|
435
433
|
);
|
|
436
434
|
}
|
|
437
435
|
if (c === "default") {
|
|
438
|
-
const { selected: S = !1, disabled: C, value: M, tooltipLabel:
|
|
436
|
+
const { selected: S = !1, disabled: C, value: M, tooltipLabel: k, ...A } = i;
|
|
439
437
|
return /* @__PURE__ */ e.jsx(
|
|
440
|
-
|
|
438
|
+
le,
|
|
441
439
|
{
|
|
442
440
|
className: "Menu__Item--Default",
|
|
443
441
|
"data-testid": `${a}-default`,
|
|
@@ -445,22 +443,22 @@ const Ke = ({
|
|
|
445
443
|
onSelect: C ? void 0 : y,
|
|
446
444
|
disabled: C,
|
|
447
445
|
...S && { bgColor: "background.secondaryAlpha.hover" },
|
|
448
|
-
...
|
|
446
|
+
...A,
|
|
449
447
|
children: /* @__PURE__ */ e.jsx(
|
|
450
|
-
|
|
448
|
+
U,
|
|
451
449
|
{
|
|
452
450
|
label: o,
|
|
453
451
|
leftElement: n,
|
|
454
452
|
shouldTruncateText: s,
|
|
455
453
|
variant: S ? "info" : u,
|
|
456
|
-
tooltipLabel:
|
|
454
|
+
tooltipLabel: k
|
|
457
455
|
}
|
|
458
456
|
)
|
|
459
457
|
}
|
|
460
458
|
);
|
|
461
459
|
}
|
|
462
460
|
return /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
463
|
-
},
|
|
461
|
+
}, U = ({
|
|
464
462
|
label: o,
|
|
465
463
|
leftElement: n,
|
|
466
464
|
shouldTruncateText: t,
|
|
@@ -469,22 +467,22 @@ const Ke = ({
|
|
|
469
467
|
}) => {
|
|
470
468
|
const u = /* @__PURE__ */ e.jsxs(z, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
|
|
471
469
|
n,
|
|
472
|
-
typeof o == "string" ? /* @__PURE__ */ e.jsx(
|
|
470
|
+
typeof o == "string" ? /* @__PURE__ */ e.jsx(Z, { size: "sm", truncated: t, variant: s, children: o }) : o
|
|
473
471
|
] });
|
|
474
|
-
return c ? /* @__PURE__ */ e.jsx(
|
|
475
|
-
},
|
|
472
|
+
return c ? /* @__PURE__ */ e.jsx(xe, { label: c, children: u }) : u;
|
|
473
|
+
}, de = ({
|
|
476
474
|
groupName: o,
|
|
477
475
|
hasSelectedItems: n = !1,
|
|
478
476
|
onToggle: t,
|
|
479
477
|
["data-testid"]: s = "kibble-menu-toggle-buttons"
|
|
480
478
|
}) => {
|
|
481
479
|
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(
|
|
483
|
-
/* @__PURE__ */ e.jsx(
|
|
484
|
-
/* @__PURE__ */ e.jsx(
|
|
480
|
+
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(me, { hasSelectedItems: n, groupName: o, onToggle: t }) : /* @__PURE__ */ e.jsx(pe, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(z, { justifyContent: "space-between", children: [
|
|
481
|
+
/* @__PURE__ */ e.jsx(pe, { groupName: o, onToggle: t }),
|
|
482
|
+
/* @__PURE__ */ e.jsx(me, { hasSelectedItems: n, groupName: o, onToggle: t })
|
|
485
483
|
] }) });
|
|
486
|
-
},
|
|
487
|
-
|
|
484
|
+
}, pe = ({ groupName: o, onToggle: n }) => /* @__PURE__ */ e.jsx(Y, { variant: "ghost", size: "xs", onClick: () => n({ groupName: o, clear: !1 }), children: "Select All" }), me = ({ hasSelectedItems: o, groupName: n, onToggle: t }) => /* @__PURE__ */ e.jsx(
|
|
485
|
+
Y,
|
|
488
486
|
{
|
|
489
487
|
variant: "ghostNeutral",
|
|
490
488
|
iconName: "arrowCircle",
|
|
@@ -509,33 +507,33 @@ const Ke = ({
|
|
|
509
507
|
canSelectGroups: S,
|
|
510
508
|
emptyState: C = "No results found",
|
|
511
509
|
groupSortOrder: M,
|
|
512
|
-
loading:
|
|
513
|
-
maxH:
|
|
510
|
+
loading: k,
|
|
511
|
+
maxH: A = "480px",
|
|
514
512
|
menuItems: I = [],
|
|
515
|
-
minW:
|
|
513
|
+
minW: Ke = "240px",
|
|
516
514
|
onSearch: w,
|
|
517
|
-
onSelect:
|
|
518
|
-
onSelectAll:
|
|
519
|
-
searchable:
|
|
515
|
+
onSelect: V,
|
|
516
|
+
onSelectAll: oe,
|
|
517
|
+
searchable: H,
|
|
520
518
|
searchPlaceholder: qe = "Search...",
|
|
521
519
|
shouldTruncateText: Je,
|
|
522
|
-
...
|
|
523
|
-
} = n || {}, [Qe, Ue] = L(!1), [
|
|
520
|
+
...re
|
|
521
|
+
} = n || {}, [Qe, Ue] = L(!1), [K, q] = L(""), [F, J] = L(I), se = D(() => {
|
|
524
522
|
const r = {};
|
|
525
523
|
return F?.forEach((l) => {
|
|
526
524
|
const d = l.groupLabel || "default", P = l.type === "checkbox" ? "checkbox" : "default";
|
|
527
525
|
r[d] || (r[d] = {}), r[d][P] || (r[d][P] = []), r[d][P].push(l);
|
|
528
526
|
}), r;
|
|
529
|
-
}, [F]),
|
|
530
|
-
const r = Object.entries(
|
|
527
|
+
}, [F]), ce = D(() => {
|
|
528
|
+
const r = Object.entries(se);
|
|
531
529
|
return !M || M.length === 0 ? r : r.sort(([l], [d]) => {
|
|
532
530
|
const P = M.indexOf(l), v = M.indexOf(d);
|
|
533
531
|
return P !== -1 && v !== -1 ? P - v : P !== -1 ? -1 : v !== -1 ? 1 : 0;
|
|
534
532
|
});
|
|
535
|
-
}, [
|
|
536
|
-
(r) =>
|
|
537
|
-
[
|
|
538
|
-
), b = D(() =>
|
|
533
|
+
}, [se, M]), O = D(() => I?.filter((r) => r.type === "checkbox") || [], [I]), Q = j(
|
|
534
|
+
(r) => O.some((l) => l.value === r && l.checked),
|
|
535
|
+
[O]
|
|
536
|
+
), b = D(() => O.filter((r) => r.checked), [O]), ae = j(
|
|
539
537
|
({ groupName: r, clear: l }) => {
|
|
540
538
|
let d;
|
|
541
539
|
const P = F.filter((v) => v.type === "checkbox" && !v.disabled);
|
|
@@ -547,46 +545,47 @@ const Ke = ({
|
|
|
547
545
|
);
|
|
548
546
|
} else
|
|
549
547
|
d = l ? [] : P.map((v) => ({ ...v, checked: !0 }));
|
|
550
|
-
|
|
548
|
+
console.log("newSelectedItems", d), oe?.({ allSelectedItems: d });
|
|
551
549
|
},
|
|
552
|
-
[
|
|
550
|
+
[oe, F, b]
|
|
553
551
|
), Xe = j(
|
|
554
552
|
(r) => {
|
|
555
553
|
if (r.type === "checkbox") {
|
|
556
|
-
const l =
|
|
554
|
+
const l = Q(r.value) ? b.filter((d) => d.value !== r.value) : [...b, r];
|
|
557
555
|
if (r.onSelect) {
|
|
558
556
|
r.onSelect(r.value);
|
|
559
557
|
return;
|
|
560
558
|
}
|
|
561
|
-
|
|
559
|
+
V?.({ item: r, allSelectedItems: l });
|
|
562
560
|
return;
|
|
563
561
|
}
|
|
564
562
|
if (r.onSelect) {
|
|
565
563
|
r.onSelect(r.value);
|
|
566
564
|
return;
|
|
567
565
|
}
|
|
568
|
-
|
|
566
|
+
V?.({ item: r, allSelectedItems: [r] });
|
|
569
567
|
},
|
|
570
|
-
[
|
|
571
|
-
),
|
|
568
|
+
[V, Q, b]
|
|
569
|
+
), ie = j((r, l) => r === "" || !r ? l : l.filter((d) => !!(typeof d.label == "string" ? d.label : d.valueText)?.toLowerCase().includes(r.toLowerCase())), []), Ye = j(
|
|
572
570
|
(r) => {
|
|
571
|
+
console.log("e.target.value", r.target.value);
|
|
573
572
|
const l = r.target.value;
|
|
574
|
-
|
|
573
|
+
console.log("searchInput", l), q(l), w && w(r);
|
|
575
574
|
},
|
|
576
575
|
[w]
|
|
577
576
|
), Ze = j(() => {
|
|
578
|
-
|
|
577
|
+
q(""), w && w({
|
|
579
578
|
target: { value: "" }
|
|
580
579
|
});
|
|
581
580
|
}, [w]), et = j(
|
|
582
581
|
(r) => {
|
|
583
|
-
Ue(r), r || (
|
|
582
|
+
Ue(r), r || (q(""), J(I)), a && a({ open: r, allSelectedItems: b });
|
|
584
583
|
},
|
|
585
584
|
[I, a, b]
|
|
586
585
|
);
|
|
587
586
|
return B(() => {
|
|
588
|
-
|
|
589
|
-
}, [
|
|
587
|
+
J(w ? I : ie(K, I));
|
|
588
|
+
}, [K, w, ie, I]), /* @__PURE__ */ e.jsxs(
|
|
590
589
|
bt,
|
|
591
590
|
{
|
|
592
591
|
lazyMount: u,
|
|
@@ -596,21 +595,21 @@ const Ke = ({
|
|
|
596
595
|
},
|
|
597
596
|
...f,
|
|
598
597
|
children: [
|
|
599
|
-
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(
|
|
598
|
+
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(He, { ...o }) }),
|
|
600
599
|
/* @__PURE__ */ e.jsx(ut, { disabled: !s, container: N || void 0, children: /* @__PURE__ */ e.jsx(St, { className: "Menu", "data-testid": i, ...t, children: /* @__PURE__ */ e.jsxs(
|
|
601
600
|
wt,
|
|
602
601
|
{
|
|
603
602
|
className: "Menu__Content",
|
|
604
603
|
"data-testid": `${i}-content`,
|
|
605
|
-
maxH:
|
|
606
|
-
minW:
|
|
607
|
-
...
|
|
608
|
-
...
|
|
604
|
+
maxH: A,
|
|
605
|
+
minW: Ke,
|
|
606
|
+
...re,
|
|
607
|
+
...H && { pt: "0" },
|
|
609
608
|
onClick: (r) => {
|
|
610
|
-
r.stopPropagation(),
|
|
609
|
+
r.stopPropagation(), re?.onClick?.(r);
|
|
611
610
|
},
|
|
612
611
|
children: [
|
|
613
|
-
|
|
612
|
+
H && /* @__PURE__ */ e.jsx(
|
|
614
613
|
T,
|
|
615
614
|
{
|
|
616
615
|
className: "Menu__SearchBarContainer",
|
|
@@ -629,7 +628,7 @@ const Ke = ({
|
|
|
629
628
|
placeholder: qe,
|
|
630
629
|
onChange: Ye,
|
|
631
630
|
size: "sm",
|
|
632
|
-
value:
|
|
631
|
+
value: K,
|
|
633
632
|
clearable: !0,
|
|
634
633
|
onClear: Ze,
|
|
635
634
|
onKeyDown: (r) => {
|
|
@@ -645,56 +644,53 @@ const Ke = ({
|
|
|
645
644
|
className: "Menu__CheckboxGroupHeader",
|
|
646
645
|
"data-testid": `${i}-checkbox-group-header`,
|
|
647
646
|
px: 3,
|
|
648
|
-
mt:
|
|
649
|
-
children: y &&
|
|
650
|
-
|
|
647
|
+
mt: H ? 1 : 2,
|
|
648
|
+
children: y && !!O.length && /* @__PURE__ */ e.jsx(
|
|
649
|
+
de,
|
|
651
650
|
{
|
|
652
|
-
onToggle:
|
|
651
|
+
onToggle: ae,
|
|
653
652
|
hasSelectedItems: !!b.length
|
|
654
653
|
}
|
|
655
654
|
)
|
|
656
655
|
}
|
|
657
656
|
),
|
|
658
|
-
|
|
659
|
-
/* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children:
|
|
660
|
-
const d = r === "default", P = Object.keys(l), v = d ? st.Fragment : yt, tt = l.checkbox?.map((
|
|
661
|
-
(
|
|
657
|
+
k && /* @__PURE__ */ e.jsx(z, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(at, { fullScreen: !0 }) }),
|
|
658
|
+
/* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children: ce.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ce.map(([r, l]) => {
|
|
659
|
+
const d = r === "default", P = Object.keys(l), v = d ? st.Fragment : yt, tt = l.checkbox?.map(($) => $.value)?.some(
|
|
660
|
+
($) => b.some((E) => E.value === $ && E.checked)
|
|
662
661
|
);
|
|
663
662
|
return /* @__PURE__ */ e.jsxs(v, { children: [
|
|
664
663
|
!d && /* @__PURE__ */ e.jsx(At, { children: /* @__PURE__ */ e.jsxs(z, { alignItems: "center", justifyContent: "space-between", children: [
|
|
665
664
|
r,
|
|
666
665
|
S && P.includes("checkbox") && /* @__PURE__ */ e.jsx(
|
|
667
|
-
|
|
666
|
+
de,
|
|
668
667
|
{
|
|
669
668
|
groupName: r,
|
|
670
|
-
onToggle:
|
|
669
|
+
onToggle: ae,
|
|
671
670
|
hasSelectedItems: tt
|
|
672
671
|
}
|
|
673
672
|
)
|
|
674
673
|
] }) }),
|
|
675
674
|
Object.entries(l).map(
|
|
676
|
-
([
|
|
677
|
-
const { groupLabel: ot, ...rt } =
|
|
675
|
+
([$, E]) => E.map((R, nt) => {
|
|
676
|
+
const { groupLabel: ot, ...rt } = R;
|
|
678
677
|
return /* @__PURE__ */ e.jsx(
|
|
679
678
|
_t,
|
|
680
679
|
{
|
|
680
|
+
...rt,
|
|
681
681
|
shouldTruncateText: Je,
|
|
682
|
-
...
|
|
683
|
-
checked:
|
|
684
|
-
},
|
|
685
|
-
"data-testid": `${i}-item-${G.label}`,
|
|
686
|
-
onSelect: () => Xe(G),
|
|
687
|
-
...G.type === "submenu" && {
|
|
688
|
-
positionerProps: t
|
|
682
|
+
...R.type === "checkbox" && {
|
|
683
|
+
checked: Q(R.value)
|
|
689
684
|
},
|
|
690
|
-
|
|
685
|
+
"data-testid": `${i}-item-${R.label}`,
|
|
686
|
+
onSelect: () => Xe(R)
|
|
691
687
|
},
|
|
692
|
-
`menu-item-${ot}-${
|
|
688
|
+
`menu-item-${ot}-${$}-${nt}`
|
|
693
689
|
);
|
|
694
690
|
})
|
|
695
691
|
)
|
|
696
692
|
] }, r);
|
|
697
|
-
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(T, { p: 3, children: typeof C == "string" ? /* @__PURE__ */ e.jsx(T, { textAlign: "center", children: /* @__PURE__ */ e.jsx(
|
|
693
|
+
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(T, { p: 3, children: typeof C == "string" ? /* @__PURE__ */ e.jsx(T, { textAlign: "center", children: /* @__PURE__ */ e.jsx(Z, { size: "sm", variant: "subtle", "data-testid": `${i}-empty-state`, children: C }) }) : C }) }) })
|
|
698
694
|
]
|
|
699
695
|
}
|
|
700
696
|
) }) })
|
|
@@ -705,4 +701,4 @@ const Ke = ({
|
|
|
705
701
|
export {
|
|
706
702
|
Ot as M
|
|
707
703
|
};
|
|
708
|
-
//# sourceMappingURL=menu.component-
|
|
704
|
+
//# sourceMappingURL=menu.component-DwTen8Uv.js.map
|