@pismo/marola 1.0.0-beta.24 → 1.0.0-beta.27
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-BlVl6pJn.js +70 -0
- package/dist/assets/Autocomplete.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +324 -305
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +23 -17
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/Select.js +179 -169
- package/dist/components/Select/SelectButton.d.ts +1 -0
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
- package/dist/components/TextDisplay/TextDisplay.js +31 -31
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -1
- package/package.json +1 -1
- package/dist/SelectButton-oWzluvmj.js +0 -63
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as g, jsxs as Re } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { useId as ze } from "react";
|
|
4
4
|
import { c as ne } from "../../clsx-DB4S2d7J.js";
|
|
5
5
|
import { Typography as Ve } from "../Typography/Typography.js";
|
|
6
|
-
import { s as
|
|
6
|
+
import { s as w, S as We } from "../../SelectButton-BlVl6pJn.js";
|
|
7
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
8
|
import { u as Je, c as re, a as _e, L as Q } from "../../combineHooksSlotProps-C-zYvfnF.js";
|
|
9
9
|
import { u as Te } from "../../useButton-DcihopJG.js";
|
|
@@ -41,39 +41,39 @@ function st(n) {
|
|
|
41
41
|
} = Je({
|
|
42
42
|
item: o
|
|
43
43
|
}), {
|
|
44
|
-
getRootProps:
|
|
45
|
-
rootRef:
|
|
44
|
+
getRootProps: C,
|
|
45
|
+
rootRef: O
|
|
46
46
|
} = Te({
|
|
47
47
|
disabled: c,
|
|
48
48
|
focusableWhenDisabled: !0
|
|
49
|
-
}),
|
|
49
|
+
}), h = Le(u), P = s.useRef(null), v = s.useMemo(() => ({
|
|
50
50
|
disabled: c,
|
|
51
51
|
label: a,
|
|
52
52
|
value: o,
|
|
53
|
-
ref:
|
|
54
|
-
id:
|
|
55
|
-
}), [c, a, o,
|
|
56
|
-
index:
|
|
57
|
-
} = Ge(o,
|
|
58
|
-
var
|
|
59
|
-
(
|
|
53
|
+
ref: P,
|
|
54
|
+
id: h
|
|
55
|
+
}), [c, a, o, h]), {
|
|
56
|
+
index: y
|
|
57
|
+
} = Ge(o, v), R = X(r, P, O), I = (b) => (_) => {
|
|
58
|
+
var S;
|
|
59
|
+
(S = b.onKeyDown) == null || S.call(b, _), !_.defaultMuiPrevented && [" ", "Enter"].includes(_.key) && (_.defaultMuiPrevented = !0);
|
|
60
60
|
}, B = (b = {}) => ({
|
|
61
|
-
onKeyDown:
|
|
61
|
+
onKeyDown: I(b)
|
|
62
62
|
});
|
|
63
63
|
return {
|
|
64
64
|
getRootProps: (b = {}) => {
|
|
65
|
-
const
|
|
66
|
-
return m({}, b,
|
|
67
|
-
id:
|
|
68
|
-
ref:
|
|
65
|
+
const _ = le(b), S = re(p, re(C, B));
|
|
66
|
+
return m({}, b, _, S(_), {
|
|
67
|
+
id: h,
|
|
68
|
+
ref: R,
|
|
69
69
|
role: "option",
|
|
70
70
|
"aria-selected": d
|
|
71
71
|
});
|
|
72
72
|
},
|
|
73
73
|
highlighted: f,
|
|
74
|
-
index:
|
|
74
|
+
index: y,
|
|
75
75
|
selected: d,
|
|
76
|
-
rootRef:
|
|
76
|
+
rootRef: R
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
function rt(n) {
|
|
@@ -87,8 +87,8 @@ function rt(n) {
|
|
|
87
87
|
highlighted: r,
|
|
88
88
|
selected: u,
|
|
89
89
|
focusable: p
|
|
90
|
-
} = a(n), f = s.useCallback((
|
|
91
|
-
if (
|
|
90
|
+
} = a(n), f = s.useCallback((C) => {
|
|
91
|
+
if (C !== n)
|
|
92
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"));
|
|
93
93
|
return {
|
|
94
94
|
highlighted: r,
|
|
@@ -121,32 +121,32 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
121
121
|
disabled: p = !1,
|
|
122
122
|
label: f,
|
|
123
123
|
slotProps: d = {},
|
|
124
|
-
slots:
|
|
125
|
-
value:
|
|
126
|
-
} = o,
|
|
127
|
-
getRootProps:
|
|
124
|
+
slots: C = {},
|
|
125
|
+
value: O
|
|
126
|
+
} = o, h = ke(o, it), P = (c = C.root) != null ? c : "li", v = s.useRef(null), y = X(v, a), R = f ?? (typeof u == "string" ? u : (r = v.current) == null || (r = r.textContent) == null ? void 0 : r.trim()), {
|
|
127
|
+
getRootProps: I,
|
|
128
128
|
selected: B,
|
|
129
129
|
highlighted: b,
|
|
130
|
-
index:
|
|
130
|
+
index: _
|
|
131
131
|
} = st({
|
|
132
132
|
disabled: p,
|
|
133
|
-
label:
|
|
134
|
-
rootRef:
|
|
135
|
-
value:
|
|
136
|
-
}),
|
|
133
|
+
label: R,
|
|
134
|
+
rootRef: y,
|
|
135
|
+
value: O
|
|
136
|
+
}), S = m({}, o, {
|
|
137
137
|
disabled: p,
|
|
138
138
|
highlighted: b,
|
|
139
|
-
index:
|
|
139
|
+
index: _,
|
|
140
140
|
selected: B
|
|
141
|
-
}), j = at(
|
|
142
|
-
getSlotProps:
|
|
143
|
-
elementType:
|
|
141
|
+
}), j = at(S), k = se({
|
|
142
|
+
getSlotProps: I,
|
|
143
|
+
elementType: P,
|
|
144
144
|
externalSlotProps: d.root,
|
|
145
|
-
externalForwardedProps:
|
|
145
|
+
externalForwardedProps: h,
|
|
146
146
|
className: j.root,
|
|
147
|
-
ownerState:
|
|
147
|
+
ownerState: S
|
|
148
148
|
});
|
|
149
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ g(P, m({}, k, {
|
|
150
150
|
children: u
|
|
151
151
|
}));
|
|
152
152
|
})), Be = /* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
@@ -155,9 +155,9 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
155
155
|
} = o, {
|
|
156
156
|
contextValue: r
|
|
157
157
|
} = rt(c);
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ g(_e.Provider, {
|
|
159
159
|
value: r,
|
|
160
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ g(ut, m({}, o, {
|
|
161
161
|
ref: a
|
|
162
162
|
}))
|
|
163
163
|
});
|
|
@@ -286,18 +286,18 @@ function pt(n) {
|
|
|
286
286
|
listboxId: p,
|
|
287
287
|
listboxRef: f,
|
|
288
288
|
multiple: d = !1,
|
|
289
|
-
name:
|
|
290
|
-
required:
|
|
291
|
-
onChange:
|
|
292
|
-
onHighlightChange:
|
|
293
|
-
onOpenChange:
|
|
294
|
-
open:
|
|
295
|
-
options:
|
|
296
|
-
getOptionAsString:
|
|
289
|
+
name: C,
|
|
290
|
+
required: O,
|
|
291
|
+
onChange: h,
|
|
292
|
+
onHighlightChange: P,
|
|
293
|
+
onOpenChange: v,
|
|
294
|
+
open: y,
|
|
295
|
+
options: R,
|
|
296
|
+
getOptionAsString: I = Ee,
|
|
297
297
|
getSerializedValue: B = dt,
|
|
298
298
|
value: b,
|
|
299
|
-
componentName:
|
|
300
|
-
} = n,
|
|
299
|
+
componentName: _ = "useSelect"
|
|
300
|
+
} = n, S = s.useRef(null), j = X(a, S), k = s.useRef(null), H = Le(p);
|
|
301
301
|
let E;
|
|
302
302
|
b === void 0 && r === void 0 ? E = [] : r !== void 0 && (d ? E = r : E = r == null ? [] : [r]);
|
|
303
303
|
const Y = s.useMemo(() => {
|
|
@@ -306,13 +306,13 @@ function pt(n) {
|
|
|
306
306
|
}, [b, d]), {
|
|
307
307
|
subitems: L,
|
|
308
308
|
contextValue: F
|
|
309
|
-
} = Qe(),
|
|
309
|
+
} = Qe(), N = s.useMemo(() => R != null ? new Map(R.map((e, t) => [e.value, {
|
|
310
310
|
value: e.value,
|
|
311
311
|
label: e.label,
|
|
312
312
|
disabled: e.disabled,
|
|
313
313
|
ref: /* @__PURE__ */ s.createRef(),
|
|
314
314
|
id: `${H}_${t}`
|
|
315
|
-
}])) : L, [
|
|
315
|
+
}])) : L, [R, L, H]), ae = X(f, k), {
|
|
316
316
|
getRootProps: Z,
|
|
317
317
|
active: ue,
|
|
318
318
|
focusVisible: ce,
|
|
@@ -320,40 +320,40 @@ function pt(n) {
|
|
|
320
320
|
} = Te({
|
|
321
321
|
disabled: u,
|
|
322
322
|
rootRef: j
|
|
323
|
-
}), q = s.useMemo(() => Array.from(
|
|
323
|
+
}), q = s.useMemo(() => Array.from(N.keys()), [N]), V = s.useCallback((e) => {
|
|
324
324
|
if (o !== void 0) {
|
|
325
325
|
const t = q.find((i) => o(i, e));
|
|
326
|
-
return
|
|
326
|
+
return N.get(t);
|
|
327
327
|
}
|
|
328
|
-
return
|
|
329
|
-
}, [
|
|
328
|
+
return N.get(e);
|
|
329
|
+
}, [N, o, q]), ee = s.useCallback((e) => {
|
|
330
330
|
var t;
|
|
331
|
-
const i =
|
|
331
|
+
const i = V(e);
|
|
332
332
|
return (t = i == null ? void 0 : i.disabled) != null ? t : !1;
|
|
333
|
-
}, [
|
|
334
|
-
const t =
|
|
335
|
-
return t ?
|
|
336
|
-
}, [
|
|
333
|
+
}, [V]), te = s.useCallback((e) => {
|
|
334
|
+
const t = V(e);
|
|
335
|
+
return t ? I(t) : "";
|
|
336
|
+
}, [V, I]), de = s.useMemo(() => ({
|
|
337
337
|
selectedValues: Y,
|
|
338
|
-
open:
|
|
339
|
-
}), [Y,
|
|
338
|
+
open: y
|
|
339
|
+
}), [Y, y]), pe = s.useCallback((e) => {
|
|
340
340
|
var t;
|
|
341
|
-
return (t =
|
|
342
|
-
}, [
|
|
341
|
+
return (t = N.get(e)) == null ? void 0 : t.id;
|
|
342
|
+
}, [N]), fe = s.useCallback((e, t) => {
|
|
343
343
|
if (d)
|
|
344
|
-
|
|
344
|
+
h == null || h(e, t);
|
|
345
345
|
else {
|
|
346
346
|
var i;
|
|
347
|
-
|
|
347
|
+
h == null || h(e, (i = t[0]) != null ? i : null);
|
|
348
348
|
}
|
|
349
|
-
}, [d,
|
|
350
|
-
|
|
351
|
-
}, [
|
|
352
|
-
if (t === "open" && (
|
|
353
|
-
var
|
|
354
|
-
(
|
|
349
|
+
}, [d, h]), be = s.useCallback((e, t) => {
|
|
350
|
+
P == null || P(e, t ?? null);
|
|
351
|
+
}, [P]), me = s.useCallback((e, t, i) => {
|
|
352
|
+
if (t === "open" && (v == null || v(i), i === !1 && (e == null ? void 0 : e.type) !== "blur")) {
|
|
353
|
+
var x;
|
|
354
|
+
(x = S.current) == null || x.focus();
|
|
355
355
|
}
|
|
356
|
-
}, [
|
|
356
|
+
}, [v]), ge = s.useCallback((e) => {
|
|
357
357
|
var t, i;
|
|
358
358
|
return e == null ? null : (t = (i = L.get(e)) == null ? void 0 : i.ref.current) != null ? t : null;
|
|
359
359
|
}, [L]), he = {
|
|
@@ -382,39 +382,39 @@ function pt(n) {
|
|
|
382
382
|
getItemAsString: te,
|
|
383
383
|
selectionMode: d ? "multiple" : "single",
|
|
384
384
|
stateReducer: ct,
|
|
385
|
-
componentName:
|
|
385
|
+
componentName: _
|
|
386
386
|
}, {
|
|
387
387
|
dispatch: D,
|
|
388
388
|
getRootProps: xe,
|
|
389
389
|
contextValue: K,
|
|
390
390
|
state: {
|
|
391
|
-
open:
|
|
391
|
+
open: M,
|
|
392
392
|
highlightedValue: A,
|
|
393
|
-
selectedValues:
|
|
393
|
+
selectedValues: T
|
|
394
394
|
},
|
|
395
395
|
rootRef: z
|
|
396
|
-
} = tt(he), Ce = s.useRef(
|
|
396
|
+
} = tt(he), Ce = s.useRef(M);
|
|
397
397
|
ot(() => {
|
|
398
|
-
if (
|
|
398
|
+
if (M && A !== null) {
|
|
399
399
|
var e;
|
|
400
|
-
const t = (e =
|
|
401
|
-
if (!
|
|
400
|
+
const t = (e = V(A)) == null ? void 0 : e.ref;
|
|
401
|
+
if (!k.current || !(t != null && t.current))
|
|
402
402
|
return;
|
|
403
403
|
Ce.current || t.current.focus({
|
|
404
404
|
preventScroll: !0
|
|
405
405
|
});
|
|
406
|
-
const i =
|
|
407
|
-
|
|
406
|
+
const i = k.current.getBoundingClientRect(), x = t.current.getBoundingClientRect();
|
|
407
|
+
x.top < i.top ? k.current.scrollTop -= i.top - x.top : x.bottom > i.bottom && (k.current.scrollTop += x.bottom - i.bottom);
|
|
408
408
|
}
|
|
409
|
-
}, [
|
|
410
|
-
const W = s.useCallback((e) =>
|
|
409
|
+
}, [M, A, V]);
|
|
410
|
+
const W = s.useCallback((e) => V(e), [V]), Pe = (e) => (t) => {
|
|
411
411
|
var i;
|
|
412
412
|
if (e == null || (i = e.onClick) == null || i.call(e, t), !t.defaultMuiPrevented) {
|
|
413
|
-
const
|
|
413
|
+
const x = {
|
|
414
414
|
type: ie.buttonClick,
|
|
415
415
|
event: t
|
|
416
416
|
};
|
|
417
|
-
D(
|
|
417
|
+
D(x);
|
|
418
418
|
}
|
|
419
419
|
}, J = (e) => (t) => {
|
|
420
420
|
var i;
|
|
@@ -428,14 +428,14 @@ function pt(n) {
|
|
|
428
428
|
onKeyDown: J(e)
|
|
429
429
|
}), $ = (e = {}) => m({}, e, oe(e), {
|
|
430
430
|
role: "combobox",
|
|
431
|
-
"aria-expanded":
|
|
431
|
+
"aria-expanded": M,
|
|
432
432
|
"aria-controls": H
|
|
433
433
|
}), He = (e = {}) => {
|
|
434
434
|
const t = le(e), i = re($, Z);
|
|
435
435
|
return m({}, e, i(t));
|
|
436
436
|
}, Fe = (e) => (t) => {
|
|
437
|
-
var i,
|
|
438
|
-
(i = e.onBlur) == null || i.call(e, t), !t.defaultMuiPrevented && ((
|
|
437
|
+
var i, x;
|
|
438
|
+
(i = e.onBlur) == null || i.call(e, t), !t.defaultMuiPrevented && ((x = k.current) != null && x.contains(t.relatedTarget) || t.relatedTarget === S.current) && (t.defaultMuiPrevented = !0);
|
|
439
439
|
}, qe = (e = {}) => ({
|
|
440
440
|
onBlur: Fe(e)
|
|
441
441
|
}), je = (e = {}) => {
|
|
@@ -447,13 +447,13 @@ function pt(n) {
|
|
|
447
447
|
}, e, i(t));
|
|
448
448
|
};
|
|
449
449
|
s.useDebugValue({
|
|
450
|
-
selectedOptions:
|
|
450
|
+
selectedOptions: T,
|
|
451
451
|
highlightedOption: A,
|
|
452
|
-
open:
|
|
452
|
+
open: M
|
|
453
453
|
});
|
|
454
454
|
const Ue = s.useMemo(() => m({}, K, F), [K, F]);
|
|
455
455
|
let G;
|
|
456
|
-
n.multiple ? G =
|
|
456
|
+
n.multiple ? G = T : G = T.length > 0 ? T[0] : null;
|
|
457
457
|
let ve;
|
|
458
458
|
if (d)
|
|
459
459
|
ve = G.map((e) => W(e)).filter((e) => e !== void 0);
|
|
@@ -465,12 +465,12 @@ function pt(n) {
|
|
|
465
465
|
var i;
|
|
466
466
|
if (e == null || (i = e.onChange) == null || i.call(e, t), t.defaultMuiPrevented)
|
|
467
467
|
return;
|
|
468
|
-
const
|
|
468
|
+
const x = N.get(t.target.value);
|
|
469
469
|
t.target.value === "" ? D({
|
|
470
470
|
type: Q.clearSelection
|
|
471
|
-
}) :
|
|
471
|
+
}) : x !== void 0 && D({
|
|
472
472
|
type: ie.browserAutoFill,
|
|
473
|
-
item:
|
|
473
|
+
item: x.value,
|
|
474
474
|
event: t
|
|
475
475
|
});
|
|
476
476
|
};
|
|
@@ -485,10 +485,10 @@ function pt(n) {
|
|
|
485
485
|
getHiddenInputProps: (e = {}) => {
|
|
486
486
|
const t = le(e);
|
|
487
487
|
return m({
|
|
488
|
-
name:
|
|
488
|
+
name: C,
|
|
489
489
|
tabIndex: -1,
|
|
490
490
|
"aria-hidden": !0,
|
|
491
|
-
required:
|
|
491
|
+
required: O ? !0 : void 0,
|
|
492
492
|
value: B(ve),
|
|
493
493
|
style: nt
|
|
494
494
|
}, e, {
|
|
@@ -498,7 +498,7 @@ function pt(n) {
|
|
|
498
498
|
getListboxProps: je,
|
|
499
499
|
getOptionMetadata: W,
|
|
500
500
|
listboxRef: z,
|
|
501
|
-
open:
|
|
501
|
+
open: M,
|
|
502
502
|
options: q,
|
|
503
503
|
value: G,
|
|
504
504
|
highlightedOption: A
|
|
@@ -518,14 +518,14 @@ function ft(n) {
|
|
|
518
518
|
dispatch: c,
|
|
519
519
|
getItemState: u,
|
|
520
520
|
getItemIndex: r
|
|
521
|
-
}), [c, r, u]),
|
|
521
|
+
}), [c, r, u]), C = s.useMemo(() => ({
|
|
522
522
|
getItemIndex: r,
|
|
523
523
|
registerItem: p,
|
|
524
524
|
totalSubitemCount: f
|
|
525
525
|
}), [p, r, f]);
|
|
526
|
-
return /* @__PURE__ */
|
|
527
|
-
value:
|
|
528
|
-
children: /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ g(Xe.Provider, {
|
|
527
|
+
value: C,
|
|
528
|
+
children: /* @__PURE__ */ g(_e.Provider, {
|
|
529
529
|
value: d,
|
|
530
530
|
children: a
|
|
531
531
|
})
|
|
@@ -540,7 +540,7 @@ var Oe;
|
|
|
540
540
|
const mt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
|
|
541
541
|
function gt(n) {
|
|
542
542
|
var o;
|
|
543
|
-
return Array.isArray(n) ? /* @__PURE__ */
|
|
543
|
+
return Array.isArray(n) ? /* @__PURE__ */ g(s.Fragment, {
|
|
544
544
|
children: n.map((a) => a.label).join(", ")
|
|
545
545
|
}) : (o = n == null ? void 0 : n.label) != null ? o : null;
|
|
546
546
|
}
|
|
@@ -561,32 +561,32 @@ const $e = /* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
561
561
|
var c, r, u, p, f;
|
|
562
562
|
const {
|
|
563
563
|
areOptionsEqual: d,
|
|
564
|
-
autoComplete:
|
|
565
|
-
autoFocus:
|
|
566
|
-
children:
|
|
567
|
-
defaultValue:
|
|
568
|
-
defaultListboxOpen:
|
|
569
|
-
disabled:
|
|
570
|
-
getSerializedValue:
|
|
571
|
-
listboxId:
|
|
564
|
+
autoComplete: C,
|
|
565
|
+
autoFocus: O,
|
|
566
|
+
children: h,
|
|
567
|
+
defaultValue: P,
|
|
568
|
+
defaultListboxOpen: v = !1,
|
|
569
|
+
disabled: y,
|
|
570
|
+
getSerializedValue: R,
|
|
571
|
+
listboxId: I,
|
|
572
572
|
listboxOpen: B,
|
|
573
573
|
multiple: b = !1,
|
|
574
|
-
name:
|
|
575
|
-
required:
|
|
574
|
+
name: _,
|
|
575
|
+
required: S = !1,
|
|
576
576
|
onChange: j,
|
|
577
|
-
onListboxOpenChange:
|
|
577
|
+
onListboxOpenChange: k,
|
|
578
578
|
getOptionAsString: H = Ee,
|
|
579
579
|
renderValue: E,
|
|
580
580
|
placeholder: Y,
|
|
581
581
|
slotProps: L = {},
|
|
582
582
|
slots: F = {},
|
|
583
|
-
value:
|
|
584
|
-
} = o, ae = ke(o, mt), Z = E ?? gt, [ue, ce] = s.useState(!1), U = s.useRef(null), q = s.useRef(null),
|
|
583
|
+
value: N
|
|
584
|
+
} = o, ae = ke(o, mt), Z = E ?? gt, [ue, ce] = s.useState(!1), U = s.useRef(null), q = s.useRef(null), V = (c = F.root) != null ? c : "button", ee = (r = F.listbox) != null ? r : "ul", te = (u = F.popup) != null ? u : "div", de = s.useCallback(($) => {
|
|
585
585
|
ce($ != null);
|
|
586
586
|
}, []), pe = X(a, U, de);
|
|
587
587
|
s.useEffect(() => {
|
|
588
|
-
|
|
589
|
-
}, [
|
|
588
|
+
O && U.current.focus();
|
|
589
|
+
}, [O]);
|
|
590
590
|
const {
|
|
591
591
|
buttonActive: fe,
|
|
592
592
|
buttonFocusVisible: be,
|
|
@@ -596,40 +596,40 @@ const $e = /* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
596
596
|
getListboxProps: D,
|
|
597
597
|
getHiddenInputProps: xe,
|
|
598
598
|
getOptionMetadata: K,
|
|
599
|
-
value:
|
|
599
|
+
value: M,
|
|
600
600
|
open: A
|
|
601
601
|
} = pt({
|
|
602
|
-
name:
|
|
603
|
-
required:
|
|
604
|
-
getSerializedValue:
|
|
602
|
+
name: _,
|
|
603
|
+
required: S,
|
|
604
|
+
getSerializedValue: R,
|
|
605
605
|
areOptionsEqual: d,
|
|
606
606
|
buttonRef: pe,
|
|
607
|
-
defaultOpen:
|
|
608
|
-
defaultValue:
|
|
609
|
-
disabled:
|
|
610
|
-
listboxId:
|
|
607
|
+
defaultOpen: v,
|
|
608
|
+
defaultValue: P,
|
|
609
|
+
disabled: y,
|
|
610
|
+
listboxId: I,
|
|
611
611
|
multiple: b,
|
|
612
612
|
open: B,
|
|
613
613
|
onChange: j,
|
|
614
|
-
onOpenChange:
|
|
614
|
+
onOpenChange: k,
|
|
615
615
|
getOptionAsString: H,
|
|
616
|
-
value:
|
|
616
|
+
value: N,
|
|
617
617
|
componentName: "Select"
|
|
618
|
-
}),
|
|
618
|
+
}), T = m({}, o, {
|
|
619
619
|
active: fe,
|
|
620
|
-
defaultListboxOpen:
|
|
620
|
+
defaultListboxOpen: v,
|
|
621
621
|
disabled: ge,
|
|
622
622
|
focusVisible: be,
|
|
623
623
|
open: A,
|
|
624
624
|
multiple: b,
|
|
625
625
|
renderValue: Z,
|
|
626
|
-
value:
|
|
627
|
-
}), z = ht(
|
|
628
|
-
elementType:
|
|
626
|
+
value: M
|
|
627
|
+
}), z = ht(T), Ce = se({
|
|
628
|
+
elementType: V,
|
|
629
629
|
getSlotProps: he,
|
|
630
630
|
externalSlotProps: L.root,
|
|
631
631
|
externalForwardedProps: ae,
|
|
632
|
-
ownerState:
|
|
632
|
+
ownerState: T,
|
|
633
633
|
className: z.root
|
|
634
634
|
}), W = se({
|
|
635
635
|
elementType: ee,
|
|
@@ -638,7 +638,7 @@ const $e = /* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
638
638
|
additionalProps: {
|
|
639
639
|
ref: q
|
|
640
640
|
},
|
|
641
|
-
ownerState:
|
|
641
|
+
ownerState: T,
|
|
642
642
|
className: z.listbox
|
|
643
643
|
}), Pe = se({
|
|
644
644
|
elementType: te,
|
|
@@ -650,39 +650,39 @@ const $e = /* @__PURE__ */ s.forwardRef(function(o, a) {
|
|
|
650
650
|
placement: "bottom-start",
|
|
651
651
|
role: void 0
|
|
652
652
|
},
|
|
653
|
-
ownerState:
|
|
653
|
+
ownerState: T,
|
|
654
654
|
className: z.popup
|
|
655
655
|
});
|
|
656
656
|
let J;
|
|
657
657
|
if (b)
|
|
658
|
-
J =
|
|
658
|
+
J = M.map(($) => K($)).filter(($) => $ !== void 0);
|
|
659
659
|
else {
|
|
660
660
|
var oe;
|
|
661
|
-
J = (oe = K(
|
|
661
|
+
J = (oe = K(M)) != null ? oe : null;
|
|
662
662
|
}
|
|
663
663
|
return /* @__PURE__ */ Re(s.Fragment, {
|
|
664
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ g(V, m({}, Ce, {
|
|
665
665
|
children: (p = (f = Z(J)) != null ? f : Y) != null ? p : (
|
|
666
666
|
// fall back to a zero-width space to prevent layout shift
|
|
667
667
|
// from https://github.com/mui/material-ui/pull/24563
|
|
668
|
-
Oe || (Oe = /* @__PURE__ */
|
|
668
|
+
Oe || (Oe = /* @__PURE__ */ g("span", {
|
|
669
669
|
className: "notranslate",
|
|
670
670
|
children: ""
|
|
671
671
|
}))
|
|
672
672
|
)
|
|
673
|
-
})), ue && /* @__PURE__ */
|
|
673
|
+
})), ue && /* @__PURE__ */ g(Ye, m({
|
|
674
674
|
slots: {
|
|
675
675
|
root: te
|
|
676
676
|
}
|
|
677
677
|
}, Pe, {
|
|
678
|
-
children: /* @__PURE__ */
|
|
679
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ g(ee, m({}, W, {
|
|
679
|
+
children: /* @__PURE__ */ g(ft, {
|
|
680
680
|
value: me,
|
|
681
|
-
children:
|
|
681
|
+
children: h
|
|
682
682
|
})
|
|
683
683
|
}))
|
|
684
|
-
})), /* @__PURE__ */
|
|
685
|
-
autoComplete:
|
|
684
|
+
})), /* @__PURE__ */ g("input", m({}, xe(), {
|
|
685
|
+
autoComplete: C
|
|
686
686
|
}))]
|
|
687
687
|
});
|
|
688
688
|
});
|
|
@@ -821,15 +821,15 @@ const xt = (n) => {
|
|
|
821
821
|
...r,
|
|
822
822
|
slotProps: {
|
|
823
823
|
root: (u) => ({
|
|
824
|
-
className: ne(
|
|
825
|
-
[
|
|
826
|
-
[
|
|
824
|
+
className: ne(w.select__listbox__option, c, {
|
|
825
|
+
[w["select__listbox__option--disabled"]]: u.disabled,
|
|
826
|
+
[w["select__listbox__option--selected"]]: u.selected
|
|
827
827
|
})
|
|
828
828
|
})
|
|
829
829
|
},
|
|
830
830
|
children: [
|
|
831
|
-
a ? /* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
831
|
+
a ? /* @__PURE__ */ g("span", { className: w.select__listbox__option__icon, children: a }) : "",
|
|
832
|
+
/* @__PURE__ */ g(Ve, { className: w.select__listbox__option__text, children: o })
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
);
|
|
@@ -843,39 +843,49 @@ const xt = (n) => {
|
|
|
843
843
|
classNameWrapper: p,
|
|
844
844
|
classNameLabel: f,
|
|
845
845
|
testIdLabel: d,
|
|
846
|
-
testIdWrapper:
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
846
|
+
testIdWrapper: C,
|
|
847
|
+
fullWidth: O = !0,
|
|
848
|
+
...h
|
|
849
|
+
} = n, P = (R, I) => {
|
|
850
|
+
R && (r == null || r(I, R));
|
|
851
|
+
}, v = ze(), y = c || `select_${v}`;
|
|
851
852
|
return /* @__PURE__ */ Re(
|
|
852
853
|
"div",
|
|
853
854
|
{
|
|
854
|
-
className: ne(
|
|
855
|
-
|
|
856
|
-
|
|
855
|
+
className: ne(
|
|
856
|
+
w.select__wrapper,
|
|
857
|
+
!O && w["select__wrapper--fit-content-width"],
|
|
858
|
+
p
|
|
859
|
+
),
|
|
860
|
+
"data-testid": C,
|
|
861
|
+
id: `${y}_wrapper`,
|
|
857
862
|
children: [
|
|
858
|
-
u && /* @__PURE__ */
|
|
863
|
+
u && /* @__PURE__ */ g(
|
|
859
864
|
Ve,
|
|
860
865
|
{
|
|
861
866
|
element: "label",
|
|
862
|
-
elementProps: { htmlFor:
|
|
863
|
-
className: ne(
|
|
867
|
+
elementProps: { htmlFor: y, id: `${y}_label` },
|
|
868
|
+
className: ne(w.select__label, f),
|
|
864
869
|
"data-testid": d,
|
|
865
870
|
children: u
|
|
866
871
|
}
|
|
867
872
|
),
|
|
868
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ g(
|
|
869
874
|
$e,
|
|
870
875
|
{
|
|
871
|
-
...
|
|
872
|
-
id:
|
|
873
|
-
onChange:
|
|
874
|
-
className: ne(
|
|
876
|
+
...h,
|
|
877
|
+
id: y,
|
|
878
|
+
onChange: P,
|
|
879
|
+
className: ne(w.select, a),
|
|
875
880
|
slots: { root: We },
|
|
876
881
|
slotProps: {
|
|
877
|
-
|
|
878
|
-
|
|
882
|
+
root: { fullWidth: O },
|
|
883
|
+
listbox: { className: w.select__listbox },
|
|
884
|
+
popup: {
|
|
885
|
+
className: w.select__popup,
|
|
886
|
+
disablePortal: !0,
|
|
887
|
+
strategy: "absolute"
|
|
888
|
+
}
|
|
879
889
|
},
|
|
880
890
|
children: o
|
|
881
891
|
}
|
|
@@ -8,5 +8,6 @@ export interface SelectButtonProps {
|
|
|
8
8
|
prefix?: string;
|
|
9
9
|
'data-testid'?: string;
|
|
10
10
|
onClick: () => void;
|
|
11
|
+
fullWidth?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const SelectButton: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-DB4S2d7J.js";
|
|
4
4
|
import "../Typography/Typography.js";
|
|
5
|
-
import { S as e } from "../../SelectButton-
|
|
5
|
+
import { S as e } from "../../SelectButton-BlVl6pJn.js";
|
|
6
6
|
export {
|
|
7
7
|
e as SelectButton
|
|
8
8
|
};
|