@streamlayer/react-ui 0.93.0 → 0.94.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 (52) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/{useClipboardCopy-E5rEe6It.js → index-jRXrW6ie.js} +1513 -1537
  3. package/lib/ui/app/Features/Gamification/Friends.js +6 -5
  4. package/lib/ui/app/Features/Gamification/Leaderboard.js +4 -3
  5. package/lib/ui/app/Features/Gamification/Question.js +19 -21
  6. package/lib/ui/app/Features/Gamification/QuestionsList.js +1 -1
  7. package/lib/ui/app/Features/Gamification/Tabs.js +39 -40
  8. package/lib/ui/app/Features/Gamification/gamification-feature.js +12 -10
  9. package/lib/ui/app/Features/Gamification/index.js +73 -89
  10. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +2 -0
  11. package/lib/ui/app/Navigation/MastersNavigation/index.js +40 -34
  12. package/lib/ui/app/Notifications/Onboarding/index.d.ts +3 -2
  13. package/lib/ui/app/Notifications/Onboarding/index.js +96 -79
  14. package/lib/ui/app/Notifications/index.js +114 -112
  15. package/lib/ui/app/masters.js +35 -31
  16. package/lib/ui/app/useClipboardCopy.js +26 -5
  17. package/lib/ui/app/useMastersApp.js +42 -35
  18. package/lib/ui/app/useSdkResponsive.d.ts +1 -1
  19. package/lib/ui/app/useSdkResponsive.js +25 -25
  20. package/lib/ui/app/useSdkScroll.js +11 -10
  21. package/lib/ui/gamification/onboarding/index.d.ts +1 -1
  22. package/lib/ui/gamification/onboarding/index.js +11 -10
  23. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +14 -13
  24. package/lib/ui/gamification/question/insight/index.js +3 -4
  25. package/lib/ui/gamification/question/list/index.js +14 -14
  26. package/lib/ui/gamification/question/notification/index.js +3 -2
  27. package/lib/ui/gamification/question/notification/tweet/index.js +10 -7
  28. package/lib/ui/gamification/question/twitter/index.js +16 -33
  29. package/lib/ui/gamification/question/twitter/styles.d.ts +0 -1
  30. package/lib/ui/gamification/question/twitter/styles.js +7 -12
  31. package/lib/ui/gamification/vote/insight-details/index.js +5 -6
  32. package/lib/ui/gamification/vote/twitter-details/index.js +13 -29
  33. package/lib/ui/gamification/vote/twitter-details/styles.d.ts +0 -1
  34. package/lib/ui/gamification/vote/twitter-details/styles.js +3 -8
  35. package/lib/ui/modal/index.d.ts +9 -0
  36. package/lib/ui/modal/index.js +34 -0
  37. package/lib/ui/navigation/button/FeaturedGroups.d.ts +3 -1
  38. package/lib/ui/navigation/button/FeaturedGroups.js +11 -11
  39. package/lib/ui/questions/insight/index.d.ts +1 -2
  40. package/lib/ui/questions/insight/index.js +13 -29
  41. package/lib/ui/questions/insight/styles.d.ts +0 -1
  42. package/lib/ui/questions/insight/styles.js +9 -14
  43. package/lib/ui/questions/twitter/account/index.d.ts +2 -1
  44. package/lib/ui/questions/twitter/account/index.js +24 -18
  45. package/lib/ui/questions/twitter/account/styles.d.ts +1 -1
  46. package/lib/ui/questions/twitter/account/styles.js +2 -2
  47. package/lib/ui/questions/twitter/index.d.ts +2 -2
  48. package/lib/ui/questions/twitter/index.js +31 -9
  49. package/lib/ui/questions/twitter/styles.d.ts +1 -0
  50. package/lib/ui/questions/twitter/styles.js +8 -3
  51. package/lib/utils/common.js +22 -8
  52. package/package.json +14 -14
@@ -1,35 +1,36 @@
1
- import { useStore as w } from "@nanostores/react";
1
+ import { useStore as p } from "@nanostores/react";
2
2
  import S from "lodash.throttle";
