@televet/kibble-ui 5.0.1 → 5.0.2-beta.menu.1
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-CTBfGiSm.js → avatarGroup.component-D2U1URML.js} +2 -2
- package/dist/chunks/{avatarGroup.component-CTBfGiSm.js.map → avatarGroup.component-D2U1URML.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-B-ZOhj7i.js → avatarGroup.component-DSvRgDWo.js} +2 -2
- package/dist/chunks/{avatarGroup.component-B-ZOhj7i.js.map → avatarGroup.component-DSvRgDWo.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-DUK2FgFn.js → buttonGroup.component-BWZfUx2E.js} +2 -2
- package/dist/chunks/{buttonGroup.component-DUK2FgFn.js.map → buttonGroup.component-BWZfUx2E.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CowJsbr7.js → buttonGroup.component-D1zl9wyM.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CowJsbr7.js.map → buttonGroup.component-D1zl9wyM.js.map} +1 -1
- package/dist/chunks/{calendar.component-CHIhplfO.js → calendar.component-BTiJi3ZE.js} +2 -2
- package/dist/chunks/{calendar.component-CHIhplfO.js.map → calendar.component-BTiJi3ZE.js.map} +1 -1
- package/dist/chunks/{calendar.component-tOoK1NrU.js → calendar.component-CqcL9gQD.js} +2 -2
- package/dist/chunks/{calendar.component-tOoK1NrU.js.map → calendar.component-CqcL9gQD.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BrDGshOG.js → conversationCard.component-OTLcFGND.js} +2 -2
- package/dist/chunks/{conversationCard.component-BrDGshOG.js.map → conversationCard.component-OTLcFGND.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CMdqD3yN.js → conversationCard.component-o0x-PRyR.js} +2 -2
- package/dist/chunks/{conversationCard.component-CMdqD3yN.js.map → conversationCard.component-o0x-PRyR.js.map} +1 -1
- package/dist/chunks/{datePicker.component-eHU7IZgC.js → datePicker.component-C9u3joo2.js} +2 -2
- package/dist/chunks/{datePicker.component-eHU7IZgC.js.map → datePicker.component-C9u3joo2.js.map} +1 -1
- package/dist/chunks/{datePicker.component-C6cD1_HR.js → datePicker.component-DDlH8JLD.js} +2 -2
- package/dist/chunks/{datePicker.component-C6cD1_HR.js.map → datePicker.component-DDlH8JLD.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-BWHE-9FA.js → datePicker.provider--9ovHuHv.js} +2 -2
- package/dist/chunks/{datePicker.provider-BWHE-9FA.js.map → datePicker.provider--9ovHuHv.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-DgarjPPd.js → datePicker.provider-Q_wJ5IPm.js} +2 -2
- package/dist/chunks/{datePicker.provider-DgarjPPd.js.map → datePicker.provider-Q_wJ5IPm.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-REz9iX4S.js → dateTimePicker.component-B-72OFcp.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-REz9iX4S.js.map → dateTimePicker.component-B-72OFcp.js.map} +1 -1
- package/dist/chunks/{dateTimePicker.component-Byjxg2lJ.js → dateTimePicker.component-DklOdWT-.js} +2 -2
- package/dist/chunks/{dateTimePicker.component-Byjxg2lJ.js.map → dateTimePicker.component-DklOdWT-.js.map} +1 -1
- package/dist/chunks/logo.types-88a31xCx.js.map +1 -1
- package/dist/chunks/logo.types-C5GwpHjM.js.map +1 -1
- package/dist/chunks/menu.component-DWJeIuGD.js +2 -0
- package/dist/chunks/menu.component-DWJeIuGD.js.map +1 -0
- package/dist/chunks/{menu.component-DwTen8Uv.js → menu.component-Dd4ePEAs.js} +167 -165
- package/dist/chunks/menu.component-Dd4ePEAs.js.map +1 -0
- package/dist/chunks/{radioGroup.types-DJ68ERdO.js → radioGroup.types-C27z0u3-.js} +2 -2
- package/dist/chunks/{radioGroup.types-DJ68ERdO.js.map → radioGroup.types-C27z0u3-.js.map} +1 -1
- package/dist/chunks/{radioGroup.types-C7A8mLMz.js → radioGroup.types-_TTBbP2R.js} +2 -2
- package/dist/chunks/{radioGroup.types-C7A8mLMz.js.map → radioGroup.types-_TTBbP2R.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-Cor6eakc.js → tagBlock.component-0kUeaXlw.js} +2 -2
- package/dist/chunks/{tagBlock.component-Cor6eakc.js.map → tagBlock.component-0kUeaXlw.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-BGEvRu81.js → tagBlock.component-CNqS6gR_.js} +2 -2
- package/dist/chunks/{tagBlock.component-BGEvRu81.js.map → tagBlock.component-CNqS6gR_.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/dist/types/components/Logo/logo.component.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/menu.component-D4-4xRDj.js +0 -2
- package/dist/chunks/menu.component-D4-4xRDj.js.map +0 -1
- package/dist/chunks/menu.component-DwTen8Uv.js.map +0 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import st, { forwardRef as x, useEffect as B, useId as
|
|
2
|
+
import st, { forwardRef as x, useEffect as B, useId as Y, useRef as le, 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
|
|
5
|
-
import { I as
|
|
6
|
-
import { W as
|
|
7
|
-
import { T as
|
|
4
|
+
import { B as Z } from "./button.component-BO6oee_V.js";
|
|
5
|
+
import { I as xe } from "./icon.component-PV_nHBId.js";
|
|
6
|
+
import { W as ee } from "./text.component-CdTyTFds.js";
|
|
7
|
+
import { T as ge } 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 te, s as fe, c as Me, d as Pe, P as ut } from "./index-C9UYIjEB.js";
|
|
13
13
|
import { c as lt } from "./create-slot-recipe-context-D_FXDJGp.js";
|
|
14
14
|
import { d as dt } from "./icons-CoSqruIn.js";
|
|
15
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 [ve, m] = G({
|
|
20
20
|
name: "MenuContext",
|
|
21
21
|
hookName: "useMenuContext",
|
|
22
22
|
providerName: "<MenuProvider />",
|
|
23
23
|
strict: !1
|
|
24
|
-
}),
|
|
24
|
+
}), je = 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
|
+
je.displayName = "MenuArrow";
|
|
29
|
+
const Ce = 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
|
+
Ce.displayName = "MenuArrowTip";
|
|
34
|
+
const [ne, Zt] = G({
|
|
35
35
|
name: "MenuItemContext",
|
|
36
36
|
hookName: "useMenuItemContext",
|
|
37
37
|
providerName: "<MenuItemProvider />"
|
|
38
|
-
}), [
|
|
38
|
+
}), [oe, Ie] = G({
|
|
39
39
|
name: "MenuItemPropsContext",
|
|
40
40
|
hookName: "useMenuItemPropsContext",
|
|
41
41
|
providerName: "<MenuItemPropsProvider />"
|
|
42
|
-
}),
|
|
42
|
+
}), be = x((o, n) => {
|
|
43
43
|
const [t, s] = _()(o, [
|
|
44
44
|
"checked",
|
|
45
45
|
"closeOnSelect",
|
|
@@ -51,25 +51,25 @@ const [te, Zt] = G({
|
|
|
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(oe, { value: c, children: /* @__PURE__ */ e.jsx(ne, { value: i, children: /* @__PURE__ */ e.jsx(g.div, { ...a, ref: n }) }) });
|
|
55
55
|
});
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const t = m(), s =
|
|
56
|
+
be.displayName = "MenuCheckboxItem";
|
|
57
|
+
const ke = x((o, n) => {
|
|
58
|
+
const t = m(), s = te(), 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
|
+
ke.displayName = "MenuContent";
|
|
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
|
-
|
|
67
|
-
const
|
|
66
|
+
Se.displayName = "MenuContextTrigger";
|
|
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
|
-
|
|
72
|
-
const
|
|
71
|
+
we.displayName = "MenuIndicator";
|
|
72
|
+
const Ne = x((o, n) => {
|
|
73
73
|
const [t, s] = _()(o, [
|
|
74
74
|
"closeOnSelect",
|
|
75
75
|
"disabled",
|
|
@@ -77,89 +77,89 @@ const we = x((o, n) => {
|
|
|
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(oe, { value: t, children: /* @__PURE__ */ e.jsx(ne, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) }) });
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
const [
|
|
82
|
+
Ne.displayName = "MenuItem";
|
|
83
|
+
const [ye, Ae] = G({
|
|
84
84
|
name: "MenuItemGroupContext",
|
|
85
85
|
hookName: "useMenuItemGroupContext",
|
|
86
86
|
providerName: "<MenuItemGroupProvider />"
|
|
87
|
-
}),
|
|
88
|
-
const [t, s] = _()(o, ["id"]), c = m(), a = { id:
|
|
89
|
-
return /* @__PURE__ */ e.jsx(
|
|
87
|
+
}), Te = x((o, n) => {
|
|
88
|
+
const [t, s] = _()(o, ["id"]), c = m(), a = { id: Y(), ...t }, i = p(c.getItemGroupProps(a), s);
|
|
89
|
+
return /* @__PURE__ */ e.jsx(ye, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
|
|
90
90
|
});
|
|
91
|
-
|
|
92
|
-
const Te = x((o, n) => {
|
|
93
|
-
const t = m(), s = ye(), c = p(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
94
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
95
|
-
});
|
|
96
|
-
Te.displayName = "MenuItemGroupLabel";
|
|
91
|
+
Te.displayName = "MenuItemGroup";
|
|
97
92
|
const Ge = x((o, n) => {
|
|
98
|
-
const t = m(), s =
|
|
93
|
+
const t = m(), s = Ae(), c = p(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
99
94
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
100
95
|
});
|
|
101
|
-
Ge.displayName = "
|
|
96
|
+
Ge.displayName = "MenuItemGroupLabel";
|
|
102
97
|
const _e = x((o, n) => {
|
|
103
|
-
const t = m(), s =
|
|
98
|
+
const t = m(), s = Ie(), c = p(t.getItemIndicatorProps(s), o);
|
|
104
99
|
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
105
100
|
});
|
|
106
|
-
_e.displayName = "
|
|
101
|
+
_e.displayName = "MenuItemIndicator";
|
|
107
102
|
const Oe = x((o, n) => {
|
|
108
|
-
const t = m(), s = p(t.
|
|
109
|
-
return
|
|
103
|
+
const t = m(), s = Ie(), c = p(t.getItemTextProps(s), o);
|
|
104
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n });
|
|
110
105
|
});
|
|
111
|
-
Oe.displayName = "
|
|
106
|
+
Oe.displayName = "MenuItemText";
|
|
112
107
|
const $e = x((o, n) => {
|
|
108
|
+
const t = m(), s = p(t.getPositionerProps(), o);
|
|
109
|
+
return te().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
110
|
+
});
|
|
111
|
+
$e.displayName = "MenuPositioner";
|
|
112
|
+
const Re = x((o, n) => {
|
|
113
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 = Ae(), 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(oe, { value: a, children: /* @__PURE__ */ e.jsx(ne, { value: f, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) }) });
|
|
125
125
|
});
|
|
126
|
-
|
|
127
|
-
const
|
|
126
|
+
Re.displayName = "MenuRadioItem";
|
|
127
|
+
const Le = x((o, n) => {
|
|
128
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: Y(), ...t }, i = p(c.getItemGroupProps({ id: a.id }), s);
|
|
133
|
+
return /* @__PURE__ */ e.jsx(ye, { value: a, children: /* @__PURE__ */ e.jsx(g.div, { ...i, ref: n }) });
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
const n =
|
|
135
|
+
Le.displayName = "MenuRadioItemGroup";
|
|
136
|
+
const Be = (o) => {
|
|
137
|
+
const n = le(o), t = le(!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 = Y(), { getRootNode: t } = mt(), { dir: s } = ht(), c = {
|
|
145
145
|
id: n,
|
|
146
146
|
dir: s,
|
|
147
147
|
getRootNode: t,
|
|
148
148
|
...o
|
|
149
149
|
}, u = xt(ft, c);
|
|
150
150
|
return { api: Mt(u, gt), service: u };
|
|
151
|
-
}, [
|
|
151
|
+
}, [ze, Fe] = G({
|
|
152
152
|
name: "MenuMachineContext",
|
|
153
153
|
hookName: "useMenuMachineContext",
|
|
154
154
|
providerName: "<MenuMachineProvider />",
|
|
155
155
|
strict: !1
|
|
156
|
-
}), [
|
|
156
|
+
}), [We, 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] = fe(o), [s, c] = _()(t, [
|
|
163
163
|
"anchorPoint",
|
|
164
164
|
"aria-label",
|
|
165
165
|
"closeOnSelect",
|
|
@@ -181,26 +181,26 @@ const Le = (o) => {
|
|
|
181
181
|
"open",
|
|
182
182
|
"positioning",
|
|
183
183
|
"typeahead"
|
|
184
|
-
]), u = m(), a =
|
|
185
|
-
|
|
184
|
+
]), u = m(), a = Fe(), { api: i, service: f } = vt(s), N = Me(p({ present: i.open }, n));
|
|
185
|
+
Be(() => {
|
|
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(We, { value: y, children: /* @__PURE__ */ e.jsx(ze, { value: f, children: /* @__PURE__ */ e.jsx(ve, { value: i, children: /* @__PURE__ */ e.jsx(Pe, { value: N, ...c }) }) }) });
|
|
190
190
|
}, It = (o) => {
|
|
191
|
-
const n = m(), t =
|
|
192
|
-
|
|
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
|
+
Be(() => {
|
|
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(We, { value: N, 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
|
-
|
|
202
|
-
const
|
|
203
|
-
const t = m(), s =
|
|
201
|
+
Ee.displayName = "MenuSeparator";
|
|
202
|
+
const De = x((o, n) => {
|
|
203
|
+
const t = m(), s = te(), c = p(
|
|
204
204
|
{
|
|
205
205
|
...t.getTriggerProps(),
|
|
206
206
|
"aria-controls": s.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
|
|
@@ -209,67 +209,67 @@ const Ee = x((o, n) => {
|
|
|
209
209
|
);
|
|
210
210
|
return /* @__PURE__ */ e.jsx(g.button, { ...c, ref: n });
|
|
211
211
|
});
|
|
212
|
-
|
|
213
|
-
const
|
|
212
|
+
De.displayName = "MenuTrigger";
|
|
213
|
+
const Ve = 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
|
+
Ve.displayName = "MenuTriggerItem";
|
|
218
218
|
const {
|
|
219
|
-
withRootProvider:
|
|
219
|
+
withRootProvider: He,
|
|
220
220
|
withContext: h
|
|
221
221
|
} = lt({ key: "menu" });
|
|
222
|
-
|
|
222
|
+
He(
|
|
223
223
|
It
|
|
224
224
|
);
|
|
225
|
-
const bt =
|
|
225
|
+
const bt = He(Ct, {
|
|
226
226
|
defaultProps: { lazyMount: !0, unmountOnExit: !0 }
|
|
227
227
|
}), kt = h(
|
|
228
|
-
|
|
228
|
+
De,
|
|
229
229
|
"trigger",
|
|
230
230
|
{ forwardAsChild: !0 }
|
|
231
231
|
);
|
|
232
|
-
h(
|
|
232
|
+
h(Se, "contextTrigger", { forwardAsChild: !0 });
|
|
233
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
243
|
const wt = h(
|
|
244
|
-
|
|
244
|
+
ke,
|
|
245
245
|
"content",
|
|
246
246
|
{ forwardAsChild: !0 }
|
|
247
247
|
), Nt = h(
|
|
248
|
-
|
|
248
|
+
Ce,
|
|
249
249
|
"arrowTip",
|
|
250
250
|
{ forwardAsChild: !0 }
|
|
251
251
|
);
|
|
252
252
|
h(
|
|
253
|
-
|
|
253
|
+
je,
|
|
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
262
|
const yt = h(
|
|
263
|
-
|
|
263
|
+
Te,
|
|
264
264
|
"itemGroup",
|
|
265
265
|
{ forwardAsChild: !0 }
|
|
266
|
-
), At = h(
|
|
267
|
-
|
|
266
|
+
), At = h(Ge, "itemGroupLabel", { forwardAsChild: !0 }), de = h(
|
|
267
|
+
Ne,
|
|
268
268
|
"item",
|
|
269
269
|
{ forwardAsChild: !0 }
|
|
270
|
-
), Tt = h(
|
|
270
|
+
), Tt = h(Ve, "item", { forwardAsChild: !0 });
|
|
271
271
|
h(
|
|
272
|
-
|
|
272
|
+
Oe,
|
|
273
273
|
"itemText",
|
|
274
274
|
{ forwardAsChild: !0 }
|
|
275
275
|
);
|
|
@@ -277,18 +277,18 @@ h(
|
|
|
277
277
|
"kbd",
|
|
278
278
|
"itemCommand"
|
|
279
279
|
);
|
|
280
|
-
h(
|
|
280
|
+
h(_e, "itemIndicator", {
|
|
281
281
|
forwardAsChild: !0,
|
|
282
282
|
defaultProps: { children: /* @__PURE__ */ e.jsx(dt, { boxSize: "4" }) }
|
|
283
283
|
});
|
|
284
|
-
h(
|
|
285
|
-
h(
|
|
284
|
+
h(be, "item", { forwardAsChild: !0 });
|
|
285
|
+
h(Le, "itemGroup", { forwardAsChild: !0 });
|
|
286
286
|
h(
|
|
287
|
-
|
|
287
|
+
Re,
|
|
288
288
|
"item",
|
|
289
289
|
{ forwardAsChild: !0 }
|
|
290
290
|
);
|
|
291
|
-
const
|
|
291
|
+
const Ke = ({
|
|
292
292
|
hideCaret: o = !1,
|
|
293
293
|
size: n = "md",
|
|
294
294
|
text: t,
|
|
@@ -298,7 +298,7 @@ const He = ({
|
|
|
298
298
|
["data-testid"]: a = "kibble-menu-button",
|
|
299
299
|
...i
|
|
300
300
|
}) => /* @__PURE__ */ e.jsxs(
|
|
301
|
-
|
|
301
|
+
Z,
|
|
302
302
|
{
|
|
303
303
|
className: "Menu__Button",
|
|
304
304
|
"data-testid": a,
|
|
@@ -311,7 +311,7 @@ const He = ({
|
|
|
311
311
|
},
|
|
312
312
|
children: [
|
|
313
313
|
t && /* @__PURE__ */ e.jsx(
|
|
314
|
-
|
|
314
|
+
ee,
|
|
315
315
|
{
|
|
316
316
|
className: "Menu__ButtonText",
|
|
317
317
|
"data-testid": `${a}-text`,
|
|
@@ -323,7 +323,7 @@ const He = ({
|
|
|
323
323
|
children: t
|
|
324
324
|
}
|
|
325
325
|
),
|
|
326
|
-
!o && /* @__PURE__ */ e.jsx(z, { className: "Menu__ButtonCaret", "data-testid": `${a}-caret`, children: /* @__PURE__ */ e.jsx(
|
|
326
|
+
!o && /* @__PURE__ */ e.jsx(z, { 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 }) => {
|
|
@@ -334,7 +334,7 @@ const He = ({
|
|
|
334
334
|
}, [n]);
|
|
335
335
|
return B(() => {
|
|
336
336
|
n && c(!1);
|
|
337
|
-
}, [n]), /* @__PURE__ */ e.jsx(
|
|
337
|
+
}, [n]), /* @__PURE__ */ e.jsx(ge, { 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 He = ({
|
|
|
342
342
|
},
|
|
343
343
|
onMouseEnter: u,
|
|
344
344
|
onMouseLeave: a,
|
|
345
|
-
children: /* @__PURE__ */ e.jsx(
|
|
345
|
+
children: /* @__PURE__ */ e.jsx(Ke, { ...t })
|
|
346
346
|
}
|
|
347
347
|
) });
|
|
348
348
|
}, _t = ({
|
|
@@ -362,16 +362,17 @@ const He = ({
|
|
|
362
362
|
const {
|
|
363
363
|
valueText: S,
|
|
364
364
|
listProps: C,
|
|
365
|
-
|
|
365
|
+
positionerProps: M,
|
|
366
|
+
portalled: A = !0,
|
|
366
367
|
open: k,
|
|
367
|
-
lazyMount:
|
|
368
|
-
unmountOnExit:
|
|
368
|
+
lazyMount: I = !0,
|
|
369
|
+
unmountOnExit: V = !0
|
|
369
370
|
} = i;
|
|
370
371
|
return /* @__PURE__ */ e.jsx(
|
|
371
372
|
Ot,
|
|
372
373
|
{
|
|
373
|
-
lazyMount:
|
|
374
|
-
unmountOnExit:
|
|
374
|
+
lazyMount: I,
|
|
375
|
+
unmountOnExit: V,
|
|
375
376
|
submenuTrigger: /* @__PURE__ */ e.jsxs(
|
|
376
377
|
Tt,
|
|
377
378
|
{
|
|
@@ -385,7 +386,7 @@ const He = ({
|
|
|
385
386
|
},
|
|
386
387
|
children: [
|
|
387
388
|
/* @__PURE__ */ e.jsx(
|
|
388
|
-
|
|
389
|
+
X,
|
|
389
390
|
{
|
|
390
391
|
label: o,
|
|
391
392
|
leftElement: n,
|
|
@@ -393,20 +394,21 @@ const He = ({
|
|
|
393
394
|
variant: u
|
|
394
395
|
}
|
|
395
396
|
),
|
|
396
|
-
/* @__PURE__ */ e.jsx(
|
|
397
|
+
/* @__PURE__ */ e.jsx(xe, { name: "chevronRight", size: "sm" })
|
|
397
398
|
]
|
|
398
399
|
}
|
|
399
400
|
),
|
|
400
|
-
portalled:
|
|
401
|
+
portalled: A,
|
|
401
402
|
open: k !== void 0 ? k : f,
|
|
402
|
-
listProps: C
|
|
403
|
+
listProps: C,
|
|
404
|
+
positionerProps: M
|
|
403
405
|
}
|
|
404
406
|
);
|
|
405
407
|
}
|
|
406
408
|
if (c === "checkbox") {
|
|
407
|
-
const { checked: S, value: C, disabled: M, tooltipLabel:
|
|
409
|
+
const { checked: S, value: C, disabled: M, tooltipLabel: A, ...k } = i;
|
|
408
410
|
return /* @__PURE__ */ e.jsxs(
|
|
409
|
-
|
|
411
|
+
de,
|
|
410
412
|
{
|
|
411
413
|
className: "Menu__Item--Checkbox",
|
|
412
414
|
"data-testid": `${a}-checkbox`,
|
|
@@ -415,17 +417,17 @@ const He = ({
|
|
|
415
417
|
onSelect: M ? void 0 : y,
|
|
416
418
|
gap: 3,
|
|
417
419
|
disabled: M,
|
|
418
|
-
...
|
|
420
|
+
...k,
|
|
419
421
|
children: [
|
|
420
422
|
/* @__PURE__ */ e.jsx(Pt, { checked: !!S, disabled: M, size: "md", fullWidth: !1 }),
|
|
421
423
|
/* @__PURE__ */ e.jsx(
|
|
422
|
-
|
|
424
|
+
X,
|
|
423
425
|
{
|
|
424
426
|
label: o,
|
|
425
427
|
leftElement: n,
|
|
426
428
|
shouldTruncateText: s,
|
|
427
429
|
variant: u,
|
|
428
|
-
tooltipLabel:
|
|
430
|
+
tooltipLabel: A
|
|
429
431
|
}
|
|
430
432
|
)
|
|
431
433
|
]
|
|
@@ -433,9 +435,9 @@ const He = ({
|
|
|
433
435
|
);
|
|
434
436
|
}
|
|
435
437
|
if (c === "default") {
|
|
436
|
-
const { selected: S = !1, disabled: C, value: M, tooltipLabel:
|
|
438
|
+
const { selected: S = !1, disabled: C, value: M, tooltipLabel: A, ...k } = i;
|
|
437
439
|
return /* @__PURE__ */ e.jsx(
|
|
438
|
-
|
|
440
|
+
de,
|
|
439
441
|
{
|
|
440
442
|
className: "Menu__Item--Default",
|
|
441
443
|
"data-testid": `${a}-default`,
|
|
@@ -443,22 +445,22 @@ const He = ({
|
|
|
443
445
|
onSelect: C ? void 0 : y,
|
|
444
446
|
disabled: C,
|
|
445
447
|
...S && { bgColor: "background.secondaryAlpha.hover" },
|
|
446
|
-
...
|
|
448
|
+
...k,
|
|
447
449
|
children: /* @__PURE__ */ e.jsx(
|
|
448
|
-
|
|
450
|
+
X,
|
|
449
451
|
{
|
|
450
452
|
label: o,
|
|
451
453
|
leftElement: n,
|
|
452
454
|
shouldTruncateText: s,
|
|
453
455
|
variant: S ? "info" : u,
|
|
454
|
-
tooltipLabel:
|
|
456
|
+
tooltipLabel: A
|
|
455
457
|
}
|
|
456
458
|
)
|
|
457
459
|
}
|
|
458
460
|
);
|
|
459
461
|
}
|
|
460
462
|
return /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
461
|
-
},
|
|
463
|
+
}, X = ({
|
|
462
464
|
label: o,
|
|
463
465
|
leftElement: n,
|
|
464
466
|
shouldTruncateText: t,
|
|
@@ -467,22 +469,22 @@ const He = ({
|
|
|
467
469
|
}) => {
|
|
468
470
|
const u = /* @__PURE__ */ e.jsxs(z, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
|
|
469
471
|
n,
|
|
470
|
-
typeof o == "string" ? /* @__PURE__ */ e.jsx(
|
|
472
|
+
typeof o == "string" ? /* @__PURE__ */ e.jsx(ee, { size: "sm", truncated: t, variant: s, children: o }) : o
|
|
471
473
|
] });
|
|
472
|
-
return c ? /* @__PURE__ */ e.jsx(
|
|
473
|
-
},
|
|
474
|
+
return c ? /* @__PURE__ */ e.jsx(ge, { label: c, children: u }) : u;
|
|
475
|
+
}, pe = ({
|
|
474
476
|
groupName: o,
|
|
475
477
|
hasSelectedItems: n = !1,
|
|
476
478
|
onToggle: t,
|
|
477
479
|
["data-testid"]: s = "kibble-menu-toggle-buttons"
|
|
478
480
|
}) => {
|
|
479
481
|
const c = !!o;
|
|
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(
|
|
481
|
-
/* @__PURE__ */ e.jsx(
|
|
482
|
-
/* @__PURE__ */ e.jsx(
|
|
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(he, { hasSelectedItems: n, groupName: o, onToggle: t }) : /* @__PURE__ */ e.jsx(me, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(z, { justifyContent: "space-between", children: [
|
|
483
|
+
/* @__PURE__ */ e.jsx(me, { groupName: o, onToggle: t }),
|
|
484
|
+
/* @__PURE__ */ e.jsx(he, { hasSelectedItems: n, groupName: o, onToggle: t })
|
|
483
485
|
] }) });
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
+
}, me = ({ groupName: o, onToggle: n }) => /* @__PURE__ */ e.jsx(Z, { variant: "ghost", size: "xs", onClick: () => n({ groupName: o, clear: !1 }), children: "Select All" }), he = ({ hasSelectedItems: o, groupName: n, onToggle: t }) => /* @__PURE__ */ e.jsx(
|
|
487
|
+
Z,
|
|
486
488
|
{
|
|
487
489
|
variant: "ghostNeutral",
|
|
488
490
|
iconName: "arrowCircle",
|
|
@@ -507,33 +509,33 @@ const He = ({
|
|
|
507
509
|
canSelectGroups: S,
|
|
508
510
|
emptyState: C = "No results found",
|
|
509
511
|
groupSortOrder: M,
|
|
510
|
-
loading:
|
|
511
|
-
maxH:
|
|
512
|
+
loading: A,
|
|
513
|
+
maxH: k = "480px",
|
|
512
514
|
menuItems: I = [],
|
|
513
|
-
minW:
|
|
515
|
+
minW: V = "240px",
|
|
514
516
|
onSearch: w,
|
|
515
|
-
onSelect:
|
|
516
|
-
onSelectAll:
|
|
517
|
-
searchable:
|
|
517
|
+
onSelect: H,
|
|
518
|
+
onSelectAll: re,
|
|
519
|
+
searchable: K,
|
|
518
520
|
searchPlaceholder: qe = "Search...",
|
|
519
521
|
shouldTruncateText: Je,
|
|
520
|
-
...
|
|
521
|
-
} = n || {}, [Qe, Ue] = L(!1), [
|
|
522
|
+
...se
|
|
523
|
+
} = n || {}, [Qe, Ue] = L(!1), [q, J] = L(""), [F, Q] = L(I), ce = D(() => {
|
|
522
524
|
const r = {};
|
|
523
525
|
return F?.forEach((l) => {
|
|
524
526
|
const d = l.groupLabel || "default", P = l.type === "checkbox" ? "checkbox" : "default";
|
|
525
527
|
r[d] || (r[d] = {}), r[d][P] || (r[d][P] = []), r[d][P].push(l);
|
|
526
528
|
}), r;
|
|
527
|
-
}, [F]),
|
|
528
|
-
const r = Object.entries(
|
|
529
|
+
}, [F]), ae = D(() => {
|
|
530
|
+
const r = Object.entries(ce);
|
|
529
531
|
return !M || M.length === 0 ? r : r.sort(([l], [d]) => {
|
|
530
532
|
const P = M.indexOf(l), v = M.indexOf(d);
|
|
531
533
|
return P !== -1 && v !== -1 ? P - v : P !== -1 ? -1 : v !== -1 ? 1 : 0;
|
|
532
534
|
});
|
|
533
|
-
}, [
|
|
535
|
+
}, [ce, M]), O = D(() => I?.filter((r) => r.type === "checkbox") || [], [I]), U = j(
|
|
534
536
|
(r) => O.some((l) => l.value === r && l.checked),
|
|
535
537
|
[O]
|
|
536
|
-
), b = D(() => O.filter((r) => r.checked), [O]),
|
|
538
|
+
), b = D(() => O.filter((r) => r.checked), [O]), ie = j(
|
|
537
539
|
({ groupName: r, clear: l }) => {
|
|
538
540
|
let d;
|
|
539
541
|
const P = F.filter((v) => v.type === "checkbox" && !v.disabled);
|
|
@@ -545,47 +547,47 @@ const He = ({
|
|
|
545
547
|
);
|
|
546
548
|
} else
|
|
547
549
|
d = l ? [] : P.map((v) => ({ ...v, checked: !0 }));
|
|
548
|
-
console.log("newSelectedItems", d),
|
|
550
|
+
console.log("newSelectedItems", d), re?.({ allSelectedItems: d });
|
|
549
551
|
},
|
|
550
|
-
[
|
|
552
|
+
[re, F, b]
|
|
551
553
|
), Xe = j(
|
|
552
554
|
(r) => {
|
|
553
555
|
if (r.type === "checkbox") {
|
|
554
|
-
const l =
|
|
556
|
+
const l = U(r.value) ? b.filter((d) => d.value !== r.value) : [...b, r];
|
|
555
557
|
if (r.onSelect) {
|
|
556
558
|
r.onSelect(r.value);
|
|
557
559
|
return;
|
|
558
560
|
}
|
|
559
|
-
|
|
561
|
+
H?.({ item: r, allSelectedItems: l });
|
|
560
562
|
return;
|
|
561
563
|
}
|
|
562
564
|
if (r.onSelect) {
|
|
563
565
|
r.onSelect(r.value);
|
|
564
566
|
return;
|
|
565
567
|
}
|
|
566
|
-
|
|
568
|
+
H?.({ item: r, allSelectedItems: [r] });
|
|
567
569
|
},
|
|
568
|
-
[
|
|
569
|
-
),
|
|
570
|
+
[H, U, b]
|
|
571
|
+
), ue = j((r, l) => r === "" || !r ? l : l.filter((d) => !!(typeof d.label == "string" ? d.label : d.valueText)?.toLowerCase().includes(r.toLowerCase())), []), Ye = j(
|
|
570
572
|
(r) => {
|
|
571
573
|
console.log("e.target.value", r.target.value);
|
|
572
574
|
const l = r.target.value;
|
|
573
|
-
console.log("searchInput", l),
|
|
575
|
+
console.log("searchInput", l), J(l), w && w(r);
|
|
574
576
|
},
|
|
575
577
|
[w]
|
|
576
578
|
), Ze = j(() => {
|
|
577
|
-
|
|
579
|
+
J(""), w && w({
|
|
578
580
|
target: { value: "" }
|
|
579
581
|
});
|
|
580
582
|
}, [w]), et = j(
|
|
581
583
|
(r) => {
|
|
582
|
-
Ue(r), r || (
|
|
584
|
+
Ue(r), r || (J(""), Q(I)), a && a({ open: r, allSelectedItems: b });
|
|
583
585
|
},
|
|
584
586
|
[I, a, b]
|
|
585
587
|
);
|
|
586
588
|
return B(() => {
|
|
587
|
-
|
|
588
|
-
}, [
|
|
589
|
+
Q(w ? I : ue(q, I));
|
|
590
|
+
}, [q, w, ue, I]), /* @__PURE__ */ e.jsxs(
|
|
589
591
|
bt,
|
|
590
592
|
{
|
|
591
593
|
lazyMount: u,
|
|
@@ -595,21 +597,21 @@ const He = ({
|
|
|
595
597
|
},
|
|
596
598
|
...f,
|
|
597
599
|
children: [
|
|
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(
|
|
600
|
+
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 }) }),
|
|
599
601
|
/* @__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(
|
|
600
602
|
wt,
|
|
601
603
|
{
|
|
602
604
|
className: "Menu__Content",
|
|
603
605
|
"data-testid": `${i}-content`,
|
|
604
|
-
maxH:
|
|
605
|
-
minW:
|
|
606
|
-
...
|
|
607
|
-
...
|
|
606
|
+
maxH: k,
|
|
607
|
+
minW: V,
|
|
608
|
+
...se,
|
|
609
|
+
...K && { pt: "0" },
|
|
608
610
|
onClick: (r) => {
|
|
609
|
-
r.stopPropagation(),
|
|
611
|
+
r.stopPropagation(), se?.onClick?.(r);
|
|
610
612
|
},
|
|
611
613
|
children: [
|
|
612
|
-
|
|
614
|
+
K && /* @__PURE__ */ e.jsx(
|
|
613
615
|
T,
|
|
614
616
|
{
|
|
615
617
|
className: "Menu__SearchBarContainer",
|
|
@@ -628,7 +630,7 @@ const He = ({
|
|
|
628
630
|
placeholder: qe,
|
|
629
631
|
onChange: Ye,
|
|
630
632
|
size: "sm",
|
|
631
|
-
value:
|
|
633
|
+
value: q,
|
|
632
634
|
clearable: !0,
|
|
633
635
|
onClear: Ze,
|
|
634
636
|
onKeyDown: (r) => {
|
|
@@ -644,18 +646,18 @@ const He = ({
|
|
|
644
646
|
className: "Menu__CheckboxGroupHeader",
|
|
645
647
|
"data-testid": `${i}-checkbox-group-header`,
|
|
646
648
|
px: 3,
|
|
647
|
-
mt:
|
|
649
|
+
mt: K ? 1 : 2,
|
|
648
650
|
children: y && !!O.length && /* @__PURE__ */ e.jsx(
|
|
649
|
-
|
|
651
|
+
pe,
|
|
650
652
|
{
|
|
651
|
-
onToggle:
|
|
653
|
+
onToggle: ie,
|
|
652
654
|
hasSelectedItems: !!b.length
|
|
653
655
|
}
|
|
654
656
|
)
|
|
655
657
|
}
|
|
656
658
|
),
|
|
657
|
-
|
|
658
|
-
/* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children:
|
|
659
|
+
A && /* @__PURE__ */ e.jsx(z, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(at, { fullScreen: !0 }) }),
|
|
660
|
+
/* @__PURE__ */ e.jsx(T, { className: "Menu__List", "data-testid": `${i}-list`, children: ae.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: ae.map(([r, l]) => {
|
|
659
661
|
const d = r === "default", P = Object.keys(l), v = d ? st.Fragment : yt, tt = l.checkbox?.map(($) => $.value)?.some(
|
|
660
662
|
($) => b.some((E) => E.value === $ && E.checked)
|
|
661
663
|
);
|
|
@@ -663,10 +665,10 @@ const He = ({
|
|
|
663
665
|
!d && /* @__PURE__ */ e.jsx(At, { children: /* @__PURE__ */ e.jsxs(z, { alignItems: "center", justifyContent: "space-between", children: [
|
|
664
666
|
r,
|
|
665
667
|
S && P.includes("checkbox") && /* @__PURE__ */ e.jsx(
|
|
666
|
-
|
|
668
|
+
pe,
|
|
667
669
|
{
|
|
668
670
|
groupName: r,
|
|
669
|
-
onToggle:
|
|
671
|
+
onToggle: ie,
|
|
670
672
|
hasSelectedItems: tt
|
|
671
673
|
}
|
|
672
674
|
)
|
|
@@ -680,7 +682,7 @@ const He = ({
|
|
|
680
682
|
...rt,
|
|
681
683
|
shouldTruncateText: Je,
|
|
682
684
|
...R.type === "checkbox" && {
|
|
683
|
-
checked:
|
|
685
|
+
checked: U(R.value)
|
|
684
686
|
},
|
|
685
687
|
"data-testid": `${i}-item-${R.label}`,
|
|
686
688
|
onSelect: () => Xe(R)
|
|
@@ -690,7 +692,7 @@ const He = ({
|
|
|
690
692
|
})
|
|
691
693
|
)
|
|
692
694
|
] }, r);
|
|
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(
|
|
695
|
+
}) }) : /* @__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(ee, { size: "sm", variant: "subtle", "data-testid": `${i}-empty-state`, children: C }) }) : C }) }) })
|
|
694
696
|
]
|
|
695
697
|
}
|
|
696
698
|
) }) })
|
|
@@ -701,4 +703,4 @@ const He = ({
|
|
|
701
703
|
export {
|
|
702
704
|
Ot as M
|
|
703
705
|
};
|
|
704
|
-
//# sourceMappingURL=menu.component-
|
|
706
|
+
//# sourceMappingURL=menu.component-Dd4ePEAs.js.map
|