@streamlayer/react-ui 0.99.0 → 0.100.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/showIn.js +45 -0
  3. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
  4. package/lib/ui/app/Features/Gamification/Leaderboard.js +24 -26
  5. package/lib/ui/app/Features/Gamification/Question.js +19 -19
  6. package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
  7. package/lib/ui/app/Features/Gamification/Tabs.js +27 -37
  8. package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
  9. package/lib/ui/app/Features/Gamification/index.js +46 -40
  10. package/lib/ui/app/Features/index.d.ts +1 -2
  11. package/lib/ui/app/Features/index.js +16 -17
  12. package/lib/ui/app/Notifications/Onboarding/index.js +33 -33
  13. package/lib/ui/app/masters.js +42 -42
  14. package/lib/ui/app/useSdkScroll.js +30 -27
  15. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
  16. package/lib/ui/gamification/leaderboard/list-item/index.js +16 -16
  17. package/lib/ui/gamification/leaderboard/static.js +31 -24
  18. package/lib/ui/gamification/question/index.d.ts +1 -3
  19. package/lib/ui/gamification/question/index.js +25 -26
  20. package/lib/ui/gamification/question/insight/index.d.ts +0 -1
  21. package/lib/ui/gamification/question/insight/index.js +7 -7
  22. package/lib/ui/gamification/question/list/index.js +19 -35
  23. package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
  24. package/lib/ui/gamification/question/twitter/index.js +8 -8
  25. package/lib/ui/gamification/question/twitter/styles.d.ts +1 -1
  26. package/lib/ui/gamification/question/twitter/styles.js +8 -9
  27. package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
  28. package/lib/ui/gamification/vote/alert/index.js +11 -0
  29. package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
  30. package/lib/ui/gamification/vote/feedback/index.js +31 -31
  31. package/lib/ui/gamification/vote/index.d.ts +1 -0
  32. package/lib/ui/gamification/vote/index.js +109 -89
  33. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  34. package/lib/ui/gamification/vote/styles.js +14 -8
  35. package/lib/ui/gamification/vote/vote-option/index.js +28 -28
  36. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  37. package/lib/ui/gamification/vote/vote-option/styles.js +34 -29
  38. package/lib/ui/modal/index.js +31 -31
  39. package/lib/ui/show-in/index.d.ts +1 -0
  40. package/lib/ui/show-in/index.js +12 -10
  41. package/package.json +20 -21
  42. package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
  43. package/lib/ui/gamification/vote/expired-alert/index.js +0 -11
  44. /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
@@ -1,41 +1,40 @@
1
1
  import { jsx as n, jsxs as v } from "react/jsx-runtime";
2
2
  import { useStore as C } from "@nanostores/react";
3
- import { useAnalyticsListener as p, newTabLinkListener as A, appScrollListener as F, appClickListener as x } from "../../hooks/analytics.js";
4
- import { useRef as S, useMemo as b } from "react";
5
- import { resetCss as f } from "../theme/theme.js";
6
- import { ActiveFeature as D, StandaloneFeature as I } from "./Features/index.js";
7
- import { MastersNavigation as M } from "./Navigation/MastersNavigation/index.js";
8
- import { SDKNotifications as B } from "./Notifications/index.js";
9
- import { SDKContainer as j, SDKScrollContainer as k } from "./styles.js";
3
+ import { useAnalyticsListener as d, newTabLinkListener as A, appScrollListener as F, appClickListener as x } from "../../hooks/analytics.js";
4
+ import { useRef as S, useMemo as b, useEffect as D } from "react";
5
+ import { resetCss as p } from "../theme/theme.js";
6
+ import { ActiveFeature as I, StandaloneFeature as M } from "./Features/index.js";
7
+ import { MastersNavigation as B } from "./Navigation/MastersNavigation/index.js";
8
+ import { SDKNotifications as j } from "./Notifications/index.js";
9
+ import { SDKContainer as k, SDKScrollContainer as E } from "./styles.js";
10
10
  import { useMastersApp as K } from "./useMastersApp.js";
11
11
  import { MastersContext as O } from "./useMastersContext.js";
12
12
  import { useSdkFeature as R } from "./useSdkFeature.js";
