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