fansunited-frontend-components 0.0.39 → 0.0.40
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/ChanceGame.js +104 -102
- package/ClassicQuizPlay.js +45 -42
- package/CollectLead.js +25 -24
- package/Discussion.js +376 -378
- package/EitherOrPlay.d.ts +4 -0
- package/EitherOrPlay.d.ts.map +1 -0
- package/EitherOrPlay.js +2533 -0
- package/EventGamePlay.js +59 -54
- package/MatchQuizPlay.js +63 -57
- package/PersonalityQuizPlay.js +7935 -7201
- package/PickThePair.js +153 -151
- package/PollVote.js +108 -104
- package/chunks/{AlertMessage-C2aBXCrl.js → AlertMessage-cjTHrMUK.js} +51 -51
- package/chunks/ArrowRightAlt-88jKjh6A.js +8 -0
- package/chunks/Avatar-CQCrd1m-.js +352 -0
- package/chunks/ChanceGameEmbedVariant-DWqOTf4o.js +1051 -0
- package/chunks/{CheckCircle-D-GH16Lb.js → CheckCircle-ClY-iOQ5.js} +105 -105
- package/chunks/{CollectLeadForm-o9NdYQgu.js → CollectLeadForm-0vVnu4DL.js} +5 -5
- package/chunks/FavoriteBorder-BHnvGBrn.js +11 -0
- package/chunks/{useInfoPage-v91yL5SS.js → NotFoundSkeleton-B3RNa8KJ.js} +451 -646
- package/chunks/Notification-BTtUhfZQ.js +615 -0
- package/chunks/OverlayLeadAfterCollection-CaBbwZVo.js +480 -0
- package/chunks/{OverlayScoreStateSkeleton-xvq9lQEi.js → OverlayScoreStateSkeleton-DJn0Rim3.js} +3 -3
- package/chunks/Person-D0Im9_zE.js +522 -0
- package/chunks/{PickOneOfX-C2YpLk40.js → PickOneOfX-DYQ4c1o2.js} +7 -7
- package/chunks/{Portal-DWAr8MhA.js → Portal-B9wkUnY2.js} +7 -7
- package/chunks/{ConstantsProvider-BPJJz9fq.js → PrizeCard-gMp7I66d.js} +3593 -2860
- package/chunks/{Spinner-m59ZJZ35.js → Spinner-BBA89t5s.js} +50 -50
- package/chunks/StandardLeadAfterCollection-L1cOGfS6.js +432 -0
- package/chunks/{Tabs-BGihvj9C.js → Tabs-D_n8rNw3.js} +28 -28
- package/chunks/{Textarea-Bzlb89Zp.js → Textarea-BdN2xj4j.js} +44 -44
- package/chunks/{TimerOutlined-DiX8hCoC.js → TimerOutlined-DmKZDDI-.js} +1 -1
- package/chunks/chevron-right-DGEksBI7.js +330 -0
- package/chunks/default-quiz-bg-vertical-CT7rrg9o.js +5 -0
- package/chunks/index-2s5UkG1y.js +1607 -0
- package/chunks/useImageVariant-pnFelF9A.js +535 -0
- package/chunks/useInfoPage-DPkzE5Gn.js +204 -0
- package/components.d.ts +2 -1
- package/components.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/package.json +1 -1
- package/chunks/ChanceGameEmbedVariant-BvIKBhq_.js +0 -2609
- package/chunks/Notification-Bwcoljir.js +0 -961
- package/chunks/OverlayLeadAfterCollection-B3D5ct0J.js +0 -901
- package/chunks/chevron-right-Dlc9ZKhv.js +0 -846
- package/chunks/useImageVariant-Do8kOVs2.js +0 -537
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { l as I, m as k, s as z, _ as c, P as e, q as R, t as j, v as h, w as L, y as _, x as N } from "./PrizeCard-gMp7I66d.js";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { c as V } from "./CheckCircle-ClY-iOQ5.js";
|
|
4
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
5
|
+
const W = V(/* @__PURE__ */ v("path", {
|
|
6
|
+
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
7
|
+
}), "Person");
|
|
8
|
+
function q(r) {
|
|
9
|
+
return I("MuiAvatar", r);
|
|
10
|
+
}
|
|
11
|
+
k("MuiAvatar", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "fallback", "sizeSm", "sizeMd", "sizeLg", "img", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
12
|
+
function H(r) {
|
|
13
|
+
return I("MuiAvatarGroup", r);
|
|
14
|
+
}
|
|
15
|
+
k("MuiAvatarGroup", ["root"]);
|
|
16
|
+
const B = ["className", "color", "component", "size", "variant", "children", "slots", "slotProps"], C = /* @__PURE__ */ p.createContext(void 0);
|
|
17
|
+
process.env.NODE_ENV !== "production" && (C.displayName = "AvatarGroupContext");
|
|
18
|
+
const K = () => _({
|
|
19
|
+
root: ["root"]
|
|
20
|
+
}, H, {}), Q = z("div", {
|
|
21
|
+
name: "JoyAvatarGroup",
|
|
22
|
+
slot: "Root",
|
|
23
|
+
overridesResolver: (r, o) => o.root
|
|
24
|
+
})(({
|
|
25
|
+
ownerState: r,
|
|
26
|
+
theme: o
|
|
27
|
+
}) => c({}, r.size === "sm" && {
|
|
28
|
+
"--AvatarGroup-gap": "-0.375rem",
|
|
29
|
+
"--Avatar-ringSize": "2px"
|
|
30
|
+
}, r.size === "md" && {
|
|
31
|
+
"--AvatarGroup-gap": "-0.5rem",
|
|
32
|
+
"--Avatar-ringSize": "2px"
|
|
33
|
+
}, r.size === "lg" && {
|
|
34
|
+
"--AvatarGroup-gap": "-0.625rem",
|
|
35
|
+
"--Avatar-ringSize": "4px"
|
|
36
|
+
}, {
|
|
37
|
+
"--Avatar-ring": `0 0 0 var(--Avatar-ringSize) var(--Avatar-ringColor, ${o.vars.palette.background.surface})`,
|
|
38
|
+
"--Avatar-marginInlineStart": "var(--AvatarGroup-gap)",
|
|
39
|
+
display: "flex",
|
|
40
|
+
marginInlineStart: "calc(-1 * var(--AvatarGroup-gap))"
|
|
41
|
+
})), X = /* @__PURE__ */ p.forwardRef(function(o, a) {
|
|
42
|
+
const t = R({
|
|
43
|
+
props: o,
|
|
44
|
+
name: "JoyAvatarGroup"
|
|
45
|
+
}), {
|
|
46
|
+
className: s,
|
|
47
|
+
color: n,
|
|
48
|
+
component: i = "div",
|
|
49
|
+
size: l = "md",
|
|
50
|
+
variant: f,
|
|
51
|
+
children: d,
|
|
52
|
+
slots: m = {},
|
|
53
|
+
slotProps: g = {}
|
|
54
|
+
} = t, T = j(t, B), y = p.useMemo(() => c({}, t, {
|
|
55
|
+
color: n,
|
|
56
|
+
component: i,
|
|
57
|
+
size: l,
|
|
58
|
+
variant: f
|
|
59
|
+
}), [n, i, t, l, f]), b = K(), [x, O] = h("root", {
|
|
60
|
+
ref: a,
|
|
61
|
+
className: L(b.root, s),
|
|
62
|
+
elementType: Q,
|
|
63
|
+
externalForwardedProps: c({}, T, {
|
|
64
|
+
component: i,
|
|
65
|
+
slots: m,
|
|
66
|
+
slotProps: g
|
|
67
|
+
}),
|
|
68
|
+
ownerState: y
|
|
69
|
+
});
|
|
70
|
+
return /* @__PURE__ */ v(C.Provider, {
|
|
71
|
+
value: y,
|
|
72
|
+
children: /* @__PURE__ */ v(x, c({}, O, {
|
|
73
|
+
children: d
|
|
74
|
+
}))
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
78
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
79
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
80
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
81
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
82
|
+
/**
|
|
83
|
+
* Used to render icon or text elements inside the AvatarGroup if `src` is not set.
|
|
84
|
+
* This can be an element, or just a string.
|
|
85
|
+
*/
|
|
86
|
+
children: e.node,
|
|
87
|
+
/**
|
|
88
|
+
* @ignore
|
|
89
|
+
*/
|
|
90
|
+
className: e.string,
|
|
91
|
+
/**
|
|
92
|
+
* The color of the component. It supports those theme colors that make sense for this component.
|
|
93
|
+
* @default 'neutral'
|
|
94
|
+
*/
|
|
95
|
+
color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
|
|
96
|
+
/**
|
|
97
|
+
* The component used for the root node.
|
|
98
|
+
* Either a string to use a HTML element or a component.
|
|
99
|
+
*/
|
|
100
|
+
component: e.elementType,
|
|
101
|
+
/**
|
|
102
|
+
* The size of the component.
|
|
103
|
+
* It accepts theme values between 'sm' and 'lg'.
|
|
104
|
+
* @default 'md'
|
|
105
|
+
*/
|
|
106
|
+
size: e.oneOfType([e.oneOf(["lg", "md", "sm"]), e.string]),
|
|
107
|
+
/**
|
|
108
|
+
* The props used for each slot inside.
|
|
109
|
+
* @default {}
|
|
110
|
+
*/
|
|
111
|
+
slotProps: e.shape({
|
|
112
|
+
root: e.oneOfType([e.func, e.object])
|
|
113
|
+
}),
|
|
114
|
+
/**
|
|
115
|
+
* The components used for each slot inside.
|
|
116
|
+
* @default {}
|
|
117
|
+
*/
|
|
118
|
+
slots: e.shape({
|
|
119
|
+
root: e.elementType
|
|
120
|
+
}),
|
|
121
|
+
/**
|
|
122
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
123
|
+
*/
|
|
124
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
125
|
+
/**
|
|
126
|
+
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
|
|
127
|
+
* @default 'soft'
|
|
128
|
+
*/
|
|
129
|
+
variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
|
|
130
|
+
});
|
|
131
|
+
const Y = ["alt", "color", "size", "variant", "src", "srcSet", "children", "component", "slots", "slotProps"], Z = (r) => {
|
|
132
|
+
const {
|
|
133
|
+
size: o,
|
|
134
|
+
variant: a,
|
|
135
|
+
color: t,
|
|
136
|
+
src: s,
|
|
137
|
+
srcSet: n
|
|
138
|
+
} = r, i = {
|
|
139
|
+
root: ["root", a && `variant${N(a)}`, t && `color${N(t)}`, o && `size${N(o)}`],
|
|
140
|
+
img: [(s || n) && "img"],
|
|
141
|
+
fallback: ["fallback"]
|
|
142
|
+
};
|
|
143
|
+
return _(i, q, {});
|
|
144
|
+
}, ee = z("div", {
|
|
145
|
+
name: "JoyAvatar",
|
|
146
|
+
slot: "Root",
|
|
147
|
+
overridesResolver: (r, o) => o.root
|
|
148
|
+
})(({
|
|
149
|
+
theme: r,
|
|
150
|
+
ownerState: o
|
|
151
|
+
}) => {
|
|
152
|
+
var a;
|
|
153
|
+
return c({
|
|
154
|
+
"--Icon-color": o.color !== "neutral" || o.variant === "solid" ? "currentColor" : r.vars.palette.text.icon
|
|
155
|
+
}, r.typography[`title-${o.size}`], o.size === "sm" && {
|
|
156
|
+
width: "var(--Avatar-size, 2rem)",
|
|
157
|
+
height: "var(--Avatar-size, 2rem)",
|
|
158
|
+
fontSize: "calc(var(--Avatar-size, 2rem) * 0.4375)"
|
|
159
|
+
// default as 14px
|
|
160
|
+
}, o.size === "md" && {
|
|
161
|
+
width: "var(--Avatar-size, 2.5rem)",
|
|
162
|
+
height: "var(--Avatar-size, 2.5rem)",
|
|
163
|
+
fontSize: "calc(var(--Avatar-size, 2.5rem) * 0.4)"
|
|
164
|
+
// default as 16px
|
|
165
|
+
}, o.size === "lg" && {
|
|
166
|
+
width: "var(--Avatar-size, 3rem)",
|
|
167
|
+
height: "var(--Avatar-size, 3rem)",
|
|
168
|
+
fontSize: "calc(var(--Avatar-size, 3rem) * 0.375)"
|
|
169
|
+
// default as 18px
|
|
170
|
+
}, {
|
|
171
|
+
marginInlineStart: "var(--Avatar-marginInlineStart)",
|
|
172
|
+
boxShadow: "var(--Avatar-ring)",
|
|
173
|
+
position: "relative",
|
|
174
|
+
display: "flex",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
justifyContent: "center",
|
|
177
|
+
flexShrink: 0,
|
|
178
|
+
lineHeight: 1,
|
|
179
|
+
overflow: "hidden",
|
|
180
|
+
borderRadius: "var(--Avatar-radius, 50%)",
|
|
181
|
+
userSelect: "none"
|
|
182
|
+
}, (a = r.variants[o.variant]) == null ? void 0 : a[o.color]);
|
|
183
|
+
}), oe = z("img", {
|
|
184
|
+
name: "JoyAvatar",
|
|
185
|
+
slot: "Img",
|
|
186
|
+
overridesResolver: (r, o) => o.img
|
|
187
|
+
})({
|
|
188
|
+
width: "100%",
|
|
189
|
+
height: "100%",
|
|
190
|
+
textAlign: "center",
|
|
191
|
+
// Handle non-square image. The property isn't supported by IE11.
|
|
192
|
+
objectFit: "cover",
|
|
193
|
+
// Hide alt text.
|
|
194
|
+
color: "transparent",
|
|
195
|
+
// Hide the image broken icon, only works on Chrome.
|
|
196
|
+
textIndent: 1e4
|
|
197
|
+
}), re = z(W, {
|
|
198
|
+
name: "JoyAvatar",
|
|
199
|
+
slot: "Fallback",
|
|
200
|
+
overridesResolver: (r, o) => o.fallback
|
|
201
|
+
})({
|
|
202
|
+
width: "64%",
|
|
203
|
+
height: "64%"
|
|
204
|
+
});
|
|
205
|
+
function te({
|
|
206
|
+
crossOrigin: r,
|
|
207
|
+
referrerPolicy: o,
|
|
208
|
+
src: a,
|
|
209
|
+
srcSet: t
|
|
210
|
+
}) {
|
|
211
|
+
const [s, n] = p.useState(!1);
|
|
212
|
+
return p.useEffect(() => {
|
|
213
|
+
if (!a && !t)
|
|
214
|
+
return;
|
|
215
|
+
n(!1);
|
|
216
|
+
let i = !0;
|
|
217
|
+
const l = new Image();
|
|
218
|
+
return l.onload = () => {
|
|
219
|
+
i && n("loaded");
|
|
220
|
+
}, l.onerror = () => {
|
|
221
|
+
i && n("error");
|
|
222
|
+
}, l.crossOrigin = r, l.referrerPolicy = o, a && (l.src = a), t && (l.srcset = t), () => {
|
|
223
|
+
i = !1;
|
|
224
|
+
};
|
|
225
|
+
}, [r, o, a, t]), s;
|
|
226
|
+
}
|
|
227
|
+
const ae = /* @__PURE__ */ p.forwardRef(function(o, a) {
|
|
228
|
+
const t = R({
|
|
229
|
+
props: o,
|
|
230
|
+
name: "JoyAvatar"
|
|
231
|
+
}), s = p.useContext(C), {
|
|
232
|
+
alt: n,
|
|
233
|
+
color: i = "neutral",
|
|
234
|
+
size: l = "md",
|
|
235
|
+
variant: f = "soft",
|
|
236
|
+
src: d,
|
|
237
|
+
srcSet: m,
|
|
238
|
+
children: g,
|
|
239
|
+
component: T,
|
|
240
|
+
slots: y = {},
|
|
241
|
+
slotProps: b = {}
|
|
242
|
+
} = t, x = j(t, Y), O = o.variant || (s == null ? void 0 : s.variant) || f, w = o.color || (s == null ? void 0 : s.color) || i, F = o.size || (s == null ? void 0 : s.size) || l;
|
|
243
|
+
let u = null;
|
|
244
|
+
const A = c({}, t, {
|
|
245
|
+
color: w,
|
|
246
|
+
size: F,
|
|
247
|
+
variant: O,
|
|
248
|
+
grouped: !!s
|
|
249
|
+
}), P = Z(A), S = c({}, x, {
|
|
250
|
+
component: T,
|
|
251
|
+
slots: y,
|
|
252
|
+
slotProps: b
|
|
253
|
+
}), [$, E] = h("root", {
|
|
254
|
+
ref: a,
|
|
255
|
+
className: P.root,
|
|
256
|
+
elementType: ee,
|
|
257
|
+
externalForwardedProps: S,
|
|
258
|
+
ownerState: A
|
|
259
|
+
}), [M, G] = h("img", {
|
|
260
|
+
additionalProps: {
|
|
261
|
+
alt: n,
|
|
262
|
+
src: d,
|
|
263
|
+
srcSet: m
|
|
264
|
+
},
|
|
265
|
+
className: P.img,
|
|
266
|
+
elementType: oe,
|
|
267
|
+
externalForwardedProps: S,
|
|
268
|
+
ownerState: A
|
|
269
|
+
}), [J, U] = h("fallback", {
|
|
270
|
+
className: P.fallback,
|
|
271
|
+
elementType: re,
|
|
272
|
+
externalForwardedProps: S,
|
|
273
|
+
ownerState: A
|
|
274
|
+
}), D = te(c({}, G, {
|
|
275
|
+
src: d,
|
|
276
|
+
srcSet: m
|
|
277
|
+
}));
|
|
278
|
+
return (d || m) && D !== "error" ? u = /* @__PURE__ */ v(M, c({}, G)) : g != null ? u = g : n ? u = n[0] : u = /* @__PURE__ */ v(J, c({}, U)), /* @__PURE__ */ v($, c({}, E, {
|
|
279
|
+
children: u
|
|
280
|
+
}));
|
|
281
|
+
});
|
|
282
|
+
process.env.NODE_ENV !== "production" && (ae.propTypes = {
|
|
283
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
284
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
285
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
286
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
287
|
+
/**
|
|
288
|
+
* Used in combination with `src` or `srcSet` to
|
|
289
|
+
* provide an alt attribute for the rendered `img` element.
|
|
290
|
+
*/
|
|
291
|
+
alt: e.string,
|
|
292
|
+
/**
|
|
293
|
+
* Used to render icon or text elements inside the Avatar if `src` is not set.
|
|
294
|
+
* This can be an element, or just a string.
|
|
295
|
+
*/
|
|
296
|
+
children: e.node,
|
|
297
|
+
/**
|
|
298
|
+
* The color of the component. It supports those theme colors that make sense for this component.
|
|
299
|
+
* @default 'neutral'
|
|
300
|
+
*/
|
|
301
|
+
color: e.oneOfType([e.oneOf(["danger", "neutral", "primary", "success", "warning"]), e.string]),
|
|
302
|
+
/**
|
|
303
|
+
* The component used for the root node.
|
|
304
|
+
* Either a string to use a HTML element or a component.
|
|
305
|
+
*/
|
|
306
|
+
component: e.elementType,
|
|
307
|
+
/**
|
|
308
|
+
* The size of the component.
|
|
309
|
+
* It accepts theme values between 'sm' and 'lg'.
|
|
310
|
+
* @default 'md'
|
|
311
|
+
*/
|
|
312
|
+
size: e.oneOfType([e.oneOf(["lg", "md", "sm"]), e.string]),
|
|
313
|
+
/**
|
|
314
|
+
* The props used for each slot inside.
|
|
315
|
+
* @default {}
|
|
316
|
+
*/
|
|
317
|
+
slotProps: e.shape({
|
|
318
|
+
fallback: e.oneOfType([e.func, e.object]),
|
|
319
|
+
img: e.oneOfType([e.func, e.object]),
|
|
320
|
+
root: e.oneOfType([e.func, e.object])
|
|
321
|
+
}),
|
|
322
|
+
/**
|
|
323
|
+
* The components used for each slot inside.
|
|
324
|
+
* @default {}
|
|
325
|
+
*/
|
|
326
|
+
slots: e.shape({
|
|
327
|
+
fallback: e.elementType,
|
|
328
|
+
img: e.elementType,
|
|
329
|
+
root: e.elementType
|
|
330
|
+
}),
|
|
331
|
+
/**
|
|
332
|
+
* The `src` attribute for the `img` element.
|
|
333
|
+
*/
|
|
334
|
+
src: e.string,
|
|
335
|
+
/**
|
|
336
|
+
* The `srcSet` attribute for the `img` element.
|
|
337
|
+
* Use this attribute for responsive image display.
|
|
338
|
+
*/
|
|
339
|
+
srcSet: e.string,
|
|
340
|
+
/**
|
|
341
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
342
|
+
*/
|
|
343
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
344
|
+
/**
|
|
345
|
+
* The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
|
|
346
|
+
* @default 'soft'
|
|
347
|
+
*/
|
|
348
|
+
variant: e.oneOfType([e.oneOf(["outlined", "plain", "soft", "solid"]), e.string])
|
|
349
|
+
});
|
|
350
|
+
export {
|
|
351
|
+
ae as A
|
|
352
|
+
};
|