@cgi-learning-hub/ui 0.0.1-dev.1708959157 → 0.0.1-dev.1708964890
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-7uR7JZiM.cjs +1 -0
- package/dist/Box-CPGTKTgx.js +56 -0
- package/dist/{ButtonBase-C5_-KI-D.js → ButtonBase-B0tkJ9zf.js} +2 -2
- package/dist/{ButtonBase-XPViWbp_.cjs → ButtonBase-DCL6Xlnm.cjs} +1 -1
- package/dist/CircularProgress-CZX5SfKt.cjs +28 -0
- package/dist/CircularProgress-CguDBnxV.js +215 -0
- package/dist/{components/buttons/IconButton/IconButton.es.js → IconButton-CJ1Nt-jf.js} +41 -46
- package/dist/IconButton-De7ZdW2q.cjs +2 -0
- package/dist/{InputBase-D8YZOKOt.js → InputBase-C_yPRkam.js} +109 -112
- package/dist/InputBase-Dvr5GnwD.cjs +4 -0
- package/dist/Tab-Bhm9hCrX.cjs +1 -0
- package/dist/{Tab-Dgd9jYEq.js → Tab-C4l6V01S.js} +9 -9
- package/dist/{Typography-Di0hlj32.js → Typography-CyFLZjnE.js} +99 -74
- package/dist/Typography-DwsN2Ttm.cjs +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +12 -11
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +1 -0
- package/dist/components/{AnotherComponent/AnotherComponent.stories.d.ts → Dropzone/Dropzone.stories.d.ts} +1 -2
- package/dist/components/Dropzone/Dropzone.stories.es.js +17 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +577 -7
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +4 -4
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +2 -2
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -0
- package/dist/components/buttons/IconButton.stories.d.ts +4 -0
- package/dist/components/buttons/IconButton.stories.es.js +27 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +4 -4
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +8 -7
- 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.d.ts +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +10 -9
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.d.ts +0 -1
- package/dist/components/buttons/index.es.js +6 -8
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.es.js +18 -24
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +10 -10
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -0
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +4 -0
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +16 -0
- package/dist/components/inputs/TextInput/TextInput.cjs.js +11 -11
- package/dist/components/inputs/TextInput/TextInput.es.js +1905 -1655
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -0
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +4 -0
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +17 -0
- 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/FileList.stories.cjs.js +1 -0
- package/dist/components/lists/FileList/FileList.stories.d.ts +4 -0
- package/dist/components/lists/FileList/FileList.stories.es.js +28 -0
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +18 -17
- package/dist/components/lists/TabList.stories.cjs.js +4 -0
- package/dist/components/lists/TabList.stories.d.ts +4 -0
- package/dist/components/lists/TabList.stories.es.js +1027 -0
- package/dist/{createSvgIcon-BivvPRyr.cjs → createSvgIcon-B6bZPuto.cjs} +1 -1
- package/dist/createSvgIcon-BX8WQ5r-.cjs +2 -0
- package/dist/{createSvgIcon-D4Mxh_r9.js → createSvgIcon-KaSN8JhZ.js} +7 -7
- package/dist/createSvgIcon-m_wsenOJ.js +84 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +18 -24
- package/dist/isHostComponent-PydJW4A4.cjs +1 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/{ownerWindow-BoRkeomM.js → ownerWindow-C7EH1lr6.js} +2 -2
- package/dist/{refType-dllUCpD8.cjs → refType-CHSN6ysS.cjs} +1 -1
- package/dist/{refType-hKctx4k0.js → refType-Hh9tfnoF.js} +1 -1
- package/dist/unsupportedProp-Bn6XWqwH.cjs +1 -0
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/useSlotProps-MoAYME1z.js +70 -0
- package/dist/useSlotProps-R4s13HHI.cjs +1 -0
- package/dist/{useTheme-C-LTLVMt.cjs → useTheme-BDPYLOoP.cjs} +1 -1
- package/dist/{useTheme-BZek68TX.js → useTheme-DJEDOopE.js} +1 -1
- package/dist/{useThemeProps-CHytz5pp.js → useThemeProps-Dg9Uoq7q.js} +656 -689
- package/dist/useThemeProps-jkB5q9ie.cjs +65 -0
- package/package.json +1 -1
- package/dist/Button-C5ROgtyW.js +0 -356
- package/dist/Button-wMPAZpnO.cjs +0 -1
- package/dist/DefaultButton-BD9W4fvr.cjs +0 -28
- package/dist/DefaultButton-BlGFPRC7.js +0 -439
- package/dist/Input-CGU1Xw4s.js +0 -322
- package/dist/Input-DHic6dYE.cjs +0 -1
- package/dist/InputBase-WBNJQn8V.cjs +0 -4
- package/dist/Tab-C2Tmr8Sv.cjs +0 -1
- package/dist/Typography-CO64FVmw.cjs +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.d.ts +0 -2
- package/dist/components/AnotherComponent/AnotherComponent.es.js +0 -15
- package/dist/components/AnotherComponent/AnotherComponent.stories.cjs.js +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.stories.es.js +0 -22
- package/dist/components/AnotherComponent/index.cjs.js +0 -1
- package/dist/components/AnotherComponent/index.d.ts +0 -2
- package/dist/components/AnotherComponent/index.es.js +0 -4
- package/dist/components/BasicButtons/BasicButtons.cjs.js +0 -1
- package/dist/components/BasicButtons/BasicButtons.d.ts +0 -2
- package/dist/components/BasicButtons/BasicButtons.es.js +0 -189
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +0 -1
- package/dist/components/BasicButtons/BasicButtons.stories.d.ts +0 -5
- package/dist/components/BasicButtons/BasicButtons.stories.es.js +0 -22
- package/dist/components/BasicButtons/index.cjs.js +0 -1
- package/dist/components/BasicButtons/index.d.ts +0 -2
- package/dist/components/BasicButtons/index.es.js +0 -4
- package/dist/components/buttons/IconButton/IconButton.cjs.js +0 -2
- package/dist/components/buttons/IconButton/IconButton.d.ts +0 -5
- package/dist/components/buttons/IconButton/index.cjs.js +0 -1
- package/dist/components/buttons/IconButton/index.d.ts +0 -2
- package/dist/components/buttons/IconButton/index.es.js +0 -4
- package/dist/createSvgIcon-B7HVs3ZC.cjs +0 -2
- package/dist/createSvgIcon-D3HDfwCm.js +0 -143
- package/dist/extendSxProp-D5gpnasP.cjs +0 -1
- package/dist/extendSxProp-DCdWqtQk.js +0 -29
- package/dist/useThemeProps-C6ClLEqN.cjs +0 -65
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { P as e, u as Pe,
|
|
1
|
+
import { P as e, u as Pe, e as ge, _ as c, d as De, T as We, g as Ve, a as _e, s as we, b as Le, f as fe, c as ee, h as je, q as Ue } from "./useThemeProps-Dg9Uoq7q.js";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { jsx as R, jsxs as
|
|
4
|
-
import { a as ve, u as
|
|
3
|
+
import { jsx as R, jsxs as oe } from "react/jsx-runtime";
|
|
4
|
+
import { a as ve, u as ne } from "./useForkRef-DwN_Iz9R.js";
|
|
5
5
|
import * as $e from "react-dom";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { a as me, d as Ge } from "./ownerWindow-C7EH1lr6.js";
|
|
7
|
+
import { i as he } from "./isHostComponent-kiaBvYVo.js";
|
|
8
|
+
import { e as Ke, r as qe } from "./refType-Hh9tfnoF.js";
|
|
8
9
|
import { Global as Ye } from "@emotion/react";
|
|
9
|
-
function Ze(
|
|
10
|
-
return
|
|
10
|
+
function Ze(o) {
|
|
11
|
+
return o == null || Object.keys(o).length === 0;
|
|
11
12
|
}
|
|
12
|
-
function Ce(
|
|
13
|
+
function Ce(o) {
|
|
13
14
|
const {
|
|
14
|
-
styles:
|
|
15
|
+
styles: n,
|
|
15
16
|
defaultTheme: t = {}
|
|
16
|
-
} =
|
|
17
|
+
} = o;
|
|
17
18
|
return /* @__PURE__ */ R(Ye, {
|
|
18
|
-
styles: typeof
|
|
19
|
+
styles: typeof n == "function" ? (r) => n(Ze(r) ? t : r) : n
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
@@ -23,11 +24,11 @@ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
|
23
24
|
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
24
25
|
});
|
|
25
26
|
function Se({
|
|
26
|
-
styles:
|
|
27
|
-
themeId:
|
|
27
|
+
styles: o,
|
|
28
|
+
themeId: n,
|
|
28
29
|
defaultTheme: t = {}
|
|
29
30
|
}) {
|
|
30
|
-
const a = Pe(t), r = typeof
|
|
31
|
+
const a = Pe(t), r = typeof o == "function" ? o(n && a[n] || a) : o;
|
|
31
32
|
return /* @__PURE__ */ R(Ce, {
|
|
32
33
|
styles: r
|
|
33
34
|
});
|
|
@@ -50,14 +51,17 @@ process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
|
50
51
|
*/
|
|
51
52
|
themeId: e.string
|
|
52
53
|
});
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
const xe = /* @__PURE__ */ s.createContext(void 0);
|
|
55
|
+
process.env.NODE_ENV !== "production" && (xe.displayName = "FormControlContext");
|
|
56
|
+
const Te = xe;
|
|
57
|
+
function Je() {
|
|
58
|
+
return s.useContext(Te);
|
|
55
59
|
}
|
|
56
|
-
const
|
|
57
|
-
function U(
|
|
58
|
-
return parseInt(
|
|
60
|
+
const Qe = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
61
|
+
function U(o) {
|
|
62
|
+
return parseInt(o, 10) || 0;
|
|
59
63
|
}
|
|
60
|
-
const
|
|
64
|
+
const Xe = {
|
|
61
65
|
shadow: {
|
|
62
66
|
// Visibility needed to hide the extra text area on iPads
|
|
63
67
|
visibility: "hidden",
|
|
@@ -72,17 +76,17 @@ const Qe = {
|
|
|
72
76
|
transform: "translateZ(0)"
|
|
73
77
|
}
|
|
74
78
|
};
|
|
75
|
-
function ye(
|
|
76
|
-
return
|
|
79
|
+
function ye(o) {
|
|
80
|
+
return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflow;
|
|
77
81
|
}
|
|
78
|
-
const
|
|
82
|
+
const Re = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
79
83
|
const {
|
|
80
84
|
onChange: a,
|
|
81
85
|
maxRows: r,
|
|
82
86
|
minRows: p = 1,
|
|
83
87
|
style: I,
|
|
84
88
|
value: E
|
|
85
|
-
} =
|
|
89
|
+
} = n, H = ge(n, Qe), {
|
|
86
90
|
current: O
|
|
87
91
|
} = s.useRef(E != null), S = s.useRef(null), F = ve(t, S), v = s.useRef(null), b = s.useRef(0), [N, k] = s.useState({
|
|
88
92
|
outerHeightStyle: 0
|
|
@@ -93,7 +97,7 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
93
97
|
outerHeightStyle: 0
|
|
94
98
|
};
|
|
95
99
|
const f = v.current;
|
|
96
|
-
f.style.width = u.width, f.value = d.value ||
|
|
100
|
+
f.style.width = u.width, f.value = d.value || n.placeholder || "x", f.value.slice(-1) === `
|
|
97
101
|
` && (f.value += " ");
|
|
98
102
|
const w = u.boxSizing, z = U(u.paddingBottom) + U(u.paddingTop), A = U(u.borderBottomWidth) + U(u.borderTopWidth), C = f.scrollHeight;
|
|
99
103
|
f.value = "x";
|
|
@@ -105,7 +109,7 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
105
109
|
outerHeightStyle: G,
|
|
106
110
|
overflow: P
|
|
107
111
|
};
|
|
108
|
-
}, [r, p,
|
|
112
|
+
}, [r, p, n.placeholder]), V = (d, g) => {
|
|
109
113
|
const {
|
|
110
114
|
outerHeightStyle: u,
|
|
111
115
|
overflow: f
|
|
@@ -119,7 +123,7 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
119
123
|
const d = B();
|
|
120
124
|
ye(d) || k((g) => V(g, d));
|
|
121
125
|
}, [B]);
|
|
122
|
-
|
|
126
|
+
ne(() => {
|
|
123
127
|
const d = () => {
|
|
124
128
|
const T = B();
|
|
125
129
|
ye(T) || $e.flushSync(() => {
|
|
@@ -139,7 +143,7 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
139
143
|
return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? f : g), C.observe(z)), () => {
|
|
140
144
|
w.clear(), cancelAnimationFrame(u), A.removeEventListener("resize", w), C && C.disconnect();
|
|
141
145
|
};
|
|
142
|
-
}, [B]),
|
|
146
|
+
}, [B]), ne(() => {
|
|
143
147
|
m();
|
|
144
148
|
}), s.useEffect(() => {
|
|
145
149
|
b.current = 0;
|
|
@@ -147,7 +151,7 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
147
151
|
const $ = (d) => {
|
|
148
152
|
b.current = 0, O || m(), a && a(d);
|
|
149
153
|
};
|
|
150
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ oe(s.Fragment, {
|
|
151
155
|
children: [/* @__PURE__ */ R("textarea", c({
|
|
152
156
|
value: E,
|
|
153
157
|
onChange: $,
|
|
@@ -161,18 +165,18 @@ const xe = /* @__PURE__ */ s.forwardRef(function(o, t) {
|
|
|
161
165
|
}, I)
|
|
162
166
|
}, H)), /* @__PURE__ */ R("textarea", {
|
|
163
167
|
"aria-hidden": !0,
|
|
164
|
-
className:
|
|
168
|
+
className: n.className,
|
|
165
169
|
readOnly: !0,
|
|
166
170
|
ref: v,
|
|
167
171
|
tabIndex: -1,
|
|
168
|
-
style: c({},
|
|
172
|
+
style: c({}, Xe.shadow, I, {
|
|
169
173
|
paddingTop: 0,
|
|
170
174
|
paddingBottom: 0
|
|
171
175
|
})
|
|
172
176
|
})]
|
|
173
177
|
});
|
|
174
178
|
});
|
|
175
|
-
process.env.NODE_ENV !== "production" && (
|
|
179
|
+
process.env.NODE_ENV !== "production" && (Re.propTypes = {
|
|
176
180
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
177
181
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
178
182
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -207,21 +211,15 @@ process.env.NODE_ENV !== "production" && (xe.propTypes = {
|
|
|
207
211
|
*/
|
|
208
212
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
209
213
|
});
|
|
210
|
-
function
|
|
211
|
-
props:
|
|
212
|
-
states:
|
|
214
|
+
function eo({
|
|
215
|
+
props: o,
|
|
216
|
+
states: n,
|
|
213
217
|
muiFormControl: t
|
|
214
218
|
}) {
|
|
215
|
-
return
|
|
219
|
+
return n.reduce((a, r) => (a[r] = o[r], t && typeof o[r] > "u" && (a[r] = t[r]), a), {});
|
|
216
220
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
const Re = Te;
|
|
220
|
-
function en() {
|
|
221
|
-
return s.useContext(Re);
|
|
222
|
-
}
|
|
223
|
-
function Ee(n) {
|
|
224
|
-
return /* @__PURE__ */ R(Se, c({}, n, {
|
|
221
|
+
function Ee(o) {
|
|
222
|
+
return /* @__PURE__ */ R(Se, c({}, o, {
|
|
225
223
|
defaultTheme: De,
|
|
226
224
|
themeId: We
|
|
227
225
|
}));
|
|
@@ -236,31 +234,31 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
|
|
|
236
234
|
*/
|
|
237
235
|
styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
|
|
238
236
|
});
|
|
239
|
-
function be(
|
|
240
|
-
return
|
|
237
|
+
function be(o) {
|
|
238
|
+
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
241
239
|
}
|
|
242
|
-
function
|
|
243
|
-
return
|
|
240
|
+
function oo(o, n = !1) {
|
|
241
|
+
return o && (be(o.value) && o.value !== "" || n && be(o.defaultValue) && o.defaultValue !== "");
|
|
244
242
|
}
|
|
245
|
-
function
|
|
246
|
-
return
|
|
243
|
+
function wo(o) {
|
|
244
|
+
return o.startAdornment;
|
|
247
245
|
}
|
|
248
|
-
function
|
|
249
|
-
return _e("MuiInputBase",
|
|
246
|
+
function no(o) {
|
|
247
|
+
return _e("MuiInputBase", o);
|
|
250
248
|
}
|
|
251
|
-
const
|
|
249
|
+
const to = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), te = to, ro = ["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"], io = (o, n) => {
|
|
252
250
|
const {
|
|
253
251
|
ownerState: t
|
|
254
|
-
} =
|
|
255
|
-
return [
|
|
256
|
-
},
|
|
252
|
+
} = o;
|
|
253
|
+
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];
|
|
254
|
+
}, so = (o, n) => {
|
|
257
255
|
const {
|
|
258
256
|
ownerState: t
|
|
259
|
-
} =
|
|
260
|
-
return [
|
|
261
|
-
},
|
|
257
|
+
} = o;
|
|
258
|
+
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];
|
|
259
|
+
}, ao = (o) => {
|
|
262
260
|
const {
|
|
263
|
-
classes:
|
|
261
|
+
classes: n,
|
|
264
262
|
color: t,
|
|
265
263
|
disabled: a,
|
|
266
264
|
error: r,
|
|
@@ -274,20 +272,20 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
274
272
|
size: v,
|
|
275
273
|
startAdornment: b,
|
|
276
274
|
type: N
|
|
277
|
-
} =
|
|
275
|
+
} = o, k = {
|
|
278
276
|
root: ["root", `color${ee(t)}`, a && "disabled", r && "error", H && "fullWidth", I && "focused", E && "formControl", v && v !== "medium" && `size${ee(v)}`, S && "multiline", b && "adornedStart", p && "adornedEnd", O && "hiddenLabel", F && "readOnly"],
|
|
279
277
|
input: ["input", a && "disabled", N === "search" && "inputTypeSearch", S && "inputMultiline", v === "small" && "inputSizeSmall", O && "inputHiddenLabel", b && "inputAdornedStart", p && "inputAdornedEnd", F && "readOnly"]
|
|
280
278
|
};
|
|
281
|
-
return je(k,
|
|
282
|
-
},
|
|
279
|
+
return je(k, no, n);
|
|
280
|
+
}, lo = we("div", {
|
|
283
281
|
name: "MuiInputBase",
|
|
284
282
|
slot: "Root",
|
|
285
|
-
overridesResolver:
|
|
283
|
+
overridesResolver: io
|
|
286
284
|
})(({
|
|
287
|
-
theme:
|
|
288
|
-
ownerState:
|
|
289
|
-
}) => c({},
|
|
290
|
-
color: (
|
|
285
|
+
theme: o,
|
|
286
|
+
ownerState: n
|
|
287
|
+
}) => c({}, o.typography.body1, {
|
|
288
|
+
color: (o.vars || o).palette.text.primary,
|
|
291
289
|
lineHeight: "1.4375em",
|
|
292
290
|
// 23px
|
|
293
291
|
boxSizing: "border-box",
|
|
@@ -297,37 +295,37 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
297
295
|
display: "inline-flex",
|
|
298
296
|
alignItems: "center",
|
|
299
297
|
[`&.${te.disabled}`]: {
|
|
300
|
-
color: (
|
|
298
|
+
color: (o.vars || o).palette.text.disabled,
|
|
301
299
|
cursor: "default"
|
|
302
300
|
}
|
|
303
|
-
},
|
|
301
|
+
}, n.multiline && c({
|
|
304
302
|
padding: "4px 0 5px"
|
|
305
|
-
},
|
|
303
|
+
}, n.size === "small" && {
|
|
306
304
|
paddingTop: 1
|
|
307
|
-
}),
|
|
305
|
+
}), n.fullWidth && {
|
|
308
306
|
width: "100%"
|
|
309
|
-
})),
|
|
307
|
+
})), uo = we("input", {
|
|
310
308
|
name: "MuiInputBase",
|
|
311
309
|
slot: "Input",
|
|
312
|
-
overridesResolver:
|
|
310
|
+
overridesResolver: so
|
|
313
311
|
})(({
|
|
314
|
-
theme:
|
|
315
|
-
ownerState:
|
|
312
|
+
theme: o,
|
|
313
|
+
ownerState: n
|
|
316
314
|
}) => {
|
|
317
|
-
const t =
|
|
315
|
+
const t = o.palette.mode === "light", a = c({
|
|
318
316
|
color: "currentColor"
|
|
319
|
-
},
|
|
320
|
-
opacity:
|
|
317
|
+
}, o.vars ? {
|
|
318
|
+
opacity: o.vars.opacity.inputPlaceholder
|
|
321
319
|
} : {
|
|
322
320
|
opacity: t ? 0.42 : 0.5
|
|
323
321
|
}, {
|
|
324
|
-
transition:
|
|
325
|
-
duration:
|
|
322
|
+
transition: o.transitions.create("opacity", {
|
|
323
|
+
duration: o.transitions.duration.shorter
|
|
326
324
|
})
|
|
327
325
|
}), r = {
|
|
328
326
|
opacity: "0 !important"
|
|
329
|
-
}, p =
|
|
330
|
-
opacity:
|
|
327
|
+
}, p = o.vars ? {
|
|
328
|
+
opacity: o.vars.opacity.inputPlaceholder
|
|
331
329
|
} : {
|
|
332
330
|
opacity: t ? 0.42 : 0.5
|
|
333
331
|
};
|
|
@@ -389,25 +387,25 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
389
387
|
[`&.${te.disabled}`]: {
|
|
390
388
|
opacity: 1,
|
|
391
389
|
// Reset iOS opacity
|
|
392
|
-
WebkitTextFillColor: (
|
|
390
|
+
WebkitTextFillColor: (o.vars || o).palette.text.disabled
|
|
393
391
|
// Fix opacity Safari bug
|
|
394
392
|
},
|
|
395
393
|
"&:-webkit-autofill": {
|
|
396
394
|
animationDuration: "5000s",
|
|
397
395
|
animationName: "mui-auto-fill"
|
|
398
396
|
}
|
|
399
|
-
},
|
|
397
|
+
}, n.size === "small" && {
|
|
400
398
|
paddingTop: 1
|
|
401
|
-
},
|
|
399
|
+
}, n.multiline && {
|
|
402
400
|
height: "auto",
|
|
403
401
|
resize: "none",
|
|
404
402
|
padding: 0,
|
|
405
403
|
paddingTop: 0
|
|
406
|
-
},
|
|
404
|
+
}, n.type === "search" && {
|
|
407
405
|
// Improve type search style.
|
|
408
406
|
MozAppearance: "textfield"
|
|
409
407
|
});
|
|
410
|
-
}),
|
|
408
|
+
}), co = /* @__PURE__ */ R(Ee, {
|
|
411
409
|
styles: {
|
|
412
410
|
"@keyframes mui-auto-fill": {
|
|
413
411
|
from: {
|
|
@@ -420,10 +418,10 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
420
418
|
}
|
|
421
419
|
}
|
|
422
420
|
}
|
|
423
|
-
}), Oe = /* @__PURE__ */ s.forwardRef(function(
|
|
421
|
+
}), Oe = /* @__PURE__ */ s.forwardRef(function(n, t) {
|
|
424
422
|
var a;
|
|
425
423
|
const r = Le({
|
|
426
|
-
props:
|
|
424
|
+
props: n,
|
|
427
425
|
name: "MuiInputBase"
|
|
428
426
|
}), {
|
|
429
427
|
"aria-describedby": p,
|
|
@@ -460,17 +458,17 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
460
458
|
startAdornment: D,
|
|
461
459
|
type: ae = "text",
|
|
462
460
|
value: Ne
|
|
463
|
-
} = r, ze = ge(r,
|
|
461
|
+
} = r, ze = ge(r, ro), L = m.value != null ? m.value : Ne, {
|
|
464
462
|
current: K
|
|
465
463
|
} = s.useRef(L != null), M = s.useRef(), Ae = s.useCallback((i) => {
|
|
466
464
|
process.env.NODE_ENV !== "production" && i && i.nodeName !== "INPUT" && !i.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
467
465
|
`));
|
|
468
|
-
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] = s.useState(!1), l =
|
|
466
|
+
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] = s.useState(!1), l = Je();
|
|
469
467
|
process.env.NODE_ENV !== "production" && s.useEffect(() => {
|
|
470
468
|
if (l)
|
|
471
469
|
return l.registerEffect();
|
|
472
470
|
}, [l]);
|
|
473
|
-
const y =
|
|
471
|
+
const y = eo({
|
|
474
472
|
props: r,
|
|
475
473
|
muiFormControl: l,
|
|
476
474
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
@@ -479,9 +477,9 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
479
477
|
!l && v && q && (Y(!1), w && w());
|
|
480
478
|
}, [l, v, q, w]);
|
|
481
479
|
const Z = l && l.onFilled, J = l && l.onEmpty, W = s.useCallback((i) => {
|
|
482
|
-
|
|
480
|
+
oo(i) ? Z && Z() : J && J();
|
|
483
481
|
}, [Z, J]);
|
|
484
|
-
|
|
482
|
+
ne(() => {
|
|
485
483
|
K && W({
|
|
486
484
|
value: L
|
|
487
485
|
});
|
|
@@ -520,7 +518,7 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
520
518
|
type: void 0,
|
|
521
519
|
maxRows: d,
|
|
522
520
|
minRows: g
|
|
523
|
-
}, x), Q =
|
|
521
|
+
}, x), Q = Re);
|
|
524
522
|
const He = (i) => {
|
|
525
523
|
W(i.animationName === "mui-auto-fill-cancel" ? M.current : {
|
|
526
524
|
value: "x"
|
|
@@ -542,16 +540,16 @@ const tn = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
542
540
|
size: y.size,
|
|
543
541
|
startAdornment: D,
|
|
544
542
|
type: ae
|
|
545
|
-
}), le =
|
|
546
|
-
return x = c({}, x, (a = ie.input) != null ? a : S.input), /* @__PURE__ */
|
|
547
|
-
children: [!b &&
|
|
543
|
+
}), le = ao(j), ue = se.root || O.Root || lo, X = ie.root || S.root || {}, de = se.input || O.Input || uo;
|
|
544
|
+
return x = c({}, x, (a = ie.input) != null ? a : S.input), /* @__PURE__ */ oe(s.Fragment, {
|
|
545
|
+
children: [!b && co, /* @__PURE__ */ oe(ue, c({}, X, !he(ue) && {
|
|
548
546
|
ownerState: c({}, j, X.ownerState)
|
|
549
547
|
}, {
|
|
550
548
|
ref: t,
|
|
551
549
|
onClick: Me
|
|
552
550
|
}, ze, {
|
|
553
551
|
className: fe(le.root, X.className, H, P && "MuiInputBase-readOnly"),
|
|
554
|
-
children: [D, /* @__PURE__ */ R(
|
|
552
|
+
children: [D, /* @__PURE__ */ R(Te.Provider, {
|
|
555
553
|
value: null,
|
|
556
554
|
children: /* @__PURE__ */ R(de, c({
|
|
557
555
|
ownerState: j,
|
|
@@ -818,18 +816,17 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
818
816
|
*/
|
|
819
817
|
value: e.any
|
|
820
818
|
});
|
|
821
|
-
const
|
|
819
|
+
const vo = Oe;
|
|
822
820
|
export {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
nn as g,
|
|
821
|
+
Te as F,
|
|
822
|
+
vo as I,
|
|
823
|
+
lo as a,
|
|
824
|
+
uo as b,
|
|
825
|
+
so as c,
|
|
826
|
+
wo as d,
|
|
827
|
+
oo as e,
|
|
828
|
+
eo as f,
|
|
832
829
|
te as i,
|
|
833
|
-
|
|
834
|
-
|
|
830
|
+
io as r,
|
|
831
|
+
Je as u
|
|
835
832
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-jkB5q9ie.cjs"),He=require("react"),P=require("react/jsx-runtime"),H=require("./useForkRef-CGd3Nhyb.cjs"),De=require("react-dom"),oe=require("./ownerWindow-Dk_4aaak.cjs"),ce=require("./isHostComponent-PydJW4A4.cjs"),fe=require("./refType-CHSN6ysS.cjs"),We=require("@emotion/react");function he(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return n.default=o,Object.freeze(n)}const p=he(He),Ve=he(De);function Le(o){return o==null||Object.keys(o).length===0}function Te(o){const{styles:n,defaultTheme:t={}}=o,r=typeof n=="function"?s=>n(Le(s)?t:s):n;return P.jsx(We.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(Te.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.string,e.PropTypes.object,e.PropTypes.func])});function be({styles:o,themeId:n,defaultTheme:t={}}){const r=e.useTheme(t),s=typeof o=="function"?o(n&&r[n]||r):o;return P.jsx(Te,{styles:s})}process.env.NODE_ENV!=="production"&&(be.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool]),themeId:e.PropTypes.string});const Pe=p.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pe.displayName="FormControlContext");const ne=Pe;function ge(){return p.useContext(ne)}const $e=["onChange","maxRows","minRows","style","value"];function $(o){return parseInt(o,10)||0}const qe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ye(o){return o==null||Object.keys(o).length===0||o.outerHeightStyle===0&&!o.overflow}const xe=p.forwardRef(function(n,t){const{onChange:r,maxRows:s,minRows:d=1,style:z,value:S}=n,k=e._objectWithoutPropertiesLoose(n,$e),{current:R}=p.useRef(S!=null),w=p.useRef(null),_=H.useForkRef(t,w),g=p.useRef(null),h=p.useRef(0),[O,A]=p.useState({outerHeightStyle:0}),F=p.useCallback(()=>{const u=w.current,a=oe.ownerWindow(u).getComputedStyle(u);if(a.width==="0px")return{outerHeightStyle:0};const c=g.current;c.style.width=a.width,c.value=u.value||n.placeholder||"x",c.value.slice(-1)===`
|
|
2
|
+
`&&(c.value+=" ");const b=a.boxSizing,E=$(a.paddingBottom)+$(a.paddingTop),N=$(a.borderBottomWidth)+$(a.borderTopWidth),x=c.scrollHeight;c.value="x";const C=c.scrollHeight;let y=x;d&&(y=Math.max(Number(d)*C,y)),s&&(y=Math.min(Number(s)*C,y)),y=Math.max(y,C);const G=y+(b==="border-box"?E+N:0),B=Math.abs(y-x)<=1;return{outerHeightStyle:G,overflow:B}},[s,d,n.placeholder]),D=(u,T)=>{const{outerHeightStyle:a,overflow:c}=T;return h.current<20&&(a>0&&Math.abs((u.outerHeightStyle||0)-a)>1||u.overflow!==c)?(h.current+=1,{overflow:c,outerHeightStyle:a}):(process.env.NODE_ENV!=="production"&&h.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(`
|
|
3
|
+
`)),u)},f=p.useCallback(()=>{const u=F();ye(u)||A(T=>D(T,u))},[F]);H.useEnhancedEffect(()=>{const u=()=>{const C=F();ye(C)||Ve.flushSync(()=>{A(y=>D(y,C))})},T=()=>{h.current=0,u()};let a;const c=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{T()})},b=oe.debounce(T),E=w.current,N=oe.ownerWindow(E);N.addEventListener("resize",b);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(process.env.NODE_ENV==="test"?c:T),x.observe(E)),()=>{b.clear(),cancelAnimationFrame(a),N.removeEventListener("resize",b),x&&x.disconnect()}},[F]),H.useEnhancedEffect(()=>{f()}),p.useEffect(()=>{h.current=0},[S]);const U=u=>{h.current=0,R||f(),r&&r(u)};return P.jsxs(p.Fragment,{children:[P.jsx("textarea",e._extends({value:S,onChange:U,ref:_,rows:d,style:e._extends({height:O.outerHeightStyle,overflow:O.overflow?"hidden":void 0},z)},k)),P.jsx("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:g,tabIndex:-1,style:e._extends({},qe.shadow,z,{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(xe.propTypes={className:e.PropTypes.string,maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),onChange:e.PropTypes.func,placeholder:e.PropTypes.string,style:e.PropTypes.object,value:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.number,e.PropTypes.string])});function we({props:o,states:n,muiFormControl:t}){return n.reduce((r,s)=>(r[s]=o[s],t&&typeof o[s]>"u"&&(r[s]=t[s]),r),{})}function ve(o){return P.jsx(be,e._extends({},o,{defaultTheme:e.defaultTheme,themeId:e.THEME_ID}))}process.env.NODE_ENV!=="production"&&(ve.propTypes={styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool])});function me(o){return o!=null&&!(Array.isArray(o)&&o.length===0)}function Ce(o,n=!1){return o&&(me(o.value)&&o.value!==""||n&&me(o.defaultValue)&&o.defaultValue!=="")}function Ue(o){return o.startAdornment}function Ge(o){return e.generateUtilityClass("MuiInputBase",o)}const Ke=e.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),q=Ke,Ye=["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"],Se=(o,n)=>{const{ownerState:t}=o;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${e.capitalize(t.color)}`],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},Re=(o,n)=>{const{ownerState:t}=o;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]},Ze=o=>{const{classes:n,color:t,disabled:r,error:s,endAdornment:d,focused:z,formControl:S,fullWidth:k,hiddenLabel:R,multiline:w,readOnly:_,size:g,startAdornment:h,type:O}=o,A={root:["root",`color${e.capitalize(t)}`,r&&"disabled",s&&"error",k&&"fullWidth",z&&"focused",S&&"formControl",g&&g!=="medium"&&`size${e.capitalize(g)}`,w&&"multiline",h&&"adornedStart",d&&"adornedEnd",R&&"hiddenLabel",_&&"readOnly"],input:["input",r&&"disabled",O==="search"&&"inputTypeSearch",w&&"inputMultiline",g==="small"&&"inputSizeSmall",R&&"inputHiddenLabel",h&&"inputAdornedStart",d&&"inputAdornedEnd",_&&"readOnly"]};return e.composeClasses(A,Ge,n)},Oe=e.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Se})(({theme:o,ownerState:n})=>e._extends({},o.typography.body1,{color:(o.vars||o).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${q.disabled}`]:{color:(o.vars||o).palette.text.disabled,cursor:"default"}},n.multiline&&e._extends({padding:"4px 0 5px"},n.size==="small"&&{paddingTop:1}),n.fullWidth&&{width:"100%"})),Ee=e.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Re})(({theme:o,ownerState:n})=>{const t=o.palette.mode==="light",r=e._extends({color:"currentColor"},o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:o.transitions.create("opacity",{duration:o.transitions.duration.shorter})}),s={opacity:"0 !important"},d=o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return e._extends({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${q.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":d,"&:focus::-moz-placeholder":d,"&:focus:-ms-input-placeholder":d,"&:focus::-ms-input-placeholder":d},[`&.${q.disabled}`]:{opacity:1,WebkitTextFillColor:(o.vars||o).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},n.size==="small"&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},n.type==="search"&&{MozAppearance:"textfield"})}),Je=P.jsx(ve,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Ne=p.forwardRef(function(n,t){var r;const s=e.useThemeProps({props:n,name:"MuiInputBase"}),{"aria-describedby":d,autoComplete:z,autoFocus:S,className:k,components:R={},componentsProps:w={},defaultValue:_,disabled:g,disableInjectingGlobalStyles:h,endAdornment:O,fullWidth:A=!1,id:F,inputComponent:D="input",inputProps:f={},inputRef:U,maxRows:u,minRows:T,multiline:a=!1,name:c,onBlur:b,onChange:E,onClick:N,onFocus:x,onKeyDown:C,onKeyUp:y,placeholder:G,readOnly:B,renderSuffix:te,rows:W,slotProps:re={},slots:se={},startAdornment:j,type:ie="text",value:ze}=s,_e=e._objectWithoutPropertiesLoose(s,Ye),V=f.value!=null?f.value:ze,{current:K}=p.useRef(V!=null),I=p.useRef(),Ae=p.useCallback(i=>{process.env.NODE_ENV!=="production"&&i&&i.nodeName!=="INPUT"&&!i.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
4
|
+
`))},[]),Fe=H.useForkRef(I,U,f.ref,Ae),[Y,Z]=p.useState(!1),l=ge();process.env.NODE_ENV!=="production"&&p.useEffect(()=>{if(l)return l.registerEffect()},[l]);const m=we({props:s,muiFormControl:l,states:["color","disabled","error","hiddenLabel","size","required","filled"]});m.focused=l?l.focused:Y,p.useEffect(()=>{!l&&g&&Y&&(Z(!1),b&&b())},[l,g,Y,b]);const J=l&&l.onFilled,Q=l&&l.onEmpty,M=p.useCallback(i=>{Ce(i)?J&&J():Q&&Q()},[J,Q]);H.useEnhancedEffect(()=>{K&&M({value:V})},[V,M,K]);const Ie=i=>{if(m.disabled){i.stopPropagation();return}x&&x(i),f.onFocus&&f.onFocus(i),l&&l.onFocus?l.onFocus(i):Z(!0)},ke=i=>{b&&b(i),f.onBlur&&f.onBlur(i),l&&l.onBlur?l.onBlur(i):Z(!1)},Be=(i,...ue)=>{if(!K){const de=i.target||I.current;if(de==null)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.":e.formatMuiErrorMessage(1));M({value:de.value})}f.onChange&&f.onChange(i,...ue),E&&E(i,...ue)};p.useEffect(()=>{M(I.current)},[]);const je=i=>{I.current&&i.currentTarget===i.target&&I.current.focus(),N&&N(i)};let X=D,v=f;a&&X==="input"&&(W?(process.env.NODE_ENV!=="production"&&(T||u)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),v=e._extends({type:void 0,minRows:W,maxRows:W},v)):v=e._extends({type:void 0,maxRows:u,minRows:T},v),X=xe);const Me=i=>{M(i.animationName==="mui-auto-fill-cancel"?I.current:{value:"x"})};p.useEffect(()=>{l&&l.setAdornedStart(!!j)},[l,j]);const L=e._extends({},s,{color:m.color||"primary",disabled:m.disabled,endAdornment:O,error:m.error,focused:m.focused,formControl:l,fullWidth:A,hiddenLabel:m.hiddenLabel,multiline:a,size:m.size,startAdornment:j,type:ie}),pe=Ze(L),le=se.root||R.Root||Oe,ee=re.root||w.root||{},ae=se.input||R.Input||Ee;return v=e._extends({},v,(r=re.input)!=null?r:w.input),P.jsxs(p.Fragment,{children:[!h&&Je,P.jsxs(le,e._extends({},ee,!ce.isHostComponent(le)&&{ownerState:e._extends({},L,ee.ownerState)},{ref:t,onClick:je},_e,{className:e.clsx(pe.root,ee.className,k,B&&"MuiInputBase-readOnly"),children:[j,P.jsx(ne.Provider,{value:null,children:P.jsx(ae,e._extends({ownerState:L,"aria-invalid":m.error,"aria-describedby":d,autoComplete:z,autoFocus:S,defaultValue:_,disabled:m.disabled,id:F,onAnimationStart:Me,name:c,placeholder:G,readOnly:B,required:m.required,rows:W,value:V,onKeyDown:C,onKeyUp:y,type:ie},v,!ce.isHostComponent(ae)&&{as:X,ownerState:e._extends({},L,v.ownerState)},{ref:Fe,className:e.clsx(pe.input,v.className,B&&"MuiInputBase-readOnly"),onBlur:ke,onChange:Be,onFocus:Ie}))}),O,te?te(e._extends({},m,{startAdornment:j})):null]}))]})});process.env.NODE_ENV!=="production"&&(Ne.propTypes={"aria-describedby":e.PropTypes.string,autoComplete:e.PropTypes.string,autoFocus:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary","error","info","success","warning"]),e.PropTypes.string]),components:e.PropTypes.shape({Input:e.PropTypes.elementType,Root:e.PropTypes.elementType}),componentsProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),defaultValue:e.PropTypes.any,disabled:e.PropTypes.bool,disableInjectingGlobalStyles:e.PropTypes.bool,endAdornment:e.PropTypes.node,error:e.PropTypes.bool,fullWidth:e.PropTypes.bool,id:e.PropTypes.string,inputComponent:fe.elementTypeAcceptingRef,inputProps:e.PropTypes.object,inputRef:fe.refType,margin:e.PropTypes.oneOf(["dense","none"]),maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),multiline:e.PropTypes.bool,name:e.PropTypes.string,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,onInvalid:e.PropTypes.func,onKeyDown:e.PropTypes.func,onKeyUp:e.PropTypes.func,placeholder:e.PropTypes.string,readOnly:e.PropTypes.bool,renderSuffix:e.PropTypes.func,required:e.PropTypes.bool,rows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["medium","small"]),e.PropTypes.string]),slotProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,root:e.PropTypes.elementType}),startAdornment:e.PropTypes.node,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),type:e.PropTypes.string,value:e.PropTypes.any});const Qe=Ne;exports.FormControlContext=ne;exports.InputBase=Qe;exports.InputBaseComponent=Ee;exports.InputBaseRoot=Oe;exports.formControlState=we;exports.inputBaseClasses=q;exports.inputOverridesResolver=Re;exports.isAdornedStart=Ue;exports.isFilled=Ce;exports.rootOverridesResolver=Se;exports.useFormControl=ge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./useThemeProps-jkB5q9ie.cjs"),k=require("react"),P=require("react/jsx-runtime"),w=require("./ButtonBase-DCL6Xlnm.cjs"),B=require("./unsupportedProp-Bn6XWqwH.cjs");function q(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return s.default=e,Object.freeze(s)}const c=q(k);function I(e){return o.generateUtilityClass("MuiTab",e)}const M=o.generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),r=M,z=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],D=e=>{const{classes:s,textColor:t,fullWidth:i,wrapped:f,icon:d,label:u,selected:T,disabled:l}=e,n={root:["root",d&&u&&"labelIcon",`textColor${o.capitalize(t)}`,i&&"fullWidth",f&&"wrapped",T&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return o.composeClasses(n,I,s)},E=o.styled(w.ButtonBase,{name:"MuiTab",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:t}=e;return[s.root,t.label&&t.icon&&s.labelIcon,s[`textColor${o.capitalize(t.textColor)}`],t.fullWidth&&s.fullWidth,t.wrapped&&s.wrapped]}})(({theme:e,ownerState:s})=>o._extends({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},s.label&&{flexDirection:s.iconPosition==="top"||s.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},s.icon&&s.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${r.iconWrapper}`]:o._extends({},s.iconPosition==="top"&&{marginBottom:6},s.iconPosition==="bottom"&&{marginTop:6},s.iconPosition==="start"&&{marginRight:e.spacing(1)},s.iconPosition==="end"&&{marginLeft:e.spacing(1)})},s.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${r.selected}`]:{opacity:1},[`&.${r.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},s.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${r.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${r.disabled}`]:{color:(e.vars||e).palette.text.disabled}},s.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${r.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${r.disabled}`]:{color:(e.vars||e).palette.text.disabled}},s.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},s.wrapped&&{fontSize:e.typography.pxToRem(12)})),v=c.forwardRef(function(s,t){const i=o.useThemeProps({props:s,name:"MuiTab"}),{className:f,disabled:d=!1,disableFocusRipple:u=!1,fullWidth:T,icon:l,iconPosition:n="top",indicator:F,label:b,onChange:y,onClick:x,onFocus:g,selected:a,selectionFollowsFocus:R,textColor:$="inherit",value:C,wrapped:O=!1}=i,j=o._objectWithoutPropertiesLoose(i,z),m=o._extends({},i,{disabled:d,disableFocusRipple:u,selected:a,icon:!!l,iconPosition:n,label:!!b,fullWidth:T,textColor:$,wrapped:O}),h=D(m),W=l&&b&&c.isValidElement(l)?c.cloneElement(l,{className:o.clsx(h.iconWrapper,l.props.className)}):l,_=p=>{!a&&y&&y(p,C),x&&x(p)},N=p=>{R&&!a&&y&&y(p,C),g&&g(p)};return P.jsxs(E,o._extends({focusRipple:!u,className:o.clsx(h.root,f),ref:t,role:"tab","aria-selected":a,disabled:d,onClick:_,onFocus:N,ownerState:m,tabIndex:a?0:-1},j,{children:[n==="top"||n==="start"?P.jsxs(c.Fragment,{children:[W,b]}):P.jsxs(c.Fragment,{children:[b,W]}),F]}))});process.env.NODE_ENV!=="production"&&(v.propTypes={children:B.unsupportedProp,classes:o.PropTypes.object,className:o.PropTypes.string,disabled:o.PropTypes.bool,disableFocusRipple:o.PropTypes.bool,disableRipple:o.PropTypes.bool,icon:o.PropTypes.oneOfType([o.PropTypes.element,o.PropTypes.string]),iconPosition:o.PropTypes.oneOf(["bottom","end","start","top"]),label:o.PropTypes.node,onChange:o.PropTypes.func,onClick:o.PropTypes.func,onFocus:o.PropTypes.func,sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object]),value:o.PropTypes.any,wrapped:o.PropTypes.bool});const U=v;exports.Tab=U;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as _,
|
|
1
|
+
import { g as _, a as E, s as M, c as R, _ as x, b as U, e as H, f as F, P as i, h as z } from "./useThemeProps-Dg9Uoq7q.js";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import { jsxs as C } from "react/jsx-runtime";
|
|
4
|
-
import { B as D } from "./ButtonBase-
|
|
5
|
-
import { u as L } from "./
|
|
4
|
+
import { B as D } from "./ButtonBase-B0tkJ9zf.js";
|
|
5
|
+
import { u as L } from "./unsupportedProp-BuVD30Gh.js";
|
|
6
6
|
function V(o) {
|
|
7
7
|
return E("MuiTab", o);
|
|
8
8
|
}
|
|
@@ -118,8 +118,8 @@ const A = _("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimar
|
|
|
118
118
|
// eslint-disable-next-line react/prop-types
|
|
119
119
|
textColor: O = "inherit",
|
|
120
120
|
value: T,
|
|
121
|
-
wrapped:
|
|
122
|
-
} = t,
|
|
121
|
+
wrapped: w = !1
|
|
122
|
+
} = t, B = H(t, G), W = x({}, t, {
|
|
123
123
|
disabled: d,
|
|
124
124
|
disableFocusRipple: b,
|
|
125
125
|
selected: c,
|
|
@@ -128,10 +128,10 @@ const A = _("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimar
|
|
|
128
128
|
label: !!u,
|
|
129
129
|
fullWidth: g,
|
|
130
130
|
textColor: O,
|
|
131
|
-
wrapped:
|
|
131
|
+
wrapped: w
|
|
132
132
|
}), P = q(W), v = l && u && /* @__PURE__ */ p.isValidElement(l) ? /* @__PURE__ */ p.cloneElement(l, {
|
|
133
133
|
className: F(P.iconWrapper, l.props.className)
|
|
134
|
-
}) : l,
|
|
134
|
+
}) : l, j = (r) => {
|
|
135
135
|
!c && f && f(r, T), y && y(r);
|
|
136
136
|
}, I = (r) => {
|
|
137
137
|
k && !c && f && f(r, T), h && h(r);
|
|
@@ -143,11 +143,11 @@ const A = _("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimar
|
|
|
143
143
|
role: "tab",
|
|
144
144
|
"aria-selected": c,
|
|
145
145
|
disabled: d,
|
|
146
|
-
onClick:
|
|
146
|
+
onClick: j,
|
|
147
147
|
onFocus: I,
|
|
148
148
|
ownerState: W,
|
|
149
149
|
tabIndex: c ? 0 : -1
|
|
150
|
-
},
|
|
150
|
+
}, B, {
|
|
151
151
|
children: [n === "top" || n === "start" ? /* @__PURE__ */ C(p.Fragment, {
|
|
152
152
|
children: [v, u]
|
|
153
153
|
}) : /* @__PURE__ */ C(p.Fragment, {
|