@hybridcore/ui 1.3.3 → 1.3.5

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.
Files changed (67) hide show
  1. package/dist/{ButtonBase-DE8d_U2E.js → ButtonBase-D6qhsxB0.js} +201 -210
  2. package/dist/{CardContent-Du2i427Y.js → CardContent-B8hqgH-I.js} +15 -15
  3. package/dist/{Checkbox-BGNAqLl0.js → Checkbox-BFWhj3s-.js} +154 -144
  4. package/dist/{Collapse-FRd0_2Pt.js → Collapse-D_TjnyE5.js} +96 -87
  5. package/dist/DialogContent-BCYm_d1s.js +864 -0
  6. package/dist/{FormControl-ChTmxscy.js → FormControl-BMRUQKHh.js} +479 -449
  7. package/dist/FormControlLabel-DENNVXWL.js +639 -0
  8. package/dist/{IconButton-Cu_XEJB2.js → IconButton-D8bwME9t.js} +22 -22
  9. package/dist/{Input-DU22-Zbo.js → Input-Dxzguyp5.js} +34 -34
  10. package/dist/{InputAdornment-6aeADcPO.js → InputAdornment-B8ERE7Zv.js} +12 -12
  11. package/dist/{List-nOXr-cFJ.js → List-DEWyK9IO.js} +12 -12
  12. package/dist/{MenuItem-DF45rx2m.js → MenuItem-DstAFfik.js} +26 -26
  13. package/dist/Modal-DNGEQJ1M.js +1267 -0
  14. package/dist/{OutlinedInput-DJCHjkR3.js → OutlinedInput-w2Cj9STF.js} +75 -78
  15. package/dist/{Paper-CD_ma6NJ.js → Paper-BseeergJ.js} +15 -15
  16. package/dist/Select-NDq3WyLt.js +2175 -0
  17. package/dist/Typography-Dg-ROiTA.js +201 -0
  18. package/dist/components/card/index.js +17 -17
  19. package/dist/components/card/styled.js +1 -1
  20. package/dist/components/collapsible-card/style.js +222 -302
  21. package/dist/components/confirm/dialog.js +13 -13
  22. package/dist/components/container/index.js +19 -19
  23. package/dist/components/context-menu/index.js +616 -203
  24. package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
  25. package/dist/components/data-management/instance-form/components/variable/index.js +6 -6
  26. package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
  27. package/dist/components/geometry-picker/index.js +3 -3
  28. package/dist/components/icon-button/index.js +1 -1
  29. package/dist/components/map/styled.js +14 -14
  30. package/dist/components/search-input/index.js +4 -4
  31. package/dist/components/template-property-filters/index.js +1 -1
  32. package/dist/components/template-property-filters/property.js +209 -10
  33. package/dist/components/tree-select/index.js +4 -4
  34. package/dist/components/treeview-filter/index.js +29 -30
  35. package/dist/components/treeview-filter/item/index.js +1 -1
  36. package/dist/components/treeview-filter/item-label/index.js +2 -2
  37. package/dist/createStyled-B96gjom1.js +1887 -0
  38. package/dist/createSvgIcon-B2WT0K4k.js +87 -0
  39. package/dist/{createSvgIcon-DPZ7UbxM.js → createSvgIcon-BNrb7rDY.js} +82 -85
  40. package/dist/{exactProp--3vlJ9a9.js → exactProp-CI_rjX83.js} +2 -2
  41. package/dist/{index-CtuBGOmk.js → index-B3Oj04nl.js} +5 -5
  42. package/dist/{index-DzFccwzL.js → index-CSfSVkKj.js} +204 -218
  43. package/dist/{listItemTextClasses-2BAu-hye.js → listItemTextClasses-CFiI_U7B.js} +2 -2
  44. package/dist/main.js +150 -144
  45. package/dist/styled-cPJbqF0E.js +677 -0
  46. package/dist/useTheme-C-T6Qisa.js +10 -0
  47. package/dist/useThemeProps-DeftUmqJ.js +107 -0
  48. package/dist/{utils-qcu0RzdN.js → utils-CCkxV0lZ.js} +15 -15
  49. package/package.json +3 -3
  50. package/dist/DialogContent-CKeAZ3Ts.js +0 -1982
  51. package/dist/FormControlLabel-Df7csguX.js +0 -827
  52. package/dist/ListItem-RJvRMwkZ.js +0 -428
  53. package/dist/Select-C1jD_gBQ.js +0 -2305
  54. package/dist/Typography-C2BkMNk-.js +0 -178
  55. package/dist/chainPropTypes-GRMJ22CO.js +0 -96
  56. package/dist/createSvgIcon-6wv0RQr3.js +0 -63
  57. package/dist/createTheme-C3DKplhE.js +0 -2395
  58. package/dist/property-BSufYw1E.js +0 -6888
  59. package/dist/requirePropFactory-BItwGLRQ.js +0 -18
  60. package/dist/resolveComponentProps-DozbaB8e.js +0 -54
  61. package/dist/styled-CVWGE9ik.js +0 -142
  62. package/dist/styled-iyoioZCr.js +0 -1033
  63. package/dist/unsupportedProp-BuVD30Gh.js +0 -9
  64. package/dist/useTheme--x3BjP9A.js +0 -17
  65. package/dist/useTheme-pWltVFb2.js +0 -10
  66. package/dist/useThemeProps-C90JF0Qc.js +0 -62
  67. package/dist/useThemeProps-DNZoozBw.js +0 -26
