@televet/kibble-ui 4.0.0-beta.55 → 4.0.0-beta.56
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/{buttonGroup.component-C2W4MMv4.js → buttonGroup.component-B9hx5mI3.js} +2 -2
- package/dist/chunks/{buttonGroup.component-C2W4MMv4.js.map → buttonGroup.component-B9hx5mI3.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CnEizBsv.js → buttonGroup.component-BvtBFst_.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CnEizBsv.js.map → buttonGroup.component-BvtBFst_.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BCq_VUZs.js → conversationCard.component-DU5Txtre.js} +2 -2
- package/dist/chunks/{conversationCard.component-BCq_VUZs.js.map → conversationCard.component-DU5Txtre.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-DWgn822x.js → conversationCard.component-oDtQS5vN.js} +2 -2
- package/dist/chunks/{conversationCard.component-DWgn822x.js.map → conversationCard.component-oDtQS5vN.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CERTTfTK.js → datePicker.component-2-eaW5kc.js} +2 -2
- package/dist/chunks/{datePicker.component-CERTTfTK.js.map → datePicker.component-2-eaW5kc.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Ccd4mU-j.js → datePicker.component-CHxWy6dI.js} +2 -2
- package/dist/chunks/{datePicker.component-Ccd4mU-j.js.map → datePicker.component-CHxWy6dI.js.map} +1 -1
- package/dist/chunks/heading.component-CLeOcO2N.js.map +1 -1
- package/dist/chunks/heading.component-CiQwnul1.js.map +1 -1
- package/dist/chunks/{menu.component-4wPFXexb.js → menu.component-C9-aU_mX.js} +2 -2
- package/dist/chunks/menu.component-C9-aU_mX.js.map +1 -0
- package/dist/chunks/{menu.component-ElWVN9lO.js → menu.component-hIMsreNF.js} +138 -137
- package/dist/chunks/menu.component-hIMsreNF.js.map +1 -0
- package/dist/chunks/{radioGroup.component-IZh0kIjr.js → radioGroup.component-DLCz38mG.js} +2 -2
- package/dist/chunks/{radioGroup.component-IZh0kIjr.js.map → radioGroup.component-DLCz38mG.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-C4oaXqHB.js → radioGroup.component-DRl55p-r.js} +2 -2
- package/dist/chunks/{radioGroup.component-C4oaXqHB.js.map → radioGroup.component-DRl55p-r.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-HNOTrL3-.js → tagBlock.component-CVWog9fk.js} +2 -2
- package/dist/chunks/{tagBlock.component-HNOTrL3-.js.map → tagBlock.component-CVWog9fk.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-BeL5LeyB.js → tagBlock.component-CckDMCYO.js} +2 -2
- package/dist/chunks/{tagBlock.component-BeL5LeyB.js.map → tagBlock.component-CckDMCYO.js.map} +1 -1
- package/dist/chunks/text.component-jWLhtW1b.js.map +1 -1
- package/dist/chunks/text.component-o4fQGr3R.js.map +1 -1
- package/dist/chunks/{textarea.component-Pa-vcE1j.js → textarea.component-BbO76BFA.js} +2 -2
- package/dist/chunks/{textarea.component-Pa-vcE1j.js.map → textarea.component-BbO76BFA.js.map} +1 -1
- package/dist/chunks/{textarea.component-6CbblHBa.js → textarea.component-hwDE7pfA.js} +13 -12
- package/dist/chunks/{textarea.component-6CbblHBa.js.map → textarea.component-hwDE7pfA.js.map} +1 -1
- package/dist/chunks/{theme.provider-BOSisg4Q.js → theme.provider-BNnFhy6u.js} +2 -2
- package/dist/chunks/{theme.provider-BOSisg4Q.js.map → theme.provider-BNnFhy6u.js.map} +1 -1
- package/dist/chunks/{theme.provider-CTwg1nyE.js → theme.provider-BslOUKks.js} +12 -6
- package/dist/chunks/{theme.provider-CTwg1nyE.js.map → theme.provider-BslOUKks.js.map} +1 -1
- package/dist/cjs/components/ButtonGroup/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/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/Textarea/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/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/Textarea/index.js +1 -1
- package/dist/esm/components/index.js +7 -7
- package/dist/esm/index.js +8 -8
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/components/Heading/heading.component.d.ts +1 -2
- package/dist/types/components/Text/text.component.d.ts +1 -2
- package/package.json +1 -1
- package/dist/chunks/menu.component-4wPFXexb.js.map +0 -1
- package/dist/chunks/menu.component-ElWVN9lO.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import Ke, { forwardRef as x, useEffect as _, useId as F, useRef as X, useCallback as
|
|
2
|
+
import Ke, { forwardRef as x, useEffect as _, useId as F, useRef as X, useCallback as C, useState as Z, useMemo as G } from "react";
|
|
3
3
|
import { B as V } from "./button.component-BpF3MzbZ.js";
|
|
4
4
|
import { I as oe } from "./icon.component-DGNCL1Yc.js";
|
|
5
5
|
import { W as z } from "./text.component-jWLhtW1b.js";
|
|
@@ -19,14 +19,14 @@ const [ce, p] = N({
|
|
|
19
19
|
hookName: "useMenuContext",
|
|
20
20
|
providerName: "<MenuProvider />",
|
|
21
21
|
strict: !1
|
|
22
|
-
}), ue = x((
|
|
23
|
-
const t = p(), r = m(t.getArrowProps(),
|
|
24
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref:
|
|
22
|
+
}), ue = x((n, o) => {
|
|
23
|
+
const t = p(), r = m(t.getArrowProps(), n);
|
|
24
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: o });
|
|
25
25
|
});
|
|
26
26
|
ue.displayName = "MenuArrow";
|
|
27
|
-
const ie = x((
|
|
28
|
-
const t = p(), r = m(t.getArrowTipProps(),
|
|
29
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref:
|
|
27
|
+
const ie = x((n, o) => {
|
|
28
|
+
const t = p(), r = m(t.getArrowTipProps(), n);
|
|
29
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: o });
|
|
30
30
|
});
|
|
31
31
|
ie.displayName = "MenuArrowTip";
|
|
32
32
|
const [D, Wt] = N({
|
|
@@ -37,8 +37,8 @@ const [D, Wt] = N({
|
|
|
37
37
|
name: "MenuOptionItemPropsContext",
|
|
38
38
|
hookName: "useMenuOptionItemPropsContext",
|
|
39
39
|
providerName: "<MenuOptionItemPropsProvider />"
|
|
40
|
-
}), me = x((
|
|
41
|
-
const [t, r] = w()(
|
|
40
|
+
}), me = x((n, o) => {
|
|
41
|
+
const [t, r] = w()(n, [
|
|
42
42
|
"checked",
|
|
43
43
|
"closeOnSelect",
|
|
44
44
|
"disabled",
|
|
@@ -49,66 +49,66 @@ const [D, Wt] = N({
|
|
|
49
49
|
...t,
|
|
50
50
|
type: "checkbox"
|
|
51
51
|
}, u = p(), c = m(u.getOptionItemProps(s), r), l = u.getOptionItemState(s);
|
|
52
|
-
return /* @__PURE__ */ e.jsx(le, { value: s, children: /* @__PURE__ */ e.jsx(D, { value: l, children: /* @__PURE__ */ e.jsx(g.div, { ...c, ref:
|
|
52
|
+
return /* @__PURE__ */ e.jsx(le, { value: s, children: /* @__PURE__ */ e.jsx(D, { value: l, children: /* @__PURE__ */ e.jsx(g.div, { ...c, ref: o }) }) });
|
|
53
53
|
});
|
|
54
54
|
me.displayName = "MenuCheckboxItem";
|
|
55
|
-
const pe = x((
|
|
56
|
-
const t = p(), r = W(), s = m(t.getContentProps(), r.getPresenceProps(),
|
|
57
|
-
return r.unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: Xe(r.ref,
|
|
55
|
+
const pe = x((n, o) => {
|
|
56
|
+
const t = p(), r = W(), s = m(t.getContentProps(), r.getPresenceProps(), n);
|
|
57
|
+
return r.unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: Xe(r.ref, o) });
|
|
58
58
|
});
|
|
59
59
|
pe.displayName = "MenuContent";
|
|
60
|
-
const he = x((
|
|
61
|
-
const t = p(), r = m(t.getContextTriggerProps(),
|
|
62
|
-
return /* @__PURE__ */ e.jsx(g.button, { ...r, ref:
|
|
60
|
+
const he = x((n, o) => {
|
|
61
|
+
const t = p(), r = m(t.getContextTriggerProps(), n);
|
|
62
|
+
return /* @__PURE__ */ e.jsx(g.button, { ...r, ref: o });
|
|
63
63
|
});
|
|
64
64
|
he.displayName = "MenuContextTrigger";
|
|
65
|
-
const xe = x((
|
|
66
|
-
const t = p(), r = m(t.getIndicatorProps(),
|
|
67
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref:
|
|
65
|
+
const xe = x((n, o) => {
|
|
66
|
+
const t = p(), r = m(t.getIndicatorProps(), n);
|
|
67
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: o });
|
|
68
68
|
});
|
|
69
69
|
xe.displayName = "MenuIndicator";
|
|
70
|
-
const ge = x((
|
|
71
|
-
const [t, r] = w()(
|
|
70
|
+
const ge = x((n, o) => {
|
|
71
|
+
const [t, r] = w()(n, [
|
|
72
72
|
"closeOnSelect",
|
|
73
73
|
"disabled",
|
|
74
74
|
"value",
|
|
75
75
|
"valueText",
|
|
76
76
|
"onSelect"
|
|
77
77
|
]), s = p(), u = m(s.getItemProps(t), r), c = s.getItemState(t);
|
|
78
|
-
return _(() => s.addItemListener({ id: c.id, onSelect: t.onSelect }), [c.id, t.onSelect]), /* @__PURE__ */ e.jsx(D, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref:
|
|
78
|
+
return _(() => s.addItemListener({ id: c.id, onSelect: t.onSelect }), [c.id, t.onSelect]), /* @__PURE__ */ e.jsx(D, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: o }) });
|
|
79
79
|
});
|
|
80
80
|
ge.displayName = "MenuItem";
|
|
81
81
|
const [Me, fe] = N({
|
|
82
82
|
name: "MenuItemGroupContext",
|
|
83
83
|
hookName: "useMenuItemGroupContext",
|
|
84
84
|
providerName: "<MenuItemGroupProvider />"
|
|
85
|
-
}), Pe = x((
|
|
86
|
-
const [t, r] = w()(
|
|
87
|
-
return /* @__PURE__ */ e.jsx(Me, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref:
|
|
85
|
+
}), Pe = x((n, o) => {
|
|
86
|
+
const [t, r] = w()(n, ["id"]), s = p(), c = { id: F(), ...t }, l = m(s.getItemGroupProps(c), r);
|
|
87
|
+
return /* @__PURE__ */ e.jsx(Me, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: o }) });
|
|
88
88
|
});
|
|
89
89
|
Pe.displayName = "MenuItemGroup";
|
|
90
|
-
const ve = x((
|
|
91
|
-
const t = p(), r = fe(), s = m(t.getItemGroupLabelProps({ htmlFor: r.id }),
|
|
92
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref:
|
|
90
|
+
const ve = x((n, o) => {
|
|
91
|
+
const t = p(), r = fe(), s = m(t.getItemGroupLabelProps({ htmlFor: r.id }), n);
|
|
92
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: o });
|
|
93
93
|
});
|
|
94
94
|
ve.displayName = "MenuItemGroupLabel";
|
|
95
|
-
const
|
|
96
|
-
const t = p(), r = de(), s = m(t.getItemIndicatorProps(r),
|
|
97
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref:
|
|
95
|
+
const Ie = x((n, o) => {
|
|
96
|
+
const t = p(), r = de(), s = m(t.getItemIndicatorProps(r), n);
|
|
97
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: o });
|
|
98
98
|
});
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const t = p(), r = de(), s = m(t.getItemTextProps(r),
|
|
102
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref:
|
|
99
|
+
Ie.displayName = "MenuItemIndicator";
|
|
100
|
+
const Ce = x((n, o) => {
|
|
101
|
+
const t = p(), r = de(), s = m(t.getItemTextProps(r), n);
|
|
102
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: o });
|
|
103
103
|
});
|
|
104
|
-
|
|
105
|
-
const je = x((
|
|
106
|
-
const t = p(), r = m(t.getPositionerProps(),
|
|
107
|
-
return W().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...r, ref:
|
|
104
|
+
Ce.displayName = "MenuItemText";
|
|
105
|
+
const je = x((n, o) => {
|
|
106
|
+
const t = p(), r = m(t.getPositionerProps(), n);
|
|
107
|
+
return W().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...r, ref: o });
|
|
108
108
|
});
|
|
109
109
|
je.displayName = "MenuPositioner";
|
|
110
|
-
const be = x((
|
|
111
|
-
const [t, r] = w()(
|
|
110
|
+
const be = x((n, o) => {
|
|
111
|
+
const [t, r] = w()(n, [
|
|
112
112
|
"closeOnSelect",
|
|
113
113
|
"disabled",
|
|
114
114
|
"value",
|
|
@@ -119,31 +119,31 @@ const be = x((o, n) => {
|
|
|
119
119
|
type: "radio",
|
|
120
120
|
onCheckedChange: () => u.onValueChange?.({ value: t.value })
|
|
121
121
|
}, l = m(s.getOptionItemProps(c), r), M = s.getOptionItemState(c);
|
|
122
|
-
return /* @__PURE__ */ e.jsx(le, { value: c, children: /* @__PURE__ */ e.jsx(D, { value: M, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref:
|
|
122
|
+
return /* @__PURE__ */ e.jsx(le, { value: c, children: /* @__PURE__ */ e.jsx(D, { value: M, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: o }) }) });
|
|
123
123
|
});
|
|
124
124
|
be.displayName = "MenuRadioItem";
|
|
125
|
-
const ke = x((
|
|
126
|
-
const [t, r] = w()(
|
|
125
|
+
const ke = x((n, o) => {
|
|
126
|
+
const [t, r] = w()(n, [
|
|
127
127
|
"id",
|
|
128
128
|
"onValueChange",
|
|
129
129
|
"value"
|
|
130
130
|
]), s = p(), c = { id: F(), ...t }, l = m(s.getItemGroupProps({ id: c.id }), r);
|
|
131
|
-
return /* @__PURE__ */ e.jsx(Me, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref:
|
|
131
|
+
return /* @__PURE__ */ e.jsx(Me, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: o }) });
|
|
132
132
|
});
|
|
133
133
|
ke.displayName = "MenuRadioItemGroup";
|
|
134
|
-
const Se = (
|
|
135
|
-
const
|
|
134
|
+
const Se = (n) => {
|
|
135
|
+
const o = X(n), t = X(!1);
|
|
136
136
|
_(() => {
|
|
137
|
-
|
|
137
|
+
o.current = n;
|
|
138
138
|
}), _(() => {
|
|
139
|
-
t.current !== !0 && (t.current = !0,
|
|
139
|
+
t.current !== !0 && (t.current = !0, o.current());
|
|
140
140
|
}, []);
|
|
141
|
-
}, ut = (
|
|
142
|
-
const
|
|
143
|
-
id:
|
|
141
|
+
}, ut = (n) => {
|
|
142
|
+
const o = F(), { getRootNode: t } = Ze(), { dir: r } = et(), s = {
|
|
143
|
+
id: o,
|
|
144
144
|
dir: r,
|
|
145
145
|
getRootNode: t,
|
|
146
|
-
...
|
|
146
|
+
...n
|
|
147
147
|
}, u = tt(at, s);
|
|
148
148
|
return { api: ct(u, nt), service: u };
|
|
149
149
|
}, [Ne, we] = N({
|
|
@@ -156,8 +156,8 @@ const Se = (o) => {
|
|
|
156
156
|
hookName: "useMenuMachineContext",
|
|
157
157
|
providerName: "<MenuMachineProvider />",
|
|
158
158
|
strict: !1
|
|
159
|
-
}), lt = (
|
|
160
|
-
const [
|
|
159
|
+
}), lt = (n) => {
|
|
160
|
+
const [o, t] = re(n), [r, s] = w()(t, [
|
|
161
161
|
"anchorPoint",
|
|
162
162
|
"aria-label",
|
|
163
163
|
"closeOnSelect",
|
|
@@ -179,38 +179,38 @@ const Se = (o) => {
|
|
|
179
179
|
"open",
|
|
180
180
|
"positioning",
|
|
181
181
|
"typeahead"
|
|
182
|
-
]), u = p(), c = we(), { api: l, service: M } = ut(r), P = se(m({ present: l.open },
|
|
182
|
+
]), u = p(), c = we(), { api: l, service: M } = ut(r), P = se(m({ present: l.open }, o));
|
|
183
183
|
Se(() => {
|
|
184
184
|
c && u && (u.setChild(M), l.setParent(c));
|
|
185
185
|
});
|
|
186
|
-
const b =
|
|
186
|
+
const b = C(() => u?.getTriggerItemProps(l), [l, u]);
|
|
187
187
|
return /* @__PURE__ */ e.jsx(Te, { value: b, children: /* @__PURE__ */ e.jsx(Ne, { value: M, children: /* @__PURE__ */ e.jsx(ce, { value: l, children: /* @__PURE__ */ e.jsx(ae, { value: P, ...s }) }) }) });
|
|
188
|
-
}, dt = (
|
|
189
|
-
const
|
|
188
|
+
}, dt = (n) => {
|
|
189
|
+
const o = p(), t = we(), [r, { value: s, children: u }] = re(n), { api: c, service: l } = s, M = se(m({ present: c.open }, r));
|
|
190
190
|
Se(() => {
|
|
191
|
-
t &&
|
|
191
|
+
t && o && (o.setChild(l), c.setParent(t));
|
|
192
192
|
});
|
|
193
|
-
const P =
|
|
193
|
+
const P = C(() => o?.getTriggerItemProps(c), [c, o]);
|
|
194
194
|
return /* @__PURE__ */ e.jsx(Te, { value: P, children: /* @__PURE__ */ e.jsx(Ne, { value: l, children: /* @__PURE__ */ e.jsx(ce, { value: c, children: /* @__PURE__ */ e.jsx(ae, { value: M, children: u }) }) }) });
|
|
195
|
-
}, ye = x((
|
|
196
|
-
const t = p(), r = m(t.getSeparatorProps(),
|
|
197
|
-
return /* @__PURE__ */ e.jsx(g.hr, { ...r, ref:
|
|
195
|
+
}, ye = x((n, o) => {
|
|
196
|
+
const t = p(), r = m(t.getSeparatorProps(), n);
|
|
197
|
+
return /* @__PURE__ */ e.jsx(g.hr, { ...r, ref: o });
|
|
198
198
|
});
|
|
199
199
|
ye.displayName = "MenuSeparator";
|
|
200
|
-
const Ae = x((
|
|
200
|
+
const Ae = x((n, o) => {
|
|
201
201
|
const t = p(), r = W(), s = m(
|
|
202
202
|
{
|
|
203
203
|
...t.getTriggerProps(),
|
|
204
204
|
"aria-controls": r.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
|
|
205
205
|
},
|
|
206
|
-
|
|
206
|
+
n
|
|
207
207
|
);
|
|
208
|
-
return /* @__PURE__ */ e.jsx(g.button, { ...s, ref:
|
|
208
|
+
return /* @__PURE__ */ e.jsx(g.button, { ...s, ref: o });
|
|
209
209
|
});
|
|
210
210
|
Ae.displayName = "MenuTrigger";
|
|
211
|
-
const Ge = x((
|
|
212
|
-
const t = it(), r = m(t?.() ?? {},
|
|
213
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref:
|
|
211
|
+
const Ge = x((n, o) => {
|
|
212
|
+
const t = it(), r = m(t?.() ?? {}, n);
|
|
213
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: o });
|
|
214
214
|
});
|
|
215
215
|
Ge.displayName = "MenuTriggerItem";
|
|
216
216
|
const {
|
|
@@ -267,7 +267,7 @@ const Mt = h(
|
|
|
267
267
|
{ forwardAsChild: !0 }
|
|
268
268
|
), vt = h(Ge, "item", { forwardAsChild: !0 });
|
|
269
269
|
h(
|
|
270
|
-
|
|
270
|
+
Ce,
|
|
271
271
|
"itemText",
|
|
272
272
|
{ forwardAsChild: !0 }
|
|
273
273
|
);
|
|
@@ -275,20 +275,20 @@ h(
|
|
|
275
275
|
"kbd",
|
|
276
276
|
"itemCommand"
|
|
277
277
|
);
|
|
278
|
-
h(
|
|
278
|
+
h(Ie, "itemIndicator", {
|
|
279
279
|
forwardAsChild: !0,
|
|
280
280
|
defaultProps: { children: /* @__PURE__ */ e.jsx(st, { boxSize: "4" }) }
|
|
281
281
|
});
|
|
282
|
-
const
|
|
282
|
+
const It = h(me, "item", { forwardAsChild: !0 });
|
|
283
283
|
h(ke, "itemGroup", { forwardAsChild: !0 });
|
|
284
284
|
h(
|
|
285
285
|
be,
|
|
286
286
|
"item",
|
|
287
287
|
{ forwardAsChild: !0 }
|
|
288
288
|
);
|
|
289
|
-
const
|
|
290
|
-
hideCaret:
|
|
291
|
-
size:
|
|
289
|
+
const Ct = ({
|
|
290
|
+
hideCaret: n = !1,
|
|
291
|
+
size: o = "md",
|
|
292
292
|
text: t,
|
|
293
293
|
textProps: r,
|
|
294
294
|
variant: s,
|
|
@@ -298,9 +298,10 @@ const It = ({
|
|
|
298
298
|
{
|
|
299
299
|
className: "Menu__Button",
|
|
300
300
|
"data-testid": "kibble-menu-button",
|
|
301
|
-
size:
|
|
301
|
+
size: o,
|
|
302
302
|
variant: s,
|
|
303
303
|
...u,
|
|
304
|
+
...!t && n && { paddingInline: 0, paddingBlock: 0 },
|
|
304
305
|
children: [
|
|
305
306
|
t && /* @__PURE__ */ e.jsx(
|
|
306
307
|
z,
|
|
@@ -308,33 +309,33 @@ const It = ({
|
|
|
308
309
|
className: "Menu__ButtonText",
|
|
309
310
|
"data-testid": "kibble-menu-button-text",
|
|
310
311
|
fontWeight: "semibold",
|
|
311
|
-
size:
|
|
312
|
+
size: o,
|
|
312
313
|
color: s ? "inherit" : r?.color || "text.contrast",
|
|
313
314
|
truncate: !0,
|
|
314
315
|
...r,
|
|
315
316
|
children: t
|
|
316
317
|
}
|
|
317
318
|
),
|
|
318
|
-
!
|
|
319
|
+
!n && /* @__PURE__ */ e.jsx(
|
|
319
320
|
y,
|
|
320
321
|
{
|
|
321
322
|
className: "Menu__ButtonCaret",
|
|
322
323
|
"data-testid": "kibble-menu-button-caret",
|
|
323
|
-
children: /* @__PURE__ */ e.jsx(oe, { name: "chevronDown", size:
|
|
324
|
+
children: /* @__PURE__ */ e.jsx(oe, { name: "chevronDown", size: o === "lg" ? "sm" : "xs" })
|
|
324
325
|
}
|
|
325
326
|
)
|
|
326
327
|
]
|
|
327
328
|
}
|
|
328
329
|
), jt = ({
|
|
329
|
-
label:
|
|
330
|
-
leftElement:
|
|
330
|
+
label: n,
|
|
331
|
+
leftElement: o,
|
|
331
332
|
onSelect: t,
|
|
332
333
|
shouldTruncateText: r,
|
|
333
334
|
type: s = "default",
|
|
334
335
|
variant: u,
|
|
335
336
|
...c
|
|
336
337
|
}) => {
|
|
337
|
-
const l =
|
|
338
|
+
const l = C(() => {
|
|
338
339
|
t && t(c.value);
|
|
339
340
|
}, [t, c.value]);
|
|
340
341
|
if (s === "submenu") {
|
|
@@ -353,8 +354,8 @@ const It = ({
|
|
|
353
354
|
/* @__PURE__ */ e.jsx(
|
|
354
355
|
L,
|
|
355
356
|
{
|
|
356
|
-
label:
|
|
357
|
-
leftElement:
|
|
357
|
+
label: n,
|
|
358
|
+
leftElement: o,
|
|
358
359
|
shouldTruncateText: r,
|
|
359
360
|
variant: u
|
|
360
361
|
}
|
|
@@ -369,9 +370,9 @@ const It = ({
|
|
|
369
370
|
);
|
|
370
371
|
}
|
|
371
372
|
if (s === "checkbox") {
|
|
372
|
-
const { checked: M, value: P, closeOnSelect: b, ...
|
|
373
|
+
const { checked: M, value: P, closeOnSelect: b, ...I } = c;
|
|
373
374
|
return /* @__PURE__ */ e.jsxs(
|
|
374
|
-
|
|
375
|
+
It,
|
|
375
376
|
{
|
|
376
377
|
className: "Menu__Item--Checkbox",
|
|
377
378
|
"data-testid": "kibble-menu-item-checkbox",
|
|
@@ -380,14 +381,14 @@ const It = ({
|
|
|
380
381
|
onCheckedChange: l,
|
|
381
382
|
closeOnSelect: b || !1,
|
|
382
383
|
gap: 3,
|
|
383
|
-
...
|
|
384
|
+
...I,
|
|
384
385
|
children: [
|
|
385
386
|
/* @__PURE__ */ e.jsx(Qe, { checked: !!M, size: "md", fullWidth: !1 }),
|
|
386
387
|
/* @__PURE__ */ e.jsx(
|
|
387
388
|
L,
|
|
388
389
|
{
|
|
389
|
-
label:
|
|
390
|
-
leftElement:
|
|
390
|
+
label: n,
|
|
391
|
+
leftElement: o,
|
|
391
392
|
shouldTruncateText: r,
|
|
392
393
|
variant: u
|
|
393
394
|
}
|
|
@@ -414,8 +415,8 @@ const It = ({
|
|
|
414
415
|
children: /* @__PURE__ */ e.jsx(
|
|
415
416
|
L,
|
|
416
417
|
{
|
|
417
|
-
label:
|
|
418
|
-
leftElement:
|
|
418
|
+
label: n,
|
|
419
|
+
leftElement: o,
|
|
419
420
|
shouldTruncateText: r,
|
|
420
421
|
variant: M ? "info" : u
|
|
421
422
|
}
|
|
@@ -425,39 +426,39 @@ const It = ({
|
|
|
425
426
|
}
|
|
426
427
|
return /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
427
428
|
}, L = ({
|
|
428
|
-
label:
|
|
429
|
-
leftElement:
|
|
429
|
+
label: n,
|
|
430
|
+
leftElement: o,
|
|
430
431
|
shouldTruncateText: t,
|
|
431
432
|
variant: r
|
|
432
433
|
}) => /* @__PURE__ */ e.jsxs(y, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
|
|
433
|
-
|
|
434
|
-
typeof
|
|
434
|
+
o,
|
|
435
|
+
typeof n == "string" ? /* @__PURE__ */ e.jsx(z, { size: "sm", truncated: t, variant: r, children: n }) : n
|
|
435
436
|
] }), ee = ({
|
|
436
|
-
groupName:
|
|
437
|
-
hasSelectedItems:
|
|
437
|
+
groupName: n,
|
|
438
|
+
hasSelectedItems: o = !1,
|
|
438
439
|
onToggle: t
|
|
439
440
|
}) => {
|
|
440
|
-
const r = !!
|
|
441
|
+
const r = !!n;
|
|
441
442
|
return /* @__PURE__ */ e.jsx(
|
|
442
443
|
O,
|
|
443
444
|
{
|
|
444
445
|
className: "Menu__ToggleButtons",
|
|
445
446
|
"data-testid": "kibble-menu-toggle-buttons",
|
|
446
447
|
...r ? { textAlign: "right", w: "50%" } : { mt: 2 },
|
|
447
|
-
children: r ? /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
448
|
+
children: r ? /* @__PURE__ */ e.jsx(e.Fragment, { children: o ? /* @__PURE__ */ e.jsx(
|
|
448
449
|
ne,
|
|
449
450
|
{
|
|
450
|
-
hasSelectedItems:
|
|
451
|
-
groupName:
|
|
451
|
+
hasSelectedItems: o,
|
|
452
|
+
groupName: n,
|
|
452
453
|
onToggle: t
|
|
453
454
|
}
|
|
454
|
-
) : /* @__PURE__ */ e.jsx(te, { groupName:
|
|
455
|
-
/* @__PURE__ */ e.jsx(te, { groupName:
|
|
455
|
+
) : /* @__PURE__ */ e.jsx(te, { groupName: n, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(y, { justifyContent: "space-between", children: [
|
|
456
|
+
/* @__PURE__ */ e.jsx(te, { groupName: n, onToggle: t }),
|
|
456
457
|
/* @__PURE__ */ e.jsx(
|
|
457
458
|
ne,
|
|
458
459
|
{
|
|
459
|
-
hasSelectedItems:
|
|
460
|
-
groupName:
|
|
460
|
+
hasSelectedItems: o,
|
|
461
|
+
groupName: n,
|
|
461
462
|
onToggle: t
|
|
462
463
|
}
|
|
463
464
|
)
|
|
@@ -465,19 +466,19 @@ const It = ({
|
|
|
465
466
|
}
|
|
466
467
|
);
|
|
467
468
|
}, te = ({
|
|
468
|
-
groupName:
|
|
469
|
-
onToggle:
|
|
469
|
+
groupName: n,
|
|
470
|
+
onToggle: o
|
|
470
471
|
}) => /* @__PURE__ */ e.jsx(
|
|
471
472
|
V,
|
|
472
473
|
{
|
|
473
474
|
variant: "ghost",
|
|
474
475
|
size: "xs",
|
|
475
|
-
onClick: () =>
|
|
476
|
+
onClick: () => o({ groupName: n, clear: !1 }),
|
|
476
477
|
children: "Select All"
|
|
477
478
|
}
|
|
478
479
|
), ne = ({
|
|
479
|
-
hasSelectedItems:
|
|
480
|
-
groupName:
|
|
480
|
+
hasSelectedItems: n,
|
|
481
|
+
groupName: o,
|
|
481
482
|
onToggle: t
|
|
482
483
|
}) => /* @__PURE__ */ e.jsx(
|
|
483
484
|
V,
|
|
@@ -485,13 +486,13 @@ const It = ({
|
|
|
485
486
|
variant: "ghostNeutral",
|
|
486
487
|
iconName: "arrowCircle",
|
|
487
488
|
size: "xs",
|
|
488
|
-
disabled: !
|
|
489
|
-
onClick: () => t({ groupName:
|
|
489
|
+
disabled: !n,
|
|
490
|
+
onClick: () => t({ groupName: o, clear: !0 }),
|
|
490
491
|
children: "Clear All"
|
|
491
492
|
}
|
|
492
493
|
), bt = ({
|
|
493
|
-
buttonProps:
|
|
494
|
-
listProps:
|
|
494
|
+
buttonProps: n,
|
|
495
|
+
listProps: o,
|
|
495
496
|
portalled: t = !1,
|
|
496
497
|
submenuTrigger: r,
|
|
497
498
|
...s
|
|
@@ -502,44 +503,44 @@ const It = ({
|
|
|
502
503
|
emptyStateText: M = "No results found",
|
|
503
504
|
loading: P,
|
|
504
505
|
maxH: b = "480px",
|
|
505
|
-
menuItems:
|
|
506
|
+
menuItems: I = [],
|
|
506
507
|
minW: _e = "240px",
|
|
507
508
|
onSearch: j,
|
|
508
509
|
onSelect: E,
|
|
509
510
|
onSelectAll: H,
|
|
510
511
|
searchable: K,
|
|
511
512
|
searchPlaceholder: Re = "Search...",
|
|
512
|
-
shouldTruncateText:
|
|
513
|
-
|
|
514
|
-
} =
|
|
513
|
+
shouldTruncateText: Be,
|
|
514
|
+
...$e
|
|
515
|
+
} = o || {}, [R, B] = Z(""), [Y, $] = Z(I), q = G(() => {
|
|
515
516
|
const a = {};
|
|
516
517
|
return Y?.forEach((i) => {
|
|
517
518
|
const d = i.groupLabel || "default", f = i.type === "checkbox" ? "checkbox" : "default";
|
|
518
519
|
a[d] || (a[d] = {}), a[d][f] || (a[d][f] = []), a[d][f].push(i);
|
|
519
520
|
}), a;
|
|
520
521
|
}, [Y]), J = G(() => Object.entries(q), [q]), S = G(
|
|
521
|
-
() =>
|
|
522
|
-
[
|
|
522
|
+
() => I?.filter((a) => a.type === "checkbox") || [],
|
|
523
|
+
[I]
|
|
523
524
|
), Le = G(() => (S?.filter((i) => i.checked) || []).map((i) => i.value), [S]), v = Ue({
|
|
524
525
|
defaultValue: Le
|
|
525
|
-
}), Q =
|
|
526
|
+
}), Q = C(
|
|
526
527
|
(a, i) => a === "" || !a ? i : i.filter((d) => !!(typeof d.label == "string" ? d.label : d.valueText)?.toLowerCase().includes(a.toLowerCase())),
|
|
527
528
|
[]
|
|
528
529
|
);
|
|
529
530
|
_(() => {
|
|
530
|
-
|
|
531
|
-
}, [R, j, Q,
|
|
532
|
-
const Fe =
|
|
531
|
+
$(j ? I : Q(R, I));
|
|
532
|
+
}, [R, j, Q, I]);
|
|
533
|
+
const Fe = C(
|
|
533
534
|
(a) => {
|
|
534
535
|
const i = a.target.value;
|
|
535
|
-
|
|
536
|
+
B(i), j && j(a);
|
|
536
537
|
},
|
|
537
538
|
[j]
|
|
538
|
-
), Ve =
|
|
539
|
-
|
|
539
|
+
), Ve = C(() => {
|
|
540
|
+
B(""), j && j({
|
|
540
541
|
target: { value: "" }
|
|
541
542
|
});
|
|
542
|
-
}, [j]), U =
|
|
543
|
+
}, [j]), U = C(
|
|
543
544
|
({ groupName: a, clear: i }) => {
|
|
544
545
|
let d = [];
|
|
545
546
|
if (a) {
|
|
@@ -550,7 +551,7 @@ const It = ({
|
|
|
550
551
|
H?.(d), v.setValue(d);
|
|
551
552
|
},
|
|
552
553
|
[S, H, v]
|
|
553
|
-
), ze =
|
|
554
|
+
), ze = C(
|
|
554
555
|
(a) => {
|
|
555
556
|
a.onSelect?.(a.value);
|
|
556
557
|
const i = v.value, d = v.isChecked(a.value);
|
|
@@ -560,11 +561,11 @@ const It = ({
|
|
|
560
561
|
), a.type === "checkbox" && v.toggleValue(a.value);
|
|
561
562
|
},
|
|
562
563
|
[E, v]
|
|
563
|
-
), We =
|
|
564
|
+
), We = C(
|
|
564
565
|
(a) => {
|
|
565
|
-
a || (
|
|
566
|
+
a || (B(""), $(I));
|
|
566
567
|
},
|
|
567
|
-
[
|
|
568
|
+
[I]
|
|
568
569
|
);
|
|
569
570
|
return /* @__PURE__ */ e.jsxs(
|
|
570
571
|
mt,
|
|
@@ -580,7 +581,7 @@ const It = ({
|
|
|
580
581
|
asChild: !0,
|
|
581
582
|
className: "Menu__Trigger",
|
|
582
583
|
"data-testid": "kibble-menu-trigger",
|
|
583
|
-
children: /* @__PURE__ */ e.jsx(
|
|
584
|
+
children: /* @__PURE__ */ e.jsx(Ct, { ...n })
|
|
584
585
|
}
|
|
585
586
|
),
|
|
586
587
|
/* @__PURE__ */ e.jsx(ot, { disabled: !t, container: u || void 0, children: /* @__PURE__ */ e.jsx(ht, { className: "Menu", "data-testid": "kibble-menu", children: /* @__PURE__ */ e.jsxs(
|
|
@@ -590,7 +591,7 @@ const It = ({
|
|
|
590
591
|
"data-testid": "kibble-menu-content",
|
|
591
592
|
maxH: b,
|
|
592
593
|
minW: _e,
|
|
593
|
-
|
|
594
|
+
...$e,
|
|
594
595
|
children: [
|
|
595
596
|
(K || c) && /* @__PURE__ */ e.jsxs(
|
|
596
597
|
O,
|
|
@@ -653,7 +654,7 @@ const It = ({
|
|
|
653
654
|
jt,
|
|
654
655
|
{
|
|
655
656
|
...A,
|
|
656
|
-
shouldTruncateText:
|
|
657
|
+
shouldTruncateText: Be,
|
|
657
658
|
...A.type === "checkbox" && {
|
|
658
659
|
checked: v.isChecked(A.value)
|
|
659
660
|
},
|
|
@@ -674,4 +675,4 @@ const It = ({
|
|
|
674
675
|
export {
|
|
675
676
|
bt as M
|
|
676
677
|
};
|
|
677
|
-
//# sourceMappingURL=menu.component-
|
|
678
|
+
//# sourceMappingURL=menu.component-hIMsreNF.js.map
|