@streamlayer/react-ui 0.97.1 → 0.98.1

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.
@@ -1,11 +1,11 @@
1
- import { jsx as n, jsxs as B, Fragment as tt } from "react/jsx-runtime";
2
- import { useState as m, useEffect as g, useCallback as O, useRef as rt, useMemo as l } from "react";
3
- import { QuestionType as a, QuestionStatus as x } from "@streamlayer/sdk-web-types";
4
- import { ExpiredAlert as et } from "./expired-alert/index.js";
5
- import { Feedback as it } from "./feedback/index.js";
6
- import { QuestionScrollContainer as ot, Container as st, Content as at, Title as nt, Options as ct } from "./styles.js";
7
- import { VotingOption as mt } from "./vote-option/index.js";
8
- import { WinBar as lt } from "./win-bar/index.js";
1
+ import { jsx as a, jsxs as j, Fragment as st } from "react/jsx-runtime";
2
+ import { useRef as F, useState as c, useEffect as v, useCallback as q, useMemo as u } from "react";
3
+ import { QuestionType as o, QuestionStatus as x } from "@streamlayer/sdk-web-types";
4
+ import { ExpiredAlert as ot } from "./expired-alert/index.js";
5
+ import { Feedback as nt } from "./feedback/index.js";
6
+ import { QuestionScrollContainer as at, Container as ct, Content as mt, Title as lt, Options as ut } from "./styles.js";
7
+ import { VotingOption as ft } from "./vote-option/index.js";
8
+ import { WinBar as dt } from "./win-bar/index.js";
9
9
  import "../../icons/index.js";
10
10
  import "@linaria/react";
11
11
  import "./expired-alert/styles.js";
@@ -20,132 +20,142 @@ import "../../timer/index.js";
20
20
  import "react-countdown-circle-timer";
21
21
  import "../../theme/constants.js";
22
22
  import "./win-bar/styles.js";
