@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,827 +0,0 @@
1
- import { _ as d, a as E } from "./extends-Cyw62AD_.js";
2
- import * as P from "react";
3
- import { P as e, j as ye, q as Y, t as W, v as ge, d as he, w as ve, x as Z, a as _ } from "./createTheme-CCwx9ptk.js";
4
- import { c as S, a as D, g as A, u as z } from "./chainPropTypes-CwfDfLEA.js";
5
- import { e as Te, g as H, s as $ } from "./styled-fcu13kUF.js";
6
- import { jsx as h, jsxs as V } from "react/jsx-runtime";
7
- import { f as te, F as xe, a as Oe } from "./FormControl-BhwmBUAq.js";
8
- import { u as Fe } from "./useId-BHG98T5I.js";
9
- import { S as Pe, F as Ce } from "./Select-C8Iimh3g.js";
10
- import { u as ne } from "./useFormControl-CatNKXAi.js";
11
- import { r as se } from "./ButtonBase-C875Ww3z.js";
12
- import { I as Re } from "./Input-DgIhcA8j.js";
13
- import { O as je } from "./OutlinedInput-CS2BwiVg.js";
14
- import { T as ee } from "./Typography-CqyjdT7p.js";
15
- import { s as Ne } from "./styled-CPg13iuX.js";
16
- import { u as we } from "./useThemeProps-DOuXhu3E.js";
17
- const ke = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], qe = ye(), Le = Ne("div", {
18
- name: "MuiStack",
19
- slot: "Root",
20
- overridesResolver: (o, r) => r.root
21
- });
22
- function Se(o) {
23
- return we({
24
- props: o,
25
- name: "MuiStack",
26
- defaultTheme: qe
27
- });
28
- }
29
- function $e(o, r) {
30
- const t = P.Children.toArray(o).filter(Boolean);
31
- return t.reduce((s, i, l) => (s.push(i), l < t.length - 1 && s.push(/* @__PURE__ */ P.cloneElement(r, {
32
- key: `separator-${l}`
33
- })), s), []);
34
- }
35
- const Ie = (o) => ({
36
- row: "Left",
37
- "row-reverse": "Right",
38
- column: "Top",
39
- "column-reverse": "Bottom"
40
- })[o], Me = ({
41
- ownerState: o,
42
- theme: r
43
- }) => {
44
- let t = d({
45
- display: "flex",
46
- flexDirection: "column"
47
- }, Y({
48
- theme: r
49
- }, W({
50
- values: o.direction,
51
- breakpoints: r.breakpoints.values
52
- }), (s) => ({
53
- flexDirection: s
54
- })));
55
- if (o.spacing) {
56
- const s = ge(r), i = Object.keys(r.breakpoints.values).reduce((a, n) => ((typeof o.spacing == "object" && o.spacing[n] != null || typeof o.direction == "object" && o.direction[n] != null) && (a[n] = !0), a), {}), l = W({
57
- values: o.direction,
58
- base: i
59
- }), c = W({
60
- values: o.spacing,
61
- base: i
62
- });
63
- typeof l == "object" && Object.keys(l).forEach((a, n, p) => {
64
- if (!l[a]) {
65
- const v = n > 0 ? l[p[n - 1]] : "column";
66
- l[a] = v;
67
- }
68
- }), t = he(t, Y({
69
- theme: r
70
- }, c, (a, n) => o.useFlexGap ? {
71
- gap: Z(s, a)
72
- } : {
73
- // The useFlexGap={false} implement relies on each child to give up control of the margin.
74
- // We need to reset the margin to avoid double spacing.
75
- "& > :not(style):not(style)": {
76
- margin: 0
77
- },
78
- "& > :not(style) ~ :not(style)": {
79
- [`margin${Ie(n ? l[n] : o.direction)}`]: Z(s, a)
80
- }
81
- }));
82
- }
83
- return t = ve(r.breakpoints, t), t;
84
- };
85
- function Ve(o = {}) {
86
- const {
87
- // This will allow adding custom styled fn (for example for custom sx style function)
88
- createStyledComponent: r = Le,
89
- useThemeProps: t = Se,
90
- componentName: s = "MuiStack"
91
- } = o, i = () => D({
92
- root: ["root"]
93
- }, (a) => H(s, a), {}), l = r(Me), c = /* @__PURE__ */ P.forwardRef(function(a, n) {
94
- const p = t(a), f = Te(p), {
95
- component: v = "div",
96
- direction: y = "column",
97
- spacing: T = 0,
98
- divider: C,
99
- children: u,
100
- className: R,
101
- useFlexGap: x = !1
102
- } = f, j = E(f, ke), b = {
103
- direction: y,
104
- spacing: T,
105
- useFlexGap: x
106
- }, O = i();
107
- return /* @__PURE__ */ h(l, d({
108
- as: v,
109
- ownerState: b,
110
- ref: n,
111
- className: S(O.root, R)
112
- }, j, {
113
- children: C ? $e(u, C) : u
114
- }));
115
- });
116
- return process.env.NODE_ENV !== "production" && (c.propTypes = {
117
- children: e.node,
118
- direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
119
- divider: e.node,
120
- spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
121
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
122
- }), c;
123
- }
124
- function Ee(o) {
125
- return H("MuiFormHelperText", o);
126
- }
127
- const oe = A("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
128
- var re;
129
- const _e = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"], De = (o) => {
130
- const {
131
- classes: r,
132
- contained: t,
133
- size: s,
134
- disabled: i,
135
- error: l,
136
- filled: c,
137
- focused: m,
138
- required: a
139
- } = o, n = {
140
- root: ["root", i && "disabled", l && "error", s && `size${_(s)}`, t && "contained", m && "focused", c && "filled", a && "required"]
141
- };
142
- return D(n, Ee, r);
143
- }, ze = $("p", {
144
- name: "MuiFormHelperText",
145
- slot: "Root",
146
- overridesResolver: (o, r) => {
147
- const {
148
- ownerState: t
149
- } = o;
150
- return [r.root, t.size && r[`size${_(t.size)}`], t.contained && r.contained, t.filled && r.filled];
151
- }
152
- })(({
153
- theme: o,
154
- ownerState: r
155
- }) => d({
156
- color: (o.vars || o).palette.text.secondary
157
- }, o.typography.caption, {
158
- textAlign: "left",
159
- marginTop: 3,
160
- marginRight: 0,
161
- marginBottom: 0,
162
- marginLeft: 0,
163
- [`&.${oe.disabled}`]: {
164
- color: (o.vars || o).palette.text.disabled
165
- },
166
- [`&.${oe.error}`]: {
167
- color: (o.vars || o).palette.error.main
168
- }
169
- }, r.size === "small" && {
170
- marginTop: 4
171
- }, r.contained && {
172
- marginLeft: 14,
173
- marginRight: 14
174
- })), le = /* @__PURE__ */ P.forwardRef(function(r, t) {
175
- const s = z({
176
- props: r,
177
- name: "MuiFormHelperText"
178
- }), {
179
- children: i,
180
- className: l,
181
- component: c = "p"
182
- } = s, m = E(s, _e), a = ne(), n = te({
183
- props: s,
184
- muiFormControl: a,
185
- states: ["variant", "size", "disabled", "error", "filled", "focused", "required"]
186
- }), p = d({}, s, {
187
- component: c,
188
- contained: n.variant === "filled" || n.variant === "outlined",
189
- variant: n.variant,
190
- size: n.size,
191
- disabled: n.disabled,
192
- error: n.error,
193
- filled: n.filled,
194
- focused: n.focused,
195
- required: n.required
196
- }), f = De(p);
197
- return /* @__PURE__ */ h(ze, d({
198
- as: c,
199
- ownerState: p,
200
- className: S(f.root, l),
201
- ref: t
202
- }, m, {
203
- children: i === " " ? (
204
- // notranslate needed while Google Translate will not fix zero-width space issue
205
- re || (re = /* @__PURE__ */ h("span", {
206
- className: "notranslate",
207
- children: "​"
208
- }))
209
- ) : i
210
- }));
211
- });
212
- process.env.NODE_ENV !== "production" && (le.propTypes = {
213
- // ┌────────────────────────────── Warning ──────────────────────────────┐
214
- // │ These PropTypes are generated from the TypeScript type definitions. │
215
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
216
- // └─────────────────────────────────────────────────────────────────────┘
217
- /**
218
- * The content of the component.
219
- *
220
- * If `' '` is provided, the component reserves one line height for displaying a future message.
221
- */
222
- children: e.node,
223
- /**
224
- * Override or extend the styles applied to the component.
225
- */
226
- classes: e.object,
227
- /**
228
- * @ignore
229
- */
230
- className: e.string,
231
- /**
232
- * The component used for the root node.
233
- * Either a string to use a HTML element or a component.
234
- */
235
- component: e.elementType,
236
- /**
237
- * If `true`, the helper text should be displayed in a disabled state.
238
- */
239
- disabled: e.bool,
240
- /**
241
- * If `true`, helper text should be displayed in an error state.
242
- */
243
- error: e.bool,
244
- /**
245
- * If `true`, the helper text should use filled classes key.
246
- */
247
- filled: e.bool,
248
- /**
249
- * If `true`, the helper text should use focused classes key.
250
- */
251
- focused: e.bool,
252
- /**
253
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
254
- * FormControl.
255
- */
256
- margin: e.oneOf(["dense"]),
257
- /**
258
- * If `true`, the helper text should use required classes key.
259
- */
260
- required: e.bool,
261
- /**
262
- * The system prop that allows defining system overrides as well as additional CSS styles.
263
- */
264
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
265
- /**
266
- * The variant to use.
267
- */
268
- variant: e.oneOfType([e.oneOf(["filled", "outlined", "standard"]), e.string])
269
- });
270
- function He(o) {
271
- return H("MuiTextField", o);
272
- }
273
- A("MuiTextField", ["root"]);
274
- const Be = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"], Ue = {
275
- standard: Re,
276
- filled: Ce,
277
- outlined: je
278
- }, We = (o) => {
279
- const {
280
- classes: r
281
- } = o;
282
- return D({
283
- root: ["root"]
284
- }, He, r);
285
- }, Ae = $(xe, {
286
- name: "MuiTextField",
287
- slot: "Root",
288
- overridesResolver: (o, r) => r.root
289
- })({}), Ge = /* @__PURE__ */ P.forwardRef(function(r, t) {
290
- const s = z({
291
- props: r,
292
- name: "MuiTextField"
293
- }), {
294
- autoComplete: i,
295
- autoFocus: l = !1,
296
- children: c,
297
- className: m,
298
- color: a = "primary",
299
- defaultValue: n,
300
- disabled: p = !1,
301
- error: f = !1,
302
- FormHelperTextProps: v,
303
- fullWidth: y = !1,
304
- helperText: T,
305
- id: C,
306
- InputLabelProps: u,
307
- inputProps: R,
308
- InputProps: x,
309
- inputRef: j,
310
- label: b,
311
- maxRows: O,
312
- minRows: k,
313
- multiline: N = !1,
314
- name: g,
315
- onBlur: w,
316
- onChange: ie,
317
- onFocus: ce,
318
- placeholder: de,
319
- required: G = !1,
320
- rows: pe,
321
- select: I = !1,
322
- SelectProps: B,
323
- type: ue,
324
- value: J,
325
- variant: M = "outlined"
326
- } = s, me = E(s, Be), K = d({}, s, {
327
- autoFocus: l,
328
- color: a,
329
- disabled: p,
330
- error: f,
331
- fullWidth: y,
332
- multiline: N,
333
- required: G,
334
- select: I,
335
- variant: M
336
- }), fe = We(K);
337
- process.env.NODE_ENV !== "production" && I && !c && console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");
338
- const q = {};
339
- M === "outlined" && (u && typeof u.shrink < "u" && (q.notched = u.shrink), q.label = b), I && ((!B || !B.native) && (q.id = void 0), q["aria-describedby"] = void 0);
340
- const F = Fe(C), U = T && F ? `${F}-helper-text` : void 0, Q = b && F ? `${F}-label` : void 0, be = Ue[M], X = /* @__PURE__ */ h(be, d({
341
- "aria-describedby": U,
342
- autoComplete: i,
343
- autoFocus: l,
344
- defaultValue: n,
345
- fullWidth: y,
346
- multiline: N,
347
- name: g,
348
- rows: pe,
349
- maxRows: O,
350
- minRows: k,
351
- type: ue,
352
- value: J,
353
- id: F,
354
- inputRef: j,
355
- onBlur: w,
356
- onChange: ie,
357
- onFocus: ce,
358
- placeholder: de,
359
- inputProps: R
360
- }, q, x));
361
- return /* @__PURE__ */ V(Ae, d({
362
- className: S(fe.root, m),
363
- disabled: p,
364
- error: f,
365
- fullWidth: y,
366
- ref: t,
367
- required: G,
368
- color: a,
369
- variant: M,
370
- ownerState: K
371
- }, me, {
372
- children: [b != null && b !== "" && /* @__PURE__ */ h(Oe, d({
373
- htmlFor: F,
374
- id: Q
375
- }, u, {
376
- children: b
377
- })), I ? /* @__PURE__ */ h(Pe, d({
378
- "aria-describedby": U,
379
- id: F,
380
- labelId: Q,
381
- value: J,
382
- input: X
383
- }, B, {
384
- children: c
385
- })) : X, T && /* @__PURE__ */ h(le, d({
386
- id: U
387
- }, v, {
388
- children: T
389
- }))]
390
- }));
391
- });
392
- process.env.NODE_ENV !== "production" && (Ge.propTypes = {
393
- // ┌────────────────────────────── Warning ──────────────────────────────┐
394
- // │ These PropTypes are generated from the TypeScript type definitions. │
395
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
396
- // └─────────────────────────────────────────────────────────────────────┘
397
- /**
398
- * This prop helps users to fill forms faster, especially on mobile devices.
399
- * The name can be confusing, as it's more like an autofill.
400
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
401
- */
402
- autoComplete: e.string,
403
- /**
404
- * If `true`, the `input` element is focused during the first mount.
405
- * @default false
406
- */
407
- autoFocus: e.bool,
408
- /**
409
- * @ignore
410
- */
411
- children: e.node,
412
- /**
413
- * Override or extend the styles applied to the component.
414
- */
415
- classes: e.object,
416
- /**
417
- * @ignore
418
- */
419
- className: e.string,
420
- /**
421
- * The color of the component.
422
- * It supports both default and custom theme colors, which can be added as shown in the
423
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
424
- * @default 'primary'
425
- */
426
- color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
427
- /**
428
- * The default value. Use when the component is not controlled.
429
- */
430
- defaultValue: e.any,
431
- /**
432
- * If `true`, the component is disabled.
433
- * @default false
434
- */
435
- disabled: e.bool,
436
- /**
437
- * If `true`, the label is displayed in an error state.
438
- * @default false
439
- */
440
- error: e.bool,
441
- /**
442
- * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
443
- */
444
- FormHelperTextProps: e.object,
445
- /**
446
- * If `true`, the input will take up the full width of its container.
447
- * @default false
448
- */
449
- fullWidth: e.bool,
450
- /**
451
- * The helper text content.
452
- */
453
- helperText: e.node,
454
- /**
455
- * The id of the `input` element.
456
- * Use this prop to make `label` and `helperText` accessible for screen readers.
457
- */
458
- id: e.string,
459
- /**
460
- * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
461
- * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
462
- */
463
- InputLabelProps: e.object,
464
- /**
465
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
466
- */
467
- inputProps: e.object,
468
- /**
469
- * Props applied to the Input element.
470
- * It will be a [`FilledInput`](/material-ui/api/filled-input/),
471
- * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
472
- * component depending on the `variant` prop value.
473
- */
474
- InputProps: e.object,
475
- /**
476
- * Pass a ref to the `input` element.
477
- */
478
- inputRef: se,
479
- /**
480
- * The label content.
481
- */
482
- label: e.node,
483
- /**
484
- * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
485
- * @default 'none'
486
- */
487
- margin: e.oneOf(["dense", "none", "normal"]),
488
- /**
489
- * Maximum number of rows to display when multiline option is set to true.
490
- */
491
- maxRows: e.oneOfType([e.number, e.string]),
492
- /**
493
- * Minimum number of rows to display when multiline option is set to true.
494
- */
495
- minRows: e.oneOfType([e.number, e.string]),
496
- /**
497
- * If `true`, a `textarea` element is rendered instead of an input.
498
- * @default false
499
- */
500
- multiline: e.bool,
501
- /**
502
- * Name attribute of the `input` element.
503
- */
504
- name: e.string,
505
- /**
506
- * @ignore
507
- */
508
- onBlur: e.func,
509
- /**
510
- * Callback fired when the value is changed.
511
- *
512
- * @param {object} event The event source of the callback.
513
- * You can pull out the new value by accessing `event.target.value` (string).
514
- */
515
- onChange: e.func,
516
- /**
517
- * @ignore
518
- */
519
- onFocus: e.func,
520
- /**
521
- * The short hint displayed in the `input` before the user enters a value.
522
- */
523
- placeholder: e.string,
524
- /**
525
- * If `true`, the label is displayed as required and the `input` element is required.
526
- * @default false
527
- */
528
- required: e.bool,
529
- /**
530
- * Number of rows to display when multiline option is set to true.
531
- */
532
- rows: e.oneOfType([e.number, e.string]),
533
- /**
534
- * Render a [`Select`](/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
535
- * If this option is set you must pass the options of the select as children.
536
- * @default false
537
- */
538
- select: e.bool,
539
- /**
540
- * Props applied to the [`Select`](/material-ui/api/select/) element.
541
- */
542
- SelectProps: e.object,
543
- /**
544
- * The size of the component.
545
- */
546
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
547
- /**
548
- * The system prop that allows defining system overrides as well as additional CSS styles.
549
- */
550
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
551
- /**
552
- * 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).
553
- */
554
- type: e.string,
555
- /**
556
- * The value of the `input` element, required for a controlled component.
557
- */
558
- value: e.any,
559
- /**
560
- * The variant to use.
561
- * @default 'outlined'
562
- */
563
- variant: e.oneOf(["filled", "outlined", "standard"])
564
- });
565
- const ae = Ve({
566
- createStyledComponent: $("div", {
567
- name: "MuiStack",
568
- slot: "Root",
569
- overridesResolver: (o, r) => r.root
570
- }),
571
- useThemeProps: (o) => z({
572
- props: o,
573
- name: "MuiStack"
574
- })
575
- });
576
- process.env.NODE_ENV !== "production" && (ae.propTypes = {
577
- // ┌────────────────────────────── Warning ──────────────────────────────┐
578
- // │ These PropTypes are generated from the TypeScript type definitions. │
579
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
580
- // └─────────────────────────────────────────────────────────────────────┘
581
- /**
582
- * The content of the component.
583
- */
584
- children: e.node,
585
- /**
586
- * The component used for the root node.
587
- * Either a string to use a HTML element or a component.
588
- */
589
- component: e.elementType,
590
- /**
591
- * Defines the `flex-direction` style property.
592
- * It is applied for all screen sizes.
593
- * @default 'column'
594
- */
595
- direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
596
- /**
597
- * Add an element between each child.
598
- */
599
- divider: e.node,
600
- /**
601
- * Defines the space between immediate children.
602
- * @default 0
603
- */
604
- spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
605
- /**
606
- * The system prop, which allows defining system overrides as well as additional CSS styles.
607
- */
608
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
609
- /**
610
- * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
611
- *
612
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
613
- * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
614
- *
615
- * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
616
- * @default false
617
- */
618
- useFlexGap: e.bool
619
- });
620
- function Je(o) {
621
- return H("MuiFormControlLabel", o);
622
- }
623
- const L = A("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Ke = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"], Qe = (o) => {
624
- const {
625
- classes: r,
626
- disabled: t,
627
- labelPlacement: s,
628
- error: i,
629
- required: l
630
- } = o, c = {
631
- root: ["root", t && "disabled", `labelPlacement${_(s)}`, i && "error", l && "required"],
632
- label: ["label", t && "disabled"],
633
- asterisk: ["asterisk", i && "error"]
634
- };
635
- return D(c, Je, r);
636
- }, Xe = $("label", {
637
- name: "MuiFormControlLabel",
638
- slot: "Root",
639
- overridesResolver: (o, r) => {
640
- const {
641
- ownerState: t
642
- } = o;
643
- return [{
644
- [`& .${L.label}`]: r.label
645
- }, r.root, r[`labelPlacement${_(t.labelPlacement)}`]];
646
- }
647
- })(({
648
- theme: o,
649
- ownerState: r
650
- }) => d({
651
- display: "inline-flex",
652
- alignItems: "center",
653
- cursor: "pointer",
654
- // For correct alignment with the text.
655
- verticalAlign: "middle",
656
- WebkitTapHighlightColor: "transparent",
657
- marginLeft: -11,
658
- marginRight: 16,
659
- // used for row presentation of radio/checkbox
660
- [`&.${L.disabled}`]: {
661
- cursor: "default"
662
- }
663
- }, r.labelPlacement === "start" && {
664
- flexDirection: "row-reverse",
665
- marginLeft: 16,
666
- // used for row presentation of radio/checkbox
667
- marginRight: -11
668
- }, r.labelPlacement === "top" && {
669
- flexDirection: "column-reverse",
670
- marginLeft: 16
671
- }, r.labelPlacement === "bottom" && {
672
- flexDirection: "column",
673
- marginLeft: 16
674
- }, {
675
- [`& .${L.label}`]: {
676
- [`&.${L.disabled}`]: {
677
- color: (o.vars || o).palette.text.disabled
678
- }
679
- }
680
- })), Ye = $("span", {
681
- name: "MuiFormControlLabel",
682
- slot: "Asterisk",
683
- overridesResolver: (o, r) => r.asterisk
684
- })(({
685
- theme: o
686
- }) => ({
687
- [`&.${L.error}`]: {
688
- color: (o.vars || o).palette.error.main
689
- }
690
- })), Ze = /* @__PURE__ */ P.forwardRef(function(r, t) {
691
- var s, i;
692
- const l = z({
693
- props: r,
694
- name: "MuiFormControlLabel"
695
- }), {
696
- className: c,
697
- componentsProps: m = {},
698
- control: a,
699
- disabled: n,
700
- disableTypography: p,
701
- label: f,
702
- labelPlacement: v = "end",
703
- required: y,
704
- slotProps: T = {}
705
- } = l, C = E(l, Ke), u = ne(), R = (s = n ?? a.props.disabled) != null ? s : u == null ? void 0 : u.disabled, x = y ?? a.props.required, j = {
706
- disabled: R,
707
- required: x
708
- };
709
- ["checked", "name", "onChange", "value", "inputRef"].forEach((w) => {
710
- typeof a.props[w] > "u" && typeof l[w] < "u" && (j[w] = l[w]);
711
- });
712
- const b = te({
713
- props: l,
714
- muiFormControl: u,
715
- states: ["error"]
716
- }), O = d({}, l, {
717
- disabled: R,
718
- labelPlacement: v,
719
- required: x,
720
- error: b.error
721
- }), k = Qe(O), N = (i = T.typography) != null ? i : m.typography;
722
- let g = f;
723
- return g != null && g.type !== ee && !p && (g = /* @__PURE__ */ h(ee, d({
724
- component: "span"
725
- }, N, {
726
- className: S(k.label, N == null ? void 0 : N.className),
727
- children: g
728
- }))), /* @__PURE__ */ V(Xe, d({
729
- className: S(k.root, c),
730
- ownerState: O,
731
- ref: t
732
- }, C, {
733
- children: [/* @__PURE__ */ P.cloneElement(a, j), x ? /* @__PURE__ */ V(ae, {
734
- display: "block",
735
- children: [g, /* @__PURE__ */ V(Ye, {
736
- ownerState: O,
737
- "aria-hidden": !0,
738
- className: k.asterisk,
739
- children: [" ", "*"]
740
- })]
741
- }) : g]
742
- }));
743
- });
744
- process.env.NODE_ENV !== "production" && (Ze.propTypes = {
745
- // ┌────────────────────────────── Warning ──────────────────────────────┐
746
- // │ These PropTypes are generated from the TypeScript type definitions. │
747
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
748
- // └─────────────────────────────────────────────────────────────────────┘
749
- /**
750
- * If `true`, the component appears selected.
751
- */
752
- checked: e.bool,
753
- /**
754
- * Override or extend the styles applied to the component.
755
- */
756
- classes: e.object,
757
- /**
758
- * @ignore
759
- */
760
- className: e.string,
761
- /**
762
- * The props used for each slot inside.
763
- * @default {}
764
- */
765
- componentsProps: e.shape({
766
- typography: e.object
767
- }),
768
- /**
769
- * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
770
- */
771
- control: e.element.isRequired,
772
- /**
773
- * If `true`, the control is disabled.
774
- */
775
- disabled: e.bool,
776
- /**
777
- * If `true`, the label is rendered as it is passed without an additional typography node.
778
- */
779
- disableTypography: e.bool,
780
- /**
781
- * Pass a ref to the `input` element.
782
- */
783
- inputRef: se,
784
- /**
785
- * A text or an element to be used in an enclosing label element.
786
- */
787
- label: e.node,
788
- /**
789
- * The position of the label.
790
- * @default 'end'
791
- */
792
- labelPlacement: e.oneOf(["bottom", "end", "start", "top"]),
793
- /**
794
- * @ignore
795
- */
796
- name: e.string,
797
- /**
798
- * Callback fired when the state is changed.
799
- *
800
- * @param {React.SyntheticEvent} event The event source of the callback.
801
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
802
- */
803
- onChange: e.func,
804
- /**
805
- * If `true`, the label will indicate that the `input` is required.
806
- */
807
- required: e.bool,
808
- /**
809
- * The props used for each slot inside.
810
- * @default {}
811
- */
812
- slotProps: e.shape({
813
- typography: e.object
814
- }),
815
- /**
816
- * The system prop that allows defining system overrides as well as additional CSS styles.
817
- */
818
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
819
- /**
820
- * The value of the component.
821
- */
822
- value: e.any
823
- });
824
- export {
825
- Ze as F,
826
- Ge as T
827
- };