@hybridcore/ui 1.6.0 → 1.6.1

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/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
  2. package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
  3. package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
  4. package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
  5. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
  6. package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
  7. package/dist/FormControlLabel-BkRfrhNy.js +601 -0
  8. package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
  9. package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
  10. package/dist/InputLabel-rEwwnD4_.js +354 -0
  11. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
  12. package/dist/Modal-DlB6GH-f.js +1659 -0
  13. package/dist/Paper-q9kKjAKx.js +527 -0
  14. package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
  15. package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
  16. package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.js} +1 -1
  17. package/dist/components/access/index.js +8 -15
  18. package/dist/components/access/logic.js +25 -0
  19. package/dist/components/card/index.js +158 -498
  20. package/dist/components/card/logic.js +24 -0
  21. package/dist/components/card/styled.js +226 -51
  22. package/dist/components/card-alternate/index.js +111 -139
  23. package/dist/components/card-alternate/logic.js +17 -0
  24. package/dist/components/card-alternate/styled.js +113 -19
  25. package/dist/components/collapsible-card/index.js +1 -1
  26. package/dist/components/collapsible-card/styled.js +1 -1
  27. package/dist/components/confirm/dialog.js +3 -3
  28. package/dist/components/confirm/index.js +1 -1
  29. package/dist/components/container/index.js +28 -269
  30. package/dist/components/container/logic.js +12 -0
  31. package/dist/components/container/styled.js +29 -0
  32. package/dist/components/context-menu/index.js +25 -457
  33. package/dist/components/context-menu/logic.js +14 -0
  34. package/dist/components/context-menu/styled.js +40 -0
  35. package/dist/components/data-security-selectors/security-level/index.js +36 -91
  36. package/dist/components/data-security-selectors/security-level/logic.js +73 -0
  37. package/dist/components/data-security-selectors/security-level/styled.js +47 -0
  38. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  39. package/dist/components/geometry-picker/index.js +13 -12
  40. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  41. package/dist/components/instance-form/components/variable/index.js +7 -9
  42. package/dist/components/instance-form/components/variables/index.js +1 -1
  43. package/dist/components/instance-form/index.js +1 -1
  44. package/dist/components/instance-hierarchy-table/index.js +32 -37
  45. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  46. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  47. package/dist/components/instance-table/index.js +30 -135
  48. package/dist/components/instance-table/logic.js +122 -0
  49. package/dist/components/instance-table/styled.js +53 -11
  50. package/dist/components/key-protection/index.js +45 -2
  51. package/dist/components/key-protection/logic.js +40 -0
  52. package/dist/components/key-protection/styled.js +45 -0
  53. package/dist/components/key-protection/utils.js +1 -1
  54. package/dist/components/loading/index.js +15 -9
  55. package/dist/components/loading/logic.js +15 -0
  56. package/dist/components/loading/styled.js +26 -19
  57. package/dist/components/phone-input/index.js +18 -22
  58. package/dist/components/phone-input/logic.js +14 -0
  59. package/dist/components/phone-input/styled.js +12 -4
  60. package/dist/components/property-mapping/index.js +1 -1
  61. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  62. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  63. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  64. package/dist/components/range-selector/components/number-range/index.js +48 -53
  65. package/dist/components/range-selector/components/string-range/index.js +15 -17
  66. package/dist/components/range-selector/index.js +63 -57
  67. package/dist/components/range-selector/logic.js +12 -0
  68. package/dist/components/range-selector/styled.js +4222 -0
  69. package/dist/components/template-filters/components/filter/index.js +13 -18
  70. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  71. package/dist/components/template-filters/index.js +21 -29
  72. package/dist/components/template-filters/logic.js +18 -0
  73. package/dist/components/template-filters/styled.js +44 -1
  74. package/dist/components/template-form/components/property-list/index.js +8 -8
  75. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  76. package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
  77. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  78. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  79. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +8 -9
  80. package/dist/components/template-form/index.js +32 -33
  81. package/dist/components/template-property-filters/index.js +45 -95
  82. package/dist/components/template-property-filters/logic.js +27 -0
  83. package/dist/components/template-property-filters/property.js +105 -165
  84. package/dist/components/template-property-filters/styled.js +121 -20
  85. package/dist/components/tree-select/index.js +52 -67
  86. package/dist/components/tree-select/logic.js +59 -0
  87. package/dist/components/tree-select/styled.js +45 -62
  88. package/dist/components/treeview-filter/index.js +43 -65
  89. package/dist/components/treeview-filter/item/index.js +43 -42
  90. package/dist/components/treeview-filter/item-label/index.js +17 -37
  91. package/dist/components/treeview-filter/logic.js +28 -0
  92. package/dist/components/treeview-filter/styled.js +86 -0
  93. package/dist/components/uploader/index.js +532 -567
  94. package/dist/components/uploader/logic.js +74 -0
  95. package/dist/components/uploader/styled.js +93 -46
  96. package/dist/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
  97. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
  98. package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
  99. package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
  100. package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
  101. package/dist/isMuiElement-BkJ72LB3.js +26 -0
  102. package/dist/main.d.ts +734 -298
  103. package/dist/main.js +15 -15
  104. package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
  105. package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
  106. package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
  107. package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
  108. package/package.json +1 -1
  109. package/dist/Box-p6OtTUEo.js +0 -30
  110. package/dist/Button-CvE2gnly.js +0 -370
  111. package/dist/CardContent-CSHh-ZlM.js +0 -74
  112. package/dist/Checkbox-CWRMFTBp.js +0 -421
  113. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  114. package/dist/List-tqElle9C.js +0 -121
  115. package/dist/ListItem-CfjsIg4B.js +0 -430
  116. package/dist/Modal-DhPpOoGB.js +0 -1299
  117. package/dist/Paper-2B03OBmZ.js +0 -169
  118. package/dist/TextField-1yCesIbH.js +0 -457
  119. package/dist/components/key-protection/menu.js +0 -85
  120. package/dist/components/treeview-filter/item/styled.js +0 -39
  121. package/dist/debounce-46wSf_lW.js +0 -15
  122. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  123. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  124. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  125. package/dist/styled-eZwjUruw.js +0 -12
  126. package/dist/useFormControl-CatNKXAi.js +0 -10
  127. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  128. package/dist/utils-BDNynJcd.js +0 -365
