@cgi-learning-hub/ui 1.3.2-dev.1731948416 → 1.3.2-dev.1732013713
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/Backdrop-KAJqifAq.cjs +1 -0
- package/dist/{Backdrop-CV5zVFtT.js → Backdrop-RBPtVAPX.js} +220 -265
- package/dist/{Box-MG2tJmr8.js → Box-UE-zctbJ.js} +3 -3
- package/dist/{Button-Ba8IQCCs.js → Button-Bjy0iPNm.js} +4 -4
- package/dist/{ButtonBase-BdvHQ0Vd.js → ButtonBase-CFD7NVUc.js} +21 -21
- package/dist/Checkbox-Ct5E_6h7.js +241 -0
- package/dist/Checkbox-CuYTY0gd.cjs +1 -0
- package/dist/{CircularProgress-BAVvonKL.js → CircularProgress-By02Sdoh.js} +3 -3
- package/dist/{DatePicker-DCsrvr3a.cjs → DatePicker-rhgpaD-r.cjs} +14 -14
- package/dist/{DatePicker-DoB4WsQR.js → DatePicker-u4rtXGeo.js} +53 -48
- package/dist/{DefaultPropsProvider-BE624hnX.js → DefaultPropsProvider-CaRoy5OV.js} +24 -24
- package/dist/FormGroup-BBYEQB4C.cjs +1 -0
- package/dist/FormGroup-BVtE8Mrv.js +348 -0
- package/dist/FormLabel-B4QlkhhB.js +424 -0
- package/dist/FormLabel-D8jYibc1.cjs +2 -0
- package/dist/{IconButton-BM6tD2wP.js → IconButton-Av8eJ5IG.js} +4 -4
- package/dist/InputAdornment-BJfpEQAa.cjs +1 -0
- package/dist/{InputAdornment-DwegBPlu.js → InputAdornment-COPtZlSD.js} +5 -5
- package/dist/{InputBase-Ck6jdGdt.js → InputBase-Bbgoz8GV.js} +186 -210
- package/dist/InputBase-Ctmib7Br.cjs +3 -0
- package/dist/MenuItem-D7HWYhF3.js +277 -0
- package/dist/MenuItem-Els-vJZW.cjs +1 -0
- package/dist/{TextField-ptOYG3fA.js → Select-BlPQngVF.js} +1458 -2424
- package/dist/Select-ipcMZ4iK.cjs +11 -0
- package/dist/{Stack-vO5Ta57O.js → Stack-y1PjTHKX.js} +18 -18
- package/dist/SwitchBase-URM3X3YZ.cjs +1 -0
- package/dist/SwitchBase-yCuH0Tqk.js +261 -0
- package/dist/{Tabs-DSWPmVfN.js → Tabs-DK4Bc5xo.js} +10 -10
- package/dist/{Tabs-e8UBJZ5z.cjs → Tabs-Nvk94RTW.cjs} +1 -1
- package/dist/TextField-BVAkADOb.cjs +1 -0
- package/dist/TextField-C-B529_r.js +547 -0
- package/dist/{Tooltip-dMZ46-1F.js → Tooltip-DO9GIhWC.js} +1782 -2858
- package/dist/Tooltip-DvPL2M0E.cjs +100 -0
- package/dist/{Typography-HjpyrRz2.js → Typography-C_ESP41L.js} +4 -4
- package/dist/components/Button/Button.es.js +5 -5
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +2 -2
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dropzone/Dropzone.es.js +4 -4
- package/dist/components/EmptyState/EmptyState.es.js +2 -2
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +6 -6
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +4 -4
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +267 -262
- package/dist/components/stories/Alert.stories.cjs.js +1 -0
- package/dist/components/{Alert → stories}/Alert.stories.d.ts +1 -1
- package/dist/components/{Alert → stories}/Alert.stories.es.js +1 -1
- package/dist/components/stories/Button.stories.cjs.js +1 -0
- package/dist/components/{Button → stories}/Button.stories.d.ts +1 -1
- package/dist/components/{Button → stories}/Button.stories.es.js +2 -2
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -0
- package/dist/components/stories/Checkbox.stories.d.ts +10 -0
- package/dist/components/stories/Checkbox.stories.es.js +28 -0
- package/dist/components/{DatePicker → stories}/DatePicker.stories.cjs.js +1 -1
- package/dist/components/{DatePicker → stories}/DatePicker.stories.d.ts +1 -1
- package/dist/components/{DatePicker → stories}/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dropzone.stories.cjs.js +1 -0
- package/dist/components/{Dropzone → stories}/Dropzone.stories.d.ts +1 -1
- package/dist/components/{Dropzone → stories}/Dropzone.stories.es.js +1 -1
- package/dist/components/stories/EmptyState.stories.cjs.js +1 -0
- package/dist/components/{EmptyState → stories}/EmptyState.stories.d.ts +1 -1
- package/dist/components/{EmptyState → stories}/EmptyState.stories.es.js +1 -1
- package/dist/components/stories/FileList.stories.cjs.js +1 -0
- package/dist/components/{FileList → stories}/FileList.stories.d.ts +1 -1
- package/dist/components/{FileList → stories}/FileList.stories.es.js +6 -5
- package/dist/components/stories/Heading.stories.cjs.js +1 -0
- package/dist/components/{Heading → stories}/Heading.stories.d.ts +1 -1
- package/dist/components/{Heading → stories}/Heading.stories.es.js +3 -3
- package/dist/components/stories/IconButton.stories.es.js +2 -2
- package/dist/components/stories/Loader.stories.cjs.js +1 -0
- package/dist/components/{Loader → stories}/Loader.stories.d.ts +1 -1
- package/dist/components/{Loader → stories}/Loader.stories.es.js +1 -1
- package/dist/components/stories/LoaderBackdrop.stories.cjs.js +1 -0
- package/dist/components/{LoaderBackdrop → stories}/LoaderBackdrop.stories.d.ts +1 -1
- package/dist/components/{LoaderBackdrop → stories}/LoaderBackdrop.stories.es.js +1 -1
- package/dist/components/stories/PasswordInput.stories.cjs.js +1 -0
- package/dist/components/{PasswordInput → stories}/PasswordInput.stories.d.ts +1 -1
- package/dist/components/{PasswordInput → stories}/PasswordInput.stories.es.js +1 -1
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -0
- package/dist/components/stories/RadioGroup.stories.d.ts +8 -0
- package/dist/components/stories/RadioGroup.stories.es.js +434 -0
- package/dist/components/stories/SearchInput.stories.cjs.js +1 -0
- package/dist/components/{SearchInput → stories}/SearchInput.stories.d.ts +1 -1
- package/dist/components/{SearchInput → stories}/SearchInput.stories.es.js +1 -1
- package/dist/components/stories/Select.stories.cjs.js +1 -0
- package/dist/components/stories/Select.stories.d.ts +10 -0
- package/dist/components/stories/Select.stories.es.js +52 -0
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +10 -10
- package/dist/components/stories/TextField.stories.cjs.js +1 -0
- package/dist/components/stories/TextField.stories.d.ts +10 -0
- package/dist/components/stories/TextField.stories.es.js +69 -0
- package/dist/{createSvgIcon-D8j2pi8H.js → createSvgIcon-DxbvMQd7.js} +3 -3
- package/dist/{extendSxProp-CrOV7ubJ.js → extendSxProp-XQwkK0m7.js} +1 -1
- package/dist/formControlState-DCkDUdfO.cjs +1 -0
- package/dist/formControlState-DdQP43Uo.js +21 -0
- package/dist/{fr-BbQGEyOf.js → fr-B8_MxRl5.js} +1 -1
- package/dist/{identifier-BspJ_uqC.js → identifier-BqadgaK7.js} +4 -4
- package/dist/{index-CUYeZpek.js → index-BUxqDIr9.js} +4 -4
- package/dist/{index-BD4CTHtk.js → index-CRT92bm7.js} +2 -2
- package/dist/index-D7nFYLYq.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +267 -262
- package/dist/{memoTheme-CwR5ZU7e.js → memoTheme-DfGVDRrB.js} +1 -1
- package/dist/{refType-B0086dcQ.js → refType-DlHf9HvO.js} +1 -1
- package/dist/{useTheme-DCeWFyuq.js → resolveComponentProps-CxJ2yAJn.js} +18 -26
- package/dist/resolveComponentProps-DTv6xPbb.cjs +1 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useControlled-Ysk4KqoX.cjs +3 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useFormControl-haP0iPhl.cjs +1 -0
- package/dist/useSlot-42jgZftI.cjs +1 -0
- package/dist/useSlot-Co14PUn6.js +50 -0
- package/dist/useTheme-CtT7O-Wk.js +11 -0
- package/dist/{useTheme-B4Cg2FUT.js → useTheme-oM_SFWy4.js} +1 -1
- package/dist/useTheme-tZYpFplW.cjs +1 -0
- package/dist/{useThemeProps-B87e2Gmx.js → useThemeProps-BlQ3SLfB.js} +4 -4
- package/dist/{useThemeProps-kJZsUF6E.js → useThemeProps-FiA8ivG-.js} +3 -3
- package/dist/{useTimeout-BFZIFO63.js → useTimeout-D16vpBhn.js} +1 -1
- package/package.json +1 -1
- package/dist/Backdrop-D1g8gJ4S.cjs +0 -1
- package/dist/InputAdornment-CfXhmkcT.cjs +0 -1
- package/dist/InputBase-uv1-DNAg.cjs +0 -3
- package/dist/TextField-C2b1L1xj.cjs +0 -14
- package/dist/Tooltip-bKfA-tNR.cjs +0 -100
- package/dist/components/Alert/Alert.stories.cjs.js +0 -1
- package/dist/components/Button/Button.stories.cjs.js +0 -1
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +0 -1
- package/dist/components/EmptyState/EmptyState.stories.cjs.js +0 -1
- package/dist/components/FileList/FileList.stories.cjs.js +0 -1
- package/dist/components/Heading/Heading.stories.cjs.js +0 -1
- package/dist/components/Loader/Loader.stories.cjs.js +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.cjs.js +0 -1
- package/dist/components/PasswordInput/PasswordInput.stories.cjs.js +0 -1
- package/dist/components/SearchInput/SearchInput.stories.cjs.js +0 -1
- package/dist/components/TextInput/TextInput.stories.cjs.js +0 -1
- package/dist/components/TextInput/TextInput.stories.d.ts +0 -7
- package/dist/components/TextInput/TextInput.stories.es.js +0 -43
- package/dist/index-1_dd0hY2.cjs +0 -1
- package/dist/useTheme-VRTfPKo-.cjs +0 -1
|
@@ -1,37 +1,18 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { P as e, J as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { P as e, J as Fe, I as ke, K as ce, L as Z, Y as Be } from "./identifier-BqadgaK7.js";
|
|
3
|
+
import { f as Me, i as He } from "./formControlState-DdQP43Uo.js";
|
|
4
|
+
import { u as Pe, F as We } from "./useFormControl-CatNKXAi.js";
|
|
5
|
+
import { g as De } from "./index-BUxqDIr9.js";
|
|
6
|
+
import { m as be } from "./memoTheme-DfGVDRrB.js";
|
|
5
7
|
import { jsxs as Q, jsx as B } from "react/jsx-runtime";
|
|
6
|
-
import { s as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as X, e as
|
|
9
|
-
import { o as
|
|
10
|
-
const ne = /* @__PURE__ */ s.createContext(void 0);
|
|
11
|
-
process.env.NODE_ENV !== "production" && (ne.displayName = "FormControlContext");
|
|
12
|
-
function _e() {
|
|
13
|
-
return s.useContext(ne);
|
|
14
|
-
}
|
|
15
|
-
function me(n) {
|
|
16
|
-
return n != null && !(Array.isArray(n) && n.length === 0);
|
|
17
|
-
}
|
|
18
|
-
function je(n, o = !1) {
|
|
19
|
-
return n && (me(n.value) && n.value !== "" || o && me(n.defaultValue) && n.defaultValue !== "");
|
|
20
|
-
}
|
|
21
|
-
function cn(n) {
|
|
22
|
-
return n.startAdornment;
|
|
23
|
-
}
|
|
24
|
-
function Ke({
|
|
25
|
-
props: n,
|
|
26
|
-
states: o,
|
|
27
|
-
muiFormControl: t
|
|
28
|
-
}) {
|
|
29
|
-
return o.reduce((l, u) => (l[u] = n[u], t && typeof n[u] > "u" && (l[u] = t[u]), l), {});
|
|
30
|
-
}
|
|
8
|
+
import { s as ye, u as Le, c as je } from "./DefaultPropsProvider-CaRoy5OV.js";
|
|
9
|
+
import { u as ge } from "./useForkRef-D-DyzOXj.js";
|
|
10
|
+
import { u as X, e as Ve, r as Ue } from "./refType-DlHf9HvO.js";
|
|
11
|
+
import { o as pe, d as _e } from "./ownerWindow-BoRkeomM.js";
|
|
31
12
|
function L(n) {
|
|
32
13
|
return parseInt(n, 10) || 0;
|
|
33
14
|
}
|
|
34
|
-
const
|
|
15
|
+
const Ke = {
|
|
35
16
|
shadow: {
|
|
36
17
|
// Visibility needed to hide the extra text area on iPads
|
|
37
18
|
visibility: "hidden",
|
|
@@ -46,83 +27,83 @@ const $e = {
|
|
|
46
27
|
transform: "translateZ(0)"
|
|
47
28
|
}
|
|
48
29
|
};
|
|
49
|
-
function
|
|
30
|
+
function $e(n) {
|
|
50
31
|
return n == null || Object.keys(n).length === 0 || n.outerHeightStyle === 0 && !n.overflowing;
|
|
51
32
|
}
|
|
52
|
-
const
|
|
33
|
+
const we = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
53
34
|
const {
|
|
54
|
-
onChange:
|
|
55
|
-
maxRows:
|
|
56
|
-
minRows:
|
|
35
|
+
onChange: d,
|
|
36
|
+
maxRows: f,
|
|
37
|
+
minRows: c = 1,
|
|
57
38
|
style: O,
|
|
58
|
-
value:
|
|
39
|
+
value: T,
|
|
59
40
|
...M
|
|
60
41
|
} = o, {
|
|
61
|
-
current:
|
|
62
|
-
} = s.useRef(
|
|
63
|
-
const
|
|
42
|
+
current: S
|
|
43
|
+
} = s.useRef(T != null), h = s.useRef(null), E = ge(t, h), b = s.useRef(null), C = s.useRef(null), v = s.useCallback(() => {
|
|
44
|
+
const l = h.current, r = pe(l).getComputedStyle(l);
|
|
64
45
|
if (r.width === "0px")
|
|
65
46
|
return {
|
|
66
47
|
outerHeightStyle: 0,
|
|
67
48
|
overflowing: !1
|
|
68
49
|
};
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
` && (
|
|
72
|
-
const z = r.boxSizing, R = L(r.paddingBottom) + L(r.paddingTop), g = L(r.borderBottomWidth) + L(r.borderTopWidth),
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
const H =
|
|
50
|
+
const p = C.current;
|
|
51
|
+
p.style.width = r.width, p.value = l.value || o.placeholder || "x", p.value.slice(-1) === `
|
|
52
|
+
` && (p.value += " ");
|
|
53
|
+
const z = r.boxSizing, R = L(r.paddingBottom) + L(r.paddingTop), g = L(r.borderBottomWidth) + L(r.borderTopWidth), N = p.scrollHeight;
|
|
54
|
+
p.value = "x";
|
|
55
|
+
const A = p.scrollHeight;
|
|
56
|
+
let u = N;
|
|
57
|
+
c && (u = Math.max(Number(c) * A, u)), f && (u = Math.min(Number(f) * A, u)), u = Math.max(u, A);
|
|
58
|
+
const H = u + (z === "border-box" ? R + g : 0), P = Math.abs(u - N) <= 1;
|
|
78
59
|
return {
|
|
79
60
|
outerHeightStyle: H,
|
|
80
61
|
overflowing: P
|
|
81
62
|
};
|
|
82
|
-
}, [
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
63
|
+
}, [f, c, o.placeholder]), x = s.useCallback(() => {
|
|
64
|
+
const l = v();
|
|
65
|
+
if ($e(l))
|
|
85
66
|
return;
|
|
86
|
-
const
|
|
87
|
-
|
|
67
|
+
const y = l.outerHeightStyle, r = h.current;
|
|
68
|
+
b.current !== y && (b.current = y, r.style.height = `${y}px`), r.style.overflow = l.overflowing ? "hidden" : "";
|
|
88
69
|
}, [v]);
|
|
89
70
|
X(() => {
|
|
90
|
-
const
|
|
71
|
+
const l = () => {
|
|
91
72
|
x();
|
|
92
73
|
};
|
|
93
|
-
let
|
|
74
|
+
let y;
|
|
94
75
|
const r = () => {
|
|
95
|
-
cancelAnimationFrame(
|
|
96
|
-
|
|
76
|
+
cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
77
|
+
l();
|
|
97
78
|
});
|
|
98
|
-
},
|
|
99
|
-
R.addEventListener("resize",
|
|
79
|
+
}, p = _e(l), z = h.current, R = pe(z);
|
|
80
|
+
R.addEventListener("resize", p);
|
|
100
81
|
let g;
|
|
101
|
-
return typeof ResizeObserver < "u" && (g = new ResizeObserver(process.env.NODE_ENV === "test" ? r :
|
|
102
|
-
|
|
82
|
+
return typeof ResizeObserver < "u" && (g = new ResizeObserver(process.env.NODE_ENV === "test" ? r : l), g.observe(z)), () => {
|
|
83
|
+
p.clear(), cancelAnimationFrame(y), R.removeEventListener("resize", p), g && g.disconnect();
|
|
103
84
|
};
|
|
104
85
|
}, [v, x]), X(() => {
|
|
105
86
|
x();
|
|
106
87
|
});
|
|
107
|
-
const
|
|
108
|
-
|
|
88
|
+
const j = (l) => {
|
|
89
|
+
S || x(), d && d(l);
|
|
109
90
|
};
|
|
110
91
|
return /* @__PURE__ */ Q(s.Fragment, {
|
|
111
92
|
children: [/* @__PURE__ */ B("textarea", {
|
|
112
|
-
value:
|
|
113
|
-
onChange:
|
|
114
|
-
ref:
|
|
115
|
-
rows:
|
|
93
|
+
value: T,
|
|
94
|
+
onChange: j,
|
|
95
|
+
ref: E,
|
|
96
|
+
rows: c,
|
|
116
97
|
style: O,
|
|
117
98
|
...M
|
|
118
99
|
}), /* @__PURE__ */ B("textarea", {
|
|
119
100
|
"aria-hidden": !0,
|
|
120
101
|
className: o.className,
|
|
121
102
|
readOnly: !0,
|
|
122
|
-
ref:
|
|
103
|
+
ref: C,
|
|
123
104
|
tabIndex: -1,
|
|
124
105
|
style: {
|
|
125
|
-
|
|
106
|
+
...Ke.shadow,
|
|
126
107
|
...O,
|
|
127
108
|
paddingTop: 0,
|
|
128
109
|
paddingBottom: 0
|
|
@@ -130,7 +111,7 @@ const Ce = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
130
111
|
})]
|
|
131
112
|
});
|
|
132
113
|
});
|
|
133
|
-
process.env.NODE_ENV !== "production" && (
|
|
114
|
+
process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
134
115
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
135
116
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
136
117
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -165,20 +146,20 @@ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
|
165
146
|
*/
|
|
166
147
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
167
148
|
});
|
|
168
|
-
function
|
|
149
|
+
function fe(n) {
|
|
169
150
|
return typeof n == "string";
|
|
170
151
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
152
|
+
function qe(n) {
|
|
153
|
+
return ke("MuiInputBase", n);
|
|
173
154
|
}
|
|
174
|
-
const ee =
|
|
175
|
-
var
|
|
176
|
-
const
|
|
155
|
+
const ee = Fe("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
|
|
156
|
+
var me;
|
|
157
|
+
const Ge = (n, o) => {
|
|
177
158
|
const {
|
|
178
159
|
ownerState: t
|
|
179
160
|
} = n;
|
|
180
|
-
return [o.root, t.formControl && o.formControl, t.startAdornment && o.adornedStart, t.endAdornment && o.adornedEnd, t.error && o.error, t.size === "small" && o.sizeSmall, t.multiline && o.multiline, t.color && o[`color${
|
|
181
|
-
},
|
|
161
|
+
return [o.root, t.formControl && o.formControl, t.startAdornment && o.adornedStart, t.endAdornment && o.adornedEnd, t.error && o.error, t.size === "small" && o.sizeSmall, t.multiline && o.multiline, t.color && o[`color${Z(t.color)}`], t.fullWidth && o.fullWidth, t.hiddenLabel && o.hiddenLabel];
|
|
162
|
+
}, Ye = (n, o) => {
|
|
182
163
|
const {
|
|
183
164
|
ownerState: t
|
|
184
165
|
} = n;
|
|
@@ -187,28 +168,28 @@ const Ye = (n, o) => {
|
|
|
187
168
|
const {
|
|
188
169
|
classes: o,
|
|
189
170
|
color: t,
|
|
190
|
-
disabled:
|
|
191
|
-
error:
|
|
192
|
-
endAdornment:
|
|
171
|
+
disabled: d,
|
|
172
|
+
error: f,
|
|
173
|
+
endAdornment: c,
|
|
193
174
|
focused: O,
|
|
194
|
-
formControl:
|
|
175
|
+
formControl: T,
|
|
195
176
|
fullWidth: M,
|
|
196
|
-
hiddenLabel:
|
|
177
|
+
hiddenLabel: S,
|
|
197
178
|
multiline: h,
|
|
198
|
-
readOnly:
|
|
199
|
-
size:
|
|
200
|
-
startAdornment:
|
|
179
|
+
readOnly: E,
|
|
180
|
+
size: b,
|
|
181
|
+
startAdornment: C,
|
|
201
182
|
type: v
|
|
202
183
|
} = n, x = {
|
|
203
|
-
root: ["root", `color${
|
|
204
|
-
input: ["input",
|
|
184
|
+
root: ["root", `color${Z(t)}`, d && "disabled", f && "error", M && "fullWidth", O && "focused", T && "formControl", b && b !== "medium" && `size${Z(b)}`, h && "multiline", C && "adornedStart", c && "adornedEnd", S && "hiddenLabel", E && "readOnly"],
|
|
185
|
+
input: ["input", d && "disabled", v === "search" && "inputTypeSearch", h && "inputMultiline", b === "small" && "inputSizeSmall", S && "inputHiddenLabel", C && "inputAdornedStart", c && "inputAdornedEnd", E && "readOnly"]
|
|
205
186
|
};
|
|
206
|
-
return
|
|
207
|
-
},
|
|
187
|
+
return je(x, qe, o);
|
|
188
|
+
}, Ze = ye("div", {
|
|
208
189
|
name: "MuiInputBase",
|
|
209
190
|
slot: "Root",
|
|
210
|
-
overridesResolver:
|
|
211
|
-
})(
|
|
191
|
+
overridesResolver: Ge
|
|
192
|
+
})(be(({
|
|
212
193
|
theme: n
|
|
213
194
|
}) => ({
|
|
214
195
|
...n.typography.body1,
|
|
@@ -248,11 +229,11 @@ const Ye = (n, o) => {
|
|
|
248
229
|
width: "100%"
|
|
249
230
|
}
|
|
250
231
|
}]
|
|
251
|
-
}))),
|
|
232
|
+
}))), Qe = ye("input", {
|
|
252
233
|
name: "MuiInputBase",
|
|
253
234
|
slot: "Input",
|
|
254
|
-
overridesResolver:
|
|
255
|
-
})(
|
|
235
|
+
overridesResolver: Ye
|
|
236
|
+
})(be(({
|
|
256
237
|
theme: n
|
|
257
238
|
}) => {
|
|
258
239
|
const o = n.palette.mode === "light", t = {
|
|
@@ -265,9 +246,9 @@ const Ye = (n, o) => {
|
|
|
265
246
|
transition: n.transitions.create("opacity", {
|
|
266
247
|
duration: n.transitions.duration.shorter
|
|
267
248
|
})
|
|
268
|
-
},
|
|
249
|
+
}, d = {
|
|
269
250
|
opacity: "0 !important"
|
|
270
|
-
},
|
|
251
|
+
}, f = n.vars ? {
|
|
271
252
|
opacity: n.vars.opacity.inputPlaceholder
|
|
272
253
|
} : {
|
|
273
254
|
opacity: o ? 0.42 : 0.5
|
|
@@ -307,15 +288,15 @@ const Ye = (n, o) => {
|
|
|
307
288
|
},
|
|
308
289
|
// Show and hide the placeholder logic
|
|
309
290
|
[`label[data-shrink=false] + .${ee.formControl} &`]: {
|
|
310
|
-
"&::-webkit-input-placeholder":
|
|
311
|
-
"&::-moz-placeholder":
|
|
291
|
+
"&::-webkit-input-placeholder": d,
|
|
292
|
+
"&::-moz-placeholder": d,
|
|
312
293
|
// Firefox 19+
|
|
313
|
-
"&::-ms-input-placeholder":
|
|
294
|
+
"&::-ms-input-placeholder": d,
|
|
314
295
|
// Edge
|
|
315
|
-
"&:focus::-webkit-input-placeholder":
|
|
316
|
-
"&:focus::-moz-placeholder":
|
|
296
|
+
"&:focus::-webkit-input-placeholder": f,
|
|
297
|
+
"&:focus::-moz-placeholder": f,
|
|
317
298
|
// Firefox 19+
|
|
318
|
-
"&:focus::-ms-input-placeholder":
|
|
299
|
+
"&:focus::-ms-input-placeholder": f
|
|
319
300
|
// Edge
|
|
320
301
|
},
|
|
321
302
|
[`&.${ee.disabled}`]: {
|
|
@@ -326,8 +307,8 @@ const Ye = (n, o) => {
|
|
|
326
307
|
},
|
|
327
308
|
variants: [{
|
|
328
309
|
props: ({
|
|
329
|
-
ownerState:
|
|
330
|
-
}) => !
|
|
310
|
+
ownerState: c
|
|
311
|
+
}) => !c.disableInjectingGlobalStyles,
|
|
331
312
|
style: {
|
|
332
313
|
animationName: "mui-auto-fill-cancel",
|
|
333
314
|
animationDuration: "10ms",
|
|
@@ -345,8 +326,8 @@ const Ye = (n, o) => {
|
|
|
345
326
|
}
|
|
346
327
|
}, {
|
|
347
328
|
props: ({
|
|
348
|
-
ownerState:
|
|
349
|
-
}) =>
|
|
329
|
+
ownerState: c
|
|
330
|
+
}) => c.multiline,
|
|
350
331
|
style: {
|
|
351
332
|
height: "auto",
|
|
352
333
|
resize: "none",
|
|
@@ -363,7 +344,7 @@ const Ye = (n, o) => {
|
|
|
363
344
|
}
|
|
364
345
|
}]
|
|
365
346
|
};
|
|
366
|
-
})),
|
|
347
|
+
})), he = De({
|
|
367
348
|
"@keyframes mui-auto-fill": {
|
|
368
349
|
from: {
|
|
369
350
|
display: "block"
|
|
@@ -374,99 +355,99 @@ const Ye = (n, o) => {
|
|
|
374
355
|
display: "block"
|
|
375
356
|
}
|
|
376
357
|
}
|
|
377
|
-
}),
|
|
378
|
-
const
|
|
358
|
+
}), Xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
359
|
+
const d = Le({
|
|
379
360
|
props: o,
|
|
380
361
|
name: "MuiInputBase"
|
|
381
362
|
}), {
|
|
382
|
-
"aria-describedby":
|
|
383
|
-
autoComplete:
|
|
363
|
+
"aria-describedby": f,
|
|
364
|
+
autoComplete: c,
|
|
384
365
|
autoFocus: O,
|
|
385
|
-
className:
|
|
366
|
+
className: T,
|
|
386
367
|
color: M,
|
|
387
|
-
components:
|
|
368
|
+
components: S = {},
|
|
388
369
|
componentsProps: h = {},
|
|
389
|
-
defaultValue:
|
|
390
|
-
disabled:
|
|
391
|
-
disableInjectingGlobalStyles:
|
|
370
|
+
defaultValue: E,
|
|
371
|
+
disabled: b,
|
|
372
|
+
disableInjectingGlobalStyles: C,
|
|
392
373
|
endAdornment: v,
|
|
393
374
|
error: x,
|
|
394
|
-
fullWidth:
|
|
395
|
-
id:
|
|
396
|
-
inputComponent:
|
|
375
|
+
fullWidth: j = !1,
|
|
376
|
+
id: l,
|
|
377
|
+
inputComponent: y = "input",
|
|
397
378
|
inputProps: r = {},
|
|
398
|
-
inputRef:
|
|
379
|
+
inputRef: p,
|
|
399
380
|
margin: z,
|
|
400
381
|
maxRows: R,
|
|
401
382
|
minRows: g,
|
|
402
|
-
multiline:
|
|
403
|
-
name:
|
|
404
|
-
onBlur:
|
|
383
|
+
multiline: N = !1,
|
|
384
|
+
name: A,
|
|
385
|
+
onBlur: u,
|
|
405
386
|
onChange: H,
|
|
406
387
|
onClick: P,
|
|
407
388
|
onFocus: oe,
|
|
408
|
-
onKeyDown:
|
|
409
|
-
onKeyUp:
|
|
410
|
-
placeholder:
|
|
411
|
-
readOnly:
|
|
412
|
-
renderSuffix:
|
|
389
|
+
onKeyDown: ve,
|
|
390
|
+
onKeyUp: Se,
|
|
391
|
+
placeholder: Ce,
|
|
392
|
+
readOnly: V,
|
|
393
|
+
renderSuffix: ne,
|
|
413
394
|
rows: W,
|
|
414
|
-
size:
|
|
415
|
-
slotProps:
|
|
416
|
-
slots:
|
|
395
|
+
size: eo,
|
|
396
|
+
slotProps: te = {},
|
|
397
|
+
slots: re = {},
|
|
417
398
|
startAdornment: F,
|
|
418
|
-
type:
|
|
419
|
-
value:
|
|
420
|
-
...
|
|
421
|
-
} =
|
|
422
|
-
current:
|
|
423
|
-
} = s.useRef(D != null), I = s.useRef(),
|
|
399
|
+
type: ie = "text",
|
|
400
|
+
value: xe,
|
|
401
|
+
...Re
|
|
402
|
+
} = d, D = r.value != null ? r.value : xe, {
|
|
403
|
+
current: U
|
|
404
|
+
} = s.useRef(D != null), I = s.useRef(), Oe = s.useCallback((i) => {
|
|
424
405
|
process.env.NODE_ENV !== "production" && i && i.nodeName !== "INPUT" && !i.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(`
|
|
425
406
|
`));
|
|
426
|
-
}, []),
|
|
407
|
+
}, []), Te = ge(I, p, r.ref, Oe), [_, K] = s.useState(!1), a = Pe();
|
|
427
408
|
process.env.NODE_ENV !== "production" && s.useEffect(() => {
|
|
428
409
|
if (a)
|
|
429
410
|
return a.registerEffect();
|
|
430
411
|
}, [a]);
|
|
431
|
-
const m =
|
|
432
|
-
props:
|
|
412
|
+
const m = Me({
|
|
413
|
+
props: d,
|
|
433
414
|
muiFormControl: a,
|
|
434
415
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
435
416
|
});
|
|
436
|
-
m.focused = a ? a.focused :
|
|
437
|
-
!a &&
|
|
438
|
-
}, [a,
|
|
417
|
+
m.focused = a ? a.focused : _, s.useEffect(() => {
|
|
418
|
+
!a && b && _ && (K(!1), u && u());
|
|
419
|
+
}, [a, b, _, u]);
|
|
439
420
|
const $ = a && a.onFilled, q = a && a.onEmpty, k = s.useCallback((i) => {
|
|
440
|
-
|
|
421
|
+
He(i) ? $ && $() : q && q();
|
|
441
422
|
}, [$, q]);
|
|
442
423
|
X(() => {
|
|
443
|
-
|
|
424
|
+
U && k({
|
|
444
425
|
value: D
|
|
445
426
|
});
|
|
446
|
-
}, [D, k,
|
|
447
|
-
const
|
|
427
|
+
}, [D, k, U]);
|
|
428
|
+
const Ee = (i) => {
|
|
448
429
|
oe && oe(i), r.onFocus && r.onFocus(i), a && a.onFocus ? a.onFocus(i) : K(!0);
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
if (!
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
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." :
|
|
430
|
+
}, Ie = (i) => {
|
|
431
|
+
u && u(i), r.onBlur && r.onBlur(i), a && a.onBlur ? a.onBlur(i) : K(!1);
|
|
432
|
+
}, ze = (i, ...ue) => {
|
|
433
|
+
if (!U) {
|
|
434
|
+
const de = i.target || I.current;
|
|
435
|
+
if (de == null)
|
|
436
|
+
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." : Be(1));
|
|
456
437
|
k({
|
|
457
|
-
value:
|
|
438
|
+
value: de.value
|
|
458
439
|
});
|
|
459
440
|
}
|
|
460
|
-
r.onChange && r.onChange(i, ...
|
|
441
|
+
r.onChange && r.onChange(i, ...ue), H && H(i, ...ue);
|
|
461
442
|
};
|
|
462
443
|
s.useEffect(() => {
|
|
463
444
|
k(I.current);
|
|
464
445
|
}, []);
|
|
465
|
-
const
|
|
446
|
+
const Ne = (i) => {
|
|
466
447
|
I.current && i.currentTarget === i.target && I.current.focus(), P && P(i);
|
|
467
448
|
};
|
|
468
|
-
let G =
|
|
469
|
-
|
|
449
|
+
let G = y, w = r;
|
|
450
|
+
N && G === "input" && (W ? (process.env.NODE_ENV !== "production" && (g || R) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = {
|
|
470
451
|
type: void 0,
|
|
471
452
|
minRows: W,
|
|
472
453
|
maxRows: W,
|
|
@@ -476,8 +457,8 @@ const Ye = (n, o) => {
|
|
|
476
457
|
maxRows: R,
|
|
477
458
|
minRows: g,
|
|
478
459
|
...w
|
|
479
|
-
}, G =
|
|
480
|
-
const
|
|
460
|
+
}, G = we);
|
|
461
|
+
const Ae = (i) => {
|
|
481
462
|
k(i.animationName === "mui-auto-fill-cancel" ? I.current : {
|
|
482
463
|
value: "x"
|
|
483
464
|
});
|
|
@@ -486,80 +467,80 @@ const Ye = (n, o) => {
|
|
|
486
467
|
a && a.setAdornedStart(!!F);
|
|
487
468
|
}, [a, F]);
|
|
488
469
|
const Y = {
|
|
489
|
-
...
|
|
470
|
+
...d,
|
|
490
471
|
color: m.color || "primary",
|
|
491
472
|
disabled: m.disabled,
|
|
492
473
|
endAdornment: v,
|
|
493
474
|
error: m.error,
|
|
494
475
|
focused: m.focused,
|
|
495
476
|
formControl: a,
|
|
496
|
-
fullWidth:
|
|
477
|
+
fullWidth: j,
|
|
497
478
|
hiddenLabel: m.hiddenLabel,
|
|
498
|
-
multiline:
|
|
479
|
+
multiline: N,
|
|
499
480
|
size: m.size,
|
|
500
481
|
startAdornment: F,
|
|
501
|
-
type:
|
|
502
|
-
},
|
|
482
|
+
type: ie
|
|
483
|
+
}, ae = Je(Y), se = re.root || S.Root || Ze, J = te.root || h.root || {}, le = re.input || S.Input || Qe;
|
|
503
484
|
return w = {
|
|
504
485
|
...w,
|
|
505
|
-
...
|
|
486
|
+
...te.input ?? h.input
|
|
506
487
|
}, /* @__PURE__ */ Q(s.Fragment, {
|
|
507
|
-
children: [!
|
|
488
|
+
children: [!C && typeof he == "function" && // For Emotion/Styled-components, InputGlobalStyles will be a function
|
|
508
489
|
// For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
|
|
509
|
-
(
|
|
510
|
-
...
|
|
490
|
+
(me || (me = /* @__PURE__ */ B(he, {}))), /* @__PURE__ */ Q(se, {
|
|
491
|
+
...J,
|
|
511
492
|
ref: t,
|
|
512
|
-
onClick:
|
|
513
|
-
...
|
|
514
|
-
...!
|
|
493
|
+
onClick: Ne,
|
|
494
|
+
...Re,
|
|
495
|
+
...!fe(se) && {
|
|
515
496
|
ownerState: {
|
|
516
497
|
...Y,
|
|
517
|
-
...
|
|
498
|
+
...J.ownerState
|
|
518
499
|
}
|
|
519
500
|
},
|
|
520
|
-
className:
|
|
521
|
-
children: [F, /* @__PURE__ */ B(
|
|
501
|
+
className: ce(ae.root, J.className, T, V && "MuiInputBase-readOnly"),
|
|
502
|
+
children: [F, /* @__PURE__ */ B(We.Provider, {
|
|
522
503
|
value: null,
|
|
523
|
-
children: /* @__PURE__ */ B(
|
|
504
|
+
children: /* @__PURE__ */ B(le, {
|
|
524
505
|
"aria-invalid": m.error,
|
|
525
|
-
"aria-describedby":
|
|
526
|
-
autoComplete:
|
|
506
|
+
"aria-describedby": f,
|
|
507
|
+
autoComplete: c,
|
|
527
508
|
autoFocus: O,
|
|
528
|
-
defaultValue:
|
|
509
|
+
defaultValue: E,
|
|
529
510
|
disabled: m.disabled,
|
|
530
|
-
id:
|
|
531
|
-
onAnimationStart:
|
|
532
|
-
name:
|
|
533
|
-
placeholder:
|
|
534
|
-
readOnly:
|
|
511
|
+
id: l,
|
|
512
|
+
onAnimationStart: Ae,
|
|
513
|
+
name: A,
|
|
514
|
+
placeholder: Ce,
|
|
515
|
+
readOnly: V,
|
|
535
516
|
required: m.required,
|
|
536
517
|
rows: W,
|
|
537
518
|
value: D,
|
|
538
|
-
onKeyDown:
|
|
539
|
-
onKeyUp:
|
|
540
|
-
type:
|
|
519
|
+
onKeyDown: ve,
|
|
520
|
+
onKeyUp: Se,
|
|
521
|
+
type: ie,
|
|
541
522
|
...w,
|
|
542
|
-
...!
|
|
523
|
+
...!fe(le) && {
|
|
543
524
|
as: G,
|
|
544
525
|
ownerState: {
|
|
545
526
|
...Y,
|
|
546
527
|
...w.ownerState
|
|
547
528
|
}
|
|
548
529
|
},
|
|
549
|
-
ref:
|
|
550
|
-
className:
|
|
551
|
-
onBlur:
|
|
552
|
-
onChange:
|
|
553
|
-
onFocus:
|
|
530
|
+
ref: Te,
|
|
531
|
+
className: ce(ae.input, w.className, V && "MuiInputBase-readOnly"),
|
|
532
|
+
onBlur: Ie,
|
|
533
|
+
onChange: ze,
|
|
534
|
+
onFocus: Ee
|
|
554
535
|
})
|
|
555
|
-
}), v,
|
|
536
|
+
}), v, ne ? ne({
|
|
556
537
|
...m,
|
|
557
538
|
startAdornment: F
|
|
558
539
|
}) : null]
|
|
559
540
|
})]
|
|
560
541
|
});
|
|
561
542
|
});
|
|
562
|
-
process.env.NODE_ENV !== "production" && (
|
|
543
|
+
process.env.NODE_ENV !== "production" && (Xe.propTypes = {
|
|
563
544
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
564
545
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
565
546
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -654,7 +635,7 @@ process.env.NODE_ENV !== "production" && (en.propTypes = {
|
|
|
654
635
|
* Either a string to use a HTML element or a component.
|
|
655
636
|
* @default 'input'
|
|
656
637
|
*/
|
|
657
|
-
inputComponent:
|
|
638
|
+
inputComponent: Ve,
|
|
658
639
|
/**
|
|
659
640
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
660
641
|
* @default {}
|
|
@@ -663,7 +644,7 @@ process.env.NODE_ENV !== "production" && (en.propTypes = {
|
|
|
663
644
|
/**
|
|
664
645
|
* Pass a ref to the `input` element.
|
|
665
646
|
*/
|
|
666
|
-
inputRef:
|
|
647
|
+
inputRef: Ue,
|
|
667
648
|
/**
|
|
668
649
|
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
|
669
650
|
* FormControl.
|
|
@@ -788,16 +769,11 @@ process.env.NODE_ENV !== "production" && (en.propTypes = {
|
|
|
788
769
|
value: e.any
|
|
789
770
|
});
|
|
790
771
|
export {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
Ke as f,
|
|
799
|
-
he as g,
|
|
800
|
-
cn as i,
|
|
801
|
-
Ye as r,
|
|
802
|
-
_e as u
|
|
772
|
+
Xe as I,
|
|
773
|
+
Ze as a,
|
|
774
|
+
Qe as b,
|
|
775
|
+
Ye as c,
|
|
776
|
+
fe as d,
|
|
777
|
+
ee as i,
|
|
778
|
+
Ge as r
|
|
803
779
|
};
|