@hybridcore/ui 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/{ButtonBase-C875Ww3z.js → ButtonBase-DJz-TFGO.js} +200 -208
  2. package/dist/{CardContent-pWhEcyoR.js → CardContent-DZnCVGy9.js} +15 -15
  3. package/dist/{Checkbox-COCZU8Yl.js → Checkbox-DzmWBCrt.js} +154 -144
  4. package/dist/{Collapse-CZFw4GZs.js → Collapse-NqW0GIK_.js} +79 -77
  5. package/dist/DialogContent-D51w7KVX.js +2119 -0
  6. package/dist/FormControl-aXQs42m6.js +1363 -0
  7. package/dist/FormControlLabel-hDa-xf_q.js +639 -0
  8. package/dist/{IconButton-DM-0JFx9.js → IconButton-SnBOFQ43.js} +22 -22
  9. package/dist/{Input-DgIhcA8j.js → Input-CeVb6kjv.js} +34 -34
  10. package/dist/InputAdornment-fM3loNyx.js +155 -0
  11. package/dist/{List-Dz3Z1qJk.js → List-DLIiXc6r.js} +10 -10
  12. package/dist/{ListItem-DnyWDeDF.js → ListItem-BkxmqFI8.js} +23 -23
  13. package/dist/{MenuItem-BjC83iWq.js → MenuItem-BEW28T9O.js} +27 -27
  14. package/dist/{OutlinedInput-CS2BwiVg.js → OutlinedInput-DkzLHRTd.js} +75 -78
  15. package/dist/{Paper-seBMlMwu.js → Paper-Dp3qO0cK.js} +18 -18
  16. package/dist/Select-Cdmu0dQ4.js +2175 -0
  17. package/dist/Typography-CXe5ytr0.js +201 -0
  18. package/dist/components/card/index.js +17 -17
  19. package/dist/components/card/styled.js +1 -1
  20. package/dist/components/collapsible-card/style.js +222 -302
  21. package/dist/components/confirm/dialog.js +13 -13
  22. package/dist/components/container/index.js +19 -19
  23. package/dist/components/context-menu/index.js +32 -32
  24. package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
  25. package/dist/components/data-management/instance-form/components/variable/index.js +6 -6
  26. package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
  27. package/dist/components/date-time-picker/index.js +4 -4
  28. package/dist/components/geometry-picker/index.js +7 -6
  29. package/dist/components/icon-button/index.js +1 -1
  30. package/dist/components/map/styled.js +14 -14
  31. package/dist/components/search-input/index.js +10 -9
  32. package/dist/components/template-property-filters/index.js +1 -1
  33. package/dist/components/template-property-filters/property.js +4 -4
  34. package/dist/components/tree-select/index.js +4 -4
  35. package/dist/components/treeview-filter/index.js +29 -30
  36. package/dist/components/treeview-filter/item/index.js +1 -1
  37. package/dist/components/treeview-filter/item-label/index.js +2 -2
  38. package/dist/createStyled-liRRhQcN.js +1910 -0
  39. package/dist/createSvgIcon-B4TFefhd.js +73 -0
  40. package/dist/{createSvgIcon-pajAAvTK.js → createSvgIcon-Cl8kMTkx.js} +82 -85
  41. package/dist/{exactProp-D0xuoiRB.js → exactProp-CT2wqJXE.js} +2 -2
  42. package/dist/{index-tNZngrO0.js → index-D9TdkXAs.js} +10 -10
  43. package/dist/{index-DlFdC7eU.js → index-DRy8nExS.js} +205 -218
  44. package/dist/{listItemTextClasses-DRMkDW2V.js → listItemTextClasses-BrCbmCR1.js} +2 -2
  45. package/dist/main.js +248 -326
  46. package/dist/property-BsU8ijQF.js +6857 -0
  47. package/dist/requirePropFactory-BItwGLRQ.js +18 -0
  48. package/dist/styled-Dm8rXzIG.js +677 -0
  49. package/dist/useTheme-CTuK-wFF.js +10 -0
  50. package/dist/useThemeProps-BXn-nVhw.js +107 -0
  51. package/dist/{utils-Cbb4HUTT.js → utils-DY9Jk4Ah.js} +2 -2
  52. package/package.json +4 -4
  53. package/dist/DialogContent-DhcqAG-q.js +0 -1982
  54. package/dist/FormControl-BhwmBUAq.js +0 -1479
  55. package/dist/FormControlLabel-BL6c4YAN.js +0 -827
  56. package/dist/Select-C8Iimh3g.js +0 -2305
  57. package/dist/Typography-CqyjdT7p.js +0 -178
  58. package/dist/chainPropTypes-CwfDfLEA.js +0 -96
  59. package/dist/createSvgIcon-CTQMsmqJ.js +0 -77
  60. package/dist/createTheme-CCwx9ptk.js +0 -2395
  61. package/dist/property-CKak9_tn.js +0 -7020
  62. package/dist/resolveComponentProps-DVsx78bV.js +0 -54
  63. package/dist/styled-CPg13iuX.js +0 -142
  64. package/dist/styled-fcu13kUF.js +0 -1033
  65. package/dist/useTheme-BWgLzAUj.js +0 -18
  66. package/dist/useTheme-pp7LSyyX.js +0 -10
  67. package/dist/useThemeProps-CDWnyqCh.js +0 -62
  68. package/dist/useThemeProps-DOuXhu3E.js +0 -27
