@streamlayer/react-ui 0.42.1 → 0.44.0
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/lib/{icon-exit-6a55bb8f.js → icon-exit-d3f9fc80.js} +1 -1
- package/lib/{index-7045fbb2.js → index-7f3361f2.js} +1 -1
- package/lib/index.js +36 -41
- package/lib/ui/app/Features/Gamification/Leaderboard.js +11 -19
- package/lib/ui/app/Features/Gamification/Question.js +32 -27
- package/lib/ui/app/Features/Gamification/Tabs.js +15 -17
- package/lib/ui/app/Features/Gamification/index.js +20 -17
- package/lib/ui/app/Features/Highlights/Insight.js +1 -1
- package/lib/ui/app/Features/Highlights/index.js +1 -1
- package/lib/ui/app/Features/index.js +20 -17
- package/lib/ui/app/Notifications/index.js +1 -1
- package/lib/ui/app/masters.js +19 -17
- package/lib/ui/demo/Gamification.js +30 -35
- package/lib/ui/demo/Highlights.js +8 -12
- package/lib/ui/demo/Login.js +4 -5
- package/lib/ui/demo/components/Insight.js +1 -1
- package/lib/ui/demo/components/Leaderboard.js +11 -19
- package/lib/ui/demo/components/Question.js +49 -64
- package/lib/ui/demo/components/index.js +20 -25
- package/lib/ui/demo/index.js +8 -13
- package/lib/ui/gamification/common-header/index.js +8 -8
- package/lib/ui/gamification/detailed-insight/index.js +1 -1
- package/lib/ui/gamification/invite-link/index.d.ts +8 -0
- package/lib/ui/gamification/invite-link/index.js +14 -0
- package/lib/ui/gamification/{leaderboard-invite-link → invite-link}/styles.d.ts +0 -1
- package/lib/ui/gamification/invite-link/styles.js +48 -0
- package/lib/ui/gamification/leaderboard-item-detail/index.d.ts +1 -2
- package/lib/ui/gamification/leaderboard-item-detail/index.js +6 -16
- package/lib/ui/gamification/leaderboard-list/index.js +4 -10
- package/lib/ui/gamification/onboarding/index.js +19 -19
- package/lib/ui/gamification/user-statistics/index.js +31 -31
- package/lib/ui/gamification/vote/index.js +42 -35
- package/lib/ui/gamification/vote/styles.js +7 -7
- package/lib/ui/gamification/vote/{components/voting-option → vote-option}/index.js +1 -1
- package/lib/ui/gamification/vote/win-bar/index.d.ts +10 -0
- package/lib/ui/gamification/vote/win-bar/index.js +24 -0
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +8 -0
- package/lib/ui/gamification/vote/win-bar/styles.js +50 -0
- package/lib/ui/icons/index.d.ts +0 -1
- package/lib/ui/icons/index.js +22 -23
- package/lib/ui/login/index.js +15 -17
- package/lib/ui/notifications/decorator.js +1 -1
- package/lib/ui/notifications/index.js +1 -1
- package/lib/ui/notifications/notification/index.js +1 -1
- package/lib/ui/notifications/notification/question-inapp/index.js +8 -8
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +2 -0
- package/lib/ui/timer/index.d.ts +9 -0
- package/lib/ui/timer/index.js +37 -0
- package/package.json +2 -2
- package/lib/ui/gamification/leaderboard-invite-link/index.d.ts +0 -8
- package/lib/ui/gamification/leaderboard-invite-link/index.js +0 -15
- package/lib/ui/gamification/leaderboard-invite-link/styles.js +0 -59
- package/lib/ui/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
- package/lib/ui/gamification/vote/components/voting-header/components/points/index.js +0 -13
- package/lib/ui/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -6
- package/lib/ui/gamification/vote/components/voting-header/components/points/styles.js +0 -32
- package/lib/ui/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
- package/lib/ui/gamification/vote/components/voting-header/components/timer/index.js +0 -28
- package/lib/ui/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -2
- package/lib/ui/gamification/vote/components/voting-header/components/timer/styles.js +0 -8
- package/lib/ui/gamification/vote/components/voting-header/index.d.ts +0 -12
- package/lib/ui/gamification/vote/components/voting-header/index.js +0 -44
- package/lib/ui/gamification/vote/components/voting-header/styles.d.ts +0 -11
- package/lib/ui/gamification/vote/components/voting-header/styles.js +0 -57
- /package/lib/ui/gamification/vote/{vote-header → header}/index.d.ts +0 -0
- /package/lib/ui/gamification/vote/{vote-header → header}/index.js +0 -0
- /package/lib/ui/gamification/vote/{vote-header → header}/styles.d.ts +0 -0
- /package/lib/ui/gamification/vote/{vote-header → header}/styles.js +0 -0
- /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/index.d.ts +0 -0
- /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/styles.d.ts +0 -0
- /package/lib/ui/gamification/vote/{components/voting-option → vote-option}/styles.js +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { styled as i } from "@linaria/react";
|
|
2
|
+
const t = i.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
column-gap: 4px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 58px;
|
|
8
|
+
min-height: 58px;
|
|
9
|
+
max-height: 58px;
|
|
10
|
+
padding: 4px 12px;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
background-color: var(--color-primary-green1);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
`, e = i.img`
|
|
17
|
+
width: 32px;
|
|
18
|
+
height: 32px;
|
|
19
|
+
`, r = i.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
flex: 1;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
row-gap: 6px;
|
|
24
|
+
padding: 0px 4px;
|
|
25
|
+
font-weight: var(--font-weight-default);
|
|
26
|
+
`, n = i.div`
|
|
27
|
+
color: var(--color-neutrals-white);
|
|
28
|
+
font-size: 11px;
|
|
29
|
+
line-height: 14px;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
opacity: 0.8;
|
|
32
|
+
`, p = i.div`
|
|
33
|
+
color: var(--color-white);
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
line-height: 13px;
|
|
36
|
+
`, x = i.img`
|
|
37
|
+
margin-right: 8px;
|
|
38
|
+
width: 18px;
|
|
39
|
+
height: 18px;
|
|
40
|
+
`;
|
|
41
|
+
export {
|
|
42
|
+
x as ArrowInviteIcon,
|
|
43
|
+
t as Container,
|
|
44
|
+
r as Content,
|
|
45
|
+
p as Description,
|
|
46
|
+
e as FriendsIcon,
|
|
47
|
+
n as Title
|
|
48
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
type LeaderboardItemDetailProps = UserStatisticsProps & {
|
|
2
|
+
type LeaderboardItemDetailProps = {
|
|
4
3
|
comeBack: () => void;
|
|
5
4
|
};
|
|
6
5
|
export declare const LeaderboardItemDetail: React.FC<LeaderboardItemDetailProps>;
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommonHeader as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import "../../../icon-exit-6a55bb8f.js";
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { CommonHeader as m } from "../common-header/index.js";
|
|
3
|
+
import { Container as t } from "./styles.js";
|
|
4
|
+
import "../../../icon-exit-d3f9fc80.js";
|
|
6
5
|
import "../common-header/styles.js";
|
|
7
6
|
import "@linaria/react";
|
|
8
|
-
|
|
9
|
-
import "../user-statistics/components/rank/index.js";
|
|
10
|
-
import "../user-statistics/components/rank/styles.js";
|
|
11
|
-
import "../user-statistics/components/statistic/index.js";
|
|
12
|
-
import "../user-statistics/components/statistic/styles.js";
|
|
13
|
-
import "../user-statistics/styles.js";
|
|
14
|
-
const D = ({ comeBack: o, ...t }) => /* @__PURE__ */ m(e, { children: [
|
|
15
|
-
/* @__PURE__ */ r(i, { comeBack: o }),
|
|
16
|
-
/* @__PURE__ */ r(p, { ...t })
|
|
17
|
-
] });
|
|
7
|
+
const f = ({ comeBack: o }) => /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(m, { comeBack: o }) });
|
|
18
8
|
export {
|
|
19
|
-
|
|
9
|
+
f as LeaderboardItemDetail
|
|
20
10
|
};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LeaderboardInviteLink as n } from "../leaderboard-invite-link/index.js";
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
2
|
import { LeaderboardItem as m } from "../leaderboard-item/index.js";
|
|
4
3
|
import { Container as p } from "./styles.js";
|
|
5
|
-
import "../leaderboard-invite-link/styles.js";
|
|
6
|
-
import "@linaria/react";
|
|
7
4
|
import "../../../utils/common.js";
|
|
8
5
|
import "../leaderboard-item/styles.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */ e(n, { title: "Invite Link", description: "Challenge friends!", onClick: () => {
|
|
12
|
-
} })
|
|
13
|
-
] });
|
|
6
|
+
import "@linaria/react";
|
|
7
|
+
const f = ({ items: e, openItemDetail: t }) => /* @__PURE__ */ o(p, { children: e.map((r) => /* @__PURE__ */ o(m, { ...r, openItemDetail: () => t(r.userId) }, r.userId)) });
|
|
14
8
|
export {
|
|
15
|
-
|
|
9
|
+
f as LeaderboardList
|
|
16
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useEffect as B, useCallback as w } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { c as D } from "../../../icon-exit-d3f9fc80.js";
|
|
4
4
|
import { OnboardingInstructions as N } from "./components/onboarding-slides/onboarding-instructions/index.js";
|
|
5
5
|
import { OnboardingInviteCard as T } from "./components/onboarding-slides/onboarding-invite-card/index.js";
|
|
6
6
|
import { OnboardingRules as j } from "./components/onboarding-slides/onboarding-rules/index.js";
|
|
7
|
-
import { Container as p, OnboardingHeader as
|
|
7
|
+
import { Container as p, OnboardingHeader as G, LeftBlock as R, GameIcon as A, RightBlock as E, SponsorLogo as H, CloseBtn as L, IconClose as P, Content as q, OnboardingActionBtn as z } from "./styles.js";
|
|
8
8
|
import "./components/onboarding-slides/onboarding-instructions/styles.js";
|
|
9
9
|
import "@linaria/react";
|
|
10
10
|
import "./components/onboarding-slides/onboarding-invite-card/styles.js";
|
|
@@ -27,29 +27,29 @@ const e = {
|
|
|
27
27
|
inviteCardSubtext: S,
|
|
28
28
|
inviteCardBtnLabel: y
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
30
|
+
const I = async () => {
|
|
31
31
|
await f.submitInplay();
|
|
32
|
-
},
|
|
32
|
+
}, O = () => {
|
|
33
33
|
b();
|
|
34
|
-
}, [a, h] = g(0), [o,
|
|
34
|
+
}, [a, h] = g(0), [o, t] = g(e);
|
|
35
35
|
B(() => {
|
|
36
|
-
n != null && n.length ?
|
|
36
|
+
n != null && n.length ? t({ ...e, steps: !0 }) : i != null && i.length ? t({ ...e, rules: !0 }) : t({ ...e, inviteCard: !0 });
|
|
37
37
|
}, []);
|
|
38
|
-
const
|
|
39
|
-
n != null && n.length && a < n.length - 1 ? h((
|
|
40
|
-
}, [a, n == null ? void 0 : n.length, i == null ? void 0 : i.length, o, h,
|
|
38
|
+
const k = w(() => {
|
|
39
|
+
n != null && n.length && a < n.length - 1 ? h((x) => ++x) : i != null && i.length && o.steps ? t({ ...e, rules: !0 }) : o.rules && t({ ...e, inviteCard: !0 });
|
|
40
|
+
}, [a, n == null ? void 0 : n.length, i == null ? void 0 : i.length, o, h, t]);
|
|
41
41
|
return /* @__PURE__ */ l(p, { children: [
|
|
42
|
-
/* @__PURE__ */ l(
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ l(
|
|
45
|
-
d && /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ l(G, { children: [
|
|
43
|
+
/* @__PURE__ */ r(R, { children: c && /* @__PURE__ */ r(A, { alt: "sponsor-one-onboarding-icon", src: c }) }),
|
|
44
|
+
/* @__PURE__ */ l(E, { children: [
|
|
45
|
+
d && /* @__PURE__ */ r(H, { alt: "sponsor-two-onboarding-icon", src: d }),
|
|
46
|
+
/* @__PURE__ */ r(L, { onClick: O, children: /* @__PURE__ */ r(P, { alt: "icon-close-onboarding", src: D }) })
|
|
47
47
|
] })
|
|
48
48
|
] }),
|
|
49
49
|
/* @__PURE__ */ l(q, { children: [
|
|
50
|
-
o.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */
|
|
51
|
-
o.rules && /* @__PURE__ */
|
|
52
|
-
o.inviteCard && /* @__PURE__ */
|
|
50
|
+
o.steps && (n == null ? void 0 : n.length) && /* @__PURE__ */ r(N, { graphic: n[a].graphic, headline: n[a].headline }),
|
|
51
|
+
o.rules && /* @__PURE__ */ r(j, { rules: i, rulesTitle: u, primaryColor: m }),
|
|
52
|
+
o.inviteCard && /* @__PURE__ */ r(
|
|
53
53
|
T,
|
|
54
54
|
{
|
|
55
55
|
inviteCardTitle: v,
|
|
@@ -58,7 +58,7 @@ const e = {
|
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ r(z, { onClick: o.inviteCard ? I : k, children: o.rules ? C || "Got it!" : o.inviteCard ? y || "Play now!" : "Next" })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsxs as N, jsx as M } from "react/jsx-runtime";
|
|
2
|
-
import { abbreviate as
|
|
3
|
-
import { Rank as
|
|
2
|
+
import { abbreviate as c, formatDecimals as L } from "../../../utils/common.js";
|
|
3
|
+
import { Rank as j } from "./components/rank/index.js";
|
|
4
4
|
import { Statistic as D } from "./components/statistic/index.js";
|
|
5
|
-
import { Container as
|
|
5
|
+
import { Container as k, TopInfo as E, User as Q, UserAccountBtn as Y, Avatar as S, AvatarPlaceholder as r, UserInfo as U, UserName as t, UserRating as w, Rts as C, TrophyIcon as n, RtsIndicator as e, RtsLabel as o, Divider as l, BottomInfo as a, Ranks as d, Statistics as s } from "./styles.js";
|
|
6
6
|
import "./components/rank/styles.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "./components/statistic/styles.js";
|
|
9
|
-
const m = "data:image/svg+xml;base64,
|
|
10
|
-
avatar:
|
|
9
|
+
const m = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLj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DkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", v = ({
|
|
10
|
+
avatar: z,
|
|
11
11
|
name: I,
|
|
12
|
-
points:
|
|
13
|
-
friendsRank:
|
|
14
|
-
rank:
|
|
15
|
-
streak:
|
|
16
|
-
correct:
|
|
17
|
-
incorrect:
|
|
18
|
-
inTop:
|
|
19
|
-
average:
|
|
20
|
-
}) => /* @__PURE__ */ N(
|
|
21
|
-
/* @__PURE__ */ M(
|
|
22
|
-
/* @__PURE__ */ N(
|
|
23
|
-
|
|
24
|
-
!
|
|
12
|
+
points: T,
|
|
13
|
+
friendsRank: g,
|
|
14
|
+
rank: A,
|
|
15
|
+
streak: y,
|
|
16
|
+
correct: u,
|
|
17
|
+
incorrect: x,
|
|
18
|
+
inTop: i,
|
|
19
|
+
average: O
|
|
20
|
+
}) => /* @__PURE__ */ N(k, { children: [
|
|
21
|
+
/* @__PURE__ */ M(E, { children: /* @__PURE__ */ N(Q, { children: [
|
|
22
|
+
/* @__PURE__ */ N(Y, { children: [
|
|
23
|
+
z && /* @__PURE__ */ M(S, { alt: "avatar", src: z }),
|
|
24
|
+
!z && /* @__PURE__ */ M(r, { children: c(I || "") })
|
|
25
25
|
] }),
|
|
26
|
-
/* @__PURE__ */ N(
|
|
27
|
-
/* @__PURE__ */ M(
|
|
28
|
-
/* @__PURE__ */ N(
|
|
29
|
-
/* @__PURE__ */ N(
|
|
26
|
+
/* @__PURE__ */ N(U, { children: [
|
|
27
|
+
/* @__PURE__ */ M(t, { children: I }),
|
|
28
|
+
/* @__PURE__ */ N(w, { children: [
|
|
29
|
+
/* @__PURE__ */ N(C, { children: [
|
|
30
30
|
/* @__PURE__ */ M(n, { alt: "rank-icon", src: m }),
|
|
31
31
|
/* @__PURE__ */ N(e, { children: [
|
|
32
|
-
|
|
32
|
+
L(T),
|
|
33
33
|
/* @__PURE__ */ M(o, { children: "PTS" })
|
|
34
34
|
] })
|
|
35
35
|
] }),
|
|
36
36
|
/* @__PURE__ */ M(l, {}),
|
|
37
37
|
/* @__PURE__ */ N("div", { children: [
|
|
38
38
|
"TOP ",
|
|
39
|
-
|
|
39
|
+
i || 0,
|
|
40
40
|
"%"
|
|
41
41
|
] })
|
|
42
42
|
] })
|
|
@@ -44,17 +44,17 @@ const m = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXd
|
|
|
44
44
|
] }) }),
|
|
45
45
|
/* @__PURE__ */ N(a, { children: [
|
|
46
46
|
/* @__PURE__ */ N(d, { children: [
|
|
47
|
-
/* @__PURE__ */ M(
|
|
48
|
-
/* @__PURE__ */ M(
|
|
47
|
+
/* @__PURE__ */ M(j, { indicator: g || 0, title: "Friends rank" }),
|
|
48
|
+
/* @__PURE__ */ M(j, { indicator: A || 0, title: "Global rank" })
|
|
49
49
|
] }),
|
|
50
50
|
/* @__PURE__ */ N(s, { children: [
|
|
51
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
52
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
53
|
-
/* @__PURE__ */ M(D, { indicator:
|
|
54
|
-
/* @__PURE__ */ M(D, { indicator: `${
|
|
51
|
+
/* @__PURE__ */ M(D, { indicator: y || 0, title: "Win streak" }),
|
|
52
|
+
/* @__PURE__ */ M(D, { indicator: u || 0, title: "Correct" }),
|
|
53
|
+
/* @__PURE__ */ M(D, { indicator: x || 0, title: "Incorrect" }),
|
|
54
|
+
/* @__PURE__ */ M(D, { indicator: `${O || 0}%`, title: "Succ. rate" })
|
|
55
55
|
] })
|
|
56
56
|
] })
|
|
57
57
|
] });
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
v as UserStatistics
|
|
60
60
|
};
|
|
@@ -1,51 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { QuestionType as
|
|
4
|
-
import { V as
|
|
5
|
-
import { Container as
|
|
6
|
-
import "./
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useCallback as s, useEffect as b } from "react";
|
|
3
|
+
import { QuestionType as N } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { V as S, c as D } from "../../../index-7f3361f2.js";
|
|
5
|
+
import { Container as j, Title as M, Options as h, Loader as u, Feedback as Z, FeedbackIcon as L, FeedbackTitle as T, FeedbackDescription as z } from "./styles.js";
|
|
6
|
+
import { WinBar as G } from "./win-bar/index.js";
|
|
7
|
+
import "./vote-option/styles.js";
|
|
7
8
|
import "@linaria/react";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import "../../timer/index.js";
|
|
10
|
+
import "react-countdown-circle-timer";
|
|
11
|
+
import "../../theme/constants.js";
|
|
12
|
+
import "./win-bar/styles.js";
|
|
13
|
+
import "../../icons/index.js";
|
|
14
|
+
const A = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==", W = ({
|
|
15
|
+
title: m,
|
|
16
|
+
questionId: a,
|
|
17
|
+
options: r,
|
|
12
18
|
questionAnswered: l,
|
|
13
19
|
feedbackMessages: I,
|
|
14
|
-
questionAnsweredCorrectly:
|
|
15
|
-
questionType:
|
|
20
|
+
questionAnsweredCorrectly: t,
|
|
21
|
+
questionType: d
|
|
16
22
|
}) => {
|
|
17
|
-
const [
|
|
18
|
-
(
|
|
19
|
-
|
|
23
|
+
const [g, n] = p(!1), e = s(
|
|
24
|
+
(o) => {
|
|
25
|
+
n(o);
|
|
20
26
|
},
|
|
21
|
-
[
|
|
27
|
+
[n]
|
|
22
28
|
);
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
/* @__PURE__ */ i(
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return b(() => {
|
|
30
|
+
e(!1);
|
|
31
|
+
}, [r, e]), /* @__PURE__ */ c(j, { children: [
|
|
32
|
+
/* @__PURE__ */ i(G, { title: "To win", points: 100, isTimer: !0 }),
|
|
33
|
+
/* @__PURE__ */ i(M, { children: m }),
|
|
34
|
+
/* @__PURE__ */ c(h, { children: [
|
|
35
|
+
g && /* @__PURE__ */ i(u, { children: "Loading..." }),
|
|
36
|
+
r.map((o) => /* @__PURE__ */ i(
|
|
37
|
+
S,
|
|
31
38
|
{
|
|
32
|
-
toggleIsLoadingSubmitAnswer:
|
|
33
|
-
questionId:
|
|
34
|
-
questionType:
|
|
35
|
-
...
|
|
39
|
+
toggleIsLoadingSubmitAnswer: e,
|
|
40
|
+
questionId: a,
|
|
41
|
+
questionType: d,
|
|
42
|
+
...o
|
|
36
43
|
},
|
|
37
|
-
|
|
44
|
+
o.id
|
|
38
45
|
))
|
|
39
46
|
] }),
|
|
40
|
-
l &&
|
|
41
|
-
/* @__PURE__ */ i(L, { alt: "reaction-to-answer", src:
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */ i(
|
|
44
|
-
/* @__PURE__ */ i(
|
|
47
|
+
l && d === N.TRIVIA && /* @__PURE__ */ c(Z, { children: [
|
|
48
|
+
/* @__PURE__ */ i(L, { alt: "reaction-to-answer", src: t ? D : A }),
|
|
49
|
+
/* @__PURE__ */ c("div", { children: [
|
|
50
|
+
/* @__PURE__ */ i(T, { children: t ? I.correctFeedback.title : I.incorrectFeedback.title }),
|
|
51
|
+
/* @__PURE__ */ i(z, { children: t ? I.correctFeedback.description : I.incorrectFeedback.description })
|
|
45
52
|
] })
|
|
46
53
|
] })
|
|
47
54
|
] });
|
|
48
55
|
};
|
|
49
56
|
export {
|
|
50
|
-
|
|
57
|
+
W as Vote
|
|
51
58
|
};
|
|
@@ -2,7 +2,7 @@ import { styled as t } from "@linaria/react";
|
|
|
2
2
|
const e = t.div`
|
|
3
3
|
padding: 16px;
|
|
4
4
|
color: #fff;
|
|
5
|
-
|
|
5
|
+
width: 100%;
|
|
6
6
|
font-weight: 700;
|
|
7
7
|
font-size: 14px;
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ const e = t.div`
|
|
|
19
19
|
& > div:not(:last-child) {
|
|
20
20
|
margin-bottom: 12px;
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`, d = t.div`
|
|
23
23
|
position: absolute;
|
|
24
24
|
left: 0px;
|
|
25
25
|
background-color: var(--color-transparent-vote-container);
|
|
@@ -29,7 +29,7 @@ const e = t.div`
|
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
32
|
-
`,
|
|
32
|
+
`, a = t.div`
|
|
33
33
|
padding: 14px 12px 14px 16px;
|
|
34
34
|
display: flex;
|
|
35
35
|
align-items: center;
|
|
@@ -44,7 +44,7 @@ const e = t.div`
|
|
|
44
44
|
font-size: 16;
|
|
45
45
|
font-weight: 700;
|
|
46
46
|
margin-bottom: 10px;
|
|
47
|
-
`,
|
|
47
|
+
`, s = t.div`
|
|
48
48
|
display: -webkit-box;
|
|
49
49
|
-webkit-box-orient: vertical;
|
|
50
50
|
-webkit-line-clamp: 4;
|
|
@@ -55,11 +55,11 @@ const e = t.div`
|
|
|
55
55
|
`;
|
|
56
56
|
export {
|
|
57
57
|
e as Container,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
a as Feedback,
|
|
59
|
+
s as FeedbackDescription,
|
|
60
60
|
l as FeedbackIcon,
|
|
61
61
|
p as FeedbackTitle,
|
|
62
|
-
|
|
62
|
+
d as Loader,
|
|
63
63
|
n as Options,
|
|
64
64
|
o as Title
|
|
65
65
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as r, jsx as i, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { Timer as p } from "../../../timer/index.js";
|
|
3
|
+
import { WinBarContainer as d, Content as h, Title as l, WinIcon as s, Points as a, PointsCount as P, PointsUnits as f } from "./styles.js";
|
|
4
|
+
import "@linaria/react";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-countdown-circle-timer";
|
|
7
|
+
import "../../../theme/constants.js";
|
|
8
|
+
import "../../../icons/index.js";
|
|
9
|
+
const B = ({ title: n, points: o, isPlayingTimer: t, isTimer: e, onTimerExpired: m }) => /* @__PURE__ */ r(d, { children: [
|
|
10
|
+
/* @__PURE__ */ r(h, { children: [
|
|
11
|
+
n && /* @__PURE__ */ i(l, { children: n }),
|
|
12
|
+
o !== void 0 && /* @__PURE__ */ r(c, { children: [
|
|
13
|
+
/* @__PURE__ */ i(s, { name: "icon-trophy" }),
|
|
14
|
+
/* @__PURE__ */ r(a, { children: [
|
|
15
|
+
/* @__PURE__ */ i(P, { children: o }),
|
|
16
|
+
/* @__PURE__ */ i(f, { children: "PTS" })
|
|
17
|
+
] })
|
|
18
|
+
] })
|
|
19
|
+
] }),
|
|
20
|
+
e && /* @__PURE__ */ i(p, { isPlaying: t, onTimerExpired: m })
|
|
21
|
+
] });
|
|
22
|
+
export {
|
|
23
|
+
B as WinBar
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WinBarContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const WinIcon: any;
|
|
6
|
+
export declare const Points: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const PointsCount: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const PointsUnits: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { styled as t } from "@linaria/react";
|
|
2
|
+
import { SvgIcon as i } from "../../../icons/index.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
const a = t.div`
|
|
6
|
+
border: 1px solid var(--color-neutrals-gray3);
|
|
7
|
+
font-family: var(--font-regular);
|
|
8
|
+
font-weight: var(--font-weight-default);
|
|
9
|
+
color: var(--color-neutrals-gray9);
|
|
10
|
+
width: 100%;
|
|
11
|
+
min-height: 40px;
|
|
12
|
+
border-radius: 100px;
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
padding: 3px 3px 3px 11px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
letter-spacing: -0.15px;
|
|
19
|
+
|
|
20
|
+
> div:first-child:last-child {
|
|
21
|
+
margin-left: auto;
|
|
22
|
+
margin-right: auto;
|
|
23
|
+
}
|
|
24
|
+
`, s = t.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
`, l = t.div`
|
|
28
|
+
color: var(--color-neutrals-gray7);
|
|
29
|
+
margin-right: 8px;
|
|
30
|
+
`, p = t(i)`
|
|
31
|
+
margin-right: 4px;
|
|
32
|
+
`, g = t.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: flex-end;
|
|
35
|
+
`, c = t.span`
|
|
36
|
+
margin-right: 6px;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 14px;
|
|
39
|
+
`, d = t.span`
|
|
40
|
+
font-size: 10px;
|
|
41
|
+
`;
|
|
42
|
+
export {
|
|
43
|
+
s as Content,
|
|
44
|
+
g as Points,
|
|
45
|
+
c as PointsCount,
|
|
46
|
+
d as PointsUnits,
|
|
47
|
+
l as Title,
|
|
48
|
+
a as WinBarContainer,
|
|
49
|
+
p as WinIcon
|
|
50
|
+
};
|