23
- const Nt = ({ openedQuestion: t, isLoading: E, vote: P, close: p }) => {
24
- var M, b;
25
- const L = t.subject, o = t.type, u = t.status, I = (M = t.options) == null ? void 0 : M.options, h = t.marketClosed, y = t.id, [V, W] = m(!1), [C, Y] = m(!1), [T, q] = m(!0), [c, F] = m(!1), [A, v] = m(""), [w, H] = m(""), [_, D] = m(!1);
26
- g(() => {
27
- w && D(!0);
28
- }, [w]), g(() => {
29
- o === a.PREDICTION ? h && q(!1) : u === x.RESOLVED && q(!1);
23
+ const Tt = (t, d) => {
24
+ switch (t) {
25
+ case "already_voted":
26
+ return d === o.POLL ? "You’ve already answered this question on another device." : "You’ve already answered this question on another device. So the points for this answer won't tally.";
27
+ default:
28
+ return "Something went wrong, please try again";
29
+ }
30
+ }, Lt = ({ openedQuestion: t, isLoading: d, vote: N, close: y }) => {
31
+ var W, Y;
32
+ const H = t.subject, e = t.type, T = t.status, E = (W = t.options) == null ? void 0 : W.options, I = t.marketClosed, V = t.id, S = F(), [h, _] = c(!1), [w, z] = c(!1), [C, k] = c(!0), [m, G] = c(!1), [M, R] = c(""), [g, J] = c(""), [O, b] = c(!1), [K, U] = c(!1);
33
+ v(() => {
34
+ e === o.PREDICTION ? I && k(!1) : T === x.RESOLVED && k(!1);
30
35
  }, []);
31
- const z = O((i) => {
32
- Y(i), W(!0);
33
- }, []), R = rt(!1), S = O(
34
- async (i) => {
35
- if (!R.current && (R.current = !0, y)) {
36
- const d = i.currentTarget.value;
37
- v(d);
36
+ const X = q((s) => {
37
+ z(s), _(!0);
38
+ }, []), P = F(!1), L = q(
39
+ async (s) => {
40
+ if (!P.current && (P.current = !0, V)) {
41
+ const l = s.currentTarget.value;
42
+ R(l);
38
43
  try {
39
- await P(y, d);
40
- } catch (j) {
41
- const Q = j.message === "already_voted" ? "You’ve already answered this question on other device. So the points for this answer won't tally." : "Something went wrong, please try again";
42
- H(Q), v(""), console.error("Error while voting", j), R.current = !1;
44
+ await N(V, l);
45
+ } catch (p) {
46
+ J(Tt(p.message, e)), R(""), console.error("Error while voting", p), P.current = !1;
43
47
  }
44
48
  }
45
49
  },
46
- [y, v, P]
47
- ), G = O(() => {
48
- F(!0), setTimeout(p, 3e3);
49
- }, [p]), r = l(
50
- () => t == null ? void 0 : t.answers.find((i) => i.youVoted === !0),
50
+ [e, V, R, N]
51
+ ), Z = q(() => {
52
+ G(!0), setTimeout(y, 3e3);
53
+ }, [y]), r = u(
54
+ () => t == null ? void 0 : t.answers.find((s) => s.youVoted === !0),
51
55
  [t]
52
- ), s = l(
53
- () => !!(t != null && t.answers.find((i) => i.correct === !0)),
56
+ ), n = u(
57
+ () => !!(t != null && t.answers.find((s) => s.correct === !0)),
54
58
  [t]
55
- ), e = l(
56
- () => t == null ? void 0 : t.answers.find((i) => i.correct === !0),
59
+ ), i = u(
60
+ () => t == null ? void 0 : t.answers.find((s) => s.correct === !0),
57
61
  [t]
58
62
  );
59
- g(() => {
60
- let i;
61
- return o === a.PREDICTION && r && V && (i = setTimeout(p, 1e4)), () => {
62
- clearTimeout(i);
63
- };
64
- }, [r]);
65
- const J = l(() => t ? t.answers.map((i) => {
66
- var d;
63
+ v(() => {
64
+ e === o.PREDICTION && r && h && !K && (S.current = setTimeout(y, 1e4), U(!0));
65
+ }, [r]), v(() => () => {
66
+ clearTimeout(S.current);
67
+ }, []);
68
+ const A = u(() => t ? t.answers.map((s) => {
69
+ var l;
67
70
  return {
68
- ...i,
71
+ ...s,
69
72
  questionVoted: !!r,
70
- youSelected: A === i.id,
71
- isLoading: E,
72
- hasCorrectAnswer: s,
73
+ youSelected: M === s.id,
74
+ isLoading: d,
75
+ hasCorrectAnswer: n,
73
76
  questionType: t.type,
74
- answerTimeExpired: c,
75
- questionStatus: u,
76
- imageMode: (d = t.appearance) == null ? void 0 : d.images,
77
- onVote: S
77
+ answerTimeExpired: m,
78
+ questionStatus: T,
79
+ imageMode: (l = t.appearance) == null ? void 0 : l.images,
80
+ onVote: L
78
81
  };
79
82
  }) : [], [
80
- s,
81
- c,
82
- E,
83
+ n,
84
+ m,
85
+ d,
83
86
  t,
84
87
  r,
85
- u,
86
- S,
87
- A
88
- ]), K = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, f = u === x.RESOLVED && o === a.TRIVIA && !r && !T, N = o === a.TRIVIA && C && V && T, k = l(() => o === a.PREDICTION ? !!(r && !s || r && s && (e != null && e.youVoted)) : !0, [o, r, s, e]), U = l(() => {
89
- if (o === a.PREDICTION && r && (!s || s && (e != null && e.youVoted)))
88
+ T,
89
+ L,
90
+ M
91
+ ]);
92
+ v(() => {
93
+ const s = A.some(({ percentageDecimal: p }) => p !== 0), l = r && e === o.PREDICTION;
94
+ g && (!s || I && l) && b(!0);
95
+ }, [A, g, I, e, r]);
96
+ const $ = E && (E.case === "trivia" || E.case === "prediction") ? E.value : void 0, f = T === x.RESOLVED && e === o.TRIVIA && !r && !C, B = e === o.TRIVIA && w, D = u(() => e === o.PREDICTION ? !!(r && !n || r && n && (i != null && i.youVoted)) : !0, [e, r, n, i]), Q = u(() => {
97
+ if (e === o.PREDICTION && r && (!n || n && (i != null && i.youVoted)))
90
98
  return r.points;
91
- if (!(f || c))
92
- return r ? r.correct ? r.pointsEarned : 0 : e == null ? void 0 : e.points;
93
- }, [c, r, e, f, o, s]), X = l(() => o === a.PREDICTION && r ? s ? s && (e != null && e.youVoted) ? "You won" : "" : "To win" : f || c ? "Time expired" : o === a.POLL ? "Time remaining" : r ? "You won" : "To win", [c, o, r, f, s, e]), Z = (o === a.TRIVIA || o === a.PREDICTION) && r && s && (e == null ? void 0 : e.youVoted), $ = r || f || N || o === a.TRIVIA && u === x.RESOLVED && T;
94
- return /* @__PURE__ */ n(ot, { children: /* @__PURE__ */ n(st, { children: /* @__PURE__ */ B(at, { children: [
95
- /* @__PURE__ */ n(
96
- it,
99
+ if (!(f || m))
100
+ return r ? r.correct ? r.pointsEarned : 0 : i == null ? void 0 : i.points;
101
+ }, [m, r, i, f, e, n]), tt = u(() => e === o.PREDICTION && r ? n ? n && (i != null && i.youVoted) ? "You won" : "" : "To win" : f || m ? "Time expired" : e === o.POLL ? "Time remaining" : r ? "You won" : "To win", [m, e, r, f, n, i]), rt = !D || D && e === o.PREDICTION && h && !O, et = (e === o.TRIVIA || e === o.PREDICTION) && r && n && (i == null ? void 0 : i.youVoted), it = r || f || B || e === o.TRIVIA && T === x.RESOLVED && C;
102
+ return /* @__PURE__ */ a(at, { children: /* @__PURE__ */ a(ct, { children: /* @__PURE__ */ j(mt, { children: [
103
+ /* @__PURE__ */ a(
104
+ nt,
97
105
  {
98
- feedbackMessages: K,
106
+ feedbackMessages: $,
99
107
  questionVoted: !!r,
100
108
  questionVotedCorrectly: r == null ? void 0 : r.correct,
101
- questionType: o,
102
- hasCorrectAnswer: s,
109
+ questionType: e,
110
+ hasCorrectAnswer: n,
103
111
  showExpiredNotification: f,
104
- showClosedNotificationTrivia: N,
105
- votedInCurrentRender: V,
106
- votedAfterQuestionClosed: C,
107
- enteredAnActiveQuestion: T,
108
- marketClosed: h,
109
- percentsAnimated: _,
110
- voteErrorMessage: w
112
+ showClosedNotificationTrivia: B,
113
+ votedInCurrentRender: h,
114
+ votedAfterQuestionClosed: w,
115
+ enteredAnActiveQuestion: C,
116
+ marketClosed: I,
117
+ percentsAnimated: O,
118
+ voteErrorMessage: g
111
119
  }
112
120
  ),
113
- k && /* @__PURE__ */ n(
114
- lt,
121
+ D && /* @__PURE__ */ a(
122
+ dt,
115
123
  {
116
- title: X,
117
- points: U,
118
- onTimerExpired: G,
124
+ title: tt,
125
+ points: Q,
126
+ onTimerExpired: Z,
119
127
  questionType: t.type,
120
- isTimer: !E,
128
+ isTimer: !d,
121
129
  isPlayingTimer: !r,
122
- animatePoints: Z,
123
- timerDuration: $ ? 0 : Number(((b = t == null ? void 0 : t.appearance) == null ? void 0 : b.autoHideInterval) || "30")
130
+ animatePoints: et,
131
+ timerDuration: it ? 0 : Number(((Y = t == null ? void 0 : t.appearance) == null ? void 0 : Y.autoHideInterval) || "30"),
132
+ votedInCurrentRender: h,
133
+ percentsAnimated: O
124
134
  }
125
135
  ),
126
- c ? /* @__PURE__ */ n(
127
- et,
136
+ m ? /* @__PURE__ */ a(
137
+ ot,
128
138
  {
129
139
  title: "More to come...",
130
140
  description: "Watch for additional enhanced stream interactive experience."
131
141
  }
132
- ) : /* @__PURE__ */ B(tt, { children: [
133
- /* @__PURE__ */ n(nt, { style: k ? {} : { marginTop: 0 }, children: L }),
134
- /* @__PURE__ */ n(ct, { children: J.map((i) => /* @__PURE__ */ n(
135
- mt,
142
+ ) : /* @__PURE__ */ j(st, { children: [
143
+ /* @__PURE__ */ a(lt, { style: rt ? { marginTop: 0 } : {}, children: H }),
144
+ /* @__PURE__ */ a(ut, { children: A.map((s) => /* @__PURE__ */ a(
145
+ ft,
136
146
  {
137
- ...i,
138
- markThatVoted: z,
139
- onPercentsAnimated: () => D(!0),
140
- votedAfterQuestionClosed: C,
141
- enteredAnActiveQuestion: T,
142
- marketClosed: h
147
+ ...s,
148
+ markThatVoted: X,
149
+ onPercentsAnimated: () => b(!0),
150
+ votedAfterQuestionClosed: w,
151
+ enteredAnActiveQuestion: C,
152
+ marketClosed: I
143
153
  },
144
- i.id
154
+ s.id
145
155
  )) })
146
156
  ] })
147
157
  ] }) }) });
148
158
  };
149
159
  export {
150
- Nt as Vote
160
+ Lt as Vote
151
161
  };
@@ -1,95 +1,97 @@
1
- import { jsx as n, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { useState as j, useLayoutEffect as U } from "react";
3
- import { QuestionImages as a, QuestionType as o, QuestionStatus as A } from "@streamlayer/sdk-web-types";
3
+ import { QuestionImages as a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
4
4
  import { AnimatedCounter as $ } from "../../../animated-counter/index.js";
5
5
  import { IconDefault as y, IconContainer as F, IconWrap as M, IconCircle as W, ButtonContainer as z, ButtonPct as G, ButtonBody as H, Title as J, Pts as K, Indicators as X, CheckIcon as Y, Percentage as Z } from "./styles.js";
6
6
  import "react-countup";
7
7
  import "@linaria/react";
8
8
  import "../../../icons/index.js";
9
- const I = {
10
- [a.CENTERED]: (t) => /* @__PURE__ */ n(y, { alt: "option-icon", src: t }),
11
- [a.TRANSPARENT]: (t) => /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(M, { style: { backgroundImage: `url(${t})` } }) }),
12
- [a.ROUNDED]: (t) => /* @__PURE__ */ n(W, { alt: "option-icon", src: t }),
9
+ const E = {
10
+ [a.CENTERED]: (t) => /* @__PURE__ */ e(y, { alt: "option-icon", src: t }),
11
+ [a.TRANSPARENT]: (t) => /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(M, { style: { backgroundImage: `url(${t})` } }) }),
12
+ [a.ROUNDED]: (t) => /* @__PURE__ */ e(W, { alt: "option-icon", src: t }),
13
13
  [a.NONE]: () => null,
14
14
  [a.UNSET]: () => null
15
- }, _ = ({ questionType: t, hasCorrectAnswer: c, correct: r, youVoted: i, questionVoted: e }) => {
16
- if (t === o.POLL && i)
15
+ }, _ = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
16
+ if (t === o.POLL && r)
17
17
  return "correct";
18
18
  if (t === o.PREDICTION) {
19
- if (c && e)
20
- return i ? r ? "correct" : "incorrect" : "unset";
21
- if (i)
19
+ if (c && i)
20
+ return r ? n ? "correct" : "incorrect" : "unset";
21
+ if (r)
22
22
  return "correct";
23
23
  }
24
- return t === o.TRIVIA && e && i ? r ? "correct" : "incorrect" : "unset";
24
+ return t === o.TRIVIA && i && r ? n ? "correct" : "incorrect" : "unset";
25
25
  }, q = ({
26
26
  questionType: t,
27
27
  questionVoted: c,
28
- correct: r,
29
- hasCorrectAnswer: i,
30
- questionStatus: e
31
- }) => t === o.TRIVIA ? c && r : t === o.PREDICTION ? c && r && i || e === A.RESOLVED && r : !1, at = (t) => {
32
- var T;
28
+ correct: n,
29
+ hasCorrectAnswer: r,
30
+ questionStatus: i
31
+ }) => t === o.TRIVIA ? c && n : t === o.PREDICTION ? c && n && r || i === S.RESOLVED && n : !1, at = (t) => {
32
+ var N;
33
33
  const {
34
34
  // option props
35
35
  id: c,
36
- icon: r,
37
- text: i,
38
- percentageDecimal: e,
39
- points: N,
36
+ icon: n,
37
+ text: r,
38
+ percentageDecimal: i,
39
+ points: D,
40
40
  // extra props
41
- onVote: S,
42
- markThatVoted: D,
43
- onPercentsAnimated: w,
44
- youSelected: E,
41
+ onVote: w,
42
+ markThatVoted: A,
43
+ onPercentsAnimated: m,
44
+ youSelected: h,
45
45
  questionVoted: s,
46
- imageMode: h,
46
+ imageMode: C,
47
47
  answerTimeExpired: O,
48
- questionStatus: C,
48
+ questionStatus: p,
49
49
  isLoading: g,
50
50
  questionType: d,
51
51
  correct: k,
52
52
  hasCorrectAnswer: v,
53
53
  votedAfterQuestionClosed: x,
54
54
  enteredAnActiveQuestion: P,
55
- marketClosed: l
56
- } = t, [L, p] = j(e), m = _(t), Q = q({ questionType: d, questionVoted: s, correct: k, hasCorrectAnswer: v, questionStatus: C }), f = l && d === o.PREDICTION, R = s || f, B = d === o.PREDICTION && !s && !l, V = s && !E && m !== "incorrect";
55
+ marketClosed: f
56
+ } = t, [L, R] = j(0), I = _(t), Q = q({ questionType: d, questionVoted: s, correct: k, hasCorrectAnswer: v, questionStatus: p }), u = f && d === o.PREDICTION, T = s || u, B = d === o.PREDICTION && !s && !f, V = s && !h && I !== "incorrect";
57
57
  return U(() => {
58
- e > 0 && (p(0), requestAnimationFrame(() => {
59
- p(e);
60
- }));
61
- }, [e]), /* @__PURE__ */ u(
58
+ R(0), requestAnimationFrame(() => {
59
+ R(i);
60
+ });
61
+ }, [i]), /* @__PURE__ */ l(
62
62
  z,
63
63
  {
64
64
  value: c,
65
- "data-selected": E,
66
- "data-answer-state": m,
67
- disabled: s || g || O || f && !P || f && P && x,
65
+ "data-selected": h,
66
+ "data-answer-state": I,
67
+ disabled: s || g || O || u && !P || u && P && x,
68
68
  "data-is-not-checked": V,
69
69
  onClick: (b) => {
70
- D(
71
- d === o.PREDICTION ? l : C === A.RESOLVED
72
- ), S(b);
70
+ A(
71
+ d === o.PREDICTION ? f : p === S.RESOLVED
72
+ ), w(b);
73
73
  },
74
74
  children: [
75
- /* @__PURE__ */ n(
75
+ /* @__PURE__ */ e(
76
76
  G,
77
77
  {
78
- "data-answer-state": m,
79
- style: { width: `${R ? L : 0}%` },
80
- onTransitionEnd: w
78
+ "data-answer-state": I,
79
+ style: { width: `${T ? L : 0}%` },
80
+ onTransitionEnd: () => {
81
+ u || m == null || m();
82
+ }
81
83
  }
82
84
  ),
83
- /* @__PURE__ */ u(H, { children: [
84
- r && h && ((T = I[h]) == null ? void 0 : T.call(I, r)),
85
- /* @__PURE__ */ n(J, { children: i }),
86
- B && /* @__PURE__ */ u("div", { children: [
87
- N,
88
- /* @__PURE__ */ n(K, { children: "pts" })
85
+ /* @__PURE__ */ l(H, { children: [
86
+ n && C && ((N = E[C]) == null ? void 0 : N.call(E, n)),
87
+ /* @__PURE__ */ e(J, { children: r }),
88
+ B && /* @__PURE__ */ l("div", { children: [
89
+ D,
90
+ /* @__PURE__ */ e(K, { children: "pts" })
89
91
  ] }),
90
- R && /* @__PURE__ */ u(X, { children: [
91
- Q && /* @__PURE__ */ n(Y, { name: "selected" }),
92
- /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n($, { value: e, suffix: "%" }) })
92
+ T && /* @__PURE__ */ l(X, { children: [
93
+ Q && /* @__PURE__ */ e(Y, { name: "selected" }),
94
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e($, { value: i, suffix: "%" }) })
93
95
  ] })
94
96
  ] })
95
97
  ]
@@ -8,6 +8,8 @@ interface WinBarProps {
8
8
  animatePoints?: boolean;
9
9
  questionType?: QuestionType;
10
10
  timerDuration?: number;
11
+ votedInCurrentRender: boolean;
12
+ percentsAnimated: boolean;
11
13
  onTimerExpired?: () => void;
12
14
  }
13
15
  export declare const WinBar: React.FC<WinBarProps>;
@@ -1,36 +1,55 @@
1
- import { jsxs as i, jsx as r, Fragment as p } from "react/jsx-runtime";
2
- import { QuestionType as o } from "@streamlayer/sdk-web-types";
3
- import { AnimatedCounter as s } from "../../../animated-counter/index.js";
4
- import { Timer as h } from "../../../timer/index.js";
5
- import { WinBarContainer as P, Content as C, Title as f, WinIcon as u, Points as I, PointsCount as y, PointsUnits as T } from "./styles.js";
1
+ import { jsx as r, jsxs as n, Fragment as C } from "react/jsx-runtime";
2
+ import { QuestionType as t } from "@streamlayer/sdk-web-types";
3
+ import { AnimatedCounter as P } from "../../../animated-counter/index.js";
4
+ import { Timer as s } from "../../../timer/index.js";
5
+ import { ShowInContainer as I, WinBarContainer as f, Content as u, Title as O, WinIcon as T, Points as j, PointsCount as x, PointsUnits as y } from "./styles.js";
6
6
  import "react-countup";
7
7
  import "@linaria/react";
8
8
  import "react";
9
9
  import "react-countdown-circle-timer";
10
10
  import "../../../theme/constants.js";
11
11
  import "../../../icons/index.js";
12
- const R = ({
12
+ import "../../../show-in/index.js";
13
+ import "@linaria/core";
14
+ const F = ({
13
15
  title: e,
14
- points: n,
16
+ points: o,
15
17
  isPlayingTimer: m,
16
- isTimer: c,
17
- animatePoints: a,
18
- questionType: t,
18
+ isTimer: a,
19
+ animatePoints: c,
20
+ questionType: i,
19
21
  timerDuration: d,
20
- onTimerExpired: l
21
- }) => /* @__PURE__ */ i(P, { style: { justifyContent: t === o.PREDICTION ? "center" : "space-between" }, children: [
22
- /* @__PURE__ */ i(C, { children: [
23
- e && /* @__PURE__ */ r(f, { children: e }),
24
- n !== void 0 && t !== o.POLL && /* @__PURE__ */ i(p, { children: [
25
- /* @__PURE__ */ r(u, { name: "icon-trophy" }),
26
- /* @__PURE__ */ i(I, { children: [
27
- /* @__PURE__ */ r(y, { children: a ? /* @__PURE__ */ r(s, { value: n, delay: 0.3 }) : n }),
28
- /* @__PURE__ */ r(T, { children: "PTS" })
29
- ] })
30
- ] })
31
- ] }),
32
- c && t !== o.PREDICTION && /* @__PURE__ */ r(h, { isPlaying: m, onTimerExpired: l, duration: d })
33
- ] });
22
+ votedInCurrentRender: l,
23
+ percentsAnimated: p,
24
+ onTimerExpired: h
25
+ }) => /* @__PURE__ */ r(
26
+ I,
27
+ {
28
+ enabled: i === t.PREDICTION && l,
29
+ animate: p,
30
+ children: /* @__PURE__ */ n(
31
+ f,
32
+ {
33
+ style: {
34
+ justifyContent: i === t.PREDICTION ? "center" : "space-between"
35
+ },
36
+ children: [
37
+ /* @__PURE__ */ n(u, { children: [
38
+ e && /* @__PURE__ */ r(O, { children: e }),
39
+ o !== void 0 && i !== t.POLL && /* @__PURE__ */ n(C, { children: [
40
+ /* @__PURE__ */ r(T, { name: "icon-trophy" }),
41
+ /* @__PURE__ */ n(j, { children: [
42
+ /* @__PURE__ */ r(x, { children: c ? /* @__PURE__ */ r(P, { value: o, delay: 0.3 }) : o }),
43
+ /* @__PURE__ */ r(y, { children: "PTS" })
44
+ ] })
45
+ ] })
46
+ ] }),
47
+ a && i !== t.PREDICTION && /* @__PURE__ */ r(s, { isPlaying: m, onTimerExpired: h, duration: d })
48
+ ]
49
+ }
50
+ )
51
+ }
52
+ );
34
53
  export {
35
- R as WinBar
54
+ F as WinBar
36
55
  };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ export declare const ShowInContainer: any;
2
3
  export declare const WinBarContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
5
  export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,42 +1,49 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as n } from "../../../icons/index.js";
3
+ import { GrowingShowIn as o } from "../../../show-in/index.js";
3
4
  import "react/jsx-runtime";
4
5
  import "react";
5
- const e = /* @__PURE__ */ s("div")({
6
+ import "@linaria/core";
7
+ const t = () => o, m = /* @__PURE__ */ s(t())({
8
+ name: "ShowInContainer",
9
+ class: "sie6cqo",
10
+ propsAsIs: !0
11
+ }), I = /* @__PURE__ */ s("div")({
6
12
  name: "WinBarContainer",
7
- class: "wie6cqo",
13
+ class: "wgizw4u",
8
14
  propsAsIs: !1
9
- }), c = /* @__PURE__ */ s("div")({
15
+ }), f = /* @__PURE__ */ s("div")({
10
16
  name: "Content",
11
- class: "cgizw4u",
17
+ class: "c1l3ucjp",
12
18
  propsAsIs: !1
13
- }), r = /* @__PURE__ */ s("div")({
19
+ }), w = /* @__PURE__ */ s("div")({
14
20
  name: "Title",
15
- class: "t1l3ucjp",
21
+ class: "tx7j799",
16
22
  propsAsIs: !1
17
- }), o = () => n, l = /* @__PURE__ */ s(o())({
23
+ }), i = () => n, A = /* @__PURE__ */ s(i())({
18
24
  name: "WinIcon",
19
- class: "wx7j799",
25
+ class: "w4lwuj0",
20
26
  propsAsIs: !0
21
- }), m = /* @__PURE__ */ s("div")({
27
+ }), C = /* @__PURE__ */ s("div")({
22
28
  name: "Points",
23
- class: "p4lwuj0",
29
+ class: "po9i64o",
24
30
  propsAsIs: !1
25
- }), I = /* @__PURE__ */ s("span")({
31
+ }), u = /* @__PURE__ */ s("span")({
26
32
  name: "PointsCount",
27
- class: "po9i64o",
33
+ class: "pe5g05h",
28
34
  propsAsIs: !1
29
- }), f = /* @__PURE__ */ s("span")({
35
+ }), d = /* @__PURE__ */ s("span")({
30
36
  name: "PointsUnits",
31
- class: "pe5g05h",
37
+ class: "p1hdtpmb",
32
38
  propsAsIs: !1
33
39
  });
34
40
  export {
35
- c as Content,
36
- m as Points,
37
- I as PointsCount,
38
- f as PointsUnits,
39
- r as Title,
40
- e as WinBarContainer,
41
- l as WinIcon
41
+ f as Content,
42
+ C as Points,
43
+ u as PointsCount,
44
+ d as PointsUnits,
45
+ m as ShowInContainer,
46
+ w as Title,
47
+ I as WinBarContainer,
48
+ A as WinIcon
42
49
  };
@@ -2,7 +2,6 @@
2
2
  type ModalProps = {
3
3
  children: React.ReactNode;
4
4
  container: React.MutableRefObject<HTMLDivElement | null>;
5
- fixedView: boolean;
6
5
  useContainer: boolean;
7
6
  };
8
7
  /**