@streamlayer/react-ui 0.39.0 → 0.41.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.
Files changed (55) hide show
  1. package/lib/index.d.ts +1 -1
  2. package/lib/index.js +6 -6
  3. package/lib/ui/app/Features/Gamification/Leaderboard.js +2 -2
  4. package/lib/ui/app/Features/Gamification/Question.js +40 -55
  5. package/lib/ui/app/Features/Gamification/QuestionsList.js +5 -4
  6. package/lib/ui/app/Features/Gamification/Tabs.js +20 -19
  7. package/lib/ui/app/Features/Gamification/UserSummary.js +2 -2
  8. package/lib/ui/app/Features/Gamification/index.js +11 -17
  9. package/lib/ui/app/Features/index.js +11 -17
  10. package/lib/ui/app/masters.js +11 -16
  11. package/lib/ui/app/styles.d.ts +3 -0
  12. package/lib/ui/app/styles.js +13 -8
  13. package/lib/ui/demo/Gamification.js +5 -5
  14. package/lib/ui/demo/Highlights.js +3 -3
  15. package/lib/ui/demo/components/Leaderboard.js +2 -2
  16. package/lib/ui/demo/components/Question.js +13 -14
  17. package/lib/ui/demo/components/QuestionsList.js +5 -4
  18. package/lib/ui/demo/components/UserSummary.js +2 -2
  19. package/lib/ui/demo/components/index.js +5 -5
  20. package/lib/ui/demo/index.js +6 -6
  21. package/lib/ui/gamification/constants.d.ts +6 -0
  22. package/lib/ui/gamification/constants.js +13 -0
  23. package/lib/ui/gamification/leaderboard-item-detail/index.js +2 -2
  24. package/lib/ui/gamification/question/index.js +28 -35
  25. package/lib/ui/gamification/{question-list → question/list}/index.js +8 -7
  26. package/lib/ui/gamification/tabs/styles.js +6 -11
  27. package/lib/ui/gamification/user-statistics/components/rank/styles.js +14 -11
  28. package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +7 -0
  29. package/lib/ui/gamification/user-statistics/components/statistic/index.js +10 -0
  30. package/lib/ui/gamification/user-statistics/components/{statistics → statistic}/styles.d.ts +1 -0
  31. package/lib/ui/gamification/user-statistics/components/statistic/styles.js +23 -0
  32. package/lib/ui/gamification/user-statistics/index.js +38 -35
  33. package/lib/ui/gamification/user-statistics/styles.d.ts +3 -1
  34. package/lib/ui/gamification/user-statistics/styles.js +63 -52
  35. package/lib/ui/gamification/vote/vote-header/index.d.ts +8 -0
  36. package/lib/ui/gamification/vote/vote-header/index.js +20 -0
  37. package/lib/ui/gamification/vote/vote-header/styles.d.ts +7 -0
  38. package/lib/ui/gamification/vote/vote-header/styles.js +59 -0
  39. package/lib/ui/icons/index.d.ts +0 -1
  40. package/lib/ui/icons/index.js +32 -33
  41. package/lib/ui/navigation/masters.js +4 -3
  42. package/lib/ui/theme/constants.d.ts +0 -2
  43. package/lib/ui/theme/constants.js +7 -9
  44. package/lib/utils/common.js +3 -2
  45. package/lib/utils/decorators/container.js +5 -7
  46. package/package.json +7 -7
  47. package/lib/fedex-a8dcc7b2.js +0 -4
  48. package/lib/ui/gamification/user-statistics/components/statistics/index.d.ts +0 -7
  49. package/lib/ui/gamification/user-statistics/components/statistics/index.js +0 -10
  50. package/lib/ui/gamification/user-statistics/components/statistics/styles.js +0 -16
  51. package/lib/ui/theme/Typography.d.ts +0 -2
  52. package/lib/ui/theme/Typography.js +0 -53
  53. /package/lib/ui/gamification/{question-list → question/list}/index.d.ts +0 -0
  54. /package/lib/ui/gamification/{question-list → question/list}/styles.d.ts +0 -0
  55. /package/lib/ui/gamification/{question-list → question/list}/styles.js +0 -0
