@pismo/marola 2.1.63 → 2.1.65
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-CJaBSdv1.js +135 -0
- package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
- package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
- package/dist/Popup-D267EI4e.js +1338 -0
- package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
- package/dist/RadioOption-DyRY8xlF.js +1094 -0
- package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/DropdownMenu.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/ToastCard.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
- package/dist/components/Alert/Alert.stories.d.ts +6 -6
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +311 -320
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
- package/dist/components/BankingCard/BankingCard.d.ts +0 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +56 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
- package/dist/components/Chip/Chip.js +3 -3
- package/dist/components/DatePicker/DatePicker.js +742 -639
- package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
- package/dist/components/DatePicker/dateUtils.d.ts +2 -2
- package/dist/components/DatePicker/dateUtils.js +1 -1
- package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
- package/dist/components/DatePicker/renderCalendarDays.js +1 -1
- package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +372 -352
- package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
- package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
- package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
- package/dist/components/Draggable/Draggable.d.ts +0 -1
- package/dist/components/Draggable/Draggable.js +1 -1
- package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
- package/dist/components/Draggable/useDraggable.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.js +361 -340
- package/dist/components/Input/Input.stories.d.ts +2 -0
- package/dist/components/InputSearch/InputSearch.d.ts +31 -30
- package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -30
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverBody.d.ts +0 -1
- package/dist/components/Popover/PopoverFooter.d.ts +0 -1
- package/dist/components/Popover/PopoverHeader.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.js +684 -769
- package/dist/components/RadioButton/RadioOption.d.ts +0 -1
- package/dist/components/RadioButton/RadioOption.js +3 -3
- package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
- package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/Select/Select.js +625 -591
- package/dist/components/Skeleton/Skeleton.d.ts +0 -1
- package/dist/components/Snackbar/Snackbar.js +295 -239
- package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +5 -5
- package/dist/components/Tabs/Tab.js +107 -98
- package/dist/components/Tabs/TabPanel.js +58 -55
- package/dist/components/Tabs/Tabs.js +246 -231
- package/dist/components/ToastCard/ToastCard.js +31 -31
- package/dist/components/Toggle/Toggle.js +147 -137
- package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
- package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +266 -325
- package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
- package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
- package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
- package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
- package/dist/getReactElementRef-iorwYm2A.js +19 -0
- package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/main.js +2 -2
- package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
- package/dist/react-BTbo_5A3.js +526 -0
- package/dist/setRef-Bo0HEdBB.js +6 -0
- package/dist/useButton-C2E_LFJp.js +90 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useList-BLW78Lq7.js +446 -0
- package/dist/utils/draggable.d.ts +2 -2
- package/package.json +5 -4
- package/dist/Button-BrEDdtHO.js +0 -130
- package/dist/Popup-Dffqo7wT.js +0 -1246
- package/dist/RadioOption-DYovqiwF.js +0 -720
- package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
- package/dist/exactProp-SYjL19cU.js +0 -13
- package/dist/react-BvI-Sw9b.js +0 -509
- package/dist/useButton-CezPDte8.js +0 -105
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-nqLfZem8.js +0 -435
- package/dist/useSlotProps-CYHDC4TN.js +0 -834
- package/dist/useTimeout-DxF9kiZL.js +0 -36
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as f, jsxs as J } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { c as
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { s as
|
|
9
|
-
import { g as
|
|
10
|
-
import { P as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { m as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as
|
|
17
|
-
const
|
|
3
|
+
import { createContext as Ke, useId as We, useContext as Je } from "react";
|
|
4
|
+
import { c as $ } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import { Checkbox as Ge } from "../Checkbox/Checkbox.js";
|
|
6
|
+
import { Icon as Qe } from "../Icon/Icon.js";
|
|
7
|
+
import { Typography as xe } from "../Typography/Typography.js";
|
|
8
|
+
import { s as R, S as Xe } from "../../SelectButton-CmFJp2dA.js";
|
|
9
|
+
import { g as ye, a as Re, u as Q, e as ne, b as se, c as Se, d as Ve, P as n } from "../../ClassNameConfigurator-CVRWfyIa.js";
|
|
10
|
+
import { P as Ye } from "../../Popup-D267EI4e.js";
|
|
11
|
+
import { u as Ze, c as le, a as Ce, L as G } from "../../combineHooksSlotProps-j-8UVeYo.js";
|
|
12
|
+
import { u as He, a as et, C as tt } from "../../useCompoundItem-B7Eo_qZk.js";
|
|
13
|
+
import { m as he, h as ot, l as nt, u as st } from "../../useList-BLW78Lq7.js";
|
|
14
|
+
import { u as we } from "../../useId-CK6Kn3Tn.js";
|
|
15
|
+
import { u as Oe } from "../../useButton-C2E_LFJp.js";
|
|
16
|
+
import { u as lt } from "../../useEnhancedEffect-CJGo-L3B.js";
|
|
17
|
+
const rt = {
|
|
18
18
|
border: 0,
|
|
19
19
|
clip: "rect(0 0 0 0)",
|
|
20
20
|
height: "1px",
|
|
@@ -24,147 +24,191 @@ const it = {
|
|
|
24
24
|
position: "absolute",
|
|
25
25
|
whiteSpace: "nowrap",
|
|
26
26
|
width: "1px"
|
|
27
|
-
},
|
|
28
|
-
function
|
|
29
|
-
return
|
|
27
|
+
}, _e = "Option";
|
|
28
|
+
function it(o) {
|
|
29
|
+
return ye(_e, o);
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
function
|
|
31
|
+
Re(_e, ["root", "disabled", "selected", "highlighted"]);
|
|
32
|
+
function at(o) {
|
|
33
33
|
const {
|
|
34
|
-
value:
|
|
34
|
+
value: s,
|
|
35
35
|
label: i,
|
|
36
|
-
disabled:
|
|
37
|
-
rootRef:
|
|
38
|
-
id:
|
|
39
|
-
} =
|
|
40
|
-
getRootProps:
|
|
41
|
-
highlighted:
|
|
42
|
-
selected:
|
|
43
|
-
} =
|
|
44
|
-
item:
|
|
36
|
+
disabled: a,
|
|
37
|
+
rootRef: l,
|
|
38
|
+
id: c
|
|
39
|
+
} = o, {
|
|
40
|
+
getRootProps: m,
|
|
41
|
+
highlighted: b,
|
|
42
|
+
selected: p
|
|
43
|
+
} = Ze({
|
|
44
|
+
item: s
|
|
45
45
|
}), {
|
|
46
|
-
getRootProps:
|
|
46
|
+
getRootProps: V,
|
|
47
47
|
rootRef: k
|
|
48
|
-
} =
|
|
49
|
-
disabled:
|
|
48
|
+
} = Oe({
|
|
49
|
+
disabled: a,
|
|
50
50
|
focusableWhenDisabled: !0
|
|
51
|
-
}),
|
|
52
|
-
disabled:
|
|
51
|
+
}), g = we(c), w = r.useRef(null), h = r.useMemo(() => ({
|
|
52
|
+
disabled: a,
|
|
53
53
|
label: i,
|
|
54
|
-
value:
|
|
55
|
-
ref:
|
|
56
|
-
id:
|
|
57
|
-
}), [
|
|
54
|
+
value: s,
|
|
55
|
+
ref: w,
|
|
56
|
+
id: g
|
|
57
|
+
}), [a, i, s, g]), {
|
|
58
58
|
index: I
|
|
59
|
-
} =
|
|
60
|
-
var
|
|
61
|
-
(
|
|
62
|
-
}, A = (
|
|
63
|
-
onKeyDown: x(
|
|
59
|
+
} = He(s, h), O = Q(l, w, k), x = (d) => (C) => {
|
|
60
|
+
var S;
|
|
61
|
+
(S = d.onKeyDown) == null || S.call(d, C), !C.defaultMuiPrevented && [" ", "Enter"].includes(C.key) && (C.defaultMuiPrevented = !0);
|
|
62
|
+
}, A = (d = {}) => ({
|
|
63
|
+
onKeyDown: x(d)
|
|
64
64
|
});
|
|
65
65
|
return {
|
|
66
|
-
getRootProps: (
|
|
67
|
-
const C =
|
|
68
|
-
return
|
|
69
|
-
|
|
66
|
+
getRootProps: (d = {}) => {
|
|
67
|
+
const C = ne(d), S = le(m, le(V, A));
|
|
68
|
+
return {
|
|
69
|
+
...d,
|
|
70
|
+
...C,
|
|
71
|
+
...S(C),
|
|
72
|
+
id: g,
|
|
70
73
|
ref: O,
|
|
71
74
|
role: "option",
|
|
72
|
-
"aria-selected":
|
|
73
|
-
}
|
|
75
|
+
"aria-selected": p
|
|
76
|
+
};
|
|
74
77
|
},
|
|
75
|
-
highlighted:
|
|
78
|
+
highlighted: b,
|
|
76
79
|
index: I,
|
|
77
|
-
selected:
|
|
80
|
+
selected: p,
|
|
78
81
|
rootRef: O
|
|
79
82
|
};
|
|
80
83
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
if (!
|
|
84
|
+
function ut(o) {
|
|
85
|
+
const s = r.useContext(Ce);
|
|
86
|
+
if (!s)
|
|
84
87
|
throw new Error("Option: ListContext was not found.");
|
|
85
88
|
const {
|
|
86
89
|
getItemState: i,
|
|
87
|
-
dispatch:
|
|
88
|
-
} =
|
|
89
|
-
highlighted:
|
|
90
|
-
selected:
|
|
91
|
-
focusable:
|
|
92
|
-
} = i(
|
|
93
|
-
if (
|
|
94
|
-
throw new Error(["Base
|
|
90
|
+
dispatch: a
|
|
91
|
+
} = s, {
|
|
92
|
+
highlighted: l,
|
|
93
|
+
selected: c,
|
|
94
|
+
focusable: m
|
|
95
|
+
} = i(o), b = r.useCallback((V) => {
|
|
96
|
+
if (V !== o)
|
|
97
|
+
throw new Error(["MUI Base Option: Tried to access the state of another Option.", "This is unsupported when the Option uses the OptionContextStabilizer as a performance optimization."].join("/n"));
|
|
95
98
|
return {
|
|
96
|
-
highlighted:
|
|
97
|
-
selected:
|
|
98
|
-
focusable:
|
|
99
|
+
highlighted: l,
|
|
100
|
+
selected: c,
|
|
101
|
+
focusable: m
|
|
99
102
|
};
|
|
100
|
-
}, [
|
|
103
|
+
}, [l, c, m, o]);
|
|
101
104
|
return {
|
|
102
105
|
contextValue: r.useMemo(() => ({
|
|
103
|
-
dispatch:
|
|
104
|
-
getItemState:
|
|
105
|
-
}), [
|
|
106
|
+
dispatch: a,
|
|
107
|
+
getItemState: b
|
|
108
|
+
}), [a, b])
|
|
106
109
|
};
|
|
107
110
|
}
|
|
108
|
-
|
|
109
|
-
function ft(n) {
|
|
111
|
+
function ct(o) {
|
|
110
112
|
const {
|
|
111
|
-
disabled:
|
|
113
|
+
disabled: s,
|
|
112
114
|
highlighted: i,
|
|
113
|
-
selected:
|
|
114
|
-
} =
|
|
115
|
-
return
|
|
116
|
-
root: ["root",
|
|
117
|
-
},
|
|
115
|
+
selected: a
|
|
116
|
+
} = o;
|
|
117
|
+
return Se({
|
|
118
|
+
root: ["root", s && "disabled", i && "highlighted", a && "selected"]
|
|
119
|
+
}, Ve(it));
|
|
118
120
|
}
|
|
119
|
-
const
|
|
120
|
-
var
|
|
121
|
+
const Ie = /* @__PURE__ */ r.forwardRef(function(s, i) {
|
|
122
|
+
var M, P;
|
|
121
123
|
const {
|
|
122
|
-
children:
|
|
123
|
-
disabled:
|
|
124
|
-
label:
|
|
125
|
-
slotProps:
|
|
126
|
-
slots:
|
|
127
|
-
value:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
124
|
+
children: a,
|
|
125
|
+
disabled: l = !1,
|
|
126
|
+
label: c,
|
|
127
|
+
slotProps: m = {},
|
|
128
|
+
slots: b = {},
|
|
129
|
+
value: p,
|
|
130
|
+
...V
|
|
131
|
+
} = s, k = b.root ?? "li", g = r.useRef(null), w = Q(g, i), h = c ?? (typeof a == "string" ? a : (P = (M = g.current) == null ? void 0 : M.textContent) == null ? void 0 : P.trim()), {
|
|
132
|
+
getRootProps: I,
|
|
133
|
+
selected: O,
|
|
134
|
+
highlighted: x,
|
|
135
|
+
index: A
|
|
136
|
+
} = at({
|
|
137
|
+
disabled: l,
|
|
138
|
+
label: h,
|
|
139
|
+
rootRef: w,
|
|
140
|
+
value: p
|
|
141
|
+
}), d = {
|
|
142
|
+
...s,
|
|
143
|
+
disabled: l,
|
|
144
|
+
highlighted: x,
|
|
145
|
+
index: A,
|
|
146
|
+
selected: O
|
|
147
|
+
}, C = ct(d), S = se({
|
|
148
|
+
getSlotProps: I,
|
|
149
|
+
elementType: k,
|
|
150
|
+
externalSlotProps: m.root,
|
|
151
|
+
externalForwardedProps: V,
|
|
152
|
+
className: C.root,
|
|
153
|
+
ownerState: d
|
|
154
|
+
});
|
|
155
|
+
return /* @__PURE__ */ f(k, {
|
|
156
|
+
...S,
|
|
157
|
+
children: a
|
|
150
158
|
});
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
159
|
+
});
|
|
160
|
+
process.env.NODE_ENV !== "production" && (Ie.propTypes = {
|
|
161
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
162
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
163
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
164
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
165
|
+
children: n.node,
|
|
166
|
+
className: n.string,
|
|
167
|
+
/**
|
|
168
|
+
* If `true`, the option will be disabled.
|
|
169
|
+
* @default false
|
|
170
|
+
*/
|
|
171
|
+
disabled: n.bool,
|
|
172
|
+
/**
|
|
173
|
+
* A text representation of the option's content.
|
|
174
|
+
* Used for keyboard text navigation matching.
|
|
175
|
+
*/
|
|
176
|
+
label: n.string,
|
|
177
|
+
/**
|
|
178
|
+
* The props used for each slot inside the Option.
|
|
179
|
+
* @default {}
|
|
180
|
+
*/
|
|
181
|
+
slotProps: n.shape({
|
|
182
|
+
root: n.oneOfType([n.func, n.object])
|
|
183
|
+
}),
|
|
184
|
+
/**
|
|
185
|
+
* The components used for each slot inside the Option.
|
|
186
|
+
* Either a string to use a HTML element or a component.
|
|
187
|
+
* @default {}
|
|
188
|
+
*/
|
|
189
|
+
slots: n.shape({
|
|
190
|
+
root: n.elementType
|
|
191
|
+
}),
|
|
192
|
+
/**
|
|
193
|
+
* The value of the option.
|
|
194
|
+
*/
|
|
195
|
+
value: n.any.isRequired
|
|
196
|
+
});
|
|
197
|
+
const pt = /* @__PURE__ */ r.memo(Ie), Me = /* @__PURE__ */ r.forwardRef(function(s, i) {
|
|
155
198
|
const {
|
|
156
|
-
value:
|
|
157
|
-
} =
|
|
158
|
-
contextValue:
|
|
159
|
-
} =
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
value:
|
|
162
|
-
children: /* @__PURE__ */
|
|
199
|
+
value: a
|
|
200
|
+
} = s, {
|
|
201
|
+
contextValue: l
|
|
202
|
+
} = ut(a);
|
|
203
|
+
return /* @__PURE__ */ f(Ce.Provider, {
|
|
204
|
+
value: l,
|
|
205
|
+
children: /* @__PURE__ */ f(pt, {
|
|
206
|
+
...s,
|
|
163
207
|
ref: i
|
|
164
|
-
})
|
|
208
|
+
})
|
|
165
209
|
});
|
|
166
210
|
});
|
|
167
|
-
process.env.NODE_ENV !== "production" && (
|
|
211
|
+
process.env.NODE_ENV !== "production" && (Me.propTypes = {
|
|
168
212
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
169
213
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
170
214
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -172,523 +216,513 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
|
172
216
|
/**
|
|
173
217
|
* @ignore
|
|
174
218
|
*/
|
|
175
|
-
children:
|
|
219
|
+
children: n.node,
|
|
176
220
|
/**
|
|
177
221
|
* @ignore
|
|
178
222
|
*/
|
|
179
|
-
className:
|
|
223
|
+
className: n.string,
|
|
180
224
|
/**
|
|
181
225
|
* If `true`, the option will be disabled.
|
|
182
226
|
* @default false
|
|
183
227
|
*/
|
|
184
|
-
disabled:
|
|
228
|
+
disabled: n.bool,
|
|
185
229
|
/**
|
|
186
230
|
* A text representation of the option's content.
|
|
187
231
|
* Used for keyboard text navigation matching.
|
|
188
232
|
*/
|
|
189
|
-
label:
|
|
233
|
+
label: n.string,
|
|
190
234
|
/**
|
|
191
235
|
* The props used for each slot inside the Option.
|
|
192
236
|
* @default {}
|
|
193
237
|
*/
|
|
194
|
-
slotProps:
|
|
195
|
-
root:
|
|
238
|
+
slotProps: n.shape({
|
|
239
|
+
root: n.oneOfType([n.func, n.object])
|
|
196
240
|
}),
|
|
197
241
|
/**
|
|
198
242
|
* The components used for each slot inside the Option.
|
|
199
243
|
* Either a string to use a HTML element or a component.
|
|
200
244
|
* @default {}
|
|
201
245
|
*/
|
|
202
|
-
slots:
|
|
203
|
-
root:
|
|
246
|
+
slots: n.shape({
|
|
247
|
+
root: n.elementType
|
|
204
248
|
}),
|
|
205
249
|
/**
|
|
206
250
|
* The value of the option.
|
|
207
251
|
*/
|
|
208
|
-
value:
|
|
252
|
+
value: n.any.isRequired
|
|
209
253
|
});
|
|
210
|
-
const
|
|
254
|
+
const re = {
|
|
211
255
|
buttonClick: "buttonClick",
|
|
212
256
|
browserAutoFill: "browserAutoFill"
|
|
213
|
-
},
|
|
257
|
+
}, Ne = (o) => {
|
|
214
258
|
const {
|
|
215
|
-
label:
|
|
259
|
+
label: s,
|
|
216
260
|
value: i
|
|
217
|
-
} =
|
|
218
|
-
return typeof
|
|
261
|
+
} = o;
|
|
262
|
+
return typeof s == "string" ? s : typeof i == "string" ? i : String(o);
|
|
219
263
|
};
|
|
220
|
-
function
|
|
264
|
+
function dt(o, s) {
|
|
221
265
|
const {
|
|
222
266
|
open: i
|
|
223
|
-
} =
|
|
267
|
+
} = o, {
|
|
224
268
|
context: {
|
|
225
|
-
selectionMode:
|
|
269
|
+
selectionMode: a
|
|
226
270
|
}
|
|
227
|
-
} =
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
271
|
+
} = s;
|
|
272
|
+
if (s.type === re.buttonClick) {
|
|
273
|
+
const c = o.selectedValues[0] ?? he(null, "start", s.context);
|
|
274
|
+
return {
|
|
275
|
+
...o,
|
|
232
276
|
open: !i,
|
|
233
|
-
highlightedValue: i ? null :
|
|
234
|
-
}
|
|
277
|
+
highlightedValue: i ? null : c
|
|
278
|
+
};
|
|
235
279
|
}
|
|
236
|
-
if (
|
|
237
|
-
return
|
|
238
|
-
const
|
|
239
|
-
switch (
|
|
240
|
-
case
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
return
|
|
280
|
+
if (s.type === re.browserAutoFill)
|
|
281
|
+
return ot(s.item, o, s.context);
|
|
282
|
+
const l = nt(o, s);
|
|
283
|
+
switch (s.type) {
|
|
284
|
+
case G.keyDown:
|
|
285
|
+
if (o.open) {
|
|
286
|
+
if (s.event.key === "Escape")
|
|
287
|
+
return {
|
|
288
|
+
...l,
|
|
244
289
|
open: !1
|
|
245
|
-
}
|
|
290
|
+
};
|
|
246
291
|
} else {
|
|
247
|
-
if (
|
|
248
|
-
|
|
249
|
-
|
|
292
|
+
if (s.event.key === "ArrowDown")
|
|
293
|
+
return {
|
|
294
|
+
...o,
|
|
250
295
|
open: !0,
|
|
251
|
-
highlightedValue:
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
return g({}, n, {
|
|
296
|
+
highlightedValue: o.selectedValues[0] ?? he(null, "start", s.context)
|
|
297
|
+
};
|
|
298
|
+
if (s.event.key === "ArrowUp")
|
|
299
|
+
return {
|
|
300
|
+
...o,
|
|
257
301
|
open: !0,
|
|
258
|
-
highlightedValue:
|
|
259
|
-
}
|
|
260
|
-
}
|
|
302
|
+
highlightedValue: o.selectedValues[0] ?? he(null, "end", s.context)
|
|
303
|
+
};
|
|
261
304
|
}
|
|
262
305
|
break;
|
|
263
|
-
case
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
306
|
+
case G.itemClick:
|
|
307
|
+
if (a === "single")
|
|
308
|
+
return {
|
|
309
|
+
...l,
|
|
266
310
|
open: !1
|
|
267
|
-
}
|
|
311
|
+
};
|
|
268
312
|
break;
|
|
269
|
-
case
|
|
270
|
-
return
|
|
313
|
+
case G.blur:
|
|
314
|
+
return {
|
|
315
|
+
...l,
|
|
271
316
|
open: !1
|
|
272
|
-
}
|
|
317
|
+
};
|
|
273
318
|
default:
|
|
274
|
-
return
|
|
319
|
+
return l;
|
|
275
320
|
}
|
|
276
|
-
return
|
|
321
|
+
return l;
|
|
277
322
|
}
|
|
278
|
-
function
|
|
279
|
-
return Array.isArray(
|
|
323
|
+
function ft(o) {
|
|
324
|
+
return Array.isArray(o) ? o.length === 0 ? "" : JSON.stringify(o.map((s) => s.value)) : (o == null ? void 0 : o.value) == null ? "" : typeof o.value == "string" || typeof o.value == "number" ? o.value : JSON.stringify(o.value);
|
|
280
325
|
}
|
|
281
|
-
function
|
|
326
|
+
function mt(o) {
|
|
282
327
|
const {
|
|
283
|
-
areOptionsEqual:
|
|
328
|
+
areOptionsEqual: s,
|
|
284
329
|
buttonRef: i,
|
|
285
|
-
defaultOpen:
|
|
286
|
-
defaultValue:
|
|
287
|
-
disabled:
|
|
288
|
-
listboxId:
|
|
289
|
-
listboxRef:
|
|
290
|
-
multiple:
|
|
291
|
-
name:
|
|
330
|
+
defaultOpen: a = !1,
|
|
331
|
+
defaultValue: l,
|
|
332
|
+
disabled: c = !1,
|
|
333
|
+
listboxId: m,
|
|
334
|
+
listboxRef: b,
|
|
335
|
+
multiple: p = !1,
|
|
336
|
+
name: V,
|
|
292
337
|
required: k,
|
|
293
|
-
onChange:
|
|
294
|
-
onHighlightChange:
|
|
295
|
-
onOpenChange:
|
|
338
|
+
onChange: g,
|
|
339
|
+
onHighlightChange: w,
|
|
340
|
+
onOpenChange: h,
|
|
296
341
|
open: I,
|
|
297
342
|
options: O,
|
|
298
|
-
getOptionAsString: x =
|
|
299
|
-
getSerializedValue: A =
|
|
300
|
-
value:
|
|
343
|
+
getOptionAsString: x = Ne,
|
|
344
|
+
getSerializedValue: A = ft,
|
|
345
|
+
value: d,
|
|
301
346
|
componentName: C = "useSelect"
|
|
302
|
-
} =
|
|
303
|
-
let
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
if (
|
|
307
|
-
return
|
|
308
|
-
}, [
|
|
309
|
-
subitems:
|
|
310
|
-
contextValue:
|
|
311
|
-
} =
|
|
347
|
+
} = o, S = r.useRef(null), M = Q(i, S), P = r.useRef(null), B = we(m);
|
|
348
|
+
let N;
|
|
349
|
+
d === void 0 && l === void 0 ? N = [] : l !== void 0 && (p ? N = l : N = l == null ? [] : [l]);
|
|
350
|
+
const L = r.useMemo(() => {
|
|
351
|
+
if (d !== void 0)
|
|
352
|
+
return p ? d : d == null ? [] : [d];
|
|
353
|
+
}, [d, p]), {
|
|
354
|
+
subitems: D,
|
|
355
|
+
contextValue: X
|
|
356
|
+
} = et(), _ = r.useMemo(() => O != null ? new Map(O.map((e, t) => [e.value, {
|
|
312
357
|
value: e.value,
|
|
313
358
|
label: e.label,
|
|
314
359
|
disabled: e.disabled,
|
|
315
360
|
ref: /* @__PURE__ */ r.createRef(),
|
|
316
|
-
id: `${
|
|
317
|
-
}])) :
|
|
318
|
-
getRootProps:
|
|
319
|
-
active:
|
|
320
|
-
focusVisible:
|
|
321
|
-
rootRef:
|
|
322
|
-
} =
|
|
323
|
-
disabled:
|
|
324
|
-
rootRef:
|
|
325
|
-
}), U = r.useMemo(() => Array.from(
|
|
326
|
-
if (
|
|
327
|
-
const t = U.find((
|
|
328
|
-
return
|
|
361
|
+
id: `${B}_${t}`
|
|
362
|
+
}])) : D, [O, D, B]), ie = Q(b, P), {
|
|
363
|
+
getRootProps: Y,
|
|
364
|
+
active: Z,
|
|
365
|
+
focusVisible: H,
|
|
366
|
+
rootRef: ae
|
|
367
|
+
} = Oe({
|
|
368
|
+
disabled: c,
|
|
369
|
+
rootRef: M
|
|
370
|
+
}), U = r.useMemo(() => Array.from(_.keys()), [_]), v = r.useCallback((e) => {
|
|
371
|
+
if (s !== void 0) {
|
|
372
|
+
const t = U.find((u) => s(u, e));
|
|
373
|
+
return _.get(t);
|
|
329
374
|
}
|
|
330
|
-
return
|
|
331
|
-
}, [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
const t = N(e);
|
|
375
|
+
return _.get(e);
|
|
376
|
+
}, [_, s, U]), ue = r.useCallback((e) => {
|
|
377
|
+
const t = v(e);
|
|
378
|
+
return (t == null ? void 0 : t.disabled) ?? !1;
|
|
379
|
+
}, [v]), ce = r.useCallback((e) => {
|
|
380
|
+
const t = v(e);
|
|
337
381
|
return t ? x(t) : "";
|
|
338
|
-
}, [
|
|
339
|
-
selectedValues:
|
|
382
|
+
}, [v, x]), pe = r.useMemo(() => ({
|
|
383
|
+
selectedValues: L,
|
|
340
384
|
open: I
|
|
341
|
-
}), [
|
|
385
|
+
}), [L, I]), de = r.useCallback((e) => {
|
|
342
386
|
var t;
|
|
343
|
-
return (t =
|
|
344
|
-
}, [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}, [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}, [M]), xe = {
|
|
362
|
-
getInitialState: () => {
|
|
363
|
-
var e;
|
|
364
|
-
return {
|
|
365
|
-
highlightedValue: null,
|
|
366
|
-
selectedValues: (e = w) != null ? e : [],
|
|
367
|
-
open: c
|
|
368
|
-
};
|
|
369
|
-
},
|
|
370
|
-
getItemId: fe,
|
|
387
|
+
return (t = _.get(e)) == null ? void 0 : t.id;
|
|
388
|
+
}, [_]), fe = r.useCallback((e, t) => {
|
|
389
|
+
p ? g == null || g(e, t) : g == null || g(e, t[0] ?? null);
|
|
390
|
+
}, [p, g]), me = r.useCallback((e, t) => {
|
|
391
|
+
w == null || w(e, t ?? null);
|
|
392
|
+
}, [w]), ee = r.useCallback((e, t, u) => {
|
|
393
|
+
var y;
|
|
394
|
+
t === "open" && (h == null || h(u), u === !1 && (e == null ? void 0 : e.type) !== "blur" && ((y = S.current) == null || y.focus()));
|
|
395
|
+
}, [h]), z = r.useCallback((e) => {
|
|
396
|
+
var t;
|
|
397
|
+
return e == null ? null : ((t = D.get(e)) == null ? void 0 : t.ref.current) ?? null;
|
|
398
|
+
}, [D]), te = {
|
|
399
|
+
getInitialState: () => ({
|
|
400
|
+
highlightedValue: null,
|
|
401
|
+
selectedValues: N ?? [],
|
|
402
|
+
open: a
|
|
403
|
+
}),
|
|
404
|
+
getItemId: de,
|
|
371
405
|
controlledProps: pe,
|
|
372
406
|
focusManagement: "DOM",
|
|
373
|
-
getItemDomElement:
|
|
374
|
-
itemComparer:
|
|
375
|
-
isItemDisabled:
|
|
376
|
-
rootRef:
|
|
377
|
-
onChange:
|
|
407
|
+
getItemDomElement: z,
|
|
408
|
+
itemComparer: s,
|
|
409
|
+
isItemDisabled: ue,
|
|
410
|
+
rootRef: ie,
|
|
411
|
+
onChange: fe,
|
|
378
412
|
onHighlightChange: me,
|
|
379
|
-
onStateChange:
|
|
413
|
+
onStateChange: ee,
|
|
380
414
|
reducerActionContext: r.useMemo(() => ({
|
|
381
|
-
multiple:
|
|
382
|
-
}), [
|
|
415
|
+
multiple: p
|
|
416
|
+
}), [p]),
|
|
383
417
|
items: U,
|
|
384
|
-
getItemAsString:
|
|
385
|
-
selectionMode:
|
|
386
|
-
stateReducer:
|
|
418
|
+
getItemAsString: ce,
|
|
419
|
+
selectionMode: p ? "multiple" : "single",
|
|
420
|
+
stateReducer: dt,
|
|
387
421
|
componentName: C
|
|
388
422
|
}, {
|
|
389
|
-
dispatch:
|
|
390
|
-
getRootProps:
|
|
391
|
-
contextValue:
|
|
423
|
+
dispatch: T,
|
|
424
|
+
getRootProps: K,
|
|
425
|
+
contextValue: oe,
|
|
392
426
|
state: {
|
|
393
|
-
open:
|
|
394
|
-
highlightedValue:
|
|
427
|
+
open: F,
|
|
428
|
+
highlightedValue: q,
|
|
395
429
|
selectedValues: E
|
|
396
430
|
},
|
|
397
|
-
rootRef:
|
|
398
|
-
} =
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
const t = (e =
|
|
403
|
-
if (!
|
|
431
|
+
rootRef: j
|
|
432
|
+
} = st(te), Ae = r.useRef(F);
|
|
433
|
+
lt(() => {
|
|
434
|
+
var e;
|
|
435
|
+
if (F && q !== null) {
|
|
436
|
+
const t = (e = v(q)) == null ? void 0 : e.ref;
|
|
437
|
+
if (!P.current || !(t != null && t.current))
|
|
404
438
|
return;
|
|
405
|
-
|
|
439
|
+
Ae.current || t.current.focus({
|
|
406
440
|
preventScroll: !0
|
|
407
441
|
});
|
|
408
|
-
const
|
|
409
|
-
|
|
442
|
+
const u = P.current.getBoundingClientRect(), y = t.current.getBoundingClientRect();
|
|
443
|
+
y.top < u.top ? P.current.scrollTop -= u.top - y.top : y.bottom > u.bottom && (P.current.scrollTop += y.bottom - u.bottom);
|
|
410
444
|
}
|
|
411
|
-
}, [
|
|
412
|
-
const
|
|
413
|
-
var
|
|
414
|
-
if (e == null
|
|
415
|
-
const
|
|
416
|
-
type:
|
|
445
|
+
}, [F, q, v]);
|
|
446
|
+
const be = r.useCallback((e) => v(e), [v]), Be = (e) => (t) => {
|
|
447
|
+
var u;
|
|
448
|
+
if ((u = e == null ? void 0 : e.onClick) == null || u.call(e, t), !t.defaultMuiPrevented) {
|
|
449
|
+
const y = {
|
|
450
|
+
type: re.buttonClick,
|
|
417
451
|
event: t
|
|
418
452
|
};
|
|
419
|
-
|
|
453
|
+
T(y);
|
|
420
454
|
}
|
|
421
|
-
},
|
|
422
|
-
var
|
|
423
|
-
(
|
|
424
|
-
type:
|
|
455
|
+
}, Le = (e) => (t) => {
|
|
456
|
+
var u;
|
|
457
|
+
(u = e.onKeyDown) == null || u.call(e, t), !t.defaultMuiPrevented && (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), T({
|
|
458
|
+
type: G.keyDown,
|
|
425
459
|
key: t.key,
|
|
426
460
|
event: t
|
|
427
461
|
}));
|
|
428
|
-
},
|
|
429
|
-
onClick:
|
|
430
|
-
onKeyDown:
|
|
431
|
-
}),
|
|
462
|
+
}, De = (e = {}) => ({
|
|
463
|
+
onClick: Be(e),
|
|
464
|
+
onKeyDown: Le(e)
|
|
465
|
+
}), Fe = (e = {}) => ({
|
|
466
|
+
...e,
|
|
467
|
+
...De(e),
|
|
432
468
|
role: "combobox",
|
|
433
|
-
"aria-expanded":
|
|
434
|
-
"aria-controls":
|
|
435
|
-
}),
|
|
436
|
-
const t =
|
|
437
|
-
return
|
|
469
|
+
"aria-expanded": F,
|
|
470
|
+
"aria-controls": B
|
|
471
|
+
}), Ee = (e = {}) => {
|
|
472
|
+
const t = ne(e), u = le(Fe, Y);
|
|
473
|
+
return {
|
|
474
|
+
...e,
|
|
475
|
+
...u(t)
|
|
476
|
+
};
|
|
438
477
|
}, qe = (e) => (t) => {
|
|
439
|
-
var
|
|
440
|
-
(
|
|
478
|
+
var u, y;
|
|
479
|
+
(u = e.onBlur) == null || u.call(e, t), !t.defaultMuiPrevented && ((y = P.current) != null && y.contains(t.relatedTarget) || t.relatedTarget === S.current) && (t.defaultMuiPrevented = !0);
|
|
441
480
|
}, je = (e = {}) => ({
|
|
442
481
|
onBlur: qe(e)
|
|
443
482
|
}), Ue = (e = {}) => {
|
|
444
|
-
const t =
|
|
445
|
-
return
|
|
446
|
-
id:
|
|
483
|
+
const t = ne(e), u = le(je, K);
|
|
484
|
+
return {
|
|
485
|
+
id: B,
|
|
447
486
|
role: "listbox",
|
|
448
|
-
"aria-multiselectable":
|
|
449
|
-
|
|
487
|
+
"aria-multiselectable": p ? "true" : void 0,
|
|
488
|
+
...e,
|
|
489
|
+
...u(t)
|
|
490
|
+
};
|
|
450
491
|
};
|
|
451
492
|
r.useDebugValue({
|
|
452
493
|
selectedOptions: E,
|
|
453
|
-
highlightedOption:
|
|
454
|
-
open:
|
|
494
|
+
highlightedOption: q,
|
|
495
|
+
open: F
|
|
455
496
|
});
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
ye = (Oe = G(X)) != null ? Oe : null;
|
|
465
|
-
}
|
|
497
|
+
const $e = r.useMemo(() => ({
|
|
498
|
+
...oe,
|
|
499
|
+
...X
|
|
500
|
+
}), [oe, X]);
|
|
501
|
+
let W;
|
|
502
|
+
o.multiple ? W = E : W = E.length > 0 ? E[0] : null;
|
|
503
|
+
let ge;
|
|
504
|
+
p ? ge = W.map((e) => be(e)).filter((e) => e !== void 0) : ge = be(W) ?? null;
|
|
466
505
|
const ze = (e) => (t) => {
|
|
467
|
-
var
|
|
468
|
-
if (e == null
|
|
506
|
+
var y;
|
|
507
|
+
if ((y = e == null ? void 0 : e.onChange) == null || y.call(e, t), t.defaultMuiPrevented)
|
|
469
508
|
return;
|
|
470
|
-
const
|
|
471
|
-
t.target.value === "" ?
|
|
472
|
-
type:
|
|
473
|
-
}) :
|
|
474
|
-
type:
|
|
475
|
-
item:
|
|
509
|
+
const u = _.get(t.target.value);
|
|
510
|
+
t.target.value === "" ? T({
|
|
511
|
+
type: G.clearSelection
|
|
512
|
+
}) : u !== void 0 && T({
|
|
513
|
+
type: re.browserAutoFill,
|
|
514
|
+
item: u.value,
|
|
476
515
|
event: t
|
|
477
516
|
});
|
|
478
517
|
};
|
|
479
518
|
return {
|
|
480
|
-
buttonActive:
|
|
481
|
-
buttonFocusVisible:
|
|
482
|
-
buttonRef:
|
|
483
|
-
contextValue:
|
|
484
|
-
disabled:
|
|
485
|
-
dispatch:
|
|
486
|
-
getButtonProps:
|
|
519
|
+
buttonActive: Z,
|
|
520
|
+
buttonFocusVisible: H,
|
|
521
|
+
buttonRef: ae,
|
|
522
|
+
contextValue: $e,
|
|
523
|
+
disabled: c,
|
|
524
|
+
dispatch: T,
|
|
525
|
+
getButtonProps: Ee,
|
|
487
526
|
getHiddenInputProps: (e = {}) => {
|
|
488
|
-
const t =
|
|
489
|
-
return
|
|
490
|
-
name:
|
|
527
|
+
const t = ne(e);
|
|
528
|
+
return {
|
|
529
|
+
name: V,
|
|
491
530
|
tabIndex: -1,
|
|
492
531
|
"aria-hidden": !0,
|
|
493
532
|
required: k ? !0 : void 0,
|
|
494
|
-
value: A(
|
|
495
|
-
style:
|
|
496
|
-
|
|
533
|
+
value: A(ge),
|
|
534
|
+
style: rt,
|
|
535
|
+
...e,
|
|
497
536
|
onChange: ze(t)
|
|
498
|
-
}
|
|
537
|
+
};
|
|
499
538
|
},
|
|
500
539
|
getListboxProps: Ue,
|
|
501
|
-
getOptionMetadata:
|
|
502
|
-
listboxRef:
|
|
503
|
-
open:
|
|
540
|
+
getOptionMetadata: be,
|
|
541
|
+
listboxRef: j,
|
|
542
|
+
open: F,
|
|
504
543
|
options: U,
|
|
505
|
-
value:
|
|
506
|
-
highlightedOption:
|
|
544
|
+
value: W,
|
|
545
|
+
highlightedOption: q
|
|
507
546
|
};
|
|
508
547
|
}
|
|
509
|
-
function
|
|
548
|
+
function bt(o) {
|
|
510
549
|
const {
|
|
511
|
-
value:
|
|
550
|
+
value: s,
|
|
512
551
|
children: i
|
|
513
|
-
} =
|
|
514
|
-
dispatch:
|
|
515
|
-
getItemIndex:
|
|
516
|
-
getItemState:
|
|
517
|
-
registerItem:
|
|
518
|
-
totalSubitemCount:
|
|
519
|
-
} =
|
|
520
|
-
dispatch:
|
|
521
|
-
getItemState:
|
|
522
|
-
getItemIndex:
|
|
523
|
-
}), [
|
|
524
|
-
getItemIndex:
|
|
525
|
-
registerItem:
|
|
526
|
-
totalSubitemCount:
|
|
527
|
-
}), [
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
value:
|
|
530
|
-
children: /* @__PURE__ */
|
|
531
|
-
value:
|
|
552
|
+
} = o, {
|
|
553
|
+
dispatch: a,
|
|
554
|
+
getItemIndex: l,
|
|
555
|
+
getItemState: c,
|
|
556
|
+
registerItem: m,
|
|
557
|
+
totalSubitemCount: b
|
|
558
|
+
} = s, p = r.useMemo(() => ({
|
|
559
|
+
dispatch: a,
|
|
560
|
+
getItemState: c,
|
|
561
|
+
getItemIndex: l
|
|
562
|
+
}), [a, l, c]), V = r.useMemo(() => ({
|
|
563
|
+
getItemIndex: l,
|
|
564
|
+
registerItem: m,
|
|
565
|
+
totalSubitemCount: b
|
|
566
|
+
}), [m, l, b]);
|
|
567
|
+
return /* @__PURE__ */ f(tt.Provider, {
|
|
568
|
+
value: V,
|
|
569
|
+
children: /* @__PURE__ */ f(Ce.Provider, {
|
|
570
|
+
value: p,
|
|
532
571
|
children: i
|
|
533
572
|
})
|
|
534
573
|
});
|
|
535
574
|
}
|
|
536
|
-
const
|
|
537
|
-
function
|
|
538
|
-
return
|
|
575
|
+
const ke = "Select";
|
|
576
|
+
function gt(o) {
|
|
577
|
+
return ye(ke, o);
|
|
539
578
|
}
|
|
540
|
-
|
|
541
|
-
var
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
children: n.map((i) => i.label).join(", ")
|
|
547
|
-
}) : (o = n == null ? void 0 : n.label) != null ? o : null;
|
|
579
|
+
Re(ke, ["root", "button", "listbox", "popup", "active", "expanded", "disabled", "focusVisible"]);
|
|
580
|
+
var Pe;
|
|
581
|
+
function ht(o) {
|
|
582
|
+
return Array.isArray(o) ? /* @__PURE__ */ f(r.Fragment, {
|
|
583
|
+
children: o.map((s) => s.label).join(", ")
|
|
584
|
+
}) : (o == null ? void 0 : o.label) ?? null;
|
|
548
585
|
}
|
|
549
|
-
function
|
|
586
|
+
function xt(o) {
|
|
550
587
|
const {
|
|
551
|
-
active:
|
|
588
|
+
active: s,
|
|
552
589
|
disabled: i,
|
|
553
|
-
open:
|
|
554
|
-
focusVisible:
|
|
555
|
-
} =
|
|
556
|
-
return
|
|
557
|
-
root: ["root", i && "disabled",
|
|
590
|
+
open: a,
|
|
591
|
+
focusVisible: l
|
|
592
|
+
} = o;
|
|
593
|
+
return Se({
|
|
594
|
+
root: ["root", i && "disabled", l && "focusVisible", s && "active", a && "expanded"],
|
|
558
595
|
listbox: ["listbox", i && "disabled"],
|
|
559
596
|
popup: ["popup"]
|
|
560
|
-
},
|
|
597
|
+
}, Ve(gt));
|
|
561
598
|
}
|
|
562
|
-
const
|
|
563
|
-
var c, s, u, p, f;
|
|
599
|
+
const ve = /* @__PURE__ */ r.forwardRef(function(s, i) {
|
|
564
600
|
const {
|
|
565
|
-
areOptionsEqual:
|
|
566
|
-
autoComplete:
|
|
567
|
-
autoFocus:
|
|
568
|
-
children:
|
|
569
|
-
defaultValue:
|
|
570
|
-
defaultListboxOpen:
|
|
571
|
-
disabled:
|
|
572
|
-
getSerializedValue:
|
|
573
|
-
listboxId:
|
|
574
|
-
listboxOpen:
|
|
575
|
-
multiple:
|
|
576
|
-
name:
|
|
577
|
-
required:
|
|
578
|
-
onChange:
|
|
579
|
-
onListboxOpenChange:
|
|
580
|
-
getOptionAsString:
|
|
581
|
-
renderValue:
|
|
582
|
-
placeholder:
|
|
601
|
+
areOptionsEqual: a,
|
|
602
|
+
autoComplete: l,
|
|
603
|
+
autoFocus: c,
|
|
604
|
+
children: m,
|
|
605
|
+
defaultValue: b,
|
|
606
|
+
defaultListboxOpen: p = !1,
|
|
607
|
+
disabled: V,
|
|
608
|
+
getSerializedValue: k,
|
|
609
|
+
listboxId: g,
|
|
610
|
+
listboxOpen: w,
|
|
611
|
+
multiple: h = !1,
|
|
612
|
+
name: I,
|
|
613
|
+
required: O = !1,
|
|
614
|
+
onChange: x,
|
|
615
|
+
onListboxOpenChange: A,
|
|
616
|
+
getOptionAsString: d = Ne,
|
|
617
|
+
renderValue: C,
|
|
618
|
+
placeholder: S,
|
|
583
619
|
slotProps: M = {},
|
|
584
|
-
slots:
|
|
585
|
-
value:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
620
|
+
slots: P = {},
|
|
621
|
+
value: B,
|
|
622
|
+
...N
|
|
623
|
+
} = s, L = C ?? ht, [D, X] = r.useState(!1), _ = r.useRef(null), ie = r.useRef(null), Y = P.root ?? "button", Z = P.listbox ?? "ul", H = P.popup ?? "div", ae = r.useCallback((j) => {
|
|
624
|
+
X(j != null);
|
|
625
|
+
}, []), U = Q(i, _, ae);
|
|
589
626
|
r.useEffect(() => {
|
|
590
|
-
|
|
591
|
-
}, [
|
|
627
|
+
c && _.current.focus();
|
|
628
|
+
}, [c]);
|
|
592
629
|
const {
|
|
593
|
-
buttonActive:
|
|
594
|
-
buttonFocusVisible:
|
|
595
|
-
contextValue:
|
|
596
|
-
disabled:
|
|
597
|
-
getButtonProps:
|
|
598
|
-
getListboxProps:
|
|
599
|
-
getHiddenInputProps:
|
|
600
|
-
getOptionMetadata:
|
|
601
|
-
value:
|
|
602
|
-
open:
|
|
603
|
-
} =
|
|
604
|
-
name:
|
|
605
|
-
required:
|
|
606
|
-
getSerializedValue:
|
|
607
|
-
areOptionsEqual:
|
|
608
|
-
buttonRef:
|
|
609
|
-
defaultOpen:
|
|
610
|
-
defaultValue:
|
|
611
|
-
disabled:
|
|
612
|
-
listboxId:
|
|
613
|
-
multiple:
|
|
614
|
-
open:
|
|
615
|
-
onChange:
|
|
616
|
-
onOpenChange:
|
|
617
|
-
getOptionAsString:
|
|
618
|
-
value:
|
|
630
|
+
buttonActive: v,
|
|
631
|
+
buttonFocusVisible: ue,
|
|
632
|
+
contextValue: ce,
|
|
633
|
+
disabled: pe,
|
|
634
|
+
getButtonProps: de,
|
|
635
|
+
getListboxProps: fe,
|
|
636
|
+
getHiddenInputProps: me,
|
|
637
|
+
getOptionMetadata: ee,
|
|
638
|
+
value: z,
|
|
639
|
+
open: te
|
|
640
|
+
} = mt({
|
|
641
|
+
name: I,
|
|
642
|
+
required: O,
|
|
643
|
+
getSerializedValue: k,
|
|
644
|
+
areOptionsEqual: a,
|
|
645
|
+
buttonRef: U,
|
|
646
|
+
defaultOpen: p,
|
|
647
|
+
defaultValue: b,
|
|
648
|
+
disabled: V,
|
|
649
|
+
listboxId: g,
|
|
650
|
+
multiple: h,
|
|
651
|
+
open: w,
|
|
652
|
+
onChange: x,
|
|
653
|
+
onOpenChange: A,
|
|
654
|
+
getOptionAsString: d,
|
|
655
|
+
value: B,
|
|
619
656
|
componentName: "Select"
|
|
620
|
-
}),
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
657
|
+
}), T = {
|
|
658
|
+
...s,
|
|
659
|
+
active: v,
|
|
660
|
+
defaultListboxOpen: p,
|
|
661
|
+
disabled: pe,
|
|
662
|
+
focusVisible: ue,
|
|
663
|
+
open: te,
|
|
664
|
+
multiple: h,
|
|
665
|
+
renderValue: L,
|
|
666
|
+
value: z
|
|
667
|
+
}, K = xt(T), oe = se({
|
|
668
|
+
elementType: Y,
|
|
669
|
+
getSlotProps: de,
|
|
632
670
|
externalSlotProps: M.root,
|
|
633
|
-
externalForwardedProps:
|
|
634
|
-
ownerState:
|
|
635
|
-
className:
|
|
636
|
-
}),
|
|
637
|
-
elementType:
|
|
638
|
-
getSlotProps:
|
|
671
|
+
externalForwardedProps: N,
|
|
672
|
+
ownerState: T,
|
|
673
|
+
className: K.root
|
|
674
|
+
}), F = se({
|
|
675
|
+
elementType: Z,
|
|
676
|
+
getSlotProps: fe,
|
|
639
677
|
externalSlotProps: M.listbox,
|
|
640
678
|
additionalProps: {
|
|
641
|
-
ref:
|
|
679
|
+
ref: ie
|
|
642
680
|
},
|
|
643
|
-
ownerState:
|
|
644
|
-
className:
|
|
645
|
-
}),
|
|
646
|
-
elementType:
|
|
681
|
+
ownerState: T,
|
|
682
|
+
className: K.listbox
|
|
683
|
+
}), q = se({
|
|
684
|
+
elementType: H,
|
|
647
685
|
externalSlotProps: M.popup,
|
|
648
686
|
additionalProps: {
|
|
649
|
-
anchor:
|
|
687
|
+
anchor: _.current,
|
|
650
688
|
keepMounted: !0,
|
|
651
|
-
open:
|
|
689
|
+
open: te,
|
|
652
690
|
placement: "bottom-start",
|
|
653
691
|
role: void 0
|
|
654
692
|
},
|
|
655
|
-
ownerState:
|
|
656
|
-
className:
|
|
693
|
+
ownerState: T,
|
|
694
|
+
className: K.popup
|
|
657
695
|
});
|
|
658
|
-
let
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
Ve || (Ve = /* @__PURE__ */ m("span", {
|
|
671
|
-
className: "notranslate",
|
|
672
|
-
children: ""
|
|
673
|
-
}))
|
|
674
|
-
)
|
|
675
|
-
})), ce && /* @__PURE__ */ m(Ze, g({
|
|
696
|
+
let E;
|
|
697
|
+
return h ? E = z.map((j) => ee(j)).filter((j) => j !== void 0) : E = ee(z) ?? null, /* @__PURE__ */ J(r.Fragment, {
|
|
698
|
+
children: [/* @__PURE__ */ f(Y, {
|
|
699
|
+
...oe,
|
|
700
|
+
children: L(E) ?? S ?? // fall back to a zero-width space to prevent layout shift
|
|
701
|
+
// from https://github.com/mui/material-ui/pull/24563
|
|
702
|
+
(Pe || (Pe = /* @__PURE__ */ f("span", {
|
|
703
|
+
className: "notranslate",
|
|
704
|
+
"aria-hidden": !0,
|
|
705
|
+
children: ""
|
|
706
|
+
})))
|
|
707
|
+
}), D && /* @__PURE__ */ f(Ye, {
|
|
676
708
|
slots: {
|
|
677
|
-
root:
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
children: /* @__PURE__ */
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
709
|
+
root: H
|
|
710
|
+
},
|
|
711
|
+
...q,
|
|
712
|
+
children: /* @__PURE__ */ f(Z, {
|
|
713
|
+
...F,
|
|
714
|
+
children: /* @__PURE__ */ f(bt, {
|
|
715
|
+
value: ce,
|
|
716
|
+
children: m
|
|
684
717
|
})
|
|
685
|
-
})
|
|
686
|
-
})
|
|
687
|
-
|
|
688
|
-
|
|
718
|
+
})
|
|
719
|
+
}), /* @__PURE__ */ f("input", {
|
|
720
|
+
...me(),
|
|
721
|
+
autoComplete: l
|
|
722
|
+
})]
|
|
689
723
|
});
|
|
690
724
|
});
|
|
691
|
-
process.env.NODE_ENV !== "production" && (
|
|
725
|
+
process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
692
726
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
693
727
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
694
728
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -700,40 +734,40 @@ process.env.NODE_ENV !== "production" && ($e.propTypes = {
|
|
|
700
734
|
* There is a performance impact when using the `areOptionsEqual` prop (proportional to the number of options).
|
|
701
735
|
* Therefore, it's recommented to use the default reference equality comparison whenever possible.
|
|
702
736
|
*/
|
|
703
|
-
areOptionsEqual:
|
|
737
|
+
areOptionsEqual: n.func,
|
|
704
738
|
/**
|
|
705
739
|
* This prop helps users to fill forms faster, especially on mobile devices.
|
|
706
740
|
* The name can be confusing, as it's more like an autofill.
|
|
707
741
|
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
|
708
742
|
*/
|
|
709
|
-
autoComplete:
|
|
743
|
+
autoComplete: n.string,
|
|
710
744
|
/**
|
|
711
745
|
* If `true`, the select element is focused during the first mount
|
|
712
746
|
* @default false
|
|
713
747
|
*/
|
|
714
|
-
autoFocus:
|
|
748
|
+
autoFocus: n.bool,
|
|
715
749
|
/**
|
|
716
750
|
* @ignore
|
|
717
751
|
*/
|
|
718
|
-
children:
|
|
752
|
+
children: n.node,
|
|
719
753
|
/**
|
|
720
754
|
* @ignore
|
|
721
755
|
*/
|
|
722
|
-
className:
|
|
756
|
+
className: n.string,
|
|
723
757
|
/**
|
|
724
758
|
* If `true`, the select will be initially open.
|
|
725
759
|
* @default false
|
|
726
760
|
*/
|
|
727
|
-
defaultListboxOpen:
|
|
761
|
+
defaultListboxOpen: n.bool,
|
|
728
762
|
/**
|
|
729
763
|
* The default selected value. Use when the component is not controlled.
|
|
730
764
|
*/
|
|
731
|
-
defaultValue:
|
|
765
|
+
defaultValue: n.any,
|
|
732
766
|
/**
|
|
733
767
|
* If `true`, the select is disabled.
|
|
734
768
|
* @default false
|
|
735
769
|
*/
|
|
736
|
-
disabled:
|
|
770
|
+
disabled: n.bool,
|
|
737
771
|
/**
|
|
738
772
|
* A function used to convert the option label to a string.
|
|
739
773
|
* It's useful when labels are elements and need to be converted to plain text
|
|
@@ -741,182 +775,182 @@ process.env.NODE_ENV !== "production" && ($e.propTypes = {
|
|
|
741
775
|
*
|
|
742
776
|
* @default defaultOptionStringifier
|
|
743
777
|
*/
|
|
744
|
-
getOptionAsString:
|
|
778
|
+
getOptionAsString: n.func,
|
|
745
779
|
/**
|
|
746
780
|
* A function to convert the currently selected value to a string.
|
|
747
781
|
* Used to set a value of a hidden input associated with the select,
|
|
748
782
|
* so that the selected value can be posted with a form.
|
|
749
783
|
*/
|
|
750
|
-
getSerializedValue:
|
|
784
|
+
getSerializedValue: n.func,
|
|
751
785
|
/**
|
|
752
786
|
* `id` attribute of the listbox element.
|
|
753
787
|
*/
|
|
754
|
-
listboxId:
|
|
788
|
+
listboxId: n.string,
|
|
755
789
|
/**
|
|
756
790
|
* Controls the open state of the select's listbox.
|
|
757
791
|
* @default undefined
|
|
758
792
|
*/
|
|
759
|
-
listboxOpen:
|
|
793
|
+
listboxOpen: n.bool,
|
|
760
794
|
/**
|
|
761
795
|
* If `true`, selecting multiple values is allowed.
|
|
762
796
|
* This affects the type of the `value`, `defaultValue`, and `onChange` props.
|
|
763
797
|
*
|
|
764
798
|
* @default false
|
|
765
799
|
*/
|
|
766
|
-
multiple:
|
|
800
|
+
multiple: n.bool,
|
|
767
801
|
/**
|
|
768
802
|
* Name of the element. For example used by the server to identify the fields in form submits.
|
|
769
803
|
*/
|
|
770
|
-
name:
|
|
804
|
+
name: n.string,
|
|
771
805
|
/**
|
|
772
806
|
* Callback fired when an option is selected.
|
|
773
807
|
*/
|
|
774
|
-
onChange:
|
|
808
|
+
onChange: n.func,
|
|
775
809
|
/**
|
|
776
810
|
* Callback fired when the component requests to be opened.
|
|
777
811
|
* Use in controlled mode (see listboxOpen).
|
|
778
812
|
*/
|
|
779
|
-
onListboxOpenChange:
|
|
813
|
+
onListboxOpenChange: n.func,
|
|
780
814
|
/**
|
|
781
815
|
* Text to show when there is no selected value.
|
|
782
816
|
*/
|
|
783
|
-
placeholder:
|
|
817
|
+
placeholder: n.node,
|
|
784
818
|
/**
|
|
785
819
|
* Function that customizes the rendering of the selected value.
|
|
786
820
|
*/
|
|
787
|
-
renderValue:
|
|
821
|
+
renderValue: n.func,
|
|
788
822
|
/**
|
|
789
823
|
* If `true`, the Select cannot be empty when submitting form.
|
|
790
824
|
* @default false
|
|
791
825
|
*/
|
|
792
|
-
required:
|
|
826
|
+
required: n.bool,
|
|
793
827
|
/**
|
|
794
828
|
* The props used for each slot inside the Input.
|
|
795
829
|
* @default {}
|
|
796
830
|
*/
|
|
797
|
-
slotProps:
|
|
798
|
-
listbox:
|
|
799
|
-
popup:
|
|
800
|
-
root:
|
|
831
|
+
slotProps: n.shape({
|
|
832
|
+
listbox: n.oneOfType([n.func, n.object]),
|
|
833
|
+
popup: n.oneOfType([n.func, n.object]),
|
|
834
|
+
root: n.oneOfType([n.func, n.object])
|
|
801
835
|
}),
|
|
802
836
|
/**
|
|
803
837
|
* The components used for each slot inside the Select.
|
|
804
838
|
* Either a string to use a HTML element or a component.
|
|
805
839
|
* @default {}
|
|
806
840
|
*/
|
|
807
|
-
slots:
|
|
808
|
-
listbox:
|
|
809
|
-
popup:
|
|
810
|
-
root:
|
|
841
|
+
slots: n.shape({
|
|
842
|
+
listbox: n.elementType,
|
|
843
|
+
popup: n.elementType,
|
|
844
|
+
root: n.elementType
|
|
811
845
|
}),
|
|
812
846
|
/**
|
|
813
847
|
* The selected value.
|
|
814
848
|
* Set to `null` to deselect all options.
|
|
815
849
|
*/
|
|
816
|
-
value:
|
|
850
|
+
value: n.any
|
|
817
851
|
});
|
|
818
|
-
const
|
|
819
|
-
const { children:
|
|
820
|
-
return /* @__PURE__ */
|
|
821
|
-
|
|
852
|
+
const Te = Ke({}), Ct = () => Je(Te), Pt = (o) => {
|
|
853
|
+
const { children: s, icon: i, className: a, ...l } = o, { multiple: c, selectedValue: m = [] } = Ct();
|
|
854
|
+
return /* @__PURE__ */ J(
|
|
855
|
+
Me,
|
|
822
856
|
{
|
|
823
|
-
...
|
|
857
|
+
...l,
|
|
824
858
|
slotProps: {
|
|
825
|
-
root: (
|
|
826
|
-
className:
|
|
827
|
-
[
|
|
828
|
-
[
|
|
859
|
+
root: (b) => ({
|
|
860
|
+
className: $(R.select__listbox__option, a, {
|
|
861
|
+
[R["select__listbox__option--disabled"]]: b.disabled,
|
|
862
|
+
[R["select__listbox__option--selected"]]: b.selected && !c
|
|
829
863
|
})
|
|
830
864
|
})
|
|
831
865
|
},
|
|
832
866
|
children: [
|
|
833
|
-
|
|
867
|
+
c && /* @__PURE__ */ f(Ge, { checked: m == null ? void 0 : m.includes(l.value), onChange: () => {
|
|
834
868
|
} }),
|
|
835
|
-
i ? /* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
869
|
+
i ? /* @__PURE__ */ f("span", { className: R.select__listbox__option__icon, children: i }) : "",
|
|
870
|
+
/* @__PURE__ */ f(xe, { className: R.select__listbox__option__text, children: s })
|
|
837
871
|
]
|
|
838
872
|
}
|
|
839
873
|
);
|
|
840
|
-
},
|
|
874
|
+
}, yt = (o) => {
|
|
841
875
|
const {
|
|
842
|
-
children:
|
|
876
|
+
children: s,
|
|
843
877
|
className: i,
|
|
844
|
-
id:
|
|
845
|
-
onChange:
|
|
846
|
-
label:
|
|
847
|
-
required:
|
|
848
|
-
multiple:
|
|
849
|
-
value:
|
|
850
|
-
classNameWrapper:
|
|
878
|
+
id: a,
|
|
879
|
+
onChange: l,
|
|
880
|
+
label: c,
|
|
881
|
+
required: m,
|
|
882
|
+
multiple: b,
|
|
883
|
+
value: p,
|
|
884
|
+
classNameWrapper: V,
|
|
851
885
|
classNameLabel: k,
|
|
852
|
-
testIdLabel:
|
|
853
|
-
testIdWrapper:
|
|
854
|
-
fullWidth:
|
|
886
|
+
testIdLabel: g,
|
|
887
|
+
testIdWrapper: w,
|
|
888
|
+
fullWidth: h = !0,
|
|
855
889
|
infoMessage: I,
|
|
856
890
|
error: O,
|
|
857
891
|
errorMessage: x,
|
|
858
892
|
classNameInfoMessage: A,
|
|
859
|
-
classNameErrorMessage:
|
|
893
|
+
classNameErrorMessage: d,
|
|
860
894
|
"data-testid-infoMessage": C,
|
|
861
|
-
"data-testid-errorMessage":
|
|
862
|
-
...
|
|
863
|
-
} =
|
|
864
|
-
|
|
865
|
-
},
|
|
866
|
-
return /* @__PURE__ */
|
|
895
|
+
"data-testid-errorMessage": S,
|
|
896
|
+
...M
|
|
897
|
+
} = o, P = (L, D) => {
|
|
898
|
+
L && (l == null || l(D, L));
|
|
899
|
+
}, B = We(), N = a || `select_${B.replace(/:/g, "-")}`;
|
|
900
|
+
return /* @__PURE__ */ J(
|
|
867
901
|
"div",
|
|
868
902
|
{
|
|
869
|
-
className:
|
|
870
|
-
|
|
871
|
-
!
|
|
872
|
-
|
|
903
|
+
className: $(
|
|
904
|
+
R.select__wrapper,
|
|
905
|
+
!h && R["select__wrapper--fit-content-width"],
|
|
906
|
+
V
|
|
873
907
|
),
|
|
874
|
-
"data-testid":
|
|
875
|
-
id: `${
|
|
908
|
+
"data-testid": w,
|
|
909
|
+
id: `${N}_wrapper`,
|
|
876
910
|
children: [
|
|
877
|
-
|
|
878
|
-
|
|
911
|
+
c && /* @__PURE__ */ J(
|
|
912
|
+
xe,
|
|
879
913
|
{
|
|
880
914
|
element: "label",
|
|
881
915
|
bold: !0,
|
|
882
|
-
elementProps: { htmlFor:
|
|
883
|
-
className:
|
|
884
|
-
"data-testid":
|
|
916
|
+
elementProps: { htmlFor: N, id: `${N}_label` },
|
|
917
|
+
className: $(R.select__label, k),
|
|
918
|
+
"data-testid": g,
|
|
885
919
|
children: [
|
|
886
|
-
|
|
887
|
-
|
|
920
|
+
c,
|
|
921
|
+
m && /* @__PURE__ */ f("span", { children: "*" })
|
|
888
922
|
]
|
|
889
923
|
}
|
|
890
924
|
),
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
|
|
925
|
+
/* @__PURE__ */ f(Te.Provider, { value: { multiple: b, selectedValue: p, onChange: l }, children: /* @__PURE__ */ f(
|
|
926
|
+
ve,
|
|
893
927
|
{
|
|
894
|
-
...
|
|
895
|
-
value:
|
|
896
|
-
id:
|
|
897
|
-
onChange:
|
|
898
|
-
className:
|
|
899
|
-
slots: { root:
|
|
900
|
-
multiple:
|
|
928
|
+
...M,
|
|
929
|
+
value: p,
|
|
930
|
+
id: N,
|
|
931
|
+
onChange: P,
|
|
932
|
+
className: $(R.select, i, (O || x) && R["select-button--error"]),
|
|
933
|
+
slots: { root: Xe },
|
|
934
|
+
multiple: b,
|
|
901
935
|
slotProps: {
|
|
902
|
-
root: { fullWidth:
|
|
903
|
-
listbox: { className:
|
|
936
|
+
root: { fullWidth: h, placeholder: M.placeholder },
|
|
937
|
+
listbox: { className: R.select__listbox },
|
|
904
938
|
popup: {
|
|
905
|
-
className:
|
|
939
|
+
className: R.select__popup,
|
|
906
940
|
disablePortal: !0,
|
|
907
941
|
strategy: "absolute"
|
|
908
942
|
}
|
|
909
943
|
},
|
|
910
|
-
children:
|
|
944
|
+
children: s
|
|
911
945
|
}
|
|
912
946
|
) }),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
|
|
947
|
+
/* @__PURE__ */ f("div", { className: R["messages-wrapper"], children: (x || I) && /* @__PURE__ */ J(
|
|
948
|
+
xe,
|
|
915
949
|
{
|
|
916
|
-
className: x ?
|
|
917
|
-
"data-testid": x ?
|
|
950
|
+
className: x ? $(R["error-message"], d) : $(R["info-message"], A),
|
|
951
|
+
"data-testid": x ? S : C,
|
|
918
952
|
children: [
|
|
919
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ f(Qe, { icon: x ? "circle-exclamation" : "circle-info" }),
|
|
920
954
|
x || I
|
|
921
955
|
]
|
|
922
956
|
}
|
|
@@ -925,10 +959,10 @@ const He = We({}), Rt = () => Ge(He), _t = (n) => {
|
|
|
925
959
|
}
|
|
926
960
|
);
|
|
927
961
|
};
|
|
928
|
-
|
|
962
|
+
yt.Option = Pt;
|
|
929
963
|
export {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
964
|
+
yt as Select,
|
|
965
|
+
Te as SelectContext,
|
|
966
|
+
Pt as SelectOption,
|
|
967
|
+
Ct as useSelectContext
|
|
934
968
|
};
|