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