@cgi-learning-hub/ui 0.0.1-dev.1708959744 → 0.0.1-dev.1708974808
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/{Button-wMPAZpnO.cjs → Button-Tkz5NkF_.cjs} +1 -1
- package/dist/{Button-CmBnwwn3.js → Button-X7eWZQfX.js} +12 -12
- package/dist/ButtonBase-CKfcGhaU.js +892 -0
- package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
- package/dist/Input-CAb0EFzc.cjs +1 -0
- package/dist/{Input-Dk-cN0Fb.js → Input-CbYjsRHK.js} +10 -10
- package/dist/{InputBase-BbXy6VDy.js → InputBase-B13Nzzhk.js} +157 -138
- package/dist/InputBase-CKlCw9fj.cjs +4 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +3 -3
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +10 -10
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +333 -126
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- 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/index.cjs.js +1 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.es.js +12 -20
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
- package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
- package/dist/components/inputs/TextInput/TextInput.es.js +404 -367
- package/dist/{createSvgIcon-BivvPRyr.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
- package/dist/{createSvgIcon-DLZM3vHe.js → createSvgIcon-qXNZi4k1.js} +14 -14
- package/dist/{extendSxProp-CVD6j4mA.js → extendSxProp-BRHiEwyk.js} +1 -1
- package/dist/{extendSxProp-D5gpnasP.cjs → extendSxProp-CvhhU9Vb.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +10 -18
- package/dist/useForkRef-82uiK71d.cjs +1 -0
- package/dist/useForkRef-CLcOhrzI.js +44 -0
- package/dist/useTheme-BWRyHzdn.js +65 -0
- package/dist/useTheme-BpLcDNG1.cjs +1 -0
- package/dist/{useThemeProps-kb_vU-1P.js → useThemeProps-B6yTTpAe.js} +714 -741
- package/dist/{useThemeProps-C6ClLEqN.cjs → useThemeProps-CDriK9TK.cjs} +14 -14
- package/package.json +1 -2
- package/dist/ButtonBase-Bw43M3TO.js +0 -831
- package/dist/ButtonBase-XPViWbp_.cjs +0 -75
- package/dist/CircularProgress-BCdQaPFF.cjs +0 -28
- package/dist/CircularProgress-DRE9BLTL.js +0 -215
- package/dist/Input-DHic6dYE.cjs +0 -1
- package/dist/InputBase-WBNJQn8V.cjs +0 -4
- package/dist/Tab-C2Tmr8Sv.cjs +0 -1
- package/dist/Tab-CWxCqAvH.js +0 -237
- package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
- package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
- package/dist/Typography-B1bdo7yt.js +0 -177
- package/dist/Typography-CO64FVmw.cjs +0 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
- package/dist/components/Dropzone/Dropzone.d.ts +0 -9
- package/dist/components/Dropzone/Dropzone.es.js +0 -1209
- package/dist/components/Dropzone/index.cjs.js +0 -1
- package/dist/components/Dropzone/index.d.ts +0 -2
- package/dist/components/Dropzone/index.es.js +0 -4
- package/dist/components/lists/FileList/FileList.cjs.js +0 -1
- package/dist/components/lists/FileList/FileList.d.ts +0 -7
- package/dist/components/lists/FileList/FileList.es.js +0 -19
- package/dist/components/lists/FileList/FileListItem.cjs.js +0 -2
- package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
- package/dist/components/lists/FileList/FileListItem.es.js +0 -216
- package/dist/components/lists/FileList/index.cjs.js +0 -1
- package/dist/components/lists/FileList/index.d.ts +0 -4
- package/dist/components/lists/FileList/index.es.js +0 -6
- package/dist/components/lists/index.cjs.js +0 -1
- package/dist/components/lists/index.d.ts +0 -1
- package/dist/components/lists/index.es.js +0 -6
- package/dist/createSvgIcon-9NfUaq9H.js +0 -143
- package/dist/createSvgIcon-B7HVs3ZC.cjs +0 -2
- package/dist/ownerWindow-BoRkeomM.js +0 -23
- package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
- package/dist/refType-CMQbzE37.js +0 -29
- package/dist/refType-dllUCpD8.cjs +0 -1
- package/dist/useControlled-BsLcOmhe.js +0 -48
- package/dist/useControlled-jN3fqFfv.cjs +0 -3
- package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
- package/dist/useForkRef-DwN_Iz9R.js +0 -17
- package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
- package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
- package/dist/useTheme-BSwuVDD3.js +0 -9
- package/dist/useTheme-C-LTLVMt.cjs +0 -1
- package/dist/useTimeout-KN97abZR.js +0 -47
- package/dist/useTimeout-qjxkiZZn.cjs +0 -1
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import { P as e,
|
|
2
|
-
import * as
|
|
1
|
+
import { P as e, w as He, _ as ge, a as d, x as Pe, T as Ve, g as We, b as _e, s as we, u as Le, h as fe, f as ee, e as je, y as Ue } from "./useThemeProps-B6yTTpAe.js";
|
|
2
|
+
import * as a from "react";
|
|
3
3
|
import { jsx as R, jsxs as ne } from "react/jsx-runtime";
|
|
4
|
-
import { a as ve, u as oe } from "./useForkRef-
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { a as ve, u as oe, e as $e, r as Ge } from "./useForkRef-CLcOhrzI.js";
|
|
5
|
+
import * as Ke from "react-dom";
|
|
6
|
+
import { Global as qe } from "@emotion/react";
|
|
7
|
+
function Ye(n, o = 166) {
|
|
8
|
+
let t;
|
|
9
|
+
function i(...r) {
|
|
10
|
+
const p = () => {
|
|
11
|
+
n.apply(this, r);
|
|
12
|
+
};
|
|
13
|
+
clearTimeout(t), t = setTimeout(p, o);
|
|
14
|
+
}
|
|
15
|
+
return i.clear = () => {
|
|
16
|
+
clearTimeout(t);
|
|
17
|
+
}, i;
|
|
18
|
+
}
|
|
9
19
|
function Ze(n) {
|
|
20
|
+
return n && n.ownerDocument || document;
|
|
21
|
+
}
|
|
22
|
+
function me(n) {
|
|
23
|
+
return Ze(n).defaultView || window;
|
|
24
|
+
}
|
|
25
|
+
function Je(n) {
|
|
10
26
|
return n == null || Object.keys(n).length === 0;
|
|
11
27
|
}
|
|
12
28
|
function Ce(n) {
|
|
@@ -14,8 +30,8 @@ function Ce(n) {
|
|
|
14
30
|
styles: o,
|
|
15
31
|
defaultTheme: t = {}
|
|
16
32
|
} = n;
|
|
17
|
-
return /* @__PURE__ */ R(
|
|
18
|
-
styles: typeof o == "function" ? (r) => o(
|
|
33
|
+
return /* @__PURE__ */ R(qe, {
|
|
34
|
+
styles: typeof o == "function" ? (r) => o(Je(r) ? t : r) : o
|
|
19
35
|
});
|
|
20
36
|
}
|
|
21
37
|
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
@@ -27,7 +43,7 @@ function Se({
|
|
|
27
43
|
themeId: o,
|
|
28
44
|
defaultTheme: t = {}
|
|
29
45
|
}) {
|
|
30
|
-
const
|
|
46
|
+
const i = He(t), r = typeof n == "function" ? n(o && i[o] || i) : n;
|
|
31
47
|
return /* @__PURE__ */ R(Ce, {
|
|
32
48
|
styles: r
|
|
33
49
|
});
|
|
@@ -53,11 +69,11 @@ process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
|
53
69
|
function he(n) {
|
|
54
70
|
return typeof n == "string";
|
|
55
71
|
}
|
|
56
|
-
const
|
|
72
|
+
const Qe = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
57
73
|
function U(n) {
|
|
58
74
|
return parseInt(n, 10) || 0;
|
|
59
75
|
}
|
|
60
|
-
const
|
|
76
|
+
const Xe = {
|
|
61
77
|
shadow: {
|
|
62
78
|
// Visibility needed to hide the extra text area on iPads
|
|
63
79
|
visibility: "hidden",
|
|
@@ -75,65 +91,65 @@ const Qe = {
|
|
|
75
91
|
function ye(n) {
|
|
76
92
|
return n == null || Object.keys(n).length === 0 || n.outerHeightStyle === 0 && !n.overflow;
|
|
77
93
|
}
|
|
78
|
-
const xe = /* @__PURE__ */
|
|
94
|
+
const xe = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
79
95
|
const {
|
|
80
|
-
onChange:
|
|
96
|
+
onChange: i,
|
|
81
97
|
maxRows: r,
|
|
82
98
|
minRows: p = 1,
|
|
83
99
|
style: I,
|
|
84
100
|
value: E
|
|
85
|
-
} = o,
|
|
101
|
+
} = o, D = ge(o, Qe), {
|
|
86
102
|
current: O
|
|
87
|
-
} =
|
|
103
|
+
} = a.useRef(E != null), S = a.useRef(null), F = ve(t, S), v = a.useRef(null), b = a.useRef(0), [N, k] = a.useState({
|
|
88
104
|
outerHeightStyle: 0
|
|
89
|
-
}), B =
|
|
90
|
-
const
|
|
105
|
+
}), B = a.useCallback(() => {
|
|
106
|
+
const c = S.current, u = me(c).getComputedStyle(c);
|
|
91
107
|
if (u.width === "0px")
|
|
92
108
|
return {
|
|
93
109
|
outerHeightStyle: 0
|
|
94
110
|
};
|
|
95
111
|
const f = v.current;
|
|
96
|
-
f.style.width = u.width, f.value =
|
|
112
|
+
f.style.width = u.width, f.value = c.value || o.placeholder || "x", f.value.slice(-1) === `
|
|
97
113
|
` && (f.value += " ");
|
|
98
114
|
const w = u.boxSizing, z = U(u.paddingBottom) + U(u.paddingTop), A = U(u.borderBottomWidth) + U(u.borderTopWidth), C = f.scrollHeight;
|
|
99
115
|
f.value = "x";
|
|
100
116
|
const T = f.scrollHeight;
|
|
101
117
|
let h = C;
|
|
102
118
|
p && (h = Math.max(Number(p) * T, h)), r && (h = Math.min(Number(r) * T, h)), h = Math.max(h, T);
|
|
103
|
-
const G = h + (w === "border-box" ? z + A : 0),
|
|
119
|
+
const G = h + (w === "border-box" ? z + A : 0), H = Math.abs(h - C) <= 1;
|
|
104
120
|
return {
|
|
105
121
|
outerHeightStyle: G,
|
|
106
|
-
overflow:
|
|
122
|
+
overflow: H
|
|
107
123
|
};
|
|
108
|
-
}, [r, p, o.placeholder]),
|
|
124
|
+
}, [r, p, o.placeholder]), W = (c, g) => {
|
|
109
125
|
const {
|
|
110
126
|
outerHeightStyle: u,
|
|
111
127
|
overflow: f
|
|
112
128
|
} = g;
|
|
113
|
-
return b.current < 20 && (u > 0 && Math.abs((
|
|
129
|
+
return b.current < 20 && (u > 0 && Math.abs((c.outerHeightStyle || 0) - u) > 1 || c.overflow !== f) ? (b.current += 1, {
|
|
114
130
|
overflow: f,
|
|
115
131
|
outerHeightStyle: u
|
|
116
132
|
}) : (process.env.NODE_ENV !== "production" && b.current === 20 && console.error(["MUI: Too many re-renders. The layout is unstable.", "TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
117
|
-
`)),
|
|
118
|
-
}, m =
|
|
119
|
-
const
|
|
120
|
-
ye(
|
|
133
|
+
`)), c);
|
|
134
|
+
}, m = a.useCallback(() => {
|
|
135
|
+
const c = B();
|
|
136
|
+
ye(c) || k((g) => W(g, c));
|
|
121
137
|
}, [B]);
|
|
122
138
|
oe(() => {
|
|
123
|
-
const
|
|
139
|
+
const c = () => {
|
|
124
140
|
const T = B();
|
|
125
|
-
ye(T) ||
|
|
126
|
-
k((h) =>
|
|
141
|
+
ye(T) || Ke.flushSync(() => {
|
|
142
|
+
k((h) => W(h, T));
|
|
127
143
|
});
|
|
128
144
|
}, g = () => {
|
|
129
|
-
b.current = 0,
|
|
145
|
+
b.current = 0, c();
|
|
130
146
|
};
|
|
131
147
|
let u;
|
|
132
148
|
const f = () => {
|
|
133
149
|
cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
134
150
|
g();
|
|
135
151
|
});
|
|
136
|
-
}, w =
|
|
152
|
+
}, w = Ye(g), z = S.current, A = me(z);
|
|
137
153
|
A.addEventListener("resize", w);
|
|
138
154
|
let C;
|
|
139
155
|
return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? f : g), C.observe(z)), () => {
|
|
@@ -141,31 +157,31 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
141
157
|
};
|
|
142
158
|
}, [B]), oe(() => {
|
|
143
159
|
m();
|
|
144
|
-
}),
|
|
160
|
+
}), a.useEffect(() => {
|
|
145
161
|
b.current = 0;
|
|
146
162
|
}, [E]);
|
|
147
|
-
const $ = (
|
|
148
|
-
b.current = 0, O || m(),
|
|
163
|
+
const $ = (c) => {
|
|
164
|
+
b.current = 0, O || m(), i && i(c);
|
|
149
165
|
};
|
|
150
|
-
return /* @__PURE__ */ ne(
|
|
151
|
-
children: [/* @__PURE__ */ R("textarea",
|
|
166
|
+
return /* @__PURE__ */ ne(a.Fragment, {
|
|
167
|
+
children: [/* @__PURE__ */ R("textarea", d({
|
|
152
168
|
value: E,
|
|
153
169
|
onChange: $,
|
|
154
170
|
ref: F,
|
|
155
171
|
rows: p,
|
|
156
|
-
style:
|
|
172
|
+
style: d({
|
|
157
173
|
height: N.outerHeightStyle,
|
|
158
174
|
// Need a large enough difference to allow scrolling.
|
|
159
175
|
// This prevents infinite rendering loop.
|
|
160
176
|
overflow: N.overflow ? "hidden" : void 0
|
|
161
177
|
}, I)
|
|
162
|
-
},
|
|
178
|
+
}, D)), /* @__PURE__ */ R("textarea", {
|
|
163
179
|
"aria-hidden": !0,
|
|
164
180
|
className: o.className,
|
|
165
181
|
readOnly: !0,
|
|
166
182
|
ref: v,
|
|
167
183
|
tabIndex: -1,
|
|
168
|
-
style:
|
|
184
|
+
style: d({}, Xe.shadow, I, {
|
|
169
185
|
paddingTop: 0,
|
|
170
186
|
paddingBottom: 0
|
|
171
187
|
})
|
|
@@ -207,23 +223,23 @@ process.env.NODE_ENV !== "production" && (xe.propTypes = {
|
|
|
207
223
|
*/
|
|
208
224
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
209
225
|
});
|
|
210
|
-
function
|
|
226
|
+
function en({
|
|
211
227
|
props: n,
|
|
212
228
|
states: o,
|
|
213
229
|
muiFormControl: t
|
|
214
230
|
}) {
|
|
215
|
-
return o.reduce((
|
|
231
|
+
return o.reduce((i, r) => (i[r] = n[r], t && typeof n[r] > "u" && (i[r] = t[r]), i), {});
|
|
216
232
|
}
|
|
217
|
-
const Te = /* @__PURE__ */
|
|
233
|
+
const Te = /* @__PURE__ */ a.createContext(void 0);
|
|
218
234
|
process.env.NODE_ENV !== "production" && (Te.displayName = "FormControlContext");
|
|
219
235
|
const Re = Te;
|
|
220
|
-
function
|
|
221
|
-
return
|
|
236
|
+
function nn() {
|
|
237
|
+
return a.useContext(Re);
|
|
222
238
|
}
|
|
223
239
|
function Ee(n) {
|
|
224
|
-
return /* @__PURE__ */ R(Se,
|
|
225
|
-
defaultTheme:
|
|
226
|
-
themeId:
|
|
240
|
+
return /* @__PURE__ */ R(Se, d({}, n, {
|
|
241
|
+
defaultTheme: Pe,
|
|
242
|
+
themeId: Ve
|
|
227
243
|
}));
|
|
228
244
|
}
|
|
229
245
|
process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
@@ -239,35 +255,35 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
|
239
255
|
function be(n) {
|
|
240
256
|
return n != null && !(Array.isArray(n) && n.length === 0);
|
|
241
257
|
}
|
|
242
|
-
function
|
|
258
|
+
function on(n, o = !1) {
|
|
243
259
|
return n && (be(n.value) && n.value !== "" || o && be(n.defaultValue) && n.defaultValue !== "");
|
|
244
260
|
}
|
|
245
|
-
function
|
|
261
|
+
function bn(n) {
|
|
246
262
|
return n.startAdornment;
|
|
247
263
|
}
|
|
248
|
-
function
|
|
264
|
+
function tn(n) {
|
|
249
265
|
return _e("MuiInputBase", n);
|
|
250
266
|
}
|
|
251
|
-
const
|
|
267
|
+
const rn = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), te = rn, sn = ["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"], an = (n, o) => {
|
|
252
268
|
const {
|
|
253
269
|
ownerState: t
|
|
254
270
|
} = n;
|
|
255
271
|
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${ee(t.color)}`], t.fullWidth && o.fullWidth, t.hiddenLabel && o.hiddenLabel];
|
|
256
|
-
},
|
|
272
|
+
}, ln = (n, o) => {
|
|
257
273
|
const {
|
|
258
274
|
ownerState: t
|
|
259
275
|
} = n;
|
|
260
276
|
return [o.input, t.size === "small" && o.inputSizeSmall, t.multiline && o.inputMultiline, t.type === "search" && o.inputTypeSearch, t.startAdornment && o.inputAdornedStart, t.endAdornment && o.inputAdornedEnd, t.hiddenLabel && o.inputHiddenLabel];
|
|
261
|
-
},
|
|
277
|
+
}, un = (n) => {
|
|
262
278
|
const {
|
|
263
279
|
classes: o,
|
|
264
280
|
color: t,
|
|
265
|
-
disabled:
|
|
281
|
+
disabled: i,
|
|
266
282
|
error: r,
|
|
267
283
|
endAdornment: p,
|
|
268
284
|
focused: I,
|
|
269
285
|
formControl: E,
|
|
270
|
-
fullWidth:
|
|
286
|
+
fullWidth: D,
|
|
271
287
|
hiddenLabel: O,
|
|
272
288
|
multiline: S,
|
|
273
289
|
readOnly: F,
|
|
@@ -275,18 +291,18 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
275
291
|
startAdornment: b,
|
|
276
292
|
type: N
|
|
277
293
|
} = n, k = {
|
|
278
|
-
root: ["root", `color${ee(t)}`,
|
|
279
|
-
input: ["input",
|
|
294
|
+
root: ["root", `color${ee(t)}`, i && "disabled", r && "error", D && "fullWidth", I && "focused", E && "formControl", v && v !== "medium" && `size${ee(v)}`, S && "multiline", b && "adornedStart", p && "adornedEnd", O && "hiddenLabel", F && "readOnly"],
|
|
295
|
+
input: ["input", i && "disabled", N === "search" && "inputTypeSearch", S && "inputMultiline", v === "small" && "inputSizeSmall", O && "inputHiddenLabel", b && "inputAdornedStart", p && "inputAdornedEnd", F && "readOnly"]
|
|
280
296
|
};
|
|
281
|
-
return je(k,
|
|
282
|
-
},
|
|
297
|
+
return je(k, tn, o);
|
|
298
|
+
}, cn = we("div", {
|
|
283
299
|
name: "MuiInputBase",
|
|
284
300
|
slot: "Root",
|
|
285
|
-
overridesResolver:
|
|
301
|
+
overridesResolver: an
|
|
286
302
|
})(({
|
|
287
303
|
theme: n,
|
|
288
304
|
ownerState: o
|
|
289
|
-
}) =>
|
|
305
|
+
}) => d({}, n.typography.body1, {
|
|
290
306
|
color: (n.vars || n).palette.text.primary,
|
|
291
307
|
lineHeight: "1.4375em",
|
|
292
308
|
// 23px
|
|
@@ -300,7 +316,7 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
300
316
|
color: (n.vars || n).palette.text.disabled,
|
|
301
317
|
cursor: "default"
|
|
302
318
|
}
|
|
303
|
-
}, o.multiline &&
|
|
319
|
+
}, o.multiline && d({
|
|
304
320
|
padding: "4px 0 5px"
|
|
305
321
|
}, o.size === "small" && {
|
|
306
322
|
paddingTop: 1
|
|
@@ -309,12 +325,12 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
309
325
|
})), dn = we("input", {
|
|
310
326
|
name: "MuiInputBase",
|
|
311
327
|
slot: "Input",
|
|
312
|
-
overridesResolver:
|
|
328
|
+
overridesResolver: ln
|
|
313
329
|
})(({
|
|
314
330
|
theme: n,
|
|
315
331
|
ownerState: o
|
|
316
332
|
}) => {
|
|
317
|
-
const t = n.palette.mode === "light",
|
|
333
|
+
const t = n.palette.mode === "light", i = d({
|
|
318
334
|
color: "currentColor"
|
|
319
335
|
}, n.vars ? {
|
|
320
336
|
opacity: n.vars.opacity.inputPlaceholder
|
|
@@ -331,7 +347,7 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
331
347
|
} : {
|
|
332
348
|
opacity: t ? 0.42 : 0.5
|
|
333
349
|
};
|
|
334
|
-
return
|
|
350
|
+
return d({
|
|
335
351
|
font: "inherit",
|
|
336
352
|
letterSpacing: "inherit",
|
|
337
353
|
color: "currentColor",
|
|
@@ -351,12 +367,12 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
351
367
|
// Fix IE11 width issue
|
|
352
368
|
animationName: "mui-auto-fill-cancel",
|
|
353
369
|
animationDuration: "10ms",
|
|
354
|
-
"&::-webkit-input-placeholder":
|
|
355
|
-
"&::-moz-placeholder":
|
|
370
|
+
"&::-webkit-input-placeholder": i,
|
|
371
|
+
"&::-moz-placeholder": i,
|
|
356
372
|
// Firefox 19+
|
|
357
|
-
"&:-ms-input-placeholder":
|
|
373
|
+
"&:-ms-input-placeholder": i,
|
|
358
374
|
// IE11
|
|
359
|
-
"&::-ms-input-placeholder":
|
|
375
|
+
"&::-ms-input-placeholder": i,
|
|
360
376
|
// Edge
|
|
361
377
|
"&:focus": {
|
|
362
378
|
outline: 0
|
|
@@ -407,7 +423,7 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
407
423
|
// Improve type search style.
|
|
408
424
|
MozAppearance: "textfield"
|
|
409
425
|
});
|
|
410
|
-
}),
|
|
426
|
+
}), pn = /* @__PURE__ */ R(Ee, {
|
|
411
427
|
styles: {
|
|
412
428
|
"@keyframes mui-auto-fill": {
|
|
413
429
|
from: {
|
|
@@ -420,8 +436,8 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
420
436
|
}
|
|
421
437
|
}
|
|
422
438
|
}
|
|
423
|
-
}), Oe = /* @__PURE__ */
|
|
424
|
-
var
|
|
439
|
+
}), Oe = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
440
|
+
var i;
|
|
425
441
|
const r = Le({
|
|
426
442
|
props: o,
|
|
427
443
|
name: "MuiInputBase"
|
|
@@ -429,7 +445,7 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
429
445
|
"aria-describedby": p,
|
|
430
446
|
autoComplete: I,
|
|
431
447
|
autoFocus: E,
|
|
432
|
-
className:
|
|
448
|
+
className: D,
|
|
433
449
|
components: O = {},
|
|
434
450
|
componentsProps: S = {},
|
|
435
451
|
defaultValue: F,
|
|
@@ -438,10 +454,10 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
438
454
|
endAdornment: N,
|
|
439
455
|
fullWidth: k = !1,
|
|
440
456
|
id: B,
|
|
441
|
-
inputComponent:
|
|
457
|
+
inputComponent: W = "input",
|
|
442
458
|
inputProps: m = {},
|
|
443
459
|
inputRef: $,
|
|
444
|
-
maxRows:
|
|
460
|
+
maxRows: c,
|
|
445
461
|
minRows: g,
|
|
446
462
|
multiline: u = !1,
|
|
447
463
|
name: f,
|
|
@@ -452,84 +468,84 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
452
468
|
onKeyDown: T,
|
|
453
469
|
onKeyUp: h,
|
|
454
470
|
placeholder: G,
|
|
455
|
-
readOnly:
|
|
471
|
+
readOnly: H,
|
|
456
472
|
renderSuffix: re,
|
|
457
473
|
rows: _,
|
|
458
474
|
slotProps: ie = {},
|
|
459
475
|
slots: se = {},
|
|
460
|
-
startAdornment:
|
|
476
|
+
startAdornment: P,
|
|
461
477
|
type: ae = "text",
|
|
462
478
|
value: Ne
|
|
463
|
-
} = r, ze = ge(r,
|
|
479
|
+
} = r, ze = ge(r, sn), L = m.value != null ? m.value : Ne, {
|
|
464
480
|
current: K
|
|
465
|
-
} =
|
|
466
|
-
process.env.NODE_ENV !== "production" &&
|
|
481
|
+
} = a.useRef(L != null), M = a.useRef(), Ae = a.useCallback((s) => {
|
|
482
|
+
process.env.NODE_ENV !== "production" && s && s.nodeName !== "INPUT" && !s.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(`
|
|
467
483
|
`));
|
|
468
|
-
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] =
|
|
469
|
-
process.env.NODE_ENV !== "production" &&
|
|
484
|
+
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] = a.useState(!1), l = nn();
|
|
485
|
+
process.env.NODE_ENV !== "production" && a.useEffect(() => {
|
|
470
486
|
if (l)
|
|
471
487
|
return l.registerEffect();
|
|
472
488
|
}, [l]);
|
|
473
|
-
const y =
|
|
489
|
+
const y = en({
|
|
474
490
|
props: r,
|
|
475
491
|
muiFormControl: l,
|
|
476
492
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
477
493
|
});
|
|
478
|
-
y.focused = l ? l.focused : q,
|
|
494
|
+
y.focused = l ? l.focused : q, a.useEffect(() => {
|
|
479
495
|
!l && v && q && (Y(!1), w && w());
|
|
480
496
|
}, [l, v, q, w]);
|
|
481
|
-
const Z = l && l.onFilled, J = l && l.onEmpty,
|
|
482
|
-
|
|
497
|
+
const Z = l && l.onFilled, J = l && l.onEmpty, V = a.useCallback((s) => {
|
|
498
|
+
on(s) ? Z && Z() : J && J();
|
|
483
499
|
}, [Z, J]);
|
|
484
500
|
oe(() => {
|
|
485
|
-
K &&
|
|
501
|
+
K && V({
|
|
486
502
|
value: L
|
|
487
503
|
});
|
|
488
|
-
}, [L,
|
|
489
|
-
const Fe = (
|
|
504
|
+
}, [L, V, K]);
|
|
505
|
+
const Fe = (s) => {
|
|
490
506
|
if (y.disabled) {
|
|
491
|
-
|
|
507
|
+
s.stopPropagation();
|
|
492
508
|
return;
|
|
493
509
|
}
|
|
494
|
-
C && C(
|
|
495
|
-
}, ke = (
|
|
496
|
-
w && w(
|
|
497
|
-
}, Be = (
|
|
510
|
+
C && C(s), m.onFocus && m.onFocus(s), l && l.onFocus ? l.onFocus(s) : Y(!0);
|
|
511
|
+
}, ke = (s) => {
|
|
512
|
+
w && w(s), m.onBlur && m.onBlur(s), l && l.onBlur ? l.onBlur(s) : Y(!1);
|
|
513
|
+
}, Be = (s, ...de) => {
|
|
498
514
|
if (!K) {
|
|
499
|
-
const pe =
|
|
515
|
+
const pe = s.target || M.current;
|
|
500
516
|
if (pe == null)
|
|
501
517
|
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." : Ue(1));
|
|
502
|
-
|
|
518
|
+
V({
|
|
503
519
|
value: pe.value
|
|
504
520
|
});
|
|
505
521
|
}
|
|
506
|
-
m.onChange && m.onChange(
|
|
522
|
+
m.onChange && m.onChange(s, ...de), z && z(s, ...de);
|
|
507
523
|
};
|
|
508
|
-
|
|
509
|
-
|
|
524
|
+
a.useEffect(() => {
|
|
525
|
+
V(M.current);
|
|
510
526
|
}, []);
|
|
511
|
-
const Me = (
|
|
512
|
-
M.current &&
|
|
527
|
+
const Me = (s) => {
|
|
528
|
+
M.current && s.currentTarget === s.target && M.current.focus(), A && A(s);
|
|
513
529
|
};
|
|
514
|
-
let Q =
|
|
515
|
-
u && Q === "input" && (_ ? (process.env.NODE_ENV !== "production" && (g ||
|
|
530
|
+
let Q = W, x = m;
|
|
531
|
+
u && Q === "input" && (_ ? (process.env.NODE_ENV !== "production" && (g || c) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), x = d({
|
|
516
532
|
type: void 0,
|
|
517
533
|
minRows: _,
|
|
518
534
|
maxRows: _
|
|
519
|
-
}, x)) : x =
|
|
535
|
+
}, x)) : x = d({
|
|
520
536
|
type: void 0,
|
|
521
|
-
maxRows:
|
|
537
|
+
maxRows: c,
|
|
522
538
|
minRows: g
|
|
523
539
|
}, x), Q = xe);
|
|
524
|
-
const
|
|
525
|
-
|
|
540
|
+
const De = (s) => {
|
|
541
|
+
V(s.animationName === "mui-auto-fill-cancel" ? M.current : {
|
|
526
542
|
value: "x"
|
|
527
543
|
});
|
|
528
544
|
};
|
|
529
|
-
|
|
530
|
-
l && l.setAdornedStart(!!
|
|
531
|
-
}, [l,
|
|
532
|
-
const j =
|
|
545
|
+
a.useEffect(() => {
|
|
546
|
+
l && l.setAdornedStart(!!P);
|
|
547
|
+
}, [l, P]);
|
|
548
|
+
const j = d({}, r, {
|
|
533
549
|
color: y.color || "primary",
|
|
534
550
|
disabled: y.disabled,
|
|
535
551
|
endAdornment: N,
|
|
@@ -540,20 +556,20 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
540
556
|
hiddenLabel: y.hiddenLabel,
|
|
541
557
|
multiline: u,
|
|
542
558
|
size: y.size,
|
|
543
|
-
startAdornment:
|
|
559
|
+
startAdornment: P,
|
|
544
560
|
type: ae
|
|
545
|
-
}), le =
|
|
546
|
-
return x =
|
|
547
|
-
children: [!b &&
|
|
548
|
-
ownerState:
|
|
561
|
+
}), le = un(j), ue = se.root || O.Root || cn, X = ie.root || S.root || {}, ce = se.input || O.Input || dn;
|
|
562
|
+
return x = d({}, x, (i = ie.input) != null ? i : S.input), /* @__PURE__ */ ne(a.Fragment, {
|
|
563
|
+
children: [!b && pn, /* @__PURE__ */ ne(ue, d({}, X, !he(ue) && {
|
|
564
|
+
ownerState: d({}, j, X.ownerState)
|
|
549
565
|
}, {
|
|
550
566
|
ref: t,
|
|
551
567
|
onClick: Me
|
|
552
568
|
}, ze, {
|
|
553
|
-
className: fe(le.root, X.className,
|
|
554
|
-
children: [
|
|
569
|
+
className: fe(le.root, X.className, D, H && "MuiInputBase-readOnly"),
|
|
570
|
+
children: [P, /* @__PURE__ */ R(Re.Provider, {
|
|
555
571
|
value: null,
|
|
556
|
-
children: /* @__PURE__ */ R(
|
|
572
|
+
children: /* @__PURE__ */ R(ce, d({
|
|
557
573
|
ownerState: j,
|
|
558
574
|
"aria-invalid": y.error,
|
|
559
575
|
"aria-describedby": p,
|
|
@@ -562,28 +578,28 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
562
578
|
defaultValue: F,
|
|
563
579
|
disabled: y.disabled,
|
|
564
580
|
id: B,
|
|
565
|
-
onAnimationStart:
|
|
581
|
+
onAnimationStart: De,
|
|
566
582
|
name: f,
|
|
567
583
|
placeholder: G,
|
|
568
|
-
readOnly:
|
|
584
|
+
readOnly: H,
|
|
569
585
|
required: y.required,
|
|
570
586
|
rows: _,
|
|
571
587
|
value: L,
|
|
572
588
|
onKeyDown: T,
|
|
573
589
|
onKeyUp: h,
|
|
574
590
|
type: ae
|
|
575
|
-
}, x, !he(
|
|
591
|
+
}, x, !he(ce) && {
|
|
576
592
|
as: Q,
|
|
577
|
-
ownerState:
|
|
593
|
+
ownerState: d({}, j, x.ownerState)
|
|
578
594
|
}, {
|
|
579
595
|
ref: Ie,
|
|
580
|
-
className: fe(le.input, x.className,
|
|
596
|
+
className: fe(le.input, x.className, H && "MuiInputBase-readOnly"),
|
|
581
597
|
onBlur: ke,
|
|
582
598
|
onChange: Be,
|
|
583
599
|
onFocus: Fe
|
|
584
600
|
}))
|
|
585
|
-
}), N, re ? re(
|
|
586
|
-
startAdornment:
|
|
601
|
+
}), N, re ? re(d({}, y, {
|
|
602
|
+
startAdornment: P
|
|
587
603
|
})) : null]
|
|
588
604
|
}))]
|
|
589
605
|
});
|
|
@@ -685,7 +701,7 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
685
701
|
* Either a string to use a HTML element or a component.
|
|
686
702
|
* @default 'input'
|
|
687
703
|
*/
|
|
688
|
-
inputComponent:
|
|
704
|
+
inputComponent: $e,
|
|
689
705
|
/**
|
|
690
706
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
691
707
|
* @default {}
|
|
@@ -694,7 +710,7 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
694
710
|
/**
|
|
695
711
|
* Pass a ref to the `input` element.
|
|
696
712
|
*/
|
|
697
|
-
inputRef:
|
|
713
|
+
inputRef: Ge,
|
|
698
714
|
/**
|
|
699
715
|
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
|
700
716
|
* FormControl.
|
|
@@ -818,18 +834,21 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
818
834
|
*/
|
|
819
835
|
value: e.any
|
|
820
836
|
});
|
|
821
|
-
const
|
|
837
|
+
const gn = Oe;
|
|
822
838
|
export {
|
|
823
839
|
Re as F,
|
|
824
|
-
|
|
840
|
+
cn as I,
|
|
825
841
|
dn as a,
|
|
826
|
-
|
|
827
|
-
|
|
842
|
+
ln as b,
|
|
843
|
+
gn as c,
|
|
828
844
|
he as d,
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
845
|
+
me as e,
|
|
846
|
+
en as f,
|
|
847
|
+
bn as g,
|
|
848
|
+
on as h,
|
|
832
849
|
te as i,
|
|
833
|
-
|
|
834
|
-
|
|
850
|
+
Ye as j,
|
|
851
|
+
Ze as o,
|
|
852
|
+
an as r,
|
|
853
|
+
nn as u
|
|
835
854
|
};
|