@streamlayer/react-ui 0.98.1 → 0.100.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 (129) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/showIn.js +45 -0
  3. package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
  4. package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
  5. package/lib/index.js +4 -8
  6. package/lib/ui/app/Features/Gamification/Friends.js +10 -23
  7. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
  8. package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
  9. package/lib/ui/app/Features/Gamification/Question.js +33 -65
  10. package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
  11. package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
  12. package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
  13. package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
  14. package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
  15. package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
  16. package/lib/ui/app/Features/Gamification/index.js +68 -143
  17. package/lib/ui/app/Features/index.d.ts +1 -2
  18. package/lib/ui/app/Features/index.js +20 -109
  19. package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
  20. package/lib/ui/app/Navigation/index.js +9 -12
  21. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
  22. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
  23. package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
  24. package/lib/ui/app/Notifications/index.js +96 -148
  25. package/lib/ui/app/Notifications/styles.js +10 -15
  26. package/lib/ui/app/Points/index.js +18 -26
  27. package/lib/ui/app/masters.js +71 -190
  28. package/lib/ui/app/useClipboardCopy.js +11 -15
  29. package/lib/ui/app/useMastersApp.js +34 -44
  30. package/lib/ui/app/useSdkResponsive.js +18 -19
  31. package/lib/ui/app/useSdkScroll.js +28 -26
  32. package/lib/ui/button/index.js +3 -4
  33. package/lib/ui/gamification/copyNotification/index.js +5 -7
  34. package/lib/ui/gamification/detail/header/index.js +15 -18
  35. package/lib/ui/gamification/detail/header/styles.js +12 -14
  36. package/lib/ui/gamification/detail/sponsor/index.js +2 -3
  37. package/lib/ui/gamification/insight/index.js +5 -6
  38. package/lib/ui/gamification/insight-list/index.js +3 -6
  39. package/lib/ui/gamification/invite-link/index.js +11 -17
  40. package/lib/ui/gamification/invite-link/styles.js +13 -15
  41. package/lib/ui/gamification/leaderboard/index.js +21 -28
  42. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
  43. package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
  44. package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
  45. package/lib/ui/gamification/leaderboard/static.js +34 -31
  46. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  47. package/lib/ui/gamification/onboarding/index.js +51 -73
  48. package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
  49. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
  50. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
  51. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
  52. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
  53. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
  54. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
  55. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
  56. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
  57. package/lib/ui/gamification/onboarding/styles.js +14 -17
  58. package/lib/ui/gamification/points/index.js +9 -15
  59. package/lib/ui/gamification/points/styles.js +12 -14
  60. package/lib/ui/gamification/question/index.d.ts +1 -3
  61. package/lib/ui/gamification/question/index.js +29 -34
  62. package/lib/ui/gamification/question/insight/index.d.ts +0 -1
  63. package/lib/ui/gamification/question/insight/index.js +7 -15
  64. package/lib/ui/gamification/question/list/index.js +20 -57
  65. package/lib/ui/gamification/question/notification/index.js +22 -35
  66. package/lib/ui/gamification/question/notification/insight/index.js +12 -17
  67. package/lib/ui/gamification/question/notification/pill/index.js +7 -9
  68. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
  69. package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
  70. package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
  71. package/lib/ui/gamification/question/notification/styles.js +17 -19
  72. package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
  73. package/lib/ui/gamification/question/styles.js +32 -34
  74. package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
  75. package/lib/ui/gamification/question/twitter/index.js +8 -20
  76. package/lib/ui/gamification/question/twitter/styles.js +4 -6
  77. package/lib/ui/gamification/tabs/index.js +6 -7
  78. package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
  79. package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
  80. package/lib/ui/gamification/user-statistics/index.js +2 -6
  81. package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
  82. package/lib/ui/gamification/vote/alert/index.js +11 -0
  83. package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
  84. package/lib/ui/gamification/vote/feedback/index.js +29 -33
  85. package/lib/ui/gamification/vote/feedback/styles.js +20 -23
  86. package/lib/ui/gamification/vote/index.d.ts +1 -0
  87. package/lib/ui/gamification/vote/index.js +123 -117
  88. package/lib/ui/gamification/vote/insight-details/index.js +9 -16
  89. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  90. package/lib/ui/gamification/vote/styles.js +14 -8
  91. package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
  92. package/lib/ui/gamification/vote/vote-option/index.js +38 -41
  93. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  94. package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
  95. package/lib/ui/gamification/vote/win-bar/index.js +29 -37
  96. package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
  97. package/lib/ui/login/demo.d.ts +1 -0
  98. package/lib/ui/login/demo.js +5 -17
  99. package/lib/ui/login/index.js +29 -35
  100. package/lib/ui/modal/index.js +31 -32
  101. package/lib/ui/navigation/button/Channels.js +5 -8
  102. package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
  103. package/lib/ui/navigation/button/LeaderBoard.js +8 -11
  104. package/lib/ui/navigation/button/index.js +10 -11
  105. package/lib/ui/navigation/masters.js +2 -3
  106. package/lib/ui/questions/insight/index.js +14 -19
  107. package/lib/ui/questions/twitter/account/index.js +13 -15
  108. package/lib/ui/questions/twitter/account/styles.js +14 -16
  109. package/lib/ui/questions/twitter/index.js +31 -38
  110. package/lib/ui/show-in/index.d.ts +1 -0
  111. package/lib/ui/show-in/index.js +12 -10
  112. package/lib/ui/skeleton/index.js +3 -4
  113. package/lib/ui/theme/index.js +3 -5
  114. package/lib/ui/video-player/index.js +44 -38
  115. package/lib/utils/createDemo.js +18 -28
  116. package/lib/utils/debug/components/copyLogs.js +2 -3
  117. package/lib/utils/debug/components/developer.js +20 -24
  118. package/lib/utils/debug/components/eventInput.js +9 -10
  119. package/lib/utils/debug/components/sdkKey.js +9 -10
  120. package/lib/utils/debug/index.js +17 -28
  121. package/lib/utils/debug/storage.js +32 -14
  122. package/lib/utils/decorators/container.js +5 -9
  123. package/lib/utils/storage.js +32 -14
  124. package/package.json +25 -26
  125. package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
  126. package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
  127. /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
  128. /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
  129. /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
