@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.
- package/dist/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
- package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
- package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
- package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
- package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
- package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
- package/dist/FormControlLabel-BkRfrhNy.js +601 -0
- package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
- package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
- package/dist/InputLabel-rEwwnD4_.js +354 -0
- package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
- package/dist/Modal-DlB6GH-f.js +1659 -0
- package/dist/Paper-q9kKjAKx.js +527 -0
- package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
- package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
- package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.js} +1 -1
- package/dist/components/access/index.js +8 -15
- package/dist/components/access/logic.js +25 -0
- package/dist/components/card/index.js +158 -498
- package/dist/components/card/logic.js +24 -0
- package/dist/components/card/styled.js +226 -51
- package/dist/components/card-alternate/index.js +111 -139
- package/dist/components/card-alternate/logic.js +17 -0
- package/dist/components/card-alternate/styled.js +113 -19
- package/dist/components/collapsible-card/index.js +1 -1
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +28 -269
- package/dist/components/container/logic.js +12 -0
- package/dist/components/container/styled.js +29 -0
- package/dist/components/context-menu/index.js +25 -457
- package/dist/components/context-menu/logic.js +14 -0
- package/dist/components/context-menu/styled.js +40 -0
- package/dist/components/data-security-selectors/security-level/index.js +36 -91
- package/dist/components/data-security-selectors/security-level/logic.js +73 -0
- package/dist/components/data-security-selectors/security-level/styled.js +47 -0
- package/dist/components/date-picker-with-custom-range/index.js +1 -1
- package/dist/components/geometry-picker/index.js +13 -12
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +7 -9
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-form/index.js +1 -1
- package/dist/components/instance-hierarchy-table/index.js +32 -37
- package/dist/components/instance-hierarchy-table/logic.js +16 -0
- package/dist/components/instance-hierarchy-table/styled.js +53 -12
- package/dist/components/instance-table/index.js +30 -135
- package/dist/components/instance-table/logic.js +122 -0
- package/dist/components/instance-table/styled.js +53 -11
- package/dist/components/key-protection/index.js +45 -2
- package/dist/components/key-protection/logic.js +40 -0
- package/dist/components/key-protection/styled.js +45 -0
- package/dist/components/key-protection/utils.js +1 -1
- package/dist/components/loading/index.js +15 -9
- package/dist/components/loading/logic.js +15 -0
- package/dist/components/loading/styled.js +26 -19
- package/dist/components/phone-input/index.js +18 -22
- package/dist/components/phone-input/logic.js +14 -0
- package/dist/components/phone-input/styled.js +12 -4
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
- package/dist/components/range-selector/components/date-range/index.js +87 -4221
- package/dist/components/range-selector/components/geometry-range/index.js +11 -17
- package/dist/components/range-selector/components/number-range/index.js +48 -53
- package/dist/components/range-selector/components/string-range/index.js +15 -17
- package/dist/components/range-selector/index.js +63 -57
- package/dist/components/range-selector/logic.js +12 -0
- package/dist/components/range-selector/styled.js +4222 -0
- package/dist/components/template-filters/components/filter/index.js +13 -18
- package/dist/components/template-filters/components/tab-panel/index.js +8 -16
- package/dist/components/template-filters/index.js +21 -29
- package/dist/components/template-filters/logic.js +18 -0
- package/dist/components/template-filters/styled.js +44 -1
- package/dist/components/template-form/components/property-list/index.js +8 -8
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
- package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +8 -9
- package/dist/components/template-form/index.js +32 -33
- package/dist/components/template-property-filters/index.js +45 -95
- package/dist/components/template-property-filters/logic.js +27 -0
- package/dist/components/template-property-filters/property.js +105 -165
- package/dist/components/template-property-filters/styled.js +121 -20
- package/dist/components/tree-select/index.js +52 -67
- package/dist/components/tree-select/logic.js +59 -0
- package/dist/components/tree-select/styled.js +45 -62
- package/dist/components/treeview-filter/index.js +43 -65
- package/dist/components/treeview-filter/item/index.js +43 -42
- package/dist/components/treeview-filter/item-label/index.js +17 -37
- package/dist/components/treeview-filter/logic.js +28 -0
- package/dist/components/treeview-filter/styled.js +86 -0
- package/dist/components/uploader/index.js +532 -567
- package/dist/components/uploader/logic.js +74 -0
- package/dist/components/uploader/styled.js +93 -46
- package/dist/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
- package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
- package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
- package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
- package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
- package/dist/isMuiElement-BkJ72LB3.js +26 -0
- package/dist/main.d.ts +734 -298
- package/dist/main.js +15 -15
- package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
- package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
- package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
- package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
- package/package.json +1 -1
- package/dist/Box-p6OtTUEo.js +0 -30
- package/dist/Button-CvE2gnly.js +0 -370
- package/dist/CardContent-CSHh-ZlM.js +0 -74
- package/dist/Checkbox-CWRMFTBp.js +0 -421
- package/dist/FormControlLabel-C8SPv14J.js +0 -195
- package/dist/List-tqElle9C.js +0 -121
- package/dist/ListItem-CfjsIg4B.js +0 -430
- package/dist/Modal-DhPpOoGB.js +0 -1299
- package/dist/Paper-2B03OBmZ.js +0 -169
- package/dist/TextField-1yCesIbH.js +0 -457
- package/dist/components/key-protection/menu.js +0 -85
- package/dist/components/treeview-filter/item/styled.js +0 -39
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-C3lndiXO.js +0 -16
- package/dist/styled-eZwjUruw.js +0 -12
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useThemeProps-BzzHcQyd.js +0 -58
- package/dist/utils-BDNynJcd.js +0 -365
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as t, _ as h } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import { P as r } from "./index-C__OZmYy.js";
|
|
4
|
-
import { g as z,
|
|
4
|
+
import { g as z, b as R, s as C, u as B, c as I, a as O } from "./styled-Bsjp3kFh.js";
|
|
5
5
|
import { alpha as g } from "@mui/system";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { B as $ } from "./ButtonBase-2bPw77UP.js";
|
|
10
|
-
import { c as i } from "./capitalize-ciszXJ7R.js";
|
|
6
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
7
|
+
import { B as x, c as $ } from "./ButtonBase-sObABYY2.js";
|
|
8
|
+
import { c as n } from "./capitalize-quqpGCFu.js";
|
|
11
9
|
function k(o) {
|
|
12
|
-
return
|
|
10
|
+
return R("MuiIconButton", o);
|
|
13
11
|
}
|
|
14
12
|
const P = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), j = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], E = (o) => {
|
|
15
13
|
const {
|
|
16
14
|
classes: e,
|
|
17
15
|
disabled: a,
|
|
18
|
-
color:
|
|
19
|
-
edge:
|
|
16
|
+
color: s,
|
|
17
|
+
edge: i,
|
|
20
18
|
size: l
|
|
21
19
|
} = o, c = {
|
|
22
|
-
root: ["root", a && "disabled",
|
|
20
|
+
root: ["root", a && "disabled", s !== "default" && `color${n(s)}`, i && `edge${n(i)}`, `size${n(l)}`]
|
|
23
21
|
};
|
|
24
|
-
return
|
|
25
|
-
}, M =
|
|
22
|
+
return O(c, k, e);
|
|
23
|
+
}, M = C(x, {
|
|
26
24
|
name: "MuiIconButton",
|
|
27
25
|
slot: "Root",
|
|
28
26
|
overridesResolver: (o, e) => {
|
|
29
27
|
const {
|
|
30
28
|
ownerState: a
|
|
31
29
|
} = o;
|
|
32
|
-
return [e.root, a.color !== "default" && e[`color${
|
|
30
|
+
return [e.root, a.color !== "default" && e[`color${n(a.color)}`], a.edge && e[`edge${n(a.edge)}`], e[`size${n(a.size)}`]];
|
|
33
31
|
}
|
|
34
32
|
})(({
|
|
35
33
|
theme: o,
|
|
36
34
|
ownerState: e
|
|
37
|
-
}) =>
|
|
35
|
+
}) => t({
|
|
38
36
|
textAlign: "center",
|
|
39
37
|
flex: "0 0 auto",
|
|
40
38
|
fontSize: o.typography.pxToRem(24),
|
|
@@ -63,14 +61,14 @@ const P = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
63
61
|
ownerState: e
|
|
64
62
|
}) => {
|
|
65
63
|
var a;
|
|
66
|
-
const
|
|
67
|
-
return
|
|
64
|
+
const s = (a = (o.vars || o).palette) == null ? void 0 : a[e.color];
|
|
65
|
+
return t({}, e.color === "inherit" && {
|
|
68
66
|
color: "inherit"
|
|
69
|
-
}, e.color !== "inherit" && e.color !== "default" &&
|
|
70
|
-
color:
|
|
67
|
+
}, e.color !== "inherit" && e.color !== "default" && t({
|
|
68
|
+
color: s == null ? void 0 : s.main
|
|
71
69
|
}, !e.disableRipple && {
|
|
72
|
-
"&:hover":
|
|
73
|
-
backgroundColor: o.vars ? `rgba(${
|
|
70
|
+
"&:hover": t({}, s && {
|
|
71
|
+
backgroundColor: o.vars ? `rgba(${s.mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g(s.main, o.palette.action.hoverOpacity)
|
|
74
72
|
}, {
|
|
75
73
|
// Reset on touch devices, it doesn't add specificity
|
|
76
74
|
"@media (hover: none)": {
|
|
@@ -90,26 +88,26 @@ const P = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
90
88
|
}
|
|
91
89
|
});
|
|
92
90
|
}), N = /* @__PURE__ */ d.forwardRef(function(e, a) {
|
|
93
|
-
const
|
|
91
|
+
const s = B({
|
|
94
92
|
props: e,
|
|
95
93
|
name: "MuiIconButton"
|
|
96
94
|
}), {
|
|
97
|
-
edge:
|
|
95
|
+
edge: i = !1,
|
|
98
96
|
children: l,
|
|
99
97
|
className: c,
|
|
100
98
|
color: b = "default",
|
|
101
99
|
disabled: p = !1,
|
|
102
100
|
disableFocusRipple: u = !1,
|
|
103
101
|
size: m = "medium"
|
|
104
|
-
} =
|
|
105
|
-
edge:
|
|
102
|
+
} = s, v = h(s, j), f = t({}, s, {
|
|
103
|
+
edge: i,
|
|
106
104
|
color: b,
|
|
107
105
|
disabled: p,
|
|
108
106
|
disableFocusRipple: u,
|
|
109
107
|
size: m
|
|
110
108
|
}), y = E(f);
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
className:
|
|
109
|
+
return /* @__PURE__ */ T(M, t({
|
|
110
|
+
className: I(y.root, c),
|
|
113
111
|
centerRipple: !0,
|
|
114
112
|
focusRipple: !u,
|
|
115
113
|
disabled: p,
|
|
@@ -127,7 +125,7 @@ process.env.NODE_ENV !== "production" && (N.propTypes = {
|
|
|
127
125
|
/**
|
|
128
126
|
* The icon to display.
|
|
129
127
|
*/
|
|
130
|
-
children:
|
|
128
|
+
children: $(r.node, (o) => d.Children.toArray(o.children).some((a) => /* @__PURE__ */ d.isValidElement(a) && a.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
131
129
|
`)) : null),
|
|
132
130
|
/**
|
|
133
131
|
* Override or extend the styles applied to the component.
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { a as u, _ as I } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { P as e } from "./index-C__OZmYy.js";
|
|
4
|
-
import { g as x,
|
|
5
|
-
import { u as
|
|
6
|
-
import { s as R } from "./styled-eZwjUruw.js";
|
|
7
|
-
import { g as _ } from "./createTheme-DYxDnE9u.js";
|
|
4
|
+
import { g as x, b as A, s as C, u as N, c as L, a as O } from "./styled-Bsjp3kFh.js";
|
|
5
|
+
import { u as R, a as _ } from "./InputLabel-rEwwnD4_.js";
|
|
8
6
|
import { jsx as l, jsxs as j } from "react/jsx-runtime";
|
|
9
|
-
import { T as z } from "./Typography-
|
|
10
|
-
import { c as v } from "./capitalize-
|
|
11
|
-
function
|
|
12
|
-
return
|
|
7
|
+
import { T as z } from "./Typography-B-Z5Y0Xq.js";
|
|
8
|
+
import { c as v } from "./capitalize-quqpGCFu.js";
|
|
9
|
+
function M(t) {
|
|
10
|
+
return A("MuiInputAdornment", t);
|
|
13
11
|
}
|
|
14
12
|
const y = x("MuiInputAdornment", ["root", "filled", "standard", "outlined", "positionStart", "positionEnd", "disablePointerEvents", "hiddenLabel", "sizeSmall"]);
|
|
15
13
|
var g;
|
|
16
|
-
const
|
|
14
|
+
const U = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"], $ = (t, o) => {
|
|
17
15
|
const {
|
|
18
16
|
ownerState: n
|
|
19
17
|
} = t;
|
|
20
18
|
return [o.root, o[`position${v(n.position)}`], n.disablePointerEvents === !0 && o.disablePointerEvents, o[n.variant]];
|
|
21
|
-
},
|
|
19
|
+
}, F = (t) => {
|
|
22
20
|
const {
|
|
23
21
|
classes: o,
|
|
24
22
|
disablePointerEvents: n,
|
|
@@ -29,11 +27,11 @@ const M = ["children", "className", "component", "disablePointerEvents", "disabl
|
|
|
29
27
|
} = t, d = {
|
|
30
28
|
root: ["root", n && "disablePointerEvents", s && `position${v(s)}`, p, r && "hiddenLabel", a && `size${v(a)}`]
|
|
31
29
|
};
|
|
32
|
-
return
|
|
33
|
-
}, S =
|
|
30
|
+
return O(d, M, o);
|
|
31
|
+
}, S = C("div", {
|
|
34
32
|
name: "MuiInputAdornment",
|
|
35
33
|
slot: "Root",
|
|
36
|
-
overridesResolver:
|
|
34
|
+
overridesResolver: $
|
|
37
35
|
})(({
|
|
38
36
|
theme: t,
|
|
39
37
|
ownerState: o
|
|
@@ -60,7 +58,7 @@ const M = ["children", "className", "component", "disablePointerEvents", "disabl
|
|
|
60
58
|
// Styles applied to the root element if `disablePointerEvents={true}`.
|
|
61
59
|
pointerEvents: "none"
|
|
62
60
|
})), w = /* @__PURE__ */ b.forwardRef(function(o, n) {
|
|
63
|
-
const r =
|
|
61
|
+
const r = N({
|
|
64
62
|
props: o,
|
|
65
63
|
name: "MuiInputAdornment"
|
|
66
64
|
}), {
|
|
@@ -71,7 +69,7 @@ const M = ["children", "className", "component", "disablePointerEvents", "disabl
|
|
|
71
69
|
disableTypography: E = !1,
|
|
72
70
|
position: f,
|
|
73
71
|
variant: c
|
|
74
|
-
} = r, P = I(r,
|
|
72
|
+
} = r, P = I(r, U), i = R() || {};
|
|
75
73
|
let m = c;
|
|
76
74
|
c && i.variant && process.env.NODE_ENV !== "production" && c === i.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), i && !m && (m = i.variant);
|
|
77
75
|
const h = u({}, r, {
|
|
@@ -80,13 +78,13 @@ const M = ["children", "className", "component", "disablePointerEvents", "disabl
|
|
|
80
78
|
disablePointerEvents: d,
|
|
81
79
|
position: f,
|
|
82
80
|
variant: m
|
|
83
|
-
}), T =
|
|
84
|
-
return /* @__PURE__ */ l(
|
|
81
|
+
}), T = F(h);
|
|
82
|
+
return /* @__PURE__ */ l(_.Provider, {
|
|
85
83
|
value: null,
|
|
86
84
|
children: /* @__PURE__ */ l(S, u({
|
|
87
85
|
as: p,
|
|
88
86
|
ownerState: h,
|
|
89
|
-
className:
|
|
87
|
+
className: L(T.root, a),
|
|
90
88
|
ref: n
|
|
91
89
|
}, P, {
|
|
92
90
|
children: typeof s == "string" && !E ? /* @__PURE__ */ l(z, {
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { a as l, _ as y } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { P as o } from "./index-C__OZmYy.js";
|
|
4
|
+
import { g as k, b as C, s as x, u as g, c as O, a as L, r as T } from "./styled-Bsjp3kFh.js";
|
|
5
|
+
import { jsxs as h, jsx as I } from "react/jsx-runtime";
|
|
6
|
+
import { c as E } from "./capitalize-quqpGCFu.js";
|
|
7
|
+
const z = /* @__PURE__ */ b.createContext(void 0);
|
|
8
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "FormControlContext");
|
|
9
|
+
function F() {
|
|
10
|
+
return b.useContext(z);
|
|
11
|
+
}
|
|
12
|
+
function N({
|
|
13
|
+
props: r,
|
|
14
|
+
states: e,
|
|
15
|
+
muiFormControl: a
|
|
16
|
+
}) {
|
|
17
|
+
return e.reduce((s, t) => (s[t] = r[t], a && typeof r[t] > "u" && (s[t] = a[t]), s), {});
|
|
18
|
+
}
|
|
19
|
+
function R(r) {
|
|
20
|
+
return C("MuiFormLabel", r);
|
|
21
|
+
}
|
|
22
|
+
const m = k("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), j = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"], M = (r) => {
|
|
23
|
+
const {
|
|
24
|
+
classes: e,
|
|
25
|
+
color: a,
|
|
26
|
+
focused: s,
|
|
27
|
+
disabled: t,
|
|
28
|
+
error: c,
|
|
29
|
+
filled: d,
|
|
30
|
+
required: f
|
|
31
|
+
} = r, i = {
|
|
32
|
+
root: ["root", `color${E(a)}`, t && "disabled", c && "error", d && "filled", s && "focused", f && "required"],
|
|
33
|
+
asterisk: ["asterisk", c && "error"]
|
|
34
|
+
};
|
|
35
|
+
return L(i, R, e);
|
|
36
|
+
}, A = x("label", {
|
|
37
|
+
name: "MuiFormLabel",
|
|
38
|
+
slot: "Root",
|
|
39
|
+
overridesResolver: ({
|
|
40
|
+
ownerState: r
|
|
41
|
+
}, e) => l({}, e.root, r.color === "secondary" && e.colorSecondary, r.filled && e.filled)
|
|
42
|
+
})(({
|
|
43
|
+
theme: r,
|
|
44
|
+
ownerState: e
|
|
45
|
+
}) => l({
|
|
46
|
+
color: (r.vars || r).palette.text.secondary
|
|
47
|
+
}, r.typography.body1, {
|
|
48
|
+
lineHeight: "1.4375em",
|
|
49
|
+
padding: 0,
|
|
50
|
+
position: "relative",
|
|
51
|
+
[`&.${m.focused}`]: {
|
|
52
|
+
color: (r.vars || r).palette[e.color].main
|
|
53
|
+
},
|
|
54
|
+
[`&.${m.disabled}`]: {
|
|
55
|
+
color: (r.vars || r).palette.text.disabled
|
|
56
|
+
},
|
|
57
|
+
[`&.${m.error}`]: {
|
|
58
|
+
color: (r.vars || r).palette.error.main
|
|
59
|
+
}
|
|
60
|
+
})), _ = x("span", {
|
|
61
|
+
name: "MuiFormLabel",
|
|
62
|
+
slot: "Asterisk",
|
|
63
|
+
overridesResolver: (r, e) => e.asterisk
|
|
64
|
+
})(({
|
|
65
|
+
theme: r
|
|
66
|
+
}) => ({
|
|
67
|
+
[`&.${m.error}`]: {
|
|
68
|
+
color: (r.vars || r).palette.error.main
|
|
69
|
+
}
|
|
70
|
+
})), q = /* @__PURE__ */ b.forwardRef(function(e, a) {
|
|
71
|
+
const s = g({
|
|
72
|
+
props: e,
|
|
73
|
+
name: "MuiFormLabel"
|
|
74
|
+
}), {
|
|
75
|
+
children: t,
|
|
76
|
+
className: c,
|
|
77
|
+
component: d = "label"
|
|
78
|
+
} = s, f = y(s, j), i = F(), n = N({
|
|
79
|
+
props: s,
|
|
80
|
+
muiFormControl: i,
|
|
81
|
+
states: ["color", "required", "focused", "disabled", "error", "filled"]
|
|
82
|
+
}), p = l({}, s, {
|
|
83
|
+
color: n.color || "primary",
|
|
84
|
+
component: d,
|
|
85
|
+
disabled: n.disabled,
|
|
86
|
+
error: n.error,
|
|
87
|
+
filled: n.filled,
|
|
88
|
+
focused: n.focused,
|
|
89
|
+
required: n.required
|
|
90
|
+
}), u = M(p);
|
|
91
|
+
return /* @__PURE__ */ h(A, l({
|
|
92
|
+
as: d,
|
|
93
|
+
ownerState: p,
|
|
94
|
+
className: O(u.root, c),
|
|
95
|
+
ref: a
|
|
96
|
+
}, f, {
|
|
97
|
+
children: [t, n.required && /* @__PURE__ */ h(_, {
|
|
98
|
+
ownerState: p,
|
|
99
|
+
"aria-hidden": !0,
|
|
100
|
+
className: u.asterisk,
|
|
101
|
+
children: [" ", "*"]
|
|
102
|
+
})]
|
|
103
|
+
}));
|
|
104
|
+
});
|
|
105
|
+
process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
106
|
+
// ----------------------------- Warning --------------------------------
|
|
107
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
108
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
109
|
+
// ----------------------------------------------------------------------
|
|
110
|
+
/**
|
|
111
|
+
* The content of the component.
|
|
112
|
+
*/
|
|
113
|
+
children: o.node,
|
|
114
|
+
/**
|
|
115
|
+
* Override or extend the styles applied to the component.
|
|
116
|
+
*/
|
|
117
|
+
classes: o.object,
|
|
118
|
+
/**
|
|
119
|
+
* @ignore
|
|
120
|
+
*/
|
|
121
|
+
className: o.string,
|
|
122
|
+
/**
|
|
123
|
+
* The color of the component.
|
|
124
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
125
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
126
|
+
*/
|
|
127
|
+
color: o.oneOfType([o.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), o.string]),
|
|
128
|
+
/**
|
|
129
|
+
* The component used for the root node.
|
|
130
|
+
* Either a string to use a HTML element or a component.
|
|
131
|
+
*/
|
|
132
|
+
component: o.elementType,
|
|
133
|
+
/**
|
|
134
|
+
* If `true`, the label should be displayed in a disabled state.
|
|
135
|
+
*/
|
|
136
|
+
disabled: o.bool,
|
|
137
|
+
/**
|
|
138
|
+
* If `true`, the label is displayed in an error state.
|
|
139
|
+
*/
|
|
140
|
+
error: o.bool,
|
|
141
|
+
/**
|
|
142
|
+
* If `true`, the label should use filled classes key.
|
|
143
|
+
*/
|
|
144
|
+
filled: o.bool,
|
|
145
|
+
/**
|
|
146
|
+
* If `true`, the input of this label is focused (used by `FormGroup` components).
|
|
147
|
+
*/
|
|
148
|
+
focused: o.bool,
|
|
149
|
+
/**
|
|
150
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
151
|
+
*/
|
|
152
|
+
required: o.bool,
|
|
153
|
+
/**
|
|
154
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
155
|
+
*/
|
|
156
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
157
|
+
});
|
|
158
|
+
function $(r) {
|
|
159
|
+
return C("MuiInputLabel", r);
|
|
160
|
+
}
|
|
161
|
+
k("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
|
|
162
|
+
const P = ["disableAnimation", "margin", "shrink", "variant", "className"], W = (r) => {
|
|
163
|
+
const {
|
|
164
|
+
classes: e,
|
|
165
|
+
formControl: a,
|
|
166
|
+
size: s,
|
|
167
|
+
shrink: t,
|
|
168
|
+
disableAnimation: c,
|
|
169
|
+
variant: d,
|
|
170
|
+
required: f
|
|
171
|
+
} = r, n = L({
|
|
172
|
+
root: ["root", a && "formControl", !c && "animated", t && "shrink", s === "small" && "sizeSmall", d],
|
|
173
|
+
asterisk: [f && "asterisk"]
|
|
174
|
+
}, $, e);
|
|
175
|
+
return l({}, e, n);
|
|
176
|
+
}, w = x(q, {
|
|
177
|
+
shouldForwardProp: (r) => T(r) || r === "classes",
|
|
178
|
+
name: "MuiInputLabel",
|
|
179
|
+
slot: "Root",
|
|
180
|
+
overridesResolver: (r, e) => {
|
|
181
|
+
const {
|
|
182
|
+
ownerState: a
|
|
183
|
+
} = r;
|
|
184
|
+
return [{
|
|
185
|
+
[`& .${m.asterisk}`]: e.asterisk
|
|
186
|
+
}, e.root, a.formControl && e.formControl, a.size === "small" && e.sizeSmall, a.shrink && e.shrink, !a.disableAnimation && e.animated, e[a.variant]];
|
|
187
|
+
}
|
|
188
|
+
})(({
|
|
189
|
+
theme: r,
|
|
190
|
+
ownerState: e
|
|
191
|
+
}) => l({
|
|
192
|
+
display: "block",
|
|
193
|
+
transformOrigin: "top left",
|
|
194
|
+
whiteSpace: "nowrap",
|
|
195
|
+
overflow: "hidden",
|
|
196
|
+
textOverflow: "ellipsis",
|
|
197
|
+
maxWidth: "100%"
|
|
198
|
+
}, e.formControl && {
|
|
199
|
+
position: "absolute",
|
|
200
|
+
left: 0,
|
|
201
|
+
top: 0,
|
|
202
|
+
// slight alteration to spec spacing to match visual spec result
|
|
203
|
+
transform: "translate(0, 20px) scale(1)"
|
|
204
|
+
}, e.size === "small" && {
|
|
205
|
+
// Compensation for the `Input.inputSizeSmall` style.
|
|
206
|
+
transform: "translate(0, 17px) scale(1)"
|
|
207
|
+
}, e.shrink && {
|
|
208
|
+
transform: "translate(0, -1.5px) scale(0.75)",
|
|
209
|
+
transformOrigin: "top left",
|
|
210
|
+
maxWidth: "133%"
|
|
211
|
+
}, !e.disableAnimation && {
|
|
212
|
+
transition: r.transitions.create(["color", "transform", "max-width"], {
|
|
213
|
+
duration: r.transitions.duration.shorter,
|
|
214
|
+
easing: r.transitions.easing.easeOut
|
|
215
|
+
})
|
|
216
|
+
}, e.variant === "filled" && l({
|
|
217
|
+
// Chrome's autofill feature gives the input field a yellow background.
|
|
218
|
+
// Since the input field is behind the label in the HTML tree,
|
|
219
|
+
// the input field is drawn last and hides the label with an opaque background color.
|
|
220
|
+
// zIndex: 1 will raise the label above opaque background-colors of input.
|
|
221
|
+
zIndex: 1,
|
|
222
|
+
pointerEvents: "none",
|
|
223
|
+
transform: "translate(12px, 16px) scale(1)",
|
|
224
|
+
maxWidth: "calc(100% - 24px)"
|
|
225
|
+
}, e.size === "small" && {
|
|
226
|
+
transform: "translate(12px, 13px) scale(1)"
|
|
227
|
+
}, e.shrink && l({
|
|
228
|
+
userSelect: "none",
|
|
229
|
+
pointerEvents: "auto",
|
|
230
|
+
transform: "translate(12px, 7px) scale(0.75)",
|
|
231
|
+
maxWidth: "calc(133% - 24px)"
|
|
232
|
+
}, e.size === "small" && {
|
|
233
|
+
transform: "translate(12px, 4px) scale(0.75)"
|
|
234
|
+
})), e.variant === "outlined" && l({
|
|
235
|
+
// see comment above on filled.zIndex
|
|
236
|
+
zIndex: 1,
|
|
237
|
+
pointerEvents: "none",
|
|
238
|
+
transform: "translate(14px, 16px) scale(1)",
|
|
239
|
+
maxWidth: "calc(100% - 24px)"
|
|
240
|
+
}, e.size === "small" && {
|
|
241
|
+
transform: "translate(14px, 9px) scale(1)"
|
|
242
|
+
}, e.shrink && {
|
|
243
|
+
userSelect: "none",
|
|
244
|
+
pointerEvents: "auto",
|
|
245
|
+
// Theoretically, we should have (8+5)*2/0.75 = 34px
|
|
246
|
+
// but it feels a better when it bleeds a bit on the left, so 32px.
|
|
247
|
+
maxWidth: "calc(133% - 32px)",
|
|
248
|
+
transform: "translate(14px, -9px) scale(0.75)"
|
|
249
|
+
}))), S = /* @__PURE__ */ b.forwardRef(function(e, a) {
|
|
250
|
+
const s = g({
|
|
251
|
+
name: "MuiInputLabel",
|
|
252
|
+
props: e
|
|
253
|
+
}), {
|
|
254
|
+
disableAnimation: t = !1,
|
|
255
|
+
shrink: c,
|
|
256
|
+
className: d
|
|
257
|
+
} = s, f = y(s, P), i = F();
|
|
258
|
+
let n = c;
|
|
259
|
+
typeof n > "u" && i && (n = i.filled || i.focused || i.adornedStart);
|
|
260
|
+
const p = N({
|
|
261
|
+
props: s,
|
|
262
|
+
muiFormControl: i,
|
|
263
|
+
states: ["size", "variant", "required"]
|
|
264
|
+
}), u = l({}, s, {
|
|
265
|
+
disableAnimation: t,
|
|
266
|
+
formControl: i,
|
|
267
|
+
shrink: n,
|
|
268
|
+
size: p.size,
|
|
269
|
+
variant: p.variant,
|
|
270
|
+
required: p.required
|
|
271
|
+
}), v = W(u);
|
|
272
|
+
return /* @__PURE__ */ I(w, l({
|
|
273
|
+
"data-shrink": n,
|
|
274
|
+
ownerState: u,
|
|
275
|
+
ref: a,
|
|
276
|
+
className: O(v.root, d)
|
|
277
|
+
}, f, {
|
|
278
|
+
classes: v
|
|
279
|
+
}));
|
|
280
|
+
});
|
|
281
|
+
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
282
|
+
// ----------------------------- Warning --------------------------------
|
|
283
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
284
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
285
|
+
// ----------------------------------------------------------------------
|
|
286
|
+
/**
|
|
287
|
+
* The content of the component.
|
|
288
|
+
*/
|
|
289
|
+
children: o.node,
|
|
290
|
+
/**
|
|
291
|
+
* Override or extend the styles applied to the component.
|
|
292
|
+
*/
|
|
293
|
+
classes: o.object,
|
|
294
|
+
/**
|
|
295
|
+
* @ignore
|
|
296
|
+
*/
|
|
297
|
+
className: o.string,
|
|
298
|
+
/**
|
|
299
|
+
* The color of the component.
|
|
300
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
301
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
302
|
+
*/
|
|
303
|
+
color: o.oneOfType([o.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), o.string]),
|
|
304
|
+
/**
|
|
305
|
+
* If `true`, the transition animation is disabled.
|
|
306
|
+
* @default false
|
|
307
|
+
*/
|
|
308
|
+
disableAnimation: o.bool,
|
|
309
|
+
/**
|
|
310
|
+
* If `true`, the component is disabled.
|
|
311
|
+
*/
|
|
312
|
+
disabled: o.bool,
|
|
313
|
+
/**
|
|
314
|
+
* If `true`, the label is displayed in an error state.
|
|
315
|
+
*/
|
|
316
|
+
error: o.bool,
|
|
317
|
+
/**
|
|
318
|
+
* If `true`, the `input` of this label is focused.
|
|
319
|
+
*/
|
|
320
|
+
focused: o.bool,
|
|
321
|
+
/**
|
|
322
|
+
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
|
323
|
+
* FormControl.
|
|
324
|
+
*/
|
|
325
|
+
margin: o.oneOf(["dense"]),
|
|
326
|
+
/**
|
|
327
|
+
* if `true`, the label will indicate that the `input` is required.
|
|
328
|
+
*/
|
|
329
|
+
required: o.bool,
|
|
330
|
+
/**
|
|
331
|
+
* If `true`, the label is shrunk.
|
|
332
|
+
*/
|
|
333
|
+
shrink: o.bool,
|
|
334
|
+
/**
|
|
335
|
+
* The size of the component.
|
|
336
|
+
* @default 'normal'
|
|
337
|
+
*/
|
|
338
|
+
size: o.oneOfType([o.oneOf(["normal", "small"]), o.string]),
|
|
339
|
+
/**
|
|
340
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
341
|
+
*/
|
|
342
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
343
|
+
/**
|
|
344
|
+
* The variant to use.
|
|
345
|
+
*/
|
|
346
|
+
variant: o.oneOf(["filled", "outlined", "standard"])
|
|
347
|
+
});
|
|
348
|
+
export {
|
|
349
|
+
q as F,
|
|
350
|
+
S as I,
|
|
351
|
+
z as a,
|
|
352
|
+
N as f,
|
|
353
|
+
F as u
|
|
354
|
+
};
|