@pushwoosh/dumb-components 1.1.161 → 1.1.163
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/Modal/components/Modal/styles.js +3 -3
- package/NativeRichMediaPreview/NativeRichMediaPreview.d.ts +11 -0
- package/NativeRichMediaPreview/NativeRichMediaPreview.js +151 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/NativeRichMediaCardButtons.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/NativeRichMediaCardButtons.js +29 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/types.d.ts +5 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCardButtons/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/NativeRichMediaCloseChip.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/NativeRichMediaCloseChip.js +15 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/index.d.ts +2 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/index.js +2 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/styles.d.ts +7 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/styles.js +19 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/types.d.ts +5 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCloseChip/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/NativeRichMediaCoverImg.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/NativeRichMediaCoverImg.js +27 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/styles.d.ts +11 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/styles.js +23 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/types.d.ts +11 -0
- package/NativeRichMediaPreview/components/NativeRichMediaCoverImg/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaDim/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaDim/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaDim/styles.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaDim/styles.js +5 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/NativeRichMediaExpandChip.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/NativeRichMediaExpandChip.js +15 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/types.d.ts +4 -0
- package/NativeRichMediaPreview/components/NativeRichMediaExpandChip/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/NativeRichMediaMuteChip.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/NativeRichMediaMuteChip.js +21 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/types.d.ts +8 -0
- package/NativeRichMediaPreview/components/NativeRichMediaMuteChip/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/NativeRichMediaOverlayButtons.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/NativeRichMediaOverlayButtons.js +40 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/types.d.ts +4 -0
- package/NativeRichMediaPreview/components/NativeRichMediaOverlayButtons/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/NativeRichMediaPreviewCanvas.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/NativeRichMediaPreviewCanvas.js +10 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/styles.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/styles.js +6 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/types.d.ts +4 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPreviewCanvas/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/NativeRichMediaPtLabel.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/NativeRichMediaPtLabel.js +27 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/styles.d.ts +10 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/styles.js +30 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/types.d.ts +12 -0
- package/NativeRichMediaPreview/components/NativeRichMediaPtLabel/types.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/NativeRichMediaRewardPanel.d.ts +3 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/NativeRichMediaRewardPanel.js +56 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/index.d.ts +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/index.js +1 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/styles.d.ts +8 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/styles.js +17 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/types.d.ts +5 -0
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/types.js +1 -0
- package/NativeRichMediaPreview/helpers.d.ts +17 -0
- package/NativeRichMediaPreview/helpers.js +81 -0
- package/NativeRichMediaPreview/icons/CopyIcon.svg +4 -0
- package/NativeRichMediaPreview/icons/ExpandIcon.svg +3 -0
- package/NativeRichMediaPreview/icons/MutedIcon.svg +4 -0
- package/NativeRichMediaPreview/icons/ScribbleIcon.svg +3 -0
- package/NativeRichMediaPreview/icons/SoundIcon.svg +4 -0
- package/NativeRichMediaPreview/icons/index.d.ts +5 -0
- package/NativeRichMediaPreview/icons/index.js +5 -0
- package/NativeRichMediaPreview/index.d.ts +4 -0
- package/NativeRichMediaPreview/index.js +3 -0
- package/NativeRichMediaPreview/parseNativeRichMediaConfig.d.ts +6 -0
- package/NativeRichMediaPreview/parseNativeRichMediaConfig.js +40 -0
- package/NativeRichMediaPreview/polyglot/index.d.ts +2 -0
- package/NativeRichMediaPreview/polyglot/index.js +34 -0
- package/NativeRichMediaPreview/polyglot/messages_ar.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_ar.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_bn.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_bn.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_de.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_de.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_en.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_en.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_es.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_es.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_fr.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_fr.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_he.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_he.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_hi.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_hi.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_ja.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_ja.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_ko.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_ko.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_pt.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_pt.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_ru.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_ru.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_th.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_th.js +4 -0
- package/NativeRichMediaPreview/polyglot/messages_zh.d.ts +3 -0
- package/NativeRichMediaPreview/polyglot/messages_zh.js +4 -0
- package/NativeRichMediaPreview/polyglot/types.d.ts +5 -0
- package/NativeRichMediaPreview/polyglot/types.js +1 -0
- package/NativeRichMediaPreview/styles.d.ts +19 -0
- package/NativeRichMediaPreview/styles.js +45 -0
- package/NativeRichMediaPreview/types.d.ts +294 -0
- package/NativeRichMediaPreview/types.js +2 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/NativeRichMediaBannerView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/NativeRichMediaBannerView.js +46 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/styles.d.ts +7 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/styles.js +19 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaBannerView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/NativeRichMediaCarouselView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/NativeRichMediaCarouselView.js +43 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/styles.d.ts +9 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/styles.js +31 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/types.d.ts +6 -0
- package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/NativeRichMediaFullscreenView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/NativeRichMediaFullscreenView.js +42 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/styles.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/styles.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/NativeRichMediaInvalidView.d.ts +2 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/NativeRichMediaInvalidView.js +10 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/styles.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaInvalidView/styles.js +6 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/NativeRichMediaModalView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/NativeRichMediaModalView.js +50 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/styles.d.ts +6 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/styles.js +8 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/NativeRichMediaPipView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/NativeRichMediaPipView.js +51 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/styles.d.ts +9 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/styles.js +19 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaPipView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/NativeRichMediaScratchcardView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/NativeRichMediaScratchcardView.js +68 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/styles.d.ts +17 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/styles.js +35 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/NativeRichMediaSheetView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/NativeRichMediaSheetView.js +49 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/styles.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/styles.js +12 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSheetView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/NativeRichMediaSpinwheelView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/NativeRichMediaSpinwheelView.js +63 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/styles.d.ts +19 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/styles.js +40 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/NativeRichMediaStoriesView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/NativeRichMediaStoriesView.js +51 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/styles.d.ts +11 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/styles.js +30 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/types.d.ts +6 -0
- package/NativeRichMediaPreview/views/NativeRichMediaStoriesView/types.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/NativeRichMediaVideoView.d.ts +3 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/NativeRichMediaVideoView.js +49 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/index.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/index.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/styles.d.ts +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/styles.js +1 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/types.d.ts +4 -0
- package/NativeRichMediaPreview/views/NativeRichMediaVideoView/types.js +1 -0
- package/NativeRichMediaPreview/views/index.d.ts +11 -0
- package/NativeRichMediaPreview/views/index.js +11 -0
- package/NativeRichMediaPreview/views/shared/styles.d.ts +8 -0
- package/NativeRichMediaPreview/views/shared/styles.js +19 -0
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const TemplateLayer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ButtonRow: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$borderRadius: number;
|
|
4
|
+
$background?: string;
|
|
5
|
+
$color: string;
|
|
6
|
+
$marginTop?: number;
|
|
7
|
+
$boxShadow?: string;
|
|
8
|
+
$border?: string;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const ScaledCanvasHost: import("styled-components").StyledComponent<"div", any, {
|
|
11
|
+
width: string | number;
|
|
12
|
+
height: string | number;
|
|
13
|
+
$withBackground: boolean;
|
|
14
|
+
}, never>;
|
|
15
|
+
export declare const CanvasWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
16
|
+
$canvasWidth: number;
|
|
17
|
+
$canvasHeight: number;
|
|
18
|
+
$scale: number;
|
|
19
|
+
}, never>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Color, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
|
+
import { toCssValue } from '@pushwoosh/kit-helpers';
|
|
4
|
+
export const TemplateLayer = styled.div.withConfig({
|
|
5
|
+
displayName: "TemplateLayer",
|
|
6
|
+
componentId: "sc-mc9ykd-0"
|
|
7
|
+
})(["position:absolute;inset:0;z-index:10;"]);
|
|
8
|
+
export const ButtonRow = styled.div.withConfig({
|
|
9
|
+
displayName: "ButtonRow",
|
|
10
|
+
componentId: "sc-mc9ykd-1"
|
|
11
|
+
})(["display:flex;align-items:center;justify-content:center;height:52px;font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 12px;border-radius:", "px;color:", ";", " ", " ", " ", ""], ({
|
|
12
|
+
$borderRadius
|
|
13
|
+
}) => $borderRadius, ({
|
|
14
|
+
$color
|
|
15
|
+
}) => $color, ({
|
|
16
|
+
$background
|
|
17
|
+
}) => $background !== undefined ? `background: ${$background};` : '', ({
|
|
18
|
+
$marginTop
|
|
19
|
+
}) => $marginTop !== undefined ? `margin-top: ${$marginTop}px;` : '', ({
|
|
20
|
+
$boxShadow
|
|
21
|
+
}) => $boxShadow !== undefined ? `box-shadow: ${$boxShadow};` : '', ({
|
|
22
|
+
$border
|
|
23
|
+
}) => $border !== undefined ? `border: ${$border};` : '');
|
|
24
|
+
export const ScaledCanvasHost = styled.div.withConfig({
|
|
25
|
+
displayName: "ScaledCanvasHost",
|
|
26
|
+
componentId: "sc-mc9ykd-2"
|
|
27
|
+
})(["position:relative;border:", ";border-radius:", ";background-color:", ";width:", ";height:", ";margin:0 auto;overflow:hidden;"], ({
|
|
28
|
+
$withBackground
|
|
29
|
+
}) => $withBackground ? `1px solid ${Color.DIVIDER}` : 'none', ShapeRadius.SECTION, ({
|
|
30
|
+
$withBackground
|
|
31
|
+
}) => $withBackground ? Color.CLEAR : 'transparent', ({
|
|
32
|
+
width
|
|
33
|
+
}) => toCssValue(width), ({
|
|
34
|
+
height
|
|
35
|
+
}) => toCssValue(height));
|
|
36
|
+
export const CanvasWrapper = styled.div.withConfig({
|
|
37
|
+
displayName: "CanvasWrapper",
|
|
38
|
+
componentId: "sc-mc9ykd-3"
|
|
39
|
+
})(["position:absolute;left:50%;top:50%;width:", "px;height:", "px;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-50%) scale(", ");transform-origin:center center;"], ({
|
|
40
|
+
$canvasWidth
|
|
41
|
+
}) => $canvasWidth, ({
|
|
42
|
+
$canvasHeight
|
|
43
|
+
}) => $canvasHeight, ({
|
|
44
|
+
$scale
|
|
45
|
+
}) => $scale);
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/** Text fragment with an optional custom color. */
|
|
2
|
+
export type NativeRichMediaText = {
|
|
3
|
+
/** Text content. */
|
|
4
|
+
text: string;
|
|
5
|
+
/** CSS text color; falls back to the block's default. */
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
/** What happens when an interactive element is tapped. */
|
|
9
|
+
export type NativeRichMediaAction = {
|
|
10
|
+
type: 'close';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'url';
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
/** Button rendered inside a rich media block. */
|
|
16
|
+
export type NativeRichMediaButton = {
|
|
17
|
+
/** Button caption. */
|
|
18
|
+
text: string;
|
|
19
|
+
/** CSS caption color. */
|
|
20
|
+
textColor?: string;
|
|
21
|
+
/** CSS background of the button. */
|
|
22
|
+
background?: string;
|
|
23
|
+
/** Corner radius in pt. */
|
|
24
|
+
cornerRadius?: number;
|
|
25
|
+
/** Tap action. */
|
|
26
|
+
action?: NativeRichMediaAction;
|
|
27
|
+
};
|
|
28
|
+
/** Reward panel shown after winning a scratchcard or spinwheel. */
|
|
29
|
+
export type NativeRichMediaReward = {
|
|
30
|
+
/** Panel heading. */
|
|
31
|
+
title?: NativeRichMediaText;
|
|
32
|
+
/** Panel body text. */
|
|
33
|
+
message?: NativeRichMediaText;
|
|
34
|
+
/** Promo code displayed with a copy control. */
|
|
35
|
+
code?: string;
|
|
36
|
+
/** Caption of the confirmation button. */
|
|
37
|
+
button?: string;
|
|
38
|
+
/** Confirmation button action. */
|
|
39
|
+
action?: NativeRichMediaAction;
|
|
40
|
+
};
|
|
41
|
+
/** Content of a `modal` rich media. */
|
|
42
|
+
export type NativeRichMediaModalBlock = {
|
|
43
|
+
/** CSS background of the modal card. */
|
|
44
|
+
background?: string;
|
|
45
|
+
/** Heading. */
|
|
46
|
+
title?: NativeRichMediaText;
|
|
47
|
+
/** Body text. */
|
|
48
|
+
message?: NativeRichMediaText;
|
|
49
|
+
/** Cover image URL. */
|
|
50
|
+
image?: string;
|
|
51
|
+
/** Show a close (✕) chip. */
|
|
52
|
+
showClose?: boolean;
|
|
53
|
+
/** Dim the screen behind the card (default `true`). */
|
|
54
|
+
dimBackground?: boolean;
|
|
55
|
+
/** Action buttons under the message. */
|
|
56
|
+
buttons?: NativeRichMediaButton[];
|
|
57
|
+
};
|
|
58
|
+
/** Content of a `sheet` rich media; same shape as {@link NativeRichMediaModalBlock}, docked to the bottom. */
|
|
59
|
+
export type NativeRichMediaSheetBlock = NativeRichMediaModalBlock;
|
|
60
|
+
/** Single card of a `carousel` rich media. */
|
|
61
|
+
export type NativeRichMediaCarouselItem = {
|
|
62
|
+
/** Card image URL. */
|
|
63
|
+
image?: string;
|
|
64
|
+
/** Card heading. */
|
|
65
|
+
title?: string;
|
|
66
|
+
/** Card secondary text. */
|
|
67
|
+
subtitle?: string;
|
|
68
|
+
/** URL opened when the card is tapped. */
|
|
69
|
+
url?: string;
|
|
70
|
+
};
|
|
71
|
+
/** Content of a `carousel` rich media. */
|
|
72
|
+
export type NativeRichMediaCarouselBlock = {
|
|
73
|
+
/** Carousel cards. */
|
|
74
|
+
items: NativeRichMediaCarouselItem[];
|
|
75
|
+
/** Show a close (✕) chip. */
|
|
76
|
+
showClose?: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Single slide of a `stories` rich media. */
|
|
79
|
+
export type NativeRichMediaStoryItem = {
|
|
80
|
+
/** Slide image URL. */
|
|
81
|
+
image?: string;
|
|
82
|
+
/** Slide heading. */
|
|
83
|
+
title?: string;
|
|
84
|
+
/** Slide secondary text. */
|
|
85
|
+
subtitle?: string;
|
|
86
|
+
/** Caption of the slide's action button. */
|
|
87
|
+
button?: string;
|
|
88
|
+
/** URL opened by the action button. */
|
|
89
|
+
url?: string;
|
|
90
|
+
/** Slide duration in seconds. */
|
|
91
|
+
duration?: number;
|
|
92
|
+
};
|
|
93
|
+
/** Content of a `stories` rich media. */
|
|
94
|
+
export type NativeRichMediaStoriesBlock = {
|
|
95
|
+
/** Story slides. */
|
|
96
|
+
items: NativeRichMediaStoryItem[];
|
|
97
|
+
/** Restart from the first slide after the last one. */
|
|
98
|
+
loop?: boolean;
|
|
99
|
+
/** Show a close (✕) chip. */
|
|
100
|
+
showClose?: boolean;
|
|
101
|
+
};
|
|
102
|
+
/** Content of a `banner` rich media. */
|
|
103
|
+
export type NativeRichMediaBannerBlock = {
|
|
104
|
+
/** Screen edge the banner is docked to (default `bottom`). */
|
|
105
|
+
position?: 'top' | 'bottom';
|
|
106
|
+
/** Leading image URL. */
|
|
107
|
+
image?: string;
|
|
108
|
+
/** Heading. */
|
|
109
|
+
title?: NativeRichMediaText;
|
|
110
|
+
/** Body text. */
|
|
111
|
+
message?: NativeRichMediaText;
|
|
112
|
+
/** CSS background of the banner. */
|
|
113
|
+
background?: string;
|
|
114
|
+
/** Tap action. */
|
|
115
|
+
action?: NativeRichMediaAction;
|
|
116
|
+
/** Auto-dismiss timeout in seconds. */
|
|
117
|
+
autoDismiss?: number;
|
|
118
|
+
/** Show a close (✕) chip. */
|
|
119
|
+
showClose?: boolean;
|
|
120
|
+
};
|
|
121
|
+
/** Content of a `fullscreen` rich media. */
|
|
122
|
+
export type NativeRichMediaFullscreenBlock = {
|
|
123
|
+
/** Cover image URL. */
|
|
124
|
+
image?: string;
|
|
125
|
+
/** Heading. */
|
|
126
|
+
title?: NativeRichMediaText;
|
|
127
|
+
/** Body text. */
|
|
128
|
+
message?: NativeRichMediaText;
|
|
129
|
+
/** Action buttons at the bottom. */
|
|
130
|
+
buttons?: NativeRichMediaButton[];
|
|
131
|
+
/** Show a close (✕) chip. */
|
|
132
|
+
showClose?: boolean;
|
|
133
|
+
};
|
|
134
|
+
/** Content of a `video` rich media. */
|
|
135
|
+
export type NativeRichMediaVideoBlock = {
|
|
136
|
+
/** Video URL. */
|
|
137
|
+
url?: string;
|
|
138
|
+
/** Poster image URL shown before playback. */
|
|
139
|
+
poster?: string;
|
|
140
|
+
/** Image URL shown when the video cannot be played. */
|
|
141
|
+
fallback?: string;
|
|
142
|
+
/** Heading over the video. */
|
|
143
|
+
title?: NativeRichMediaText;
|
|
144
|
+
/** Body text over the video. */
|
|
145
|
+
message?: NativeRichMediaText;
|
|
146
|
+
/** Caption of the action button. */
|
|
147
|
+
button?: string;
|
|
148
|
+
/** Action button action. */
|
|
149
|
+
action?: NativeRichMediaAction;
|
|
150
|
+
/** Loop playback. */
|
|
151
|
+
loop?: boolean;
|
|
152
|
+
/** Start playback muted. */
|
|
153
|
+
muted?: boolean;
|
|
154
|
+
/** Show a close (✕) chip. */
|
|
155
|
+
showClose?: boolean;
|
|
156
|
+
};
|
|
157
|
+
/** Content of a `pip` (picture-in-picture) rich media. */
|
|
158
|
+
export type NativeRichMediaPipBlock = {
|
|
159
|
+
/** Video URL. */
|
|
160
|
+
url?: string;
|
|
161
|
+
/** Poster image URL shown before playback. */
|
|
162
|
+
poster?: string;
|
|
163
|
+
/** Image URL shown when the video cannot be played. */
|
|
164
|
+
fallback?: string;
|
|
165
|
+
/** Screen corner the pip window is docked to (default `bottom-right`). */
|
|
166
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
167
|
+
/** Pip window width in pt. */
|
|
168
|
+
width?: number;
|
|
169
|
+
/** Width-to-height ratio of the pip window. */
|
|
170
|
+
aspectRatio?: number;
|
|
171
|
+
/** Corner radius in pt. */
|
|
172
|
+
cornerRadius?: number;
|
|
173
|
+
/** Loop playback. */
|
|
174
|
+
loop?: boolean;
|
|
175
|
+
/** Start playback muted. */
|
|
176
|
+
muted?: boolean;
|
|
177
|
+
/** Caption of the action button. */
|
|
178
|
+
button?: string;
|
|
179
|
+
/** Action button action. */
|
|
180
|
+
action?: NativeRichMediaAction;
|
|
181
|
+
/** Show a close (✕) chip. */
|
|
182
|
+
showClose?: boolean;
|
|
183
|
+
};
|
|
184
|
+
/** Scratch layer of a {@link NativeRichMediaScratchcardBlock}. */
|
|
185
|
+
export type NativeRichMediaScratchcardCover = {
|
|
186
|
+
/** Cover image URL. */
|
|
187
|
+
image?: string;
|
|
188
|
+
/** CSS cover color used when there is no image. */
|
|
189
|
+
color?: string;
|
|
190
|
+
};
|
|
191
|
+
/** Content of a `scratchcard` rich media. */
|
|
192
|
+
export type NativeRichMediaScratchcardBlock = {
|
|
193
|
+
/** CSS background: a color or gradient stops. */
|
|
194
|
+
background?: string | string[];
|
|
195
|
+
/** Heading. */
|
|
196
|
+
title?: NativeRichMediaText;
|
|
197
|
+
/** Body text. */
|
|
198
|
+
message?: NativeRichMediaText;
|
|
199
|
+
/** Scratch layer hiding the reward. */
|
|
200
|
+
cover?: NativeRichMediaScratchcardCover;
|
|
201
|
+
/** Scratched-area fraction (0–1) that reveals the reward. */
|
|
202
|
+
revealThreshold?: number;
|
|
203
|
+
/** Caption of the instant-reveal button. */
|
|
204
|
+
revealButton?: string;
|
|
205
|
+
/** Reward revealed under the cover. */
|
|
206
|
+
reward?: NativeRichMediaReward;
|
|
207
|
+
/** Show a close (✕) chip. */
|
|
208
|
+
showClose?: boolean;
|
|
209
|
+
};
|
|
210
|
+
/** Single sector of a {@link NativeRichMediaSpinwheelBlock}. */
|
|
211
|
+
export type NativeRichMediaSpinwheelSegment = {
|
|
212
|
+
/** Sector caption. */
|
|
213
|
+
text: string;
|
|
214
|
+
/** CSS sector fill color. */
|
|
215
|
+
color?: string;
|
|
216
|
+
/** CSS caption color. */
|
|
217
|
+
textColor?: string;
|
|
218
|
+
/** Relative sector size; defaults to an even split. */
|
|
219
|
+
weight?: number;
|
|
220
|
+
/** Reward granted when the wheel stops on this sector. */
|
|
221
|
+
reward?: NativeRichMediaReward;
|
|
222
|
+
};
|
|
223
|
+
/** Content of a `spinwheel` rich media. */
|
|
224
|
+
export type NativeRichMediaSpinwheelBlock = {
|
|
225
|
+
/** CSS background: a color or gradient stops. */
|
|
226
|
+
background?: string | string[];
|
|
227
|
+
/** Heading. */
|
|
228
|
+
title?: NativeRichMediaText;
|
|
229
|
+
/** Body text. */
|
|
230
|
+
message?: NativeRichMediaText;
|
|
231
|
+
/** Index of the winning segment; omit for a losing spin. */
|
|
232
|
+
winIndex?: number;
|
|
233
|
+
/** Caption of the spin button. */
|
|
234
|
+
spinButton?: string;
|
|
235
|
+
/** Wheel sectors. */
|
|
236
|
+
segments: NativeRichMediaSpinwheelSegment[];
|
|
237
|
+
/** Reward shown after a winning spin. */
|
|
238
|
+
reward?: NativeRichMediaReward;
|
|
239
|
+
/** Heading shown after a losing spin. */
|
|
240
|
+
loseTitle?: NativeRichMediaText;
|
|
241
|
+
/** Show a close (✕) chip. */
|
|
242
|
+
showClose?: boolean;
|
|
243
|
+
};
|
|
244
|
+
/** Native rich media config: a display type and the matching content block. */
|
|
245
|
+
export type NativeRichMediaConfig = {
|
|
246
|
+
displayType: 'modal';
|
|
247
|
+
modal: NativeRichMediaModalBlock;
|
|
248
|
+
} | {
|
|
249
|
+
displayType: 'sheet';
|
|
250
|
+
sheet: NativeRichMediaSheetBlock;
|
|
251
|
+
} | {
|
|
252
|
+
displayType: 'carousel';
|
|
253
|
+
carousel: NativeRichMediaCarouselBlock;
|
|
254
|
+
} | {
|
|
255
|
+
displayType: 'stories';
|
|
256
|
+
stories: NativeRichMediaStoriesBlock;
|
|
257
|
+
} | {
|
|
258
|
+
displayType: 'banner';
|
|
259
|
+
banner: NativeRichMediaBannerBlock;
|
|
260
|
+
} | {
|
|
261
|
+
displayType: 'fullscreen';
|
|
262
|
+
fullscreen: NativeRichMediaFullscreenBlock;
|
|
263
|
+
} | {
|
|
264
|
+
displayType: 'video';
|
|
265
|
+
video: NativeRichMediaVideoBlock;
|
|
266
|
+
} | {
|
|
267
|
+
displayType: 'pip';
|
|
268
|
+
pip: NativeRichMediaPipBlock;
|
|
269
|
+
} | {
|
|
270
|
+
displayType: 'scratchcard';
|
|
271
|
+
scratchcard: NativeRichMediaScratchcardBlock;
|
|
272
|
+
} | {
|
|
273
|
+
displayType: 'spinwheel';
|
|
274
|
+
spinwheel: NativeRichMediaSpinwheelBlock;
|
|
275
|
+
};
|
|
276
|
+
/** Supported rich media display types. */
|
|
277
|
+
export type NativeRichMediaDisplayType = NativeRichMediaConfig['displayType'];
|
|
278
|
+
/** All supported {@link NativeRichMediaDisplayType} values. */
|
|
279
|
+
export declare const NATIVE_RICH_MEDIA_DISPLAY_TYPES: NativeRichMediaDisplayType[];
|
|
280
|
+
/** Props of {@link NativeRichMediaPreview}. */
|
|
281
|
+
export type NativeRichMediaPreviewProps = {
|
|
282
|
+
/** Rich media config, as an object or a JSON string. */
|
|
283
|
+
content: string | NativeRichMediaConfig;
|
|
284
|
+
/** Accessible name of the preview (rendered as the `title` attribute). */
|
|
285
|
+
name?: string;
|
|
286
|
+
/** Preview width; number is treated as px (default `304`). */
|
|
287
|
+
width?: string | number;
|
|
288
|
+
/** Preview height; number is treated as px (default `659`). */
|
|
289
|
+
height?: string | number;
|
|
290
|
+
/** Show a spinner instead of the content. */
|
|
291
|
+
isLoading?: boolean;
|
|
292
|
+
/** Render the container chrome — white backdrop and border (default `true`). Set `false` for a transparent preview over the consumer's own background. */
|
|
293
|
+
withBackground?: boolean;
|
|
294
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, CloseGlyph, TextContainer } from './styles';
|
|
3
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
4
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
5
|
+
import { PT } from '../../helpers';
|
|
6
|
+
import { TemplateLayer } from '../../styles';
|
|
7
|
+
export function NativeRichMediaBannerView(props) {
|
|
8
|
+
const {
|
|
9
|
+
block
|
|
10
|
+
} = props;
|
|
11
|
+
const isTop = block.position === 'top';
|
|
12
|
+
return _jsx(TemplateLayer, {
|
|
13
|
+
children: _jsxs(Card, {
|
|
14
|
+
"$top": isTop ? PT.SAFE_TOP + 10 : undefined,
|
|
15
|
+
"$bottom": isTop ? undefined : PT.SAFE_BOTTOM + 10,
|
|
16
|
+
"$background": block.background || '#1F1F1F',
|
|
17
|
+
children: [block.image && _jsx(NativeRichMediaCoverImg, {
|
|
18
|
+
url: block.image,
|
|
19
|
+
width: 52,
|
|
20
|
+
height: 52,
|
|
21
|
+
borderRadius: 12,
|
|
22
|
+
flex: "none"
|
|
23
|
+
}), _jsxs(TextContainer, {
|
|
24
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
25
|
+
value: block.title,
|
|
26
|
+
size: 16,
|
|
27
|
+
weight: 600,
|
|
28
|
+
fallbackColor: "#FFFFFF",
|
|
29
|
+
align: "left",
|
|
30
|
+
truncate: true
|
|
31
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
32
|
+
value: block.message,
|
|
33
|
+
size: 13,
|
|
34
|
+
weight: 400,
|
|
35
|
+
fallbackColor: "rgba(255,255,255,0.7)",
|
|
36
|
+
align: "left",
|
|
37
|
+
lineHeight: 1.3,
|
|
38
|
+
clamp2: true,
|
|
39
|
+
marginTop: block.title ? 2 : undefined
|
|
40
|
+
})]
|
|
41
|
+
}), block.showClose !== false && _jsx(CloseGlyph, {
|
|
42
|
+
children: "\u2715"
|
|
43
|
+
})]
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaBannerView } from './NativeRichMediaBannerView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaBannerView } from './NativeRichMediaBannerView';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Card: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$background: string;
|
|
3
|
+
$top?: number;
|
|
4
|
+
$bottom?: number;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const TextContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const CloseGlyph: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Card = styled.div.withConfig({
|
|
3
|
+
displayName: "Card",
|
|
4
|
+
componentId: "sc-1fs78cm-0"
|
|
5
|
+
})(["position:absolute;left:12px;right:12px;border-radius:18px;box-shadow:0 16px 28px rgba(0,0,0,0.28);padding:12px 14px;display:flex;align-items:center;gap:12px;background:", ";", " ", ""], ({
|
|
6
|
+
$background
|
|
7
|
+
}) => $background, ({
|
|
8
|
+
$top
|
|
9
|
+
}) => $top !== undefined ? `top: ${$top}px;` : '', ({
|
|
10
|
+
$bottom
|
|
11
|
+
}) => $bottom !== undefined ? `bottom: ${$bottom}px;` : '');
|
|
12
|
+
export const TextContainer = styled.div.withConfig({
|
|
13
|
+
displayName: "TextContainer",
|
|
14
|
+
componentId: "sc-1fs78cm-1"
|
|
15
|
+
})(["flex:1;min-width:0;"]);
|
|
16
|
+
export const CloseGlyph = styled.div.withConfig({
|
|
17
|
+
displayName: "CloseGlyph",
|
|
18
|
+
componentId: "sc-1fs78cm-2"
|
|
19
|
+
})(["flex:none;width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,0.6);font-size:13px;font-weight:700;"]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/NativeRichMediaPreview/views/NativeRichMediaCarouselView/NativeRichMediaCarouselView.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Dot, Dots, GradientOverlay, SubtitleText, TextBlock, TitleText } from './styles';
|
|
3
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
4
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
5
|
+
import { asText } from '../../helpers';
|
|
6
|
+
import { TemplateLayer } from '../../styles';
|
|
7
|
+
export function NativeRichMediaCarouselView(props) {
|
|
8
|
+
const {
|
|
9
|
+
block,
|
|
10
|
+
activeIndex,
|
|
11
|
+
onNavigate
|
|
12
|
+
} = props;
|
|
13
|
+
const items = block.items;
|
|
14
|
+
const idx = Math.max(0, Math.min(activeIndex, items.length - 1));
|
|
15
|
+
const item = items[idx] || {};
|
|
16
|
+
return _jsx(TemplateLayer, {
|
|
17
|
+
children: _jsxs(Card, {
|
|
18
|
+
children: [_jsx(NativeRichMediaCoverImg, {
|
|
19
|
+
url: item.image,
|
|
20
|
+
position: "absolute",
|
|
21
|
+
inset: true
|
|
22
|
+
}), (item.title || item.subtitle) && _jsxs(_Fragment, {
|
|
23
|
+
children: [_jsx(GradientOverlay, {}), _jsxs(TextBlock, {
|
|
24
|
+
children: [item.title && _jsx(TitleText, {
|
|
25
|
+
children: asText(item.title)
|
|
26
|
+
}), item.subtitle && _jsx(SubtitleText, {
|
|
27
|
+
children: asText(item.subtitle)
|
|
28
|
+
})]
|
|
29
|
+
})]
|
|
30
|
+
}), items.length > 1 && _jsx(Dots, {
|
|
31
|
+
children: items.map((_, i) => _jsx(Dot
|
|
32
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
33
|
+
, {
|
|
34
|
+
"$active": i === idx,
|
|
35
|
+
onClick: () => onNavigate(i)
|
|
36
|
+
}, `carousel-dot-${i}`))
|
|
37
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
38
|
+
top: 12,
|
|
39
|
+
right: 12
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaCarouselView } from './NativeRichMediaCarouselView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaCarouselView } from './NativeRichMediaCarouselView';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const Card: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const GradientOverlay: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const TextBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const TitleText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const SubtitleText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const Dots: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const Dot: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
$active?: boolean;
|
|
9
|
+
}, never>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Card = styled.div.withConfig({
|
|
3
|
+
displayName: "Card",
|
|
4
|
+
componentId: "sc-15b2cux-0"
|
|
5
|
+
})(["position:absolute;left:22px;right:22px;top:50%;transform:translateY(-50%);height:461px;border-radius:24px;background:#000;overflow:hidden;box-shadow:0 16px 28px rgba(0,0,0,0.28);"]);
|
|
6
|
+
export const GradientOverlay = styled.div.withConfig({
|
|
7
|
+
displayName: "GradientOverlay",
|
|
8
|
+
componentId: "sc-15b2cux-1"
|
|
9
|
+
})(["position:absolute;left:0;right:0;bottom:0;height:140px;background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,0.75));"]);
|
|
10
|
+
export const TextBlock = styled.div.withConfig({
|
|
11
|
+
displayName: "TextBlock",
|
|
12
|
+
componentId: "sc-15b2cux-2"
|
|
13
|
+
})(["position:absolute;left:18px;right:18px;bottom:36px;"]);
|
|
14
|
+
export const TitleText = styled.div.withConfig({
|
|
15
|
+
displayName: "TitleText",
|
|
16
|
+
componentId: "sc-15b2cux-3"
|
|
17
|
+
})(["font-size:20px;font-weight:700;color:#FFF;line-height:1.25;"]);
|
|
18
|
+
export const SubtitleText = styled.div.withConfig({
|
|
19
|
+
displayName: "SubtitleText",
|
|
20
|
+
componentId: "sc-15b2cux-4"
|
|
21
|
+
})(["font-size:14px;color:rgba(255,255,255,0.85);margin-top:3px;"]);
|
|
22
|
+
export const Dots = styled.div.withConfig({
|
|
23
|
+
displayName: "Dots",
|
|
24
|
+
componentId: "sc-15b2cux-5"
|
|
25
|
+
})(["position:absolute;left:0;right:0;bottom:12px;text-align:center;font-size:0;"]);
|
|
26
|
+
export const Dot = styled.div.withConfig({
|
|
27
|
+
displayName: "Dot",
|
|
28
|
+
componentId: "sc-15b2cux-6"
|
|
29
|
+
})(["display:inline-block;width:7px;height:7px;border-radius:50%;margin:0 4.5px;cursor:pointer;background:", ";"], ({
|
|
30
|
+
$active
|
|
31
|
+
}) => $active ? '#FFF' : 'rgba(255,255,255,0.4)');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/NativeRichMediaPreview/views/NativeRichMediaFullscreenView/NativeRichMediaFullscreenView.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { GradientOverlay, TextBlock } from './styles';
|
|
3
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
4
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
5
|
+
import { NativeRichMediaOverlayButtons } from '../../components/NativeRichMediaOverlayButtons';
|
|
6
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
7
|
+
import { PT } from '../../helpers';
|
|
8
|
+
import { TemplateLayer } from '../../styles';
|
|
9
|
+
export function NativeRichMediaFullscreenView(props) {
|
|
10
|
+
const {
|
|
11
|
+
block
|
|
12
|
+
} = props;
|
|
13
|
+
const hasButtons = (block.buttons || []).length > 0;
|
|
14
|
+
return _jsxs(TemplateLayer, {
|
|
15
|
+
children: [_jsx(NativeRichMediaCoverImg, {
|
|
16
|
+
url: block.image,
|
|
17
|
+
position: "absolute",
|
|
18
|
+
inset: true,
|
|
19
|
+
backgroundColor: "#1A1A1E"
|
|
20
|
+
}), _jsx(GradientOverlay, {}), _jsxs(TextBlock, {
|
|
21
|
+
"$bottom": PT.SAFE_BOTTOM + 28,
|
|
22
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
23
|
+
value: block.title,
|
|
24
|
+
size: 30,
|
|
25
|
+
weight: 700,
|
|
26
|
+
fallbackColor: "#FFFFFF"
|
|
27
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
28
|
+
value: block.message,
|
|
29
|
+
size: 16,
|
|
30
|
+
weight: 400,
|
|
31
|
+
fallbackColor: "rgba(255,255,255,0.85)",
|
|
32
|
+
align: "left",
|
|
33
|
+
marginTop: block.title ? 8 : undefined
|
|
34
|
+
}), hasButtons && _jsx(NativeRichMediaOverlayButtons, {
|
|
35
|
+
buttons: block.buttons
|
|
36
|
+
})]
|
|
37
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
38
|
+
top: PT.SAFE_TOP + 12,
|
|
39
|
+
right: 16
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaFullscreenView } from './NativeRichMediaFullscreenView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaFullscreenView } from './NativeRichMediaFullscreenView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GradientOverlay, TextBlock } from '../shared/styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GradientOverlay, TextBlock } from '../shared/styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Placeholder } from './styles';
|
|
3
|
+
import { Lang } from '../../polyglot';
|
|
4
|
+
export function NativeRichMediaInvalidView() {
|
|
5
|
+
return _jsx(Placeholder, {
|
|
6
|
+
children: _jsx(Lang, {
|
|
7
|
+
message: "DUMB.NATIVE_RICH_MEDIA_PREVIEW.INVALID_CONFIG"
|
|
8
|
+
})
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaInvalidView } from './NativeRichMediaInvalidView';
|