@cgi-learning-hub/ui 0.0.1-dev.1708424596 → 0.0.1-dev.1708428145

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 (76) hide show
  1. package/dist/Button-8coRSZ3M.cjs +1 -0
  2. package/dist/Button-BJMp7Tz3.js +355 -0
  3. package/dist/ButtonBase-DfYGPVje.js +892 -0
  4. package/dist/ButtonBase-xIJbOm-V.cjs +75 -0
  5. package/dist/Input-DS9hzPC3.js +322 -0
  6. package/dist/Input-DWEaLJ-2.cjs +1 -0
  7. package/dist/InputBase-B31rEvBe.js +854 -0
  8. package/dist/InputBase-BuseI3Oe.cjs +4 -0
  9. package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
  10. package/dist/components/AnotherComponent/AnotherComponent.es.js +7 -6
  11. package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +1 -1
  12. package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -98
  13. package/dist/components/BasicButtons/BasicButtons.es.js +103 -1897
  14. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -0
  15. package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +12 -0
  16. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +47 -0
  17. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -0
  18. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +9 -0
  19. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +143 -0
  20. package/dist/components/buttons/DefaultButton/index.cjs.js +1 -0
  21. package/dist/components/buttons/DefaultButton/index.d.ts +2 -0
  22. package/dist/components/buttons/DefaultButton/index.es.js +4 -0
  23. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -0
  24. package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +5 -0
  25. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +11 -0
  26. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -0
  27. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +4 -0
  28. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +24 -0
  29. package/dist/components/buttons/PrimaryButton/index.cjs.js +1 -0
  30. package/dist/components/buttons/PrimaryButton/index.d.ts +2 -0
  31. package/dist/components/buttons/PrimaryButton/index.es.js +4 -0
  32. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -0
  33. package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +5 -0
  34. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +11 -0
  35. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -0
  36. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +4 -0
  37. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +24 -0
  38. package/dist/components/buttons/SecondaryButton/index.cjs.js +1 -0
  39. package/dist/components/buttons/SecondaryButton/index.d.ts +2 -0
  40. package/dist/components/buttons/SecondaryButton/index.es.js +4 -0
  41. package/dist/components/buttons/index.cjs.js +1 -0
  42. package/dist/components/buttons/index.d.ts +3 -0
  43. package/dist/components/buttons/index.es.js +8 -0
  44. package/dist/components/index.cjs.js +1 -1
  45. package/dist/components/index.d.ts +3 -1
  46. package/dist/components/index.es.js +14 -4
  47. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -0
  48. package/dist/components/inputs/SearchInput/SearchInput.d.ts +5 -0
  49. package/dist/components/inputs/SearchInput/SearchInput.es.js +345 -0
  50. package/dist/components/inputs/SearchInput/index.cjs.js +1 -0
  51. package/dist/components/inputs/SearchInput/index.d.ts +2 -0
  52. package/dist/components/inputs/SearchInput/index.es.js +4 -0
  53. package/dist/components/inputs/TextInput/TextInput.cjs.js +14 -0
  54. package/dist/components/inputs/TextInput/TextInput.d.ts +5 -0
  55. package/dist/components/inputs/TextInput/TextInput.es.js +5577 -0
  56. package/dist/components/inputs/TextInput/index.cjs.js +1 -0
  57. package/dist/components/inputs/TextInput/index.d.ts +2 -0
  58. package/dist/components/inputs/TextInput/index.es.js +4 -0
  59. package/dist/components/inputs/index.cjs.js +1 -0
  60. package/dist/components/inputs/index.d.ts +2 -0
  61. package/dist/components/inputs/index.es.js +6 -0
  62. package/dist/createSvgIcon-BPyRt0N5.js +182 -0
  63. package/dist/createSvgIcon-Cz9hf1Fl.cjs +1 -0
  64. package/dist/extendSxProp-DzGZiKZk.js +29 -0
  65. package/dist/extendSxProp-LEI89AMt.cjs +1 -0
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.es.js +14 -4
  68. package/dist/useForkRef-C0Hk1SEc.js +44 -0
  69. package/dist/useForkRef-YQvz-OME.cjs +1 -0
  70. package/dist/useTheme-BzgwMQvX.cjs +1 -0
  71. package/dist/useTheme-D1_U7jx5.js +65 -0
  72. package/dist/useThemeProps-Aqe6oH65.cjs +65 -0
  73. package/dist/useThemeProps-Dkkbtzcg.js +2696 -0
  74. package/package.json +3 -1
  75. package/dist/useTheme-CEi3JABy.cjs +0 -42
  76. package/dist/useTheme-DVWKQU4F.js +0 -2235
