@solostylist/ui-kit 1.0.57 → 1.0.59

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