@pismo/marola 1.0.16 → 1.0.17
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.
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as m, jsxs as re } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { createContext as We, useContext as Je, useId as Ge } from "react";
|
|
4
|
+
import { c as K } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { Checkbox as Qe } from "../Checkbox/Checkbox.js";
|
|
6
|
+
import { Icon as Xe } from "../Icon/Icon.js";
|
|
6
7
|
import { Typography as _e } from "../Typography/Typography.js";
|
|
7
|
-
import { s as y, S as
|
|
8
|
-
import { g as we, a as Ie, u as
|
|
9
|
-
import { u as
|
|
8
|
+
import { s as y, S as Ye } from "../../SelectButton-B38avP9u.js";
|
|
9
|
+
import { g as we, a as Ie, u as Z, f as le, b as g, P as l, _ as Ne, c as se, d as ke, e as Me } from "../../useSlotProps-C_I1kEHr.js";
|
|
10
|
+
import { u as Ze, c as ae, a as Se, L as Y } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
10
11
|
import { u as Te } from "../../useButton-DcihopJG.js";
|
|
11
12
|
import { u as Le } from "../../useId-BW-oWmul.js";
|
|
12
|
-
import { u as
|
|
13
|
-
import { P as
|
|
14
|
-
import { m as Re, h as
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
13
|
+
import { u as et, a as tt, C as ot } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
14
|
+
import { P as nt } from "../../Popup-Ck3XlWMq.js";
|
|
15
|
+
import { m as Re, h as lt, l as st, u as rt } from "../../useList-B9C55YB7.js";
|
|
16
|
+
import { u as at } from "../../useEnhancedEffect-CJGo-L3B.js";
|
|
17
|
+
const it = {
|
|
17
18
|
border: 0,
|
|
18
19
|
clip: "rect(0 0 0 0)",
|
|
19
20
|
height: "1px",
|
|
@@ -24,141 +25,141 @@ const lt = {
|
|
|
24
25
|
whiteSpace: "nowrap",
|
|
25
26
|
width: "1px"
|
|
26
27
|
}, Ae = "Option";
|
|
27
|
-
function
|
|
28
|
+
function ut(n) {
|
|
28
29
|
return we(Ae, n);
|
|
29
30
|
}
|
|
30
31
|
Ie(Ae, ["root", "disabled", "selected", "highlighted"]);
|
|
31
|
-
function
|
|
32
|
+
function ct(n) {
|
|
32
33
|
const {
|
|
33
34
|
value: o,
|
|
34
35
|
label: i,
|
|
35
36
|
disabled: c,
|
|
36
|
-
rootRef:
|
|
37
|
+
rootRef: s,
|
|
37
38
|
id: u
|
|
38
39
|
} = n, {
|
|
39
|
-
getRootProps:
|
|
40
|
-
highlighted:
|
|
41
|
-
selected:
|
|
42
|
-
} =
|
|
40
|
+
getRootProps: d,
|
|
41
|
+
highlighted: p,
|
|
42
|
+
selected: f
|
|
43
|
+
} = Ze({
|
|
43
44
|
item: o
|
|
44
45
|
}), {
|
|
45
|
-
getRootProps:
|
|
46
|
-
rootRef:
|
|
46
|
+
getRootProps: S,
|
|
47
|
+
rootRef: I
|
|
47
48
|
} = Te({
|
|
48
49
|
disabled: c,
|
|
49
50
|
focusableWhenDisabled: !0
|
|
50
|
-
}),
|
|
51
|
+
}), C = Le(u), R = r.useRef(null), _ = r.useMemo(() => ({
|
|
51
52
|
disabled: c,
|
|
52
53
|
label: i,
|
|
53
54
|
value: o,
|
|
54
|
-
ref:
|
|
55
|
-
id:
|
|
56
|
-
}), [c, i, o,
|
|
57
|
-
index:
|
|
58
|
-
} =
|
|
59
|
-
var
|
|
60
|
-
(
|
|
61
|
-
},
|
|
62
|
-
onKeyDown:
|
|
55
|
+
ref: R,
|
|
56
|
+
id: C
|
|
57
|
+
}), [c, i, o, C]), {
|
|
58
|
+
index: N
|
|
59
|
+
} = et(o, _), h = Z(s, R, I), k = (b) => (P) => {
|
|
60
|
+
var x;
|
|
61
|
+
(x = b.onKeyDown) == null || x.call(b, P), !P.defaultMuiPrevented && [" ", "Enter"].includes(P.key) && (P.defaultMuiPrevented = !0);
|
|
62
|
+
}, A = (b = {}) => ({
|
|
63
|
+
onKeyDown: k(b)
|
|
63
64
|
});
|
|
64
65
|
return {
|
|
65
|
-
getRootProps: (
|
|
66
|
-
const
|
|
67
|
-
return
|
|
68
|
-
id:
|
|
69
|
-
ref:
|
|
66
|
+
getRootProps: (b = {}) => {
|
|
67
|
+
const P = le(b), x = ae(d, ae(S, A));
|
|
68
|
+
return g({}, b, P, x(P), {
|
|
69
|
+
id: C,
|
|
70
|
+
ref: h,
|
|
70
71
|
role: "option",
|
|
71
|
-
"aria-selected":
|
|
72
|
+
"aria-selected": f
|
|
72
73
|
});
|
|
73
74
|
},
|
|
74
|
-
highlighted:
|
|
75
|
-
index:
|
|
76
|
-
selected:
|
|
77
|
-
rootRef:
|
|
75
|
+
highlighted: p,
|
|
76
|
+
index: N,
|
|
77
|
+
selected: f,
|
|
78
|
+
rootRef: h
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
const o =
|
|
81
|
+
function dt(n) {
|
|
82
|
+
const o = r.useContext(Se);
|
|
82
83
|
if (!o)
|
|
83
84
|
throw new Error("Option: ListContext was not found.");
|
|
84
85
|
const {
|
|
85
86
|
getItemState: i,
|
|
86
87
|
dispatch: c
|
|
87
88
|
} = o, {
|
|
88
|
-
highlighted:
|
|
89
|
+
highlighted: s,
|
|
89
90
|
selected: u,
|
|
90
|
-
focusable:
|
|
91
|
-
} = i(n),
|
|
92
|
-
if (
|
|
91
|
+
focusable: d
|
|
92
|
+
} = i(n), p = r.useCallback((S) => {
|
|
93
|
+
if (S !== n)
|
|
93
94
|
throw new Error(["Base UI Option: Tried to access the state of another Option.", "This is unsupported when the Option uses the OptionContextStabilizer as a performance optimization."].join("/n"));
|
|
94
95
|
return {
|
|
95
|
-
highlighted:
|
|
96
|
+
highlighted: s,
|
|
96
97
|
selected: u,
|
|
97
|
-
focusable:
|
|
98
|
+
focusable: d
|
|
98
99
|
};
|
|
99
|
-
}, [
|
|
100
|
+
}, [s, u, d, n]);
|
|
100
101
|
return {
|
|
101
|
-
contextValue:
|
|
102
|
+
contextValue: r.useMemo(() => ({
|
|
102
103
|
dispatch: c,
|
|
103
|
-
getItemState:
|
|
104
|
-
}), [c,
|
|
104
|
+
getItemState: p
|
|
105
|
+
}), [c, p])
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
|
-
const
|
|
108
|
-
function
|
|
108
|
+
const pt = ["children", "disabled", "label", "slotProps", "slots", "value"];
|
|
109
|
+
function ft(n) {
|
|
109
110
|
const {
|
|
110
111
|
disabled: o,
|
|
111
112
|
highlighted: i,
|
|
112
113
|
selected: c
|
|
113
114
|
} = n;
|
|
114
|
-
return
|
|
115
|
+
return ke({
|
|
115
116
|
root: ["root", o && "disabled", i && "highlighted", c && "selected"]
|
|
116
|
-
},
|
|
117
|
+
}, Me(ut));
|
|
117
118
|
}
|
|
118
|
-
const
|
|
119
|
-
var c,
|
|
119
|
+
const bt = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef(function(o, i) {
|
|
120
|
+
var c, s;
|
|
120
121
|
const {
|
|
121
122
|
children: u,
|
|
122
|
-
disabled:
|
|
123
|
-
label:
|
|
124
|
-
slotProps:
|
|
125
|
-
slots:
|
|
126
|
-
value:
|
|
127
|
-
} = o,
|
|
128
|
-
getRootProps:
|
|
129
|
-
selected:
|
|
130
|
-
highlighted:
|
|
131
|
-
index:
|
|
132
|
-
} =
|
|
133
|
-
disabled:
|
|
134
|
-
label:
|
|
135
|
-
rootRef:
|
|
136
|
-
value:
|
|
137
|
-
}),
|
|
138
|
-
disabled:
|
|
139
|
-
highlighted:
|
|
140
|
-
index:
|
|
141
|
-
selected:
|
|
142
|
-
}),
|
|
143
|
-
getSlotProps:
|
|
144
|
-
elementType:
|
|
145
|
-
externalSlotProps:
|
|
146
|
-
externalForwardedProps:
|
|
147
|
-
className:
|
|
148
|
-
ownerState:
|
|
123
|
+
disabled: d = !1,
|
|
124
|
+
label: p,
|
|
125
|
+
slotProps: f = {},
|
|
126
|
+
slots: S = {},
|
|
127
|
+
value: I
|
|
128
|
+
} = o, C = Ne(o, pt), R = (c = S.root) != null ? c : "li", _ = r.useRef(null), N = Z(_, i), h = p ?? (typeof u == "string" ? u : (s = _.current) == null || (s = s.textContent) == null ? void 0 : s.trim()), {
|
|
129
|
+
getRootProps: k,
|
|
130
|
+
selected: A,
|
|
131
|
+
highlighted: b,
|
|
132
|
+
index: P
|
|
133
|
+
} = ct({
|
|
134
|
+
disabled: d,
|
|
135
|
+
label: h,
|
|
136
|
+
rootRef: N,
|
|
137
|
+
value: I
|
|
138
|
+
}), x = g({}, o, {
|
|
139
|
+
disabled: d,
|
|
140
|
+
highlighted: b,
|
|
141
|
+
index: P,
|
|
142
|
+
selected: A
|
|
143
|
+
}), $ = ft(x), O = se({
|
|
144
|
+
getSlotProps: k,
|
|
145
|
+
elementType: R,
|
|
146
|
+
externalSlotProps: f.root,
|
|
147
|
+
externalForwardedProps: C,
|
|
148
|
+
className: $.root,
|
|
149
|
+
ownerState: x
|
|
149
150
|
});
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ m(R, g({}, O, {
|
|
151
152
|
children: u
|
|
152
153
|
}));
|
|
153
|
-
})), Ee = /* @__PURE__ */
|
|
154
|
+
})), Ee = /* @__PURE__ */ r.forwardRef(function(o, i) {
|
|
154
155
|
const {
|
|
155
156
|
value: c
|
|
156
157
|
} = o, {
|
|
157
|
-
contextValue:
|
|
158
|
-
} =
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
value:
|
|
161
|
-
children: /* @__PURE__ */
|
|
158
|
+
contextValue: s
|
|
159
|
+
} = dt(c);
|
|
160
|
+
return /* @__PURE__ */ m(Se.Provider, {
|
|
161
|
+
value: s,
|
|
162
|
+
children: /* @__PURE__ */ m(bt, g({}, o, {
|
|
162
163
|
ref: i
|
|
163
164
|
}))
|
|
164
165
|
});
|
|
@@ -216,7 +217,7 @@ const ie = {
|
|
|
216
217
|
} = n;
|
|
217
218
|
return typeof o == "string" ? o : typeof i == "string" ? i : String(n);
|
|
218
219
|
};
|
|
219
|
-
function
|
|
220
|
+
function mt(n, o) {
|
|
220
221
|
const {
|
|
221
222
|
open: i
|
|
222
223
|
} = n, {
|
|
@@ -225,48 +226,48 @@ function dt(n, o) {
|
|
|
225
226
|
}
|
|
226
227
|
} = o;
|
|
227
228
|
if (o.type === ie.buttonClick) {
|
|
228
|
-
var
|
|
229
|
-
const
|
|
230
|
-
return
|
|
229
|
+
var s;
|
|
230
|
+
const f = (s = n.selectedValues[0]) != null ? s : Re(null, "start", o.context);
|
|
231
|
+
return g({}, n, {
|
|
231
232
|
open: !i,
|
|
232
|
-
highlightedValue: i ? null :
|
|
233
|
+
highlightedValue: i ? null : f
|
|
233
234
|
});
|
|
234
235
|
}
|
|
235
236
|
if (o.type === ie.browserAutoFill)
|
|
236
|
-
return
|
|
237
|
-
const u =
|
|
237
|
+
return lt(o.item, n, o.context);
|
|
238
|
+
const u = st(n, o);
|
|
238
239
|
switch (o.type) {
|
|
239
|
-
case
|
|
240
|
+
case Y.keyDown:
|
|
240
241
|
if (n.open) {
|
|
241
242
|
if (o.event.key === "Escape")
|
|
242
|
-
return
|
|
243
|
+
return g({}, u, {
|
|
243
244
|
open: !1
|
|
244
245
|
});
|
|
245
246
|
} else {
|
|
246
247
|
if (o.event.key === "ArrowDown") {
|
|
247
|
-
var
|
|
248
|
-
return
|
|
248
|
+
var d;
|
|
249
|
+
return g({}, n, {
|
|
249
250
|
open: !0,
|
|
250
|
-
highlightedValue: (
|
|
251
|
+
highlightedValue: (d = n.selectedValues[0]) != null ? d : Re(null, "start", o.context)
|
|
251
252
|
});
|
|
252
253
|
}
|
|
253
254
|
if (o.event.key === "ArrowUp") {
|
|
254
|
-
var
|
|
255
|
-
return
|
|
255
|
+
var p;
|
|
256
|
+
return g({}, n, {
|
|
256
257
|
open: !0,
|
|
257
|
-
highlightedValue: (
|
|
258
|
+
highlightedValue: (p = n.selectedValues[0]) != null ? p : Re(null, "end", o.context)
|
|
258
259
|
});
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
break;
|
|
262
|
-
case
|
|
263
|
+
case Y.itemClick:
|
|
263
264
|
if (c === "single")
|
|
264
|
-
return
|
|
265
|
+
return g({}, u, {
|
|
265
266
|
open: !1
|
|
266
267
|
});
|
|
267
268
|
break;
|
|
268
|
-
case
|
|
269
|
-
return
|
|
269
|
+
case Y.blur:
|
|
270
|
+
return g({}, u, {
|
|
270
271
|
open: !1
|
|
271
272
|
});
|
|
272
273
|
default:
|
|
@@ -274,87 +275,87 @@ function dt(n, o) {
|
|
|
274
275
|
}
|
|
275
276
|
return u;
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
+
function gt(n) {
|
|
278
279
|
return Array.isArray(n) ? n.length === 0 ? "" : JSON.stringify(n.map((o) => o.value)) : (n == null ? void 0 : n.value) == null ? "" : typeof n.value == "string" || typeof n.value == "number" ? n.value : JSON.stringify(n.value);
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
+
function ht(n) {
|
|
281
282
|
const {
|
|
282
283
|
areOptionsEqual: o,
|
|
283
284
|
buttonRef: i,
|
|
284
285
|
defaultOpen: c = !1,
|
|
285
|
-
defaultValue:
|
|
286
|
+
defaultValue: s,
|
|
286
287
|
disabled: u = !1,
|
|
287
|
-
listboxId:
|
|
288
|
-
listboxRef:
|
|
289
|
-
multiple:
|
|
290
|
-
name:
|
|
291
|
-
required:
|
|
292
|
-
onChange:
|
|
293
|
-
onHighlightChange:
|
|
294
|
-
onOpenChange:
|
|
295
|
-
open:
|
|
296
|
-
options:
|
|
297
|
-
getOptionAsString:
|
|
298
|
-
getSerializedValue:
|
|
299
|
-
value:
|
|
300
|
-
componentName:
|
|
301
|
-
} = n,
|
|
302
|
-
let
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
return
|
|
307
|
-
}, [
|
|
288
|
+
listboxId: d,
|
|
289
|
+
listboxRef: p,
|
|
290
|
+
multiple: f = !1,
|
|
291
|
+
name: S,
|
|
292
|
+
required: I,
|
|
293
|
+
onChange: C,
|
|
294
|
+
onHighlightChange: R,
|
|
295
|
+
onOpenChange: _,
|
|
296
|
+
open: N,
|
|
297
|
+
options: h,
|
|
298
|
+
getOptionAsString: k = Be,
|
|
299
|
+
getSerializedValue: A = gt,
|
|
300
|
+
value: b,
|
|
301
|
+
componentName: P = "useSelect"
|
|
302
|
+
} = n, x = r.useRef(null), $ = Z(i, x), O = r.useRef(null), V = Le(d);
|
|
303
|
+
let M;
|
|
304
|
+
b === void 0 && s === void 0 ? M = [] : s !== void 0 && (f ? M = s : M = s == null ? [] : [s]);
|
|
305
|
+
const q = r.useMemo(() => {
|
|
306
|
+
if (b !== void 0)
|
|
307
|
+
return f ? b : b == null ? [] : [b];
|
|
308
|
+
}, [b, f]), {
|
|
308
309
|
subitems: B,
|
|
309
|
-
contextValue:
|
|
310
|
-
} =
|
|
310
|
+
contextValue: j
|
|
311
|
+
} = tt(), T = r.useMemo(() => h != null ? new Map(h.map((e, t) => [e.value, {
|
|
311
312
|
value: e.value,
|
|
312
313
|
label: e.label,
|
|
313
314
|
disabled: e.disabled,
|
|
314
|
-
ref: /* @__PURE__ */
|
|
315
|
-
id: `${
|
|
316
|
-
}])) : B, [
|
|
315
|
+
ref: /* @__PURE__ */ r.createRef(),
|
|
316
|
+
id: `${V}_${t}`
|
|
317
|
+
}])) : B, [h, B, V]), ue = Z(p, O), {
|
|
317
318
|
getRootProps: ee,
|
|
318
319
|
active: ce,
|
|
319
320
|
focusVisible: de,
|
|
320
|
-
rootRef:
|
|
321
|
+
rootRef: z
|
|
321
322
|
} = Te({
|
|
322
323
|
disabled: u,
|
|
323
|
-
rootRef:
|
|
324
|
-
}),
|
|
324
|
+
rootRef: $
|
|
325
|
+
}), U = r.useMemo(() => Array.from(T.keys()), [T]), w = r.useCallback((e) => {
|
|
325
326
|
if (o !== void 0) {
|
|
326
|
-
const t =
|
|
327
|
-
return
|
|
327
|
+
const t = U.find((a) => o(a, e));
|
|
328
|
+
return T.get(t);
|
|
328
329
|
}
|
|
329
|
-
return
|
|
330
|
-
}, [
|
|
330
|
+
return T.get(e);
|
|
331
|
+
}, [T, o, U]), te = r.useCallback((e) => {
|
|
331
332
|
var t;
|
|
332
333
|
const a = w(e);
|
|
333
334
|
return (t = a == null ? void 0 : a.disabled) != null ? t : !1;
|
|
334
|
-
}, [w]), oe =
|
|
335
|
+
}, [w]), oe = r.useCallback((e) => {
|
|
335
336
|
const t = w(e);
|
|
336
|
-
return t ?
|
|
337
|
-
}, [w,
|
|
338
|
-
selectedValues:
|
|
339
|
-
open:
|
|
340
|
-
}), [
|
|
337
|
+
return t ? k(t) : "";
|
|
338
|
+
}, [w, k]), pe = r.useMemo(() => ({
|
|
339
|
+
selectedValues: q,
|
|
340
|
+
open: N
|
|
341
|
+
}), [q, N]), fe = r.useCallback((e) => {
|
|
341
342
|
var t;
|
|
342
|
-
return (t =
|
|
343
|
-
}, [
|
|
344
|
-
if (
|
|
345
|
-
|
|
343
|
+
return (t = T.get(e)) == null ? void 0 : t.id;
|
|
344
|
+
}, [T]), be = r.useCallback((e, t) => {
|
|
345
|
+
if (f)
|
|
346
|
+
C == null || C(e, t);
|
|
346
347
|
else {
|
|
347
348
|
var a;
|
|
348
|
-
|
|
349
|
+
C == null || C(e, (a = t[0]) != null ? a : null);
|
|
349
350
|
}
|
|
350
|
-
}, [
|
|
351
|
-
|
|
352
|
-
}, [
|
|
353
|
-
if (t === "open" && (
|
|
351
|
+
}, [f, C]), me = r.useCallback((e, t) => {
|
|
352
|
+
R == null || R(e, t ?? null);
|
|
353
|
+
}, [R]), ge = r.useCallback((e, t, a) => {
|
|
354
|
+
if (t === "open" && (_ == null || _(a), a === !1 && (e == null ? void 0 : e.type) !== "blur")) {
|
|
354
355
|
var v;
|
|
355
|
-
(v =
|
|
356
|
+
(v = x.current) == null || v.focus();
|
|
356
357
|
}
|
|
357
|
-
}, [
|
|
358
|
+
}, [_]), he = r.useCallback((e) => {
|
|
358
359
|
var t, a;
|
|
359
360
|
return e == null ? null : (t = (a = B.get(e)) == null ? void 0 : a.ref.current) != null ? t : null;
|
|
360
361
|
}, [B]), xe = {
|
|
@@ -362,7 +363,7 @@ function ft(n) {
|
|
|
362
363
|
var e;
|
|
363
364
|
return {
|
|
364
365
|
highlightedValue: null,
|
|
365
|
-
selectedValues: (e =
|
|
366
|
+
selectedValues: (e = M) != null ? e : [],
|
|
366
367
|
open: c
|
|
367
368
|
};
|
|
368
369
|
},
|
|
@@ -376,39 +377,39 @@ function ft(n) {
|
|
|
376
377
|
onChange: be,
|
|
377
378
|
onHighlightChange: me,
|
|
378
379
|
onStateChange: ge,
|
|
379
|
-
reducerActionContext:
|
|
380
|
-
multiple:
|
|
381
|
-
}), [
|
|
382
|
-
items:
|
|
380
|
+
reducerActionContext: r.useMemo(() => ({
|
|
381
|
+
multiple: f
|
|
382
|
+
}), [f]),
|
|
383
|
+
items: U,
|
|
383
384
|
getItemAsString: oe,
|
|
384
|
-
selectionMode:
|
|
385
|
-
stateReducer:
|
|
386
|
-
componentName:
|
|
385
|
+
selectionMode: f ? "multiple" : "single",
|
|
386
|
+
stateReducer: mt,
|
|
387
|
+
componentName: P
|
|
387
388
|
}, {
|
|
388
389
|
dispatch: H,
|
|
389
390
|
getRootProps: Ce,
|
|
390
|
-
contextValue:
|
|
391
|
+
contextValue: W,
|
|
391
392
|
state: {
|
|
392
|
-
open:
|
|
393
|
+
open: L,
|
|
393
394
|
highlightedValue: D,
|
|
394
|
-
selectedValues:
|
|
395
|
+
selectedValues: E
|
|
395
396
|
},
|
|
396
|
-
rootRef:
|
|
397
|
-
} =
|
|
398
|
-
|
|
399
|
-
if (
|
|
397
|
+
rootRef: J
|
|
398
|
+
} = rt(xe), Pe = r.useRef(L);
|
|
399
|
+
at(() => {
|
|
400
|
+
if (L && D !== null) {
|
|
400
401
|
var e;
|
|
401
402
|
const t = (e = w(D)) == null ? void 0 : e.ref;
|
|
402
|
-
if (!
|
|
403
|
+
if (!O.current || !(t != null && t.current))
|
|
403
404
|
return;
|
|
404
405
|
Pe.current || t.current.focus({
|
|
405
406
|
preventScroll: !0
|
|
406
407
|
});
|
|
407
|
-
const a =
|
|
408
|
-
v.top < a.top ?
|
|
408
|
+
const a = O.current.getBoundingClientRect(), v = t.current.getBoundingClientRect();
|
|
409
|
+
v.top < a.top ? O.current.scrollTop -= a.top - v.top : v.bottom > a.bottom && (O.current.scrollTop += v.bottom - a.bottom);
|
|
409
410
|
}
|
|
410
|
-
}, [
|
|
411
|
-
const
|
|
411
|
+
}, [L, D, w]);
|
|
412
|
+
const G = r.useCallback((e) => w(e), [w]), ve = (e) => (t) => {
|
|
412
413
|
var a;
|
|
413
414
|
if (e == null || (a = e.onClick) == null || a.call(e, t), !t.defaultMuiPrevented) {
|
|
414
415
|
const v = {
|
|
@@ -417,58 +418,58 @@ function ft(n) {
|
|
|
417
418
|
};
|
|
418
419
|
H(v);
|
|
419
420
|
}
|
|
420
|
-
},
|
|
421
|
+
}, Q = (e) => (t) => {
|
|
421
422
|
var a;
|
|
422
423
|
(a = e.onKeyDown) == null || a.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), H({
|
|
423
|
-
type:
|
|
424
|
+
type: Y.keyDown,
|
|
424
425
|
key: t.key,
|
|
425
426
|
event: t
|
|
426
427
|
}));
|
|
427
428
|
}, ne = (e = {}) => ({
|
|
428
429
|
onClick: ve(e),
|
|
429
|
-
onKeyDown:
|
|
430
|
-
}), F = (e = {}) =>
|
|
430
|
+
onKeyDown: Q(e)
|
|
431
|
+
}), F = (e = {}) => g({}, e, ne(e), {
|
|
431
432
|
role: "combobox",
|
|
432
|
-
"aria-expanded":
|
|
433
|
-
"aria-controls":
|
|
434
|
-
}),
|
|
433
|
+
"aria-expanded": L,
|
|
434
|
+
"aria-controls": V
|
|
435
|
+
}), Fe = (e = {}) => {
|
|
435
436
|
const t = le(e), a = ae(F, ee);
|
|
436
|
-
return
|
|
437
|
-
},
|
|
437
|
+
return g({}, e, a(t));
|
|
438
|
+
}, qe = (e) => (t) => {
|
|
438
439
|
var a, v;
|
|
439
|
-
(a = e.onBlur) == null || a.call(e, t), !t.defaultMuiPrevented && ((v =
|
|
440
|
-
},
|
|
441
|
-
onBlur:
|
|
442
|
-
}),
|
|
443
|
-
const t = le(e), a = ae(
|
|
444
|
-
return
|
|
445
|
-
id:
|
|
440
|
+
(a = e.onBlur) == null || a.call(e, t), !t.defaultMuiPrevented && ((v = O.current) != null && v.contains(t.relatedTarget) || t.relatedTarget === x.current) && (t.defaultMuiPrevented = !0);
|
|
441
|
+
}, je = (e = {}) => ({
|
|
442
|
+
onBlur: qe(e)
|
|
443
|
+
}), Ue = (e = {}) => {
|
|
444
|
+
const t = le(e), a = ae(je, Ce);
|
|
445
|
+
return g({
|
|
446
|
+
id: V,
|
|
446
447
|
role: "listbox",
|
|
447
|
-
"aria-multiselectable":
|
|
448
|
+
"aria-multiselectable": f ? "true" : void 0
|
|
448
449
|
}, e, a(t));
|
|
449
450
|
};
|
|
450
|
-
|
|
451
|
-
selectedOptions:
|
|
451
|
+
r.useDebugValue({
|
|
452
|
+
selectedOptions: E,
|
|
452
453
|
highlightedOption: D,
|
|
453
|
-
open:
|
|
454
|
+
open: L
|
|
454
455
|
});
|
|
455
|
-
const
|
|
456
|
-
let
|
|
457
|
-
n.multiple ?
|
|
456
|
+
const Ke = r.useMemo(() => g({}, W, j), [W, j]);
|
|
457
|
+
let X;
|
|
458
|
+
n.multiple ? X = E : X = E.length > 0 ? E[0] : null;
|
|
458
459
|
let ye;
|
|
459
|
-
if (
|
|
460
|
-
ye =
|
|
460
|
+
if (f)
|
|
461
|
+
ye = X.map((e) => G(e)).filter((e) => e !== void 0);
|
|
461
462
|
else {
|
|
462
463
|
var Oe;
|
|
463
|
-
ye = (Oe =
|
|
464
|
+
ye = (Oe = G(X)) != null ? Oe : null;
|
|
464
465
|
}
|
|
465
|
-
const
|
|
466
|
+
const ze = (e) => (t) => {
|
|
466
467
|
var a;
|
|
467
468
|
if (e == null || (a = e.onChange) == null || a.call(e, t), t.defaultMuiPrevented)
|
|
468
469
|
return;
|
|
469
|
-
const v =
|
|
470
|
+
const v = T.get(t.target.value);
|
|
470
471
|
t.target.value === "" ? H({
|
|
471
|
-
type:
|
|
472
|
+
type: Y.clearSelection
|
|
472
473
|
}) : v !== void 0 && H({
|
|
473
474
|
type: ie.browserAutoFill,
|
|
474
475
|
item: v.value,
|
|
@@ -478,116 +479,116 @@ function ft(n) {
|
|
|
478
479
|
return {
|
|
479
480
|
buttonActive: ce,
|
|
480
481
|
buttonFocusVisible: de,
|
|
481
|
-
buttonRef:
|
|
482
|
-
contextValue:
|
|
482
|
+
buttonRef: z,
|
|
483
|
+
contextValue: Ke,
|
|
483
484
|
disabled: u,
|
|
484
485
|
dispatch: H,
|
|
485
|
-
getButtonProps:
|
|
486
|
+
getButtonProps: Fe,
|
|
486
487
|
getHiddenInputProps: (e = {}) => {
|
|
487
488
|
const t = le(e);
|
|
488
|
-
return
|
|
489
|
-
name:
|
|
489
|
+
return g({
|
|
490
|
+
name: S,
|
|
490
491
|
tabIndex: -1,
|
|
491
492
|
"aria-hidden": !0,
|
|
492
|
-
required:
|
|
493
|
-
value:
|
|
494
|
-
style:
|
|
493
|
+
required: I ? !0 : void 0,
|
|
494
|
+
value: A(ye),
|
|
495
|
+
style: it
|
|
495
496
|
}, e, {
|
|
496
|
-
onChange:
|
|
497
|
+
onChange: ze(t)
|
|
497
498
|
});
|
|
498
499
|
},
|
|
499
|
-
getListboxProps:
|
|
500
|
-
getOptionMetadata:
|
|
501
|
-
listboxRef:
|
|
502
|
-
open:
|
|
503
|
-
options:
|
|
504
|
-
value:
|
|
500
|
+
getListboxProps: Ue,
|
|
501
|
+
getOptionMetadata: G,
|
|
502
|
+
listboxRef: J,
|
|
503
|
+
open: L,
|
|
504
|
+
options: U,
|
|
505
|
+
value: X,
|
|
505
506
|
highlightedOption: D
|
|
506
507
|
};
|
|
507
508
|
}
|
|
508
|
-
function
|
|
509
|
+
function xt(n) {
|
|
509
510
|
const {
|
|
510
511
|
value: o,
|
|
511
512
|
children: i
|
|
512
513
|
} = n, {
|
|
513
514
|
dispatch: c,
|
|
514
|
-
getItemIndex:
|
|
515
|
+
getItemIndex: s,
|
|
515
516
|
getItemState: u,
|
|
516
|
-
registerItem:
|
|
517
|
-
totalSubitemCount:
|
|
518
|
-
} = o,
|
|
517
|
+
registerItem: d,
|
|
518
|
+
totalSubitemCount: p
|
|
519
|
+
} = o, f = r.useMemo(() => ({
|
|
519
520
|
dispatch: c,
|
|
520
521
|
getItemState: u,
|
|
521
|
-
getItemIndex:
|
|
522
|
-
}), [c,
|
|
523
|
-
getItemIndex:
|
|
524
|
-
registerItem:
|
|
525
|
-
totalSubitemCount:
|
|
526
|
-
}), [
|
|
527
|
-
return /* @__PURE__ */
|
|
528
|
-
value:
|
|
529
|
-
children: /* @__PURE__ */
|
|
530
|
-
value:
|
|
522
|
+
getItemIndex: s
|
|
523
|
+
}), [c, s, u]), S = r.useMemo(() => ({
|
|
524
|
+
getItemIndex: s,
|
|
525
|
+
registerItem: d,
|
|
526
|
+
totalSubitemCount: p
|
|
527
|
+
}), [d, s, p]);
|
|
528
|
+
return /* @__PURE__ */ m(ot.Provider, {
|
|
529
|
+
value: S,
|
|
530
|
+
children: /* @__PURE__ */ m(Se.Provider, {
|
|
531
|
+
value: f,
|
|
531
532
|
children: i
|
|
532
533
|
})
|
|
533
534
|
});
|
|
534
535
|
}
|
|
535
536
|
const De = "Select";
|
|
536
|
-
function
|
|
537
|
+
function Ct(n) {
|
|
537
538
|
return we(De, n);
|
|
538
539
|
}
|
|
539
540
|
Ie(De, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
|
|
540
541
|
var Ve;
|
|
541
|
-
const
|
|
542
|
-
function
|
|
542
|
+
const Pt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
|
|
543
|
+
function vt(n) {
|
|
543
544
|
var o;
|
|
544
|
-
return Array.isArray(n) ? /* @__PURE__ */
|
|
545
|
+
return Array.isArray(n) ? /* @__PURE__ */ m(r.Fragment, {
|
|
545
546
|
children: n.map((i) => i.label).join(", ")
|
|
546
547
|
}) : (o = n == null ? void 0 : n.label) != null ? o : null;
|
|
547
548
|
}
|
|
548
|
-
function
|
|
549
|
+
function yt(n) {
|
|
549
550
|
const {
|
|
550
551
|
active: o,
|
|
551
552
|
disabled: i,
|
|
552
553
|
open: c,
|
|
553
|
-
focusVisible:
|
|
554
|
+
focusVisible: s
|
|
554
555
|
} = n;
|
|
555
|
-
return
|
|
556
|
-
root: ["root", i && "disabled",
|
|
556
|
+
return ke({
|
|
557
|
+
root: ["root", i && "disabled", s && "focusVisible", o && "active", c && "expanded"],
|
|
557
558
|
listbox: ["listbox", i && "disabled"],
|
|
558
559
|
popup: ["popup"]
|
|
559
|
-
},
|
|
560
|
+
}, Me(Ct));
|
|
560
561
|
}
|
|
561
|
-
const $e = /* @__PURE__ */
|
|
562
|
-
var c,
|
|
562
|
+
const $e = /* @__PURE__ */ r.forwardRef(function(o, i) {
|
|
563
|
+
var c, s, u, d, p;
|
|
563
564
|
const {
|
|
564
|
-
areOptionsEqual:
|
|
565
|
-
autoComplete:
|
|
566
|
-
autoFocus:
|
|
567
|
-
children:
|
|
568
|
-
defaultValue:
|
|
569
|
-
defaultListboxOpen:
|
|
570
|
-
disabled:
|
|
571
|
-
getSerializedValue:
|
|
572
|
-
listboxId:
|
|
573
|
-
listboxOpen:
|
|
574
|
-
multiple:
|
|
575
|
-
name:
|
|
576
|
-
required:
|
|
577
|
-
onChange:
|
|
578
|
-
onListboxOpenChange:
|
|
579
|
-
getOptionAsString:
|
|
580
|
-
renderValue:
|
|
581
|
-
placeholder:
|
|
565
|
+
areOptionsEqual: f,
|
|
566
|
+
autoComplete: S,
|
|
567
|
+
autoFocus: I,
|
|
568
|
+
children: C,
|
|
569
|
+
defaultValue: R,
|
|
570
|
+
defaultListboxOpen: _ = !1,
|
|
571
|
+
disabled: N,
|
|
572
|
+
getSerializedValue: h,
|
|
573
|
+
listboxId: k,
|
|
574
|
+
listboxOpen: A,
|
|
575
|
+
multiple: b = !1,
|
|
576
|
+
name: P,
|
|
577
|
+
required: x = !1,
|
|
578
|
+
onChange: $,
|
|
579
|
+
onListboxOpenChange: O,
|
|
580
|
+
getOptionAsString: V = Be,
|
|
581
|
+
renderValue: M,
|
|
582
|
+
placeholder: q,
|
|
582
583
|
slotProps: B = {},
|
|
583
|
-
slots:
|
|
584
|
-
value:
|
|
585
|
-
} = o, ue = Ne(o,
|
|
584
|
+
slots: j = {},
|
|
585
|
+
value: T
|
|
586
|
+
} = o, ue = Ne(o, Pt), ee = M ?? vt, [ce, de] = r.useState(!1), z = r.useRef(null), U = r.useRef(null), w = (c = j.root) != null ? c : "button", te = (s = j.listbox) != null ? s : "ul", oe = (u = j.popup) != null ? u : "div", pe = r.useCallback((F) => {
|
|
586
587
|
de(F != null);
|
|
587
|
-
}, []), fe =
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}, [
|
|
588
|
+
}, []), fe = Z(i, z, pe);
|
|
589
|
+
r.useEffect(() => {
|
|
590
|
+
I && z.current.focus();
|
|
591
|
+
}, [I]);
|
|
591
592
|
const {
|
|
592
593
|
buttonActive: be,
|
|
593
594
|
buttonFocusVisible: me,
|
|
@@ -596,94 +597,94 @@ const $e = /* @__PURE__ */ s.forwardRef(function(o, i) {
|
|
|
596
597
|
getButtonProps: xe,
|
|
597
598
|
getListboxProps: H,
|
|
598
599
|
getHiddenInputProps: Ce,
|
|
599
|
-
getOptionMetadata:
|
|
600
|
-
value:
|
|
600
|
+
getOptionMetadata: W,
|
|
601
|
+
value: L,
|
|
601
602
|
open: D
|
|
602
|
-
} =
|
|
603
|
-
name:
|
|
604
|
-
required:
|
|
605
|
-
getSerializedValue:
|
|
606
|
-
areOptionsEqual:
|
|
603
|
+
} = ht({
|
|
604
|
+
name: P,
|
|
605
|
+
required: x,
|
|
606
|
+
getSerializedValue: h,
|
|
607
|
+
areOptionsEqual: f,
|
|
607
608
|
buttonRef: fe,
|
|
608
|
-
defaultOpen:
|
|
609
|
-
defaultValue:
|
|
610
|
-
disabled:
|
|
611
|
-
listboxId:
|
|
612
|
-
multiple:
|
|
613
|
-
open:
|
|
614
|
-
onChange:
|
|
615
|
-
onOpenChange:
|
|
616
|
-
getOptionAsString:
|
|
617
|
-
value:
|
|
609
|
+
defaultOpen: _,
|
|
610
|
+
defaultValue: R,
|
|
611
|
+
disabled: N,
|
|
612
|
+
listboxId: k,
|
|
613
|
+
multiple: b,
|
|
614
|
+
open: A,
|
|
615
|
+
onChange: $,
|
|
616
|
+
onOpenChange: O,
|
|
617
|
+
getOptionAsString: V,
|
|
618
|
+
value: T,
|
|
618
619
|
componentName: "Select"
|
|
619
|
-
}),
|
|
620
|
+
}), E = g({}, o, {
|
|
620
621
|
active: be,
|
|
621
|
-
defaultListboxOpen:
|
|
622
|
+
defaultListboxOpen: _,
|
|
622
623
|
disabled: he,
|
|
623
624
|
focusVisible: me,
|
|
624
625
|
open: D,
|
|
625
|
-
multiple:
|
|
626
|
+
multiple: b,
|
|
626
627
|
renderValue: ee,
|
|
627
|
-
value:
|
|
628
|
-
}),
|
|
628
|
+
value: L
|
|
629
|
+
}), J = yt(E), Pe = se({
|
|
629
630
|
elementType: w,
|
|
630
631
|
getSlotProps: xe,
|
|
631
632
|
externalSlotProps: B.root,
|
|
632
633
|
externalForwardedProps: ue,
|
|
633
|
-
ownerState:
|
|
634
|
-
className:
|
|
635
|
-
}),
|
|
634
|
+
ownerState: E,
|
|
635
|
+
className: J.root
|
|
636
|
+
}), G = se({
|
|
636
637
|
elementType: te,
|
|
637
638
|
getSlotProps: H,
|
|
638
639
|
externalSlotProps: B.listbox,
|
|
639
640
|
additionalProps: {
|
|
640
|
-
ref:
|
|
641
|
+
ref: U
|
|
641
642
|
},
|
|
642
|
-
ownerState:
|
|
643
|
-
className:
|
|
643
|
+
ownerState: E,
|
|
644
|
+
className: J.listbox
|
|
644
645
|
}), ve = se({
|
|
645
646
|
elementType: oe,
|
|
646
647
|
externalSlotProps: B.popup,
|
|
647
648
|
additionalProps: {
|
|
648
|
-
anchor:
|
|
649
|
+
anchor: z.current,
|
|
649
650
|
keepMounted: !0,
|
|
650
651
|
open: D,
|
|
651
652
|
placement: "bottom-start",
|
|
652
653
|
role: void 0
|
|
653
654
|
},
|
|
654
|
-
ownerState:
|
|
655
|
-
className:
|
|
655
|
+
ownerState: E,
|
|
656
|
+
className: J.popup
|
|
656
657
|
});
|
|
657
|
-
let
|
|
658
|
-
if (
|
|
659
|
-
|
|
658
|
+
let Q;
|
|
659
|
+
if (b)
|
|
660
|
+
Q = L.map((F) => W(F)).filter((F) => F !== void 0);
|
|
660
661
|
else {
|
|
661
662
|
var ne;
|
|
662
|
-
|
|
663
|
+
Q = (ne = W(L)) != null ? ne : null;
|
|
663
664
|
}
|
|
664
|
-
return /* @__PURE__ */ re(
|
|
665
|
-
children: [/* @__PURE__ */
|
|
666
|
-
children: (
|
|
665
|
+
return /* @__PURE__ */ re(r.Fragment, {
|
|
666
|
+
children: [/* @__PURE__ */ m(w, g({}, Pe, {
|
|
667
|
+
children: (d = (p = ee(Q)) != null ? p : q) != null ? d : (
|
|
667
668
|
// fall back to a zero-width space to prevent layout shift
|
|
668
669
|
// from https://github.com/mui/material-ui/pull/24563
|
|
669
|
-
Ve || (Ve = /* @__PURE__ */
|
|
670
|
+
Ve || (Ve = /* @__PURE__ */ m("span", {
|
|
670
671
|
className: "notranslate",
|
|
671
672
|
children: ""
|
|
672
673
|
}))
|
|
673
674
|
)
|
|
674
|
-
})), ce && /* @__PURE__ */
|
|
675
|
+
})), ce && /* @__PURE__ */ m(nt, g({
|
|
675
676
|
slots: {
|
|
676
677
|
root: oe
|
|
677
678
|
}
|
|
678
679
|
}, ve, {
|
|
679
|
-
children: /* @__PURE__ */
|
|
680
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ m(te, g({}, G, {
|
|
681
|
+
children: /* @__PURE__ */ m(xt, {
|
|
681
682
|
value: ge,
|
|
682
|
-
children:
|
|
683
|
+
children: C
|
|
683
684
|
})
|
|
684
685
|
}))
|
|
685
|
-
})), /* @__PURE__ */
|
|
686
|
-
autoComplete:
|
|
686
|
+
})), /* @__PURE__ */ m("input", g({}, Ce(), {
|
|
687
|
+
autoComplete: S
|
|
687
688
|
}))]
|
|
688
689
|
});
|
|
689
690
|
});
|
|
@@ -814,80 +815,86 @@ process.env.NODE_ENV !== "production" && ($e.propTypes = {
|
|
|
814
815
|
*/
|
|
815
816
|
value: l.any
|
|
816
817
|
});
|
|
817
|
-
const
|
|
818
|
-
const { children: o, icon: i, className: c, ...
|
|
818
|
+
const He = We({}), Rt = () => Je(He), _t = (n) => {
|
|
819
|
+
const { children: o, icon: i, className: c, ...s } = n, { multiple: u, selectedValue: d = [] } = Rt();
|
|
819
820
|
return /* @__PURE__ */ re(
|
|
820
821
|
Ee,
|
|
821
822
|
{
|
|
822
|
-
...
|
|
823
|
+
...s,
|
|
823
824
|
slotProps: {
|
|
824
|
-
root: (
|
|
825
|
-
className:
|
|
826
|
-
[y["select__listbox__option--disabled"]]:
|
|
827
|
-
[y["select__listbox__option--selected"]]:
|
|
825
|
+
root: (p) => ({
|
|
826
|
+
className: K(y.select__listbox__option, c, {
|
|
827
|
+
[y["select__listbox__option--disabled"]]: p.disabled,
|
|
828
|
+
[y["select__listbox__option--selected"]]: p.selected && !u
|
|
828
829
|
})
|
|
829
830
|
})
|
|
830
831
|
},
|
|
831
832
|
children: [
|
|
832
|
-
|
|
833
|
-
|
|
833
|
+
u && /* @__PURE__ */ m(Qe, { checked: d == null ? void 0 : d.includes(s.value), onChange: () => {
|
|
834
|
+
} }),
|
|
835
|
+
i ? /* @__PURE__ */ m("span", { className: y.select__listbox__option__icon, children: i }) : "",
|
|
836
|
+
/* @__PURE__ */ m(_e, { className: y.select__listbox__option__text, children: o })
|
|
834
837
|
]
|
|
835
838
|
}
|
|
836
839
|
);
|
|
837
|
-
},
|
|
840
|
+
}, St = (n) => {
|
|
838
841
|
const {
|
|
839
842
|
children: o,
|
|
840
843
|
className: i,
|
|
841
844
|
id: c,
|
|
842
|
-
onChange:
|
|
845
|
+
onChange: s,
|
|
843
846
|
label: u,
|
|
847
|
+
multiple: d,
|
|
848
|
+
value: p,
|
|
844
849
|
classNameWrapper: f,
|
|
845
|
-
classNameLabel:
|
|
846
|
-
testIdLabel:
|
|
847
|
-
testIdWrapper:
|
|
848
|
-
fullWidth:
|
|
849
|
-
infoMessage:
|
|
850
|
-
error:
|
|
851
|
-
errorMessage:
|
|
852
|
-
classNameInfoMessage:
|
|
853
|
-
classNameErrorMessage:
|
|
854
|
-
"data-testid-infoMessage":
|
|
855
|
-
"data-testid-errorMessage":
|
|
856
|
-
...
|
|
857
|
-
} = n,
|
|
858
|
-
|
|
859
|
-
},
|
|
850
|
+
classNameLabel: S,
|
|
851
|
+
testIdLabel: I,
|
|
852
|
+
testIdWrapper: C,
|
|
853
|
+
fullWidth: R = !0,
|
|
854
|
+
infoMessage: _,
|
|
855
|
+
error: N,
|
|
856
|
+
errorMessage: h,
|
|
857
|
+
classNameInfoMessage: k,
|
|
858
|
+
classNameErrorMessage: A,
|
|
859
|
+
"data-testid-infoMessage": b,
|
|
860
|
+
"data-testid-errorMessage": P,
|
|
861
|
+
...x
|
|
862
|
+
} = n, $ = (M, q) => {
|
|
863
|
+
M && (s == null || s(q, M));
|
|
864
|
+
}, O = Ge(), V = c || `select_${O}`;
|
|
860
865
|
return /* @__PURE__ */ re(
|
|
861
866
|
"div",
|
|
862
867
|
{
|
|
863
|
-
className:
|
|
868
|
+
className: K(
|
|
864
869
|
y.select__wrapper,
|
|
865
|
-
!
|
|
870
|
+
!R && y["select__wrapper--fit-content-width"],
|
|
866
871
|
f
|
|
867
872
|
),
|
|
868
|
-
"data-testid":
|
|
869
|
-
id: `${
|
|
873
|
+
"data-testid": C,
|
|
874
|
+
id: `${V}_wrapper`,
|
|
870
875
|
children: [
|
|
871
|
-
u && /* @__PURE__ */
|
|
876
|
+
u && /* @__PURE__ */ m(
|
|
872
877
|
_e,
|
|
873
878
|
{
|
|
874
879
|
element: "label",
|
|
875
|
-
elementProps: { htmlFor:
|
|
876
|
-
className:
|
|
877
|
-
"data-testid":
|
|
880
|
+
elementProps: { htmlFor: V, id: `${V}_label` },
|
|
881
|
+
className: K(y.select__label, S),
|
|
882
|
+
"data-testid": I,
|
|
878
883
|
children: u
|
|
879
884
|
}
|
|
880
885
|
),
|
|
881
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ m(He.Provider, { value: { multiple: d, selectedValue: p, onChange: s }, children: /* @__PURE__ */ m(
|
|
882
887
|
$e,
|
|
883
888
|
{
|
|
884
|
-
...
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
+
...x,
|
|
890
|
+
value: p,
|
|
891
|
+
id: V,
|
|
892
|
+
onChange: $,
|
|
893
|
+
className: K(y.select, i, (N || h) && y["select-button--error"]),
|
|
894
|
+
slots: { root: Ye },
|
|
895
|
+
multiple: d,
|
|
889
896
|
slotProps: {
|
|
890
|
-
root: { fullWidth:
|
|
897
|
+
root: { fullWidth: R, placeholder: x.placeholder },
|
|
891
898
|
listbox: { className: y.select__listbox },
|
|
892
899
|
popup: {
|
|
893
900
|
className: y.select__popup,
|
|
@@ -897,15 +904,15 @@ const Ct = (n) => {
|
|
|
897
904
|
},
|
|
898
905
|
children: o
|
|
899
906
|
}
|
|
900
|
-
),
|
|
901
|
-
/* @__PURE__ */
|
|
907
|
+
) }),
|
|
908
|
+
/* @__PURE__ */ m("div", { className: y["messages-wrapper"], children: (h || _) && /* @__PURE__ */ re(
|
|
902
909
|
_e,
|
|
903
910
|
{
|
|
904
|
-
className:
|
|
905
|
-
"data-testid":
|
|
911
|
+
className: h ? K(y["error-message"], A) : K(y["info-message"], k),
|
|
912
|
+
"data-testid": h ? P : b,
|
|
906
913
|
children: [
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
|
|
914
|
+
/* @__PURE__ */ m(Xe, { icon: h ? "circle-exclamation" : "circle-info" }),
|
|
915
|
+
h || _
|
|
909
916
|
]
|
|
910
917
|
}
|
|
911
918
|
) })
|
|
@@ -913,8 +920,10 @@ const Ct = (n) => {
|
|
|
913
920
|
}
|
|
914
921
|
);
|
|
915
922
|
};
|
|
916
|
-
|
|
923
|
+
St.Option = _t;
|
|
917
924
|
export {
|
|
918
|
-
|
|
919
|
-
|
|
925
|
+
St as Select,
|
|
926
|
+
He as SelectContext,
|
|
927
|
+
_t as SelectOption,
|
|
928
|
+
Rt as useSelectContext
|
|
920
929
|
};
|