@streamlayer/react-ui 1.5.1 → 1.6.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 +38 -34
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/index.d.ts +1 -0
- package/lib/ui/advertisement/index.js +21 -12
- package/lib/ui/advertisement/notification/index.d.ts +7 -0
- package/lib/ui/advertisement/notification/index.js +31 -0
- package/lib/ui/advertisement/notification/styles.d.ts +35 -0
- package/lib/ui/advertisement/notification/styles.js +80 -0
- package/lib/ui/icons/index.d.ts +2 -0
- package/lib/ui/icons/index.js +58 -53
- package/package.json +14 -14
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as i, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationPromotionImagePosition as e, NotificationEnabled as h, NotificationSponsorLogoMode as O } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { SlideIn as M } from "../../slide-in/index.js";
|
|
4
|
+
import { MediaImgFit as l, MediaImgCentered as T, MediaImgBottom as C, MediaImgSolid as f, MediaImgMiddle as E, NotificationContainer as L, Logo as S, NotificationContent as b, Body as x, Title as D, Text as P, Button as _, StyledChevronRight as y } from "./styles.js";
|
|
5
|
+
const F = {
|
|
6
|
+
[e.UNSET]: l,
|
|
7
|
+
[e.FIT]: l,
|
|
8
|
+
[e.CENTERED]: T,
|
|
9
|
+
[e.BOTTOM]: C,
|
|
10
|
+
[e.SOLID]: f,
|
|
11
|
+
[e.MIDDLE]: E
|
|
12
|
+
}, u = ({ notification: r, promotionId: R, hiding: m, direction: s = "left" }) => {
|
|
13
|
+
if (!r || !r.promotion || r.enabled !== h.NOTIFICATION_ENABLED)
|
|
14
|
+
return null;
|
|
15
|
+
const { title: n, body: d, image: c, promotion: I } = r, { sponsorLogo: a, sponsorLogoMode: g, imagePosition: N, ctaButton: o } = I, p = F[N];
|
|
16
|
+
return /* @__PURE__ */ i(M, { direction: s, hiding: m, children: /* @__PURE__ */ t(L, { children: [
|
|
17
|
+
g !== O.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ i(S, { children: /* @__PURE__ */ i("img", { src: a, alt: n }) }),
|
|
18
|
+
/* @__PURE__ */ t(b, { children: [
|
|
19
|
+
/* @__PURE__ */ i(p, { children: /* @__PURE__ */ i("img", { src: c, alt: "" }) }),
|
|
20
|
+
/* @__PURE__ */ t(x, { children: [
|
|
21
|
+
n && /* @__PURE__ */ i(D, { children: n }),
|
|
22
|
+
d && /* @__PURE__ */ i(P, { children: d })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ i(_, { name: "promo-button", style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color }, children: (o == null ? void 0 : o.label) || "Open" }),
|
|
25
|
+
/* @__PURE__ */ i(y, { name: "chevronRight" })
|
|
26
|
+
] })
|
|
27
|
+
] }) });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
u as Notification
|
|
31
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const CardContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const NotificationContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const Text: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Media: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const MediaImgFit: {
|
|
9
|
+
__wyw_meta: unknown;
|
|
10
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const MediaImgCentered: {
|
|
14
|
+
__wyw_meta: unknown;
|
|
15
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const MediaImgBottom: {
|
|
19
|
+
__wyw_meta: unknown;
|
|
20
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
21
|
+
as?: React.ElementType;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const MediaImgSolid: {
|
|
24
|
+
__wyw_meta: unknown;
|
|
25
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const MediaImgMiddle: {
|
|
29
|
+
__wyw_meta: unknown;
|
|
30
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
31
|
+
as?: React.ElementType;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const Button: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
34
|
+
export declare const StyledChevronRight: any;
|
|
35
|
+
export declare const Logo: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
import { SvgIcon as t } from "../../icons/index.js";
|
|
3
|
+
const d = /* @__PURE__ */ s("div")({
|
|
4
|
+
name: "CardContainer",
|
|
5
|
+
class: "cghcyv4",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
8
|
+
name: "NotificationContent",
|
|
9
|
+
class: "n1ku6hz",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), g = /* @__PURE__ */ s("div")({
|
|
12
|
+
name: "NotificationContainer",
|
|
13
|
+
class: "nbxqmol",
|
|
14
|
+
propsAsIs: !1
|
|
15
|
+
}), v = /* @__PURE__ */ s("div")({
|
|
16
|
+
name: "Body",
|
|
17
|
+
class: "b1gu3eml",
|
|
18
|
+
propsAsIs: !1
|
|
19
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
20
|
+
name: "Title",
|
|
21
|
+
class: "t1u17zva",
|
|
22
|
+
propsAsIs: !1
|
|
23
|
+
}), A = /* @__PURE__ */ s("div")({
|
|
24
|
+
name: "Text",
|
|
25
|
+
class: "t10ko1g",
|
|
26
|
+
propsAsIs: !1
|
|
27
|
+
}), e = /* @__PURE__ */ s("div")({
|
|
28
|
+
name: "Media",
|
|
29
|
+
class: "mntc42e",
|
|
30
|
+
propsAsIs: !1
|
|
31
|
+
}), n = () => e, M = /* @__PURE__ */ s(n())({
|
|
32
|
+
name: "MediaImgFit",
|
|
33
|
+
class: "ml060eo",
|
|
34
|
+
propsAsIs: !0
|
|
35
|
+
}), a = () => e, o = /* @__PURE__ */ s(a())({
|
|
36
|
+
name: "MediaImgCentered",
|
|
37
|
+
class: "m1vqlvig",
|
|
38
|
+
propsAsIs: !0
|
|
39
|
+
}), i = () => o, u = /* @__PURE__ */ s(i())({
|
|
40
|
+
name: "MediaImgBottom",
|
|
41
|
+
class: "m1e7tvi5",
|
|
42
|
+
propsAsIs: !0
|
|
43
|
+
}), c = () => e, C = /* @__PURE__ */ s(c())({
|
|
44
|
+
name: "MediaImgSolid",
|
|
45
|
+
class: "mqvntt2",
|
|
46
|
+
propsAsIs: !0
|
|
47
|
+
}), m = () => o, x = /* @__PURE__ */ s(m())({
|
|
48
|
+
name: "MediaImgMiddle",
|
|
49
|
+
class: "m12jtj3u",
|
|
50
|
+
propsAsIs: !0
|
|
51
|
+
}), h = /* @__PURE__ */ s("button")({
|
|
52
|
+
name: "Button",
|
|
53
|
+
class: "bkq1frv",
|
|
54
|
+
propsAsIs: !1
|
|
55
|
+
}), p = () => t, y = /* @__PURE__ */ s(p())({
|
|
56
|
+
name: "StyledChevronRight",
|
|
57
|
+
class: "sis90pl",
|
|
58
|
+
propsAsIs: !0
|
|
59
|
+
}), B = /* @__PURE__ */ s("div")({
|
|
60
|
+
name: "Logo",
|
|
61
|
+
class: "l9mjmz3",
|
|
62
|
+
propsAsIs: !1
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
v as Body,
|
|
66
|
+
h as Button,
|
|
67
|
+
d as CardContainer,
|
|
68
|
+
B as Logo,
|
|
69
|
+
e as Media,
|
|
70
|
+
u as MediaImgBottom,
|
|
71
|
+
o as MediaImgCentered,
|
|
72
|
+
M as MediaImgFit,
|
|
73
|
+
x as MediaImgMiddle,
|
|
74
|
+
C as MediaImgSolid,
|
|
75
|
+
g as NotificationContainer,
|
|
76
|
+
I as NotificationContent,
|
|
77
|
+
y as StyledChevronRight,
|
|
78
|
+
A as Text,
|
|
79
|
+
f as Title
|
|
80
|
+
};
|