@hai-dev/ui-kit 1.1.12 → 1.2.1

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.
Files changed (56) hide show
  1. package/dist/{Box-TrgOqpYk.js → Box-BgNAyP2L.js} +2 -2
  2. package/dist/{Button-BN3fv8kr.js → Button-DTV8ztWw.js} +5 -5
  3. package/dist/{ButtonBase-CSWuFxUv.js → ButtonBase-C4krg_zd.js} +3 -3
  4. package/dist/{CircularProgress-sPARyPfh.js → CircularProgress-BoaEg4rF.js} +3 -3
  5. package/dist/{Dialog-Cf0d7zi7.js → Dialog-BK9lMUKV.js} +12 -11
  6. package/dist/{DialogTitle-BtvmXSZP.js → DialogTitle-ByUfLB5M.js} +4 -4
  7. package/dist/{Typography-Bjd6ZHeX.js → Typography-BMyz0ZCh.js} +4 -4
  8. package/dist/assets/button.css +1 -1
  9. package/dist/assets/circular-progress-loader.css +1 -1
  10. package/dist/assets/code-input.css +1 -1
  11. package/dist/assets/error-upload-dialog.css +1 -1
  12. package/dist/assets/inter.css +1 -0
  13. package/dist/assets/photo-list.css +1 -1
  14. package/dist/assets/upload-dialog-errors.css +1 -1
  15. package/dist/button.module-C0UNQnBk.js +40 -0
  16. package/dist/chainPropTypes-DgqFdXGi.js +532 -0
  17. package/dist/components/button/button-content.js +11 -11
  18. package/dist/components/button/button.d.ts +18 -0
  19. package/dist/components/button/button.js +42 -35
  20. package/dist/components/button/constants.d.ts +17 -0
  21. package/dist/components/button/constants.js +28 -11
  22. package/dist/components/button/types.d.ts +11 -8
  23. package/dist/components/button/utils/get-button-classnames.d.ts +6 -0
  24. package/dist/components/button/utils/get-button-classnames.js +22 -10
  25. package/dist/components/circular-progress-loader/circular-progress-loader.js +14 -13
  26. package/dist/components/code-input/code-input.js +114 -112
  27. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +39 -38
  28. package/dist/components/photo-crop-uploader/components/photo-list/constants.d.ts +5 -1
  29. package/dist/components/photo-crop-uploader/components/photo-list/constants.js +6 -2
  30. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +136 -33
  31. package/dist/components/photo-crop-uploader/components/photo-list/types.d.ts +2 -0
  32. package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.d.ts +4 -0
  33. package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.js +22 -0
  34. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
  35. package/dist/components/photo-crop-uploader/components/upload-dialog/constants.d.ts +1 -1
  36. package/dist/components/photo-crop-uploader/components/upload-dialog/constants.js +1 -1
  37. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -3
  38. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +156 -145
  39. package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.d.ts +4 -0
  40. package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.js +31 -0
  41. package/dist/components/photo-crop-uploader/locale.js +6 -2
  42. package/dist/{createTheme-D8R2Cz2N.js → createTheme-BoOmbNvy.js} +426 -390
  43. package/dist/{extendSxProp-Cw_ym9sl.js → extendSxProp-BaUCVMKV.js} +2 -1
  44. package/dist/{index-CL3JU48X.js → index-h5oTv8GF.js} +3 -3
  45. package/dist/{memoTheme-D5VCpQCz.js → memoTheme-BYBJ2Fe6.js} +1 -1
  46. package/dist/refType-CsohaiiT.js +60 -0
  47. package/dist/{upload-dialog-errors-DHl0bh1n.js → upload-dialog-errors-BwQsTOc3.js} +46 -46
  48. package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
  49. package/dist/utils/debounce.d.ts +5 -0
  50. package/dist/utils/debounce.js +12 -0
  51. package/dist/utils/index.d.ts +1 -0
  52. package/dist/utils/index.js +4 -0
  53. package/package.json +10 -2
  54. package/dist/button.module-BZPPmSAS.js +0 -21
  55. package/dist/chainPropTypes-DiJb1lGa.js +0 -568
  56. package/dist/refType-CUEs_vK5.js +0 -61
