@streamlayer/react-ui 1.1.0 → 1.2.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 +2 -0
- package/lib/app/app/Advertisement/index.js +75 -24
- package/lib/app/app/story/content.d.ts +1 -0
- package/lib/app/app/story/content.js +26 -10
- package/lib/app/app/story/index.d.ts +2 -0
- package/lib/app/app/story/index.js +75 -58
- package/lib/app/app/story/styles.d.ts +9 -0
- package/lib/app/app/story/styles.js +49 -0
- package/lib/app/app/story/useResponsive.d.ts +1 -0
- package/lib/app/app/story/useResponsive.js +15 -0
- package/lib/app/app/story/video.d.ts +3 -1
- package/lib/app/app/story/video.js +63 -92
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/banner/index.d.ts +2 -0
- package/lib/ui/advertisement/banner/index.js +17 -12
- package/lib/ui/advertisement/index.d.ts +1 -0
- package/lib/ui/advertisement/index.js +12 -24
- package/lib/ui/advertisement/mock.d.ts +1 -0
- package/lib/ui/advertisement/mock.js +38 -4
- package/lib/ui/advertisement/overlay/index.d.ts +2 -0
- package/lib/ui/advertisement/overlay/index.js +68 -15
- package/lib/ui/advertisement/overlay/styles.d.ts +18 -0
- package/lib/ui/advertisement/overlay/styles.js +95 -0
- package/lib/ui/advertisement/sidebar/index.d.ts +1 -0
- package/lib/ui/advertisement/sidebar/index.js +10 -8
- package/lib/ui/gamification/question/index.js +1 -0
- package/lib/ui/gamification/vote/vote-option/index.js +6 -6
- package/lib/ui/icons/index.js +1 -0
- package/lib/ui/slide-in/index.js +18 -23
- package/lib/ui/theme/ThemeColorsAdvertisement.d.ts +1 -0
- package/lib/ui/theme/ThemeColorsAdvertisement.js +15 -0
- package/lib/ui/theme/constants.d.ts +11 -0
- package/lib/ui/theme/constants.js +28 -14
- package/lib/ui/theme/theme.js +11 -8
- package/lib/ui/video-player/index.d.ts +1 -0
- package/lib/ui/video-player/index.js +70 -62
- package/package.json +15 -14
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import { PromotionType as
|
|
4
|
-
import { Banner as
|
|
1
|
+
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as a } from "@nanostores/react";
|
|
3
|
+
import { PromotionType as d } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { Banner as s } from "./banner/index.js";
|
|
5
5
|
import { Overlay as u } from "./overlay/index.js";
|
|
6
|
-
import { Sidebar as
|
|
7
|
-
const f = (r) => (r == null ? void 0 : r.type) ===
|
|
8
|
-
const
|
|
9
|
-
return !
|
|
10
|
-
"loading... ",
|
|
11
|
-
/* @__PURE__ */ c("button", { onClick: r.close, children: "close" })
|
|
12
|
-
] }) : l.error ? /* @__PURE__ */ e("div", { children: [
|
|
6
|
+
import { Sidebar as n } from "./sidebar/index.js";
|
|
7
|
+
const f = (r) => (r == null ? void 0 : r.type) === d.INGAME_IAB11_LBAR || (r == null ? void 0 : r.type) === d.INGAME_IAB21_LBAR, y = (r) => (r == null ? void 0 : r.type) === d.INGAME_IAB11 || (r == null ? void 0 : r.type) === d.INGAME_IAB21, C = ({ advertisement: r, layoutMode: A = "side-by-side", sidebar: i, banner: t }) => {
|
|
8
|
+
const e = a(r.data);
|
|
9
|
+
return !e.data && e.loading ? null : e.error ? /* @__PURE__ */ c("div", { children: [
|
|
13
10
|
"error ",
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
] }) : l.data ? i ? /* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */ c(a, { promotion: l.data, direction: i }),
|
|
17
|
-
/* @__PURE__ */ c("button", { onClick: r.close, children: "close" })
|
|
18
|
-
] }) : n && f(l.data) ? /* @__PURE__ */ e(d, { children: [
|
|
19
|
-
/* @__PURE__ */ c(h, { direction: n, children: /* @__PURE__ */ c(u, { promotion: l.data }) }),
|
|
20
|
-
/* @__PURE__ */ c("button", { onClick: r.close, children: "close" })
|
|
21
|
-
] }) : !n && A(l.data) ? /* @__PURE__ */ e(d, { children: [
|
|
22
|
-
/* @__PURE__ */ c(u, { promotion: l.data }),
|
|
23
|
-
/* @__PURE__ */ c("button", { onClick: r.close, children: "close" })
|
|
24
|
-
] }) : null : /* @__PURE__ */ e("div", { children: [
|
|
11
|
+
/* @__PURE__ */ l("button", { onClick: r.close, children: "close" })
|
|
12
|
+
] }) : e.data ? !i && !t && y(e.data) ? /* @__PURE__ */ l(u, { promotion: e.data, onClose: r.close }) : i && f(e.data) ? /* @__PURE__ */ l(n, { direction: i, hiding: r.hiding, children: /* @__PURE__ */ l(u, { promotion: e.data, onClose: r.close, inSidebar: !0 }) }) : t ? /* @__PURE__ */ l(s, { hiding: r.hiding, promotion: e.data, direction: t }) : null : /* @__PURE__ */ c("div", { children: [
|
|
25
13
|
"empty promo ",
|
|
26
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ l("button", { onClick: r.close, children: "close" })
|
|
27
15
|
] });
|
|
28
16
|
};
|
|
29
17
|
export {
|
|
30
|
-
|
|
18
|
+
C as AdvertisementUI
|
|
31
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromotionType as o, PromotionWallet as e, PromotionLogoMode as a, CtaIconMode as
|
|
1
|
+
import { PromotionType as o, PromotionWallet as e, PromotionLogoMode as a, CtaIconMode as c } from "@streamlayer/sdk-web-types";
|
|
2
2
|
const d = {
|
|
3
3
|
type: o.INGAME_IAB21_LBAR,
|
|
4
4
|
enableWallet: e.DISABLED,
|
|
@@ -11,13 +11,13 @@ const d = {
|
|
|
11
11
|
name: "Coca Cola"
|
|
12
12
|
},
|
|
13
13
|
banner: {
|
|
14
|
-
imageUrl: "https://
|
|
14
|
+
imageUrl: "https://www.figma.com/file/8XscgUSGOMU6rCYDLBgrAc/image/58f7c29647f7ad5bd447f76534af79609bedc74f",
|
|
15
15
|
url: "google.com",
|
|
16
16
|
ctaButton: {
|
|
17
17
|
label: "Order",
|
|
18
18
|
color: "#1d7bff",
|
|
19
19
|
ctaIcon: "",
|
|
20
|
-
ctaIconMode:
|
|
20
|
+
ctaIconMode: c.CTA_ICON_UNSET,
|
|
21
21
|
textColor: "#fff"
|
|
22
22
|
},
|
|
23
23
|
body: "Order pizza",
|
|
@@ -27,7 +27,41 @@ const d = {
|
|
|
27
27
|
imageUrl: "https://static-next.streamlayer.io/a8b6c1738a31dd0076a01c8807253533/42b6d84a-3cca-4eed-98ed-195706b47882/fce903c3-9781-4613-ae1e-4cce7e8cde90.png",
|
|
28
28
|
url: "google.com"
|
|
29
29
|
}
|
|
30
|
+
}, r = {
|
|
31
|
+
type: o.INGAME_IAB21_LBAR,
|
|
32
|
+
enableWallet: e.DISABLED,
|
|
33
|
+
coupon: "",
|
|
34
|
+
logoMode: a.LEFT,
|
|
35
|
+
couponZip: "",
|
|
36
|
+
couponBarcodeUrl: "",
|
|
37
|
+
sponsor: {
|
|
38
|
+
logo: "https://static-next.streamlayer.io/a8b6c1738a31dd0076a01c8807253533/f1de6799-4502-4423-9cbe-4804cd0ba769/c911da1a-e4a1-4e9a-8eb2-d1a6aa17e05d.png",
|
|
39
|
+
name: "Lorem ipsum dolor sit 4434, co"
|
|
40
|
+
},
|
|
41
|
+
banner: {
|
|
42
|
+
imageUrl: "",
|
|
43
|
+
url: "",
|
|
44
|
+
video: {
|
|
45
|
+
id: "1",
|
|
46
|
+
thumbnailUrl: "https://www.figma.com/file/8XscgUSGOMU6rCYDLBgrAc/image/58f7c29647f7ad5bd447f76534af79609bedc74f",
|
|
47
|
+
url: "https://static-next.streamlayer.io/2e8700993dd42a9b3283ef7f1b4bddc0/aa7a51c8-b8fb-4e8c-97bd-eebf649fd04d/36163fdd-3d41-447c-a3b2-3faf35ae9235.mp4"
|
|
48
|
+
},
|
|
49
|
+
ctaButton: {
|
|
50
|
+
label: "Lorem ipsum dol",
|
|
51
|
+
color: "#1d7bff",
|
|
52
|
+
ctaIcon: "",
|
|
53
|
+
ctaIconMode: c.CTA_ICON_UNSET,
|
|
54
|
+
textColor: "#fff"
|
|
55
|
+
},
|
|
56
|
+
body: "Lorem ipsum dolor sit 4434, consectetur 1111192392 3333, sed do 4434343 342343 545454344 ut 234323 ",
|
|
57
|
+
title: "Lorem ipsum dolor sit 4434, co"
|
|
58
|
+
},
|
|
59
|
+
additionalBanner: {
|
|
60
|
+
imageUrl: "https://static-next.streamlayer.io/a8b6c1738a31dd0076a01c8807253533/42b6d84a-3cca-4eed-98ed-195706b47882/fce903c3-9781-4613-ae1e-4cce7e8cde90.png",
|
|
61
|
+
url: "google.com"
|
|
62
|
+
}
|
|
30
63
|
};
|
|
31
64
|
export {
|
|
32
|
-
d as promotionMock
|
|
65
|
+
d as promotionMock,
|
|
66
|
+
r as promotionMockWithVideo
|
|
33
67
|
};
|
|
@@ -1,21 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { PromotionType as N, PromotionLogoMode as n } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { VideoPlayer as D } from "../../video-player/index.js";
|
|
4
|
+
import { PromoOverlay as F, Header as R, HeaderContent as _, SponsorLogo as S, SponsorName as U, SponsorText as j, ADLogo as m, SponsoredText as G, CloseIconWrap as H, CloseIcon as W, Media as w, Content as V, PromoImg as q, Text as z, Title as J, Description as K, ActionBtnWrap as Q, ActionButton as X } from "./styles.js";
|
|
5
|
+
const re = ({
|
|
6
|
+
promotion: e,
|
|
7
|
+
onClose: O,
|
|
8
|
+
inSidebar: k
|
|
9
|
+
}) => {
|
|
10
|
+
var a, s, c, d, t, g, h, i, b, u, y, x, f, p, A, C, E, T, B, L, M, v, I, P;
|
|
11
|
+
const o = e.type === N.INGAME_IAB11_LBAR || e.type === N.INGAME_IAB11;
|
|
12
|
+
return /* @__PURE__ */ l(F, { className: "PromoOverlay", style: { ...k ? {} : { backgroundColor: "#1E3344" } }, children: [
|
|
13
|
+
/* @__PURE__ */ l(R, { children: [
|
|
14
|
+
/* @__PURE__ */ l(_, { children: [
|
|
15
|
+
((a = e.sponsor) == null ? void 0 : a.logo) && e.logoMode === n.LEFT && /* @__PURE__ */ r(S, { src: (s = e.sponsor) == null ? void 0 : s.logo, alt: "promo" }),
|
|
16
|
+
/* @__PURE__ */ l(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
paddingLeft: (c = e.sponsor) != null && c.logo && e.logoMode === n.LEFT ? "0px" : "8px"
|
|
21
|
+
},
|
|
22
|
+
children: [
|
|
23
|
+
((d = e.sponsor) == null ? void 0 : d.logo) && e.logoMode === n.LEFT && /* @__PURE__ */ r(U, { children: (t = e.sponsor) == null ? void 0 : t.name }),
|
|
24
|
+
/* @__PURE__ */ l(j, { children: [
|
|
25
|
+
/* @__PURE__ */ r(m, { children: "AD" }),
|
|
26
|
+
/* @__PURE__ */ r(G, { children: "SPONSORED" })
|
|
27
|
+
] })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
)
|
|
9
31
|
] }),
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ e("div", { children: "AD" }),
|
|
12
|
-
/* @__PURE__ */ e("div", { children: "SPONSORED" })
|
|
13
|
-
] })
|
|
32
|
+
/* @__PURE__ */ r(H, { onClick: O, children: /* @__PURE__ */ r(W, { name: "icon-cross" }) })
|
|
14
33
|
] }),
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
|
|
34
|
+
/* @__PURE__ */ l(w, { children: [
|
|
35
|
+
((g = e.sponsor) == null ? void 0 : g.logo) && e.logoMode === n.CENTER && /* @__PURE__ */ r(S, { src: (h = e.sponsor) == null ? void 0 : h.logo, alt: "promo" }),
|
|
36
|
+
/* @__PURE__ */ l(V, { children: [
|
|
37
|
+
(b = (i = e.banner) == null ? void 0 : i.video) != null && b.url ? /* @__PURE__ */ r(
|
|
38
|
+
D,
|
|
39
|
+
{
|
|
40
|
+
source: (y = (u = e.banner) == null ? void 0 : u.video) == null ? void 0 : y.url,
|
|
41
|
+
poster: (f = (x = e.banner) == null ? void 0 : x.video) == null ? void 0 : f.thumbnailUrl,
|
|
42
|
+
aspectRatio: o ? "1/1" : "16/9"
|
|
43
|
+
}
|
|
44
|
+
) : (p = e.banner) != null && p.imageUrl ? /* @__PURE__ */ r(
|
|
45
|
+
q,
|
|
46
|
+
{
|
|
47
|
+
style: o ? { width: "268px", height: "268px" } : {},
|
|
48
|
+
src: (A = e.banner) == null ? void 0 : A.imageUrl,
|
|
49
|
+
alt: "promo"
|
|
50
|
+
}
|
|
51
|
+
) : null,
|
|
52
|
+
!o && /* @__PURE__ */ l(z, { children: [
|
|
53
|
+
/* @__PURE__ */ r(J, { children: (C = e.banner) == null ? void 0 : C.title }),
|
|
54
|
+
/* @__PURE__ */ r(K, { children: (E = e.banner) == null ? void 0 : E.body })
|
|
55
|
+
] })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ r(Q, { children: /* @__PURE__ */ r(
|
|
58
|
+
X,
|
|
59
|
+
{
|
|
60
|
+
href: (T = e.banner) == null ? void 0 : T.url,
|
|
61
|
+
style: {
|
|
62
|
+
backgroundColor: ((L = (B = e.banner) == null ? void 0 : B.ctaButton) == null ? void 0 : L.color) || "#009dc4",
|
|
63
|
+
color: ((v = (M = e.banner) == null ? void 0 : M.ctaButton) == null ? void 0 : v.textColor) || "#fff"
|
|
64
|
+
},
|
|
65
|
+
target: "_blank",
|
|
66
|
+
children: (P = (I = e.banner) == null ? void 0 : I.ctaButton) == null ? void 0 : P.label
|
|
67
|
+
}
|
|
68
|
+
) })
|
|
69
|
+
] })
|
|
17
70
|
] });
|
|
18
71
|
};
|
|
19
72
|
export {
|
|
20
|
-
|
|
73
|
+
re as Overlay
|
|
21
74
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const Header: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const HeaderContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const SponsorLogo: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const SponsorName: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const PromoOverlay: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const Media: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Text: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const Description: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
+
export declare const SponsorText: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
|
+
export declare const ADLogo: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
11
|
+
export declare const SponsoredText: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLSpanElement> & import('react').HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
12
|
+
export declare const CloseIconWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
13
|
+
export declare const CloseIcon: any;
|
|
14
|
+
export declare const Content: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
15
|
+
export declare const ActionBtnWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
16
|
+
export declare const ActionButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
|
|
17
|
+
export declare const PromoImg: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
18
|
+
export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
import { SvgIcon as o } from "../../icons/index.js";
|
|
3
|
+
const p = /* @__PURE__ */ s("div")({
|
|
4
|
+
name: "Header",
|
|
5
|
+
class: "hkzhq2w",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
8
|
+
name: "HeaderContent",
|
|
9
|
+
class: "hmgz5i",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), c = /* @__PURE__ */ s("img")({
|
|
12
|
+
name: "SponsorLogo",
|
|
13
|
+
class: "syxi3jt",
|
|
14
|
+
propsAsIs: !1
|
|
15
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
16
|
+
name: "SponsorName",
|
|
17
|
+
class: "s149e3gp",
|
|
18
|
+
propsAsIs: !1
|
|
19
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
20
|
+
name: "PromoOverlay",
|
|
21
|
+
class: "p10toh7",
|
|
22
|
+
propsAsIs: !1
|
|
23
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
24
|
+
name: "Media",
|
|
25
|
+
class: "m1jyea6t",
|
|
26
|
+
propsAsIs: !1
|
|
27
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
28
|
+
name: "Text",
|
|
29
|
+
class: "tzpfa3h",
|
|
30
|
+
propsAsIs: !1
|
|
31
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
32
|
+
name: "Description",
|
|
33
|
+
class: "d1crmu01",
|
|
34
|
+
propsAsIs: !1
|
|
35
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
36
|
+
name: "SponsorText",
|
|
37
|
+
class: "s1l37r8s",
|
|
38
|
+
propsAsIs: !1
|
|
39
|
+
}), A = /* @__PURE__ */ s("div")({
|
|
40
|
+
name: "ADLogo",
|
|
41
|
+
class: "a1nmch9k",
|
|
42
|
+
propsAsIs: !1
|
|
43
|
+
}), f = /* @__PURE__ */ s("span")({
|
|
44
|
+
name: "SponsoredText",
|
|
45
|
+
class: "s1er0ljd",
|
|
46
|
+
propsAsIs: !1
|
|
47
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
48
|
+
name: "CloseIconWrap",
|
|
49
|
+
class: "cydopmr",
|
|
50
|
+
propsAsIs: !1
|
|
51
|
+
}), e = () => o, x = /* @__PURE__ */ s(e())({
|
|
52
|
+
name: "CloseIcon",
|
|
53
|
+
class: "c1w6nt04",
|
|
54
|
+
propsAsIs: !0
|
|
55
|
+
}), g = /* @__PURE__ */ s("div")({
|
|
56
|
+
name: "Content",
|
|
57
|
+
class: "c1evcmtq",
|
|
58
|
+
propsAsIs: !1
|
|
59
|
+
}), S = /* @__PURE__ */ s("div")({
|
|
60
|
+
name: "ActionBtnWrap",
|
|
61
|
+
class: "awodx0x",
|
|
62
|
+
propsAsIs: !1
|
|
63
|
+
}), C = /* @__PURE__ */ s("a")({
|
|
64
|
+
name: "ActionButton",
|
|
65
|
+
class: "a1q3n6oi",
|
|
66
|
+
propsAsIs: !1
|
|
67
|
+
}), T = /* @__PURE__ */ s("img")({
|
|
68
|
+
name: "PromoImg",
|
|
69
|
+
class: "p8d4xfk",
|
|
70
|
+
propsAsIs: !1
|
|
71
|
+
}), h = /* @__PURE__ */ s("div")({
|
|
72
|
+
name: "Title",
|
|
73
|
+
class: "tt6oobh",
|
|
74
|
+
propsAsIs: !1
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
A as ADLogo,
|
|
78
|
+
S as ActionBtnWrap,
|
|
79
|
+
C as ActionButton,
|
|
80
|
+
x as CloseIcon,
|
|
81
|
+
v as CloseIconWrap,
|
|
82
|
+
g as Content,
|
|
83
|
+
d as Description,
|
|
84
|
+
p as Header,
|
|
85
|
+
t as HeaderContent,
|
|
86
|
+
m as Media,
|
|
87
|
+
T as PromoImg,
|
|
88
|
+
l as PromoOverlay,
|
|
89
|
+
c as SponsorLogo,
|
|
90
|
+
r as SponsorName,
|
|
91
|
+
I as SponsorText,
|
|
92
|
+
f as SponsoredText,
|
|
93
|
+
i as Text,
|
|
94
|
+
h as Title
|
|
95
|
+
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { SlideIn as
|
|
4
|
-
const
|
|
2
|
+
import { styled as t } from "@linaria/react";
|
|
3
|
+
import { SlideIn as a } from "../../slide-in/index.js";
|
|
4
|
+
const d = /* @__PURE__ */ t("div")({
|
|
5
5
|
name: "SidebarContainer",
|
|
6
6
|
class: "s1abskp8",
|
|
7
7
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
8
|
+
}), b = ({
|
|
9
9
|
children: e,
|
|
10
10
|
direction: o,
|
|
11
11
|
style: s,
|
|
12
|
-
className: i
|
|
13
|
-
|
|
12
|
+
className: i,
|
|
13
|
+
hiding: n
|
|
14
|
+
}) => /* @__PURE__ */ r(a, {
|
|
14
15
|
direction: o,
|
|
15
16
|
style: s,
|
|
17
|
+
hiding: n,
|
|
16
18
|
className: i,
|
|
17
|
-
children: /* @__PURE__ */ r(
|
|
19
|
+
children: /* @__PURE__ */ r(d, {
|
|
18
20
|
children: e
|
|
19
21
|
})
|
|
20
22
|
});
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
b as Sidebar
|
|
23
25
|
};
|
|
@@ -4,9 +4,9 @@ import { QuestionImages as a, QuestionType as o, QuestionStatus as p } from "@st
|
|
|
4
4
|
import { AnimatedCounter as W } from "../../../animated-counter/index.js";
|
|
5
5
|
import { IconDefault as $, IconContainer as y, IconWrap as F, IconCircle as M, ButtonContainer as z, ButtonPctWrap as G, ButtonPct as H, ButtonBody as J, Title as K, Pts as X, Indicators as Y, CheckIcon as Z, Percentage as _ } from "./styles.js";
|
|
6
6
|
const h = {
|
|
7
|
-
[a.CENTERED]: (t) => /* @__PURE__ */ e($, { alt: "option-icon", src: t }),
|
|
8
|
-
[a.TRANSPARENT]: (t) => /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(F, { style: { backgroundImage: `url(${t})` } }) }),
|
|
9
|
-
[a.ROUNDED]: (t) => /* @__PURE__ */ e(M, { alt: "option-icon", src: t }),
|
|
7
|
+
[a.CENTERED]: (t) => /* @__PURE__ */ e($, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
8
|
+
[a.TRANSPARENT]: (t) => /* @__PURE__ */ e(y, { "data-testid": "vote-icon", children: /* @__PURE__ */ e(F, { style: { backgroundImage: `url(${t})` } }) }),
|
|
9
|
+
[a.ROUNDED]: (t) => /* @__PURE__ */ e(M, { "data-testid": "vote-icon", alt: "option-icon", src: t }),
|
|
10
10
|
[a.NONE]: () => null,
|
|
11
11
|
[a.UNSET]: () => null
|
|
12
12
|
}, q = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
|
|
@@ -45,12 +45,12 @@ const h = {
|
|
|
45
45
|
questionStatus: P,
|
|
46
46
|
isLoading: g,
|
|
47
47
|
questionType: d,
|
|
48
|
-
correct:
|
|
49
|
-
hasCorrectAnswer:
|
|
48
|
+
correct: v,
|
|
49
|
+
hasCorrectAnswer: k,
|
|
50
50
|
votedAfterQuestionClosed: x,
|
|
51
51
|
enteredAnActiveQuestion: R,
|
|
52
52
|
marketClosed: I
|
|
53
|
-
} = t, [L, T] = j(0), m = q(t), B = tt({ questionType: d, questionVoted: s, correct:
|
|
53
|
+
} = t, [L, T] = j(0), m = q(t), B = tt({ questionType: d, questionVoted: s, correct: v, hasCorrectAnswer: k, questionStatus: P }), u = I && d === o.PREDICTION, N = s || u, Q = d === o.PREDICTION && !s && !I, V = s && !E && m !== "incorrect";
|
|
54
54
|
return U(() => {
|
|
55
55
|
T(0), requestAnimationFrame(() => {
|
|
56
56
|
T(i);
|
package/lib/ui/icons/index.js
CHANGED
package/lib/ui/slide-in/index.js
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { styled as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cx as m } from "@linaria/core";
|
|
3
|
+
import { styled as f } from "@linaria/react";
|
|
4
|
+
const u = /* @__PURE__ */ f("div")({
|
|
5
5
|
name: "Container",
|
|
6
6
|
class: "c5b6wdg",
|
|
7
7
|
propsAsIs: !1
|
|
8
|
-
}), d = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}) => /* @__PURE__ */ m(l, {
|
|
22
|
-
style: i,
|
|
23
|
-
className: a(n, t && d[s], t && r && f),
|
|
24
|
-
onAnimationEnd: e,
|
|
25
|
-
children: o
|
|
8
|
+
}), l = "a1rlj479", c = "s35f1di", b = "sj4471g", p = "b12050d8", A = "b1d5ybek", d = (n) => n === "left" || n === "right" ? c : p, g = (n) => n === "left" || n === "right" ? b : A, h = (n) => n === "left" ? "avdxyl3" : n === "right" ? "a1bisd08" : n === "top" ? "a1u9y2aj" : "a1qqaks", k = ({
|
|
9
|
+
children: n,
|
|
10
|
+
style: a,
|
|
11
|
+
className: i,
|
|
12
|
+
enabled: r = !0,
|
|
13
|
+
hiding: s,
|
|
14
|
+
direction: t = "left",
|
|
15
|
+
onAnimationEnd: o
|
|
16
|
+
}) => /* @__PURE__ */ e(u, {
|
|
17
|
+
style: a,
|
|
18
|
+
className: m(i, l, h(t), r && !s && d(t), r && s && g(t)),
|
|
19
|
+
onAnimationEnd: o,
|
|
20
|
+
children: n
|
|
26
21
|
});
|
|
27
22
|
export {
|
|
28
|
-
|
|
23
|
+
k as SlideIn
|
|
29
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ThemeColorsAdvertisement: () => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ColorItem as e } from "@storybook/blocks";
|
|
3
|
+
import { COLORS_ADVERTISEMENT as r } from "./constants.js";
|
|
4
|
+
const s = Object.keys(r), i = () => s.map((o) => /* @__PURE__ */ t(
|
|
5
|
+
e,
|
|
6
|
+
{
|
|
7
|
+
title: o,
|
|
8
|
+
subtitle: `--color-${o.toLowerCase().replaceAll("_", "-")}`,
|
|
9
|
+
colors: [r[o]]
|
|
10
|
+
},
|
|
11
|
+
o
|
|
12
|
+
));
|
|
13
|
+
export {
|
|
14
|
+
i as ThemeColorsAdvertisement
|
|
15
|
+
};
|
|
@@ -21,6 +21,16 @@ export declare const COLORS: {
|
|
|
21
21
|
NEUTRALS_GRAY7: string;
|
|
22
22
|
NEUTRALS_GRAY9: string;
|
|
23
23
|
};
|
|
24
|
+
export declare const COLORS_ADVERTISEMENT: {
|
|
25
|
+
BG_PRIMARY: string;
|
|
26
|
+
BG_SECONDARY: string;
|
|
27
|
+
BG_SECONDARY1: string;
|
|
28
|
+
BORDER_PRIMARY: string;
|
|
29
|
+
TEXT_PRIMARY: string;
|
|
30
|
+
TEXT_SECONDARY: string;
|
|
31
|
+
TEXT_SECONDARY1: string;
|
|
32
|
+
WHITE: string;
|
|
33
|
+
};
|
|
24
34
|
export declare const TIMER_COLORS: string[];
|
|
25
35
|
export declare const TIMER_GREEN = "#cee5de";
|
|
26
36
|
export declare const TIMER_RED = "#f9d6d8";
|
|
@@ -45,3 +55,4 @@ export declare const ORIENTATION: {
|
|
|
45
55
|
portrait: string;
|
|
46
56
|
};
|
|
47
57
|
export declare const colors: string;
|
|
58
|
+
export declare const colorsAdvertisement: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
BG_TRANSPARENT: "rgba(0,0,0, .8)",
|
|
3
3
|
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
4
4
|
WHITE: "#FFFFFF",
|
|
@@ -20,33 +20,47 @@ const F = {
|
|
|
20
20
|
NEUTRALS_GRAY6: "#888B8D",
|
|
21
21
|
NEUTRALS_GRAY7: "#6B6F73",
|
|
22
22
|
NEUTRALS_GRAY9: "#25282A"
|
|
23
|
-
}, T =
|
|
23
|
+
}, T = {
|
|
24
|
+
BG_PRIMARY: "#13212b",
|
|
25
|
+
BG_SECONDARY: "#152430",
|
|
26
|
+
BG_SECONDARY1: "#435059",
|
|
27
|
+
BORDER_PRIMARY: "rgba(255, 255, 255, 0.1)",
|
|
28
|
+
TEXT_PRIMARY: "#f9f9f9",
|
|
29
|
+
TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
|
|
30
|
+
TEXT_SECONDARY1: "#878787",
|
|
31
|
+
WHITE: "#fff"
|
|
32
|
+
}, _ = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], F = "#cee5de", r = "#f9d6d8", S = "#E8E8E8", s = {
|
|
24
33
|
REGULAR: "'SF Pro Text', Arial, Helvetica, sans-serif",
|
|
25
34
|
SERIF: "'SF Pro Display', Arial, Helvetica, sans-serif",
|
|
26
35
|
COLOR: "#fff",
|
|
27
36
|
WEIGHT_DEFAULT: "500"
|
|
28
|
-
},
|
|
37
|
+
}, t = {
|
|
29
38
|
xs: 324,
|
|
30
39
|
sm: 576,
|
|
31
40
|
md: 768,
|
|
32
41
|
lg: 992,
|
|
33
42
|
xl: 1200,
|
|
34
43
|
xxl: 1440
|
|
35
|
-
},
|
|
44
|
+
}, N = {
|
|
36
45
|
landscape: "landscape",
|
|
37
46
|
portrait: "portrait"
|
|
38
|
-
}, o = Object.entries(
|
|
47
|
+
}, o = Object.entries(e).reduce((R, [E, A]) => `
|
|
39
48
|
${R}
|
|
40
49
|
--color-${E.toLowerCase().replaceAll("_", "-")}: ${A};
|
|
50
|
+
`, ""), c = Object.entries(T).reduce((R, [E, A]) => `
|
|
51
|
+
${R}
|
|
52
|
+
--color-adv-${E.toLowerCase().replaceAll("_", "-")}: ${A};
|
|
41
53
|
`, "");
|
|
42
54
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
t as BREAKPOINTS,
|
|
56
|
+
e as COLORS,
|
|
57
|
+
T as COLORS_ADVERTISEMENT,
|
|
58
|
+
s as FONT,
|
|
59
|
+
N as ORIENTATION,
|
|
60
|
+
_ as TIMER_COLORS,
|
|
61
|
+
S as TIMER_GRAY,
|
|
62
|
+
F as TIMER_GREEN,
|
|
63
|
+
r as TIMER_RED,
|
|
64
|
+
o as colors,
|
|
65
|
+
c as colorsAdvertisement
|
|
52
66
|
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { breakpoints as n } from "./breakpoints.js";
|
|
3
|
-
import { colors as h, FONT as t } from "./constants.js";
|
|
3
|
+
import { colors as s, colorsAdvertisement as h, FONT as t } from "./constants.js";
|
|
4
4
|
const l = `
|
|
5
|
+
${s}
|
|
5
6
|
${h}
|
|
6
7
|
--font-family: ${t.REGULAR};
|
|
7
8
|
--font-regular: ${t.REGULAR};
|
|
@@ -13,6 +14,8 @@ const l = `
|
|
|
13
14
|
--header-height: 68px;
|
|
14
15
|
--watch-live-header: 0px;
|
|
15
16
|
--animation-duration: 0.5s;
|
|
17
|
+
--promo-animation-duration: 0.5s;
|
|
18
|
+
--promo-animation-function: ease-in;
|
|
16
19
|
--animation-function: ease;
|
|
17
20
|
--container-padding: 16px;
|
|
18
21
|
--border-radius: 8px;
|
|
@@ -28,7 +31,7 @@ const l = `
|
|
|
28
31
|
${n.intermediate("xl", "lg")`
|
|
29
32
|
--header-offset: 0px;
|
|
30
33
|
`}
|
|
31
|
-
`,
|
|
34
|
+
`, f = "StreamLayerCSSReset", x = "ttkj0ah", u = () => /* @__PURE__ */ e("table", {
|
|
32
35
|
children: /* @__PURE__ */ r("table", {
|
|
33
36
|
children: [/* @__PURE__ */ e("thead", {
|
|
34
37
|
children: /* @__PURE__ */ r("tr", {
|
|
@@ -39,11 +42,11 @@ const l = `
|
|
|
39
42
|
})]
|
|
40
43
|
})
|
|
41
44
|
}), /* @__PURE__ */ e("tbody", {
|
|
42
|
-
children: l.split(";").map((
|
|
43
|
-
const i =
|
|
45
|
+
children: l.split(";").map((o) => {
|
|
46
|
+
const i = o.trim(), [a, d] = i.split(":");
|
|
44
47
|
return /* @__PURE__ */ r("tr", {
|
|
45
48
|
children: [/* @__PURE__ */ e("td", {
|
|
46
|
-
children:
|
|
49
|
+
children: a
|
|
47
50
|
}), /* @__PURE__ */ e("td", {
|
|
48
51
|
children: d
|
|
49
52
|
})]
|
|
@@ -53,8 +56,8 @@ const l = `
|
|
|
53
56
|
})
|
|
54
57
|
});
|
|
55
58
|
export {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
u as ThemeVariables,
|
|
60
|
+
f as resetCss,
|
|
61
|
+
x as theme,
|
|
59
62
|
l as themeStr
|
|
60
63
|
};
|