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