@hybridcore/ui 1.3.2 → 1.3.4

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