3
- import { useRef as f, useState as h, useEffect as g } from "react";
3
+ import { useRef as f, useState as h, useEffect as b } from "react";
4
4
  import { BREAKPOINTS as m } from "../theme/constants.js";
5
- import { m as v } from "../../index-keh7OLCY.js";
5
+ import { m as g } from "../../index-keh7OLCY.js";
6
6
  import "../../index-uEuzH3jr.js";
7
7
  const D = (t, n) => {
8
8
  var r;
9
9
  (r = t.current) == null || r.scrollIntoView(n);
10
10
  }, I = (t, n) => {
11
11
  const r = f(null), l = f(0), [e] = h(
12
- v({
12
+ g({
13
13
  scrollPosition: 0,
14
+ tabsShown: !0,
14
15
  scrollDirection: "forward"
15
16
  })
16
- ), c = w(n);
17
- return g(() => {
17
+ ), c = p(n);
18
+ return b(() => {
18
19
  const s = window.innerWidth < m.xl ? window : r.current;
19
20
  if (!s)
20
21
  return () => {
21
22
  };
22
- const i = S((d) => {
23
+ const i = S((w) => {
23
24
  var a;
24
- const u = d.target;
25
+ const u = w.target;
25
26
  if (!u)
26
27
  return;
27
28
  let o = 0;
28
29
  c.screen.size < m.xl ? o = ((a = t.current) == null ? void 0 : a.getBoundingClientRect().y) || 0 : o = u.scrollTop;
29
- const p = l.current < o ? "forward" : "backward";
30
+ const d = l.current < o ? "forward" : "backward";
30
31
  l.current = o, e.set({
31
32
  scrollPosition: Math.round(o),
32
- scrollDirection: p,
33
+ scrollDirection: d,
33
34
  tabsShown: e.get().tabsShown
34
35
  });
35
36
  }, 200);
@@ -15,7 +15,7 @@ type OnboardingType = OnboardingInviteCardProps & {
15
15
  primaryColor?: string;
16
16
  inviteCardBtnLabel?: string;
17
17
  loading: boolean;
18
- renderToNode: AppNodeRef | HeaderNodeRef;
18
+ renderToNode?: AppNodeRef | HeaderNodeRef;
19
19
  onClose: () => void;
20
20
  };
21
21
  export declare const Onboarding: React.FC<OnboardingType>;
@@ -10,7 +10,8 @@ import { Container as q, OnboardingHeader as J, CloseBtn as K, IconClose as Q, C
10
10
  import "../../skeleton/styles.js";
11
11
  import "@linaria/react";
12
12
  import "./slides/onboarding-instructions/styles.js";
13
- import "../../../useClipboardCopy-E5rEe6It.js";
13
+ import "../../app/useClipboardCopy.js";
14
+ import "../../../index-jRXrW6ie.js";
14
15
  import "../../../index-uEuzH3jr.js";
15
16
  import "../copyNotification/index.js";
16
17
  import "../../icons/index.js";
@@ -42,14 +43,14 @@ const m = {
42
43
  renderToNode: I,
43
44
  onClose: N
44
45
  }) => {
45
- const [e, b] = c(0), [l, p] = c(!1), [n, o] = c(m);
46
+ const [o, p] = c(0), [l, b] = c(!1), [n, e] = c(m);
46
47
  j(() => {
47
- i != null && i.length ? o({ ...m, steps: !0 }) : r != null && r.length ? o({ ...m, rules: !0 }) : o({ ...m, inviteCard: !0 });
48
+ i != null && i.length ? e({ ...m, steps: !0 }) : r != null && r.length ? e({ ...m, rules: !0 }) : e({ ...m, inviteCard: !0 });
48
49
  }, []);
49
- const w = H(() => n.steps && e === 0 ? "Continue" : n.rules ? l || !a ? "Got it" : a : n.inviteCard ? h || "Play Now" : "Next", [n, e, l, a, h]), A = z(() => {
50
- i != null && i.length && e < i.length - 1 ? b((d) => ++d) : r != null && r.length && n.steps ? o({ ...m, rules: !0 }) : n.rules && o({ ...m, inviteCard: !0 });
51
- }, [e, i == null ? void 0 : i.length, r == null ? void 0 : r.length, n, b, o]), D = async () => {
52
- n.inviteCard ? await S.onboardingStatus.submitInplay() : n.rules && l ? p(!1) : A();
50
+ const w = H(() => n.steps && o === 0 ? "Continue" : n.rules ? l || !a ? "Got it" : a : n.inviteCard ? h || "Play Now" : "Next", [n, o, l, a, h]), A = z(() => {
51
+ i != null && i.length && o < i.length - 1 ? p((d) => ++d) : r != null && r.length && n.steps ? e({ ...m, rules: !0 }) : n.rules && e({ ...m, inviteCard: !0 });
52
+ }, [o, i == null ? void 0 : i.length, r == null ? void 0 : r.length, n, p, e]), D = async () => {
53
+ n.inviteCard ? await S.onboardingStatus.submitInplay() : n.rules && l ? b(!1) : A();
53
54
  };
54
55
  return /* @__PURE__ */ t(E, { children: ({ width: d, height: C }) => /* @__PURE__ */ O(q, { style: { width: d, height: C, maxHeight: C }, children: [
55
56
  /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(K, { onClick: N, children: /* @__PURE__ */ t(Q, { name: "icon-close-btn-gray" }) }) }),
@@ -59,8 +60,8 @@ const m = {
59
60
  {
60
61
  loading: u,
61
62
  stepsCount: i.length,
62
- currentStep: e,
63
- ...i[e]
63
+ currentStep: o,
64
+ ...i[o]
64
65
  }
65
66
  ),
66
67
  n.rules && !l && /* @__PURE__ */ t(
@@ -70,7 +71,7 @@ const m = {
70
71
  rulesTitle: y,
71
72
  termsText: f,
72
73
  primaryColor: g,
73
- openTerms: () => p(!0)
74
+ openTerms: () => b(!0)
74
75
  }
75
76
  ),
76
77
  n.rules && l && /* @__PURE__ */ t(R, { termsTitle: s, termsText: f }),
@@ -1,30 +1,31 @@
1
1
  import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
- import { u as I } from "../../../../../useClipboardCopy-E5rEe6It.js";
2
+ import { useClipboardCopy as I } from "../../../../app/useClipboardCopy.js";
3
3
  import { SvgIcon as f } from "../../../../icons/index.js";
4
- import { Container as g, IconContainer as k, InviteGameIcon as s, Content as b, Heading as y, Subtext as u, LinkContainer as L, LinkInfo as S, LinkTitle as x, LinkAddress as v, LinkIcon as j, SocialLinksContainer as A, SocialLink as G, SocialLinkLabel as H } from "./styles.js";
4
+ import { Container as g, IconContainer as k, InviteGameIcon as b, Content as s, Heading as y, Subtext as L, LinkContainer as S, LinkInfo as u, LinkTitle as x, LinkAddress as v, LinkIcon as j, SocialLinksContainer as A, SocialLink as G, SocialLinkLabel as H } from "./styles.js";
5
5
  import "react";
6
+ import "../../../../../index-jRXrW6ie.js";
6
7
  import "../../../../../index-uEuzH3jr.js";
7
8
  import "../../../copyNotification/index.js";
8
9
  import "../../../copyNotification/styles.js";
9
10
  import "@linaria/react";
10
- const E = ({
11
+ const F = ({
11
12
  renderToNode: t,
12
13
  inviteLink: r,
13
14
  socialLinks: i,
14
15
  inviteCardTitle: c,
15
16
  inviteCardSubtext: l,
16
- primaryColor: a,
17
- className: d
17
+ primaryColor: m,
18
+ className: a
18
19
  }) => {
19
- const [m, p] = I(t);
20
- return /* @__PURE__ */ o(g, { className: d, children: [
21
- /* @__PURE__ */ n(k, { style: { backgroundColor: a }, children: /* @__PURE__ */ n(s, { name: "invite-game-icon" }) }),
22
- /* @__PURE__ */ o(b, { children: [
20
+ const [d, p] = I(t);
21
+ return /* @__PURE__ */ o(g, { className: a, children: [
22
+ /* @__PURE__ */ n(k, { style: { backgroundColor: m }, children: /* @__PURE__ */ n(b, { name: "invite-game-icon" }) }),
23
+ /* @__PURE__ */ o(s, { children: [
23
24
  /* @__PURE__ */ n(y, { children: c || "" }),
24
- /* @__PURE__ */ n(u, { children: l || "" })
25
+ /* @__PURE__ */ n(L, { children: l || "" })
25
26
  ] }),
26
- r && /* @__PURE__ */ o(L, { onClick: () => m(r), children: [
27
- /* @__PURE__ */ o(S, { children: [
27
+ r && /* @__PURE__ */ o(S, { onClick: () => d(r), children: [
28
+ /* @__PURE__ */ o(u, { children: [
28
29
  /* @__PURE__ */ n(x, { children: "Invite link" }),
29
30
  /* @__PURE__ */ n(v, { children: r })
30
31
  ] }),
@@ -38,5 +39,5 @@ const E = ({
38
39
  ] });
39
40
  };
40
41
  export {
41
- E as OnboardingInviteCard
42
+ F as OnboardingInviteCard
42
43
  };
@@ -1,14 +1,13 @@
1
1
  import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
2
  import { InsightContent as n } from "../../../questions/insight/index.js";
3
3
  import { Container as p, ActionBtn as c } from "./styles.js";
4
- import "react";
5
4
  import "../../../video-player/index.js";
5
+ import "react";
6
6
  import "../../../icons/index.js";
7
7
  import "@linaria/react";
8
8
  import "../../../video-player/styles.js";
9
- import "../../../../utils/common.js";
10
9
  import "../../../questions/insight/styles.js";
11
- const d = ({
10
+ const a = ({
12
11
  openInsight: r,
13
12
  questionId: t,
14
13
  ...o
@@ -17,5 +16,5 @@ const d = ({
17
16
  r && /* @__PURE__ */ i(c, { onClick: () => r(t), children: "View Insight" })
18
17
  ] });
19
18
  export {
20
- d as Insight
19
+ a as Insight
21
20
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { Question as b } from "../index.js";
3
- import { Insight as c } from "../insight/index.js";
4
- import { Twitter as d } from "../twitter/index.js";
5
- import { QuestionsContainer as f } from "./styles.js";
2
+ import { Question as s } from "../index.js";
3
+ import { Insight as b } from "../insight/index.js";
4
+ import { Twitter as p } from "../twitter/index.js";
5
+ import { QuestionsContainer as c } from "./styles.js";
6
6
  import "@streamlayer/sdk-web-types";
7
7
  import "../../constants.js";
8
8
  import "../styles.js";
@@ -12,32 +12,32 @@ import "react";
12
12
  import "../../../questions/insight/index.js";
13
13
  import "../../../video-player/index.js";
14
14
  import "../../../video-player/styles.js";
15
- import "../../../../utils/common.js";
16
15
  import "../../../questions/insight/styles.js";
17
16
  import "../insight/styles.js";
18
17
  import "../../../questions/twitter/index.js";
19
18
  import "../../../questions/twitter/account/index.js";
19
+ import "../../../../utils/common.js";
20
20
  import "../../../questions/twitter/account/styles.js";
21
21
  import "../../../questions/twitter/styles.js";
22
22
  import "../twitter/styles.js";
23
23
  import "../../../button/index.js";
24
24
  import "../../../button/styles.js";
25
- const J = ({ questions: m, openQuestion: o }) => /* @__PURE__ */ r(f, { children: m == null ? void 0 : m.map((t) => {
26
- var a, u, n;
27
- if (t.type === "question" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "question") {
25
+ const H = ({ questions: e, openQuestion: m }) => /* @__PURE__ */ r(c, { children: e == null ? void 0 : e.map((t) => {
26
+ var o, u, n;
27
+ if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
28
28
  const i = t.attributes.attributes.value;
29
- return /* @__PURE__ */ r(b, { openQuestion: o, ...i }, i.questionId);
29
+ return /* @__PURE__ */ r(s, { openQuestion: m, ...i }, i.questionId);
30
30
  }
31
31
  if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
32
- const i = t.attributes.attributes.value, e = t.attributes.created;
33
- return /* @__PURE__ */ r(c, { openInsight: o, ...i, created: e }, i.questionId);
32
+ const i = t.attributes.attributes.value;
33
+ return /* @__PURE__ */ r(b, { openInsight: m, ...i }, i.questionId);
34
34
  }
35
35
  if (t.type === "tweet" && ((n = t.attributes) == null ? void 0 : n.attributes.case) === "tweet") {
36
- const i = t.attributes.attributes.value, e = t.attributes.id, s = t.attributes.created;
37
- return /* @__PURE__ */ r(d, { openTweet: o, ...i, tweetId: e, created: s }, e);
36
+ const i = t.attributes.attributes.value, a = t.attributes.id;
37
+ return /* @__PURE__ */ r(p, { openTweet: m, ...i, tweetId: a }, a);
38
38
  }
39
39
  return null;
40
40
  }) });
41
41
  export {
42
- J as QuestionList
42
+ H as QuestionList
43
43
  };
@@ -12,10 +12,11 @@ import "../../../video-player/styles.js";
12
12
  import "./insight/styles.js";
13
13
  import "../../../questions/twitter/index.js";
14
14
  import "../../../questions/twitter/account/index.js";
15
+ import "../../../../utils/common.js";
15
16
  import "../../../questions/twitter/account/styles.js";
16
17
  import "../../../questions/twitter/styles.js";
17
18
  import "./tweet/styles.js";
18
- const y = ({
19
+ const z = ({
19
20
  close: n,
20
21
  action: i,
21
22
  data: { questionType: r, question: m, insight: l, tweet: e }
@@ -46,5 +47,5 @@ const y = ({
46
47
  ] }) : null;
47
48
  };
48
49
  export {
49
- y as Notification
50
+ z as Notification
50
51
  };
@@ -1,17 +1,20 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
2
  import { TwitterContent as e } from "../../../../questions/twitter/index.js";
3
- import { Container as n, QuoteWrap as m, Quote as l, ActionBtn as p } from "./styles.js";
4
- import "../../../../questions/twitter/account/index.js";
3
+ import { Container as m, QuoteWrap as n, Quote as p, ActionBtn as l } from "./styles.js";
4
+ import "../../../../video-player/index.js";
5
+ import "react";
5
6
  import "../../../../icons/index.js";
6
7
  import "@linaria/react";
7
- import "react";
8
+ import "../../../../video-player/styles.js";
9
+ import "../../../../questions/twitter/account/index.js";
10
+ import "../../../../../utils/common.js";
8
11
  import "../../../../questions/twitter/account/styles.js";
9
12
  import "../../../../questions/twitter/styles.js";
10
- const j = ({ action: r, ...i }) => /* @__PURE__ */ o(n, { children: [
11
- i.title && /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(l, { children: i.title }) }),
13
+ const a = ({ action: r, ...i }) => /* @__PURE__ */ o(m, { children: [
14
+ i.title && /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(p, { children: i.title }) }),
12
15
  /* @__PURE__ */ t(e, { ...i }),
13
- r && /* @__PURE__ */ t(p, { onClick: r, children: "View Insight" })
16
+ r && /* @__PURE__ */ t(l, { onClick: r, children: "View Insight" })
14
17
  ] });
15
18
  export {
16
- j as Tweet
19
+ a as Tweet
17
20
  };
@@ -1,42 +1,25 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { useMemo as a } from "react";
3
- import { TwitterContent as l } from "../../../questions/twitter/index.js";
4
- import { isValidDate as f, formatDate as d, formatTime as c } from "../../../../utils/common.js";
5
- import { Container as u, DateTime as p, Quote as s, ActionButton as h } from "./styles.js";
6
- import "../../../questions/twitter/account/index.js";
1
+ import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
+ import { TwitterContent as m } from "../../../questions/twitter/index.js";
3
+ import { Container as e, Quote as n, ActionButton as p } from "./styles.js";
4
+ import "../../../video-player/index.js";
5
+ import "react";
7
6
  import "../../../icons/index.js";
8
7
  import "@linaria/react";
8
+ import "../../../video-player/styles.js";
9
+ import "../../../questions/twitter/account/index.js";
10
+ import "../../../../utils/common.js";
9
11
  import "../../../questions/twitter/account/styles.js";
10
12
  import "../../../questions/twitter/styles.js";
11
13
  import "../../../button/index.js";
12
14
  import "../../../button/styles.js";
13
- const M = ({
14
- openTweet: m,
15
- created: i,
15
+ const k = ({
16
+ openTweet: o,
16
17
  ...t
17
- }) => {
18
- const r = a(() => {
19
- if (i) {
20
- const e = new Date(i);
21
- if (f(e))
22
- return {
23
- date: d(e),
24
- time: c(e)
25
- };
26
- }
27
- return null;
28
- }, [i]);
29
- return /* @__PURE__ */ n(u, { children: [
30
- r && /* @__PURE__ */ n(p, { children: [
31
- r.date,
32
- " · ",
33
- r.time
34
- ] }),
35
- t.title && /* @__PURE__ */ o(s, { children: t.title }),
36
- /* @__PURE__ */ o(l, { ...t }),
37
- m && /* @__PURE__ */ o(h, { onClick: () => m(t.tweetId), children: "View Insight" })
38
- ] });
39
- };
18
+ }) => /* @__PURE__ */ r(e, { children: [
19
+ t.title && /* @__PURE__ */ i(n, { children: t.title }),
20
+ /* @__PURE__ */ i(m, { ...t }),
21
+ o && /* @__PURE__ */ i(p, { onClick: () => o(t.tweetId), children: "View Insight" })
22
+ ] });
40
23
  export {
41
- M as Twitter
24
+ k as Twitter
42
25
  };
@@ -1,5 +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 ActionButton: any;
4
- export declare const DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
4
  export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
@@ -1,27 +1,22 @@
1
- import { styled as s } from "@linaria/react";
2
- import { Button as o } from "../../../button/index.js";
1
+ import { styled as o } from "@linaria/react";
2
+ import { Button as t } from "../../../button/index.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../../button/styles.js";
5
- const r = /* @__PURE__ */ s("div")({
5
+ const a = /* @__PURE__ */ o("div")({
6
6
  name: "Container",
7
7
  class: "cl56x6b",
8
8
  propsAsIs: !1
9
- }), t = () => o, c = /* @__PURE__ */ s(t())({
9
+ }), s = () => t, c = /* @__PURE__ */ o(s())({
10
10
  name: "ActionButton",
11
11
  class: "a11pzf92",
12
12
  propsAsIs: !0
13
- }), m = /* @__PURE__ */ s("div")({
14
- name: "DateTime",
15
- class: "d1hbaleq",
16
- propsAsIs: !1
17
- }), i = /* @__PURE__ */ s("blockquote")({
13
+ }), i = /* @__PURE__ */ o("blockquote")({
18
14
  name: "Quote",
19
- class: "qvvgqjm",
15
+ class: "q1hbaleq",
20
16
  propsAsIs: !1
21
17
  });
22
18
  export {
23
19
  c as ActionButton,
24
- r as Container,
25
- m as DateTime,
20
+ a as Container,
26
21
  i as Quote
27
22
  };
@@ -1,20 +1,19 @@
1
1
  import { jsxs as o, jsx as m } from "react/jsx-runtime";
2
- import { SvgIcon as l } from "../../../icons/index.js";
2
+ import { SvgIcon as p } from "../../../icons/index.js";
3
3
  import { InsightContent as b } from "../../../questions/insight/index.js";
4
4
  import { Container as k, WebLinkBtn as c } from "./styles.js";
5
5
  import "@linaria/react";
6
6
  import "react";
7
7
  import "../../../video-player/index.js";
8
8
  import "../../../video-player/styles.js";
9
- import "../../../../utils/common.js";
10
9
  import "../../../questions/insight/styles.js";
11
- const C = ({ instantView: r, ...p }) => /* @__PURE__ */ o(k, { children: [
12
- /* @__PURE__ */ m(b, { instantView: r, ...p, isDetail: !0 }),
10
+ const j = ({ instantView: r, ...l }) => /* @__PURE__ */ o(k, { children: [
11
+ /* @__PURE__ */ m(b, { instantView: r, ...l, isDetail: !0 }),
13
12
  (r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", children: [
14
13
  r == null ? void 0 : r.webLink.label,
15
- /* @__PURE__ */ m(l, { name: "icon-external-link" })
14
+ /* @__PURE__ */ m(p, { name: "icon-external-link" })
16
15
  ] })
17
16
  ] });
18
17
  export {
19
- C as InsightDetails
18
+ j as InsightDetails
20
19
  };
@@ -1,35 +1,19 @@
1
- import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
- import { useMemo as n } from "react";
3
- import { TwitterContent as a } from "../../../questions/twitter/index.js";
4
- import { isValidDate as f, formatDate as l, formatTime as p } from "../../../../utils/common.js";
5
- import { Container as s, DateTime as d, Quote as u } from "./styles.js";
6
- import "../../../questions/twitter/account/index.js";
1
+ import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
+ import { TwitterContent as o } from "../../../questions/twitter/index.js";
3
+ import { Container as m, Quote as e } from "./styles.js";
4
+ import "../../../video-player/index.js";
5
+ import "react";
7
6
  import "../../../icons/index.js";
8
7
  import "@linaria/react";
8
+ import "../../../video-player/styles.js";
9
+ import "../../../questions/twitter/account/index.js";
10
+ import "../../../../utils/common.js";
9
11
  import "../../../questions/twitter/account/styles.js";
10
12
  import "../../../questions/twitter/styles.js";
11
- const V = ({ created: t, ...i }) => {
12
- const e = n(() => {
13
- if (t) {
14
- const r = new Date(t);
15
- if (f(r))
16
- return {
17
- date: l(r),
18
- time: p(r)
19
- };
20
- }
21
- return null;
22
- }, [t]);
23
- return /* @__PURE__ */ m(s, { children: [
24
- e && /* @__PURE__ */ m(d, { children: [
25
- e.date,
26
- " · ",
27
- e.time
28
- ] }),
29
- i.title && /* @__PURE__ */ o(u, { children: i.title }),
30
- /* @__PURE__ */ o(a, { ...i })
31
- ] });
32
- };
13
+ const w = (t) => /* @__PURE__ */ r(m, { children: [
14
+ t.title && /* @__PURE__ */ i(e, { children: t.title }),
15
+ /* @__PURE__ */ i(o, { ...t, isDetail: !0 })
16
+ ] });
33
17
  export {
34
- V as TwitterDetails
18
+ w as TwitterDetails
35
19
  };
@@ -1,4 +1,3 @@
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 DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
3
  export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
@@ -1,19 +1,14 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const o = /* @__PURE__ */ s("div")({
2
+ const e = /* @__PURE__ */ s("div")({
3
3
  name: "Container",
4
4
  class: "c1dcxmvf",
5
5
  propsAsIs: !1
6
- }), a = /* @__PURE__ */ s("div")({
7
- name: "DateTime",
8
- class: "db4q22c",
9
- propsAsIs: !1
10
6
  }), t = /* @__PURE__ */ s("blockquote")({
11
7
  name: "Quote",
12
- class: "q111mmic",
8
+ class: "qb4q22c",
13
9
  propsAsIs: !1
14
10
  });
15
11
  export {
16
- o as Container,
17
- a as DateTime,
12
+ e as Container,
18
13
  t as Quote
19
14
  };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type ModalProps = {
3
+ Modal: React.ReactNode;
4
+ container: React.MutableRefObject<HTMLDivElement | null>;
5
+ fixedView: boolean;
6
+ useContainer: boolean;
7
+ };
8
+ export declare const createModal: ({ Modal, container, fixedView, useContainer }: ModalProps) => import("react").ReactPortal | null;
9
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { cx as l } from "@linaria/core";
3
+ import { styled as m } from "@linaria/react";
4
+ import { r as n } from "../../index-jRXrW6ie.js";
5
+ import "../../index-uEuzH3jr.js";
6
+ import "react";
7
+ const c = /* @__PURE__ */ m("div")({
8
+ name: "StaticContainer",
9
+ class: "svm502q",
10
+ propsAsIs: !1
11
+ }), i = "fd3gza8", d = `
12
+ body {
13
+ overflow: hidden !important;
14
+ }
15
+ `, p = `
16
+ .sl-hide-on-modal {
17
+ display: none !important;
18
+ }
19
+ `, C = ({
20
+ Modal: o,
21
+ container: t,
22
+ fixedView: r,
23
+ useContainer: s
24
+ }) => t.current ? s ? n.createPortal(/* @__PURE__ */ a(c, {
25
+ className: l(r && i),
26
+ children: [o, r && /* @__PURE__ */ e("style", {
27
+ children: d
28
+ }), !r && /* @__PURE__ */ e("style", {
29
+ children: p
30
+ })]
31
+ }), t.current, "modal-node") : n.createPortal(o, t.current, "modal-node") : null;
32
+ export {
33
+ C as createModal
34
+ };
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from '.';
3
3
  export declare const FeaturedGroupsButtonId = "featuredGroups";
4
- export declare const FeaturedGroupsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'>>;
4
+ export declare const FeaturedGroupsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'> & {
5
+ labelFull: boolean;
6
+ }>;
@@ -1,26 +1,26 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { styled as e } from "@linaria/react";
3
- import { SvgIcon as n } from "../../icons/index.js";
4
- import { Button as s } from "./index.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { styled as r } from "@linaria/react";
3
+ import { SvgIcon as u } from "../../icons/index.js";
4
+ import { Button as n } from "./index.js";
5
5
  import "react";
6
6
  import "./styles.js";
7
- const u = () => n, c = /* @__PURE__ */ e(u())({
7
+ const s = () => u, a = /* @__PURE__ */ r(s())({
8
8
  name: "ButtonIcon",
9
9
  class: "b11des7c",
10
10
  propsAsIs: !0
11
- }), l = "featuredGroups", B = (t) => {
11
+ }), f = "featuredGroups", G = (t) => {
12
12
  var o;
13
- return /* @__PURE__ */ r(s, {
13
+ return /* @__PURE__ */ e(n, {
14
14
  ...t,
15
- label: "FG+",
15
+ label: t.labelFull ? "Featured Groups +" : "FG+",
16
16
  id: "featuredGroups",
17
- icon: /* @__PURE__ */ r(c, {
17
+ icon: /* @__PURE__ */ e(a, {
18
18
  name: "icon-btn-feature-groups",
19
19
  "data-selected": (o = t.active) == null ? void 0 : o.toString()
20
20
  })
21
21
  });
22
22
  };
23
23
  export {
24
- B as FeaturedGroupsButton,
25
- l as FeaturedGroupsButtonId
24
+ G as FeaturedGroupsButton,
25
+ f as FeaturedGroupsButtonId
26
26
  };
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { InsightHistory, FeedItem } from '@streamlayer/sdk-web-types';
2
+ import { InsightHistory } from '@streamlayer/sdk-web-types';
3
3
  export type InsightContentProps = InsightHistory & {
4
- created?: FeedItem['created'];
5
4
  isDetail?: boolean;
6
5
  };
7
6
  export declare const InsightContent: React.FC<InsightContentProps>;