@streamlayer/react-ui 1.9.0 → 1.11.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/app/app/Advertisement/index.d.ts +1 -0
- package/lib/app/app/Advertisement/index.js +78 -67
- package/lib/app/app/Features/Gamification/Question.d.ts +1 -0
- package/lib/app/app/Features/Gamification/Question.js +43 -41
- package/lib/app/app/Features/Gamification/Tabs.js +22 -21
- package/lib/app/app/Features/Gamification/index.js +66 -62
- package/lib/app/app/Insight/index.d.ts +2 -0
- package/lib/app/app/Insight/index.js +28 -24
- package/lib/app/app/Navigation/index.d.ts +4 -0
- package/lib/app/app/Navigation/index.js +88 -48
- package/lib/app/app/Notifications/index.js +125 -113
- package/lib/app/app/Points/index.js +16 -16
- package/lib/app/app/index.d.ts +1 -0
- package/lib/app/app/index.js +84 -83
- package/lib/app/app/story/index.js +27 -24
- package/lib/app/app/story/insight/index.d.ts +1 -0
- package/lib/app/app/story/insight/index.js +29 -26
- package/lib/app/app/story/insight/video.d.ts +1 -0
- package/lib/app/app/story/insight/video.js +13 -13
- package/lib/app/app/story/promotion/content.d.ts +3 -1
- package/lib/app/app/story/promotion/content.js +13 -10
- package/lib/app/app/story/promotion/index.d.ts +1 -0
- package/lib/app/app/story/promotion/index.js +34 -30
- package/lib/app/app/story/promotion/video.d.ts +1 -0
- package/lib/app/app/story/promotion/video.js +34 -31
- package/lib/app/app/styles.js +44 -0
- package/lib/app/app/useApp.d.ts +2 -14
- package/lib/app/app/useApp.js +14 -43
- package/lib/app/app/useAppContext.d.ts +2 -0
- package/lib/app/app/useAppContext.js +6 -5
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/Tabs.js +2 -2
- package/lib/app/masters/Features/Gamification/index.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/index.js +1 -1
- package/lib/app/masters/Features/index.d.ts +2 -2
- package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +1 -1
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +1 -1
- package/lib/app/masters/Notifications/Onboarding/index.js +4 -4
- package/lib/app/masters/Notifications/index.d.ts +2 -2
- package/lib/app/masters/Notifications/index.js +1 -1
- package/lib/app/masters/masters.js +23 -23
- package/lib/app/masters/styles.d.ts +20 -0
- package/lib/app/{styles.js → masters/styles.js} +15 -15
- package/lib/app/masters/useSdkResponsive.d.ts +15 -0
- package/lib/app/masters/useSdkResponsive.js +45 -0
- package/lib/app/masters/useSdkScroll.d.ts +12 -0
- package/lib/app/masters/useSdkScroll.js +50 -0
- package/lib/app/useSdkResponsive.d.ts +1 -0
- package/lib/app/useSdkResponsive.js +27 -29
- package/lib/app/useSdkScroll.js +25 -24
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/banner/index.js +14 -11
- package/lib/ui/advertisement/index.d.ts +3 -0
- package/lib/ui/advertisement/index.js +31 -10
- package/lib/ui/advertisement/notification/index.d.ts +1 -0
- package/lib/ui/advertisement/notification/index.js +30 -27
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +9 -0
- package/lib/ui/advertisement/notification/lower-third/index.js +37 -0
- package/lib/ui/advertisement/notification/lower-third/styles.d.ts +16 -0
- package/lib/ui/advertisement/notification/lower-third/styles.js +64 -0
- package/lib/ui/advertisement/overlay/index.d.ts +2 -0
- package/lib/ui/advertisement/overlay/index.js +58 -43
- package/lib/ui/advertisement/overlay/styles.d.ts +0 -2
- package/lib/ui/advertisement/overlay/styles.js +41 -52
- package/lib/ui/close-btn/index.d.ts +7 -0
- package/lib/ui/close-btn/index.js +47 -0
- package/lib/ui/gamification/detail/header/index.d.ts +2 -1
- package/lib/ui/gamification/detail/header/index.js +16 -15
- package/lib/ui/gamification/vote/styles.js +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/index.d.ts +5 -3
- package/lib/ui/navigation/index.js +11 -12
- package/lib/ui/navigation/masters.js +1 -1
- package/lib/ui/navigation/styles.d.ts +5 -0
- package/lib/ui/navigation/styles.js +16 -0
- package/lib/ui/questions/insight/index.js +21 -20
- package/lib/ui/theme/masters-theme.js +36 -13
- package/lib/ui/theme/theme.js +25 -26
- package/lib/ui/timer/index.d.ts +3 -1
- package/lib/ui/timer/index.js +54 -32
- package/lib/ui/video-player/index.d.ts +2 -0
- package/lib/ui/video-player/index.js +62 -51
- package/lib/ui/video-player/styles.d.ts +1 -0
- package/lib/ui/video-player/styles.js +7 -6
- package/package.json +15 -15
- /package/lib/app/{styles.d.ts → app/styles.d.ts} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { useState as p, useEffect as f, useCallback as l } from "react";
|
|
4
|
+
import { CloseTimerAuto as a } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { SvgIcon as I } from "../icons/index.js";
|
|
6
|
+
import { SimpleTimer as u } from "../timer/index.js";
|
|
7
|
+
const v = /* @__PURE__ */ s("div")({
|
|
8
|
+
name: "CloseIconWrap",
|
|
9
|
+
class: "c3v6bv6",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), T = /* @__PURE__ */ s("div")({
|
|
12
|
+
name: "TimerWrap",
|
|
13
|
+
class: "teuhmro",
|
|
14
|
+
propsAsIs: !1
|
|
15
|
+
}), g = () => I, x = /* @__PURE__ */ s(g())({
|
|
16
|
+
name: "Icon",
|
|
17
|
+
class: "i17rfxv5",
|
|
18
|
+
propsAsIs: !0
|
|
19
|
+
}), S = ({
|
|
20
|
+
close: r,
|
|
21
|
+
className: t,
|
|
22
|
+
duration: o = 0,
|
|
23
|
+
autoClose: m
|
|
24
|
+
}) => {
|
|
25
|
+
const [c, n] = p(o === 0);
|
|
26
|
+
f(() => {
|
|
27
|
+
n(!o);
|
|
28
|
+
}, [o]);
|
|
29
|
+
const i = l(() => {
|
|
30
|
+
m === a.ENABLED ? r == null || r() : n(!0);
|
|
31
|
+
}, [m, r]);
|
|
32
|
+
return c ? /* @__PURE__ */ e(v, {
|
|
33
|
+
onClick: r,
|
|
34
|
+
className: t,
|
|
35
|
+
children: /* @__PURE__ */ e(x, {
|
|
36
|
+
name: "icon-cross"
|
|
37
|
+
})
|
|
38
|
+
}) : /* @__PURE__ */ e(T, {
|
|
39
|
+
children: /* @__PURE__ */ e(u, {
|
|
40
|
+
duration: o,
|
|
41
|
+
onTimerExpired: i
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
S as CloseButton
|
|
47
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { QuestionType } from '@streamlayer/sdk-web-types';
|
|
1
|
+
import { CloseTimer, QuestionType } from '@streamlayer/sdk-web-types';
|
|
2
2
|
interface VoteHeaderProps {
|
|
3
3
|
type?: QuestionType;
|
|
4
4
|
close: () => void;
|
|
5
5
|
label?: string;
|
|
6
|
+
closeTimer?: CloseTimer;
|
|
6
7
|
}
|
|
7
8
|
export declare const VoteHeader: React.FC<VoteHeaderProps>;
|
|
8
9
|
export {};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { QuestionType as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as e } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { CloseButton as c } from "../../../close-btn/index.js";
|
|
4
|
+
import { QuestionTypeData as p } from "../../constants.js";
|
|
5
|
+
import { Container as s, QuestionTypeWrap as l, QuestionTypeIcon as m, QuestionTypeTitle as u, CloseIconWrap as C, CloseIcon as f } from "./styles.js";
|
|
6
|
+
const b = ({ type: r, closeTimer: n, close: i, label: d }) => {
|
|
7
|
+
const o = r ? p[r] : { label: d, iconName: void 0 };
|
|
8
|
+
return /* @__PURE__ */ a(s, { children: [
|
|
9
|
+
/* @__PURE__ */ a(l, { children: [
|
|
10
|
+
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ t(
|
|
11
|
+
m,
|
|
11
12
|
{
|
|
12
|
-
"data-type-trivia":
|
|
13
|
-
"data-type-poll":
|
|
13
|
+
"data-type-trivia": r === e.TRIVIA,
|
|
14
|
+
"data-type-poll": r === e.POLL,
|
|
14
15
|
name: o.iconName
|
|
15
16
|
}
|
|
16
17
|
),
|
|
17
|
-
(o == null ? void 0 : o.label) && /* @__PURE__ */
|
|
18
|
+
(o == null ? void 0 : o.label) && /* @__PURE__ */ t(u, { children: o.label })
|
|
18
19
|
] }),
|
|
19
|
-
/* @__PURE__ */ n(
|
|
20
|
+
n != null && n.seconds ? /* @__PURE__ */ t(c, { close: i, autoClose: n.auto, duration: n.seconds }) : /* @__PURE__ */ t(C, { onClick: i, children: /* @__PURE__ */ t(f, { name: "icon-cross" }) })
|
|
20
21
|
] });
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
b as VoteHeader
|
|
24
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
import { SDKScrollContainer as o } from "../../../app/styles.js";
|
|
2
|
+
import { SDKScrollContainer as o } from "../../../app/app/styles.js";
|
|
3
3
|
import { ShowIn as n } from "../../show-in/index.js";
|
|
4
4
|
const l = /* @__PURE__ */ s("div")({
|
|
5
5
|
name: "Container",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
export declare const Navigation: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const NavigationItems: {
|
|
3
|
+
__wyw_meta: unknown;
|
|
4
|
+
} & import('react').FC<{
|
|
5
|
+
children: React.ReactElement<import('./button').ButtonProps>[];
|
|
4
6
|
className?: string;
|
|
5
7
|
}>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const n = /* @__PURE__ */
|
|
4
|
-
name: "
|
|
5
|
-
class: "
|
|
1
|
+
import { styled as a } from "@linaria/react";
|
|
2
|
+
import { Navigation as s } from "./styles.js";
|
|
3
|
+
const n = /* @__PURE__ */ a("div")({
|
|
4
|
+
name: "Navigation",
|
|
5
|
+
class: "n6tbwuy",
|
|
6
6
|
propsAsIs: !1
|
|
7
|
-
}),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: s,
|
|
12
|
-
children: t
|
|
7
|
+
}), t = () => s, e = /* @__PURE__ */ a(t())({
|
|
8
|
+
name: "NavigationItems",
|
|
9
|
+
class: "n1up4z7v",
|
|
10
|
+
propsAsIs: !0
|
|
13
11
|
});
|
|
14
12
|
export {
|
|
15
|
-
|
|
13
|
+
n as Navigation,
|
|
14
|
+
e as NavigationItems
|
|
16
15
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { styled as r } from "@linaria/react";
|
|
3
|
+
const n = /* @__PURE__ */ r("div")({
|
|
4
|
+
name: "Buttons",
|
|
5
|
+
class: "b5o8qbl",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), i = ({
|
|
8
|
+
children: o,
|
|
9
|
+
className: s
|
|
10
|
+
}) => /* @__PURE__ */ t(n, {
|
|
11
|
+
className: s,
|
|
12
|
+
children: o
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
i as Navigation
|
|
16
|
+
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { QuestionImages as I } from "@streamlayer/sdk-web-types";
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { Container as
|
|
5
|
-
const
|
|
6
|
-
instantView:
|
|
1
|
+
import { jsxs as g, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { AutoPlayVideo as e, QuestionImages as I } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { VideoPlayer as v } from "../../video-player/index.js";
|
|
4
|
+
import { Container as C, ImageContainer as D, Image as P, Content as b, Title as x, Description as B } from "./styles.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
instantView: o,
|
|
7
7
|
isDetail: l,
|
|
8
|
-
notification:
|
|
9
|
-
controlVideo:
|
|
8
|
+
notification: r,
|
|
9
|
+
controlVideo: y
|
|
10
10
|
}) => {
|
|
11
|
-
const m =
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
(
|
|
14
|
-
|
|
11
|
+
const m = o == null ? void 0 : o.heading, h = o == null ? void 0 : o.body, u = m || h, c = r == null ? void 0 : r.title, p = r == null ? void 0 : r.body;
|
|
12
|
+
return /* @__PURE__ */ g(C, { children: [
|
|
13
|
+
(o == null ? void 0 : o.video) && /* @__PURE__ */ d(
|
|
14
|
+
v,
|
|
15
15
|
{
|
|
16
|
-
source:
|
|
17
|
-
poster:
|
|
18
|
-
controlVideo:
|
|
16
|
+
source: o.video.url,
|
|
17
|
+
poster: o.video.thumbnailUrl,
|
|
18
|
+
controlVideo: y,
|
|
19
|
+
autoPlay: o.autoPlayVideo === e.ENABLED
|
|
19
20
|
}
|
|
20
21
|
),
|
|
21
|
-
(
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
22
|
+
(o == null ? void 0 : o.image) && !(o != null && o.video) && /* @__PURE__ */ d(D, { "data-rounded": o.imageMode === I.ROUNDED, children: /* @__PURE__ */ d(P, { src: o == null ? void 0 : o.image }) }),
|
|
23
|
+
/* @__PURE__ */ g(b, { children: [
|
|
24
|
+
/* @__PURE__ */ d(x, { children: l && u ? m : c }),
|
|
25
|
+
/* @__PURE__ */ d(B, { children: l && u ? h : p })
|
|
25
26
|
] })
|
|
26
27
|
] });
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
N as InsightContent
|
|
30
31
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { breakpoints as
|
|
2
|
-
|
|
1
|
+
import { breakpoints as i } from "./breakpoints.js";
|
|
2
|
+
import { FONT as t } from "./constants.js";
|
|
3
|
+
const E = {
|
|
3
4
|
BG_TRANSPARENT: "rgba(0,0,0, .8)",
|
|
4
5
|
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
5
6
|
WHITE: "#FFFFFF",
|
|
@@ -13,6 +14,7 @@ const a = {
|
|
|
13
14
|
UNSUCCESS: "#DF2F3B",
|
|
14
15
|
SECONDARY_RED1: "#DF2F3B",
|
|
15
16
|
NEUTRALS_WHITE: "#FFFFFF",
|
|
17
|
+
NEUTRALS_WHITE1: "#FFFFFF",
|
|
16
18
|
NEUTRALS_GRAY1: "#F7F7F7",
|
|
17
19
|
NEUTRALS_GRAY2: "#F2F2F1",
|
|
18
20
|
NEUTRALS_GRAY3: "#E8E8E8",
|
|
@@ -22,20 +24,29 @@ const a = {
|
|
|
22
24
|
NEUTRALS_GRAY7: "#6B6F73",
|
|
23
25
|
NEUTRALS_GRAY9: "#25282A"
|
|
24
26
|
}, e = {
|
|
27
|
+
...t,
|
|
25
28
|
REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
|
|
26
29
|
SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
|
|
27
30
|
COLOR: "#fff",
|
|
28
31
|
WEIGHT_DEFAULT: "500"
|
|
29
|
-
},
|
|
30
|
-
${
|
|
31
|
-
--color-${
|
|
32
|
-
`, ""),
|
|
33
|
-
${
|
|
32
|
+
}, R = Object.entries(E).reduce((n, [a, o]) => `
|
|
33
|
+
${n}
|
|
34
|
+
--color-${a.toLowerCase().replaceAll("_", "-")}: ${o};
|
|
35
|
+
`, ""), s = `
|
|
36
|
+
${R}
|
|
34
37
|
--font-family: ${e.REGULAR};
|
|
35
38
|
--font-regular: ${e.REGULAR};
|
|
36
39
|
--font-color: ${e.COLOR};
|
|
37
40
|
--font-serif: ${e.SERIF};
|
|
38
41
|
--font-weight-default: ${e.WEIGHT_DEFAULT};
|
|
42
|
+
--font-weight-default1: ${e.WEIGHT_DEFAULT1};
|
|
43
|
+
--font-weight-default2: ${e.WEIGHT_DEFAULT2};
|
|
44
|
+
--font-weight-default3: ${e.WEIGHT_DEFAULT3};
|
|
45
|
+
--font-size-default: ${t.SIZE_DEFAULT};
|
|
46
|
+
--font-size-secondary: ${t.SIZE_DEFAULT1};
|
|
47
|
+
--font-size-small: ${t.SIZE_DEFAULT2};
|
|
48
|
+
--line-height-default: ${t.LINE_HEIGHT};
|
|
49
|
+
--margin-title-default: ${t.MARGIN_TITLE_DEFAULT};
|
|
39
50
|
|
|
40
51
|
--header-offset: 0px;
|
|
41
52
|
--header-height: 68px;
|
|
@@ -47,18 +58,30 @@ const a = {
|
|
|
47
58
|
--pill-offset: 0px;
|
|
48
59
|
--max-width: 600px;
|
|
49
60
|
--max-notifications-width: 400px;
|
|
61
|
+
--header-padding: 12px 12px 12px 16px;
|
|
62
|
+
--margin-web-link-btn: 0px;
|
|
63
|
+
--padding-web-link-btn: 11px 16px;
|
|
64
|
+
--insight-content-padding: 0px;
|
|
65
|
+
--close-icon-size: 12px;
|
|
66
|
+
--close-icon-stroke-width: 1.5;
|
|
67
|
+
--padding-title-default: 0px;
|
|
68
|
+
--insight-image-display: inline;
|
|
69
|
+
--web-link-align-items: center;
|
|
70
|
+
--web-link-column-gap: 10px;
|
|
50
71
|
|
|
51
|
-
|
|
72
|
+
--insight-image-ratio: 16/9;
|
|
73
|
+
|
|
74
|
+
${i.down("xl")`
|
|
52
75
|
--header-offset: 56px;
|
|
53
76
|
--watch-live-header: 46px;
|
|
54
77
|
`}
|
|
55
78
|
|
|
56
|
-
${
|
|
79
|
+
${i.intermediate("xl", "lg")`
|
|
57
80
|
--header-offset: 76px;
|
|
58
81
|
`}
|
|
59
|
-
`,
|
|
82
|
+
`, r = "m1ojpy2l";
|
|
60
83
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
84
|
+
E as MASTERS_COLORS,
|
|
85
|
+
r as mastersTheme,
|
|
86
|
+
s as mastersThemeStr
|
|
64
87
|
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { breakpoints as
|
|
1
|
+
import { jsx as i, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { breakpoints as n } from "./breakpoints.js";
|
|
3
3
|
import { colors as p, colorsAdvertisement as s, FONT as e } from "./constants.js";
|
|
4
4
|
const l = `
|
|
5
5
|
${p}
|
|
@@ -13,27 +13,20 @@ const l = `
|
|
|
13
13
|
--font-weight-default2: ${e.WEIGHT_DEFAULT2};
|
|
14
14
|
--font-weight-default3: ${e.WEIGHT_DEFAULT3};
|
|
15
15
|
--font-size-default: ${e.SIZE_DEFAULT};
|
|
16
|
-
--font-size-
|
|
17
|
-
--font-size-
|
|
16
|
+
--font-size-secondary: ${e.SIZE_DEFAULT1};
|
|
17
|
+
--font-size-small: ${e.SIZE_DEFAULT2};
|
|
18
18
|
--line-height-default: ${e.LINE_HEIGHT};
|
|
19
19
|
--margin-title-default: ${e.MARGIN_TITLE_DEFAULT};
|
|
20
20
|
|
|
21
21
|
--header-offset: 0px;
|
|
22
22
|
--header-height: 68px;
|
|
23
|
-
--watch-live-header: 0px;
|
|
24
23
|
--animation-duration: 0.5s;
|
|
25
|
-
--promo-animation-duration: 0.5s;
|
|
26
|
-
--promo-animation-function: ease-in;
|
|
27
24
|
--animation-function: ease;
|
|
28
25
|
--container-padding: 16px;
|
|
29
26
|
--border-radius: 8px;
|
|
30
27
|
--pill-offset: 0px;
|
|
31
28
|
--max-width: 600px;
|
|
32
29
|
--max-notifications-width: 400px;
|
|
33
|
-
--promo-header-line-height: 18.5px;
|
|
34
|
-
--row-gap-default: 12px;
|
|
35
|
-
--row-gap-default1: 12px;
|
|
36
|
-
--row-gap-default2: 16px;
|
|
37
30
|
--header-padding: 12px 12px 12px 16px;
|
|
38
31
|
--margin-web-link-btn: 0px;
|
|
39
32
|
--padding-web-link-btn: 11px 16px;
|
|
@@ -45,12 +38,18 @@ const l = `
|
|
|
45
38
|
--web-link-align-items: center;
|
|
46
39
|
--web-link-column-gap: 10px;
|
|
47
40
|
|
|
48
|
-
|
|
41
|
+
--row-gap-default: 12px;
|
|
42
|
+
--row-gap-default1: 12px;
|
|
43
|
+
--row-gap-default2: 16px;
|
|
44
|
+
--promo-header-line-height: 18.5px;
|
|
45
|
+
--promo-animation-duration: 0.5s;
|
|
46
|
+
--promo-animation-function: ease-in;
|
|
47
|
+
|
|
48
|
+
${n.down("xl")`
|
|
49
49
|
--header-offset: 0px;
|
|
50
|
-
--watch-live-header: 46px;
|
|
51
50
|
`}
|
|
52
51
|
|
|
53
|
-
${
|
|
52
|
+
${n.intermediate("xl", "lg")`
|
|
54
53
|
--header-offset: 0px;
|
|
55
54
|
`}
|
|
56
55
|
|
|
@@ -86,23 +85,23 @@ const l = `
|
|
|
86
85
|
--adv-sponsor-logo-size: 28px;
|
|
87
86
|
--adv-sponsor-font-size: 12px;
|
|
88
87
|
}
|
|
89
|
-
`, m = "StreamLayerCSSReset", g = "ttkj0ah", c = () => /* @__PURE__ */
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
-
children: [/* @__PURE__ */
|
|
88
|
+
`, m = "StreamLayerCSSReset", g = "ttkj0ah", c = () => /* @__PURE__ */ i("table", {
|
|
89
|
+
children: /* @__PURE__ */ t("table", {
|
|
90
|
+
children: [/* @__PURE__ */ i("thead", {
|
|
91
|
+
children: /* @__PURE__ */ t("tr", {
|
|
92
|
+
children: [/* @__PURE__ */ i("th", {
|
|
94
93
|
children: "name"
|
|
95
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ i("th", {
|
|
96
95
|
children: "value"
|
|
97
96
|
})]
|
|
98
97
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
-
children: l.split(";").map((
|
|
101
|
-
const a =
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
children: [/* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ i("tbody", {
|
|
99
|
+
children: l.split(";").map((d) => {
|
|
100
|
+
const a = d.trim(), [o, r] = a.split(":");
|
|
101
|
+
return /* @__PURE__ */ t("tr", {
|
|
102
|
+
children: [/* @__PURE__ */ i("td", {
|
|
104
103
|
children: o
|
|
105
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ i("td", {
|
|
106
105
|
children: r
|
|
107
106
|
})]
|
|
108
107
|
}, a);
|
package/lib/ui/timer/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ interface TimerProps {
|
|
|
4
4
|
duration?: number;
|
|
5
5
|
onTimerExpired?: () => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SimpleTimer: React.FC<TimerProps & {
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
8
10
|
export declare const Timer: React.FC<TimerProps>;
|
|
9
11
|
export {};
|
package/lib/ui/timer/index.js
CHANGED
|
@@ -1,45 +1,67 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { CountdownCircleTimer as
|
|
5
|
-
import { TIMER_COLORS as
|
|
6
|
-
const k = [10, 10, 1, 0],
|
|
7
|
-
name: "
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { styled as T } from "@linaria/react";
|
|
3
|
+
import { useState as m, useEffect as d, useCallback as a } from "react";
|
|
4
|
+
import { CountdownCircleTimer as f } from "react-countdown-circle-timer";
|
|
5
|
+
import { TIMER_COLORS as g, TIMER_GREEN as M, TIMER_RED as S, TIMER_GRAY as _ } from "../theme/constants.js";
|
|
6
|
+
const k = [10, 10, 1, 0], u = /* @__PURE__ */ T("div")({
|
|
7
|
+
name: "RemainingTimeCircle",
|
|
8
8
|
class: "r165427",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
}), E = /* @__PURE__ */ T("div")({
|
|
11
|
+
name: "RemainingTime",
|
|
12
|
+
class: "r17garf3",
|
|
13
|
+
propsAsIs: !1
|
|
14
|
+
}), O = M, l = S, R = _, G = ({
|
|
15
|
+
className: o,
|
|
16
|
+
duration: e = 30,
|
|
17
|
+
onTimerExpired: r,
|
|
18
|
+
isPlaying: n = !0
|
|
19
|
+
}) => /* @__PURE__ */ s(f, {
|
|
20
|
+
isPlaying: n,
|
|
21
|
+
strokeWidth: 0,
|
|
22
|
+
duration: e,
|
|
23
|
+
colors: l,
|
|
24
|
+
size: 24,
|
|
25
|
+
onComplete: r,
|
|
26
|
+
children: ({
|
|
27
|
+
remainingTime: i
|
|
28
|
+
}) => /* @__PURE__ */ s(E, {
|
|
29
|
+
className: o,
|
|
30
|
+
children: e === 0 ? 0 : i
|
|
31
|
+
})
|
|
32
|
+
}), L = ({
|
|
33
|
+
isPlaying: o = !0,
|
|
34
|
+
duration: e = 30,
|
|
35
|
+
onTimerExpired: r
|
|
14
36
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
|
|
37
|
+
const [n, t] = m(e > 10 ? O : l), [i, C] = m(2);
|
|
38
|
+
d(() => {
|
|
39
|
+
e === 0 && (C(0), t(R));
|
|
40
|
+
}, [e]);
|
|
41
|
+
const p = ({
|
|
42
|
+
remainingTime: c
|
|
43
|
+
}) => /* @__PURE__ */ s(u, {
|
|
44
|
+
children: e === 0 ? 0 : c
|
|
45
|
+
}), h = a(() => {
|
|
46
|
+
r == null || r(), t(R);
|
|
47
|
+
}, [r, t]), I = a((c) => {
|
|
48
|
+
c === 10 && t(l);
|
|
18
49
|
}, [t]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}), T = n(() => {
|
|
24
|
-
s == null || s(), o(m);
|
|
25
|
-
}, [s, o]), I = n((e) => {
|
|
26
|
-
e === 10 && o(l);
|
|
27
|
-
}, [o]);
|
|
28
|
-
return /* @__PURE__ */ r(h, {
|
|
29
|
-
isPlaying: i,
|
|
30
|
-
duration: t,
|
|
31
|
-
colors: p,
|
|
50
|
+
return /* @__PURE__ */ s(f, {
|
|
51
|
+
isPlaying: o,
|
|
52
|
+
duration: e,
|
|
53
|
+
colors: g,
|
|
32
54
|
colorsTime: k,
|
|
33
55
|
size: 32,
|
|
34
|
-
strokeWidth:
|
|
56
|
+
strokeWidth: i,
|
|
35
57
|
trailStrokeWidth: 2,
|
|
36
|
-
trailColor:
|
|
37
|
-
onComplete:
|
|
58
|
+
trailColor: n,
|
|
59
|
+
onComplete: h,
|
|
38
60
|
onUpdate: I,
|
|
39
|
-
children:
|
|
61
|
+
children: p
|
|
40
62
|
});
|
|
41
63
|
};
|
|
42
64
|
export {
|
|
43
|
-
|
|
65
|
+
G as SimpleTimer,
|
|
44
66
|
L as Timer
|
|
45
67
|
};
|