@streamlayer/react-ui 0.98.1 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/style.css +1 -1
- package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
- package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
- package/lib/index.js +4 -8
- package/lib/ui/app/Features/Gamification/Friends.js +10 -23
- package/lib/ui/app/Features/Gamification/Leaderboard.js +30 -45
- package/lib/ui/app/Features/Gamification/Question.js +31 -63
- package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
- package/lib/ui/app/Features/Gamification/Tabs.js +25 -82
- package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
- package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
- package/lib/ui/app/Features/Gamification/index.js +52 -133
- package/lib/ui/app/Features/index.js +21 -109
- package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
- package/lib/ui/app/Navigation/index.js +9 -12
- package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
- package/lib/ui/app/Notifications/Onboarding/index.js +55 -82
- package/lib/ui/app/Notifications/index.js +96 -148
- package/lib/ui/app/Notifications/styles.js +10 -15
- package/lib/ui/app/Points/index.js +18 -26
- package/lib/ui/app/masters.js +60 -179
- package/lib/ui/app/useClipboardCopy.js +11 -15
- package/lib/ui/app/useMastersApp.js +34 -44
- package/lib/ui/app/useSdkResponsive.js +18 -19
- package/lib/ui/app/useSdkScroll.js +5 -6
- package/lib/ui/button/index.js +3 -4
- package/lib/ui/gamification/copyNotification/index.js +5 -7
- package/lib/ui/gamification/detail/header/index.js +15 -18
- package/lib/ui/gamification/detail/header/styles.js +12 -14
- package/lib/ui/gamification/detail/sponsor/index.js +2 -3
- package/lib/ui/gamification/insight/index.js +5 -6
- package/lib/ui/gamification/insight-list/index.js +3 -6
- package/lib/ui/gamification/invite-link/index.js +11 -17
- package/lib/ui/gamification/invite-link/styles.js +13 -15
- package/lib/ui/gamification/leaderboard/index.js +21 -28
- package/lib/ui/gamification/leaderboard/list-item/index.js +19 -22
- package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
- package/lib/ui/gamification/leaderboard/static.js +19 -23
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.js +51 -73
- package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
- package/lib/ui/gamification/onboarding/styles.js +14 -17
- package/lib/ui/gamification/points/index.js +9 -15
- package/lib/ui/gamification/points/styles.js +12 -14
- package/lib/ui/gamification/question/index.js +22 -26
- package/lib/ui/gamification/question/insight/index.js +7 -15
- package/lib/ui/gamification/question/list/index.js +33 -54
- package/lib/ui/gamification/question/notification/index.js +22 -35
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/pill/index.js +7 -9
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
- package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
- package/lib/ui/gamification/question/notification/styles.js +17 -19
- package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
- package/lib/ui/gamification/question/styles.js +32 -34
- package/lib/ui/gamification/question/twitter/index.js +8 -20
- package/lib/ui/gamification/question/twitter/styles.js +4 -6
- package/lib/ui/gamification/tabs/index.js +6 -7
- package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
- package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
- package/lib/ui/gamification/user-statistics/index.js +2 -6
- package/lib/ui/gamification/vote/expired-alert/index.js +8 -10
- package/lib/ui/gamification/vote/feedback/index.js +19 -23
- package/lib/ui/gamification/vote/feedback/styles.js +20 -23
- package/lib/ui/gamification/vote/index.js +77 -91
- package/lib/ui/gamification/vote/insight-details/index.js +9 -16
- package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
- package/lib/ui/gamification/vote/vote-option/index.js +21 -24
- package/lib/ui/gamification/vote/vote-option/styles.js +24 -26
- package/lib/ui/gamification/vote/win-bar/index.js +29 -37
- package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
- package/lib/ui/login/demo.d.ts +1 -0
- package/lib/ui/login/demo.js +5 -17
- package/lib/ui/login/index.js +29 -35
- package/lib/ui/modal/index.js +9 -10
- package/lib/ui/navigation/button/Channels.js +5 -8
- package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
- package/lib/ui/navigation/button/LeaderBoard.js +8 -11
- package/lib/ui/navigation/button/index.js +10 -11
- package/lib/ui/navigation/masters.js +2 -3
- package/lib/ui/questions/insight/index.js +14 -19
- package/lib/ui/questions/twitter/account/index.js +13 -15
- package/lib/ui/questions/twitter/account/styles.js +14 -16
- package/lib/ui/questions/twitter/index.js +31 -38
- package/lib/ui/skeleton/index.js +3 -4
- package/lib/ui/theme/index.js +3 -5
- package/lib/ui/video-player/index.js +44 -38
- package/lib/utils/createDemo.js +18 -28
- package/lib/utils/debug/components/copyLogs.js +2 -3
- package/lib/utils/debug/components/developer.js +20 -24
- package/lib/utils/debug/components/eventInput.js +9 -10
- package/lib/utils/debug/components/sdkKey.js +9 -10
- package/lib/utils/debug/index.js +17 -28
- package/lib/utils/debug/storage.js +32 -14
- package/lib/utils/decorators/container.js +5 -9
- package/lib/utils/storage.js +32 -14
- package/package.json +25 -25
- /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
- /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as o } from "../../../icons/index.js";
|
|
3
|
-
|
|
4
|
-
import "react";
|
|
5
|
-
const I = /* @__PURE__ */ s("button")({
|
|
3
|
+
const r = /* @__PURE__ */ s("button")({
|
|
6
4
|
name: "ButtonContainer",
|
|
7
5
|
class: "b1b6dl8t",
|
|
8
6
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
7
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
10
8
|
name: "ButtonPct",
|
|
11
9
|
class: "b4iik8i",
|
|
12
10
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
11
|
+
}), I = /* @__PURE__ */ s("span")({
|
|
14
12
|
name: "ButtonBody",
|
|
15
13
|
class: "b1gq1lnf",
|
|
16
14
|
propsAsIs: !1
|
|
17
|
-
}),
|
|
15
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
18
16
|
name: "IconContainer",
|
|
19
17
|
class: "i1j65z51",
|
|
20
18
|
propsAsIs: !1
|
|
21
|
-
}),
|
|
19
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
22
20
|
name: "IconWrap",
|
|
23
21
|
class: "i19tpfua",
|
|
24
22
|
propsAsIs: !1
|
|
@@ -26,47 +24,47 @@ const I = /* @__PURE__ */ s("button")({
|
|
|
26
24
|
name: "Icon",
|
|
27
25
|
class: "i1tubmma",
|
|
28
26
|
propsAsIs: !1
|
|
29
|
-
}), t = () => n,
|
|
27
|
+
}), t = () => n, f = /* @__PURE__ */ s(t())({
|
|
30
28
|
name: "IconDefault",
|
|
31
29
|
class: "i1grrgwj",
|
|
32
30
|
propsAsIs: !0
|
|
33
|
-
}), a = () => n,
|
|
31
|
+
}), a = () => n, u = /* @__PURE__ */ s(a())({
|
|
34
32
|
name: "IconCircle",
|
|
35
33
|
class: "ibemyq8",
|
|
36
34
|
propsAsIs: !0
|
|
37
|
-
}),
|
|
35
|
+
}), A = /* @__PURE__ */ s("span")({
|
|
38
36
|
name: "Title",
|
|
39
37
|
class: "t1dceht",
|
|
40
38
|
propsAsIs: !1
|
|
41
|
-
}),
|
|
39
|
+
}), d = /* @__PURE__ */ s("span")({
|
|
42
40
|
name: "Indicators",
|
|
43
41
|
class: "i116q4vq",
|
|
44
42
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
43
|
+
}), b = /* @__PURE__ */ s("span")({
|
|
46
44
|
name: "Pts",
|
|
47
45
|
class: "p17ajcu2",
|
|
48
46
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
47
|
+
}), B = /* @__PURE__ */ s("span")({
|
|
50
48
|
name: "Percentage",
|
|
51
49
|
class: "pu9kmlb",
|
|
52
50
|
propsAsIs: !1
|
|
53
|
-
}), c = () => o,
|
|
51
|
+
}), c = () => o, C = /* @__PURE__ */ s(c())({
|
|
54
52
|
name: "CheckIcon",
|
|
55
53
|
class: "c1j2j0s0",
|
|
56
54
|
propsAsIs: !0
|
|
57
55
|
});
|
|
58
56
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
I as ButtonBody,
|
|
58
|
+
r as ButtonContainer,
|
|
59
|
+
l as ButtonPct,
|
|
60
|
+
C as CheckIcon,
|
|
63
61
|
n as Icon,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
u as IconCircle,
|
|
63
|
+
i as IconContainer,
|
|
64
|
+
f as IconDefault,
|
|
65
|
+
m as IconWrap,
|
|
66
|
+
d as Indicators,
|
|
67
|
+
B as Percentage,
|
|
68
|
+
b as Pts,
|
|
69
|
+
A as Title
|
|
72
70
|
};
|
|
@@ -1,55 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { QuestionType as
|
|
3
|
-
import { AnimatedCounter as
|
|
4
|
-
import { Timer as
|
|
5
|
-
import { ShowInContainer as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import "../../../icons/index.js";
|
|
12
|
-
import "../../../show-in/index.js";
|
|
13
|
-
import "@linaria/core";
|
|
14
|
-
const F = ({
|
|
15
|
-
title: e,
|
|
16
|
-
points: o,
|
|
17
|
-
isPlayingTimer: m,
|
|
18
|
-
isTimer: a,
|
|
1
|
+
import { jsx as n, jsxs as e, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as i } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { AnimatedCounter as s } from "../../../animated-counter/index.js";
|
|
4
|
+
import { Timer as I } from "../../../timer/index.js";
|
|
5
|
+
import { ShowInContainer as f, WinBarContainer as p, Content as u, Title as O, WinIcon as T, Points as j, PointsCount as x, PointsUnits as y } from "./styles.js";
|
|
6
|
+
const b = ({
|
|
7
|
+
title: o,
|
|
8
|
+
points: t,
|
|
9
|
+
isPlayingTimer: a,
|
|
10
|
+
isTimer: m,
|
|
19
11
|
animatePoints: c,
|
|
20
|
-
questionType:
|
|
12
|
+
questionType: r,
|
|
21
13
|
timerDuration: d,
|
|
22
14
|
votedInCurrentRender: l,
|
|
23
|
-
percentsAnimated:
|
|
24
|
-
onTimerExpired:
|
|
25
|
-
}) => /* @__PURE__ */
|
|
26
|
-
|
|
15
|
+
percentsAnimated: h,
|
|
16
|
+
onTimerExpired: C
|
|
17
|
+
}) => /* @__PURE__ */ n(
|
|
18
|
+
f,
|
|
27
19
|
{
|
|
28
|
-
enabled:
|
|
29
|
-
animate:
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
|
|
20
|
+
enabled: r === i.PREDICTION && l,
|
|
21
|
+
animate: h,
|
|
22
|
+
children: /* @__PURE__ */ e(
|
|
23
|
+
p,
|
|
32
24
|
{
|
|
33
25
|
style: {
|
|
34
|
-
justifyContent:
|
|
26
|
+
justifyContent: r === i.PREDICTION ? "center" : "space-between"
|
|
35
27
|
},
|
|
36
28
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ e(u, { children: [
|
|
30
|
+
o && /* @__PURE__ */ n(O, { children: o }),
|
|
31
|
+
t !== void 0 && r !== i.POLL && /* @__PURE__ */ e(P, { children: [
|
|
32
|
+
/* @__PURE__ */ n(T, { name: "icon-trophy" }),
|
|
33
|
+
/* @__PURE__ */ e(j, { children: [
|
|
34
|
+
/* @__PURE__ */ n(x, { children: c ? /* @__PURE__ */ n(s, { value: t, delay: 0.3 }) : t }),
|
|
35
|
+
/* @__PURE__ */ n(y, { children: "PTS" })
|
|
44
36
|
] })
|
|
45
37
|
] })
|
|
46
38
|
] }),
|
|
47
|
-
|
|
39
|
+
m && r !== i.PREDICTION && /* @__PURE__ */ n(I, { isPlaying: a, onTimerExpired: C, duration: d })
|
|
48
40
|
]
|
|
49
41
|
}
|
|
50
42
|
)
|
|
51
43
|
}
|
|
52
44
|
);
|
|
53
45
|
export {
|
|
54
|
-
|
|
46
|
+
b as WinBar
|
|
55
47
|
};
|
|
@@ -1,49 +1,46 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as n } from "../../../icons/index.js";
|
|
3
3
|
import { GrowingShowIn as o } from "../../../show-in/index.js";
|
|
4
|
-
|
|
5
|
-
import "react";
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
const t = () => o, m = /* @__PURE__ */ s(t())({
|
|
4
|
+
const t = () => o, c = /* @__PURE__ */ s(t())({
|
|
8
5
|
name: "ShowInContainer",
|
|
9
6
|
class: "sie6cqo",
|
|
10
7
|
propsAsIs: !0
|
|
11
|
-
}),
|
|
8
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
12
9
|
name: "WinBarContainer",
|
|
13
10
|
class: "wgizw4u",
|
|
14
11
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
12
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
16
13
|
name: "Content",
|
|
17
14
|
class: "c1l3ucjp",
|
|
18
15
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
16
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
20
17
|
name: "Title",
|
|
21
18
|
class: "tx7j799",
|
|
22
19
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
20
|
+
}), a = () => n, I = /* @__PURE__ */ s(a())({
|
|
24
21
|
name: "WinIcon",
|
|
25
22
|
class: "w4lwuj0",
|
|
26
23
|
propsAsIs: !0
|
|
27
|
-
}),
|
|
24
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
28
25
|
name: "Points",
|
|
29
26
|
class: "po9i64o",
|
|
30
27
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
28
|
+
}), w = /* @__PURE__ */ s("span")({
|
|
32
29
|
name: "PointsCount",
|
|
33
30
|
class: "pe5g05h",
|
|
34
31
|
propsAsIs: !1
|
|
35
|
-
}),
|
|
32
|
+
}), A = /* @__PURE__ */ s("span")({
|
|
36
33
|
name: "PointsUnits",
|
|
37
34
|
class: "p1hdtpmb",
|
|
38
35
|
propsAsIs: !1
|
|
39
36
|
});
|
|
40
37
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
l as Content,
|
|
39
|
+
f as Points,
|
|
40
|
+
w as PointsCount,
|
|
41
|
+
A as PointsUnits,
|
|
42
|
+
c as ShowInContainer,
|
|
43
|
+
m as Title,
|
|
44
|
+
r as WinBarContainer,
|
|
45
|
+
I as WinIcon
|
|
49
46
|
};
|
package/lib/ui/login/demo.d.ts
CHANGED
package/lib/ui/login/demo.js
CHANGED
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useStore as
|
|
2
|
+
import { useStore as e } from "@nanostores/react";
|
|
3
3
|
import "@streamlayer/sdk-web-anonymous-auth";
|
|
4
|
-
import { Login as
|
|
5
|
-
|
|
6
|
-
import "react-auth-code-input";
|
|
7
|
-
import "react-phone-number-input";
|
|
8
|
-
import "../timer/index.js";
|
|
9
|
-
import "@linaria/react";
|
|
10
|
-
import "react-countdown-circle-timer";
|
|
11
|
-
import "../theme/constants.js";
|
|
12
|
-
import "../../utils/login.js";
|
|
13
|
-
import "@connectrpc/connect";
|
|
14
|
-
import "@connectrpc/connect-web";
|
|
15
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
16
|
-
import "./styles.js";
|
|
17
|
-
const j = ({ sdk: o }) => m(o.getUserStore()).data ? /* @__PURE__ */ r("button", { onClick: o.logout, children: "logout" }) : /* @__PURE__ */ r(n, { login: async (i) => {
|
|
4
|
+
import { Login as i } from "./index.js";
|
|
5
|
+
const c = ({ sdk: o }) => e(o.getUserStore()).data ? /* @__PURE__ */ r("button", { onClick: o.logout, children: "logout" }) : /* @__PURE__ */ r(i, { login: async (n) => {
|
|
18
6
|
try {
|
|
19
|
-
await o.authorizationBypass("streamlayer:streamlayer",
|
|
7
|
+
await o.authorizationBypass("streamlayer:streamlayer", n);
|
|
20
8
|
} catch (t) {
|
|
21
9
|
throw console.log("login err", t), t;
|
|
22
10
|
}
|
|
23
11
|
}, anonymousLogin: o.anonymousAuthorization, host: o.host });
|
|
24
12
|
export {
|
|
25
|
-
|
|
13
|
+
c as LoginComponent
|
|
26
14
|
};
|
package/lib/ui/login/index.js
CHANGED
|
@@ -1,60 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a } from "react";
|
|
3
3
|
import w from "react-auth-code-input";
|
|
4
4
|
import P, { isValidPhoneNumber as F, formatPhoneNumberIntl as v } from "react-phone-number-input";
|
|
5
5
|
import { Timer as D } from "../timer/index.js";
|
|
6
6
|
import { requestLoginCode as I, register as k, login as S } from "../../utils/login.js";
|
|
7
|
-
import { Panel as q, Form as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import "@connectrpc/connect";
|
|
12
|
-
import "@connectrpc/connect-web";
|
|
13
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
-
const O = ({ login: s, anonymousLogin: h, host: c }) => {
|
|
15
|
-
const [n, g] = a(""), [i, b] = a(""), [l, f] = a(""), y = async (o) => {
|
|
16
|
-
o.preventDefault();
|
|
7
|
+
import { Panel as q, Form as m, FormTitle as p, FormDescription as d, FormInputContainer as x, FormSubmit as s, Digits as E } from "./styles.js";
|
|
8
|
+
const z = ({ login: h, anonymousLogin: u, host: c }) => {
|
|
9
|
+
const [o, g] = a(""), [i, b] = a(""), [l, f] = a(""), y = async (t) => {
|
|
10
|
+
t.preventDefault();
|
|
17
11
|
try {
|
|
18
|
-
const
|
|
12
|
+
const n = o.replaceAll("+", "");
|
|
19
13
|
try {
|
|
20
|
-
await I(c,
|
|
14
|
+
await I(c, n);
|
|
21
15
|
} catch {
|
|
22
|
-
await k(c,
|
|
16
|
+
await k(c, n);
|
|
23
17
|
}
|
|
24
|
-
b(
|
|
25
|
-
} catch (
|
|
26
|
-
window.alert(
|
|
18
|
+
b(n);
|
|
19
|
+
} catch (n) {
|
|
20
|
+
window.alert(n);
|
|
27
21
|
}
|
|
28
|
-
}, C = async (
|
|
29
|
-
if (
|
|
22
|
+
}, C = async (t) => {
|
|
23
|
+
if (t.preventDefault(), i && l)
|
|
30
24
|
try {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
window.alert(
|
|
25
|
+
const n = await S(c, i, l);
|
|
26
|
+
n && h ? await h(n) : console.log("token", n);
|
|
27
|
+
} catch (n) {
|
|
28
|
+
window.alert(n);
|
|
35
29
|
}
|
|
36
30
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
!i && /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ r(q, { children: [
|
|
32
|
+
!i && /* @__PURE__ */ r("div", { children: [
|
|
33
|
+
/* @__PURE__ */ r(m, { onSubmit: y, children: [
|
|
40
34
|
/* @__PURE__ */ e(p, { children: "Enter your phone number" }),
|
|
41
35
|
/* @__PURE__ */ e(d, { children: "Enter your phone up for number to log in or sign an account." }),
|
|
42
|
-
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(P, { value:
|
|
43
|
-
/* @__PURE__ */ e(
|
|
36
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(P, { value: o, onChange: (t) => g(`${t}`) }) }),
|
|
37
|
+
/* @__PURE__ */ e(s, { disabled: !F(o), type: "submit", children: "request code" })
|
|
44
38
|
] }),
|
|
45
|
-
|
|
39
|
+
u && /* @__PURE__ */ e(s, { style: { display: "block", margin: "auto" }, onClick: u, children: "anonymous login" })
|
|
46
40
|
] }),
|
|
47
|
-
i && /* @__PURE__ */
|
|
41
|
+
i && /* @__PURE__ */ r(m, { onSubmit: C, children: [
|
|
48
42
|
/* @__PURE__ */ e(p, { children: "Enter Verification Code" }),
|
|
49
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ r(d, { children: [
|
|
50
44
|
"Please enter the verification code ",
|
|
51
45
|
/* @__PURE__ */ e("br", {}),
|
|
52
46
|
"sent to ",
|
|
53
|
-
/* @__PURE__ */ e("b", { children: v(
|
|
47
|
+
/* @__PURE__ */ e("b", { children: v(o) })
|
|
54
48
|
] }),
|
|
55
49
|
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(w, { autoFocus: !0, allowedCharacters: "numeric", length: 4, onChange: f }) }),
|
|
56
|
-
/* @__PURE__ */ e(
|
|
57
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ e(s, { disabled: l.length !== 4, type: "submit", children: "login" }),
|
|
51
|
+
/* @__PURE__ */ r(d, { children: [
|
|
58
52
|
"Didn't get 59 the code? ",
|
|
59
53
|
/* @__PURE__ */ e("br", {}),
|
|
60
54
|
"Resend Code in",
|
|
@@ -64,5 +58,5 @@ const O = ({ login: s, anonymousLogin: h, host: c }) => {
|
|
|
64
58
|
] });
|
|
65
59
|
};
|
|
66
60
|
export {
|
|
67
|
-
|
|
61
|
+
z as Login
|
|
68
62
|
};
|
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { styled as h } from "@linaria/react";
|
|
3
|
-
import { useState as w, useEffect as
|
|
4
|
-
import { r as
|
|
3
|
+
import { useState as w, useEffect as a } from "react";
|
|
4
|
+
import { r as f } from "../../index-Bicco-Aq.js";
|
|
5
5
|
import { BREAKPOINTS as n } from "../theme/constants.js";
|
|
6
|
-
import "../../index-uEuzH3jr.js";
|
|
7
6
|
const y = /* @__PURE__ */ h("div")({
|
|
8
7
|
name: "StaticContainer",
|
|
9
8
|
class: "svm502q",
|
|
@@ -18,17 +17,17 @@ const y = /* @__PURE__ */ h("div")({
|
|
|
18
17
|
.sl-pill-button {
|
|
19
18
|
display: none !important;
|
|
20
19
|
}
|
|
21
|
-
`,
|
|
20
|
+
`, W = ({
|
|
22
21
|
children: i,
|
|
23
22
|
container: t,
|
|
24
|
-
useContainer:
|
|
23
|
+
useContainer: m
|
|
25
24
|
}) => {
|
|
26
25
|
const [l] = w(() => {
|
|
27
26
|
var r;
|
|
28
27
|
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
29
28
|
return (((r = t.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - e < 0;
|
|
30
29
|
}), [o, s] = w(!1);
|
|
31
|
-
return
|
|
30
|
+
return a(() => {
|
|
32
31
|
if (!t.current || !l)
|
|
33
32
|
return s(!0), () => {
|
|
34
33
|
};
|
|
@@ -40,21 +39,21 @@ const y = /* @__PURE__ */ h("div")({
|
|
|
40
39
|
top: e
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
|
-
}, []),
|
|
42
|
+
}, []), a(() => {
|
|
44
43
|
if (o && t.current && l) {
|
|
45
44
|
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
46
45
|
window.scrollTo({
|
|
47
46
|
top: t.current.offsetTop - e
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
|
-
}, [o]), !t.current || !o ? null :
|
|
49
|
+
}, [o]), !t.current || !o ? null : m ? f.createPortal(/* @__PURE__ */ p(y, {
|
|
51
50
|
children: [i, /* @__PURE__ */ u("style", {
|
|
52
51
|
children: g
|
|
53
52
|
}), /* @__PURE__ */ u("style", {
|
|
54
53
|
children: O
|
|
55
54
|
})]
|
|
56
|
-
}), t.current, "modal-node") :
|
|
55
|
+
}), t.current, "modal-node") : f.createPortal(i, t.current, "modal-node");
|
|
57
56
|
};
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
W as ModalPortal
|
|
60
59
|
};
|
|
@@ -2,26 +2,23 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { styled as e } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as s } from "../../icons/index.js";
|
|
4
4
|
import { Button as c } from "./index.js";
|
|
5
|
-
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
|
-
const r = () => s, a = /* @__PURE__ */ e(r())({
|
|
5
|
+
const a = () => s, l = /* @__PURE__ */ e(a())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b1whzxvd",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), d = "channels", p = (n) => {
|
|
13
10
|
var t;
|
|
14
11
|
return /* @__PURE__ */ o(c, {
|
|
15
12
|
...n,
|
|
16
13
|
id: "channels",
|
|
17
14
|
label: "Channels",
|
|
18
|
-
icon: /* @__PURE__ */ o(
|
|
15
|
+
icon: /* @__PURE__ */ o(l, {
|
|
19
16
|
name: "icon-btn-channels",
|
|
20
17
|
"data-selected": (t = n.active) == null ? void 0 : t.toString()
|
|
21
18
|
})
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
p as ChannelsButton,
|
|
23
|
+
d as ChannelsButtonId
|
|
27
24
|
};
|
|
@@ -2,14 +2,11 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { styled as r } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as u } from "../../icons/index.js";
|
|
4
4
|
import { Button as n } from "./index.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
5
|
const s = () => u, a = /* @__PURE__ */ r(s())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b11des7c",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), i = "featuredGroups", l = (t) => {
|
|
13
10
|
var o;
|
|
14
11
|
return /* @__PURE__ */ e(n, {
|
|
15
12
|
...t,
|
|
@@ -22,6 +19,6 @@ const s = () => u, a = /* @__PURE__ */ r(s())({
|
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
l as FeaturedGroupsButton,
|
|
23
|
+
i as FeaturedGroupsButtonId
|
|
27
24
|
};
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as r } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as a } from "../../icons/index.js";
|
|
4
4
|
import { Button as d } from "./index.js";
|
|
5
|
-
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
|
-
const n = () => a, m = /* @__PURE__ */ e(n())({
|
|
5
|
+
const n = () => a, c = /* @__PURE__ */ r(n())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b180jd7l",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), B = "leaderboard", b = (o) => {
|
|
13
10
|
var t;
|
|
14
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ e(d, {
|
|
15
12
|
...o,
|
|
16
13
|
label: "Leader Board",
|
|
17
14
|
id: "leaderboard",
|
|
18
|
-
icon: /* @__PURE__ */
|
|
15
|
+
icon: /* @__PURE__ */ e(c, {
|
|
19
16
|
name: "icon-btn-leaderboard",
|
|
20
17
|
"data-selected": (t = o.active) == null ? void 0 : t.toString()
|
|
21
18
|
})
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
b as LeaderBoardButton,
|
|
23
|
+
B as LeaderBoardButtonId
|
|
27
24
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { SButton as s, SelectedButton as u, HoverIconState as
|
|
4
|
-
|
|
5
|
-
const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: t }) => /* @__PURE__ */ e(
|
|
1
|
+
import { jsx as t, jsxs as l, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { cx as m } from "@linaria/core";
|
|
3
|
+
import { SButton as s, SelectedButton as u, HoverIconState as h, HoverIconLeaderboardState as p, ButtonIcon as B, ButtonLabel as f } from "./styles.js";
|
|
4
|
+
const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: e }) => /* @__PURE__ */ t(
|
|
6
5
|
s,
|
|
7
6
|
{
|
|
8
7
|
onClick: a,
|
|
9
8
|
disabled: n,
|
|
10
|
-
className:
|
|
9
|
+
className: m(
|
|
11
10
|
r && u,
|
|
12
|
-
!r && (
|
|
13
|
-
!r &&
|
|
11
|
+
!r && (e === "channels" || e === "featuredGroups") && h,
|
|
12
|
+
!r && e === "leaderboard" && p
|
|
14
13
|
),
|
|
15
|
-
children: /* @__PURE__ */ l(
|
|
16
|
-
o && /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ l(d, { children: [
|
|
15
|
+
o && /* @__PURE__ */ t(B, { children: o }),
|
|
16
|
+
/* @__PURE__ */ t(f, { children: c })
|
|
18
17
|
] })
|
|
19
18
|
}
|
|
20
19
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { styled as a } from "@linaria/react";
|
|
2
2
|
import { Navigation as s } from "./index.js";
|
|
3
|
-
|
|
4
|
-
const p = /* @__PURE__ */ a("div")({
|
|
3
|
+
const n = /* @__PURE__ */ a("div")({
|
|
5
4
|
name: "Navigation",
|
|
6
5
|
class: "n19lpak2",
|
|
7
6
|
propsAsIs: !1
|
|
@@ -11,6 +10,6 @@ const p = /* @__PURE__ */ a("div")({
|
|
|
11
10
|
propsAsIs: !0
|
|
12
11
|
});
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
n as Navigation,
|
|
15
14
|
e as NavigationItems
|
|
16
15
|
};
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionImages as I } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { VideoPlayer as e } from "../../video-player/index.js";
|
|
4
4
|
import { Container as v, ImageContainer as C, Image as b, Content as x, Title as D, Description as T } from "./styles.js";
|
|
5
|
-
|
|
6
|
-
import "react";
|
|
7
|
-
import "../../icons/index.js";
|
|
8
|
-
import "@linaria/react";
|
|
9
|
-
import "../../video-player/styles.js";
|
|
10
|
-
const R = ({
|
|
5
|
+
const M = ({
|
|
11
6
|
instantView: r,
|
|
12
|
-
isDetail:
|
|
13
|
-
notification:
|
|
14
|
-
controlVideo:
|
|
7
|
+
isDetail: l,
|
|
8
|
+
notification: d,
|
|
9
|
+
controlVideo: p
|
|
15
10
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */
|
|
11
|
+
const m = r == null ? void 0 : r.heading, h = r == null ? void 0 : r.body, g = m || h, u = d == null ? void 0 : d.title, y = d == null ? void 0 : d.body;
|
|
12
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
13
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ o(
|
|
19
14
|
e,
|
|
20
15
|
{
|
|
21
16
|
source: r.video.url,
|
|
22
17
|
poster: r.video.thumbnailUrl,
|
|
23
|
-
controlVideo:
|
|
18
|
+
controlVideo: p
|
|
24
19
|
}
|
|
25
20
|
),
|
|
26
|
-
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
21
|
+
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ o(C, { "data-rounded": r.imageMode === I.ROUNDED, children: /* @__PURE__ */ o(b, { src: r == null ? void 0 : r.image }) }),
|
|
22
|
+
/* @__PURE__ */ c(x, { children: [
|
|
23
|
+
/* @__PURE__ */ o(D, { children: l && g ? m : u }),
|
|
24
|
+
/* @__PURE__ */ o(T, { children: l && g ? h : y })
|
|
30
25
|
] })
|
|
31
26
|
] });
|
|
32
27
|
};
|
|
33
28
|
export {
|
|
34
|
-
|
|
29
|
+
M as InsightContent
|
|
35
30
|
};
|