@hybridcore/ui 1.6.12 → 1.6.13

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 (105) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index2.css +1 -1
  3. package/dist/components/button/styled.js +1 -1
  4. package/dist/components/charts/_common/format.js +149 -41
  5. package/dist/components/charts/_common/utils.js +16 -11
  6. package/dist/components/collapsible-card/index.js +21 -30
  7. package/dist/components/collapsible-card/styled.js +16 -14
  8. package/dist/components/color-picker/index.js +2227 -3357
  9. package/dist/components/color-picker/styled.js +87 -7
  10. package/dist/components/confirm/dialog.js +89 -8
  11. package/dist/components/confirm/index.js +1 -1
  12. package/dist/components/data-map/index.js +1 -1
  13. package/dist/components/data-map/logic.js +20 -20
  14. package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
  15. package/dist/components/date-picker-with-custom-range/index.js +86 -7
  16. package/dist/components/date-range-picker/index.js +464 -452
  17. package/dist/components/document-viewer/components/viewer/index.js +1 -1
  18. package/dist/components/duration-select/index.js +10 -10
  19. package/dist/components/duration-select/styled.js +1 -1
  20. package/dist/components/geometry-picker/coordinate/index.js +14 -14
  21. package/dist/components/geometry-picker/edit/index.js +1 -1
  22. package/dist/components/geometry-picker/geometry/index.js +1 -1
  23. package/dist/components/geometry-picker/kml/index.js +11 -11
  24. package/dist/components/geometry-picker/map/logic.js +145 -3656
  25. package/dist/components/geometry-picker/map/style.js +18 -17
  26. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
  27. package/dist/components/heat-map/index.js +1 -1
  28. package/dist/components/heat-map/logic.js +77 -1924
  29. package/dist/components/instance-hierarchy-table/styled.js +18 -16
  30. package/dist/components/map/helpers/mapbox.js +17 -15
  31. package/dist/components/map/helpers/ol.js +386 -27
  32. package/dist/components/map/index.js +11 -10
  33. package/dist/components/map/logic.js +22 -22
  34. package/dist/components/map/styled.js +31 -27
  35. package/dist/components/metric-card/logic.js +46 -49
  36. package/dist/components/phone-input/index.js +10 -9
  37. package/dist/components/property-mapping/index.js +1 -1
  38. package/dist/components/prr-map/index.js +1 -1
  39. package/dist/components/prr-map/logic.js +27 -26
  40. package/dist/components/range-selector/styled.js +65 -4228
  41. package/dist/components/raster-grid-map/index.js +1 -1
  42. package/dist/components/raster-grid-map/logic.js +60 -57
  43. package/dist/components/simple-pivot-table/index.js +17 -17
  44. package/dist/components/simple-pivot-table/logic.js +67 -76
  45. package/dist/components/sortable-list/index.js +1091 -1264
  46. package/dist/components/template-form/components/property-list/index.js +36 -33
  47. package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
  48. package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
  49. package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
  50. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
  51. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
  52. package/dist/components/tree-select/index.js +16 -16
  53. package/dist/index.esm-UfGMjYOL.js +197 -0
  54. package/dist/main.d.ts +54 -8
  55. package/dist/main.js +176 -175
  56. package/package.json +1 -1
  57. package/dist/AccordionSummary-CJppWeqF.js +0 -781
  58. package/dist/Add-CqcD1PWb.js +0 -403
  59. package/dist/Box-DqUMmZjL.js +0 -31
  60. package/dist/Button-C5yquWAB.js +0 -357
  61. package/dist/ButtonBase-BEF7oTOe.js +0 -887
  62. package/dist/Delete-BdyYpINH.js +0 -23
  63. package/dist/DialogContent-BvVjD9z3.js +0 -523
  64. package/dist/FormGroup-CpBsIyYR.js +0 -89
  65. package/dist/IconButton-BoGwbvrP.js +0 -184
  66. package/dist/InputLabel-Dd8RrneV.js +0 -341
  67. package/dist/MenuItem-DwqJqzuM.js +0 -233
  68. package/dist/Modal-MUZygjmQ.js +0 -1158
  69. package/dist/Paper-BkQLdsCI.js +0 -582
  70. package/dist/Select-DHUl_uG3.js +0 -3916
  71. package/dist/Source-BSZST_GH.js +0 -4410
  72. package/dist/SwitchBase-DTndTqI8.js +0 -235
  73. package/dist/Text-ChJRuaD8.js +0 -2197
  74. package/dist/TextField-e2oKaUN1.js +0 -669
  75. package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
  76. package/dist/Typography-DgsSLCFC.js +0 -178
  77. package/dist/Vector-BmuhQO4p.js +0 -3606
  78. package/dist/Vector-DfTqQEln.js +0 -1735
  79. package/dist/WKT-2wsDT-nq.js +0 -2310
  80. package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
  81. package/dist/assets/index3.css +0 -1
  82. package/dist/assets/index4.css +0 -1
  83. package/dist/clsx-OuTLNxxd.js +0 -16
  84. package/dist/createChainedFunction-C0nujS3O.js +0 -9
  85. package/dist/createSvgIcon-Ch_cT8az.js +0 -185
  86. package/dist/createSvgIcon-DuDuASu1.js +0 -62
  87. package/dist/debounce-46wSf_lW.js +0 -15
  88. package/dist/dialog-BYRnCztH.js +0 -154
  89. package/dist/formControlState-vgaj2ksH.js +0 -10
  90. package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
  91. package/dist/index-DH6qsPBn.js +0 -153
  92. package/dist/index-e9xTIYWt.js +0 -1934
  93. package/dist/index.esm-BLLrbTzY.js +0 -318
  94. package/dist/math-Bvt2Ubuz.js +0 -704
  95. package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
  96. package/dist/ol-yOE-NV0X.js +0 -7465
  97. package/dist/ownerWindow-wg6foiOE.js +0 -10
  98. package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
  99. package/dist/styled-SoqbyrkW.js +0 -350
  100. package/dist/unsupportedProp-DuqR2hj9.js +0 -36
  101. package/dist/useControlled-BYdyS7Pn.js +0 -31
  102. package/dist/useFormControl-CatNKXAi.js +0 -10
  103. package/dist/useId-BW-oWmul.js +0 -19
  104. package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
  105. package/dist/useSlot-B_Q4vnX5.js +0 -42
