fansunited-widgets-cdn 0.0.84 → 0.0.86-RC1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/Alert-CuOsmojH.js +149 -0
- package/chunks/AspectRatio-D3Sgxj7p.js +125 -0
- package/chunks/Avatar-BTsEKfhc.js +186 -0
- package/chunks/Button-BV7YIFkS.js +858 -0
- package/chunks/Card-DRIT0wtY.js +129 -0
- package/chunks/CardContent-CD-WZh1l.js +60 -0
- package/chunks/ChevronRight-BrCKlr3T.js +11 -0
- package/chunks/Chip-6HLNTHMI.js +281 -0
- package/chunks/ClassicQuizWrapper-t04e9_6c.js +4883 -0
- package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +1560 -0
- package/chunks/CollectLeadWrapper-CVAVswua.js +1294 -0
- package/chunks/DialogActions-C5kAgHal.js +45 -0
- package/chunks/DialogContent-MIXff4nd.js +60 -0
- package/chunks/EitherOrById-CAo8gPjm.js +1496 -0
- package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +47 -0
- package/chunks/Error-DhQL89pn-BwTV1meb.js +418 -0
- package/chunks/EventGameWrapper-BxyLL3eA.js +7633 -0
- package/chunks/Grid-Dpv_ZL23.js +279 -0
- package/chunks/IconButton-Lt9Xks7c.js +207 -0
- package/chunks/Link-DLuj1USf.js +228 -0
- package/chunks/List-DLPlZGTP.js +397 -0
- package/chunks/ListItemDecorator-CE2eQLip.js +1882 -0
- package/chunks/MatchPredictionContainer-Ct6gXvLw.js +751 -0
- package/chunks/MatchQuizWrapper-Fu6RfWVn.js +11046 -0
- package/chunks/ModalDialog-Ci3hulZA.js +619 -0
- package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +2764 -0
- package/chunks/OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js +896 -0
- package/chunks/OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js +146 -0
- package/chunks/PersonalityQuizWrapper-MpUK4n3Y.js +34374 -0
- package/chunks/PlayerOfTheMatch-D4vuR7pz.js +1406 -0
- package/chunks/PollWrapper-CzKj8xxE.js +4198 -0
- package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +12717 -0
- package/chunks/Portal-DA1mxzSo.js +41 -0
- package/chunks/PreviewQuizById-WWS_LyJR.js +4864 -0
- package/chunks/Select-p_cHpLhi.js +3418 -0
- package/chunks/Sheet-BaCzogZK.js +167 -0
- package/chunks/Snackbar-DHxnbCA3.js +358 -0
- package/chunks/Stack-Dgf2LXN0.js +117 -0
- package/chunks/Tabs-CSu_cWNi.js +784 -0
- package/chunks/TeamNextMatchPrediction-C7HilNqW.js +6 -0
- package/chunks/Tutorial-DFNZxmAx.js +427 -0
- package/chunks/createLucideIcon-B6NxpYkb.js +79 -0
- package/chunks/createSvgIcon-7h7XC877.js +119 -0
- package/chunks/createSvgIcon-DVA0KIUd.js +2490 -0
- package/chunks/dataAttributeParser-CF9vxaVN.js +28 -0
- package/chunks/default-quiz-bg-CTzaADn7.js +4 -0
- package/chunks/getReactElementRef-BD-S8A24.js +25 -0
- package/chunks/index-24AwmTVJ.js +85 -0
- package/chunks/index-3vJS8JzK.js +63 -0
- package/chunks/index-BSD7mvEU.js +57 -0
- package/chunks/index-BU6iona7.js +57 -0
- package/chunks/index-BqCHiyI6.js +59 -0
- package/chunks/index-C5qRf4TV.js +20 -0
- package/chunks/index-C9MpfjqV.js +35 -0
- package/chunks/index-CMmQs5A5.js +56 -0
- package/chunks/index-CicEY2Jv.js +5 -0
- package/chunks/index-DNeawo0R.js +17 -0
- package/chunks/index-DePIySlY.js +29 -0
- package/chunks/index-DoRYU_1L.js +41 -0
- package/chunks/index-DvgG9XJj.js +20 -0
- package/chunks/index-QpZE-92Y.js +33 -0
- package/chunks/index-rgFj976B.js +17 -0
- package/chunks/index-tzsdMoo-.js +16 -0
- package/chunks/index.es-CHqz6mjo.js +6162 -0
- package/chunks/init-BEkECL0v.js +32 -0
- package/chunks/main-XP7dqk6g.js +39843 -0
- package/chunks/resolveProps-BfYZubfk.js +37 -0
- package/chunks/users-D_xgC4iQ.js +16 -0
- package/chunks/variantColorInheritance-DI3wUohX.js +28 -0
- package/fu-widgets-loader.es.js +76 -0
- package/fu-widgets-loader.js +1 -0
- package/fu-widgets.es.js +4 -0
- package/fu-widgets.iife.js +621 -682
- package/manifest.json +84 -0
- package/package.json +9 -2
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
import { ao as Bt, r as v, Z as lt, w as u, a5 as et, ap as it, F as st, G as ct, v as dt, _ as Q, Q as Dt, x as A, y as F, j as _, z as O, D as pt, C as xt } from "./main-XP7dqk6g.js";
|
|
2
|
+
const ie = Bt();
|
|
3
|
+
function kt(t, a) {
|
|
4
|
+
var n, o;
|
|
5
|
+
return /* @__PURE__ */ v.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
|
+
(n = t.type.muiName) != null ? n : (o = t.type) == null || (o = o._payload) == null || (o = o.value) == null ? void 0 : o.muiName
|
|
10
|
+
) !== -1;
|
|
11
|
+
}
|
|
12
|
+
const at = {};
|
|
13
|
+
function St(t, a) {
|
|
14
|
+
const n = v.useRef(at);
|
|
15
|
+
return n.current === at && (n.current = t(a)), n;
|
|
16
|
+
}
|
|
17
|
+
const Tt = [];
|
|
18
|
+
function It(t) {
|
|
19
|
+
v.useEffect(t, Tt);
|
|
20
|
+
}
|
|
21
|
+
class K {
|
|
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 K();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
32
|
+
*/
|
|
33
|
+
start(a, n) {
|
|
34
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
35
|
+
this.currentId = null, n();
|
|
36
|
+
}, a);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function se() {
|
|
40
|
+
const t = St(K.create).current;
|
|
41
|
+
return It(t.disposeEffect), t;
|
|
42
|
+
}
|
|
43
|
+
let J = !0, Y = !1;
|
|
44
|
+
const Rt = new K(), Ht = {
|
|
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 _t(t) {
|
|
60
|
+
const {
|
|
61
|
+
type: a,
|
|
62
|
+
tagName: n
|
|
63
|
+
} = t;
|
|
64
|
+
return !!(n === "INPUT" && Ht[a] && !t.readOnly || n === "TEXTAREA" && !t.readOnly || t.isContentEditable);
|
|
65
|
+
}
|
|
66
|
+
function Pt(t) {
|
|
67
|
+
t.metaKey || t.altKey || t.ctrlKey || (J = !0);
|
|
68
|
+
}
|
|
69
|
+
function Z() {
|
|
70
|
+
J = !1;
|
|
71
|
+
}
|
|
72
|
+
function Et() {
|
|
73
|
+
this.visibilityState === "hidden" && Y && (J = !0);
|
|
74
|
+
}
|
|
75
|
+
function Vt(t) {
|
|
76
|
+
t.addEventListener("keydown", Pt, !0), t.addEventListener("mousedown", Z, !0), t.addEventListener("pointerdown", Z, !0), t.addEventListener("touchstart", Z, !0), t.addEventListener("visibilitychange", Et, !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 J || _t(a);
|
|
87
|
+
}
|
|
88
|
+
function zt() {
|
|
89
|
+
const t = v.useCallback((r) => {
|
|
90
|
+
r != null && Vt(r.ownerDocument);
|
|
91
|
+
}, []), a = v.useRef(!1);
|
|
92
|
+
function n() {
|
|
93
|
+
return a.current ? (Y = !0, Rt.start(100, () => {
|
|
94
|
+
Y = !1;
|
|
95
|
+
}), a.current = !1, !0) : !1;
|
|
96
|
+
}
|
|
97
|
+
function o(r) {
|
|
98
|
+
return Nt(r) ? (a.current = !0, !0) : !1;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
isFocusVisibleRef: a,
|
|
102
|
+
onFocus: o,
|
|
103
|
+
onBlur: n,
|
|
104
|
+
ref: t
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function At(t) {
|
|
108
|
+
const {
|
|
109
|
+
rootElementName: a = ""
|
|
110
|
+
} = t, [n, o] = v.useState(a.toUpperCase()), r = v.useCallback((e) => {
|
|
111
|
+
var i;
|
|
112
|
+
o((i = e == null ? void 0 : e.tagName) != null ? i : "");
|
|
113
|
+
}, []);
|
|
114
|
+
return [n, r];
|
|
115
|
+
}
|
|
116
|
+
function Ft(t = {}) {
|
|
117
|
+
const {
|
|
118
|
+
disabled: a = !1,
|
|
119
|
+
focusableWhenDisabled: n,
|
|
120
|
+
href: o,
|
|
121
|
+
rootRef: r,
|
|
122
|
+
tabIndex: e,
|
|
123
|
+
to: i,
|
|
124
|
+
type: p,
|
|
125
|
+
rootElementName: y
|
|
126
|
+
} = t, B = v.useRef(null), [D, k] = v.useState(!1), {
|
|
127
|
+
isFocusVisibleRef: S,
|
|
128
|
+
onFocus: b,
|
|
129
|
+
onBlur: x,
|
|
130
|
+
ref: R
|
|
131
|
+
} = zt(), [f, T] = v.useState(!1);
|
|
132
|
+
a && !n && f && T(!1), v.useEffect(() => {
|
|
133
|
+
S.current = f;
|
|
134
|
+
}, [f, S]);
|
|
135
|
+
const [C, g] = At({
|
|
136
|
+
rootElementName: y ?? (o || i ? "a" : void 0)
|
|
137
|
+
}), P = (s) => (l) => {
|
|
138
|
+
var c;
|
|
139
|
+
f && l.preventDefault(), (c = s.onMouseLeave) == null || c.call(s, l);
|
|
140
|
+
}, I = (s) => (l) => {
|
|
141
|
+
var c;
|
|
142
|
+
x(l), S.current === !1 && T(!1), (c = s.onBlur) == null || c.call(s, l);
|
|
143
|
+
}, $ = (s) => (l) => {
|
|
144
|
+
var c;
|
|
145
|
+
if (B.current || (B.current = l.currentTarget), b(l), S.current === !0) {
|
|
146
|
+
var h;
|
|
147
|
+
T(!0), (h = s.onFocusVisible) == null || h.call(s, l);
|
|
148
|
+
}
|
|
149
|
+
(c = s.onFocus) == null || c.call(s, l);
|
|
150
|
+
}, d = () => {
|
|
151
|
+
const s = B.current;
|
|
152
|
+
return C === "BUTTON" || C === "INPUT" && ["button", "submit", "reset"].includes(s == null ? void 0 : s.type) || C === "A" && (s == null ? void 0 : s.href);
|
|
153
|
+
}, E = (s) => (l) => {
|
|
154
|
+
if (!a) {
|
|
155
|
+
var c;
|
|
156
|
+
(c = s.onClick) == null || c.call(s, l);
|
|
157
|
+
}
|
|
158
|
+
}, N = (s) => (l) => {
|
|
159
|
+
var c;
|
|
160
|
+
a || (k(!0), document.addEventListener("mouseup", () => {
|
|
161
|
+
k(!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 && k(!0), l.target === l.currentTarget && !d() && l.key === "Enter" && !a)) {
|
|
168
|
+
var h;
|
|
169
|
+
(h = s.onClick) == null || h.call(s, l), l.preventDefault();
|
|
170
|
+
}
|
|
171
|
+
}, H = (s) => (l) => {
|
|
172
|
+
var c;
|
|
173
|
+
if (l.target === l.currentTarget && k(!1), (c = s.onKeyUp) == null || c.call(s, l), l.target === l.currentTarget && !d() && !a && l.key === " " && !l.defaultMuiPrevented) {
|
|
174
|
+
var h;
|
|
175
|
+
(h = s.onClick) == null || h.call(s, l);
|
|
176
|
+
}
|
|
177
|
+
}, V = lt(g, r, R, B), m = {};
|
|
178
|
+
return e !== void 0 && (m.tabIndex = e), C === "BUTTON" ? (m.type = p ?? "button", n ? m["aria-disabled"] = a : m.disabled = a) : C === "INPUT" ? p && ["button", "submit", "reset"].includes(p) && (n ? m["aria-disabled"] = a : m.disabled = a) : C !== "" && (!o && !i && (m.role = "button", m.tabIndex = e ?? 0), a && (m["aria-disabled"] = a, m.tabIndex = n ? e ?? 0 : -1)), {
|
|
179
|
+
getRootProps: (s = {}) => {
|
|
180
|
+
const l = u({}, et(t), et(s)), c = u({
|
|
181
|
+
type: p
|
|
182
|
+
}, l, m, s, {
|
|
183
|
+
onBlur: I(l),
|
|
184
|
+
onClick: E(l),
|
|
185
|
+
onFocus: $(l),
|
|
186
|
+
onKeyDown: z(l),
|
|
187
|
+
onKeyUp: H(l),
|
|
188
|
+
onMouseDown: N(l),
|
|
189
|
+
onMouseLeave: P(l),
|
|
190
|
+
ref: V
|
|
191
|
+
});
|
|
192
|
+
return delete c.onFocusVisible, c;
|
|
193
|
+
},
|
|
194
|
+
focusVisible: f,
|
|
195
|
+
setFocusVisible: T,
|
|
196
|
+
active: D,
|
|
197
|
+
rootRef: V
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const ce = ({
|
|
201
|
+
theme: t,
|
|
202
|
+
ownerState: a
|
|
203
|
+
}, n) => {
|
|
204
|
+
let o = {};
|
|
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" && (o = u({}, o, e));
|
|
212
|
+
}
|
|
213
|
+
return a.sx && (r(a.sx), n.forEach((e) => {
|
|
214
|
+
const i = o[e];
|
|
215
|
+
if (typeof i == "string" || typeof i == "number")
|
|
216
|
+
if (e === "borderRadius")
|
|
217
|
+
if (typeof i == "number")
|
|
218
|
+
o[e] = `${i}px`;
|
|
219
|
+
else {
|
|
220
|
+
var p;
|
|
221
|
+
o[e] = ((p = t.vars) == null ? void 0 : p.radius[i]) || i;
|
|
222
|
+
}
|
|
223
|
+
else ["p", "padding", "m", "margin"].indexOf(e) !== -1 && typeof i == "number" ? o[e] = t.spacing(i) : o[e] = i;
|
|
224
|
+
else typeof i == "function" ? o[e] = i(t) : o[e] = void 0;
|
|
225
|
+
})), o;
|
|
226
|
+
}, q = (t) => (a) => `--${t ? `${t}-` : ""}${a.replace(/^--/, "")}`, j = "data-skip-inverted-colors", ut = `& :not([${j}], [${j}] *)`, vt = (t) => {
|
|
227
|
+
var a, n, o, r, e, i, p, y, B, D, k, S, b, x, R, f, T, C, g, P, I, $;
|
|
228
|
+
const d = q(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")]: `${(n = t.colorSchemes.light) == null ? void 0 : n.palette.background.body} !important`,
|
|
262
|
+
[d("--palette-background-surface")]: `${(o = t.colorSchemes.light) == null ? void 0 : o.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")]: `${(y = t.colorSchemes.light) == null ? void 0 : y.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")]: `${(D = t.colorSchemes.light) == null ? void 0 : D.palette.text.tertiary} !important`,
|
|
270
|
+
[d("--palette-divider")]: `${(k = t.colorSchemes.light) == null ? void 0 : k.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")]: `${(b = t.colorSchemes.dark) == null ? void 0 : b.palette.background.body} !important`,
|
|
275
|
+
[d("--palette-background-surface")]: `${(x = t.colorSchemes.dark) == null ? void 0 : x.palette.background.surface} !important`,
|
|
276
|
+
[d("--palette-background-popup")]: `${(R = t.colorSchemes.dark) == null ? void 0 : R.palette.background.popup} !important`,
|
|
277
|
+
[d("--palette-background-level1")]: `${(f = t.colorSchemes.dark) == null ? void 0 : f.palette.background.level1} !important`,
|
|
278
|
+
[d("--palette-background-level2")]: `${(T = t.colorSchemes.dark) == null ? void 0 : T.palette.background.level2} !important`,
|
|
279
|
+
[d("--palette-background-level3")]: `${(C = t.colorSchemes.dark) == null ? void 0 : C.palette.background.level3} !important`,
|
|
280
|
+
[d("--palette-text-primary")]: `${(g = t.colorSchemes.dark) == null ? void 0 : g.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")]: `${(I = t.colorSchemes.dark) == null ? void 0 : I.palette.text.tertiary} !important`,
|
|
283
|
+
[d("--palette-divider")]: `${($ = t.colorSchemes.dark) == null ? void 0 : $.palette.divider} !important`
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
function Mt(t) {
|
|
288
|
+
return t.theme !== void 0;
|
|
289
|
+
}
|
|
290
|
+
const de = (t) => (a) => {
|
|
291
|
+
const n = Mt(a) ? a.theme : a, o = it(n.cssVarPrefix), r = q(n.cssVarPrefix), e = (i) => {
|
|
292
|
+
const p = i.split("-");
|
|
293
|
+
return o(i, n.palette[p[1]][p[2]]);
|
|
294
|
+
};
|
|
295
|
+
return {
|
|
296
|
+
[ut]: {
|
|
297
|
+
"--Badge-ringColor": e(`palette-${t}-solidBg`),
|
|
298
|
+
"--Icon-color": "currentColor",
|
|
299
|
+
[`${n.getColorSchemeSelector("light")}, ${n.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
|
+
[`&, & [${j}]`]: vt(n)
|
|
343
|
+
};
|
|
344
|
+
}, pe = (t) => (a) => {
|
|
345
|
+
const {
|
|
346
|
+
theme: n = a
|
|
347
|
+
} = a, o = it(n.cssVarPrefix), r = q(n.cssVarPrefix), e = (i) => {
|
|
348
|
+
const p = i.split("-");
|
|
349
|
+
return o(i, n.palette[p[1]][p[2]]);
|
|
350
|
+
};
|
|
351
|
+
return {
|
|
352
|
+
[ut]: {
|
|
353
|
+
"--Badge-ringColor": e(`palette-${t}-softBg`),
|
|
354
|
+
"--Icon-color": "currentColor",
|
|
355
|
+
[n.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
|
+
[n.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
|
+
[`&, & [${j}]`]: vt(n)
|
|
439
|
+
};
|
|
440
|
+
}, Lt = /* @__PURE__ */ v.createContext({}), Wt = /* @__PURE__ */ v.createContext(void 0);
|
|
441
|
+
function Ot(t) {
|
|
442
|
+
return st("MuiTypography", t);
|
|
443
|
+
}
|
|
444
|
+
ct("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 Ut = ["color", "textColor"], jt = ["component", "gutterBottom", "noWrap", "level", "levelMapping", "children", "endDecorator", "startDecorator", "variant", "slots", "slotProps"], rt = /* @__PURE__ */ v.createContext(!1), Kt = /* @__PURE__ */ v.createContext(!1), Jt = (t) => {
|
|
446
|
+
const {
|
|
447
|
+
gutterBottom: a,
|
|
448
|
+
noWrap: n,
|
|
449
|
+
level: o,
|
|
450
|
+
color: r,
|
|
451
|
+
variant: e
|
|
452
|
+
} = t, i = {
|
|
453
|
+
root: ["root", o, a && "gutterBottom", n && "noWrap", r && `color${O(r)}`, e && `variant${O(e)}`],
|
|
454
|
+
startDecorator: ["startDecorator"],
|
|
455
|
+
endDecorator: ["endDecorator"]
|
|
456
|
+
};
|
|
457
|
+
return pt(i, Ot, {});
|
|
458
|
+
}, Gt = F("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
|
+
}), Xt = F("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
|
+
}), Zt = F("span", {
|
|
473
|
+
name: "JoyTypography",
|
|
474
|
+
slot: "Root",
|
|
475
|
+
overridesResolver: (t, a) => a.root
|
|
476
|
+
})(({
|
|
477
|
+
theme: t,
|
|
478
|
+
ownerState: a
|
|
479
|
+
}) => {
|
|
480
|
+
var n, o, r, e, i;
|
|
481
|
+
const p = a.level !== "inherit" ? (n = t.typography[a.level]) == null ? void 0 : n.lineHeight : "1";
|
|
482
|
+
return u({
|
|
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
|
+
} : u({
|
|
492
|
+
display: "block"
|
|
493
|
+
}, a.unstable_hasSkeleton && {
|
|
494
|
+
position: "relative"
|
|
495
|
+
}), (a.startDecorator || a.endDecorator) && u({
|
|
496
|
+
display: "flex",
|
|
497
|
+
alignItems: "center"
|
|
498
|
+
}, a.nesting && u({
|
|
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" && (o = (r = t.typography[a.level]) == null ? void 0 : r.fontSize) != null ? o : "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 && u({
|
|
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
|
+
}), nt = {
|
|
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
|
+
}, Qt = /* @__PURE__ */ v.forwardRef(function(a, n) {
|
|
534
|
+
var o;
|
|
535
|
+
const r = dt({
|
|
536
|
+
props: a,
|
|
537
|
+
name: "JoyTypography"
|
|
538
|
+
}), {
|
|
539
|
+
color: e,
|
|
540
|
+
textColor: i
|
|
541
|
+
} = r, p = Q(r, Ut), y = v.useContext(rt), B = v.useContext(Kt), D = Dt(u({}, p, {
|
|
542
|
+
color: i
|
|
543
|
+
})), {
|
|
544
|
+
component: k,
|
|
545
|
+
gutterBottom: S = !1,
|
|
546
|
+
noWrap: b = !1,
|
|
547
|
+
level: x = "body-md",
|
|
548
|
+
levelMapping: R = nt,
|
|
549
|
+
children: f,
|
|
550
|
+
endDecorator: T,
|
|
551
|
+
startDecorator: C,
|
|
552
|
+
variant: g,
|
|
553
|
+
slots: P = {},
|
|
554
|
+
slotProps: I = {}
|
|
555
|
+
} = D, $ = Q(D, jt), d = (o = a.color) != null ? o : g ? e ?? "neutral" : e, E = y || B ? a.level || "inherit" : x, N = kt(f, ["Skeleton"]), z = k || (y ? "span" : R[E] || nt[E] || "span"), H = u({}, D, {
|
|
556
|
+
level: E,
|
|
557
|
+
component: z,
|
|
558
|
+
color: d,
|
|
559
|
+
gutterBottom: S,
|
|
560
|
+
noWrap: b,
|
|
561
|
+
nesting: y,
|
|
562
|
+
variant: g,
|
|
563
|
+
unstable_hasSkeleton: N
|
|
564
|
+
}), V = Jt(H), m = u({}, $, {
|
|
565
|
+
component: z,
|
|
566
|
+
slots: P,
|
|
567
|
+
slotProps: I
|
|
568
|
+
}), [M, s] = A("root", {
|
|
569
|
+
ref: n,
|
|
570
|
+
className: V.root,
|
|
571
|
+
elementType: Zt,
|
|
572
|
+
externalForwardedProps: m,
|
|
573
|
+
ownerState: H
|
|
574
|
+
}), [l, c] = A("startDecorator", {
|
|
575
|
+
className: V.startDecorator,
|
|
576
|
+
elementType: Gt,
|
|
577
|
+
externalForwardedProps: m,
|
|
578
|
+
ownerState: H
|
|
579
|
+
}), [h, G] = A("endDecorator", {
|
|
580
|
+
className: V.endDecorator,
|
|
581
|
+
elementType: Xt,
|
|
582
|
+
externalForwardedProps: m,
|
|
583
|
+
ownerState: H
|
|
584
|
+
});
|
|
585
|
+
return /* @__PURE__ */ _.jsx(rt.Provider, {
|
|
586
|
+
value: !0,
|
|
587
|
+
children: /* @__PURE__ */ _.jsxs(M, u({}, s, {
|
|
588
|
+
children: [C && /* @__PURE__ */ _.jsx(l, u({}, c, {
|
|
589
|
+
children: C
|
|
590
|
+
})), N ? /* @__PURE__ */ v.cloneElement(f, {
|
|
591
|
+
variant: f.props.variant || "inline"
|
|
592
|
+
}) : f, T && /* @__PURE__ */ _.jsx(h, u({}, G, {
|
|
593
|
+
children: T
|
|
594
|
+
}))]
|
|
595
|
+
}))
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
Qt.muiName = "Typography";
|
|
599
|
+
function Yt(t) {
|
|
600
|
+
return st("MuiButton", t);
|
|
601
|
+
}
|
|
602
|
+
const ot = ct("MuiButton", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "focusVisible", "disabled", "sizeSm", "sizeMd", "sizeLg", "fullWidth", "startDecorator", "endDecorator", "loading", "loadingIndicatorCenter"]), qt = ["children", "action", "color", "variant", "size", "fullWidth", "startDecorator", "endDecorator", "loading", "loadingPosition", "loadingIndicator", "disabled", "component", "slots", "slotProps"], wt = (t) => {
|
|
603
|
+
const {
|
|
604
|
+
color: a,
|
|
605
|
+
disabled: n,
|
|
606
|
+
focusVisible: o,
|
|
607
|
+
focusVisibleClassName: r,
|
|
608
|
+
fullWidth: e,
|
|
609
|
+
size: i,
|
|
610
|
+
variant: p,
|
|
611
|
+
loading: y
|
|
612
|
+
} = t, B = {
|
|
613
|
+
root: ["root", n && "disabled", o && "focusVisible", e && "fullWidth", p && `variant${O(p)}`, a && `color${O(a)}`, i && `size${O(i)}`, y && "loading"],
|
|
614
|
+
startDecorator: ["startDecorator"],
|
|
615
|
+
endDecorator: ["endDecorator"],
|
|
616
|
+
loadingIndicatorCenter: ["loadingIndicatorCenter"]
|
|
617
|
+
}, D = pt(B, Yt, {});
|
|
618
|
+
return o && r && (D.root += ` ${r}`), D;
|
|
619
|
+
}, te = F("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
|
+
}), ee = F("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
|
+
}), ae = F("span", {
|
|
638
|
+
name: "JoyButton",
|
|
639
|
+
slot: "LoadingCenter",
|
|
640
|
+
overridesResolver: (t, a) => a.loadingIndicatorCenter
|
|
641
|
+
})(({
|
|
642
|
+
theme: t,
|
|
643
|
+
ownerState: a
|
|
644
|
+
}) => {
|
|
645
|
+
var n, o;
|
|
646
|
+
return u({
|
|
647
|
+
display: "inherit",
|
|
648
|
+
position: "absolute",
|
|
649
|
+
left: "50%",
|
|
650
|
+
transform: "translateX(-50%)",
|
|
651
|
+
color: (n = t.variants[a.variant]) == null || (n = n[a.color]) == null ? void 0 : n.color
|
|
652
|
+
}, a.disabled && {
|
|
653
|
+
color: (o = t.variants[`${a.variant}Disabled`]) == null || (o = o[a.color]) == null ? void 0 : o.color
|
|
654
|
+
});
|
|
655
|
+
}), re = ({
|
|
656
|
+
theme: t,
|
|
657
|
+
ownerState: a
|
|
658
|
+
}) => {
|
|
659
|
+
var n, o, r, e;
|
|
660
|
+
return [u({
|
|
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
|
+
}), u({}, (n = t.variants[a.variant]) == null ? void 0 : n[a.color], {
|
|
722
|
+
"&:hover": {
|
|
723
|
+
"@media (hover: hover)": (o = t.variants[`${a.variant}Hover`]) == null ? void 0 : o[a.color]
|
|
724
|
+
},
|
|
725
|
+
'&:active, &[aria-pressed="true"]': (r = t.variants[`${a.variant}Active`]) == null ? void 0 : r[a.color],
|
|
726
|
+
[`&.${ot.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
|
+
[`&.${ot.loading}`]: {
|
|
730
|
+
color: "transparent"
|
|
731
|
+
}
|
|
732
|
+
})];
|
|
733
|
+
}, ne = F("button", {
|
|
734
|
+
name: "JoyButton",
|
|
735
|
+
slot: "Root",
|
|
736
|
+
overridesResolver: (t, a) => a.root
|
|
737
|
+
})(re), oe = /* @__PURE__ */ v.forwardRef(function(a, n) {
|
|
738
|
+
var o;
|
|
739
|
+
const r = dt({
|
|
740
|
+
props: a,
|
|
741
|
+
name: "JoyButton"
|
|
742
|
+
}), {
|
|
743
|
+
children: e,
|
|
744
|
+
action: i,
|
|
745
|
+
color: p = "primary",
|
|
746
|
+
variant: y = "solid",
|
|
747
|
+
size: B = "md",
|
|
748
|
+
fullWidth: D = !1,
|
|
749
|
+
startDecorator: k,
|
|
750
|
+
endDecorator: S,
|
|
751
|
+
loading: b = !1,
|
|
752
|
+
loadingPosition: x = "center",
|
|
753
|
+
loadingIndicator: R,
|
|
754
|
+
disabled: f,
|
|
755
|
+
component: T,
|
|
756
|
+
slots: C = {},
|
|
757
|
+
slotProps: g = {}
|
|
758
|
+
} = r, P = Q(r, qt), I = v.useContext(Lt), $ = v.useContext(Wt), d = a.variant || I.variant || y, E = a.size || I.size || B, N = a.color || I.color || p, z = (o = a.loading || a.disabled) != null ? o : I.disabled || b || f, H = v.useRef(null), V = lt(H, n), {
|
|
759
|
+
focusVisible: m,
|
|
760
|
+
setFocusVisible: M,
|
|
761
|
+
getRootProps: s
|
|
762
|
+
} = Ft(u({}, r, {
|
|
763
|
+
disabled: z,
|
|
764
|
+
rootRef: V
|
|
765
|
+
})), l = R ?? /* @__PURE__ */ _.jsx(xt, {
|
|
766
|
+
color: N,
|
|
767
|
+
thickness: {
|
|
768
|
+
sm: 2,
|
|
769
|
+
md: 3,
|
|
770
|
+
lg: 4
|
|
771
|
+
}[E] || 3
|
|
772
|
+
});
|
|
773
|
+
v.useImperativeHandle(i, () => ({
|
|
774
|
+
focusVisible: () => {
|
|
775
|
+
var W;
|
|
776
|
+
M(!0), (W = H.current) == null || W.focus();
|
|
777
|
+
}
|
|
778
|
+
}), [M]);
|
|
779
|
+
const c = u({}, r, {
|
|
780
|
+
color: N,
|
|
781
|
+
fullWidth: D,
|
|
782
|
+
variant: d,
|
|
783
|
+
size: E,
|
|
784
|
+
focusVisible: m,
|
|
785
|
+
loading: b,
|
|
786
|
+
loadingPosition: x,
|
|
787
|
+
disabled: z
|
|
788
|
+
}), h = wt(c), G = (W) => {
|
|
789
|
+
var w;
|
|
790
|
+
let X = r.onClick;
|
|
791
|
+
if (typeof g.root == "function" ? X = g.root(c).onClick : g.root && (X = g.root.onClick), (w = X) == null || w(W), $) {
|
|
792
|
+
var tt;
|
|
793
|
+
(tt = $.onClick) == null || tt.call($, W, r.value);
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
let L = r["aria-pressed"];
|
|
797
|
+
typeof g.root == "function" ? L = g.root(c)["aria-pressed"] : g.root && (L = g.root["aria-pressed"]), $ != null && $.value && (Array.isArray($.value) ? L = $.value.indexOf(r.value) !== -1 : L = $.value === r.value);
|
|
798
|
+
const U = u({}, P, {
|
|
799
|
+
component: T,
|
|
800
|
+
slots: C,
|
|
801
|
+
slotProps: g
|
|
802
|
+
}), [gt, mt] = A("root", {
|
|
803
|
+
ref: n,
|
|
804
|
+
className: h.root,
|
|
805
|
+
elementType: ne,
|
|
806
|
+
externalForwardedProps: U,
|
|
807
|
+
getSlotProps: s,
|
|
808
|
+
ownerState: c,
|
|
809
|
+
additionalProps: {
|
|
810
|
+
onClick: G,
|
|
811
|
+
"aria-pressed": L
|
|
812
|
+
}
|
|
813
|
+
}), [ft, $t] = A("startDecorator", {
|
|
814
|
+
className: h.startDecorator,
|
|
815
|
+
elementType: te,
|
|
816
|
+
externalForwardedProps: U,
|
|
817
|
+
ownerState: c
|
|
818
|
+
}), [ht, bt] = A("endDecorator", {
|
|
819
|
+
className: h.endDecorator,
|
|
820
|
+
elementType: ee,
|
|
821
|
+
externalForwardedProps: U,
|
|
822
|
+
ownerState: c
|
|
823
|
+
}), [Ct, yt] = A("loadingIndicatorCenter", {
|
|
824
|
+
className: h.loadingIndicatorCenter,
|
|
825
|
+
elementType: ae,
|
|
826
|
+
externalForwardedProps: U,
|
|
827
|
+
ownerState: c
|
|
828
|
+
});
|
|
829
|
+
return /* @__PURE__ */ _.jsxs(gt, u({}, mt, {
|
|
830
|
+
children: [(k || b && x === "start") && /* @__PURE__ */ _.jsx(ft, u({}, $t, {
|
|
831
|
+
children: b && x === "start" ? l : k
|
|
832
|
+
})), e, b && x === "center" && /* @__PURE__ */ _.jsx(Ct, u({}, yt, {
|
|
833
|
+
children: l
|
|
834
|
+
})), (S || b && x === "end") && /* @__PURE__ */ _.jsx(ht, u({}, bt, {
|
|
835
|
+
children: b && x === "end" ? l : S
|
|
836
|
+
}))]
|
|
837
|
+
}));
|
|
838
|
+
});
|
|
839
|
+
oe.muiName = "Button";
|
|
840
|
+
export {
|
|
841
|
+
oe as B,
|
|
842
|
+
j as I,
|
|
843
|
+
Qt as T,
|
|
844
|
+
zt as a,
|
|
845
|
+
rt as b,
|
|
846
|
+
Kt as c,
|
|
847
|
+
se as d,
|
|
848
|
+
K as e,
|
|
849
|
+
ot as f,
|
|
850
|
+
de as g,
|
|
851
|
+
pe as h,
|
|
852
|
+
kt as i,
|
|
853
|
+
Lt as j,
|
|
854
|
+
Wt as k,
|
|
855
|
+
ce as r,
|
|
856
|
+
ie as s,
|
|
857
|
+
Ft as u
|
|
858
|
+
};
|