fansunited-widgets-cdn 0.0.86-RC8 → 0.0.86

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 (60) hide show
  1. package/chunks/{Alert-B6o66mYo.js → Alert-DyM0oQgv.js} +32 -32
  2. package/chunks/{CardContent-NCZhfGcZ.js → CardContent-JGV7AYRJ.js} +19 -18
  3. package/chunks/{ChevronRight-1pLZ7T0v.js → ChevronRight-BjivYvSo.js} +11 -11
  4. package/chunks/{ClassicQuizWrapper-n2epPO4k.js → ClassicQuizWrapper-ChR6VdmQ.js} +8 -9
  5. package/chunks/{CollectLeadForm-C_3plJtn-Dr8J3eDw.js → CollectLeadForm-iZpBeMTk-Be-1nl3u.js} +2 -2
  6. package/chunks/{CollectLeadWrapper-CCtTZAxL.js → CollectLeadWrapper-DWGnbQNs.js} +22 -23
  7. package/chunks/{EitherOrById-ClGwMK0b.js → EitherOrById-HLRwnSut.js} +65 -65
  8. package/chunks/{EitherOrPreviewWrapper-BYiKyYwi.js → EitherOrPreviewWrapper-Bhb40ehK.js} +10 -10
  9. package/chunks/{Error-BurPfBJw-DWYn31sK.js → Error-D0HPar1M-CvBCxjku.js} +3 -3
  10. package/chunks/{EventGameWrapper-BphusLTk.js → EventGameWrapper-FLrbgLNx.js} +95 -96
  11. package/chunks/{Grid-yjqNNhEx.js → Grid-BgTvl7U0.js} +37 -37
  12. package/chunks/{IconButton-D7onwgY0.js → IconButton-UDap3hOW.js} +21 -21
  13. package/chunks/{List-8Vy9IZiv.js → List-CaGDrvb1.js} +23 -23
  14. package/chunks/{MatchPredictionContainer-BGytBwLo.js → MatchPredictionContainer-CCryS3WW.js} +7 -7
  15. package/chunks/{MatchQuizWrapper-BGjldBpF.js → MatchQuizWrapper-CNPkFMYb.js} +149 -150
  16. package/chunks/{OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js → OverlayLeadAfterCollection-CwqTKIoQ-B249CJNS.js} +3 -3
  17. package/chunks/{OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js → OverlayScoreStateSkeleton-CR-b8BTk-CcF6Sgb_.js} +8 -8
  18. package/chunks/{PersonalityQuizWrapper-BgLFw5tM.js → PersonalityQuizWrapper-D0_OHdgC.js} +315 -314
  19. package/chunks/{PlayerOfTheMatch-CImBLG3T.js → PlayerOfTheMatch-KHUAoy28.js} +96 -96
  20. package/chunks/{PollWrapper-QpIKCCVF.js → PollWrapper-Dsi16RT3.js} +8 -9
  21. package/chunks/{Portal-DegkUXpU-ByGP9zS1.js → Portal-Cvhw2F3y-CfNE9zHV.js} +313 -314
  22. package/chunks/{PreviewQuizById-Ba6yhxKV.js → PreviewQuizById-DdmuvcAL.js} +1019 -996
  23. package/chunks/{Sheet-U5EnSrgg.js → Sheet-x5Z9YdFs.js} +35 -35
  24. package/chunks/{Stack-DbDi7kPO.js → Stack-DZB2vzbp.js} +36 -36
  25. package/chunks/{Tabs-leN3Fb8D--YMyy3EM.js → Tabs-DmfafFAr-bCryBf-H.js} +2 -2
  26. package/chunks/{TeamNextMatchPrediction-9VSQOCcC.js → TeamNextMatchPrediction-C-fToJvQ.js} +2 -2
  27. package/chunks/{Tutorial-CRJLOovs.js → Tutorial-BI9zKJw5.js} +72 -73
  28. package/chunks/{createLucideIcon-CMWOQsDL.js → createLucideIcon-89uTOJaq.js} +8 -8
  29. package/chunks/{createSvgIcon-D9D4a1R9.js → createSvgIcon-DsrdSWLs.js} +167 -167
  30. package/chunks/{default-quiz-bg-ADjjIfPj.js → default-quiz-bg-CbX4gLOf.js} +15 -14
  31. package/chunks/{index-UwW9niUj.js → index-BJtPwLU2.js} +1 -1
  32. package/chunks/{index-CPTAlr_t.js → index-BXdeff8G.js} +1 -1
  33. package/chunks/{index-Da0AXb_O.js → index-BwmaB0Jc.js} +1 -1
  34. package/chunks/{index-CviTG4Nv.js → index-CSM_gD0c.js} +1 -1
  35. package/chunks/{index-BycLbIYY.js → index-CfNoJqrf.js} +1 -1
  36. package/chunks/{index-C6KAc5B_.js → index-CowyrOBF.js} +1 -1
  37. package/chunks/{index-DUQ2LFod-Cw45tHim.js → index-CsLtqiB_-DH3NMQxW.js} +32 -29
  38. package/chunks/{index-DwR4J2nN.js → index-CtAJur0I.js} +1 -1
  39. package/chunks/{index-CILd3yUc.js → index-DBucbNfJ.js} +1 -1
  40. package/chunks/{index-CHV6tlpH.js → index-DRDXyva1.js} +9 -9
  41. package/chunks/{index-CvGJXa6l.js → index-DRsTGSlf.js} +1 -1
  42. package/chunks/{index-CK2RXrJm.js → index-DXh1obfA.js} +1 -1
  43. package/chunks/{index-B74jHeYm.js → index-Dbuicm10.js} +2 -2
  44. package/chunks/{index-BfVvJg5R.js → index-DoDwv4Hi.js} +1 -1
  45. package/chunks/{index-CiB_Gqim.js → index-SdhwlCm-.js} +1 -1
  46. package/chunks/{index-0ADq_9jd.js → index-TCdxAH9x.js} +1 -1
  47. package/chunks/{init-C-gCorsh.js → init-CxQCMVyG.js} +1 -1
  48. package/chunks/main-Cx-uBTln.js +51049 -0
  49. package/chunks/resolveProps-DfBmYyXU.js +1632 -0
  50. package/chunks/{users-CXdzg3DM.js → users-Bltqtuv-.js} +1 -1
  51. package/fu-widgets-loader.es.js +16 -17
  52. package/fu-widgets-loader.js +1 -1
  53. package/fu-widgets.es.js +2 -2
  54. package/fu-widgets.iife.js +290 -290
  55. package/manifest.json +52 -54
  56. package/package.json +1 -1
  57. package/chunks/index-CJqcqbHq.js +0 -5
  58. package/chunks/index.es-wHqA4PHm.js +0 -11480
  59. package/chunks/main-Bh6iw92_.js +0 -39827
  60. package/chunks/resolveProps-Bgg0H6c2.js +0 -1016