@@ -1,668 +1,64 @@
1
- import { jsx as L, jsxs as we } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import oe, { Children as Nt, isValidElement as fe, cloneElement as pe } from "react";
4
- import { P as o, _ as b, g as ye, a as K, d as Vt, i as ct, c as lt, b as W, s as kt, e as Ft, h as qe, r as Ie, f as zt, j as Bt, m as wt, k as Xe, T as ut, l as dt, n as ce, u as Dt } from "../../useTheme-DVWKQU4F.js";
5
- import Lt from "@emotion/styled";
6
- import { keyframes as De } from "@emotion/react";
7
- function ft(e) {
8
- var t, n, r = "";
9
- if (typeof e == "string" || typeof e == "number")
10
- r += e;
11
- else if (typeof e == "object")
12
- if (Array.isArray(e)) {
13
- var i = e.length;
14
- for (t = 0; t < i; t++)
15
- e[t] && (n = ft(e[t])) && (r && (r += " "), r += n);
16
- } else
17
- for (n in e)
18
- e[n] && (r && (r += " "), r += n);
19
- return r;
20
- }
21
- function D() {
22
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++)
23
- (e = arguments[n]) && (t = ft(e)) && (r && (r += " "), r += t);
24
- return r;
25
- }
26
- function At(e, t) {
27
- return process.env.NODE_ENV === "production" ? () => null : function(...r) {
28
- return e(...r) || t(...r);
29
- };
30
- }
31
- function jt(e) {
32
- const {
33
- prototype: t = {}
34
- } = e;
35
- return !!t.isReactComponent;
36
- }
37
- function Ut(e, t, n, r, i) {
38
- const s = e[t], a = i || t;
39
- if (s == null || // When server-side rendering React doesn't warn either.
40
- // This is not an accurate check for SSR.
41
- // This is only in place for emotion compat.
42
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
43
- typeof window > "u")
44
- return null;
45
- let d;
46
- return typeof s == "function" && !jt(s) && (d = "Did you accidentally provide a plain function component instead?"), d !== void 0 ? new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${d} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
47
- }
48
- const Yt = At(o.elementType, Ut);
49
- var ke = { exports: {} }, x = {};
50
- /**
51
- * @license React
52
- * react-is.production.min.js
53
- *
54
- * Copyright (c) Facebook, Inc. and its affiliates.
55
- *
56
- * This source code is licensed under the MIT license found in the
57
- * LICENSE file in the root directory of this source tree.
58
- */
59
- var He;
60
- function Wt() {
61
- if (He)
62
- return x;
63
- He = 1;
64
- var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), d = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), S;
65
- S = Symbol.for("react.module.reference");
66
- function g(l) {
67
- if (typeof l == "object" && l !== null) {
68
- var P = l.$$typeof;
69
- switch (P) {
70
- case e:
71
- switch (l = l.type, l) {
72
- case n:
73
- case i:
74
- case r:
75
- case u:
76
- case m:
77
- return l;
78
- default:
79
- switch (l = l && l.$$typeof, l) {
80
- case d:
81
- case a:
82
- case c:
83
- case E:
84
- case T:
85
- case s:
86
- return l;
87
- default:
88
- return P;
89
- }
90
- }
91
- case t:
92
- return P;
93
- }
94
- }
95
- }
96
- return x.ContextConsumer = a, x.ContextProvider = s, x.Element = e, x.ForwardRef = c, x.Fragment = n, x.Lazy = E, x.Memo = T, x.Portal = t, x.Profiler = i, x.StrictMode = r, x.Suspense = u, x.SuspenseList = m, x.isAsyncMode = function() {
97
- return !1;
98
- }, x.isConcurrentMode = function() {
99
- return !1;
100
- }, x.isContextConsumer = function(l) {
101
- return g(l) === a;
102
- }, x.isContextProvider = function(l) {
103
- return g(l) === s;
104
- }, x.isElement = function(l) {
105
- return typeof l == "object" && l !== null && l.$$typeof === e;
106
- }, x.isForwardRef = function(l) {
107
- return g(l) === c;
108
- }, x.isFragment = function(l) {
109
- return g(l) === n;
110
- }, x.isLazy = function(l) {
111
- return g(l) === E;
112
- }, x.isMemo = function(l) {
113
- return g(l) === T;
114
- }, x.isPortal = function(l) {
115
- return g(l) === t;
116
- }, x.isProfiler = function(l) {
117
- return g(l) === i;
118
- }, x.isStrictMode = function(l) {
119
- return g(l) === r;
120
- }, x.isSuspense = function(l) {
121
- return g(l) === u;
122
- }, x.isSuspenseList = function(l) {
123
- return g(l) === m;
124
- }, x.isValidElementType = function(l) {
125
- return typeof l == "string" || typeof l == "function" || l === n || l === i || l === r || l === u || l === m || l === M || typeof l == "object" && l !== null && (l.$$typeof === E || l.$$typeof === T || l.$$typeof === s || l.$$typeof === a || l.$$typeof === c || l.$$typeof === S || l.getModuleId !== void 0);
126
- }, x.typeOf = g, x;
127
- }
128
- var R = {};
129
- /**
130
- * @license React
131
- * react-is.development.js
132
- *
133
- * Copyright (c) Facebook, Inc. and its affiliates.
134
- *
135
- * This source code is licensed under the MIT license found in the
136
- * LICENSE file in the root directory of this source tree.
137
- */
138
- var Ze;
139
- function Gt() {
140
- return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
141
- var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), d = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), S = !1, g = !1, l = !1, P = !1, V = !1, N;
142
- N = Symbol.for("react.module.reference");
143
- function v(f) {
144
- return !!(typeof f == "string" || typeof f == "function" || f === n || f === i || V || f === r || f === u || f === m || P || f === M || S || g || l || typeof f == "object" && f !== null && (f.$$typeof === E || f.$$typeof === T || f.$$typeof === s || f.$$typeof === a || f.$$typeof === c || // This needs to include all possible module reference object
145
- // types supported by any Flight configuration anywhere since
146
- // we don't know which Flight build this will end up being used
147
- // with.
148
- f.$$typeof === N || f.getModuleId !== void 0));
149
- }
150
- function h(f) {
151
- if (typeof f == "object" && f !== null) {
152
- var te = f.$$typeof;
153
- switch (te) {
154
- case e:
155
- var J = f.type;
156
- switch (J) {
157
- case n:
158
- case i:
159
- case r:
160
- case u:
161
- case m:
162
- return J;
163
- default:
164
- var se = J && J.$$typeof;
165
- switch (se) {
166
- case d:
167
- case a:
168
- case c:
169
- case E:
170
- case T:
171
- case s:
172
- return se;
173
- default:
174
- return te;
175
- }
176
- }
177
- case t:
178
- return te;
179
- }
180
- }
181
- }
182
- var C = a, O = s, k = e, A = c, I = n, $ = E, _ = T, F = t, z = i, U = r, w = u, X = m, B = !1, re = !1;
183
- function ie(f) {
184
- return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
185
- }
186
- function xe(f) {
187
- return re || (re = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
188
- }
189
- function Re(f) {
190
- return h(f) === a;
191
- }
192
- function Te(f) {
193
- return h(f) === s;
194
- }
195
- function G(f) {
196
- return typeof f == "object" && f !== null && f.$$typeof === e;
197
- }
198
- function Z(f) {
199
- return h(f) === c;
200
- }
201
- function Q(f) {
202
- return h(f) === n;
203
- }
204
- function Ce(f) {
205
- return h(f) === E;
206
- }
207
- function ee(f) {
208
- return h(f) === T;
209
- }
210
- function Y(f) {
211
- return h(f) === t;
212
- }
213
- function Se(f) {
214
- return h(f) === i;
215
- }
216
- function $e(f) {
217
- return h(f) === r;
218
- }
219
- function _e(f) {
220
- return h(f) === u;
221
- }
222
- function Pe(f) {
223
- return h(f) === m;
224
- }
225
- R.ContextConsumer = C, R.ContextProvider = O, R.Element = k, R.ForwardRef = A, R.Fragment = I, R.Lazy = $, R.Memo = _, R.Portal = F, R.Profiler = z, R.StrictMode = U, R.Suspense = w, R.SuspenseList = X, R.isAsyncMode = ie, R.isConcurrentMode = xe, R.isContextConsumer = Re, R.isContextProvider = Te, R.isElement = G, R.isForwardRef = Z, R.isFragment = Q, R.isLazy = Ce, R.isMemo = ee, R.isPortal = Y, R.isProfiler = Se, R.isStrictMode = $e, R.isSuspense = _e, R.isSuspenseList = Pe, R.isValidElementType = v, R.typeOf = h;
226
- }()), R;
227
- }
228
- process.env.NODE_ENV === "production" ? ke.exports = Wt() : ke.exports = Gt();
229
- var Je = ke.exports;
230
- const Kt = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
231
- function qt(e) {
232
- const t = `${e}`.match(Kt);
233
- return t && t[1] || "";
234
- }
235
- function pt(e, t = "") {
236
- return e.displayName || e.name || qt(e) || t;
237
- }
238
- function Qe(e, t, n) {
239
- const r = pt(t);
240
- return e.displayName || (r !== "" ? `${n}(${r})` : n);
241
- }
242
- function Xt(e) {
243
- if (e != null) {
244
- if (typeof e == "string")
245
- return e;
246
- if (typeof e == "function")
247
- return pt(e, "Component");
248
- if (typeof e == "object")
249
- switch (e.$$typeof) {
250
- case Je.ForwardRef:
251
- return Qe(e, e.render, "ForwardRef");
252
- case Je.Memo:
253
- return Qe(e, e.type, "memo");
254
- default:
255
- return;
256
- }
257
- }
258
- }
259
- const Ht = o.oneOfType([o.func, o.object]), Zt = Ht;
260
- function Jt(e, t) {
261
- typeof e == "function" ? e(t) : e && (e.current = t);
262
- }
263
- const Qt = typeof window < "u" ? p.useLayoutEffect : p.useEffect;
264
- function le(e) {
265
- const t = p.useRef(e);
266
- return Qt(() => {
267
- t.current = e;
268
- }), p.useRef((...n) => (
269
- // @ts-expect-error hide `this`
270
- (0, t.current)(...n)
271
- )).current;
272
- }
273
- function et(...e) {
274
- return p.useMemo(() => e.every((t) => t == null) ? null : (t) => {
275
- e.forEach((n) => {
276
- Jt(n, t);
277
- });
278
- }, e);
279
- }
280
- const tt = {};
281
- function en(e, t) {
282
- const n = p.useRef(tt);
283
- return n.current === tt && (n.current = e(t)), n;
284
- }
285
- const tn = [];
286
- function nn(e) {
287
- p.useEffect(e, tn);
288
- }
289
- class be {
290
- constructor() {
291
- this.currentId = 0, this.clear = () => {
292
- this.currentId !== 0 && (clearTimeout(this.currentId), this.currentId = 0);
293
- }, this.disposeEffect = () => this.clear;
294
- }
295
- static create() {
296
- return new be();
297
- }
298
- /**
299
- * Executes `fn` after `delay`, clearing any previously scheduled call.
300
- */
301
- start(t, n) {
302
- this.clear(), this.currentId = setTimeout(() => {
303
- this.currentId = 0, n();
304
- }, t);
305
- }
306
- }
307
- function on() {
308
- const e = en(be.create).current;
309
- return nn(e.disposeEffect), e;
310
- }
311
- let ve = !0, Fe = !1;
312
- const rn = new be(), sn = {
313
- text: !0,
314
- search: !0,
315
- url: !0,
316
- tel: !0,
317
- email: !0,
318
- password: !0,
319
- number: !0,
320
- date: !0,
321
- month: !0,
322
- week: !0,
323
- time: !0,
324
- datetime: !0,
325
- "datetime-local": !0
326
- };
327
- function an(e) {
328
- const {
329
- type: t,
330
- tagName: n
331
- } = e;
332
- return !!(n === "INPUT" && sn[t] && !e.readOnly || n === "TEXTAREA" && !e.readOnly || e.isContentEditable);
333
- }
334
- function cn(e) {
335
- e.metaKey || e.altKey || e.ctrlKey || (ve = !0);
336
- }
337
- function Ne() {
338
- ve = !1;
339
- }
340
- function ln() {
341
- this.visibilityState === "hidden" && Fe && (ve = !0);
342
- }
343
- function un(e) {
344
- e.addEventListener("keydown", cn, !0), e.addEventListener("mousedown", Ne, !0), e.addEventListener("pointerdown", Ne, !0), e.addEventListener("touchstart", Ne, !0), e.addEventListener("visibilitychange", ln, !0);
345
- }
346
- function dn(e) {
347
- const {
348
- target: t
349
- } = e;
350
- try {
351
- return t.matches(":focus-visible");
352
- } catch {
353
- }
354
- return ve || an(t);
355
- }
356
- function fn() {
357
- const e = p.useCallback((i) => {
358
- i != null && un(i.ownerDocument);
359
- }, []), t = p.useRef(!1);
360
- function n() {
361
- return t.current ? (Fe = !0, rn.start(100, () => {
362
- Fe = !1;
363
- }), t.current = !1, !0) : !1;
364
- }
365
- function r(i) {
366
- return dn(i) ? (t.current = !0, !0) : !1;
367
- }
368
- return {
369
- isFocusVisibleRef: t,
370
- onFocus: r,
371
- onBlur: n,
372
- ref: e
373
- };
374
- }
375
- function Le(e, t) {
376
- const n = b({}, t);
377
- return Object.keys(e).forEach((r) => {
378
- if (r.toString().match(/^(components|slots)$/))
379
- n[r] = b({}, e[r], n[r]);
380
- else if (r.toString().match(/^(componentsProps|slotProps)$/)) {
381
- const i = e[r] || {}, s = t[r];
382
- n[r] = {}, !s || !Object.keys(s) ? n[r] = i : !i || !Object.keys(i) ? n[r] = s : (n[r] = b({}, s), Object.keys(i).forEach((a) => {
383
- n[r][a] = Le(i[a], s[a]);
384
- }));
385
- } else
386
- n[r] === void 0 && (n[r] = e[r]);
387
- }), n;
388
- }
389
- function Ae(e, t, n = void 0) {
390
- const r = {};
391
- return Object.keys(e).forEach(
392
- // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
393
- // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
394
- (i) => {
395
- r[i] = e[i].reduce((s, a) => {
396
- if (a) {
397
- const d = t(a);
398
- d !== "" && s.push(d), n && n[a] && s.push(n[a]);
399
- }
400
- return s;
401
- }, []).join(" ");
402
- }
403
- ), r;
404
- }
405
- function je(e, t, n = "Mui") {
406
- const r = {};
407
- return t.forEach((i) => {
408
- r[i] = ye(e, i, n);
409
- }), r;
410
- }
411
- /**
412
- * @mui/styled-engine v5.15.9
413
- *
414
- * @license MIT
415
- * This source code is licensed under the MIT license found in the
416
- * LICENSE file in the root directory of this source tree.
417
- */
418
- function pn(e, t) {
419
- const n = Lt(e, t);
420
- return process.env.NODE_ENV !== "production" ? (...r) => {
421
- const i = typeof e == "string" ? `"${e}"` : "component";
422
- return r.length === 0 ? console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
423
- `)) : r.some((s) => s === void 0) && console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`), n(...r);
424
- } : n;
425
- }
426
- const mn = (e, t) => {
427
- Array.isArray(e.__emotion_styles) && (e.__emotion_styles = t(e.__emotion_styles));
428
- }, hn = ["sx"], yn = (e) => {
429
- var t, n;
430
- const r = {
431
- systemProps: {},
432
- otherProps: {}
433
- }, i = (t = e == null || (n = e.theme) == null ? void 0 : n.unstable_sxConfig) != null ? t : Vt;
434
- return Object.keys(e).forEach((s) => {
435
- i[s] ? r.systemProps[s] = e[s] : r.otherProps[s] = e[s];
436
- }), r;
437
- };
438
- function bn(e) {
439
- const {
440
- sx: t
441
- } = e, n = K(e, hn), {
442
- systemProps: r,
443
- otherProps: i
444
- } = yn(n);
445
- let s;
446
- return Array.isArray(t) ? s = [r, ...t] : typeof t == "function" ? s = (...a) => {
447
- const d = t(...a);
448
- return ct(d) ? b({}, r, d) : r;
449
- } : s = b({}, r, t), b({}, i, {
450
- sx: s
451
- });
452
- }
453
- const vn = ["ownerState"], gn = ["variants"], En = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
454
- function xn(e) {
455
- return Object.keys(e).length === 0;
456
- }
457
- function Rn(e) {
458
- return typeof e == "string" && // 96 is one less than the char code
459
- // for "a" so this is checking that
460
- // it's a lowercase character
461
- e.charCodeAt(0) > 96;
462
- }
463
- function me(e) {
464
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
465
- }
466
- const Tn = lt(), nt = (e) => e && e.charAt(0).toLowerCase() + e.slice(1);
467
- function ue({
468
- defaultTheme: e,
469
- theme: t,
470
- themeId: n
471
- }) {
472
- return xn(t) ? e : t[n] || t;
473
- }
474
- function Cn(e) {
475
- return e ? (t, n) => n[e] : null;
476
- }
477
- function he(e, t) {
478
- let {
479
- ownerState: n
480
- } = t, r = K(t, vn);
481
- const i = typeof e == "function" ? e(b({
482
- ownerState: n
483
- }, r)) : e;
484
- if (Array.isArray(i))
485
- return i.flatMap((s) => he(s, b({
486
- ownerState: n
487
- }, r)));
488
- if (i && typeof i == "object" && Array.isArray(i.variants)) {
489
- const {
490
- variants: s = []
491
- } = i;
492
- let d = K(i, gn);
493
- return s.forEach((c) => {
494
- let u = !0;
495
- typeof c.props == "function" ? u = c.props(b({
496
- ownerState: n
497
- }, r)) : Object.keys(c.props).forEach((m) => {
498
- (n == null ? void 0 : n[m]) !== c.props[m] && r[m] !== c.props[m] && (u = !1);
499
- }), u && (Array.isArray(d) || (d = [d]), d.push(typeof c.style == "function" ? c.style(b({
500
- ownerState: n
501
- }, r)) : c.style));
502
- }), d;
503
- }
504
- return i;
505
- }
506
- function mt(e = {}) {
507
- const {
508
- themeId: t,
509
- defaultTheme: n = Tn,
510
- rootShouldForwardProp: r = me,
511
- slotShouldForwardProp: i = me
512
- } = e, s = (a) => kt(b({}, a, {
513
- theme: ue(b({}, a, {
514
- defaultTheme: n,
515
- themeId: t
516
- }))
517
- }));
518
- return s.__mui_systemSx = !0, (a, d = {}) => {
519
- mn(a, (h) => h.filter((C) => !(C != null && C.__mui_systemSx)));
520
- const {
521
- name: c,
522
- slot: u,
523
- skipVariantsResolver: m,
524
- skipSx: T,
525
- // TODO v6: remove `lowercaseFirstLetter()` in the next major release
526
- // For more details: https://github.com/mui/material-ui/pull/37908
527
- overridesResolver: E = Cn(nt(u))
528
- } = d, M = K(d, En), S = m !== void 0 ? m : (
529
- // TODO v6: remove `Root` in the next major release
530
- // For more details: https://github.com/mui/material-ui/pull/37908
531
- u && u !== "Root" && u !== "root" || !1
532
- ), g = T || !1;
533
- let l;
534
- process.env.NODE_ENV !== "production" && c && (l = `${c}-${nt(u || "Root")}`);
535
- let P = me;
536
- u === "Root" || u === "root" ? P = r : u ? P = i : Rn(a) && (P = void 0);
537
- const V = pn(a, b({
538
- shouldForwardProp: P,
539
- label: l
540
- }, M)), N = (h) => typeof h == "function" && h.__emotion_real !== h || ct(h) ? (C) => he(h, b({}, C, {
541
- theme: ue({
542
- theme: C.theme,
543
- defaultTheme: n,
544
- themeId: t
545
- })
546
- })) : h, v = (h, ...C) => {
547
- let O = N(h);
548
- const k = C ? C.map(N) : [];
549
- c && E && k.push(($) => {
550
- const _ = ue(b({}, $, {
551
- defaultTheme: n,
552
- themeId: t
553
- }));
554
- if (!_.components || !_.components[c] || !_.components[c].styleOverrides)
555
- return null;
556
- const F = _.components[c].styleOverrides, z = {};
557
- return Object.entries(F).forEach(([U, w]) => {
558
- z[U] = he(w, b({}, $, {
559
- theme: _
560
- }));
561
- }), E($, z);
562
- }), c && !S && k.push(($) => {
563
- var _;
564
- const F = ue(b({}, $, {
565
- defaultTheme: n,
566
- themeId: t
567
- })), z = F == null || (_ = F.components) == null || (_ = _[c]) == null ? void 0 : _.variants;
568
- return he({
569
- variants: z
570
- }, b({}, $, {
571
- theme: F
572
- }));
573
- }), g || k.push(s);
574
- const A = k.length - C.length;
575
- if (Array.isArray(h) && A > 0) {
576
- const $ = new Array(A).fill("");
577
- O = [...h, ...$], O.raw = [...h.raw, ...$];
578
- }
579
- const I = V(O, ...k);
580
- if (process.env.NODE_ENV !== "production") {
581
- let $;
582
- c && ($ = `${c}${W(u || "")}`), $ === void 0 && ($ = `Styled(${Xt(a)})`), I.displayName = $;
583
- }
584
- return a.muiName && (I.muiName = a.muiName), I;
585
- };
586
- return V.withConfig && (v.withConfig = V.withConfig), v;
587
- };
588
- }
589
- const Sn = mt();
590
- function $n(e) {
591
- const {
592
- theme: t,
593
- name: n,
594
- props: r
595
- } = e;
596
- return !t || !t.components || !t.components[n] || !t.components[n].defaultProps ? r : Le(t.components[n].defaultProps, r);
597
- }
598
- function ht({
599
- props: e,
600
- name: t,
601
- defaultTheme: n,
602
- themeId: r
603
- }) {
604
- let i = Ft(n);
605
- return r && (i = i[r] || i), $n({
606
- theme: i,
607
- name: t,
608
- props: e
609
- });
610
- }
611
- const _n = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], Pn = lt(), Mn = Sn("div", {
1
+ import { jsx as l, jsxs as D } from "react/jsx-runtime";
2
+ import * as v from "react";
3
+ import { j as F, P as e, k as E, a as k, l as O, m as f, n as _, c as w, o as G, _ as M, h as $, p as U, e as A, b as L, q as T, s as j, u as q } from "../../useThemeProps-Dkkbtzcg.js";
4
+ import { u as I } from "../../useTheme-D1_U7jx5.js";
5
+ import { e as W } from "../../extendSxProp-DzGZiKZk.js";
6
+ import { B as y } from "../../Button-BJMp7Tz3.js";
7
+ const z = F(), H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], J = E(), K = z("div", {
612
8
  name: "MuiStack",
613
9
  slot: "Root",
614
- overridesResolver: (e, t) => t.root
10
+ overridesResolver: (o, r) => r.root
615
11
  });
616
- function On(e) {
617
- return ht({
618
- props: e,
12
+ function Q(o) {
13
+ return U({
14
+ props: o,
619
15
  name: "MuiStack",
620
- defaultTheme: Pn
16
+ defaultTheme: J
621
17
  });
622
18
  }
623
- function In(e, t) {
624
- const n = p.Children.toArray(e).filter(Boolean);
625
- return n.reduce((r, i, s) => (r.push(i), s < n.length - 1 && r.push(/* @__PURE__ */ p.cloneElement(t, {
626
- key: `separator-${s}`
627
- })), r), []);
19
+ function X(o, r) {
20
+ const c = v.Children.toArray(o).filter(Boolean);
21
+ return c.reduce((a, i, t) => (a.push(i), t < c.length - 1 && a.push(/* @__PURE__ */ v.cloneElement(r, {
22
+ key: `separator-${t}`
23
+ })), a), []);
628
24
  }
629
- const Nn = (e) => ({
25
+ const Y = (o) => ({
630
26
  row: "Left",
631
27
  "row-reverse": "Right",
632
28
  column: "Top",
633
29
  "column-reverse": "Bottom"
634
- })[e], Vn = ({
635
- ownerState: e,
636
- theme: t
30
+ })[o], Z = ({
31
+ ownerState: o,
32
+ theme: r
637
33
  }) => {
638
- let n = b({
34
+ let c = k({
639
35
  display: "flex",
640
36
  flexDirection: "column"
641
- }, qe({
642
- theme: t
643
- }, Ie({
644
- values: e.direction,
645
- breakpoints: t.breakpoints.values
646
- }), (r) => ({
647
- flexDirection: r
37
+ }, O({
38
+ theme: r
39
+ }, f({
40
+ values: o.direction,
41
+ breakpoints: r.breakpoints.values
42
+ }), (a) => ({
43
+ flexDirection: a
648
44
  })));
649
- if (e.spacing) {
650
- const r = zt(t), i = Object.keys(t.breakpoints.values).reduce((c, u) => ((typeof e.spacing == "object" && e.spacing[u] != null || typeof e.direction == "object" && e.direction[u] != null) && (c[u] = !0), c), {}), s = Ie({
651
- values: e.direction,
45
+ if (o.spacing) {
46
+ const a = _(r), i = Object.keys(r.breakpoints.values).reduce((n, s) => ((typeof o.spacing == "object" && o.spacing[s] != null || typeof o.direction == "object" && o.direction[s] != null) && (n[s] = !0), n), {}), t = f({
47
+ values: o.direction,
652
48
  base: i
653
- }), a = Ie({
654
- values: e.spacing,
49
+ }), u = f({
50
+ values: o.spacing,
655
51
  base: i
656
52
  });
657
- typeof s == "object" && Object.keys(s).forEach((c, u, m) => {
658
- if (!s[c]) {
659
- const E = u > 0 ? s[m[u - 1]] : "column";
660
- s[c] = E;
53
+ typeof t == "object" && Object.keys(t).forEach((n, s, p) => {
54
+ if (!t[n]) {
55
+ const m = s > 0 ? t[p[s - 1]] : "column";
56
+ t[n] = m;
661
57
  }
662
- }), n = Bt(n, qe({
663
- theme: t
664
- }, a, (c, u) => e.useFlexGap ? {
665
- gap: Xe(r, c)
58
+ }), c = w(c, O({
59
+ theme: r
60
+ }, u, (n, s) => o.useFlexGap ? {
61
+ gap: T(a, n)
666
62
  } : {
667
63
  // The useFlexGap={false} implement relies on each child to give up control of the margin.
668
64
  // We need to reset the margin to avoid double spacing.
@@ -670,1253 +66,63 @@ const Nn = (e) => ({
670
66
  margin: 0
671
67
  },
672
68
  "& > :not(style) ~ :not(style)": {
673
- [`margin${Nn(u ? s[u] : e.direction)}`]: Xe(r, c)
69
+ [`margin${Y(s ? t[s] : o.direction)}`]: T(a, n)
674
70
  }
675
71
  }));
676
72
  }
677
- return n = wt(t.breakpoints, n), n;
73
+ return c = G(r.breakpoints, c), c;
678
74
  };
679
- function kn(e = {}) {
75
+ function ee(o = {}) {
680
76
  const {
681
77
  // This will allow adding custom styled fn (for example for custom sx style function)
682
- createStyledComponent: t = Mn,
683
- useThemeProps: n = On,
684
- componentName: r = "MuiStack"
685
- } = e, i = () => Ae({
78
+ createStyledComponent: r = K,
79
+ useThemeProps: c = Q,
80
+ componentName: a = "MuiStack"
81
+ } = o, i = () => A({
686
82
  root: ["root"]
687
- }, (c) => ye(r, c), {}), s = t(Vn), a = /* @__PURE__ */ p.forwardRef(function(c, u) {
688
- const m = n(c), T = bn(m), {
689
- component: E = "div",
690
- direction: M = "column",
691
- spacing: S = 0,
692
- divider: g,
693
- children: l,
694
- className: P,
695
- useFlexGap: V = !1
696
- } = T, N = K(T, _n), v = {
697
- direction: M,
698
- spacing: S,
699
- useFlexGap: V
700
- }, h = i();
701
- return /* @__PURE__ */ L(s, b({
702
- as: E,
703
- ownerState: v,
704
- ref: u,
705
- className: D(h.root, P)
706
- }, N, {
707
- children: g ? In(l, g) : l
83
+ }, (n) => L(a, n), {}), t = r(Z), u = /* @__PURE__ */ v.forwardRef(function(n, s) {
84
+ const p = c(n), d = W(p), {
85
+ component: m = "div",
86
+ direction: C = "column",
87
+ spacing: P = 0,
88
+ divider: h,
89
+ children: b,
90
+ className: S,
91
+ useFlexGap: B = !1
92
+ } = d, V = M(d, H), N = {
93
+ direction: C,
94
+ spacing: P,
95
+ useFlexGap: B
96
+ }, R = i();
97
+ return /* @__PURE__ */ l(t, k({
98
+ as: m,
99
+ ownerState: N,
100
+ ref: s,
101
+ className: $(R.root, S)
102
+ }, V, {
103
+ children: h ? X(b, h) : b
708
104
  }));
709
105
  });
710
- return process.env.NODE_ENV !== "production" && (a.propTypes = {
711
- children: o.node,
712
- direction: o.oneOfType([o.oneOf(["column-reverse", "column", "row-reverse", "row"]), o.arrayOf(o.oneOf(["column-reverse", "column", "row-reverse", "row"])), o.object]),
713
- divider: o.node,
714
- spacing: o.oneOfType([o.arrayOf(o.oneOfType([o.number, o.string])), o.number, o.object, o.string]),
715
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
716
- }), a;
717
- }
718
- const yt = (e) => me(e) && e !== "classes", q = mt({
719
- themeId: ut,
720
- defaultTheme: dt,
721
- rootShouldForwardProp: yt
722
- });
723
- function ge({
724
- props: e,
725
- name: t
726
- }) {
727
- return ht({
728
- props: e,
729
- name: t,
730
- defaultTheme: dt,
731
- themeId: ut
732
- });
733
- }
734
- function ze(e, t) {
735
- return ze = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
736
- return r.__proto__ = i, r;
737
- }, ze(e, t);
738
- }
739
- function Fn(e, t) {
740
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ze(e, t);
741
- }
742
- const ot = oe.createContext(null);
743
- function zn(e) {
744
- if (e === void 0)
745
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
746
- return e;
747
- }
748
- function Ue(e, t) {
749
- var n = function(s) {
750
- return t && fe(s) ? t(s) : s;
751
- }, r = /* @__PURE__ */ Object.create(null);
752
- return e && Nt.map(e, function(i) {
753
- return i;
754
- }).forEach(function(i) {
755
- r[i.key] = n(i);
756
- }), r;
757
- }
758
- function Bn(e, t) {
759
- e = e || {}, t = t || {};
760
- function n(m) {
761
- return m in t ? t[m] : e[m];
762
- }
763
- var r = /* @__PURE__ */ Object.create(null), i = [];
764
- for (var s in e)
765
- s in t ? i.length && (r[s] = i, i = []) : i.push(s);
766
- var a, d = {};
767
- for (var c in t) {
768
- if (r[c])
769
- for (a = 0; a < r[c].length; a++) {
770
- var u = r[c][a];
771
- d[r[c][a]] = n(u);
772
- }
773
- d[c] = n(c);
774
- }
775
- for (a = 0; a < i.length; a++)
776
- d[i[a]] = n(i[a]);
777
- return d;
778
- }
779
- function H(e, t, n) {
780
- return n[t] != null ? n[t] : e.props[t];
781
- }
782
- function wn(e, t) {
783
- return Ue(e.children, function(n) {
784
- return pe(n, {
785
- onExited: t.bind(null, n),
786
- in: !0,
787
- appear: H(n, "appear", e),
788
- enter: H(n, "enter", e),
789
- exit: H(n, "exit", e)
790
- });
791
- });
792
- }
793
- function Dn(e, t, n) {
794
- var r = Ue(e.children), i = Bn(t, r);
795
- return Object.keys(i).forEach(function(s) {
796
- var a = i[s];
797
- if (fe(a)) {
798
- var d = s in t, c = s in r, u = t[s], m = fe(u) && !u.props.in;
799
- c && (!d || m) ? i[s] = pe(a, {
800
- onExited: n.bind(null, a),
801
- in: !0,
802
- exit: H(a, "exit", e),
803
- enter: H(a, "enter", e)
804
- }) : !c && d && !m ? i[s] = pe(a, {
805
- in: !1
806
- }) : c && d && fe(u) && (i[s] = pe(a, {
807
- onExited: n.bind(null, a),
808
- in: u.props.in,
809
- exit: H(a, "exit", e),
810
- enter: H(a, "enter", e)
811
- }));
812
- }
813
- }), i;
814
- }
815
- var Ln = Object.values || function(e) {
816
- return Object.keys(e).map(function(t) {
817
- return e[t];
818
- });
819
- }, An = {
820
- component: "div",
821
- childFactory: function(t) {
822
- return t;
823
- }
824
- }, Ye = /* @__PURE__ */ function(e) {
825
- Fn(t, e);
826
- function t(r, i) {
827
- var s;
828
- s = e.call(this, r, i) || this;
829
- var a = s.handleExited.bind(zn(s));
830
- return s.state = {
831
- contextValue: {
832
- isMounting: !0
833
- },
834
- handleExited: a,
835
- firstRender: !0
836
- }, s;
837
- }
838
- var n = t.prototype;
839
- return n.componentDidMount = function() {
840
- this.mounted = !0, this.setState({
841
- contextValue: {
842
- isMounting: !1
843
- }
844
- });
845
- }, n.componentWillUnmount = function() {
846
- this.mounted = !1;
847
- }, t.getDerivedStateFromProps = function(i, s) {
848
- var a = s.children, d = s.handleExited, c = s.firstRender;
849
- return {
850
- children: c ? wn(i, d) : Dn(i, a, d),
851
- firstRender: !1
852
- };
853
- }, n.handleExited = function(i, s) {
854
- var a = Ue(this.props.children);
855
- i.key in a || (i.props.onExited && i.props.onExited(s), this.mounted && this.setState(function(d) {
856
- var c = b({}, d.children);
857
- return delete c[i.key], {
858
- children: c
859
- };
860
- }));
861
- }, n.render = function() {
862
- var i = this.props, s = i.component, a = i.childFactory, d = K(i, ["component", "childFactory"]), c = this.state.contextValue, u = Ln(this.state.children).map(a);
863
- return delete d.appear, delete d.enter, delete d.exit, s === null ? /* @__PURE__ */ oe.createElement(ot.Provider, {
864
- value: c
865
- }, u) : /* @__PURE__ */ oe.createElement(ot.Provider, {
866
- value: c
867
- }, /* @__PURE__ */ oe.createElement(s, d, u));
868
- }, t;
869
- }(oe.Component);
870
- Ye.propTypes = process.env.NODE_ENV !== "production" ? {
871
- /**
872
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
873
- * behavior by providing a `component` prop.
874
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
875
- * you can pass in `component={null}`. This is useful if the wrapping div
876
- * borks your css styles.
877
- */
878
- component: o.any,
879
- /**
880
- * A set of `<Transition>` components, that are toggled `in` and out as they
881
- * leave. the `<TransitionGroup>` will inject specific transition props, so
882
- * remember to spread them through if you are wrapping the `<Transition>` as
883
- * with our `<Fade>` example.
884
- *
885
- * While this component is meant for multiple `Transition` or `CSSTransition`
886
- * children, sometimes you may want to have a single transition child with
887
- * content that you want to be transitioned out and in when you change it
888
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
889
- * the transition child as you change its content, this will cause
890
- * `TransitionGroup` to transition the child out and back in.
891
- */
892
- children: o.node,
893
- /**
894
- * A convenience prop that enables or disables appear animations
895
- * for all children. Note that specifying this will override any defaults set
896
- * on individual children Transitions.
897
- */
898
- appear: o.bool,
899
- /**
900
- * A convenience prop that enables or disables enter animations
901
- * for all children. Note that specifying this will override any defaults set
902
- * on individual children Transitions.
903
- */
904
- enter: o.bool,
905
- /**
906
- * A convenience prop that enables or disables exit animations
907
- * for all children. Note that specifying this will override any defaults set
908
- * on individual children Transitions.
909
- */
910
- exit: o.bool,
911
- /**
912
- * You may need to apply reactive updates to a child as it is exiting.
913
- * This is generally done by using `cloneElement` however in the case of an exiting
914
- * child the element has already been removed and not accessible to the consumer.
915
- *
916
- * If you do need to update a child as it leaves you can provide a `childFactory`
917
- * to wrap every child, even the ones that are leaving.
918
- *
919
- * @type Function(child: ReactElement) -> ReactElement
920
- */
921
- childFactory: o.func
922
- } : {};
923
- Ye.defaultProps = An;
924
- const jn = Ye;
925
- function bt(e) {
926
- const {
927
- className: t,
928
- classes: n,
929
- pulsate: r = !1,
930
- rippleX: i,
931
- rippleY: s,
932
- rippleSize: a,
933
- in: d,
934
- onExited: c,
935
- timeout: u
936
- } = e, [m, T] = p.useState(!1), E = D(t, n.ripple, n.rippleVisible, r && n.ripplePulsate), M = {
937
- width: a,
938
- height: a,
939
- top: -(a / 2) + s,
940
- left: -(a / 2) + i
941
- }, S = D(n.child, m && n.childLeaving, r && n.childPulsate);
942
- return !d && !m && T(!0), p.useEffect(() => {
943
- if (!d && c != null) {
944
- const g = setTimeout(c, u);
945
- return () => {
946
- clearTimeout(g);
947
- };
948
- }
949
- }, [c, d, u]), /* @__PURE__ */ L("span", {
950
- className: E,
951
- style: M,
952
- children: /* @__PURE__ */ L("span", {
953
- className: S
954
- })
955
- });
956
- }
957
- process.env.NODE_ENV !== "production" && (bt.propTypes = {
958
- /**
959
- * Override or extend the styles applied to the component.
960
- * See [CSS API](#css) below for more details.
961
- */
962
- classes: o.object.isRequired,
963
- className: o.string,
964
- /**
965
- * @ignore - injected from TransitionGroup
966
- */
967
- in: o.bool,
968
- /**
969
- * @ignore - injected from TransitionGroup
970
- */
971
- onExited: o.func,
972
- /**
973
- * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
974
- */
975
- pulsate: o.bool,
976
- /**
977
- * Diameter of the ripple.
978
- */
979
- rippleSize: o.number,
980
- /**
981
- * Horizontal position of the ripple center.
982
- */
983
- rippleX: o.number,
984
- /**
985
- * Vertical position of the ripple center.
986
- */
987
- rippleY: o.number,
988
- /**
989
- * exit delay
990
- */
991
- timeout: o.number.isRequired
992
- });
993
- const j = je("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), Un = ["center", "classes", "className"];
994
- let Ee = (e) => e, rt, it, st, at;
995
- const Be = 550, Yn = 80, Wn = De(rt || (rt = Ee`
996
- 0% {
997
- transform: scale(0);
998
- opacity: 0.1;
999
- }
1000
-
1001
- 100% {
1002
- transform: scale(1);
1003
- opacity: 0.3;
1004
- }
1005
- `)), Gn = De(it || (it = Ee`
1006
- 0% {
1007
- opacity: 1;
1008
- }
1009
-
1010
- 100% {
1011
- opacity: 0;
1012
- }
1013
- `)), Kn = De(st || (st = Ee`
1014
- 0% {
1015
- transform: scale(1);
1016
- }
1017
-
1018
- 50% {
1019
- transform: scale(0.92);
1020
- }
1021
-
1022
- 100% {
1023
- transform: scale(1);
1024
- }
1025
- `)), qn = q("span", {
1026
- name: "MuiTouchRipple",
1027
- slot: "Root"
1028
- })({
1029
- overflow: "hidden",
1030
- pointerEvents: "none",
1031
- position: "absolute",
1032
- zIndex: 0,
1033
- top: 0,
1034
- right: 0,
1035
- bottom: 0,
1036
- left: 0,
1037
- borderRadius: "inherit"
1038
- }), Xn = q(bt, {
1039
- name: "MuiTouchRipple",
1040
- slot: "Ripple"
1041
- })(at || (at = Ee`
1042
- opacity: 0;
1043
- position: absolute;
1044
-
1045
- &.${0} {
1046
- opacity: 0.3;
1047
- transform: scale(1);
1048
- animation-name: ${0};
1049
- animation-duration: ${0}ms;
1050
- animation-timing-function: ${0};
1051
- }
1052
-
1053
- &.${0} {
1054
- animation-duration: ${0}ms;
1055
- }
1056
-
1057
- & .${0} {
1058
- opacity: 1;
1059
- display: block;
1060
- width: 100%;
1061
- height: 100%;
1062
- border-radius: 50%;
1063
- background-color: currentColor;
1064
- }
1065
-
1066
- & .${0} {
1067
- opacity: 0;
1068
- animation-name: ${0};
1069
- animation-duration: ${0}ms;
1070
- animation-timing-function: ${0};
1071
- }
1072
-
1073
- & .${0} {
1074
- position: absolute;
1075
- /* @noflip */
1076
- left: 0px;
1077
- top: 0;
1078
- animation-name: ${0};
1079
- animation-duration: 2500ms;
1080
- animation-timing-function: ${0};
1081
- animation-iteration-count: infinite;
1082
- animation-delay: 200ms;
1083
- }
1084
- `), j.rippleVisible, Wn, Be, ({
1085
- theme: e
1086
- }) => e.transitions.easing.easeInOut, j.ripplePulsate, ({
1087
- theme: e
1088
- }) => e.transitions.duration.shorter, j.child, j.childLeaving, Gn, Be, ({
1089
- theme: e
1090
- }) => e.transitions.easing.easeInOut, j.childPulsate, Kn, ({
1091
- theme: e
1092
- }) => e.transitions.easing.easeInOut), vt = /* @__PURE__ */ p.forwardRef(function(t, n) {
1093
- const r = ge({
1094
- props: t,
1095
- name: "MuiTouchRipple"
1096
- }), {
1097
- center: i = !1,
1098
- classes: s = {},
1099
- className: a
1100
- } = r, d = K(r, Un), [c, u] = p.useState([]), m = p.useRef(0), T = p.useRef(null);
1101
- p.useEffect(() => {
1102
- T.current && (T.current(), T.current = null);
1103
- }, [c]);
1104
- const E = p.useRef(!1), M = on(), S = p.useRef(null), g = p.useRef(null), l = p.useCallback((v) => {
1105
- const {
1106
- pulsate: h,
1107
- rippleX: C,
1108
- rippleY: O,
1109
- rippleSize: k,
1110
- cb: A
1111
- } = v;
1112
- u((I) => [...I, /* @__PURE__ */ L(Xn, {
1113
- classes: {
1114
- ripple: D(s.ripple, j.ripple),
1115
- rippleVisible: D(s.rippleVisible, j.rippleVisible),
1116
- ripplePulsate: D(s.ripplePulsate, j.ripplePulsate),
1117
- child: D(s.child, j.child),
1118
- childLeaving: D(s.childLeaving, j.childLeaving),
1119
- childPulsate: D(s.childPulsate, j.childPulsate)
1120
- },
1121
- timeout: Be,
1122
- pulsate: h,
1123
- rippleX: C,
1124
- rippleY: O,
1125
- rippleSize: k
1126
- }, m.current)]), m.current += 1, T.current = A;
1127
- }, [s]), P = p.useCallback((v = {}, h = {}, C = () => {
1128
- }) => {
1129
- const {
1130
- pulsate: O = !1,
1131
- center: k = i || h.pulsate,
1132
- fakeElement: A = !1
1133
- // For test purposes
1134
- } = h;
1135
- if ((v == null ? void 0 : v.type) === "mousedown" && E.current) {
1136
- E.current = !1;
1137
- return;
1138
- }
1139
- (v == null ? void 0 : v.type) === "touchstart" && (E.current = !0);
1140
- const I = A ? null : g.current, $ = I ? I.getBoundingClientRect() : {
1141
- width: 0,
1142
- height: 0,
1143
- left: 0,
1144
- top: 0
1145
- };
1146
- let _, F, z;
1147
- if (k || v === void 0 || v.clientX === 0 && v.clientY === 0 || !v.clientX && !v.touches)
1148
- _ = Math.round($.width / 2), F = Math.round($.height / 2);
1149
- else {
1150
- const {
1151
- clientX: U,
1152
- clientY: w
1153
- } = v.touches && v.touches.length > 0 ? v.touches[0] : v;
1154
- _ = Math.round(U - $.left), F = Math.round(w - $.top);
1155
- }
1156
- if (k)
1157
- z = Math.sqrt((2 * $.width ** 2 + $.height ** 2) / 3), z % 2 === 0 && (z += 1);
1158
- else {
1159
- const U = Math.max(Math.abs((I ? I.clientWidth : 0) - _), _) * 2 + 2, w = Math.max(Math.abs((I ? I.clientHeight : 0) - F), F) * 2 + 2;
1160
- z = Math.sqrt(U ** 2 + w ** 2);
1161
- }
1162
- v != null && v.touches ? S.current === null && (S.current = () => {
1163
- l({
1164
- pulsate: O,
1165
- rippleX: _,
1166
- rippleY: F,
1167
- rippleSize: z,
1168
- cb: C
1169
- });
1170
- }, M.start(Yn, () => {
1171
- S.current && (S.current(), S.current = null);
1172
- })) : l({
1173
- pulsate: O,
1174
- rippleX: _,
1175
- rippleY: F,
1176
- rippleSize: z,
1177
- cb: C
1178
- });
1179
- }, [i, l, M]), V = p.useCallback(() => {
1180
- P({}, {
1181
- pulsate: !0
1182
- });
1183
- }, [P]), N = p.useCallback((v, h) => {
1184
- if (M.clear(), (v == null ? void 0 : v.type) === "touchend" && S.current) {
1185
- S.current(), S.current = null, M.start(0, () => {
1186
- N(v, h);
1187
- });
1188
- return;
1189
- }
1190
- S.current = null, u((C) => C.length > 0 ? C.slice(1) : C), T.current = h;
1191
- }, [M]);
1192
- return p.useImperativeHandle(n, () => ({
1193
- pulsate: V,
1194
- start: P,
1195
- stop: N
1196
- }), [V, P, N]), /* @__PURE__ */ L(qn, b({
1197
- className: D(j.root, s.root, a),
1198
- ref: g
1199
- }, d, {
1200
- children: /* @__PURE__ */ L(jn, {
1201
- component: null,
1202
- exit: !0,
1203
- children: c
1204
- })
1205
- }));
1206
- });
1207
- process.env.NODE_ENV !== "production" && (vt.propTypes = {
1208
- /**
1209
- * If `true`, the ripple starts at the center of the component
1210
- * rather than at the point of interaction.
1211
- */
1212
- center: o.bool,
1213
- /**
1214
- * Override or extend the styles applied to the component.
1215
- * See [CSS API](#css) below for more details.
1216
- */
1217
- classes: o.object,
1218
- /**
1219
- * @ignore
1220
- */
1221
- className: o.string
1222
- });
1223
- const Hn = vt;
1224
- function Zn(e) {
1225
- return ye("MuiButtonBase", e);
1226
- }
1227
- const Jn = je("MuiButtonBase", ["root", "disabled", "focusVisible"]), Qn = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"], eo = (e) => {
1228
- const {
1229
- disabled: t,
1230
- focusVisible: n,
1231
- focusVisibleClassName: r,
1232
- classes: i
1233
- } = e, a = Ae({
1234
- root: ["root", t && "disabled", n && "focusVisible"]
1235
- }, Zn, i);
1236
- return n && r && (a.root += ` ${r}`), a;
1237
- }, to = q("button", {
1238
- name: "MuiButtonBase",
1239
- slot: "Root",
1240
- overridesResolver: (e, t) => t.root
1241
- })({
1242
- display: "inline-flex",
1243
- alignItems: "center",
1244
- justifyContent: "center",
1245
- position: "relative",
1246
- boxSizing: "border-box",
1247
- WebkitTapHighlightColor: "transparent",
1248
- backgroundColor: "transparent",
1249
- // Reset default value
1250
- // We disable the focus ring for mouse, touch and keyboard users.
1251
- outline: 0,
1252
- border: 0,
1253
- margin: 0,
1254
- // Remove the margin in Safari
1255
- borderRadius: 0,
1256
- padding: 0,
1257
- // Remove the padding in Firefox
1258
- cursor: "pointer",
1259
- userSelect: "none",
1260
- verticalAlign: "middle",
1261
- MozAppearance: "none",
1262
- // Reset
1263
- WebkitAppearance: "none",
1264
- // Reset
1265
- textDecoration: "none",
1266
- // So we take precedent over the style of a native <a /> element.
1267
- color: "inherit",
1268
- "&::-moz-focus-inner": {
1269
- borderStyle: "none"
1270
- // Remove Firefox dotted outline.
1271
- },
1272
- [`&.${Jn.disabled}`]: {
1273
- pointerEvents: "none",
1274
- // Disable link interactions
1275
- cursor: "default"
1276
- },
1277
- "@media print": {
1278
- colorAdjust: "exact"
1279
- }
1280
- }), gt = /* @__PURE__ */ p.forwardRef(function(t, n) {
1281
- const r = ge({
1282
- props: t,
1283
- name: "MuiButtonBase"
1284
- }), {
1285
- action: i,
1286
- centerRipple: s = !1,
1287
- children: a,
1288
- className: d,
1289
- component: c = "button",
1290
- disabled: u = !1,
1291
- disableRipple: m = !1,
1292
- disableTouchRipple: T = !1,
1293
- focusRipple: E = !1,
1294
- LinkComponent: M = "a",
1295
- onBlur: S,
1296
- onClick: g,
1297
- onContextMenu: l,
1298
- onDragLeave: P,
1299
- onFocus: V,
1300
- onFocusVisible: N,
1301
- onKeyDown: v,
1302
- onKeyUp: h,
1303
- onMouseDown: C,
1304
- onMouseLeave: O,
1305
- onMouseUp: k,
1306
- onTouchEnd: A,
1307
- onTouchMove: I,
1308
- onTouchStart: $,
1309
- tabIndex: _ = 0,
1310
- TouchRippleProps: F,
1311
- touchRippleRef: z,
1312
- type: U
1313
- } = r, w = K(r, Qn), X = p.useRef(null), B = p.useRef(null), re = et(B, z), {
1314
- isFocusVisibleRef: ie,
1315
- onFocus: xe,
1316
- onBlur: Re,
1317
- ref: Te
1318
- } = fn(), [G, Z] = p.useState(!1);
1319
- u && G && Z(!1), p.useImperativeHandle(i, () => ({
1320
- focusVisible: () => {
1321
- Z(!0), X.current.focus();
1322
- }
1323
- }), []);
1324
- const [Q, Ce] = p.useState(!1);
1325
- p.useEffect(() => {
1326
- Ce(!0);
1327
- }, []);
1328
- const ee = Q && !m && !u;
1329
- p.useEffect(() => {
1330
- G && E && !m && Q && B.current.pulsate();
1331
- }, [m, E, G, Q]);
1332
- function Y(y, Ge, It = T) {
1333
- return le((Ke) => (Ge && Ge(Ke), !It && B.current && B.current[y](Ke), !0));
1334
- }
1335
- const Se = Y("start", C), $e = Y("stop", l), _e = Y("stop", P), Pe = Y("stop", k), f = Y("stop", (y) => {
1336
- G && y.preventDefault(), O && O(y);
1337
- }), te = Y("start", $), J = Y("stop", A), se = Y("stop", I), St = Y("stop", (y) => {
1338
- Re(y), ie.current === !1 && Z(!1), S && S(y);
1339
- }, !1), $t = le((y) => {
1340
- X.current || (X.current = y.currentTarget), xe(y), ie.current === !0 && (Z(!0), N && N(y)), V && V(y);
1341
- }), Me = () => {
1342
- const y = X.current;
1343
- return c && c !== "button" && !(y.tagName === "A" && y.href);
1344
- }, Oe = p.useRef(!1), _t = le((y) => {
1345
- E && !Oe.current && G && B.current && y.key === " " && (Oe.current = !0, B.current.stop(y, () => {
1346
- B.current.start(y);
1347
- })), y.target === y.currentTarget && Me() && y.key === " " && y.preventDefault(), v && v(y), y.target === y.currentTarget && Me() && y.key === "Enter" && !u && (y.preventDefault(), g && g(y));
1348
- }), Pt = le((y) => {
1349
- E && y.key === " " && B.current && G && !y.defaultPrevented && (Oe.current = !1, B.current.stop(y, () => {
1350
- B.current.pulsate(y);
1351
- })), h && h(y), g && y.target === y.currentTarget && Me() && y.key === " " && !y.defaultPrevented && g(y);
1352
- });
1353
- let ae = c;
1354
- ae === "button" && (w.href || w.to) && (ae = M);
1355
- const ne = {};
1356
- ae === "button" ? (ne.type = U === void 0 ? "button" : U, ne.disabled = u) : (!w.href && !w.to && (ne.role = "button"), u && (ne["aria-disabled"] = u));
1357
- const Mt = et(n, Te, X);
1358
- process.env.NODE_ENV !== "production" && p.useEffect(() => {
1359
- ee && !B.current && console.error(["MUI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join(`
1360
- `));
1361
- }, [ee]);
1362
- const We = b({}, r, {
1363
- centerRipple: s,
1364
- component: c,
1365
- disabled: u,
1366
- disableRipple: m,
1367
- disableTouchRipple: T,
1368
- focusRipple: E,
1369
- tabIndex: _,
1370
- focusVisible: G
1371
- }), Ot = eo(We);
1372
- return /* @__PURE__ */ we(to, b({
1373
- as: ae,
1374
- className: D(Ot.root, d),
1375
- ownerState: We,
1376
- onBlur: St,
1377
- onClick: g,
1378
- onContextMenu: $e,
1379
- onFocus: $t,
1380
- onKeyDown: _t,
1381
- onKeyUp: Pt,
1382
- onMouseDown: Se,
1383
- onMouseLeave: f,
1384
- onMouseUp: Pe,
1385
- onDragLeave: _e,
1386
- onTouchEnd: J,
1387
- onTouchMove: se,
1388
- onTouchStart: te,
1389
- ref: Mt,
1390
- tabIndex: u ? -1 : _,
1391
- type: U
1392
- }, ne, w, {
1393
- children: [a, ee ? (
1394
- /* TouchRipple is only needed client-side, x2 boost on the server. */
1395
- /* @__PURE__ */ L(Hn, b({
1396
- ref: re,
1397
- center: s
1398
- }, F))
1399
- ) : null]
1400
- }));
1401
- });
1402
- process.env.NODE_ENV !== "production" && (gt.propTypes = {
1403
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1404
- // │ These PropTypes are generated from the TypeScript type definitions. │
1405
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1406
- // └─────────────────────────────────────────────────────────────────────┘
1407
- /**
1408
- * A ref for imperative actions.
1409
- * It currently only supports `focusVisible()` action.
1410
- */
1411
- action: Zt,
1412
- /**
1413
- * If `true`, the ripples are centered.
1414
- * They won't start at the cursor interaction position.
1415
- * @default false
1416
- */
1417
- centerRipple: o.bool,
1418
- /**
1419
- * The content of the component.
1420
- */
1421
- children: o.node,
1422
- /**
1423
- * Override or extend the styles applied to the component.
1424
- */
1425
- classes: o.object,
1426
- /**
1427
- * @ignore
1428
- */
1429
- className: o.string,
1430
- /**
1431
- * The component used for the root node.
1432
- * Either a string to use a HTML element or a component.
1433
- */
1434
- component: Yt,
1435
- /**
1436
- * If `true`, the component is disabled.
1437
- * @default false
1438
- */
1439
- disabled: o.bool,
1440
- /**
1441
- * If `true`, the ripple effect is disabled.
1442
- *
1443
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
1444
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
1445
- * @default false
1446
- */
1447
- disableRipple: o.bool,
1448
- /**
1449
- * If `true`, the touch ripple effect is disabled.
1450
- * @default false
1451
- */
1452
- disableTouchRipple: o.bool,
1453
- /**
1454
- * If `true`, the base button will have a keyboard focus ripple.
1455
- * @default false
1456
- */
1457
- focusRipple: o.bool,
1458
- /**
1459
- * This prop can help identify which element has keyboard focus.
1460
- * The class name will be applied when the element gains the focus through keyboard interaction.
1461
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
1462
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
1463
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
1464
- * if needed.
1465
- */
1466
- focusVisibleClassName: o.string,
1467
- /**
1468
- * @ignore
1469
- */
1470
- href: o.any,
1471
- /**
1472
- * The component used to render a link when the `href` prop is provided.
1473
- * @default 'a'
1474
- */
1475
- LinkComponent: o.elementType,
1476
- /**
1477
- * @ignore
1478
- */
1479
- onBlur: o.func,
1480
- /**
1481
- * @ignore
1482
- */
1483
- onClick: o.func,
1484
- /**
1485
- * @ignore
1486
- */
1487
- onContextMenu: o.func,
1488
- /**
1489
- * @ignore
1490
- */
1491
- onDragLeave: o.func,
1492
- /**
1493
- * @ignore
1494
- */
1495
- onFocus: o.func,
1496
- /**
1497
- * Callback fired when the component is focused with a keyboard.
1498
- * We trigger a `onFocus` callback too.
1499
- */
1500
- onFocusVisible: o.func,
1501
- /**
1502
- * @ignore
1503
- */
1504
- onKeyDown: o.func,
1505
- /**
1506
- * @ignore
1507
- */
1508
- onKeyUp: o.func,
1509
- /**
1510
- * @ignore
1511
- */
1512
- onMouseDown: o.func,
1513
- /**
1514
- * @ignore
1515
- */
1516
- onMouseLeave: o.func,
1517
- /**
1518
- * @ignore
1519
- */
1520
- onMouseUp: o.func,
1521
- /**
1522
- * @ignore
1523
- */
1524
- onTouchEnd: o.func,
1525
- /**
1526
- * @ignore
1527
- */
1528
- onTouchMove: o.func,
1529
- /**
1530
- * @ignore
1531
- */
1532
- onTouchStart: o.func,
1533
- /**
1534
- * The system prop that allows defining system overrides as well as additional CSS styles.
1535
- */
1536
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
1537
- /**
1538
- * @default 0
1539
- */
1540
- tabIndex: o.number,
1541
- /**
1542
- * Props applied to the `TouchRipple` element.
1543
- */
1544
- TouchRippleProps: o.object,
1545
- /**
1546
- * A ref that points to the `TouchRipple` element.
1547
- */
1548
- touchRippleRef: o.oneOfType([o.func, o.shape({
1549
- current: o.shape({
1550
- pulsate: o.func.isRequired,
1551
- start: o.func.isRequired,
1552
- stop: o.func.isRequired
1553
- })
1554
- })]),
1555
- /**
1556
- * @ignore
1557
- */
1558
- type: o.oneOfType([o.oneOf(["button", "reset", "submit"]), o.string])
1559
- });
1560
- const no = gt;
1561
- function oo(e) {
1562
- return ye("MuiButton", e);
1563
- }
1564
- const ro = je("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), de = ro, Et = /* @__PURE__ */ p.createContext({});
1565
- process.env.NODE_ENV !== "production" && (Et.displayName = "ButtonGroupContext");
1566
- const io = Et, xt = /* @__PURE__ */ p.createContext(void 0);
1567
- process.env.NODE_ENV !== "production" && (xt.displayName = "ButtonGroupButtonContext");
1568
- const so = xt, ao = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], co = (e) => {
1569
- const {
1570
- color: t,
1571
- disableElevation: n,
1572
- fullWidth: r,
1573
- size: i,
1574
- variant: s,
1575
- classes: a
1576
- } = e, d = {
1577
- root: ["root", s, `${s}${W(t)}`, `size${W(i)}`, `${s}Size${W(i)}`, t === "inherit" && "colorInherit", n && "disableElevation", r && "fullWidth"],
1578
- label: ["label"],
1579
- startIcon: ["startIcon", `iconSize${W(i)}`],
1580
- endIcon: ["endIcon", `iconSize${W(i)}`]
1581
- }, c = Ae(d, oo, a);
1582
- return b({}, a, c);
1583
- }, Rt = (e) => b({}, e.size === "small" && {
1584
- "& > *:nth-of-type(1)": {
1585
- fontSize: 18
1586
- }
1587
- }, e.size === "medium" && {
1588
- "& > *:nth-of-type(1)": {
1589
- fontSize: 20
1590
- }
1591
- }, e.size === "large" && {
1592
- "& > *:nth-of-type(1)": {
1593
- fontSize: 22
1594
- }
1595
- }), lo = q(no, {
1596
- shouldForwardProp: (e) => yt(e) || e === "classes",
1597
- name: "MuiButton",
1598
- slot: "Root",
1599
- overridesResolver: (e, t) => {
1600
- const {
1601
- ownerState: n
1602
- } = e;
1603
- return [t.root, t[n.variant], t[`${n.variant}${W(n.color)}`], t[`size${W(n.size)}`], t[`${n.variant}Size${W(n.size)}`], n.color === "inherit" && t.colorInherit, n.disableElevation && t.disableElevation, n.fullWidth && t.fullWidth];
1604
- }
1605
- })(({
1606
- theme: e,
1607
- ownerState: t
1608
- }) => {
1609
- var n, r;
1610
- const i = e.palette.mode === "light" ? e.palette.grey[300] : e.palette.grey[800], s = e.palette.mode === "light" ? e.palette.grey.A100 : e.palette.grey[700];
1611
- return b({}, e.typography.button, {
1612
- minWidth: 64,
1613
- padding: "6px 16px",
1614
- borderRadius: (e.vars || e).shape.borderRadius,
1615
- transition: e.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
1616
- duration: e.transitions.duration.short
1617
- }),
1618
- "&:hover": b({
1619
- textDecoration: "none",
1620
- backgroundColor: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})` : ce(e.palette.text.primary, e.palette.action.hoverOpacity),
1621
- // Reset on touch devices, it doesn't add specificity
1622
- "@media (hover: none)": {
1623
- backgroundColor: "transparent"
1624
- }
1625
- }, t.variant === "text" && t.color !== "inherit" && {
1626
- backgroundColor: e.vars ? `rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : ce(e.palette[t.color].main, e.palette.action.hoverOpacity),
1627
- // Reset on touch devices, it doesn't add specificity
1628
- "@media (hover: none)": {
1629
- backgroundColor: "transparent"
1630
- }
1631
- }, t.variant === "outlined" && t.color !== "inherit" && {
1632
- border: `1px solid ${(e.vars || e).palette[t.color].main}`,
1633
- backgroundColor: e.vars ? `rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : ce(e.palette[t.color].main, e.palette.action.hoverOpacity),
1634
- // Reset on touch devices, it doesn't add specificity
1635
- "@media (hover: none)": {
1636
- backgroundColor: "transparent"
1637
- }
1638
- }, t.variant === "contained" && {
1639
- backgroundColor: e.vars ? e.vars.palette.Button.inheritContainedHoverBg : s,
1640
- boxShadow: (e.vars || e).shadows[4],
1641
- // Reset on touch devices, it doesn't add specificity
1642
- "@media (hover: none)": {
1643
- boxShadow: (e.vars || e).shadows[2],
1644
- backgroundColor: (e.vars || e).palette.grey[300]
1645
- }
1646
- }, t.variant === "contained" && t.color !== "inherit" && {
1647
- backgroundColor: (e.vars || e).palette[t.color].dark,
1648
- // Reset on touch devices, it doesn't add specificity
1649
- "@media (hover: none)": {
1650
- backgroundColor: (e.vars || e).palette[t.color].main
1651
- }
1652
- }),
1653
- "&:active": b({}, t.variant === "contained" && {
1654
- boxShadow: (e.vars || e).shadows[8]
1655
- }),
1656
- [`&.${de.focusVisible}`]: b({}, t.variant === "contained" && {
1657
- boxShadow: (e.vars || e).shadows[6]
1658
- }),
1659
- [`&.${de.disabled}`]: b({
1660
- color: (e.vars || e).palette.action.disabled
1661
- }, t.variant === "outlined" && {
1662
- border: `1px solid ${(e.vars || e).palette.action.disabledBackground}`
1663
- }, t.variant === "contained" && {
1664
- color: (e.vars || e).palette.action.disabled,
1665
- boxShadow: (e.vars || e).shadows[0],
1666
- backgroundColor: (e.vars || e).palette.action.disabledBackground
1667
- })
1668
- }, t.variant === "text" && {
1669
- padding: "6px 8px"
1670
- }, t.variant === "text" && t.color !== "inherit" && {
1671
- color: (e.vars || e).palette[t.color].main
1672
- }, t.variant === "outlined" && {
1673
- padding: "5px 15px",
1674
- border: "1px solid currentColor"
1675
- }, t.variant === "outlined" && t.color !== "inherit" && {
1676
- color: (e.vars || e).palette[t.color].main,
1677
- border: e.vars ? `1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)` : `1px solid ${ce(e.palette[t.color].main, 0.5)}`
1678
- }, t.variant === "contained" && {
1679
- color: e.vars ? (
1680
- // this is safe because grey does not change between default light/dark mode
1681
- e.vars.palette.text.primary
1682
- ) : (n = (r = e.palette).getContrastText) == null ? void 0 : n.call(r, e.palette.grey[300]),
1683
- backgroundColor: e.vars ? e.vars.palette.Button.inheritContainedBg : i,
1684
- boxShadow: (e.vars || e).shadows[2]
1685
- }, t.variant === "contained" && t.color !== "inherit" && {
1686
- color: (e.vars || e).palette[t.color].contrastText,
1687
- backgroundColor: (e.vars || e).palette[t.color].main
1688
- }, t.color === "inherit" && {
1689
- color: "inherit",
1690
- borderColor: "currentColor"
1691
- }, t.size === "small" && t.variant === "text" && {
1692
- padding: "4px 5px",
1693
- fontSize: e.typography.pxToRem(13)
1694
- }, t.size === "large" && t.variant === "text" && {
1695
- padding: "8px 11px",
1696
- fontSize: e.typography.pxToRem(15)
1697
- }, t.size === "small" && t.variant === "outlined" && {
1698
- padding: "3px 9px",
1699
- fontSize: e.typography.pxToRem(13)
1700
- }, t.size === "large" && t.variant === "outlined" && {
1701
- padding: "7px 21px",
1702
- fontSize: e.typography.pxToRem(15)
1703
- }, t.size === "small" && t.variant === "contained" && {
1704
- padding: "4px 10px",
1705
- fontSize: e.typography.pxToRem(13)
1706
- }, t.size === "large" && t.variant === "contained" && {
1707
- padding: "8px 22px",
1708
- fontSize: e.typography.pxToRem(15)
1709
- }, t.fullWidth && {
1710
- width: "100%"
1711
- });
1712
- }, ({
1713
- ownerState: e
1714
- }) => e.disableElevation && {
1715
- boxShadow: "none",
1716
- "&:hover": {
1717
- boxShadow: "none"
1718
- },
1719
- [`&.${de.focusVisible}`]: {
1720
- boxShadow: "none"
1721
- },
1722
- "&:active": {
1723
- boxShadow: "none"
1724
- },
1725
- [`&.${de.disabled}`]: {
1726
- boxShadow: "none"
1727
- }
1728
- }), uo = q("span", {
1729
- name: "MuiButton",
1730
- slot: "StartIcon",
1731
- overridesResolver: (e, t) => {
1732
- const {
1733
- ownerState: n
1734
- } = e;
1735
- return [t.startIcon, t[`iconSize${W(n.size)}`]];
1736
- }
1737
- })(({
1738
- ownerState: e
1739
- }) => b({
1740
- display: "inherit",
1741
- marginRight: 8,
1742
- marginLeft: -4
1743
- }, e.size === "small" && {
1744
- marginLeft: -2
1745
- }, Rt(e))), fo = q("span", {
1746
- name: "MuiButton",
1747
- slot: "EndIcon",
1748
- overridesResolver: (e, t) => {
1749
- const {
1750
- ownerState: n
1751
- } = e;
1752
- return [t.endIcon, t[`iconSize${W(n.size)}`]];
1753
- }
1754
- })(({
1755
- ownerState: e
1756
- }) => b({
1757
- display: "inherit",
1758
- marginRight: -4,
1759
- marginLeft: 8
1760
- }, e.size === "small" && {
1761
- marginRight: -2
1762
- }, Rt(e))), Tt = /* @__PURE__ */ p.forwardRef(function(t, n) {
1763
- const r = p.useContext(io), i = p.useContext(so), s = Le(r, t), a = ge({
1764
- props: s,
1765
- name: "MuiButton"
1766
- }), {
1767
- children: d,
1768
- color: c = "primary",
1769
- component: u = "button",
1770
- className: m,
1771
- disabled: T = !1,
1772
- disableElevation: E = !1,
1773
- disableFocusRipple: M = !1,
1774
- endIcon: S,
1775
- focusVisibleClassName: g,
1776
- fullWidth: l = !1,
1777
- size: P = "medium",
1778
- startIcon: V,
1779
- type: N,
1780
- variant: v = "text"
1781
- } = a, h = K(a, ao), C = b({}, a, {
1782
- color: c,
1783
- component: u,
1784
- disabled: T,
1785
- disableElevation: E,
1786
- disableFocusRipple: M,
1787
- fullWidth: l,
1788
- size: P,
1789
- type: N,
1790
- variant: v
1791
- }), O = co(C), k = V && /* @__PURE__ */ L(uo, {
1792
- className: O.startIcon,
1793
- ownerState: C,
1794
- children: V
1795
- }), A = S && /* @__PURE__ */ L(fo, {
1796
- className: O.endIcon,
1797
- ownerState: C,
1798
- children: S
1799
- }), I = i || "";
1800
- return /* @__PURE__ */ we(lo, b({
1801
- ownerState: C,
1802
- className: D(r.className, O.root, m, I),
1803
- component: u,
1804
- disabled: T,
1805
- focusRipple: !M,
1806
- focusVisibleClassName: D(O.focusVisible, g),
1807
- ref: n,
1808
- type: N
1809
- }, h, {
1810
- classes: O,
1811
- children: [k, d, A]
1812
- }));
1813
- });
1814
- process.env.NODE_ENV !== "production" && (Tt.propTypes = {
1815
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1816
- // │ These PropTypes are generated from the TypeScript type definitions. │
1817
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1818
- // └─────────────────────────────────────────────────────────────────────┘
1819
- /**
1820
- * The content of the component.
1821
- */
1822
- children: o.node,
1823
- /**
1824
- * Override or extend the styles applied to the component.
1825
- */
1826
- classes: o.object,
1827
- /**
1828
- * @ignore
1829
- */
1830
- className: o.string,
1831
- /**
1832
- * The color of the component.
1833
- * It supports both default and custom theme colors, which can be added as shown in the
1834
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1835
- * @default 'primary'
1836
- */
1837
- color: o.oneOfType([o.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), o.string]),
1838
- /**
1839
- * The component used for the root node.
1840
- * Either a string to use a HTML element or a component.
1841
- */
1842
- component: o.elementType,
1843
- /**
1844
- * If `true`, the component is disabled.
1845
- * @default false
1846
- */
1847
- disabled: o.bool,
1848
- /**
1849
- * If `true`, no elevation is used.
1850
- * @default false
1851
- */
1852
- disableElevation: o.bool,
1853
- /**
1854
- * If `true`, the keyboard focus ripple is disabled.
1855
- * @default false
1856
- */
1857
- disableFocusRipple: o.bool,
1858
- /**
1859
- * If `true`, the ripple effect is disabled.
1860
- *
1861
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
1862
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
1863
- * @default false
1864
- */
1865
- disableRipple: o.bool,
1866
- /**
1867
- * Element placed after the children.
1868
- */
1869
- endIcon: o.node,
1870
- /**
1871
- * @ignore
1872
- */
1873
- focusVisibleClassName: o.string,
1874
- /**
1875
- * If `true`, the button will take up the full width of its container.
1876
- * @default false
1877
- */
1878
- fullWidth: o.bool,
1879
- /**
1880
- * The URL to link to when the button is clicked.
1881
- * If defined, an `a` element will be used as the root node.
1882
- */
1883
- href: o.string,
1884
- /**
1885
- * The size of the component.
1886
- * `small` is equivalent to the dense button styling.
1887
- * @default 'medium'
1888
- */
1889
- size: o.oneOfType([o.oneOf(["small", "medium", "large"]), o.string]),
1890
- /**
1891
- * Element placed before the children.
1892
- */
1893
- startIcon: o.node,
1894
- /**
1895
- * The system prop that allows defining system overrides as well as additional CSS styles.
1896
- */
1897
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
1898
- /**
1899
- * @ignore
1900
- */
1901
- type: o.oneOfType([o.oneOf(["button", "reset", "submit"]), o.string]),
1902
- /**
1903
- * The variant to use.
1904
- * @default 'text'
1905
- */
1906
- variant: o.oneOfType([o.oneOf(["contained", "outlined", "text"]), o.string])
1907
- });
1908
- const Ve = Tt, Ct = kn({
1909
- createStyledComponent: q("div", {
106
+ return process.env.NODE_ENV !== "production" && (u.propTypes = {
107
+ children: e.node,
108
+ direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
109
+ divider: e.node,
110
+ spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
111
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
112
+ }), u;
113
+ }
114
+ const x = ee({
115
+ createStyledComponent: j("div", {
1910
116
  name: "MuiStack",
1911
117
  slot: "Root",
1912
- overridesResolver: (e, t) => t.root
118
+ overridesResolver: (o, r) => r.root
1913
119
  }),
1914
- useThemeProps: (e) => ge({
1915
- props: e,
120
+ useThemeProps: (o) => q({
121
+ props: o,
1916
122
  name: "MuiStack"
1917
123
  })
1918
124
  });
1919
- process.env.NODE_ENV !== "production" && (Ct.propTypes = {
125
+ process.env.NODE_ENV !== "production" && (x.propTypes = {
1920
126
  // ┌────────────────────────────── Warning ──────────────────────────────┐
1921
127
  // │ These PropTypes are generated from the TypeScript type definitions. │
1922
128
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -1924,31 +130,31 @@ process.env.NODE_ENV !== "production" && (Ct.propTypes = {
1924
130
  /**
1925
131
  * The content of the component.
1926
132
  */
1927
- children: o.node,
133
+ children: e.node,
1928
134
  /**
1929
135
  * The component used for the root node.
1930
136
  * Either a string to use a HTML element or a component.
1931
137
  */
1932
- component: o.elementType,
138
+ component: e.elementType,
1933
139
  /**
1934
140
  * Defines the `flex-direction` style property.
1935
141
  * It is applied for all screen sizes.
1936
142
  * @default 'column'
1937
143
  */
1938
- direction: o.oneOfType([o.oneOf(["column-reverse", "column", "row-reverse", "row"]), o.arrayOf(o.oneOf(["column-reverse", "column", "row-reverse", "row"])), o.object]),
144
+ direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
1939
145
  /**
1940
146
  * Add an element between each child.
1941
147
  */
1942
- divider: o.node,
148
+ divider: e.node,
1943
149
  /**
1944
150
  * Defines the space between immediate children.
1945
151
  * @default 0
1946
152
  */
1947
- spacing: o.oneOfType([o.arrayOf(o.oneOfType([o.number, o.string])), o.number, o.object, o.string]),
153
+ spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
1948
154
  /**
1949
155
  * The system prop, which allows defining system overrides as well as additional CSS styles.
1950
156
  */
1951
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
157
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1952
158
  /**
1953
159
  * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
1954
160
  *
@@ -1958,26 +164,26 @@ process.env.NODE_ENV !== "production" && (Ct.propTypes = {
1958
164
  * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
1959
165
  * @default false
1960
166
  */
1961
- useFlexGap: o.bool
167
+ useFlexGap: e.bool
1962
168
  });
1963
- const po = Ct, mo = q("button")(({ theme: e }) => ({
1964
- backgroundColor: e.palette.primary.main
1965
- })), xo = () => {
1966
- const e = Dt();
1967
- return /* @__PURE__ */ we(po, { spacing: 2, direction: "row", children: [
1968
- /* @__PURE__ */ L(mo, { children: "Styled" }),
1969
- /* @__PURE__ */ L(
1970
- Ve,
169
+ const oe = x, re = j("button")(({ theme: o }) => ({
170
+ backgroundColor: o.palette.primary.main
171
+ })), ie = () => {
172
+ const o = I();
173
+ return /* @__PURE__ */ D(oe, { spacing: 2, direction: "row", children: [
174
+ /* @__PURE__ */ l(re, { children: "Styled" }),
175
+ /* @__PURE__ */ l(
176
+ y,
1971
177
  {
1972
178
  variant: "text",
1973
- style: { backgroundColor: e.palette.primary.main },
179
+ style: { backgroundColor: o.palette.primary.main },
1974
180
  children: "Text"
1975
181
  }
1976
182
  ),
1977
- /* @__PURE__ */ L(Ve, { variant: "contained", children: "Contained" }),
1978
- /* @__PURE__ */ L(Ve, { variant: "outlined", children: "Outlined" })
183
+ /* @__PURE__ */ l(y, { variant: "contained", children: "Contained" }),
184
+ /* @__PURE__ */ l(y, { variant: "outlined", children: "Outlined" })
1979
185
  ] });
1980
186
  };
1981
187
  export {
1982
- xo as default
188
+ ie as default
1983
189
  };