fansunited-frontend-components 0.0.39 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/ChanceGame.js +28 -27
  2. package/ClassicQuizPlay.js +391 -465
  3. package/CollectLead.js +18 -18
  4. package/Discussion.js +352 -354
  5. package/EitherOrPlay.d.ts +4 -0
  6. package/EitherOrPlay.d.ts.map +1 -0
  7. package/EitherOrPlay.js +3466 -0
  8. package/EventGamePlay.js +141 -138
  9. package/MatchQuizPlay.js +50 -46
  10. package/PersonalityQuizPlay.js +7938 -7204
  11. package/PickThePair.js +167 -166
  12. package/PollVote.js +128 -126
  13. package/README.md +221 -0
  14. package/chunks/{AlertMessage-C2aBXCrl.js → AlertMessage-3_SCZvz1.js} +51 -51
  15. package/chunks/ArrowRightAlt-BD07mCvx.js +84 -0
  16. package/chunks/Avatar-KNv8XYy7.js +352 -0
  17. package/chunks/ChanceGameEmbedVariant-CU89dG5i.js +794 -0
  18. package/chunks/{CheckCircle-D-GH16Lb.js → CheckCircle-BN3JPCHe.js} +89 -89
  19. package/chunks/{CollectLeadForm-o9NdYQgu.js → CollectLeadForm-SmMCUqru.js} +5 -5
  20. package/chunks/FavoriteBorder-CvVAkjXZ.js +11 -0
  21. package/chunks/{useInfoPage-v91yL5SS.js → NotFoundSkeleton-D_vGI3dq.js} +398 -444
  22. package/chunks/Notification-COxHzleW.js +615 -0
  23. package/chunks/OverlayLeadAfterCollection-CXKZpFh8.js +676 -0
  24. package/chunks/{OverlayScoreStateSkeleton-xvq9lQEi.js → OverlayScoreStateSkeleton-CNMFSgqJ.js} +3 -3
  25. package/chunks/Person-SBTPAU3M.js +522 -0
  26. package/chunks/{PickOneOfX-C2YpLk40.js → PickOneOfX-CkwTfROr.js} +33 -33
  27. package/chunks/{Portal-DWAr8MhA.js → Portal-C7GozjB_.js} +1 -1
  28. package/chunks/{ConstantsProvider-BPJJz9fq.js → PrizeCard-BSUBLboD.js} +3592 -2859
  29. package/chunks/{Spinner-m59ZJZ35.js → Spinner-ZSTSbKeP.js} +51 -51
  30. package/chunks/SplitLeadAfterCollection-AVbw5OZ9.js +234 -0
  31. package/chunks/{Tabs-BGihvj9C.js → Tabs-_Ol1y7pb.js} +61 -61
  32. package/chunks/{Textarea-Bzlb89Zp.js → Textarea-B_KaoVEP.js} +71 -71
  33. package/chunks/{TimerOutlined-DiX8hCoC.js → TimerOutlined-C4Xz6IP8.js} +1 -1
  34. package/chunks/chevron-right-B128Qek1.js +330 -0
  35. package/chunks/index-BT8EkX60.js +1863 -0
  36. package/chunks/{useImageVariant-Do8kOVs2.js → useImageVariant-dCl80yl9.js} +8 -8
  37. package/chunks/useInfoPage-BHdgKdme.js +50 -0
  38. package/components.d.ts +2 -1
  39. package/components.d.ts.map +1 -1
  40. package/index.d.ts +1 -0
  41. package/index.d.ts.map +1 -1
  42. package/index.js +4 -2
  43. package/package.json +1 -1
  44. package/chunks/ChanceGameEmbedVariant-BvIKBhq_.js +0 -2609
  45. package/chunks/Notification-Bwcoljir.js +0 -961
  46. package/chunks/OverlayLeadAfterCollection-B3D5ct0J.js +0 -901
  47. package/chunks/chevron-right-Dlc9ZKhv.js +0 -846
package/ChanceGame.js CHANGED
@@ -1,11 +1,12 @@
1
1
  import { jsx as t, jsxs as w, Fragment as re } from "react/jsx-runtime";
2
- import { h as Ce, u as xe, d as Te, a as $e, g as Je, l as Ke } from "./chunks/useImageVariant-Do8kOVs2.js";
2
+ import { h as Ce, u as xe, d as Te, a as $e, g as Je, l as Ke } from "./chunks/useImageVariant-dCl80yl9.js";
3
3
  import Z, { useState as qe, useEffect as Qe } from "react";