@@ -1,1479 +0,0 @@
1
- import { a as H, _ as i } from "./extends-Cyw62AD_.js";
2
- import * as a from "react";
3
- import { G as Ve, P as e, a as L, f as Ue } from "./createTheme-CCwx9ptk.js";
4
- import { g as Y, u as Z, c as j, a as J } from "./chainPropTypes-CwfDfLEA.js";
5
- import { u as re, F as be } from "./useFormControl-CatNKXAi.js";
6
- import { d as Ge, T as Ke, g as Q, s as B, r as Ye } from "./styled-fcu13kUF.js";
7
- import { jsx as E, jsxs as q } from "react/jsx-runtime";
8
- import { b as ze, u as pe, e as Ze, r as Je } from "./ButtonBase-C875Ww3z.js";
9
- import { o as Re } from "./ownerWindow-niciwP7I.js";
10
- import { d as Qe } from "./debounce-46wSf_lW.js";
11
- import { i as Se } from "./isHostComponent-kiaBvYVo.js";
12
- import { a as Xe } from "./useTheme-BWgLzAUj.js";
13
- import { T as eo } from "./Typography-CqyjdT7p.js";
14
- import { i as ue } from "./isMuiElement-CxT3_ACP.js";
15
- function Ae({
16
- styles: o,
17
- themeId: n,
18
- defaultTheme: r = {}
19
- }) {
20
- const t = Xe(r), s = typeof o == "function" ? o(n && t[n] || t) : o;
21
- return /* @__PURE__ */ E(Ve, {
22
- styles: s
23
- });
24
- }
25
- process.env.NODE_ENV !== "production" && (Ae.propTypes = {
26
- // ┌────────────────────────────── Warning ──────────────────────────────┐
27
- // │ These PropTypes are generated from the TypeScript type definitions. │
28
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
29
- // └─────────────────────────────────────────────────────────────────────┘
30
- /**
31
- * @ignore
32
- */
33
- defaultTheme: e.object,
34
- /**
35
- * @ignore
36
- */
37
- styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool]),
38
- /**
39
- * @ignore
40
- */
41
- themeId: e.string
42
- });
43
- function he({
44
- props: o,
45
- states: n,
46
- muiFormControl: r
47
- }) {
48
- return n.reduce((t, s) => (t[s] = o[s], r && typeof o[s] > "u" && (t[s] = r[s]), t), {});
49
- }
50
- const oo = ["onChange", "maxRows", "minRows", "style", "value"];
51
- function ne(o) {
52
- return parseInt(o, 10) || 0;
53
- }
54
- const no = {
55
- shadow: {
56
- // Visibility needed to hide the extra text area on iPads
57
- visibility: "hidden",
58
- // Remove from the content flow
59
- position: "absolute",
60
- // Ignore the scrollbar width
61
- overflow: "hidden",
62
- height: 0,
63
- top: 0,
64
- left: 0,
65
- // Create a new layer, increase the isolation of the computed values
66
- transform: "translateZ(0)"
67
- }
68
- };
69
- function ro(o) {
70
- return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
71
- }
72
- const ke = /* @__PURE__ */ a.forwardRef(function(n, r) {
73
- const {
74
- onChange: t,
75
- maxRows: s,
76
- minRows: l = 1,
77
- style: m,
78
- value: y
79
- } = n, c = H(n, oo), {
80
- current: d
81
- } = a.useRef(y != null), u = a.useRef(null), g = ze(r, u), p = a.useRef(null), R = a.useRef(null), O = a.useCallback(() => {
82
- const v = u.current, C = Re(v).getComputedStyle(v);
83
- if (C.width === "0px")
84
- return {
85
- outerHeightStyle: 0,
86
- overflowing: !1
87
- };
88
- const x = R.current;
89
- x.style.width = C.width, x.value = v.value || n.placeholder || "x", x.value.slice(-1) === `
90
- ` && (x.value += " ");
91
- const M = C.boxSizing, z = ne(C.paddingBottom) + ne(C.paddingTop), N = ne(C.borderBottomWidth) + ne(C.borderTopWidth), F = x.scrollHeight;
92
- x.value = "x";
93
- const A = x.scrollHeight;
94
- let T = F;
95
- l && (T = Math.max(Number(l) * A, T)), s && (T = Math.min(Number(s) * A, T)), T = Math.max(T, A);
96
- const W = T + (M === "border-box" ? z + N : 0), V = Math.abs(T - F) <= 1;
97
- return {
98
- outerHeightStyle: W,
99
- overflowing: V
100
- };
101
- }, [s, l, n.placeholder]), w = a.useCallback(() => {
102
- const v = O();
103
- if (ro(v))
104
- return;
105
- const b = v.outerHeightStyle, C = u.current;
106
- p.current !== b && (p.current = b, C.style.height = `${b}px`), C.style.overflow = v.overflowing ? "hidden" : "";
107
- }, [O]);
108
- pe(() => {
109
- const v = () => {
110
- w();
111
- };
112
- let b;
113
- const C = () => {
114
- cancelAnimationFrame(b), b = requestAnimationFrame(() => {
115
- v();
116
- });
117
- }, x = Qe(v), M = u.current, z = Re(M);
118
- z.addEventListener("resize", x);
119
- let N;
120
- return typeof ResizeObserver < "u" && (N = new ResizeObserver(process.env.NODE_ENV === "test" ? C : v), N.observe(M)), () => {
121
- x.clear(), cancelAnimationFrame(b), z.removeEventListener("resize", x), N && N.disconnect();
122
- };
123
- }, [O, w]), pe(() => {
124
- w();
125
- });
126
- const $ = (v) => {
127
- d || w(), t && t(v);
128
- };
129
- return /* @__PURE__ */ q(a.Fragment, {
130
- children: [/* @__PURE__ */ E("textarea", i({
131
- value: y,
132
- onChange: $,
133
- ref: g,
134
- rows: l,
135
- style: m
136
- }, c)), /* @__PURE__ */ E("textarea", {
137
- "aria-hidden": !0,
138
- className: n.className,
139
- readOnly: !0,
140
- ref: R,
141
- tabIndex: -1,
142
- style: i({}, no.shadow, m, {
143
- paddingTop: 0,
144
- paddingBottom: 0
145
- })
146
- })]
147
- });
148
- });
149
- process.env.NODE_ENV !== "production" && (ke.propTypes = {
150
- // ┌────────────────────────────── Warning ──────────────────────────────┐
151
- // │ These PropTypes are generated from the TypeScript type definitions. │
152
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
153
- // └─────────────────────────────────────────────────────────────────────┘
154
- /**
155
- * @ignore
156
- */
157
- className: e.string,
158
- /**
159
- * Maximum number of rows to display.
160
- */
161
- maxRows: e.oneOfType([e.number, e.string]),
162
- /**
163
- * Minimum number of rows to display.
164
- * @default 1
165
- */
166
- minRows: e.oneOfType([e.number, e.string]),
167
- /**
168
- * @ignore
169
- */
170
- onChange: e.func,
171
- /**
172
- * @ignore
173
- */
174
- placeholder: e.string,
175
- /**
176
- * @ignore
177
- */
178
- style: e.object,
179
- /**
180
- * @ignore
181
- */
182
- value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
183
- });
184
- function Le(o) {
185
- return /* @__PURE__ */ E(Ae, i({}, o, {
186
- defaultTheme: Ge,
187
- themeId: Ke
188
- }));
189
- }
190
- process.env.NODE_ENV !== "production" && (Le.propTypes = {
191
- // ┌────────────────────────────── Warning ──────────────────────────────┐
192
- // │ These PropTypes are generated from the TypeScript type definitions. │
193
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
194
- // └─────────────────────────────────────────────────────────────────────┘
195
- /**
196
- * The styles you want to apply globally.
197
- */
198
- styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
199
- });
200
- function Ne(o) {
201
- return o != null && !(Array.isArray(o) && o.length === 0);
202
- }
203
- function fe(o, n = !1) {
204
- return o && (Ne(o.value) && o.value !== "" || n && Ne(o.defaultValue) && o.defaultValue !== "");
205
- }
206
- function to(o) {
207
- return o.startAdornment;
208
- }
209
- function so(o) {
210
- return Q("MuiInputBase", o);
211
- }
212
- const me = Y("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), io = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], ao = (o, n) => {
213
- const {
214
- ownerState: r
215
- } = o;
216
- return [n.root, r.formControl && n.formControl, r.startAdornment && n.adornedStart, r.endAdornment && n.adornedEnd, r.error && n.error, r.size === "small" && n.sizeSmall, r.multiline && n.multiline, r.color && n[`color${L(r.color)}`], r.fullWidth && n.fullWidth, r.hiddenLabel && n.hiddenLabel];
217
- }, lo = (o, n) => {
218
- const {
219
- ownerState: r
220
- } = o;
221
- return [n.input, r.size === "small" && n.inputSizeSmall, r.multiline && n.inputMultiline, r.type === "search" && n.inputTypeSearch, r.startAdornment && n.inputAdornedStart, r.endAdornment && n.inputAdornedEnd, r.hiddenLabel && n.inputHiddenLabel];
222
- }, co = (o) => {
223
- const {
224
- classes: n,
225
- color: r,
226
- disabled: t,
227
- error: s,
228
- endAdornment: l,
229
- focused: m,
230
- formControl: y,
231
- fullWidth: c,
232
- hiddenLabel: d,
233
- multiline: u,
234
- readOnly: g,
235
- size: p,
236
- startAdornment: R,
237
- type: O
238
- } = o, w = {
239
- root: ["root", `color${L(r)}`, t && "disabled", s && "error", c && "fullWidth", m && "focused", y && "formControl", p && p !== "medium" && `size${L(p)}`, u && "multiline", R && "adornedStart", l && "adornedEnd", d && "hiddenLabel", g && "readOnly"],
240
- input: ["input", t && "disabled", O === "search" && "inputTypeSearch", u && "inputMultiline", p === "small" && "inputSizeSmall", d && "inputHiddenLabel", R && "inputAdornedStart", l && "inputAdornedEnd", g && "readOnly"]
241
- };
242
- return J(w, so, n);
243
- }, uo = B("div", {
244
- name: "MuiInputBase",
245
- slot: "Root",
246
- overridesResolver: ao
247
- })(({
248
- theme: o,
249
- ownerState: n
250
- }) => i({}, o.typography.body1, {
251
- color: (o.vars || o).palette.text.primary,
252
- lineHeight: "1.4375em",
253
- // 23px
254
- boxSizing: "border-box",
255
- // Prevent padding issue with fullWidth.
256
- position: "relative",
257
- cursor: "text",
258
- display: "inline-flex",
259
- alignItems: "center",
260
- [`&.${me.disabled}`]: {
261
- color: (o.vars || o).palette.text.disabled,
262
- cursor: "default"
263
- }
264
- }, n.multiline && i({
265
- padding: "4px 0 5px"
266
- }, n.size === "small" && {
267
- paddingTop: 1
268
- }), n.fullWidth && {
269
- width: "100%"
270
- })), po = B("input", {
271
- name: "MuiInputBase",
272
- slot: "Input",
273
- overridesResolver: lo
274
- })(({
275
- theme: o,
276
- ownerState: n
277
- }) => {
278
- const r = o.palette.mode === "light", t = i({
279
- color: "currentColor"
280
- }, o.vars ? {
281
- opacity: o.vars.opacity.inputPlaceholder
282
- } : {
283
- opacity: r ? 0.42 : 0.5
284
- }, {
285
- transition: o.transitions.create("opacity", {
286
- duration: o.transitions.duration.shorter
287
- })
288
- }), s = {
289
- opacity: "0 !important"
290
- }, l = o.vars ? {
291
- opacity: o.vars.opacity.inputPlaceholder
292
- } : {
293
- opacity: r ? 0.42 : 0.5
294
- };
295
- return i({
296
- font: "inherit",
297
- letterSpacing: "inherit",
298
- color: "currentColor",
299
- padding: "4px 0 5px",
300
- border: 0,
301
- boxSizing: "content-box",
302
- background: "none",
303
- height: "1.4375em",
304
- // Reset 23pxthe native input line-height
305
- margin: 0,
306
- // Reset for Safari
307
- WebkitTapHighlightColor: "transparent",
308
- display: "block",
309
- // Make the flex item shrink with Firefox
310
- minWidth: 0,
311
- width: "100%",
312
- // Fix IE11 width issue
313
- animationName: "mui-auto-fill-cancel",
314
- animationDuration: "10ms",
315
- "&::-webkit-input-placeholder": t,
316
- "&::-moz-placeholder": t,
317
- // Firefox 19+
318
- "&:-ms-input-placeholder": t,
319
- // IE11
320
- "&::-ms-input-placeholder": t,
321
- // Edge
322
- "&:focus": {
323
- outline: 0
324
- },
325
- // Reset Firefox invalid required input style
326
- "&:invalid": {
327
- boxShadow: "none"
328
- },
329
- "&::-webkit-search-decoration": {
330
- // Remove the padding when type=search.
331
- WebkitAppearance: "none"
332
- },
333
- // Show and hide the placeholder logic
334
- [`label[data-shrink=false] + .${me.formControl} &`]: {
335
- "&::-webkit-input-placeholder": s,
336
- "&::-moz-placeholder": s,
337
- // Firefox 19+
338
- "&:-ms-input-placeholder": s,
339
- // IE11
340
- "&::-ms-input-placeholder": s,
341
- // Edge
342
- "&:focus::-webkit-input-placeholder": l,
343
- "&:focus::-moz-placeholder": l,
344
- // Firefox 19+
345
- "&:focus:-ms-input-placeholder": l,
346
- // IE11
347
- "&:focus::-ms-input-placeholder": l
348
- // Edge
349
- },
350
- [`&.${me.disabled}`]: {
351
- opacity: 1,
352
- // Reset iOS opacity
353
- WebkitTextFillColor: (o.vars || o).palette.text.disabled
354
- // Fix opacity Safari bug
355
- },
356
- "&:-webkit-autofill": {
357
- animationDuration: "5000s",
358
- animationName: "mui-auto-fill"
359
- }
360
- }, n.size === "small" && {
361
- paddingTop: 1
362
- }, n.multiline && {
363
- height: "auto",
364
- resize: "none",
365
- padding: 0,
366
- paddingTop: 0
367
- }, n.type === "search" && {
368
- // Improve type search style.
369
- MozAppearance: "textfield"
370
- });
371
- }), fo = /* @__PURE__ */ E(Le, {
372
- styles: {
373
- "@keyframes mui-auto-fill": {
374
- from: {
375
- display: "block"
376
- }
377
- },
378
- "@keyframes mui-auto-fill-cancel": {
379
- from: {
380
- display: "block"
381
- }
382
- }
383
- }
384
- }), mo = /* @__PURE__ */ a.forwardRef(function(n, r) {
385
- var t;
386
- const s = Z({
387
- props: n,
388
- name: "MuiInputBase"
389
- }), {
390
- "aria-describedby": l,
391
- autoComplete: m,
392
- autoFocus: y,
393
- className: c,
394
- components: d = {},
395
- componentsProps: u = {},
396
- defaultValue: g,
397
- disabled: p,
398
- disableInjectingGlobalStyles: R,
399
- endAdornment: O,
400
- fullWidth: w = !1,
401
- id: $,
402
- inputComponent: v = "input",
403
- inputProps: b = {},
404
- inputRef: C,
405
- maxRows: x,
406
- minRows: M,
407
- multiline: z = !1,
408
- name: N,
409
- onBlur: F,
410
- onChange: A,
411
- onClick: T,
412
- onFocus: W,
413
- onKeyDown: V,
414
- onKeyUp: I,
415
- placeholder: k,
416
- readOnly: D,
417
- renderSuffix: ye,
418
- rows: X,
419
- slotProps: ge = {},
420
- slots: ve = {},
421
- startAdornment: U,
422
- type: xe = "text",
423
- value: Pe
424
- } = s, We = H(s, io), ee = b.value != null ? b.value : Pe, {
425
- current: te
426
- } = a.useRef(ee != null), _ = a.useRef(), $e = a.useCallback((f) => {
427
- process.env.NODE_ENV !== "production" && f && f.nodeName !== "INPUT" && !f.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(`
428
- `));
429
- }, []), Be = ze(_, C, b.ref, $e), [se, ie] = a.useState(!1), h = re();
430
- process.env.NODE_ENV !== "production" && a.useEffect(() => {
431
- if (h)
432
- return h.registerEffect();
433
- }, [h]);
434
- const S = he({
435
- props: s,
436
- muiFormControl: h,
437
- states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
438
- });
439
- S.focused = h ? h.focused : se, a.useEffect(() => {
440
- !h && p && se && (ie(!1), F && F());
441
- }, [h, p, se, F]);
442
- const ae = h && h.onFilled, le = h && h.onEmpty, G = a.useCallback((f) => {
443
- fe(f) ? ae && ae() : le && le();
444
- }, [ae, le]);
445
- pe(() => {
446
- te && G({
447
- value: ee
448
- });
449
- }, [ee, G, te]);
450
- const De = (f) => {
451
- if (S.disabled) {
452
- f.stopPropagation();
453
- return;
454
- }
455
- W && W(f), b.onFocus && b.onFocus(f), h && h.onFocus ? h.onFocus(f) : ie(!0);
456
- }, _e = (f) => {
457
- F && F(f), b.onBlur && b.onBlur(f), h && h.onBlur ? h.onBlur(f) : ie(!1);
458
- }, je = (f, ...Te) => {
459
- if (!te) {
460
- const Ee = f.target || _.current;
461
- if (Ee == null)
462
- 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." : Ue(1));
463
- G({
464
- value: Ee.value
465
- });
466
- }
467
- b.onChange && b.onChange(f, ...Te), A && A(f, ...Te);
468
- };
469
- a.useEffect(() => {
470
- G(_.current);
471
- }, []);
472
- const qe = (f) => {
473
- _.current && f.currentTarget === f.target && _.current.focus(), T && T(f);
474
- };
475
- let de = v, P = b;
476
- z && de === "input" && (X ? (process.env.NODE_ENV !== "production" && (M || x) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), P = i({
477
- type: void 0,
478
- minRows: X,
479
- maxRows: X
480
- }, P)) : P = i({
481
- type: void 0,
482
- maxRows: x,
483
- minRows: M
484
- }, P), de = ke);
485
- const He = (f) => {
486
- G(f.animationName === "mui-auto-fill-cancel" ? _.current : {
487
- value: "x"
488
- });
489
- };
490
- a.useEffect(() => {
491
- h && h.setAdornedStart(!!U);
492
- }, [h, U]);
493
- const oe = i({}, s, {
494
- color: S.color || "primary",
495
- disabled: S.disabled,
496
- endAdornment: O,
497
- error: S.error,
498
- focused: S.focused,
499
- formControl: h,
500
- fullWidth: w,
501
- hiddenLabel: S.hiddenLabel,
502
- multiline: z,
503
- size: S.size,
504
- startAdornment: U,
505
- type: xe
506
- }), Ce = co(oe), Oe = ve.root || d.Root || uo, ce = ge.root || u.root || {}, we = ve.input || d.Input || po;
507
- return P = i({}, P, (t = ge.input) != null ? t : u.input), /* @__PURE__ */ q(a.Fragment, {
508
- children: [!R && fo, /* @__PURE__ */ q(Oe, i({}, ce, !Se(Oe) && {
509
- ownerState: i({}, oe, ce.ownerState)
510
- }, {
511
- ref: r,
512
- onClick: qe
513
- }, We, {
514
- className: j(Ce.root, ce.className, c, D && "MuiInputBase-readOnly"),
515
- children: [U, /* @__PURE__ */ E(be.Provider, {
516
- value: null,
517
- children: /* @__PURE__ */ E(we, i({
518
- ownerState: oe,
519
- "aria-invalid": S.error,
520
- "aria-describedby": l,
521
- autoComplete: m,
522
- autoFocus: y,
523
- defaultValue: g,
524
- disabled: S.disabled,
525
- id: $,
526
- onAnimationStart: He,
527
- name: N,
528
- placeholder: k,
529
- readOnly: D,
530
- required: S.required,
531
- rows: X,
532
- value: ee,
533
- onKeyDown: V,
534
- onKeyUp: I,
535
- type: xe
536
- }, P, !Se(we) && {
537
- as: de,
538
- ownerState: i({}, oe, P.ownerState)
539
- }, {
540
- ref: Be,
541
- className: j(Ce.input, P.className, D && "MuiInputBase-readOnly"),
542
- onBlur: _e,
543
- onChange: je,
544
- onFocus: De
545
- }))
546
- }), O, ye ? ye(i({}, S, {
547
- startAdornment: U
548
- })) : null]
549
- }))]
550
- });
551
- });
552
- process.env.NODE_ENV !== "production" && (mo.propTypes = {
553
- // ┌────────────────────────────── Warning ──────────────────────────────┐
554
- // │ These PropTypes are generated from the TypeScript type definitions. │
555
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
556
- // └─────────────────────────────────────────────────────────────────────┘
557
- /**
558
- * @ignore
559
- */
560
- "aria-describedby": e.string,
561
- /**
562
- * This prop helps users to fill forms faster, especially on mobile devices.
563
- * The name can be confusing, as it's more like an autofill.
564
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
565
- */
566
- autoComplete: e.string,
567
- /**
568
- * If `true`, the `input` element is focused during the first mount.
569
- */
570
- autoFocus: e.bool,
571
- /**
572
- * Override or extend the styles applied to the component.
573
- */
574
- classes: e.object,
575
- /**
576
- * @ignore
577
- */
578
- className: e.string,
579
- /**
580
- * The color of the component.
581
- * It supports both default and custom theme colors, which can be added as shown in the
582
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
583
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
584
- */
585
- color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
586
- /**
587
- * The components used for each slot inside.
588
- *
589
- * This prop is an alias for the `slots` prop.
590
- * It's recommended to use the `slots` prop instead.
591
- *
592
- * @default {}
593
- */
594
- components: e.shape({
595
- Input: e.elementType,
596
- Root: e.elementType
597
- }),
598
- /**
599
- * The extra props for the slot components.
600
- * You can override the existing props or add new ones.
601
- *
602
- * This prop is an alias for the `slotProps` prop.
603
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
604
- *
605
- * @default {}
606
- */
607
- componentsProps: e.shape({
608
- input: e.object,
609
- root: e.object
610
- }),
611
- /**
612
- * The default value. Use when the component is not controlled.
613
- */
614
- defaultValue: e.any,
615
- /**
616
- * If `true`, the component is disabled.
617
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
618
- */
619
- disabled: e.bool,
620
- /**
621
- * 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.
622
- * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.
623
- * @default false
624
- */
625
- disableInjectingGlobalStyles: e.bool,
626
- /**
627
- * End `InputAdornment` for this component.
628
- */
629
- endAdornment: e.node,
630
- /**
631
- * If `true`, the `input` will indicate an error.
632
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
633
- */
634
- error: e.bool,
635
- /**
636
- * If `true`, the `input` will take up the full width of its container.
637
- * @default false
638
- */
639
- fullWidth: e.bool,
640
- /**
641
- * The id of the `input` element.
642
- */
643
- id: e.string,
644
- /**
645
- * The component used for the `input` element.
646
- * Either a string to use a HTML element or a component.
647
- * @default 'input'
648
- */
649
- inputComponent: Ze,
650
- /**
651
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
652
- * @default {}
653
- */
654
- inputProps: e.object,
655
- /**
656
- * Pass a ref to the `input` element.
657
- */
658
- inputRef: Je,
659
- /**
660
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
661
- * FormControl.
662
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
663
- */
664
- margin: e.oneOf(["dense", "none"]),
665
- /**
666
- * Maximum number of rows to display when multiline option is set to true.
667
- */
668
- maxRows: e.oneOfType([e.number, e.string]),
669
- /**
670
- * Minimum number of rows to display when multiline option is set to true.
671
- */
672
- minRows: e.oneOfType([e.number, e.string]),
673
- /**
674
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
675
- * @default false
676
- */
677
- multiline: e.bool,
678
- /**
679
- * Name attribute of the `input` element.
680
- */
681
- name: e.string,
682
- /**
683
- * Callback fired when the `input` is blurred.
684
- *
685
- * Notice that the first argument (event) might be undefined.
686
- */
687
- onBlur: e.func,
688
- /**
689
- * Callback fired when the value is changed.
690
- *
691
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
692
- * You can pull out the new value by accessing `event.target.value` (string).
693
- */
694
- onChange: e.func,
695
- /**
696
- * @ignore
697
- */
698
- onClick: e.func,
699
- /**
700
- * @ignore
701
- */
702
- onFocus: e.func,
703
- /**
704
- * Callback fired when the `input` doesn't satisfy its constraints.
705
- */
706
- onInvalid: e.func,
707
- /**
708
- * @ignore
709
- */
710
- onKeyDown: e.func,
711
- /**
712
- * @ignore
713
- */
714
- onKeyUp: e.func,
715
- /**
716
- * The short hint displayed in the `input` before the user enters a value.
717
- */
718
- placeholder: e.string,
719
- /**
720
- * It prevents the user from changing the value of the field
721
- * (not from interacting with the field).
722
- */
723
- readOnly: e.bool,
724
- /**
725
- * @ignore
726
- */
727
- renderSuffix: e.func,
728
- /**
729
- * If `true`, the `input` element is required.
730
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
731
- */
732
- required: e.bool,
733
- /**
734
- * Number of rows to display when multiline option is set to true.
735
- */
736
- rows: e.oneOfType([e.number, e.string]),
737
- /**
738
- * The size of the component.
739
- */
740
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
741
- /**
742
- * The extra props for the slot components.
743
- * You can override the existing props or add new ones.
744
- *
745
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
746
- *
747
- * @default {}
748
- */
749
- slotProps: e.shape({
750
- input: e.object,
751
- root: e.object
752
- }),
753
- /**
754
- * The components used for each slot inside.
755
- *
756
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
757
- *
758
- * @default {}
759
- */
760
- slots: e.shape({
761
- input: e.elementType,
762
- root: e.elementType
763
- }),
764
- /**
765
- * Start `InputAdornment` for this component.
766
- */
767
- startAdornment: e.node,
768
- /**
769
- * The system prop that allows defining system overrides as well as additional CSS styles.
770
- */
771
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
772
- /**
773
- * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
774
- * @default 'text'
775
- */
776
- type: e.string,
777
- /**
778
- * The value of the `input` element, required for a controlled component.
779
- */
780
- value: e.any
781
- });
782
- function bo(o) {
783
- return Q("MuiFormLabel", o);
784
- }
785
- const K = Y("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), ho = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"], yo = (o) => {
786
- const {
787
- classes: n,
788
- color: r,
789
- focused: t,
790
- disabled: s,
791
- error: l,
792
- filled: m,
793
- required: y
794
- } = o, c = {
795
- root: ["root", `color${L(r)}`, s && "disabled", l && "error", m && "filled", t && "focused", y && "required"],
796
- asterisk: ["asterisk", l && "error"]
797
- };
798
- return J(c, bo, n);
799
- }, go = B("label", {
800
- name: "MuiFormLabel",
801
- slot: "Root",
802
- overridesResolver: ({
803
- ownerState: o
804
- }, n) => i({}, n.root, o.color === "secondary" && n.colorSecondary, o.filled && n.filled)
805
- })(({
806
- theme: o,
807
- ownerState: n
808
- }) => i({
809
- color: (o.vars || o).palette.text.secondary
810
- }, o.typography.body1, {
811
- lineHeight: "1.4375em",
812
- padding: 0,
813
- position: "relative",
814
- [`&.${K.focused}`]: {
815
- color: (o.vars || o).palette[n.color].main
816
- },
817
- [`&.${K.disabled}`]: {
818
- color: (o.vars || o).palette.text.disabled
819
- },
820
- [`&.${K.error}`]: {
821
- color: (o.vars || o).palette.error.main
822
- }
823
- })), vo = B("span", {
824
- name: "MuiFormLabel",
825
- slot: "Asterisk",
826
- overridesResolver: (o, n) => n.asterisk
827
- })(({
828
- theme: o
829
- }) => ({
830
- [`&.${K.error}`]: {
831
- color: (o.vars || o).palette.error.main
832
- }
833
- })), Me = /* @__PURE__ */ a.forwardRef(function(n, r) {
834
- const t = Z({
835
- props: n,
836
- name: "MuiFormLabel"
837
- }), {
838
- children: s,
839
- className: l,
840
- component: m = "label"
841
- } = t, y = H(t, ho), c = re(), d = he({
842
- props: t,
843
- muiFormControl: c,
844
- states: ["color", "required", "focused", "disabled", "error", "filled"]
845
- }), u = i({}, t, {
846
- color: d.color || "primary",
847
- component: m,
848
- disabled: d.disabled,
849
- error: d.error,
850
- filled: d.filled,
851
- focused: d.focused,
852
- required: d.required
853
- }), g = yo(u);
854
- return /* @__PURE__ */ q(go, i({
855
- as: m,
856
- ownerState: u,
857
- className: j(g.root, l),
858
- ref: r
859
- }, y, {
860
- children: [s, d.required && /* @__PURE__ */ q(vo, {
861
- ownerState: u,
862
- "aria-hidden": !0,
863
- className: g.asterisk,
864
- children: [" ", "*"]
865
- })]
866
- }));
867
- });
868
- process.env.NODE_ENV !== "production" && (Me.propTypes = {
869
- // ┌────────────────────────────── Warning ──────────────────────────────┐
870
- // │ These PropTypes are generated from the TypeScript type definitions. │
871
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
872
- // └─────────────────────────────────────────────────────────────────────┘
873
- /**
874
- * The content of the component.
875
- */
876
- children: e.node,
877
- /**
878
- * Override or extend the styles applied to the component.
879
- */
880
- classes: e.object,
881
- /**
882
- * @ignore
883
- */
884
- className: e.string,
885
- /**
886
- * The color of the component.
887
- * It supports both default and custom theme colors, which can be added as shown in the
888
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
889
- */
890
- color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
891
- /**
892
- * The component used for the root node.
893
- * Either a string to use a HTML element or a component.
894
- */
895
- component: e.elementType,
896
- /**
897
- * If `true`, the label should be displayed in a disabled state.
898
- */
899
- disabled: e.bool,
900
- /**
901
- * If `true`, the label is displayed in an error state.
902
- */
903
- error: e.bool,
904
- /**
905
- * If `true`, the label should use filled classes key.
906
- */
907
- filled: e.bool,
908
- /**
909
- * If `true`, the input of this label is focused (used by `FormGroup` components).
910
- */
911
- focused: e.bool,
912
- /**
913
- * If `true`, the label will indicate that the `input` is required.
914
- */
915
- required: e.bool,
916
- /**
917
- * The system prop that allows defining system overrides as well as additional CSS styles.
918
- */
919
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
920
- });
921
- function xo(o) {
922
- return Q("MuiInputLabel", o);
923
- }
924
- Y("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
925
- const Co = ["disableAnimation", "margin", "shrink", "variant", "className"], Oo = (o) => {
926
- const {
927
- classes: n,
928
- formControl: r,
929
- size: t,
930
- shrink: s,
931
- disableAnimation: l,
932
- variant: m,
933
- required: y
934
- } = o, c = {
935
- root: ["root", r && "formControl", !l && "animated", s && "shrink", t && t !== "normal" && `size${L(t)}`, m],
936
- asterisk: [y && "asterisk"]
937
- }, d = J(c, xo, n);
938
- return i({}, n, d);
939
- }, wo = B(Me, {
940
- shouldForwardProp: (o) => Ye(o) || o === "classes",
941
- name: "MuiInputLabel",
942
- slot: "Root",
943
- overridesResolver: (o, n) => {
944
- const {
945
- ownerState: r
946
- } = o;
947
- return [{
948
- [`& .${K.asterisk}`]: n.asterisk
949
- }, n.root, r.formControl && n.formControl, r.size === "small" && n.sizeSmall, r.shrink && n.shrink, !r.disableAnimation && n.animated, r.focused && n.focused, n[r.variant]];
950
- }
951
- })(({
952
- theme: o,
953
- ownerState: n
954
- }) => i({
955
- display: "block",
956
- transformOrigin: "top left",
957
- whiteSpace: "nowrap",
958
- overflow: "hidden",
959
- textOverflow: "ellipsis",
960
- maxWidth: "100%"
961
- }, n.formControl && {
962
- position: "absolute",
963
- left: 0,
964
- top: 0,
965
- // slight alteration to spec spacing to match visual spec result
966
- transform: "translate(0, 20px) scale(1)"
967
- }, n.size === "small" && {
968
- // Compensation for the `Input.inputSizeSmall` style.
969
- transform: "translate(0, 17px) scale(1)"
970
- }, n.shrink && {
971
- transform: "translate(0, -1.5px) scale(0.75)",
972
- transformOrigin: "top left",
973
- maxWidth: "133%"
974
- }, !n.disableAnimation && {
975
- transition: o.transitions.create(["color", "transform", "max-width"], {
976
- duration: o.transitions.duration.shorter,
977
- easing: o.transitions.easing.easeOut
978
- })
979
- }, n.variant === "filled" && i({
980
- // Chrome's autofill feature gives the input field a yellow background.
981
- // Since the input field is behind the label in the HTML tree,
982
- // the input field is drawn last and hides the label with an opaque background color.
983
- // zIndex: 1 will raise the label above opaque background-colors of input.
984
- zIndex: 1,
985
- pointerEvents: "none",
986
- transform: "translate(12px, 16px) scale(1)",
987
- maxWidth: "calc(100% - 24px)"
988
- }, n.size === "small" && {
989
- transform: "translate(12px, 13px) scale(1)"
990
- }, n.shrink && i({
991
- userSelect: "none",
992
- pointerEvents: "auto",
993
- transform: "translate(12px, 7px) scale(0.75)",
994
- maxWidth: "calc(133% - 24px)"
995
- }, n.size === "small" && {
996
- transform: "translate(12px, 4px) scale(0.75)"
997
- })), n.variant === "outlined" && i({
998
- // see comment above on filled.zIndex
999
- zIndex: 1,
1000
- pointerEvents: "none",
1001
- transform: "translate(14px, 16px) scale(1)",
1002
- maxWidth: "calc(100% - 24px)"
1003
- }, n.size === "small" && {
1004
- transform: "translate(14px, 9px) scale(1)"
1005
- }, n.shrink && {
1006
- userSelect: "none",
1007
- pointerEvents: "auto",
1008
- // Theoretically, we should have (8+5)*2/0.75 = 34px
1009
- // but it feels a better when it bleeds a bit on the left, so 32px.
1010
- maxWidth: "calc(133% - 32px)",
1011
- transform: "translate(14px, -9px) scale(0.75)"
1012
- }))), To = /* @__PURE__ */ a.forwardRef(function(n, r) {
1013
- const t = Z({
1014
- name: "MuiInputLabel",
1015
- props: n
1016
- }), {
1017
- disableAnimation: s = !1,
1018
- shrink: l,
1019
- className: m
1020
- } = t, y = H(t, Co), c = re();
1021
- let d = l;
1022
- typeof d > "u" && c && (d = c.filled || c.focused || c.adornedStart);
1023
- const u = he({
1024
- props: t,
1025
- muiFormControl: c,
1026
- states: ["size", "variant", "required", "focused"]
1027
- }), g = i({}, t, {
1028
- disableAnimation: s,
1029
- formControl: c,
1030
- shrink: d,
1031
- size: u.size,
1032
- variant: u.variant,
1033
- required: u.required,
1034
- focused: u.focused
1035
- }), p = Oo(g);
1036
- return /* @__PURE__ */ E(wo, i({
1037
- "data-shrink": d,
1038
- ownerState: g,
1039
- ref: r,
1040
- className: j(p.root, m)
1041
- }, y, {
1042
- classes: p
1043
- }));
1044
- });
1045
- process.env.NODE_ENV !== "production" && (To.propTypes = {
1046
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1047
- // │ These PropTypes are generated from the TypeScript type definitions. │
1048
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1049
- // └─────────────────────────────────────────────────────────────────────┘
1050
- /**
1051
- * The content of the component.
1052
- */
1053
- children: e.node,
1054
- /**
1055
- * Override or extend the styles applied to the component.
1056
- */
1057
- classes: e.object,
1058
- /**
1059
- * @ignore
1060
- */
1061
- className: e.string,
1062
- /**
1063
- * The color of the component.
1064
- * It supports both default and custom theme colors, which can be added as shown in the
1065
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1066
- */
1067
- color: e.oneOfType([e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), e.string]),
1068
- /**
1069
- * If `true`, the transition animation is disabled.
1070
- * @default false
1071
- */
1072
- disableAnimation: e.bool,
1073
- /**
1074
- * If `true`, the component is disabled.
1075
- */
1076
- disabled: e.bool,
1077
- /**
1078
- * If `true`, the label is displayed in an error state.
1079
- */
1080
- error: e.bool,
1081
- /**
1082
- * If `true`, the `input` of this label is focused.
1083
- */
1084
- focused: e.bool,
1085
- /**
1086
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
1087
- * FormControl.
1088
- */
1089
- margin: e.oneOf(["dense"]),
1090
- /**
1091
- * if `true`, the label will indicate that the `input` is required.
1092
- */
1093
- required: e.bool,
1094
- /**
1095
- * If `true`, the label is shrunk.
1096
- */
1097
- shrink: e.bool,
1098
- /**
1099
- * The size of the component.
1100
- * @default 'normal'
1101
- */
1102
- size: e.oneOfType([e.oneOf(["normal", "small"]), e.string]),
1103
- /**
1104
- * The system prop that allows defining system overrides as well as additional CSS styles.
1105
- */
1106
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1107
- /**
1108
- * The variant to use.
1109
- */
1110
- variant: e.oneOf(["filled", "outlined", "standard"])
1111
- });
1112
- function Eo(o) {
1113
- return Q("MuiInputAdornment", o);
1114
- }
1115
- const Fe = Y("MuiInputAdornment", ["root", "filled", "standard", "outlined", "positionStart", "positionEnd", "disablePointerEvents", "hiddenLabel", "sizeSmall"]);
1116
- var Ie;
1117
- const Ro = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"], So = (o, n) => {
1118
- const {
1119
- ownerState: r
1120
- } = o;
1121
- return [n.root, n[`position${L(r.position)}`], r.disablePointerEvents === !0 && n.disablePointerEvents, n[r.variant]];
1122
- }, No = (o) => {
1123
- const {
1124
- classes: n,
1125
- disablePointerEvents: r,
1126
- hiddenLabel: t,
1127
- position: s,
1128
- size: l,
1129
- variant: m
1130
- } = o, y = {
1131
- root: ["root", r && "disablePointerEvents", s && `position${L(s)}`, m, t && "hiddenLabel", l && `size${L(l)}`]
1132
- };
1133
- return J(y, Eo, n);
1134
- }, Fo = B("div", {
1135
- name: "MuiInputAdornment",
1136
- slot: "Root",
1137
- overridesResolver: So
1138
- })(({
1139
- theme: o,
1140
- ownerState: n
1141
- }) => i({
1142
- display: "flex",
1143
- height: "0.01em",
1144
- // Fix IE11 flexbox alignment. To remove at some point.
1145
- maxHeight: "2em",
1146
- alignItems: "center",
1147
- whiteSpace: "nowrap",
1148
- color: (o.vars || o).palette.action.active
1149
- }, n.variant === "filled" && {
1150
- // Styles applied to the root element if `variant="filled"`.
1151
- [`&.${Fe.positionStart}&:not(.${Fe.hiddenLabel})`]: {
1152
- marginTop: 16
1153
- }
1154
- }, n.position === "start" && {
1155
- // Styles applied to the root element if `position="start"`.
1156
- marginRight: 8
1157
- }, n.position === "end" && {
1158
- // Styles applied to the root element if `position="end"`.
1159
- marginLeft: 8
1160
- }, n.disablePointerEvents === !0 && {
1161
- // Styles applied to the root element if `disablePointerEvents={true}`.
1162
- pointerEvents: "none"
1163
- })), Io = /* @__PURE__ */ a.forwardRef(function(n, r) {
1164
- const t = Z({
1165
- props: n,
1166
- name: "MuiInputAdornment"
1167
- }), {
1168
- children: s,
1169
- className: l,
1170
- component: m = "div",
1171
- disablePointerEvents: y = !1,
1172
- disableTypography: c = !1,
1173
- position: d,
1174
- variant: u
1175
- } = t, g = H(t, Ro), p = re() || {};
1176
- let R = u;
1177
- u && p.variant && process.env.NODE_ENV !== "production" && u === p.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), p && !R && (R = p.variant);
1178
- const O = i({}, t, {
1179
- hiddenLabel: p.hiddenLabel,
1180
- size: p.size,
1181
- disablePointerEvents: y,
1182
- position: d,
1183
- variant: R
1184
- }), w = No(O);
1185
- return /* @__PURE__ */ E(be.Provider, {
1186
- value: null,
1187
- children: /* @__PURE__ */ E(Fo, i({
1188
- as: m,
1189
- ownerState: O,
1190
- className: j(w.root, l),
1191
- ref: r
1192
- }, g, {
1193
- children: typeof s == "string" && !c ? /* @__PURE__ */ E(eo, {
1194
- color: "text.secondary",
1195
- children: s
1196
- }) : /* @__PURE__ */ q(a.Fragment, {
1197
- children: [d === "start" ? (
1198
- /* notranslate needed while Google Translate will not fix zero-width space issue */
1199
- Ie || (Ie = /* @__PURE__ */ E("span", {
1200
- className: "notranslate",
1201
- children: "​"
1202
- }))
1203
- ) : null, s]
1204
- })
1205
- }))
1206
- });
1207
- });
1208
- process.env.NODE_ENV !== "production" && (Io.propTypes = {
1209
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1210
- // │ These PropTypes are generated from the TypeScript type definitions. │
1211
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1212
- // └─────────────────────────────────────────────────────────────────────┘
1213
- /**
1214
- * The content of the component, normally an `IconButton` or string.
1215
- */
1216
- children: e.node,
1217
- /**
1218
- * Override or extend the styles applied to the component.
1219
- */
1220
- classes: e.object,
1221
- /**
1222
- * @ignore
1223
- */
1224
- className: e.string,
1225
- /**
1226
- * The component used for the root node.
1227
- * Either a string to use a HTML element or a component.
1228
- */
1229
- component: e.elementType,
1230
- /**
1231
- * Disable pointer events on the root.
1232
- * This allows for the content of the adornment to focus the `input` on click.
1233
- * @default false
1234
- */
1235
- disablePointerEvents: e.bool,
1236
- /**
1237
- * If children is a string then disable wrapping in a Typography component.
1238
- * @default false
1239
- */
1240
- disableTypography: e.bool,
1241
- /**
1242
- * The position this adornment should appear relative to the `Input`.
1243
- */
1244
- position: e.oneOf(["end", "start"]).isRequired,
1245
- /**
1246
- * The system prop that allows defining system overrides as well as additional CSS styles.
1247
- */
1248
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1249
- /**
1250
- * The variant to use.
1251
- * Note: If you are using the `TextField` component or the `FormControl` component
1252
- * you do not have to set this manually.
1253
- */
1254
- variant: e.oneOf(["filled", "outlined", "standard"])
1255
- });
1256
- function zo(o) {
1257
- return Q("MuiFormControl", o);
1258
- }
1259
- Y("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
1260
- const Ao = ["children", "className", "color", "component", "disabled", "error", "focused", "fullWidth", "hiddenLabel", "margin", "required", "size", "variant"], ko = (o) => {
1261
- const {
1262
- classes: n,
1263
- margin: r,
1264
- fullWidth: t
1265
- } = o, s = {
1266
- root: ["root", r !== "none" && `margin${L(r)}`, t && "fullWidth"]
1267
- };
1268
- return J(s, zo, n);
1269
- }, Lo = B("div", {
1270
- name: "MuiFormControl",
1271
- slot: "Root",
1272
- overridesResolver: ({
1273
- ownerState: o
1274
- }, n) => i({}, n.root, n[`margin${L(o.margin)}`], o.fullWidth && n.fullWidth)
1275
- })(({
1276
- ownerState: o
1277
- }) => i({
1278
- display: "inline-flex",
1279
- flexDirection: "column",
1280
- position: "relative",
1281
- // Reset fieldset default style.
1282
- minWidth: 0,
1283
- padding: 0,
1284
- margin: 0,
1285
- border: 0,
1286
- verticalAlign: "top"
1287
- }, o.margin === "normal" && {
1288
- marginTop: 16,
1289
- marginBottom: 8
1290
- }, o.margin === "dense" && {
1291
- marginTop: 8,
1292
- marginBottom: 4
1293
- }, o.fullWidth && {
1294
- width: "100%"
1295
- })), Mo = /* @__PURE__ */ a.forwardRef(function(n, r) {
1296
- const t = Z({
1297
- props: n,
1298
- name: "MuiFormControl"
1299
- }), {
1300
- children: s,
1301
- className: l,
1302
- color: m = "primary",
1303
- component: y = "div",
1304
- disabled: c = !1,
1305
- error: d = !1,
1306
- focused: u,
1307
- fullWidth: g = !1,
1308
- hiddenLabel: p = !1,
1309
- margin: R = "none",
1310
- required: O = !1,
1311
- size: w = "medium",
1312
- variant: $ = "outlined"
1313
- } = t, v = H(t, Ao), b = i({}, t, {
1314
- color: m,
1315
- component: y,
1316
- disabled: c,
1317
- error: d,
1318
- fullWidth: g,
1319
- hiddenLabel: p,
1320
- margin: R,
1321
- required: O,
1322
- size: w,
1323
- variant: $
1324
- }), C = ko(b), [x, M] = a.useState(() => {
1325
- let I = !1;
1326
- return s && a.Children.forEach(s, (k) => {
1327
- if (!ue(k, ["Input", "Select"]))
1328
- return;
1329
- const D = ue(k, ["Select"]) ? k.props.input : k;
1330
- D && to(D.props) && (I = !0);
1331
- }), I;
1332
- }), [z, N] = a.useState(() => {
1333
- let I = !1;
1334
- return s && a.Children.forEach(s, (k) => {
1335
- ue(k, ["Input", "Select"]) && (fe(k.props, !0) || fe(k.props.inputProps, !0)) && (I = !0);
1336
- }), I;
1337
- }), [F, A] = a.useState(!1);
1338
- c && F && A(!1);
1339
- const T = u !== void 0 && !c ? u : F;
1340
- let W;
1341
- if (process.env.NODE_ENV !== "production") {
1342
- const I = a.useRef(!1);
1343
- W = () => (I.current && console.error(["MUI: There are multiple `InputBase` components inside a FormControl.", "This creates visual inconsistencies, only use one `InputBase`."].join(`
1344
- `)), I.current = !0, () => {
1345
- I.current = !1;
1346
- });
1347
- }
1348
- const V = a.useMemo(() => ({
1349
- adornedStart: x,
1350
- setAdornedStart: M,
1351
- color: m,
1352
- disabled: c,
1353
- error: d,
1354
- filled: z,
1355
- focused: T,
1356
- fullWidth: g,
1357
- hiddenLabel: p,
1358
- size: w,
1359
- onBlur: () => {
1360
- A(!1);
1361
- },
1362
- onEmpty: () => {
1363
- N(!1);
1364
- },
1365
- onFilled: () => {
1366
- N(!0);
1367
- },
1368
- onFocus: () => {
1369
- A(!0);
1370
- },
1371
- registerEffect: W,
1372
- required: O,
1373
- variant: $
1374
- }), [x, m, c, d, z, T, g, p, W, O, w, $]);
1375
- return /* @__PURE__ */ E(be.Provider, {
1376
- value: V,
1377
- children: /* @__PURE__ */ E(Lo, i({
1378
- as: y,
1379
- ownerState: b,
1380
- className: j(C.root, l),
1381
- ref: r
1382
- }, v, {
1383
- children: s
1384
- }))
1385
- });
1386
- });
1387
- process.env.NODE_ENV !== "production" && (Mo.propTypes = {
1388
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1389
- // │ These PropTypes are generated from the TypeScript type definitions. │
1390
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1391
- // └─────────────────────────────────────────────────────────────────────┘
1392
- /**
1393
- * The content of the component.
1394
- */
1395
- children: e.node,
1396
- /**
1397
- * Override or extend the styles applied to the component.
1398
- */
1399
- classes: e.object,
1400
- /**
1401
- * @ignore
1402
- */
1403
- className: e.string,
1404
- /**
1405
- * The color of the component.
1406
- * It supports both default and custom theme colors, which can be added as shown in the
1407
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1408
- * @default 'primary'
1409
- */
1410
- color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
1411
- /**
1412
- * The component used for the root node.
1413
- * Either a string to use a HTML element or a component.
1414
- */
1415
- component: e.elementType,
1416
- /**
1417
- * If `true`, the label, input and helper text should be displayed in a disabled state.
1418
- * @default false
1419
- */
1420
- disabled: e.bool,
1421
- /**
1422
- * If `true`, the label is displayed in an error state.
1423
- * @default false
1424
- */
1425
- error: e.bool,
1426
- /**
1427
- * If `true`, the component is displayed in focused state.
1428
- */
1429
- focused: e.bool,
1430
- /**
1431
- * If `true`, the component will take up the full width of its container.
1432
- * @default false
1433
- */
1434
- fullWidth: e.bool,
1435
- /**
1436
- * If `true`, the label is hidden.
1437
- * This is used to increase density for a `FilledInput`.
1438
- * Be sure to add `aria-label` to the `input` element.
1439
- * @default false
1440
- */
1441
- hiddenLabel: e.bool,
1442
- /**
1443
- * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
1444
- * @default 'none'
1445
- */
1446
- margin: e.oneOf(["dense", "none", "normal"]),
1447
- /**
1448
- * If `true`, the label will indicate that the `input` is required.
1449
- * @default false
1450
- */
1451
- required: e.bool,
1452
- /**
1453
- * The size of the component.
1454
- * @default 'medium'
1455
- */
1456
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
1457
- /**
1458
- * The system prop that allows defining system overrides as well as additional CSS styles.
1459
- */
1460
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1461
- /**
1462
- * The variant to use.
1463
- * @default 'outlined'
1464
- */
1465
- variant: e.oneOf(["filled", "outlined", "standard"])
1466
- });
1467
- export {
1468
- Mo as F,
1469
- Io as I,
1470
- To as a,
1471
- uo as b,
1472
- po as c,
1473
- lo as d,
1474
- mo as e,
1475
- he as f,
1476
- fe as g,
1477
- me as i,
1478
- ao as r
1479
- };