@@ -0,0 +1,2175 @@
1
+ import { a as X, _ as c } from "./extends-Cyw62AD_.js";
2
+ import * as i from "react";
3
+ import { r as Ne, P as e, a as Ee, f as gn, b as Je } from "./createStyled-B96gjom1.js";
4
+ import { g as le, u as Pe, c as oe, b as vn, a as ce } from "./useThemeProps-DeftUmqJ.js";
5
+ import { g as ue, s as V, r as Oe, b as yn } from "./styled-cPJbqF0E.js";
6
+ import { u as Qe } from "./useTheme-C-T6Qisa.js";
7
+ import { jsx as $, jsxs as Ze } from "react/jsx-runtime";
8
+ import { g as En, M as Pn, H as Me } from "./Modal-DNGEQJ1M.js";
9
+ import { P as en, i as On } from "./Paper-BseeergJ.js";
10
+ import { u as Rn, a as pe, r as Re, e as Cn } from "./ButtonBase-D6qhsxB0.js";
11
+ import { o as ae } from "./ownerDocument-CUrv0DIK.js";
12
+ import { o as Be } from "./ownerWindow-niciwP7I.js";
13
+ import { d as Tn } from "./debounce-46wSf_lW.js";
14
+ import { T as In, r as Sn, g as Ve } from "./utils-CCkxV0lZ.js";
15
+ import { e as xn } from "./exactProp-CI_rjX83.js";
16
+ import { a as Mn } from "./List-DEWyK9IO.js";
17
+ import { e as wn, i as Nn, a as Fn, r as Dn, b as $n, c as kn, d as jn, f as Ln } from "./FormControl-BMRUQKHh.js";
18
+ import { u as We, c as _n } from "./createSvgIcon-BNrb7rDY.js";
19
+ import { u as An } from "./useFormControl-CatNKXAi.js";
20
+ import { I as Bn } from "./Input-Dxzguyp5.js";
21
+ import { O as Vn } from "./OutlinedInput-w2Cj9STF.js";
22
+ const Wn = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
23
+ function Se(n, t, o) {
24
+ return n === t ? n.firstChild : t && t.nextElementSibling ? t.nextElementSibling : o ? null : n.firstChild;
25
+ }
26
+ function Ue(n, t, o) {
27
+ return n === t ? o ? n.firstChild : n.lastChild : t && t.previousElementSibling ? t.previousElementSibling : o ? null : n.lastChild;
28
+ }
29
+ function nn(n, t) {
30
+ if (t === void 0)
31
+ return !0;
32
+ let o = n.innerText;
33
+ return o === void 0 && (o = n.textContent), o = o.trim().toLowerCase(), o.length === 0 ? !1 : t.repeating ? o[0] === t.keys[0] : o.indexOf(t.keys.join("")) === 0;
34
+ }
35
+ function se(n, t, o, s, b, l) {
36
+ let u = !1, d = b(n, t, t ? o : !1);
37
+ for (; d; ) {
38
+ if (d === n.firstChild) {
39
+ if (u)
40
+ return !1;
41
+ u = !0;
42
+ }
43
+ const P = s ? !1 : d.disabled || d.getAttribute("aria-disabled") === "true";
44
+ if (!d.hasAttribute("tabindex") || !nn(d, l) || P)
45
+ d = b(n, d, o);
46
+ else
47
+ return d.focus(), !0;
48
+ }
49
+ return !1;
50
+ }
51
+ const tn = /* @__PURE__ */ i.forwardRef(function(t, o) {
52
+ const {
53
+ // private
54
+ // eslint-disable-next-line react/prop-types
55
+ actions: s,
56
+ autoFocus: b = !1,
57
+ autoFocusItem: l = !1,
58
+ children: u,
59
+ className: d,
60
+ disabledItemsFocusable: P = !1,
61
+ disableListWrap: x = !1,
62
+ onKeyDown: N,
63
+ variant: F = "selectedMenu"
64
+ } = t, k = X(t, Wn), f = i.useRef(null), I = i.useRef({
65
+ keys: [],
66
+ repeating: !0,
67
+ previousKeyMatched: !0,
68
+ lastTime: null
69
+ });
70
+ Rn(() => {
71
+ b && f.current.focus();
72
+ }, [b]), i.useImperativeHandle(s, () => ({
73
+ adjustStyleForScrollbar: (a, p) => {
74
+ const R = !f.current.style.width;
75
+ if (a.clientHeight < f.current.clientHeight && R) {
76
+ const S = `${En(ae(a))}px`;
77
+ f.current.style[p.direction === "rtl" ? "paddingLeft" : "paddingRight"] = S, f.current.style.width = `calc(100% + ${S})`;
78
+ }
79
+ return f.current;
80
+ }
81
+ }), []);
82
+ const O = (a) => {
83
+ const p = f.current, R = a.key, S = ae(p).activeElement;
84
+ if (R === "ArrowDown")
85
+ a.preventDefault(), se(p, S, x, P, Se);
86
+ else if (R === "ArrowUp")
87
+ a.preventDefault(), se(p, S, x, P, Ue);
88
+ else if (R === "Home")
89
+ a.preventDefault(), se(p, null, x, P, Se);
90
+ else if (R === "End")
91
+ a.preventDefault(), se(p, null, x, P, Ue);
92
+ else if (R.length === 1) {
93
+ const g = I.current, _ = R.toLowerCase(), L = performance.now();
94
+ g.keys.length > 0 && (L - g.lastTime > 500 ? (g.keys = [], g.repeating = !0, g.previousKeyMatched = !0) : g.repeating && _ !== g.keys[0] && (g.repeating = !1)), g.lastTime = L, g.keys.push(_);
95
+ const M = S && !g.repeating && nn(S, g);
96
+ g.previousKeyMatched && (M || se(p, S, !1, P, Se, g)) ? a.preventDefault() : g.previousKeyMatched = !1;
97
+ }
98
+ N && N(a);
99
+ }, w = pe(f, o);
100
+ let E = -1;
101
+ i.Children.forEach(u, (a, p) => {
102
+ /* @__PURE__ */ i.isValidElement(a) && (process.env.NODE_ENV !== "production" && Ne.isFragment(a) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
103
+ `)), a.props.disabled || (F === "selectedMenu" && a.props.selected || E === -1) && (E = p), E === p && (a.props.disabled || a.props.muiSkipListHighlight || a.type.muiSkipListHighlight) && (E += 1, E >= u.length && (E = -1)));
104
+ });
105
+ const T = i.Children.map(u, (a, p) => {
106
+ if (p === E) {
107
+ const R = {};
108
+ return l && (R.autoFocus = !0), a.props.tabIndex === void 0 && F === "selectedMenu" && (R.tabIndex = 0), /* @__PURE__ */ i.cloneElement(a, R);
109
+ }
110
+ return a;
111
+ });
112
+ return /* @__PURE__ */ $(Mn, c({
113
+ role: "menu",
114
+ ref: w,
115
+ className: d,
116
+ onKeyDown: O,
117
+ tabIndex: b ? 0 : -1
118
+ }, k, {
119
+ children: T
120
+ }));
121
+ });
122
+ process.env.NODE_ENV !== "production" && (tn.propTypes = {
123
+ // ----------------------------- Warning --------------------------------
124
+ // | These PropTypes are generated from the TypeScript type definitions |
125
+ // | To update them edit the d.ts file and run "yarn proptypes" |
126
+ // ----------------------------------------------------------------------
127
+ /**
128
+ * If `true`, will focus the `[role="menu"]` container and move into tab order.
129
+ * @default false
130
+ */
131
+ autoFocus: e.bool,
132
+ /**
133
+ * If `true`, will focus the first menuitem if `variant="menu"` or selected item
134
+ * if `variant="selectedMenu"`.
135
+ * @default false
136
+ */
137
+ autoFocusItem: e.bool,
138
+ /**
139
+ * MenuList contents, normally `MenuItem`s.
140
+ */
141
+ children: e.node,
142
+ /**
143
+ * @ignore
144
+ */
145
+ className: e.string,
146
+ /**
147
+ * If `true`, will allow focus on disabled items.
148
+ * @default false
149
+ */
150
+ disabledItemsFocusable: e.bool,
151
+ /**
152
+ * If `true`, the menu items will not wrap focus.
153
+ * @default false
154
+ */
155
+ disableListWrap: e.bool,
156
+ /**
157
+ * @ignore
158
+ */
159
+ onKeyDown: e.func,
160
+ /**
161
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
162
+ * and the vertical alignment relative to the anchor element.
163
+ * @default 'selectedMenu'
164
+ */
165
+ variant: e.oneOf(["menu", "selectedMenu"])
166
+ });
167
+ const Un = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
168
+ function we(n) {
169
+ return `scale(${n}, ${n ** 2})`;
170
+ }
171
+ const zn = {
172
+ entering: {
173
+ opacity: 1,
174
+ transform: we(1)
175
+ },
176
+ entered: {
177
+ opacity: 1,
178
+ transform: "none"
179
+ }
180
+ }, xe = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), Fe = /* @__PURE__ */ i.forwardRef(function(t, o) {
181
+ const {
182
+ addEndListener: s,
183
+ appear: b = !0,
184
+ children: l,
185
+ easing: u,
186
+ in: d,
187
+ onEnter: P,
188
+ onEntered: x,
189
+ onEntering: N,
190
+ onExit: F,
191
+ onExited: k,
192
+ onExiting: f,
193
+ style: I,
194
+ timeout: O = "auto",
195
+ // eslint-disable-next-line react/prop-types
196
+ TransitionComponent: w = In
197
+ } = t, E = X(t, Un), T = i.useRef(), a = i.useRef(), p = Qe(), R = i.useRef(null), S = pe(R, l.ref, o), g = (h) => (m) => {
198
+ if (h) {
199
+ const B = R.current;
200
+ m === void 0 ? h(B) : h(B, m);
201
+ }
202
+ }, _ = g(N), L = g((h, m) => {
203
+ Sn(h);
204
+ const {
205
+ duration: B,
206
+ delay: H,
207
+ easing: W
208
+ } = Ve({
209
+ style: I,
210
+ timeout: O,
211
+ easing: u
212
+ }, {
213
+ mode: "enter"
214
+ });
215
+ let v;
216
+ O === "auto" ? (v = p.transitions.getAutoHeightDuration(h.clientHeight), a.current = v) : v = B, h.style.transition = [p.transitions.create("opacity", {
217
+ duration: v,
218
+ delay: H
219
+ }), p.transitions.create("transform", {
220
+ duration: xe ? v : v * 0.666,
221
+ delay: H,
222
+ easing: W
223
+ })].join(","), P && P(h, m);
224
+ }), M = g(x), A = g(f), J = g((h) => {
225
+ const {
226
+ duration: m,
227
+ delay: B,
228
+ easing: H
229
+ } = Ve({
230
+ style: I,
231
+ timeout: O,
232
+ easing: u
233
+ }, {
234
+ mode: "exit"
235
+ });
236
+ let W;
237
+ O === "auto" ? (W = p.transitions.getAutoHeightDuration(h.clientHeight), a.current = W) : W = m, h.style.transition = [p.transitions.create("opacity", {
238
+ duration: W,
239
+ delay: B
240
+ }), p.transitions.create("transform", {
241
+ duration: xe ? W : W * 0.666,
242
+ delay: xe ? B : B || W * 0.333,
243
+ easing: H
244
+ })].join(","), h.style.opacity = 0, h.style.transform = we(0.75), F && F(h);
245
+ }), z = g(k), K = (h) => {
246
+ O === "auto" && (T.current = setTimeout(h, a.current || 0)), s && s(R.current, h);
247
+ };
248
+ return i.useEffect(() => () => {
249
+ clearTimeout(T.current);
250
+ }, []), /* @__PURE__ */ $(w, c({
251
+ appear: b,
252
+ in: d,
253
+ nodeRef: R,
254
+ onEnter: L,
255
+ onEntered: M,
256
+ onEntering: _,
257
+ onExit: J,
258
+ onExited: z,
259
+ onExiting: A,
260
+ addEndListener: K,
261
+ timeout: O === "auto" ? null : O
262
+ }, E, {
263
+ children: (h, m) => /* @__PURE__ */ i.cloneElement(l, c({
264
+ style: c({
265
+ opacity: 0,
266
+ transform: we(0.75),
267
+ visibility: h === "exited" && !d ? "hidden" : void 0
268
+ }, zn[h], I, l.props.style),
269
+ ref: S
270
+ }, m))
271
+ }));
272
+ });
273
+ process.env.NODE_ENV !== "production" && (Fe.propTypes = {
274
+ // ----------------------------- Warning --------------------------------
275
+ // | These PropTypes are generated from the TypeScript type definitions |
276
+ // | To update them edit the d.ts file and run "yarn proptypes" |
277
+ // ----------------------------------------------------------------------
278
+ /**
279
+ * Add a custom transition end trigger. Called with the transitioning DOM
280
+ * node and a done callback. Allows for more fine grained transition end
281
+ * logic. Note: Timeouts are still used as a fallback if provided.
282
+ */
283
+ addEndListener: e.func,
284
+ /**
285
+ * Perform the enter transition when it first mounts if `in` is also `true`.
286
+ * Set this to `false` to disable this behavior.
287
+ * @default true
288
+ */
289
+ appear: e.bool,
290
+ /**
291
+ * A single child content element.
292
+ */
293
+ children: xn.isRequired,
294
+ /**
295
+ * The transition timing function.
296
+ * You may specify a single easing or a object containing enter and exit values.
297
+ */
298
+ easing: e.oneOfType([e.shape({
299
+ enter: e.string,
300
+ exit: e.string
301
+ }), e.string]),
302
+ /**
303
+ * If `true`, the component will transition in.
304
+ */
305
+ in: e.bool,
306
+ /**
307
+ * @ignore
308
+ */
309
+ onEnter: e.func,
310
+ /**
311
+ * @ignore
312
+ */
313
+ onEntered: e.func,
314
+ /**
315
+ * @ignore
316
+ */
317
+ onEntering: e.func,
318
+ /**
319
+ * @ignore
320
+ */
321
+ onExit: e.func,
322
+ /**
323
+ * @ignore
324
+ */
325
+ onExited: e.func,
326
+ /**
327
+ * @ignore
328
+ */
329
+ onExiting: e.func,
330
+ /**
331
+ * @ignore
332
+ */
333
+ style: e.object,
334
+ /**
335
+ * The duration for the transition, in milliseconds.
336
+ * You may specify a single timeout for all transitions, or individually with an object.
337
+ *
338
+ * Set to 'auto' to automatically calculate transition time based on height.
339
+ * @default 'auto'
340
+ */
341
+ timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
342
+ appear: e.number,
343
+ enter: e.number,
344
+ exit: e.number
345
+ })])
346
+ });
347
+ Fe.muiSupportAuto = !0;
348
+ function Kn(n) {
349
+ return ue("MuiPopover", n);
350
+ }
351
+ le("MuiPopover", ["root", "paper"]);
352
+ const Hn = ["onEntering"], qn = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"];
353
+ function ze(n, t) {
354
+ let o = 0;
355
+ return typeof t == "number" ? o = t : t === "center" ? o = n.height / 2 : t === "bottom" && (o = n.height), o;
356
+ }
357
+ function Ke(n, t) {
358
+ let o = 0;
359
+ return typeof t == "number" ? o = t : t === "center" ? o = n.width / 2 : t === "right" && (o = n.width), o;
360
+ }
361
+ function He(n) {
362
+ return [n.horizontal, n.vertical].map((t) => typeof t == "number" ? `${t}px` : t).join(" ");
363
+ }
364
+ function ye(n) {
365
+ return typeof n == "function" ? n() : n;
366
+ }
367
+ const Gn = (n) => {
368
+ const {
369
+ classes: t
370
+ } = n;
371
+ return ce({
372
+ root: ["root"],
373
+ paper: ["paper"]
374
+ }, Kn, t);
375
+ }, Xn = V(Pn, {
376
+ name: "MuiPopover",
377
+ slot: "Root",
378
+ overridesResolver: (n, t) => t.root
379
+ })({}), Yn = V(en, {
380
+ name: "MuiPopover",
381
+ slot: "Paper",
382
+ overridesResolver: (n, t) => t.paper
383
+ })({
384
+ position: "absolute",
385
+ overflowY: "auto",
386
+ overflowX: "hidden",
387
+ // So we see the popover when it's empty.
388
+ // It's most likely on issue on userland.
389
+ minWidth: 16,
390
+ minHeight: 16,
391
+ maxWidth: "calc(100% - 32px)",
392
+ maxHeight: "calc(100% - 32px)",
393
+ // We disable the focus ring for mouse, touch and keyboard users.
394
+ outline: 0
395
+ }), on = /* @__PURE__ */ i.forwardRef(function(t, o) {
396
+ const s = Pe({
397
+ props: t,
398
+ name: "MuiPopover"
399
+ }), {
400
+ action: b,
401
+ anchorEl: l,
402
+ anchorOrigin: u = {
403
+ vertical: "top",
404
+ horizontal: "left"
405
+ },
406
+ anchorPosition: d,
407
+ anchorReference: P = "anchorEl",
408
+ children: x,
409
+ className: N,
410
+ container: F,
411
+ elevation: k = 8,
412
+ marginThreshold: f = 16,
413
+ open: I,
414
+ PaperProps: O = {},
415
+ transformOrigin: w = {
416
+ vertical: "top",
417
+ horizontal: "left"
418
+ },
419
+ TransitionComponent: E = Fe,
420
+ transitionDuration: T = "auto",
421
+ TransitionProps: {
422
+ onEntering: a
423
+ } = {}
424
+ } = s, p = X(s.TransitionProps, Hn), R = X(s, qn), S = i.useRef(), g = pe(S, O.ref), _ = c({}, s, {
425
+ anchorOrigin: u,
426
+ anchorReference: P,
427
+ elevation: k,
428
+ marginThreshold: f,
429
+ PaperProps: O,
430
+ transformOrigin: w,
431
+ TransitionComponent: E,
432
+ transitionDuration: T,
433
+ TransitionProps: p
434
+ }), L = Gn(_), M = i.useCallback(() => {
435
+ if (P === "anchorPosition")
436
+ return process.env.NODE_ENV !== "production" && (d || console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')), d;
437
+ const v = ye(l), C = v && v.nodeType === 1 ? v : ae(S.current).body, D = C.getBoundingClientRect();
438
+ if (process.env.NODE_ENV !== "production") {
439
+ const Y = C.getBoundingClientRect();
440
+ process.env.NODE_ENV !== "test" && Y.top === 0 && Y.left === 0 && Y.right === 0 && Y.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
441
+ `));
442
+ }
443
+ return {
444
+ top: D.top + ze(D, u.vertical),
445
+ left: D.left + Ke(D, u.horizontal)
446
+ };
447
+ }, [l, u.horizontal, u.vertical, d, P]), A = i.useCallback((v) => ({
448
+ vertical: ze(v, w.vertical),
449
+ horizontal: Ke(v, w.horizontal)
450
+ }), [w.horizontal, w.vertical]), J = i.useCallback((v) => {
451
+ const C = {
452
+ width: v.offsetWidth,
453
+ height: v.offsetHeight
454
+ }, D = A(C);
455
+ if (P === "none")
456
+ return {
457
+ top: null,
458
+ left: null,
459
+ transformOrigin: He(D)
460
+ };
461
+ const Y = M();
462
+ let q = Y.top - D.vertical, Q = Y.left - D.horizontal;
463
+ const re = q + C.height, de = Q + C.width, fe = Be(ye(l)), G = fe.innerHeight - f, ee = fe.innerWidth - f;
464
+ if (q < f) {
465
+ const U = q - f;
466
+ q -= U, D.vertical += U;
467
+ } else if (re > G) {
468
+ const U = re - G;
469
+ q -= U, D.vertical += U;
470
+ }
471
+ if (process.env.NODE_ENV !== "production" && C.height > G && C.height && G && console.error(["MUI: The popover component is too tall.", `Some part of it can not be seen on the screen (${C.height - G}px).`, "Please consider adding a `max-height` to improve the user-experience."].join(`
472
+ `)), Q < f) {
473
+ const U = Q - f;
474
+ Q -= U, D.horizontal += U;
475
+ } else if (de > ee) {
476
+ const U = de - ee;
477
+ Q -= U, D.horizontal += U;
478
+ }
479
+ return {
480
+ top: `${Math.round(q)}px`,
481
+ left: `${Math.round(Q)}px`,
482
+ transformOrigin: He(D)
483
+ };
484
+ }, [l, P, M, A, f]), [z, K] = i.useState(I), h = i.useCallback(() => {
485
+ const v = S.current;
486
+ if (!v)
487
+ return;
488
+ const C = J(v);
489
+ C.top !== null && (v.style.top = C.top), C.left !== null && (v.style.left = C.left), v.style.transformOrigin = C.transformOrigin, K(!0);
490
+ }, [J]), m = (v, C) => {
491
+ a && a(v, C), h();
492
+ }, B = () => {
493
+ K(!1);
494
+ };
495
+ i.useEffect(() => {
496
+ I && h();
497
+ }), i.useImperativeHandle(b, () => I ? {
498
+ updatePosition: () => {
499
+ h();
500
+ }
501
+ } : null, [I, h]), i.useEffect(() => {
502
+ if (!I)
503
+ return;
504
+ const v = Tn(() => {
505
+ h();
506
+ }), C = Be(l);
507
+ return C.addEventListener("resize", v), () => {
508
+ v.clear(), C.removeEventListener("resize", v);
509
+ };
510
+ }, [l, I, h]);
511
+ let H = T;
512
+ T === "auto" && !E.muiSupportAuto && (H = void 0);
513
+ const W = F || (l ? ae(ye(l)).body : void 0);
514
+ return /* @__PURE__ */ $(Xn, c({
515
+ BackdropProps: {
516
+ invisible: !0
517
+ },
518
+ className: oe(L.root, N),
519
+ container: W,
520
+ open: I,
521
+ ref: o,
522
+ ownerState: _
523
+ }, R, {
524
+ children: /* @__PURE__ */ $(E, c({
525
+ appear: !0,
526
+ in: I,
527
+ onEntering: m,
528
+ onExited: B,
529
+ timeout: H
530
+ }, p, {
531
+ children: /* @__PURE__ */ $(Yn, c({
532
+ elevation: k
533
+ }, O, {
534
+ ref: g,
535
+ className: oe(L.paper, O.className)
536
+ }, z ? void 0 : {
537
+ style: c({}, O.style, {
538
+ opacity: 0
539
+ })
540
+ }, {
541
+ ownerState: _,
542
+ children: x
543
+ }))
544
+ }))
545
+ }));
546
+ });
547
+ process.env.NODE_ENV !== "production" && (on.propTypes = {
548
+ // ----------------------------- Warning --------------------------------
549
+ // | These PropTypes are generated from the TypeScript type definitions |
550
+ // | To update them edit the d.ts file and run "yarn proptypes" |
551
+ // ----------------------------------------------------------------------
552
+ /**
553
+ * A ref for imperative actions.
554
+ * It currently only supports updatePosition() action.
555
+ */
556
+ action: Re,
557
+ /**
558
+ * An HTML element, or a function that returns one.
559
+ * It's used to set the position of the popover.
560
+ */
561
+ anchorEl: vn(e.oneOfType([Me, e.func]), (n) => {
562
+ if (n.open && (!n.anchorReference || n.anchorReference === "anchorEl")) {
563
+ const t = ye(n.anchorEl);
564
+ if (t && t.nodeType === 1) {
565
+ const o = t.getBoundingClientRect();
566
+ if (process.env.NODE_ENV !== "test" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0)
567
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
568
+ `));
569
+ } else
570
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", `It should be an Element instance but it's \`${t}\` instead.`].join(`
571
+ `));
572
+ }
573
+ return null;
574
+ }),
575
+ /**
576
+ * This is the point on the anchor where the popover's
577
+ * `anchorEl` will attach to. This is not used when the
578
+ * anchorReference is 'anchorPosition'.
579
+ *
580
+ * Options:
581
+ * vertical: [top, center, bottom];
582
+ * horizontal: [left, center, right].
583
+ * @default {
584
+ * vertical: 'top',
585
+ * horizontal: 'left',
586
+ * }
587
+ */
588
+ anchorOrigin: e.shape({
589
+ horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
590
+ vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
591
+ }),
592
+ /**
593
+ * This is the position that may be used to set the position of the popover.
594
+ * The coordinates are relative to the application's client area.
595
+ */
596
+ anchorPosition: e.shape({
597
+ left: e.number.isRequired,
598
+ top: e.number.isRequired
599
+ }),
600
+ /**
601
+ * This determines which anchor prop to refer to when setting
602
+ * the position of the popover.
603
+ * @default 'anchorEl'
604
+ */
605
+ anchorReference: e.oneOf(["anchorEl", "anchorPosition", "none"]),
606
+ /**
607
+ * The content of the component.
608
+ */
609
+ children: e.node,
610
+ /**
611
+ * Override or extend the styles applied to the component.
612
+ */
613
+ classes: e.object,
614
+ /**
615
+ * @ignore
616
+ */
617
+ className: e.string,
618
+ /**
619
+ * An HTML element, component instance, or function that returns either.
620
+ * The `container` will passed to the Modal component.
621
+ *
622
+ * By default, it uses the body of the anchorEl's top-level document object,
623
+ * so it's simply `document.body` most of the time.
624
+ */
625
+ container: e.oneOfType([Me, e.func]),
626
+ /**
627
+ * The elevation of the popover.
628
+ * @default 8
629
+ */
630
+ elevation: On,
631
+ /**
632
+ * Specifies how close to the edge of the window the popover can appear.
633
+ * @default 16
634
+ */
635
+ marginThreshold: e.number,
636
+ /**
637
+ * Callback fired when the component requests to be closed.
638
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
639
+ */
640
+ onClose: e.func,
641
+ /**
642
+ * If `true`, the component is shown.
643
+ */
644
+ open: e.bool.isRequired,
645
+ /**
646
+ * Props applied to the [`Paper`](/material-ui/api/paper/) element.
647
+ * @default {}
648
+ */
649
+ PaperProps: e.shape({
650
+ component: Cn
651
+ }),
652
+ /**
653
+ * The system prop that allows defining system overrides as well as additional CSS styles.
654
+ */
655
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
656
+ /**
657
+ * This is the point on the popover which
658
+ * will attach to the anchor's origin.
659
+ *
660
+ * Options:
661
+ * vertical: [top, center, bottom, x(px)];
662
+ * horizontal: [left, center, right, x(px)].
663
+ * @default {
664
+ * vertical: 'top',
665
+ * horizontal: 'left',
666
+ * }
667
+ */
668
+ transformOrigin: e.shape({
669
+ horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
670
+ vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
671
+ }),
672
+ /**
673
+ * The component used for the transition.
674
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
675
+ * @default Grow
676
+ */
677
+ TransitionComponent: e.elementType,
678
+ /**
679
+ * Set to 'auto' to automatically calculate transition time based on height.
680
+ * @default 'auto'
681
+ */
682
+ transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
683
+ appear: e.number,
684
+ enter: e.number,
685
+ exit: e.number
686
+ })]),
687
+ /**
688
+ * Props applied to the transition element.
689
+ * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
690
+ * @default {}
691
+ */
692
+ TransitionProps: e.object
693
+ });
694
+ function Jn(n) {
695
+ return ue("MuiMenu", n);
696
+ }
697
+ le("MuiMenu", ["root", "paper", "list"]);
698
+ const Qn = ["onEntering"], Zn = ["autoFocus", "children", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant"], et = {
699
+ vertical: "top",
700
+ horizontal: "right"
701
+ }, nt = {
702
+ vertical: "top",
703
+ horizontal: "left"
704
+ }, tt = (n) => {
705
+ const {
706
+ classes: t
707
+ } = n;
708
+ return ce({
709
+ root: ["root"],
710
+ paper: ["paper"],
711
+ list: ["list"]
712
+ }, Jn, t);
713
+ }, ot = V(on, {
714
+ shouldForwardProp: (n) => Oe(n) || n === "classes",
715
+ name: "MuiMenu",
716
+ slot: "Root",
717
+ overridesResolver: (n, t) => t.root
718
+ })({}), rt = V(en, {
719
+ name: "MuiMenu",
720
+ slot: "Paper",
721
+ overridesResolver: (n, t) => t.paper
722
+ })({
723
+ // specZ: The maximum height of a simple menu should be one or more rows less than the view
724
+ // height. This ensures a tapable area outside of the simple menu with which to dismiss
725
+ // the menu.
726
+ maxHeight: "calc(100% - 96px)",
727
+ // Add iOS momentum scrolling for iOS < 13.0
728
+ WebkitOverflowScrolling: "touch"
729
+ }), it = V(tn, {
730
+ name: "MuiMenu",
731
+ slot: "List",
732
+ overridesResolver: (n, t) => t.list
733
+ })({
734
+ // We disable the focus ring for mouse, touch and keyboard users.
735
+ outline: 0
736
+ }), rn = /* @__PURE__ */ i.forwardRef(function(t, o) {
737
+ const s = Pe({
738
+ props: t,
739
+ name: "MuiMenu"
740
+ }), {
741
+ autoFocus: b = !0,
742
+ children: l,
743
+ disableAutoFocusItem: u = !1,
744
+ MenuListProps: d = {},
745
+ onClose: P,
746
+ open: x,
747
+ PaperProps: N = {},
748
+ PopoverClasses: F,
749
+ transitionDuration: k = "auto",
750
+ TransitionProps: {
751
+ onEntering: f
752
+ } = {},
753
+ variant: I = "selectedMenu"
754
+ } = s, O = X(s.TransitionProps, Qn), w = X(s, Zn), E = Qe(), T = E.direction === "rtl", a = c({}, s, {
755
+ autoFocus: b,
756
+ disableAutoFocusItem: u,
757
+ MenuListProps: d,
758
+ onEntering: f,
759
+ PaperProps: N,
760
+ transitionDuration: k,
761
+ TransitionProps: O,
762
+ variant: I
763
+ }), p = tt(a), R = b && !u && x, S = i.useRef(null), g = (M, A) => {
764
+ S.current && S.current.adjustStyleForScrollbar(M, E), f && f(M, A);
765
+ }, _ = (M) => {
766
+ M.key === "Tab" && (M.preventDefault(), P && P(M, "tabKeyDown"));
767
+ };
768
+ let L = -1;
769
+ return i.Children.map(l, (M, A) => {
770
+ /* @__PURE__ */ i.isValidElement(M) && (process.env.NODE_ENV !== "production" && Ne.isFragment(M) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
771
+ `)), M.props.disabled || (I === "selectedMenu" && M.props.selected || L === -1) && (L = A));
772
+ }), /* @__PURE__ */ $(ot, c({
773
+ onClose: P,
774
+ anchorOrigin: {
775
+ vertical: "bottom",
776
+ horizontal: T ? "right" : "left"
777
+ },
778
+ transformOrigin: T ? et : nt,
779
+ PaperProps: c({
780
+ as: rt
781
+ }, N, {
782
+ classes: c({}, N.classes, {
783
+ root: p.paper
784
+ })
785
+ }),
786
+ className: p.root,
787
+ open: x,
788
+ ref: o,
789
+ transitionDuration: k,
790
+ TransitionProps: c({
791
+ onEntering: g
792
+ }, O),
793
+ ownerState: a
794
+ }, w, {
795
+ classes: F,
796
+ children: /* @__PURE__ */ $(it, c({
797
+ onKeyDown: _,
798
+ actions: S,
799
+ autoFocus: b && (L === -1 || u),
800
+ autoFocusItem: R,
801
+ variant: I
802
+ }, d, {
803
+ className: oe(p.list, d.className),
804
+ children: l
805
+ }))
806
+ }));
807
+ });
808
+ process.env.NODE_ENV !== "production" && (rn.propTypes = {
809
+ // ----------------------------- Warning --------------------------------
810
+ // | These PropTypes are generated from the TypeScript type definitions |
811
+ // | To update them edit the d.ts file and run "yarn proptypes" |
812
+ // ----------------------------------------------------------------------
813
+ /**
814
+ * An HTML element, or a function that returns one.
815
+ * It's used to set the position of the menu.
816
+ */
817
+ anchorEl: e.oneOfType([Me, e.func]),
818
+ /**
819
+ * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled
820
+ * children are not focusable. If you set this prop to `false` focus will be placed
821
+ * on the parent modal container. This has severe accessibility implications
822
+ * and should only be considered if you manage focus otherwise.
823
+ * @default true
824
+ */
825
+ autoFocus: e.bool,
826
+ /**
827
+ * Menu contents, normally `MenuItem`s.
828
+ */
829
+ children: e.node,
830
+ /**
831
+ * Override or extend the styles applied to the component.
832
+ */
833
+ classes: e.object,
834
+ /**
835
+ * When opening the menu will not focus the active item but the `[role="menu"]`
836
+ * unless `autoFocus` is also set to `false`. Not using the default means not
837
+ * following WAI-ARIA authoring practices. Please be considerate about possible
838
+ * accessibility implications.
839
+ * @default false
840
+ */
841
+ disableAutoFocusItem: e.bool,
842
+ /**
843
+ * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.
844
+ * @default {}
845
+ */
846
+ MenuListProps: e.object,
847
+ /**
848
+ * Callback fired when the component requests to be closed.
849
+ *
850
+ * @param {object} event The event source of the callback.
851
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"`.
852
+ */
853
+ onClose: e.func,
854
+ /**
855
+ * If `true`, the component is shown.
856
+ */
857
+ open: e.bool.isRequired,
858
+ /**
859
+ * @ignore
860
+ */
861
+ PaperProps: e.object,
862
+ /**
863
+ * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.
864
+ */
865
+ PopoverClasses: e.object,
866
+ /**
867
+ * The system prop that allows defining system overrides as well as additional CSS styles.
868
+ */
869
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
870
+ /**
871
+ * The length of the transition in `ms`, or 'auto'
872
+ * @default 'auto'
873
+ */
874
+ transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
875
+ appear: e.number,
876
+ enter: e.number,
877
+ exit: e.number
878
+ })]),
879
+ /**
880
+ * Props applied to the transition element.
881
+ * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
882
+ * @default {}
883
+ */
884
+ TransitionProps: e.object,
885
+ /**
886
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.
887
+ * @default 'selectedMenu'
888
+ */
889
+ variant: e.oneOf(["menu", "selectedMenu"])
890
+ });
891
+ function st(n) {
892
+ return ue("MuiNativeSelect", n);
893
+ }
894
+ const De = le("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput"]), at = ["className", "disabled", "IconComponent", "inputRef", "variant"], lt = (n) => {
895
+ const {
896
+ classes: t,
897
+ variant: o,
898
+ disabled: s,
899
+ multiple: b,
900
+ open: l
901
+ } = n, u = {
902
+ select: ["select", o, s && "disabled", b && "multiple"],
903
+ icon: ["icon", `icon${Ee(o)}`, l && "iconOpen", s && "disabled"]
904
+ };
905
+ return ce(u, st, t);
906
+ }, sn = ({
907
+ ownerState: n,
908
+ theme: t
909
+ }) => c({
910
+ MozAppearance: "none",
911
+ // Reset
912
+ WebkitAppearance: "none",
913
+ // Reset
914
+ // When interacting quickly, the text can end up selected.
915
+ // Native select can't be selected either.
916
+ userSelect: "none",
917
+ borderRadius: 0,
918
+ // Reset
919
+ cursor: "pointer",
920
+ "&:focus": c({}, t.vars ? {
921
+ backgroundColor: `rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`
922
+ } : {
923
+ backgroundColor: t.palette.mode === "light" ? "rgba(0, 0, 0, 0.05)" : "rgba(255, 255, 255, 0.05)"
924
+ }, {
925
+ borderRadius: 0
926
+ // Reset Chrome style
927
+ }),
928
+ // Remove IE11 arrow
929
+ "&::-ms-expand": {
930
+ display: "none"
931
+ },
932
+ [`&.${De.disabled}`]: {
933
+ cursor: "default"
934
+ },
935
+ "&[multiple]": {
936
+ height: "auto"
937
+ },
938
+ "&:not([multiple]) option, &:not([multiple]) optgroup": {
939
+ backgroundColor: (t.vars || t).palette.background.paper
940
+ },
941
+ // Bump specificity to allow extending custom inputs
942
+ "&&&": {
943
+ paddingRight: 24,
944
+ minWidth: 16
945
+ // So it doesn't collapse.
946
+ }
947
+ }, n.variant === "filled" && {
948
+ "&&&": {
949
+ paddingRight: 32
950
+ }
951
+ }, n.variant === "outlined" && {
952
+ borderRadius: (t.vars || t).shape.borderRadius,
953
+ "&:focus": {
954
+ borderRadius: (t.vars || t).shape.borderRadius
955
+ // Reset the reset for Chrome style
956
+ },
957
+ "&&&": {
958
+ paddingRight: 32
959
+ }
960
+ }), ct = V("select", {
961
+ name: "MuiNativeSelect",
962
+ slot: "Select",
963
+ shouldForwardProp: Oe,
964
+ overridesResolver: (n, t) => {
965
+ const {
966
+ ownerState: o
967
+ } = n;
968
+ return [t.select, t[o.variant], {
969
+ [`&.${De.multiple}`]: t.multiple
970
+ }];
971
+ }
972
+ })(sn), an = ({
973
+ ownerState: n,
974
+ theme: t
975
+ }) => c({
976
+ // We use a position absolute over a flexbox in order to forward the pointer events
977
+ // to the input and to support wrapping tags..
978
+ position: "absolute",
979
+ right: 0,
980
+ top: "calc(50% - .5em)",
981
+ // Center vertically, height is 1em
982
+ pointerEvents: "none",
983
+ // Don't block pointer events on the select under the icon.
984
+ color: (t.vars || t).palette.action.active,
985
+ [`&.${De.disabled}`]: {
986
+ color: (t.vars || t).palette.action.disabled
987
+ }
988
+ }, n.open && {
989
+ transform: "rotate(180deg)"
990
+ }, n.variant === "filled" && {
991
+ right: 7
992
+ }, n.variant === "outlined" && {
993
+ right: 7
994
+ }), ut = V("svg", {
995
+ name: "MuiNativeSelect",
996
+ slot: "Icon",
997
+ overridesResolver: (n, t) => {
998
+ const {
999
+ ownerState: o
1000
+ } = n;
1001
+ return [t.icon, o.variant && t[`icon${Ee(o.variant)}`], o.open && t.iconOpen];
1002
+ }
1003
+ })(an), ln = /* @__PURE__ */ i.forwardRef(function(t, o) {
1004
+ const {
1005
+ className: s,
1006
+ disabled: b,
1007
+ IconComponent: l,
1008
+ inputRef: u,
1009
+ variant: d = "standard"
1010
+ } = t, P = X(t, at), x = c({}, t, {
1011
+ disabled: b,
1012
+ variant: d
1013
+ }), N = lt(x);
1014
+ return /* @__PURE__ */ Ze(i.Fragment, {
1015
+ children: [/* @__PURE__ */ $(ct, c({
1016
+ ownerState: x,
1017
+ className: oe(N.select, s),
1018
+ disabled: b,
1019
+ ref: u || o
1020
+ }, P)), t.multiple ? null : /* @__PURE__ */ $(ut, {
1021
+ as: l,
1022
+ ownerState: x,
1023
+ className: N.icon
1024
+ })]
1025
+ });
1026
+ });
1027
+ process.env.NODE_ENV !== "production" && (ln.propTypes = {
1028
+ /**
1029
+ * The option elements to populate the select with.
1030
+ * Can be some `<option>` elements.
1031
+ */
1032
+ children: e.node,
1033
+ /**
1034
+ * Override or extend the styles applied to the component.
1035
+ * See [CSS API](#css) below for more details.
1036
+ */
1037
+ classes: e.object,
1038
+ /**
1039
+ * The CSS class name of the select element.
1040
+ */
1041
+ className: e.string,
1042
+ /**
1043
+ * If `true`, the select is disabled.
1044
+ */
1045
+ disabled: e.bool,
1046
+ /**
1047
+ * The icon that displays the arrow.
1048
+ */
1049
+ IconComponent: e.elementType.isRequired,
1050
+ /**
1051
+ * Use that prop to pass a ref to the native select element.
1052
+ * @deprecated
1053
+ */
1054
+ inputRef: Re,
1055
+ /**
1056
+ * @ignore
1057
+ */
1058
+ multiple: e.bool,
1059
+ /**
1060
+ * Name attribute of the `select` or hidden `input` element.
1061
+ */
1062
+ name: e.string,
1063
+ /**
1064
+ * Callback fired when a menu item is selected.
1065
+ *
1066
+ * @param {object} event The event source of the callback.
1067
+ * You can pull out the new value by accessing `event.target.value` (string).
1068
+ */
1069
+ onChange: e.func,
1070
+ /**
1071
+ * The input value.
1072
+ */
1073
+ value: e.any,
1074
+ /**
1075
+ * The variant to use.
1076
+ */
1077
+ variant: e.oneOf(["standard", "outlined", "filled"])
1078
+ });
1079
+ function pt(n) {
1080
+ return ue("MuiSelect", n);
1081
+ }
1082
+ const ve = le("MuiSelect", ["select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput"]);
1083
+ var qe;
1084
+ const dt = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"], ft = V("div", {
1085
+ name: "MuiSelect",
1086
+ slot: "Select",
1087
+ overridesResolver: (n, t) => {
1088
+ const {
1089
+ ownerState: o
1090
+ } = n;
1091
+ return [
1092
+ // Win specificity over the input base
1093
+ {
1094
+ [`&.${ve.select}`]: t.select
1095
+ },
1096
+ {
1097
+ [`&.${ve.select}`]: t[o.variant]
1098
+ },
1099
+ {
1100
+ [`&.${ve.multiple}`]: t.multiple
1101
+ }
1102
+ ];
1103
+ }
1104
+ })(sn, {
1105
+ // Win specificity over the input base
1106
+ [`&.${ve.select}`]: {
1107
+ height: "auto",
1108
+ // Resets for multiple select with chips
1109
+ minHeight: "1.4375em",
1110
+ // Required for select\text-field height consistency
1111
+ textOverflow: "ellipsis",
1112
+ whiteSpace: "nowrap",
1113
+ overflow: "hidden"
1114
+ }
1115
+ }), mt = V("svg", {
1116
+ name: "MuiSelect",
1117
+ slot: "Icon",
1118
+ overridesResolver: (n, t) => {
1119
+ const {
1120
+ ownerState: o
1121
+ } = n;
1122
+ return [t.icon, o.variant && t[`icon${Ee(o.variant)}`], o.open && t.iconOpen];
1123
+ }
1124
+ })(an), bt = V("input", {
1125
+ shouldForwardProp: (n) => yn(n) && n !== "classes",
1126
+ name: "MuiSelect",
1127
+ slot: "NativeInput",
1128
+ overridesResolver: (n, t) => t.nativeInput
1129
+ })({
1130
+ bottom: 0,
1131
+ left: 0,
1132
+ position: "absolute",
1133
+ opacity: 0,
1134
+ pointerEvents: "none",
1135
+ width: "100%",
1136
+ boxSizing: "border-box"
1137
+ });
1138
+ function Ge(n, t) {
1139
+ return typeof t == "object" && t !== null ? n === t : String(n) === String(t);
1140
+ }
1141
+ function ht(n) {
1142
+ return n == null || typeof n == "string" && !n.trim();
1143
+ }
1144
+ const gt = (n) => {
1145
+ const {
1146
+ classes: t,
1147
+ variant: o,
1148
+ disabled: s,
1149
+ multiple: b,
1150
+ open: l
1151
+ } = n, u = {
1152
+ select: ["select", o, s && "disabled", b && "multiple"],
1153
+ icon: ["icon", `icon${Ee(o)}`, l && "iconOpen", s && "disabled"],
1154
+ nativeInput: ["nativeInput"]
1155
+ };
1156
+ return ce(u, pt, t);
1157
+ }, cn = /* @__PURE__ */ i.forwardRef(function(t, o) {
1158
+ const {
1159
+ "aria-describedby": s,
1160
+ "aria-label": b,
1161
+ autoFocus: l,
1162
+ autoWidth: u,
1163
+ children: d,
1164
+ className: P,
1165
+ defaultOpen: x,
1166
+ defaultValue: N,
1167
+ disabled: F,
1168
+ displayEmpty: k,
1169
+ IconComponent: f,
1170
+ inputRef: I,
1171
+ labelId: O,
1172
+ MenuProps: w = {},
1173
+ multiple: E,
1174
+ name: T,
1175
+ onBlur: a,
1176
+ onChange: p,
1177
+ onClose: R,
1178
+ onFocus: S,
1179
+ onOpen: g,
1180
+ open: _,
1181
+ readOnly: L,
1182
+ renderValue: M,
1183
+ SelectDisplayProps: A = {},
1184
+ tabIndex: J,
1185
+ value: z,
1186
+ variant: K = "standard"
1187
+ } = t, h = X(t, dt), [m, B] = We({
1188
+ controlled: z,
1189
+ default: N,
1190
+ name: "Select"
1191
+ }), [H, W] = We({
1192
+ controlled: _,
1193
+ default: x,
1194
+ name: "Select"
1195
+ }), v = i.useRef(null), C = i.useRef(null), [D, Y] = i.useState(null), {
1196
+ current: q
1197
+ } = i.useRef(_ != null), [Q, re] = i.useState(), de = pe(o, I), fe = i.useCallback((r) => {
1198
+ C.current = r, r && Y(r);
1199
+ }, []), G = D == null ? void 0 : D.parentNode;
1200
+ i.useImperativeHandle(de, () => ({
1201
+ focus: () => {
1202
+ C.current.focus();
1203
+ },
1204
+ node: v.current,
1205
+ value: m
1206
+ }), [m]), i.useEffect(() => {
1207
+ x && H && D && !q && (re(u ? null : G.clientWidth), C.current.focus());
1208
+ }, [D, u]), i.useEffect(() => {
1209
+ l && C.current.focus();
1210
+ }, [l]), i.useEffect(() => {
1211
+ if (!O)
1212
+ return;
1213
+ const r = ae(C.current).getElementById(O);
1214
+ if (r) {
1215
+ const y = () => {
1216
+ getSelection().isCollapsed && C.current.focus();
1217
+ };
1218
+ return r.addEventListener("click", y), () => {
1219
+ r.removeEventListener("click", y);
1220
+ };
1221
+ }
1222
+ }, [O]);
1223
+ const ee = (r, y) => {
1224
+ r ? g && g(y) : R && R(y), q || (re(u ? null : G.clientWidth), W(r));
1225
+ }, U = (r) => {
1226
+ r.button === 0 && (r.preventDefault(), C.current.focus(), ee(!0, r));
1227
+ }, pn = (r) => {
1228
+ ee(!1, r);
1229
+ }, ie = i.Children.toArray(d), dn = (r) => {
1230
+ const y = ie.map((Z) => Z.props.value).indexOf(r.target.value);
1231
+ if (y === -1)
1232
+ return;
1233
+ const j = ie[y];
1234
+ B(j.props.value), p && p(r, j);
1235
+ }, fn = (r) => (y) => {
1236
+ let j;
1237
+ if (y.currentTarget.hasAttribute("tabindex")) {
1238
+ if (E) {
1239
+ j = Array.isArray(m) ? m.slice() : [];
1240
+ const Z = m.indexOf(r.props.value);
1241
+ Z === -1 ? j.push(r.props.value) : j.splice(Z, 1);
1242
+ } else
1243
+ j = r.props.value;
1244
+ if (r.props.onClick && r.props.onClick(y), m !== j && (B(j), p)) {
1245
+ const Z = y.nativeEvent || y, Ae = new Z.constructor(Z.type, Z);
1246
+ Object.defineProperty(Ae, "target", {
1247
+ writable: !0,
1248
+ value: {
1249
+ value: j,
1250
+ name: T
1251
+ }
1252
+ }), p(Ae, r);
1253
+ }
1254
+ E || ee(!1, y);
1255
+ }
1256
+ }, mn = (r) => {
1257
+ L || [
1258
+ " ",
1259
+ "ArrowUp",
1260
+ "ArrowDown",
1261
+ // The native select doesn't respond to enter on macOS, but it's recommended by
1262
+ // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
1263
+ "Enter"
1264
+ ].indexOf(r.key) !== -1 && (r.preventDefault(), ee(!0, r));
1265
+ }, me = D !== null && H, bn = (r) => {
1266
+ !me && a && (Object.defineProperty(r, "target", {
1267
+ writable: !0,
1268
+ value: {
1269
+ value: m,
1270
+ name: T
1271
+ }
1272
+ }), a(r));
1273
+ };
1274
+ delete h["aria-invalid"];
1275
+ let te, je;
1276
+ const be = [];
1277
+ let he = !1, Ce = !1;
1278
+ (wn({
1279
+ value: m
1280
+ }) || k) && (M ? te = M(m) : he = !0);
1281
+ const hn = ie.map((r) => {
1282
+ if (!/* @__PURE__ */ i.isValidElement(r))
1283
+ return null;
1284
+ process.env.NODE_ENV !== "production" && Ne.isFragment(r) && console.error(["MUI: The Select component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
1285
+ `));
1286
+ let y;
1287
+ if (E) {
1288
+ if (!Array.isArray(m))
1289
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: The `value` prop must be an array when using the `Select` component with `multiple`." : gn(2));
1290
+ y = m.some((j) => Ge(j, r.props.value)), y && he && be.push(r.props.children);
1291
+ } else
1292
+ y = Ge(m, r.props.value), y && he && (je = r.props.children);
1293
+ return y && (Ce = !0), /* @__PURE__ */ i.cloneElement(r, {
1294
+ "aria-selected": y ? "true" : "false",
1295
+ onClick: fn(r),
1296
+ onKeyUp: (j) => {
1297
+ j.key === " " && j.preventDefault(), r.props.onKeyUp && r.props.onKeyUp(j);
1298
+ },
1299
+ role: "option",
1300
+ selected: y,
1301
+ value: void 0,
1302
+ // The value is most likely not a valid HTML attribute.
1303
+ "data-value": r.props.value
1304
+ // Instead, we provide it as a data attribute.
1305
+ });
1306
+ });
1307
+ process.env.NODE_ENV !== "production" && i.useEffect(() => {
1308
+ if (!Ce && !E && m !== "") {
1309
+ const r = ie.map((y) => y.props.value);
1310
+ console.warn([`MUI: You have provided an out-of-range value \`${m}\` for the select ${T ? `(name="${T}") ` : ""}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${r.filter((y) => y != null).map((y) => `\`${y}\``).join(", ") || '""'}.`].join(`
1311
+ `));
1312
+ }
1313
+ }, [Ce, ie, E, T, m]), he && (E ? be.length === 0 ? te = null : te = be.reduce((r, y, j) => (r.push(y), j < be.length - 1 && r.push(", "), r), []) : te = je);
1314
+ let Le = Q;
1315
+ !u && q && D && (Le = G.clientWidth);
1316
+ let Te;
1317
+ typeof J < "u" ? Te = J : Te = F ? null : 0;
1318
+ const _e = A.id || (T ? `mui-component-select-${T}` : void 0), ge = c({}, t, {
1319
+ variant: K,
1320
+ value: m,
1321
+ open: me
1322
+ }), Ie = gt(ge);
1323
+ return /* @__PURE__ */ Ze(i.Fragment, {
1324
+ children: [/* @__PURE__ */ $(ft, c({
1325
+ ref: fe,
1326
+ tabIndex: Te,
1327
+ role: "button",
1328
+ "aria-disabled": F ? "true" : void 0,
1329
+ "aria-expanded": me ? "true" : "false",
1330
+ "aria-haspopup": "listbox",
1331
+ "aria-label": b,
1332
+ "aria-labelledby": [O, _e].filter(Boolean).join(" ") || void 0,
1333
+ "aria-describedby": s,
1334
+ onKeyDown: mn,
1335
+ onMouseDown: F || L ? null : U,
1336
+ onBlur: bn,
1337
+ onFocus: S
1338
+ }, A, {
1339
+ ownerState: ge,
1340
+ className: oe(A.className, Ie.select, P),
1341
+ id: _e,
1342
+ children: ht(te) ? (
1343
+ // notranslate needed while Google Translate will not fix zero-width space issue
1344
+ qe || (qe = /* @__PURE__ */ $("span", {
1345
+ className: "notranslate",
1346
+ children: "​"
1347
+ }))
1348
+ ) : te
1349
+ })), /* @__PURE__ */ $(bt, c({
1350
+ value: Array.isArray(m) ? m.join(",") : m,
1351
+ name: T,
1352
+ ref: v,
1353
+ "aria-hidden": !0,
1354
+ onChange: dn,
1355
+ tabIndex: -1,
1356
+ disabled: F,
1357
+ className: Ie.nativeInput,
1358
+ autoFocus: l,
1359
+ ownerState: ge
1360
+ }, h)), /* @__PURE__ */ $(mt, {
1361
+ as: f,
1362
+ className: Ie.icon,
1363
+ ownerState: ge
1364
+ }), /* @__PURE__ */ $(rn, c({
1365
+ id: `menu-${T || ""}`,
1366
+ anchorEl: G,
1367
+ open: me,
1368
+ onClose: pn,
1369
+ anchorOrigin: {
1370
+ vertical: "bottom",
1371
+ horizontal: "center"
1372
+ },
1373
+ transformOrigin: {
1374
+ vertical: "top",
1375
+ horizontal: "center"
1376
+ }
1377
+ }, w, {
1378
+ MenuListProps: c({
1379
+ "aria-labelledby": O,
1380
+ role: "listbox",
1381
+ disableListWrap: !0
1382
+ }, w.MenuListProps),
1383
+ PaperProps: c({}, w.PaperProps, {
1384
+ style: c({
1385
+ minWidth: Le
1386
+ }, w.PaperProps != null ? w.PaperProps.style : null)
1387
+ }),
1388
+ children: hn
1389
+ }))]
1390
+ });
1391
+ });
1392
+ process.env.NODE_ENV !== "production" && (cn.propTypes = {
1393
+ /**
1394
+ * @ignore
1395
+ */
1396
+ "aria-describedby": e.string,
1397
+ /**
1398
+ * @ignore
1399
+ */
1400
+ "aria-label": e.string,
1401
+ /**
1402
+ * @ignore
1403
+ */
1404
+ autoFocus: e.bool,
1405
+ /**
1406
+ * If `true`, the width of the popover will automatically be set according to the items inside the
1407
+ * menu, otherwise it will be at least the width of the select input.
1408
+ */
1409
+ autoWidth: e.bool,
1410
+ /**
1411
+ * The option elements to populate the select with.
1412
+ * Can be some `<MenuItem>` elements.
1413
+ */
1414
+ children: e.node,
1415
+ /**
1416
+ * Override or extend the styles applied to the component.
1417
+ * See [CSS API](#css) below for more details.
1418
+ */
1419
+ classes: e.object,
1420
+ /**
1421
+ * The CSS class name of the select element.
1422
+ */
1423
+ className: e.string,
1424
+ /**
1425
+ * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
1426
+ * You can only use it when the `native` prop is `false` (default).
1427
+ */
1428
+ defaultOpen: e.bool,
1429
+ /**
1430
+ * The default value. Use when the component is not controlled.
1431
+ */
1432
+ defaultValue: e.any,
1433
+ /**
1434
+ * If `true`, the select is disabled.
1435
+ */
1436
+ disabled: e.bool,
1437
+ /**
1438
+ * If `true`, the selected item is displayed even if its value is empty.
1439
+ */
1440
+ displayEmpty: e.bool,
1441
+ /**
1442
+ * The icon that displays the arrow.
1443
+ */
1444
+ IconComponent: e.elementType.isRequired,
1445
+ /**
1446
+ * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`
1447
+ * Equivalent to `ref`
1448
+ */
1449
+ inputRef: Re,
1450
+ /**
1451
+ * The ID of an element that acts as an additional label. The Select will
1452
+ * be labelled by the additional label and the selected value.
1453
+ */
1454
+ labelId: e.string,
1455
+ /**
1456
+ * Props applied to the [`Menu`](/material-ui/api/menu/) element.
1457
+ */
1458
+ MenuProps: e.object,
1459
+ /**
1460
+ * If `true`, `value` must be an array and the menu will support multiple selections.
1461
+ */
1462
+ multiple: e.bool,
1463
+ /**
1464
+ * Name attribute of the `select` or hidden `input` element.
1465
+ */
1466
+ name: e.string,
1467
+ /**
1468
+ * @ignore
1469
+ */
1470
+ onBlur: e.func,
1471
+ /**
1472
+ * Callback fired when a menu item is selected.
1473
+ *
1474
+ * @param {object} event The event source of the callback.
1475
+ * You can pull out the new value by accessing `event.target.value` (any).
1476
+ * @param {object} [child] The react element that was selected.
1477
+ */
1478
+ onChange: e.func,
1479
+ /**
1480
+ * Callback fired when the component requests to be closed.
1481
+ * Use in controlled mode (see open).
1482
+ *
1483
+ * @param {object} event The event source of the callback.
1484
+ */
1485
+ onClose: e.func,
1486
+ /**
1487
+ * @ignore
1488
+ */
1489
+ onFocus: e.func,
1490
+ /**
1491
+ * Callback fired when the component requests to be opened.
1492
+ * Use in controlled mode (see open).
1493
+ *
1494
+ * @param {object} event The event source of the callback.
1495
+ */
1496
+ onOpen: e.func,
1497
+ /**
1498
+ * If `true`, the component is shown.
1499
+ */
1500
+ open: e.bool,
1501
+ /**
1502
+ * @ignore
1503
+ */
1504
+ readOnly: e.bool,
1505
+ /**
1506
+ * Render the selected value.
1507
+ *
1508
+ * @param {any} value The `value` provided to the component.
1509
+ * @returns {ReactNode}
1510
+ */
1511
+ renderValue: e.func,
1512
+ /**
1513
+ * Props applied to the clickable div element.
1514
+ */
1515
+ SelectDisplayProps: e.object,
1516
+ /**
1517
+ * @ignore
1518
+ */
1519
+ tabIndex: e.oneOfType([e.number, e.string]),
1520
+ /**
1521
+ * @ignore
1522
+ */
1523
+ type: e.any,
1524
+ /**
1525
+ * The input value.
1526
+ */
1527
+ value: e.any,
1528
+ /**
1529
+ * The variant to use.
1530
+ */
1531
+ variant: e.oneOf(["standard", "outlined", "filled"])
1532
+ });
1533
+ const vt = _n(/* @__PURE__ */ $("path", {
1534
+ d: "M7 10l5 5 5-5z"
1535
+ }), "ArrowDropDown");
1536
+ function yt(n) {
1537
+ return ue("MuiFilledInput", n);
1538
+ }
1539
+ const ne = c({}, Nn, le("MuiFilledInput", ["root", "underline", "input"])), Et = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"], Pt = (n) => {
1540
+ const {
1541
+ classes: t,
1542
+ disableUnderline: o
1543
+ } = n, b = ce({
1544
+ root: ["root", !o && "underline"],
1545
+ input: ["input"]
1546
+ }, yt, t);
1547
+ return c({}, t, b);
1548
+ }, Ot = V(Fn, {
1549
+ shouldForwardProp: (n) => Oe(n) || n === "classes",
1550
+ name: "MuiFilledInput",
1551
+ slot: "Root",
1552
+ overridesResolver: (n, t) => {
1553
+ const {
1554
+ ownerState: o
1555
+ } = n;
1556
+ return [...Dn(n, t), !o.disableUnderline && t.underline];
1557
+ }
1558
+ })(({
1559
+ theme: n,
1560
+ ownerState: t
1561
+ }) => {
1562
+ var o;
1563
+ const s = n.palette.mode === "light", b = s ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", l = s ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", u = s ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", d = s ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
1564
+ return c({
1565
+ position: "relative",
1566
+ backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : l,
1567
+ borderTopLeftRadius: (n.vars || n).shape.borderRadius,
1568
+ borderTopRightRadius: (n.vars || n).shape.borderRadius,
1569
+ transition: n.transitions.create("background-color", {
1570
+ duration: n.transitions.duration.shorter,
1571
+ easing: n.transitions.easing.easeOut
1572
+ }),
1573
+ "&:hover": {
1574
+ backgroundColor: n.vars ? n.vars.palette.FilledInput.hoverBg : u,
1575
+ // Reset on touch devices, it doesn't add specificity
1576
+ "@media (hover: none)": {
1577
+ backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : l
1578
+ }
1579
+ },
1580
+ [`&.${ne.focused}`]: {
1581
+ backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : l
1582
+ },
1583
+ [`&.${ne.disabled}`]: {
1584
+ backgroundColor: n.vars ? n.vars.palette.FilledInput.disabledBg : d
1585
+ }
1586
+ }, !t.disableUnderline && {
1587
+ "&:after": {
1588
+ borderBottom: `2px solid ${(o = (n.vars || n).palette[t.color || "primary"]) == null ? void 0 : o.main}`,
1589
+ left: 0,
1590
+ bottom: 0,
1591
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1592
+ content: '""',
1593
+ position: "absolute",
1594
+ right: 0,
1595
+ transform: "scaleX(0)",
1596
+ transition: n.transitions.create("transform", {
1597
+ duration: n.transitions.duration.shorter,
1598
+ easing: n.transitions.easing.easeOut
1599
+ }),
1600
+ pointerEvents: "none"
1601
+ // Transparent to the hover style.
1602
+ },
1603
+ [`&.${ne.focused}:after`]: {
1604
+ // translateX(0) is a workaround for Safari transform scale bug
1605
+ // See https://github.com/mui/material-ui/issues/31766
1606
+ transform: "scaleX(1) translateX(0)"
1607
+ },
1608
+ [`&.${ne.error}`]: {
1609
+ "&:before, &:after": {
1610
+ borderBottomColor: (n.vars || n).palette.error.main
1611
+ }
1612
+ },
1613
+ "&:before": {
1614
+ borderBottom: `1px solid ${n.vars ? `rgba(${n.vars.palette.common.onBackgroundChannel} / ${n.vars.opacity.inputUnderline})` : b}`,
1615
+ left: 0,
1616
+ bottom: 0,
1617
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1618
+ content: '"\\00a0"',
1619
+ position: "absolute",
1620
+ right: 0,
1621
+ transition: n.transitions.create("border-bottom-color", {
1622
+ duration: n.transitions.duration.shorter
1623
+ }),
1624
+ pointerEvents: "none"
1625
+ // Transparent to the hover style.
1626
+ },
1627
+ [`&:hover:not(.${ne.disabled}, .${ne.error}):before`]: {
1628
+ borderBottom: `1px solid ${(n.vars || n).palette.text.primary}`
1629
+ },
1630
+ [`&.${ne.disabled}:before`]: {
1631
+ borderBottomStyle: "dotted"
1632
+ }
1633
+ }, t.startAdornment && {
1634
+ paddingLeft: 12
1635
+ }, t.endAdornment && {
1636
+ paddingRight: 12
1637
+ }, t.multiline && c({
1638
+ padding: "25px 12px 8px"
1639
+ }, t.size === "small" && {
1640
+ paddingTop: 21,
1641
+ paddingBottom: 4
1642
+ }, t.hiddenLabel && {
1643
+ paddingTop: 16,
1644
+ paddingBottom: 17
1645
+ }));
1646
+ }), Rt = V($n, {
1647
+ name: "MuiFilledInput",
1648
+ slot: "Input",
1649
+ overridesResolver: kn
1650
+ })(({
1651
+ theme: n,
1652
+ ownerState: t
1653
+ }) => c({
1654
+ paddingTop: 25,
1655
+ paddingRight: 12,
1656
+ paddingBottom: 8,
1657
+ paddingLeft: 12
1658
+ }, !n.vars && {
1659
+ "&:-webkit-autofill": {
1660
+ WebkitBoxShadow: n.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
1661
+ WebkitTextFillColor: n.palette.mode === "light" ? null : "#fff",
1662
+ caretColor: n.palette.mode === "light" ? null : "#fff",
1663
+ borderTopLeftRadius: "inherit",
1664
+ borderTopRightRadius: "inherit"
1665
+ }
1666
+ }, n.vars && {
1667
+ "&:-webkit-autofill": {
1668
+ borderTopLeftRadius: "inherit",
1669
+ borderTopRightRadius: "inherit"
1670
+ },
1671
+ [n.getColorSchemeSelector("dark")]: {
1672
+ "&:-webkit-autofill": {
1673
+ WebkitBoxShadow: "0 0 0 100px #266798 inset",
1674
+ WebkitTextFillColor: "#fff",
1675
+ caretColor: "#fff"
1676
+ }
1677
+ }
1678
+ }, t.size === "small" && {
1679
+ paddingTop: 21,
1680
+ paddingBottom: 4
1681
+ }, t.hiddenLabel && {
1682
+ paddingTop: 16,
1683
+ paddingBottom: 17
1684
+ }, t.multiline && {
1685
+ paddingTop: 0,
1686
+ paddingBottom: 0,
1687
+ paddingLeft: 0,
1688
+ paddingRight: 0
1689
+ }, t.startAdornment && {
1690
+ paddingLeft: 0
1691
+ }, t.endAdornment && {
1692
+ paddingRight: 0
1693
+ }, t.hiddenLabel && t.size === "small" && {
1694
+ paddingTop: 8,
1695
+ paddingBottom: 9
1696
+ })), $e = /* @__PURE__ */ i.forwardRef(function(t, o) {
1697
+ var s, b, l, u;
1698
+ const d = Pe({
1699
+ props: t,
1700
+ name: "MuiFilledInput"
1701
+ }), {
1702
+ components: P = {},
1703
+ componentsProps: x,
1704
+ fullWidth: N = !1,
1705
+ // declare here to prevent spreading to DOM
1706
+ inputComponent: F = "input",
1707
+ multiline: k = !1,
1708
+ slotProps: f,
1709
+ slots: I = {},
1710
+ type: O = "text"
1711
+ } = d, w = X(d, Et), E = c({}, d, {
1712
+ fullWidth: N,
1713
+ inputComponent: F,
1714
+ multiline: k,
1715
+ type: O
1716
+ }), T = Pt(d), a = {
1717
+ root: {
1718
+ ownerState: E
1719
+ },
1720
+ input: {
1721
+ ownerState: E
1722
+ }
1723
+ }, p = f ?? x ? Je(f ?? x, a) : a, R = (s = (b = I.root) != null ? b : P.Root) != null ? s : Ot, S = (l = (u = I.input) != null ? u : P.Input) != null ? l : Rt;
1724
+ return /* @__PURE__ */ $(jn, c({
1725
+ slots: {
1726
+ root: R,
1727
+ input: S
1728
+ },
1729
+ componentsProps: p,
1730
+ fullWidth: N,
1731
+ inputComponent: F,
1732
+ multiline: k,
1733
+ ref: o,
1734
+ type: O
1735
+ }, w, {
1736
+ classes: T
1737
+ }));
1738
+ });
1739
+ process.env.NODE_ENV !== "production" && ($e.propTypes = {
1740
+ // ----------------------------- Warning --------------------------------
1741
+ // | These PropTypes are generated from the TypeScript type definitions |
1742
+ // | To update them edit the d.ts file and run "yarn proptypes" |
1743
+ // ----------------------------------------------------------------------
1744
+ /**
1745
+ * This prop helps users to fill forms faster, especially on mobile devices.
1746
+ * The name can be confusing, as it's more like an autofill.
1747
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
1748
+ */
1749
+ autoComplete: e.string,
1750
+ /**
1751
+ * If `true`, the `input` element is focused during the first mount.
1752
+ */
1753
+ autoFocus: e.bool,
1754
+ /**
1755
+ * Override or extend the styles applied to the component.
1756
+ */
1757
+ classes: e.object,
1758
+ /**
1759
+ * The color of the component.
1760
+ * It supports both default and custom theme colors, which can be added as shown in the
1761
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
1762
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
1763
+ */
1764
+ color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
1765
+ /**
1766
+ * The components used for each slot inside.
1767
+ *
1768
+ * This prop is an alias for the `slots` prop.
1769
+ * It's recommended to use the `slots` prop instead.
1770
+ *
1771
+ * @default {}
1772
+ */
1773
+ components: e.shape({
1774
+ Input: e.elementType,
1775
+ Root: e.elementType
1776
+ }),
1777
+ /**
1778
+ * The extra props for the slot components.
1779
+ * You can override the existing props or add new ones.
1780
+ *
1781
+ * This prop is an alias for the `slotProps` prop.
1782
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
1783
+ *
1784
+ * @default {}
1785
+ */
1786
+ componentsProps: e.shape({
1787
+ input: e.object,
1788
+ root: e.object
1789
+ }),
1790
+ /**
1791
+ * The default value. Use when the component is not controlled.
1792
+ */
1793
+ defaultValue: e.any,
1794
+ /**
1795
+ * If `true`, the component is disabled.
1796
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1797
+ */
1798
+ disabled: e.bool,
1799
+ /**
1800
+ * If `true`, the input will not have an underline.
1801
+ */
1802
+ disableUnderline: e.bool,
1803
+ /**
1804
+ * End `InputAdornment` for this component.
1805
+ */
1806
+ endAdornment: e.node,
1807
+ /**
1808
+ * If `true`, the `input` will indicate an error.
1809
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1810
+ */
1811
+ error: e.bool,
1812
+ /**
1813
+ * If `true`, the `input` will take up the full width of its container.
1814
+ * @default false
1815
+ */
1816
+ fullWidth: e.bool,
1817
+ /**
1818
+ * If `true`, the label is hidden.
1819
+ * This is used to increase density for a `FilledInput`.
1820
+ * Be sure to add `aria-label` to the `input` element.
1821
+ * @default false
1822
+ */
1823
+ hiddenLabel: e.bool,
1824
+ /**
1825
+ * The id of the `input` element.
1826
+ */
1827
+ id: e.string,
1828
+ /**
1829
+ * The component used for the `input` element.
1830
+ * Either a string to use a HTML element or a component.
1831
+ * @default 'input'
1832
+ */
1833
+ inputComponent: e.elementType,
1834
+ /**
1835
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1836
+ * @default {}
1837
+ */
1838
+ inputProps: e.object,
1839
+ /**
1840
+ * Pass a ref to the `input` element.
1841
+ */
1842
+ inputRef: Re,
1843
+ /**
1844
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
1845
+ * FormControl.
1846
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
1847
+ */
1848
+ margin: e.oneOf(["dense", "none"]),
1849
+ /**
1850
+ * Maximum number of rows to display when multiline option is set to true.
1851
+ */
1852
+ maxRows: e.oneOfType([e.number, e.string]),
1853
+ /**
1854
+ * Minimum number of rows to display when multiline option is set to true.
1855
+ */
1856
+ minRows: e.oneOfType([e.number, e.string]),
1857
+ /**
1858
+ * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
1859
+ * @default false
1860
+ */
1861
+ multiline: e.bool,
1862
+ /**
1863
+ * Name attribute of the `input` element.
1864
+ */
1865
+ name: e.string,
1866
+ /**
1867
+ * Callback fired when the value is changed.
1868
+ *
1869
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
1870
+ * You can pull out the new value by accessing `event.target.value` (string).
1871
+ */
1872
+ onChange: e.func,
1873
+ /**
1874
+ * The short hint displayed in the `input` before the user enters a value.
1875
+ */
1876
+ placeholder: e.string,
1877
+ /**
1878
+ * It prevents the user from changing the value of the field
1879
+ * (not from interacting with the field).
1880
+ */
1881
+ readOnly: e.bool,
1882
+ /**
1883
+ * If `true`, the `input` element is required.
1884
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1885
+ */
1886
+ required: e.bool,
1887
+ /**
1888
+ * Number of rows to display when multiline option is set to true.
1889
+ */
1890
+ rows: e.oneOfType([e.number, e.string]),
1891
+ /**
1892
+ * The extra props for the slot components.
1893
+ * You can override the existing props or add new ones.
1894
+ *
1895
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1896
+ *
1897
+ * @default {}
1898
+ */
1899
+ slotProps: e.shape({
1900
+ input: e.object,
1901
+ root: e.object
1902
+ }),
1903
+ /**
1904
+ * The components used for each slot inside.
1905
+ *
1906
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
1907
+ *
1908
+ * @default {}
1909
+ */
1910
+ slots: e.shape({
1911
+ input: e.elementType,
1912
+ root: e.elementType
1913
+ }),
1914
+ /**
1915
+ * Start `InputAdornment` for this component.
1916
+ */
1917
+ startAdornment: e.node,
1918
+ /**
1919
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1920
+ */
1921
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1922
+ /**
1923
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
1924
+ * @default 'text'
1925
+ */
1926
+ type: e.string,
1927
+ /**
1928
+ * The value of the `input` element, required for a controlled component.
1929
+ */
1930
+ value: e.any
1931
+ });
1932
+ $e.muiName = "Input";
1933
+ var Xe, Ye;
1934
+ const Ct = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"], Tt = (n) => {
1935
+ const {
1936
+ classes: t
1937
+ } = n;
1938
+ return t;
1939
+ }, ke = {
1940
+ name: "MuiSelect",
1941
+ overridesResolver: (n, t) => t.root,
1942
+ shouldForwardProp: (n) => Oe(n) && n !== "variant",
1943
+ slot: "Root"
1944
+ }, It = V(Bn, ke)(""), St = V(Vn, ke)(""), xt = V($e, ke)(""), un = /* @__PURE__ */ i.forwardRef(function(t, o) {
1945
+ const s = Pe({
1946
+ name: "MuiSelect",
1947
+ props: t
1948
+ }), {
1949
+ autoWidth: b = !1,
1950
+ children: l,
1951
+ classes: u = {},
1952
+ className: d,
1953
+ defaultOpen: P = !1,
1954
+ displayEmpty: x = !1,
1955
+ IconComponent: N = vt,
1956
+ id: F,
1957
+ input: k,
1958
+ inputProps: f,
1959
+ label: I,
1960
+ labelId: O,
1961
+ MenuProps: w,
1962
+ multiple: E = !1,
1963
+ native: T = !1,
1964
+ onClose: a,
1965
+ onOpen: p,
1966
+ open: R,
1967
+ renderValue: S,
1968
+ SelectDisplayProps: g,
1969
+ variant: _ = "outlined"
1970
+ } = s, L = X(s, Ct), M = T ? ln : cn, A = An(), z = Ln({
1971
+ props: s,
1972
+ muiFormControl: A,
1973
+ states: ["variant"]
1974
+ }).variant || _, K = k || {
1975
+ standard: Xe || (Xe = /* @__PURE__ */ $(It, {})),
1976
+ outlined: /* @__PURE__ */ $(St, {
1977
+ label: I
1978
+ }),
1979
+ filled: Ye || (Ye = /* @__PURE__ */ $(xt, {}))
1980
+ }[z], h = c({}, s, {
1981
+ variant: z,
1982
+ classes: u
1983
+ }), m = Tt(h), B = pe(o, K.ref);
1984
+ return /* @__PURE__ */ $(i.Fragment, {
1985
+ children: /* @__PURE__ */ i.cloneElement(K, c({
1986
+ // Most of the logic is implemented in `SelectInput`.
1987
+ // The `Select` component is a simple API wrapper to expose something better to play with.
1988
+ inputComponent: M,
1989
+ inputProps: c({
1990
+ children: l,
1991
+ IconComponent: N,
1992
+ variant: z,
1993
+ type: void 0,
1994
+ // We render a select. We can ignore the type provided by the `Input`.
1995
+ multiple: E
1996
+ }, T ? {
1997
+ id: F
1998
+ } : {
1999
+ autoWidth: b,
2000
+ defaultOpen: P,
2001
+ displayEmpty: x,
2002
+ labelId: O,
2003
+ MenuProps: w,
2004
+ onClose: a,
2005
+ onOpen: p,
2006
+ open: R,
2007
+ renderValue: S,
2008
+ SelectDisplayProps: c({
2009
+ id: F
2010
+ }, g)
2011
+ }, f, {
2012
+ classes: f ? Je(m, f.classes) : m
2013
+ }, k ? k.props.inputProps : {})
2014
+ }, E && T && z === "outlined" ? {
2015
+ notched: !0
2016
+ } : {}, {
2017
+ ref: B,
2018
+ className: oe(K.props.className, d)
2019
+ }, !k && {
2020
+ variant: z
2021
+ }, L))
2022
+ });
2023
+ });
2024
+ process.env.NODE_ENV !== "production" && (un.propTypes = {
2025
+ // ----------------------------- Warning --------------------------------
2026
+ // | These PropTypes are generated from the TypeScript type definitions |
2027
+ // | To update them edit the d.ts file and run "yarn proptypes" |
2028
+ // ----------------------------------------------------------------------
2029
+ /**
2030
+ * If `true`, the width of the popover will automatically be set according to the items inside the
2031
+ * menu, otherwise it will be at least the width of the select input.
2032
+ * @default false
2033
+ */
2034
+ autoWidth: e.bool,
2035
+ /**
2036
+ * The option elements to populate the select with.
2037
+ * Can be some `MenuItem` when `native` is false and `option` when `native` is true.
2038
+ *
2039
+ * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
2040
+ */
2041
+ children: e.node,
2042
+ /**
2043
+ * Override or extend the styles applied to the component.
2044
+ * @default {}
2045
+ */
2046
+ classes: e.object,
2047
+ /**
2048
+ * @ignore
2049
+ */
2050
+ className: e.string,
2051
+ /**
2052
+ * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
2053
+ * You can only use it when the `native` prop is `false` (default).
2054
+ * @default false
2055
+ */
2056
+ defaultOpen: e.bool,
2057
+ /**
2058
+ * The default value. Use when the component is not controlled.
2059
+ */
2060
+ defaultValue: e.any,
2061
+ /**
2062
+ * If `true`, a value is displayed even if no items are selected.
2063
+ *
2064
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
2065
+ * returns the value to be displayed when no items are selected.
2066
+ *
2067
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
2068
+ * The label should either be hidden or forced to a shrunk state.
2069
+ * @default false
2070
+ */
2071
+ displayEmpty: e.bool,
2072
+ /**
2073
+ * The icon that displays the arrow.
2074
+ * @default ArrowDropDownIcon
2075
+ */
2076
+ IconComponent: e.elementType,
2077
+ /**
2078
+ * The `id` of the wrapper element or the `select` element when `native`.
2079
+ */
2080
+ id: e.string,
2081
+ /**
2082
+ * An `Input` element; does not have to be a material-ui specific `Input`.
2083
+ */
2084
+ input: e.element,
2085
+ /**
2086
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2087
+ * When `native` is `true`, the attributes are applied on the `select` element.
2088
+ */
2089
+ inputProps: e.object,
2090
+ /**
2091
+ * See [OutlinedInput#label](/material-ui/api/outlined-input/#props)
2092
+ */
2093
+ label: e.node,
2094
+ /**
2095
+ * The ID of an element that acts as an additional label. The Select will
2096
+ * be labelled by the additional label and the selected value.
2097
+ */
2098
+ labelId: e.string,
2099
+ /**
2100
+ * Props applied to the [`Menu`](/material-ui/api/menu/) element.
2101
+ */
2102
+ MenuProps: e.object,
2103
+ /**
2104
+ * If `true`, `value` must be an array and the menu will support multiple selections.
2105
+ * @default false
2106
+ */
2107
+ multiple: e.bool,
2108
+ /**
2109
+ * If `true`, the component uses a native `select` element.
2110
+ * @default false
2111
+ */
2112
+ native: e.bool,
2113
+ /**
2114
+ * Callback fired when a menu item is selected.
2115
+ *
2116
+ * @param {SelectChangeEvent<T>} event The event source of the callback.
2117
+ * You can pull out the new value by accessing `event.target.value` (any).
2118
+ * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
2119
+ * @param {object} [child] The react element that was selected when `native` is `false` (default).
2120
+ */
2121
+ onChange: e.func,
2122
+ /**
2123
+ * Callback fired when the component requests to be closed.
2124
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
2125
+ *
2126
+ * @param {object} event The event source of the callback.
2127
+ */
2128
+ onClose: e.func,
2129
+ /**
2130
+ * Callback fired when the component requests to be opened.
2131
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
2132
+ *
2133
+ * @param {object} event The event source of the callback.
2134
+ */
2135
+ onOpen: e.func,
2136
+ /**
2137
+ * If `true`, the component is shown.
2138
+ * You can only use it when the `native` prop is `false` (default).
2139
+ */
2140
+ open: e.bool,
2141
+ /**
2142
+ * Render the selected value.
2143
+ * You can only use it when the `native` prop is `false` (default).
2144
+ *
2145
+ * @param {any} value The `value` provided to the component.
2146
+ * @returns {ReactNode}
2147
+ */
2148
+ renderValue: e.func,
2149
+ /**
2150
+ * Props applied to the clickable div element.
2151
+ */
2152
+ SelectDisplayProps: e.object,
2153
+ /**
2154
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2155
+ */
2156
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2157
+ /**
2158
+ * The `input` value. Providing an empty string will select no options.
2159
+ * Set to an empty string `''` if you don't want any of the available options to be selected.
2160
+ *
2161
+ * If the value is an object it must have reference equality with the option in order to be selected.
2162
+ * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
2163
+ */
2164
+ value: e.oneOfType([e.oneOf([""]), e.any]),
2165
+ /**
2166
+ * The variant to use.
2167
+ * @default 'outlined'
2168
+ */
2169
+ variant: e.oneOf(["filled", "outlined", "standard"])
2170
+ });
2171
+ un.muiName = "Select";
2172
+ export {
2173
+ $e as F,
2174
+ un as S
2175
+ };