@@ -1,46 +1,48 @@
1
- import { useStore as p } from "@nanostores/react";
2
- import S from "lodash.throttle";
3
- import { useRef as m, useState as h, useEffect as g } from "react";
4
- import { BREAKPOINTS as l } from "../theme/constants.js";
5
- import { m as T } from "../../index-z0QjLiEL.js";
6
- import "../../index-uEuzH3jr.js";
7
- const C = (o, t, e) => {
8
- const n = t >= l.lg && t < l.xl ? 75 : 52;
1
+ import { useStore as S } from "@nanostores/react";
2
+ import h from "lodash.throttle";
3
+ import { useRef as m, useState as b, useEffect as g } from "react";
4
+ import { BREAKPOINTS as c } from "../theme/constants.js";
5
+ import { m as v } from "../../index-CZvwzN5o.js";
6
+ const C = (o, e, n) => {
7
+ const t = e >= c.lg && e < c.xl ? 75 : 52;
9
8
  o.current && window.scrollTo({
10
- top: o.current.offsetTop - n,
11
- ...e
9
+ top: o.current.offsetTop - t,
10
+ ...n
12
11
  });
13
- }, D = (o, t) => {
14
- const e = m(null), n = m(0), [s] = h(
15
- T({
12
+ }, T = 15, D = (o, e) => {
13
+ const n = m(null), t = m(0), [s] = b(
14
+ v({
16
15
  scrollPosition: 0,
17
16
  tabsShown: !0,
18
17
  scrollDirection: "forward"
19
18
  })
20
- ), i = p(t);
19
+ ), i = S(e);
21
20
  return g(() => {
22
- const c = window.innerWidth < l.xl ? window : e.current;
23
- if (!c)
21
+ const l = window.innerWidth < c.xl ? window : n.current;
22
+ if (!l)
24
23
  return () => {
25
24
  };
26
- const u = S((w) => {
25
+ const f = h((d) => {
27
26
  var a;
28
- const f = w.target;
29
- if (!f)
27
+ const u = d.target;
28
+ if (!u)
30
29
  return;
31
30
  let r = 0;
32
- i.screen.size < l.xl ? r = ((a = o.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : r = f.scrollTop;
33
- const d = n.current < r ? "forward" : "backward";
34
- n.current = r, s.set({
31
+ i.screen.size < c.xl ? r = ((a = o.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : r = u.scrollTop;
32
+ const w = t.current - r;
33
+ if (T > Math.abs(w))
34
+ return;
35
+ const p = t.current < r ? "forward" : "backward";
36
+ t.current = r, s.set({
35
37
  scrollPosition: Math.round(r),
36
- scrollDirection: d,
38
+ scrollDirection: p,
37
39
  tabsShown: s.get().tabsShown
38
40
  });
39
41
  }, 200);
40
- return c.addEventListener("scroll", u), () => {
41
- c.removeEventListener("scroll", u);
42
+ return l.addEventListener("scroll", f), () => {
43
+ l.removeEventListener("scroll", f);
42
44
  };
43
- }, [s, o, i.screen]), [e, s];
45
+ }, [s, o, i.screen]), [n, s];
44
46
  };
45
47
  export {
46
48
  C as scrollIntoAppView,
@@ -1,7 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { SButton as m, ButtonLabel as p } from "./styles.js";
3
- import "@linaria/react";
4
- const c = ({ disabled: r, variant: o = "primary", onClick: n, children: a, ...i }) => /* @__PURE__ */ t(m, { onClick: n, disabled: r, "data-variant": o, ...i, children: /* @__PURE__ */ t(p, { children: a }) });
2
+ import { SButton as m, ButtonLabel as e } from "./styles.js";
3
+ const B = ({ disabled: r, variant: o = "primary", onClick: n, children: a, ...i }) => /* @__PURE__ */ t(m, { onClick: n, disabled: r, "data-variant": o, ...i, children: /* @__PURE__ */ t(e, { children: a }) });
5
4
  export {
6
- c as Button
5
+ B as Button
7
6
  };
@@ -1,12 +1,10 @@
1
1
  import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
- import { SvgIcon as r } from "../../icons/index.js";
3
- import { Container as t, Content as n, Title as e } from "./styles.js";
4
- import "@linaria/react";
5
- import "react";
6
- const d = () => /* @__PURE__ */ o(t, { children: /* @__PURE__ */ i(n, { children: [
7
- /* @__PURE__ */ o(r, { name: "iconCopySuccess" }),
2
+ import { SvgIcon as n } from "../../icons/index.js";
3
+ import { Container as r, Content as t, Title as e } from "./styles.js";
4
+ const s = () => /* @__PURE__ */ o(r, { children: /* @__PURE__ */ i(t, { children: [
5
+ /* @__PURE__ */ o(n, { name: "iconCopySuccess" }),
8
6
  /* @__PURE__ */ o(e, { children: "Link Copied to Clipboard" })
9
7
  ] }) });
10
8
  export {
11
- d as CopyNotification
9
+ s as CopyNotification
12
10
  };
@@ -1,27 +1,24 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { QuestionType as n } from "@streamlayer/sdk-web-types";
3
- import { QuestionTypeData as c } from "../../constants.js";
4
- import { Container as l, QuestionTypeWrap as a, QuestionTypeIcon as p, QuestionTypeTitle as s, CloseIconWrap as d, CloseIcon as I } from "./styles.js";
5
- import "@linaria/react";
6
- import "../../../icons/index.js";
7
- import "react";
8
- const N = ({ type: r, close: m, label: t }) => {
9
- const o = r ? c[r] : { label: t, iconName: void 0 };
10
- return /* @__PURE__ */ i(l, { children: [
11
- /* @__PURE__ */ i(a, { children: [
12
- (o == null ? void 0 : o.iconName) && /* @__PURE__ */ e(
13
- p,
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { QuestionType as i } from "@streamlayer/sdk-web-types";
3
+ import { QuestionTypeData as m } from "../../constants.js";
4
+ import { Container as t, QuestionTypeWrap as a, QuestionTypeIcon as s, QuestionTypeTitle as p, CloseIconWrap as d, CloseIcon as I } from "./styles.js";
5
+ const T = ({ type: e, close: c, label: l }) => {
6
+ const o = e ? m[e] : { label: l, iconName: void 0 };
7
+ return /* @__PURE__ */ r(t, { children: [
8
+ /* @__PURE__ */ r(a, { children: [
9
+ (o == null ? void 0 : o.iconName) && /* @__PURE__ */ n(
10
+ s,
14
11
  {
15
- "data-type-trivia": r === n.TRIVIA,
16
- "data-type-poll": r === n.POLL,
12
+ "data-type-trivia": e === i.TRIVIA,
13
+ "data-type-poll": e === i.POLL,
17
14
  name: o.iconName
18
15
  }
19
16
  ),
20
- (o == null ? void 0 : o.label) && /* @__PURE__ */ e(s, { children: o.label })
17
+ (o == null ? void 0 : o.label) && /* @__PURE__ */ n(p, { children: o.label })
21
18
  ] }),
22
- /* @__PURE__ */ e(d, { onClick: m, children: /* @__PURE__ */ e(I, { name: "icon-cross" }) })
19
+ /* @__PURE__ */ n(d, { onClick: c, children: /* @__PURE__ */ n(I, { name: "icon-cross" }) })
23
20
  ] });
24
21
  };
25
22
  export {
26
- N as VoteHeader
23
+ T as VoteHeader
27
24
  };
@@ -1,37 +1,35 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as o } from "../../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const r = /* @__PURE__ */ s("div")({
3
+ const c = /* @__PURE__ */ s("div")({
6
4
  name: "Container",
7
5
  class: "c1vwopgc",
8
6
  propsAsIs: !1
9
- }), l = /* @__PURE__ */ s("div")({
7
+ }), a = /* @__PURE__ */ s("div")({
10
8
  name: "QuestionTypeWrap",
11
9
  class: "qyktpt0",
12
10
  propsAsIs: !1
13
- }), e = () => o, i = /* @__PURE__ */ s(e())({
11
+ }), e = () => o, l = /* @__PURE__ */ s(e())({
14
12
  name: "QuestionTypeIcon",
15
13
  class: "q951jdx",
16
14
  propsAsIs: !0
17
- }), I = /* @__PURE__ */ s("span")({
15
+ }), r = /* @__PURE__ */ s("span")({
18
16
  name: "QuestionTypeTitle",
19
17
  class: "qss5f0e",
20
18
  propsAsIs: !1
21
- }), m = /* @__PURE__ */ s("div")({
19
+ }), i = /* @__PURE__ */ s("div")({
22
20
  name: "CloseIconWrap",
23
21
  class: "c1ao1jtv",
24
22
  propsAsIs: !1
25
- }), n = () => o, u = /* @__PURE__ */ s(n())({
23
+ }), n = () => o, I = /* @__PURE__ */ s(n())({
26
24
  name: "CloseIcon",
27
25
  class: "cvsl7l3",
28
26
  propsAsIs: !0
29
27
  });
30
28
  export {
31
- u as CloseIcon,
32
- m as CloseIconWrap,
33
- r as Container,
34
- i as QuestionTypeIcon,
35
- I as QuestionTypeTitle,
36
- l as QuestionTypeWrap
29
+ I as CloseIcon,
30
+ i as CloseIconWrap,
31
+ c as Container,
32
+ l as QuestionTypeIcon,
33
+ r as QuestionTypeTitle,
34
+ a as QuestionTypeWrap
37
35
  };
@@ -1,7 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { styled as s } from "@linaria/react";
3
3
  import { SvgIcon as r } from "../../../icons/index.js";
4
- import "react";
5
4
  const p = /* @__PURE__ */ s("div")({
6
5
  name: "SponsorLogoWrap",
7
6
  class: "s8p5v5z",
@@ -10,11 +9,11 @@ const p = /* @__PURE__ */ s("div")({
10
9
  name: "SponsorLogo",
11
10
  class: "s755yti",
12
11
  propsAsIs: !0
13
- }), i = () => /* @__PURE__ */ o(p, {
12
+ }), c = () => /* @__PURE__ */ o(p, {
14
13
  children: /* @__PURE__ */ o(t, {
15
14
  name: "mastersLogo"
16
15
  })
17
16
  });
18
17
  export {
19
- i as Sponsor
18
+ c as Sponsor
20
19
  };
@@ -1,8 +1,7 @@
1
1
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
2
  import { QuestionImages as c } from "@streamlayer/sdk-web-types";
3
3
  import { Container as h, Graphic as l, Content as C, Title as g, NextIcon as a, InsightIconDefault as I, InsightIconAbsolute as d, InsightIconCircle as u } from "./styles.js";
4
- import "@linaria/react";
5
- const m = "data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Chevron'%3e%3cpath%20id='Chevron_2'%20d='M12%208.17222C12%208.28783%2011.9781%208.39553%2011.9342%208.49533C11.8903%208.59513%2011.822%208.68992%2011.7292%208.7797L6.36949%2013.9439C6.21462%2014.0965%206.02742%2014.1729%205.80787%2014.1729C5.65752%2014.1729%205.52191%2014.1379%205.40104%2014.0679C5.28016%2013.998%205.1831%2013.9039%205.10986%2013.7856C5.03662%2013.6673%205%2013.5345%205%2013.3873C5%2013.1721%205.08288%2012.9818%205.24863%2012.8164L10.0807%208.17095L5.24863%203.52799C5.08288%203.36425%205%203.17439%205%202.95841C5%202.81118%205.03662%202.67842%205.10986%202.56013C5.1831%202.44183%205.28016%202.34771%205.40104%202.27777C5.52191%202.20782%205.65752%202.17285%205.80787%202.17285C6.02742%202.17285%206.21462%202.24731%206.36949%202.39624L11.7292%207.56473C11.8211%207.65451%2011.889%207.74909%2011.9329%207.84846C11.9768%207.94784%2011.9991%208.05576%2012%208.17222Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e", p = (i, n) => {
4
+ const v = "data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Chevron'%3e%3cpath%20id='Chevron_2'%20d='M12%208.17222C12%208.28783%2011.9781%208.39553%2011.9342%208.49533C11.8903%208.59513%2011.822%208.68992%2011.7292%208.7797L6.36949%2013.9439C6.21462%2014.0965%206.02742%2014.1729%205.80787%2014.1729C5.65752%2014.1729%205.52191%2014.1379%205.40104%2014.0679C5.28016%2013.998%205.1831%2013.9039%205.10986%2013.7856C5.03662%2013.6673%205%2013.5345%205%2013.3873C5%2013.1721%205.08288%2012.9818%205.24863%2012.8164L10.0807%208.17095L5.24863%203.52799C5.08288%203.36425%205%203.17439%205%202.95841C5%202.81118%205.03662%202.67842%205.10986%202.56013C5.1831%202.44183%205.28016%202.34771%205.40104%202.27777C5.52191%202.20782%205.65752%202.17285%205.80787%202.17285C6.02742%202.17285%206.21462%202.24731%206.36949%202.39624L11.7292%207.56473C11.8211%207.65451%2011.889%207.74909%2011.9329%207.84846C11.9768%207.94784%2011.9991%208.05576%2012%208.17222Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e", x = (i, n) => {
6
5
  switch (i) {
7
6
  case c.ROUNDED:
8
7
  return /* @__PURE__ */ t(u, { alt: "insight-icon", src: n });
@@ -13,13 +12,13 @@ const m = "data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200
13
12
  default:
14
13
  return null;
15
14
  }
16
- }, F = ({ title: i, image: n, questionId: r, imageMode: o, openInsight: s }) => /* @__PURE__ */ e(h, { onClick: () => s(r), children: [
17
- /* @__PURE__ */ t(l, { children: n && p(o, n) }),
15
+ }, w = ({ title: i, image: n, questionId: r, imageMode: o, openInsight: s }) => /* @__PURE__ */ e(h, { onClick: () => s(r), children: [
16
+ /* @__PURE__ */ t(l, { children: n && x(o, n) }),
18
17
  /* @__PURE__ */ e(C, { children: [
19
18
  /* @__PURE__ */ t(g, { children: i || "" }),
20
- /* @__PURE__ */ t(a, { alt: "next-icon", src: m })
19
+ /* @__PURE__ */ t(a, { alt: "next-icon", src: v })
21
20
  ] })
22
21
  ] });
23
22
  export {
24
- F as Insight
23
+ w as Insight
25
24
  };
@@ -1,10 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { Insight as n } from "../insight/index.js";
3
- import { Container as i, ItemsContainer as p } from "./styles.js";
4
- import "@streamlayer/sdk-web-types";
5
- import "../insight/styles.js";
6
- import "@linaria/react";
7
- const u = ({ insights: r, openInsight: m, className: e }) => /* @__PURE__ */ o(i, { className: e, children: /* @__PURE__ */ o(p, { children: r == null ? void 0 : r.map((t) => /* @__PURE__ */ o(n, { openInsight: m, ...t }, t.questionId)) }) });
3
+ import { Container as I, ItemsContainer as a } from "./styles.js";
4
+ const i = ({ insights: r, openInsight: e, className: m }) => /* @__PURE__ */ o(I, { className: m, children: /* @__PURE__ */ o(a, { children: r == null ? void 0 : r.map((t) => /* @__PURE__ */ o(n, { openInsight: e, ...t }, t.questionId)) }) });
8
5
  export {
9
- u as InsightList
6
+ i as InsightList
10
7
  };
@@ -1,30 +1,24 @@
1
- import { jsxs as C, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as C } from "react/jsx-runtime";
2
2
  import { useAnalyticsHandle as c } from "../../../hooks/analytics.js";
3
3
  import { InvitationFrom as l } from "@streamlayer/sdk-web-types";
4
- import { Container as m, FriendsIcon as s, Content as p, Title as a, Description as d, ArrowInviteIcon as h } from "./styles.js";
5
- import "lodash.throttle";
6
- import "react";
7
- import "@streamlayer/sdk-web-interfaces";
8
- import "../../theme/constants.js";
9
- import "@linaria/react";
10
- import "../../icons/index.js";
11
- const f = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", D = ({ title: t, description: n, onClick: o, className: r }) => {
12
- const [e] = c({
4
+ import { Container as s, FriendsIcon as a, Content as d, Title as h, Description as m, ArrowInviteIcon as p } from "./styles.js";
5
+ const f = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", g = ({ title: n, description: t, onClick: e, className: o }) => {
6
+ const [r] = c({
13
7
  type: "invitation",
14
8
  action: "sent",
15
9
  payload: {
16
10
  from: l.TITLE_CARD
17
11
  }
18
12
  });
19
- return /* @__PURE__ */ C(m, { onClick: e(o), className: r, children: [
20
- /* @__PURE__ */ i(s, { alt: "friends-icon", src: f }),
21
- /* @__PURE__ */ C(p, { children: [
22
- /* @__PURE__ */ i(a, { children: t }),
23
- /* @__PURE__ */ i(d, { children: n })
13
+ return /* @__PURE__ */ i(s, { onClick: r(e), className: o, children: [
14
+ /* @__PURE__ */ C(a, { alt: "friends-icon", src: f }),
15
+ /* @__PURE__ */ i(d, { children: [
16
+ /* @__PURE__ */ C(h, { children: n }),
17
+ /* @__PURE__ */ C(m, { children: t })
24
18
  ] }),
25
- /* @__PURE__ */ i(h, { name: "icon-copy" })
19
+ /* @__PURE__ */ C(p, { name: "icon-copy" })
26
20
  ] });
27
21
  };
28
22
  export {
29
- D as InviteLink
23
+ g as InviteLink
30
24
  };
@@ -1,37 +1,35 @@
1
1
  import { styled as s } from "@linaria/react";
2
- import { SvgIcon as o } from "../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const a = /* @__PURE__ */ s("div")({
2
+ import { SvgIcon as n } from "../../icons/index.js";
3
+ const c = /* @__PURE__ */ s("div")({
6
4
  name: "Container",
7
5
  class: "c1ux29ft",
8
6
  propsAsIs: !1
9
- }), i = /* @__PURE__ */ s("img")({
7
+ }), r = /* @__PURE__ */ s("img")({
10
8
  name: "FriendsIcon",
11
9
  class: "f10ncfg2",
12
10
  propsAsIs: !1
13
- }), p = /* @__PURE__ */ s("div")({
11
+ }), a = /* @__PURE__ */ s("div")({
14
12
  name: "Content",
15
13
  class: "c1yc07bd",
16
14
  propsAsIs: !1
17
- }), l = /* @__PURE__ */ s("div")({
15
+ }), i = /* @__PURE__ */ s("div")({
18
16
  name: "Title",
19
17
  class: "tj6cq7w",
20
18
  propsAsIs: !1
21
- }), m = /* @__PURE__ */ s("div")({
19
+ }), p = /* @__PURE__ */ s("div")({
22
20
  name: "Description",
23
21
  class: "d1ag78xo",
24
22
  propsAsIs: !1
25
- }), n = () => o, I = /* @__PURE__ */ s(n())({
23
+ }), o = () => n, l = /* @__PURE__ */ s(o())({
26
24
  name: "ArrowInviteIcon",
27
25
  class: "awohrz6",
28
26
  propsAsIs: !0
29
27
  });
30
28
  export {
31
- I as ArrowInviteIcon,
32
- a as Container,
33
- p as Content,
34
- m as Description,
35
- i as FriendsIcon,
36
- l as Title
29
+ l as ArrowInviteIcon,
30
+ c as Container,
31
+ a as Content,
32
+ p as Description,
33
+ r as FriendsIcon,
34
+ i as Title
37
35
  };
@@ -1,54 +1,47 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import h from "react-virtualized-auto-sizer";
3
3
  import { FixedSizeList as u } from "react-window";
4
4
  import L from "react-window-infinite-loader";
5
5
  import { LeaderboardItem as I } from "./list-item/index.js";
6
6
  import { ScrollContainer as c } from "./styles.js";
7
- import { LeaderboardStaticList as v } from "./static.js";
8
- import "../../../utils/common.js";
9
- import "./list-item/styles.js";
10
- import "@linaria/react";
11
- import "../../icons/index.js";
12
- import "react";
13
- import "../../../styles_z07sl8-w40geAFS.js";
14
- import "react-infinite-scroller";
15
- const M = ({
7
+ import { LeaderboardStaticList as A } from "./static.js";
8
+ const x = ({
16
9
  items: r,
17
10
  currentUserId: i,
18
11
  openItemDetail: m,
19
- fetchMore: p,
20
- onScroll: d
21
- }) => /* @__PURE__ */ o(h, { children: ({ width: n, height: a }) => /* @__PURE__ */ o(
12
+ fetchMore: d,
13
+ onScroll: n
14
+ }) => /* @__PURE__ */ e(h, { children: ({ width: a, height: l }) => /* @__PURE__ */ e(
22
15
  L,
23
16
  {
24
- isItemLoaded: (e) => e < r.length,
17
+ isItemLoaded: (t) => t < r.length,
25
18
  itemCount: r.length + 1,
26
- loadMoreItems: p,
27
- children: ({ onItemsRendered: e, ref: l }) => /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(
19
+ loadMoreItems: d,
20
+ children: ({ onItemsRendered: t, ref: p }) => /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
28
21
  u,
29
22
  {
30
23
  itemSize: 56,
31
- onScroll: d,
32
- onItemsRendered: e,
33
- ref: l,
24
+ onScroll: n,
25
+ onItemsRendered: t,
26
+ ref: p,
34
27
  itemCount: r.length,
35
- width: n,
36
- height: a,
37
- children: ({ index: t, style: f }) => /* @__PURE__ */ o(
28
+ width: a,
29
+ height: l,
30
+ children: ({ index: o, style: f }) => /* @__PURE__ */ e(
38
31
  I,
39
32
  {
40
33
  style: { ...f, maxHeight: 48 },
41
- ...r[t],
42
- openItemDetail: () => m(r[t].userId),
43
- isCurrentUser: !!i && i === r[t].userId
34
+ ...r[o],
35
+ openItemDetail: () => m(r[o].userId),
36
+ isCurrentUser: !!i && i === r[o].userId
44
37
  },
45
- r[t].userId
38
+ r[o].userId
46
39
  )
47
40
  }
48
41
  ) })
49
42
  }
50
43
  ) });
51
44
  export {
52
- M as LeaderboardList,
53
- v as LeaderboardStaticList
45
+ x as LeaderboardList,
46
+ A as LeaderboardStaticList
54
47
  };
@@ -3,7 +3,6 @@ import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sdk-web-t
3
3
  export type LeaderboardItemProps = Partial<ILeaderboardItem> & {
4
4
  userId: string;
5
5
  isCurrentUser?: boolean;
6
- openItemDetail: () => void;
7
6
  style?: React.CSSProperties;
8
7
  };
9
8
  export declare const LeaderboardItem: React.FC<LeaderboardItemProps>;
@@ -1,28 +1,25 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
2
  import { abbreviate as c, formatDecimals as l } from "../../../../utils/common.js";
3
- import { Container as s, Position as h, Content as p, Avatar as C, AvatarPlaceholder as b, NameContainer as f, Name as v, CurrentUserBadge as x } from "./styles.js";
4
- import "@linaria/react";
5
- import "../../../icons/index.js";
6
- import "react";
7
- const k = ({
8
- rank: o,
9
- avatar: i,
3
+ import { Container as s, Position as h, Content as b, Avatar as f, AvatarPlaceholder as p, NameContainer as v, Name as C, CurrentUserBadge as x } from "./styles.js";
4
+ const N = ({
5
+ friendsRank: i,
6
+ avatar: a,
10
7
  name: t,
11
- points: a,
12
- isCurrentUser: n,
13
- openItemDetail: m,
14
- style: d
15
- }) => /* @__PURE__ */ e(s, { onClick: m, style: d, children: [
16
- /* @__PURE__ */ r(h, { children: o || 0 }),
17
- /* @__PURE__ */ e(p, { children: [
18
- i ? /* @__PURE__ */ r(C, { alt: "leaderboard-item-avatar", src: i }) : /* @__PURE__ */ r(b, { children: c(t || "") }),
19
- /* @__PURE__ */ e(f, { children: [
20
- /* @__PURE__ */ r(v, { children: t || "" }),
21
- n && /* @__PURE__ */ r(x, { name: "icon-star" })
8
+ userId: n,
9
+ points: o,
10
+ isCurrentUser: d,
11
+ style: m
12
+ }) => /* @__PURE__ */ e(s, { "data-name": n, style: m, children: [
13
+ /* @__PURE__ */ r(h, { children: i || 0 }),
14
+ /* @__PURE__ */ e(b, { children: [
15
+ a ? /* @__PURE__ */ r(f, { alt: "leaderboard-item-avatar", src: a }) : /* @__PURE__ */ r(p, { children: c(t || "") }),
16
+ /* @__PURE__ */ e(v, { children: [
17
+ /* @__PURE__ */ r(C, { children: t || "" }),
18
+ d && /* @__PURE__ */ r(x, { name: "icon-star" })
22
19
  ] })
23
20
  ] }),
24
- /* @__PURE__ */ r("div", { children: l(a) })
21
+ /* @__PURE__ */ r("div", { children: l(o) })
25
22
  ] });
26
23
  export {
27
- k as LeaderboardItem
24
+ N as LeaderboardItem
28
25
  };
@@ -1,47 +1,45 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as a } from "../../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const c = /* @__PURE__ */ s("div")({
3
+ const r = /* @__PURE__ */ s("div")({
6
4
  name: "Container",
7
5
  class: "culdu4a",
8
6
  propsAsIs: !1
9
- }), p = /* @__PURE__ */ s("div")({
7
+ }), t = /* @__PURE__ */ s("div")({
10
8
  name: "Position",
11
9
  class: "pwf8e69",
12
10
  propsAsIs: !1
13
- }), l = /* @__PURE__ */ s("img")({
11
+ }), c = /* @__PURE__ */ s("img")({
14
12
  name: "Avatar",
15
13
  class: "atf4yh4",
16
14
  propsAsIs: !1
17
- }), m = /* @__PURE__ */ s("div")({
15
+ }), p = /* @__PURE__ */ s("div")({
18
16
  name: "AvatarPlaceholder",
19
17
  class: "a1dg29ja",
20
18
  propsAsIs: !1
21
- }), i = /* @__PURE__ */ s("div")({
19
+ }), l = /* @__PURE__ */ s("div")({
22
20
  name: "Content",
23
21
  class: "c10a68rc",
24
22
  propsAsIs: !1
25
- }), d = /* @__PURE__ */ s("div")({
23
+ }), m = /* @__PURE__ */ s("div")({
26
24
  name: "NameContainer",
27
25
  class: "nc4kck5",
28
26
  propsAsIs: !1
29
- }), A = /* @__PURE__ */ s("span")({
27
+ }), i = /* @__PURE__ */ s("span")({
30
28
  name: "Name",
31
29
  class: "njsrqgr",
32
30
  propsAsIs: !1
33
- }), e = () => a, f = /* @__PURE__ */ s(e())({
31
+ }), e = () => a, d = /* @__PURE__ */ s(e())({
34
32
  name: "CurrentUserBadge",
35
33
  class: "c17uc4zr",
36
34
  propsAsIs: !0
37
35
  });
38
36
  export {
39
- l as Avatar,
40
- m as AvatarPlaceholder,
41
- c as Container,
42
- i as Content,
43
- f as CurrentUserBadge,
44
- A as Name,
45
- d as NameContainer,
46
- p as Position
37
+ c as Avatar,
38
+ p as AvatarPlaceholder,
39
+ r as Container,
40
+ l as Content,
41
+ d as CurrentUserBadge,
42
+ i as Name,
43
+ m as NameContainer,
44
+ t as Position
47
45
  };