@cgi-learning-hub/ui 1.0.0 → 1.1.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.
- package/dist/Box-5x1F2S3-.cjs +1 -0
- package/dist/{Box-BHWJ-D81.js → Box-Bawb5zHX.js} +24 -23
- package/dist/Button-C__-QOJY.js +359 -0
- package/dist/Button-DKIRmOzf.cjs +1 -0
- package/dist/{ButtonBase-BpYorbzW.js → ButtonBase-4F5roLHd.js} +36 -37
- package/dist/ButtonBase-Bw3wq81v.cjs +75 -0
- package/dist/{CircularProgress-C8TogtEK.js → CircularProgress-BNazIBar.js} +30 -30
- package/dist/CircularProgress-WnNPMTjD.cjs +28 -0
- package/dist/DatePicker-B0jLSEvZ.cjs +19 -0
- package/dist/DatePicker-DGVeagTz.js +12663 -0
- package/dist/DefaultButton-F67BOmrx.js +258 -0
- package/dist/DefaultButton-y-mHSNFH.cjs +1 -0
- package/dist/{IconButton-Hsn7HKeI.js → IconButton-D_deQOvN.js} +15 -15
- package/dist/IconButton-DhWgsgQ7.cjs +2 -0
- package/dist/InputAdornment-DYqMrYJz.cjs +1 -0
- package/dist/InputAdornment-hNrnvXW9.js +153 -0
- package/dist/InputBase-BeZ70Fbf.cjs +3 -0
- package/dist/{InputBase-BdOkEcEz.js → InputBase-DNkF-TAp.js} +218 -217
- package/dist/Stack-BJ2ths-g.js +172 -0
- package/dist/Stack-BOcvai-O.cjs +1 -0
- package/dist/Tabs-CG428TT3.cjs +4 -0
- package/dist/{Tabs-C8ECGIYh.js → Tabs-CWujD0SK.js} +33 -33
- package/dist/{TextInput-CpnUc54E.js → TextField-DDmGQyEr.js} +3607 -3603
- package/dist/TextField-wYRnAj1v.cjs +12 -0
- package/dist/Tooltip-D42pzHKW.js +7463 -0
- package/dist/Tooltip-O30xWGZU.cjs +95 -0
- package/dist/{Typography-D9Jbc-Y5.js → Typography-B2XMXu83.js} +18 -18
- package/dist/Typography-DR_aF9lJ.cjs +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +2 -3
- package/dist/components/Dropzone/Dropzone.es.js +212 -240
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.d.ts +0 -1
- package/dist/components/Loader/Loader.es.js +9 -9
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -2
- package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -0
- package/dist/components/PaperHeader/PaperHeader.d.ts +13 -0
- package/dist/components/PaperHeader/PaperHeader.es.js +41 -0
- package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -0
- package/dist/components/PaperHeader/PaperHeader.stories.d.ts +5 -0
- package/dist/components/PaperHeader/PaperHeader.stories.es.js +28 -0
- package/dist/components/PaperHeader/index.cjs.js +1 -0
- package/dist/components/PaperHeader/index.d.ts +2 -0
- package/dist/components/PaperHeader/index.es.js +4 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +14 -14
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +3 -3
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +0 -1
- package/dist/components/feedback/QueryError/QueryError.cjs.js +1 -1
- package/dist/components/feedback/QueryError/QueryError.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +37 -21
- package/dist/components/index.es.js +271 -186
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +13 -15
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +36 -5
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +4 -3
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.es.js +2 -2
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +6 -6
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +6 -6
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +27 -26
- package/dist/components/pickers/DatePicker/DatePicker.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/pickers/DatePicker/DatePicker.es.js +6 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/components/pickers/DatePicker/DatePicker.stories.es.js +16 -0
- package/dist/components/pickers/DatePicker/index.cjs.js +1 -0
- package/dist/components/pickers/DatePicker/index.d.ts +2 -0
- package/dist/components/pickers/DatePicker/index.es.js +4 -0
- package/dist/components/pickers/index.cjs.js +1 -0
- package/dist/components/pickers/index.d.ts +1 -0
- package/dist/components/pickers/index.es.js +4 -0
- package/dist/createStyled-CzVedz8V.js +142 -0
- package/dist/createStyled-LobpFGWo.cjs +1 -0
- package/dist/{createSvgIcon-BpzrJYC7.js → createSvgIcon-B8vHI3I6.js} +12 -12
- package/dist/createSvgIcon-BGm-SWUB.cjs +1 -0
- package/dist/createSvgIcon-CKlvKClV.cjs +2 -0
- package/dist/{createSvgIcon-CbXClqUM.js → createSvgIcon-DjuUwmEp.js} +21 -20
- package/dist/fr-By4s91yO.js +307 -0
- package/dist/fr-TRjulm1Q.cjs +1 -0
- package/dist/identifier-4KVhx666.cjs +50 -0
- package/dist/identifier-D-ng7Qqa.js +3047 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +273 -189
- package/dist/refType-BhXrhWFB.cjs +1 -0
- package/dist/{refType-CD9RZ5PF.js → refType-COGEdfch.js} +1 -1
- package/dist/styled-ZF_yhfMW.cjs +17 -0
- package/dist/styled-xiAudcD_.js +533 -0
- package/dist/useForkRef-CGd3Nhyb.cjs +1 -0
- package/dist/{useIsFocusVisible-B2ErvDHn.cjs → useIsFocusVisible-Bv_7uvif.cjs} +1 -1
- package/dist/{useIsFocusVisible-BsjI7Zxf.js → useIsFocusVisible-DhASXQ4o.js} +1 -1
- package/dist/useTheme-B5RCz7rY.cjs +1 -0
- package/dist/useTheme-CjBTq22m.js +18 -0
- package/dist/{useSlotProps-BCdUhJUO.js → useTheme-iNHILPzK.js} +41 -29
- package/dist/useTheme-kqsjFBnC.cjs +1 -0
- package/dist/useThemeProps-B-Oq4Y2j.cjs +1 -0
- package/dist/useThemeProps-BHAsCmc4.cjs +1 -0
- package/dist/useThemeProps-BM4fCFq5.js +27 -0
- package/dist/useThemeProps-BVvSbkPP.js +17 -0
- package/dist/{useTimeout-Dokw0W_A.js → useTimeout-BdvDipeg.js} +1 -1
- package/dist/{useTimeout-D8rbe5ty.cjs → useTimeout-XUWYBnl6.cjs} +1 -1
- package/package.json +18 -16
- package/dist/Box-DjpT-6Yv.cjs +0 -1
- package/dist/ButtonBase-BHN-4x4u.cjs +0 -75
- package/dist/CircularProgress-CjET2rvP.cjs +0 -28
- package/dist/DefaultButton-BoDg7xMm.cjs +0 -1
- package/dist/DefaultButton-y5BL9CKZ.js +0 -601
- package/dist/IconButton-fqTVX40x.cjs +0 -2
- package/dist/InputBase-DLc7Nf1T.cjs +0 -3
- package/dist/LocalizationProvider-B28kINsn.js +0 -575
- package/dist/LocalizationProvider-U4FHK15N.cjs +0 -5
- package/dist/SearchInput-B_Mgl-CJ.cjs +0 -1
- package/dist/SearchInput-DVccMSI6.js +0 -186
- package/dist/Tabs-Cij7O-J8.cjs +0 -4
- package/dist/TextInput-5zTkdX7s.cjs +0 -12
- package/dist/TimePicker-BRY05Sej.cjs +0 -73
- package/dist/TimePicker-CLolXFl8.js +0 -22074
- package/dist/Typography-6WB4M4zs.cjs +0 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +0 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +0 -7
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +0 -6
- package/dist/components/LocalizationProvider/index.cjs.js +0 -1
- package/dist/components/LocalizationProvider/index.d.ts +0 -2
- package/dist/components/LocalizationProvider/index.es.js +0 -4
- package/dist/createSvgIcon-DQmDu_xr.cjs +0 -2
- package/dist/createSvgIcon-O41BSqQe.cjs +0 -1
- package/dist/fr-LokUOTE7.cjs +0 -1
- package/dist/fr-ndKV9IhC.js +0 -335
- package/dist/refType-DR4z34r8.cjs +0 -1
- package/dist/styled-D6_yEe4a.cjs +0 -26
- package/dist/styled-DSGBDqKV.js +0 -1218
- package/dist/useForkRef-DfdM2MN5.cjs +0 -1
- package/dist/useSlotProps-CXRrw38p.cjs +0 -1
- package/dist/useThemeProps-BktqG0To.cjs +0 -42
- package/dist/useThemeProps-DJpU2Yr7.js +0 -2428
- package/dist/{useForkRef-CQ5u1_mH.js → useForkRef-DwN_Iz9R.js} +1 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { a as
|
|
6
|
-
import { a as
|
|
7
|
-
import { i as
|
|
8
|
-
import { e as
|
|
9
|
-
|
|
1
|
+
import { K as ke, P as e, _ as ye, m as d, T as Be, v as Pe, w as Me, x as pe, q as Q, L as He } from "./identifier-D-ng7Qqa.js";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { d as De, s as be, u as We, c as Ve } from "./styled-xiAudcD_.js";
|
|
4
|
+
import { jsx as N, jsxs as X } from "react/jsx-runtime";
|
|
5
|
+
import { a as ge, u as ee } from "./useForkRef-DwN_Iz9R.js";
|
|
6
|
+
import { a as fe, d as Le } from "./ownerWindow-C7EH1lr6.js";
|
|
7
|
+
import { i as me } from "./isHostComponent-kiaBvYVo.js";
|
|
8
|
+
import { e as _e, r as je } from "./refType-COGEdfch.js";
|
|
9
|
+
import { u as Ue } from "./useTheme-CjBTq22m.js";
|
|
10
|
+
function we({
|
|
10
11
|
styles: o,
|
|
11
12
|
themeId: n,
|
|
12
13
|
defaultTheme: t = {}
|
|
13
14
|
}) {
|
|
14
|
-
const s =
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
const s = Ue(t), i = typeof o == "function" ? o(n && s[n] || s) : o;
|
|
16
|
+
return /* @__PURE__ */ N(ke, {
|
|
16
17
|
styles: i
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
process.env.NODE_ENV !== "production" && (
|
|
20
|
+
process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
20
21
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21
22
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
22
23
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -34,16 +35,32 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
|
34
35
|
*/
|
|
35
36
|
themeId: e.string
|
|
36
37
|
});
|
|
37
|
-
const
|
|
38
|
-
process.env.NODE_ENV !== "production" && (
|
|
38
|
+
const ne = /* @__PURE__ */ l.createContext(void 0);
|
|
39
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "FormControlContext");
|
|
39
40
|
function $e() {
|
|
40
|
-
return
|
|
41
|
+
return l.useContext(ne);
|
|
42
|
+
}
|
|
43
|
+
function he(o) {
|
|
44
|
+
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
45
|
+
}
|
|
46
|
+
function Ke(o, n = !1) {
|
|
47
|
+
return o && (he(o.value) && o.value !== "" || n && he(o.defaultValue) && o.defaultValue !== "");
|
|
41
48
|
}
|
|
42
|
-
|
|
49
|
+
function ho(o) {
|
|
50
|
+
return o.startAdornment;
|
|
51
|
+
}
|
|
52
|
+
function Ge({
|
|
53
|
+
props: o,
|
|
54
|
+
states: n,
|
|
55
|
+
muiFormControl: t
|
|
56
|
+
}) {
|
|
57
|
+
return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
|
|
58
|
+
}
|
|
59
|
+
const qe = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
43
60
|
function L(o) {
|
|
44
61
|
return parseInt(o, 10) || 0;
|
|
45
62
|
}
|
|
46
|
-
const
|
|
63
|
+
const Ye = {
|
|
47
64
|
shadow: {
|
|
48
65
|
// Visibility needed to hide the extra text area on iPads
|
|
49
66
|
visibility: "hidden",
|
|
@@ -58,87 +75,87 @@ const Ke = {
|
|
|
58
75
|
transform: "translateZ(0)"
|
|
59
76
|
}
|
|
60
77
|
};
|
|
61
|
-
function
|
|
78
|
+
function Ze(o) {
|
|
62
79
|
return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
|
|
63
80
|
}
|
|
64
|
-
const
|
|
81
|
+
const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
|
|
65
82
|
const {
|
|
66
83
|
onChange: s,
|
|
67
84
|
maxRows: i,
|
|
68
85
|
minRows: p = 1,
|
|
69
|
-
style:
|
|
70
|
-
value:
|
|
71
|
-
} = n,
|
|
86
|
+
style: z,
|
|
87
|
+
value: A
|
|
88
|
+
} = n, B = ye(n, qe), {
|
|
72
89
|
current: R
|
|
73
|
-
} =
|
|
74
|
-
const c = b.current,
|
|
75
|
-
if (
|
|
90
|
+
} = l.useRef(A != null), b = l.useRef(null), I = ge(t, b), g = l.useRef(null), T = l.useRef(null), v = l.useCallback(() => {
|
|
91
|
+
const c = b.current, f = fe(c).getComputedStyle(c);
|
|
92
|
+
if (f.width === "0px")
|
|
76
93
|
return {
|
|
77
94
|
outerHeightStyle: 0,
|
|
78
95
|
overflowing: !1
|
|
79
96
|
};
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
` && (
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
let
|
|
87
|
-
p && (
|
|
88
|
-
const H =
|
|
97
|
+
const m = T.current;
|
|
98
|
+
m.style.width = f.width, m.value = c.value || n.placeholder || "x", m.value.slice(-1) === `
|
|
99
|
+
` && (m.value += " ");
|
|
100
|
+
const E = f.boxSizing, O = L(f.paddingBottom) + L(f.paddingTop), x = L(f.borderBottomWidth) + L(f.borderTopWidth), S = m.scrollHeight;
|
|
101
|
+
m.value = "x";
|
|
102
|
+
const F = m.scrollHeight;
|
|
103
|
+
let y = S;
|
|
104
|
+
p && (y = Math.max(Number(p) * F, y)), i && (y = Math.min(Number(i) * F, y)), y = Math.max(y, F);
|
|
105
|
+
const H = y + (E === "border-box" ? O + x : 0), j = Math.abs(y - S) <= 1;
|
|
89
106
|
return {
|
|
90
107
|
outerHeightStyle: H,
|
|
91
|
-
overflowing:
|
|
108
|
+
overflowing: j
|
|
92
109
|
};
|
|
93
|
-
}, [i, p, n.placeholder]),
|
|
94
|
-
const c =
|
|
95
|
-
if (
|
|
110
|
+
}, [i, p, n.placeholder]), C = l.useCallback(() => {
|
|
111
|
+
const c = v();
|
|
112
|
+
if (Ze(c))
|
|
96
113
|
return;
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
}, [
|
|
100
|
-
|
|
114
|
+
const u = c.outerHeightStyle, f = b.current;
|
|
115
|
+
g.current !== u && (g.current = u, f.style.height = `${u}px`), f.style.overflow = c.overflowing ? "hidden" : "";
|
|
116
|
+
}, [v]);
|
|
117
|
+
ee(() => {
|
|
101
118
|
const c = () => {
|
|
102
|
-
|
|
119
|
+
C();
|
|
103
120
|
};
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
cancelAnimationFrame(
|
|
121
|
+
let u;
|
|
122
|
+
const f = () => {
|
|
123
|
+
cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
107
124
|
c();
|
|
108
125
|
});
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
return typeof ResizeObserver < "u" && (
|
|
113
|
-
|
|
126
|
+
}, m = Le(c), E = b.current, O = fe(E);
|
|
127
|
+
O.addEventListener("resize", m);
|
|
128
|
+
let x;
|
|
129
|
+
return typeof ResizeObserver < "u" && (x = new ResizeObserver(process.env.NODE_ENV === "test" ? f : c), x.observe(E)), () => {
|
|
130
|
+
m.clear(), cancelAnimationFrame(u), O.removeEventListener("resize", m), x && x.disconnect();
|
|
114
131
|
};
|
|
115
|
-
}, [
|
|
116
|
-
|
|
132
|
+
}, [v, C]), ee(() => {
|
|
133
|
+
C();
|
|
117
134
|
});
|
|
118
|
-
const
|
|
119
|
-
R ||
|
|
135
|
+
const _ = (c) => {
|
|
136
|
+
R || C(), s && s(c);
|
|
120
137
|
};
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
children: [/* @__PURE__ */
|
|
123
|
-
value:
|
|
124
|
-
onChange:
|
|
125
|
-
ref:
|
|
138
|
+
return /* @__PURE__ */ X(l.Fragment, {
|
|
139
|
+
children: [/* @__PURE__ */ N("textarea", d({
|
|
140
|
+
value: A,
|
|
141
|
+
onChange: _,
|
|
142
|
+
ref: I,
|
|
126
143
|
rows: p,
|
|
127
|
-
style:
|
|
128
|
-
},
|
|
144
|
+
style: z
|
|
145
|
+
}, B)), /* @__PURE__ */ N("textarea", {
|
|
129
146
|
"aria-hidden": !0,
|
|
130
147
|
className: n.className,
|
|
131
148
|
readOnly: !0,
|
|
132
|
-
ref:
|
|
149
|
+
ref: T,
|
|
133
150
|
tabIndex: -1,
|
|
134
|
-
style: d({},
|
|
151
|
+
style: d({}, Ye.shadow, z, {
|
|
135
152
|
paddingTop: 0,
|
|
136
153
|
paddingBottom: 0
|
|
137
154
|
})
|
|
138
155
|
})]
|
|
139
156
|
});
|
|
140
157
|
});
|
|
141
|
-
process.env.NODE_ENV !== "production" && (
|
|
158
|
+
process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
142
159
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
143
160
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
144
161
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -173,20 +190,13 @@ process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
|
173
190
|
*/
|
|
174
191
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
175
192
|
});
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}) {
|
|
181
|
-
return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
|
|
182
|
-
}
|
|
183
|
-
function ve(o) {
|
|
184
|
-
return /* @__PURE__ */ O(ge, d({}, o, {
|
|
185
|
-
defaultTheme: Be,
|
|
186
|
-
themeId: Pe
|
|
193
|
+
function Ce(o) {
|
|
194
|
+
return /* @__PURE__ */ N(we, d({}, o, {
|
|
195
|
+
defaultTheme: De,
|
|
196
|
+
themeId: Be
|
|
187
197
|
}));
|
|
188
198
|
}
|
|
189
|
-
process.env.NODE_ENV !== "production" && (
|
|
199
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
190
200
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
191
201
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
192
202
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -196,23 +206,14 @@ process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
|
196
206
|
*/
|
|
197
207
|
styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
|
|
198
208
|
});
|
|
199
|
-
function me(o) {
|
|
200
|
-
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
201
|
-
}
|
|
202
|
-
function Ze(o, n = !1) {
|
|
203
|
-
return o && (me(o.value) && o.value !== "" || n && me(o.defaultValue) && o.defaultValue !== "");
|
|
204
|
-
}
|
|
205
|
-
function mo(o) {
|
|
206
|
-
return o.startAdornment;
|
|
207
|
-
}
|
|
208
209
|
function Je(o) {
|
|
209
210
|
return Me("MuiInputBase", o);
|
|
210
211
|
}
|
|
211
|
-
const
|
|
212
|
+
const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), Qe = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], Xe = (o, n) => {
|
|
212
213
|
const {
|
|
213
214
|
ownerState: t
|
|
214
215
|
} = o;
|
|
215
|
-
return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${
|
|
216
|
+
return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${Q(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
|
|
216
217
|
}, eo = (o, n) => {
|
|
217
218
|
const {
|
|
218
219
|
ownerState: t
|
|
@@ -225,20 +226,20 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
225
226
|
disabled: s,
|
|
226
227
|
error: i,
|
|
227
228
|
endAdornment: p,
|
|
228
|
-
focused:
|
|
229
|
-
formControl:
|
|
230
|
-
fullWidth:
|
|
229
|
+
focused: z,
|
|
230
|
+
formControl: A,
|
|
231
|
+
fullWidth: B,
|
|
231
232
|
hiddenLabel: R,
|
|
232
233
|
multiline: b,
|
|
233
|
-
readOnly:
|
|
234
|
-
size:
|
|
235
|
-
startAdornment:
|
|
236
|
-
type:
|
|
237
|
-
} = o,
|
|
238
|
-
root: ["root", `color${
|
|
239
|
-
input: ["input", s && "disabled",
|
|
234
|
+
readOnly: I,
|
|
235
|
+
size: g,
|
|
236
|
+
startAdornment: T,
|
|
237
|
+
type: v
|
|
238
|
+
} = o, C = {
|
|
239
|
+
root: ["root", `color${Q(t)}`, s && "disabled", i && "error", B && "fullWidth", z && "focused", A && "formControl", g && g !== "medium" && `size${Q(g)}`, b && "multiline", T && "adornedStart", p && "adornedEnd", R && "hiddenLabel", I && "readOnly"],
|
|
240
|
+
input: ["input", s && "disabled", v === "search" && "inputTypeSearch", b && "inputMultiline", g === "small" && "inputSizeSmall", R && "inputHiddenLabel", T && "inputAdornedStart", p && "inputAdornedEnd", I && "readOnly"]
|
|
240
241
|
};
|
|
241
|
-
return
|
|
242
|
+
return Ve(C, Je, n);
|
|
242
243
|
}, no = be("div", {
|
|
243
244
|
name: "MuiInputBase",
|
|
244
245
|
slot: "Root",
|
|
@@ -256,7 +257,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
256
257
|
cursor: "text",
|
|
257
258
|
display: "inline-flex",
|
|
258
259
|
alignItems: "center",
|
|
259
|
-
[`&.${
|
|
260
|
+
[`&.${oe.disabled}`]: {
|
|
260
261
|
color: (o.vars || o).palette.text.disabled,
|
|
261
262
|
cursor: "default"
|
|
262
263
|
}
|
|
@@ -330,7 +331,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
330
331
|
WebkitAppearance: "none"
|
|
331
332
|
},
|
|
332
333
|
// Show and hide the placeholder logic
|
|
333
|
-
[`label[data-shrink=false] + .${
|
|
334
|
+
[`label[data-shrink=false] + .${oe.formControl} &`]: {
|
|
334
335
|
"&::-webkit-input-placeholder": i,
|
|
335
336
|
"&::-moz-placeholder": i,
|
|
336
337
|
// Firefox 19+
|
|
@@ -346,7 +347,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
346
347
|
"&:focus::-ms-input-placeholder": p
|
|
347
348
|
// Edge
|
|
348
349
|
},
|
|
349
|
-
[`&.${
|
|
350
|
+
[`&.${oe.disabled}`]: {
|
|
350
351
|
opacity: 1,
|
|
351
352
|
// Reset iOS opacity
|
|
352
353
|
WebkitTextFillColor: (o.vars || o).palette.text.disabled
|
|
@@ -367,7 +368,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
367
368
|
// Improve type search style.
|
|
368
369
|
MozAppearance: "textfield"
|
|
369
370
|
});
|
|
370
|
-
}), ro = /* @__PURE__ */
|
|
371
|
+
}), ro = /* @__PURE__ */ N(Ce, {
|
|
371
372
|
styles: {
|
|
372
373
|
"@keyframes mui-auto-fill": {
|
|
373
374
|
from: {
|
|
@@ -380,170 +381,170 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
380
381
|
}
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
|
-
}), io = /* @__PURE__ */
|
|
384
|
+
}), io = /* @__PURE__ */ l.forwardRef(function(n, t) {
|
|
384
385
|
var s;
|
|
385
|
-
const i =
|
|
386
|
+
const i = We({
|
|
386
387
|
props: n,
|
|
387
388
|
name: "MuiInputBase"
|
|
388
389
|
}), {
|
|
389
390
|
"aria-describedby": p,
|
|
390
|
-
autoComplete:
|
|
391
|
-
autoFocus:
|
|
392
|
-
className:
|
|
391
|
+
autoComplete: z,
|
|
392
|
+
autoFocus: A,
|
|
393
|
+
className: B,
|
|
393
394
|
components: R = {},
|
|
394
395
|
componentsProps: b = {},
|
|
395
|
-
defaultValue:
|
|
396
|
-
disabled:
|
|
397
|
-
disableInjectingGlobalStyles:
|
|
398
|
-
endAdornment:
|
|
399
|
-
fullWidth:
|
|
400
|
-
id:
|
|
401
|
-
inputComponent:
|
|
402
|
-
inputProps:
|
|
396
|
+
defaultValue: I,
|
|
397
|
+
disabled: g,
|
|
398
|
+
disableInjectingGlobalStyles: T,
|
|
399
|
+
endAdornment: v,
|
|
400
|
+
fullWidth: C = !1,
|
|
401
|
+
id: _,
|
|
402
|
+
inputComponent: c = "input",
|
|
403
|
+
inputProps: u = {},
|
|
403
404
|
inputRef: f,
|
|
404
|
-
maxRows:
|
|
405
|
+
maxRows: m,
|
|
405
406
|
minRows: E,
|
|
406
|
-
multiline:
|
|
407
|
-
name:
|
|
408
|
-
onBlur:
|
|
409
|
-
onChange:
|
|
410
|
-
onClick:
|
|
411
|
-
onFocus:
|
|
412
|
-
onKeyDown:
|
|
407
|
+
multiline: O = !1,
|
|
408
|
+
name: x,
|
|
409
|
+
onBlur: S,
|
|
410
|
+
onChange: F,
|
|
411
|
+
onClick: y,
|
|
412
|
+
onFocus: H,
|
|
413
|
+
onKeyDown: j,
|
|
413
414
|
onKeyUp: xe,
|
|
414
415
|
placeholder: Se,
|
|
415
|
-
readOnly:
|
|
416
|
-
renderSuffix:
|
|
416
|
+
readOnly: U,
|
|
417
|
+
renderSuffix: te,
|
|
417
418
|
rows: D,
|
|
418
|
-
slotProps:
|
|
419
|
-
slots:
|
|
420
|
-
startAdornment:
|
|
421
|
-
type:
|
|
419
|
+
slotProps: re = {},
|
|
420
|
+
slots: ie = {},
|
|
421
|
+
startAdornment: P,
|
|
422
|
+
type: ae = "text",
|
|
422
423
|
value: Re
|
|
423
|
-
} = i, Te =
|
|
424
|
-
current:
|
|
425
|
-
} =
|
|
424
|
+
} = i, Te = ye(i, Qe), W = u.value != null ? u.value : Re, {
|
|
425
|
+
current: $
|
|
426
|
+
} = l.useRef(W != null), k = l.useRef(), Ee = l.useCallback((r) => {
|
|
426
427
|
process.env.NODE_ENV !== "production" && r && r.nodeName !== "INPUT" && !r.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
427
428
|
`));
|
|
428
|
-
}, []), Oe =
|
|
429
|
-
process.env.NODE_ENV !== "production" &&
|
|
429
|
+
}, []), Oe = ge(k, f, u.ref, Ee), [K, G] = l.useState(!1), a = $e();
|
|
430
|
+
process.env.NODE_ENV !== "production" && l.useEffect(() => {
|
|
430
431
|
if (a)
|
|
431
432
|
return a.registerEffect();
|
|
432
433
|
}, [a]);
|
|
433
|
-
const
|
|
434
|
+
const h = Ge({
|
|
434
435
|
props: i,
|
|
435
436
|
muiFormControl: a,
|
|
436
437
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
437
438
|
});
|
|
438
|
-
|
|
439
|
-
!a &&
|
|
440
|
-
}, [a,
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
}, [
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
value:
|
|
439
|
+
h.focused = a ? a.focused : K, l.useEffect(() => {
|
|
440
|
+
!a && g && K && (G(!1), S && S());
|
|
441
|
+
}, [a, g, K, S]);
|
|
442
|
+
const q = a && a.onFilled, Y = a && a.onEmpty, M = l.useCallback((r) => {
|
|
443
|
+
Ke(r) ? q && q() : Y && Y();
|
|
444
|
+
}, [q, Y]);
|
|
445
|
+
ee(() => {
|
|
446
|
+
$ && M({
|
|
447
|
+
value: W
|
|
447
448
|
});
|
|
448
|
-
}, [
|
|
449
|
+
}, [W, M, $]);
|
|
449
450
|
const Ne = (r) => {
|
|
450
|
-
if (
|
|
451
|
+
if (h.disabled) {
|
|
451
452
|
r.stopPropagation();
|
|
452
453
|
return;
|
|
453
454
|
}
|
|
454
|
-
|
|
455
|
+
H && H(r), u.onFocus && u.onFocus(r), a && a.onFocus ? a.onFocus(r) : G(!0);
|
|
455
456
|
}, ze = (r) => {
|
|
456
|
-
|
|
457
|
-
}, Ae = (r, ...
|
|
458
|
-
if (
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." :
|
|
462
|
-
|
|
463
|
-
value:
|
|
457
|
+
S && S(r), u.onBlur && u.onBlur(r), a && a.onBlur ? a.onBlur(r) : G(!1);
|
|
458
|
+
}, Ae = (r, ...de) => {
|
|
459
|
+
if (!$) {
|
|
460
|
+
const ce = r.target || k.current;
|
|
461
|
+
if (ce == null)
|
|
462
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : He(1));
|
|
463
|
+
M({
|
|
464
|
+
value: ce.value
|
|
464
465
|
});
|
|
465
466
|
}
|
|
466
|
-
|
|
467
|
+
u.onChange && u.onChange(r, ...de), F && F(r, ...de);
|
|
467
468
|
};
|
|
468
|
-
|
|
469
|
-
|
|
469
|
+
l.useEffect(() => {
|
|
470
|
+
M(k.current);
|
|
470
471
|
}, []);
|
|
471
472
|
const Ie = (r) => {
|
|
472
|
-
|
|
473
|
+
k.current && r.currentTarget === r.target && k.current.focus(), y && y(r);
|
|
473
474
|
};
|
|
474
|
-
let
|
|
475
|
-
|
|
475
|
+
let Z = c, w = u;
|
|
476
|
+
O && Z === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || m) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = d({
|
|
476
477
|
type: void 0,
|
|
477
478
|
minRows: D,
|
|
478
479
|
maxRows: D
|
|
479
|
-
},
|
|
480
|
+
}, w)) : w = d({
|
|
480
481
|
type: void 0,
|
|
481
|
-
maxRows:
|
|
482
|
+
maxRows: m,
|
|
482
483
|
minRows: E
|
|
483
|
-
},
|
|
484
|
+
}, w), Z = ve);
|
|
484
485
|
const Fe = (r) => {
|
|
485
|
-
|
|
486
|
+
M(r.animationName === "mui-auto-fill-cancel" ? k.current : {
|
|
486
487
|
value: "x"
|
|
487
488
|
});
|
|
488
489
|
};
|
|
489
|
-
|
|
490
|
-
a && a.setAdornedStart(!!
|
|
491
|
-
}, [a,
|
|
492
|
-
const
|
|
493
|
-
color:
|
|
494
|
-
disabled:
|
|
495
|
-
endAdornment:
|
|
496
|
-
error:
|
|
497
|
-
focused:
|
|
490
|
+
l.useEffect(() => {
|
|
491
|
+
a && a.setAdornedStart(!!P);
|
|
492
|
+
}, [a, P]);
|
|
493
|
+
const V = d({}, i, {
|
|
494
|
+
color: h.color || "primary",
|
|
495
|
+
disabled: h.disabled,
|
|
496
|
+
endAdornment: v,
|
|
497
|
+
error: h.error,
|
|
498
|
+
focused: h.focused,
|
|
498
499
|
formControl: a,
|
|
499
|
-
fullWidth:
|
|
500
|
-
hiddenLabel:
|
|
501
|
-
multiline:
|
|
502
|
-
size:
|
|
503
|
-
startAdornment:
|
|
504
|
-
type:
|
|
505
|
-
}),
|
|
506
|
-
return
|
|
507
|
-
children: [!
|
|
508
|
-
ownerState: d({},
|
|
500
|
+
fullWidth: C,
|
|
501
|
+
hiddenLabel: h.hiddenLabel,
|
|
502
|
+
multiline: O,
|
|
503
|
+
size: h.size,
|
|
504
|
+
startAdornment: P,
|
|
505
|
+
type: ae
|
|
506
|
+
}), se = oo(V), le = ie.root || R.Root || no, J = re.root || b.root || {}, ue = ie.input || R.Input || to;
|
|
507
|
+
return w = d({}, w, (s = re.input) != null ? s : b.input), /* @__PURE__ */ X(l.Fragment, {
|
|
508
|
+
children: [!T && ro, /* @__PURE__ */ X(le, d({}, J, !me(le) && {
|
|
509
|
+
ownerState: d({}, V, J.ownerState)
|
|
509
510
|
}, {
|
|
510
511
|
ref: t,
|
|
511
512
|
onClick: Ie
|
|
512
513
|
}, Te, {
|
|
513
|
-
className:
|
|
514
|
-
children: [
|
|
514
|
+
className: pe(se.root, J.className, B, U && "MuiInputBase-readOnly"),
|
|
515
|
+
children: [P, /* @__PURE__ */ N(ne.Provider, {
|
|
515
516
|
value: null,
|
|
516
|
-
children: /* @__PURE__ */
|
|
517
|
-
ownerState:
|
|
518
|
-
"aria-invalid":
|
|
517
|
+
children: /* @__PURE__ */ N(ue, d({
|
|
518
|
+
ownerState: V,
|
|
519
|
+
"aria-invalid": h.error,
|
|
519
520
|
"aria-describedby": p,
|
|
520
|
-
autoComplete:
|
|
521
|
-
autoFocus:
|
|
522
|
-
defaultValue:
|
|
523
|
-
disabled:
|
|
524
|
-
id:
|
|
521
|
+
autoComplete: z,
|
|
522
|
+
autoFocus: A,
|
|
523
|
+
defaultValue: I,
|
|
524
|
+
disabled: h.disabled,
|
|
525
|
+
id: _,
|
|
525
526
|
onAnimationStart: Fe,
|
|
526
|
-
name:
|
|
527
|
+
name: x,
|
|
527
528
|
placeholder: Se,
|
|
528
|
-
readOnly:
|
|
529
|
-
required:
|
|
529
|
+
readOnly: U,
|
|
530
|
+
required: h.required,
|
|
530
531
|
rows: D,
|
|
531
|
-
value:
|
|
532
|
-
onKeyDown:
|
|
532
|
+
value: W,
|
|
533
|
+
onKeyDown: j,
|
|
533
534
|
onKeyUp: xe,
|
|
534
|
-
type:
|
|
535
|
-
},
|
|
536
|
-
as:
|
|
537
|
-
ownerState: d({},
|
|
535
|
+
type: ae
|
|
536
|
+
}, w, !me(ue) && {
|
|
537
|
+
as: Z,
|
|
538
|
+
ownerState: d({}, V, w.ownerState)
|
|
538
539
|
}, {
|
|
539
540
|
ref: Oe,
|
|
540
|
-
className:
|
|
541
|
+
className: pe(se.input, w.className, U && "MuiInputBase-readOnly"),
|
|
541
542
|
onBlur: ze,
|
|
542
543
|
onChange: Ae,
|
|
543
544
|
onFocus: Ne
|
|
544
545
|
}))
|
|
545
|
-
}),
|
|
546
|
-
startAdornment:
|
|
546
|
+
}), v, te ? te(d({}, h, {
|
|
547
|
+
startAdornment: P
|
|
547
548
|
})) : null]
|
|
548
549
|
}))]
|
|
549
550
|
});
|
|
@@ -645,7 +646,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
645
646
|
* Either a string to use a HTML element or a component.
|
|
646
647
|
* @default 'input'
|
|
647
648
|
*/
|
|
648
|
-
inputComponent:
|
|
649
|
+
inputComponent: _e,
|
|
649
650
|
/**
|
|
650
651
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
651
652
|
* @default {}
|
|
@@ -654,7 +655,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
654
655
|
/**
|
|
655
656
|
* Pass a ref to the `input` element.
|
|
656
657
|
*/
|
|
657
|
-
inputRef:
|
|
658
|
+
inputRef: je,
|
|
658
659
|
/**
|
|
659
660
|
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
|
660
661
|
* FormControl.
|
|
@@ -779,15 +780,15 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
779
780
|
value: e.any
|
|
780
781
|
});
|
|
781
782
|
export {
|
|
782
|
-
|
|
783
|
+
ne as F,
|
|
783
784
|
io as I,
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
785
|
+
Ke as a,
|
|
786
|
+
oe as b,
|
|
787
|
+
no as c,
|
|
788
|
+
to as d,
|
|
789
|
+
eo as e,
|
|
790
|
+
Ge as f,
|
|
791
|
+
ho as i,
|
|
791
792
|
Xe as r,
|
|
792
793
|
$e as u
|
|
793
794
|
};
|