fansunited-widgets-cdn 0.0.85 → 0.0.86-RC2
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 +73 -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,167 @@
|
|
|
1
|
+
import { F as f, G as m, r as P, v as _, _ as k, w as n, x as A, y, E as z, j as N, D, z as h, a6 as R } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { f as $, r as F, g as I, h as U } from "./Button-BV7YIFkS.js";
|
|
3
|
+
import { i as M } from "./IconButton-Lt9Xks7c.js";
|
|
4
|
+
import { c as S } from "./Card-DRIT0wtY.js";
|
|
5
|
+
import { a as j } from "./CardContent-CD-WZh1l.js";
|
|
6
|
+
function B(o) {
|
|
7
|
+
return f("MuiCardActions", o);
|
|
8
|
+
}
|
|
9
|
+
m("MuiCardActions", ["root"]);
|
|
10
|
+
function Z(o) {
|
|
11
|
+
return f("MuiDivider", o);
|
|
12
|
+
}
|
|
13
|
+
const W = m("MuiDivider", ["root", "horizontal", "vertical", "insetContext", "insetNone"]), J = ["className", "component", "children", "buttonFlex", "orientation", "slots", "slotProps"], E = () => D({
|
|
14
|
+
root: ["root"]
|
|
15
|
+
}, B, {}), L = y("div")(({
|
|
16
|
+
ownerState: o
|
|
17
|
+
}) => {
|
|
18
|
+
var t;
|
|
19
|
+
return n({
|
|
20
|
+
"--Button-radius": "var(--Card-childRadius)",
|
|
21
|
+
"--IconButton-radius": "var(--Card-childRadius)",
|
|
22
|
+
display: "flex"
|
|
23
|
+
}, ((t = o.orientation) == null ? void 0 : t.startsWith("horizontal")) && {
|
|
24
|
+
alignItems: "center"
|
|
25
|
+
// it is common to have children aligned center in horizontal orientation, but not vertically.
|
|
26
|
+
}, {
|
|
27
|
+
flexDirection: o.orientation === "horizontal" ? "row" : "column"
|
|
28
|
+
}, o.orientation === "horizontal-reverse" && {
|
|
29
|
+
flexDirection: "row-reverse"
|
|
30
|
+
}, {
|
|
31
|
+
zIndex: 1,
|
|
32
|
+
// render above Link's overlay
|
|
33
|
+
gap: "calc(0.625 * var(--Card-padding))",
|
|
34
|
+
padding: "var(--unstable_padding)",
|
|
35
|
+
"--unstable_padding": "calc(0.75 * var(--Card-padding)) 0 0 0",
|
|
36
|
+
[`.${j.root} > &`]: {
|
|
37
|
+
"--unstable_padding": "calc(0.75 * var(--Card-padding)) 0 var(--Card-padding)"
|
|
38
|
+
},
|
|
39
|
+
[`.${S.root} > .${W.root} + &`]: {
|
|
40
|
+
"--unstable_padding": "0"
|
|
41
|
+
}
|
|
42
|
+
}, o.buttonFlex ? {
|
|
43
|
+
[`& > :not(.${M.root})`]: {
|
|
44
|
+
flex: o.buttonFlex
|
|
45
|
+
},
|
|
46
|
+
[`& > :not(button) > .${$.root}`]: {
|
|
47
|
+
width: "100%"
|
|
48
|
+
// for button to fill its wrapper.
|
|
49
|
+
}
|
|
50
|
+
} : {
|
|
51
|
+
[`& > .${$.root}:only-child`]: {
|
|
52
|
+
flex: "auto"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}), T = y(L, {
|
|
56
|
+
name: "JoyCardActions",
|
|
57
|
+
slot: "Root",
|
|
58
|
+
overridesResolver: (o, t) => t.root
|
|
59
|
+
})({}), w = /* @__PURE__ */ P.forwardRef(function(t, s) {
|
|
60
|
+
const r = _({
|
|
61
|
+
props: t,
|
|
62
|
+
name: "JoyCardActions"
|
|
63
|
+
}), {
|
|
64
|
+
className: a,
|
|
65
|
+
component: i = "div",
|
|
66
|
+
children: l,
|
|
67
|
+
buttonFlex: c,
|
|
68
|
+
orientation: d = "horizontal",
|
|
69
|
+
slots: e = {},
|
|
70
|
+
slotProps: p = {}
|
|
71
|
+
} = r, v = k(r, J), u = n({}, v, {
|
|
72
|
+
component: i,
|
|
73
|
+
slots: e,
|
|
74
|
+
slotProps: p
|
|
75
|
+
}), C = n({}, r, {
|
|
76
|
+
component: i,
|
|
77
|
+
buttonFlex: c,
|
|
78
|
+
orientation: d
|
|
79
|
+
}), g = E(), [b, x] = A("root", {
|
|
80
|
+
ref: s,
|
|
81
|
+
className: z(g.root, a),
|
|
82
|
+
elementType: T,
|
|
83
|
+
externalForwardedProps: u,
|
|
84
|
+
ownerState: C
|
|
85
|
+
});
|
|
86
|
+
return /* @__PURE__ */ N.jsx(b, n({}, x, {
|
|
87
|
+
children: l
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
function G(o) {
|
|
91
|
+
return f("MuiSheet", o);
|
|
92
|
+
}
|
|
93
|
+
m("MuiSheet", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
94
|
+
const O = ["className", "color", "component", "variant", "invertedColors", "slots", "slotProps"], V = (o) => {
|
|
95
|
+
const {
|
|
96
|
+
variant: t,
|
|
97
|
+
color: s
|
|
98
|
+
} = o, r = {
|
|
99
|
+
root: ["root", t && `variant${h(t)}`, s && `color${h(s)}`]
|
|
100
|
+
};
|
|
101
|
+
return D(r, G, {});
|
|
102
|
+
}, q = y("div", {
|
|
103
|
+
name: "JoySheet",
|
|
104
|
+
slot: "Root",
|
|
105
|
+
overridesResolver: (o, t) => t.root
|
|
106
|
+
})(({
|
|
107
|
+
theme: o,
|
|
108
|
+
ownerState: t
|
|
109
|
+
}) => {
|
|
110
|
+
var s, r;
|
|
111
|
+
const a = (s = o.variants[t.variant]) == null ? void 0 : s[t.color], {
|
|
112
|
+
borderRadius: i,
|
|
113
|
+
bgcolor: l,
|
|
114
|
+
backgroundColor: c,
|
|
115
|
+
background: d
|
|
116
|
+
} = F({
|
|
117
|
+
theme: o,
|
|
118
|
+
ownerState: t
|
|
119
|
+
}, ["borderRadius", "bgcolor", "backgroundColor", "background"]), e = R(o, `palette.${l}`) || l || R(o, `palette.${c}`) || c || d || (a == null ? void 0 : a.backgroundColor) || (a == null ? void 0 : a.background) || o.vars.palette.background.surface;
|
|
120
|
+
return [n({
|
|
121
|
+
"--Icon-color": t.color !== "neutral" || t.variant === "solid" ? "currentColor" : o.vars.palette.text.icon,
|
|
122
|
+
"--ListItem-stickyBackground": e === "transparent" ? "initial" : e,
|
|
123
|
+
// for sticky List
|
|
124
|
+
"--Sheet-background": e === "transparent" ? "initial" : e
|
|
125
|
+
}, i !== void 0 && {
|
|
126
|
+
"--List-radius": `calc(${i} - var(--variant-borderWidth, 0px))`,
|
|
127
|
+
"--unstable_actionRadius": `calc(${i} - var(--variant-borderWidth, 0px))`
|
|
128
|
+
}, {
|
|
129
|
+
backgroundColor: o.vars.palette.background.surface,
|
|
130
|
+
position: "relative"
|
|
131
|
+
}), n({}, o.typography["body-md"], t.variant === "solid" && t.color && t.invertedColors && I(t.color)(o), t.variant === "soft" && t.color && t.invertedColors && U(t.color)(o), (r = o.variants[t.variant]) == null ? void 0 : r[t.color], a)];
|
|
132
|
+
}), oo = /* @__PURE__ */ P.forwardRef(function(t, s) {
|
|
133
|
+
const r = _({
|
|
134
|
+
props: t,
|
|
135
|
+
name: "JoySheet"
|
|
136
|
+
}), {
|
|
137
|
+
className: a,
|
|
138
|
+
color: i = "neutral",
|
|
139
|
+
component: l = "div",
|
|
140
|
+
variant: c = "plain",
|
|
141
|
+
invertedColors: d = !1,
|
|
142
|
+
slots: e = {},
|
|
143
|
+
slotProps: p = {}
|
|
144
|
+
} = r, v = k(r, O), u = n({}, r, {
|
|
145
|
+
color: i,
|
|
146
|
+
component: l,
|
|
147
|
+
invertedColors: d,
|
|
148
|
+
variant: c
|
|
149
|
+
}), C = V(u), g = n({}, v, {
|
|
150
|
+
component: l,
|
|
151
|
+
slots: e,
|
|
152
|
+
slotProps: p
|
|
153
|
+
}), [b, x] = A("root", {
|
|
154
|
+
ref: s,
|
|
155
|
+
className: z(C.root, a),
|
|
156
|
+
elementType: q,
|
|
157
|
+
externalForwardedProps: g,
|
|
158
|
+
ownerState: u
|
|
159
|
+
});
|
|
160
|
+
return /* @__PURE__ */ N.jsx(b, n({}, x));
|
|
161
|
+
});
|
|
162
|
+
export {
|
|
163
|
+
w as C,
|
|
164
|
+
oo as S,
|
|
165
|
+
L as a,
|
|
166
|
+
Z as g
|
|
167
|
+
};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { r as i, Z as er, j as x, w as g, a5 as _, F as or, G as ar, v as tr, _ as sr, x as w, y as A, E as ir, z as C, D as cr, I } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { d as lr, r as dr, g as ur, h as fr } from "./Button-BV7YIFkS.js";
|
|
3
|
+
import { g as vr, u as P, o as H } from "./getReactElementRef-BD-S8A24.js";
|
|
4
|
+
function M(n) {
|
|
5
|
+
return n.substring(2).toLowerCase();
|
|
6
|
+
}
|
|
7
|
+
function mr(n, r) {
|
|
8
|
+
return r.documentElement.clientWidth < n.clientX || r.documentElement.clientHeight < n.clientY;
|
|
9
|
+
}
|
|
10
|
+
function pr(n) {
|
|
11
|
+
const {
|
|
12
|
+
children: r,
|
|
13
|
+
disableReactTree: p = !1,
|
|
14
|
+
mouseEvent: a = "onClick",
|
|
15
|
+
onClickAway: d,
|
|
16
|
+
touchEvent: s = "onTouchEnd"
|
|
17
|
+
} = n, v = i.useRef(!1), u = i.useRef(null), m = i.useRef(!1), b = i.useRef(!1);
|
|
18
|
+
i.useEffect(() => (setTimeout(() => {
|
|
19
|
+
m.current = !0;
|
|
20
|
+
}, 0), () => {
|
|
21
|
+
m.current = !1;
|
|
22
|
+
}), []);
|
|
23
|
+
const h = er(vr(r), u), c = P((t) => {
|
|
24
|
+
const l = b.current;
|
|
25
|
+
b.current = !1;
|
|
26
|
+
const k = H(u.current);
|
|
27
|
+
if (!m.current || !u.current || "clientX" in t && mr(t, k))
|
|
28
|
+
return;
|
|
29
|
+
if (v.current) {
|
|
30
|
+
v.current = !1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
let e;
|
|
34
|
+
t.composedPath ? e = t.composedPath().indexOf(u.current) > -1 : e = !k.documentElement.contains(
|
|
35
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
36
|
+
t.target
|
|
37
|
+
) || u.current.contains(
|
|
38
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
39
|
+
t.target
|
|
40
|
+
), !e && (p || !l) && d(t);
|
|
41
|
+
}), S = (t) => (l) => {
|
|
42
|
+
b.current = !0;
|
|
43
|
+
const k = r.props[t];
|
|
44
|
+
k && k(l);
|
|
45
|
+
}, y = {
|
|
46
|
+
ref: h
|
|
47
|
+
};
|
|
48
|
+
return s !== !1 && (y[s] = S(s)), i.useEffect(() => {
|
|
49
|
+
if (s !== !1) {
|
|
50
|
+
const t = M(s), l = H(u.current), k = () => {
|
|
51
|
+
v.current = !0;
|
|
52
|
+
};
|
|
53
|
+
return l.addEventListener(t, c), l.addEventListener("touchmove", k), () => {
|
|
54
|
+
l.removeEventListener(t, c), l.removeEventListener("touchmove", k);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}, [c, s]), a !== !1 && (y[a] = S(a)), i.useEffect(() => {
|
|
58
|
+
if (a !== !1) {
|
|
59
|
+
const t = M(a), l = H(u.current);
|
|
60
|
+
return l.addEventListener(t, c), () => {
|
|
61
|
+
l.removeEventListener(t, c);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}, [c, a]), /* @__PURE__ */ x.jsx(i.Fragment, {
|
|
65
|
+
children: /* @__PURE__ */ i.cloneElement(r, y)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function hr(n = {}) {
|
|
69
|
+
const {
|
|
70
|
+
autoHideDuration: r = null,
|
|
71
|
+
disableWindowBlurListener: p = !1,
|
|
72
|
+
onClose: a,
|
|
73
|
+
open: d,
|
|
74
|
+
resumeHideDuration: s
|
|
75
|
+
} = n, v = lr();
|
|
76
|
+
i.useEffect(() => {
|
|
77
|
+
if (!d)
|
|
78
|
+
return;
|
|
79
|
+
function e(o) {
|
|
80
|
+
o.defaultPrevented || (o.key === "Escape" || o.key === "Esc") && (a == null || a(o, "escapeKeyDown"));
|
|
81
|
+
}
|
|
82
|
+
return document.addEventListener("keydown", e), () => {
|
|
83
|
+
document.removeEventListener("keydown", e);
|
|
84
|
+
};
|
|
85
|
+
}, [d, a]);
|
|
86
|
+
const u = P((e, o) => {
|
|
87
|
+
a == null || a(e, o);
|
|
88
|
+
}), m = P((e) => {
|
|
89
|
+
!a || e == null || v.start(e, () => {
|
|
90
|
+
u(null, "timeout");
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
i.useEffect(() => (d && m(r), v.clear), [d, r, m, v]);
|
|
94
|
+
const b = (e) => {
|
|
95
|
+
a == null || a(e, "clickaway");
|
|
96
|
+
}, h = v.clear, c = i.useCallback(() => {
|
|
97
|
+
r != null && m(s ?? r * 0.5);
|
|
98
|
+
}, [r, s, m]), S = (e) => (o) => {
|
|
99
|
+
const f = e.onBlur;
|
|
100
|
+
f == null || f(o), c();
|
|
101
|
+
}, y = (e) => (o) => {
|
|
102
|
+
const f = e.onFocus;
|
|
103
|
+
f == null || f(o), h();
|
|
104
|
+
}, t = (e) => (o) => {
|
|
105
|
+
const f = e.onMouseEnter;
|
|
106
|
+
f == null || f(o), h();
|
|
107
|
+
}, l = (e) => (o) => {
|
|
108
|
+
const f = e.onMouseLeave;
|
|
109
|
+
f == null || f(o), c();
|
|
110
|
+
};
|
|
111
|
+
return i.useEffect(() => {
|
|
112
|
+
if (!p && d)
|
|
113
|
+
return window.addEventListener("focus", c), window.addEventListener("blur", h), () => {
|
|
114
|
+
window.removeEventListener("focus", c), window.removeEventListener("blur", h);
|
|
115
|
+
};
|
|
116
|
+
}, [p, d, c, h]), {
|
|
117
|
+
getRootProps: (e = {}) => {
|
|
118
|
+
const o = g({}, _(n), _(e));
|
|
119
|
+
return g({
|
|
120
|
+
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
121
|
+
// See https://github.com/mui/material-ui/issues/29080
|
|
122
|
+
role: "presentation"
|
|
123
|
+
}, e, o, {
|
|
124
|
+
onBlur: S(o),
|
|
125
|
+
onFocus: y(o),
|
|
126
|
+
onMouseEnter: t(o),
|
|
127
|
+
onMouseLeave: l(o)
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
onClickAway: b
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function kr(n) {
|
|
134
|
+
return or("MuiSnackbar", n);
|
|
135
|
+
}
|
|
136
|
+
ar("MuiSnackbar", ["root", "anchorOriginTopCenter", "anchorOriginBottomCenter", "anchorOriginTopRight", "anchorOriginBottomRight", "anchorOriginTopLeft", "anchorOriginBottomLeft", "colorPrimary", "colorDanger", "colorNeutral", "colorSuccess", "colorWarning", "endDecorator", "sizeSm", "sizeMd", "sizeLg", "startDecorator", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
137
|
+
const br = ["anchorOrigin", "animationDuration", "autoHideDuration", "color", "children", "className", "component", "disableWindowBlurListener", "endDecorator", "invertedColors", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "onUnmount", "open", "resumeHideDuration", "size", "slots", "slotProps", "startDecorator", "variant"];
|
|
138
|
+
let F = (n) => n, $, X;
|
|
139
|
+
const gr = (n) => {
|
|
140
|
+
const {
|
|
141
|
+
variant: r,
|
|
142
|
+
color: p,
|
|
143
|
+
size: a,
|
|
144
|
+
anchorOrigin: d
|
|
145
|
+
} = n, s = {
|
|
146
|
+
root: ["root", a && `size${C(a)}`, p && `color${C(p)}`, r && `variant${C(r)}`, `anchorOrigin${C(d.vertical)}${C(d.horizontal)}`],
|
|
147
|
+
startDecorator: ["startDecorator"],
|
|
148
|
+
endDecorator: ["endDecorator"]
|
|
149
|
+
};
|
|
150
|
+
return cr(s, kr, {});
|
|
151
|
+
}, Sr = I($ || ($ = F`
|
|
152
|
+
0% {
|
|
153
|
+
transform: translateX(var(--Snackbar-translateX, 0px)) translateY(calc(var(--_Snackbar-anchorBottom, 1) * 100%));
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
50% {
|
|
157
|
+
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
transform: translateX(var(--Snackbar-translateX, 0px)) translateY(0);
|
|
161
|
+
}
|
|
162
|
+
`)), yr = I(X || (X = F`
|
|
163
|
+
0% {
|
|
164
|
+
transform: translateX(var(--Snackbar-translateX, 0px)) translateY(0);
|
|
165
|
+
opacity: 1;
|
|
166
|
+
}
|
|
167
|
+
100% {
|
|
168
|
+
transform: translateX(var(--Snackbar-translateX, 0px)) translateY(calc(var(--_Snackbar-anchorBottom, 1) * 100%));
|
|
169
|
+
opacity: 0;
|
|
170
|
+
}
|
|
171
|
+
`)), Er = A("div", {
|
|
172
|
+
name: "JoySnackbar",
|
|
173
|
+
slot: "Root",
|
|
174
|
+
overridesResolver: (n, r) => r.root
|
|
175
|
+
})(({
|
|
176
|
+
theme: n,
|
|
177
|
+
ownerState: r
|
|
178
|
+
}) => {
|
|
179
|
+
var p, a, d, s, v, u, m;
|
|
180
|
+
const {
|
|
181
|
+
p: b,
|
|
182
|
+
padding: h,
|
|
183
|
+
borderRadius: c
|
|
184
|
+
} = dr({
|
|
185
|
+
theme: n,
|
|
186
|
+
ownerState: r
|
|
187
|
+
}, ["p", "padding", "borderRadius"]);
|
|
188
|
+
return [g({
|
|
189
|
+
"--Snackbar-radius": n.vars.radius.sm,
|
|
190
|
+
"--Snackbar-decoratorChildRadius": "max((var(--Snackbar-radius) - var(--variant-borderWidth, 0px)) - var(--Snackbar-padding), min(var(--Snackbar-padding) + var(--variant-borderWidth, 0px), var(--Snackbar-radius) / 2))",
|
|
191
|
+
"--Button-minHeight": "var(--Snackbar-decoratorChildHeight)",
|
|
192
|
+
"--IconButton-size": "var(--Snackbar-decoratorChildHeight)",
|
|
193
|
+
"--Button-radius": "var(--Snackbar-decoratorChildRadius)",
|
|
194
|
+
"--IconButton-radius": "var(--Snackbar-decoratorChildRadius)",
|
|
195
|
+
"--Icon-color": "currentColor"
|
|
196
|
+
}, r.size === "sm" && {
|
|
197
|
+
"--Snackbar-padding": "0.75rem",
|
|
198
|
+
"--Snackbar-inset": "0.5rem",
|
|
199
|
+
"--Snackbar-decoratorChildHeight": "1.5rem",
|
|
200
|
+
"--Icon-fontSize": n.vars.fontSize.xl,
|
|
201
|
+
gap: "0.5rem"
|
|
202
|
+
}, r.size === "md" && {
|
|
203
|
+
"--Snackbar-padding": "1rem",
|
|
204
|
+
"--Snackbar-inset": "0.75rem",
|
|
205
|
+
// the spacing between Snackbar and the viewport
|
|
206
|
+
"--Snackbar-decoratorChildHeight": "2rem",
|
|
207
|
+
"--Icon-fontSize": n.vars.fontSize.xl,
|
|
208
|
+
gap: "0.625rem"
|
|
209
|
+
}, r.size === "lg" && {
|
|
210
|
+
"--Snackbar-padding": "1.25rem",
|
|
211
|
+
"--Snackbar-inset": "1rem",
|
|
212
|
+
"--Snackbar-decoratorChildHeight": "2.375rem",
|
|
213
|
+
"--Icon-fontSize": n.vars.fontSize.xl2,
|
|
214
|
+
gap: "0.875rem"
|
|
215
|
+
}, {
|
|
216
|
+
zIndex: n.vars.zIndex.snackbar,
|
|
217
|
+
position: "fixed",
|
|
218
|
+
display: "flex",
|
|
219
|
+
alignItems: "center",
|
|
220
|
+
minWidth: 300,
|
|
221
|
+
top: ((p = r.anchorOrigin) == null ? void 0 : p.vertical) === "top" ? "var(--Snackbar-inset)" : void 0,
|
|
222
|
+
left: ((a = r.anchorOrigin) == null ? void 0 : a.horizontal) === "left" ? "var(--Snackbar-inset)" : void 0,
|
|
223
|
+
bottom: ((d = r.anchorOrigin) == null ? void 0 : d.vertical) === "bottom" ? "var(--Snackbar-inset)" : void 0,
|
|
224
|
+
right: ((s = r.anchorOrigin) == null ? void 0 : s.horizontal) === "right" ? "var(--Snackbar-inset)" : void 0
|
|
225
|
+
}, ((v = r.anchorOrigin) == null ? void 0 : v.horizontal) === "center" && {
|
|
226
|
+
"--Snackbar-translateX": "-50%",
|
|
227
|
+
left: "50%",
|
|
228
|
+
transform: "translateX(var(--Snackbar-translateX))"
|
|
229
|
+
}, ((u = r.anchorOrigin) == null ? void 0 : u.vertical) === "top" && {
|
|
230
|
+
"--_Snackbar-anchorBottom": "-1"
|
|
231
|
+
}, {
|
|
232
|
+
animation: `${Sr} ${r.animationDuration}ms forwards`
|
|
233
|
+
}, !r.open && {
|
|
234
|
+
animationName: yr
|
|
235
|
+
}, {
|
|
236
|
+
boxShadow: n.vars.shadow.lg,
|
|
237
|
+
backgroundColor: n.vars.palette.background.surface,
|
|
238
|
+
padding: "var(--Snackbar-padding)",
|
|
239
|
+
borderRadius: "var(--Snackbar-radius)"
|
|
240
|
+
}, n.typography[`body-${{
|
|
241
|
+
sm: "xs",
|
|
242
|
+
md: "sm",
|
|
243
|
+
lg: "md"
|
|
244
|
+
}[r.size]}`], r.variant === "solid" && r.color && r.invertedColors && ur(r.color)(n), r.variant === "soft" && r.color && r.invertedColors && fr(r.color)(n), (m = n.variants[r.variant]) == null ? void 0 : m[r.color]), b !== void 0 && {
|
|
245
|
+
"--Snackbar-padding": b
|
|
246
|
+
}, h !== void 0 && {
|
|
247
|
+
"--Snackbar-padding": h
|
|
248
|
+
}, c !== void 0 && {
|
|
249
|
+
"--Snackbar-radius": c
|
|
250
|
+
}];
|
|
251
|
+
}), Cr = A("span", {
|
|
252
|
+
name: "JoySnackbar",
|
|
253
|
+
slot: "StartDecorator",
|
|
254
|
+
overridesResolver: (n, r) => r.startDecorator
|
|
255
|
+
})({
|
|
256
|
+
display: "inherit",
|
|
257
|
+
flex: "none"
|
|
258
|
+
}), xr = A("span", {
|
|
259
|
+
name: "JoySnackbar",
|
|
260
|
+
slot: "EndDecorator",
|
|
261
|
+
overridesResolver: (n, r) => r.endDecorator
|
|
262
|
+
})({
|
|
263
|
+
display: "inherit",
|
|
264
|
+
flex: "none",
|
|
265
|
+
marginLeft: "auto"
|
|
266
|
+
}), Rr = {
|
|
267
|
+
vertical: "bottom",
|
|
268
|
+
horizontal: "right"
|
|
269
|
+
}, Or = /* @__PURE__ */ i.forwardRef(function(r, p) {
|
|
270
|
+
const a = tr({
|
|
271
|
+
props: r,
|
|
272
|
+
name: "JoySnackbar"
|
|
273
|
+
}), {
|
|
274
|
+
anchorOrigin: d = Rr,
|
|
275
|
+
animationDuration: s = 300,
|
|
276
|
+
autoHideDuration: v = null,
|
|
277
|
+
color: u = "neutral",
|
|
278
|
+
children: m,
|
|
279
|
+
className: b,
|
|
280
|
+
component: h,
|
|
281
|
+
disableWindowBlurListener: c = !1,
|
|
282
|
+
endDecorator: S,
|
|
283
|
+
invertedColors: y = !1,
|
|
284
|
+
onUnmount: t,
|
|
285
|
+
open: l,
|
|
286
|
+
size: k = "md",
|
|
287
|
+
slots: e = {},
|
|
288
|
+
slotProps: o,
|
|
289
|
+
startDecorator: f,
|
|
290
|
+
variant: W = "outlined"
|
|
291
|
+
} = a, j = sr(a, br), [N, B] = i.useState(!0), [U, R] = i.useState(!1), D = i.useRef(t);
|
|
292
|
+
D.current = t, i.useEffect(() => {
|
|
293
|
+
if (l)
|
|
294
|
+
R(!1), B(!1);
|
|
295
|
+
else {
|
|
296
|
+
R(!0);
|
|
297
|
+
const O = setTimeout(() => {
|
|
298
|
+
var T;
|
|
299
|
+
B(!0), R(!1), (T = D.current) == null || T.call(D);
|
|
300
|
+
}, s);
|
|
301
|
+
return () => {
|
|
302
|
+
clearTimeout(O);
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
}, [l, s]);
|
|
306
|
+
const E = g({}, a, {
|
|
307
|
+
anchorOrigin: d,
|
|
308
|
+
autoHideDuration: v,
|
|
309
|
+
color: u,
|
|
310
|
+
animationDuration: s,
|
|
311
|
+
disableWindowBlurListener: c,
|
|
312
|
+
invertedColors: y,
|
|
313
|
+
size: k,
|
|
314
|
+
variant: W
|
|
315
|
+
});
|
|
316
|
+
delete E.onUnmount;
|
|
317
|
+
const z = gr(E), {
|
|
318
|
+
getRootProps: Y,
|
|
319
|
+
onClickAway: J
|
|
320
|
+
} = hr(E), K = (O) => {
|
|
321
|
+
U || J(O);
|
|
322
|
+
}, L = g({}, j, {
|
|
323
|
+
component: h,
|
|
324
|
+
slots: e,
|
|
325
|
+
slotProps: o
|
|
326
|
+
}), [G, V] = w("root", {
|
|
327
|
+
ref: p,
|
|
328
|
+
className: ir(z.root, b),
|
|
329
|
+
elementType: Er,
|
|
330
|
+
externalForwardedProps: L,
|
|
331
|
+
getSlotProps: Y,
|
|
332
|
+
ownerState: E
|
|
333
|
+
}), [Z, q] = w("startDecorator", {
|
|
334
|
+
className: z.startDecorator,
|
|
335
|
+
elementType: Cr,
|
|
336
|
+
externalForwardedProps: L,
|
|
337
|
+
ownerState: E
|
|
338
|
+
}), [Q, rr] = w("endDecorator", {
|
|
339
|
+
className: z.endDecorator,
|
|
340
|
+
elementType: xr,
|
|
341
|
+
externalForwardedProps: L,
|
|
342
|
+
ownerState: E
|
|
343
|
+
}), nr = e.clickAway || pr;
|
|
344
|
+
return !l && N ? null : /* @__PURE__ */ x.jsx(nr, g({
|
|
345
|
+
onClickAway: K
|
|
346
|
+
}, typeof (o == null ? void 0 : o.clickAway) == "function" ? o.clickAway(E) : o == null ? void 0 : o.clickAway, {
|
|
347
|
+
children: /* @__PURE__ */ x.jsxs(G, g({}, V, {
|
|
348
|
+
children: [f && /* @__PURE__ */ x.jsx(Z, g({}, q, {
|
|
349
|
+
children: f
|
|
350
|
+
})), m, S && /* @__PURE__ */ x.jsx(Q, g({}, rr, {
|
|
351
|
+
children: S
|
|
352
|
+
}))]
|
|
353
|
+
}))
|
|
354
|
+
}));
|
|
355
|
+
});
|
|
356
|
+
export {
|
|
357
|
+
Or as S
|
|
358
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { r as d, Q as T, _ as b, j as D, w as k, E as F, S as B, ai as g, aj as p, ak as E, al as G, am as N, D as _, V as $, W as M, an as h, y as O, v as U } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { s as A } from "./Button-BV7YIFkS.js";
|
|
3
|
+
const J = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], L = M(), W = A("div", {
|
|
4
|
+
name: "MuiStack",
|
|
5
|
+
slot: "Root",
|
|
6
|
+
overridesResolver: (e, s) => s.root
|
|
7
|
+
});
|
|
8
|
+
function I(e) {
|
|
9
|
+
return B({
|
|
10
|
+
props: e,
|
|
11
|
+
name: "MuiStack",
|
|
12
|
+
defaultTheme: L
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function Q(e, s) {
|
|
16
|
+
const n = d.Children.toArray(e).filter(Boolean);
|
|
17
|
+
return n.reduce((a, c, t) => (a.push(c), t < n.length - 1 && a.push(/* @__PURE__ */ d.cloneElement(s, {
|
|
18
|
+
key: `separator-${t}`
|
|
19
|
+
})), a), []);
|
|
20
|
+
}
|
|
21
|
+
const q = (e) => ({
|
|
22
|
+
row: "Left",
|
|
23
|
+
"row-reverse": "Right",
|
|
24
|
+
column: "Top",
|
|
25
|
+
"column-reverse": "Bottom"
|
|
26
|
+
})[e], z = ({
|
|
27
|
+
ownerState: e,
|
|
28
|
+
theme: s
|
|
29
|
+
}) => {
|
|
30
|
+
let n = k({
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "column"
|
|
33
|
+
}, g({
|
|
34
|
+
theme: s
|
|
35
|
+
}, p({
|
|
36
|
+
values: e.direction,
|
|
37
|
+
breakpoints: s.breakpoints.values
|
|
38
|
+
}), (a) => ({
|
|
39
|
+
flexDirection: a
|
|
40
|
+
})));
|
|
41
|
+
if (e.spacing) {
|
|
42
|
+
const a = E(s), c = Object.keys(s.breakpoints.values).reduce((o, r) => ((typeof e.spacing == "object" && e.spacing[r] != null || typeof e.direction == "object" && e.direction[r] != null) && (o[r] = !0), o), {}), t = p({
|
|
43
|
+
values: e.direction,
|
|
44
|
+
base: c
|
|
45
|
+
}), m = p({
|
|
46
|
+
values: e.spacing,
|
|
47
|
+
base: c
|
|
48
|
+
});
|
|
49
|
+
typeof t == "object" && Object.keys(t).forEach((o, r, i) => {
|
|
50
|
+
if (!t[o]) {
|
|
51
|
+
const u = r > 0 ? t[i[r - 1]] : "column";
|
|
52
|
+
t[o] = u;
|
|
53
|
+
}
|
|
54
|
+
}), n = G(n, g({
|
|
55
|
+
theme: s
|
|
56
|
+
}, m, (o, r) => e.useFlexGap ? {
|
|
57
|
+
gap: h(a, o)
|
|
58
|
+
} : {
|
|
59
|
+
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
|
60
|
+
// We need to reset the margin to avoid double spacing.
|
|
61
|
+
"& > :not(style):not(style)": {
|
|
62
|
+
margin: 0
|
|
63
|
+
},
|
|
64
|
+
"& > :not(style) ~ :not(style)": {
|
|
65
|
+
[`margin${q(r ? t[r] : e.direction)}`]: h(a, o)
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
return n = N(s.breakpoints, n), n;
|
|
70
|
+
};
|
|
71
|
+
function H(e = {}) {
|
|
72
|
+
const {
|
|
73
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
74
|
+
createStyledComponent: s = W,
|
|
75
|
+
useThemeProps: n = I,
|
|
76
|
+
componentName: a = "MuiStack"
|
|
77
|
+
} = e, c = () => _({
|
|
78
|
+
root: ["root"]
|
|
79
|
+
}, (o) => $(a, o), {}), t = s(z);
|
|
80
|
+
return /* @__PURE__ */ d.forwardRef(function(o, r) {
|
|
81
|
+
const i = n(o), l = T(i), {
|
|
82
|
+
component: u = "div",
|
|
83
|
+
direction: x = "column",
|
|
84
|
+
spacing: j = 0,
|
|
85
|
+
divider: y,
|
|
86
|
+
children: v,
|
|
87
|
+
className: P,
|
|
88
|
+
useFlexGap: S = !1
|
|
89
|
+
} = l, C = b(l, J), V = {
|
|
90
|
+
direction: x,
|
|
91
|
+
spacing: j,
|
|
92
|
+
useFlexGap: S
|
|
93
|
+
}, R = c();
|
|
94
|
+
return /* @__PURE__ */ D.jsx(t, k({
|
|
95
|
+
as: u,
|
|
96
|
+
ownerState: V,
|
|
97
|
+
ref: r,
|
|
98
|
+
className: F(R.root, P)
|
|
99
|
+
}, C, {
|
|
100
|
+
children: y ? Q(v, y) : v
|
|
101
|
+
}));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const Y = H({
|
|
105
|
+
createStyledComponent: O("div", {
|
|
106
|
+
name: "JoyStack",
|
|
107
|
+
slot: "Root",
|
|
108
|
+
overridesResolver: (e, s) => s.root
|
|
109
|
+
}),
|
|
110
|
+
useThemeProps: (e) => U({
|
|
111
|
+
props: e,
|
|
112
|
+
name: "JoyStack"
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
export {
|
|
116
|
+
Y as S
|
|
117
|
+
};
|