@@ -1,1016 +0,0 @@
1
- import { aa as xt, r as u, m as ct, _ as v, v as nt, ab as pt, g as Q, d as w, e as tt, f as U, l as Dt, h as M, s as N, j as E, i as W, k as et, C as kt, w as St } from "./main-Bh6iw92_.js";
2
- const $e = xt();
3
- function ut(t, a) {
4
- var o, n;
5
- return /* @__PURE__ */ u.isValidElement(t) && a.indexOf(
6
- // For server components `muiName` is avaialble in element.type._payload.value.muiName
7
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
8
- // eslint-disable-next-line no-underscore-dangle
9
- (o = t.type.muiName) != null ? o : (n = t.type) == null || (n = n._payload) == null || (n = n.value) == null ? void 0 : n.muiName
10
- ) !== -1;
11
- }
12
- const lt = {};
13
- function Rt(t, a) {
14
- const o = u.useRef(lt);
15
- return o.current === lt && (o.current = t(a)), o;
16
- }
17
- const Pt = [];
18
- function Tt(t) {
19
- u.useEffect(t, Pt);
20
- }
21
- class J {
22
- constructor() {
23
- this.currentId = null, this.clear = () => {
24
- this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
25
- }, this.disposeEffect = () => this.clear;
26
- }
27
- static create() {
28
- return new J();
29
- }
30
- /**
31
- * Executes `fn` after `delay`, clearing any previously scheduled call.
32
- */
33
- start(a, o) {
34
- this.clear(), this.currentId = setTimeout(() => {
35
- this.currentId = null, o();
36
- }, a);
37
- }
38
- }
39
- function he() {
40
- const t = Rt(J.create).current;
41
- return Tt(t.disposeEffect), t;
42
- }
43
- let G = !0, q = !1;
44
- const It = new J(), _t = {
45
- text: !0,
46
- search: !0,
47
- url: !0,
48
- tel: !0,
49
- email: !0,
50
- password: !0,
51
- number: !0,
52
- date: !0,
53
- month: !0,
54
- week: !0,
55
- time: !0,
56
- datetime: !0,
57
- "datetime-local": !0
58
- };
59
- function Ht(t) {
60
- const {
61
- type: a,
62
- tagName: o
63
- } = t;
64
- return !!(o === "INPUT" && _t[a] && !t.readOnly || o === "TEXTAREA" && !t.readOnly || t.isContentEditable);
65
- }
66
- function Et(t) {
67
- t.metaKey || t.altKey || t.ctrlKey || (G = !0);
68
- }
69
- function Z() {
70
- G = !1;
71
- }
72
- function zt() {
73
- this.visibilityState === "hidden" && q && (G = !0);
74
- }
75
- function Vt(t) {
76
- t.addEventListener("keydown", Et, !0), t.addEventListener("mousedown", Z, !0), t.addEventListener("pointerdown", Z, !0), t.addEventListener("touchstart", Z, !0), t.addEventListener("visibilitychange", zt, !0);
77
- }
78
- function Nt(t) {
79
- const {
80
- target: a
81
- } = t;
82
- try {
83
- return a.matches(":focus-visible");
84
- } catch {
85
- }
86
- return G || Ht(a);
87
- }
88
- function At() {
89
- const t = u.useCallback((r) => {
90
- r != null && Vt(r.ownerDocument);
91
- }, []), a = u.useRef(!1);
92
- function o() {
93
- return a.current ? (q = !0, It.start(100, () => {
94
- q = !1;
95
- }), a.current = !1, !0) : !1;
96
- }
97
- function n(r) {
98
- return Nt(r) ? (a.current = !0, !0) : !1;
99
- }
100
- return {
101
- isFocusVisibleRef: a,
102
- onFocus: n,
103
- onBlur: o,
104
- ref: t
105
- };
106
- }
107
- function Mt(t) {
108
- const {
109
- rootElementName: a = ""
110
- } = t, [o, n] = u.useState(a.toUpperCase()), r = u.useCallback((e) => {
111
- var i;
112
- n((i = e == null ? void 0 : e.tagName) != null ? i : "");
113
- }, []);
114
- return [o, r];
115
- }
116
- function Wt(t = {}) {
117
- const {
118
- disabled: a = !1,
119
- focusableWhenDisabled: o,
120
- href: n,
121
- rootRef: r,
122
- tabIndex: e,
123
- to: i,
124
- type: p,
125
- rootElementName: m
126
- } = t, B = u.useRef(null), [b, x] = u.useState(!1), {
127
- isFocusVisibleRef: S,
128
- onFocus: C,
129
- onBlur: D,
130
- ref: I
131
- } = At(), [$, R] = u.useState(!1);
132
- a && !o && $ && R(!1), u.useEffect(() => {
133
- S.current = $;
134
- }, [$, S]);
135
- const [y, f] = Mt({
136
- rootElementName: m ?? (n || i ? "a" : void 0)
137
- }), P = (s) => (l) => {
138
- var c;
139
- $ && l.preventDefault(), (c = s.onMouseLeave) == null || c.call(s, l);
140
- }, T = (s) => (l) => {
141
- var c;
142
- D(l), S.current === !1 && R(!1), (c = s.onBlur) == null || c.call(s, l);
143
- }, g = (s) => (l) => {
144
- var c;
145
- if (B.current || (B.current = l.currentTarget), C(l), S.current === !0) {
146
- var k;
147
- R(!0), (k = s.onFocusVisible) == null || k.call(s, l);
148
- }
149
- (c = s.onFocus) == null || c.call(s, l);
150
- }, d = () => {
151
- const s = B.current;
152
- return y === "BUTTON" || y === "INPUT" && ["button", "submit", "reset"].includes(s == null ? void 0 : s.type) || y === "A" && (s == null ? void 0 : s.href);
153
- }, H = (s) => (l) => {
154
- if (!a) {
155
- var c;
156
- (c = s.onClick) == null || c.call(s, l);
157
- }
158
- }, _ = (s) => (l) => {
159
- var c;
160
- a || (x(!0), document.addEventListener("mouseup", () => {
161
- x(!1);
162
- }, {
163
- once: !0
164
- })), (c = s.onMouseDown) == null || c.call(s, l);
165
- }, z = (s) => (l) => {
166
- var c;
167
- if ((c = s.onKeyDown) == null || c.call(s, l), !l.defaultMuiPrevented && (l.target === l.currentTarget && !d() && l.key === " " && l.preventDefault(), l.target === l.currentTarget && l.key === " " && !a && x(!0), l.target === l.currentTarget && !d() && l.key === "Enter" && !a)) {
168
- var k;
169
- (k = s.onClick) == null || k.call(s, l), l.preventDefault();
170
- }
171
- }, V = (s) => (l) => {
172
- var c;
173
- if (l.target === l.currentTarget && x(!1), (c = s.onKeyUp) == null || c.call(s, l), l.target === l.currentTarget && !d() && !a && l.key === " " && !l.defaultMuiPrevented) {
174
- var k;
175
- (k = s.onClick) == null || k.call(s, l);
176
- }
177
- }, A = ct(f, r, I, B), h = {};
178
- return e !== void 0 && (h.tabIndex = e), y === "BUTTON" ? (h.type = p ?? "button", o ? h["aria-disabled"] = a : h.disabled = a) : y === "INPUT" ? p && ["button", "submit", "reset"].includes(p) && (o ? h["aria-disabled"] = a : h.disabled = a) : y !== "" && (!n && !i && (h.role = "button", h.tabIndex = e ?? 0), a && (h["aria-disabled"] = a, h.tabIndex = o ? e ?? 0 : -1)), {
179
- getRootProps: (s = {}) => {
180
- const l = v({}, nt(t), nt(s)), c = v({
181
- type: p
182
- }, l, h, s, {
183
- onBlur: T(l),
184
- onClick: H(l),
185
- onFocus: g(l),
186
- onKeyDown: z(l),
187
- onKeyUp: V(l),
188
- onMouseDown: _(l),
189
- onMouseLeave: P(l),
190
- ref: A
191
- });
192
- return delete c.onFocusVisible, c;
193
- },
194
- focusVisible: $,
195
- setFocusVisible: R,
196
- active: b,
197
- rootRef: A
198
- };
199
- }
200
- const Ot = ({
201
- theme: t,
202
- ownerState: a
203
- }, o) => {
204
- let n = {};
205
- function r(e) {
206
- if (typeof e == "function") {
207
- const i = e(t);
208
- r(i);
209
- } else Array.isArray(e) ? e.forEach((i) => {
210
- typeof i != "boolean" && r(i);
211
- }) : typeof e == "object" && (n = v({}, n, e));
212
- }
213
- return a.sx && (r(a.sx), o.forEach((e) => {
214
- const i = n[e];
215
- if (typeof i == "string" || typeof i == "number")
216
- if (e === "borderRadius")
217
- if (typeof i == "number")
218
- n[e] = `${i}px`;
219
- else {
220
- var p;
221
- n[e] = ((p = t.vars) == null ? void 0 : p.radius[i]) || i;
222
- }
223
- else ["p", "padding", "m", "margin"].indexOf(e) !== -1 && typeof i == "number" ? n[e] = t.spacing(i) : n[e] = i;
224
- else typeof i == "function" ? n[e] = i(t) : n[e] = void 0;
225
- })), n;
226
- }, at = (t) => (a) => `--${t ? `${t}-` : ""}${a.replace(/^--/, "")}`, K = "data-skip-inverted-colors", vt = `& :not([${K}], [${K}] *)`, gt = (t) => {
227
- var a, o, n, r, e, i, p, m, B, b, x, S, C, D, I, $, R, y, f, P, T, g;
228
- const d = at(t.cssVarPrefix);
229
- return {
230
- "--variant-plainColor": "var(--variant-plainColor) !important",
231
- "--variant-plainHoverColor": "var(--variant-plainHoverColor) !important",
232
- "--variant-plainHoverBg": "var(--variant-plainHoverBg) !important",
233
- "--variant-plainActiveBg": "var(--variant-plainActiveBg) !important",
234
- "--variant-plainDisabledColor": "var(--variant-plainDisabledColor) !important",
235
- "--variant-outlinedColor": "var(--variant-outlinedColor) !important",
236
- "--variant-outlinedBorder": "var(--variant-outlinedBorder) !important",
237
- "--variant-outlinedHoverColor": "var(--variant-outlinedHoverColor) !important",
238
- "--variant-outlinedHoverBorder": "var(--variant-outlinedHoverBorder) !important",
239
- "--variant-outlinedHoverBg": "var(--variant-outlinedHoverBg) !important",
240
- "--variant-outlinedActiveBg": "var(--variant-outlinedActiveBg) !important",
241
- "--variant-outlinedDisabledColor": "var(--variant-outlinedDisabledColor) !important",
242
- "--variant-outlinedDisabledBorder": "var(--variant-outlinedDisabledBorder) !important",
243
- "--variant-softColor": "var(--variant-softColor) !important",
244
- "--variant-softHoverColor": "var(--variant-softHoverColor) !important",
245
- "--variant-softBg": "var(--variant-softBg) !important",
246
- "--variant-softHoverBg": "var(--variant-softHoverBg) !important",
247
- "--variant-softActiveBg": "var(--variant-softActiveBg) !important",
248
- "--variant-softActiveColor": "var(--variant-softActiveColor) !important",
249
- "--variant-softDisabledColor": "var(--variant-softDisabledColor) !important",
250
- "--variant-softDisabledBg": "var(--variant-softDisabledBg) !important",
251
- "--variant-solidColor": "var(--variant-solidColor) !important",
252
- "--variant-solidBg": "var(--variant-solidBg) !important",
253
- "--variant-solidHoverBg": "var(--variant-solidHoverBg) !important",
254
- "--variant-solidActiveBg": "var(--variant-solidActiveBg) !important",
255
- "--variant-solidDisabledColor": "var(--variant-solidDisabledColor) !important",
256
- "--variant-solidDisabledBg": "var(--variant-solidDisabledBg) !important",
257
- "--Badge-ringColor": "var(--Badge-ringColor) !important",
258
- colorScheme: "unset",
259
- [t.getColorSchemeSelector("light")]: {
260
- [d("--palette-focusVisible")]: `${(a = t.colorSchemes.light) == null ? void 0 : a.palette.focusVisible} !important`,
261
- [d("--palette-background-body")]: `${(o = t.colorSchemes.light) == null ? void 0 : o.palette.background.body} !important`,
262
- [d("--palette-background-surface")]: `${(n = t.colorSchemes.light) == null ? void 0 : n.palette.background.surface} !important`,
263
- [d("--palette-background-popup")]: `${(r = t.colorSchemes.light) == null ? void 0 : r.palette.background.popup} !important`,
264
- [d("--palette-background-level1")]: `${(e = t.colorSchemes.light) == null ? void 0 : e.palette.background.level1} !important`,
265
- [d("--palette-background-level2")]: `${(i = t.colorSchemes.light) == null ? void 0 : i.palette.background.level2} !important`,
266
- [d("--palette-background-level3")]: `${(p = t.colorSchemes.light) == null ? void 0 : p.palette.background.level3} !important`,
267
- [d("--palette-text-primary")]: `${(m = t.colorSchemes.light) == null ? void 0 : m.palette.text.primary} !important`,
268
- [d("--palette-text-secondary")]: `${(B = t.colorSchemes.light) == null ? void 0 : B.palette.text.secondary} !important`,
269
- [d("--palette-text-tertiary")]: `${(b = t.colorSchemes.light) == null ? void 0 : b.palette.text.tertiary} !important`,
270
- [d("--palette-divider")]: `${(x = t.colorSchemes.light) == null ? void 0 : x.palette.divider} !important`
271
- },
272
- [t.getColorSchemeSelector("dark")]: {
273
- [d("--palette-focusVisible")]: `${(S = t.colorSchemes.dark) == null ? void 0 : S.palette.focusVisible} !important`,
274
- [d("--palette-background-body")]: `${(C = t.colorSchemes.dark) == null ? void 0 : C.palette.background.body} !important`,
275
- [d("--palette-background-surface")]: `${(D = t.colorSchemes.dark) == null ? void 0 : D.palette.background.surface} !important`,
276
- [d("--palette-background-popup")]: `${(I = t.colorSchemes.dark) == null ? void 0 : I.palette.background.popup} !important`,
277
- [d("--palette-background-level1")]: `${($ = t.colorSchemes.dark) == null ? void 0 : $.palette.background.level1} !important`,
278
- [d("--palette-background-level2")]: `${(R = t.colorSchemes.dark) == null ? void 0 : R.palette.background.level2} !important`,
279
- [d("--palette-background-level3")]: `${(y = t.colorSchemes.dark) == null ? void 0 : y.palette.background.level3} !important`,
280
- [d("--palette-text-primary")]: `${(f = t.colorSchemes.dark) == null ? void 0 : f.palette.text.primary} !important`,
281
- [d("--palette-text-secondary")]: `${(P = t.colorSchemes.dark) == null ? void 0 : P.palette.text.secondary} !important`,
282
- [d("--palette-text-tertiary")]: `${(T = t.colorSchemes.dark) == null ? void 0 : T.palette.text.tertiary} !important`,
283
- [d("--palette-divider")]: `${(g = t.colorSchemes.dark) == null ? void 0 : g.palette.divider} !important`
284
- }
285
- };
286
- };
287
- function Ft(t) {
288
- return t.theme !== void 0;
289
- }
290
- const Lt = (t) => (a) => {
291
- const o = Ft(a) ? a.theme : a, n = pt(o.cssVarPrefix), r = at(o.cssVarPrefix), e = (i) => {
292
- const p = i.split("-");
293
- return n(i, o.palette[p[1]][p[2]]);
294
- };
295
- return {
296
- [vt]: {
297
- "--Badge-ringColor": e(`palette-${t}-solidBg`),
298
- "--Icon-color": "currentColor",
299
- [`${o.getColorSchemeSelector("light")}, ${o.getColorSchemeSelector("dark")}`]: {
300
- colorScheme: "dark",
301
- [r("--palette-focusVisible")]: e(`palette-${t}-200`),
302
- [r("--palette-background-body")]: "rgba(0 0 0 / 0.1)",
303
- [r("--palette-background-surface")]: "rgba(0 0 0 / 0.06)",
304
- [r("--palette-background-popup")]: e(`palette-${t}-700`),
305
- [r("--palette-background-level1")]: `rgba(${e(`palette-${t}-darkChannel`)} / 0.2)`,
306
- [r("--palette-background-level2")]: `rgba(${e(`palette-${t}-darkChannel`)} / 0.36)`,
307
- [r("--palette-background-level3")]: `rgba(${e(`palette-${t}-darkChannel`)} / 0.6)`,
308
- [r("--palette-text-primary")]: e("palette-common-white"),
309
- [r("--palette-text-secondary")]: e(`palette-${t}-200`),
310
- [r("--palette-text-tertiary")]: e(`palette-${t}-300`),
311
- [r("--palette-text-icon")]: e(`palette-${t}-200`),
312
- [r("--palette-divider")]: `rgba(${e(`palette-${t}-lightChannel`)} / 0.32)`,
313
- "--variant-plainColor": e(`palette-${t}-50`),
314
- "--variant-plainHoverColor": "#fff",
315
- "--variant-plainHoverBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.12)`,
316
- "--variant-plainActiveBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.32)`,
317
- "--variant-plainDisabledColor": `rgba(${e(`palette-${t}-lightChannel`)} / 0.72)`,
318
- "--variant-outlinedColor": e(`palette-${t}-50`),
319
- "--variant-outlinedBorder": `rgba(${e(`palette-${t}-lightChannel`)} / 0.5)`,
320
- "--variant-outlinedHoverColor": "#fff",
321
- "--variant-outlinedHoverBorder": e(`palette-${t}-300`),
322
- "--variant-outlinedHoverBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.12)`,
323
- "--variant-outlinedActiveBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.32)`,
324
- "--variant-outlinedDisabledColor": `rgba(${e(`palette-${t}-lightChannel`)} / 0.72)`,
325
- "--variant-outlinedDisabledBorder": "rgba(255 255 255 / 0.2)",
326
- "--variant-softColor": e("palette-common-white"),
327
- "--variant-softHoverColor": e("palette-common-white"),
328
- "--variant-softBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.24)`,
329
- "--variant-softHoverBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.36)`,
330
- "--variant-softActiveBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.16)`,
331
- "--variant-softActiveColor": "#fff",
332
- "--variant-softDisabledColor": `rgba(${e(`palette-${t}-lightChannel`)} / 0.72)`,
333
- "--variant-softDisabledBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.1)`,
334
- "--variant-solidColor": e(`palette-${t}-${t === "neutral" ? "600" : "500"}`),
335
- "--variant-solidBg": e("palette-common-white"),
336
- "--variant-solidHoverBg": e("palette-common-white"),
337
- "--variant-solidActiveBg": e(`palette-${t}-100`),
338
- "--variant-solidDisabledColor": `rgba(${e(`palette-${t}-lightChannel`)} / 0.72)`,
339
- "--variant-solidDisabledBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.1)`
340
- }
341
- },
342
- [`&, & [${K}]`]: gt(o)
343
- };
344
- }, jt = (t) => (a) => {
345
- const {
346
- theme: o = a
347
- } = a, n = pt(o.cssVarPrefix), r = at(o.cssVarPrefix), e = (i) => {
348
- const p = i.split("-");
349
- return n(i, o.palette[p[1]][p[2]]);
350
- };
351
- return {
352
- [vt]: {
353
- "--Badge-ringColor": e(`palette-${t}-softBg`),
354
- "--Icon-color": "currentColor",
355
- [o.getColorSchemeSelector("dark")]: {
356
- [r("--palette-focusVisible")]: e(`palette-${t}-300`),
357
- [r("--palette-background-body")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.1)`,
358
- [r("--palette-background-surface")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.08)`,
359
- [r("--palette-background-level1")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.2)`,
360
- [r("--palette-background-level2")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.4)`,
361
- [r("--palette-background-level3")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.6)`,
362
- [r("--palette-text-primary")]: e(`palette-${t}-100`),
363
- [r("--palette-text-secondary")]: `rgba(${e(`palette-${t}-lightChannel`)} / 0.72)`,
364
- [r("--palette-text-tertiary")]: `rgba(${e(`palette-${t}-lightChannel`)} / 0.6)`,
365
- [r("--palette-text-icon")]: `rgba(${e(`palette-${t}-lightChannel`)} / 0.6)`,
366
- [r("--palette-divider")]: `rgba(${e(`palette-${t}-lightChannel`)} / 0.2)`,
367
- "--variant-plainColor": `rgba(${e(`palette-${t}-lightChannel`)} / 1)`,
368
- "--variant-plainHoverColor": e(`palette-${t}-50`),
369
- "--variant-plainHoverBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.16)`,
370
- "--variant-plainActiveBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.32)`,
371
- "--variant-plainDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.72)`,
372
- "--variant-outlinedColor": `rgba(${e(`palette-${t}-lightChannel`)} / 1)`,
373
- "--variant-outlinedHoverColor": e(`palette-${t}-50`),
374
- "--variant-outlinedBg": "initial",
375
- "--variant-outlinedBorder": `rgba(${e(`palette-${t}-mainChannel`)} / 0.4)`,
376
- "--variant-outlinedHoverBorder": e(`palette-${t}-600`),
377
- "--variant-outlinedHoverBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.16)`,
378
- "--variant-outlinedActiveBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.32)`,
379
- "--variant-outlinedDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.72)`,
380
- "--variant-outlinedDisabledBorder": `rgba(${e(`palette-${t}-mainChannel`)} / 0.2)`,
381
- "--variant-softColor": e(`palette-${t}-200`),
382
- "--variant-softBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.24)`,
383
- "--variant-softHoverColor": "#fff",
384
- "--variant-softHoverBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.32)`,
385
- "--variant-softActiveBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.48)`,
386
- "--variant-softDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.72)`,
387
- "--variant-softDisabledBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.12)`,
388
- "--variant-solidColor": "#fff",
389
- "--variant-solidBg": e(`palette-${t}-500`),
390
- "--variant-solidHoverColor": "#fff",
391
- "--variant-solidHoverBg": e(`palette-${t}-600`),
392
- "--variant-solidActiveBg": e(`palette-${t}-600`),
393
- "--variant-solidDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.72)`,
394
- "--variant-solidDisabledBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.12)`
395
- },
396
- // `light` (default color scheme) should come last in case that `theme.getColorSchemeSelector()` return the same value
397
- [o.getColorSchemeSelector("light")]: {
398
- [r("--palette-focusVisible")]: e(`palette-${t}-500`),
399
- [r("--palette-background-body")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.1)`,
400
- [r("--palette-background-surface")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.08)`,
401
- [r("--palette-background-level1")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.2)`,
402
- [r("--palette-background-level2")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.32)`,
403
- [r("--palette-background-level3")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.48)`,
404
- [r("--palette-text-primary")]: e(`palette-${t}-700`),
405
- [r("--palette-text-secondary")]: `rgba(${e(`palette-${t}-darkChannel`)} / 0.8)`,
406
- [r("--palette-text-tertiary")]: `rgba(${e(`palette-${t}-darkChannel`)} / 0.68)`,
407
- [r("--palette-text-icon")]: e(`palette-${t}-500`),
408
- [r("--palette-divider")]: `rgba(${e(`palette-${t}-mainChannel`)} / 0.32)`,
409
- "--variant-plainColor": `rgba(${e(`palette-${t}-darkChannel`)} / 0.8)`,
410
- "--variant-plainHoverColor": `rgba(${e(`palette-${t}-darkChannel`)} / 1)`,
411
- "--variant-plainHoverBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.12)`,
412
- "--variant-plainActiveBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.24)`,
413
- "--variant-plainDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.6)`,
414
- "--variant-outlinedColor": `rgba(${e(`palette-${t}-mainChannel`)} / 1)`,
415
- "--variant-outlinedBorder": `rgba(${e(`palette-${t}-mainChannel`)} / 0.4)`,
416
- "--variant-outlinedHoverColor": e(`palette-${t}-600`),
417
- "--variant-outlinedHoverBorder": e(`palette-${t}-300`),
418
- "--variant-outlinedHoverBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.12)`,
419
- "--variant-outlinedActiveBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.24)`,
420
- "--variant-outlinedDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.6)`,
421
- "--variant-outlinedDisabledBorder": `rgba(${e(`palette-${t}-mainChannel`)} / 0.12)`,
422
- "--variant-softColor": e(`palette-${t}-600`),
423
- "--variant-softBg": `rgba(${e(`palette-${t}-lightChannel`)} / 0.8)`,
424
- "--variant-softHoverColor": e(`palette-${t}-700`),
425
- "--variant-softHoverBg": e(`palette-${t}-200`),
426
- "--variant-softActiveBg": e(`palette-${t}-300`),
427
- "--variant-softDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.6)`,
428
- "--variant-softDisabledBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.08)`,
429
- "--variant-solidColor": e("palette-common-white"),
430
- "--variant-solidBg": e(`palette-${t}-${t === "neutral" ? "700" : "500"}`),
431
- "--variant-solidHoverColor": e("palette-common-white"),
432
- "--variant-solidHoverBg": e(`palette-${t}-600`),
433
- "--variant-solidActiveBg": e(`palette-${t}-600`),
434
- "--variant-solidDisabledColor": `rgba(${e(`palette-${t}-mainChannel`)} / 0.6)`,
435
- "--variant-solidDisabledBg": `rgba(${e(`palette-${t}-mainChannel`)} / 0.08)`
436
- }
437
- },
438
- [`&, & [${K}]`]: gt(o)
439
- };
440
- }, Ut = /* @__PURE__ */ u.createContext({}), Kt = /* @__PURE__ */ u.createContext(void 0);
441
- function Jt(t) {
442
- return Q("MuiTypography", t);
443
- }
444
- w("MuiTypography", ["root", "h1", "h2", "h3", "h4", "title-lg", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "body-xs", "noWrap", "gutterBottom", "startDecorator", "endDecorator", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
445
- const Gt = ["color", "textColor"], Xt = ["component", "gutterBottom", "noWrap", "level", "levelMapping", "children", "endDecorator", "startDecorator", "variant", "slots", "slotProps"], it = /* @__PURE__ */ u.createContext(!1), Yt = /* @__PURE__ */ u.createContext(!1), Zt = (t) => {
446
- const {
447
- gutterBottom: a,
448
- noWrap: o,
449
- level: n,
450
- color: r,
451
- variant: e
452
- } = t, i = {
453
- root: ["root", n, a && "gutterBottom", o && "noWrap", r && `color${W(r)}`, e && `variant${W(e)}`],
454
- startDecorator: ["startDecorator"],
455
- endDecorator: ["endDecorator"]
456
- };
457
- return et(i, Jt, {});
458
- }, qt = N("span", {
459
- name: "JoyTypography",
460
- slot: "StartDecorator",
461
- overridesResolver: (t, a) => a.startDecorator
462
- })({
463
- display: "inline-flex",
464
- marginInlineEnd: "clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"
465
- }), Qt = N("span", {
466
- name: "JoyTypography",
467
- slot: "endDecorator",
468
- overridesResolver: (t, a) => a.endDecorator
469
- })({
470
- display: "inline-flex",
471
- marginInlineStart: "clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"
472
- }), wt = N("span", {
473
- name: "JoyTypography",
474
- slot: "Root",
475
- overridesResolver: (t, a) => a.root
476
- })(({
477
- theme: t,
478
- ownerState: a
479
- }) => {
480
- var o, n, r, e, i;
481
- const p = a.level !== "inherit" ? (o = t.typography[a.level]) == null ? void 0 : o.lineHeight : "1";
482
- return v({
483
- "--Icon-fontSize": `calc(1em * ${p})`
484
- }, a.color && {
485
- "--Icon-color": "currentColor"
486
- }, {
487
- margin: "var(--Typography-margin, 0px)"
488
- }, a.nesting ? {
489
- display: "inline"
490
- // looks better than `inline-block` when using with `variant` prop.
491
- } : v({
492
- display: "block"
493
- }, a.unstable_hasSkeleton && {
494
- position: "relative"
495
- }), (a.startDecorator || a.endDecorator) && v({
496
- display: "flex",
497
- alignItems: "center"
498
- }, a.nesting && v({
499
- display: "inline-flex"
500
- }, a.startDecorator && {
501
- verticalAlign: "bottom"
502
- // to make the text align with the parent's content
503
- })), a.level && a.level !== "inherit" && t.typography[a.level], {
504
- fontSize: `var(--Typography-fontSize, ${a.level && a.level !== "inherit" && (n = (r = t.typography[a.level]) == null ? void 0 : r.fontSize) != null ? n : "inherit"})`
505
- }, a.noWrap && {
506
- overflow: "hidden",
507
- textOverflow: "ellipsis",
508
- whiteSpace: "nowrap"
509
- }, a.gutterBottom && {
510
- marginBottom: "0.35em"
511
- }, a.color && {
512
- color: `var(--variant-plainColor, rgba(${(e = t.vars.palette[a.color]) == null ? void 0 : e.mainChannel} / 1))`
513
- }, a.variant && v({
514
- borderRadius: t.vars.radius.xs,
515
- paddingBlock: "min(0.1em, 4px)",
516
- paddingInline: "0.25em"
517
- }, !a.nesting && {
518
- marginInline: "-0.25em"
519
- }, (i = t.variants[a.variant]) == null ? void 0 : i[a.color]));
520
- }), st = {
521
- h1: "h1",
522
- h2: "h2",
523
- h3: "h3",
524
- h4: "h4",
525
- "title-lg": "p",
526
- "title-md": "p",
527
- "title-sm": "p",
528
- "body-lg": "p",
529
- "body-md": "p",
530
- "body-sm": "p",
531
- "body-xs": "span",
532
- inherit: "p"
533
- }, te = /* @__PURE__ */ u.forwardRef(function(a, o) {
534
- var n;
535
- const r = tt({
536
- props: a,
537
- name: "JoyTypography"
538
- }), {
539
- color: e,
540
- textColor: i
541
- } = r, p = U(r, Gt), m = u.useContext(it), B = u.useContext(Yt), b = Dt(v({}, p, {
542
- color: i
543
- })), {
544
- component: x,
545
- gutterBottom: S = !1,
546
- noWrap: C = !1,
547
- level: D = "body-md",
548
- levelMapping: I = st,
549
- children: $,
550
- endDecorator: R,
551
- startDecorator: y,
552
- variant: f,
553
- slots: P = {},
554
- slotProps: T = {}
555
- } = b, g = U(b, Xt), d = (n = a.color) != null ? n : f ? e ?? "neutral" : e, H = m || B ? a.level || "inherit" : D, _ = ut($, ["Skeleton"]), z = x || (m ? "span" : I[H] || st[H] || "span"), V = v({}, b, {
556
- level: H,
557
- component: z,
558
- color: d,
559
- gutterBottom: S,
560
- noWrap: C,
561
- nesting: m,
562
- variant: f,
563
- unstable_hasSkeleton: _
564
- }), A = Zt(V), h = v({}, g, {
565
- component: z,
566
- slots: P,
567
- slotProps: T
568
- }), [O, s] = M("root", {
569
- ref: o,
570
- className: A.root,
571
- elementType: wt,
572
- externalForwardedProps: h,
573
- ownerState: V
574
- }), [l, c] = M("startDecorator", {
575
- className: A.startDecorator,
576
- elementType: qt,
577
- externalForwardedProps: h,
578
- ownerState: V
579
- }), [k, X] = M("endDecorator", {
580
- className: A.endDecorator,
581
- elementType: Qt,
582
- externalForwardedProps: h,
583
- ownerState: V
584
- });
585
- return /* @__PURE__ */ E.jsx(it.Provider, {
586
- value: !0,
587
- children: /* @__PURE__ */ E.jsxs(O, v({}, s, {
588
- children: [y && /* @__PURE__ */ E.jsx(l, v({}, c, {
589
- children: y
590
- })), _ ? /* @__PURE__ */ u.cloneElement($, {
591
- variant: $.props.variant || "inline"
592
- }) : $, R && /* @__PURE__ */ E.jsx(k, v({}, X, {
593
- children: R
594
- }))]
595
- }))
596
- });
597
- });
598
- te.muiName = "Typography";
599
- function ee(t) {
600
- return Q("MuiButton", t);
601
- }
602
- const dt = w("MuiButton", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "focusVisible", "disabled", "sizeSm", "sizeMd", "sizeLg", "fullWidth", "startDecorator", "endDecorator", "loading", "loadingIndicatorCenter"]), ae = ["children", "action", "color", "variant", "size", "fullWidth", "startDecorator", "endDecorator", "loading", "loadingPosition", "loadingIndicator", "disabled", "component", "slots", "slotProps"], re = (t) => {
603
- const {
604
- color: a,
605
- disabled: o,
606
- focusVisible: n,
607
- focusVisibleClassName: r,
608
- fullWidth: e,
609
- size: i,
610
- variant: p,
611
- loading: m
612
- } = t, B = {
613
- root: ["root", o && "disabled", n && "focusVisible", e && "fullWidth", p && `variant${W(p)}`, a && `color${W(a)}`, i && `size${W(i)}`, m && "loading"],
614
- startDecorator: ["startDecorator"],
615
- endDecorator: ["endDecorator"],
616
- loadingIndicatorCenter: ["loadingIndicatorCenter"]
617
- }, b = et(B, ee, {});
618
- return n && r && (b.root += ` ${r}`), b;
619
- }, oe = N("span", {
620
- name: "JoyButton",
621
- slot: "StartDecorator",
622
- overridesResolver: (t, a) => a.startDecorator
623
- })({
624
- "--Icon-margin": "0 0 0 calc(var(--Button-gap) / -2)",
625
- "--CircularProgress-margin": "0 0 0 calc(var(--Button-gap) / -2)",
626
- display: "inherit",
627
- marginRight: "var(--Button-gap)"
628
- }), ne = N("span", {
629
- name: "JoyButton",
630
- slot: "EndDecorator",
631
- overridesResolver: (t, a) => a.endDecorator
632
- })({
633
- "--Icon-margin": "0 calc(var(--Button-gap) / -2) 0 0",
634
- "--CircularProgress-margin": "0 calc(var(--Button-gap) / -2) 0 0",
635
- display: "inherit",
636
- marginLeft: "var(--Button-gap)"
637
- }), le = N("span", {
638
- name: "JoyButton",
639
- slot: "LoadingCenter",
640
- overridesResolver: (t, a) => a.loadingIndicatorCenter
641
- })(({
642
- theme: t,
643
- ownerState: a
644
- }) => {
645
- var o, n;
646
- return v({
647
- display: "inherit",
648
- position: "absolute",
649
- left: "50%",
650
- transform: "translateX(-50%)",
651
- color: (o = t.variants[a.variant]) == null || (o = o[a.color]) == null ? void 0 : o.color
652
- }, a.disabled && {
653
- color: (n = t.variants[`${a.variant}Disabled`]) == null || (n = n[a.color]) == null ? void 0 : n.color
654
- });
655
- }), ie = ({
656
- theme: t,
657
- ownerState: a
658
- }) => {
659
- var o, n, r, e;
660
- return [v({
661
- "--Icon-margin": "initial",
662
- // reset the icon's margin.
663
- "--Icon-color": a.color !== "neutral" || a.variant === "solid" ? "currentColor" : t.vars.palette.text.icon
664
- }, a.size === "sm" && {
665
- "--Icon-fontSize": t.vars.fontSize.lg,
666
- "--CircularProgress-size": "20px",
667
- // must be `px` unit, otherwise the CircularProgress is broken in Safari
668
- "--CircularProgress-thickness": "2px",
669
- "--Button-gap": "0.375rem",
670
- minHeight: "var(--Button-minHeight, 2rem)",
671
- fontSize: t.vars.fontSize.sm,
672
- paddingBlock: "var(--Button-paddingBlock, 0.25rem)",
673
- paddingInline: "0.75rem"
674
- }, a.size === "md" && {
675
- "--Icon-fontSize": t.vars.fontSize.xl,
676
- "--CircularProgress-size": "20px",
677
- // must be `px` unit, otherwise the CircularProgress is broken in Safari
678
- "--CircularProgress-thickness": "2px",
679
- "--Button-gap": "0.5rem",
680
- minHeight: "var(--Button-minHeight, 2.25rem)",
681
- // use min-height instead of height to make the button resilient to its content
682
- fontSize: t.vars.fontSize.sm,
683
- // internal --Button-paddingBlock is used to control the padding-block of the button from the outside, for example as a decorator of an Input
684
- paddingBlock: "var(--Button-paddingBlock, 0.375rem)",
685
- // the padding-block act as a minimum spacing between content and root element
686
- paddingInline: "1rem"
687
- }, a.size === "lg" && {
688
- "--Icon-fontSize": t.vars.fontSize.xl2,
689
- "--CircularProgress-size": "28px",
690
- // must be `px` unit, otherwise the CircularProgress is broken in Safari
691
- "--CircularProgress-thickness": "4px",
692
- "--Button-gap": "0.75rem",
693
- minHeight: "var(--Button-minHeight, 2.75rem)",
694
- fontSize: t.vars.fontSize.md,
695
- paddingBlock: "var(--Button-paddingBlock, 0.5rem)",
696
- paddingInline: "1.5rem"
697
- }, {
698
- WebkitTapHighlightColor: "transparent",
699
- boxSizing: "border-box",
700
- borderRadius: `var(--Button-radius, ${t.vars.radius.sm})`,
701
- // to be controlled by other components, for example Input
702
- margin: "var(--Button-margin)",
703
- // to be controlled by other components, for example Input
704
- border: "none",
705
- backgroundColor: "transparent",
706
- cursor: "pointer",
707
- userSelect: "none",
708
- display: "inline-flex",
709
- alignItems: "center",
710
- justifyContent: "center",
711
- position: "relative",
712
- textDecoration: "none",
713
- // prevent user agent underline when used as anchor
714
- fontFamily: t.vars.fontFamily.body,
715
- fontWeight: t.vars.fontWeight.lg,
716
- lineHeight: t.vars.lineHeight.md
717
- }, a.fullWidth && {
718
- width: "100%"
719
- }, {
720
- [t.focus.selector]: t.focus.default
721
- }), v({}, (o = t.variants[a.variant]) == null ? void 0 : o[a.color], {
722
- "&:hover": {
723
- "@media (hover: hover)": (n = t.variants[`${a.variant}Hover`]) == null ? void 0 : n[a.color]
724
- },
725
- '&:active, &[aria-pressed="true"]': (r = t.variants[`${a.variant}Active`]) == null ? void 0 : r[a.color],
726
- [`&.${dt.disabled}`]: (e = t.variants[`${a.variant}Disabled`]) == null ? void 0 : e[a.color]
727
- }, a.loadingPosition === "center" && {
728
- // this has to come after the variant styles to take effect.
729
- [`&.${dt.loading}`]: {
730
- color: "transparent"
731
- }
732
- })];
733
- }, se = N("button", {
734
- name: "JoyButton",
735
- slot: "Root",
736
- overridesResolver: (t, a) => a.root
737
- })(ie), de = /* @__PURE__ */ u.forwardRef(function(a, o) {
738
- var n;
739
- const r = tt({
740
- props: a,
741
- name: "JoyButton"
742
- }), {
743
- children: e,
744
- action: i,
745
- color: p = "primary",
746
- variant: m = "solid",
747
- size: B = "md",
748
- fullWidth: b = !1,
749
- startDecorator: x,
750
- endDecorator: S,
751
- loading: C = !1,
752
- loadingPosition: D = "center",
753
- loadingIndicator: I,
754
- disabled: $,
755
- component: R,
756
- slots: y = {},
757
- slotProps: f = {}
758
- } = r, P = U(r, ae), T = u.useContext(Ut), g = u.useContext(Kt), d = a.variant || T.variant || m, H = a.size || T.size || B, _ = a.color || T.color || p, z = (n = a.loading || a.disabled) != null ? n : T.disabled || C || $, V = u.useRef(null), A = ct(V, o), {
759
- focusVisible: h,
760
- setFocusVisible: O,
761
- getRootProps: s
762
- } = Wt(v({}, r, {
763
- disabled: z,
764
- rootRef: A
765
- })), l = I ?? /* @__PURE__ */ E.jsx(kt, {
766
- color: _,
767
- thickness: {
768
- sm: 2,
769
- md: 3,
770
- lg: 4
771
- }[H] || 3
772
- });
773
- u.useImperativeHandle(i, () => ({
774
- focusVisible: () => {
775
- var L;
776
- O(!0), (L = V.current) == null || L.focus();
777
- }
778
- }), [O]);
779
- const c = v({}, r, {
780
- color: _,
781
- fullWidth: b,
782
- variant: d,
783
- size: H,
784
- focusVisible: h,
785
- loading: C,
786
- loadingPosition: D,
787
- disabled: z
788
- }), k = re(c), X = (L) => {
789
- var rt;
790
- let Y = r.onClick;
791
- if (typeof f.root == "function" ? Y = f.root(c).onClick : f.root && (Y = f.root.onClick), (rt = Y) == null || rt(L), g) {
792
- var ot;
793
- (ot = g.onClick) == null || ot.call(g, L, r.value);
794
- }
795
- };
796
- let F = r["aria-pressed"];
797
- typeof f.root == "function" ? F = f.root(c)["aria-pressed"] : f.root && (F = f.root["aria-pressed"]), g != null && g.value && (Array.isArray(g.value) ? F = g.value.indexOf(r.value) !== -1 : F = g.value === r.value);
798
- const j = v({}, P, {
799
- component: R,
800
- slots: y,
801
- slotProps: f
802
- }), [mt, ft] = M("root", {
803
- ref: o,
804
- className: k.root,
805
- elementType: se,
806
- externalForwardedProps: j,
807
- getSlotProps: s,
808
- ownerState: c,
809
- additionalProps: {
810
- onClick: X,
811
- "aria-pressed": F
812
- }
813
- }), [$t, ht] = M("startDecorator", {
814
- className: k.startDecorator,
815
- elementType: oe,
816
- externalForwardedProps: j,
817
- ownerState: c
818
- }), [bt, Ct] = M("endDecorator", {
819
- className: k.endDecorator,
820
- elementType: ne,
821
- externalForwardedProps: j,
822
- ownerState: c
823
- }), [yt, Bt] = M("loadingIndicatorCenter", {
824
- className: k.loadingIndicatorCenter,
825
- elementType: le,
826
- externalForwardedProps: j,
827
- ownerState: c
828
- });
829
- return /* @__PURE__ */ E.jsxs(mt, v({}, ft, {
830
- children: [(x || C && D === "start") && /* @__PURE__ */ E.jsx($t, v({}, ht, {
831
- children: C && D === "start" ? l : x
832
- })), e, C && D === "center" && /* @__PURE__ */ E.jsx(yt, v({}, Bt, {
833
- children: l
834
- })), (S || C && D === "end") && /* @__PURE__ */ E.jsx(bt, v({}, Ct, {
835
- children: C && D === "end" ? l : S
836
- }))]
837
- }));
838
- });
839
- de.muiName = "Button";
840
- function ce(t) {
841
- return Q("MuiCard", t);
842
- }
843
- const be = w("MuiCard", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "horizontal", "vertical"]), pe = ["className", "color", "component", "invertedColors", "size", "variant", "children", "orientation", "slots", "slotProps"], ue = (t) => {
844
- const {
845
- size: a,
846
- variant: o,
847
- color: n,
848
- orientation: r
849
- } = t, e = {
850
- root: ["root", r, o && `variant${W(o)}`, n && `color${W(n)}`, a && `size${W(a)}`]
851
- };
852
- return et(e, ce, {});
853
- }, ve = N("div")(({
854
- theme: t,
855
- ownerState: a
856
- }) => {
857
- var o;
858
- const {
859
- p: n,
860
- padding: r,
861
- borderRadius: e
862
- } = Ot({
863
- theme: t,
864
- ownerState: a
865
- }, ["p", "padding", "borderRadius"]);
866
- return [v({
867
- "--Icon-color": a.color !== "neutral" || a.variant === "solid" ? "currentColor" : t.vars.palette.text.icon,
868
- // a context variable for any child component
869
- "--Card-childRadius": "max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))",
870
- // AspectRatio integration
871
- "--AspectRatio-radius": "var(--Card-childRadius)",
872
- // Link integration
873
- "--unstable_actionMargin": "calc(-1 * var(--variant-borderWidth, 0px))",
874
- // Link, Radio, Checkbox integration
875
- "--unstable_actionRadius": "var(--Card-radius)",
876
- // CardCover integration
877
- "--CardCover-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
878
- // CardOverflow integration
879
- "--CardOverflow-offset": "calc(-1 * var(--Card-padding))",
880
- "--CardOverflow-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
881
- // Divider integration
882
- "--Divider-inset": "calc(-1 * var(--Card-padding))"
883
- }, a.size === "sm" && {
884
- "--Card-radius": t.vars.radius.sm,
885
- "--Card-padding": "0.625rem",
886
- gap: "0.5rem"
887
- }, a.size === "md" && {
888
- "--Card-radius": t.vars.radius.md,
889
- "--Card-padding": "1rem",
890
- gap: "0.75rem 1rem"
891
- }, a.size === "lg" && {
892
- "--Card-radius": t.vars.radius.lg,
893
- "--Card-padding": "1.5rem",
894
- gap: "1rem 1.5rem"
895
- }, {
896
- padding: "var(--Card-padding)",
897
- borderRadius: "var(--Card-radius)",
898
- backgroundColor: t.vars.palette.background.surface,
899
- position: "relative",
900
- display: "flex",
901
- flexDirection: a.orientation === "horizontal" ? "row" : "column"
902
- }, t.typography[`body-${a.size}`], a.variant === "solid" && a.color && a.invertedColors && Lt(a.color)(t), a.variant === "soft" && a.color && a.invertedColors && jt(a.color)(t), (o = t.variants[a.variant]) == null ? void 0 : o[a.color]), n !== void 0 && {
903
- "--Card-padding": n
904
- }, r !== void 0 && {
905
- "--Card-padding": r
906
- }, e !== void 0 && {
907
- "--Card-radius": e
908
- }];
909
- }), ge = N(ve, {
910
- name: "JoyCard",
911
- slot: "Root",
912
- overridesResolver: (t, a) => a.root
913
- })({}), Ce = /* @__PURE__ */ u.forwardRef(function(a, o) {
914
- const n = tt({
915
- props: a,
916
- name: "JoyCard"
917
- }), {
918
- className: r,
919
- color: e = "neutral",
920
- component: i = "div",
921
- invertedColors: p = !1,
922
- size: m = "md",
923
- variant: B = "outlined",
924
- children: b,
925
- orientation: x = "vertical",
926
- slots: S = {},
927
- slotProps: C = {}
928
- } = n, D = U(n, pe), I = v({}, n, {
929
- color: e,
930
- component: i,
931
- orientation: x,
932
- size: m,
933
- variant: B,
934
- invertedColors: p
935
- }), $ = ue(I), R = v({}, D, {
936
- component: i,
937
- slots: S,
938
- slotProps: C
939
- }), [y, f] = M("root", {
940
- ref: o,
941
- className: St($.root, r),
942
- elementType: ge,
943
- externalForwardedProps: R,
944
- ownerState: I
945
- });
946
- return /* @__PURE__ */ E.jsx(y, v({}, f, {
947
- children: u.Children.map(b, (P, T) => {
948
- if (!/* @__PURE__ */ u.isValidElement(P))
949
- return P;
950
- const g = {};
951
- if (ut(P, ["Divider"])) {
952
- var d, H;
953
- const _ = P.props;
954
- g.inset = (d = _ == null ? void 0 : _.inset) != null ? d : "context";
955
- const z = x === "vertical" ? "horizontal" : "vertical";
956
- g.orientation = (H = _ == null ? void 0 : _.orientation) != null ? H : z;
957
- }
958
- return T === 0 && (g["data-first-child"] = ""), T === u.Children.count(b) - 1 && (g["data-last-child"] = ""), /* @__PURE__ */ u.cloneElement(P, g);
959
- })
960
- }));
961
- }), ye = "$$material";
962
- function me(t, a) {
963
- const o = {
964
- ...a
965
- };
966
- for (const n in t)
967
- if (Object.prototype.hasOwnProperty.call(t, n)) {
968
- const r = n;
969
- if (r === "components" || r === "slots")
970
- o[r] = {
971
- ...t[r],
972
- ...o[r]
973
- };
974
- else if (r === "componentsProps" || r === "slotProps") {
975
- const e = t[r], i = a[r];
976
- if (!i)
977
- o[r] = e || {};
978
- else if (!e)
979
- o[r] = i;
980
- else {
981
- o[r] = {
982
- ...i
983
- };
984
- for (const p in e)
985
- if (Object.prototype.hasOwnProperty.call(e, p)) {
986
- const m = p;
987
- o[r][m] = me(e[m], i[m]);
988
- }
989
- }
990
- } else o[r] === void 0 && (o[r] = t[r]);
991
- }
992
- return o;
993
- }
994
- export {
995
- de as B,
996
- Ce as C,
997
- K as I,
998
- ve as S,
999
- te as T,
1000
- it as a,
1001
- Yt as b,
1002
- he as c,
1003
- Lt as d,
1004
- jt as e,
1005
- Wt as f,
1006
- me as g,
1007
- ye as h,
1008
- ut as i,
1009
- be as j,
1010
- dt as k,
1011
- Ut as l,
1012
- Kt as m,
1013
- Ot as r,
1014
- $e as s,
1015
- At as u
1016
- };