@cgi-learning-hub/ui 0.0.1-dev.1709567324 → 0.0.1-dev.1709569189
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-CjHm9A9L.cjs +1 -0
- package/dist/{Box-C0qXdJzV.js → Box-erN4AuKs.js} +8 -8
- package/dist/ButtonBase-BybMkBUd.cjs +75 -0
- package/dist/ButtonBase-CGcs8Gbj.cjs +75 -0
- package/dist/ButtonBase-V1pwsMMs.js +649 -0
- package/dist/ButtonBase-aujiNoUb.js +649 -0
- package/dist/DefaultButton-Cg4tPCgf.cjs +28 -0
- package/dist/{DefaultButton-B-2UppUm.js → DefaultButton-DbpZOb47.js} +355 -146
- package/dist/FileListItem-ChKTjDnV.js +254 -0
- package/dist/FileListItem-CjFIZgYg.cjs +28 -0
- package/dist/IconButton-CHXclgOn.cjs +2 -0
- package/dist/{IconButton-1URziYlU.js → IconButton-DE5JOshS.js} +8 -8
- package/dist/{InputBase-Dc0v-Ihf.js → InputBase-C8AzQJJ9.js} +161 -174
- package/dist/InputBase-D6eXzDaz.cjs +4 -0
- package/dist/LocalizationProvider-42pD7VmS.cjs +5 -0
- package/dist/{LocalizationProvider-BD64DNxF.js → LocalizationProvider-Cov62Xe0.js} +4 -3
- package/dist/Tabs-DiWeNGD4.js +1167 -0
- package/dist/Tabs-DoxP7EMA.cjs +4 -0
- package/dist/TextInput-BbSyyuvO.cjs +12 -0
- package/dist/{TextInput-DsSFDlNR.js → TextInput-DmMk4i-V.js} +1892 -1650
- package/dist/TimePicker-B5MjZCK0.cjs +89 -0
- package/dist/TimePicker-BmxG3a2D.js +28354 -0
- package/dist/TransitionGroup-COuDopJ-.js +188 -0
- package/dist/TransitionGroup-X90dkobW.cjs +1 -0
- package/dist/Typography-B90UzlQW.js +179 -0
- package/dist/Typography-KFjBz5Hm.cjs +1 -0
- package/dist/clamp-0LjYbpE_.cjs +23 -0
- package/dist/clamp-BGJvJ0FN.js +1641 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +12 -11
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +1 -1
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +3 -3
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +6 -6
- 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 +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +2 -2
- 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 +2 -2
- 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/index.cjs.js +1 -1
- package/dist/components/index.es.js +90 -91
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +174 -6
- 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 +2 -2
- 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 +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +4 -4
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +2 -2
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +7 -39
- package/dist/components/lists/FileList/index.cjs.js +1 -1
- package/dist/components/lists/FileList/index.es.js +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +18 -16
- package/dist/components/lists/index.cjs.js +1 -1
- package/dist/components/lists/index.es.js +4 -4
- package/dist/createSvgIcon-BSYat4nx.js +74 -0
- package/dist/createSvgIcon-BqRWmIPG.cjs +1 -0
- package/dist/{createSvgIcon-Dspfpz-l.js → createSvgIcon-DeRU4e-L.js} +20 -18
- package/dist/createSvgIcon-doNQ5emq.cjs +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +93 -94
- package/dist/refType-Bt58K9Sk.cjs +1 -0
- package/dist/{refType-BBFUe6fu.js → refType-CoCfCK--.js} +1 -1
- package/dist/styled-BU8dAebc.js +1751 -0
- package/dist/styled-DGjsLYEN.cjs +45 -0
- package/dist/styled-DP6LeBLQ.js +261 -0
- package/dist/styled-Dkd1VGM-.cjs +1 -0
- package/dist/useTheme-C132tQV-.js +10 -0
- package/dist/useTheme-CliHZTkE.cjs +1 -0
- package/dist/useThemeProps-63SNG58r.js +753 -0
- package/dist/useThemeProps-CVatCXfo.cjs +20 -0
- package/package.json +6 -7
- package/dist/Box-DjRIKMD0.cjs +0 -1
- package/dist/ButtonBase-BvllyU4w.cjs +0 -75
- package/dist/ButtonBase-C14ZYs6z.js +0 -833
- package/dist/CircularProgress-Bf46-VRs.js +0 -217
- package/dist/CircularProgress-DjSMBYnK.cjs +0 -28
- package/dist/DefaultButton-DPZOltN5.cjs +0 -1
- package/dist/IconButton-X6l-U-im.cjs +0 -2
- package/dist/InputBase-CzupOzjh.cjs +0 -4
- package/dist/LocalizationProvider-DqwEOZOd.cjs +0 -5
- package/dist/SearchInput-Bb3sCx3k.cjs +0 -1
- package/dist/SearchInput-DRjmNW6W.js +0 -177
- package/dist/Tabs-B9BPJaDx.js +0 -1090
- package/dist/Tabs-Dx8YJT4c.cjs +0 -4
- package/dist/TextInput-BFguMDSu.cjs +0 -12
- package/dist/TimePicker-B0HOzxHh.cjs +0 -69
- package/dist/TimePicker-OBZs04Z8.js +0 -19694
- package/dist/Typography-CRt6WSxo.js +0 -204
- package/dist/Typography-DsPQABF2.cjs +0 -1
- package/dist/createSvgIcon-BOQCM03y.cjs +0 -2
- package/dist/createSvgIcon-C2VxBqzG.cjs +0 -1
- package/dist/createSvgIcon-xJp3_zwo.js +0 -84
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/refType-5EEBZL5_.cjs +0 -1
- package/dist/styled-D8lXwcQy.js +0 -423
- package/dist/styled-DFoJwRxe.cjs +0 -24
- package/dist/useSlotProps-BoMYRJkF.js +0 -72
- package/dist/useSlotProps-EKKRQjEn.cjs +0 -1
- package/dist/useTheme-BkW5nNsn.cjs +0 -1
- package/dist/useTheme-Bo1inEHN.js +0 -9
- package/dist/useThemeProps-BRWSvuZw.cjs +0 -42
- package/dist/useThemeProps-CZzcR_pm.js +0 -2288
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as He, P as e, a as ge, _ as c, g as Pe, c as ee, f as De } from "./clamp-BGJvJ0FN.js";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { g as
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { G as We, d as Ve, T as _e, g as Le, s as we, u as Ue, c as fe, b as je } from "./styled-BU8dAebc.js";
|
|
4
|
+
import { jsx as A, jsxs as oe } from "react/jsx-runtime";
|
|
5
5
|
import { a as ve, u as ne } from "./useForkRef-CQ5u1_mH.js";
|
|
6
6
|
import * as $e from "react-dom";
|
|
7
7
|
import { a as me, d as Ge } from "./ownerWindow-C7EH1lr6.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { Global as Ye } from "@emotion/react";
|
|
11
|
-
function Ze(o) {
|
|
12
|
-
return o == null || Object.keys(o).length === 0;
|
|
13
|
-
}
|
|
14
|
-
function Ce(o) {
|
|
15
|
-
const {
|
|
16
|
-
styles: n,
|
|
17
|
-
defaultTheme: t = {}
|
|
18
|
-
} = o;
|
|
19
|
-
return /* @__PURE__ */ R(Ye, {
|
|
20
|
-
styles: typeof n == "function" ? (r) => n(Ze(r) ? t : r) : n
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
24
|
-
defaultTheme: e.object,
|
|
25
|
-
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
26
|
-
});
|
|
27
|
-
function Se({
|
|
8
|
+
import { e as Ke, r as qe } from "./refType-CoCfCK--.js";
|
|
9
|
+
function Ce({
|
|
28
10
|
styles: o,
|
|
29
11
|
themeId: n,
|
|
30
12
|
defaultTheme: t = {}
|
|
31
13
|
}) {
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
styles:
|
|
14
|
+
const l = He(t), i = typeof o == "function" ? o(n && l[n] || l) : o;
|
|
15
|
+
return /* @__PURE__ */ A(We, {
|
|
16
|
+
styles: i
|
|
35
17
|
});
|
|
36
18
|
}
|
|
37
|
-
process.env.NODE_ENV !== "production" && (
|
|
19
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
38
20
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
39
21
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
40
22
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -52,17 +34,14 @@ process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
|
52
34
|
*/
|
|
53
35
|
themeId: e.string
|
|
54
36
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const Te = xe;
|
|
58
|
-
function Je() {
|
|
59
|
-
return s.useContext(Te);
|
|
37
|
+
function he(o) {
|
|
38
|
+
return typeof o == "string";
|
|
60
39
|
}
|
|
61
|
-
const
|
|
62
|
-
function
|
|
40
|
+
const Ye = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
41
|
+
function j(o) {
|
|
63
42
|
return parseInt(o, 10) || 0;
|
|
64
43
|
}
|
|
65
|
-
const
|
|
44
|
+
const Ze = {
|
|
66
45
|
shadow: {
|
|
67
46
|
// Visibility needed to hide the extra text area on iPads
|
|
68
47
|
visibility: "hidden",
|
|
@@ -80,16 +59,16 @@ const Xe = {
|
|
|
80
59
|
function ye(o) {
|
|
81
60
|
return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflow;
|
|
82
61
|
}
|
|
83
|
-
const
|
|
62
|
+
const Se = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
84
63
|
const {
|
|
85
|
-
onChange:
|
|
86
|
-
maxRows:
|
|
64
|
+
onChange: l,
|
|
65
|
+
maxRows: i,
|
|
87
66
|
minRows: p = 1,
|
|
88
67
|
style: I,
|
|
89
|
-
value:
|
|
90
|
-
} = n, H = ge(n,
|
|
91
|
-
current:
|
|
92
|
-
} = s.useRef(
|
|
68
|
+
value: T
|
|
69
|
+
} = n, H = ge(n, Ye), {
|
|
70
|
+
current: E
|
|
71
|
+
} = s.useRef(T != null), S = s.useRef(null), F = ve(t, S), v = s.useRef(null), b = s.useRef(0), [O, k] = s.useState({
|
|
93
72
|
outerHeightStyle: 0
|
|
94
73
|
}), B = s.useCallback(() => {
|
|
95
74
|
const d = S.current, u = me(d).getComputedStyle(d);
|
|
@@ -100,17 +79,17 @@ const Re = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
|
100
79
|
const f = v.current;
|
|
101
80
|
f.style.width = u.width, f.value = d.value || n.placeholder || "x", f.value.slice(-1) === `
|
|
102
81
|
` && (f.value += " ");
|
|
103
|
-
const w = u.boxSizing,
|
|
82
|
+
const w = u.boxSizing, N = j(u.paddingBottom) + j(u.paddingTop), z = j(u.borderBottomWidth) + j(u.borderTopWidth), C = f.scrollHeight;
|
|
104
83
|
f.value = "x";
|
|
105
|
-
const
|
|
84
|
+
const R = f.scrollHeight;
|
|
106
85
|
let h = C;
|
|
107
|
-
p && (h = Math.max(Number(p) *
|
|
108
|
-
const G = h + (w === "border-box" ?
|
|
86
|
+
p && (h = Math.max(Number(p) * R, h)), i && (h = Math.min(Number(i) * R, h)), h = Math.max(h, R);
|
|
87
|
+
const G = h + (w === "border-box" ? N + z : 0), P = Math.abs(h - C) <= 1;
|
|
109
88
|
return {
|
|
110
89
|
outerHeightStyle: G,
|
|
111
90
|
overflow: P
|
|
112
91
|
};
|
|
113
|
-
}, [
|
|
92
|
+
}, [i, p, n.placeholder]), V = (d, g) => {
|
|
114
93
|
const {
|
|
115
94
|
outerHeightStyle: u,
|
|
116
95
|
overflow: f
|
|
@@ -126,9 +105,9 @@ const Re = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
|
126
105
|
}, [B]);
|
|
127
106
|
ne(() => {
|
|
128
107
|
const d = () => {
|
|
129
|
-
const
|
|
130
|
-
ye(
|
|
131
|
-
k((h) => V(h,
|
|
108
|
+
const R = B();
|
|
109
|
+
ye(R) || $e.flushSync(() => {
|
|
110
|
+
k((h) => V(h, R));
|
|
132
111
|
});
|
|
133
112
|
}, g = () => {
|
|
134
113
|
b.current = 0, d();
|
|
@@ -138,46 +117,46 @@ const Re = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
|
138
117
|
cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
139
118
|
g();
|
|
140
119
|
});
|
|
141
|
-
}, w = Ge(g),
|
|
142
|
-
|
|
120
|
+
}, w = Ge(g), N = S.current, z = me(N);
|
|
121
|
+
z.addEventListener("resize", w);
|
|
143
122
|
let C;
|
|
144
|
-
return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? f : g), C.observe(
|
|
145
|
-
w.clear(), cancelAnimationFrame(u),
|
|
123
|
+
return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? f : g), C.observe(N)), () => {
|
|
124
|
+
w.clear(), cancelAnimationFrame(u), z.removeEventListener("resize", w), C && C.disconnect();
|
|
146
125
|
};
|
|
147
126
|
}, [B]), ne(() => {
|
|
148
127
|
m();
|
|
149
128
|
}), s.useEffect(() => {
|
|
150
129
|
b.current = 0;
|
|
151
|
-
}, [
|
|
130
|
+
}, [T]);
|
|
152
131
|
const $ = (d) => {
|
|
153
|
-
b.current = 0,
|
|
132
|
+
b.current = 0, E || m(), l && l(d);
|
|
154
133
|
};
|
|
155
134
|
return /* @__PURE__ */ oe(s.Fragment, {
|
|
156
|
-
children: [/* @__PURE__ */
|
|
157
|
-
value:
|
|
135
|
+
children: [/* @__PURE__ */ A("textarea", c({
|
|
136
|
+
value: T,
|
|
158
137
|
onChange: $,
|
|
159
138
|
ref: F,
|
|
160
139
|
rows: p,
|
|
161
140
|
style: c({
|
|
162
|
-
height:
|
|
141
|
+
height: O.outerHeightStyle,
|
|
163
142
|
// Need a large enough difference to allow scrolling.
|
|
164
143
|
// This prevents infinite rendering loop.
|
|
165
|
-
overflow:
|
|
144
|
+
overflow: O.overflow ? "hidden" : void 0
|
|
166
145
|
}, I)
|
|
167
|
-
}, H)), /* @__PURE__ */
|
|
146
|
+
}, H)), /* @__PURE__ */ A("textarea", {
|
|
168
147
|
"aria-hidden": !0,
|
|
169
148
|
className: n.className,
|
|
170
149
|
readOnly: !0,
|
|
171
150
|
ref: v,
|
|
172
151
|
tabIndex: -1,
|
|
173
|
-
style: c({},
|
|
152
|
+
style: c({}, Ze.shadow, I, {
|
|
174
153
|
paddingTop: 0,
|
|
175
154
|
paddingBottom: 0
|
|
176
155
|
})
|
|
177
156
|
})]
|
|
178
157
|
});
|
|
179
158
|
});
|
|
180
|
-
process.env.NODE_ENV !== "production" && (
|
|
159
|
+
process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
181
160
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
182
161
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
183
162
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -212,20 +191,26 @@ process.env.NODE_ENV !== "production" && (Re.propTypes = {
|
|
|
212
191
|
*/
|
|
213
192
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
214
193
|
});
|
|
215
|
-
|
|
194
|
+
const xe = /* @__PURE__ */ s.createContext(void 0);
|
|
195
|
+
process.env.NODE_ENV !== "production" && (xe.displayName = "FormControlContext");
|
|
196
|
+
const Re = xe;
|
|
197
|
+
function Je() {
|
|
198
|
+
return s.useContext(Re);
|
|
199
|
+
}
|
|
200
|
+
function Qe({
|
|
216
201
|
props: o,
|
|
217
202
|
states: n,
|
|
218
203
|
muiFormControl: t
|
|
219
204
|
}) {
|
|
220
|
-
return n.reduce((
|
|
205
|
+
return n.reduce((l, i) => (l[i] = o[i], t && typeof o[i] > "u" && (l[i] = t[i]), l), {});
|
|
221
206
|
}
|
|
222
|
-
function
|
|
223
|
-
return /* @__PURE__ */
|
|
224
|
-
defaultTheme:
|
|
225
|
-
themeId:
|
|
207
|
+
function Te(o) {
|
|
208
|
+
return /* @__PURE__ */ A(Ce, c({}, o, {
|
|
209
|
+
defaultTheme: Ve,
|
|
210
|
+
themeId: _e
|
|
226
211
|
}));
|
|
227
212
|
}
|
|
228
|
-
process.env.NODE_ENV !== "production" && (
|
|
213
|
+
process.env.NODE_ENV !== "production" && (Te.propTypes = {
|
|
229
214
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
230
215
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
231
216
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -238,50 +223,50 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
|
238
223
|
function be(o) {
|
|
239
224
|
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
240
225
|
}
|
|
241
|
-
function
|
|
226
|
+
function Xe(o, n = !1) {
|
|
242
227
|
return o && (be(o.value) && o.value !== "" || n && be(o.defaultValue) && o.defaultValue !== "");
|
|
243
228
|
}
|
|
244
|
-
function
|
|
229
|
+
function yo(o) {
|
|
245
230
|
return o.startAdornment;
|
|
246
231
|
}
|
|
247
|
-
function
|
|
248
|
-
return
|
|
232
|
+
function eo(o) {
|
|
233
|
+
return Pe("MuiInputBase", o);
|
|
249
234
|
}
|
|
250
|
-
const
|
|
235
|
+
const oo = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), te = oo, no = ["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"], to = (o, n) => {
|
|
251
236
|
const {
|
|
252
237
|
ownerState: t
|
|
253
238
|
} = o;
|
|
254
239
|
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${ee(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
|
|
255
|
-
},
|
|
240
|
+
}, ro = (o, n) => {
|
|
256
241
|
const {
|
|
257
242
|
ownerState: t
|
|
258
243
|
} = o;
|
|
259
244
|
return [n.input, t.size === "small" && n.inputSizeSmall, t.multiline && n.inputMultiline, t.type === "search" && n.inputTypeSearch, t.startAdornment && n.inputAdornedStart, t.endAdornment && n.inputAdornedEnd, t.hiddenLabel && n.inputHiddenLabel];
|
|
260
|
-
},
|
|
245
|
+
}, io = (o) => {
|
|
261
246
|
const {
|
|
262
247
|
classes: n,
|
|
263
248
|
color: t,
|
|
264
|
-
disabled:
|
|
265
|
-
error:
|
|
249
|
+
disabled: l,
|
|
250
|
+
error: i,
|
|
266
251
|
endAdornment: p,
|
|
267
252
|
focused: I,
|
|
268
|
-
formControl:
|
|
253
|
+
formControl: T,
|
|
269
254
|
fullWidth: H,
|
|
270
|
-
hiddenLabel:
|
|
255
|
+
hiddenLabel: E,
|
|
271
256
|
multiline: S,
|
|
272
257
|
readOnly: F,
|
|
273
258
|
size: v,
|
|
274
259
|
startAdornment: b,
|
|
275
|
-
type:
|
|
260
|
+
type: O
|
|
276
261
|
} = o, k = {
|
|
277
|
-
root: ["root", `color${ee(t)}`,
|
|
278
|
-
input: ["input",
|
|
262
|
+
root: ["root", `color${ee(t)}`, l && "disabled", i && "error", H && "fullWidth", I && "focused", T && "formControl", v && v !== "medium" && `size${ee(v)}`, S && "multiline", b && "adornedStart", p && "adornedEnd", E && "hiddenLabel", F && "readOnly"],
|
|
263
|
+
input: ["input", l && "disabled", O === "search" && "inputTypeSearch", S && "inputMultiline", v === "small" && "inputSizeSmall", E && "inputHiddenLabel", b && "inputAdornedStart", p && "inputAdornedEnd", F && "readOnly"]
|
|
279
264
|
};
|
|
280
|
-
return
|
|
281
|
-
},
|
|
265
|
+
return je(k, eo, n);
|
|
266
|
+
}, so = we("div", {
|
|
282
267
|
name: "MuiInputBase",
|
|
283
268
|
slot: "Root",
|
|
284
|
-
overridesResolver:
|
|
269
|
+
overridesResolver: to
|
|
285
270
|
})(({
|
|
286
271
|
theme: o,
|
|
287
272
|
ownerState: n
|
|
@@ -305,15 +290,15 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
305
290
|
paddingTop: 1
|
|
306
291
|
}), n.fullWidth && {
|
|
307
292
|
width: "100%"
|
|
308
|
-
})),
|
|
293
|
+
})), ao = we("input", {
|
|
309
294
|
name: "MuiInputBase",
|
|
310
295
|
slot: "Input",
|
|
311
|
-
overridesResolver:
|
|
296
|
+
overridesResolver: ro
|
|
312
297
|
})(({
|
|
313
298
|
theme: o,
|
|
314
299
|
ownerState: n
|
|
315
300
|
}) => {
|
|
316
|
-
const t = o.palette.mode === "light",
|
|
301
|
+
const t = o.palette.mode === "light", l = c({
|
|
317
302
|
color: "currentColor"
|
|
318
303
|
}, o.vars ? {
|
|
319
304
|
opacity: o.vars.opacity.inputPlaceholder
|
|
@@ -323,7 +308,7 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
323
308
|
transition: o.transitions.create("opacity", {
|
|
324
309
|
duration: o.transitions.duration.shorter
|
|
325
310
|
})
|
|
326
|
-
}),
|
|
311
|
+
}), i = {
|
|
327
312
|
opacity: "0 !important"
|
|
328
313
|
}, p = o.vars ? {
|
|
329
314
|
opacity: o.vars.opacity.inputPlaceholder
|
|
@@ -350,12 +335,12 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
350
335
|
// Fix IE11 width issue
|
|
351
336
|
animationName: "mui-auto-fill-cancel",
|
|
352
337
|
animationDuration: "10ms",
|
|
353
|
-
"&::-webkit-input-placeholder":
|
|
354
|
-
"&::-moz-placeholder":
|
|
338
|
+
"&::-webkit-input-placeholder": l,
|
|
339
|
+
"&::-moz-placeholder": l,
|
|
355
340
|
// Firefox 19+
|
|
356
|
-
"&:-ms-input-placeholder":
|
|
341
|
+
"&:-ms-input-placeholder": l,
|
|
357
342
|
// IE11
|
|
358
|
-
"&::-ms-input-placeholder":
|
|
343
|
+
"&::-ms-input-placeholder": l,
|
|
359
344
|
// Edge
|
|
360
345
|
"&:focus": {
|
|
361
346
|
outline: 0
|
|
@@ -370,12 +355,12 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
370
355
|
},
|
|
371
356
|
// Show and hide the placeholder logic
|
|
372
357
|
[`label[data-shrink=false] + .${te.formControl} &`]: {
|
|
373
|
-
"&::-webkit-input-placeholder":
|
|
374
|
-
"&::-moz-placeholder":
|
|
358
|
+
"&::-webkit-input-placeholder": i,
|
|
359
|
+
"&::-moz-placeholder": i,
|
|
375
360
|
// Firefox 19+
|
|
376
|
-
"&:-ms-input-placeholder":
|
|
361
|
+
"&:-ms-input-placeholder": i,
|
|
377
362
|
// IE11
|
|
378
|
-
"&::-ms-input-placeholder":
|
|
363
|
+
"&::-ms-input-placeholder": i,
|
|
379
364
|
// Edge
|
|
380
365
|
"&:focus::-webkit-input-placeholder": p,
|
|
381
366
|
"&:focus::-moz-placeholder": p,
|
|
@@ -406,7 +391,7 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
406
391
|
// Improve type search style.
|
|
407
392
|
MozAppearance: "textfield"
|
|
408
393
|
});
|
|
409
|
-
}),
|
|
394
|
+
}), lo = /* @__PURE__ */ A(Te, {
|
|
410
395
|
styles: {
|
|
411
396
|
"@keyframes mui-auto-fill": {
|
|
412
397
|
from: {
|
|
@@ -419,22 +404,22 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
419
404
|
}
|
|
420
405
|
}
|
|
421
406
|
}
|
|
422
|
-
}),
|
|
423
|
-
var
|
|
424
|
-
const
|
|
407
|
+
}), Ee = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
408
|
+
var l;
|
|
409
|
+
const i = Ue({
|
|
425
410
|
props: n,
|
|
426
411
|
name: "MuiInputBase"
|
|
427
412
|
}), {
|
|
428
413
|
"aria-describedby": p,
|
|
429
414
|
autoComplete: I,
|
|
430
|
-
autoFocus:
|
|
415
|
+
autoFocus: T,
|
|
431
416
|
className: H,
|
|
432
|
-
components:
|
|
417
|
+
components: E = {},
|
|
433
418
|
componentsProps: S = {},
|
|
434
419
|
defaultValue: F,
|
|
435
420
|
disabled: v,
|
|
436
421
|
disableInjectingGlobalStyles: b,
|
|
437
|
-
endAdornment:
|
|
422
|
+
endAdornment: O,
|
|
438
423
|
fullWidth: k = !1,
|
|
439
424
|
id: B,
|
|
440
425
|
inputComponent: V = "input",
|
|
@@ -445,10 +430,10 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
445
430
|
multiline: u = !1,
|
|
446
431
|
name: f,
|
|
447
432
|
onBlur: w,
|
|
448
|
-
onChange:
|
|
449
|
-
onClick:
|
|
433
|
+
onChange: N,
|
|
434
|
+
onClick: z,
|
|
450
435
|
onFocus: C,
|
|
451
|
-
onKeyDown:
|
|
436
|
+
onKeyDown: R,
|
|
452
437
|
onKeyUp: h,
|
|
453
438
|
placeholder: G,
|
|
454
439
|
readOnly: P,
|
|
@@ -458,57 +443,57 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
458
443
|
slots: se = {},
|
|
459
444
|
startAdornment: D,
|
|
460
445
|
type: ae = "text",
|
|
461
|
-
value:
|
|
462
|
-
} =
|
|
446
|
+
value: Oe
|
|
447
|
+
} = i, Ne = ge(i, no), L = m.value != null ? m.value : Oe, {
|
|
463
448
|
current: K
|
|
464
|
-
} = s.useRef(L != null), M = s.useRef(),
|
|
465
|
-
process.env.NODE_ENV !== "production" &&
|
|
449
|
+
} = s.useRef(L != null), M = s.useRef(), ze = s.useCallback((r) => {
|
|
450
|
+
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(`
|
|
466
451
|
`));
|
|
467
|
-
}, []),
|
|
452
|
+
}, []), Ae = ve(M, $, m.ref, ze), [q, Y] = s.useState(!1), a = Je();
|
|
468
453
|
process.env.NODE_ENV !== "production" && s.useEffect(() => {
|
|
469
|
-
if (
|
|
470
|
-
return
|
|
471
|
-
}, [
|
|
472
|
-
const y =
|
|
473
|
-
props:
|
|
474
|
-
muiFormControl:
|
|
454
|
+
if (a)
|
|
455
|
+
return a.registerEffect();
|
|
456
|
+
}, [a]);
|
|
457
|
+
const y = Qe({
|
|
458
|
+
props: i,
|
|
459
|
+
muiFormControl: a,
|
|
475
460
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
476
461
|
});
|
|
477
|
-
y.focused =
|
|
478
|
-
!
|
|
479
|
-
}, [
|
|
480
|
-
const Z =
|
|
481
|
-
|
|
462
|
+
y.focused = a ? a.focused : q, s.useEffect(() => {
|
|
463
|
+
!a && v && q && (Y(!1), w && w());
|
|
464
|
+
}, [a, v, q, w]);
|
|
465
|
+
const Z = a && a.onFilled, J = a && a.onEmpty, W = s.useCallback((r) => {
|
|
466
|
+
Xe(r) ? Z && Z() : J && J();
|
|
482
467
|
}, [Z, J]);
|
|
483
468
|
ne(() => {
|
|
484
469
|
K && W({
|
|
485
470
|
value: L
|
|
486
471
|
});
|
|
487
472
|
}, [L, W, K]);
|
|
488
|
-
const
|
|
473
|
+
const Ie = (r) => {
|
|
489
474
|
if (y.disabled) {
|
|
490
|
-
|
|
475
|
+
r.stopPropagation();
|
|
491
476
|
return;
|
|
492
477
|
}
|
|
493
|
-
C && C(
|
|
494
|
-
},
|
|
495
|
-
w && w(
|
|
496
|
-
},
|
|
478
|
+
C && C(r), m.onFocus && m.onFocus(r), a && a.onFocus ? a.onFocus(r) : Y(!0);
|
|
479
|
+
}, Fe = (r) => {
|
|
480
|
+
w && w(r), m.onBlur && m.onBlur(r), a && a.onBlur ? a.onBlur(r) : Y(!1);
|
|
481
|
+
}, ke = (r, ...ce) => {
|
|
497
482
|
if (!K) {
|
|
498
|
-
const pe =
|
|
483
|
+
const pe = r.target || M.current;
|
|
499
484
|
if (pe == null)
|
|
500
|
-
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." :
|
|
485
|
+
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." : De(1));
|
|
501
486
|
W({
|
|
502
487
|
value: pe.value
|
|
503
488
|
});
|
|
504
489
|
}
|
|
505
|
-
m.onChange && m.onChange(
|
|
490
|
+
m.onChange && m.onChange(r, ...ce), N && N(r, ...ce);
|
|
506
491
|
};
|
|
507
492
|
s.useEffect(() => {
|
|
508
493
|
W(M.current);
|
|
509
494
|
}, []);
|
|
510
|
-
const
|
|
511
|
-
M.current &&
|
|
495
|
+
const Be = (r) => {
|
|
496
|
+
M.current && r.currentTarget === r.target && M.current.focus(), z && z(r);
|
|
512
497
|
};
|
|
513
498
|
let Q = V, x = m;
|
|
514
499
|
u && Q === "input" && (_ ? (process.env.NODE_ENV !== "production" && (g || d) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), x = c({
|
|
@@ -519,75 +504,75 @@ const to = je("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
519
504
|
type: void 0,
|
|
520
505
|
maxRows: d,
|
|
521
506
|
minRows: g
|
|
522
|
-
}, x), Q =
|
|
523
|
-
const
|
|
524
|
-
W(
|
|
507
|
+
}, x), Q = Se);
|
|
508
|
+
const Me = (r) => {
|
|
509
|
+
W(r.animationName === "mui-auto-fill-cancel" ? M.current : {
|
|
525
510
|
value: "x"
|
|
526
511
|
});
|
|
527
512
|
};
|
|
528
513
|
s.useEffect(() => {
|
|
529
|
-
|
|
530
|
-
}, [
|
|
531
|
-
const
|
|
514
|
+
a && a.setAdornedStart(!!D);
|
|
515
|
+
}, [a, D]);
|
|
516
|
+
const U = c({}, i, {
|
|
532
517
|
color: y.color || "primary",
|
|
533
518
|
disabled: y.disabled,
|
|
534
|
-
endAdornment:
|
|
519
|
+
endAdornment: O,
|
|
535
520
|
error: y.error,
|
|
536
521
|
focused: y.focused,
|
|
537
|
-
formControl:
|
|
522
|
+
formControl: a,
|
|
538
523
|
fullWidth: k,
|
|
539
524
|
hiddenLabel: y.hiddenLabel,
|
|
540
525
|
multiline: u,
|
|
541
526
|
size: y.size,
|
|
542
527
|
startAdornment: D,
|
|
543
528
|
type: ae
|
|
544
|
-
}), le =
|
|
545
|
-
return x = c({}, x, (
|
|
546
|
-
children: [!b &&
|
|
547
|
-
ownerState: c({},
|
|
529
|
+
}), le = io(U), ue = se.root || E.Root || so, X = ie.root || S.root || {}, de = se.input || E.Input || ao;
|
|
530
|
+
return x = c({}, x, (l = ie.input) != null ? l : S.input), /* @__PURE__ */ oe(s.Fragment, {
|
|
531
|
+
children: [!b && lo, /* @__PURE__ */ oe(ue, c({}, X, !he(ue) && {
|
|
532
|
+
ownerState: c({}, U, X.ownerState)
|
|
548
533
|
}, {
|
|
549
534
|
ref: t,
|
|
550
|
-
onClick:
|
|
551
|
-
},
|
|
535
|
+
onClick: Be
|
|
536
|
+
}, Ne, {
|
|
552
537
|
className: fe(le.root, X.className, H, P && "MuiInputBase-readOnly"),
|
|
553
|
-
children: [D, /* @__PURE__ */
|
|
538
|
+
children: [D, /* @__PURE__ */ A(Re.Provider, {
|
|
554
539
|
value: null,
|
|
555
|
-
children: /* @__PURE__ */
|
|
556
|
-
ownerState:
|
|
540
|
+
children: /* @__PURE__ */ A(de, c({
|
|
541
|
+
ownerState: U,
|
|
557
542
|
"aria-invalid": y.error,
|
|
558
543
|
"aria-describedby": p,
|
|
559
544
|
autoComplete: I,
|
|
560
|
-
autoFocus:
|
|
545
|
+
autoFocus: T,
|
|
561
546
|
defaultValue: F,
|
|
562
547
|
disabled: y.disabled,
|
|
563
548
|
id: B,
|
|
564
|
-
onAnimationStart:
|
|
549
|
+
onAnimationStart: Me,
|
|
565
550
|
name: f,
|
|
566
551
|
placeholder: G,
|
|
567
552
|
readOnly: P,
|
|
568
553
|
required: y.required,
|
|
569
554
|
rows: _,
|
|
570
555
|
value: L,
|
|
571
|
-
onKeyDown:
|
|
556
|
+
onKeyDown: R,
|
|
572
557
|
onKeyUp: h,
|
|
573
558
|
type: ae
|
|
574
559
|
}, x, !he(de) && {
|
|
575
560
|
as: Q,
|
|
576
|
-
ownerState: c({},
|
|
561
|
+
ownerState: c({}, U, x.ownerState)
|
|
577
562
|
}, {
|
|
578
|
-
ref:
|
|
563
|
+
ref: Ae,
|
|
579
564
|
className: fe(le.input, x.className, P && "MuiInputBase-readOnly"),
|
|
580
|
-
onBlur:
|
|
581
|
-
onChange:
|
|
582
|
-
onFocus:
|
|
565
|
+
onBlur: Fe,
|
|
566
|
+
onChange: ke,
|
|
567
|
+
onFocus: Ie
|
|
583
568
|
}))
|
|
584
|
-
}),
|
|
569
|
+
}), O, re ? re(c({}, y, {
|
|
585
570
|
startAdornment: D
|
|
586
571
|
})) : null]
|
|
587
572
|
}))]
|
|
588
573
|
});
|
|
589
574
|
});
|
|
590
|
-
process.env.NODE_ENV !== "production" && (
|
|
575
|
+
process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
591
576
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
592
577
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
593
578
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -817,17 +802,19 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
817
802
|
*/
|
|
818
803
|
value: e.any
|
|
819
804
|
});
|
|
820
|
-
const
|
|
805
|
+
const bo = Ee;
|
|
821
806
|
export {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
so as
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
807
|
+
Re as F,
|
|
808
|
+
Ce as G,
|
|
809
|
+
bo as I,
|
|
810
|
+
te as a,
|
|
811
|
+
so as b,
|
|
812
|
+
ao as c,
|
|
813
|
+
ro as d,
|
|
814
|
+
yo as e,
|
|
815
|
+
Qe as f,
|
|
816
|
+
Xe as g,
|
|
817
|
+
he as i,
|
|
818
|
+
to as r,
|
|
832
819
|
Je as u
|
|
833
820
|
};
|