@hybridcore/ui 1.3.6 → 1.4.0

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 (128) hide show
  1. package/dist/AccordionDetails-CGs6GZQK.js +454 -0
  2. package/dist/Add-eepk2WTM.js +379 -0
  3. package/dist/Box-BPyg-Ybm.js +70 -0
  4. package/dist/Button-DLwB_sKd.js +354 -0
  5. package/dist/{ButtonBase-D6qhsxB0.js → ButtonBase-D0qccOVb.js} +6 -5
  6. package/dist/{CardContent-B8hqgH-I.js → CardContent-DFsCCOWk.js} +4 -4
  7. package/dist/{Checkbox-BFWhj3s-.js → Checkbox-qy3cjvnb.js} +134 -195
  8. package/dist/{Collapse-D_TjnyE5.js → Collapse-CL6LGGZw.js} +68 -75
  9. package/dist/Delete-OHEw9lDi.js +22 -0
  10. package/dist/DialogContent-CxOSq6h9.js +519 -0
  11. package/dist/FormControlLabel-D9KFjcIx.js +193 -0
  12. package/dist/{IconButton-D8bwME9t.js → IconButton-BaiyAtmS.js} +5 -5
  13. package/dist/{Input-Dxzguyp5.js → Input-CmCkXczh.js} +6 -6
  14. package/dist/{InputAdornment-B8ERE7Zv.js → InputAdornment-CZUPEeia.js} +5 -5
  15. package/dist/{FormControl-BMRUQKHh.js → InputLabel-CWkW8NtU.js} +316 -316
  16. package/dist/{List-DEWyK9IO.js → List-PpNAWJ_I.js} +4 -4
  17. package/dist/ListItem-CZbZ91vp.js +428 -0
  18. package/dist/{MenuItem-DstAFfik.js → MenuItem-D-INSvZa.js} +7 -7
  19. package/dist/{Modal-DNGEQJ1M.js → Modal-KrI5qFIq.js} +61 -57
  20. package/dist/{OutlinedInput-w2Cj9STF.js → OutlinedInput-DkIUD30e.js} +6 -6
  21. package/dist/{Paper-BseeergJ.js → Paper-btu3j72o.js} +5 -5
  22. package/dist/{Select-NDq3WyLt.js → Select-ClaBvSqf.js} +20 -18
  23. package/dist/Tabs-BzelDJKy.js +787 -0
  24. package/dist/TextField-D87qTh1k.js +457 -0
  25. package/dist/Typography-Bm7PFqUT.js +176 -0
  26. package/dist/assets/index.css +1 -1
  27. package/dist/assets/index2.css +1 -1
  28. package/dist/components/card/index.js +6 -6
  29. package/dist/components/card/styled.js +1 -1
  30. package/dist/components/collapsible-card/style.js +20 -466
  31. package/dist/components/confirm/dialog.js +8 -149
  32. package/dist/components/confirm/index.js +1 -1
  33. package/dist/components/container/index.js +7 -7
  34. package/dist/components/context-menu/index.js +191 -604
  35. package/dist/components/data-security-selectors/dissemination-list/index.js +12 -6
  36. package/dist/components/data-security-selectors/security-level/index.js +46 -45
  37. package/dist/components/date-time-picker/index.js +85 -64
  38. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  39. package/dist/components/geometry-picker/edit/index.js +16 -16
  40. package/dist/components/geometry-picker/geometry/index.js +35 -35
  41. package/dist/components/geometry-picker/index.js +60 -56
  42. package/dist/components/geometry-picker/kml/index.js +14 -14
  43. package/dist/components/geometry-picker/map/index.js +1 -1
  44. package/dist/components/geometry-picker/map/logic.js +38 -37
  45. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +63 -59
  46. package/dist/components/geometry-picker/parser/logic.js +33 -32
  47. package/dist/components/geometry-picker/styled.js +22 -14
  48. package/dist/components/icon-button/index.js +1 -1
  49. package/dist/components/icon-button/styled.js +0 -2
  50. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
  51. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +15 -6
  52. package/dist/components/instance-form/components/variable/index.js +19 -0
  53. package/dist/components/instance-form/components/variables/index.js +40 -0
  54. package/dist/components/{data-management/instance-form → instance-form}/index.js +174 -155
  55. package/dist/components/instance-hierarchy-table/index.js +58 -0
  56. package/dist/components/instance-hierarchy-table/styled.js +29 -0
  57. package/dist/components/instance-table/index.js +125 -0
  58. package/dist/components/instance-table/styled.js +13 -0
  59. package/dist/components/map/helpers/ol.js +1 -1
  60. package/dist/components/map/index.js +1 -1
  61. package/dist/components/map/logic.js +1 -1
  62. package/dist/components/map/styled.js +1 -1
  63. package/dist/components/phone-input/index.js +1 -1
  64. package/dist/components/property-mapping/index.js +558 -0
  65. package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
  66. package/dist/components/range-selector/components/date-range/index.js +9 -0
  67. package/dist/components/range-selector/components/geometry-range/index.js +26 -0
  68. package/dist/components/range-selector/components/number-range/index.js +86 -0
  69. package/dist/components/range-selector/components/string-range/index.js +31 -0
  70. package/dist/components/range-selector/index.js +59 -0
  71. package/dist/components/search-input/index.js +4 -4
  72. package/dist/components/tabs/appleTabs.style.js +55 -0
  73. package/dist/components/tabs/index.js +93 -0
  74. package/dist/components/tabs/tab-panel.js +18 -0
  75. package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
  76. package/dist/components/template-form/components/property-list/index.js +72 -0
  77. package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
  78. package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
  79. package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
  80. package/dist/components/template-form/components/property-list/types.js +8 -0
  81. package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
  82. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
  83. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
  84. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
  85. package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
  86. package/dist/components/template-form/components/select-icon/index.js +186 -0
  87. package/dist/components/template-form/components/select-icon/styled.js +76 -0
  88. package/dist/components/template-form/index.js +338 -0
  89. package/dist/components/template-property-filters/property.js +48 -46
  90. package/dist/components/tree-select/index.js +51 -49
  91. package/dist/components/tree-select/styled.js +2 -2
  92. package/dist/components/treeview-filter/index.js +8 -8
  93. package/dist/components/treeview-filter/item/index.js +1 -1
  94. package/dist/components/treeview-filter/item-label/index.js +18 -17
  95. package/dist/constants/index.js +41 -0
  96. package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
  97. package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
  98. package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
  99. package/dist/dialog-v5-nL5yy.js +153 -0
  100. package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
  101. package/dist/extendSxProp-qqdkfHzS.js +30 -0
  102. package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
  103. package/dist/index-C1fczHEW.js +11042 -0
  104. package/dist/index-DPf5olog.js +288 -0
  105. package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
  106. package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
  107. package/dist/main.d.ts +569 -81
  108. package/dist/main.js +157 -157
  109. package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
  110. package/dist/property-list-form-BfP9gzSo.js +391 -0
  111. package/dist/requirePropFactory-BjhhI-AW.js +18 -0
  112. package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
  113. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  114. package/dist/useControlled-BYdyS7Pn.js +31 -0
  115. package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
  116. package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
  117. package/dist/utils/ontology.js +52 -30
  118. package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
  119. package/package.json +2 -1
  120. package/dist/DialogContent-BCYm_d1s.js +0 -864
  121. package/dist/FormControlLabel-DENNVXWL.js +0 -639
  122. package/dist/Typography-Dg-ROiTA.js +0 -201
  123. package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
  124. package/dist/components/data-management/instance-form/components/variables/index.js +0 -39
  125. package/dist/createSvgIcon-B2WT0K4k.js +0 -87
  126. package/dist/index-B3Oj04nl.js +0 -287
  127. package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
  128. package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