13
13
  import { useSdkResponsive as T } from "./useSdkResponsive.js";
14
14
  import { useSdkScroll as w } from "./useSdkScroll.js";
15
- import { ChannelsButtonId as E } from "../navigation/button/Channels.js";
16
- import { LeaderBoardButtonId as G } from "../navigation/button/LeaderBoard.js";
17
- import { FeaturedGroupsButtonId as P } from "../navigation/button/FeaturedGroups.js";
18
- const V = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, headerNode: o, responsiveStore: r }) => {
19
- const [, c] = R(e);
15
+ import { ChannelsButtonId as G } from "../navigation/button/Channels.js";
16
+ import { LeaderBoardButtonId as P } from "../navigation/button/LeaderBoard.js";
17
+ import { FeaturedGroupsButtonId as V } from "../navigation/button/FeaturedGroups.js";
18
+ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, responsiveStore: o }) => {
19
+ const [, r] = R(e);
20
20
  return /* @__PURE__ */ n(
21
- D,
21
+ I,
22
22
  {
23
23
  className: i,
24
24
  scrollNode: s,
25
25
  appNode: t,
26
26
  scrollStore: l,
27
- feature: c,
28
- headerNode: o,
29
- responsiveStore: r,
27
+ feature: r,
28
+ responsiveStore: o,
30
29
  sdk: e
31
30
  }
32
31
  );
33
- }, W = ({ sdk: e, className: i, appNode: l, responsiveStore: t }) => {
32
+ }, Y = ({ sdk: e, className: i, appNode: l, responsiveStore: t }) => {
34
33
  const s = C(e.featuresList.getStore());
35
34
  return s ? Array.from(s, (o) => {
36
35
  const r = e.getFeature(o);
37
36
  return r ? /* @__PURE__ */ n(
38
- I,
37
+ M,
39
38
  {
40
39
  className: i,
41
40
  appNode: l,
@@ -46,63 +45,64 @@ const V = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, he
46
45
  o
47
46
  ) : null;
48
47
  }) : null;
49
- }, ae = ({ sdk: e, overlays: i, children: l }) => {
50
- const t = S(null), s = S(null), [o] = T(t), [r, c] = w(t, o), { sdkEnabled: a, sdkReady: u, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = K(e);
51
- p(t, { enabled: a, event: "click", listener: A }), p(r, {
48
+ }, ie = ({ sdk: e, overlays: i, children: l }) => {
49
+ const t = S(null), s = S(null), [o] = T(t), [r, f] = w(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = K(e);
50
+ d(t, { enabled: a, event: "click", listener: A }), d(r, {
52
51
  enabled: a,
53
52
  event: "scrollend",
54
53
  listener: F,
55
54
  useDomNode: !0
56
- }), p(r, {
55
+ }), d(r, {
57
56
  enabled: a,
58
57
  event: "click",
59
58
  listener: x,
60
59
  useDomNode: !0
61
60
  });
62
61
  const L = b(() => ({ sdk: e }), [e]);
63
- return /* @__PURE__ */ n(O.Provider, { value: L, children: /* @__PURE__ */ v(j, { ref: t, children: [
62
+ return D(() => {
63
+ import("./Features/Gamification/gamification-feature.js");
64
+ }, []), /* @__PURE__ */ n(O.Provider, { value: L, children: /* @__PURE__ */ v(k, { ref: t, children: [
64
65
  a && /* @__PURE__ */ n(
65
- M,
66
+ B,
66
67
  {
67
68
  ref: s,
68
- sdkReady: u,
69
+ sdkReady: c,
69
70
  activeOverlay: m,
70
- className: f,
71
- setActiveOverlay: (d) => h("", d),
71
+ className: p,
72
+ setActiveOverlay: (u) => h("", u),
72
73
  scrollToTop: () => {
73
- var d;
74
- return (d = r.current) == null ? void 0 : d.scrollTo(0, 0);
74
+ var u;
75
+ return (u = r.current) == null ? void 0 : u.scrollTo(0, 0);
75
76
  },
76
77
  responsiveStore: o
77
78
  }
78
79
  ),
79
- /* @__PURE__ */ v(k, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
80
- u && /* @__PURE__ */ n(
81
- B,
80
+ /* @__PURE__ */ v(E, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
81
+ c && /* @__PURE__ */ n(
82
+ j,
82
83
  {
83
84
  sdk: e,
84
85
  scrollNode: r,
85
86
  headerNode: s,
86
87
  appNode: t,
87
- scrollStore: c,
88
+ scrollStore: f,
88
89
  responsiveStore: o
89
90
  }
90
91
  ),
91
- /* @__PURE__ */ n("div", { style: !a || m === E ? {} : { display: "none" }, children: l && l({ activateEventWithId: N, deactivate: g }) }),
92
- i && m === G && i[m],
93
- u && m === P && /* @__PURE__ */ n(
94
- V,
92
+ /* @__PURE__ */ n("div", { style: !a || m === G ? {} : { display: "none" }, children: l && l({ activateEventWithId: N, deactivate: g }) }),
93
+ i && m === P && i[m],
94
+ c && m === V && /* @__PURE__ */ n(
95
+ W,
95
96
  {
96
- scrollStore: c,
97
+ scrollStore: f,
97
98
  responsiveStore: o,
98
99
  scrollNode: r,
99
100
  appNode: t,
100
- headerNode: s,
101
- className: f,
101
+ className: p,
102
102
  sdk: e
103
103
  }
104
104
  ),
105
- u && /* @__PURE__ */ n(W, { responsiveStore: o, appNode: t, className: f, sdk: e })
105
+ c && /* @__PURE__ */ n(Y, { responsiveStore: o, appNode: t, className: p, sdk: e })
106
106
  ] }),
107
107
  a && !y && /* @__PURE__ */ n(
108
108
  "div",
@@ -114,5 +114,5 @@ const V = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, he
114
114
  ] }) });
115
115
  };
116
116
  export {
117
- ae as MastersApp
117
+ ie as MastersApp
118
118
  };
@@ -1,47 +1,50 @@
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-CZvwzN5o.js";
6
- const R = (o, t, e) => {
7
- 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;
8
8
  o.current && window.scrollTo({
9
- top: o.current.offsetTop - n,
10
- ...e
9
+ top: o.current.offsetTop - t,
10
+ ...n
11
11
  });
12
- }, C = (o, t) => {
13
- const e = m(null), n = m(0), [s] = h(
14
- T({
12
+ }, T = 15, D = (o, e) => {
13
+ const n = m(null), t = m(0), [s] = b(
14
+ v({
15
15
  scrollPosition: 0,
16
16
  tabsShown: !0,
17
17
  scrollDirection: "forward"
18
18
  })
19
- ), i = p(t);
19
+ ), i = S(e);
20
20
  return g(() => {
21
- const c = window.innerWidth < l.xl ? window : e.current;
22
- if (!c)
21
+ const l = window.innerWidth < c.xl ? window : n.current;
22
+ if (!l)
23
23
  return () => {
24
24
  };
25
- const u = S((w) => {
25
+ const f = h((d) => {
26
26
  var a;
27
- const f = w.target;
28
- if (!f)
27
+ const u = d.target;
28
+ if (!u)
29
29
  return;
30
30
  let r = 0;
31
- i.screen.size < l.xl ? r = ((a = o.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : r = f.scrollTop;
32
- const d = n.current < r ? "forward" : "backward";
33
- 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({
34
37
  scrollPosition: Math.round(r),
35
- scrollDirection: d,
38
+ scrollDirection: p,
36
39
  tabsShown: s.get().tabsShown
37
40
  });
38
41
  }, 200);
39
- return c.addEventListener("scroll", u), () => {
40
- c.removeEventListener("scroll", u);
42
+ return l.addEventListener("scroll", f), () => {
43
+ l.removeEventListener("scroll", f);
41
44
  };
42
- }, [s, o, i.screen]), [e, s];
45
+ }, [s, o, i.screen]), [n, s];
43
46
  };
44
47
  export {
45
- R as scrollIntoAppView,
46
- C as useSdkScroll
48
+ C as scrollIntoAppView,
49
+ D as useSdkScroll
47
50
  };
@@ -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,24 +1,24 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { abbreviate as l, formatDecimals as m } from "../../../../utils/common.js";
3
- import { Container as s, Position as h, Content as C, Avatar as b, AvatarPlaceholder as f, NameContainer as p, Name as v, CurrentUserBadge as x } from "./styles.js";
2
+ import { abbreviate as c, formatDecimals as l } from "../../../../utils/common.js";
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
4
  const N = ({
5
- friendsRank: t,
5
+ friendsRank: i,
6
6
  avatar: a,
7
- name: i,
8
- points: n,
9
- isCurrentUser: o,
10
- openItemDetail: d,
11
- style: c
12
- }) => /* @__PURE__ */ e(s, { onClick: d, style: c, children: [
13
- /* @__PURE__ */ r(h, { children: t || 0 }),
14
- /* @__PURE__ */ e(C, { children: [
15
- a ? /* @__PURE__ */ r(b, { alt: "leaderboard-item-avatar", src: a }) : /* @__PURE__ */ r(f, { children: l(i || "") }),
16
- /* @__PURE__ */ e(p, { children: [
17
- /* @__PURE__ */ r(v, { children: i || "" }),
18
- o && /* @__PURE__ */ r(x, { name: "icon-star" })
7
+ name: t,
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" })
19
19
  ] })
20
20
  ] }),
21
- /* @__PURE__ */ r("div", { children: m(n) })
21
+ /* @__PURE__ */ r("div", { children: l(o) })
22
22
  ] });
23
23
  export {
24
24
  N as LeaderboardItem
@@ -1,32 +1,39 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { styled as l } from "@linaria/react";
3
- import d from "react-infinite-scroller";
2
+ import { styled as c } from "@linaria/react";
3
+ import { useCallback as f } from "react";
4
+ import m from "react-infinite-scroller";
4
5
  import { LeaderboardItem as p } from "./list-item/index.js";
5
- const c = /* @__PURE__ */ l("div")({
6
+ const u = /* @__PURE__ */ c("div")({
6
7
  name: "Container",
7
8
  class: "c16btbfp",
8
9
  propsAsIs: !1
9
- }), b = ({
10
- items: t,
10
+ }), S = ({
11
+ items: s,
11
12
  currentUserId: o,
12
- openItemDetail: a,
13
- fetchMore: s,
14
- scrollNode: n,
15
- hasMore: i
16
- }) => /* @__PURE__ */ e(d, {
17
- loadMore: s,
18
- initialLoad: !1,
19
- hasMore: i,
20
- useWindow: !1,
21
- getScrollParent: () => n.current,
22
- children: /* @__PURE__ */ e(c, {
23
- children: t.map((r) => /* @__PURE__ */ e(p, {
24
- ...r,
25
- openItemDetail: () => a(r.userId),
26
- isCurrentUser: !!o && o === r.userId
27
- }, r.userId))
28
- })
29
- });
13
+ openItemDetail: t,
14
+ fetchMore: n,
15
+ scrollNode: i,
16
+ hasMore: l
17
+ }) => {
18
+ const d = f((r) => {
19
+ const a = r.target.getAttribute("data-name");
20
+ a && t(a);
21
+ }, [t]);
22
+ return /* @__PURE__ */ e(m, {
23
+ loadMore: n,
24
+ initialLoad: !1,
25
+ hasMore: l,
26
+ useWindow: !1,
27
+ getScrollParent: () => i.current,
28
+ children: /* @__PURE__ */ e(u, {
29
+ onClick: d,
30
+ children: s.map((r) => /* @__PURE__ */ e(p, {
31
+ ...r,
32
+ isCurrentUser: !!o && o === r.userId
33
+ }, r.userId))
34
+ })
35
+ });
36
+ };
30
37
  export {
31
- b as LeaderboardStaticList
38
+ S as LeaderboardStaticList
32
39
  };
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { type PickHistory } from '@streamlayer/sdk-web-types';
3
3
  export declare const QuestionSkeleton: React.FC;
4
- export declare const Question: React.FC<{
5
- openQuestion?: (questionId: string) => void;
6
- } & PickHistory>;
4
+ export declare const Question: React.FC<PickHistory>;
@@ -1,49 +1,48 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as Q } from "@streamlayer/sdk-web-types";
3
- import { QuestionTypeData as p } from "../constants.js";
4
- import { Skeleton as l } from "../../skeleton/index.js";
5
- import { QuestionActionIcon as i, SkeletonContainer as I, SkeletonButton as S, QuestionItem as k, QuestionContent as f, QuestionCaption as A, QuestionTypeIcon as T, QuestionTypeLabel as L, QuestionBody as P, QuestionAction as w, PlayButton as x } from "./styles.js";
6
- const C = {
2
+ import { PickHistoryStatus as e, QuestionType as a, QuestionStatus as p } from "@streamlayer/sdk-web-types";
3
+ import { QuestionTypeData as h } from "../constants.js";
4
+ import { Skeleton as c } from "../../skeleton/index.js";
5
+ import { QuestionActionIcon as i, SkeletonContainer as y, SkeletonButton as I, QuestionItem as S, QuestionContent as f, QuestionCaption as k, QuestionTypeIcon as A, QuestionTypeLabel as T, QuestionBody as L, QuestionAction as P, PlayButton as w } from "./styles.js";
6
+ const x = {
7
7
  [e.LOST]: /* @__PURE__ */ t(i, { name: "incorrectVoted" }),
8
8
  [e.WON]: /* @__PURE__ */ t(i, { name: "icon-check" }),
9
9
  [e.UNSET]: /* @__PURE__ */ t(i, { name: "icon-arrow" }),
10
10
  [e.DNP]: /* @__PURE__ */ t(i, { name: "icon-arrow" })
11
- }, B = () => /* @__PURE__ */ n(I, { children: [
12
- /* @__PURE__ */ t(l, { loading: !0, style: { width: "35%" } }),
13
- /* @__PURE__ */ t(l, { loading: !0, style: { width: "70%" } }),
14
- /* @__PURE__ */ t(S, {})
15
- ] }), R = ({
11
+ }, B = () => /* @__PURE__ */ n(y, { children: [
12
+ /* @__PURE__ */ t(c, { loading: !0, style: { width: "35%" } }),
13
+ /* @__PURE__ */ t(c, { loading: !0, style: { width: "70%" } }),
14
+ /* @__PURE__ */ t(I, {})
15
+ ] }), C = ({
16
16
  questionId: s,
17
17
  questionType: o,
18
- questionStatus: u,
19
- subject: d,
20
- openForVoting: m,
21
- openQuestion: r,
22
- status: h
18
+ questionStatus: l,
19
+ subject: u,
20
+ openForVoting: d,
21
+ status: m
23
22
  }) => {
24
- const c = p[o], y = C[h];
25
- return c ? /* @__PURE__ */ n(k, { onClick: () => r == null ? void 0 : r(s), children: [
23
+ const r = h[o], Q = x[m];
24
+ return r ? /* @__PURE__ */ n(S, { "data-name": s, children: [
26
25
  /* @__PURE__ */ n(f, { children: [
27
- /* @__PURE__ */ n(A, { children: [
26
+ /* @__PURE__ */ n(k, { children: [
28
27
  /* @__PURE__ */ t(
29
- T,
28
+ A,
30
29
  {
31
30
  "data-type-trivia": o === a.TRIVIA,
32
31
  "data-type-poll": o === a.POLL,
33
- name: c.iconName
32
+ name: r.iconName
34
33
  }
35
34
  ),
36
- /* @__PURE__ */ n(L, { children: [
37
- c.label,
38
- o === a.TRIVIA && u === Q.RESOLVED && " • Expired"
35
+ /* @__PURE__ */ n(T, { children: [
36
+ r.label,
37
+ o === a.TRIVIA && l === p.RESOLVED && " • Expired"
39
38
  ] })
40
39
  ] }),
41
- /* @__PURE__ */ t(P, { children: d || "" })
40
+ /* @__PURE__ */ t(L, { children: u || "" })
42
41
  ] }),
43
- /* @__PURE__ */ t(w, { children: m ? /* @__PURE__ */ t(x, { children: "Play" }) : y })
42
+ /* @__PURE__ */ t(P, { children: d ? /* @__PURE__ */ t(w, { children: "Play" }) : Q })
44
43
  ] }) : null;
45
44
  };
46
45
  export {
47
- R as Question,
46
+ C as Question,
48
47
  B as QuestionSkeleton
49
48
  };
@@ -2,7 +2,6 @@
2
2
  import { InsightContentProps } from '../../../questions/insight';
3
3
  import { VideoPlayerProps } from '../../../video-player';
4
4
  type InsightProps = InsightContentProps & {
5
- openInsight?: (questionId: string) => void;
6
5
  controlVideo: VideoPlayerProps['controlVideo'];
7
6
  };
8
7
  export declare const Insight: React.FC<InsightProps>;
@@ -1,10 +1,10 @@
1
- import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
- import { InsightContent as c } from "../../../questions/insight/index.js";
3
- import { Container as f, ActionBtn as l } from "./styles.js";
4
- const j = ({ openInsight: r, questionId: t, ...m }) => /* @__PURE__ */ o(f, { onClick: () => r == null ? void 0 : r(t), children: [
5
- /* @__PURE__ */ i(c, { questionId: t, ...m }),
6
- r && /* @__PURE__ */ i(l, { children: "View Insight" })
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { InsightContent as o } from "../../../questions/insight/index.js";
3
+ import { Container as m, ActionBtn as a } from "./styles.js";
4
+ const c = ({ questionId: t, ...r }) => /* @__PURE__ */ i(m, { "data-name": t, children: [
5
+ /* @__PURE__ */ n(o, { questionId: t, ...r }),
6
+ /* @__PURE__ */ n(a, { "data-name": t, children: "View Insight" })
7
7
  ] });
8
8
  export {
9
- j as Insight
9
+ c as Insight
10
10
  };
@@ -1,47 +1,31 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { QuestionSkeleton as f, Question as c } from "../index.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { QuestionSkeleton as c, Question as f } from "../index.js";
3
3
  import { Insight as d } from "../insight/index.js";
4
4
  import { Twitter as h } from "../twitter/index.js";
5
5
  import { pauseAllVideos as g } from "../../../video-player/index.js";
6
- import { QuestionsContainer as b } from "./styles.js";
7
- const A = ({ questions: n, openQuestion: l, controlVideo: s }) => {
8
- const u = (t) => {
9
- g(), l(t, { openedFrom: "list" });
6
+ import { QuestionsContainer as m } from "./styles.js";
7
+ const k = ({ questions: n, openQuestion: b, controlVideo: u }) => {
8
+ const l = (t) => {
9
+ const e = t.target.getAttribute("data-name");
10
+ e && (g(), b(e, { openedFrom: "list" }));
10
11
  };
11
- return n ? /* @__PURE__ */ i(b, { children: n == null ? void 0 : n.map((t) => {
12
- var r, a, o;
13
- if (t.type === "question" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "question") {
14
- const e = t.attributes.attributes.value;
15
- return /* @__PURE__ */ i(c, { openQuestion: u, ...e }, e.questionId);
12
+ return n ? /* @__PURE__ */ r(m, { onClick: l, children: n == null ? void 0 : n.map((t) => {
13
+ var e, a, s;
14
+ if (t.type === "question" && ((e = t.attributes) == null ? void 0 : e.attributes.case) === "question") {
15
+ const i = t.attributes.attributes.value;
16
+ return /* @__PURE__ */ r(f, { ...i }, i.questionId);
16
17
  }
17
18
  if (t.type === "insight" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "insight") {
18
- const e = t.attributes.attributes.value;
19
- return /* @__PURE__ */ i(
20
- d,
21
- {
22
- openInsight: u,
23
- controlVideo: s,
24
- ...e
25
- },
26
- e.questionId
27
- );
19
+ const i = t.attributes.attributes.value;
20
+ return /* @__PURE__ */ r(d, { controlVideo: u, ...i }, i.questionId);
28
21
  }
29
- if (t.type === "tweet" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "tweet") {
30
- const e = t.attributes.attributes.value, m = t.attributes.id;
31
- return /* @__PURE__ */ i(
32
- h,
33
- {
34
- openTweet: u,
35
- controlVideo: s,
36
- ...e,
37
- tweetId: m
38
- },
39
- m
40
- );
22
+ if (t.type === "tweet" && ((s = t.attributes) == null ? void 0 : s.attributes.case) === "tweet") {
23
+ const i = t.attributes.attributes.value, o = t.attributes.id;
24
+ return /* @__PURE__ */ r(h, { controlVideo: u, ...i, tweetId: o }, o);
41
25
  }
42
26
  return null;
43
- }) }) : /* @__PURE__ */ i(b, { children: Array.from({ length: 5 }).map((t, r) => /* @__PURE__ */ i(f, {}, r)) });
27
+ }) }) : /* @__PURE__ */ r(m, { children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ r(c, {}, e)) });
44
28
  };
45
29
  export {
46
- A as QuestionList
30
+ k as QuestionList
47
31
  };
@@ -2,7 +2,6 @@
2
2
  import { type TwitterContentProps } from '../../../questions/twitter';
3
3
  import { VideoPlayerProps } from '../../../video-player';
4
4
  type TwitterProps = TwitterContentProps & {
5
- openTweet?: (questionId: string) => void;
6
5
  controlVideo: VideoPlayerProps['controlVideo'];
7
6
  };
8
7
  export declare const Twitter: React.FC<TwitterProps>;
@@ -1,11 +1,11 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { TwitterContent as c } from "../../../questions/twitter/index.js";
3
- import { Container as l, Quote as m, ActionButton as o } from "./styles.js";
4
- const u = ({ openTweet: t, ...i }) => /* @__PURE__ */ n(l, { onClick: () => t == null ? void 0 : t(i.tweetId), children: [
5
- i.title && /* @__PURE__ */ r(m, { children: i.title }),
6
- /* @__PURE__ */ r(c, { ...i }),
7
- t && /* @__PURE__ */ r(o, { children: "View Insight" })
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { TwitterContent as n } from "../../../questions/twitter/index.js";
3
+ import { Container as r, Quote as o, ActionButton as m } from "./styles.js";
4
+ const l = ({ ...t }) => /* @__PURE__ */ i(r, { "data-name": t.tweetId, children: [
5
+ t.title && /* @__PURE__ */ e(o, { children: t.title }),
6
+ /* @__PURE__ */ e(n, { ...t }),
7
+ /* @__PURE__ */ e(m, { "data-name": t.tweetId, children: "View Insight" })
8
8
  ] });
9
9
  export {
10
- u as Twitter
10
+ l as Twitter
11
11
  };
@@ -1,4 +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
- export declare const ActionButton: any;
3
+ export declare const ActionButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
4
4
  export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
@@ -1,20 +1,19 @@
1
- import { styled as o } from "@linaria/react";
2
- import { Button as s } from "../../../button/index.js";
3
- const a = /* @__PURE__ */ o("div")({
1
+ import { styled as s } from "@linaria/react";
2
+ const t = /* @__PURE__ */ s("div")({
4
3
  name: "Container",
5
4
  class: "cl56x6b",
6
5
  propsAsIs: !1
7
- }), t = () => s, c = /* @__PURE__ */ o(t())({
6
+ }), n = /* @__PURE__ */ s("button")({
8
7
  name: "ActionButton",
9
8
  class: "a11pzf92",
10
- propsAsIs: !0
11
- }), p = /* @__PURE__ */ o("blockquote")({
9
+ propsAsIs: !1
10
+ }), e = /* @__PURE__ */ s("blockquote")({
12
11
  name: "Quote",
13
12
  class: "q1hbaleq",
14
13
  propsAsIs: !1
15
14
  });
16
15
  export {
17
- c as ActionButton,
18
- a as Container,
19
- p as Quote
16
+ n as ActionButton,
17
+ t as Container,
18
+ e as Quote
20
19
  };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type AlertProps = {
3
+ icon: 'icon-check-circle';
4
+ title: string;
5
+ description: React.ReactElement | string;
6
+ };
7
+ export declare const Alert: React.FC<AlertProps>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { SvgIcon as t } from "../../../icons/index.js";
3
+ import { Container as m, Title as c, Description as l } from "./styles.js";
4
+ const f = ({ icon: o, title: e, description: i }) => /* @__PURE__ */ n(m, { children: [
5
+ /* @__PURE__ */ r(t, { name: o }),
6
+ /* @__PURE__ */ r(c, { children: e }),
7
+ /* @__PURE__ */ r(l, { children: i })
8
+ ] });
9
+ export {
10
+ f as Alert
11
+ };