@@ -1,568 +0,0 @@
1
- import { m as ae, w as _e, f as be, u as B, n as Re, o as xe, E as $e, p as we, r as Z, k as M, q as Ae, s as ge, h as Ce, d as Q, i as Oe, b as Me, c as Ne, P as z, e as Fe, T as Ie } from "./createTheme-D8R2Cz2N.js";
2
- import * as I from "react";
3
- import "react/jsx-runtime";
4
- var V = { exports: {} }, l = {};
5
- var ee;
6
- function De() {
7
- if (ee) return l;
8
- ee = 1;
9
- var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, u = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, s = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, T = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, C = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, h = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, A = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, b = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
10
- function v(n) {
11
- if (typeof n == "object" && n !== null) {
12
- var y = n.$$typeof;
13
- switch (y) {
14
- case t:
15
- switch (n = n.type, n) {
16
- case m:
17
- case f:
18
- case r:
19
- case s:
20
- case u:
21
- case T:
22
- return n;
23
- default:
24
- switch (n = n && n.$$typeof, n) {
25
- case c:
26
- case p:
27
- case h:
28
- case P:
29
- case a:
30
- return n;
31
- default:
32
- return y;
33
- }
34
- }
35
- case o:
36
- return y;
37
- }
38
- }
39
- }
40
- function S(n) {
41
- return v(n) === f;
42
- }
43
- return l.AsyncMode = m, l.ConcurrentMode = f, l.ContextConsumer = c, l.ContextProvider = a, l.Element = t, l.ForwardRef = p, l.Fragment = r, l.Lazy = h, l.Memo = P, l.Portal = o, l.Profiler = s, l.StrictMode = u, l.Suspense = T, l.isAsyncMode = function(n) {
44
- return S(n) || v(n) === m;
45
- }, l.isConcurrentMode = S, l.isContextConsumer = function(n) {
46
- return v(n) === c;
47
- }, l.isContextProvider = function(n) {
48
- return v(n) === a;
49
- }, l.isElement = function(n) {
50
- return typeof n == "object" && n !== null && n.$$typeof === t;
51
- }, l.isForwardRef = function(n) {
52
- return v(n) === p;
53
- }, l.isFragment = function(n) {
54
- return v(n) === r;
55
- }, l.isLazy = function(n) {
56
- return v(n) === h;
57
- }, l.isMemo = function(n) {
58
- return v(n) === P;
59
- }, l.isPortal = function(n) {
60
- return v(n) === o;
61
- }, l.isProfiler = function(n) {
62
- return v(n) === s;
63
- }, l.isStrictMode = function(n) {
64
- return v(n) === u;
65
- }, l.isSuspense = function(n) {
66
- return v(n) === T;
67
- }, l.isValidElementType = function(n) {
68
- return typeof n == "string" || typeof n == "function" || n === r || n === f || n === s || n === u || n === T || n === C || typeof n == "object" && n !== null && (n.$$typeof === h || n.$$typeof === P || n.$$typeof === a || n.$$typeof === c || n.$$typeof === p || n.$$typeof === A || n.$$typeof === g || n.$$typeof === b || n.$$typeof === _);
69
- }, l.typeOf = v, l;
70
- }
71
- var d = {};
72
- var te;
73
- function Le() {
74
- return te || (te = 1, process.env.NODE_ENV !== "production" && (function() {
75
- var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, u = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, s = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, m = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, T = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, C = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, h = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, A = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, b = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
76
- function v(i) {
77
- return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
78
- i === r || i === f || i === s || i === u || i === T || i === C || typeof i == "object" && i !== null && (i.$$typeof === h || i.$$typeof === P || i.$$typeof === a || i.$$typeof === c || i.$$typeof === p || i.$$typeof === A || i.$$typeof === g || i.$$typeof === b || i.$$typeof === _);
79
- }
80
- function S(i) {
81
- if (typeof i == "object" && i !== null) {
82
- var k = i.$$typeof;
83
- switch (k) {
84
- case t:
85
- var j = i.type;
86
- switch (j) {
87
- case m:
88
- case f:
89
- case r:
90
- case s:
91
- case u:
92
- case T:
93
- return j;
94
- default:
95
- var G = j && j.$$typeof;
96
- switch (G) {
97
- case c:
98
- case p:
99
- case h:
100
- case P:
101
- case a:
102
- return G;
103
- default:
104
- return k;
105
- }
106
- }
107
- case o:
108
- return k;
109
- }
110
- }
111
- }
112
- var n = m, y = f, E = c, w = a, $ = t, W = p, D = r, N = h, R = P, F = o, x = s, L = u, Y = T, J = !1;
113
- function fe(i) {
114
- return J || (J = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), K(i) || S(i) === m;
115
- }
116
- function K(i) {
117
- return S(i) === f;
118
- }
119
- function le(i) {
120
- return S(i) === c;
121
- }
122
- function de(i) {
123
- return S(i) === a;
124
- }
125
- function ye(i) {
126
- return typeof i == "object" && i !== null && i.$$typeof === t;
127
- }
128
- function me(i) {
129
- return S(i) === p;
130
- }
131
- function pe(i) {
132
- return S(i) === r;
133
- }
134
- function ve(i) {
135
- return S(i) === h;
136
- }
137
- function Se(i) {
138
- return S(i) === P;
139
- }
140
- function he(i) {
141
- return S(i) === o;
142
- }
143
- function Ee(i) {
144
- return S(i) === s;
145
- }
146
- function Pe(i) {
147
- return S(i) === u;
148
- }
149
- function Te(i) {
150
- return S(i) === T;
151
- }
152
- d.AsyncMode = n, d.ConcurrentMode = y, d.ContextConsumer = E, d.ContextProvider = w, d.Element = $, d.ForwardRef = W, d.Fragment = D, d.Lazy = N, d.Memo = R, d.Portal = F, d.Profiler = x, d.StrictMode = L, d.Suspense = Y, d.isAsyncMode = fe, d.isConcurrentMode = K, d.isContextConsumer = le, d.isContextProvider = de, d.isElement = ye, d.isForwardRef = me, d.isFragment = pe, d.isLazy = ve, d.isMemo = Se, d.isPortal = he, d.isProfiler = Ee, d.isStrictMode = Pe, d.isSuspense = Te, d.isValidElementType = v, d.typeOf = S;
153
- })()), d;
154
- }
155
- var re;
156
- function Ye() {
157
- return re || (re = 1, process.env.NODE_ENV === "production" ? V.exports = De() : V.exports = Le()), V.exports;
158
- }
159
- var H, ne;
160
- function je() {
161
- if (ne) return H;
162
- ne = 1;
163
- var e = Ye(), t = {
164
- childContextTypes: !0,
165
- contextType: !0,
166
- contextTypes: !0,
167
- defaultProps: !0,
168
- displayName: !0,
169
- getDefaultProps: !0,
170
- getDerivedStateFromError: !0,
171
- getDerivedStateFromProps: !0,
172
- mixins: !0,
173
- propTypes: !0,
174
- type: !0
175
- }, o = {
176
- name: !0,
177
- length: !0,
178
- prototype: !0,
179
- caller: !0,
180
- callee: !0,
181
- arguments: !0,
182
- arity: !0
183
- }, r = {
184
- $$typeof: !0,
185
- render: !0,
186
- defaultProps: !0,
187
- displayName: !0,
188
- propTypes: !0
189
- }, u = {
190
- $$typeof: !0,
191
- compare: !0,
192
- defaultProps: !0,
193
- displayName: !0,
194
- propTypes: !0,
195
- type: !0
196
- }, s = {};
197
- s[e.ForwardRef] = r, s[e.Memo] = u;
198
- function a(h) {
199
- return e.isMemo(h) ? u : s[h.$$typeof] || t;
200
- }
201
- var c = Object.defineProperty, m = Object.getOwnPropertyNames, f = Object.getOwnPropertySymbols, p = Object.getOwnPropertyDescriptor, T = Object.getPrototypeOf, C = Object.prototype;
202
- function P(h, _, A) {
203
- if (typeof _ != "string") {
204
- if (C) {
205
- var g = T(_);
206
- g && g !== C && P(h, g, A);
207
- }
208
- var b = m(_);
209
- f && (b = b.concat(f(_)));
210
- for (var v = a(h), S = a(_), n = 0; n < b.length; ++n) {
211
- var y = b[n];
212
- if (!o[y] && !(A && A[y]) && !(S && S[y]) && !(v && v[y])) {
213
- var E = p(_, y);
214
- try {
215
- c(h, y, E);
216
- } catch {
217
- }
218
- }
219
- }
220
- }
221
- return h;
222
- }
223
- return H = P, H;
224
- }
225
- je();
226
- var oe = function(t, o) {
227
- var r = arguments;
228
- if (o == null || !xe.call(o, "css"))
229
- return I.createElement.apply(void 0, r);
230
- var u = r.length, s = new Array(u);
231
- s[0] = $e, s[1] = we(t, o);
232
- for (var a = 2; a < u; a++)
233
- s[a] = r[a];
234
- return I.createElement.apply(null, s);
235
- };
236
- (function(e) {
237
- var t;
238
- t || (t = e.JSX || (e.JSX = {}));
239
- })(oe || (oe = {}));
240
- var st = /* @__PURE__ */ _e(function(e, t) {
241
- var o = e.styles, r = ae([o], void 0, I.useContext(be)), u = I.useRef();
242
- return B(function() {
243
- var s = t.key + "-global", a = new t.sheet.constructor({
244
- key: s,
245
- nonce: t.sheet.nonce,
246
- container: t.sheet.container,
247
- speedy: t.sheet.isSpeedy
248
- }), c = !1, m = document.querySelector('style[data-emotion="' + s + " " + r.name + '"]');
249
- return t.sheet.tags.length && (a.before = t.sheet.tags[0]), m !== null && (c = !0, m.setAttribute("data-emotion", s), a.hydrate([m])), u.current = [a, c], function() {
250
- a.flush();
251
- };
252
- }, [t]), B(function() {
253
- var s = u.current, a = s[0], c = s[1];
254
- if (c) {
255
- s[1] = !1;
256
- return;
257
- }
258
- if (r.next !== void 0 && Re(t, r.next, !0), a.tags.length) {
259
- var m = a.tags[a.tags.length - 1].nextElementSibling;
260
- a.before = m, a.flush();
261
- }
262
- t.insert("", r, a, !1);
263
- }, [t, r.name]), null;
264
- });
265
- function Ve() {
266
- for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++)
267
- t[o] = arguments[o];
268
- return ae(t);
269
- }
270
- function at() {
271
- var e = Ve.apply(void 0, arguments), t = "animation-" + e.name;
272
- return {
273
- name: t,
274
- styles: "@keyframes " + t + "{" + e.styles + "}",
275
- anim: 1,
276
- toString: function() {
277
- return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
278
- }
279
- };
280
- }
281
- function ie(e, t = "") {
282
- return e.displayName || e.name || t;
283
- }
284
- function se(e, t, o) {
285
- const r = ie(t);
286
- return e.displayName || (r !== "" ? `${o}(${r})` : o);
287
- }
288
- function qe(e) {
289
- if (e != null) {
290
- if (typeof e == "string")
291
- return e;
292
- if (typeof e == "function")
293
- return ie(e, "Component");
294
- if (typeof e == "object")
295
- switch (e.$$typeof) {
296
- case Z.ForwardRef:
297
- return se(e, e.render, "ForwardRef");
298
- case Z.Memo:
299
- return se(e, e.type, "memo");
300
- default:
301
- return;
302
- }
303
- }
304
- }
305
- function ze(e) {
306
- const {
307
- variants: t,
308
- ...o
309
- } = e, r = {
310
- variants: t,
311
- style: M(o),
312
- isProcessed: !0
313
- };
314
- return r.style === o || t && t.forEach((u) => {
315
- typeof u.style != "function" && (u.style = M(u.style));
316
- }), r;
317
- }
318
- const We = Ce();
319
- function U(e) {
320
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
321
- }
322
- function O(e, t) {
323
- return t && e && typeof e == "object" && e.styles && !e.styles.startsWith("@layer") && (e.styles = `@layer ${t}{${String(e.styles)}}`), e;
324
- }
325
- function ke(e) {
326
- return e ? (t, o) => o[e] : null;
327
- }
328
- function He(e, t, o) {
329
- e.theme = Ke(e.theme) ? o : e.theme[t] || e.theme;
330
- }
331
- function q(e, t, o) {
332
- const r = typeof t == "function" ? t(e) : t;
333
- if (Array.isArray(r))
334
- return r.flatMap((u) => q(e, u, o));
335
- if (Array.isArray(r?.variants)) {
336
- let u;
337
- if (r.isProcessed)
338
- u = o ? O(r.style, o) : r.style;
339
- else {
340
- const {
341
- variants: s,
342
- ...a
343
- } = r;
344
- u = o ? O(M(a), o) : a;
345
- }
346
- return ue(e, r.variants, [u], o);
347
- }
348
- return r?.isProcessed ? o ? O(M(r.style), o) : r.style : o ? O(M(r), o) : r;
349
- }
350
- function ue(e, t, o = [], r = void 0) {
351
- let u;
352
- e: for (let s = 0; s < t.length; s += 1) {
353
- const a = t[s];
354
- if (typeof a.props == "function") {
355
- if (u ??= {
356
- ...e,
357
- ...e.ownerState,
358
- ownerState: e.ownerState
359
- }, !a.props(u))
360
- continue;
361
- } else
362
- for (const c in a.props)
363
- if (e[c] !== a.props[c] && e.ownerState?.[c] !== a.props[c])
364
- continue e;
365
- typeof a.style == "function" ? (u ??= {
366
- ...e,
367
- ...e.ownerState,
368
- ownerState: e.ownerState
369
- }, o.push(r ? O(M(a.style(u)), r) : a.style(u))) : o.push(r ? O(M(a.style), r) : a.style);
370
- }
371
- return o;
372
- }
373
- function Ue(e = {}) {
374
- const {
375
- themeId: t,
376
- defaultTheme: o = We,
377
- rootShouldForwardProp: r = U,
378
- slotShouldForwardProp: u = U
379
- } = e;
380
- function s(c) {
381
- He(c, t, o);
382
- }
383
- return (c, m = {}) => {
384
- Ae(c, (y) => y.filter((E) => E !== Q));
385
- const {
386
- name: f,
387
- slot: p,
388
- skipVariantsResolver: T,
389
- skipSx: C,
390
- // TODO v6: remove `lowercaseFirstLetter()` in the next major release
391
- // For more details: https://github.com/mui/material-ui/pull/37908
392
- overridesResolver: P = ke(ce(p)),
393
- ...h
394
- } = m, _ = f && f.startsWith("Mui") || p ? "components" : "custom", A = T !== void 0 ? T : (
395
- // TODO v6: remove `Root` in the next major release
396
- // For more details: https://github.com/mui/material-ui/pull/37908
397
- p && p !== "Root" && p !== "root" || !1
398
- ), g = C || !1;
399
- let b = U;
400
- p === "Root" || p === "root" ? b = r : p ? b = u : Ge(c) && (b = void 0);
401
- const v = ge(c, {
402
- shouldForwardProp: b,
403
- label: Je(f, p),
404
- ...h
405
- }), S = (y) => {
406
- if (y.__emotion_real === y)
407
- return y;
408
- if (typeof y == "function")
409
- return function(w) {
410
- return q(w, y, w.theme.modularCssLayers ? _ : void 0);
411
- };
412
- if (Oe(y)) {
413
- const E = ze(y);
414
- return function($) {
415
- return E.variants ? q($, E, $.theme.modularCssLayers ? _ : void 0) : $.theme.modularCssLayers ? O(E.style, _) : E.style;
416
- };
417
- }
418
- return y;
419
- }, n = (...y) => {
420
- const E = [], w = y.map(S), $ = [];
421
- if (E.push(s), f && P && $.push(function(R) {
422
- const x = R.theme.components?.[f]?.styleOverrides;
423
- if (!x)
424
- return null;
425
- const L = {};
426
- for (const Y in x)
427
- L[Y] = q(R, x[Y], R.theme.modularCssLayers ? "theme" : void 0);
428
- return P(R, L);
429
- }), f && !A && $.push(function(R) {
430
- const x = R.theme?.components?.[f]?.variants;
431
- return x ? ue(R, x, [], R.theme.modularCssLayers ? "theme" : void 0) : null;
432
- }), g || $.push(Q), Array.isArray(w[0])) {
433
- const N = w.shift(), R = new Array(E.length).fill(""), F = new Array($.length).fill("");
434
- let x;
435
- x = [...R, ...N, ...F], x.raw = [...R, ...N.raw, ...F], E.unshift(x);
436
- }
437
- const W = [...E, ...w, ...$], D = v(...W);
438
- return c.muiName && (D.muiName = c.muiName), process.env.NODE_ENV !== "production" && (D.displayName = Xe(f, p, c)), D;
439
- };
440
- return v.withConfig && (n.withConfig = v.withConfig), n;
441
- };
442
- }
443
- function Xe(e, t, o) {
444
- return e ? `${e}${Me(t || "")}` : `Styled(${qe(o)})`;
445
- }
446
- function Je(e, t) {
447
- let o;
448
- return process.env.NODE_ENV !== "production" && e && (o = `${e}-${ce(t || "Root")}`), o;
449
- }
450
- function Ke(e) {
451
- for (const t in e)
452
- return !1;
453
- return !0;
454
- }
455
- function Ge(e) {
456
- return typeof e == "string" && // 96 is one less than the char code
457
- // for "a" so this is checking that
458
- // it's a lowercase character
459
- e.charCodeAt(0) > 96;
460
- }
461
- function ce(e) {
462
- return e && e.charAt(0).toLowerCase() + e.slice(1);
463
- }
464
- function X(e, t, o = !1) {
465
- const r = {
466
- ...t
467
- };
468
- for (const u in e)
469
- if (Object.prototype.hasOwnProperty.call(e, u)) {
470
- const s = u;
471
- if (s === "components" || s === "slots")
472
- r[s] = {
473
- ...e[s],
474
- ...r[s]
475
- };
476
- else if (s === "componentsProps" || s === "slotProps") {
477
- const a = e[s], c = t[s];
478
- if (!c)
479
- r[s] = a || {};
480
- else if (!a)
481
- r[s] = c;
482
- else {
483
- r[s] = {
484
- ...c
485
- };
486
- for (const m in a)
487
- if (Object.prototype.hasOwnProperty.call(a, m)) {
488
- const f = m;
489
- r[s][f] = X(a[f], c[f], o);
490
- }
491
- }
492
- } else s === "className" && o && t.className ? r.className = Ne(e?.className, t?.className) : s === "style" && o && t.style ? r.style = {
493
- ...e?.style,
494
- ...t?.style
495
- } : r[s] === void 0 && (r[s] = e[s]);
496
- }
497
- return r;
498
- }
499
- const Be = /* @__PURE__ */ I.createContext(void 0);
500
- process.env.NODE_ENV !== "production" && (z.node, z.object);
501
- function Ze(e) {
502
- const {
503
- theme: t,
504
- name: o,
505
- props: r
506
- } = e;
507
- if (!t || !t.components || !t.components[o])
508
- return r;
509
- const u = t.components[o];
510
- return u.defaultProps ? X(u.defaultProps, r, t.components.mergeClassNameAndStyle) : !u.styleOverrides && !u.variants ? X(u, r, t.components.mergeClassNameAndStyle) : r;
511
- }
512
- function Qe({
513
- props: e,
514
- name: t
515
- }) {
516
- const o = I.useContext(Be);
517
- return Ze({
518
- props: e,
519
- name: t,
520
- theme: {
521
- components: o
522
- }
523
- });
524
- }
525
- function it(e, t, o = void 0) {
526
- const r = {};
527
- for (const u in e) {
528
- const s = e[u];
529
- let a = "", c = !0;
530
- for (let m = 0; m < s.length; m += 1) {
531
- const f = s[m];
532
- f && (a += (c === !0 ? "" : " ") + t(f), c = !1, o && o[f] && (a += " " + o[f]));
533
- }
534
- r[u] = a;
535
- }
536
- return r;
537
- }
538
- const et = Fe();
539
- function tt(e) {
540
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
541
- }
542
- const rt = (e) => tt(e) && e !== "classes", ut = Ue({
543
- themeId: Ie,
544
- defaultTheme: et,
545
- rootShouldForwardProp: rt
546
- });
547
- process.env.NODE_ENV !== "production" && (z.node, z.object.isRequired);
548
- function ct(e) {
549
- return Qe(e);
550
- }
551
- function ft(e, t) {
552
- return process.env.NODE_ENV === "production" ? () => null : function(...r) {
553
- return e(...r) || t(...r);
554
- };
555
- }
556
- export {
557
- st as G,
558
- Ve as a,
559
- ft as b,
560
- it as c,
561
- et as d,
562
- X as e,
563
- at as k,
564
- ze as p,
565
- rt as r,
566
- ut as s,
567
- ct as u
568
- };
@@ -1,61 +0,0 @@
1
- import * as o from "react";
2
- import { P as i } from "./createTheme-D8R2Cz2N.js";
3
- import { b as l } from "./chainPropTypes-DiJb1lGa.js";
4
- const s = typeof window < "u" ? o.useLayoutEffect : o.useEffect;
5
- function R(t) {
6
- const e = o.useRef(t);
7
- return s(() => {
8
- e.current = t;
9
- }), o.useRef((...c) => (
10
- // @ts-expect-error hide `this`
11
- (0, e.current)(...c)
12
- )).current;
13
- }
14
- function E(...t) {
15
- const e = o.useRef(void 0), c = o.useCallback((r) => {
16
- const a = t.map((n) => {
17
- if (n == null)
18
- return null;
19
- if (typeof n == "function") {
20
- const f = n, u = f(r);
21
- return typeof u == "function" ? u : () => {
22
- f(null);
23
- };
24
- }
25
- return n.current = r, () => {
26
- n.current = null;
27
- };
28
- });
29
- return () => {
30
- a.forEach((n) => n?.());
31
- };
32
- }, t);
33
- return o.useMemo(() => t.every((r) => r == null) ? null : (r) => {
34
- e.current && (e.current(), e.current = void 0), r != null && (e.current = c(r));
35
- }, t);
36
- }
37
- function p(t) {
38
- const {
39
- prototype: e = {}
40
- } = t;
41
- return !!e.isReactComponent;
42
- }
43
- function d(t, e, c, r, a) {
44
- const n = t[e], f = a || e;
45
- if (n == null || // When server-side rendering React doesn't warn either.
46
- // This is not an accurate check for SSR.
47
- // This is only in place for emotion compat.
48
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
49
- typeof window > "u")
50
- return null;
51
- let u;
52
- return typeof n == "function" && !p(n) && (u = "Did you accidentally provide a plain function component instead?"), n === o.Fragment && (u = "Did you accidentally provide a React.Fragment instead?"), u !== void 0 ? new Error(`Invalid ${r} \`${f}\` supplied to \`${c}\`. Expected an element type that can hold a ref. ${u} For more information see https://v7.mui.com/r/caveat-with-refs-guide`) : null;
53
- }
54
- const h = l(i.elementType, d), w = i.oneOfType([i.func, i.object]);
55
- export {
56
- R as a,
57
- s as b,
58
- h as e,
59
- w as r,
60
- E as u
61
- };