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