@@ -1,639 +0,0 @@
1
- import { _ as a, a as z } from "./extends-Cyw62AD_.js";
2
- import * as I from "react";
3
- import { a as j, P as e } from "./createStyled-B96gjom1.js";
4
- import { g as H, u as _, c as L, a as E } from "./useThemeProps-DeftUmqJ.js";
5
- import { g as U, s as V } from "./styled-cPJbqF0E.js";
6
- import { jsx as T, jsxs as X } from "react/jsx-runtime";
7
- import { f as Y, F as ue, I as me } from "./FormControl-BMRUQKHh.js";
8
- import { u as fe } from "./useId-BHG98T5I.js";
9
- import { S as be, F as ge } from "./Select-NDq3WyLt.js";
10
- import { u as Z } from "./useFormControl-CatNKXAi.js";
11
- import { r as ee } from "./ButtonBase-D6qhsxB0.js";
12
- import { I as ye } from "./Input-Dxzguyp5.js";
13
- import { O as he } from "./OutlinedInput-w2Cj9STF.js";
14
- import { T as J } from "./Typography-Dg-ROiTA.js";
15
- function Te(o) {
16
- return U("MuiFormHelperText", o);
17
- }
18
- const K = H("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
19
- var Q;
20
- const xe = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"], ve = (o) => {
21
- const {
22
- classes: r,
23
- contained: t,
24
- size: l,
25
- disabled: n,
26
- error: i,
27
- filled: c,
28
- focused: d,
29
- required: u
30
- } = o, s = {
31
- root: ["root", n && "disabled", i && "error", l && `size${j(l)}`, t && "contained", d && "focused", c && "filled", u && "required"]
32
- };
33
- return E(s, Te, r);
34
- }, Fe = V("p", {
35
- name: "MuiFormHelperText",
36
- slot: "Root",
37
- overridesResolver: (o, r) => {
38
- const {
39
- ownerState: t
40
- } = o;
41
- return [r.root, t.size && r[`size${j(t.size)}`], t.contained && r.contained, t.filled && r.filled];
42
- }
43
- })(({
44
- theme: o,
45
- ownerState: r
46
- }) => a({
47
- color: (o.vars || o).palette.text.secondary
48
- }, o.typography.caption, {
49
- textAlign: "left",
50
- marginTop: 3,
51
- marginRight: 0,
52
- marginBottom: 0,
53
- marginLeft: 0,
54
- [`&.${K.disabled}`]: {
55
- color: (o.vars || o).palette.text.disabled
56
- },
57
- [`&.${K.error}`]: {
58
- color: (o.vars || o).palette.error.main
59
- }
60
- }, r.size === "small" && {
61
- marginTop: 4
62
- }, r.contained && {
63
- marginLeft: 14,
64
- marginRight: 14
65
- })), oe = /* @__PURE__ */ I.forwardRef(function(r, t) {
66
- const l = _({
67
- props: r,
68
- name: "MuiFormHelperText"
69
- }), {
70
- children: n,
71
- className: i,
72
- component: c = "p"
73
- } = l, d = z(l, xe), u = Z(), s = Y({
74
- props: l,
75
- muiFormControl: u,
76
- states: ["variant", "size", "disabled", "error", "filled", "focused", "required"]
77
- }), f = a({}, l, {
78
- component: c,
79
- contained: s.variant === "filled" || s.variant === "outlined",
80
- variant: s.variant,
81
- size: s.size,
82
- disabled: s.disabled,
83
- error: s.error,
84
- filled: s.filled,
85
- focused: s.focused,
86
- required: s.required
87
- }), x = ve(f);
88
- return /* @__PURE__ */ T(Fe, a({
89
- as: c,
90
- ownerState: f,
91
- className: L(x.root, i),
92
- ref: t
93
- }, d, {
94
- children: n === " " ? (
95
- // notranslate needed while Google Translate will not fix zero-width space issue
96
- Q || (Q = /* @__PURE__ */ T("span", {
97
- className: "notranslate",
98
- children: "​"
99
- }))
100
- ) : n
101
- }));
102
- });
103
- process.env.NODE_ENV !== "production" && (oe.propTypes = {
104
- // ----------------------------- Warning --------------------------------
105
- // | These PropTypes are generated from the TypeScript type definitions |
106
- // | To update them edit the d.ts file and run "yarn proptypes" |
107
- // ----------------------------------------------------------------------
108
- /**
109
- * The content of the component.
110
- *
111
- * If `' '` is provided, the component reserves one line height for displaying a future message.
112
- */
113
- children: e.node,
114
- /**
115
- * Override or extend the styles applied to the component.
116
- */
117
- classes: e.object,
118
- /**
119
- * @ignore
120
- */
121
- className: e.string,
122
- /**
123
- * The component used for the root node.
124
- * Either a string to use a HTML element or a component.
125
- */
126
- component: e.elementType,
127
- /**
128
- * If `true`, the helper text should be displayed in a disabled state.
129
- */
130
- disabled: e.bool,
131
- /**
132
- * If `true`, helper text should be displayed in an error state.
133
- */
134
- error: e.bool,
135
- /**
136
- * If `true`, the helper text should use filled classes key.
137
- */
138
- filled: e.bool,
139
- /**
140
- * If `true`, the helper text should use focused classes key.
141
- */
142
- focused: e.bool,
143
- /**
144
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
145
- * FormControl.
146
- */
147
- margin: e.oneOf(["dense"]),
148
- /**
149
- * If `true`, the helper text should use required classes key.
150
- */
151
- required: e.bool,
152
- /**
153
- * The system prop that allows defining system overrides as well as additional CSS styles.
154
- */
155
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
156
- /**
157
- * The variant to use.
158
- */
159
- variant: e.oneOfType([e.oneOf(["filled", "outlined", "standard"]), e.string])
160
- });
161
- function Pe(o) {
162
- return U("MuiTextField", o);
163
- }
164
- H("MuiTextField", ["root"]);
165
- const Ce = ["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"], Re = {
166
- standard: ye,
167
- filled: ge,
168
- outlined: he
169
- }, Oe = (o) => {
170
- const {
171
- classes: r
172
- } = o;
173
- return E({
174
- root: ["root"]
175
- }, Pe, r);
176
- }, we = V(ue, {
177
- name: "MuiTextField",
178
- slot: "Root",
179
- overridesResolver: (o, r) => r.root
180
- })({}), Ne = /* @__PURE__ */ I.forwardRef(function(r, t) {
181
- const l = _({
182
- props: r,
183
- name: "MuiTextField"
184
- }), {
185
- autoComplete: n,
186
- autoFocus: i = !1,
187
- children: c,
188
- className: d,
189
- color: u = "primary",
190
- defaultValue: s,
191
- disabled: f = !1,
192
- error: x = !1,
193
- FormHelperTextProps: $,
194
- fullWidth: F = !1,
195
- helperText: b,
196
- id: m,
197
- InputLabelProps: g,
198
- inputProps: M,
199
- InputProps: C,
200
- inputRef: R,
201
- label: p,
202
- maxRows: y,
203
- minRows: v,
204
- multiline: B = !1,
205
- name: re,
206
- onBlur: te,
207
- onChange: le,
208
- onFocus: ne,
209
- placeholder: se,
210
- required: D = !1,
211
- rows: ae,
212
- select: O = !1,
213
- SelectProps: S,
214
- type: ie,
215
- value: W,
216
- variant: w = "outlined"
217
- } = l, de = z(l, Ce), k = a({}, l, {
218
- autoFocus: i,
219
- color: u,
220
- disabled: f,
221
- error: x,
222
- fullWidth: F,
223
- multiline: B,
224
- required: D,
225
- select: O,
226
- variant: w
227
- }), ce = Oe(k);
228
- process.env.NODE_ENV !== "production" && O && !c && console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");
229
- const P = {};
230
- w === "outlined" && (g && typeof g.shrink < "u" && (P.notched = g.shrink), P.label = p), O && ((!S || !S.native) && (P.id = void 0), P["aria-describedby"] = void 0);
231
- const h = fe(m), q = b && h ? `${h}-helper-text` : void 0, A = p && h ? `${h}-label` : void 0, pe = Re[w], G = /* @__PURE__ */ T(pe, a({
232
- "aria-describedby": q,
233
- autoComplete: n,
234
- autoFocus: i,
235
- defaultValue: s,
236
- fullWidth: F,
237
- multiline: B,
238
- name: re,
239
- rows: ae,
240
- maxRows: y,
241
- minRows: v,
242
- type: ie,
243
- value: W,
244
- id: h,
245
- inputRef: R,
246
- onBlur: te,
247
- onChange: le,
248
- onFocus: ne,
249
- placeholder: se,
250
- inputProps: M
251
- }, P, C));
252
- return /* @__PURE__ */ X(we, a({
253
- className: L(ce.root, d),
254
- disabled: f,
255
- error: x,
256
- fullWidth: F,
257
- ref: t,
258
- required: D,
259
- color: u,
260
- variant: w,
261
- ownerState: k
262
- }, de, {
263
- children: [p != null && p !== "" && /* @__PURE__ */ T(me, a({
264
- htmlFor: h,
265
- id: A
266
- }, g, {
267
- children: p
268
- })), O ? /* @__PURE__ */ T(be, a({
269
- "aria-describedby": q,
270
- id: h,
271
- labelId: A,
272
- value: W,
273
- input: G
274
- }, S, {
275
- children: c
276
- })) : G, b && /* @__PURE__ */ T(oe, a({
277
- id: q
278
- }, $, {
279
- children: b
280
- }))]
281
- }));
282
- });
283
- process.env.NODE_ENV !== "production" && (Ne.propTypes = {
284
- // ----------------------------- Warning --------------------------------
285
- // | These PropTypes are generated from the TypeScript type definitions |
286
- // | To update them edit the d.ts file and run "yarn proptypes" |
287
- // ----------------------------------------------------------------------
288
- /**
289
- * This prop helps users to fill forms faster, especially on mobile devices.
290
- * The name can be confusing, as it's more like an autofill.
291
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
292
- */
293
- autoComplete: e.string,
294
- /**
295
- * If `true`, the `input` element is focused during the first mount.
296
- * @default false
297
- */
298
- autoFocus: e.bool,
299
- /**
300
- * @ignore
301
- */
302
- children: e.node,
303
- /**
304
- * Override or extend the styles applied to the component.
305
- */
306
- classes: e.object,
307
- /**
308
- * @ignore
309
- */
310
- className: e.string,
311
- /**
312
- * The color of the component.
313
- * It supports both default and custom theme colors, which can be added as shown in the
314
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
315
- * @default 'primary'
316
- */
317
- color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
318
- /**
319
- * The default value. Use when the component is not controlled.
320
- */
321
- defaultValue: e.any,
322
- /**
323
- * If `true`, the component is disabled.
324
- * @default false
325
- */
326
- disabled: e.bool,
327
- /**
328
- * If `true`, the label is displayed in an error state.
329
- * @default false
330
- */
331
- error: e.bool,
332
- /**
333
- * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
334
- */
335
- FormHelperTextProps: e.object,
336
- /**
337
- * If `true`, the input will take up the full width of its container.
338
- * @default false
339
- */
340
- fullWidth: e.bool,
341
- /**
342
- * The helper text content.
343
- */
344
- helperText: e.node,
345
- /**
346
- * The id of the `input` element.
347
- * Use this prop to make `label` and `helperText` accessible for screen readers.
348
- */
349
- id: e.string,
350
- /**
351
- * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
352
- * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
353
- */
354
- InputLabelProps: e.object,
355
- /**
356
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
357
- */
358
- inputProps: e.object,
359
- /**
360
- * Props applied to the Input element.
361
- * It will be a [`FilledInput`](/material-ui/api/filled-input/),
362
- * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
363
- * component depending on the `variant` prop value.
364
- */
365
- InputProps: e.object,
366
- /**
367
- * Pass a ref to the `input` element.
368
- */
369
- inputRef: ee,
370
- /**
371
- * The label content.
372
- */
373
- label: e.node,
374
- /**
375
- * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
376
- * @default 'none'
377
- */
378
- margin: e.oneOf(["dense", "none", "normal"]),
379
- /**
380
- * Maximum number of rows to display when multiline option is set to true.
381
- */
382
- maxRows: e.oneOfType([e.number, e.string]),
383
- /**
384
- * Minimum number of rows to display when multiline option is set to true.
385
- */
386
- minRows: e.oneOfType([e.number, e.string]),
387
- /**
388
- * If `true`, a `textarea` element is rendered instead of an input.
389
- * @default false
390
- */
391
- multiline: e.bool,
392
- /**
393
- * Name attribute of the `input` element.
394
- */
395
- name: e.string,
396
- /**
397
- * @ignore
398
- */
399
- onBlur: e.func,
400
- /**
401
- * Callback fired when the value is changed.
402
- *
403
- * @param {object} event The event source of the callback.
404
- * You can pull out the new value by accessing `event.target.value` (string).
405
- */
406
- onChange: e.func,
407
- /**
408
- * @ignore
409
- */
410
- onFocus: e.func,
411
- /**
412
- * The short hint displayed in the `input` before the user enters a value.
413
- */
414
- placeholder: e.string,
415
- /**
416
- * If `true`, the label is displayed as required and the `input` element is required.
417
- * @default false
418
- */
419
- required: e.bool,
420
- /**
421
- * Number of rows to display when multiline option is set to true.
422
- */
423
- rows: e.oneOfType([e.number, e.string]),
424
- /**
425
- * Render a [`Select`](/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
426
- * If this option is set you must pass the options of the select as children.
427
- * @default false
428
- */
429
- select: e.bool,
430
- /**
431
- * Props applied to the [`Select`](/material-ui/api/select/) element.
432
- */
433
- SelectProps: e.object,
434
- /**
435
- * The size of the component.
436
- */
437
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
438
- /**
439
- * The system prop that allows defining system overrides as well as additional CSS styles.
440
- */
441
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
442
- /**
443
- * 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).
444
- */
445
- type: e.string,
446
- /**
447
- * The value of the `input` element, required for a controlled component.
448
- */
449
- value: e.any,
450
- /**
451
- * The variant to use.
452
- * @default 'outlined'
453
- */
454
- variant: e.oneOf(["filled", "outlined", "standard"])
455
- });
456
- function Ie(o) {
457
- return U("MuiFormControlLabel", o);
458
- }
459
- const N = H("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error"]), Le = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"], je = (o) => {
460
- const {
461
- classes: r,
462
- disabled: t,
463
- labelPlacement: l,
464
- error: n
465
- } = o, i = {
466
- root: ["root", t && "disabled", `labelPlacement${j(l)}`, n && "error"],
467
- label: ["label", t && "disabled"]
468
- };
469
- return E(i, Ie, r);
470
- }, $e = V("label", {
471
- name: "MuiFormControlLabel",
472
- slot: "Root",
473
- overridesResolver: (o, r) => {
474
- const {
475
- ownerState: t
476
- } = o;
477
- return [{
478
- [`& .${N.label}`]: r.label
479
- }, r.root, r[`labelPlacement${j(t.labelPlacement)}`]];
480
- }
481
- })(({
482
- theme: o,
483
- ownerState: r
484
- }) => a({
485
- display: "inline-flex",
486
- alignItems: "center",
487
- cursor: "pointer",
488
- // For correct alignment with the text.
489
- verticalAlign: "middle",
490
- WebkitTapHighlightColor: "transparent",
491
- marginLeft: -11,
492
- marginRight: 16,
493
- // used for row presentation of radio/checkbox
494
- [`&.${N.disabled}`]: {
495
- cursor: "default"
496
- }
497
- }, r.labelPlacement === "start" && {
498
- flexDirection: "row-reverse",
499
- marginLeft: 16,
500
- // used for row presentation of radio/checkbox
501
- marginRight: -11
502
- }, r.labelPlacement === "top" && {
503
- flexDirection: "column-reverse",
504
- marginLeft: 16
505
- }, r.labelPlacement === "bottom" && {
506
- flexDirection: "column",
507
- marginLeft: 16
508
- }, {
509
- [`& .${N.label}`]: {
510
- [`&.${N.disabled}`]: {
511
- color: (o.vars || o).palette.text.disabled
512
- }
513
- }
514
- })), Me = /* @__PURE__ */ I.forwardRef(function(r, t) {
515
- var l;
516
- const n = _({
517
- props: r,
518
- name: "MuiFormControlLabel"
519
- }), {
520
- className: i,
521
- componentsProps: c = {},
522
- control: d,
523
- disabled: u,
524
- disableTypography: s,
525
- label: f,
526
- labelPlacement: x = "end",
527
- slotProps: $ = {}
528
- } = n, F = z(n, Le), b = Z();
529
- let m = u;
530
- typeof m > "u" && typeof d.props.disabled < "u" && (m = d.props.disabled), typeof m > "u" && b && (m = b.disabled);
531
- const g = {
532
- disabled: m
533
- };
534
- ["checked", "name", "onChange", "value", "inputRef"].forEach((v) => {
535
- typeof d.props[v] > "u" && typeof n[v] < "u" && (g[v] = n[v]);
536
- });
537
- const M = Y({
538
- props: n,
539
- muiFormControl: b,
540
- states: ["error"]
541
- }), C = a({}, n, {
542
- disabled: m,
543
- labelPlacement: x,
544
- error: M.error
545
- }), R = je(C), p = (l = $.typography) != null ? l : c.typography;
546
- let y = f;
547
- return y != null && y.type !== J && !s && (y = /* @__PURE__ */ T(J, a({
548
- component: "span"
549
- }, p, {
550
- className: L(R.label, p == null ? void 0 : p.className),
551
- children: y
552
- }))), /* @__PURE__ */ X($e, a({
553
- className: L(R.root, i),
554
- ownerState: C,
555
- ref: t
556
- }, F, {
557
- children: [/* @__PURE__ */ I.cloneElement(d, g), y]
558
- }));
559
- });
560
- process.env.NODE_ENV !== "production" && (Me.propTypes = {
561
- // ----------------------------- Warning --------------------------------
562
- // | These PropTypes are generated from the TypeScript type definitions |
563
- // | To update them edit the d.ts file and run "yarn proptypes" |
564
- // ----------------------------------------------------------------------
565
- /**
566
- * If `true`, the component appears selected.
567
- */
568
- checked: e.bool,
569
- /**
570
- * Override or extend the styles applied to the component.
571
- */
572
- classes: e.object,
573
- /**
574
- * @ignore
575
- */
576
- className: e.string,
577
- /**
578
- * The props used for each slot inside.
579
- * @default {}
580
- */
581
- componentsProps: e.shape({
582
- typography: e.object
583
- }),
584
- /**
585
- * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
586
- */
587
- control: e.element.isRequired,
588
- /**
589
- * If `true`, the control is disabled.
590
- */
591
- disabled: e.bool,
592
- /**
593
- * If `true`, the label is rendered as it is passed without an additional typography node.
594
- */
595
- disableTypography: e.bool,
596
- /**
597
- * Pass a ref to the `input` element.
598
- */
599
- inputRef: ee,
600
- /**
601
- * A text or an element to be used in an enclosing label element.
602
- */
603
- label: e.node,
604
- /**
605
- * The position of the label.
606
- * @default 'end'
607
- */
608
- labelPlacement: e.oneOf(["bottom", "end", "start", "top"]),
609
- /**
610
- * @ignore
611
- */
612
- name: e.string,
613
- /**
614
- * Callback fired when the state is changed.
615
- *
616
- * @param {React.SyntheticEvent} event The event source of the callback.
617
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
618
- */
619
- onChange: e.func,
620
- /**
621
- * The props used for each slot inside.
622
- * @default {}
623
- */
624
- slotProps: e.shape({
625
- typography: e.object
626
- }),
627
- /**
628
- * The system prop that allows defining system overrides as well as additional CSS styles.
629
- */
630
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
631
- /**
632
- * The value of the component.
633
- */
634
- value: e.any
635
- });
636
- export {
637
- Me as F,
638
- Ne as T
639
- };