@pismo/marola 0.0.1-alpha.17 → 0.0.1-alpha.18
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/{Button-CSuug0jG.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-hSFuUJnv.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
- package/dist/{Popup-DwaWJ3ye.js → Popup-B6ZSGIEI.js} +12 -13
- package/dist/{Portal-CGBQMhI6.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/TextDisplay.css +1 -0
- package/dist/{combineHooksSlotProps-D8j4htsd.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +15 -16
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Icon/Icon.d.ts +10 -1
- package/dist/components/Icon/Icon.js +39 -25
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +14 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +25 -26
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +119 -116
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.js +137 -138
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +12 -15
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.js +6 -7
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +27 -16
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.js +38 -40
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +9 -10
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +13 -14
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +36 -37
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +7 -8
- package/dist/components/Tooltip/Tooltip.d.ts +18 -6
- package/dist/components/Tooltip/Tooltip.js +104 -92
- package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/components/Typography/Typography.js +40 -29
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/{index-CtPvew6C.js → index-CH45lKw7.js} +310 -287
- package/dist/{index-BfeM9yWx.js → index-CjW42-M-.js} +5 -6
- package/dist/main.d.ts +1 -0
- package/dist/main.js +28 -26
- package/dist/{useButton-DSAvAfH_.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/{useEventCallback-lXNMsMLa.js → useEventCallback-xTG9piMa.js} +1 -1
- package/dist/{useList-C5PBIv2I.js → useList-B0hog_3-.js} +48 -49
- package/package.json +1 -1
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx as h, jsxs as Oe } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as _e } from "../../clsx-DB4S2d7J.js";
|
|
3
3
|
import { Typography as Ke } from "../Typography/Typography.js";
|
|
4
|
-
import { s as
|
|
5
|
-
import { a as g, _ as
|
|
4
|
+
import { s as L, S as ze } from "../../SelectButton-pciwIWcj.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 "../../index-CH45lKw7.js";
|
|
6
6
|
import * as s from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as Ne } from "../../useButton-DSAvAfH_.js";
|
|
7
|
+
import { u as Je, c as se, a as ye, L as Q } from "../../combineHooksSlotProps-DVjg9PRh.js";
|
|
8
|
+
import { u as Me } from "../../useButton-DNk3wrQp.js";
|
|
10
9
|
import { u as Te, a as We, b as Ge, C as Qe } from "../../useCompoundItem-D1iRfg8D.js";
|
|
11
|
-
import { P as Xe } from "../../Popup-
|
|
12
|
-
import { m as ve, h as Ye, l as Ze, u as et } from "../../useList-
|
|
10
|
+
import { P as Xe } from "../../Popup-B6ZSGIEI.js";
|
|
11
|
+
import { m as ve, h as Ye, l as Ze, u as et } from "../../useList-B0hog_3-.js";
|
|
13
12
|
import { u as tt } from "../../useEnhancedEffect-CJGo-L3B.js";
|
|
14
13
|
const ot = {
|
|
15
14
|
border: 0,
|
|
@@ -23,13 +22,13 @@ const ot = {
|
|
|
23
22
|
width: "1px"
|
|
24
23
|
}, Ae = "Option";
|
|
25
24
|
function nt(n) {
|
|
26
|
-
return
|
|
25
|
+
return Ve(Ae, n);
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
we(Ae, ["root", "disabled", "selected", "highlighted"]);
|
|
29
28
|
function lt(n) {
|
|
30
29
|
const {
|
|
31
30
|
value: o,
|
|
32
|
-
label:
|
|
31
|
+
label: i,
|
|
33
32
|
disabled: a,
|
|
34
33
|
rootRef: r,
|
|
35
34
|
id: c
|
|
@@ -42,26 +41,26 @@ function lt(n) {
|
|
|
42
41
|
}), {
|
|
43
42
|
getRootProps: v,
|
|
44
43
|
rootRef: I
|
|
45
|
-
} =
|
|
44
|
+
} = Me({
|
|
46
45
|
disabled: a,
|
|
47
46
|
focusableWhenDisabled: !0
|
|
48
47
|
}), x = Te(c), y = s.useRef(null), R = s.useMemo(() => ({
|
|
49
48
|
disabled: a,
|
|
50
|
-
label:
|
|
49
|
+
label: i,
|
|
51
50
|
value: o,
|
|
52
51
|
ref: y,
|
|
53
52
|
id: x
|
|
54
|
-
}), [a,
|
|
55
|
-
index:
|
|
56
|
-
} = We(o, R), O = X(r, y, I),
|
|
53
|
+
}), [a, i, o, x]), {
|
|
54
|
+
index: N
|
|
55
|
+
} = We(o, R), O = X(r, y, I), M = (b) => (C) => {
|
|
57
56
|
var P;
|
|
58
57
|
(P = b.onKeyDown) == null || P.call(b, C), !C.defaultMuiPrevented && [" ", "Enter"].includes(C.key) && (C.defaultMuiPrevented = !0);
|
|
59
|
-
},
|
|
60
|
-
onKeyDown:
|
|
58
|
+
}, B = (b = {}) => ({
|
|
59
|
+
onKeyDown: M(b)
|
|
61
60
|
});
|
|
62
61
|
return {
|
|
63
62
|
getRootProps: (b = {}) => {
|
|
64
|
-
const C = ne(b), P = se(p, se(v,
|
|
63
|
+
const C = ne(b), P = se(p, se(v, B));
|
|
65
64
|
return g({}, b, C, P(C), {
|
|
66
65
|
id: x,
|
|
67
66
|
ref: O,
|
|
@@ -70,7 +69,7 @@ function lt(n) {
|
|
|
70
69
|
});
|
|
71
70
|
},
|
|
72
71
|
highlighted: f,
|
|
73
|
-
index:
|
|
72
|
+
index: N,
|
|
74
73
|
selected: d,
|
|
75
74
|
rootRef: O
|
|
76
75
|
};
|
|
@@ -80,13 +79,13 @@ function st(n) {
|
|
|
80
79
|
if (!o)
|
|
81
80
|
throw new Error("Option: ListContext was not found.");
|
|
82
81
|
const {
|
|
83
|
-
getItemState:
|
|
82
|
+
getItemState: i,
|
|
84
83
|
dispatch: a
|
|
85
84
|
} = o, {
|
|
86
85
|
highlighted: r,
|
|
87
86
|
selected: c,
|
|
88
87
|
focusable: p
|
|
89
|
-
} =
|
|
88
|
+
} = i(n), f = s.useCallback((v) => {
|
|
90
89
|
if (v !== n)
|
|
91
90
|
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
91
|
return {
|
|
@@ -103,17 +102,17 @@ function st(n) {
|
|
|
103
102
|
};
|
|
104
103
|
}
|
|
105
104
|
const rt = ["children", "disabled", "label", "slotProps", "slots", "value"];
|
|
106
|
-
function
|
|
105
|
+
function ut(n) {
|
|
107
106
|
const {
|
|
108
107
|
disabled: o,
|
|
109
|
-
highlighted:
|
|
108
|
+
highlighted: i,
|
|
110
109
|
selected: a
|
|
111
110
|
} = n;
|
|
112
111
|
return Ie({
|
|
113
|
-
root: ["root", o && "disabled",
|
|
114
|
-
},
|
|
112
|
+
root: ["root", o && "disabled", i && "highlighted", a && "selected"]
|
|
113
|
+
}, Ne(nt));
|
|
115
114
|
}
|
|
116
|
-
const
|
|
115
|
+
const it = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, i) {
|
|
117
116
|
var a, r;
|
|
118
117
|
const {
|
|
119
118
|
children: c,
|
|
@@ -122,33 +121,33 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
122
121
|
slotProps: d = {},
|
|
123
122
|
slots: v = {},
|
|
124
123
|
value: I
|
|
125
|
-
} = o, x =
|
|
126
|
-
getRootProps:
|
|
127
|
-
selected:
|
|
124
|
+
} = o, x = ke(o, rt), y = (a = v.root) != null ? a : "li", R = s.useRef(null), N = X(R, i), O = f ?? (typeof c == "string" ? c : (r = R.current) == null || (r = r.textContent) == null ? void 0 : r.trim()), {
|
|
125
|
+
getRootProps: M,
|
|
126
|
+
selected: B,
|
|
128
127
|
highlighted: b,
|
|
129
128
|
index: C
|
|
130
129
|
} = lt({
|
|
131
130
|
disabled: p,
|
|
132
131
|
label: O,
|
|
133
|
-
rootRef:
|
|
132
|
+
rootRef: N,
|
|
134
133
|
value: I
|
|
135
134
|
}), P = g({}, o, {
|
|
136
135
|
disabled: p,
|
|
137
136
|
highlighted: b,
|
|
138
137
|
index: C,
|
|
139
|
-
selected:
|
|
140
|
-
}), j =
|
|
141
|
-
getSlotProps:
|
|
138
|
+
selected: B
|
|
139
|
+
}), j = ut(P), _ = le({
|
|
140
|
+
getSlotProps: M,
|
|
142
141
|
elementType: y,
|
|
143
142
|
externalSlotProps: d.root,
|
|
144
143
|
externalForwardedProps: x,
|
|
145
144
|
className: j.root,
|
|
146
145
|
ownerState: P
|
|
147
146
|
});
|
|
148
|
-
return /* @__PURE__ */ h(y, g({},
|
|
147
|
+
return /* @__PURE__ */ h(y, g({}, _, {
|
|
149
148
|
children: c
|
|
150
149
|
}));
|
|
151
|
-
})), Le = /* @__PURE__ */ s.forwardRef(function(o,
|
|
150
|
+
})), Le = /* @__PURE__ */ s.forwardRef(function(o, i) {
|
|
152
151
|
const {
|
|
153
152
|
value: a
|
|
154
153
|
} = o, {
|
|
@@ -156,8 +155,8 @@ const ut = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
156
155
|
} = st(a);
|
|
157
156
|
return /* @__PURE__ */ h(ye.Provider, {
|
|
158
157
|
value: r,
|
|
159
|
-
children: /* @__PURE__ */ h(
|
|
160
|
-
ref:
|
|
158
|
+
children: /* @__PURE__ */ h(it, g({}, o, {
|
|
159
|
+
ref: i
|
|
161
160
|
}))
|
|
162
161
|
});
|
|
163
162
|
});
|
|
@@ -210,13 +209,13 @@ const re = {
|
|
|
210
209
|
}, Be = (n) => {
|
|
211
210
|
const {
|
|
212
211
|
label: o,
|
|
213
|
-
value:
|
|
212
|
+
value: i
|
|
214
213
|
} = n;
|
|
215
|
-
return typeof o == "string" ? o : typeof
|
|
214
|
+
return typeof o == "string" ? o : typeof i == "string" ? i : String(n);
|
|
216
215
|
};
|
|
217
216
|
function at(n, o) {
|
|
218
217
|
const {
|
|
219
|
-
open:
|
|
218
|
+
open: i
|
|
220
219
|
} = n, {
|
|
221
220
|
context: {
|
|
222
221
|
selectionMode: a
|
|
@@ -226,8 +225,8 @@ function at(n, o) {
|
|
|
226
225
|
var r;
|
|
227
226
|
const d = (r = n.selectedValues[0]) != null ? r : ve(null, "start", o.context);
|
|
228
227
|
return g({}, n, {
|
|
229
|
-
open: !
|
|
230
|
-
highlightedValue:
|
|
228
|
+
open: !i,
|
|
229
|
+
highlightedValue: i ? null : d
|
|
231
230
|
});
|
|
232
231
|
}
|
|
233
232
|
if (o.type === re.browserAutoFill)
|
|
@@ -278,7 +277,7 @@ function ct(n) {
|
|
|
278
277
|
function dt(n) {
|
|
279
278
|
const {
|
|
280
279
|
areOptionsEqual: o,
|
|
281
|
-
buttonRef:
|
|
280
|
+
buttonRef: i,
|
|
282
281
|
defaultOpen: a = !1,
|
|
283
282
|
defaultValue: r,
|
|
284
283
|
disabled: c = !1,
|
|
@@ -290,77 +289,77 @@ function dt(n) {
|
|
|
290
289
|
onChange: x,
|
|
291
290
|
onHighlightChange: y,
|
|
292
291
|
onOpenChange: R,
|
|
293
|
-
open:
|
|
292
|
+
open: N,
|
|
294
293
|
options: O,
|
|
295
|
-
getOptionAsString:
|
|
296
|
-
getSerializedValue:
|
|
294
|
+
getOptionAsString: M = Be,
|
|
295
|
+
getSerializedValue: B = ct,
|
|
297
296
|
value: b,
|
|
298
297
|
componentName: C = "useSelect"
|
|
299
|
-
} = n, P = s.useRef(null), j = X(
|
|
300
|
-
let
|
|
301
|
-
b === void 0 && r === void 0 ?
|
|
298
|
+
} = n, P = s.useRef(null), j = X(i, P), _ = s.useRef(null), $ = Te(p);
|
|
299
|
+
let E;
|
|
300
|
+
b === void 0 && r === void 0 ? E = [] : r !== void 0 && (d ? E = r : E = r == null ? [] : [r]);
|
|
302
301
|
const Y = s.useMemo(() => {
|
|
303
302
|
if (b !== void 0)
|
|
304
303
|
return d ? b : b == null ? [] : [b];
|
|
305
304
|
}, [b, d]), {
|
|
306
305
|
subitems: T,
|
|
307
306
|
contextValue: F
|
|
308
|
-
} = Ge(),
|
|
307
|
+
} = Ge(), V = s.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
|
|
309
308
|
value: e.value,
|
|
310
309
|
label: e.label,
|
|
311
310
|
disabled: e.disabled,
|
|
312
311
|
ref: /* @__PURE__ */ s.createRef(),
|
|
313
312
|
id: `${$}_${t}`
|
|
314
|
-
}])) : T, [O, T, $]),
|
|
313
|
+
}])) : T, [O, T, $]), ue = X(f, _), {
|
|
315
314
|
getRootProps: Z,
|
|
316
|
-
active:
|
|
315
|
+
active: ie,
|
|
317
316
|
focusVisible: ae,
|
|
318
317
|
rootRef: U
|
|
319
|
-
} =
|
|
318
|
+
} = Me({
|
|
320
319
|
disabled: c,
|
|
321
320
|
rootRef: j
|
|
322
|
-
}), q = s.useMemo(() => Array.from(
|
|
321
|
+
}), q = s.useMemo(() => Array.from(V.keys()), [V]), S = s.useCallback((e) => {
|
|
323
322
|
if (o !== void 0) {
|
|
324
|
-
const t = q.find((
|
|
325
|
-
return
|
|
323
|
+
const t = q.find((u) => o(u, e));
|
|
324
|
+
return V.get(t);
|
|
326
325
|
}
|
|
327
|
-
return
|
|
328
|
-
}, [
|
|
326
|
+
return V.get(e);
|
|
327
|
+
}, [V, o, q]), ee = s.useCallback((e) => {
|
|
329
328
|
var t;
|
|
330
|
-
const
|
|
331
|
-
return (t =
|
|
329
|
+
const u = S(e);
|
|
330
|
+
return (t = u == null ? void 0 : u.disabled) != null ? t : !1;
|
|
332
331
|
}, [S]), te = s.useCallback((e) => {
|
|
333
332
|
const t = S(e);
|
|
334
|
-
return t ?
|
|
335
|
-
}, [S,
|
|
333
|
+
return t ? M(t) : "";
|
|
334
|
+
}, [S, M]), ce = s.useMemo(() => ({
|
|
336
335
|
selectedValues: Y,
|
|
337
|
-
open:
|
|
338
|
-
}), [Y,
|
|
336
|
+
open: N
|
|
337
|
+
}), [Y, N]), de = s.useCallback((e) => {
|
|
339
338
|
var t;
|
|
340
|
-
return (t =
|
|
341
|
-
}, [
|
|
339
|
+
return (t = V.get(e)) == null ? void 0 : t.id;
|
|
340
|
+
}, [V]), pe = s.useCallback((e, t) => {
|
|
342
341
|
if (d)
|
|
343
342
|
x == null || x(e, t);
|
|
344
343
|
else {
|
|
345
|
-
var
|
|
346
|
-
x == null || x(e, (
|
|
344
|
+
var u;
|
|
345
|
+
x == null || x(e, (u = t[0]) != null ? u : null);
|
|
347
346
|
}
|
|
348
347
|
}, [d, x]), fe = s.useCallback((e, t) => {
|
|
349
348
|
y == null || y(e, t ?? null);
|
|
350
|
-
}, [y]), be = s.useCallback((e, t,
|
|
351
|
-
if (t === "open" && (R == null || R(
|
|
349
|
+
}, [y]), be = s.useCallback((e, t, u) => {
|
|
350
|
+
if (t === "open" && (R == null || R(u), u === !1 && (e == null ? void 0 : e.type) !== "blur")) {
|
|
352
351
|
var m;
|
|
353
352
|
(m = P.current) == null || m.focus();
|
|
354
353
|
}
|
|
355
354
|
}, [R]), ge = s.useCallback((e) => {
|
|
356
|
-
var t,
|
|
357
|
-
return e == null ? null : (t = (
|
|
355
|
+
var t, u;
|
|
356
|
+
return e == null ? null : (t = (u = T.get(e)) == null ? void 0 : u.ref.current) != null ? t : null;
|
|
358
357
|
}, [T]), me = {
|
|
359
358
|
getInitialState: () => {
|
|
360
359
|
var e;
|
|
361
360
|
return {
|
|
362
361
|
highlightedValue: null,
|
|
363
|
-
selectedValues: (e =
|
|
362
|
+
selectedValues: (e = E) != null ? e : [],
|
|
364
363
|
open: a
|
|
365
364
|
};
|
|
366
365
|
},
|
|
@@ -370,7 +369,7 @@ function dt(n) {
|
|
|
370
369
|
getItemDomElement: ge,
|
|
371
370
|
itemComparer: o,
|
|
372
371
|
isItemDisabled: ee,
|
|
373
|
-
rootRef:
|
|
372
|
+
rootRef: ue,
|
|
374
373
|
onChange: pe,
|
|
375
374
|
onHighlightChange: fe,
|
|
376
375
|
onStateChange: be,
|
|
@@ -383,7 +382,7 @@ function dt(n) {
|
|
|
383
382
|
stateReducer: at,
|
|
384
383
|
componentName: C
|
|
385
384
|
}, {
|
|
386
|
-
dispatch:
|
|
385
|
+
dispatch: D,
|
|
387
386
|
getRootProps: he,
|
|
388
387
|
contextValue: K,
|
|
389
388
|
state: {
|
|
@@ -397,27 +396,27 @@ function dt(n) {
|
|
|
397
396
|
if (w && A !== null) {
|
|
398
397
|
var e;
|
|
399
398
|
const t = (e = S(A)) == null ? void 0 : e.ref;
|
|
400
|
-
if (!
|
|
399
|
+
if (!_.current || !(t != null && t.current))
|
|
401
400
|
return;
|
|
402
401
|
xe.current || t.current.focus({
|
|
403
402
|
preventScroll: !0
|
|
404
403
|
});
|
|
405
|
-
const
|
|
406
|
-
m.top <
|
|
404
|
+
const u = _.current.getBoundingClientRect(), m = t.current.getBoundingClientRect();
|
|
405
|
+
m.top < u.top ? _.current.scrollTop -= u.top - m.top : m.bottom > u.bottom && (_.current.scrollTop += m.bottom - u.bottom);
|
|
407
406
|
}
|
|
408
407
|
}, [w, A, S]);
|
|
409
408
|
const J = s.useCallback((e) => S(e), [S]), Ce = (e) => (t) => {
|
|
410
|
-
var
|
|
411
|
-
if (e == null || (
|
|
409
|
+
var u;
|
|
410
|
+
if (e == null || (u = e.onClick) == null || u.call(e, t), !t.defaultMuiPrevented) {
|
|
412
411
|
const m = {
|
|
413
412
|
type: re.buttonClick,
|
|
414
413
|
event: t
|
|
415
414
|
};
|
|
416
|
-
|
|
415
|
+
D(m);
|
|
417
416
|
}
|
|
418
417
|
}, W = (e) => (t) => {
|
|
419
|
-
var
|
|
420
|
-
(
|
|
418
|
+
var u;
|
|
419
|
+
(u = e.onKeyDown) == null || u.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), D({
|
|
421
420
|
type: Q.keyDown,
|
|
422
421
|
key: t.key,
|
|
423
422
|
event: t
|
|
@@ -425,25 +424,25 @@ function dt(n) {
|
|
|
425
424
|
}, oe = (e = {}) => ({
|
|
426
425
|
onClick: Ce(e),
|
|
427
426
|
onKeyDown: W(e)
|
|
428
|
-
}),
|
|
427
|
+
}), H = (e = {}) => g({}, e, oe(e), {
|
|
429
428
|
role: "combobox",
|
|
430
429
|
"aria-expanded": w,
|
|
431
430
|
"aria-controls": $
|
|
432
431
|
}), He = (e = {}) => {
|
|
433
|
-
const t = ne(e),
|
|
434
|
-
return g({}, e,
|
|
432
|
+
const t = ne(e), u = se(H, Z);
|
|
433
|
+
return g({}, e, u(t));
|
|
435
434
|
}, $e = (e) => (t) => {
|
|
436
|
-
var
|
|
437
|
-
(
|
|
435
|
+
var u, m;
|
|
436
|
+
(u = e.onBlur) == null || u.call(e, t), !t.defaultMuiPrevented && ((m = _.current) != null && m.contains(t.relatedTarget) || t.relatedTarget === P.current) && (t.defaultMuiPrevented = !0);
|
|
438
437
|
}, Fe = (e = {}) => ({
|
|
439
438
|
onBlur: $e(e)
|
|
440
439
|
}), qe = (e = {}) => {
|
|
441
|
-
const t = ne(e),
|
|
440
|
+
const t = ne(e), u = se(Fe, he);
|
|
442
441
|
return g({
|
|
443
442
|
id: $,
|
|
444
443
|
role: "listbox",
|
|
445
444
|
"aria-multiselectable": d ? "true" : void 0
|
|
446
|
-
}, e,
|
|
445
|
+
}, e, u(t));
|
|
447
446
|
};
|
|
448
447
|
s.useDebugValue({
|
|
449
448
|
selectedOptions: k,
|
|
@@ -461,25 +460,25 @@ function dt(n) {
|
|
|
461
460
|
Pe = (Re = J(G)) != null ? Re : null;
|
|
462
461
|
}
|
|
463
462
|
const Ue = (e) => (t) => {
|
|
464
|
-
var
|
|
465
|
-
if (e == null || (
|
|
463
|
+
var u;
|
|
464
|
+
if (e == null || (u = e.onChange) == null || u.call(e, t), t.defaultMuiPrevented)
|
|
466
465
|
return;
|
|
467
|
-
const m =
|
|
468
|
-
t.target.value === "" ?
|
|
466
|
+
const m = V.get(t.target.value);
|
|
467
|
+
t.target.value === "" ? D({
|
|
469
468
|
type: Q.clearSelection
|
|
470
|
-
}) : m !== void 0 &&
|
|
469
|
+
}) : m !== void 0 && D({
|
|
471
470
|
type: re.browserAutoFill,
|
|
472
471
|
item: m.value,
|
|
473
472
|
event: t
|
|
474
473
|
});
|
|
475
474
|
};
|
|
476
475
|
return {
|
|
477
|
-
buttonActive:
|
|
476
|
+
buttonActive: ie,
|
|
478
477
|
buttonFocusVisible: ae,
|
|
479
478
|
buttonRef: U,
|
|
480
479
|
contextValue: je,
|
|
481
480
|
disabled: c,
|
|
482
|
-
dispatch:
|
|
481
|
+
dispatch: D,
|
|
483
482
|
getButtonProps: He,
|
|
484
483
|
getHiddenInputProps: (e = {}) => {
|
|
485
484
|
const t = ne(e);
|
|
@@ -488,7 +487,7 @@ function dt(n) {
|
|
|
488
487
|
tabIndex: -1,
|
|
489
488
|
"aria-hidden": !0,
|
|
490
489
|
required: I ? !0 : void 0,
|
|
491
|
-
value:
|
|
490
|
+
value: B(Pe),
|
|
492
491
|
style: ot
|
|
493
492
|
}, e, {
|
|
494
493
|
onChange: Ue(t)
|
|
@@ -506,7 +505,7 @@ function dt(n) {
|
|
|
506
505
|
function pt(n) {
|
|
507
506
|
const {
|
|
508
507
|
value: o,
|
|
509
|
-
children:
|
|
508
|
+
children: i
|
|
510
509
|
} = n, {
|
|
511
510
|
dispatch: a,
|
|
512
511
|
getItemIndex: r,
|
|
@@ -526,37 +525,37 @@ function pt(n) {
|
|
|
526
525
|
value: v,
|
|
527
526
|
children: /* @__PURE__ */ h(ye.Provider, {
|
|
528
527
|
value: d,
|
|
529
|
-
children:
|
|
528
|
+
children: i
|
|
530
529
|
})
|
|
531
530
|
});
|
|
532
531
|
}
|
|
533
532
|
const Ee = "Select";
|
|
534
533
|
function ft(n) {
|
|
535
|
-
return
|
|
534
|
+
return Ve(Ee, n);
|
|
536
535
|
}
|
|
537
|
-
|
|
536
|
+
we(Ee, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
|
|
538
537
|
var Se;
|
|
539
538
|
const bt = ["areOptionsEqual", "autoComplete", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "listboxId", "listboxOpen", "multiple", "name", "required", "onChange", "onListboxOpenChange", "getOptionAsString", "renderValue", "placeholder", "slotProps", "slots", "value"];
|
|
540
539
|
function gt(n) {
|
|
541
540
|
var o;
|
|
542
541
|
return Array.isArray(n) ? /* @__PURE__ */ h(s.Fragment, {
|
|
543
|
-
children: n.map((
|
|
542
|
+
children: n.map((i) => i.label).join(", ")
|
|
544
543
|
}) : (o = n == null ? void 0 : n.label) != null ? o : null;
|
|
545
544
|
}
|
|
546
545
|
function mt(n) {
|
|
547
546
|
const {
|
|
548
547
|
active: o,
|
|
549
|
-
disabled:
|
|
548
|
+
disabled: i,
|
|
550
549
|
open: a,
|
|
551
550
|
focusVisible: r
|
|
552
551
|
} = n;
|
|
553
552
|
return Ie({
|
|
554
|
-
root: ["root",
|
|
555
|
-
listbox: ["listbox",
|
|
553
|
+
root: ["root", i && "disabled", r && "focusVisible", o && "active", a && "expanded"],
|
|
554
|
+
listbox: ["listbox", i && "disabled"],
|
|
556
555
|
popup: ["popup"]
|
|
557
|
-
},
|
|
556
|
+
}, Ne(ft));
|
|
558
557
|
}
|
|
559
|
-
const De = /* @__PURE__ */ s.forwardRef(function(o,
|
|
558
|
+
const De = /* @__PURE__ */ s.forwardRef(function(o, i) {
|
|
560
559
|
var a, r, c, p, f;
|
|
561
560
|
const {
|
|
562
561
|
areOptionsEqual: d,
|
|
@@ -565,24 +564,24 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
565
564
|
children: x,
|
|
566
565
|
defaultValue: y,
|
|
567
566
|
defaultListboxOpen: R = !1,
|
|
568
|
-
disabled:
|
|
567
|
+
disabled: N,
|
|
569
568
|
getSerializedValue: O,
|
|
570
|
-
listboxId:
|
|
571
|
-
listboxOpen:
|
|
569
|
+
listboxId: M,
|
|
570
|
+
listboxOpen: B,
|
|
572
571
|
multiple: b = !1,
|
|
573
572
|
name: C,
|
|
574
573
|
required: P = !1,
|
|
575
574
|
onChange: j,
|
|
576
|
-
onListboxOpenChange:
|
|
575
|
+
onListboxOpenChange: _,
|
|
577
576
|
getOptionAsString: $ = Be,
|
|
578
|
-
renderValue:
|
|
577
|
+
renderValue: E,
|
|
579
578
|
placeholder: Y,
|
|
580
579
|
slotProps: T = {},
|
|
581
580
|
slots: F = {},
|
|
582
|
-
value:
|
|
583
|
-
} = o,
|
|
584
|
-
ae(
|
|
585
|
-
}, []), de = X(
|
|
581
|
+
value: V
|
|
582
|
+
} = o, ue = ke(o, bt), Z = E ?? gt, [ie, ae] = s.useState(!1), U = s.useRef(null), q = s.useRef(null), S = (a = F.root) != null ? a : "button", ee = (r = F.listbox) != null ? r : "ul", te = (c = F.popup) != null ? c : "div", ce = s.useCallback((H) => {
|
|
583
|
+
ae(H != null);
|
|
584
|
+
}, []), de = X(i, U, ce);
|
|
586
585
|
s.useEffect(() => {
|
|
587
586
|
I && U.current.focus();
|
|
588
587
|
}, [I]);
|
|
@@ -592,7 +591,7 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
592
591
|
contextValue: be,
|
|
593
592
|
disabled: ge,
|
|
594
593
|
getButtonProps: me,
|
|
595
|
-
getListboxProps:
|
|
594
|
+
getListboxProps: D,
|
|
596
595
|
getHiddenInputProps: he,
|
|
597
596
|
getOptionMetadata: K,
|
|
598
597
|
value: w,
|
|
@@ -605,14 +604,14 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
605
604
|
buttonRef: de,
|
|
606
605
|
defaultOpen: R,
|
|
607
606
|
defaultValue: y,
|
|
608
|
-
disabled:
|
|
609
|
-
listboxId:
|
|
607
|
+
disabled: N,
|
|
608
|
+
listboxId: M,
|
|
610
609
|
multiple: b,
|
|
611
|
-
open:
|
|
610
|
+
open: B,
|
|
612
611
|
onChange: j,
|
|
613
|
-
onOpenChange:
|
|
612
|
+
onOpenChange: _,
|
|
614
613
|
getOptionAsString: $,
|
|
615
|
-
value:
|
|
614
|
+
value: V,
|
|
616
615
|
componentName: "Select"
|
|
617
616
|
}), k = g({}, o, {
|
|
618
617
|
active: pe,
|
|
@@ -627,12 +626,12 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
627
626
|
elementType: S,
|
|
628
627
|
getSlotProps: me,
|
|
629
628
|
externalSlotProps: T.root,
|
|
630
|
-
externalForwardedProps:
|
|
629
|
+
externalForwardedProps: ue,
|
|
631
630
|
ownerState: k,
|
|
632
631
|
className: z.root
|
|
633
632
|
}), J = le({
|
|
634
633
|
elementType: ee,
|
|
635
|
-
getSlotProps:
|
|
634
|
+
getSlotProps: D,
|
|
636
635
|
externalSlotProps: T.listbox,
|
|
637
636
|
additionalProps: {
|
|
638
637
|
ref: q
|
|
@@ -654,7 +653,7 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
654
653
|
});
|
|
655
654
|
let W;
|
|
656
655
|
if (b)
|
|
657
|
-
W = w.map((
|
|
656
|
+
W = w.map((H) => K(H)).filter((H) => H !== void 0);
|
|
658
657
|
else {
|
|
659
658
|
var oe;
|
|
660
659
|
W = (oe = K(w)) != null ? oe : null;
|
|
@@ -669,7 +668,7 @@ const De = /* @__PURE__ */ s.forwardRef(function(o, u) {
|
|
|
669
668
|
children: ""
|
|
670
669
|
}))
|
|
671
670
|
)
|
|
672
|
-
})),
|
|
671
|
+
})), ie && /* @__PURE__ */ h(Xe, g({
|
|
673
672
|
slots: {
|
|
674
673
|
root: te
|
|
675
674
|
}
|
|
@@ -813,27 +812,27 @@ process.env.NODE_ENV !== "production" && (De.propTypes = {
|
|
|
813
812
|
value: l.any
|
|
814
813
|
});
|
|
815
814
|
const ht = (n) => {
|
|
816
|
-
const { children: o, icon:
|
|
815
|
+
const { children: o, icon: i, className: a, ...r } = n;
|
|
817
816
|
return /* @__PURE__ */ Oe(
|
|
818
817
|
Le,
|
|
819
818
|
{
|
|
820
819
|
...r,
|
|
821
820
|
slotProps: {
|
|
822
821
|
root: (c) => ({
|
|
823
|
-
className:
|
|
824
|
-
[
|
|
825
|
-
[
|
|
822
|
+
className: _e(L.select__listbox__option, a, {
|
|
823
|
+
[L["select__listbox__option--disabled"]]: c.disabled,
|
|
824
|
+
[L["select__listbox__option--selected"]]: c.selected
|
|
826
825
|
})
|
|
827
826
|
})
|
|
828
827
|
},
|
|
829
828
|
children: [
|
|
830
|
-
|
|
831
|
-
/* @__PURE__ */ h(Ke, { element: "span", variant: "body-small", className:
|
|
829
|
+
i ? /* @__PURE__ */ h("span", { className: L.select__listbox__option__icon, children: i }) : "",
|
|
830
|
+
/* @__PURE__ */ h(Ke, { element: "span", variant: "body-small", className: L.select__listbox__option__text, children: o })
|
|
832
831
|
]
|
|
833
832
|
}
|
|
834
833
|
);
|
|
835
834
|
}, xt = (n) => {
|
|
836
|
-
const { children: o, className:
|
|
835
|
+
const { children: o, className: i, onChange: a, ...r } = n;
|
|
837
836
|
return /* @__PURE__ */ h(
|
|
838
837
|
De,
|
|
839
838
|
{
|
|
@@ -841,11 +840,11 @@ const ht = (n) => {
|
|
|
841
840
|
onChange: (p, f) => {
|
|
842
841
|
a == null || a(f, p);
|
|
843
842
|
},
|
|
844
|
-
className:
|
|
843
|
+
className: _e(L.select, i),
|
|
845
844
|
slots: { root: ze },
|
|
846
845
|
slotProps: {
|
|
847
|
-
listbox: { className:
|
|
848
|
-
popup: {
|
|
846
|
+
listbox: { className: L.select__listbox },
|
|
847
|
+
popup: { className: L.select__popup }
|
|
849
848
|
},
|
|
850
849
|
children: o
|
|
851
850
|
}
|
|
@@ -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-pciwIWcj.js";
|
|
6
6
|
export {
|
|
7
7
|
e as SelectButton
|
|
8
8
|
};
|