@televet/kibble-ui 4.0.0-beta.47 → 4.0.0-beta.49
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-BllwiY24.js → buttonGroup.component-BLjEEBle.js} +2 -2
- package/dist/chunks/{buttonGroup.component-BllwiY24.js.map → buttonGroup.component-BLjEEBle.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CyWOOEs3.js → buttonGroup.component-B_5ioQ76.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CyWOOEs3.js.map → buttonGroup.component-B_5ioQ76.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CTRfZQCI.js → conversationCard.component-CFok-8U0.js} +2 -2
- package/dist/chunks/{conversationCard.component-CTRfZQCI.js.map → conversationCard.component-CFok-8U0.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BERwqiS-.js → conversationCard.component-CiDSMTUO.js} +2 -2
- package/dist/chunks/{conversationCard.component-BERwqiS-.js.map → conversationCard.component-CiDSMTUO.js.map} +1 -1
- package/dist/chunks/{datePicker.component-DN3Vb2hm.js → datePicker.component-BvJzhMIq.js} +2 -2
- package/dist/chunks/{datePicker.component-DN3Vb2hm.js.map → datePicker.component-BvJzhMIq.js.map} +1 -1
- package/dist/chunks/{datePicker.component-PImZR-B6.js → datePicker.component-DKDgsGci.js} +2 -2
- package/dist/chunks/{datePicker.component-PImZR-B6.js.map → datePicker.component-DKDgsGci.js.map} +1 -1
- package/dist/chunks/menu.component-Bi2JPazM.js +2 -0
- package/dist/chunks/{menu.component-DfMZGgCy.js.map → menu.component-Bi2JPazM.js.map} +1 -1
- package/dist/chunks/menu.component-DbVIiM3g.js +677 -0
- package/dist/chunks/{menu.component-CTze16Re.js.map → menu.component-DbVIiM3g.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-BijXqMDe.js → radioGroup.component-VgKW4-P2.js} +2 -2
- package/dist/chunks/{radioGroup.component-BijXqMDe.js.map → radioGroup.component-VgKW4-P2.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-D9lKUJfv.js → radioGroup.component-cFpOM0dT.js} +2 -2
- package/dist/chunks/{radioGroup.component-D9lKUJfv.js.map → radioGroup.component-cFpOM0dT.js.map} +1 -1
- package/dist/chunks/select.component-BDLdQaL2.js +2 -0
- package/dist/chunks/{select.component-9-2Fo505.js.map → select.component-BDLdQaL2.js.map} +1 -1
- package/dist/chunks/select.component-BSZd60MZ.js +391 -0
- package/dist/chunks/{select.component-C4Kx68wP.js.map → select.component-BSZd60MZ.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-CNWy7Cz4.js → tagBlock.component-C0LIdK0o.js} +2 -2
- package/dist/chunks/{tagBlock.component-CNWy7Cz4.js.map → tagBlock.component-C0LIdK0o.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-Cn6vRcHX.js → tagBlock.component-DpcWXFLP.js} +2 -2
- package/dist/chunks/{tagBlock.component-Cn6vRcHX.js.map → tagBlock.component-DpcWXFLP.js.map} +1 -1
- package/dist/chunks/{theme.provider-CnlvRUbx.js → theme.provider-B9PPowSI.js} +5 -3
- package/dist/chunks/{theme.provider-CnlvRUbx.js.map → theme.provider-B9PPowSI.js.map} +1 -1
- package/dist/chunks/{theme.provider-B8KfvKCf.js → theme.provider-DOj3vPkk.js} +2 -2
- package/dist/chunks/{theme.provider-B8KfvKCf.js.map → theme.provider-DOj3vPkk.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/Select/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/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/Select/index.js +1 -1
- package/dist/esm/components/TagBlock/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/Select/select.component.d.ts +3 -0
- package/package.json +2 -2
- package/dist/chunks/menu.component-CTze16Re.js +0 -677
- package/dist/chunks/menu.component-DfMZGgCy.js +0 -2
- package/dist/chunks/select.component-9-2Fo505.js +0 -2
- package/dist/chunks/select.component-C4Kx68wP.js +0 -345
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import de, { forwardRef as d, useId as R, useMemo as O, useState as G, useCallback as I, useEffect as me } from "react";
|
|
3
|
+
import { w as pe } from "./withFormControl-Vf_flDYv.js";
|
|
4
|
+
import { I as ue } from "./icon.component-BmcWaysM.js";
|
|
5
|
+
import { B as xe } from "./button.component-BWlRjD5a.js";
|
|
6
|
+
import { W as L } from "./text.component-D3E0SdX1.js";
|
|
7
|
+
import { S as Pe } from "./spinner.component-DCSsW51J.js";
|
|
8
|
+
import { a as S, f as m, u as k, h as ge, b as h, j as Se, i as he, k as fe, n as Ce, s as V, l as $, m as F, P as ve } from "./use-locale-context-zakBNK5b.js";
|
|
9
|
+
import { c as je } from "./create-slot-recipe-context-DJkLYvCT.js";
|
|
10
|
+
import { C as Ie, b as be, c as ye } from "./icons-grAfs3Oz.js";
|
|
11
|
+
import { u as _ } from "./use-field-context-B8ygn96q.js";
|
|
12
|
+
import { U as a } from "./index-DLvqBeH6.js";
|
|
13
|
+
import { L as Ne, m as Te, c as we } from "./index-Dn2nvQ5m.js";
|
|
14
|
+
import { u as Ge } from "./tooltip.component-DYBYGsfe.js";
|
|
15
|
+
import { W as Ae } from "./textInput.component-BpCIE07n.js";
|
|
16
|
+
import { F as A } from "./flex-C2d2LH-K.js";
|
|
17
|
+
import { B as Re } from "./box-y05hq0PT.js";
|
|
18
|
+
const Oe = (r) => new Ne(r), [H, p] = S({
|
|
19
|
+
name: "SelectContext",
|
|
20
|
+
hookName: "useSelectContext",
|
|
21
|
+
providerName: "<SelectProvider />"
|
|
22
|
+
}), W = d((r, l) => {
|
|
23
|
+
const s = p(), t = a(s.getClearTriggerProps(), r);
|
|
24
|
+
return /* @__PURE__ */ e.jsx(m.button, { ...t, ref: l });
|
|
25
|
+
});
|
|
26
|
+
W.displayName = "SelectClearTrigger";
|
|
27
|
+
const B = d((r, l) => {
|
|
28
|
+
const s = p(), t = k(), o = a(s.getContentProps(), t.getPresenceProps(), r);
|
|
29
|
+
return t.unmounted ? null : /* @__PURE__ */ e.jsx(m.div, { ...o, ref: ge(t.ref, l) });
|
|
30
|
+
});
|
|
31
|
+
B.displayName = "SelectContent";
|
|
32
|
+
const D = d((r, l) => {
|
|
33
|
+
const s = p(), t = a(s.getControlProps(), r);
|
|
34
|
+
return /* @__PURE__ */ e.jsx(m.div, { ...t, ref: l });
|
|
35
|
+
});
|
|
36
|
+
D.displayName = "SelectControl";
|
|
37
|
+
const E = d((r, l) => {
|
|
38
|
+
const s = p(), t = a(s.getHiddenSelectProps(), r), o = s.value.length === 0, n = _();
|
|
39
|
+
return /* @__PURE__ */ e.jsxs(m.select, { "aria-describedby": n?.ariaDescribedby, ...t, ref: l, children: [
|
|
40
|
+
o && /* @__PURE__ */ e.jsx("option", { value: "" }),
|
|
41
|
+
s.collection.items.map((c, x) => /* @__PURE__ */ e.jsx(
|
|
42
|
+
"option",
|
|
43
|
+
{
|
|
44
|
+
value: s.collection.getItemValue(c) ?? "",
|
|
45
|
+
disabled: s.collection.getItemDisabled(c),
|
|
46
|
+
children: s.collection.stringifyItem(c)
|
|
47
|
+
},
|
|
48
|
+
x
|
|
49
|
+
))
|
|
50
|
+
] });
|
|
51
|
+
});
|
|
52
|
+
E.displayName = "SelectHiddenSelect";
|
|
53
|
+
const q = d((r, l) => {
|
|
54
|
+
const s = p(), t = a(s.getIndicatorProps(), r);
|
|
55
|
+
return /* @__PURE__ */ e.jsx(m.div, { ...t, ref: l });
|
|
56
|
+
});
|
|
57
|
+
q.displayName = "SelectIndicator";
|
|
58
|
+
const [Le, ft] = S({
|
|
59
|
+
name: "SelectItemContext",
|
|
60
|
+
hookName: "useSelectItemContext",
|
|
61
|
+
providerName: "<SelectItemProvider />"
|
|
62
|
+
}), [ke, M] = S({
|
|
63
|
+
name: "SelectItemPropsContext",
|
|
64
|
+
hookName: "useSelectItemPropsContext",
|
|
65
|
+
providerName: "<SelectItemPropsProvider />"
|
|
66
|
+
}), U = d((r, l) => {
|
|
67
|
+
const [s, t] = h()(r, ["item", "persistFocus"]), o = p(), n = a(o.getItemProps(s), t), c = o.getItemState(s);
|
|
68
|
+
return /* @__PURE__ */ e.jsx(ke, { value: s, children: /* @__PURE__ */ e.jsx(Le, { value: c, children: /* @__PURE__ */ e.jsx(m.div, { ...n, ref: l }) }) });
|
|
69
|
+
});
|
|
70
|
+
U.displayName = "SelectItem";
|
|
71
|
+
const [Ve, $e] = S({
|
|
72
|
+
name: "SelectItemGroupPropsContext",
|
|
73
|
+
hookName: "useSelectItemGroupPropsContext",
|
|
74
|
+
providerName: "<SelectItemGroupPropsProvider />"
|
|
75
|
+
}), z = d((r, l) => {
|
|
76
|
+
const s = R(), [t, o] = h()(r, ["id"]), n = { id: s, ...t }, c = p(), x = a(c.getItemGroupProps(n), o);
|
|
77
|
+
return /* @__PURE__ */ e.jsx(Ve, { value: n, children: /* @__PURE__ */ e.jsx(m.div, { ...x, ref: l }) });
|
|
78
|
+
});
|
|
79
|
+
z.displayName = "SelectItemGroup";
|
|
80
|
+
const J = d((r, l) => {
|
|
81
|
+
const s = p(), t = $e(), o = a(s.getItemGroupLabelProps({ htmlFor: t.id }), r);
|
|
82
|
+
return /* @__PURE__ */ e.jsx(m.div, { ...o, ref: l });
|
|
83
|
+
});
|
|
84
|
+
J.displayName = "SelectItemGroupLabel";
|
|
85
|
+
const K = d((r, l) => {
|
|
86
|
+
const s = p(), t = M(), o = a(s.getItemIndicatorProps(t), r);
|
|
87
|
+
return /* @__PURE__ */ e.jsx(m.div, { ...o, ref: l });
|
|
88
|
+
});
|
|
89
|
+
K.displayName = "SelectItemIndicator";
|
|
90
|
+
const Q = d((r, l) => {
|
|
91
|
+
const s = p(), t = M(), o = a(s.getItemTextProps(t), r);
|
|
92
|
+
return /* @__PURE__ */ e.jsx(m.span, { ...o, ref: l });
|
|
93
|
+
});
|
|
94
|
+
Q.displayName = "SelectItemText";
|
|
95
|
+
const X = d((r, l) => {
|
|
96
|
+
const s = p(), t = a(s.getLabelProps(), r);
|
|
97
|
+
return /* @__PURE__ */ e.jsx(m.label, { ...t, ref: l });
|
|
98
|
+
});
|
|
99
|
+
X.displayName = "SelectLabel";
|
|
100
|
+
const Y = d((r, l) => {
|
|
101
|
+
const s = p(), t = a(s.getPositionerProps(), r);
|
|
102
|
+
return k().unmounted ? null : /* @__PURE__ */ e.jsx(m.div, { ...t, ref: l });
|
|
103
|
+
});
|
|
104
|
+
Y.displayName = "SelectPositioner";
|
|
105
|
+
const Fe = (r) => {
|
|
106
|
+
const l = R(), { dir: s } = Se(), { getRootNode: t } = he(), o = _(), n = {
|
|
107
|
+
id: l,
|
|
108
|
+
ids: {
|
|
109
|
+
label: o?.ids.label,
|
|
110
|
+
hiddenSelect: o?.ids.control
|
|
111
|
+
},
|
|
112
|
+
disabled: o?.disabled,
|
|
113
|
+
readOnly: o?.readOnly,
|
|
114
|
+
invalid: o?.invalid,
|
|
115
|
+
required: o?.required,
|
|
116
|
+
dir: s,
|
|
117
|
+
getRootNode: t,
|
|
118
|
+
...r
|
|
119
|
+
}, c = fe(Te, n);
|
|
120
|
+
return we(c, Ce);
|
|
121
|
+
}, _e = (r, l) => {
|
|
122
|
+
const [s, t] = V(r), [o, n] = h()(t, [
|
|
123
|
+
"closeOnSelect",
|
|
124
|
+
"collection",
|
|
125
|
+
"composite",
|
|
126
|
+
"defaultHighlightedValue",
|
|
127
|
+
"defaultOpen",
|
|
128
|
+
"defaultValue",
|
|
129
|
+
"deselectable",
|
|
130
|
+
"disabled",
|
|
131
|
+
"form",
|
|
132
|
+
"highlightedValue",
|
|
133
|
+
"id",
|
|
134
|
+
"ids",
|
|
135
|
+
"invalid",
|
|
136
|
+
"loopFocus",
|
|
137
|
+
"multiple",
|
|
138
|
+
"name",
|
|
139
|
+
"onFocusOutside",
|
|
140
|
+
"onHighlightChange",
|
|
141
|
+
"onInteractOutside",
|
|
142
|
+
"onOpenChange",
|
|
143
|
+
"onPointerDownOutside",
|
|
144
|
+
"onValueChange",
|
|
145
|
+
"open",
|
|
146
|
+
"positioning",
|
|
147
|
+
"readOnly",
|
|
148
|
+
"required",
|
|
149
|
+
"scrollToIndexFn",
|
|
150
|
+
"value"
|
|
151
|
+
]), c = Fe(o), x = $(a({ present: c.open }, s)), f = a(c.getRootProps(), n);
|
|
152
|
+
return /* @__PURE__ */ e.jsx(H, { value: c, children: /* @__PURE__ */ e.jsx(F, { value: x, children: /* @__PURE__ */ e.jsx(m.div, { ...f, ref: l }) }) });
|
|
153
|
+
}, He = d(_e), We = (r, l) => {
|
|
154
|
+
const [s, t] = V(r), [{ value: o }, n] = h()(t, ["value"]), c = $(a({ present: o.open }, s)), x = a(o.getRootProps(), n);
|
|
155
|
+
return /* @__PURE__ */ e.jsx(H, { value: o, children: /* @__PURE__ */ e.jsx(F, { value: c, children: /* @__PURE__ */ e.jsx(m.div, { ...x, ref: l }) }) });
|
|
156
|
+
}, Be = d(We), Z = d((r, l) => {
|
|
157
|
+
const s = p(), t = a(s.getTriggerProps(), r);
|
|
158
|
+
return /* @__PURE__ */ e.jsx(m.button, { ...t, ref: l });
|
|
159
|
+
});
|
|
160
|
+
Z.displayName = "SelectTrigger";
|
|
161
|
+
const ee = d((r, l) => {
|
|
162
|
+
const { children: s, placeholder: t, ...o } = r, n = p(), c = a(n.getValueTextProps(), o);
|
|
163
|
+
return /* @__PURE__ */ e.jsx(m.span, { ...c, ref: l, children: s || n.valueAsString || t });
|
|
164
|
+
});
|
|
165
|
+
ee.displayName = "SelectValueText";
|
|
166
|
+
const {
|
|
167
|
+
withProvider: te,
|
|
168
|
+
withContext: u
|
|
169
|
+
} = je({ key: "select" });
|
|
170
|
+
te(Be, "root", {
|
|
171
|
+
forwardAsChild: !0
|
|
172
|
+
});
|
|
173
|
+
const De = te(
|
|
174
|
+
He,
|
|
175
|
+
"root",
|
|
176
|
+
{
|
|
177
|
+
forwardAsChild: !0,
|
|
178
|
+
defaultProps: { positioning: { sameWidth: !0 } }
|
|
179
|
+
}
|
|
180
|
+
), Ee = u(
|
|
181
|
+
Z,
|
|
182
|
+
"trigger",
|
|
183
|
+
{ forwardAsChild: !0 }
|
|
184
|
+
), qe = u(Y, "positioner", { forwardAsChild: !0 }), Me = u(
|
|
185
|
+
B,
|
|
186
|
+
"content",
|
|
187
|
+
{ forwardAsChild: !0 }
|
|
188
|
+
), Ue = u(ee, "valueText", { forwardAsChild: !0 }), ze = u(W, "clearTrigger", {
|
|
189
|
+
forwardAsChild: !0,
|
|
190
|
+
defaultProps: { children: /* @__PURE__ */ e.jsx(Ie, { boxSize: "1em" }) }
|
|
191
|
+
});
|
|
192
|
+
u(z, "itemGroup", { forwardAsChild: !0 });
|
|
193
|
+
u(J, "itemGroupLabel", { forwardAsChild: !0 });
|
|
194
|
+
const Je = u(
|
|
195
|
+
U,
|
|
196
|
+
"item",
|
|
197
|
+
{ forwardAsChild: !0 }
|
|
198
|
+
);
|
|
199
|
+
u(
|
|
200
|
+
Q,
|
|
201
|
+
"itemText",
|
|
202
|
+
{ forwardAsChild: !0 }
|
|
203
|
+
);
|
|
204
|
+
u(K, "itemIndicator", {
|
|
205
|
+
forwardAsChild: !0,
|
|
206
|
+
defaultProps: {
|
|
207
|
+
children: /* @__PURE__ */ e.jsx(be, {})
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
const Ke = u("div", "indicatorGroup");
|
|
211
|
+
u(q, "indicator", {
|
|
212
|
+
forwardAsChild: !0,
|
|
213
|
+
defaultProps: {
|
|
214
|
+
children: /* @__PURE__ */ e.jsx(ye, {})
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const Qe = u(
|
|
218
|
+
D,
|
|
219
|
+
"control",
|
|
220
|
+
{ forwardAsChild: !0 }
|
|
221
|
+
);
|
|
222
|
+
u(
|
|
223
|
+
X,
|
|
224
|
+
"label",
|
|
225
|
+
{ forwardAsChild: !0 }
|
|
226
|
+
);
|
|
227
|
+
const Xe = E, re = ({
|
|
228
|
+
item: r,
|
|
229
|
+
onContrast: l,
|
|
230
|
+
shouldTruncateText: s,
|
|
231
|
+
size: t
|
|
232
|
+
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
233
|
+
r.leftElement,
|
|
234
|
+
typeof r.label == "string" ? /* @__PURE__ */ e.jsx(
|
|
235
|
+
L,
|
|
236
|
+
{
|
|
237
|
+
size: t,
|
|
238
|
+
truncated: s,
|
|
239
|
+
variant: r.variant || (l ? "onContrast" : "default"),
|
|
240
|
+
children: r.label
|
|
241
|
+
}
|
|
242
|
+
) : r.label
|
|
243
|
+
] }), Ye = ({
|
|
244
|
+
placeholder: r = "",
|
|
245
|
+
placeholderElement: l,
|
|
246
|
+
...s
|
|
247
|
+
}) => {
|
|
248
|
+
const t = p(), o = O(() => t.selectedItems[0], [t]);
|
|
249
|
+
return /* @__PURE__ */ e.jsxs(Ee, { children: [
|
|
250
|
+
!o && l,
|
|
251
|
+
/* @__PURE__ */ e.jsx(Ue, { placeholder: r, children: o && /* @__PURE__ */ e.jsx(re, { item: o, ...s }) })
|
|
252
|
+
] });
|
|
253
|
+
}, Ze = pe(
|
|
254
|
+
({
|
|
255
|
+
clearable: r,
|
|
256
|
+
emptyPlaceholder: l = "No options available",
|
|
257
|
+
loading: s,
|
|
258
|
+
onContrast: t,
|
|
259
|
+
onSearch: o,
|
|
260
|
+
options: n,
|
|
261
|
+
placeholder: c = "",
|
|
262
|
+
placeholderElement: x,
|
|
263
|
+
searchable: f = !1,
|
|
264
|
+
searchPlaceholder: se = "Search...",
|
|
265
|
+
selectRef: oe,
|
|
266
|
+
shouldTruncateText: b = !0,
|
|
267
|
+
size: P = "md",
|
|
268
|
+
...le
|
|
269
|
+
}) => {
|
|
270
|
+
const { contentRef: ne } = Ge(), ce = t ? "onContrast" : "default", [C, y] = G(""), [N, T] = G(n), v = O(() => Oe({
|
|
271
|
+
items: N ?? [],
|
|
272
|
+
itemToString: (i) => typeof i.label == "string" ? i.label : i.valueText || "",
|
|
273
|
+
itemToValue: (i) => i.value
|
|
274
|
+
}), [N]), w = I(
|
|
275
|
+
(i, g) => i === "" || !i ? g : (console.log(i, g), g.filter((j) => !!(typeof j.label == "string" ? j.label : j.valueText)?.toLowerCase().includes(i.toLowerCase()))),
|
|
276
|
+
[]
|
|
277
|
+
);
|
|
278
|
+
me(() => {
|
|
279
|
+
T(o ? n : w(C, n));
|
|
280
|
+
}, [n, C, o, w]);
|
|
281
|
+
const ae = I(
|
|
282
|
+
(i) => {
|
|
283
|
+
const g = i.target.value;
|
|
284
|
+
y(g), o && o(i);
|
|
285
|
+
},
|
|
286
|
+
[o]
|
|
287
|
+
), ie = I(() => {
|
|
288
|
+
y(""), o && o({
|
|
289
|
+
target: { value: "" }
|
|
290
|
+
});
|
|
291
|
+
}, [o]);
|
|
292
|
+
return /* @__PURE__ */ e.jsxs(
|
|
293
|
+
De,
|
|
294
|
+
{
|
|
295
|
+
className: "Select",
|
|
296
|
+
"data-testid": "kibble-select",
|
|
297
|
+
collection: v,
|
|
298
|
+
size: P,
|
|
299
|
+
variant: ce,
|
|
300
|
+
...le,
|
|
301
|
+
children: [
|
|
302
|
+
/* @__PURE__ */ e.jsx(Xe, { ref: oe }),
|
|
303
|
+
/* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
304
|
+
/* @__PURE__ */ e.jsx(
|
|
305
|
+
Ye,
|
|
306
|
+
{
|
|
307
|
+
placeholder: c,
|
|
308
|
+
placeholderElement: x,
|
|
309
|
+
onContrast: !!t,
|
|
310
|
+
shouldTruncateText: !!b,
|
|
311
|
+
size: P
|
|
312
|
+
}
|
|
313
|
+
),
|
|
314
|
+
/* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
315
|
+
r && /* @__PURE__ */ e.jsx(ze, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
316
|
+
xe,
|
|
317
|
+
{
|
|
318
|
+
iconName: "close",
|
|
319
|
+
onContrast: t,
|
|
320
|
+
size: P === "lg" ? "sm" : "xs",
|
|
321
|
+
variant: "ghostNeutral"
|
|
322
|
+
}
|
|
323
|
+
) }),
|
|
324
|
+
/* @__PURE__ */ e.jsx(
|
|
325
|
+
ue,
|
|
326
|
+
{
|
|
327
|
+
name: "chevronDown",
|
|
328
|
+
size: P,
|
|
329
|
+
variant: t ? "onContrast" : "default"
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
] })
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ e.jsx(ve, { container: ne || void 0, children: /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsx(Me, { children: s ? /* @__PURE__ */ e.jsx(A, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
|
|
335
|
+
Pe,
|
|
336
|
+
{
|
|
337
|
+
variant: t ? "brandOnContrast" : "brand",
|
|
338
|
+
size: P
|
|
339
|
+
}
|
|
340
|
+
) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
341
|
+
f && /* @__PURE__ */ e.jsx(
|
|
342
|
+
Re,
|
|
343
|
+
{
|
|
344
|
+
className: "Select__Header",
|
|
345
|
+
"data-testid": "kibble-select-header",
|
|
346
|
+
m: "0 12px 8px",
|
|
347
|
+
children: /* @__PURE__ */ e.jsx(
|
|
348
|
+
Ae,
|
|
349
|
+
{
|
|
350
|
+
className: "Select__SearchBar",
|
|
351
|
+
"data-testid": "kibble-select-search-bar",
|
|
352
|
+
placeholder: se,
|
|
353
|
+
onChange: ae,
|
|
354
|
+
size: "sm",
|
|
355
|
+
value: C,
|
|
356
|
+
clearable: !0,
|
|
357
|
+
onClear: ie,
|
|
358
|
+
formControlStyle: { mt: 1 }
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
}
|
|
362
|
+
),
|
|
363
|
+
v.items.length ? v.items.map((i) => /* @__PURE__ */ e.jsx(Je, { item: i, children: /* @__PURE__ */ e.jsx(
|
|
364
|
+
re,
|
|
365
|
+
{
|
|
366
|
+
item: i,
|
|
367
|
+
onContrast: !!t,
|
|
368
|
+
shouldTruncateText: !!b,
|
|
369
|
+
size: P
|
|
370
|
+
}
|
|
371
|
+
) }, i.value)) : /* @__PURE__ */ e.jsx(A, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
|
|
372
|
+
L,
|
|
373
|
+
{
|
|
374
|
+
size: "sm",
|
|
375
|
+
variant: t ? "subtleOnContrast" : "subtle",
|
|
376
|
+
children: l
|
|
377
|
+
}
|
|
378
|
+
) })
|
|
379
|
+
] }) }) }) })
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
), et = de.forwardRef(
|
|
385
|
+
(r, l) => /* @__PURE__ */ e.jsx(Ze, { selectRef: l, ...r })
|
|
386
|
+
);
|
|
387
|
+
et.displayName = "Select";
|
|
388
|
+
export {
|
|
389
|
+
et as W
|
|
390
|
+
};
|
|
391
|
+
//# sourceMappingURL=select.component-BSZd60MZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component-C4Kx68wP.js","sources":["../../node_modules/@ark-ui/react/dist/components/collection.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-content.js","../../node_modules/@ark-ui/react/dist/components/select/select-control.js","../../node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-item.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-text.js","../../node_modules/@ark-ui/react/dist/components/select/select-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js","../../node_modules/@ark-ui/react/dist/components/select/use-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-root.js","../../node_modules/@ark-ui/react/dist/components/select/select-root-provider.js","../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/select/select.js","../../src/components/Select/components/SelectItemContent/selectItemContent.component.tsx","../../src/components/Select/components/SelectTrigger/selectTrigger.component.tsx","../../src/components/Select/select.component.tsx"],"sourcesContent":["import { ListCollection, filePathToTree, TreeCollection } from '@zag-js/collection';\n\nconst createListCollection = (options) => new ListCollection(options);\nconst createTreeCollection = (options) => new TreeCollection(options);\nconst createFileTreeCollection = (paths) => filePathToTree(paths);\n\nexport { createFileTreeCollection, createListCollection, createTreeCollection };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectProvider, useSelectContext] = createContext({\n name: \"SelectContext\",\n hookName: \"useSelectContext\",\n providerName: \"<SelectProvider />\"\n});\n\nexport { SelectProvider, useSelectContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectClearTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getClearTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectClearTrigger.displayName = \"SelectClearTrigger\";\n\nexport { SelectClearTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectContent = forwardRef((props, ref) => {\n const select = useSelectContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(select.getContentProps(), presence.getPresenceProps(), props);\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });\n});\nSelectContent.displayName = \"SelectContent\";\n\nexport { SelectContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectControl = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectControl.displayName = \"SelectControl\";\n\nexport { SelectControl };\n","'use client';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectHiddenSelect = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getHiddenSelectProps(), props);\n const isValueEmpty = select.value.length === 0;\n const field = useFieldContext();\n return /* @__PURE__ */ jsxs(ark.select, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref, children: [\n isValueEmpty && /* @__PURE__ */ jsx(\"option\", { value: \"\" }),\n select.collection.items.map((item, index) => /* @__PURE__ */ jsx(\n \"option\",\n {\n value: select.collection.getItemValue(item) ?? \"\",\n disabled: select.collection.getItemDisabled(item),\n children: select.collection.stringifyItem(item)\n },\n index\n ))\n ] });\n});\nSelectHiddenSelect.displayName = \"SelectHiddenSelect\";\n\nexport { SelectHiddenSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectIndicator.displayName = \"SelectIndicator\";\n\nexport { SelectIndicator };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemProvider, useSelectItemContext] = createContext({\n name: \"SelectItemContext\",\n hookName: \"useSelectItemContext\",\n providerName: \"<SelectItemProvider />\"\n});\n\nexport { SelectItemProvider, useSelectItemContext };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({\n name: \"SelectItemPropsContext\",\n hookName: \"useSelectItemPropsContext\",\n providerName: \"<SelectItemPropsProvider />\"\n});\n\nexport { SelectItemPropsProvider, useSelectItemPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemProvider } from './use-select-item-context.js';\nimport { SelectItemPropsProvider } from './use-select-item-props-context.js';\n\nconst SelectItem = forwardRef((props, ref) => {\n const [itemProps, localProps] = createSplitProps()(props, [\"item\", \"persistFocus\"]);\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemProps(itemProps), localProps);\n const itemState = select.getItemState(itemProps);\n return /* @__PURE__ */ jsx(SelectItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(SelectItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nSelectItem.displayName = \"SelectItem\";\n\nexport { SelectItem };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemGroupPropsProvider, useSelectItemGroupPropsContext] = createContext({\n name: \"SelectItemGroupPropsContext\",\n hookName: \"useSelectItemGroupPropsContext\",\n providerName: \"<SelectItemGroupPropsProvider />\"\n});\n\nexport { SelectItemGroupPropsProvider, useSelectItemGroupPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useId } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemGroupPropsProvider } from './use-select-item-group-props.js';\n\nconst SelectItemGroup = forwardRef((props, ref) => {\n const id = useId();\n const [_itemGroupProps, localProps] = createSplitProps()(props, [\"id\"]);\n const itemGroupProps = { id, ..._itemGroupProps };\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemGroupProps(itemGroupProps), localProps);\n return /* @__PURE__ */ jsx(SelectItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nSelectItemGroup.displayName = \"SelectItemGroup\";\n\nexport { SelectItemGroup };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemGroupPropsContext } from './use-select-item-group-props.js';\n\nconst SelectItemGroupLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemGroupProps = useSelectItemGroupPropsContext();\n const mergedProps = mergeProps(select.getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\";\n\nexport { SelectItemGroupLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemIndicatorProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemIndicator.displayName = \"SelectItemIndicator\";\n\nexport { SelectItemIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemText = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemTextProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSelectItemText.displayName = \"SelectItemText\";\n\nexport { SelectItemText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nSelectLabel.displayName = \"SelectLabel\";\n\nexport { SelectLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectPositioner = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getPositionerProps(), props);\n const presence = usePresenceContext();\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectPositioner.displayName = \"SelectPositioner\";\n\nexport { SelectPositioner };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as select from '@zag-js/select';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSelect = (props) => {\n const id = useId();\n const { dir } = useLocaleContext();\n const { getRootNode } = useEnvironmentContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenSelect: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(select.machine, machineProps);\n return select.connect(service, normalizeProps);\n};\n\nexport { useSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useSelect } from './use-select.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [useSelectProps, localProps] = createSplitProps()(selectProps, [\n \"closeOnSelect\",\n \"collection\",\n \"composite\",\n \"defaultHighlightedValue\",\n \"defaultOpen\",\n \"defaultValue\",\n \"deselectable\",\n \"disabled\",\n \"form\",\n \"highlightedValue\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"loopFocus\",\n \"multiple\",\n \"name\",\n \"onFocusOutside\",\n \"onHighlightChange\",\n \"onInteractOutside\",\n \"onOpenChange\",\n \"onPointerDownOutside\",\n \"onValueChange\",\n \"open\",\n \"positioning\",\n \"readOnly\",\n \"required\",\n \"scrollToIndexFn\",\n \"value\"\n ]);\n const select = useSelect(useSelectProps);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRoot = forwardRef(SelectImpl);\n\nexport { SelectRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [{ value: select }, localProps] = createSplitProps()(selectProps, [\"value\"]);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRootProvider = forwardRef(SelectImpl);\n\nexport { SelectRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport { SelectTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectValueText = forwardRef((props, ref) => {\n const { children, placeholder, ...localprops } = props;\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getValueTextProps(), localprops);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || select.valueAsString || placeholder });\n});\nSelectValueText.displayName = \"SelectValueText\";\n\nexport { SelectValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Select } from '@ark-ui/react/select';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon, CheckIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSelectStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"select\" });\nconst SelectRootProvider = withProvider(Select.RootProvider, \"root\", {\n forwardAsChild: true\n});\nconst SelectRoot = withProvider(\n Select.Root,\n \"root\",\n {\n forwardAsChild: true,\n defaultProps: { positioning: { sameWidth: true } }\n }\n);\nconst SelectPropsProvider = PropsProvider;\nconst SelectTrigger = withContext(\n Select.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst SelectPositioner = withContext(Select.Positioner, \"positioner\", { forwardAsChild: true });\nconst SelectContent = withContext(\n Select.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst SelectValueText = withContext(Select.ValueText, \"valueText\", { forwardAsChild: true });\nconst SelectClearTrigger = withContext(Select.ClearTrigger, \"clearTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, { boxSize: \"1em\" }) }\n});\nconst SelectItemGroup = withContext(Select.ItemGroup, \"itemGroup\", { forwardAsChild: true });\nconst SelectItemGroupLabel = withContext(Select.ItemGroupLabel, \"itemGroupLabel\", { forwardAsChild: true });\nconst SelectItem = withContext(\n Select.Item,\n \"item\",\n { forwardAsChild: true }\n);\nconst SelectItemText = withContext(\n Select.ItemText,\n \"itemText\",\n { forwardAsChild: true }\n);\nconst SelectItemIndicator = withContext(Select.ItemIndicator, \"itemIndicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(CheckIcon, {})\n }\n});\nconst SelectIndicatorGroup = withContext(\"div\", \"indicatorGroup\");\nconst SelectIndicator = withContext(Select.Indicator, \"indicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(ChevronDownIcon, {})\n }\n});\nconst SelectControl = withContext(\n Select.Control,\n \"control\",\n { forwardAsChild: true }\n);\nconst SelectLabel = withContext(\n Select.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SelectContext = Select.Context;\nconst SelectHiddenSelect = Select.HiddenSelect;\nconst SelectItemContext = Select.ItemContext;\n\nexport { SelectClearTrigger, SelectContent, SelectContext, SelectControl, SelectHiddenSelect, SelectIndicator, SelectIndicatorGroup, SelectItem, SelectItemContext, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectPropsProvider, SelectRoot, SelectRootProvider, SelectTrigger, SelectValueText, useSelectStyles };\n","import React from \"react\";\nimport { Text } from \"components/Text/text.component\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectItemContentProps {\n item: SelectOption;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectItemContent = ({\n item,\n onContrast,\n shouldTruncateText,\n size,\n}: SelectItemContentProps): React.JSX.Element => {\n return (\n <>\n {item.leftElement}\n {typeof item.label === \"string\" ? (\n <Text\n size={size}\n truncated={shouldTruncateText}\n variant={item.variant || (onContrast ? \"onContrast\" : \"default\")}\n >\n {item.label}\n </Text>\n ) : (\n item.label\n )}\n </>\n );\n};\n","import React, { useMemo } from \"react\";\nimport { Select as CSelect, useSelectContext } from \"@chakra-ui/react/select\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { SelectItemContent } from \"../SelectItemContent/selectItemContent.component\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectTriggerProps {\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectTrigger = ({\n placeholder = \"\",\n placeholderElement,\n ...rest\n}: SelectTriggerProps): React.JSX.Element => {\n const select = useSelectContext();\n const selectedItem = useMemo(() => {\n const items = select.selectedItems as SelectOption[];\n return items[0];\n }, [select]);\n\n return (\n <CSelect.Trigger>\n {!selectedItem && placeholderElement}\n <CSelect.ValueText placeholder={placeholder}>\n {selectedItem && <SelectItemContent item={selectedItem} {...rest} />}\n </CSelect.ValueText>\n </CSelect.Trigger>\n );\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Select as CSelect } from \"@chakra-ui/react/select\";\nimport { Portal } from \"@chakra-ui/react/portal\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { createListCollection } from \"@chakra-ui/react/collection\";\nimport { Icon } from \"components/Icon/icon.component\";\nimport { Button } from \"components/Button/button.component\";\nimport { Text } from \"components/Text/text.component\";\nimport { Spinner } from \"components/Spinner/spinner.component\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { SelectOption } from \"./select.types\";\nimport { SelectItemContent } from \"./components/SelectItemContent/selectItemContent.component\";\nimport { SelectTrigger } from \"./components/SelectTrigger/selectTrigger.component\";\nimport { useModalContentRef } from \"components/Modal/context/modal.context\";\n\nexport interface SelectProps\n extends Omit<CSelect.RootProps, \"collection\" | \"multiple\">,\n WithFormControlProps {\n clearable?: boolean;\n emptyPlaceholder?: string;\n loading?: boolean;\n options: SelectOption[];\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n selectRef?: ForwardedRef<HTMLSelectElement>;\n shouldTruncateText?: boolean;\n size?: FormControlSize;\n}\n\nconst Select = withFormControl(\n ({\n clearable,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n placeholderElement,\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\n const { contentRef: modalContentRef } = useModalContentRef();\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n const collection = useMemo(() => {\n return createListCollection({\n items: options ?? [],\n itemToString: (option) =>\n typeof option.label === \"string\"\n ? option.label\n : option.valueText || \"\",\n itemToValue: (option) => option.value,\n });\n }, [options]);\n\n return (\n <CSelect.Root\n className=\"Select\"\n data-testid=\"kibble-select\"\n collection={collection}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSelect.HiddenSelect ref={selectRef} />\n <CSelect.Control>\n <SelectTrigger\n placeholder={placeholder}\n placeholderElement={placeholderElement}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n <CSelect.IndicatorGroup>\n {clearable && (\n <CSelect.ClearTrigger asChild>\n <Button\n iconName=\"close\"\n onContrast={onContrast}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n variant=\"ghostNeutral\"\n />\n </CSelect.ClearTrigger>\n )}\n <Icon\n name=\"chevronDown\"\n size={size}\n variant={onContrast ? \"onContrast\" : \"default\"}\n />\n </CSelect.IndicatorGroup>\n </CSelect.Control>\n <Portal container={modalContentRef || undefined}>\n <CSelect.Positioner>\n <CSelect.Content>\n {loading ? (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Spinner\n variant={onContrast ? \"brandOnContrast\" : \"brand\"}\n size={size}\n />\n </Flex>\n ) : (\n <>\n {collection.items.length ? (\n collection.items.map((item) => (\n <CSelect.Item item={item} key={item.value}>\n <SelectItemContent\n item={item}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n </CSelect.Item>\n ))\n ) : (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Text\n size=\"sm\"\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n >\n {emptyPlaceholder}\n </Text>\n </Flex>\n )}\n </>\n )}\n </CSelect.Content>\n </CSelect.Positioner>\n </Portal>\n </CSelect.Root>\n );\n },\n);\n\nconst WrappedSelect = React.forwardRef(\n (props: SelectProps, ref: ForwardedRef<HTMLSelectElement>) => (\n <Select selectRef={ref} {...props} />\n ),\n);\n\nWrappedSelect.displayName = \"Select\";\n\nexport { WrappedSelect as Select };\n"],"names":["createListCollection","options","ListCollection","SelectProvider","useSelectContext","createContext","SelectClearTrigger","forwardRef","props","ref","select","mergedProps","mergeProps","jsx","ark","SelectContent","presence","usePresenceContext","composeRefs","SelectControl","SelectHiddenSelect","isValueEmpty","field","useFieldContext","jsxs","item","index","SelectIndicator","SelectItemProvider","useSelectItemContext","SelectItemPropsProvider","useSelectItemPropsContext","SelectItem","itemProps","localProps","createSplitProps","itemState","SelectItemGroupPropsProvider","useSelectItemGroupPropsContext","SelectItemGroup","id","useId","_itemGroupProps","itemGroupProps","SelectItemGroupLabel","SelectItemIndicator","SelectItemText","SelectLabel","SelectPositioner","useSelect","dir","useLocaleContext","getRootNode","useEnvironmentContext","machineProps","service","useMachine","select.machine","select.connect","normalizeProps","SelectImpl","presenceProps","selectProps","splitPresenceProps","useSelectProps","usePresence","PresenceProvider","SelectRoot","SelectRootProvider","SelectTrigger","SelectValueText","children","placeholder","localprops","withProvider","withContext","createSlotRecipeContext","Select.RootProvider","Select.Root","Select.Trigger","Select.Positioner","Select.Content","Select.ValueText","Select.ClearTrigger","CloseIcon","Select.ItemGroup","Select.ItemGroupLabel","Select.Item","Select.ItemText","Select.ItemIndicator","CheckIcon","SelectIndicatorGroup","Select.Indicator","ChevronDownIcon","Select.Control","Select.Label","Select.HiddenSelect","SelectItemContent","onContrast","shouldTruncateText","size","Fragment","Text","placeholderElement","rest","selectedItem","useMemo","CSelect.Trigger","CSelect.ValueText","Select","withFormControl","clearable","emptyPlaceholder","loading","selectRef","modalContentRef","useModalContentRef","_computedVariant","collection","option","CSelect.Root","CSelect.HiddenSelect","CSelect.Control","CSelect.IndicatorGroup","CSelect.ClearTrigger","Button","Icon","Portal","CSelect.Positioner","CSelect.Content","Flex","Spinner","CSelect.Item","WrappedSelect","React"],"mappings":";;;;;;;;;;;;;;;AAEA,MAAMA,KAAuB,CAACC,MAAY,IAAIC,GAAeD,CAAO,GCC9D,CAACE,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAqBC,EAAW,CAACC,GAAOC,MAAQ;AACpD,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,qBAAoB,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAChE,CAAC;AACDH,EAAmB,cAAc;ACHjC,MAAMS,IAAgBR,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAASN,EAAkB,GAC3BY,IAAWC,EAAoB,GAC/BN,IAAcC,EAAWF,EAAO,gBAAiB,GAAEM,EAAS,iBAAkB,GAAER,CAAK;AAC3F,SAAIQ,EA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AA,YAAA;AAAA,cACC,MAAAxE;AAAA,cACA,YAAY,CAAC,CAACyE;AAAA,cACd,oBAAoB,CAAC,CAACC;AAAA,cACtB,MAAAC;AAAA,YAAA;AAAA,UAL2B,EAAA,GAAA3E,EAAK,KAOpC,CACD,IAEDZ,gBAAAA,EAAAA,IAACqH,GAAK,EAAA,GAAE,QAAO,gBAAe,UAAS,IAAI,GACzC,UAAArH,gBAAAA,EAAA;AAAA,YAACyF;AAAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASJ,IAAa,qBAAqB;AAAA,cAE1C,UAAAc;AAAA,YAAA;AAAA,UAEL,EAAA,CAAA,EAEJ,CAAA,GAEJ,EAAA,CACF,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEMqB,KAAgBC,EAAM;AAAA,EAC1B,CAAC9H,GAAoBC,MACnBI,gBAAAA,MAACgG,MAAO,WAAWpG,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA6H,GAAc,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
|
|
1
|
+
{"version":3,"file":"select.component-BSZd60MZ.js","sources":["../../node_modules/@ark-ui/react/dist/components/collection.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-content.js","../../node_modules/@ark-ui/react/dist/components/select/select-control.js","../../node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-item.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-text.js","../../node_modules/@ark-ui/react/dist/components/select/select-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js","../../node_modules/@ark-ui/react/dist/components/select/use-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-root.js","../../node_modules/@ark-ui/react/dist/components/select/select-root-provider.js","../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/select/select.js","../../src/components/Select/components/SelectItemContent/selectItemContent.component.tsx","../../src/components/Select/components/SelectTrigger/selectTrigger.component.tsx","../../src/components/Select/select.component.tsx"],"sourcesContent":["import { ListCollection, filePathToTree, TreeCollection } from '@zag-js/collection';\n\nconst createListCollection = (options) => new ListCollection(options);\nconst createTreeCollection = (options) => new TreeCollection(options);\nconst createFileTreeCollection = (paths) => filePathToTree(paths);\n\nexport { createFileTreeCollection, createListCollection, createTreeCollection };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectProvider, useSelectContext] = createContext({\n name: \"SelectContext\",\n hookName: \"useSelectContext\",\n providerName: \"<SelectProvider />\"\n});\n\nexport { SelectProvider, useSelectContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectClearTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getClearTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectClearTrigger.displayName = \"SelectClearTrigger\";\n\nexport { SelectClearTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectContent = forwardRef((props, ref) => {\n const select = useSelectContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(select.getContentProps(), presence.getPresenceProps(), props);\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });\n});\nSelectContent.displayName = \"SelectContent\";\n\nexport { SelectContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectControl = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectControl.displayName = \"SelectControl\";\n\nexport { SelectControl };\n","'use client';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectHiddenSelect = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getHiddenSelectProps(), props);\n const isValueEmpty = select.value.length === 0;\n const field = useFieldContext();\n return /* @__PURE__ */ jsxs(ark.select, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref, children: [\n isValueEmpty && /* @__PURE__ */ jsx(\"option\", { value: \"\" }),\n select.collection.items.map((item, index) => /* @__PURE__ */ jsx(\n \"option\",\n {\n value: select.collection.getItemValue(item) ?? \"\",\n disabled: select.collection.getItemDisabled(item),\n children: select.collection.stringifyItem(item)\n },\n index\n ))\n ] });\n});\nSelectHiddenSelect.displayName = \"SelectHiddenSelect\";\n\nexport { SelectHiddenSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectIndicator.displayName = \"SelectIndicator\";\n\nexport { SelectIndicator };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemProvider, useSelectItemContext] = createContext({\n name: \"SelectItemContext\",\n hookName: \"useSelectItemContext\",\n providerName: \"<SelectItemProvider />\"\n});\n\nexport { SelectItemProvider, useSelectItemContext };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({\n name: \"SelectItemPropsContext\",\n hookName: \"useSelectItemPropsContext\",\n providerName: \"<SelectItemPropsProvider />\"\n});\n\nexport { SelectItemPropsProvider, useSelectItemPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemProvider } from './use-select-item-context.js';\nimport { SelectItemPropsProvider } from './use-select-item-props-context.js';\n\nconst SelectItem = forwardRef((props, ref) => {\n const [itemProps, localProps] = createSplitProps()(props, [\"item\", \"persistFocus\"]);\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemProps(itemProps), localProps);\n const itemState = select.getItemState(itemProps);\n return /* @__PURE__ */ jsx(SelectItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(SelectItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nSelectItem.displayName = \"SelectItem\";\n\nexport { SelectItem };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemGroupPropsProvider, useSelectItemGroupPropsContext] = createContext({\n name: \"SelectItemGroupPropsContext\",\n hookName: \"useSelectItemGroupPropsContext\",\n providerName: \"<SelectItemGroupPropsProvider />\"\n});\n\nexport { SelectItemGroupPropsProvider, useSelectItemGroupPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useId } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemGroupPropsProvider } from './use-select-item-group-props.js';\n\nconst SelectItemGroup = forwardRef((props, ref) => {\n const id = useId();\n const [_itemGroupProps, localProps] = createSplitProps()(props, [\"id\"]);\n const itemGroupProps = { id, ..._itemGroupProps };\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemGroupProps(itemGroupProps), localProps);\n return /* @__PURE__ */ jsx(SelectItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nSelectItemGroup.displayName = \"SelectItemGroup\";\n\nexport { SelectItemGroup };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemGroupPropsContext } from './use-select-item-group-props.js';\n\nconst SelectItemGroupLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemGroupProps = useSelectItemGroupPropsContext();\n const mergedProps = mergeProps(select.getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\";\n\nexport { SelectItemGroupLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemIndicatorProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemIndicator.displayName = \"SelectItemIndicator\";\n\nexport { SelectItemIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemText = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemTextProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSelectItemText.displayName = \"SelectItemText\";\n\nexport { SelectItemText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nSelectLabel.displayName = \"SelectLabel\";\n\nexport { SelectLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectPositioner = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getPositionerProps(), props);\n const presence = usePresenceContext();\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectPositioner.displayName = \"SelectPositioner\";\n\nexport { SelectPositioner };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as select from '@zag-js/select';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSelect = (props) => {\n const id = useId();\n const { dir } = useLocaleContext();\n const { getRootNode } = useEnvironmentContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenSelect: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(select.machine, machineProps);\n return select.connect(service, normalizeProps);\n};\n\nexport { useSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useSelect } from './use-select.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [useSelectProps, localProps] = createSplitProps()(selectProps, [\n \"closeOnSelect\",\n \"collection\",\n \"composite\",\n \"defaultHighlightedValue\",\n \"defaultOpen\",\n \"defaultValue\",\n \"deselectable\",\n \"disabled\",\n \"form\",\n \"highlightedValue\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"loopFocus\",\n \"multiple\",\n \"name\",\n \"onFocusOutside\",\n \"onHighlightChange\",\n \"onInteractOutside\",\n \"onOpenChange\",\n \"onPointerDownOutside\",\n \"onValueChange\",\n \"open\",\n \"positioning\",\n \"readOnly\",\n \"required\",\n \"scrollToIndexFn\",\n \"value\"\n ]);\n const select = useSelect(useSelectProps);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRoot = forwardRef(SelectImpl);\n\nexport { SelectRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [{ value: select }, localProps] = createSplitProps()(selectProps, [\"value\"]);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRootProvider = forwardRef(SelectImpl);\n\nexport { SelectRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport { SelectTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectValueText = forwardRef((props, ref) => {\n const { children, placeholder, ...localprops } = props;\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getValueTextProps(), localprops);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || select.valueAsString || placeholder });\n});\nSelectValueText.displayName = \"SelectValueText\";\n\nexport { SelectValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Select } from '@ark-ui/react/select';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon, CheckIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSelectStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"select\" });\nconst SelectRootProvider = withProvider(Select.RootProvider, \"root\", {\n forwardAsChild: true\n});\nconst SelectRoot = withProvider(\n Select.Root,\n \"root\",\n {\n forwardAsChild: true,\n defaultProps: { positioning: { sameWidth: true } }\n }\n);\nconst SelectPropsProvider = PropsProvider;\nconst SelectTrigger = withContext(\n Select.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst SelectPositioner = withContext(Select.Positioner, \"positioner\", { forwardAsChild: true });\nconst SelectContent = withContext(\n Select.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst SelectValueText = withContext(Select.ValueText, \"valueText\", { forwardAsChild: true });\nconst SelectClearTrigger = withContext(Select.ClearTrigger, \"clearTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, { boxSize: \"1em\" }) }\n});\nconst SelectItemGroup = withContext(Select.ItemGroup, \"itemGroup\", { forwardAsChild: true });\nconst SelectItemGroupLabel = withContext(Select.ItemGroupLabel, \"itemGroupLabel\", { forwardAsChild: true });\nconst SelectItem = withContext(\n Select.Item,\n \"item\",\n { forwardAsChild: true }\n);\nconst SelectItemText = withContext(\n Select.ItemText,\n \"itemText\",\n { forwardAsChild: true }\n);\nconst SelectItemIndicator = withContext(Select.ItemIndicator, \"itemIndicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(CheckIcon, {})\n }\n});\nconst SelectIndicatorGroup = withContext(\"div\", \"indicatorGroup\");\nconst SelectIndicator = withContext(Select.Indicator, \"indicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(ChevronDownIcon, {})\n }\n});\nconst SelectControl = withContext(\n Select.Control,\n \"control\",\n { forwardAsChild: true }\n);\nconst SelectLabel = withContext(\n Select.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SelectContext = Select.Context;\nconst SelectHiddenSelect = Select.HiddenSelect;\nconst SelectItemContext = Select.ItemContext;\n\nexport { SelectClearTrigger, SelectContent, SelectContext, SelectControl, SelectHiddenSelect, SelectIndicator, SelectIndicatorGroup, SelectItem, SelectItemContext, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectPropsProvider, SelectRoot, SelectRootProvider, SelectTrigger, SelectValueText, useSelectStyles };\n","import React from \"react\";\nimport { Text } from \"components/Text/text.component\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectItemContentProps {\n item: SelectOption;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectItemContent = ({\n item,\n onContrast,\n shouldTruncateText,\n size,\n}: SelectItemContentProps): React.JSX.Element => {\n return (\n <>\n {item.leftElement}\n {typeof item.label === \"string\" ? (\n <Text\n size={size}\n truncated={shouldTruncateText}\n variant={item.variant || (onContrast ? \"onContrast\" : \"default\")}\n >\n {item.label}\n </Text>\n ) : (\n item.label\n )}\n </>\n );\n};\n","import React, { useMemo } from \"react\";\nimport { Select as CSelect, useSelectContext } from \"@chakra-ui/react/select\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { SelectItemContent } from \"../SelectItemContent/selectItemContent.component\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectTriggerProps {\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectTrigger = ({\n placeholder = \"\",\n placeholderElement,\n ...rest\n}: SelectTriggerProps): React.JSX.Element => {\n const select = useSelectContext();\n const selectedItem = useMemo(() => {\n const items = select.selectedItems as SelectOption[];\n return items[0];\n }, [select]);\n\n return (\n <CSelect.Trigger>\n {!selectedItem && placeholderElement}\n <CSelect.ValueText placeholder={placeholder}>\n {selectedItem && <SelectItemContent item={selectedItem} {...rest} />}\n </CSelect.ValueText>\n </CSelect.Trigger>\n );\n};\n","import React, {\n ForwardedRef,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { Select as CSelect } from \"@chakra-ui/react/select\";\nimport { Portal } from \"@chakra-ui/react/portal\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { createListCollection } from \"@chakra-ui/react/collection\";\nimport { Icon } from \"components/Icon/icon.component\";\nimport { Button } from \"components/Button/button.component\";\nimport { Text } from \"components/Text/text.component\";\nimport { Spinner } from \"components/Spinner/spinner.component\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { SelectOption } from \"./select.types\";\nimport { SelectItemContent } from \"./components/SelectItemContent/selectItemContent.component\";\nimport { SelectTrigger } from \"./components/SelectTrigger/selectTrigger.component\";\nimport { useModalContentRef } from \"components/Modal/context/modal.context\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport { TextInput } from \"components/TextInput/textInput.component\";\n\nexport interface SelectProps\n extends Omit<CSelect.RootProps, \"collection\" | \"multiple\">,\n WithFormControlProps {\n clearable?: boolean;\n emptyPlaceholder?: string;\n loading?: boolean;\n onSearch?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n options: SelectOption[];\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n searchable?: boolean;\n searchPlaceholder?: string;\n selectRef?: ForwardedRef<HTMLSelectElement>;\n shouldTruncateText?: boolean;\n size?: FormControlSize;\n}\n\nconst Select = withFormControl(\n ({\n clearable,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n onSearch,\n options,\n placeholder = \"\",\n placeholderElement,\n searchable = false,\n searchPlaceholder = \"Search...\",\n selectRef,\n shouldTruncateText = true,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\n const { contentRef: modalContentRef } = useModalContentRef();\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n const [searchText, setSearchText] = useState<string>(\"\");\n const [filteredOptions, setFilteredOptions] =\n useState<SelectOption[]>(options);\n\n const collection = useMemo(() => {\n return createListCollection({\n items: filteredOptions ?? [],\n itemToString: (option) =>\n typeof option.label === \"string\"\n ? option.label\n : option.valueText || \"\",\n itemToValue: (option) => option.value,\n });\n }, [filteredOptions]);\n\n // Search\n const filterOptions = useCallback(\n (searchInput: string, optionsToFilter: SelectOption[]) => {\n if (searchInput === \"\" || !searchInput) {\n return optionsToFilter;\n }\n\n console.log(searchInput, optionsToFilter);\n return optionsToFilter.filter((option): boolean => {\n const labelText =\n typeof option.label === \"string\" ? option.label : option.valueText;\n\n return !!labelText?.toLowerCase().includes(searchInput.toLowerCase());\n });\n },\n []\n );\n\n useEffect(() => {\n if (onSearch) {\n setFilteredOptions(options);\n } else {\n setFilteredOptions(filterOptions(searchText, options));\n }\n }, [options, searchText, onSearch, filterOptions]);\n\n const handleSearch = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const searchInput = e.target.value;\n setSearchText(searchInput);\n\n if (onSearch) {\n onSearch(e);\n }\n },\n [onSearch]\n );\n\n const clearSearch = useCallback(() => {\n setSearchText(\"\");\n\n if (onSearch) {\n onSearch({\n target: { value: \"\" },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n }, [onSearch]);\n\n return (\n <CSelect.Root\n className=\"Select\"\n data-testid=\"kibble-select\"\n collection={collection}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSelect.HiddenSelect ref={selectRef} />\n <CSelect.Control>\n <SelectTrigger\n placeholder={placeholder}\n placeholderElement={placeholderElement}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n <CSelect.IndicatorGroup>\n {clearable && (\n <CSelect.ClearTrigger asChild>\n <Button\n iconName=\"close\"\n onContrast={onContrast}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n variant=\"ghostNeutral\"\n />\n </CSelect.ClearTrigger>\n )}\n <Icon\n name=\"chevronDown\"\n size={size}\n variant={onContrast ? \"onContrast\" : \"default\"}\n />\n </CSelect.IndicatorGroup>\n </CSelect.Control>\n <Portal container={modalContentRef || undefined}>\n <CSelect.Positioner>\n <CSelect.Content>\n {loading ? (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Spinner\n variant={onContrast ? \"brandOnContrast\" : \"brand\"}\n size={size}\n />\n </Flex>\n ) : (\n <>\n {searchable && (\n <Box\n className=\"Select__Header\"\n data-testid=\"kibble-select-header\"\n m=\"0 12px 8px\"\n >\n <TextInput\n className=\"Select__SearchBar\"\n data-testid=\"kibble-select-search-bar\"\n placeholder={searchPlaceholder}\n onChange={handleSearch}\n size=\"sm\"\n value={searchText}\n clearable\n onClear={clearSearch}\n formControlStyle={{ mt: 1 }}\n />\n </Box>\n )}\n {collection.items.length ? (\n collection.items.map((item) => (\n <CSelect.Item item={item} key={item.value}>\n <SelectItemContent\n item={item}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n </CSelect.Item>\n ))\n ) : (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Text\n size=\"sm\"\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n >\n {emptyPlaceholder}\n </Text>\n </Flex>\n )}\n </>\n )}\n </CSelect.Content>\n </CSelect.Positioner>\n </Portal>\n </CSelect.Root>\n );\n }\n);\n\nconst WrappedSelect = React.forwardRef(\n (props: SelectProps, ref: ForwardedRef<HTMLSelectElement>) => (\n <Select selectRef={ref} {...props} />\n )\n);\n\nWrappedSelect.displayName = \"Select\";\n\nexport { WrappedSelect as Select };\n"],"names":["createListCollection","options","ListCollection","SelectProvider","useSelectContext","createContext","SelectClearTrigger","forwardRef","props","ref","select","mergedProps","mergeProps","jsx","ark","SelectContent","presence","usePresenceContext","composeRefs","SelectControl","SelectHiddenSelect","isValueEmpty","field","useFieldContext","jsxs","item","index","SelectIndicator","SelectItemProvider","useSelectItemContext","SelectItemPropsProvider","useSelectItemPropsContext","SelectItem","itemProps","localProps","createSplitProps","itemState","SelectItemGroupPropsProvider","useSelectItemGroupPropsContext","SelectItemGroup","id","useId","_itemGroupProps","itemGroupProps","SelectItemGroupLabel","SelectItemIndicator","SelectItemText","SelectLabel","SelectPositioner","useSelect","dir","useLocaleContext","getRootNode","useEnvironmentContext","machineProps","service","useMachine","select.machine","select.connect","normalizeProps","SelectImpl","presenceProps","selectProps","splitPresenceProps","useSelectProps","usePresence","PresenceProvider","SelectRoot","SelectRootProvider","SelectTrigger","SelectValueText","children","placeholder","localprops","withProvider","withContext","createSlotRecipeContext","Select.RootProvider","Select.Root","Select.Trigger","Select.Positioner","Select.Content","Select.ValueText","Select.ClearTrigger","CloseIcon","Select.ItemGroup","Select.ItemGroupLabel","Select.Item","Select.ItemText","Select.ItemIndicator","CheckIcon","SelectIndicatorGroup","Select.Indicator","ChevronDownIcon","Select.Control","Select.Label","Select.HiddenSelect","SelectItemContent","onContrast","shouldTruncateText","size","Fragment","Text","placeholderElement","rest","selectedItem","useMemo","CSelect.Trigger","CSelect.ValueText","Select","withFormControl","clearable","emptyPlaceholder","loading","onSearch","searchable","searchPlaceholder","selectRef","modalContentRef","useModalContentRef","_computedVariant","searchText","setSearchText","useState","filteredOptions","setFilteredOptions","collection","option","filterOptions","useCallback","searchInput","optionsToFilter","useEffect","handleSearch","e","clearSearch","CSelect.Root","CSelect.HiddenSelect","CSelect.Control","CSelect.IndicatorGroup","CSelect.ClearTrigger","Button","Icon","Portal","CSelect.Positioner","CSelect.Content","Flex","Spinner","Box","TextInput","CSelect.Item","WrappedSelect","React"],"mappings":";;;;;;;;;;;;;;;;;AAEA,MAAMA,KAAuB,CAACC,MAAY,IAAIC,GAAeD,CAAO,GCC9D,CAACE,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAqBC,EAAW,CAACC,GAAOC,MAAQ;AACpD,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,qBAAoB,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAChE,CAAC;AACDH,EAAmB,cAAc;ACHjC,MAAMS,IAAgBR,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAASN,EAAkB,GAC3BY,IAAWC,EAAoB,GAC/BN,IAAcC,EAAWF,EAAO,gBAAiB,GAAEM,EAAS,iBAAkB,GAAER,CAAK;AAC3F,SAAIQ,EAAS,YACJ,OAEcH,gBAAAA,MAAIC,EAAI,KAAK,EAAE,GAAGH,GAAa,KAAKO,GAAYF,EAAS,KAAKP,CAAG,EAAC,CAAE;AAC7F,CAAC;AACDM,EAAc,cAAc;ACX5B,MAAMI,IAAgBZ,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,gBAAe,GAAIF,CAAK;AAC9D,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,KAAK,EAAE,GAAGH,GAAa,KAAAF,GAAK;A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A,GAAE,QAAO,gBAAe,UAAS,IAAI,GACzC,UAAArI,gBAAAA,EAAA;AAAA,cAACyF;AAAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAASJ,IAAa,qBAAqB;AAAA,gBAE1C,UAAAc;AAAA,cAAA;AAAA,YAAA,EAEL,CAAA;AAAA,UAAA,GAEJ,EAAA,CAEJ,GACF,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEMuC,KAAgBC,GAAM;AAAA,EAC1B,CAAChJ,GAAoBC,MACnBI,gBAAAA,MAACgG,MAAO,WAAWpG,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA+I,GAAc,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),x=require("react"),k=require("./button.component-ytAmAAJg.js"),C=require("./heading.component-CgsSnBVo.js"),E=require("./menu.component-
|
|
2
|
-
//# sourceMappingURL=tagBlock.component-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),x=require("react"),k=require("./button.component-ytAmAAJg.js"),C=require("./heading.component-CgsSnBVo.js"),E=require("./menu.component-Bi2JPazM.js"),T=require("./spinner.component-BuNeiOw3.js"),N=require("./tag.component-C5MszzTM.js"),f=require("./text.component-Dcx3RoTp.js"),r=require("./box-ca2FvcWF.js"),l=require("./flex-DKWxn8hO.js"),v=require("./h-stack-DxezNoY3.js"),q=n=>n&&n.__esModule?n:{default:n},w=q(x);var i=(n=>(n.Inactive="Inactive",n.Deleted="Deleted",n))(i||{});const y={size:"sm",variant:"secondarySubtle",iconName:"plus",text:"Add",hideCaret:!0},D=({title:n,menuProps:d,tags:a,canBeDeleted:h=!1,onClearAll:_,onRemoveTag:c,onDelete:B,hasError:b=!1,errorText:R="This field contains an error",displayTagsInGroups:u,loading:p=!1})=>{const m=x.useCallback(s=>{c&&c(s,a)},[c,a]),j=w.default.useMemo(()=>{if(!u)return[];const s={};for(const t of a){const o=t.groupLabel||"-";s[o]||(s[o]=[]),s[o].push(t)}return Object.entries(s).map(([t,o])=>({groupLabel:t,tags:o}))},[a,u]),g=x.useCallback(s=>s.map(t=>{const o=t.label.includes(i.Inactive)||t.label.includes(i.Deleted);return e.jsxRuntimeExports.jsx(N.Tag,{className:"TagBlock__Tag","data-testid":"kibble-tag-block-tag",mr:1,mb:1,label:t.label,onClose:()=>m(t.value),closeButtonDisplay:"always",fontWeight:"normal",color:o?"text.placeholder":"text",size:"md"},t.value)}),[m]);return e.jsxRuntimeExports.jsxs(r.Box,{className:"TagBlock","data-testid":"kibble-tag-block",position:"relative",mb:3,py:2,pl:4,pr:2,bg:"background.subtle",borderRadius:"lg",boxShadow:b?"0 0 0 2px var(--chakra-colors-border-danger)":"",border:"1px",borderColor:"border",overflow:p?"hidden":void 0,children:[e.jsxRuntimeExports.jsxs(l.Flex,{className:"TagBlock__ButtonContainer","data-testid":"kibble-tag-block-button-container",justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(v.HStack,{gap:1,minH:10,children:[n&&e.jsxRuntimeExports.jsx(f.WrappedText,{className:"TagBlock__Title",mr:2,fontWeight:"bold",children:n}),e.jsxRuntimeExports.jsx(E.Menu,{"data-testid":"kibble-tag-block-menu",...d,buttonProps:d?.buttonProps||y}),e.jsxRuntimeExports.jsx(k.Button,{className:"TagBlock__Button--ClearAll","data-testid":"kibble-tag-block-clear-all-button",size:"sm",iconName:"arrowCircle",variant:"ghostNeutral",onClick:_,disabled:a.length<=0,children:"Clear All"})]}),h&&e.jsxRuntimeExports.jsx(r.Box,{children:e.jsxRuntimeExports.jsx(k.Button,{className:"TagBlock__Button--Delete","data-testid":"kibble-tag-block-delete-button",iconName:"trashcan",variant:"ghostNeutral",onClick:B,justifySelf:"flex-end"})})]}),!!a.length&&e.jsxRuntimeExports.jsx(l.Flex,{className:"TagBlock__TagContainer","data-testid":"kibble-tag-block-tag-container",mt:2,pb:1,alignContent:"space-between",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",children:u&&j.length?e.jsxRuntimeExports.jsx(l.Flex,{direction:"column",children:j.map(({groupLabel:s,tags:t})=>e.jsxRuntimeExports.jsxs(r.Box,{mb:2,children:[e.jsxRuntimeExports.jsx(r.Box,{className:"TagBlock__GroupTitle","data-testid":"kibble-tag-block-group-title",children:e.jsxRuntimeExports.jsx(C.WrappedHeading,{size:"xs",pb:2,children:s})}),e.jsxRuntimeExports.jsx(l.Flex,{alignContent:"space-between",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start",children:g(t)})]},s))}):g(a)}),p&&e.jsxRuntimeExports.jsx(T.Spinner,{fullScreen:!0}),b&&e.jsxRuntimeExports.jsx(f.WrappedText,{className:"TagBlock__Error","data-testid":"kibble-tag-block-error",mt:2,size:"xs",as:"p",variant:"danger",children:R})]})};exports.TagBlock=D;exports.TagDisabledState=i;
|
|
2
|
+
//# sourceMappingURL=tagBlock.component-C0LIdK0o.js.map
|