@@ -1,9 +1,8 @@
1
1
  import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
2
  import { styled as y } from "@linaria/react";
3
- import { useState as d, useCallback as x, useMemo as c } from "react";
3
+ import { useState as d, useCallback as x, useMemo as s } from "react";
4
4
  import { Vote as g } from "../../gamification/vote/index.js";
5
5
  import { VotingHeader as h } from "../../gamification/vote/components/voting-header/index.js";
6
- import { i as b } from "../../../fedex-a8dcc7b2.js";
7
6
  import "@streamlayer/sdk-web-types";
8
7
  import "../../../index-7045fbb2.js";
9
8
  import "../../gamification/vote/components/voting-option/styles.js";
@@ -16,7 +15,7 @@ import "react-countdown-circle-timer";
16
15
  import "../../theme/constants.js";
17
16
  import "../../gamification/vote/components/voting-header/components/timer/styles.js";
18
17
  import "../../gamification/vote/components/voting-header/styles.js";
19
- const k = y.div`
18
+ const b = y.div`
20
19
  position: absolute;
21
20
  top: 0;
22
21
  background: var(--color-transparent-item);
@@ -43,28 +42,28 @@ const k = y.div`
43
42
  transform: translateX(0);
44
43
  }
45
44
  }
46
- `, F = ({ openedQuestion: t, closeQuestion: a, vote: e }) => {
47
- var s;
48
- const [l, m] = d(!1), p = x(
45
+ `, B = ({ openedQuestion: t, closeQuestion: a, vote: e }) => {
46
+ var m;
47
+ const [l, c] = d(!1), p = x(
49
48
  (i) => {
50
- m(i);
49
+ c(i);
51
50
  },
52
- [m]
53
- ), r = c(
51
+ [c]
52
+ ), r = s(
54
53
  () => t == null ? void 0 : t.answers.find((i) => i.youVoted === !0),
55
54
  [t]
56
- ), f = c(
55
+ ), f = s(
57
56
  () => !!(t != null && t.answers.find((i) => i.correct === !0)),
58
57
  [t]
59
58
  );
60
- return t ? /* @__PURE__ */ o(k, { children: /* @__PURE__ */ n("div", { children: [
59
+ return t ? /* @__PURE__ */ o(b, { children: /* @__PURE__ */ n("div", { children: [
61
60
  /* @__PURE__ */ o(
62
61
  h,
63
62
  {
64
63
  points: (r == null ? void 0 : r.points) || 0,
65
64
  questionAnswered: !!r,
66
65
  questionAnsweredCorrectly: r == null ? void 0 : r.correct,
67
- logo: b,
66
+ logo: "",
68
67
  closeQuestion: a,
69
68
  setTimeToExpire: p,
70
69
  questionType: t.type
@@ -74,7 +73,7 @@ const k = y.div`
74
73
  g,
75
74
  {
76
75
  title: t.subject,
77
- feedbackMessages: (s = t.options) == null ? void 0 : s.options.value,
76
+ feedbackMessages: (m = t.options) == null ? void 0 : m.options.value,
78
77
  questionType: t.type,
79
78
  questionId: t.id,
80
79
  questionAnswered: !!r,
@@ -98,5 +97,5 @@ const k = y.div`
98
97
  ] }) }) : null;
99
98
  };
100
99
  export {
101
- F as Question
100
+ B as Question
102
101
  };
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useStore as m } from "@nanostores/react";
3
- import { QuestionList as p } from "../../gamification/question-list/index.js";
3
+ import { QuestionList as p } from "../../gamification/question/list/index.js";
4
4
  import "../../gamification/question/index.js";
5
5
  import "@streamlayer/sdk-web-types";
6
6
  import "../../button/index.js";
7
7
  import "../../button/styles.js";
8
8
  import "@linaria/react";
9
+ import "../../gamification/constants.js";
9
10
  import "../../gamification/question/styles.js";
10
11
  import "../../icons/index.js";
11
12
  import "react";
12
- import "../../gamification/question-list/styles.js";
13
- const j = ({ store: r, openQuestion: i }) => {
13
+ import "../../gamification/question/list/styles.js";
14
+ const l = ({ store: r, openQuestion: i }) => {
14
15
  const t = m(r);
15
16
  return t != null && t.data ? /* @__PURE__ */ o(p, { openQuestion: i, questions: t.data }) : /* @__PURE__ */ o("div", { children: "wait questions..." });
16
17
  };
17
18
  export {
18
- j as QuestionsList
19
+ l as QuestionsList
19
20
  };
@@ -5,8 +5,8 @@ import "../../../utils/common.js";
5
5
  import "../../gamification/user-statistics/components/rank/index.js";
6
6
  import "../../gamification/user-statistics/components/rank/styles.js";
7
7
  import "@linaria/react";
8
- import "../../gamification/user-statistics/components/statistics/index.js";
9
- import "../../gamification/user-statistics/components/statistics/styles.js";
8
+ import "../../gamification/user-statistics/components/statistic/index.js";
9
+ import "../../gamification/user-statistics/components/statistic/styles.js";
10
10
  import "../../gamification/user-statistics/styles.js";
11
11
  const S = ({ store: m }) => {
12
12
  const { data: r } = o(m);
@@ -12,18 +12,19 @@ import "../../../utils/common.js";
12
12
  import "../../gamification/user-statistics/components/rank/index.js";
13
13
  import "../../gamification/user-statistics/components/rank/styles.js";
14
14
  import "@linaria/react";
15
- import "../../gamification/user-statistics/components/statistics/index.js";
16
- import "../../gamification/user-statistics/components/statistics/styles.js";
15
+ import "../../gamification/user-statistics/components/statistic/index.js";
16
+ import "../../gamification/user-statistics/components/statistic/styles.js";
17
17
  import "../../gamification/user-statistics/styles.js";
18
- import "../../gamification/question-list/index.js";
18
+ import "../../gamification/question/list/index.js";
19
19
  import "../../gamification/question/index.js";
20
20
  import "@streamlayer/sdk-web-types";
21
21
  import "../../button/index.js";
22
22
  import "../../button/styles.js";
23
+ import "../../gamification/constants.js";
23
24
  import "../../gamification/question/styles.js";
24
25
  import "../../icons/index.js";
25
26
  import "react";
26
- import "../../gamification/question-list/styles.js";
27
+ import "../../gamification/question/list/styles.js";
27
28
  import "../../gamification/vote/index.js";
28
29
  import "../../../index-7045fbb2.js";
29
30
  import "../../gamification/vote/components/voting-option/styles.js";
@@ -37,7 +38,6 @@ import "react-countdown-circle-timer";
37
38
  import "../../theme/constants.js";
38
39
  import "../../gamification/vote/components/voting-header/components/timer/styles.js";
39
40
  import "../../gamification/vote/components/voting-header/styles.js";
40
- import "../../../fedex-a8dcc7b2.js";
41
41
  import "../../gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js";
42
42
  import "../../gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js";
43
43
  import "../../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js";
@@ -3,8 +3,8 @@ import { FeatureStatus as l } from "@streamlayer/sdk-web-interfaces";
3
3
  import { FeatureType as g } from "@streamlayer/sdk-web-types";
4
4
  import { AvailableFeatures as S } from "@streamlayer/sdk-web-features";
5
5
  import { useState as b, useMemo as h, useEffect as C } from "react";
6
- import "@streamlayer/sdk-web-storage";
7
6
  import "@streamlayer/sdk-web-api";
7
+ import "@streamlayer/sdk-web-storage";
8
8
  import { useStore as c } from "@nanostores/react";
9
9
  import { Notifications as F } from "../notifications/index.js";
10
10
  import { GamificationComponent as w } from "./Gamification.js";
@@ -28,17 +28,18 @@ import "../gamification/user-statistics/index.js";
28
28
  import "../../utils/common.js";
29
29
  import "../gamification/user-statistics/components/rank/index.js";
30
30
  import "../gamification/user-statistics/components/rank/styles.js";
31
- import "../gamification/user-statistics/components/statistics/index.js";
32
- import "../gamification/user-statistics/components/statistics/styles.js";
31
+ import "../gamification/user-statistics/components/statistic/index.js";
32
+ import "../gamification/user-statistics/components/statistic/styles.js";
33
33
  import "../gamification/user-statistics/styles.js";
34
34
  import "./components/QuestionsList.js";
35
- import "../gamification/question-list/index.js";
35
+ import "../gamification/question/list/index.js";
36
36
  import "../gamification/question/index.js";
37
37
  import "../button/index.js";
38
38
  import "../button/styles.js";
39
+ import "../gamification/constants.js";
39
40
  import "../gamification/question/styles.js";
40
41
  import "../icons/index.js";
41
- import "../gamification/question-list/styles.js";
42
+ import "../gamification/question/list/styles.js";
42
43
  import "./components/Question.js";
43
44
  import "../gamification/vote/index.js";
44
45
  import "../../index-7045fbb2.js";
@@ -52,7 +53,6 @@ import "react-countdown-circle-timer";
52
53
  import "../theme/constants.js";
53
54
  import "../gamification/vote/components/voting-header/components/timer/styles.js";
54
55
  import "../gamification/vote/components/voting-header/styles.js";
55
- import "../../fedex-a8dcc7b2.js";
56
56
  import "../gamification/onboarding/index.js";
57
57
  import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js";
58
58
  import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js";
@@ -0,0 +1,6 @@
1
+ import { QuestionType } from '@streamlayer/sdk-web-types';
2
+ import { icons } from '../icons';
3
+ export declare const QuestionTypeData: Record<QuestionType, {
4
+ label: string;
5
+ iconName: keyof typeof icons;
6
+ } | undefined>;
@@ -0,0 +1,13 @@
1
+ import { QuestionType as i } from "@streamlayer/sdk-web-types";
2
+ const o = {
3
+ [i.TWEET]: { label: "Insight", iconName: "icon-insight" },
4
+ [i.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
5
+ [i.UNSET]: void 0,
6
+ [i.FACTOID]: { label: "Insight", iconName: "icon-insight" },
7
+ [i.POLL]: { label: "Poll", iconName: "icon-poll" },
8
+ [i.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
9
+ [i.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
10
+ };
11
+ export {
12
+ o as QuestionTypeData
13
+ };
@@ -8,8 +8,8 @@ import "@linaria/react";
8
8
  import "../../../utils/common.js";
9
9
  import "../user-statistics/components/rank/index.js";
10
10
  import "../user-statistics/components/rank/styles.js";
11
- import "../user-statistics/components/statistics/index.js";
12
- import "../user-statistics/components/statistics/styles.js";
11
+ import "../user-statistics/components/statistic/index.js";
12
+ import "../user-statistics/components/statistic/styles.js";
13
13
  import "../user-statistics/styles.js";
14
14
  const D = ({ comeBack: o, ...t }) => /* @__PURE__ */ m(e, { children: [
15
15
  /* @__PURE__ */ r(i, { comeBack: o }),
@@ -1,48 +1,41 @@
1
- import { jsx as n, jsxs as t } from "react/jsx-runtime";
2
- import { QuestionType as i, PickHistoryStatus as c, QuestionStatus as p } from "@streamlayer/sdk-web-types";
3
- import { Button as O } from "../../button/index.js";
4
- import { QuestionTypeIcon as o, QuestionActionIcon as r, QuestionItem as Q, QuestionContent as b, QuestionCaption as E, QuestionTypeLabel as P, QuestionBody as A, QuestionAction as g } from "./styles.js";
1
+ import { jsx as o, jsxs as t } from "react/jsx-runtime";
2
+ import { PickHistoryStatus as n, QuestionType as d, QuestionStatus as Q } from "@streamlayer/sdk-web-types";
3
+ import { Button as h } from "../../button/index.js";
4
+ import { QuestionTypeData as y } from "../constants.js";
5
+ import { QuestionActionIcon as r, QuestionItem as I, QuestionContent as T, QuestionCaption as f, QuestionTypeIcon as A, QuestionTypeLabel as S, QuestionBody as x, QuestionAction as D } from "./styles.js";
5
6
  import "../../button/styles.js";
6
7
  import "@linaria/react";
7
8
  import "../../icons/index.js";
8
9
  import "react";
9
- const y = {
10
- [i.TWEET]: { label: "Insight", Icon: () => /* @__PURE__ */ n(o, { name: "icon-insight" }) },
11
- [i.PROMOTION]: { label: "Insight", Icon: () => /* @__PURE__ */ n(o, { name: "icon-insight" }) },
12
- [i.UNSET]: void 0,
13
- [i.FACTOID]: { label: "Insight", Icon: () => /* @__PURE__ */ n(o, { name: "icon-insight" }) },
14
- [i.POLL]: { label: "Poll", Icon: () => /* @__PURE__ */ n(o, { name: "icon-poll" }) },
15
- [i.TRIVIA]: { label: "Trivia", Icon: () => /* @__PURE__ */ n(o, { name: "icon-trivia" }) },
16
- [i.PREDICTION]: { label: "Prediction", Icon: () => /* @__PURE__ */ n(o, { name: "icon-prediction" }) }
17
- }, N = {
18
- [c.LOST]: /* @__PURE__ */ n(r, { name: "icon-cross" }),
19
- [c.WON]: /* @__PURE__ */ n(r, { name: "icon-check" }),
20
- [c.UNSET]: void 0,
21
- [c.DNP]: /* @__PURE__ */ n(r, { name: "icon-arrow" })
22
- }, k = ({
23
- questionId: I,
24
- questionType: l,
10
+ const E = {
11
+ [n.LOST]: /* @__PURE__ */ o(r, { name: "icon-cross" }),
12
+ [n.WON]: /* @__PURE__ */ o(r, { name: "icon-check" }),
13
+ [n.UNSET]: void 0,
14
+ [n.DNP]: /* @__PURE__ */ o(r, { name: "icon-arrow" })
15
+ }, R = ({
16
+ questionId: s,
17
+ questionType: c,
25
18
  questionStatus: m,
26
19
  subject: u,
27
- openForVoting: h,
28
- openQuestion: e,
29
- status: T
20
+ openForVoting: a,
21
+ openQuestion: i,
22
+ status: l
30
23
  }) => {
31
- const { Icon: s, label: a } = y[l] || {}, d = N[T];
32
- return !a || !s ? null : /* @__PURE__ */ t(Q, { onClick: () => e == null ? void 0 : e(I), children: [
33
- /* @__PURE__ */ t(b, { children: [
34
- /* @__PURE__ */ t(E, { children: [
35
- /* @__PURE__ */ n(s, {}),
36
- /* @__PURE__ */ t(P, { children: [
37
- a,
38
- l === i.TRIVIA && m === p.RESOLVED && " • Expired"
24
+ const e = y[c], p = E[l];
25
+ return e ? /* @__PURE__ */ t(I, { onClick: () => i == null ? void 0 : i(s), children: [
26
+ /* @__PURE__ */ t(T, { children: [
27
+ /* @__PURE__ */ t(f, { children: [
28
+ /* @__PURE__ */ o(A, { name: e.iconName }),
29
+ /* @__PURE__ */ t(S, { children: [
30
+ e.label,
31
+ c === d.TRIVIA && m === Q.RESOLVED && " • Expired"
39
32
  ] })
40
33
  ] }),
41
- /* @__PURE__ */ n(A, { children: u || "" })
34
+ /* @__PURE__ */ o(x, { children: u || "" })
42
35
  ] }),
43
- /* @__PURE__ */ n(g, { children: d || (h ? /* @__PURE__ */ n(O, { children: "Play" }) : null) })
44
- ] });
36
+ /* @__PURE__ */ o(D, { children: p || (a ? /* @__PURE__ */ o(h, { children: "Play" }) : null) })
37
+ ] }) : null;
45
38
  };
46
39
  export {
47
- k as Question
40
+ R as Question
48
41
  };
@@ -1,14 +1,15 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Question as i } from "../question/index.js";
2
+ import { Question as i } from "../index.js";
3
3
  import { QuestionsContainer as p } from "./styles.js";
4
4
  import "@streamlayer/sdk-web-types";
5
- import "../../button/index.js";
6
- import "../../button/styles.js";
5
+ import "../../../button/index.js";
6
+ import "../../../button/styles.js";
7
7
  import "@linaria/react";
8
- import "../question/styles.js";
9
- import "../../icons/index.js";
8
+ import "../../constants.js";
9
+ import "../styles.js";
10
+ import "../../../icons/index.js";
10
11
  import "react";
11
- const l = ({ questions: r, openQuestion: m }) => /* @__PURE__ */ t(p, { children: r == null ? void 0 : r.map((o) => /* @__PURE__ */ t(i, { openQuestion: m, ...o }, o.questionId)) });
12
+ const u = ({ questions: r, openQuestion: m }) => /* @__PURE__ */ t(p, { children: r == null ? void 0 : r.map((o) => /* @__PURE__ */ t(i, { openQuestion: m, ...o }, o.questionId)) });
12
13
  export {
13
- l as QuestionList
14
+ u as QuestionList
14
15
  };
@@ -1,10 +1,5 @@
1
1
  import { styled as o } from "@linaria/react";
2
- const t = o.div`
3
- padding-left: var(--container-padding);
4
- padding-right: var(--container-padding);
5
- padding-bottom: var(--container-padding);
6
- background-color: var(--color-neutrals-white);
7
- `, n = o.div`
2
+ const t = o.div``, e = o.div`
8
3
  position: relative;
9
4
  box-sizing: border-box;
10
5
  width: 100%;
@@ -36,7 +31,7 @@ const t = o.div`
36
31
  transform: translateX(100%);
37
32
  }
38
33
  }
39
- `, a = o.button`
34
+ `, n = o.button`
40
35
  border: none;
41
36
  outline: none;
42
37
  background-color: transparent;
@@ -60,13 +55,13 @@ const t = o.div`
60
55
  color: var(--color-primary-green1);
61
56
  cursor: default;
62
57
  }
63
- `, e = o.span`
58
+ `, i = o.span`
64
59
  position: relative;
65
60
  z-index: 2;
66
61
  `;
67
62
  export {
68
- a as Button,
63
+ n as Button,
69
64
  t as Container,
70
- n as STabs,
71
- e as Title
65
+ e as STabs,
66
+ i as Title
72
67
  };
@@ -1,22 +1,25 @@
1
1
  import { styled as e } from "@linaria/react";
2
2
  const t = e.div`
3
3
  display: flex;
4
- justify-content: flex-end;
5
4
  align-items: center;
6
- column-gap: 2px;
5
+ flex: 1;
6
+ justify-content: space-between;
7
+ padding: 9px 8px;
8
+ color: var(--color-neutrals-white);
9
+ border-radius: 4px;
10
+ background-color: var(--color-primary-green2);
7
11
  overflow: hidden;
12
+ `, r = e.div`
13
+ font-size: 9px;
14
+ line-height: 14px;
15
+ text-transform: uppercase;
16
+ opacity: 0.8;
8
17
  `, i = e.div`
9
- width: 75px;
10
- `, n = e.div`
11
18
  font-size: 14px;
12
- color: #fff;
13
- overflow: hidden;
14
- text-overflow: ellipsis;
15
- white-space: nowrap;
16
- width: 25px;
19
+ line-height: 16px;
17
20
  `;
18
21
  export {
19
22
  t as Container,
20
- n as Indicator,
21
- i as Title
23
+ i as Indicator,
24
+ r as Title
22
25
  };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface StatisticProps {
3
+ indicator: string | number;
4
+ title: 'Win streak' | 'Correct' | 'Incorrect' | 'Succ. rate';
5
+ }
6
+ export declare const Statistic: React.FC<StatisticProps>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
+ import { Container as n, Indicator as c, Title as e } from "./styles.js";
3
+ import "@linaria/react";
4
+ const l = ({ indicator: r, title: t }) => /* @__PURE__ */ o(n, { children: [
5
+ /* @__PURE__ */ i(c, { children: r }),
6
+ /* @__PURE__ */ i(e, { children: t })
7
+ ] });
8
+ export {
9
+ l as Statistic
10
+ };
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const Indicator: 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>>;
@@ -0,0 +1,23 @@
1
+ import { styled as t } from "@linaria/react";
2
+ const i = t.div`
3
+ display: flex;
4
+ align-items: center;
5
+ flex-direction: column;
6
+ row-gap: 4px;
7
+ padding-top: 2px;
8
+ color: var(--color-neutrals-white);
9
+ text-align: center;
10
+ `, o = t.div`
11
+ font-size: 14px;
12
+ line-height: 16px;
13
+ `, n = t.div`
14
+ font-size: 9px;
15
+ line-height: 14px;
16
+ text-transform: uppercase;
17
+ opacity: 0.8;
18
+ `;
19
+ export {
20
+ i as Container,
21
+ o as Indicator,
22
+ n as Title
23
+ };
@@ -1,12 +1,12 @@
1
1
  import { jsxs as N, jsx as M } from "react/jsx-runtime";
2
- import { abbreviate as c } from "../../../utils/common.js";
2
+ import { abbreviate as y, formatDecimals as x } from "../../../utils/common.js";
3
3
  import { Rank as A } from "./components/rank/index.js";
4
- import { Statistics as D } from "./components/statistics/index.js";
5
- import { Container as x, TopInfo as U, User as w, UserAccountBtn as k, Avatar as r, AvatarPlaceholder as E, UserInfo as Q, UserName as S, UserRating as t, TrophyIcon as C, Rts as Y, RtsIndicator as o, Top as n, Ranks as e, BottomInfo as l } from "./styles.js";
4
+ import { Statistic as D } from "./components/statistic/index.js";
5
+ import { Container as U, TopInfo as w, User as k, UserAccountBtn as r, Avatar as t, AvatarPlaceholder as S, UserInfo as E, UserName as Q, UserRating as C, Rts as Y, 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
- import "./components/statistics/styles.js";
9
- const a = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxM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3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K", W = ({
10
10
  avatar: j,
11
11
  name: I,
12
12
  points: g,
@@ -16,42 +16,45 @@ const a = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXd
16
16
  correct: i,
17
17
  incorrect: u,
18
18
  inTop: L,
19
- average: y
20
- }) => /* @__PURE__ */ N(x, { children: [
21
- /* @__PURE__ */ N(U, { children: [
22
- /* @__PURE__ */ N(w, { children: [
23
- /* @__PURE__ */ N(k, { children: [
24
- j && /* @__PURE__ */ M(r, { alt: "avatar", src: j }),
25
- !j && /* @__PURE__ */ M(E, { children: c(I || "") })
26
- ] }),
27
- /* @__PURE__ */ N(Q, { children: [
28
- /* @__PURE__ */ M(S, { children: I }),
29
- /* @__PURE__ */ N(t, { children: [
30
- /* @__PURE__ */ M(C, { alt: "rank-icon", src: a }),
31
- /* @__PURE__ */ N(Y, { children: [
32
- /* @__PURE__ */ M(o, { children: g }),
33
- "RTS"
34
- ] }),
35
- /* @__PURE__ */ N(n, { children: [
36
- "TOP ",
37
- L || 0,
38
- "%"
19
+ average: c
20
+ }) => /* @__PURE__ */ N(U, { children: [
21
+ /* @__PURE__ */ M(w, { children: /* @__PURE__ */ N(k, { children: [
22
+ /* @__PURE__ */ N(r, { children: [
23
+ j && /* @__PURE__ */ M(t, { alt: "avatar", src: j }),
24
+ !j && /* @__PURE__ */ M(S, { children: y(I || "") })
25
+ ] }),
26
+ /* @__PURE__ */ N(E, { children: [
27
+ /* @__PURE__ */ M(Q, { children: I }),
28
+ /* @__PURE__ */ N(C, { children: [
29
+ /* @__PURE__ */ N(Y, { children: [
30
+ /* @__PURE__ */ M(n, { alt: "rank-icon", src: m }),
31
+ /* @__PURE__ */ N(e, { children: [
32
+ x(g),
33
+ /* @__PURE__ */ M(o, { children: "PTS" })
39
34
  ] })
35
+ ] }),
36
+ /* @__PURE__ */ M(l, {}),
37
+ /* @__PURE__ */ N("div", { children: [
38
+ "TOP ",
39
+ L || 0,
40
+ "%"
40
41
  ] })
41
42
  ] })
43
+ ] })
44
+ ] }) }),
45
+ /* @__PURE__ */ N(a, { children: [
46
+ /* @__PURE__ */ N(d, { children: [
47
+ /* @__PURE__ */ M(A, { indicator: T || 0, title: "Friends rank" }),
48
+ /* @__PURE__ */ M(A, { indicator: z || 0, title: "Global rank" })
42
49
  ] }),
43
- /* @__PURE__ */ N(e, { children: [
44
- /* @__PURE__ */ M(A, { title: "Friends rank", indicator: T || 0 }),
45
- /* @__PURE__ */ M(A, { title: "Global rank", indicator: z || 0 })
50
+ /* @__PURE__ */ N(s, { children: [
51
+ /* @__PURE__ */ M(D, { indicator: O || 0, title: "Win streak" }),
52
+ /* @__PURE__ */ M(D, { indicator: i || 0, title: "Correct" }),
53
+ /* @__PURE__ */ M(D, { indicator: u || 0, title: "Incorrect" }),
54
+ /* @__PURE__ */ M(D, { indicator: `${c || 0}%`, title: "Succ. rate" })
46
55
  ] })
47
- ] }),
48
- /* @__PURE__ */ N(l, { children: [
49
- /* @__PURE__ */ M(D, { indicator: O || 0, title: "Win streak" }),
50
- /* @__PURE__ */ M(D, { indicator: i || 0, title: "Correct" }),
51
- /* @__PURE__ */ M(D, { indicator: u || 0, title: "Incorrect" }),
52
- /* @__PURE__ */ M(D, { indicator: `${y || 0}%`, title: "Success rate" })
53
56
  ] })
54
57
  ] });
55
58
  export {
56
- V as UserStatistics
59
+ W as UserStatistics
57
60
  };
@@ -10,7 +10,9 @@ export declare const UserRating: import("@linaria/react").StyledComponent<import
10
10
  export declare const TrophyIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
11
11
  export declare const Rts: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
12
  export declare const RtsIndicator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
13
- export declare const Top: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
13
+ export declare const RtsLabel: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
14
+ export declare const Divider: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
14
15
  export declare const Ranks: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
16
+ export declare const Statistics: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
15
17
  export declare const AvatarPlaceholder: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
16
18
  export declare const UserAccountBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;