@@ -1,3916 +0,0 @@
1
- import { _ as X, a as i } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as s from "react";
3
- import { P as e } from "./index-C__OZmYy.js";
4
- import { c as de } from "./clsx-OuTLNxxd.js";
5
- import { r as to } from "./index-DH6qsPBn.js";
6
- import { jsx as N, jsxs as Ee } from "react/jsx-runtime";
7
- import { g as ce, a as pe, s as _, u as ye, c as fe, m as qo, T as Go, b as we, n as wo, r as ve, o as ro, p as Xo } from "./generateUtilityClasses-C3ivN9Ie.js";
8
- import { g as So, e as Yo, a as Zo, M as Jo, u as ze, H as eo } from "./Modal-MUZygjmQ.js";
9
- import { u as Qo, T as en, b as on, g as ho, i as oo, P as nn, c as tn } from "./Paper-BkQLdsCI.js";
10
- import { e as rn, u as Se, b as sn, a as Ve, f as Io, r as Ie, c as an } from "./TransitionGroupContext-BDAp2T0O.js";
11
- import { a as Ue, o as _e } from "./ownerWindow-wg6foiOE.js";
12
- import { d as No } from "./debounce-46wSf_lW.js";
13
- import { u as go } from "./useControlled-BYdyS7Pn.js";
14
- import { u as ln } from "./useId-BW-oWmul.js";
15
- import { f as so } from "./formControlState-vgaj2ksH.js";
16
- import { u as io, F as un } from "./useFormControl-CatNKXAi.js";
17
- import { c as dn } from "./createSvgIcon-Ch_cT8az.js";
18
- import { GlobalStyles as cn } from "@mui/system";
19
- const pn = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
20
- function no(o) {
21
- return `scale(${o}, ${o ** 2})`;
22
- }
23
- const fn = {
24
- entering: {
25
- opacity: 1,
26
- transform: no(1)
27
- },
28
- entered: {
29
- opacity: 1,
30
- transform: "none"
31
- }
32
- }, Je = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), ao = /* @__PURE__ */ s.forwardRef(function(n, t) {
33
- const {
34
- addEndListener: a,
35
- appear: u = !0,
36
- children: d,
37
- easing: p,
38
- in: c,
39
- onEnter: g,
40
- onEntered: x,
41
- onEntering: y,
42
- onExit: P,
43
- onExited: v,
44
- onExiting: R,
45
- style: w,
46
- timeout: S = "auto",
47
- // eslint-disable-next-line react/prop-types
48
- TransitionComponent: E = en
49
- } = n, m = X(n, pn), T = rn(), l = s.useRef(), r = Qo(), b = s.useRef(null), h = Se(b, So(d), t), O = (I) => (U) => {
50
- if (I) {
51
- const j = b.current;
52
- U === void 0 ? I(j) : I(j, U);
53
- }
54
- }, D = O(y), H = O((I, U) => {
55
- on(I);
56
- const {
57
- duration: j,
58
- delay: C,
59
- easing: z
60
- } = ho({
61
- style: w,
62
- timeout: S,
63
- easing: p
64
- }, {
65
- mode: "enter"
66
- });
67
- let J;
68
- S === "auto" ? (J = r.transitions.getAutoHeightDuration(I.clientHeight), l.current = J) : J = j, I.style.transition = [r.transitions.create("opacity", {
69
- duration: J,
70
- delay: C
71
- }), r.transitions.create("transform", {
72
- duration: Je ? J : J * 0.666,
73
- delay: C,
74
- easing: z
75
- })].join(","), g && g(I, U);
76
- }), V = O(x), Y = O(R), $ = O((I) => {
77
- const {
78
- duration: U,
79
- delay: j,
80
- easing: C
81
- } = ho({
82
- style: w,
83
- timeout: S,
84
- easing: p
85
- }, {
86
- mode: "exit"
87
- });
88
- let z;
89
- S === "auto" ? (z = r.transitions.getAutoHeightDuration(I.clientHeight), l.current = z) : z = U, I.style.transition = [r.transitions.create("opacity", {
90
- duration: z,
91
- delay: j
92
- }), r.transitions.create("transform", {
93
- duration: Je ? z : z * 0.666,
94
- delay: Je ? j : j || z * 0.333,
95
- easing: C
96
- })].join(","), I.style.opacity = 0, I.style.transform = no(0.75), P && P(I);
97
- }), B = O(v);
98
- return /* @__PURE__ */ N(E, i({
99
- appear: u,
100
- in: c,
101
- nodeRef: b,
102
- onEnter: H,
103
- onEntered: V,
104
- onEntering: D,
105
- onExit: $,
106
- onExited: B,
107
- onExiting: Y,
108
- addEndListener: (I) => {
109
- S === "auto" && T.start(l.current || 0, I), a && a(b.current, I);
110
- },
111
- timeout: S === "auto" ? null : S
112
- }, m, {
113
- children: (I, U) => /* @__PURE__ */ s.cloneElement(d, i({
114
- style: i({
115
- opacity: 0,
116
- transform: no(0.75),
117
- visibility: I === "exited" && !c ? "hidden" : void 0
118
- }, fn[I], w, d.props.style),
119
- ref: h
120
- }, U))
121
- }));
122
- });
123
- process.env.NODE_ENV !== "production" && (ao.propTypes = {
124
- // ┌────────────────────────────── Warning ──────────────────────────────┐
125
- // │ These PropTypes are generated from the TypeScript type definitions. │
126
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
127
- // └─────────────────────────────────────────────────────────────────────┘
128
- /**
129
- * Add a custom transition end trigger. Called with the transitioning DOM
130
- * node and a done callback. Allows for more fine grained transition end
131
- * logic. Note: Timeouts are still used as a fallback if provided.
132
- */
133
- addEndListener: e.func,
134
- /**
135
- * Perform the enter transition when it first mounts if `in` is also `true`.
136
- * Set this to `false` to disable this behavior.
137
- * @default true
138
- */
139
- appear: e.bool,
140
- /**
141
- * A single child content element.
142
- */
143
- children: Yo.isRequired,
144
- /**
145
- * The transition timing function.
146
- * You may specify a single easing or a object containing enter and exit values.
147
- */
148
- easing: e.oneOfType([e.shape({
149
- enter: e.string,
150
- exit: e.string
151
- }), e.string]),
152
- /**
153
- * If `true`, the component will transition in.
154
- */
155
- in: e.bool,
156
- /**
157
- * @ignore
158
- */
159
- onEnter: e.func,
160
- /**
161
- * @ignore
162
- */
163
- onEntered: e.func,
164
- /**
165
- * @ignore
166
- */
167
- onEntering: e.func,
168
- /**
169
- * @ignore
170
- */
171
- onExit: e.func,
172
- /**
173
- * @ignore
174
- */
175
- onExited: e.func,
176
- /**
177
- * @ignore
178
- */
179
- onExiting: e.func,
180
- /**
181
- * @ignore
182
- */
183
- style: e.object,
184
- /**
185
- * The duration for the transition, in milliseconds.
186
- * You may specify a single timeout for all transitions, or individually with an object.
187
- *
188
- * Set to 'auto' to automatically calculate transition time based on height.
189
- * @default 'auto'
190
- */
191
- timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
192
- appear: e.number,
193
- enter: e.number,
194
- exit: e.number
195
- })])
196
- });
197
- ao.muiSupportAuto = !0;
198
- const Mo = /* @__PURE__ */ s.createContext({});
199
- process.env.NODE_ENV !== "production" && (Mo.displayName = "ListContext");
200
- function mn(o) {
201
- return pe("MuiList", o);
202
- }
203
- ce("MuiList", ["root", "padding", "dense", "subheader"]);
204
- const bn = ["children", "className", "component", "dense", "disablePadding", "subheader"], hn = (o) => {
205
- const {
206
- classes: n,
207
- disablePadding: t,
208
- dense: a,
209
- subheader: u
210
- } = o;
211
- return fe({
212
- root: ["root", !t && "padding", a && "dense", u && "subheader"]
213
- }, mn, n);
214
- }, gn = _("ul", {
215
- name: "MuiList",
216
- slot: "Root",
217
- overridesResolver: (o, n) => {
218
- const {
219
- ownerState: t
220
- } = o;
221
- return [n.root, !t.disablePadding && n.padding, t.dense && n.dense, t.subheader && n.subheader];
222
- }
223
- })(({
224
- ownerState: o
225
- }) => i({
226
- listStyle: "none",
227
- margin: 0,
228
- padding: 0,
229
- position: "relative"
230
- }, !o.disablePadding && {
231
- paddingTop: 8,
232
- paddingBottom: 8
233
- }, o.subheader && {
234
- paddingTop: 0
235
- })), Fo = /* @__PURE__ */ s.forwardRef(function(n, t) {
236
- const a = ye({
237
- props: n,
238
- name: "MuiList"
239
- }), {
240
- children: u,
241
- className: d,
242
- component: p = "ul",
243
- dense: c = !1,
244
- disablePadding: g = !1,
245
- subheader: x
246
- } = a, y = X(a, bn), P = s.useMemo(() => ({
247
- dense: c
248
- }), [c]), v = i({}, a, {
249
- component: p,
250
- dense: c,
251
- disablePadding: g
252
- }), R = hn(v);
253
- return /* @__PURE__ */ N(Mo.Provider, {
254
- value: P,
255
- children: /* @__PURE__ */ Ee(gn, i({
256
- as: p,
257
- className: de(R.root, d),
258
- ref: t,
259
- ownerState: v
260
- }, y, {
261
- children: [x, u]
262
- }))
263
- });
264
- });
265
- process.env.NODE_ENV !== "production" && (Fo.propTypes = {
266
- // ┌────────────────────────────── Warning ──────────────────────────────┐
267
- // │ These PropTypes are generated from the TypeScript type definitions. │
268
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
269
- // └─────────────────────────────────────────────────────────────────────┘
270
- /**
271
- * The content of the component.
272
- */
273
- children: e.node,
274
- /**
275
- * Override or extend the styles applied to the component.
276
- */
277
- classes: e.object,
278
- /**
279
- * @ignore
280
- */
281
- className: e.string,
282
- /**
283
- * The component used for the root node.
284
- * Either a string to use a HTML element or a component.
285
- */
286
- component: e.elementType,
287
- /**
288
- * If `true`, compact vertical padding designed for keyboard and mouse input is used for
289
- * the list and list items.
290
- * The prop is available to descendant components as the `dense` context.
291
- * @default false
292
- */
293
- dense: e.bool,
294
- /**
295
- * If `true`, vertical padding is removed from the list.
296
- * @default false
297
- */
298
- disablePadding: e.bool,
299
- /**
300
- * The content of the subheader, normally `ListSubheader`.
301
- */
302
- subheader: e.node,
303
- /**
304
- * The system prop that allows defining system overrides as well as additional CSS styles.
305
- */
306
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
307
- });
308
- const yn = ["onChange", "maxRows", "minRows", "style", "value"];
309
- function Be(o) {
310
- return parseInt(o, 10) || 0;
311
- }
312
- const vn = {
313
- shadow: {
314
- // Visibility needed to hide the extra text area on iPads
315
- visibility: "hidden",
316
- // Remove from the content flow
317
- position: "absolute",
318
- // Ignore the scrollbar width
319
- overflow: "hidden",
320
- height: 0,
321
- top: 0,
322
- left: 0,
323
- // Create a new layer, increase the isolation of the computed values
324
- transform: "translateZ(0)"
325
- }
326
- };
327
- function On(o) {
328
- for (const n in o)
329
- return !1;
330
- return !0;
331
- }
332
- function yo(o) {
333
- return On(o) || o.outerHeightStyle === 0 && !o.overflowing;
334
- }
335
- const $o = /* @__PURE__ */ s.forwardRef(function(n, t) {
336
- const {
337
- onChange: a,
338
- maxRows: u,
339
- minRows: d = 1,
340
- style: p,
341
- value: c
342
- } = n, g = X(n, yn), {
343
- current: x
344
- } = s.useRef(c != null), y = s.useRef(null), P = Se(t, y), v = s.useRef(null), R = s.useRef(null), w = s.useCallback(() => {
345
- const l = y.current, r = R.current;
346
- if (!l || !r)
347
- return;
348
- const h = Ue(l).getComputedStyle(l);
349
- if (h.width === "0px")
350
- return {
351
- outerHeightStyle: 0,
352
- overflowing: !1
353
- };
354
- r.style.width = h.width, r.value = l.value || n.placeholder || "x", r.value.slice(-1) === `
355
- ` && (r.value += " ");
356
- const O = h.boxSizing, D = Be(h.paddingBottom) + Be(h.paddingTop), H = Be(h.borderBottomWidth) + Be(h.borderTopWidth), V = r.scrollHeight;
357
- r.value = "x";
358
- const Y = r.scrollHeight;
359
- let $ = V;
360
- d && ($ = Math.max(Number(d) * Y, $)), u && ($ = Math.min(Number(u) * Y, $)), $ = Math.max($, Y);
361
- const B = $ + (O === "border-box" ? D + H : 0), Z = Math.abs($ - V) <= 1;
362
- return {
363
- outerHeightStyle: B,
364
- overflowing: Z
365
- };
366
- }, [u, d, n.placeholder]), S = sn(() => {
367
- const l = y.current, r = w();
368
- if (!l || !r || yo(r))
369
- return !1;
370
- const b = r.outerHeightStyle;
371
- return v.current != null && v.current !== b;
372
- }), E = s.useCallback(() => {
373
- const l = y.current, r = w();
374
- if (!l || !r || yo(r))
375
- return;
376
- const b = r.outerHeightStyle;
377
- v.current !== b && (v.current = b, l.style.height = `${b}px`), l.style.overflow = r.overflowing ? "hidden" : "";
378
- }, [w]), m = s.useRef(-1);
379
- Ve(() => {
380
- const l = No(E), r = y == null ? void 0 : y.current;
381
- if (!r)
382
- return;
383
- const b = Ue(r);
384
- b.addEventListener("resize", l);
385
- let h;
386
- return typeof ResizeObserver < "u" && (h = new ResizeObserver(() => {
387
- S() && (h.unobserve(r), cancelAnimationFrame(m.current), E(), m.current = requestAnimationFrame(() => {
388
- h.observe(r);
389
- }));
390
- }), h.observe(r)), () => {
391
- l.clear(), cancelAnimationFrame(m.current), b.removeEventListener("resize", l), h && h.disconnect();
392
- };
393
- }, [w, E, S]), Ve(() => {
394
- E();
395
- });
396
- const T = (l) => {
397
- x || E(), a && a(l);
398
- };
399
- return /* @__PURE__ */ Ee(s.Fragment, {
400
- children: [/* @__PURE__ */ N("textarea", i({
401
- value: c,
402
- onChange: T,
403
- ref: P,
404
- rows: d,
405
- style: p
406
- }, g)), /* @__PURE__ */ N("textarea", {
407
- "aria-hidden": !0,
408
- className: n.className,
409
- readOnly: !0,
410
- ref: R,
411
- tabIndex: -1,
412
- style: i({}, vn.shadow, p, {
413
- paddingTop: 0,
414
- paddingBottom: 0
415
- })
416
- })]
417
- });
418
- });
419
- process.env.NODE_ENV !== "production" && ($o.propTypes = {
420
- // ┌────────────────────────────── Warning ──────────────────────────────┐
421
- // │ These PropTypes are generated from the TypeScript type definitions. │
422
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
423
- // └─────────────────────────────────────────────────────────────────────┘
424
- /**
425
- * @ignore
426
- */
427
- className: e.string,
428
- /**
429
- * Maximum number of rows to display.
430
- */
431
- maxRows: e.oneOfType([e.number, e.string]),
432
- /**
433
- * Minimum number of rows to display.
434
- * @default 1
435
- */
436
- minRows: e.oneOfType([e.number, e.string]),
437
- /**
438
- * @ignore
439
- */
440
- onChange: e.func,
441
- /**
442
- * @ignore
443
- */
444
- placeholder: e.string,
445
- /**
446
- * @ignore
447
- */
448
- style: e.object,
449
- /**
450
- * @ignore
451
- */
452
- value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
453
- });
454
- function ko(o) {
455
- return /* @__PURE__ */ N(cn, i({}, o, {
456
- defaultTheme: qo,
457
- themeId: Go
458
- }));
459
- }
460
- process.env.NODE_ENV !== "production" && (ko.propTypes = {
461
- // ┌────────────────────────────── Warning ──────────────────────────────┐
462
- // │ These PropTypes are generated from the TypeScript type definitions. │
463
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
464
- // └─────────────────────────────────────────────────────────────────────┘
465
- /**
466
- * The styles you want to apply globally.
467
- */
468
- styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
469
- });
470
- function vo(o) {
471
- return o != null && !(Array.isArray(o) && o.length === 0);
472
- }
473
- function Do(o, n = !1) {
474
- return o && (vo(o.value) && o.value !== "" || n && vo(o.defaultValue) && o.defaultValue !== "");
475
- }
476
- function Ut(o) {
477
- return o.startAdornment;
478
- }
479
- function Cn(o) {
480
- return pe("MuiInputBase", o);
481
- }
482
- const Fe = ce("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), xn = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], He = (o, n) => {
483
- const {
484
- ownerState: t
485
- } = o;
486
- return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${we(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
487
- }, Ke = (o, n) => {
488
- const {
489
- ownerState: t
490
- } = o;
491
- return [n.input, t.size === "small" && n.inputSizeSmall, t.multiline && n.inputMultiline, t.type === "search" && n.inputTypeSearch, t.startAdornment && n.inputAdornedStart, t.endAdornment && n.inputAdornedEnd, t.hiddenLabel && n.inputHiddenLabel];
492
- }, Rn = (o) => {
493
- const {
494
- classes: n,
495
- color: t,
496
- disabled: a,
497
- error: u,
498
- endAdornment: d,
499
- focused: p,
500
- formControl: c,
501
- fullWidth: g,
502
- hiddenLabel: x,
503
- multiline: y,
504
- readOnly: P,
505
- size: v,
506
- startAdornment: R,
507
- type: w
508
- } = o, S = {
509
- root: ["root", `color${we(t)}`, a && "disabled", u && "error", g && "fullWidth", p && "focused", c && "formControl", v && v !== "medium" && `size${we(v)}`, y && "multiline", R && "adornedStart", d && "adornedEnd", x && "hiddenLabel", P && "readOnly"],
510
- input: ["input", a && "disabled", w === "search" && "inputTypeSearch", y && "inputMultiline", v === "small" && "inputSizeSmall", x && "inputHiddenLabel", R && "inputAdornedStart", d && "inputAdornedEnd", P && "readOnly"]
511
- };
512
- return fe(S, Cn, n);
513
- }, qe = _("div", {
514
- name: "MuiInputBase",
515
- slot: "Root",
516
- overridesResolver: He
517
- })(({
518
- theme: o,
519
- ownerState: n
520
- }) => i({}, o.typography.body1, {
521
- color: (o.vars || o).palette.text.primary,
522
- lineHeight: "1.4375em",
523
- // 23px
524
- boxSizing: "border-box",
525
- // Prevent padding issue with fullWidth.
526
- position: "relative",
527
- cursor: "text",
528
- display: "inline-flex",
529
- alignItems: "center",
530
- [`&.${Fe.disabled}`]: {
531
- color: (o.vars || o).palette.text.disabled,
532
- cursor: "default"
533
- }
534
- }, n.multiline && i({
535
- padding: "4px 0 5px"
536
- }, n.size === "small" && {
537
- paddingTop: 1
538
- }), n.fullWidth && {
539
- width: "100%"
540
- })), Ge = _("input", {
541
- name: "MuiInputBase",
542
- slot: "Input",
543
- overridesResolver: Ke
544
- })(({
545
- theme: o,
546
- ownerState: n
547
- }) => {
548
- const t = o.palette.mode === "light", a = i({
549
- color: "currentColor"
550
- }, o.vars ? {
551
- opacity: o.vars.opacity.inputPlaceholder
552
- } : {
553
- opacity: t ? 0.42 : 0.5
554
- }, {
555
- transition: o.transitions.create("opacity", {
556
- duration: o.transitions.duration.shorter
557
- })
558
- }), u = {
559
- opacity: "0 !important"
560
- }, d = o.vars ? {
561
- opacity: o.vars.opacity.inputPlaceholder
562
- } : {
563
- opacity: t ? 0.42 : 0.5
564
- };
565
- return i({
566
- font: "inherit",
567
- letterSpacing: "inherit",
568
- color: "currentColor",
569
- padding: "4px 0 5px",
570
- border: 0,
571
- boxSizing: "content-box",
572
- background: "none",
573
- height: "1.4375em",
574
- // Reset 23pxthe native input line-height
575
- margin: 0,
576
- // Reset for Safari
577
- WebkitTapHighlightColor: "transparent",
578
- display: "block",
579
- // Make the flex item shrink with Firefox
580
- minWidth: 0,
581
- width: "100%",
582
- // Fix IE11 width issue
583
- animationName: "mui-auto-fill-cancel",
584
- animationDuration: "10ms",
585
- "&::-webkit-input-placeholder": a,
586
- "&::-moz-placeholder": a,
587
- // Firefox 19+
588
- "&:-ms-input-placeholder": a,
589
- // IE11
590
- "&::-ms-input-placeholder": a,
591
- // Edge
592
- "&:focus": {
593
- outline: 0
594
- },
595
- // Reset Firefox invalid required input style
596
- "&:invalid": {
597
- boxShadow: "none"
598
- },
599
- "&::-webkit-search-decoration": {
600
- // Remove the padding when type=search.
601
- WebkitAppearance: "none"
602
- },
603
- // Show and hide the placeholder logic
604
- [`label[data-shrink=false] + .${Fe.formControl} &`]: {
605
- "&::-webkit-input-placeholder": u,
606
- "&::-moz-placeholder": u,
607
- // Firefox 19+
608
- "&:-ms-input-placeholder": u,
609
- // IE11
610
- "&::-ms-input-placeholder": u,
611
- // Edge
612
- "&:focus::-webkit-input-placeholder": d,
613
- "&:focus::-moz-placeholder": d,
614
- // Firefox 19+
615
- "&:focus:-ms-input-placeholder": d,
616
- // IE11
617
- "&:focus::-ms-input-placeholder": d
618
- // Edge
619
- },
620
- [`&.${Fe.disabled}`]: {
621
- opacity: 1,
622
- // Reset iOS opacity
623
- WebkitTextFillColor: (o.vars || o).palette.text.disabled
624
- // Fix opacity Safari bug
625
- },
626
- "&:-webkit-autofill": {
627
- animationDuration: "5000s",
628
- animationName: "mui-auto-fill"
629
- }
630
- }, n.size === "small" && {
631
- paddingTop: 1
632
- }, n.multiline && {
633
- height: "auto",
634
- resize: "none",
635
- padding: 0,
636
- paddingTop: 0
637
- }, n.type === "search" && {
638
- // Improve type search style.
639
- MozAppearance: "textfield"
640
- });
641
- }), Pn = /* @__PURE__ */ N(ko, {
642
- styles: {
643
- "@keyframes mui-auto-fill": {
644
- from: {
645
- display: "block"
646
- }
647
- },
648
- "@keyframes mui-auto-fill-cancel": {
649
- from: {
650
- display: "block"
651
- }
652
- }
653
- }
654
- }), Xe = /* @__PURE__ */ s.forwardRef(function(n, t) {
655
- var a;
656
- const u = ye({
657
- props: n,
658
- name: "MuiInputBase"
659
- }), {
660
- "aria-describedby": d,
661
- autoComplete: p,
662
- autoFocus: c,
663
- className: g,
664
- components: x = {},
665
- componentsProps: y = {},
666
- defaultValue: P,
667
- disabled: v,
668
- disableInjectingGlobalStyles: R,
669
- endAdornment: w,
670
- fullWidth: S = !1,
671
- id: E,
672
- inputComponent: m = "input",
673
- inputProps: T = {},
674
- inputRef: l,
675
- maxRows: r,
676
- minRows: b,
677
- multiline: h = !1,
678
- name: O,
679
- onBlur: D,
680
- onChange: H,
681
- onClick: V,
682
- onFocus: Y,
683
- onKeyDown: $,
684
- onKeyUp: B,
685
- placeholder: Z,
686
- readOnly: I,
687
- renderSuffix: U,
688
- rows: j,
689
- slotProps: C = {},
690
- slots: z = {},
691
- startAdornment: J,
692
- type: Oe = "text",
693
- value: ee
694
- } = u, re = X(u, xn), oe = T.value != null ? T.value : ee, {
695
- current: me
696
- } = s.useRef(oe != null), ne = s.useRef(), Ce = s.useCallback((k) => {
697
- process.env.NODE_ENV !== "production" && k && k.nodeName !== "INPUT" && !k.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
698
- `));
699
- }, []), xe = Se(ne, l, T.ref, Ce), [Re, be] = s.useState(!1), F = io();
700
- process.env.NODE_ENV !== "production" && s.useEffect(() => {
701
- if (F)
702
- return F.registerEffect();
703
- }, [F]);
704
- const K = so({
705
- props: u,
706
- muiFormControl: F,
707
- states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
708
- });
709
- K.focused = F ? F.focused : Re, s.useEffect(() => {
710
- !F && v && Re && (be(!1), D && D());
711
- }, [F, v, Re, D]);
712
- const L = F && F.onFilled, A = F && F.onEmpty, W = s.useCallback((k) => {
713
- Do(k) ? L && L() : A && A();
714
- }, [L, A]);
715
- Ve(() => {
716
- me && W({
717
- value: oe
718
- });
719
- }, [oe, W, me]);
720
- const se = (k) => {
721
- if (K.disabled) {
722
- k.stopPropagation();
723
- return;
724
- }
725
- Y && Y(k), T.onFocus && T.onFocus(k), F && F.onFocus ? F.onFocus(k) : be(!0);
726
- }, ie = (k) => {
727
- D && D(k), T.onBlur && T.onBlur(k), F && F.onBlur ? F.onBlur(k) : be(!1);
728
- }, ae = (k, ...De) => {
729
- if (!me) {
730
- const Pe = k.target || ne.current;
731
- if (Pe == null)
732
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : wo(1));
733
- W({
734
- value: Pe.value
735
- });
736
- }
737
- T.onChange && T.onChange(k, ...De), H && H(k, ...De);
738
- };
739
- s.useEffect(() => {
740
- W(ne.current);
741
- }, []);
742
- const ue = (k) => {
743
- ne.current && k.currentTarget === k.target && ne.current.focus(), V && V(k);
744
- };
745
- let he = m, q = T;
746
- h && he === "input" && (j ? (process.env.NODE_ENV !== "production" && (b || r) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), q = i({
747
- type: void 0,
748
- minRows: j,
749
- maxRows: j
750
- }, q)) : q = i({
751
- type: void 0,
752
- maxRows: r,
753
- minRows: b
754
- }, q), he = $o);
755
- const le = (k) => {
756
- W(k.animationName === "mui-auto-fill-cancel" ? ne.current : {
757
- value: "x"
758
- });
759
- };
760
- s.useEffect(() => {
761
- F && F.setAdornedStart(!!J);
762
- }, [F, J]);
763
- const te = i({}, u, {
764
- color: K.color || "primary",
765
- disabled: K.disabled,
766
- endAdornment: w,
767
- error: K.error,
768
- focused: K.focused,
769
- formControl: F,
770
- fullWidth: S,
771
- hiddenLabel: K.hiddenLabel,
772
- multiline: h,
773
- size: K.size,
774
- startAdornment: J,
775
- type: Oe
776
- }), G = Rn(te), Ne = z.root || x.Root || qe, $e = C.root || y.root || {}, ke = z.input || x.Input || Ge;
777
- return q = i({}, q, (a = C.input) != null ? a : y.input), /* @__PURE__ */ Ee(s.Fragment, {
778
- children: [!R && Pn, /* @__PURE__ */ Ee(Ne, i({}, $e, !oo(Ne) && {
779
- ownerState: i({}, te, $e.ownerState)
780
- }, {
781
- ref: t,
782
- onClick: ue
783
- }, re, {
784
- className: de(G.root, $e.className, g, I && "MuiInputBase-readOnly"),
785
- children: [J, /* @__PURE__ */ N(un.Provider, {
786
- value: null,
787
- children: /* @__PURE__ */ N(ke, i({
788
- ownerState: te,
789
- "aria-invalid": K.error,
790
- "aria-describedby": d,
791
- autoComplete: p,
792
- autoFocus: c,
793
- defaultValue: P,
794
- disabled: K.disabled,
795
- id: E,
796
- onAnimationStart: le,
797
- name: O,
798
- placeholder: Z,
799
- readOnly: I,
800
- required: K.required,
801
- rows: j,
802
- value: oe,
803
- onKeyDown: $,
804
- onKeyUp: B,
805
- type: Oe
806
- }, q, !oo(ke) && {
807
- as: he,
808
- ownerState: i({}, te, q.ownerState)
809
- }, {
810
- ref: xe,
811
- className: de(G.input, q.className, I && "MuiInputBase-readOnly"),
812
- onBlur: ie,
813
- onChange: ae,
814
- onFocus: se
815
- }))
816
- }), w, U ? U(i({}, K, {
817
- startAdornment: J
818
- })) : null]
819
- }))]
820
- });
821
- });
822
- process.env.NODE_ENV !== "production" && (Xe.propTypes = {
823
- // ┌────────────────────────────── Warning ──────────────────────────────┐
824
- // │ These PropTypes are generated from the TypeScript type definitions. │
825
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
826
- // └─────────────────────────────────────────────────────────────────────┘
827
- /**
828
- * @ignore
829
- */
830
- "aria-describedby": e.string,
831
- /**
832
- * This prop helps users to fill forms faster, especially on mobile devices.
833
- * The name can be confusing, as it's more like an autofill.
834
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
835
- */
836
- autoComplete: e.string,
837
- /**
838
- * If `true`, the `input` element is focused during the first mount.
839
- */
840
- autoFocus: e.bool,
841
- /**
842
- * Override or extend the styles applied to the component.
843
- */
844
- classes: e.object,
845
- /**
846
- * @ignore
847
- */
848
- className: e.string,
849
- /**
850
- * The color of the component.
851
- * It supports both default and custom theme colors, which can be added as shown in the
852
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
853
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
854
- */
855
- color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
856
- /**
857
- * The components used for each slot inside.
858
- *
859
- * This prop is an alias for the `slots` prop.
860
- * It's recommended to use the `slots` prop instead.
861
- *
862
- * @default {}
863
- */
864
- components: e.shape({
865
- Input: e.elementType,
866
- Root: e.elementType
867
- }),
868
- /**
869
- * The extra props for the slot components.
870
- * You can override the existing props or add new ones.
871
- *
872
- * This prop is an alias for the `slotProps` prop.
873
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
874
- *
875
- * @default {}
876
- */
877
- componentsProps: e.shape({
878
- input: e.object,
879
- root: e.object
880
- }),
881
- /**
882
- * The default value. Use when the component is not controlled.
883
- */
884
- defaultValue: e.any,
885
- /**
886
- * If `true`, the component is disabled.
887
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
888
- */
889
- disabled: e.bool,
890
- /**
891
- * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.
892
- * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.
893
- * @default false
894
- */
895
- disableInjectingGlobalStyles: e.bool,
896
- /**
897
- * End `InputAdornment` for this component.
898
- */
899
- endAdornment: e.node,
900
- /**
901
- * If `true`, the `input` will indicate an error.
902
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
903
- */
904
- error: e.bool,
905
- /**
906
- * If `true`, the `input` will take up the full width of its container.
907
- * @default false
908
- */
909
- fullWidth: e.bool,
910
- /**
911
- * The id of the `input` element.
912
- */
913
- id: e.string,
914
- /**
915
- * The component used for the `input` element.
916
- * Either a string to use a HTML element or a component.
917
- * @default 'input'
918
- */
919
- inputComponent: Io,
920
- /**
921
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
922
- * @default {}
923
- */
924
- inputProps: e.object,
925
- /**
926
- * Pass a ref to the `input` element.
927
- */
928
- inputRef: Ie,
929
- /**
930
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
931
- * FormControl.
932
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
933
- */
934
- margin: e.oneOf(["dense", "none"]),
935
- /**
936
- * Maximum number of rows to display when multiline option is set to true.
937
- */
938
- maxRows: e.oneOfType([e.number, e.string]),
939
- /**
940
- * Minimum number of rows to display when multiline option is set to true.
941
- */
942
- minRows: e.oneOfType([e.number, e.string]),
943
- /**
944
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
945
- * @default false
946
- */
947
- multiline: e.bool,
948
- /**
949
- * Name attribute of the `input` element.
950
- */
951
- name: e.string,
952
- /**
953
- * Callback fired when the `input` is blurred.
954
- *
955
- * Notice that the first argument (event) might be undefined.
956
- */
957
- onBlur: e.func,
958
- /**
959
- * Callback fired when the value is changed.
960
- *
961
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
962
- * You can pull out the new value by accessing `event.target.value` (string).
963
- */
964
- onChange: e.func,
965
- /**
966
- * @ignore
967
- */
968
- onClick: e.func,
969
- /**
970
- * @ignore
971
- */
972
- onFocus: e.func,
973
- /**
974
- * Callback fired when the `input` doesn't satisfy its constraints.
975
- */
976
- onInvalid: e.func,
977
- /**
978
- * @ignore
979
- */
980
- onKeyDown: e.func,
981
- /**
982
- * @ignore
983
- */
984
- onKeyUp: e.func,
985
- /**
986
- * The short hint displayed in the `input` before the user enters a value.
987
- */
988
- placeholder: e.string,
989
- /**
990
- * It prevents the user from changing the value of the field
991
- * (not from interacting with the field).
992
- */
993
- readOnly: e.bool,
994
- /**
995
- * @ignore
996
- */
997
- renderSuffix: e.func,
998
- /**
999
- * If `true`, the `input` element is required.
1000
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1001
- */
1002
- required: e.bool,
1003
- /**
1004
- * Number of rows to display when multiline option is set to true.
1005
- */
1006
- rows: e.oneOfType([e.number, e.string]),
1007
- /**
1008
- * The size of the component.
1009
- */
1010
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
1011
- /**
1012
- * The extra props for the slot components.
1013
- * You can override the existing props or add new ones.
1014
- *
1015
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1016
- *
1017
- * @default {}
1018
- */
1019
- slotProps: e.shape({
1020
- input: e.object,
1021
- root: e.object
1022
- }),
1023
- /**
1024
- * The components used for each slot inside.
1025
- *
1026
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
1027
- *
1028
- * @default {}
1029
- */
1030
- slots: e.shape({
1031
- input: e.elementType,
1032
- root: e.elementType
1033
- }),
1034
- /**
1035
- * Start `InputAdornment` for this component.
1036
- */
1037
- startAdornment: e.node,
1038
- /**
1039
- * The system prop that allows defining system overrides as well as additional CSS styles.
1040
- */
1041
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1042
- /**
1043
- * 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).
1044
- * @default 'text'
1045
- */
1046
- type: e.string,
1047
- /**
1048
- * The value of the `input` element, required for a controlled component.
1049
- */
1050
- value: e.any
1051
- });
1052
- function Tn(o) {
1053
- return pe("MuiInput", o);
1054
- }
1055
- const Le = i({}, Fe, ce("MuiInput", ["root", "underline", "input"])), En = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "slotProps", "slots", "type"], wn = (o) => {
1056
- const {
1057
- classes: n,
1058
- disableUnderline: t
1059
- } = o, u = fe({
1060
- root: ["root", !t && "underline"],
1061
- input: ["input"]
1062
- }, Tn, n);
1063
- return i({}, n, u);
1064
- }, Sn = _(qe, {
1065
- shouldForwardProp: (o) => ve(o) || o === "classes",
1066
- name: "MuiInput",
1067
- slot: "Root",
1068
- overridesResolver: (o, n) => {
1069
- const {
1070
- ownerState: t
1071
- } = o;
1072
- return [...He(o, n), !t.disableUnderline && n.underline];
1073
- }
1074
- })(({
1075
- theme: o,
1076
- ownerState: n
1077
- }) => {
1078
- let a = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)";
1079
- return o.vars && (a = `rgba(${o.vars.palette.common.onBackgroundChannel} / ${o.vars.opacity.inputUnderline})`), i({
1080
- position: "relative"
1081
- }, n.formControl && {
1082
- "label + &": {
1083
- marginTop: 16
1084
- }
1085
- }, !n.disableUnderline && {
1086
- "&::after": {
1087
- borderBottom: `2px solid ${(o.vars || o).palette[n.color].main}`,
1088
- left: 0,
1089
- bottom: 0,
1090
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1091
- content: '""',
1092
- position: "absolute",
1093
- right: 0,
1094
- transform: "scaleX(0)",
1095
- transition: o.transitions.create("transform", {
1096
- duration: o.transitions.duration.shorter,
1097
- easing: o.transitions.easing.easeOut
1098
- }),
1099
- pointerEvents: "none"
1100
- // Transparent to the hover style.
1101
- },
1102
- [`&.${Le.focused}:after`]: {
1103
- // translateX(0) is a workaround for Safari transform scale bug
1104
- // See https://github.com/mui/material-ui/issues/31766
1105
- transform: "scaleX(1) translateX(0)"
1106
- },
1107
- [`&.${Le.error}`]: {
1108
- "&::before, &::after": {
1109
- borderBottomColor: (o.vars || o).palette.error.main
1110
- }
1111
- },
1112
- "&::before": {
1113
- borderBottom: `1px solid ${a}`,
1114
- left: 0,
1115
- bottom: 0,
1116
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1117
- content: '"\\00a0"',
1118
- position: "absolute",
1119
- right: 0,
1120
- transition: o.transitions.create("border-bottom-color", {
1121
- duration: o.transitions.duration.shorter
1122
- }),
1123
- pointerEvents: "none"
1124
- // Transparent to the hover style.
1125
- },
1126
- [`&:hover:not(.${Le.disabled}, .${Le.error}):before`]: {
1127
- borderBottom: `2px solid ${(o.vars || o).palette.text.primary}`,
1128
- // Reset on touch devices, it doesn't add specificity
1129
- "@media (hover: none)": {
1130
- borderBottom: `1px solid ${a}`
1131
- }
1132
- },
1133
- [`&.${Le.disabled}:before`]: {
1134
- borderBottomStyle: "dotted"
1135
- }
1136
- });
1137
- }), In = _(Ge, {
1138
- name: "MuiInput",
1139
- slot: "Input",
1140
- overridesResolver: Ke
1141
- })({}), lo = /* @__PURE__ */ s.forwardRef(function(n, t) {
1142
- var a, u, d, p;
1143
- const c = ye({
1144
- props: n,
1145
- name: "MuiInput"
1146
- }), {
1147
- disableUnderline: g,
1148
- components: x = {},
1149
- componentsProps: y,
1150
- fullWidth: P = !1,
1151
- inputComponent: v = "input",
1152
- multiline: R = !1,
1153
- slotProps: w,
1154
- slots: S = {},
1155
- type: E = "text"
1156
- } = c, m = X(c, En), T = wn(c), r = {
1157
- root: {
1158
- ownerState: {
1159
- disableUnderline: g
1160
- }
1161
- }
1162
- }, b = w ?? y ? ro(w ?? y, r) : r, h = (a = (u = S.root) != null ? u : x.Root) != null ? a : Sn, O = (d = (p = S.input) != null ? p : x.Input) != null ? d : In;
1163
- return /* @__PURE__ */ N(Xe, i({
1164
- slots: {
1165
- root: h,
1166
- input: O
1167
- },
1168
- slotProps: b,
1169
- fullWidth: P,
1170
- inputComponent: v,
1171
- multiline: R,
1172
- ref: t,
1173
- type: E
1174
- }, m, {
1175
- classes: T
1176
- }));
1177
- });
1178
- process.env.NODE_ENV !== "production" && (lo.propTypes = {
1179
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1180
- // │ These PropTypes are generated from the TypeScript type definitions. │
1181
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1182
- // └─────────────────────────────────────────────────────────────────────┘
1183
- /**
1184
- * This prop helps users to fill forms faster, especially on mobile devices.
1185
- * The name can be confusing, as it's more like an autofill.
1186
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
1187
- */
1188
- autoComplete: e.string,
1189
- /**
1190
- * If `true`, the `input` element is focused during the first mount.
1191
- */
1192
- autoFocus: e.bool,
1193
- /**
1194
- * Override or extend the styles applied to the component.
1195
- */
1196
- classes: e.object,
1197
- /**
1198
- * The color of the component.
1199
- * It supports both default and custom theme colors, which can be added as shown in the
1200
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1201
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
1202
- */
1203
- color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
1204
- /**
1205
- * The components used for each slot inside.
1206
- *
1207
- * This prop is an alias for the `slots` prop.
1208
- * It's recommended to use the `slots` prop instead.
1209
- *
1210
- * @default {}
1211
- */
1212
- components: e.shape({
1213
- Input: e.elementType,
1214
- Root: e.elementType
1215
- }),
1216
- /**
1217
- * The extra props for the slot components.
1218
- * You can override the existing props or add new ones.
1219
- *
1220
- * This prop is an alias for the `slotProps` prop.
1221
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
1222
- *
1223
- * @default {}
1224
- */
1225
- componentsProps: e.shape({
1226
- input: e.object,
1227
- root: e.object
1228
- }),
1229
- /**
1230
- * The default value. Use when the component is not controlled.
1231
- */
1232
- defaultValue: e.any,
1233
- /**
1234
- * If `true`, the component is disabled.
1235
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1236
- */
1237
- disabled: e.bool,
1238
- /**
1239
- * If `true`, the `input` will not have an underline.
1240
- */
1241
- disableUnderline: e.bool,
1242
- /**
1243
- * End `InputAdornment` for this component.
1244
- */
1245
- endAdornment: e.node,
1246
- /**
1247
- * If `true`, the `input` will indicate an error.
1248
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1249
- */
1250
- error: e.bool,
1251
- /**
1252
- * If `true`, the `input` will take up the full width of its container.
1253
- * @default false
1254
- */
1255
- fullWidth: e.bool,
1256
- /**
1257
- * The id of the `input` element.
1258
- */
1259
- id: e.string,
1260
- /**
1261
- * The component used for the `input` element.
1262
- * Either a string to use a HTML element or a component.
1263
- * @default 'input'
1264
- */
1265
- inputComponent: e.elementType,
1266
- /**
1267
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1268
- * @default {}
1269
- */
1270
- inputProps: e.object,
1271
- /**
1272
- * Pass a ref to the `input` element.
1273
- */
1274
- inputRef: Ie,
1275
- /**
1276
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
1277
- * FormControl.
1278
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
1279
- */
1280
- margin: e.oneOf(["dense", "none"]),
1281
- /**
1282
- * Maximum number of rows to display when multiline option is set to true.
1283
- */
1284
- maxRows: e.oneOfType([e.number, e.string]),
1285
- /**
1286
- * Minimum number of rows to display when multiline option is set to true.
1287
- */
1288
- minRows: e.oneOfType([e.number, e.string]),
1289
- /**
1290
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
1291
- * @default false
1292
- */
1293
- multiline: e.bool,
1294
- /**
1295
- * Name attribute of the `input` element.
1296
- */
1297
- name: e.string,
1298
- /**
1299
- * Callback fired when the value is changed.
1300
- *
1301
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
1302
- * You can pull out the new value by accessing `event.target.value` (string).
1303
- */
1304
- onChange: e.func,
1305
- /**
1306
- * The short hint displayed in the `input` before the user enters a value.
1307
- */
1308
- placeholder: e.string,
1309
- /**
1310
- * It prevents the user from changing the value of the field
1311
- * (not from interacting with the field).
1312
- */
1313
- readOnly: e.bool,
1314
- /**
1315
- * If `true`, the `input` element is required.
1316
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1317
- */
1318
- required: e.bool,
1319
- /**
1320
- * Number of rows to display when multiline option is set to true.
1321
- */
1322
- rows: e.oneOfType([e.number, e.string]),
1323
- /**
1324
- * The extra props for the slot components.
1325
- * You can override the existing props or add new ones.
1326
- *
1327
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1328
- *
1329
- * @default {}
1330
- */
1331
- slotProps: e.shape({
1332
- input: e.object,
1333
- root: e.object
1334
- }),
1335
- /**
1336
- * The components used for each slot inside.
1337
- *
1338
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
1339
- *
1340
- * @default {}
1341
- */
1342
- slots: e.shape({
1343
- input: e.elementType,
1344
- root: e.elementType
1345
- }),
1346
- /**
1347
- * Start `InputAdornment` for this component.
1348
- */
1349
- startAdornment: e.node,
1350
- /**
1351
- * The system prop that allows defining system overrides as well as additional CSS styles.
1352
- */
1353
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1354
- /**
1355
- * 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).
1356
- * @default 'text'
1357
- */
1358
- type: e.string,
1359
- /**
1360
- * The value of the `input` element, required for a controlled component.
1361
- */
1362
- value: e.any
1363
- });
1364
- lo.muiName = "Input";
1365
- function Nn(o) {
1366
- return pe("MuiFilledInput", o);
1367
- }
1368
- const Te = i({}, Fe, ce("MuiFilledInput", ["root", "underline", "input"])), Mn = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"], Fn = (o) => {
1369
- const {
1370
- classes: n,
1371
- disableUnderline: t
1372
- } = o, u = fe({
1373
- root: ["root", !t && "underline"],
1374
- input: ["input"]
1375
- }, Nn, n);
1376
- return i({}, n, u);
1377
- }, $n = _(qe, {
1378
- shouldForwardProp: (o) => ve(o) || o === "classes",
1379
- name: "MuiFilledInput",
1380
- slot: "Root",
1381
- overridesResolver: (o, n) => {
1382
- const {
1383
- ownerState: t
1384
- } = o;
1385
- return [...He(o, n), !t.disableUnderline && n.underline];
1386
- }
1387
- })(({
1388
- theme: o,
1389
- ownerState: n
1390
- }) => {
1391
- var t;
1392
- const a = o.palette.mode === "light", u = a ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", d = a ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", p = a ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", c = a ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
1393
- return i({
1394
- position: "relative",
1395
- backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : d,
1396
- borderTopLeftRadius: (o.vars || o).shape.borderRadius,
1397
- borderTopRightRadius: (o.vars || o).shape.borderRadius,
1398
- transition: o.transitions.create("background-color", {
1399
- duration: o.transitions.duration.shorter,
1400
- easing: o.transitions.easing.easeOut
1401
- }),
1402
- "&:hover": {
1403
- backgroundColor: o.vars ? o.vars.palette.FilledInput.hoverBg : p,
1404
- // Reset on touch devices, it doesn't add specificity
1405
- "@media (hover: none)": {
1406
- backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : d
1407
- }
1408
- },
1409
- [`&.${Te.focused}`]: {
1410
- backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : d
1411
- },
1412
- [`&.${Te.disabled}`]: {
1413
- backgroundColor: o.vars ? o.vars.palette.FilledInput.disabledBg : c
1414
- }
1415
- }, !n.disableUnderline && {
1416
- "&::after": {
1417
- borderBottom: `2px solid ${(t = (o.vars || o).palette[n.color || "primary"]) == null ? void 0 : t.main}`,
1418
- left: 0,
1419
- bottom: 0,
1420
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1421
- content: '""',
1422
- position: "absolute",
1423
- right: 0,
1424
- transform: "scaleX(0)",
1425
- transition: o.transitions.create("transform", {
1426
- duration: o.transitions.duration.shorter,
1427
- easing: o.transitions.easing.easeOut
1428
- }),
1429
- pointerEvents: "none"
1430
- // Transparent to the hover style.
1431
- },
1432
- [`&.${Te.focused}:after`]: {
1433
- // translateX(0) is a workaround for Safari transform scale bug
1434
- // See https://github.com/mui/material-ui/issues/31766
1435
- transform: "scaleX(1) translateX(0)"
1436
- },
1437
- [`&.${Te.error}`]: {
1438
- "&::before, &::after": {
1439
- borderBottomColor: (o.vars || o).palette.error.main
1440
- }
1441
- },
1442
- "&::before": {
1443
- borderBottom: `1px solid ${o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / ${o.vars.opacity.inputUnderline})` : u}`,
1444
- left: 0,
1445
- bottom: 0,
1446
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1447
- content: '"\\00a0"',
1448
- position: "absolute",
1449
- right: 0,
1450
- transition: o.transitions.create("border-bottom-color", {
1451
- duration: o.transitions.duration.shorter
1452
- }),
1453
- pointerEvents: "none"
1454
- // Transparent to the hover style.
1455
- },
1456
- [`&:hover:not(.${Te.disabled}, .${Te.error}):before`]: {
1457
- borderBottom: `1px solid ${(o.vars || o).palette.text.primary}`
1458
- },
1459
- [`&.${Te.disabled}:before`]: {
1460
- borderBottomStyle: "dotted"
1461
- }
1462
- }, n.startAdornment && {
1463
- paddingLeft: 12
1464
- }, n.endAdornment && {
1465
- paddingRight: 12
1466
- }, n.multiline && i({
1467
- padding: "25px 12px 8px"
1468
- }, n.size === "small" && {
1469
- paddingTop: 21,
1470
- paddingBottom: 4
1471
- }, n.hiddenLabel && {
1472
- paddingTop: 16,
1473
- paddingBottom: 17
1474
- }, n.hiddenLabel && n.size === "small" && {
1475
- paddingTop: 8,
1476
- paddingBottom: 9
1477
- }));
1478
- }), kn = _(Ge, {
1479
- name: "MuiFilledInput",
1480
- slot: "Input",
1481
- overridesResolver: Ke
1482
- })(({
1483
- theme: o,
1484
- ownerState: n
1485
- }) => i({
1486
- paddingTop: 25,
1487
- paddingRight: 12,
1488
- paddingBottom: 8,
1489
- paddingLeft: 12
1490
- }, !o.vars && {
1491
- "&:-webkit-autofill": {
1492
- WebkitBoxShadow: o.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
1493
- WebkitTextFillColor: o.palette.mode === "light" ? null : "#fff",
1494
- caretColor: o.palette.mode === "light" ? null : "#fff",
1495
- borderTopLeftRadius: "inherit",
1496
- borderTopRightRadius: "inherit"
1497
- }
1498
- }, o.vars && {
1499
- "&:-webkit-autofill": {
1500
- borderTopLeftRadius: "inherit",
1501
- borderTopRightRadius: "inherit"
1502
- },
1503
- [o.getColorSchemeSelector("dark")]: {
1504
- "&:-webkit-autofill": {
1505
- WebkitBoxShadow: "0 0 0 100px #266798 inset",
1506
- WebkitTextFillColor: "#fff",
1507
- caretColor: "#fff"
1508
- }
1509
- }
1510
- }, n.size === "small" && {
1511
- paddingTop: 21,
1512
- paddingBottom: 4
1513
- }, n.hiddenLabel && {
1514
- paddingTop: 16,
1515
- paddingBottom: 17
1516
- }, n.startAdornment && {
1517
- paddingLeft: 0
1518
- }, n.endAdornment && {
1519
- paddingRight: 0
1520
- }, n.hiddenLabel && n.size === "small" && {
1521
- paddingTop: 8,
1522
- paddingBottom: 9
1523
- }, n.multiline && {
1524
- paddingTop: 0,
1525
- paddingBottom: 0,
1526
- paddingLeft: 0,
1527
- paddingRight: 0
1528
- })), uo = /* @__PURE__ */ s.forwardRef(function(n, t) {
1529
- var a, u, d, p;
1530
- const c = ye({
1531
- props: n,
1532
- name: "MuiFilledInput"
1533
- }), {
1534
- components: g = {},
1535
- componentsProps: x,
1536
- fullWidth: y = !1,
1537
- // declare here to prevent spreading to DOM
1538
- inputComponent: P = "input",
1539
- multiline: v = !1,
1540
- slotProps: R,
1541
- slots: w = {},
1542
- type: S = "text"
1543
- } = c, E = X(c, Mn), m = i({}, c, {
1544
- fullWidth: y,
1545
- inputComponent: P,
1546
- multiline: v,
1547
- type: S
1548
- }), T = Fn(c), l = {
1549
- root: {
1550
- ownerState: m
1551
- },
1552
- input: {
1553
- ownerState: m
1554
- }
1555
- }, r = R ?? x ? ro(l, R ?? x) : l, b = (a = (u = w.root) != null ? u : g.Root) != null ? a : $n, h = (d = (p = w.input) != null ? p : g.Input) != null ? d : kn;
1556
- return /* @__PURE__ */ N(Xe, i({
1557
- slots: {
1558
- root: b,
1559
- input: h
1560
- },
1561
- componentsProps: r,
1562
- fullWidth: y,
1563
- inputComponent: P,
1564
- multiline: v,
1565
- ref: t,
1566
- type: S
1567
- }, E, {
1568
- classes: T
1569
- }));
1570
- });
1571
- process.env.NODE_ENV !== "production" && (uo.propTypes = {
1572
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1573
- // │ These PropTypes are generated from the TypeScript type definitions. │
1574
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1575
- // └─────────────────────────────────────────────────────────────────────┘
1576
- /**
1577
- * This prop helps users to fill forms faster, especially on mobile devices.
1578
- * The name can be confusing, as it's more like an autofill.
1579
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
1580
- */
1581
- autoComplete: e.string,
1582
- /**
1583
- * If `true`, the `input` element is focused during the first mount.
1584
- */
1585
- autoFocus: e.bool,
1586
- /**
1587
- * Override or extend the styles applied to the component.
1588
- */
1589
- classes: e.object,
1590
- /**
1591
- * The color of the component.
1592
- * It supports both default and custom theme colors, which can be added as shown in the
1593
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1594
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
1595
- */
1596
- color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
1597
- /**
1598
- * The components used for each slot inside.
1599
- *
1600
- * This prop is an alias for the `slots` prop.
1601
- * It's recommended to use the `slots` prop instead.
1602
- *
1603
- * @default {}
1604
- */
1605
- components: e.shape({
1606
- Input: e.elementType,
1607
- Root: e.elementType
1608
- }),
1609
- /**
1610
- * The extra props for the slot components.
1611
- * You can override the existing props or add new ones.
1612
- *
1613
- * This prop is an alias for the `slotProps` prop.
1614
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
1615
- *
1616
- * @default {}
1617
- */
1618
- componentsProps: e.shape({
1619
- input: e.object,
1620
- root: e.object
1621
- }),
1622
- /**
1623
- * The default value. Use when the component is not controlled.
1624
- */
1625
- defaultValue: e.any,
1626
- /**
1627
- * If `true`, the component is disabled.
1628
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1629
- */
1630
- disabled: e.bool,
1631
- /**
1632
- * If `true`, the input will not have an underline.
1633
- */
1634
- disableUnderline: e.bool,
1635
- /**
1636
- * End `InputAdornment` for this component.
1637
- */
1638
- endAdornment: e.node,
1639
- /**
1640
- * If `true`, the `input` will indicate an error.
1641
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1642
- */
1643
- error: e.bool,
1644
- /**
1645
- * If `true`, the `input` will take up the full width of its container.
1646
- * @default false
1647
- */
1648
- fullWidth: e.bool,
1649
- /**
1650
- * If `true`, the label is hidden.
1651
- * This is used to increase density for a `FilledInput`.
1652
- * Be sure to add `aria-label` to the `input` element.
1653
- * @default false
1654
- */
1655
- hiddenLabel: e.bool,
1656
- /**
1657
- * The id of the `input` element.
1658
- */
1659
- id: e.string,
1660
- /**
1661
- * The component used for the `input` element.
1662
- * Either a string to use a HTML element or a component.
1663
- * @default 'input'
1664
- */
1665
- inputComponent: e.elementType,
1666
- /**
1667
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1668
- * @default {}
1669
- */
1670
- inputProps: e.object,
1671
- /**
1672
- * Pass a ref to the `input` element.
1673
- */
1674
- inputRef: Ie,
1675
- /**
1676
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
1677
- * FormControl.
1678
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
1679
- */
1680
- margin: e.oneOf(["dense", "none"]),
1681
- /**
1682
- * Maximum number of rows to display when multiline option is set to true.
1683
- */
1684
- maxRows: e.oneOfType([e.number, e.string]),
1685
- /**
1686
- * Minimum number of rows to display when multiline option is set to true.
1687
- */
1688
- minRows: e.oneOfType([e.number, e.string]),
1689
- /**
1690
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
1691
- * @default false
1692
- */
1693
- multiline: e.bool,
1694
- /**
1695
- * Name attribute of the `input` element.
1696
- */
1697
- name: e.string,
1698
- /**
1699
- * Callback fired when the value is changed.
1700
- *
1701
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
1702
- * You can pull out the new value by accessing `event.target.value` (string).
1703
- */
1704
- onChange: e.func,
1705
- /**
1706
- * The short hint displayed in the `input` before the user enters a value.
1707
- */
1708
- placeholder: e.string,
1709
- /**
1710
- * It prevents the user from changing the value of the field
1711
- * (not from interacting with the field).
1712
- */
1713
- readOnly: e.bool,
1714
- /**
1715
- * If `true`, the `input` element is required.
1716
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1717
- */
1718
- required: e.bool,
1719
- /**
1720
- * Number of rows to display when multiline option is set to true.
1721
- */
1722
- rows: e.oneOfType([e.number, e.string]),
1723
- /**
1724
- * The extra props for the slot components.
1725
- * You can override the existing props or add new ones.
1726
- *
1727
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1728
- *
1729
- * @default {}
1730
- */
1731
- slotProps: e.shape({
1732
- input: e.object,
1733
- root: e.object
1734
- }),
1735
- /**
1736
- * The components used for each slot inside.
1737
- *
1738
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
1739
- *
1740
- * @default {}
1741
- */
1742
- slots: e.shape({
1743
- input: e.elementType,
1744
- root: e.elementType
1745
- }),
1746
- /**
1747
- * Start `InputAdornment` for this component.
1748
- */
1749
- startAdornment: e.node,
1750
- /**
1751
- * The system prop that allows defining system overrides as well as additional CSS styles.
1752
- */
1753
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1754
- /**
1755
- * 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).
1756
- * @default 'text'
1757
- */
1758
- type: e.string,
1759
- /**
1760
- * The value of the `input` element, required for a controlled component.
1761
- */
1762
- value: e.any
1763
- });
1764
- uo.muiName = "Input";
1765
- var Oo;
1766
- const Dn = ["children", "classes", "className", "label", "notched"], Ln = _("fieldset", {
1767
- name: "MuiNotchedOutlined",
1768
- shouldForwardProp: ve
1769
- })({
1770
- textAlign: "left",
1771
- position: "absolute",
1772
- bottom: 0,
1773
- right: 0,
1774
- top: -5,
1775
- left: 0,
1776
- margin: 0,
1777
- padding: "0 8px",
1778
- pointerEvents: "none",
1779
- borderRadius: "inherit",
1780
- borderStyle: "solid",
1781
- borderWidth: 1,
1782
- overflow: "hidden",
1783
- minWidth: "0%"
1784
- }), An = _("legend", {
1785
- name: "MuiNotchedOutlined",
1786
- shouldForwardProp: ve
1787
- })(({
1788
- ownerState: o,
1789
- theme: n
1790
- }) => i({
1791
- float: "unset",
1792
- // Fix conflict with bootstrap
1793
- width: "auto",
1794
- // Fix conflict with bootstrap
1795
- overflow: "hidden"
1796
- }, !o.withLabel && {
1797
- padding: 0,
1798
- lineHeight: "11px",
1799
- // sync with `height` in `legend` styles
1800
- transition: n.transitions.create("width", {
1801
- duration: 150,
1802
- easing: n.transitions.easing.easeOut
1803
- })
1804
- }, o.withLabel && i({
1805
- display: "block",
1806
- // Fix conflict with normalize.css and sanitize.css
1807
- padding: 0,
1808
- height: 11,
1809
- // sync with `lineHeight` in `legend` styles
1810
- fontSize: "0.75em",
1811
- visibility: "hidden",
1812
- maxWidth: 0.01,
1813
- transition: n.transitions.create("max-width", {
1814
- duration: 50,
1815
- easing: n.transitions.easing.easeOut
1816
- }),
1817
- whiteSpace: "nowrap",
1818
- "& > span": {
1819
- paddingLeft: 5,
1820
- paddingRight: 5,
1821
- display: "inline-block",
1822
- opacity: 0,
1823
- visibility: "visible"
1824
- }
1825
- }, o.notched && {
1826
- maxWidth: "100%",
1827
- transition: n.transitions.create("max-width", {
1828
- duration: 100,
1829
- easing: n.transitions.easing.easeOut,
1830
- delay: 50
1831
- })
1832
- })));
1833
- function Lo(o) {
1834
- const {
1835
- className: n,
1836
- label: t,
1837
- notched: a
1838
- } = o, u = X(o, Dn), d = t != null && t !== "", p = i({}, o, {
1839
- notched: a,
1840
- withLabel: d
1841
- });
1842
- return /* @__PURE__ */ N(Ln, i({
1843
- "aria-hidden": !0,
1844
- className: n,
1845
- ownerState: p
1846
- }, u, {
1847
- children: /* @__PURE__ */ N(An, {
1848
- ownerState: p,
1849
- children: d ? /* @__PURE__ */ N("span", {
1850
- children: t
1851
- }) : (
1852
- // notranslate needed while Google Translate will not fix zero-width space issue
1853
- Oo || (Oo = /* @__PURE__ */ N("span", {
1854
- className: "notranslate",
1855
- children: "​"
1856
- }))
1857
- )
1858
- })
1859
- }));
1860
- }
1861
- process.env.NODE_ENV !== "production" && (Lo.propTypes = {
1862
- /**
1863
- * The content of the component.
1864
- */
1865
- children: e.node,
1866
- /**
1867
- * Override or extend the styles applied to the component.
1868
- */
1869
- classes: e.object,
1870
- /**
1871
- * @ignore
1872
- */
1873
- className: e.string,
1874
- /**
1875
- * The label.
1876
- */
1877
- label: e.node,
1878
- /**
1879
- * If `true`, the outline is notched to accommodate the label.
1880
- */
1881
- notched: e.bool.isRequired,
1882
- /**
1883
- * @ignore
1884
- */
1885
- style: e.object
1886
- });
1887
- function jn(o) {
1888
- return pe("MuiOutlinedInput", o);
1889
- }
1890
- const ge = i({}, Fe, ce("MuiOutlinedInput", ["root", "notchedOutline", "input"])), _n = ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "slots", "type"], Bn = (o) => {
1891
- const {
1892
- classes: n
1893
- } = o, a = fe({
1894
- root: ["root"],
1895
- notchedOutline: ["notchedOutline"],
1896
- input: ["input"]
1897
- }, jn, n);
1898
- return i({}, n, a);
1899
- }, Wn = _(qe, {
1900
- shouldForwardProp: (o) => ve(o) || o === "classes",
1901
- name: "MuiOutlinedInput",
1902
- slot: "Root",
1903
- overridesResolver: He
1904
- })(({
1905
- theme: o,
1906
- ownerState: n
1907
- }) => {
1908
- const t = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
1909
- return i({
1910
- position: "relative",
1911
- borderRadius: (o.vars || o).shape.borderRadius,
1912
- [`&:hover .${ge.notchedOutline}`]: {
1913
- borderColor: (o.vars || o).palette.text.primary
1914
- },
1915
- // Reset on touch devices, it doesn't add specificity
1916
- "@media (hover: none)": {
1917
- [`&:hover .${ge.notchedOutline}`]: {
1918
- borderColor: o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / 0.23)` : t
1919
- }
1920
- },
1921
- [`&.${ge.focused} .${ge.notchedOutline}`]: {
1922
- borderColor: (o.vars || o).palette[n.color].main,
1923
- borderWidth: 2
1924
- },
1925
- [`&.${ge.error} .${ge.notchedOutline}`]: {
1926
- borderColor: (o.vars || o).palette.error.main
1927
- },
1928
- [`&.${ge.disabled} .${ge.notchedOutline}`]: {
1929
- borderColor: (o.vars || o).palette.action.disabled
1930
- }
1931
- }, n.startAdornment && {
1932
- paddingLeft: 14
1933
- }, n.endAdornment && {
1934
- paddingRight: 14
1935
- }, n.multiline && i({
1936
- padding: "16.5px 14px"
1937
- }, n.size === "small" && {
1938
- padding: "8.5px 14px"
1939
- }));
1940
- }), zn = _(Lo, {
1941
- name: "MuiOutlinedInput",
1942
- slot: "NotchedOutline",
1943
- overridesResolver: (o, n) => n.notchedOutline
1944
- })(({
1945
- theme: o
1946
- }) => {
1947
- const n = o.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
1948
- return {
1949
- borderColor: o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / 0.23)` : n
1950
- };
1951
- }), Vn = _(Ge, {
1952
- name: "MuiOutlinedInput",
1953
- slot: "Input",
1954
- overridesResolver: Ke
1955
- })(({
1956
- theme: o,
1957
- ownerState: n
1958
- }) => i({
1959
- padding: "16.5px 14px"
1960
- }, !o.vars && {
1961
- "&:-webkit-autofill": {
1962
- WebkitBoxShadow: o.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
1963
- WebkitTextFillColor: o.palette.mode === "light" ? null : "#fff",
1964
- caretColor: o.palette.mode === "light" ? null : "#fff",
1965
- borderRadius: "inherit"
1966
- }
1967
- }, o.vars && {
1968
- "&:-webkit-autofill": {
1969
- borderRadius: "inherit"
1970
- },
1971
- [o.getColorSchemeSelector("dark")]: {
1972
- "&:-webkit-autofill": {
1973
- WebkitBoxShadow: "0 0 0 100px #266798 inset",
1974
- WebkitTextFillColor: "#fff",
1975
- caretColor: "#fff"
1976
- }
1977
- }
1978
- }, n.size === "small" && {
1979
- padding: "8.5px 14px"
1980
- }, n.multiline && {
1981
- padding: 0
1982
- }, n.startAdornment && {
1983
- paddingLeft: 0
1984
- }, n.endAdornment && {
1985
- paddingRight: 0
1986
- })), co = /* @__PURE__ */ s.forwardRef(function(n, t) {
1987
- var a, u, d, p, c;
1988
- const g = ye({
1989
- props: n,
1990
- name: "MuiOutlinedInput"
1991
- }), {
1992
- components: x = {},
1993
- fullWidth: y = !1,
1994
- inputComponent: P = "input",
1995
- label: v,
1996
- multiline: R = !1,
1997
- notched: w,
1998
- slots: S = {},
1999
- type: E = "text"
2000
- } = g, m = X(g, _n), T = Bn(g), l = io(), r = so({
2001
- props: g,
2002
- muiFormControl: l,
2003
- states: ["color", "disabled", "error", "focused", "hiddenLabel", "size", "required"]
2004
- }), b = i({}, g, {
2005
- color: r.color || "primary",
2006
- disabled: r.disabled,
2007
- error: r.error,
2008
- focused: r.focused,
2009
- formControl: l,
2010
- fullWidth: y,
2011
- hiddenLabel: r.hiddenLabel,
2012
- multiline: R,
2013
- size: r.size,
2014
- type: E
2015
- }), h = (a = (u = S.root) != null ? u : x.Root) != null ? a : Wn, O = (d = (p = S.input) != null ? p : x.Input) != null ? d : Vn;
2016
- return /* @__PURE__ */ N(Xe, i({
2017
- slots: {
2018
- root: h,
2019
- input: O
2020
- },
2021
- renderSuffix: (D) => /* @__PURE__ */ N(zn, {
2022
- ownerState: b,
2023
- className: T.notchedOutline,
2024
- label: v != null && v !== "" && r.required ? c || (c = /* @__PURE__ */ Ee(s.Fragment, {
2025
- children: [v, " ", "*"]
2026
- })) : v,
2027
- notched: typeof w < "u" ? w : !!(D.startAdornment || D.filled || D.focused)
2028
- }),
2029
- fullWidth: y,
2030
- inputComponent: P,
2031
- multiline: R,
2032
- ref: t,
2033
- type: E
2034
- }, m, {
2035
- classes: i({}, T, {
2036
- notchedOutline: null
2037
- })
2038
- }));
2039
- });
2040
- process.env.NODE_ENV !== "production" && (co.propTypes = {
2041
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2042
- // │ These PropTypes are generated from the TypeScript type definitions. │
2043
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2044
- // └─────────────────────────────────────────────────────────────────────┘
2045
- /**
2046
- * This prop helps users to fill forms faster, especially on mobile devices.
2047
- * The name can be confusing, as it's more like an autofill.
2048
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
2049
- */
2050
- autoComplete: e.string,
2051
- /**
2052
- * If `true`, the `input` element is focused during the first mount.
2053
- */
2054
- autoFocus: e.bool,
2055
- /**
2056
- * Override or extend the styles applied to the component.
2057
- */
2058
- classes: e.object,
2059
- /**
2060
- * The color of the component.
2061
- * It supports both default and custom theme colors, which can be added as shown in the
2062
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
2063
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
2064
- */
2065
- color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
2066
- /**
2067
- * The components used for each slot inside.
2068
- *
2069
- * This prop is an alias for the `slots` prop.
2070
- * It's recommended to use the `slots` prop instead.
2071
- *
2072
- * @default {}
2073
- */
2074
- components: e.shape({
2075
- Input: e.elementType,
2076
- Root: e.elementType
2077
- }),
2078
- /**
2079
- * The default value. Use when the component is not controlled.
2080
- */
2081
- defaultValue: e.any,
2082
- /**
2083
- * If `true`, the component is disabled.
2084
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2085
- */
2086
- disabled: e.bool,
2087
- /**
2088
- * End `InputAdornment` for this component.
2089
- */
2090
- endAdornment: e.node,
2091
- /**
2092
- * If `true`, the `input` will indicate an error.
2093
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2094
- */
2095
- error: e.bool,
2096
- /**
2097
- * If `true`, the `input` will take up the full width of its container.
2098
- * @default false
2099
- */
2100
- fullWidth: e.bool,
2101
- /**
2102
- * The id of the `input` element.
2103
- */
2104
- id: e.string,
2105
- /**
2106
- * The component used for the `input` element.
2107
- * Either a string to use a HTML element or a component.
2108
- * @default 'input'
2109
- */
2110
- inputComponent: e.elementType,
2111
- /**
2112
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2113
- * @default {}
2114
- */
2115
- inputProps: e.object,
2116
- /**
2117
- * Pass a ref to the `input` element.
2118
- */
2119
- inputRef: Ie,
2120
- /**
2121
- * The label of the `input`. It is only used for layout. The actual labelling
2122
- * is handled by `InputLabel`.
2123
- */
2124
- label: e.node,
2125
- /**
2126
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
2127
- * FormControl.
2128
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
2129
- */
2130
- margin: e.oneOf(["dense", "none"]),
2131
- /**
2132
- * Maximum number of rows to display when multiline option is set to true.
2133
- */
2134
- maxRows: e.oneOfType([e.number, e.string]),
2135
- /**
2136
- * Minimum number of rows to display when multiline option is set to true.
2137
- */
2138
- minRows: e.oneOfType([e.number, e.string]),
2139
- /**
2140
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
2141
- * @default false
2142
- */
2143
- multiline: e.bool,
2144
- /**
2145
- * Name attribute of the `input` element.
2146
- */
2147
- name: e.string,
2148
- /**
2149
- * If `true`, the outline is notched to accommodate the label.
2150
- */
2151
- notched: e.bool,
2152
- /**
2153
- * Callback fired when the value is changed.
2154
- *
2155
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
2156
- * You can pull out the new value by accessing `event.target.value` (string).
2157
- */
2158
- onChange: e.func,
2159
- /**
2160
- * The short hint displayed in the `input` before the user enters a value.
2161
- */
2162
- placeholder: e.string,
2163
- /**
2164
- * It prevents the user from changing the value of the field
2165
- * (not from interacting with the field).
2166
- */
2167
- readOnly: e.bool,
2168
- /**
2169
- * If `true`, the `input` element is required.
2170
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2171
- */
2172
- required: e.bool,
2173
- /**
2174
- * Number of rows to display when multiline option is set to true.
2175
- */
2176
- rows: e.oneOfType([e.number, e.string]),
2177
- /**
2178
- * The components used for each slot inside.
2179
- *
2180
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
2181
- *
2182
- * @default {}
2183
- */
2184
- slots: e.shape({
2185
- input: e.elementType,
2186
- root: e.elementType
2187
- }),
2188
- /**
2189
- * Start `InputAdornment` for this component.
2190
- */
2191
- startAdornment: e.node,
2192
- /**
2193
- * The system prop that allows defining system overrides as well as additional CSS styles.
2194
- */
2195
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2196
- /**
2197
- * 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).
2198
- * @default 'text'
2199
- */
2200
- type: e.string,
2201
- /**
2202
- * The value of the `input` element, required for a controlled component.
2203
- */
2204
- value: e.any
2205
- });
2206
- co.muiName = "Input";
2207
- const Un = /* @__PURE__ */ s.createContext();
2208
- process.env.NODE_ENV !== "production" && (e.node, e.bool);
2209
- const Hn = () => {
2210
- const o = s.useContext(Un);
2211
- return o ?? !1;
2212
- }, Kn = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
2213
- function Qe(o, n, t) {
2214
- return o === n ? o.firstChild : n && n.nextElementSibling ? n.nextElementSibling : t ? null : o.firstChild;
2215
- }
2216
- function Co(o, n, t) {
2217
- return o === n ? t ? o.firstChild : o.lastChild : n && n.previousElementSibling ? n.previousElementSibling : t ? null : o.lastChild;
2218
- }
2219
- function Ao(o, n) {
2220
- if (n === void 0)
2221
- return !0;
2222
- let t = o.innerText;
2223
- 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;
2224
- }
2225
- function Ae(o, n, t, a, u, d) {
2226
- let p = !1, c = u(o, n, n ? t : !1);
2227
- for (; c; ) {
2228
- if (c === o.firstChild) {
2229
- if (p)
2230
- return !1;
2231
- p = !0;
2232
- }
2233
- const g = a ? !1 : c.disabled || c.getAttribute("aria-disabled") === "true";
2234
- if (!c.hasAttribute("tabindex") || !Ao(c, d) || g)
2235
- c = u(o, c, t);
2236
- else
2237
- return c.focus(), !0;
2238
- }
2239
- return !1;
2240
- }
2241
- const jo = /* @__PURE__ */ s.forwardRef(function(n, t) {
2242
- const {
2243
- // private
2244
- // eslint-disable-next-line react/prop-types
2245
- actions: a,
2246
- autoFocus: u = !1,
2247
- autoFocusItem: d = !1,
2248
- children: p,
2249
- className: c,
2250
- disabledItemsFocusable: g = !1,
2251
- disableListWrap: x = !1,
2252
- onKeyDown: y,
2253
- variant: P = "selectedMenu"
2254
- } = n, v = X(n, Kn), R = s.useRef(null), w = s.useRef({
2255
- keys: [],
2256
- repeating: !0,
2257
- previousKeyMatched: !0,
2258
- lastTime: null
2259
- });
2260
- Ve(() => {
2261
- u && R.current.focus();
2262
- }, [u]), s.useImperativeHandle(a, () => ({
2263
- adjustStyleForScrollbar: (l, {
2264
- direction: r
2265
- }) => {
2266
- const b = !R.current.style.width;
2267
- if (l.clientHeight < R.current.clientHeight && b) {
2268
- const h = `${Zo(_e(l))}px`;
2269
- R.current.style[r === "rtl" ? "paddingLeft" : "paddingRight"] = h, R.current.style.width = `calc(100% + ${h})`;
2270
- }
2271
- return R.current;
2272
- }
2273
- }), []);
2274
- const S = (l) => {
2275
- const r = R.current, b = l.key, h = _e(r).activeElement;
2276
- if (b === "ArrowDown")
2277
- l.preventDefault(), Ae(r, h, x, g, Qe);
2278
- else if (b === "ArrowUp")
2279
- l.preventDefault(), Ae(r, h, x, g, Co);
2280
- else if (b === "Home")
2281
- l.preventDefault(), Ae(r, null, x, g, Qe);
2282
- else if (b === "End")
2283
- l.preventDefault(), Ae(r, null, x, g, Co);
2284
- else if (b.length === 1) {
2285
- const O = w.current, D = b.toLowerCase(), H = performance.now();
2286
- O.keys.length > 0 && (H - O.lastTime > 500 ? (O.keys = [], O.repeating = !0, O.previousKeyMatched = !0) : O.repeating && D !== O.keys[0] && (O.repeating = !1)), O.lastTime = H, O.keys.push(D);
2287
- const V = h && !O.repeating && Ao(h, O);
2288
- O.previousKeyMatched && (V || Ae(r, h, !1, g, Qe, O)) ? l.preventDefault() : O.previousKeyMatched = !1;
2289
- }
2290
- y && y(l);
2291
- }, E = Se(R, t);
2292
- let m = -1;
2293
- s.Children.forEach(p, (l, r) => {
2294
- if (!/* @__PURE__ */ s.isValidElement(l)) {
2295
- m === r && (m += 1, m >= p.length && (m = -1));
2296
- return;
2297
- }
2298
- process.env.NODE_ENV !== "production" && to.isFragment(l) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
2299
- `)), l.props.disabled || (P === "selectedMenu" && l.props.selected || m === -1) && (m = r), m === r && (l.props.disabled || l.props.muiSkipListHighlight || l.type.muiSkipListHighlight) && (m += 1, m >= p.length && (m = -1));
2300
- });
2301
- const T = s.Children.map(p, (l, r) => {
2302
- if (r === m) {
2303
- const b = {};
2304
- return d && (b.autoFocus = !0), l.props.tabIndex === void 0 && P === "selectedMenu" && (b.tabIndex = 0), /* @__PURE__ */ s.cloneElement(l, b);
2305
- }
2306
- return l;
2307
- });
2308
- return /* @__PURE__ */ N(Fo, i({
2309
- role: "menu",
2310
- ref: E,
2311
- className: c,
2312
- onKeyDown: S,
2313
- tabIndex: u ? 0 : -1
2314
- }, v, {
2315
- children: T
2316
- }));
2317
- });
2318
- process.env.NODE_ENV !== "production" && (jo.propTypes = {
2319
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2320
- // │ These PropTypes are generated from the TypeScript type definitions. │
2321
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2322
- // └─────────────────────────────────────────────────────────────────────┘
2323
- /**
2324
- * If `true`, will focus the `[role="menu"]` container and move into tab order.
2325
- * @default false
2326
- */
2327
- autoFocus: e.bool,
2328
- /**
2329
- * If `true`, will focus the first menuitem if `variant="menu"` or selected item
2330
- * if `variant="selectedMenu"`.
2331
- * @default false
2332
- */
2333
- autoFocusItem: e.bool,
2334
- /**
2335
- * MenuList contents, normally `MenuItem`s.
2336
- */
2337
- children: e.node,
2338
- /**
2339
- * @ignore
2340
- */
2341
- className: e.string,
2342
- /**
2343
- * If `true`, will allow focus on disabled items.
2344
- * @default false
2345
- */
2346
- disabledItemsFocusable: e.bool,
2347
- /**
2348
- * If `true`, the menu items will not wrap focus.
2349
- * @default false
2350
- */
2351
- disableListWrap: e.bool,
2352
- /**
2353
- * @ignore
2354
- */
2355
- onKeyDown: e.func,
2356
- /**
2357
- * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
2358
- * and the vertical alignment relative to the anchor element.
2359
- * @default 'selectedMenu'
2360
- */
2361
- variant: e.oneOf(["menu", "selectedMenu"])
2362
- });
2363
- function qn(o) {
2364
- return pe("MuiPopover", o);
2365
- }
2366
- ce("MuiPopover", ["root", "paper"]);
2367
- const Gn = ["onEntering"], Xn = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"], Yn = ["slotProps"];
2368
- function xo(o, n) {
2369
- let t = 0;
2370
- return typeof n == "number" ? t = n : n === "center" ? t = o.height / 2 : n === "bottom" && (t = o.height), t;
2371
- }
2372
- function Ro(o, n) {
2373
- let t = 0;
2374
- return typeof n == "number" ? t = n : n === "center" ? t = o.width / 2 : n === "right" && (t = o.width), t;
2375
- }
2376
- function Po(o) {
2377
- return [o.horizontal, o.vertical].map((n) => typeof n == "number" ? `${n}px` : n).join(" ");
2378
- }
2379
- function We(o) {
2380
- return typeof o == "function" ? o() : o;
2381
- }
2382
- const Zn = (o) => {
2383
- const {
2384
- classes: n
2385
- } = o;
2386
- return fe({
2387
- root: ["root"],
2388
- paper: ["paper"]
2389
- }, qn, n);
2390
- }, Jn = _(Jo, {
2391
- name: "MuiPopover",
2392
- slot: "Root",
2393
- overridesResolver: (o, n) => n.root
2394
- })({}), _o = _(nn, {
2395
- name: "MuiPopover",
2396
- slot: "Paper",
2397
- overridesResolver: (o, n) => n.paper
2398
- })({
2399
- position: "absolute",
2400
- overflowY: "auto",
2401
- overflowX: "hidden",
2402
- // So we see the popover when it's empty.
2403
- // It's most likely on issue on userland.
2404
- minWidth: 16,
2405
- minHeight: 16,
2406
- maxWidth: "calc(100% - 32px)",
2407
- maxHeight: "calc(100% - 32px)",
2408
- // We disable the focus ring for mouse, touch and keyboard users.
2409
- outline: 0
2410
- }), Bo = /* @__PURE__ */ s.forwardRef(function(n, t) {
2411
- var a, u, d;
2412
- const p = ye({
2413
- props: n,
2414
- name: "MuiPopover"
2415
- }), {
2416
- action: c,
2417
- anchorEl: g,
2418
- anchorOrigin: x = {
2419
- vertical: "top",
2420
- horizontal: "left"
2421
- },
2422
- anchorPosition: y,
2423
- anchorReference: P = "anchorEl",
2424
- children: v,
2425
- className: R,
2426
- container: w,
2427
- elevation: S = 8,
2428
- marginThreshold: E = 16,
2429
- open: m,
2430
- PaperProps: T = {},
2431
- slots: l,
2432
- slotProps: r,
2433
- transformOrigin: b = {
2434
- vertical: "top",
2435
- horizontal: "left"
2436
- },
2437
- TransitionComponent: h = ao,
2438
- transitionDuration: O = "auto",
2439
- TransitionProps: {
2440
- onEntering: D
2441
- } = {},
2442
- disableScrollLock: H = !1
2443
- } = p, V = X(p.TransitionProps, Gn), Y = X(p, Xn), $ = (a = r == null ? void 0 : r.paper) != null ? a : T, B = s.useRef(), Z = Se(B, $.ref), I = i({}, p, {
2444
- anchorOrigin: x,
2445
- anchorReference: P,
2446
- elevation: S,
2447
- marginThreshold: E,
2448
- externalPaperSlotProps: $,
2449
- transformOrigin: b,
2450
- TransitionComponent: h,
2451
- transitionDuration: O,
2452
- TransitionProps: V
2453
- }), U = Zn(I), j = s.useCallback(() => {
2454
- if (P === "anchorPosition")
2455
- return process.env.NODE_ENV !== "production" && (y || console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')), y;
2456
- const L = We(g), A = L && L.nodeType === 1 ? L : _e(B.current).body, W = A.getBoundingClientRect();
2457
- if (process.env.NODE_ENV !== "production") {
2458
- const se = A.getBoundingClientRect();
2459
- process.env.NODE_ENV !== "test" && se.top === 0 && se.left === 0 && se.right === 0 && se.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(`
2460
- `));
2461
- }
2462
- return {
2463
- top: W.top + xo(W, x.vertical),
2464
- left: W.left + Ro(W, x.horizontal)
2465
- };
2466
- }, [g, x.horizontal, x.vertical, y, P]), C = s.useCallback((L) => ({
2467
- vertical: xo(L, b.vertical),
2468
- horizontal: Ro(L, b.horizontal)
2469
- }), [b.horizontal, b.vertical]), z = s.useCallback((L) => {
2470
- const A = {
2471
- width: L.offsetWidth,
2472
- height: L.offsetHeight
2473
- }, W = C(A);
2474
- if (P === "none")
2475
- return {
2476
- top: null,
2477
- left: null,
2478
- transformOrigin: Po(W)
2479
- };
2480
- const se = j();
2481
- let ie = se.top - W.vertical, ae = se.left - W.horizontal;
2482
- const ue = ie + A.height, he = ae + A.width, q = Ue(We(g)), le = q.innerHeight - E, te = q.innerWidth - E;
2483
- if (E !== null && ie < E) {
2484
- const G = ie - E;
2485
- ie -= G, W.vertical += G;
2486
- } else if (E !== null && ue > le) {
2487
- const G = ue - le;
2488
- ie -= G, W.vertical += G;
2489
- }
2490
- if (process.env.NODE_ENV !== "production" && A.height > le && A.height && le && console.error(["MUI: The popover component is too tall.", `Some part of it can not be seen on the screen (${A.height - le}px).`, "Please consider adding a `max-height` to improve the user-experience."].join(`
2491
- `)), E !== null && ae < E) {
2492
- const G = ae - E;
2493
- ae -= G, W.horizontal += G;
2494
- } else if (he > te) {
2495
- const G = he - te;
2496
- ae -= G, W.horizontal += G;
2497
- }
2498
- return {
2499
- top: `${Math.round(ie)}px`,
2500
- left: `${Math.round(ae)}px`,
2501
- transformOrigin: Po(W)
2502
- };
2503
- }, [g, P, j, C, E]), [J, Oe] = s.useState(m), ee = s.useCallback(() => {
2504
- const L = B.current;
2505
- if (!L)
2506
- return;
2507
- const A = z(L);
2508
- A.top !== null && (L.style.top = A.top), A.left !== null && (L.style.left = A.left), L.style.transformOrigin = A.transformOrigin, Oe(!0);
2509
- }, [z]);
2510
- s.useEffect(() => (H && window.addEventListener("scroll", ee), () => window.removeEventListener("scroll", ee)), [g, H, ee]);
2511
- const re = (L, A) => {
2512
- D && D(L, A), ee();
2513
- }, oe = () => {
2514
- Oe(!1);
2515
- };
2516
- s.useEffect(() => {
2517
- m && ee();
2518
- }), s.useImperativeHandle(c, () => m ? {
2519
- updatePosition: () => {
2520
- ee();
2521
- }
2522
- } : null, [m, ee]), s.useEffect(() => {
2523
- if (!m)
2524
- return;
2525
- const L = No(() => {
2526
- ee();
2527
- }), A = Ue(g);
2528
- return A.addEventListener("resize", L), () => {
2529
- L.clear(), A.removeEventListener("resize", L);
2530
- };
2531
- }, [g, m, ee]);
2532
- let me = O;
2533
- O === "auto" && !h.muiSupportAuto && (me = void 0);
2534
- const ne = w || (g ? _e(We(g)).body : void 0), Ce = (u = l == null ? void 0 : l.root) != null ? u : Jn, xe = (d = l == null ? void 0 : l.paper) != null ? d : _o, Re = ze({
2535
- elementType: xe,
2536
- externalSlotProps: i({}, $, {
2537
- style: J ? $.style : i({}, $.style, {
2538
- opacity: 0
2539
- })
2540
- }),
2541
- additionalProps: {
2542
- elevation: S,
2543
- ref: Z
2544
- },
2545
- ownerState: I,
2546
- className: de(U.paper, $ == null ? void 0 : $.className)
2547
- }), be = ze({
2548
- elementType: Ce,
2549
- externalSlotProps: (r == null ? void 0 : r.root) || {},
2550
- externalForwardedProps: Y,
2551
- additionalProps: {
2552
- ref: t,
2553
- slotProps: {
2554
- backdrop: {
2555
- invisible: !0
2556
- }
2557
- },
2558
- container: ne,
2559
- open: m
2560
- },
2561
- ownerState: I,
2562
- className: de(U.root, R)
2563
- }), {
2564
- slotProps: F
2565
- } = be, K = X(be, Yn);
2566
- return /* @__PURE__ */ N(Ce, i({}, K, !oo(Ce) && {
2567
- slotProps: F,
2568
- disableScrollLock: H
2569
- }, {
2570
- children: /* @__PURE__ */ N(h, i({
2571
- appear: !0,
2572
- in: m,
2573
- onEntering: re,
2574
- onExited: oe,
2575
- timeout: me
2576
- }, V, {
2577
- children: /* @__PURE__ */ N(xe, i({}, Re, {
2578
- children: v
2579
- }))
2580
- }))
2581
- }));
2582
- });
2583
- process.env.NODE_ENV !== "production" && (Bo.propTypes = {
2584
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2585
- // │ These PropTypes are generated from the TypeScript type definitions. │
2586
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2587
- // └─────────────────────────────────────────────────────────────────────┘
2588
- /**
2589
- * A ref for imperative actions.
2590
- * It currently only supports updatePosition() action.
2591
- */
2592
- action: Ie,
2593
- /**
2594
- * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),
2595
- * or a function that returns either.
2596
- * It's used to set the position of the popover.
2597
- */
2598
- anchorEl: an(e.oneOfType([eo, e.func]), (o) => {
2599
- if (o.open && (!o.anchorReference || o.anchorReference === "anchorEl")) {
2600
- const n = We(o.anchorEl);
2601
- if (n && n.nodeType === 1) {
2602
- const t = n.getBoundingClientRect();
2603
- if (process.env.NODE_ENV !== "test" && t.top === 0 && t.left === 0 && t.right === 0 && t.bottom === 0)
2604
- 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(`
2605
- `));
2606
- } else
2607
- 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(`
2608
- `));
2609
- }
2610
- return null;
2611
- }),
2612
- /**
2613
- * This is the point on the anchor where the popover's
2614
- * `anchorEl` will attach to. This is not used when the
2615
- * anchorReference is 'anchorPosition'.
2616
- *
2617
- * Options:
2618
- * vertical: [top, center, bottom];
2619
- * horizontal: [left, center, right].
2620
- * @default {
2621
- * vertical: 'top',
2622
- * horizontal: 'left',
2623
- * }
2624
- */
2625
- anchorOrigin: e.shape({
2626
- horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
2627
- vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
2628
- }),
2629
- /**
2630
- * This is the position that may be used to set the position of the popover.
2631
- * The coordinates are relative to the application's client area.
2632
- */
2633
- anchorPosition: e.shape({
2634
- left: e.number.isRequired,
2635
- top: e.number.isRequired
2636
- }),
2637
- /**
2638
- * This determines which anchor prop to refer to when setting
2639
- * the position of the popover.
2640
- * @default 'anchorEl'
2641
- */
2642
- anchorReference: e.oneOf(["anchorEl", "anchorPosition", "none"]),
2643
- /**
2644
- * The content of the component.
2645
- */
2646
- children: e.node,
2647
- /**
2648
- * Override or extend the styles applied to the component.
2649
- */
2650
- classes: e.object,
2651
- /**
2652
- * @ignore
2653
- */
2654
- className: e.string,
2655
- /**
2656
- * An HTML element, component instance, or function that returns either.
2657
- * The `container` will passed to the Modal component.
2658
- *
2659
- * By default, it uses the body of the anchorEl's top-level document object,
2660
- * so it's simply `document.body` most of the time.
2661
- */
2662
- container: e.oneOfType([eo, e.func]),
2663
- /**
2664
- * Disable the scroll lock behavior.
2665
- * @default false
2666
- */
2667
- disableScrollLock: e.bool,
2668
- /**
2669
- * The elevation of the popover.
2670
- * @default 8
2671
- */
2672
- elevation: tn,
2673
- /**
2674
- * Specifies how close to the edge of the window the popover can appear.
2675
- * If null, the popover will not be constrained by the window.
2676
- * @default 16
2677
- */
2678
- marginThreshold: e.number,
2679
- /**
2680
- * Callback fired when the component requests to be closed.
2681
- * The `reason` parameter can optionally be used to control the response to `onClose`.
2682
- */
2683
- onClose: e.func,
2684
- /**
2685
- * If `true`, the component is shown.
2686
- */
2687
- open: e.bool.isRequired,
2688
- /**
2689
- * Props applied to the [`Paper`](/material-ui/api/paper/) element.
2690
- *
2691
- * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.
2692
- * @deprecated Use `slotProps.paper` instead.
2693
- *
2694
- * @default {}
2695
- */
2696
- PaperProps: e.shape({
2697
- component: Io
2698
- }),
2699
- /**
2700
- * The extra props for the slot components.
2701
- * You can override the existing props or add new ones.
2702
- *
2703
- * @default {}
2704
- */
2705
- slotProps: e.shape({
2706
- paper: e.oneOfType([e.func, e.object]),
2707
- root: e.oneOfType([e.func, e.object])
2708
- }),
2709
- /**
2710
- * The components used for each slot inside.
2711
- *
2712
- * @default {}
2713
- */
2714
- slots: e.shape({
2715
- paper: e.elementType,
2716
- root: e.elementType
2717
- }),
2718
- /**
2719
- * The system prop that allows defining system overrides as well as additional CSS styles.
2720
- */
2721
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2722
- /**
2723
- * This is the point on the popover which
2724
- * will attach to the anchor's origin.
2725
- *
2726
- * Options:
2727
- * vertical: [top, center, bottom, x(px)];
2728
- * horizontal: [left, center, right, x(px)].
2729
- * @default {
2730
- * vertical: 'top',
2731
- * horizontal: 'left',
2732
- * }
2733
- */
2734
- transformOrigin: e.shape({
2735
- horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
2736
- vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
2737
- }),
2738
- /**
2739
- * The component used for the transition.
2740
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
2741
- * @default Grow
2742
- */
2743
- TransitionComponent: e.elementType,
2744
- /**
2745
- * Set to 'auto' to automatically calculate transition time based on height.
2746
- * @default 'auto'
2747
- */
2748
- transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
2749
- appear: e.number,
2750
- enter: e.number,
2751
- exit: e.number
2752
- })]),
2753
- /**
2754
- * Props applied to the transition element.
2755
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
2756
- * @default {}
2757
- */
2758
- TransitionProps: e.object
2759
- });
2760
- function Qn(o) {
2761
- return pe("MuiMenu", o);
2762
- }
2763
- ce("MuiMenu", ["root", "paper", "list"]);
2764
- const et = ["onEntering"], ot = ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"], nt = {
2765
- vertical: "top",
2766
- horizontal: "right"
2767
- }, tt = {
2768
- vertical: "top",
2769
- horizontal: "left"
2770
- }, rt = (o) => {
2771
- const {
2772
- classes: n
2773
- } = o;
2774
- return fe({
2775
- root: ["root"],
2776
- paper: ["paper"],
2777
- list: ["list"]
2778
- }, Qn, n);
2779
- }, st = _(Bo, {
2780
- shouldForwardProp: (o) => ve(o) || o === "classes",
2781
- name: "MuiMenu",
2782
- slot: "Root",
2783
- overridesResolver: (o, n) => n.root
2784
- })({}), it = _(_o, {
2785
- name: "MuiMenu",
2786
- slot: "Paper",
2787
- overridesResolver: (o, n) => n.paper
2788
- })({
2789
- // specZ: The maximum height of a simple menu should be one or more rows less than the view
2790
- // height. This ensures a tappable area outside of the simple menu with which to dismiss
2791
- // the menu.
2792
- maxHeight: "calc(100% - 96px)",
2793
- // Add iOS momentum scrolling for iOS < 13.0
2794
- WebkitOverflowScrolling: "touch"
2795
- }), at = _(jo, {
2796
- name: "MuiMenu",
2797
- slot: "List",
2798
- overridesResolver: (o, n) => n.list
2799
- })({
2800
- // We disable the focus ring for mouse, touch and keyboard users.
2801
- outline: 0
2802
- }), Wo = /* @__PURE__ */ s.forwardRef(function(n, t) {
2803
- var a, u;
2804
- const d = ye({
2805
- props: n,
2806
- name: "MuiMenu"
2807
- }), {
2808
- autoFocus: p = !0,
2809
- children: c,
2810
- className: g,
2811
- disableAutoFocusItem: x = !1,
2812
- MenuListProps: y = {},
2813
- onClose: P,
2814
- open: v,
2815
- PaperProps: R = {},
2816
- PopoverClasses: w,
2817
- transitionDuration: S = "auto",
2818
- TransitionProps: {
2819
- onEntering: E
2820
- } = {},
2821
- variant: m = "selectedMenu",
2822
- slots: T = {},
2823
- slotProps: l = {}
2824
- } = d, r = X(d.TransitionProps, et), b = X(d, ot), h = Hn(), O = i({}, d, {
2825
- autoFocus: p,
2826
- disableAutoFocusItem: x,
2827
- MenuListProps: y,
2828
- onEntering: E,
2829
- PaperProps: R,
2830
- transitionDuration: S,
2831
- TransitionProps: r,
2832
- variant: m
2833
- }), D = rt(O), H = p && !x && v, V = s.useRef(null), Y = (C, z) => {
2834
- V.current && V.current.adjustStyleForScrollbar(C, {
2835
- direction: h ? "rtl" : "ltr"
2836
- }), E && E(C, z);
2837
- }, $ = (C) => {
2838
- C.key === "Tab" && (C.preventDefault(), P && P(C, "tabKeyDown"));
2839
- };
2840
- let B = -1;
2841
- s.Children.map(c, (C, z) => {
2842
- /* @__PURE__ */ s.isValidElement(C) && (process.env.NODE_ENV !== "production" && to.isFragment(C) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
2843
- `)), C.props.disabled || (m === "selectedMenu" && C.props.selected || B === -1) && (B = z));
2844
- });
2845
- const Z = (a = T.paper) != null ? a : it, I = (u = l.paper) != null ? u : R, U = ze({
2846
- elementType: T.root,
2847
- externalSlotProps: l.root,
2848
- ownerState: O,
2849
- className: [D.root, g]
2850
- }), j = ze({
2851
- elementType: Z,
2852
- externalSlotProps: I,
2853
- ownerState: O,
2854
- className: D.paper
2855
- });
2856
- return /* @__PURE__ */ N(st, i({
2857
- onClose: P,
2858
- anchorOrigin: {
2859
- vertical: "bottom",
2860
- horizontal: h ? "right" : "left"
2861
- },
2862
- transformOrigin: h ? nt : tt,
2863
- slots: {
2864
- paper: Z,
2865
- root: T.root
2866
- },
2867
- slotProps: {
2868
- root: U,
2869
- paper: j
2870
- },
2871
- open: v,
2872
- ref: t,
2873
- transitionDuration: S,
2874
- TransitionProps: i({
2875
- onEntering: Y
2876
- }, r),
2877
- ownerState: O
2878
- }, b, {
2879
- classes: w,
2880
- children: /* @__PURE__ */ N(at, i({
2881
- onKeyDown: $,
2882
- actions: V,
2883
- autoFocus: p && (B === -1 || x),
2884
- autoFocusItem: H,
2885
- variant: m
2886
- }, y, {
2887
- className: de(D.list, y.className),
2888
- children: c
2889
- }))
2890
- }));
2891
- });
2892
- process.env.NODE_ENV !== "production" && (Wo.propTypes = {
2893
- // ┌────────────────────────────── Warning ──────────────────────────────┐
2894
- // │ These PropTypes are generated from the TypeScript type definitions. │
2895
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2896
- // └─────────────────────────────────────────────────────────────────────┘
2897
- /**
2898
- * An HTML element, or a function that returns one.
2899
- * It's used to set the position of the menu.
2900
- */
2901
- anchorEl: e.oneOfType([eo, e.func]),
2902
- /**
2903
- * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled
2904
- * children are not focusable. If you set this prop to `false` focus will be placed
2905
- * on the parent modal container. This has severe accessibility implications
2906
- * and should only be considered if you manage focus otherwise.
2907
- * @default true
2908
- */
2909
- autoFocus: e.bool,
2910
- /**
2911
- * Menu contents, normally `MenuItem`s.
2912
- */
2913
- children: e.node,
2914
- /**
2915
- * Override or extend the styles applied to the component.
2916
- */
2917
- classes: e.object,
2918
- /**
2919
- * @ignore
2920
- */
2921
- className: e.string,
2922
- /**
2923
- * When opening the menu will not focus the active item but the `[role="menu"]`
2924
- * unless `autoFocus` is also set to `false`. Not using the default means not
2925
- * following WAI-ARIA authoring practices. Please be considerate about possible
2926
- * accessibility implications.
2927
- * @default false
2928
- */
2929
- disableAutoFocusItem: e.bool,
2930
- /**
2931
- * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.
2932
- * @default {}
2933
- */
2934
- MenuListProps: e.object,
2935
- /**
2936
- * Callback fired when the component requests to be closed.
2937
- *
2938
- * @param {object} event The event source of the callback.
2939
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"`.
2940
- */
2941
- onClose: e.func,
2942
- /**
2943
- * If `true`, the component is shown.
2944
- */
2945
- open: e.bool.isRequired,
2946
- /**
2947
- * @ignore
2948
- */
2949
- PaperProps: e.object,
2950
- /**
2951
- * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.
2952
- */
2953
- PopoverClasses: e.object,
2954
- /**
2955
- * The extra props for the slot components.
2956
- * You can override the existing props or add new ones.
2957
- *
2958
- * @default {}
2959
- */
2960
- slotProps: e.shape({
2961
- paper: e.oneOfType([e.func, e.object]),
2962
- root: e.oneOfType([e.func, e.object])
2963
- }),
2964
- /**
2965
- * The components used for each slot inside.
2966
- *
2967
- * @default {}
2968
- */
2969
- slots: e.shape({
2970
- paper: e.elementType,
2971
- root: e.elementType
2972
- }),
2973
- /**
2974
- * The system prop that allows defining system overrides as well as additional CSS styles.
2975
- */
2976
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2977
- /**
2978
- * The length of the transition in `ms`, or 'auto'
2979
- * @default 'auto'
2980
- */
2981
- transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
2982
- appear: e.number,
2983
- enter: e.number,
2984
- exit: e.number
2985
- })]),
2986
- /**
2987
- * Props applied to the transition element.
2988
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
2989
- * @default {}
2990
- */
2991
- TransitionProps: e.object,
2992
- /**
2993
- * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.
2994
- * @default 'selectedMenu'
2995
- */
2996
- variant: e.oneOf(["menu", "selectedMenu"])
2997
- });
2998
- function lt(o) {
2999
- return pe("MuiNativeSelect", o);
3000
- }
3001
- const po = ce("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]), ut = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"], dt = (o) => {
3002
- const {
3003
- classes: n,
3004
- variant: t,
3005
- disabled: a,
3006
- multiple: u,
3007
- open: d,
3008
- error: p
3009
- } = o, c = {
3010
- select: ["select", t, a && "disabled", u && "multiple", p && "error"],
3011
- icon: ["icon", `icon${we(t)}`, d && "iconOpen", a && "disabled"]
3012
- };
3013
- return fe(c, lt, n);
3014
- }, zo = ({
3015
- ownerState: o,
3016
- theme: n
3017
- }) => i({
3018
- MozAppearance: "none",
3019
- // Reset
3020
- WebkitAppearance: "none",
3021
- // Reset
3022
- // When interacting quickly, the text can end up selected.
3023
- // Native select can't be selected either.
3024
- userSelect: "none",
3025
- borderRadius: 0,
3026
- // Reset
3027
- cursor: "pointer",
3028
- "&:focus": i({}, n.vars ? {
3029
- backgroundColor: `rgba(${n.vars.palette.common.onBackgroundChannel} / 0.05)`
3030
- } : {
3031
- backgroundColor: n.palette.mode === "light" ? "rgba(0, 0, 0, 0.05)" : "rgba(255, 255, 255, 0.05)"
3032
- }, {
3033
- borderRadius: 0
3034
- // Reset Chrome style
3035
- }),
3036
- // Remove IE11 arrow
3037
- "&::-ms-expand": {
3038
- display: "none"
3039
- },
3040
- [`&.${po.disabled}`]: {
3041
- cursor: "default"
3042
- },
3043
- "&[multiple]": {
3044
- height: "auto"
3045
- },
3046
- "&:not([multiple]) option, &:not([multiple]) optgroup": {
3047
- backgroundColor: (n.vars || n).palette.background.paper
3048
- },
3049
- // Bump specificity to allow extending custom inputs
3050
- "&&&": {
3051
- paddingRight: 24,
3052
- minWidth: 16
3053
- // So it doesn't collapse.
3054
- }
3055
- }, o.variant === "filled" && {
3056
- "&&&": {
3057
- paddingRight: 32
3058
- }
3059
- }, o.variant === "outlined" && {
3060
- borderRadius: (n.vars || n).shape.borderRadius,
3061
- "&:focus": {
3062
- borderRadius: (n.vars || n).shape.borderRadius
3063
- // Reset the reset for Chrome style
3064
- },
3065
- "&&&": {
3066
- paddingRight: 32
3067
- }
3068
- }), ct = _("select", {
3069
- name: "MuiNativeSelect",
3070
- slot: "Select",
3071
- shouldForwardProp: ve,
3072
- overridesResolver: (o, n) => {
3073
- const {
3074
- ownerState: t
3075
- } = o;
3076
- return [n.select, n[t.variant], t.error && n.error, {
3077
- [`&.${po.multiple}`]: n.multiple
3078
- }];
3079
- }
3080
- })(zo), Vo = ({
3081
- ownerState: o,
3082
- theme: n
3083
- }) => i({
3084
- // We use a position absolute over a flexbox in order to forward the pointer events
3085
- // to the input and to support wrapping tags..
3086
- position: "absolute",
3087
- right: 0,
3088
- top: "calc(50% - .5em)",
3089
- // Center vertically, height is 1em
3090
- pointerEvents: "none",
3091
- // Don't block pointer events on the select under the icon.
3092
- color: (n.vars || n).palette.action.active,
3093
- [`&.${po.disabled}`]: {
3094
- color: (n.vars || n).palette.action.disabled
3095
- }
3096
- }, o.open && {
3097
- transform: "rotate(180deg)"
3098
- }, o.variant === "filled" && {
3099
- right: 7
3100
- }, o.variant === "outlined" && {
3101
- right: 7
3102
- }), pt = _("svg", {
3103
- name: "MuiNativeSelect",
3104
- slot: "Icon",
3105
- overridesResolver: (o, n) => {
3106
- const {
3107
- ownerState: t
3108
- } = o;
3109
- return [n.icon, t.variant && n[`icon${we(t.variant)}`], t.open && n.iconOpen];
3110
- }
3111
- })(Vo), Uo = /* @__PURE__ */ s.forwardRef(function(n, t) {
3112
- const {
3113
- className: a,
3114
- disabled: u,
3115
- error: d,
3116
- IconComponent: p,
3117
- inputRef: c,
3118
- variant: g = "standard"
3119
- } = n, x = X(n, ut), y = i({}, n, {
3120
- disabled: u,
3121
- variant: g,
3122
- error: d
3123
- }), P = dt(y);
3124
- return /* @__PURE__ */ Ee(s.Fragment, {
3125
- children: [/* @__PURE__ */ N(ct, i({
3126
- ownerState: y,
3127
- className: de(P.select, a),
3128
- disabled: u,
3129
- ref: c || t
3130
- }, x)), n.multiple ? null : /* @__PURE__ */ N(pt, {
3131
- as: p,
3132
- ownerState: y,
3133
- className: P.icon
3134
- })]
3135
- });
3136
- });
3137
- process.env.NODE_ENV !== "production" && (Uo.propTypes = {
3138
- /**
3139
- * The option elements to populate the select with.
3140
- * Can be some `<option>` elements.
3141
- */
3142
- children: e.node,
3143
- /**
3144
- * Override or extend the styles applied to the component.
3145
- */
3146
- classes: e.object,
3147
- /**
3148
- * The CSS class name of the select element.
3149
- */
3150
- className: e.string,
3151
- /**
3152
- * If `true`, the select is disabled.
3153
- */
3154
- disabled: e.bool,
3155
- /**
3156
- * If `true`, the `select input` will indicate an error.
3157
- */
3158
- error: e.bool,
3159
- /**
3160
- * The icon that displays the arrow.
3161
- */
3162
- IconComponent: e.elementType.isRequired,
3163
- /**
3164
- * Use that prop to pass a ref to the native select element.
3165
- * @deprecated
3166
- */
3167
- inputRef: Ie,
3168
- /**
3169
- * @ignore
3170
- */
3171
- multiple: e.bool,
3172
- /**
3173
- * Name attribute of the `select` or hidden `input` element.
3174
- */
3175
- name: e.string,
3176
- /**
3177
- * Callback fired when a menu item is selected.
3178
- *
3179
- * @param {object} event The event source of the callback.
3180
- * You can pull out the new value by accessing `event.target.value` (string).
3181
- */
3182
- onChange: e.func,
3183
- /**
3184
- * The input value.
3185
- */
3186
- value: e.any,
3187
- /**
3188
- * The variant to use.
3189
- */
3190
- variant: e.oneOf(["standard", "outlined", "filled"])
3191
- });
3192
- function ft(o) {
3193
- return pe("MuiSelect", o);
3194
- }
3195
- const je = ce("MuiSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
3196
- var To;
3197
- const mt = ["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"], bt = _("div", {
3198
- name: "MuiSelect",
3199
- slot: "Select",
3200
- overridesResolver: (o, n) => {
3201
- const {
3202
- ownerState: t
3203
- } = o;
3204
- return [
3205
- // Win specificity over the input base
3206
- {
3207
- [`&.${je.select}`]: n.select
3208
- },
3209
- {
3210
- [`&.${je.select}`]: n[t.variant]
3211
- },
3212
- {
3213
- [`&.${je.error}`]: n.error
3214
- },
3215
- {
3216
- [`&.${je.multiple}`]: n.multiple
3217
- }
3218
- ];
3219
- }
3220
- })(zo, {
3221
- // Win specificity over the input base
3222
- [`&.${je.select}`]: {
3223
- height: "auto",
3224
- // Resets for multiple select with chips
3225
- minHeight: "1.4375em",
3226
- // Required for select\text-field height consistency
3227
- textOverflow: "ellipsis",
3228
- whiteSpace: "nowrap",
3229
- overflow: "hidden"
3230
- }
3231
- }), ht = _("svg", {
3232
- name: "MuiSelect",
3233
- slot: "Icon",
3234
- overridesResolver: (o, n) => {
3235
- const {
3236
- ownerState: t
3237
- } = o;
3238
- return [n.icon, t.variant && n[`icon${we(t.variant)}`], t.open && n.iconOpen];
3239
- }
3240
- })(Vo), gt = _("input", {
3241
- shouldForwardProp: (o) => Xo(o) && o !== "classes",
3242
- name: "MuiSelect",
3243
- slot: "NativeInput",
3244
- overridesResolver: (o, n) => n.nativeInput
3245
- })({
3246
- bottom: 0,
3247
- left: 0,
3248
- position: "absolute",
3249
- opacity: 0,
3250
- pointerEvents: "none",
3251
- width: "100%",
3252
- boxSizing: "border-box"
3253
- });
3254
- function Eo(o, n) {
3255
- return typeof n == "object" && n !== null ? o === n : String(o) === String(n);
3256
- }
3257
- function yt(o) {
3258
- return o == null || typeof o == "string" && !o.trim();
3259
- }
3260
- const vt = (o) => {
3261
- const {
3262
- classes: n,
3263
- variant: t,
3264
- disabled: a,
3265
- multiple: u,
3266
- open: d,
3267
- error: p
3268
- } = o, c = {
3269
- select: ["select", t, a && "disabled", u && "multiple", p && "error"],
3270
- icon: ["icon", `icon${we(t)}`, d && "iconOpen", a && "disabled"],
3271
- nativeInput: ["nativeInput"]
3272
- };
3273
- return fe(c, ft, n);
3274
- }, Ho = /* @__PURE__ */ s.forwardRef(function(n, t) {
3275
- var a;
3276
- const {
3277
- "aria-describedby": u,
3278
- "aria-label": d,
3279
- autoFocus: p,
3280
- autoWidth: c,
3281
- children: g,
3282
- className: x,
3283
- defaultOpen: y,
3284
- defaultValue: P,
3285
- disabled: v,
3286
- displayEmpty: R,
3287
- error: w = !1,
3288
- IconComponent: S,
3289
- inputRef: E,
3290
- labelId: m,
3291
- MenuProps: T = {},
3292
- multiple: l,
3293
- name: r,
3294
- onBlur: b,
3295
- onChange: h,
3296
- onClose: O,
3297
- onFocus: D,
3298
- onOpen: H,
3299
- open: V,
3300
- readOnly: Y,
3301
- renderValue: $,
3302
- SelectDisplayProps: B = {},
3303
- tabIndex: Z,
3304
- value: I,
3305
- variant: U = "standard"
3306
- } = n, j = X(n, mt), [C, z] = go({
3307
- controlled: I,
3308
- default: P,
3309
- name: "Select"
3310
- }), [J, Oe] = go({
3311
- controlled: V,
3312
- default: y,
3313
- name: "Select"
3314
- }), ee = s.useRef(null), re = s.useRef(null), [oe, me] = s.useState(null), {
3315
- current: ne
3316
- } = s.useRef(V != null), [Ce, xe] = s.useState(), Re = Se(t, E), be = s.useCallback((f) => {
3317
- re.current = f, f && me(f);
3318
- }, []), F = oe == null ? void 0 : oe.parentNode;
3319
- s.useImperativeHandle(Re, () => ({
3320
- focus: () => {
3321
- re.current.focus();
3322
- },
3323
- node: ee.current,
3324
- value: C
3325
- }), [C]), s.useEffect(() => {
3326
- y && J && oe && !ne && (xe(c ? null : F.clientWidth), re.current.focus());
3327
- }, [oe, c]), s.useEffect(() => {
3328
- p && re.current.focus();
3329
- }, [p]), s.useEffect(() => {
3330
- if (!m)
3331
- return;
3332
- const f = _e(re.current).getElementById(m);
3333
- if (f) {
3334
- const M = () => {
3335
- getSelection().isCollapsed && re.current.focus();
3336
- };
3337
- return f.addEventListener("click", M), () => {
3338
- f.removeEventListener("click", M);
3339
- };
3340
- }
3341
- }, [m]);
3342
- const K = (f, M) => {
3343
- f ? H && H(M) : O && O(M), ne || (xe(c ? null : F.clientWidth), Oe(f));
3344
- }, L = (f) => {
3345
- f.button === 0 && (f.preventDefault(), re.current.focus(), K(!0, f));
3346
- }, A = (f) => {
3347
- K(!1, f);
3348
- }, W = s.Children.toArray(g), se = (f) => {
3349
- const M = W.find((Q) => Q.props.value === f.target.value);
3350
- M !== void 0 && (z(M.props.value), h && h(f, M));
3351
- }, ie = (f) => (M) => {
3352
- let Q;
3353
- if (M.currentTarget.hasAttribute("tabindex")) {
3354
- if (l) {
3355
- Q = Array.isArray(C) ? C.slice() : [];
3356
- const Me = C.indexOf(f.props.value);
3357
- Me === -1 ? Q.push(f.props.value) : Q.splice(Me, 1);
3358
- } else
3359
- Q = f.props.value;
3360
- if (f.props.onClick && f.props.onClick(M), C !== Q && (z(Q), h)) {
3361
- const Me = M.nativeEvent || M, bo = new Me.constructor(Me.type, Me);
3362
- Object.defineProperty(bo, "target", {
3363
- writable: !0,
3364
- value: {
3365
- value: Q,
3366
- name: r
3367
- }
3368
- }), h(bo, f);
3369
- }
3370
- l || K(!1, M);
3371
- }
3372
- }, ae = (f) => {
3373
- Y || [
3374
- " ",
3375
- "ArrowUp",
3376
- "ArrowDown",
3377
- // The native select doesn't respond to enter on macOS, but it's recommended by
3378
- // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
3379
- "Enter"
3380
- ].indexOf(f.key) !== -1 && (f.preventDefault(), K(!0, f));
3381
- }, ue = oe !== null && J, he = (f) => {
3382
- !ue && b && (Object.defineProperty(f, "target", {
3383
- writable: !0,
3384
- value: {
3385
- value: C,
3386
- name: r
3387
- }
3388
- }), b(f));
3389
- };
3390
- delete j["aria-invalid"];
3391
- let q, le;
3392
- const te = [];
3393
- let G = !1, Ne = !1;
3394
- (Do({
3395
- value: C
3396
- }) || R) && ($ ? q = $(C) : G = !0);
3397
- const $e = W.map((f) => {
3398
- if (!/* @__PURE__ */ s.isValidElement(f))
3399
- return null;
3400
- process.env.NODE_ENV !== "production" && to.isFragment(f) && console.error(["MUI: The Select component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
3401
- `));
3402
- let M;
3403
- if (l) {
3404
- if (!Array.isArray(C))
3405
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: The `value` prop must be an array when using the `Select` component with `multiple`." : wo(2));
3406
- M = C.some((Q) => Eo(Q, f.props.value)), M && G && te.push(f.props.children);
3407
- } else
3408
- M = Eo(C, f.props.value), M && G && (le = f.props.children);
3409
- return M && (Ne = !0), /* @__PURE__ */ s.cloneElement(f, {
3410
- "aria-selected": M ? "true" : "false",
3411
- onClick: ie(f),
3412
- onKeyUp: (Q) => {
3413
- Q.key === " " && Q.preventDefault(), f.props.onKeyUp && f.props.onKeyUp(Q);
3414
- },
3415
- role: "option",
3416
- selected: M,
3417
- value: void 0,
3418
- // The value is most likely not a valid HTML attribute.
3419
- "data-value": f.props.value
3420
- // Instead, we provide it as a data attribute.
3421
- });
3422
- });
3423
- process.env.NODE_ENV !== "production" && s.useEffect(() => {
3424
- if (!Ne && !l && C !== "") {
3425
- const f = W.map((M) => M.props.value);
3426
- console.warn([`MUI: You have provided an out-of-range value \`${C}\` for the select ${r ? `(name="${r}") ` : ""}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${f.filter((M) => M != null).map((M) => `\`${M}\``).join(", ") || '""'}.`].join(`
3427
- `));
3428
- }
3429
- }, [Ne, W, l, r, C]), G && (l ? te.length === 0 ? q = null : q = te.reduce((f, M, Q) => (f.push(M), Q < te.length - 1 && f.push(", "), f), []) : q = le);
3430
- let ke = Ce;
3431
- !c && ne && oe && (ke = F.clientWidth);
3432
- let k;
3433
- typeof Z < "u" ? k = Z : k = v ? null : 0;
3434
- const De = B.id || (r ? `mui-component-select-${r}` : void 0), Pe = i({}, n, {
3435
- variant: U,
3436
- value: C,
3437
- open: ue,
3438
- error: w
3439
- }), Ye = vt(Pe), Ze = i({}, T.PaperProps, (a = T.slotProps) == null ? void 0 : a.paper), mo = ln();
3440
- return /* @__PURE__ */ Ee(s.Fragment, {
3441
- children: [/* @__PURE__ */ N(bt, i({
3442
- ref: be,
3443
- tabIndex: k,
3444
- role: "combobox",
3445
- "aria-controls": mo,
3446
- "aria-disabled": v ? "true" : void 0,
3447
- "aria-expanded": ue ? "true" : "false",
3448
- "aria-haspopup": "listbox",
3449
- "aria-label": d,
3450
- "aria-labelledby": [m, De].filter(Boolean).join(" ") || void 0,
3451
- "aria-describedby": u,
3452
- onKeyDown: ae,
3453
- onMouseDown: v || Y ? null : L,
3454
- onBlur: he,
3455
- onFocus: D
3456
- }, B, {
3457
- ownerState: Pe,
3458
- className: de(B.className, Ye.select, x),
3459
- id: De,
3460
- children: yt(q) ? (
3461
- // notranslate needed while Google Translate will not fix zero-width space issue
3462
- To || (To = /* @__PURE__ */ N("span", {
3463
- className: "notranslate",
3464
- children: "​"
3465
- }))
3466
- ) : q
3467
- })), /* @__PURE__ */ N(gt, i({
3468
- "aria-invalid": w,
3469
- value: Array.isArray(C) ? C.join(",") : C,
3470
- name: r,
3471
- ref: ee,
3472
- "aria-hidden": !0,
3473
- onChange: se,
3474
- tabIndex: -1,
3475
- disabled: v,
3476
- className: Ye.nativeInput,
3477
- autoFocus: p,
3478
- ownerState: Pe
3479
- }, j)), /* @__PURE__ */ N(ht, {
3480
- as: S,
3481
- className: Ye.icon,
3482
- ownerState: Pe
3483
- }), /* @__PURE__ */ N(Wo, i({
3484
- id: `menu-${r || ""}`,
3485
- anchorEl: F,
3486
- open: ue,
3487
- onClose: A,
3488
- anchorOrigin: {
3489
- vertical: "bottom",
3490
- horizontal: "center"
3491
- },
3492
- transformOrigin: {
3493
- vertical: "top",
3494
- horizontal: "center"
3495
- }
3496
- }, T, {
3497
- MenuListProps: i({
3498
- "aria-labelledby": m,
3499
- role: "listbox",
3500
- "aria-multiselectable": l ? "true" : void 0,
3501
- disableListWrap: !0,
3502
- id: mo
3503
- }, T.MenuListProps),
3504
- slotProps: i({}, T.slotProps, {
3505
- paper: i({}, Ze, {
3506
- style: i({
3507
- minWidth: ke
3508
- }, Ze != null ? Ze.style : null)
3509
- })
3510
- }),
3511
- children: $e
3512
- }))]
3513
- });
3514
- });
3515
- process.env.NODE_ENV !== "production" && (Ho.propTypes = {
3516
- /**
3517
- * @ignore
3518
- */
3519
- "aria-describedby": e.string,
3520
- /**
3521
- * @ignore
3522
- */
3523
- "aria-label": e.string,
3524
- /**
3525
- * @ignore
3526
- */
3527
- autoFocus: e.bool,
3528
- /**
3529
- * If `true`, the width of the popover will automatically be set according to the items inside the
3530
- * menu, otherwise it will be at least the width of the select input.
3531
- */
3532
- autoWidth: e.bool,
3533
- /**
3534
- * The option elements to populate the select with.
3535
- * Can be some `<MenuItem>` elements.
3536
- */
3537
- children: e.node,
3538
- /**
3539
- * Override or extend the styles applied to the component.
3540
- */
3541
- classes: e.object,
3542
- /**
3543
- * The CSS class name of the select element.
3544
- */
3545
- className: e.string,
3546
- /**
3547
- * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
3548
- * You can only use it when the `native` prop is `false` (default).
3549
- */
3550
- defaultOpen: e.bool,
3551
- /**
3552
- * The default value. Use when the component is not controlled.
3553
- */
3554
- defaultValue: e.any,
3555
- /**
3556
- * If `true`, the select is disabled.
3557
- */
3558
- disabled: e.bool,
3559
- /**
3560
- * If `true`, the selected item is displayed even if its value is empty.
3561
- */
3562
- displayEmpty: e.bool,
3563
- /**
3564
- * If `true`, the `select input` will indicate an error.
3565
- */
3566
- error: e.bool,
3567
- /**
3568
- * The icon that displays the arrow.
3569
- */
3570
- IconComponent: e.elementType.isRequired,
3571
- /**
3572
- * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`
3573
- * Equivalent to `ref`
3574
- */
3575
- inputRef: Ie,
3576
- /**
3577
- * The ID of an element that acts as an additional label. The Select will
3578
- * be labelled by the additional label and the selected value.
3579
- */
3580
- labelId: e.string,
3581
- /**
3582
- * Props applied to the [`Menu`](/material-ui/api/menu/) element.
3583
- */
3584
- MenuProps: e.object,
3585
- /**
3586
- * If `true`, `value` must be an array and the menu will support multiple selections.
3587
- */
3588
- multiple: e.bool,
3589
- /**
3590
- * Name attribute of the `select` or hidden `input` element.
3591
- */
3592
- name: e.string,
3593
- /**
3594
- * @ignore
3595
- */
3596
- onBlur: e.func,
3597
- /**
3598
- * Callback fired when a menu item is selected.
3599
- *
3600
- * @param {object} event The event source of the callback.
3601
- * You can pull out the new value by accessing `event.target.value` (any).
3602
- * @param {object} [child] The react element that was selected.
3603
- */
3604
- onChange: e.func,
3605
- /**
3606
- * Callback fired when the component requests to be closed.
3607
- * Use in controlled mode (see open).
3608
- *
3609
- * @param {object} event The event source of the callback.
3610
- */
3611
- onClose: e.func,
3612
- /**
3613
- * @ignore
3614
- */
3615
- onFocus: e.func,
3616
- /**
3617
- * Callback fired when the component requests to be opened.
3618
- * Use in controlled mode (see open).
3619
- *
3620
- * @param {object} event The event source of the callback.
3621
- */
3622
- onOpen: e.func,
3623
- /**
3624
- * If `true`, the component is shown.
3625
- */
3626
- open: e.bool,
3627
- /**
3628
- * @ignore
3629
- */
3630
- readOnly: e.bool,
3631
- /**
3632
- * Render the selected value.
3633
- *
3634
- * @param {any} value The `value` provided to the component.
3635
- * @returns {ReactNode}
3636
- */
3637
- renderValue: e.func,
3638
- /**
3639
- * Props applied to the clickable div element.
3640
- */
3641
- SelectDisplayProps: e.object,
3642
- /**
3643
- * @ignore
3644
- */
3645
- tabIndex: e.oneOfType([e.number, e.string]),
3646
- /**
3647
- * @ignore
3648
- */
3649
- type: e.any,
3650
- /**
3651
- * The input value.
3652
- */
3653
- value: e.any,
3654
- /**
3655
- * The variant to use.
3656
- */
3657
- variant: e.oneOf(["standard", "outlined", "filled"])
3658
- });
3659
- const Ot = dn(/* @__PURE__ */ N("path", {
3660
- d: "M7 10l5 5 5-5z"
3661
- }), "ArrowDropDown"), Ct = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"], xt = ["root"], Rt = (o) => {
3662
- const {
3663
- classes: n
3664
- } = o;
3665
- return n;
3666
- }, fo = {
3667
- name: "MuiSelect",
3668
- overridesResolver: (o, n) => n.root,
3669
- shouldForwardProp: (o) => ve(o) && o !== "variant",
3670
- slot: "Root"
3671
- }, Pt = _(lo, fo)(""), Tt = _(co, fo)(""), Et = _(uo, fo)(""), Ko = /* @__PURE__ */ s.forwardRef(function(n, t) {
3672
- const a = ye({
3673
- name: "MuiSelect",
3674
- props: n
3675
- }), {
3676
- autoWidth: u = !1,
3677
- children: d,
3678
- classes: p = {},
3679
- className: c,
3680
- defaultOpen: g = !1,
3681
- displayEmpty: x = !1,
3682
- IconComponent: y = Ot,
3683
- id: P,
3684
- input: v,
3685
- inputProps: R,
3686
- label: w,
3687
- labelId: S,
3688
- MenuProps: E,
3689
- multiple: m = !1,
3690
- native: T = !1,
3691
- onClose: l,
3692
- onOpen: r,
3693
- open: b,
3694
- renderValue: h,
3695
- SelectDisplayProps: O,
3696
- variant: D = "outlined"
3697
- } = a, H = X(a, Ct), V = T ? Uo : Ho, Y = io(), $ = so({
3698
- props: a,
3699
- muiFormControl: Y,
3700
- states: ["variant", "error"]
3701
- }), B = $.variant || D, Z = i({}, a, {
3702
- variant: B,
3703
- classes: p
3704
- }), I = Rt(Z), U = X(I, xt), j = v || {
3705
- standard: /* @__PURE__ */ N(Pt, {
3706
- ownerState: Z
3707
- }),
3708
- outlined: /* @__PURE__ */ N(Tt, {
3709
- label: w,
3710
- ownerState: Z
3711
- }),
3712
- filled: /* @__PURE__ */ N(Et, {
3713
- ownerState: Z
3714
- })
3715
- }[B], C = Se(t, So(j));
3716
- return /* @__PURE__ */ N(s.Fragment, {
3717
- children: /* @__PURE__ */ s.cloneElement(j, i({
3718
- // Most of the logic is implemented in `SelectInput`.
3719
- // The `Select` component is a simple API wrapper to expose something better to play with.
3720
- inputComponent: V,
3721
- inputProps: i({
3722
- children: d,
3723
- error: $.error,
3724
- IconComponent: y,
3725
- variant: B,
3726
- type: void 0,
3727
- // We render a select. We can ignore the type provided by the `Input`.
3728
- multiple: m
3729
- }, T ? {
3730
- id: P
3731
- } : {
3732
- autoWidth: u,
3733
- defaultOpen: g,
3734
- displayEmpty: x,
3735
- labelId: S,
3736
- MenuProps: E,
3737
- onClose: l,
3738
- onOpen: r,
3739
- open: b,
3740
- renderValue: h,
3741
- SelectDisplayProps: i({
3742
- id: P
3743
- }, O)
3744
- }, R, {
3745
- classes: R ? ro(U, R.classes) : U
3746
- }, v ? v.props.inputProps : {})
3747
- }, (m && T || x) && B === "outlined" ? {
3748
- notched: !0
3749
- } : {}, {
3750
- ref: C,
3751
- className: de(j.props.className, c, I.root)
3752
- }, !v && {
3753
- variant: B
3754
- }, H))
3755
- });
3756
- });
3757
- process.env.NODE_ENV !== "production" && (Ko.propTypes = {
3758
- // ┌────────────────────────────── Warning ──────────────────────────────┐
3759
- // │ These PropTypes are generated from the TypeScript type definitions. │
3760
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
3761
- // └─────────────────────────────────────────────────────────────────────┘
3762
- /**
3763
- * If `true`, the width of the popover will automatically be set according to the items inside the
3764
- * menu, otherwise it will be at least the width of the select input.
3765
- * @default false
3766
- */
3767
- autoWidth: e.bool,
3768
- /**
3769
- * The option elements to populate the select with.
3770
- * Can be some `MenuItem` when `native` is false and `option` when `native` is true.
3771
- *
3772
- * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
3773
- */
3774
- children: e.node,
3775
- /**
3776
- * Override or extend the styles applied to the component.
3777
- * @default {}
3778
- */
3779
- classes: e.object,
3780
- /**
3781
- * @ignore
3782
- */
3783
- className: e.string,
3784
- /**
3785
- * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
3786
- * You can only use it when the `native` prop is `false` (default).
3787
- * @default false
3788
- */
3789
- defaultOpen: e.bool,
3790
- /**
3791
- * The default value. Use when the component is not controlled.
3792
- */
3793
- defaultValue: e.any,
3794
- /**
3795
- * If `true`, a value is displayed even if no items are selected.
3796
- *
3797
- * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
3798
- * returns the value to be displayed when no items are selected.
3799
- *
3800
- * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
3801
- * The label should either be hidden or forced to a shrunk state.
3802
- * @default false
3803
- */
3804
- displayEmpty: e.bool,
3805
- /**
3806
- * The icon that displays the arrow.
3807
- * @default ArrowDropDownIcon
3808
- */
3809
- IconComponent: e.elementType,
3810
- /**
3811
- * The `id` of the wrapper element or the `select` element when `native`.
3812
- */
3813
- id: e.string,
3814
- /**
3815
- * An `Input` element; does not have to be a material-ui specific `Input`.
3816
- */
3817
- input: e.element,
3818
- /**
3819
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
3820
- * When `native` is `true`, the attributes are applied on the `select` element.
3821
- */
3822
- inputProps: e.object,
3823
- /**
3824
- * See [OutlinedInput#label](/material-ui/api/outlined-input/#props)
3825
- */
3826
- label: e.node,
3827
- /**
3828
- * The ID of an element that acts as an additional label. The Select will
3829
- * be labelled by the additional label and the selected value.
3830
- */
3831
- labelId: e.string,
3832
- /**
3833
- * Props applied to the [`Menu`](/material-ui/api/menu/) element.
3834
- */
3835
- MenuProps: e.object,
3836
- /**
3837
- * If `true`, `value` must be an array and the menu will support multiple selections.
3838
- * @default false
3839
- */
3840
- multiple: e.bool,
3841
- /**
3842
- * If `true`, the component uses a native `select` element.
3843
- * @default false
3844
- */
3845
- native: e.bool,
3846
- /**
3847
- * Callback fired when a menu item is selected.
3848
- *
3849
- * @param {SelectChangeEvent<Value>} event The event source of the callback.
3850
- * You can pull out the new value by accessing `event.target.value` (any).
3851
- * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
3852
- * @param {object} [child] The react element that was selected when `native` is `false` (default).
3853
- */
3854
- onChange: e.func,
3855
- /**
3856
- * Callback fired when the component requests to be closed.
3857
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
3858
- *
3859
- * @param {object} event The event source of the callback.
3860
- */
3861
- onClose: e.func,
3862
- /**
3863
- * Callback fired when the component requests to be opened.
3864
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
3865
- *
3866
- * @param {object} event The event source of the callback.
3867
- */
3868
- onOpen: e.func,
3869
- /**
3870
- * If `true`, the component is shown.
3871
- * You can only use it when the `native` prop is `false` (default).
3872
- */
3873
- open: e.bool,
3874
- /**
3875
- * Render the selected value.
3876
- * You can only use it when the `native` prop is `false` (default).
3877
- *
3878
- * @param {any} value The `value` provided to the component.
3879
- * @returns {ReactNode}
3880
- */
3881
- renderValue: e.func,
3882
- /**
3883
- * Props applied to the clickable div element.
3884
- */
3885
- SelectDisplayProps: e.object,
3886
- /**
3887
- * The system prop that allows defining system overrides as well as additional CSS styles.
3888
- */
3889
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
3890
- /**
3891
- * The `input` value. Providing an empty string will select no options.
3892
- * Set to an empty string `''` if you don't want any of the available options to be selected.
3893
- *
3894
- * If the value is an object it must have reference equality with the option in order to be selected.
3895
- * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
3896
- */
3897
- value: e.oneOfType([e.oneOf([""]), e.any]),
3898
- /**
3899
- * The variant to use.
3900
- * @default 'outlined'
3901
- */
3902
- variant: e.oneOf(["filled", "outlined", "standard"])
3903
- });
3904
- Ko.muiName = "Select";
3905
- export {
3906
- uo as F,
3907
- ao as G,
3908
- lo as I,
3909
- Mo as L,
3910
- co as O,
3911
- Ko as S,
3912
- Do as a,
3913
- Fo as b,
3914
- Ut as i,
3915
- Hn as u
3916
- };