4
- import { e as K, a3 as Ze, w as ve, x as ie, a2 as Se, B as m, a0 as se, a4 as ue, v as we, f as fe, T as D, a5 as he, a6 as Ae, W as pe, u as Ie, a7 as et, i as tt, a8 as ne, c as ot, C as nt, a as rt, E as lt, b as it } from "./chunks/ConstantsProvider-BPJJz9fq.js";
5
- import { S as at } from "./chunks/Spinner-m59ZJZ35.js";
4
+ import { e as K, S as Ze, h as ve, j as ie, R as Se, B as m, O as se, aa as ue, g as we, f as fe, T as D, Q as he, ab as Ae, W as pe, u as Ie, ac as et, i as tt, U as ne, c as ot, C as nt, a as rt, E as lt, b as it } from "./chunks/PrizeCard-BSUBLboD.js";
5
+ import { S as at } from "./chunks/Spinner-ZSTSbKeP.js";
6
6
  import { createPortal as st } from "react-dom";
7
- import { N as ct, S as Ee, O as Ge, u as dt } from "./chunks/useInfoPage-v91yL5SS.js";
8
- import { u as mt, S as le, c as He, D as Ne, C as ut, W as ht, a as xt, b as ft, d as pt, O as gt, F as bt, P as ye, e as yt, f as vt } from "./chunks/PickOneOfX-C2YpLk40.js";
7
+ import { u as ct } from "./chunks/useInfoPage-BHdgKdme.js";
8
+ import { N as dt, S as Ee, O as Ge } from "./chunks/NotFoundSkeleton-D_vGI3dq.js";
9
+ import { u as mt, S as le, c as He, D as Ne, C as ut, W as ht, d as xt, e as ft, f as pt, O as gt, F as bt, b as ye, a as yt, P as vt } from "./chunks/PickOneOfX-CkwTfROr.js";
9
10
  const ke = ({
10
11
  children: e,
11
12
  brandingBorderColor: s,
@@ -33,7 +34,7 @@ const ke = ({
33
34
  template: e
34
35
  }) => {
35
36
  const { t: s } = se(), a = /* @__PURE__ */ t(
36
- ct,
37
+ dt,
37
38
  {
38
39
  notFoundTitle: s("chanceGame.chanceGameNotFound"),
39
40
  notFoundMessage: s("chanceGame.chanceGameNotFoundDescription")
@@ -64,9 +65,9 @@ const ke = ({
64
65
  showInlineResult: k,
65
66
  hasEntered: $,
66
67
  confettiActive: z,
67
- spinDuration: P,
68
- shakeAnimationDuration: U,
69
- confettiVelocityMultiplier: j,
68
+ spinDuration: U,
69
+ shakeAnimationDuration: j,
70
+ confettiVelocityMultiplier: P,
70
71
  confettiGravity: A,
71
72
  handleSpin: I,
72
73
  handleReset: v,
@@ -85,7 +86,7 @@ const ke = ({
85
86
  {
86
87
  active: z,
87
88
  primaryColor: r,
88
- velocityMultiplier: j,
89
+ velocityMultiplier: P,
89
90
  gravity: A,
90
91
  onComplete: ee
91
92
  }
@@ -254,7 +255,7 @@ const ke = ({
254
255
  transform: $ ? "scale(1)" : "scale(0.85)",
255
256
  transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
256
257
  // Shake animation
257
- animation: X ? `wheelShake ${U / 2}ms ease-in-out 2` : "none",
258
+ animation: X ? `wheelShake ${j / 2}ms ease-in-out 2` : "none",
258
259
  "@keyframes wheelShake": {
259
260
  "0%, 100%": { transform: "translateX(0)" },
260
261
  "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
@@ -285,7 +286,7 @@ const ke = ({
285
286
  isStandard: y,
286
287
  rotation: N,
287
288
  isSpinning: T,
288
- spinDuration: P
289
+ spinDuration: U
289
290
  }
290
291
  ),
291
292
  !y && !h && n && /* @__PURE__ */ t(
@@ -698,7 +699,7 @@ const ke = ({
698
699
  compactCards: g = !1
699
700
  }) => {
700
701
  var Fe, We, _e, Oe;
701
- const i = K(), u = ie(), _ = ve(), y = we(), h = fe(), C = Se(), E = n || c, M = l || r, f = S === "standard", L = S === "overlay", H = f ? Ce(c) : "", W = H ? H.replace(/[^\d,]/g, "") : "", B = g ? i ? 80 : 110 : i ? 100 : 140, T = g ? i ? 104 : 143 : i ? 130 : 180, N = g ? i ? 90 : 130 : i ? 120 : 180, b = g ? i ? "16px" : "32px" : i ? "24px" : "48px", X = g ? i ? "12px" : "32px" : i ? "16px" : "48px", R = He(r, O), k = JSON.parse(e.body), $ = k.segments || [], z = e.labels || {}, P = k.mode || ((Fe = k.config) == null ? void 0 : Fe.mode) || "fair", U = ((We = k.config) == null ? void 0 : We.pace) || "normal", j = ((_e = k.config) == null ? void 0 : _e.revealAll) ?? !1, A = ((Oe = k.config) == null ? void 0 : Oe.decorations) ?? !1, I = $.some((ae) => {
702
+ const i = K(), u = ie(), _ = ve(), y = we(), h = fe(), C = Se(), E = n || c, M = l || r, f = S === "standard", L = S === "overlay", H = f ? Ce(c) : "", W = H ? H.replace(/[^\d,]/g, "") : "", B = g ? i ? 80 : 110 : i ? 100 : 140, T = g ? i ? 104 : 143 : i ? 130 : 180, N = g ? i ? 90 : 130 : i ? 120 : 180, b = g ? i ? "16px" : "32px" : i ? "24px" : "48px", X = g ? i ? "12px" : "32px" : i ? "16px" : "48px", R = He(r, O), k = JSON.parse(e.body), $ = k.segments || [], z = e.labels || {}, U = k.mode || ((Fe = k.config) == null ? void 0 : Fe.mode) || "fair", j = ((We = k.config) == null ? void 0 : We.pace) || "normal", P = ((_e = k.config) == null ? void 0 : _e.revealAll) ?? !1, A = ((Oe = k.config) == null ? void 0 : Oe.decorations) ?? !1, I = $.some((ae) => {
702
703
  var J;
703
704
  return (J = ae.images) == null ? void 0 : J.idle;
704
705
  }), {
@@ -713,11 +714,11 @@ const ke = ({
713
714
  crossfadedCards: oe,
714
715
  revealedOtherCards: ce,
715
716
  flipDuration: Xe,
716
- crossfadeDuration: Pe,
717
- loseAnimationDuration: Ue,
717
+ crossfadeDuration: Ue,
718
+ loseAnimationDuration: je,
718
719
  handlePick: Re,
719
720
  handleReset: ge
720
- } = pt({ segments: $, mode: P, pace: U, revealAll: j }), ze = () => /* @__PURE__ */ w(re, { children: [
721
+ } = pt({ segments: $, mode: U, pace: j, revealAll: P }), ze = () => /* @__PURE__ */ w(re, { children: [
721
722
  A && /* @__PURE__ */ t(
722
723
  Ne,
723
724
  {
@@ -926,7 +927,7 @@ const ke = ({
926
927
  perspective: "1200px"
927
928
  },
928
929
  children: (ee ?? $).map((ae, J) => {
929
- const be = `card-${J}`, de = v !== null, Be = Q.has(be), me = ce.has(be), je = de && !Be && !me, De = oe.has(be), Ye = de && !De && !me;
930
+ const be = `card-${J}`, de = v !== null, Be = Q.has(be), me = ce.has(be), Pe = de && !Be && !me, De = oe.has(be), Ye = de && !De && !me;
930
931
  return /* @__PURE__ */ t(
931
932
  m,
932
933
  {
@@ -952,7 +953,7 @@ const ke = ({
952
953
  isRevealed: de,
953
954
  hasEntered: V,
954
955
  objectSize: N,
955
- crossfadeDuration: Pe,
956
+ crossfadeDuration: Ue,
956
957
  isStandard: f,
957
958
  primaryColor: r,
958
959
  dangerColor: d,
@@ -966,14 +967,14 @@ const ke = ({
966
967
  selectedSegment: v,
967
968
  isFlipped: Be,
968
969
  isOtherRevealed: me,
969
- shouldDim: je,
970
+ shouldDim: Pe,
970
971
  isRevealed: de,
971
972
  showLoseAnimation: q,
972
973
  hasEntered: V,
973
974
  cardWidth: B,
974
975
  cardHeight: T,
975
976
  flipDuration: Xe,
976
- loseAnimationDuration: Ue,
977
+ loseAnimationDuration: je,
977
978
  cardBaseColor: E,
978
979
  shimmerColor: M,
979
980
  primaryColor: r,
@@ -1303,14 +1304,14 @@ const ke = ({
1303
1304
  enableReset: s = !1,
1304
1305
  defaultImagePlaceholderUrl: a
1305
1306
  }) => {
1306
- var f, L, H, W, B, T, N, b, X, R, k, $, z, P, U, j, A, I, v;
1307
+ var f, L, H, W, B, T, N, b, X, R, k, $, z, U, j, P, A, I, v;
1307
1308
  const { t: r } = se(), x = K(), o = Ie(), c = fe(), d = ((f = e.branding) == null ? void 0 : f.colors) || null, n = (L = e.branding) == null ? void 0 : L.images, l = x ? (n == null ? void 0 : n.mobile_background_image) || (n == null ? void 0 : n.background_image) || "" : (n == null ? void 0 : n.background_image) || "", F = x ? (n == null ? void 0 : n.mobile_logo) || (n == null ? void 0 : n.main_logo) || "" : (n == null ? void 0 : n.main_logo) || "", O = a || (x ? Te : $e), p = l || xe(
1308
1309
  {
1309
1310
  images: e.images,
1310
1311
  imagePlaceholder: O
1311
1312
  },
1312
1313
  pe.OVERLAY
1313
- ), S = o.colorSchemes.dark.textColor, g = (d == null ? void 0 : d.content_color) || S, i = (d == null ? void 0 : d.primary_color) || ((T = (B = (W = (H = o.colorSchemes) == null ? void 0 : H.light) == null ? void 0 : W.palette) == null ? void 0 : B.primary) == null ? void 0 : T.plainColor), u = (R = (X = (b = (N = o.colorSchemes) == null ? void 0 : N.light) == null ? void 0 : b.palette) == null ? void 0 : X.primary) == null ? void 0 : R.onPrimary, _ = (d == null ? void 0 : d.background_color) || (($ = (k = o.colorSchemes) == null ? void 0 : k.dark) == null ? void 0 : $.surfaceVariant), y = (j = (U = (P = (z = o.colorSchemes) == null ? void 0 : z.light) == null ? void 0 : P.palette) == null ? void 0 : U.danger) == null ? void 0 : j.plainColor, h = o.customFontFamily.dark.primary, C = o.customRadius.dark.md, E = (I = (A = o.customRadius) == null ? void 0 : A.light) == null ? void 0 : I.xl, M = Le({
1314
+ ), S = o.colorSchemes.dark.textColor, g = (d == null ? void 0 : d.content_color) || S, i = (d == null ? void 0 : d.primary_color) || ((T = (B = (W = (H = o.colorSchemes) == null ? void 0 : H.light) == null ? void 0 : W.palette) == null ? void 0 : B.primary) == null ? void 0 : T.plainColor), u = (R = (X = (b = (N = o.colorSchemes) == null ? void 0 : N.light) == null ? void 0 : b.palette) == null ? void 0 : X.primary) == null ? void 0 : R.onPrimary, _ = (d == null ? void 0 : d.background_color) || (($ = (k = o.colorSchemes) == null ? void 0 : k.dark) == null ? void 0 : $.surfaceVariant), y = (P = (j = (U = (z = o.colorSchemes) == null ? void 0 : z.light) == null ? void 0 : U.palette) == null ? void 0 : j.danger) == null ? void 0 : P.plainColor, h = o.customFontFamily.dark.primary, C = o.customRadius.dark.md, E = (I = (A = o.customRadius) == null ? void 0 : A.light) == null ? void 0 : I.xl, M = Le({
1314
1315
  spacingScale: c,
1315
1316
  mdBorderRadius: C,
1316
1317
  contentBgColor: _,
@@ -1466,14 +1467,14 @@ const ke = ({
1466
1467
  enableReset: s = !1,
1467
1468
  defaultImagePlaceholderUrl: a
1468
1469
  }) => {
1469
- var L, H, W, B, T, N, b, X, R, k, $, z, P, U, j, A, I, v, ee, te, Y, G, q, V, Q, oe, ce;
1470
+ var L, H, W, B, T, N, b, X, R, k, $, z, U, j, P, A, I, v, ee, te, Y, G, q, V, Q, oe, ce;
1470
1471
  const { t: r } = se(), x = K(), o = Ie(), c = fe(), d = ((L = e.branding) == null ? void 0 : L.colors) || null, n = (H = e.branding) == null ? void 0 : H.images, l = x ? (n == null ? void 0 : n.mobile_background_image) || (n == null ? void 0 : n.background_image) || "" : (n == null ? void 0 : n.background_image) || "", F = x ? (n == null ? void 0 : n.mobile_logo) || (n == null ? void 0 : n.main_logo) || "" : (n == null ? void 0 : n.main_logo) || "", O = a || (x ? Te : $e), p = l || xe(
1471
1472
  {
1472
1473
  images: e.images,
1473
1474
  imagePlaceholder: O
1474
1475
  },
1475
1476
  pe.OVERLAY
1476
- ), S = o.colorSchemes.dark.textColor, g = (d == null ? void 0 : d.content_color) || S, i = (d == null ? void 0 : d.primary_color) || ((N = (T = (B = (W = o.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : B.palette) == null ? void 0 : T.primary) == null ? void 0 : N.plainColor), u = (d == null ? void 0 : d.secondary_color) || ((k = (R = (X = (b = o.colorSchemes) == null ? void 0 : b.light) == null ? void 0 : X.palette) == null ? void 0 : R.danger) == null ? void 0 : k.plainColor), _ = (U = (P = (z = ($ = o.colorSchemes) == null ? void 0 : $.light) == null ? void 0 : z.palette) == null ? void 0 : P.primary) == null ? void 0 : U.onPrimary, y = (d == null ? void 0 : d.background_color) || ((A = (j = o.colorSchemes) == null ? void 0 : j.dark) == null ? void 0 : A.surfaceVariant), h = (te = (ee = (v = (I = o.colorSchemes) == null ? void 0 : I.light) == null ? void 0 : v.palette) == null ? void 0 : ee.danger) == null ? void 0 : te.plainColor, C = o.customFontFamily.dark.primary, E = o.customRadius.dark.md, M = (G = (Y = o.customRadius) == null ? void 0 : Y.light) == null ? void 0 : G.xl, f = Le({
1477
+ ), S = o.colorSchemes.dark.textColor, g = (d == null ? void 0 : d.content_color) || S, i = (d == null ? void 0 : d.primary_color) || ((N = (T = (B = (W = o.colorSchemes) == null ? void 0 : W.light) == null ? void 0 : B.palette) == null ? void 0 : T.primary) == null ? void 0 : N.plainColor), u = (d == null ? void 0 : d.secondary_color) || ((k = (R = (X = (b = o.colorSchemes) == null ? void 0 : b.light) == null ? void 0 : X.palette) == null ? void 0 : R.danger) == null ? void 0 : k.plainColor), _ = (j = (U = (z = ($ = o.colorSchemes) == null ? void 0 : $.light) == null ? void 0 : z.palette) == null ? void 0 : U.primary) == null ? void 0 : j.onPrimary, y = (d == null ? void 0 : d.background_color) || ((A = (P = o.colorSchemes) == null ? void 0 : P.dark) == null ? void 0 : A.surfaceVariant), h = (te = (ee = (v = (I = o.colorSchemes) == null ? void 0 : I.light) == null ? void 0 : v.palette) == null ? void 0 : ee.danger) == null ? void 0 : te.plainColor, C = o.customFontFamily.dark.primary, E = o.customRadius.dark.md, M = (G = (Y = o.customRadius) == null ? void 0 : Y.light) == null ? void 0 : G.xl, f = Le({
1477
1478
  spacingScale: c,
1478
1479
  mdBorderRadius: E,
1479
1480
  contentBgColor: y,
@@ -1529,7 +1530,7 @@ const ke = ({
1529
1530
  }
1530
1531
  );
1531
1532
  }, Wt = (e) => {
1532
- const { infoPage: s } = dt(e.entityId, "chance-game", e.sdk), a = () => {
1533
+ const { infoPage: s } = ct(e.entityId, "chance-game", e.sdk), a = () => {
1533
1534
  if (s && s.id !== "not-found") {
1534
1535
  const o = Object.keys(Ke);
1535
1536
  if (s.language && o.includes(s.language))
@@ -1625,7 +1626,7 @@ const ke = ({
1625
1626
  F,
1626
1627
  O
1627
1628
  ] });
1628
- }, Ot = (e) => /* @__PURE__ */ t(_t, { ...e, children: /* @__PURE__ */ t(Wt, { ...e }) }), Gt = Ot;
1629
+ }, Ot = (e) => /* @__PURE__ */ t(_t, { ...e, children: /* @__PURE__ */ t(Wt, { ...e }) }), Ht = Ot;
1629
1630
  export {
1630
- Gt as ChanceGame
1631
+ Ht as ChanceGame
1631
1632
  };