@@ -1,421 +0,0 @@
1
- import { a as r, _ } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as x from "react";
3
- import { P as e } from "./index-C__OZmYy.js";
4
- import { g as q, c as E, a as M, u as Y } from "./useThemeProps-BzzHcQyd.js";
5
- import { alpha as Z } from "@mui/system";
6
- import { s as z, r as ee } from "./styled-eZwjUruw.js";
7
- import { u as oe } from "./useFormControl-CatNKXAi.js";
8
- import { g as U } from "./createTheme-DYxDnE9u.js";
9
- import { jsxs as ne, jsx as l } from "react/jsx-runtime";
10
- import { B as te, r as V } from "./ButtonBase-2bPw77UP.js";
11
- import { u as ce } from "./useControlled-BYdyS7Pn.js";
12
- import { c as S } from "./capitalize-ciszXJ7R.js";
13
- import { c as w } from "./createSvgIcon-DrtgaibK.js";
14
- function se(o) {
15
- return U("PrivateSwitchBase", o);
16
- }
17
- q("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
18
- const ae = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], re = (o) => {
19
- const {
20
- classes: n,
21
- checked: t,
22
- disabled: i,
23
- edge: c
24
- } = o, s = {
25
- root: ["root", t && "checked", i && "disabled", c && `edge${S(c)}`],
26
- input: ["input"]
27
- };
28
- return M(s, se, n);
29
- }, ie = z(te)(({
30
- ownerState: o
31
- }) => r({
32
- padding: 9,
33
- borderRadius: "50%"
34
- }, o.edge === "start" && {
35
- marginLeft: o.size === "small" ? -3 : -12
36
- }, o.edge === "end" && {
37
- marginRight: o.size === "small" ? -3 : -12
38
- })), de = z("input")({
39
- cursor: "inherit",
40
- position: "absolute",
41
- opacity: 0,
42
- width: "100%",
43
- height: "100%",
44
- top: 0,
45
- left: 0,
46
- margin: 0,
47
- padding: 0,
48
- zIndex: 1
49
- }), H = /* @__PURE__ */ x.forwardRef(function(n, t) {
50
- const {
51
- autoFocus: i,
52
- checked: c,
53
- checkedIcon: s,
54
- className: v,
55
- defaultChecked: k,
56
- disabled: I,
57
- disableFocusRipple: u = !1,
58
- edge: C = !1,
59
- icon: B,
60
- id: p,
61
- inputProps: R,
62
- inputRef: P,
63
- name: g,
64
- onBlur: f,
65
- onChange: h,
66
- onFocus: m,
67
- readOnly: L,
68
- required: D = !1,
69
- tabIndex: W,
70
- type: y,
71
- value: N
72
- } = n, A = _(n, ae), [$, G] = ce({
73
- controlled: c,
74
- default: !!k,
75
- name: "SwitchBase",
76
- state: "checked"
77
- }), d = oe(), J = (a) => {
78
- m && m(a), d && d.onFocus && d.onFocus(a);
79
- }, K = (a) => {
80
- f && f(a), d && d.onBlur && d.onBlur(a);
81
- }, Q = (a) => {
82
- if (a.nativeEvent.defaultPrevented)
83
- return;
84
- const T = a.target.checked;
85
- G(T), h && h(a, T);
86
- };
87
- let b = I;
88
- d && typeof b > "u" && (b = d.disabled);
89
- const X = y === "checkbox" || y === "radio", F = r({}, n, {
90
- checked: $,
91
- disabled: b,
92
- disableFocusRipple: u,
93
- edge: C
94
- }), j = re(F);
95
- return /* @__PURE__ */ ne(ie, r({
96
- component: "span",
97
- className: E(j.root, v),
98
- centerRipple: !0,
99
- focusRipple: !u,
100
- disabled: b,
101
- tabIndex: null,
102
- role: void 0,
103
- onFocus: J,
104
- onBlur: K,
105
- ownerState: F,
106
- ref: t
107
- }, A, {
108
- children: [/* @__PURE__ */ l(de, r({
109
- autoFocus: i,
110
- checked: c,
111
- defaultChecked: k,
112
- className: j.input,
113
- disabled: b,
114
- id: X ? p : void 0,
115
- name: g,
116
- onChange: Q,
117
- readOnly: L,
118
- ref: P,
119
- required: D,
120
- ownerState: F,
121
- tabIndex: W,
122
- type: y
123
- }, y === "checkbox" && N === void 0 ? {} : {
124
- value: N
125
- }, R)), $ ? s : B]
126
- }));
127
- });
128
- process.env.NODE_ENV !== "production" && (H.propTypes = {
129
- /**
130
- * If `true`, the `input` element is focused during the first mount.
131
- */
132
- autoFocus: e.bool,
133
- /**
134
- * If `true`, the component is checked.
135
- */
136
- checked: e.bool,
137
- /**
138
- * The icon to display when the component is checked.
139
- */
140
- checkedIcon: e.node.isRequired,
141
- /**
142
- * Override or extend the styles applied to the component.
143
- * See [CSS API](#css) below for more details.
144
- */
145
- classes: e.object,
146
- /**
147
- * @ignore
148
- */
149
- className: e.string,
150
- /**
151
- * @ignore
152
- */
153
- defaultChecked: e.bool,
154
- /**
155
- * If `true`, the component is disabled.
156
- */
157
- disabled: e.bool,
158
- /**
159
- * If `true`, the keyboard focus ripple is disabled.
160
- * @default false
161
- */
162
- disableFocusRipple: e.bool,
163
- /**
164
- * If given, uses a negative margin to counteract the padding on one
165
- * side (this is often helpful for aligning the left or right
166
- * side of the icon with content above or below, without ruining the border
167
- * size and shape).
168
- * @default false
169
- */
170
- edge: e.oneOf(["end", "start", !1]),
171
- /**
172
- * The icon to display when the component is unchecked.
173
- */
174
- icon: e.node.isRequired,
175
- /**
176
- * The id of the `input` element.
177
- */
178
- id: e.string,
179
- /**
180
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
181
- */
182
- inputProps: e.object,
183
- /**
184
- * Pass a ref to the `input` element.
185
- */
186
- inputRef: V,
187
- /*
188
- * @ignore
189
- */
190
- name: e.string,
191
- /**
192
- * @ignore
193
- */
194
- onBlur: e.func,
195
- /**
196
- * Callback fired when the state is changed.
197
- *
198
- * @param {object} event The event source of the callback.
199
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
200
- */
201
- onChange: e.func,
202
- /**
203
- * @ignore
204
- */
205
- onFocus: e.func,
206
- /**
207
- * It prevents the user from changing the value of the field
208
- * (not from interacting with the field).
209
- */
210
- readOnly: e.bool,
211
- /**
212
- * If `true`, the `input` element is required.
213
- */
214
- required: e.bool,
215
- /**
216
- * The system prop that allows defining system overrides as well as additional CSS styles.
217
- */
218
- sx: e.object,
219
- /**
220
- * @ignore
221
- */
222
- tabIndex: e.oneOfType([e.number, e.string]),
223
- /**
224
- * The input component prop `type`.
225
- */
226
- type: e.string.isRequired,
227
- /**
228
- * The value of the component.
229
- */
230
- value: e.any
231
- });
232
- const le = w(/* @__PURE__ */ l("path", {
233
- d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
234
- }), "CheckBoxOutlineBlank"), ue = w(/* @__PURE__ */ l("path", {
235
- d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
236
- }), "CheckBox"), pe = w(/* @__PURE__ */ l("path", {
237
- d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
238
- }), "IndeterminateCheckBox");
239
- function fe(o) {
240
- return U("MuiCheckbox", o);
241
- }
242
- const O = q("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary"]), he = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"], me = (o) => {
243
- const {
244
- classes: n,
245
- indeterminate: t,
246
- color: i
247
- } = o, c = {
248
- root: ["root", t && "indeterminate", `color${S(i)}`]
249
- }, s = M(c, fe, n);
250
- return r({}, n, s);
251
- }, be = z(H, {
252
- shouldForwardProp: (o) => ee(o) || o === "classes",
253
- name: "MuiCheckbox",
254
- slot: "Root",
255
- overridesResolver: (o, n) => {
256
- const {
257
- ownerState: t
258
- } = o;
259
- return [n.root, t.indeterminate && n.indeterminate, t.color !== "default" && n[`color${S(t.color)}`]];
260
- }
261
- })(({
262
- theme: o,
263
- ownerState: n
264
- }) => r({
265
- color: (o.vars || o).palette.text.secondary
266
- }, !n.disableRipple && {
267
- "&:hover": {
268
- backgroundColor: o.vars ? `rgba(${n.color === "default" ? o.vars.palette.action.activeChannel : o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.hoverOpacity})` : Z(n.color === "default" ? o.palette.action.active : o.palette[n.color].main, o.palette.action.hoverOpacity),
269
- // Reset on touch devices, it doesn't add specificity
270
- "@media (hover: none)": {
271
- backgroundColor: "transparent"
272
- }
273
- }
274
- }, n.color !== "default" && {
275
- [`&.${O.checked}, &.${O.indeterminate}`]: {
276
- color: (o.vars || o).palette[n.color].main
277
- },
278
- [`&.${O.disabled}`]: {
279
- color: (o.vars || o).palette.action.disabled
280
- }
281
- })), ke = /* @__PURE__ */ l(ue, {}), Ce = /* @__PURE__ */ l(le, {}), ge = /* @__PURE__ */ l(pe, {}), ye = /* @__PURE__ */ x.forwardRef(function(n, t) {
282
- var i, c;
283
- const s = Y({
284
- props: n,
285
- name: "MuiCheckbox"
286
- }), {
287
- checkedIcon: v = ke,
288
- color: k = "primary",
289
- icon: I = Ce,
290
- indeterminate: u = !1,
291
- indeterminateIcon: C = ge,
292
- inputProps: B,
293
- size: p = "medium",
294
- className: R
295
- } = s, P = _(s, he), g = u ? C : I, f = u ? C : v, h = r({}, s, {
296
- color: k,
297
- indeterminate: u,
298
- size: p
299
- }), m = me(h);
300
- return /* @__PURE__ */ l(be, r({
301
- type: "checkbox",
302
- inputProps: r({
303
- "data-indeterminate": u
304
- }, B),
305
- icon: /* @__PURE__ */ x.cloneElement(g, {
306
- fontSize: (i = g.props.fontSize) != null ? i : p
307
- }),
308
- checkedIcon: /* @__PURE__ */ x.cloneElement(f, {
309
- fontSize: (c = f.props.fontSize) != null ? c : p
310
- }),
311
- ownerState: h,
312
- ref: t,
313
- className: E(m.root, R)
314
- }, P, {
315
- classes: m
316
- }));
317
- });
318
- process.env.NODE_ENV !== "production" && (ye.propTypes = {
319
- // ----------------------------- Warning --------------------------------
320
- // | These PropTypes are generated from the TypeScript type definitions |
321
- // | To update them edit the d.ts file and run "yarn proptypes" |
322
- // ----------------------------------------------------------------------
323
- /**
324
- * If `true`, the component is checked.
325
- */
326
- checked: e.bool,
327
- /**
328
- * The icon to display when the component is checked.
329
- * @default <CheckBoxIcon />
330
- */
331
- checkedIcon: e.node,
332
- /**
333
- * Override or extend the styles applied to the component.
334
- */
335
- classes: e.object,
336
- /**
337
- * @ignore
338
- */
339
- className: e.string,
340
- /**
341
- * The color of the component.
342
- * It supports both default and custom theme colors, which can be added as shown in the
343
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
344
- * @default 'primary'
345
- */
346
- color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
347
- /**
348
- * The default checked state. Use when the component is not controlled.
349
- */
350
- defaultChecked: e.bool,
351
- /**
352
- * If `true`, the component is disabled.
353
- * @default false
354
- */
355
- disabled: e.bool,
356
- /**
357
- * If `true`, the ripple effect is disabled.
358
- * @default false
359
- */
360
- disableRipple: e.bool,
361
- /**
362
- * The icon to display when the component is unchecked.
363
- * @default <CheckBoxOutlineBlankIcon />
364
- */
365
- icon: e.node,
366
- /**
367
- * The id of the `input` element.
368
- */
369
- id: e.string,
370
- /**
371
- * If `true`, the component appears indeterminate.
372
- * This does not set the native input element to indeterminate due
373
- * to inconsistent behavior across browsers.
374
- * However, we set a `data-indeterminate` attribute on the `input`.
375
- * @default false
376
- */
377
- indeterminate: e.bool,
378
- /**
379
- * The icon to display when the component is indeterminate.
380
- * @default <IndeterminateCheckBoxIcon />
381
- */
382
- indeterminateIcon: e.node,
383
- /**
384
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
385
- */
386
- inputProps: e.object,
387
- /**
388
- * Pass a ref to the `input` element.
389
- */
390
- inputRef: V,
391
- /**
392
- * Callback fired when the state is changed.
393
- *
394
- * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
395
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
396
- */
397
- onChange: e.func,
398
- /**
399
- * If `true`, the `input` element is required.
400
- * @default false
401
- */
402
- required: e.bool,
403
- /**
404
- * The size of the component.
405
- * `small` is equivalent to the dense checkbox styling.
406
- * @default 'medium'
407
- */
408
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
409
- /**
410
- * The system prop that allows defining system overrides as well as additional CSS styles.
411
- */
412
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
413
- /**
414
- * The value of the component. The DOM API casts this to a string.
415
- * The browser uses "on" as the default value.
416
- */
417
- value: e.any
418
- });
419
- export {
420
- ye as C
421
- };
@@ -1,195 +0,0 @@
1
- import { a as m, _ } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as P from "react";
3
- import { P as e } from "./index-C__OZmYy.js";
4
- import { g as O, u as D, c as h, a as E } from "./useThemeProps-BzzHcQyd.js";
5
- import { s as M } from "./styled-eZwjUruw.js";
6
- import { g as S } from "./createTheme-DYxDnE9u.js";
7
- import { f as U } from "./FormControl-BLbrq4C7.js";
8
- import { jsx as w, jsxs as W } from "react/jsx-runtime";
9
- import { c as L } from "./capitalize-ciszXJ7R.js";
10
- import { u as k } from "./useFormControl-CatNKXAi.js";
11
- import { T as C } from "./Typography-CxbneZy_.js";
12
- import { r as q } from "./ButtonBase-2bPw77UP.js";
13
- function z(l) {
14
- return S("MuiFormControlLabel", l);
15
- }
16
- const c = O("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error"]), A = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"], B = (l) => {
17
- const {
18
- classes: o,
19
- disabled: r,
20
- labelPlacement: n,
21
- error: t
22
- } = l, b = {
23
- root: ["root", r && "disabled", `labelPlacement${L(n)}`, t && "error"],
24
- label: ["label", r && "disabled"]
25
- };
26
- return E(b, z, o);
27
- }, H = M("label", {
28
- name: "MuiFormControlLabel",
29
- slot: "Root",
30
- overridesResolver: (l, o) => {
31
- const {
32
- ownerState: r
33
- } = l;
34
- return [{
35
- [`& .${c.label}`]: o.label
36
- }, o.root, o[`labelPlacement${L(r.labelPlacement)}`]];
37
- }
38
- })(({
39
- theme: l,
40
- ownerState: o
41
- }) => m({
42
- display: "inline-flex",
43
- alignItems: "center",
44
- cursor: "pointer",
45
- // For correct alignment with the text.
46
- verticalAlign: "middle",
47
- WebkitTapHighlightColor: "transparent",
48
- marginLeft: -11,
49
- marginRight: 16,
50
- // used for row presentation of radio/checkbox
51
- [`&.${c.disabled}`]: {
52
- cursor: "default"
53
- }
54
- }, o.labelPlacement === "start" && {
55
- flexDirection: "row-reverse",
56
- marginLeft: 16,
57
- // used for row presentation of radio/checkbox
58
- marginRight: -11
59
- }, o.labelPlacement === "top" && {
60
- flexDirection: "column-reverse",
61
- marginLeft: 16
62
- }, o.labelPlacement === "bottom" && {
63
- flexDirection: "column",
64
- marginLeft: 16
65
- }, {
66
- [`& .${c.label}`]: {
67
- [`&.${c.disabled}`]: {
68
- color: (l.vars || l).palette.text.disabled
69
- }
70
- }
71
- })), I = /* @__PURE__ */ P.forwardRef(function(o, r) {
72
- var n;
73
- const t = D({
74
- props: o,
75
- name: "MuiFormControlLabel"
76
- }), {
77
- className: b,
78
- componentsProps: v = {},
79
- control: i,
80
- disabled: T,
81
- disableTypography: x,
82
- label: F,
83
- labelPlacement: R = "end",
84
- slotProps: j = {}
85
- } = t, N = _(t, A), d = k();
86
- let a = T;
87
- typeof a > "u" && typeof i.props.disabled < "u" && (a = i.props.disabled), typeof a > "u" && d && (a = d.disabled);
88
- const u = {
89
- disabled: a
90
- };
91
- ["checked", "name", "onChange", "value", "inputRef"].forEach((p) => {
92
- typeof i.props[p] > "u" && typeof t[p] < "u" && (u[p] = t[p]);
93
- });
94
- const $ = U({
95
- props: t,
96
- muiFormControl: d,
97
- states: ["error"]
98
- }), y = m({}, t, {
99
- disabled: a,
100
- labelPlacement: R,
101
- error: $.error
102
- }), g = B(y), f = (n = j.typography) != null ? n : v.typography;
103
- let s = F;
104
- return s != null && s.type !== C && !x && (s = /* @__PURE__ */ w(C, m({
105
- component: "span"
106
- }, f, {
107
- className: h(g.label, f == null ? void 0 : f.className),
108
- children: s
109
- }))), /* @__PURE__ */ W(H, m({
110
- className: h(g.root, b),
111
- ownerState: y,
112
- ref: r
113
- }, N, {
114
- children: [/* @__PURE__ */ P.cloneElement(i, u), s]
115
- }));
116
- });
117
- process.env.NODE_ENV !== "production" && (I.propTypes = {
118
- // ----------------------------- Warning --------------------------------
119
- // | These PropTypes are generated from the TypeScript type definitions |
120
- // | To update them edit the d.ts file and run "yarn proptypes" |
121
- // ----------------------------------------------------------------------
122
- /**
123
- * If `true`, the component appears selected.
124
- */
125
- checked: e.bool,
126
- /**
127
- * Override or extend the styles applied to the component.
128
- */
129
- classes: e.object,
130
- /**
131
- * @ignore
132
- */
133
- className: e.string,
134
- /**
135
- * The props used for each slot inside.
136
- * @default {}
137
- */
138
- componentsProps: e.shape({
139
- typography: e.object
140
- }),
141
- /**
142
- * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
143
- */
144
- control: e.element.isRequired,
145
- /**
146
- * If `true`, the control is disabled.
147
- */
148
- disabled: e.bool,
149
- /**
150
- * If `true`, the label is rendered as it is passed without an additional typography node.
151
- */
152
- disableTypography: e.bool,
153
- /**
154
- * Pass a ref to the `input` element.
155
- */
156
- inputRef: q,
157
- /**
158
- * A text or an element to be used in an enclosing label element.
159
- */
160
- label: e.node,
161
- /**
162
- * The position of the label.
163
- * @default 'end'
164
- */
165
- labelPlacement: e.oneOf(["bottom", "end", "start", "top"]),
166
- /**
167
- * @ignore
168
- */
169
- name: e.string,
170
- /**
171
- * Callback fired when the state is changed.
172
- *
173
- * @param {React.SyntheticEvent} event The event source of the callback.
174
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
175
- */
176
- onChange: e.func,
177
- /**
178
- * The props used for each slot inside.
179
- * @default {}
180
- */
181
- slotProps: e.shape({
182
- typography: e.object
183
- }),
184
- /**
185
- * The system prop that allows defining system overrides as well as additional CSS styles.
186
- */
187
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
188
- /**
189
- * The value of the component.
190
- */
191
- value: e.any
192
- });
193
- export {
194
- I as F
195
- };