@cgi-learning-hub/ui 1.0.0-dev.1721116816 → 1.0.0-dev.1721201810
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-9LdfEXsf.js → Box-DIvTvtYV.js} +17 -16
- package/dist/Box-RP_U1h2I.cjs +1 -0
- package/dist/{ButtonBase-D-i7Mp_0.js → ButtonBase-BN5QfC5l.js} +15 -17
- package/dist/ButtonBase-BZD9sI_c.cjs +75 -0
- package/dist/CircularProgress-C_a44--B.cjs +28 -0
- package/dist/{CircularProgress-CA8vWmu-.js → CircularProgress-CgjNSTmB.js} +25 -26
- package/dist/DefaultButton-BOHgRr6G.cjs +1 -0
- package/dist/{DefaultButton--hIqP5--.js → DefaultButton-DVHllq2U.js} +26 -26
- package/dist/IconButton-DQ2kDyxh.cjs +2 -0
- package/dist/{IconButton-DqE3X4a8.js → IconButton-ysdlpOVe.js} +15 -16
- package/dist/InputBase-CCpgZdXG.cjs +3 -0
- package/dist/{InputBase-DP_Adhgc.js → InputBase-CR3zhf1t.js} +198 -197
- package/dist/LocalizationProvider-BGJCD07W.js +592 -0
- package/dist/LocalizationProvider-C0yQiDF6.cjs +5 -0
- package/dist/PaperHeader-D2LH9bW-.cjs +1 -0
- package/dist/{PaperHeader-FAOEsMM9.js → PaperHeader-DAzxEUlx.js} +21 -20
- package/dist/SearchInput-CvqVbm-Q.cjs +1 -0
- package/dist/{SearchInput-CsSDD5eI.js → SearchInput-DGF3NOLB.js} +28 -29
- package/dist/Tabs-C91eu1Uw.cjs +4 -0
- package/dist/{Tabs-3kwkNbaY.js → Tabs-CObzeuUj.js} +208 -209
- package/dist/TextInput-61DYDrkn.cjs +12 -0
- package/dist/{TextInput-D-KCBgdw.js → TextInput-CjRiCEow.js} +141 -143
- package/dist/TimePicker-C64jDcYa.js +24351 -0
- package/dist/TimePicker-DKHA-KBc.cjs +74 -0
- package/dist/Typography-CX8IJDUK.cjs +1 -0
- package/dist/{Typography-D9wqoWpo.js → Typography-DDYzN_3X.js} +18 -19
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.es.js +73 -103
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +2 -3
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -2
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +2 -2
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.es.js +2 -2
- package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -1
- package/dist/components/PaperHeader/PaperHeader.stories.es.js +3 -3
- package/dist/components/PaperHeader/index.cjs.js +1 -1
- package/dist/components/PaperHeader/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +30 -31
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +3 -3
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/QueryError/QueryError.cjs.js +1 -1
- package/dist/components/feedback/QueryError/QueryError.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +13 -13
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +7 -9
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +3 -3
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +1 -1
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +1 -1
- 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 +2 -2
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +6 -6
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +5 -5
- package/dist/createSvgIcon-BhmdtpFQ.cjs +1 -0
- package/dist/{createSvgIcon-DzqAq5L0.js → createSvgIcon-D0vr-xfg.js} +14 -15
- package/dist/{createSvgIcon-BB59Xsl7.cjs → createSvgIcon-DtHN6kOe.cjs} +1 -1
- package/dist/{createSvgIcon-BKAOek5F.js → createSvgIcon-XuLYHpIN.js} +2 -2
- package/dist/defaultTheme-43URU5cB.cjs +1 -0
- package/dist/defaultTheme-kWAisKX-.js +19 -0
- package/dist/{extendSxProp-DHqLFl-L.js → extendSxProp-BH27e4Uq.js} +47 -60
- package/dist/{extendSxProp-CaWP661G.cjs → extendSxProp-DguFtn4z.cjs} +2 -2
- package/dist/{fr-DQmRkdQN.cjs → fr-Cv05qO2i.cjs} +1 -1
- package/dist/{fr-CK9zQ_Ty.js → fr-VAA6DQIZ.js} +20 -34
- package/dist/identifier-DN9zMdjb.cjs +42 -0
- package/dist/{identifier-DRpIhLLR.js → identifier-wD7TMRod.js} +675 -703
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +14 -15
- package/dist/{refType-Cn5gyhZI.js → refType-DNsX9F1k.js} +1 -1
- package/dist/{refType-DY4akPK-.cjs → refType-P4W7j6GU.cjs} +1 -1
- package/dist/styled-DBkKGFww.js +496 -0
- package/dist/styled-vrKxhnRS.cjs +17 -0
- package/dist/{useSlotProps-DUT5Ou9s.js → useTheme-0LP2yOaO.js} +35 -35
- package/dist/useTheme-BjiEuL2C.cjs +1 -0
- package/dist/useTheme-BlWZbBeO.cjs +1 -0
- package/dist/useTheme-DmZo1zFM.js +18 -0
- package/dist/useThemeProps-BbYOXO_x.cjs +1 -0
- package/dist/useThemeProps-C1QhfJXI.js +17 -0
- package/dist/useThemeProps-CuBdueUZ.js +27 -0
- package/dist/useThemeProps-zfqmINoS.cjs +1 -0
- package/package.json +27 -14
- package/dist/Box-DZHlB1JL.cjs +0 -1
- package/dist/ButtonBase-s9fq-FWa.cjs +0 -75
- package/dist/CircularProgress-BRObeUJf.cjs +0 -28
- package/dist/DefaultButton-CFsQZCt0.cjs +0 -1
- package/dist/IconButton-Ciyl-3i6.cjs +0 -2
- package/dist/InputBase-DrfyjvX2.cjs +0 -3
- package/dist/LocalizationProvider-DdSFKwmg.js +0 -577
- package/dist/LocalizationProvider-bb4YzxZc.cjs +0 -5
- package/dist/PaperHeader-Cym2X2f9.cjs +0 -1
- package/dist/SearchInput-DLB_reMI.cjs +0 -1
- package/dist/Tabs-DpjAr2Z-.cjs +0 -4
- package/dist/TextInput-BcCK6QOQ.cjs +0 -12
- package/dist/TimePicker-P_IrNQee.js +0 -22670
- package/dist/TimePicker-zrUL2wS7.cjs +0 -73
- package/dist/Typography-BWqNUG5K.cjs +0 -1
- package/dist/createSvgIcon-DYS0kjMM.cjs +0 -1
- package/dist/identifier-yw8YLxO3.cjs +0 -42
- package/dist/styled-BCfAQpid.cjs +0 -17
- package/dist/styled-LH7lmhcc.js +0 -474
- package/dist/useSlotProps-CabDgsss.cjs +0 -1
- package/dist/useThemeProps-BSLCJPn5.cjs +0 -1
- package/dist/useThemeProps-DQoLAgYV.js +0 -55
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { G as
|
|
4
|
-
import { s as be,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { P as e, h as ye, _ as d, T as ke, d as Be, e as Q, z as Pe } from "./identifier-wD7TMRod.js";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { G as Me, g as He, c as pe } from "./extendSxProp-BH27e4Uq.js";
|
|
4
|
+
import { s as be, u as De, c as We } from "./styled-DBkKGFww.js";
|
|
5
|
+
import { jsx as N, jsxs as X } from "react/jsx-runtime";
|
|
6
|
+
import { a as ge, u as ee } from "./useForkRef-DwN_Iz9R.js";
|
|
7
|
+
import { a as fe, d as Ve } from "./ownerWindow-C7EH1lr6.js";
|
|
8
|
+
import { i as me } from "./isHostComponent-kiaBvYVo.js";
|
|
9
|
+
import { e as _e, r as Le } from "./refType-DNsX9F1k.js";
|
|
10
|
+
import { d as je } from "./defaultTheme-kWAisKX-.js";
|
|
11
|
+
import { u as Ue } from "./useTheme-DmZo1zFM.js";
|
|
12
|
+
function we({
|
|
12
13
|
styles: o,
|
|
13
14
|
themeId: n,
|
|
14
15
|
defaultTheme: t = {}
|
|
15
16
|
}) {
|
|
16
|
-
const s =
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
const s = Ue(t), i = typeof o == "function" ? o(n && s[n] || s) : o;
|
|
18
|
+
return /* @__PURE__ */ N(Me, {
|
|
18
19
|
styles: i
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
process.env.NODE_ENV !== "production" && (
|
|
22
|
+
process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
22
23
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
23
24
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
24
25
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -36,16 +37,16 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
|
36
37
|
*/
|
|
37
38
|
themeId: e.string
|
|
38
39
|
});
|
|
39
|
-
const
|
|
40
|
-
process.env.NODE_ENV !== "production" && (
|
|
40
|
+
const ne = /* @__PURE__ */ l.createContext(void 0);
|
|
41
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "FormControlContext");
|
|
41
42
|
function $e() {
|
|
42
|
-
return
|
|
43
|
+
return l.useContext(ne);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function he(o) {
|
|
45
46
|
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
46
47
|
}
|
|
47
48
|
function Ge(o, n = !1) {
|
|
48
|
-
return o && (
|
|
49
|
+
return o && (he(o.value) && o.value !== "" || n && he(o.defaultValue) && o.defaultValue !== "");
|
|
49
50
|
}
|
|
50
51
|
function bo(o) {
|
|
51
52
|
return o.startAdornment;
|
|
@@ -58,7 +59,7 @@ function Ke({
|
|
|
58
59
|
return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
|
|
59
60
|
}
|
|
60
61
|
const qe = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
61
|
-
function
|
|
62
|
+
function _(o) {
|
|
62
63
|
return parseInt(o, 10) || 0;
|
|
63
64
|
}
|
|
64
65
|
const Ye = {
|
|
@@ -79,84 +80,84 @@ const Ye = {
|
|
|
79
80
|
function Ze(o) {
|
|
80
81
|
return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
|
|
83
84
|
const {
|
|
84
85
|
onChange: s,
|
|
85
86
|
maxRows: i,
|
|
86
87
|
minRows: p = 1,
|
|
87
|
-
style:
|
|
88
|
-
value:
|
|
89
|
-
} = n,
|
|
88
|
+
style: z,
|
|
89
|
+
value: A
|
|
90
|
+
} = n, B = ye(n, qe), {
|
|
90
91
|
current: R
|
|
91
|
-
} =
|
|
92
|
-
const c = b.current,
|
|
93
|
-
if (
|
|
92
|
+
} = l.useRef(A != null), b = l.useRef(null), I = ge(t, b), g = l.useRef(null), T = l.useRef(null), v = l.useCallback(() => {
|
|
93
|
+
const c = b.current, f = fe(c).getComputedStyle(c);
|
|
94
|
+
if (f.width === "0px")
|
|
94
95
|
return {
|
|
95
96
|
outerHeightStyle: 0,
|
|
96
97
|
overflowing: !1
|
|
97
98
|
};
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
` && (
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
let
|
|
105
|
-
p && (
|
|
106
|
-
const H =
|
|
99
|
+
const m = T.current;
|
|
100
|
+
m.style.width = f.width, m.value = c.value || n.placeholder || "x", m.value.slice(-1) === `
|
|
101
|
+
` && (m.value += " ");
|
|
102
|
+
const E = f.boxSizing, O = _(f.paddingBottom) + _(f.paddingTop), x = _(f.borderBottomWidth) + _(f.borderTopWidth), S = m.scrollHeight;
|
|
103
|
+
m.value = "x";
|
|
104
|
+
const F = m.scrollHeight;
|
|
105
|
+
let y = S;
|
|
106
|
+
p && (y = Math.max(Number(p) * F, y)), i && (y = Math.min(Number(i) * F, y)), y = Math.max(y, F);
|
|
107
|
+
const H = y + (E === "border-box" ? O + x : 0), j = Math.abs(y - S) <= 1;
|
|
107
108
|
return {
|
|
108
109
|
outerHeightStyle: H,
|
|
109
|
-
overflowing:
|
|
110
|
+
overflowing: j
|
|
110
111
|
};
|
|
111
|
-
}, [i, p, n.placeholder]),
|
|
112
|
-
const c =
|
|
112
|
+
}, [i, p, n.placeholder]), C = l.useCallback(() => {
|
|
113
|
+
const c = v();
|
|
113
114
|
if (Ze(c))
|
|
114
115
|
return;
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
}, [
|
|
118
|
-
|
|
116
|
+
const u = c.outerHeightStyle, f = b.current;
|
|
117
|
+
g.current !== u && (g.current = u, f.style.height = `${u}px`), f.style.overflow = c.overflowing ? "hidden" : "";
|
|
118
|
+
}, [v]);
|
|
119
|
+
ee(() => {
|
|
119
120
|
const c = () => {
|
|
120
|
-
|
|
121
|
+
C();
|
|
121
122
|
};
|
|
122
|
-
let
|
|
123
|
-
const
|
|
124
|
-
cancelAnimationFrame(
|
|
123
|
+
let u;
|
|
124
|
+
const f = () => {
|
|
125
|
+
cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
125
126
|
c();
|
|
126
127
|
});
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
let
|
|
130
|
-
return typeof ResizeObserver < "u" && (
|
|
131
|
-
|
|
128
|
+
}, m = Ve(c), E = b.current, O = fe(E);
|
|
129
|
+
O.addEventListener("resize", m);
|
|
130
|
+
let x;
|
|
131
|
+
return typeof ResizeObserver < "u" && (x = new ResizeObserver(process.env.NODE_ENV === "test" ? f : c), x.observe(E)), () => {
|
|
132
|
+
m.clear(), cancelAnimationFrame(u), O.removeEventListener("resize", m), x && x.disconnect();
|
|
132
133
|
};
|
|
133
|
-
}, [
|
|
134
|
-
|
|
134
|
+
}, [v, C]), ee(() => {
|
|
135
|
+
C();
|
|
135
136
|
});
|
|
136
|
-
const
|
|
137
|
-
R ||
|
|
137
|
+
const L = (c) => {
|
|
138
|
+
R || C(), s && s(c);
|
|
138
139
|
};
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
-
value:
|
|
142
|
-
onChange:
|
|
143
|
-
ref:
|
|
140
|
+
return /* @__PURE__ */ X(l.Fragment, {
|
|
141
|
+
children: [/* @__PURE__ */ N("textarea", d({
|
|
142
|
+
value: A,
|
|
143
|
+
onChange: L,
|
|
144
|
+
ref: I,
|
|
144
145
|
rows: p,
|
|
145
|
-
style:
|
|
146
|
-
},
|
|
146
|
+
style: z
|
|
147
|
+
}, B)), /* @__PURE__ */ N("textarea", {
|
|
147
148
|
"aria-hidden": !0,
|
|
148
149
|
className: n.className,
|
|
149
150
|
readOnly: !0,
|
|
150
|
-
ref:
|
|
151
|
+
ref: T,
|
|
151
152
|
tabIndex: -1,
|
|
152
|
-
style: d({}, Ye.shadow,
|
|
153
|
+
style: d({}, Ye.shadow, z, {
|
|
153
154
|
paddingTop: 0,
|
|
154
155
|
paddingBottom: 0
|
|
155
156
|
})
|
|
156
157
|
})]
|
|
157
158
|
});
|
|
158
159
|
});
|
|
159
|
-
process.env.NODE_ENV !== "production" && (
|
|
160
|
+
process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
160
161
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
161
162
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
162
163
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -191,13 +192,13 @@ process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
|
191
192
|
*/
|
|
192
193
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
193
194
|
});
|
|
194
|
-
function
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
defaultTheme:
|
|
197
|
-
themeId:
|
|
195
|
+
function Ce(o) {
|
|
196
|
+
return /* @__PURE__ */ N(we, d({}, o, {
|
|
197
|
+
defaultTheme: je,
|
|
198
|
+
themeId: ke
|
|
198
199
|
}));
|
|
199
200
|
}
|
|
200
|
-
process.env.NODE_ENV !== "production" && (
|
|
201
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
201
202
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
202
203
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
203
204
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -208,13 +209,13 @@ process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
|
208
209
|
styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
|
|
209
210
|
});
|
|
210
211
|
function Je(o) {
|
|
211
|
-
return
|
|
212
|
+
return Be("MuiInputBase", o);
|
|
212
213
|
}
|
|
213
|
-
const
|
|
214
|
+
const oe = He("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), Qe = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], Xe = (o, n) => {
|
|
214
215
|
const {
|
|
215
216
|
ownerState: t
|
|
216
217
|
} = o;
|
|
217
|
-
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${
|
|
218
|
+
return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${Q(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
|
|
218
219
|
}, eo = (o, n) => {
|
|
219
220
|
const {
|
|
220
221
|
ownerState: t
|
|
@@ -227,20 +228,20 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
227
228
|
disabled: s,
|
|
228
229
|
error: i,
|
|
229
230
|
endAdornment: p,
|
|
230
|
-
focused:
|
|
231
|
-
formControl:
|
|
232
|
-
fullWidth:
|
|
231
|
+
focused: z,
|
|
232
|
+
formControl: A,
|
|
233
|
+
fullWidth: B,
|
|
233
234
|
hiddenLabel: R,
|
|
234
235
|
multiline: b,
|
|
235
|
-
readOnly:
|
|
236
|
-
size:
|
|
237
|
-
startAdornment:
|
|
238
|
-
type:
|
|
239
|
-
} = o,
|
|
240
|
-
root: ["root", `color${
|
|
241
|
-
input: ["input", s && "disabled",
|
|
236
|
+
readOnly: I,
|
|
237
|
+
size: g,
|
|
238
|
+
startAdornment: T,
|
|
239
|
+
type: v
|
|
240
|
+
} = o, C = {
|
|
241
|
+
root: ["root", `color${Q(t)}`, s && "disabled", i && "error", B && "fullWidth", z && "focused", A && "formControl", g && g !== "medium" && `size${Q(g)}`, b && "multiline", T && "adornedStart", p && "adornedEnd", R && "hiddenLabel", I && "readOnly"],
|
|
242
|
+
input: ["input", s && "disabled", v === "search" && "inputTypeSearch", b && "inputMultiline", g === "small" && "inputSizeSmall", R && "inputHiddenLabel", T && "inputAdornedStart", p && "inputAdornedEnd", I && "readOnly"]
|
|
242
243
|
};
|
|
243
|
-
return
|
|
244
|
+
return We(C, Je, n);
|
|
244
245
|
}, no = be("div", {
|
|
245
246
|
name: "MuiInputBase",
|
|
246
247
|
slot: "Root",
|
|
@@ -258,7 +259,7 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
258
259
|
cursor: "text",
|
|
259
260
|
display: "inline-flex",
|
|
260
261
|
alignItems: "center",
|
|
261
|
-
[`&.${
|
|
262
|
+
[`&.${oe.disabled}`]: {
|
|
262
263
|
color: (o.vars || o).palette.text.disabled,
|
|
263
264
|
cursor: "default"
|
|
264
265
|
}
|
|
@@ -332,7 +333,7 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
332
333
|
WebkitAppearance: "none"
|
|
333
334
|
},
|
|
334
335
|
// Show and hide the placeholder logic
|
|
335
|
-
[`label[data-shrink=false] + .${
|
|
336
|
+
[`label[data-shrink=false] + .${oe.formControl} &`]: {
|
|
336
337
|
"&::-webkit-input-placeholder": i,
|
|
337
338
|
"&::-moz-placeholder": i,
|
|
338
339
|
// Firefox 19+
|
|
@@ -348,7 +349,7 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
348
349
|
"&:focus::-ms-input-placeholder": p
|
|
349
350
|
// Edge
|
|
350
351
|
},
|
|
351
|
-
[`&.${
|
|
352
|
+
[`&.${oe.disabled}`]: {
|
|
352
353
|
opacity: 1,
|
|
353
354
|
// Reset iOS opacity
|
|
354
355
|
WebkitTextFillColor: (o.vars || o).palette.text.disabled
|
|
@@ -369,7 +370,7 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
369
370
|
// Improve type search style.
|
|
370
371
|
MozAppearance: "textfield"
|
|
371
372
|
});
|
|
372
|
-
}), ro = /* @__PURE__ */
|
|
373
|
+
}), ro = /* @__PURE__ */ N(Ce, {
|
|
373
374
|
styles: {
|
|
374
375
|
"@keyframes mui-auto-fill": {
|
|
375
376
|
from: {
|
|
@@ -382,170 +383,170 @@ const ee = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
382
383
|
}
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
|
-
}), io = /* @__PURE__ */
|
|
386
|
+
}), io = /* @__PURE__ */ l.forwardRef(function(n, t) {
|
|
386
387
|
var s;
|
|
387
|
-
const i =
|
|
388
|
+
const i = De({
|
|
388
389
|
props: n,
|
|
389
390
|
name: "MuiInputBase"
|
|
390
391
|
}), {
|
|
391
392
|
"aria-describedby": p,
|
|
392
|
-
autoComplete:
|
|
393
|
-
autoFocus:
|
|
394
|
-
className:
|
|
393
|
+
autoComplete: z,
|
|
394
|
+
autoFocus: A,
|
|
395
|
+
className: B,
|
|
395
396
|
components: R = {},
|
|
396
397
|
componentsProps: b = {},
|
|
397
|
-
defaultValue:
|
|
398
|
-
disabled:
|
|
399
|
-
disableInjectingGlobalStyles:
|
|
400
|
-
endAdornment:
|
|
401
|
-
fullWidth:
|
|
402
|
-
id:
|
|
403
|
-
inputComponent:
|
|
404
|
-
inputProps:
|
|
398
|
+
defaultValue: I,
|
|
399
|
+
disabled: g,
|
|
400
|
+
disableInjectingGlobalStyles: T,
|
|
401
|
+
endAdornment: v,
|
|
402
|
+
fullWidth: C = !1,
|
|
403
|
+
id: L,
|
|
404
|
+
inputComponent: c = "input",
|
|
405
|
+
inputProps: u = {},
|
|
405
406
|
inputRef: f,
|
|
406
|
-
maxRows:
|
|
407
|
+
maxRows: m,
|
|
407
408
|
minRows: E,
|
|
408
|
-
multiline:
|
|
409
|
-
name:
|
|
410
|
-
onBlur:
|
|
411
|
-
onChange:
|
|
412
|
-
onClick:
|
|
413
|
-
onFocus:
|
|
414
|
-
onKeyDown:
|
|
409
|
+
multiline: O = !1,
|
|
410
|
+
name: x,
|
|
411
|
+
onBlur: S,
|
|
412
|
+
onChange: F,
|
|
413
|
+
onClick: y,
|
|
414
|
+
onFocus: H,
|
|
415
|
+
onKeyDown: j,
|
|
415
416
|
onKeyUp: xe,
|
|
416
417
|
placeholder: Se,
|
|
417
|
-
readOnly:
|
|
418
|
-
renderSuffix:
|
|
418
|
+
readOnly: U,
|
|
419
|
+
renderSuffix: te,
|
|
419
420
|
rows: D,
|
|
420
|
-
slotProps:
|
|
421
|
-
slots:
|
|
422
|
-
startAdornment:
|
|
423
|
-
type:
|
|
421
|
+
slotProps: re = {},
|
|
422
|
+
slots: ie = {},
|
|
423
|
+
startAdornment: P,
|
|
424
|
+
type: ae = "text",
|
|
424
425
|
value: Re
|
|
425
|
-
} = i, Te =
|
|
426
|
-
current:
|
|
427
|
-
} =
|
|
426
|
+
} = i, Te = ye(i, Qe), W = u.value != null ? u.value : Re, {
|
|
427
|
+
current: $
|
|
428
|
+
} = l.useRef(W != null), k = l.useRef(), Ee = l.useCallback((r) => {
|
|
428
429
|
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(`
|
|
429
430
|
`));
|
|
430
|
-
}, []), Oe =
|
|
431
|
-
process.env.NODE_ENV !== "production" &&
|
|
431
|
+
}, []), Oe = ge(k, f, u.ref, Ee), [G, K] = l.useState(!1), a = $e();
|
|
432
|
+
process.env.NODE_ENV !== "production" && l.useEffect(() => {
|
|
432
433
|
if (a)
|
|
433
434
|
return a.registerEffect();
|
|
434
435
|
}, [a]);
|
|
435
|
-
const
|
|
436
|
+
const h = Ke({
|
|
436
437
|
props: i,
|
|
437
438
|
muiFormControl: a,
|
|
438
439
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
439
440
|
});
|
|
440
|
-
|
|
441
|
-
!a &&
|
|
442
|
-
}, [a,
|
|
443
|
-
const
|
|
444
|
-
Ge(r) ?
|
|
445
|
-
}, [
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
value:
|
|
441
|
+
h.focused = a ? a.focused : G, l.useEffect(() => {
|
|
442
|
+
!a && g && G && (K(!1), S && S());
|
|
443
|
+
}, [a, g, G, S]);
|
|
444
|
+
const q = a && a.onFilled, Y = a && a.onEmpty, M = l.useCallback((r) => {
|
|
445
|
+
Ge(r) ? q && q() : Y && Y();
|
|
446
|
+
}, [q, Y]);
|
|
447
|
+
ee(() => {
|
|
448
|
+
$ && M({
|
|
449
|
+
value: W
|
|
449
450
|
});
|
|
450
|
-
}, [
|
|
451
|
+
}, [W, M, $]);
|
|
451
452
|
const Ne = (r) => {
|
|
452
|
-
if (
|
|
453
|
+
if (h.disabled) {
|
|
453
454
|
r.stopPropagation();
|
|
454
455
|
return;
|
|
455
456
|
}
|
|
456
|
-
|
|
457
|
+
H && H(r), u.onFocus && u.onFocus(r), a && a.onFocus ? a.onFocus(r) : K(!0);
|
|
457
458
|
}, ze = (r) => {
|
|
458
|
-
|
|
459
|
-
}, Ae = (r, ...
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
if (
|
|
463
|
-
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." :
|
|
464
|
-
|
|
465
|
-
value:
|
|
459
|
+
S && S(r), u.onBlur && u.onBlur(r), a && a.onBlur ? a.onBlur(r) : K(!1);
|
|
460
|
+
}, Ae = (r, ...de) => {
|
|
461
|
+
if (!$) {
|
|
462
|
+
const ce = r.target || k.current;
|
|
463
|
+
if (ce == null)
|
|
464
|
+
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." : Pe(1));
|
|
465
|
+
M({
|
|
466
|
+
value: ce.value
|
|
466
467
|
});
|
|
467
468
|
}
|
|
468
|
-
|
|
469
|
+
u.onChange && u.onChange(r, ...de), F && F(r, ...de);
|
|
469
470
|
};
|
|
470
|
-
|
|
471
|
-
|
|
471
|
+
l.useEffect(() => {
|
|
472
|
+
M(k.current);
|
|
472
473
|
}, []);
|
|
473
474
|
const Ie = (r) => {
|
|
474
|
-
|
|
475
|
+
k.current && r.currentTarget === r.target && k.current.focus(), y && y(r);
|
|
475
476
|
};
|
|
476
|
-
let
|
|
477
|
-
|
|
477
|
+
let Z = c, w = u;
|
|
478
|
+
O && Z === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || m) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = d({
|
|
478
479
|
type: void 0,
|
|
479
480
|
minRows: D,
|
|
480
481
|
maxRows: D
|
|
481
|
-
},
|
|
482
|
+
}, w)) : w = d({
|
|
482
483
|
type: void 0,
|
|
483
|
-
maxRows:
|
|
484
|
+
maxRows: m,
|
|
484
485
|
minRows: E
|
|
485
|
-
},
|
|
486
|
+
}, w), Z = ve);
|
|
486
487
|
const Fe = (r) => {
|
|
487
|
-
|
|
488
|
+
M(r.animationName === "mui-auto-fill-cancel" ? k.current : {
|
|
488
489
|
value: "x"
|
|
489
490
|
});
|
|
490
491
|
};
|
|
491
|
-
|
|
492
|
-
a && a.setAdornedStart(!!
|
|
493
|
-
}, [a,
|
|
494
|
-
const
|
|
495
|
-
color:
|
|
496
|
-
disabled:
|
|
497
|
-
endAdornment:
|
|
498
|
-
error:
|
|
499
|
-
focused:
|
|
492
|
+
l.useEffect(() => {
|
|
493
|
+
a && a.setAdornedStart(!!P);
|
|
494
|
+
}, [a, P]);
|
|
495
|
+
const V = d({}, i, {
|
|
496
|
+
color: h.color || "primary",
|
|
497
|
+
disabled: h.disabled,
|
|
498
|
+
endAdornment: v,
|
|
499
|
+
error: h.error,
|
|
500
|
+
focused: h.focused,
|
|
500
501
|
formControl: a,
|
|
501
|
-
fullWidth:
|
|
502
|
-
hiddenLabel:
|
|
503
|
-
multiline:
|
|
504
|
-
size:
|
|
505
|
-
startAdornment:
|
|
506
|
-
type:
|
|
507
|
-
}),
|
|
508
|
-
return
|
|
509
|
-
children: [!
|
|
510
|
-
ownerState: d({},
|
|
502
|
+
fullWidth: C,
|
|
503
|
+
hiddenLabel: h.hiddenLabel,
|
|
504
|
+
multiline: O,
|
|
505
|
+
size: h.size,
|
|
506
|
+
startAdornment: P,
|
|
507
|
+
type: ae
|
|
508
|
+
}), se = oo(V), le = ie.root || R.Root || no, J = re.root || b.root || {}, ue = ie.input || R.Input || to;
|
|
509
|
+
return w = d({}, w, (s = re.input) != null ? s : b.input), /* @__PURE__ */ X(l.Fragment, {
|
|
510
|
+
children: [!T && ro, /* @__PURE__ */ X(le, d({}, J, !me(le) && {
|
|
511
|
+
ownerState: d({}, V, J.ownerState)
|
|
511
512
|
}, {
|
|
512
513
|
ref: t,
|
|
513
514
|
onClick: Ie
|
|
514
515
|
}, Te, {
|
|
515
|
-
className:
|
|
516
|
-
children: [
|
|
516
|
+
className: pe(se.root, J.className, B, U && "MuiInputBase-readOnly"),
|
|
517
|
+
children: [P, /* @__PURE__ */ N(ne.Provider, {
|
|
517
518
|
value: null,
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
ownerState:
|
|
520
|
-
"aria-invalid":
|
|
519
|
+
children: /* @__PURE__ */ N(ue, d({
|
|
520
|
+
ownerState: V,
|
|
521
|
+
"aria-invalid": h.error,
|
|
521
522
|
"aria-describedby": p,
|
|
522
|
-
autoComplete:
|
|
523
|
-
autoFocus:
|
|
524
|
-
defaultValue:
|
|
525
|
-
disabled:
|
|
526
|
-
id:
|
|
523
|
+
autoComplete: z,
|
|
524
|
+
autoFocus: A,
|
|
525
|
+
defaultValue: I,
|
|
526
|
+
disabled: h.disabled,
|
|
527
|
+
id: L,
|
|
527
528
|
onAnimationStart: Fe,
|
|
528
|
-
name:
|
|
529
|
+
name: x,
|
|
529
530
|
placeholder: Se,
|
|
530
|
-
readOnly:
|
|
531
|
-
required:
|
|
531
|
+
readOnly: U,
|
|
532
|
+
required: h.required,
|
|
532
533
|
rows: D,
|
|
533
|
-
value:
|
|
534
|
-
onKeyDown:
|
|
534
|
+
value: W,
|
|
535
|
+
onKeyDown: j,
|
|
535
536
|
onKeyUp: xe,
|
|
536
|
-
type:
|
|
537
|
-
},
|
|
538
|
-
as:
|
|
539
|
-
ownerState: d({},
|
|
537
|
+
type: ae
|
|
538
|
+
}, w, !me(ue) && {
|
|
539
|
+
as: Z,
|
|
540
|
+
ownerState: d({}, V, w.ownerState)
|
|
540
541
|
}, {
|
|
541
542
|
ref: Oe,
|
|
542
|
-
className:
|
|
543
|
+
className: pe(se.input, w.className, U && "MuiInputBase-readOnly"),
|
|
543
544
|
onBlur: ze,
|
|
544
545
|
onChange: Ae,
|
|
545
546
|
onFocus: Ne
|
|
546
547
|
}))
|
|
547
|
-
}),
|
|
548
|
-
startAdornment:
|
|
548
|
+
}), v, te ? te(d({}, h, {
|
|
549
|
+
startAdornment: P
|
|
549
550
|
})) : null]
|
|
550
551
|
}))]
|
|
551
552
|
});
|
|
@@ -647,7 +648,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
647
648
|
* Either a string to use a HTML element or a component.
|
|
648
649
|
* @default 'input'
|
|
649
650
|
*/
|
|
650
|
-
inputComponent:
|
|
651
|
+
inputComponent: _e,
|
|
651
652
|
/**
|
|
652
653
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
653
654
|
* @default {}
|
|
@@ -656,7 +657,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
656
657
|
/**
|
|
657
658
|
* Pass a ref to the `input` element.
|
|
658
659
|
*/
|
|
659
|
-
inputRef:
|
|
660
|
+
inputRef: Le,
|
|
660
661
|
/**
|
|
661
662
|
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
|
662
663
|
* FormControl.
|
|
@@ -781,10 +782,10 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
|
|
|
781
782
|
value: e.any
|
|
782
783
|
});
|
|
783
784
|
export {
|
|
784
|
-
|
|
785
|
+
ne as F,
|
|
785
786
|
io as I,
|
|
786
787
|
Ge as a,
|
|
787
|
-
|
|
788
|
+
oe as b,
|
|
788
789
|
no as c,
|
|
789
790
|
to as d,
|
|
790
791
|
eo as e,
|