@fangzsx/component-library 0.0.11 → 0.0.13
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-DPlM16yK.js +30 -0
- package/dist/ButtonBase-qMhxbNdC.js +878 -0
- package/dist/FormLabel-DKoCtSGZ.js +600 -0
- package/dist/{Paper-CAUsv8qs.js → Paper-DyRh03We.js} +54 -51
- package/dist/SwitchBase-DStPyUhD.js +311 -0
- package/dist/Typography-B0rSrz7H.js +253 -0
- package/dist/components/AppBarPublic/index.js +83 -105
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Checkbox/index.js +103 -607
- package/dist/components/CheckboxGroup/index.d.ts +17 -0
- package/dist/components/CheckboxGroup/index.js +68 -0
- package/dist/components/Dropdown/index.d.ts +22 -0
- package/dist/components/Dropdown/index.js +120 -0
- package/dist/components/LinearProgress/index.d.ts +3 -0
- package/dist/components/LinearProgress/index.js +19 -0
- package/dist/components/MediaCardWithAction/index.js +157 -436
- package/dist/components/RadioButtonGroup/index.d.ts +17 -0
- package/dist/components/RadioButtonGroup/index.js +836 -0
- package/dist/components/TextFieldInput/index.d.ts +15 -0
- package/dist/components/TextFieldInput/index.js +6578 -0
- package/dist/{createSvgIcon-DAI5icic.js → createSvgIcon-Dj0SJuc1.js} +8 -7
- package/dist/generateUtilityClasses-BCID9NF1.js +2806 -0
- package/dist/{index-DGepNtNg.js → index-CoBGCD2e.js} +143 -158
- package/dist/index-o1i1vy-V.js +73 -0
- package/dist/main.d.ts +5 -1
- package/dist/main.js +21 -13
- package/dist/mergeSlotProps-C-n2ing7.js +62 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useSlot-S2pEBHE8.js +161 -0
- package/dist/useTimeout-BWi4JTOH.js +635 -0
- package/package.json +1 -1
- package/dist/ButtonBase-CAtBagnK.js +0 -4293
- package/dist/assets/index2.css +0 -1
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input/index.js +0 -11
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
import { P as x, b as se, r as k, h as ie, s as G, i as ue, c as ce, T as fe } from "./generateUtilityClasses-BCID9NF1.js";
|
|
2
|
+
import ae from "@emotion/styled";
|
|
3
|
+
import "@emotion/react";
|
|
4
|
+
import { unstable_memoTheme as le } from "@mui/system";
|
|
5
|
+
import * as m from "react";
|
|
6
|
+
import de from "react";
|
|
7
|
+
import "react/jsx-runtime";
|
|
8
|
+
function B(e) {
|
|
9
|
+
var t, n, r = "";
|
|
10
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
11
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
12
|
+
var o = e.length;
|
|
13
|
+
for (t = 0; t < o; t++) e[t] && (n = B(e[t])) && (r && (r += " "), r += n);
|
|
14
|
+
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
15
|
+
return r;
|
|
16
|
+
}
|
|
17
|
+
function me() {
|
|
18
|
+
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = B(e)) && (r && (r += " "), r += t);
|
|
19
|
+
return r;
|
|
20
|
+
}
|
|
21
|
+
function et(e, t, n = void 0) {
|
|
22
|
+
const r = {};
|
|
23
|
+
for (const o in e) {
|
|
24
|
+
const s = e[o];
|
|
25
|
+
let i = "", u = !0;
|
|
26
|
+
for (let f = 0; f < s.length; f += 1) {
|
|
27
|
+
const c = s[f];
|
|
28
|
+
c && (i += (u === !0 ? "" : " ") + t(c), u = !1, n && n[c] && (i += " " + n[c]));
|
|
29
|
+
}
|
|
30
|
+
r[o] = i;
|
|
31
|
+
}
|
|
32
|
+
return r;
|
|
33
|
+
}
|
|
34
|
+
function ye(e) {
|
|
35
|
+
for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
|
|
36
|
+
n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
|
|
37
|
+
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
38
|
+
n >>> 24, t = /* Math.imul(k, m): */
|
|
39
|
+
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
40
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
41
|
+
switch (o) {
|
|
42
|
+
case 3:
|
|
43
|
+
t ^= (e.charCodeAt(r + 2) & 255) << 16;
|
|
44
|
+
case 2:
|
|
45
|
+
t ^= (e.charCodeAt(r + 1) & 255) << 8;
|
|
46
|
+
case 1:
|
|
47
|
+
t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
|
|
48
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
49
|
+
}
|
|
50
|
+
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
51
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
52
|
+
}
|
|
53
|
+
var he = {
|
|
54
|
+
animationIterationCount: 1,
|
|
55
|
+
aspectRatio: 1,
|
|
56
|
+
borderImageOutset: 1,
|
|
57
|
+
borderImageSlice: 1,
|
|
58
|
+
borderImageWidth: 1,
|
|
59
|
+
boxFlex: 1,
|
|
60
|
+
boxFlexGroup: 1,
|
|
61
|
+
boxOrdinalGroup: 1,
|
|
62
|
+
columnCount: 1,
|
|
63
|
+
columns: 1,
|
|
64
|
+
flex: 1,
|
|
65
|
+
flexGrow: 1,
|
|
66
|
+
flexPositive: 1,
|
|
67
|
+
flexShrink: 1,
|
|
68
|
+
flexNegative: 1,
|
|
69
|
+
flexOrder: 1,
|
|
70
|
+
gridRow: 1,
|
|
71
|
+
gridRowEnd: 1,
|
|
72
|
+
gridRowSpan: 1,
|
|
73
|
+
gridRowStart: 1,
|
|
74
|
+
gridColumn: 1,
|
|
75
|
+
gridColumnEnd: 1,
|
|
76
|
+
gridColumnSpan: 1,
|
|
77
|
+
gridColumnStart: 1,
|
|
78
|
+
msGridRow: 1,
|
|
79
|
+
msGridRowSpan: 1,
|
|
80
|
+
msGridColumn: 1,
|
|
81
|
+
msGridColumnSpan: 1,
|
|
82
|
+
fontWeight: 1,
|
|
83
|
+
lineHeight: 1,
|
|
84
|
+
opacity: 1,
|
|
85
|
+
order: 1,
|
|
86
|
+
orphans: 1,
|
|
87
|
+
scale: 1,
|
|
88
|
+
tabSize: 1,
|
|
89
|
+
widows: 1,
|
|
90
|
+
zIndex: 1,
|
|
91
|
+
zoom: 1,
|
|
92
|
+
WebkitLineClamp: 1,
|
|
93
|
+
// SVG-related properties
|
|
94
|
+
fillOpacity: 1,
|
|
95
|
+
floodOpacity: 1,
|
|
96
|
+
stopOpacity: 1,
|
|
97
|
+
strokeDasharray: 1,
|
|
98
|
+
strokeDashoffset: 1,
|
|
99
|
+
strokeMiterlimit: 1,
|
|
100
|
+
strokeOpacity: 1,
|
|
101
|
+
strokeWidth: 1
|
|
102
|
+
};
|
|
103
|
+
function pe(e) {
|
|
104
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
105
|
+
return function(n) {
|
|
106
|
+
return t[n] === void 0 && (t[n] = e(n)), t[n];
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
var ve = /[A-Z]|^ms/g, xe = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Z = function(t) {
|
|
110
|
+
return t.charCodeAt(1) === 45;
|
|
111
|
+
}, W = function(t) {
|
|
112
|
+
return t != null && typeof t != "boolean";
|
|
113
|
+
}, I = /* @__PURE__ */ pe(function(e) {
|
|
114
|
+
return Z(e) ? e : e.replace(ve, "-$&").toLowerCase();
|
|
115
|
+
}), H = function(t, n) {
|
|
116
|
+
switch (t) {
|
|
117
|
+
case "animation":
|
|
118
|
+
case "animationName":
|
|
119
|
+
if (typeof n == "string")
|
|
120
|
+
return n.replace(xe, function(r, o, s) {
|
|
121
|
+
return v = {
|
|
122
|
+
name: o,
|
|
123
|
+
styles: s,
|
|
124
|
+
next: v
|
|
125
|
+
}, o;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return he[t] !== 1 && !Z(t) && typeof n == "number" && n !== 0 ? n + "px" : n;
|
|
129
|
+
};
|
|
130
|
+
function E(e, t, n) {
|
|
131
|
+
if (n == null)
|
|
132
|
+
return "";
|
|
133
|
+
var r = n;
|
|
134
|
+
if (r.__emotion_styles !== void 0)
|
|
135
|
+
return r;
|
|
136
|
+
switch (typeof n) {
|
|
137
|
+
case "boolean":
|
|
138
|
+
return "";
|
|
139
|
+
case "object": {
|
|
140
|
+
var o = n;
|
|
141
|
+
if (o.anim === 1)
|
|
142
|
+
return v = {
|
|
143
|
+
name: o.name,
|
|
144
|
+
styles: o.styles,
|
|
145
|
+
next: v
|
|
146
|
+
}, o.name;
|
|
147
|
+
var s = n;
|
|
148
|
+
if (s.styles !== void 0) {
|
|
149
|
+
var i = s.next;
|
|
150
|
+
if (i !== void 0)
|
|
151
|
+
for (; i !== void 0; )
|
|
152
|
+
v = {
|
|
153
|
+
name: i.name,
|
|
154
|
+
styles: i.styles,
|
|
155
|
+
next: v
|
|
156
|
+
}, i = i.next;
|
|
157
|
+
var u = s.styles + ";";
|
|
158
|
+
return u;
|
|
159
|
+
}
|
|
160
|
+
return we(e, t, n);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
var f = n;
|
|
164
|
+
return f;
|
|
165
|
+
}
|
|
166
|
+
function we(e, t, n) {
|
|
167
|
+
var r = "";
|
|
168
|
+
if (Array.isArray(n))
|
|
169
|
+
for (var o = 0; o < n.length; o++)
|
|
170
|
+
r += E(e, t, n[o]) + ";";
|
|
171
|
+
else
|
|
172
|
+
for (var s in n) {
|
|
173
|
+
var i = n[s];
|
|
174
|
+
if (typeof i != "object") {
|
|
175
|
+
var u = i;
|
|
176
|
+
W(u) && (r += I(s) + ":" + H(s, u) + ";");
|
|
177
|
+
} else if (Array.isArray(i) && typeof i[0] == "string" && t == null)
|
|
178
|
+
for (var f = 0; f < i.length; f++)
|
|
179
|
+
W(i[f]) && (r += I(s) + ":" + H(s, i[f]) + ";");
|
|
180
|
+
else {
|
|
181
|
+
var c = E(e, t, i);
|
|
182
|
+
switch (s) {
|
|
183
|
+
case "animation":
|
|
184
|
+
case "animationName": {
|
|
185
|
+
r += I(s) + ":" + c + ";";
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
default:
|
|
189
|
+
r += s + "{" + c + "}";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return r;
|
|
194
|
+
}
|
|
195
|
+
var K = /label:\s*([^\s;{]+)\s*(;|$)/g, v;
|
|
196
|
+
function Se(e, t, n) {
|
|
197
|
+
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
198
|
+
return e[0];
|
|
199
|
+
var r = !0, o = "";
|
|
200
|
+
v = void 0;
|
|
201
|
+
var s = e[0];
|
|
202
|
+
if (s == null || s.raw === void 0)
|
|
203
|
+
r = !1, o += E(n, t, s);
|
|
204
|
+
else {
|
|
205
|
+
var i = s;
|
|
206
|
+
o += i[0];
|
|
207
|
+
}
|
|
208
|
+
for (var u = 1; u < e.length; u++)
|
|
209
|
+
if (o += E(n, t, e[u]), r) {
|
|
210
|
+
var f = s;
|
|
211
|
+
o += f[u];
|
|
212
|
+
}
|
|
213
|
+
K.lastIndex = 0;
|
|
214
|
+
for (var c = "", a; (a = K.exec(o)) !== null; )
|
|
215
|
+
c += "-" + a[1];
|
|
216
|
+
var g = ye(o) + c;
|
|
217
|
+
return {
|
|
218
|
+
name: g,
|
|
219
|
+
styles: o,
|
|
220
|
+
next: v
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function be(e, t) {
|
|
224
|
+
const n = ae(e, t);
|
|
225
|
+
return process.env.NODE_ENV !== "production" ? (...r) => {
|
|
226
|
+
const o = typeof e == "string" ? `"${e}"` : "component";
|
|
227
|
+
return r.length === 0 ? console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
228
|
+
`)) : r.some((s) => s === void 0) && console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`), n(...r);
|
|
229
|
+
} : n;
|
|
230
|
+
}
|
|
231
|
+
function ge(e, t) {
|
|
232
|
+
Array.isArray(e.__emotion_styles) && (e.__emotion_styles = t(e.__emotion_styles));
|
|
233
|
+
}
|
|
234
|
+
const U = [];
|
|
235
|
+
function b(e) {
|
|
236
|
+
return U[0] = e, Se(U);
|
|
237
|
+
}
|
|
238
|
+
const Oe = typeof window < "u" ? m.useLayoutEffect : m.useEffect;
|
|
239
|
+
function F(e, t, n = !1) {
|
|
240
|
+
const r = {
|
|
241
|
+
...t
|
|
242
|
+
};
|
|
243
|
+
for (const o in e)
|
|
244
|
+
if (Object.prototype.hasOwnProperty.call(e, o)) {
|
|
245
|
+
const s = o;
|
|
246
|
+
if (s === "components" || s === "slots")
|
|
247
|
+
r[s] = {
|
|
248
|
+
...e[s],
|
|
249
|
+
...r[s]
|
|
250
|
+
};
|
|
251
|
+
else if (s === "componentsProps" || s === "slotProps") {
|
|
252
|
+
const i = e[s], u = t[s];
|
|
253
|
+
if (!u)
|
|
254
|
+
r[s] = i || {};
|
|
255
|
+
else if (!i)
|
|
256
|
+
r[s] = u;
|
|
257
|
+
else {
|
|
258
|
+
r[s] = {
|
|
259
|
+
...u
|
|
260
|
+
};
|
|
261
|
+
for (const f in i)
|
|
262
|
+
if (Object.prototype.hasOwnProperty.call(i, f)) {
|
|
263
|
+
const c = f;
|
|
264
|
+
r[s][c] = F(i[c], u[c], n);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
} else s === "className" && n && t.className ? r.className = me(e?.className, t?.className) : s === "style" && n && t.style ? r.style = {
|
|
268
|
+
...e?.style,
|
|
269
|
+
...t?.style
|
|
270
|
+
} : r[s] === void 0 && (r[s] = e[s]);
|
|
271
|
+
}
|
|
272
|
+
return r;
|
|
273
|
+
}
|
|
274
|
+
const Pe = /* @__PURE__ */ m.createContext(void 0);
|
|
275
|
+
process.env.NODE_ENV !== "production" && (x.node, x.object);
|
|
276
|
+
function _e(e) {
|
|
277
|
+
const {
|
|
278
|
+
theme: t,
|
|
279
|
+
name: n,
|
|
280
|
+
props: r
|
|
281
|
+
} = e;
|
|
282
|
+
if (!t || !t.components || !t.components[n])
|
|
283
|
+
return r;
|
|
284
|
+
const o = t.components[n];
|
|
285
|
+
return o.defaultProps ? F(o.defaultProps, r, t.components.mergeClassNameAndStyle) : !o.styleOverrides && !o.variants ? F(o, r, t.components.mergeClassNameAndStyle) : r;
|
|
286
|
+
}
|
|
287
|
+
function Ce({
|
|
288
|
+
props: e,
|
|
289
|
+
name: t
|
|
290
|
+
}) {
|
|
291
|
+
const n = m.useContext(Pe);
|
|
292
|
+
return _e({
|
|
293
|
+
props: e,
|
|
294
|
+
name: t,
|
|
295
|
+
theme: {
|
|
296
|
+
components: n
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
const Ee = se();
|
|
301
|
+
function z(e, t = "") {
|
|
302
|
+
return e.displayName || e.name || t;
|
|
303
|
+
}
|
|
304
|
+
function Y(e, t, n) {
|
|
305
|
+
const r = z(t);
|
|
306
|
+
return e.displayName || (r !== "" ? `${n}(${r})` : n);
|
|
307
|
+
}
|
|
308
|
+
function Re(e) {
|
|
309
|
+
if (e != null) {
|
|
310
|
+
if (typeof e == "string")
|
|
311
|
+
return e;
|
|
312
|
+
if (typeof e == "function")
|
|
313
|
+
return z(e, "Component");
|
|
314
|
+
if (typeof e == "object")
|
|
315
|
+
switch (e.$$typeof) {
|
|
316
|
+
case k.ForwardRef:
|
|
317
|
+
return Y(e, e.render, "ForwardRef");
|
|
318
|
+
case k.Memo:
|
|
319
|
+
return Y(e, e.type, "memo");
|
|
320
|
+
default:
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
function Ae(e) {
|
|
326
|
+
const {
|
|
327
|
+
variants: t,
|
|
328
|
+
...n
|
|
329
|
+
} = e, r = {
|
|
330
|
+
variants: t,
|
|
331
|
+
style: b(n),
|
|
332
|
+
isProcessed: !0
|
|
333
|
+
};
|
|
334
|
+
return r.style === n || t && t.forEach((o) => {
|
|
335
|
+
typeof o.style != "function" && (o.style = b(o.style));
|
|
336
|
+
}), r;
|
|
337
|
+
}
|
|
338
|
+
const Te = ie();
|
|
339
|
+
function $(e) {
|
|
340
|
+
return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
|
|
341
|
+
}
|
|
342
|
+
function S(e, t) {
|
|
343
|
+
return t && e && typeof e == "object" && e.styles && !e.styles.startsWith("@layer") && (e.styles = `@layer ${t}{${String(e.styles)}}`), e;
|
|
344
|
+
}
|
|
345
|
+
function Ie(e) {
|
|
346
|
+
return e ? (t, n) => n[e] : null;
|
|
347
|
+
}
|
|
348
|
+
function $e(e, t, n) {
|
|
349
|
+
e.theme = De(e.theme) ? n : e.theme[t] || e.theme;
|
|
350
|
+
}
|
|
351
|
+
function C(e, t, n) {
|
|
352
|
+
const r = typeof t == "function" ? t(e) : t;
|
|
353
|
+
if (Array.isArray(r))
|
|
354
|
+
return r.flatMap((o) => C(e, o, n));
|
|
355
|
+
if (Array.isArray(r?.variants)) {
|
|
356
|
+
let o;
|
|
357
|
+
if (r.isProcessed)
|
|
358
|
+
o = n ? S(r.style, n) : r.style;
|
|
359
|
+
else {
|
|
360
|
+
const {
|
|
361
|
+
variants: s,
|
|
362
|
+
...i
|
|
363
|
+
} = r;
|
|
364
|
+
o = n ? S(b(i), n) : i;
|
|
365
|
+
}
|
|
366
|
+
return J(e, r.variants, [o], n);
|
|
367
|
+
}
|
|
368
|
+
return r?.isProcessed ? n ? S(b(r.style), n) : r.style : n ? S(b(r), n) : r;
|
|
369
|
+
}
|
|
370
|
+
function J(e, t, n = [], r = void 0) {
|
|
371
|
+
let o;
|
|
372
|
+
e: for (let s = 0; s < t.length; s += 1) {
|
|
373
|
+
const i = t[s];
|
|
374
|
+
if (typeof i.props == "function") {
|
|
375
|
+
if (o ??= {
|
|
376
|
+
...e,
|
|
377
|
+
...e.ownerState,
|
|
378
|
+
ownerState: e.ownerState
|
|
379
|
+
}, !i.props(o))
|
|
380
|
+
continue;
|
|
381
|
+
} else
|
|
382
|
+
for (const u in i.props)
|
|
383
|
+
if (e[u] !== i.props[u] && e.ownerState?.[u] !== i.props[u])
|
|
384
|
+
continue e;
|
|
385
|
+
typeof i.style == "function" ? (o ??= {
|
|
386
|
+
...e,
|
|
387
|
+
...e.ownerState,
|
|
388
|
+
ownerState: e.ownerState
|
|
389
|
+
}, n.push(r ? S(b(i.style(o)), r) : i.style(o))) : n.push(r ? S(b(i.style), r) : i.style);
|
|
390
|
+
}
|
|
391
|
+
return n;
|
|
392
|
+
}
|
|
393
|
+
function Fe(e = {}) {
|
|
394
|
+
const {
|
|
395
|
+
themeId: t,
|
|
396
|
+
defaultTheme: n = Te,
|
|
397
|
+
rootShouldForwardProp: r = $,
|
|
398
|
+
slotShouldForwardProp: o = $
|
|
399
|
+
} = e;
|
|
400
|
+
function s(u) {
|
|
401
|
+
$e(u, t, n);
|
|
402
|
+
}
|
|
403
|
+
return (u, f = {}) => {
|
|
404
|
+
ge(u, (l) => l.filter((d) => d !== G));
|
|
405
|
+
const {
|
|
406
|
+
name: c,
|
|
407
|
+
slot: a,
|
|
408
|
+
skipVariantsResolver: g,
|
|
409
|
+
skipSx: X,
|
|
410
|
+
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
411
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
412
|
+
overridesResolver: D = Ie(Q(a)),
|
|
413
|
+
...ee
|
|
414
|
+
} = f, R = c && c.startsWith("Mui") || a ? "components" : "custom", te = g !== void 0 ? g : (
|
|
415
|
+
// TODO v6: remove `Root` in the next major release
|
|
416
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
417
|
+
a && a !== "Root" && a !== "root" || !1
|
|
418
|
+
), ne = X || !1;
|
|
419
|
+
let O = $;
|
|
420
|
+
a === "Root" || a === "root" ? O = r : a ? O = o : je(u) && (O = void 0);
|
|
421
|
+
const A = be(u, {
|
|
422
|
+
shouldForwardProp: O,
|
|
423
|
+
label: Ve(c, a),
|
|
424
|
+
...ee
|
|
425
|
+
}), re = (l) => {
|
|
426
|
+
if (l.__emotion_real === l)
|
|
427
|
+
return l;
|
|
428
|
+
if (typeof l == "function")
|
|
429
|
+
return function(w) {
|
|
430
|
+
return C(w, l, w.theme.modularCssLayers ? R : void 0);
|
|
431
|
+
};
|
|
432
|
+
if (ue(l)) {
|
|
433
|
+
const d = Ae(l);
|
|
434
|
+
return function(p) {
|
|
435
|
+
return d.variants ? C(p, d, p.theme.modularCssLayers ? R : void 0) : p.theme.modularCssLayers ? S(d.style, R) : d.style;
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
return l;
|
|
439
|
+
}, j = (...l) => {
|
|
440
|
+
const d = [], w = l.map(re), p = [];
|
|
441
|
+
if (d.push(s), c && D && p.push(function(y) {
|
|
442
|
+
const h = y.theme.components?.[c]?.styleOverrides;
|
|
443
|
+
if (!h)
|
|
444
|
+
return null;
|
|
445
|
+
const L = {};
|
|
446
|
+
for (const M in h)
|
|
447
|
+
L[M] = C(y, h[M], y.theme.modularCssLayers ? "theme" : void 0);
|
|
448
|
+
return D(y, L);
|
|
449
|
+
}), c && !te && p.push(function(y) {
|
|
450
|
+
const h = y.theme?.components?.[c]?.variants;
|
|
451
|
+
return h ? J(y, h, [], y.theme.modularCssLayers ? "theme" : void 0) : null;
|
|
452
|
+
}), ne || p.push(G), Array.isArray(w[0])) {
|
|
453
|
+
const P = w.shift(), y = new Array(d.length).fill(""), _ = new Array(p.length).fill("");
|
|
454
|
+
let h;
|
|
455
|
+
h = [...y, ...P, ..._], h.raw = [...y, ...P.raw, ..._], d.unshift(h);
|
|
456
|
+
}
|
|
457
|
+
const oe = [...d, ...w, ...p], T = A(...oe);
|
|
458
|
+
return u.muiName && (T.muiName = u.muiName), process.env.NODE_ENV !== "production" && (T.displayName = Ne(c, a, u)), T;
|
|
459
|
+
};
|
|
460
|
+
return A.withConfig && (j.withConfig = A.withConfig), j;
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
function Ne(e, t, n) {
|
|
464
|
+
return e ? `${e}${ce(t || "")}` : `Styled(${Re(n)})`;
|
|
465
|
+
}
|
|
466
|
+
function Ve(e, t) {
|
|
467
|
+
let n;
|
|
468
|
+
return process.env.NODE_ENV !== "production" && e && (n = `${e}-${Q(t || "Root")}`), n;
|
|
469
|
+
}
|
|
470
|
+
function De(e) {
|
|
471
|
+
for (const t in e)
|
|
472
|
+
return !1;
|
|
473
|
+
return !0;
|
|
474
|
+
}
|
|
475
|
+
function je(e) {
|
|
476
|
+
return typeof e == "string" && // 96 is one less than the char code
|
|
477
|
+
// for "a" so this is checking that
|
|
478
|
+
// it's a lowercase character
|
|
479
|
+
e.charCodeAt(0) > 96;
|
|
480
|
+
}
|
|
481
|
+
function Q(e) {
|
|
482
|
+
return e && e.charAt(0).toLowerCase() + e.slice(1);
|
|
483
|
+
}
|
|
484
|
+
function Le(e) {
|
|
485
|
+
return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
|
|
486
|
+
}
|
|
487
|
+
const Me = (e) => Le(e) && e !== "classes", tt = Fe({
|
|
488
|
+
themeId: fe,
|
|
489
|
+
defaultTheme: Ee,
|
|
490
|
+
rootShouldForwardProp: Me
|
|
491
|
+
}), nt = le;
|
|
492
|
+
process.env.NODE_ENV !== "production" && (x.node, x.object.isRequired);
|
|
493
|
+
function rt(e) {
|
|
494
|
+
return Ce(e);
|
|
495
|
+
}
|
|
496
|
+
function ot(e) {
|
|
497
|
+
const t = m.useRef(e);
|
|
498
|
+
return Oe(() => {
|
|
499
|
+
t.current = e;
|
|
500
|
+
}), m.useRef((...n) => (
|
|
501
|
+
// @ts-expect-error hide `this`
|
|
502
|
+
(0, t.current)(...n)
|
|
503
|
+
)).current;
|
|
504
|
+
}
|
|
505
|
+
function st(...e) {
|
|
506
|
+
const t = m.useRef(void 0), n = m.useCallback((r) => {
|
|
507
|
+
const o = e.map((s) => {
|
|
508
|
+
if (s == null)
|
|
509
|
+
return null;
|
|
510
|
+
if (typeof s == "function") {
|
|
511
|
+
const i = s, u = i(r);
|
|
512
|
+
return typeof u == "function" ? u : () => {
|
|
513
|
+
i(null);
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
return s.current = r, () => {
|
|
517
|
+
s.current = null;
|
|
518
|
+
};
|
|
519
|
+
});
|
|
520
|
+
return () => {
|
|
521
|
+
o.forEach((s) => s?.());
|
|
522
|
+
};
|
|
523
|
+
}, e);
|
|
524
|
+
return m.useMemo(() => e.every((r) => r == null) ? null : (r) => {
|
|
525
|
+
t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
|
|
526
|
+
}, e);
|
|
527
|
+
}
|
|
528
|
+
function ke(e) {
|
|
529
|
+
return typeof e.main == "string";
|
|
530
|
+
}
|
|
531
|
+
function Ge(e, t = []) {
|
|
532
|
+
if (!ke(e))
|
|
533
|
+
return !1;
|
|
534
|
+
for (const n of t)
|
|
535
|
+
if (!e.hasOwnProperty(n) || typeof e[n] != "string")
|
|
536
|
+
return !1;
|
|
537
|
+
return !0;
|
|
538
|
+
}
|
|
539
|
+
function it(e = []) {
|
|
540
|
+
return ([, t]) => t && Ge(t, e);
|
|
541
|
+
}
|
|
542
|
+
function We(e, t) {
|
|
543
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...r) {
|
|
544
|
+
return e(...r) || t(...r);
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
const ut = x.oneOfType([x.func, x.object]);
|
|
548
|
+
function He(e) {
|
|
549
|
+
const {
|
|
550
|
+
prototype: t = {}
|
|
551
|
+
} = e;
|
|
552
|
+
return !!t.isReactComponent;
|
|
553
|
+
}
|
|
554
|
+
function Ke(e, t, n, r, o) {
|
|
555
|
+
const s = e[t], i = o || t;
|
|
556
|
+
if (s == null || // When server-side rendering React doesn't warn either.
|
|
557
|
+
// This is not an accurate check for SSR.
|
|
558
|
+
// This is only in place for emotion compat.
|
|
559
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
560
|
+
typeof window > "u")
|
|
561
|
+
return null;
|
|
562
|
+
let u;
|
|
563
|
+
return typeof s == "function" && !He(s) && (u = "Did you accidentally provide a plain function component instead?"), s === m.Fragment && (u = "Did you accidentally provide a React.Fragment instead?"), u !== void 0 ? new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
564
|
+
}
|
|
565
|
+
const ct = We(x.elementType, Ke), q = {};
|
|
566
|
+
function Ue(e, t) {
|
|
567
|
+
const n = m.useRef(q);
|
|
568
|
+
return n.current === q && (n.current = e(t)), n;
|
|
569
|
+
}
|
|
570
|
+
function ft(e, t) {
|
|
571
|
+
if (e == null) return {};
|
|
572
|
+
var n = {};
|
|
573
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
574
|
+
if (t.indexOf(r) !== -1) continue;
|
|
575
|
+
n[r] = e[r];
|
|
576
|
+
}
|
|
577
|
+
return n;
|
|
578
|
+
}
|
|
579
|
+
function N(e, t) {
|
|
580
|
+
return N = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
581
|
+
return n.__proto__ = r, n;
|
|
582
|
+
}, N(e, t);
|
|
583
|
+
}
|
|
584
|
+
function at(e, t) {
|
|
585
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, N(e, t);
|
|
586
|
+
}
|
|
587
|
+
const lt = de.createContext(null), Ye = [];
|
|
588
|
+
function qe(e) {
|
|
589
|
+
m.useEffect(e, Ye);
|
|
590
|
+
}
|
|
591
|
+
class V {
|
|
592
|
+
static create() {
|
|
593
|
+
return new V();
|
|
594
|
+
}
|
|
595
|
+
currentId = null;
|
|
596
|
+
/**
|
|
597
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
598
|
+
*/
|
|
599
|
+
start(t, n) {
|
|
600
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
601
|
+
this.currentId = null, n();
|
|
602
|
+
}, t);
|
|
603
|
+
}
|
|
604
|
+
clear = () => {
|
|
605
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
606
|
+
};
|
|
607
|
+
disposeEffect = () => this.clear;
|
|
608
|
+
}
|
|
609
|
+
function dt() {
|
|
610
|
+
const e = Ue(V.create).current;
|
|
611
|
+
return qe(e.disposeEffect), e;
|
|
612
|
+
}
|
|
613
|
+
export {
|
|
614
|
+
lt as T,
|
|
615
|
+
at as _,
|
|
616
|
+
et as a,
|
|
617
|
+
it as b,
|
|
618
|
+
me as c,
|
|
619
|
+
ut as d,
|
|
620
|
+
Ee as e,
|
|
621
|
+
We as f,
|
|
622
|
+
F as g,
|
|
623
|
+
st as h,
|
|
624
|
+
Ue as i,
|
|
625
|
+
ft as j,
|
|
626
|
+
dt as k,
|
|
627
|
+
ot as l,
|
|
628
|
+
nt as m,
|
|
629
|
+
ct as n,
|
|
630
|
+
Oe as o,
|
|
631
|
+
Le as p,
|
|
632
|
+
Me as r,
|
|
633
|
+
tt as s,
|
|
634
|
+
rt as u
|
|
635
|
+
};
|