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,129 @@
|
|
|
1
|
+
import { F as N, G as O, r as l, v as U, _ as I, w as c, x as $, y, E as k, j as F, z as v, D as J } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { i as L, r as T, g as V, h as A } from "./Button-BV7YIFkS.js";
|
|
3
|
+
function G(a) {
|
|
4
|
+
return N("MuiCard", a);
|
|
5
|
+
}
|
|
6
|
+
const Y = O("MuiCard", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "horizontal", "vertical"]), q = ["className", "color", "component", "invertedColors", "size", "variant", "children", "orientation", "slots", "slotProps"], B = (a) => {
|
|
7
|
+
const {
|
|
8
|
+
size: r,
|
|
9
|
+
variant: i,
|
|
10
|
+
color: o,
|
|
11
|
+
orientation: s
|
|
12
|
+
} = a, d = {
|
|
13
|
+
root: ["root", s, i && `variant${v(i)}`, o && `color${v(o)}`, r && `size${v(r)}`]
|
|
14
|
+
};
|
|
15
|
+
return J(d, G, {});
|
|
16
|
+
}, H = y("div")(({
|
|
17
|
+
theme: a,
|
|
18
|
+
ownerState: r
|
|
19
|
+
}) => {
|
|
20
|
+
var i;
|
|
21
|
+
const {
|
|
22
|
+
p: o,
|
|
23
|
+
padding: s,
|
|
24
|
+
borderRadius: d
|
|
25
|
+
} = T({
|
|
26
|
+
theme: a,
|
|
27
|
+
ownerState: r
|
|
28
|
+
}, ["p", "padding", "borderRadius"]);
|
|
29
|
+
return [c({
|
|
30
|
+
"--Icon-color": r.color !== "neutral" || r.variant === "solid" ? "currentColor" : a.vars.palette.text.icon,
|
|
31
|
+
// a context variable for any child component
|
|
32
|
+
"--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))",
|
|
33
|
+
// AspectRatio integration
|
|
34
|
+
"--AspectRatio-radius": "var(--Card-childRadius)",
|
|
35
|
+
// Link integration
|
|
36
|
+
"--unstable_actionMargin": "calc(-1 * var(--variant-borderWidth, 0px))",
|
|
37
|
+
// Link, Radio, Checkbox integration
|
|
38
|
+
"--unstable_actionRadius": "var(--Card-radius)",
|
|
39
|
+
// CardCover integration
|
|
40
|
+
"--CardCover-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
|
|
41
|
+
// CardOverflow integration
|
|
42
|
+
"--CardOverflow-offset": "calc(-1 * var(--Card-padding))",
|
|
43
|
+
"--CardOverflow-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
|
|
44
|
+
// Divider integration
|
|
45
|
+
"--Divider-inset": "calc(-1 * var(--Card-padding))"
|
|
46
|
+
}, r.size === "sm" && {
|
|
47
|
+
"--Card-radius": a.vars.radius.sm,
|
|
48
|
+
"--Card-padding": "0.625rem",
|
|
49
|
+
gap: "0.5rem"
|
|
50
|
+
}, r.size === "md" && {
|
|
51
|
+
"--Card-radius": a.vars.radius.md,
|
|
52
|
+
"--Card-padding": "1rem",
|
|
53
|
+
gap: "0.75rem 1rem"
|
|
54
|
+
}, r.size === "lg" && {
|
|
55
|
+
"--Card-radius": a.vars.radius.lg,
|
|
56
|
+
"--Card-padding": "1.5rem",
|
|
57
|
+
gap: "1rem 1.5rem"
|
|
58
|
+
}, {
|
|
59
|
+
padding: "var(--Card-padding)",
|
|
60
|
+
borderRadius: "var(--Card-radius)",
|
|
61
|
+
backgroundColor: a.vars.palette.background.surface,
|
|
62
|
+
position: "relative",
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexDirection: r.orientation === "horizontal" ? "row" : "column"
|
|
65
|
+
}, a.typography[`body-${r.size}`], r.variant === "solid" && r.color && r.invertedColors && V(r.color)(a), r.variant === "soft" && r.color && r.invertedColors && A(r.color)(a), (i = a.variants[r.variant]) == null ? void 0 : i[r.color]), o !== void 0 && {
|
|
66
|
+
"--Card-padding": o
|
|
67
|
+
}, s !== void 0 && {
|
|
68
|
+
"--Card-padding": s
|
|
69
|
+
}, d !== void 0 && {
|
|
70
|
+
"--Card-radius": d
|
|
71
|
+
}];
|
|
72
|
+
}), K = y(H, {
|
|
73
|
+
name: "JoyCard",
|
|
74
|
+
slot: "Root",
|
|
75
|
+
overridesResolver: (a, r) => r.root
|
|
76
|
+
})({}), Z = /* @__PURE__ */ l.forwardRef(function(r, i) {
|
|
77
|
+
const o = U({
|
|
78
|
+
props: r,
|
|
79
|
+
name: "JoyCard"
|
|
80
|
+
}), {
|
|
81
|
+
className: s,
|
|
82
|
+
color: d = "neutral",
|
|
83
|
+
component: p = "div",
|
|
84
|
+
invertedColors: z = !1,
|
|
85
|
+
size: b = "md",
|
|
86
|
+
variant: R = "outlined",
|
|
87
|
+
children: u,
|
|
88
|
+
orientation: C = "vertical",
|
|
89
|
+
slots: h = {},
|
|
90
|
+
slotProps: P = {}
|
|
91
|
+
} = o, W = I(o, q), g = c({}, o, {
|
|
92
|
+
color: d,
|
|
93
|
+
component: p,
|
|
94
|
+
orientation: C,
|
|
95
|
+
size: b,
|
|
96
|
+
variant: R,
|
|
97
|
+
invertedColors: z
|
|
98
|
+
}), E = B(g), D = c({}, W, {
|
|
99
|
+
component: p,
|
|
100
|
+
slots: h,
|
|
101
|
+
slotProps: P
|
|
102
|
+
}), [M, _] = $("root", {
|
|
103
|
+
ref: i,
|
|
104
|
+
className: k(E.root, s),
|
|
105
|
+
elementType: K,
|
|
106
|
+
externalForwardedProps: D,
|
|
107
|
+
ownerState: g
|
|
108
|
+
});
|
|
109
|
+
return /* @__PURE__ */ F.jsx(M, c({}, _, {
|
|
110
|
+
children: l.Children.map(u, (t, m) => {
|
|
111
|
+
if (!/* @__PURE__ */ l.isValidElement(t))
|
|
112
|
+
return t;
|
|
113
|
+
const n = {};
|
|
114
|
+
if (L(t, ["Divider"])) {
|
|
115
|
+
var f, x;
|
|
116
|
+
const e = t.props;
|
|
117
|
+
n.inset = (f = e == null ? void 0 : e.inset) != null ? f : "context";
|
|
118
|
+
const j = C === "vertical" ? "horizontal" : "vertical";
|
|
119
|
+
n.orientation = (x = e == null ? void 0 : e.orientation) != null ? x : j;
|
|
120
|
+
}
|
|
121
|
+
return m === 0 && (n["data-first-child"] = ""), m === l.Children.count(u) - 1 && (n["data-last-child"] = ""), /* @__PURE__ */ l.cloneElement(t, n);
|
|
122
|
+
})
|
|
123
|
+
}));
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
Z as C,
|
|
127
|
+
H as S,
|
|
128
|
+
Y as c
|
|
129
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { G as e, F as f, r as P, v as R, _ as S, w as a, x as w, y as n, E as h, j as _, D as j } from "./main-XP7dqk6g.js";
|
|
2
|
+
const N = e("MuiCardOverflow", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
3
|
+
function U(o) {
|
|
4
|
+
return f("MuiCardContent", o);
|
|
5
|
+
}
|
|
6
|
+
e("MuiCardContent", ["root"]);
|
|
7
|
+
const b = ["className", "component", "children", "orientation", "slots", "slotProps"], D = () => j({
|
|
8
|
+
root: ["root"]
|
|
9
|
+
}, U, {}), E = n("div")(({
|
|
10
|
+
ownerState: o
|
|
11
|
+
}) => ({
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: o.orientation === "horizontal" ? "row" : "column",
|
|
14
|
+
flex: 9999,
|
|
15
|
+
// fill the available space in the Card and also shrink if needed
|
|
16
|
+
zIndex: 1,
|
|
17
|
+
columnGap: "var(--Card-padding)",
|
|
18
|
+
rowGap: "max(2px, calc(0.1875 * var(--Card-padding)))",
|
|
19
|
+
padding: "var(--unstable_padding)",
|
|
20
|
+
[`.${N.root} > &`]: {
|
|
21
|
+
"--unstable_padding": "calc(var(--Card-padding) * 0.75) 0px"
|
|
22
|
+
}
|
|
23
|
+
})), G = n(E, {
|
|
24
|
+
name: "JoyCardContent",
|
|
25
|
+
slot: "Root",
|
|
26
|
+
overridesResolver: (o, t) => t.root
|
|
27
|
+
})({}), z = /* @__PURE__ */ P.forwardRef(function(t, l) {
|
|
28
|
+
const s = R({
|
|
29
|
+
props: t,
|
|
30
|
+
name: "JoyCardContent"
|
|
31
|
+
}), {
|
|
32
|
+
className: i,
|
|
33
|
+
component: r = "div",
|
|
34
|
+
children: c,
|
|
35
|
+
orientation: d = "vertical",
|
|
36
|
+
slots: p = {},
|
|
37
|
+
slotProps: C = {}
|
|
38
|
+
} = s, u = S(s, b), x = a({}, u, {
|
|
39
|
+
component: r,
|
|
40
|
+
slots: p,
|
|
41
|
+
slotProps: C
|
|
42
|
+
}), m = a({}, s, {
|
|
43
|
+
component: r,
|
|
44
|
+
orientation: d
|
|
45
|
+
}), v = D(), [y, g] = w("root", {
|
|
46
|
+
ref: l,
|
|
47
|
+
className: h(v.root, i),
|
|
48
|
+
elementType: G,
|
|
49
|
+
externalForwardedProps: x,
|
|
50
|
+
ownerState: m
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ _.jsx(y, a({}, g, {
|
|
53
|
+
children: c
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
z as C,
|
|
58
|
+
E as S,
|
|
59
|
+
N as a
|
|
60
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { j as o } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { c as t } from "./createSvgIcon-DVA0KIUd.js";
|
|
3
|
+
const n = t(/* @__PURE__ */ o.jsx("path", {
|
|
4
|
+
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
5
|
+
}), "ChevronLeft"), s = t(/* @__PURE__ */ o.jsx("path", {
|
|
6
|
+
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
7
|
+
}), "ChevronRight");
|
|
8
|
+
export {
|
|
9
|
+
n as C,
|
|
10
|
+
s as a
|
|
11
|
+
};
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { G as U, F, r as g, v as G, _ as q, w as e, x as h, y as C, E as K, a0 as Q, j as c, z as b, D as X } from "./main-XP7dqk6g.js";
|
|
2
|
+
import { V as Y } from "./variantColorInheritance-DI3wUohX.js";
|
|
3
|
+
import { u as Z, r as w } from "./Button-BV7YIFkS.js";
|
|
4
|
+
function ii(o) {
|
|
5
|
+
return F("MuiChip", o);
|
|
6
|
+
}
|
|
7
|
+
const x = U("MuiChip", ["root", "clickable", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "disabled", "endDecorator", "focusVisible", "label", "labelSm", "labelMd", "labelLg", "sizeSm", "sizeMd", "sizeLg", "startDecorator", "variantPlain", "variantSolid", "variantSoft", "variantOutlined"]), oi = /* @__PURE__ */ g.createContext({
|
|
8
|
+
disabled: void 0,
|
|
9
|
+
variant: void 0,
|
|
10
|
+
color: void 0
|
|
11
|
+
}), ri = ["children", "className", "color", "onClick", "disabled", "size", "variant", "startDecorator", "endDecorator", "component", "slots", "slotProps"], ai = (o) => {
|
|
12
|
+
const {
|
|
13
|
+
disabled: i,
|
|
14
|
+
size: a,
|
|
15
|
+
color: r,
|
|
16
|
+
clickable: n,
|
|
17
|
+
variant: t,
|
|
18
|
+
focusVisible: l
|
|
19
|
+
} = o, u = {
|
|
20
|
+
root: ["root", i && "disabled", r && `color${b(r)}`, a && `size${b(a)}`, t && `variant${b(t)}`, n && "clickable"],
|
|
21
|
+
action: ["action", i && "disabled", l && "focusVisible"],
|
|
22
|
+
label: ["label", a && `label${b(a)}`],
|
|
23
|
+
startDecorator: ["startDecorator"],
|
|
24
|
+
endDecorator: ["endDecorator"]
|
|
25
|
+
};
|
|
26
|
+
return X(u, ii, {});
|
|
27
|
+
}, ei = C("div", {
|
|
28
|
+
name: "JoyChip",
|
|
29
|
+
slot: "Root",
|
|
30
|
+
overridesResolver: (o, i) => i.root
|
|
31
|
+
})(({
|
|
32
|
+
theme: o,
|
|
33
|
+
ownerState: i
|
|
34
|
+
}) => {
|
|
35
|
+
var a, r, n;
|
|
36
|
+
const t = (a = o.variants[i.variant]) == null ? void 0 : a[i.color], {
|
|
37
|
+
borderRadius: l
|
|
38
|
+
} = w({
|
|
39
|
+
theme: o,
|
|
40
|
+
ownerState: i
|
|
41
|
+
}, ["borderRadius"]);
|
|
42
|
+
return [e({
|
|
43
|
+
// for controlling chip delete margin offset
|
|
44
|
+
"--Chip-decoratorChildOffset": "min(calc(var(--Chip-paddingInline) - (var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2), var(--Chip-paddingInline))",
|
|
45
|
+
"--Chip-decoratorChildRadius": "max(var(--_Chip-radius) - var(--variant-borderWidth, 0px) - var(--_Chip-paddingBlock), min(var(--_Chip-paddingBlock) + var(--variant-borderWidth, 0px), var(--_Chip-radius) / 2))",
|
|
46
|
+
"--Chip-deleteRadius": "var(--Chip-decoratorChildRadius)",
|
|
47
|
+
"--Chip-deleteSize": "var(--Chip-decoratorChildHeight)",
|
|
48
|
+
"--Avatar-radius": "var(--Chip-decoratorChildRadius)",
|
|
49
|
+
"--Avatar-size": "var(--Chip-decoratorChildHeight)",
|
|
50
|
+
"--Icon-margin": "initial",
|
|
51
|
+
// reset the icon's margin.
|
|
52
|
+
"--Icon-color": "currentColor",
|
|
53
|
+
"--unstable_actionRadius": "var(--_Chip-radius)"
|
|
54
|
+
}, i.size === "sm" && {
|
|
55
|
+
"--Chip-paddingInline": "0.375rem",
|
|
56
|
+
"--Chip-decoratorChildHeight": "calc(var(--_Chip-minHeight) - 2 * var(--variant-borderWidth))",
|
|
57
|
+
"--Icon-fontSize": o.vars.fontSize.sm,
|
|
58
|
+
"--_Chip-minHeight": "var(--Chip-minHeight, 1.25rem)",
|
|
59
|
+
// 20px
|
|
60
|
+
gap: "3px"
|
|
61
|
+
}, i.size === "md" && {
|
|
62
|
+
"--Chip-paddingInline": "0.5rem",
|
|
63
|
+
"--Chip-decoratorChildHeight": "calc(var(--_Chip-minHeight) - 0.25rem - 2 * var(--variant-borderWidth))",
|
|
64
|
+
"--Icon-fontSize": o.vars.fontSize.md,
|
|
65
|
+
"--_Chip-minHeight": "var(--Chip-minHeight, 1.5rem)",
|
|
66
|
+
// 26px
|
|
67
|
+
gap: "0.25rem"
|
|
68
|
+
}, i.size === "lg" && {
|
|
69
|
+
"--Chip-paddingInline": "0.75rem",
|
|
70
|
+
"--Chip-decoratorChildHeight": "calc(var(--_Chip-minHeight) - 0.375rem - 2 * var(--variant-borderWidth))",
|
|
71
|
+
"--Icon-fontSize": o.vars.fontSize.lg,
|
|
72
|
+
"--_Chip-minHeight": "var(--Chip-minHeight, 1.75rem)",
|
|
73
|
+
// 28px
|
|
74
|
+
gap: "0.375rem"
|
|
75
|
+
}, {
|
|
76
|
+
"--_Chip-radius": "var(--Chip-radius, 1.5rem)",
|
|
77
|
+
"--_Chip-paddingBlock": "max((var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2, 0px)",
|
|
78
|
+
minHeight: "var(--_Chip-minHeight)",
|
|
79
|
+
maxWidth: "max-content",
|
|
80
|
+
// to prevent Chip from stretching to full width when used with flexbox
|
|
81
|
+
paddingInline: "var(--Chip-paddingInline)",
|
|
82
|
+
borderRadius: "var(--_Chip-radius)",
|
|
83
|
+
position: "relative",
|
|
84
|
+
display: "inline-flex",
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
justifyContent: "center",
|
|
87
|
+
whiteSpace: "nowrap",
|
|
88
|
+
textDecoration: "none",
|
|
89
|
+
verticalAlign: "middle",
|
|
90
|
+
boxSizing: "border-box"
|
|
91
|
+
}, o.typography[`body-${{
|
|
92
|
+
sm: "xs",
|
|
93
|
+
md: "sm",
|
|
94
|
+
lg: "md"
|
|
95
|
+
}[i.size]}`], {
|
|
96
|
+
fontWeight: o.vars.fontWeight.md,
|
|
97
|
+
[`&.${x.disabled}`]: {
|
|
98
|
+
color: (r = o.variants[`${i.variant}Disabled`]) == null || (r = r[i.color]) == null ? void 0 : r.color
|
|
99
|
+
}
|
|
100
|
+
}), ...i.clickable ? [{
|
|
101
|
+
"--variant-borderWidth": "0px",
|
|
102
|
+
color: t == null ? void 0 : t.color
|
|
103
|
+
}] : [e({
|
|
104
|
+
backgroundColor: o.vars.palette.background.surface
|
|
105
|
+
}, t, {
|
|
106
|
+
[`&.${x.disabled}`]: (n = o.variants[`${i.variant}Disabled`]) == null ? void 0 : n[i.color]
|
|
107
|
+
})], l !== void 0 && {
|
|
108
|
+
"--_Chip-radius": l
|
|
109
|
+
}];
|
|
110
|
+
}), ti = C("span", {
|
|
111
|
+
name: "JoyChip",
|
|
112
|
+
slot: "Label",
|
|
113
|
+
overridesResolver: (o, i) => i.label
|
|
114
|
+
})(({
|
|
115
|
+
ownerState: o
|
|
116
|
+
}) => e({
|
|
117
|
+
display: "inline-block",
|
|
118
|
+
overflow: "hidden",
|
|
119
|
+
textOverflow: "ellipsis",
|
|
120
|
+
order: 1,
|
|
121
|
+
minInlineSize: 0,
|
|
122
|
+
flexGrow: 1
|
|
123
|
+
}, o.clickable && {
|
|
124
|
+
zIndex: 1,
|
|
125
|
+
pointerEvents: "none"
|
|
126
|
+
})), ni = C("button", {
|
|
127
|
+
name: "JoyChip",
|
|
128
|
+
slot: "Action",
|
|
129
|
+
overridesResolver: (o, i) => i.action
|
|
130
|
+
})(({
|
|
131
|
+
theme: o,
|
|
132
|
+
ownerState: i
|
|
133
|
+
}) => {
|
|
134
|
+
var a, r, n, t;
|
|
135
|
+
return [{
|
|
136
|
+
"--Icon-color": i.color !== "neutral" || i.variant === "solid" ? "currentColor" : o.vars.palette.text.icon,
|
|
137
|
+
position: "absolute",
|
|
138
|
+
zIndex: 0,
|
|
139
|
+
top: 0,
|
|
140
|
+
left: 0,
|
|
141
|
+
bottom: 0,
|
|
142
|
+
right: 0,
|
|
143
|
+
width: "100%",
|
|
144
|
+
// To fix Firefox issue (https://github.com/mui/material-ui/issues/36877)
|
|
145
|
+
border: "none",
|
|
146
|
+
cursor: "pointer",
|
|
147
|
+
padding: "initial",
|
|
148
|
+
margin: "initial",
|
|
149
|
+
backgroundColor: "initial",
|
|
150
|
+
textDecoration: "none",
|
|
151
|
+
borderRadius: "inherit",
|
|
152
|
+
[o.focus.selector]: o.focus.default
|
|
153
|
+
}, e({
|
|
154
|
+
backgroundColor: o.vars.palette.background.surface
|
|
155
|
+
}, (a = o.variants[i.variant]) == null ? void 0 : a[i.color]), {
|
|
156
|
+
"&:hover": {
|
|
157
|
+
"@media (hover: hover)": (r = o.variants[`${i.variant}Hover`]) == null ? void 0 : r[i.color]
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
"&:active": (n = o.variants[`${i.variant}Active`]) == null ? void 0 : n[i.color]
|
|
161
|
+
}, {
|
|
162
|
+
[`&.${x.disabled}`]: (t = o.variants[`${i.variant}Disabled`]) == null ? void 0 : t[i.color]
|
|
163
|
+
}];
|
|
164
|
+
}), si = C("span", {
|
|
165
|
+
name: "JoyChip",
|
|
166
|
+
slot: "StartDecorator",
|
|
167
|
+
overridesResolver: (o, i) => i.startDecorator
|
|
168
|
+
})({
|
|
169
|
+
"--Avatar-marginInlineStart": "calc(var(--Chip-decoratorChildOffset) * -1)",
|
|
170
|
+
"--IconButton-margin": "0 calc(-1 * var(--Chip-paddingInline) / 3) 0 calc(var(--Chip-decoratorChildOffset) * -1)",
|
|
171
|
+
"--Icon-margin": "0 0 0 calc(var(--Chip-paddingInline) / -4)",
|
|
172
|
+
display: "inherit",
|
|
173
|
+
// set zIndex to 1 with order to stay on top of other controls, for example Checkbox, Radio
|
|
174
|
+
order: 0,
|
|
175
|
+
zIndex: 1,
|
|
176
|
+
pointerEvents: "none"
|
|
177
|
+
}), li = C("span", {
|
|
178
|
+
name: "JoyChip",
|
|
179
|
+
slot: "EndDecorator",
|
|
180
|
+
overridesResolver: (o, i) => i.endDecorator
|
|
181
|
+
})({
|
|
182
|
+
"--IconButton-margin": "0 calc(var(--Chip-decoratorChildOffset) * -1) 0 calc(-1 * var(--Chip-paddingInline) / 3)",
|
|
183
|
+
"--Icon-margin": "0 calc(var(--Chip-paddingInline) / -4) 0 0",
|
|
184
|
+
display: "inherit",
|
|
185
|
+
// set zIndex to 1 with order to stay on top of other controls, for example Checkbox, Radio
|
|
186
|
+
order: 2,
|
|
187
|
+
zIndex: 1,
|
|
188
|
+
pointerEvents: "none"
|
|
189
|
+
}), vi = /* @__PURE__ */ g.forwardRef(function(i, a) {
|
|
190
|
+
const r = G({
|
|
191
|
+
props: i,
|
|
192
|
+
name: "JoyChip"
|
|
193
|
+
}), {
|
|
194
|
+
children: n,
|
|
195
|
+
className: t,
|
|
196
|
+
color: l = "neutral",
|
|
197
|
+
onClick: u,
|
|
198
|
+
disabled: m = !1,
|
|
199
|
+
size: H = "md",
|
|
200
|
+
variant: D = "soft",
|
|
201
|
+
startDecorator: _,
|
|
202
|
+
endDecorator: y,
|
|
203
|
+
component: $,
|
|
204
|
+
slots: P = {},
|
|
205
|
+
slotProps: d = {}
|
|
206
|
+
} = r, k = q(r, ri), I = !!u || !!d.action, s = e({}, r, {
|
|
207
|
+
disabled: m,
|
|
208
|
+
size: H,
|
|
209
|
+
color: l,
|
|
210
|
+
variant: D,
|
|
211
|
+
clickable: I,
|
|
212
|
+
focusVisible: !1
|
|
213
|
+
}), f = typeof d.action == "function" ? d.action(s) : d.action, W = g.useRef(null), {
|
|
214
|
+
focusVisible: j,
|
|
215
|
+
getRootProps: V
|
|
216
|
+
} = Z(e({}, f, {
|
|
217
|
+
disabled: m,
|
|
218
|
+
rootRef: W
|
|
219
|
+
}));
|
|
220
|
+
s.focusVisible = j;
|
|
221
|
+
const p = ai(s), v = e({}, k, {
|
|
222
|
+
component: $,
|
|
223
|
+
slots: P,
|
|
224
|
+
slotProps: d
|
|
225
|
+
}), [A, E] = h("root", {
|
|
226
|
+
ref: a,
|
|
227
|
+
className: K(p.root, t),
|
|
228
|
+
elementType: ei,
|
|
229
|
+
externalForwardedProps: v,
|
|
230
|
+
ownerState: s
|
|
231
|
+
}), [S, z] = h("label", {
|
|
232
|
+
className: p.label,
|
|
233
|
+
elementType: ti,
|
|
234
|
+
externalForwardedProps: v,
|
|
235
|
+
ownerState: s
|
|
236
|
+
}), R = Q(z.id), [N, B] = h("action", {
|
|
237
|
+
className: p.action,
|
|
238
|
+
elementType: ni,
|
|
239
|
+
externalForwardedProps: v,
|
|
240
|
+
ownerState: s,
|
|
241
|
+
getSlotProps: V,
|
|
242
|
+
additionalProps: {
|
|
243
|
+
"aria-labelledby": R,
|
|
244
|
+
as: f == null ? void 0 : f.component,
|
|
245
|
+
onClick: u
|
|
246
|
+
}
|
|
247
|
+
}), [J, L] = h("startDecorator", {
|
|
248
|
+
className: p.startDecorator,
|
|
249
|
+
elementType: si,
|
|
250
|
+
externalForwardedProps: v,
|
|
251
|
+
ownerState: s
|
|
252
|
+
}), [O, T] = h("endDecorator", {
|
|
253
|
+
className: p.endDecorator,
|
|
254
|
+
elementType: li,
|
|
255
|
+
externalForwardedProps: v,
|
|
256
|
+
ownerState: s
|
|
257
|
+
}), M = g.useMemo(() => ({
|
|
258
|
+
disabled: m
|
|
259
|
+
}), [m]);
|
|
260
|
+
return /* @__PURE__ */ c.jsx(oi.Provider, {
|
|
261
|
+
value: M,
|
|
262
|
+
children: /* @__PURE__ */ c.jsx(Y, {
|
|
263
|
+
variant: D,
|
|
264
|
+
color: l,
|
|
265
|
+
children: /* @__PURE__ */ c.jsxs(A, e({}, E, {
|
|
266
|
+
children: [I && /* @__PURE__ */ c.jsx(N, e({}, B)), /* @__PURE__ */ c.jsx(S, e({}, z, {
|
|
267
|
+
id: R,
|
|
268
|
+
children: n
|
|
269
|
+
})), _ && /* @__PURE__ */ c.jsx(J, e({}, L, {
|
|
270
|
+
children: _
|
|
271
|
+
})), y && /* @__PURE__ */ c.jsx(O, e({}, T, {
|
|
272
|
+
children: y
|
|
273
|
+
}))]
|
|
274
|
+
}))
|
|
275
|
+
})
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
export {
|
|
279
|
+
vi as C,
|
|
280
|
+
oi as a
|
|
281
|
+
};
|