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