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