@pushwoosh/dumb-components 1.1.161 → 1.1.162
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/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,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
3
|
+
import { Card } from './styles';
|
|
4
|
+
import { NativeRichMediaCardButtons } from '../../components/NativeRichMediaCardButtons';
|
|
5
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
6
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
7
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
8
|
+
import { SECONDARY_LABEL } from '../../helpers';
|
|
9
|
+
import { TemplateLayer } from '../../styles';
|
|
10
|
+
export function NativeRichMediaModalView(props) {
|
|
11
|
+
const {
|
|
12
|
+
block
|
|
13
|
+
} = props;
|
|
14
|
+
const background = block.background || '#FFFFFF';
|
|
15
|
+
const hasButtons = (block.buttons || []).length > 0;
|
|
16
|
+
return _jsx(TemplateLayer, {
|
|
17
|
+
children: _jsxs(Card, {
|
|
18
|
+
"$background": background,
|
|
19
|
+
children: [block.image && _jsx(NativeRichMediaCoverImg, {
|
|
20
|
+
url: block.image,
|
|
21
|
+
margin: "14px 14px 0",
|
|
22
|
+
height: 179,
|
|
23
|
+
borderRadius: 18
|
|
24
|
+
}), (block.title || block.message) && _jsxs(Vertical, {
|
|
25
|
+
"$padding": (block.image ? '20px' : '30px') + ' 24px 0',
|
|
26
|
+
"$gap": 8,
|
|
27
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
28
|
+
value: block.title,
|
|
29
|
+
size: 24,
|
|
30
|
+
weight: 800,
|
|
31
|
+
fallbackColor: "#000000",
|
|
32
|
+
align: "center"
|
|
33
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
34
|
+
value: block.message,
|
|
35
|
+
size: 15,
|
|
36
|
+
weight: 400,
|
|
37
|
+
fallbackColor: SECONDARY_LABEL,
|
|
38
|
+
align: "center",
|
|
39
|
+
lineHeight: "21.5px"
|
|
40
|
+
})]
|
|
41
|
+
}), _jsx(NativeRichMediaCardButtons, {
|
|
42
|
+
buttons: block.buttons,
|
|
43
|
+
"$padding": hasButtons ? '24px 20px 20px' : '0 0 20px'
|
|
44
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
45
|
+
top: 20,
|
|
46
|
+
right: 20
|
|
47
|
+
})]
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaModalView } from './NativeRichMediaModalView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaModalView } from './NativeRichMediaModalView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Frame } from './styles';
|
|
3
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
4
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
5
|
+
import { NativeRichMediaExpandChip } from '../../components/NativeRichMediaExpandChip';
|
|
6
|
+
import { NativeRichMediaMuteChip } from '../../components/NativeRichMediaMuteChip';
|
|
7
|
+
import { PT } from '../../helpers';
|
|
8
|
+
import { TemplateLayer } from '../../styles';
|
|
9
|
+
export function NativeRichMediaPipView(props) {
|
|
10
|
+
const {
|
|
11
|
+
block
|
|
12
|
+
} = props;
|
|
13
|
+
const raw = Number.isFinite(block.width) ? block.width : 32;
|
|
14
|
+
const frac = Math.min(Math.max(raw > 1 ? raw / 100 : raw, 0.15), 0.7);
|
|
15
|
+
const w = Math.round(PT.W * frac);
|
|
16
|
+
const aspectRatio = Number.isFinite(block.aspectRatio) ? block.aspectRatio : 0.5625;
|
|
17
|
+
const h = Math.max(0, Math.round(w * aspectRatio));
|
|
18
|
+
const cornerRadius = Number.isFinite(block.cornerRadius) ? block.cornerRadius : 16;
|
|
19
|
+
const r = Math.min(cornerRadius, h / 2);
|
|
20
|
+
const position = block.position || 'bottom-right';
|
|
21
|
+
const isTop = position.includes('top');
|
|
22
|
+
const isLeft = position.includes('left');
|
|
23
|
+
return _jsx(TemplateLayer, {
|
|
24
|
+
children: _jsxs(Frame, {
|
|
25
|
+
"$width": w,
|
|
26
|
+
"$height": h,
|
|
27
|
+
"$radius": r,
|
|
28
|
+
"$top": isTop ? PT.SAFE_TOP + 14 : undefined,
|
|
29
|
+
"$bottom": isTop ? undefined : PT.SAFE_BOTTOM + 14,
|
|
30
|
+
"$left": isLeft ? 14 : undefined,
|
|
31
|
+
"$right": isLeft ? undefined : 14,
|
|
32
|
+
children: [block.poster && _jsx(NativeRichMediaCoverImg, {
|
|
33
|
+
url: block.poster,
|
|
34
|
+
position: "absolute",
|
|
35
|
+
inset: true
|
|
36
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
37
|
+
top: 6,
|
|
38
|
+
right: 6,
|
|
39
|
+
small: true
|
|
40
|
+
}), _jsx(NativeRichMediaMuteChip, {
|
|
41
|
+
muted: block.muted,
|
|
42
|
+
small: true,
|
|
43
|
+
bottom: 6,
|
|
44
|
+
right: 6
|
|
45
|
+
}), _jsx(NativeRichMediaExpandChip, {
|
|
46
|
+
bottom: 6,
|
|
47
|
+
left: 6
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaPipView } from './NativeRichMediaPipView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaPipView } from './NativeRichMediaPipView';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Frame = styled.div.withConfig({
|
|
3
|
+
displayName: "Frame",
|
|
4
|
+
componentId: "sc-hjtwid-0"
|
|
5
|
+
})(["position:absolute;overflow:hidden;background:#000;box-shadow:0 16px 28px rgba(0,0,0,0.28);width:", "px;height:", "px;border-radius:", "px;", " ", " ", " ", ""], ({
|
|
6
|
+
$width
|
|
7
|
+
}) => $width, ({
|
|
8
|
+
$height
|
|
9
|
+
}) => $height, ({
|
|
10
|
+
$radius
|
|
11
|
+
}) => $radius, ({
|
|
12
|
+
$top
|
|
13
|
+
}) => $top !== undefined ? `top: ${$top}px;` : '', ({
|
|
14
|
+
$bottom
|
|
15
|
+
}) => $bottom !== undefined ? `bottom: ${$bottom}px;` : '', ({
|
|
16
|
+
$left
|
|
17
|
+
}) => $left !== undefined ? `left: ${$left}px;` : '', ({
|
|
18
|
+
$right
|
|
19
|
+
}) => $right !== undefined ? `right: ${$right}px;` : '');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, HintOverlay, HintText, RevealArea, RevealButtonText, RewardSlot } from './styles';
|
|
3
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
4
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
5
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
6
|
+
import { NativeRichMediaRewardPanel } from '../../components/NativeRichMediaRewardPanel';
|
|
7
|
+
import { asText, contrastOn, surfaceBackground, surfaceBaseHex, withAlpha } from '../../helpers';
|
|
8
|
+
import { ScribbleIcon } from '../../icons';
|
|
9
|
+
import { Lang } from '../../polyglot';
|
|
10
|
+
import { TemplateLayer } from '../../styles';
|
|
11
|
+
export function NativeRichMediaScratchcardView(props) {
|
|
12
|
+
const {
|
|
13
|
+
block
|
|
14
|
+
} = props;
|
|
15
|
+
const baseHex = surfaceBaseHex(block.background) || '#FFFFFF';
|
|
16
|
+
const cardText = contrastOn(baseHex);
|
|
17
|
+
const cover = block.cover || {};
|
|
18
|
+
const coverBase = cover.color || '#C7C7C7';
|
|
19
|
+
const hintColor = withAlpha(contrastOn(coverBase), 0.45);
|
|
20
|
+
return _jsx(TemplateLayer, {
|
|
21
|
+
children: _jsxs(Card, {
|
|
22
|
+
"$background": surfaceBackground(block.background, '#FFFFFF'),
|
|
23
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
24
|
+
value: block.title,
|
|
25
|
+
size: 24,
|
|
26
|
+
weight: 800,
|
|
27
|
+
fallbackColor: cardText,
|
|
28
|
+
align: "center"
|
|
29
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
30
|
+
value: block.message,
|
|
31
|
+
size: 15,
|
|
32
|
+
weight: 400,
|
|
33
|
+
fallbackColor: withAlpha(cardText, 0.72),
|
|
34
|
+
align: "center",
|
|
35
|
+
marginTop: 14,
|
|
36
|
+
lineHeight: "20px"
|
|
37
|
+
}), _jsxs(RevealArea, {
|
|
38
|
+
children: [_jsx(RewardSlot, {
|
|
39
|
+
children: _jsx(NativeRichMediaRewardPanel, {
|
|
40
|
+
reward: block.reward,
|
|
41
|
+
onBackgroundHex: "#F7F7F7"
|
|
42
|
+
})
|
|
43
|
+
}), cover.image ? _jsx(NativeRichMediaCoverImg, {
|
|
44
|
+
url: cover.image,
|
|
45
|
+
position: "absolute",
|
|
46
|
+
inset: true,
|
|
47
|
+
backgroundColor: cover.color || '#C7C7CC'
|
|
48
|
+
}) : _jsxs(HintOverlay, {
|
|
49
|
+
"$coverBase": coverBase,
|
|
50
|
+
children: [_jsx(ScribbleIcon, {
|
|
51
|
+
color: hintColor
|
|
52
|
+
}), _jsx(HintText, {
|
|
53
|
+
"$color": hintColor,
|
|
54
|
+
children: _jsx(Lang, {
|
|
55
|
+
message: "DUMB.NATIVE_RICH_MEDIA_PREVIEW.SCRATCH_HERE"
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
})]
|
|
59
|
+
}), block.revealButton && _jsx(RevealButtonText, {
|
|
60
|
+
"$color": withAlpha(cardText, 0.8),
|
|
61
|
+
children: asText(block.revealButton)
|
|
62
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
63
|
+
top: 16,
|
|
64
|
+
right: 16
|
|
65
|
+
})]
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaScratchcardView } from './NativeRichMediaScratchcardView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaScratchcardView } from './NativeRichMediaScratchcardView';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const Card: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$background: string;
|
|
3
|
+
$padding: string;
|
|
4
|
+
} & {
|
|
5
|
+
$padding: string;
|
|
6
|
+
}, "$padding">;
|
|
7
|
+
export declare const RevealArea: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const RewardSlot: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const HintOverlay: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
$coverBase: string;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const HintText: import("styled-components").StyledComponent<"div", any, {
|
|
13
|
+
$color: string;
|
|
14
|
+
}, never>;
|
|
15
|
+
export declare const RevealButtonText: import("styled-components").StyledComponent<"div", any, {
|
|
16
|
+
$color: string;
|
|
17
|
+
}, never>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { mixHex } from '../../helpers';
|
|
3
|
+
import { Card as SharedCard } from '../shared/styles';
|
|
4
|
+
export const Card = styled(SharedCard).attrs({
|
|
5
|
+
$padding: '28px 24px 16px'
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "Card",
|
|
8
|
+
componentId: "sc-nguevq-0"
|
|
9
|
+
})([""]);
|
|
10
|
+
export const RevealArea = styled.div.withConfig({
|
|
11
|
+
displayName: "RevealArea",
|
|
12
|
+
componentId: "sc-nguevq-1"
|
|
13
|
+
})(["position:relative;margin-top:14px;height:179px;border-radius:18px;background:#F7F7F7;overflow:hidden;"]);
|
|
14
|
+
export const RewardSlot = styled.div.withConfig({
|
|
15
|
+
displayName: "RewardSlot",
|
|
16
|
+
componentId: "sc-nguevq-2"
|
|
17
|
+
})(["position:absolute;left:16px;right:16px;top:50%;transform:translateY(-50%);"]);
|
|
18
|
+
export const HintOverlay = styled.div.withConfig({
|
|
19
|
+
displayName: "HintOverlay",
|
|
20
|
+
componentId: "sc-nguevq-3"
|
|
21
|
+
})(["position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:", ";"], ({
|
|
22
|
+
$coverBase
|
|
23
|
+
}) => `linear-gradient(135deg, ${mixHex($coverBase, '#FFFFFF', 0.4)}, ${$coverBase} 45%, ${mixHex($coverBase, '#000000', 0.12)})`);
|
|
24
|
+
export const HintText = styled.div.withConfig({
|
|
25
|
+
displayName: "HintText",
|
|
26
|
+
componentId: "sc-nguevq-4"
|
|
27
|
+
})(["font-size:14px;font-weight:600;color:", ";"], ({
|
|
28
|
+
$color
|
|
29
|
+
}) => $color);
|
|
30
|
+
export const RevealButtonText = styled.div.withConfig({
|
|
31
|
+
displayName: "RevealButtonText",
|
|
32
|
+
componentId: "sc-nguevq-5"
|
|
33
|
+
})(["margin-top:14px;text-align:center;font-size:15px;font-weight:600;color:", ";"], ({
|
|
34
|
+
$color
|
|
35
|
+
}) => $color);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
3
|
+
import { Handle, Sheet } from './styles';
|
|
4
|
+
import { NativeRichMediaCardButtons } from '../../components/NativeRichMediaCardButtons';
|
|
5
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
6
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
7
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
8
|
+
import { SECONDARY_LABEL } from '../../helpers';
|
|
9
|
+
import { TemplateLayer } from '../../styles';
|
|
10
|
+
export function NativeRichMediaSheetView(props) {
|
|
11
|
+
const {
|
|
12
|
+
block
|
|
13
|
+
} = props;
|
|
14
|
+
const background = block.background || '#FFFFFF';
|
|
15
|
+
const hasButtons = (block.buttons || []).length > 0;
|
|
16
|
+
return _jsx(TemplateLayer, {
|
|
17
|
+
children: _jsxs(Sheet, {
|
|
18
|
+
"$background": background,
|
|
19
|
+
children: [_jsx(Handle, {}), block.image && _jsx(NativeRichMediaCoverImg, {
|
|
20
|
+
url: block.image,
|
|
21
|
+
margin: "26px 14px 0",
|
|
22
|
+
height: 190,
|
|
23
|
+
borderRadius: 18
|
|
24
|
+
}), (block.title || block.message) && _jsxs(Vertical, {
|
|
25
|
+
"$padding": (block.image ? '16px' : '20px') + ' 24px 0',
|
|
26
|
+
"$gap": 6,
|
|
27
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
28
|
+
value: block.title,
|
|
29
|
+
size: 22,
|
|
30
|
+
weight: 800,
|
|
31
|
+
fallbackColor: "#000000"
|
|
32
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
33
|
+
value: block.message,
|
|
34
|
+
size: 15,
|
|
35
|
+
weight: 400,
|
|
36
|
+
fallbackColor: SECONDARY_LABEL,
|
|
37
|
+
align: "left",
|
|
38
|
+
lineHeight: "20px"
|
|
39
|
+
})]
|
|
40
|
+
}), hasButtons && _jsx(NativeRichMediaCardButtons, {
|
|
41
|
+
buttons: block.buttons,
|
|
42
|
+
"$padding": "24px 20px 0"
|
|
43
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
44
|
+
top: 16,
|
|
45
|
+
right: 16
|
|
46
|
+
})]
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaSheetView } from './NativeRichMediaSheetView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaSheetView } from './NativeRichMediaSheetView';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { TERTIARY_LABEL } from '../../helpers';
|
|
3
|
+
export const Sheet = styled.div.withConfig({
|
|
4
|
+
displayName: "Sheet",
|
|
5
|
+
componentId: "sc-17o8tnc-0"
|
|
6
|
+
})(["position:absolute;left:0;right:0;bottom:0;border-radius:28px 28px 0 0;box-shadow:0 -16px 28px rgba(0,0,0,0.28);padding-bottom:50px;background:", ";"], ({
|
|
7
|
+
$background
|
|
8
|
+
}) => $background);
|
|
9
|
+
export const Handle = styled.div.withConfig({
|
|
10
|
+
displayName: "Handle",
|
|
11
|
+
componentId: "sc-17o8tnc-1"
|
|
12
|
+
})(["width:36px;height:5px;border-radius:2.5px;background:", ";margin:8px auto 0;"], TERTIARY_LABEL);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/NativeRichMediaSpinwheelView.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { Card, Hub, Pointer, Ring, SegmentLabel, Tick, Wheel } from './styles';
|
|
4
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
5
|
+
import { NativeRichMediaPtLabel } from '../../components/NativeRichMediaPtLabel';
|
|
6
|
+
import { SEG_FALLBACK, asText, contrastOn, surfaceBackground, surfaceBaseHex, withAlpha } from '../../helpers';
|
|
7
|
+
import { TemplateLayer } from '../../styles';
|
|
8
|
+
export function NativeRichMediaSpinwheelView(props) {
|
|
9
|
+
const {
|
|
10
|
+
block
|
|
11
|
+
} = props;
|
|
12
|
+
const baseHex = surfaceBaseHex(block.background) || '#FFFFFF';
|
|
13
|
+
const cardText = contrastOn(baseHex);
|
|
14
|
+
const segs = block.segments;
|
|
15
|
+
const hasSegments = segs.length > 0;
|
|
16
|
+
const per = hasSegments ? 360 / segs.length : 0;
|
|
17
|
+
const fills = segs.map((s, i) => s.color || SEG_FALLBACK[i % SEG_FALLBACK.length]);
|
|
18
|
+
const stops = fills.map((c, i) => `${c} ${i * per}deg ${(i + 1) * per}deg`).join(', ');
|
|
19
|
+
return _jsx(TemplateLayer, {
|
|
20
|
+
children: _jsxs(Card, {
|
|
21
|
+
"$background": surfaceBackground(block.background, '#FFFFFF'),
|
|
22
|
+
children: [block.title && _jsx(NativeRichMediaPtLabel, {
|
|
23
|
+
value: block.title,
|
|
24
|
+
size: 24,
|
|
25
|
+
weight: 800,
|
|
26
|
+
fallbackColor: cardText,
|
|
27
|
+
align: "center"
|
|
28
|
+
}), block.message && _jsx(NativeRichMediaPtLabel, {
|
|
29
|
+
value: block.message,
|
|
30
|
+
size: 15,
|
|
31
|
+
weight: 400,
|
|
32
|
+
fallbackColor: withAlpha(cardText, 0.72),
|
|
33
|
+
align: "center",
|
|
34
|
+
marginTop: 14,
|
|
35
|
+
lineHeight: "20px"
|
|
36
|
+
}), hasSegments && _jsxs(Wheel, {
|
|
37
|
+
children: [_jsx(Ring, {
|
|
38
|
+
"$stops": stops,
|
|
39
|
+
children: segs.map((s, i) => {
|
|
40
|
+
const theta = -90 + (i + 0.5) * per;
|
|
41
|
+
return (
|
|
42
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
43
|
+
_jsxs(Fragment, {
|
|
44
|
+
children: [_jsx(Tick, {
|
|
45
|
+
"$rotate": i * per - 180
|
|
46
|
+
}), _jsx(SegmentLabel, {
|
|
47
|
+
"$color": s.textColor || contrastOn(fills[i]),
|
|
48
|
+
"$rotate": theta,
|
|
49
|
+
children: asText(s.text)
|
|
50
|
+
})]
|
|
51
|
+
}, `spin-segment-${i}`)
|
|
52
|
+
);
|
|
53
|
+
})
|
|
54
|
+
}), _jsx(Pointer, {}), _jsx(Hub, {
|
|
55
|
+
children: asText(block.spinButton) || 'SPIN'
|
|
56
|
+
})]
|
|
57
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
58
|
+
top: 16,
|
|
59
|
+
right: 16
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaSpinwheelView } from './NativeRichMediaSpinwheelView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaSpinwheelView } from './NativeRichMediaSpinwheelView';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const Card: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$background: string;
|
|
3
|
+
$padding: string;
|
|
4
|
+
} & {
|
|
5
|
+
$padding: string;
|
|
6
|
+
}, "$padding">;
|
|
7
|
+
export declare const Wheel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Ring: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
$stops: string;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const Tick: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
$rotate: number;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const SegmentLabel: import("styled-components").StyledComponent<"div", any, {
|
|
15
|
+
$color: string;
|
|
16
|
+
$rotate: number;
|
|
17
|
+
}, never>;
|
|
18
|
+
export declare const Pointer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const Hub: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Card as SharedCard } from '../shared/styles';
|
|
3
|
+
export const Card = styled(SharedCard).attrs({
|
|
4
|
+
$padding: '28px 24px 24px'
|
|
5
|
+
}).withConfig({
|
|
6
|
+
displayName: "Card",
|
|
7
|
+
componentId: "sc-1tz3wky-0"
|
|
8
|
+
})([""]);
|
|
9
|
+
export const Wheel = styled.div.withConfig({
|
|
10
|
+
displayName: "Wheel",
|
|
11
|
+
componentId: "sc-1tz3wky-1"
|
|
12
|
+
})(["position:relative;margin-top:14px;width:289px;height:289px;"]);
|
|
13
|
+
export const Ring = styled.div.withConfig({
|
|
14
|
+
displayName: "Ring",
|
|
15
|
+
componentId: "sc-1tz3wky-2"
|
|
16
|
+
})(["position:absolute;inset:30px;border-radius:50%;border:1px solid rgba(255,255,255,0.35);background:", ";"], ({
|
|
17
|
+
$stops
|
|
18
|
+
}) => `conic-gradient(from 0deg, ${$stops})`);
|
|
19
|
+
export const Tick = styled.div.withConfig({
|
|
20
|
+
displayName: "Tick",
|
|
21
|
+
componentId: "sc-1tz3wky-3"
|
|
22
|
+
})(["position:absolute;left:50%;top:50%;width:1px;height:114.5px;background:rgba(255,255,255,0.35);transform-origin:0 0;transform:", ";"], ({
|
|
23
|
+
$rotate
|
|
24
|
+
}) => `rotate(${$rotate}deg)`);
|
|
25
|
+
export const SegmentLabel = styled.div.withConfig({
|
|
26
|
+
displayName: "SegmentLabel",
|
|
27
|
+
componentId: "sc-1tz3wky-4"
|
|
28
|
+
})(["position:absolute;left:50%;top:50%;font-size:14px;font-weight:700;white-space:nowrap;max-width:86px;overflow:hidden;text-overflow:ellipsis;color:", ";transform:", ";"], ({
|
|
29
|
+
$color
|
|
30
|
+
}) => $color, ({
|
|
31
|
+
$rotate
|
|
32
|
+
}) => `translate(-50%,-50%) rotate(${$rotate}deg) translateX(63px)`);
|
|
33
|
+
export const Pointer = styled.div.withConfig({
|
|
34
|
+
displayName: "Pointer",
|
|
35
|
+
componentId: "sc-1tz3wky-5"
|
|
36
|
+
})(["position:absolute;top:4px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-top:26px solid #0F0F0F;filter:drop-shadow(0 2px 3px rgba(0,0,0,0.3));z-index:3;"]);
|
|
37
|
+
export const Hub = styled.div.withConfig({
|
|
38
|
+
displayName: "Hub",
|
|
39
|
+
componentId: "sc-1tz3wky-6"
|
|
40
|
+
})(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:72px;height:72px;border-radius:50%;background:#FFF;color:#000;display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:800;box-shadow:0 3px 8px rgba(0,0,0,0.25);z-index:2;white-space:nowrap;overflow:hidden;padding:0 6px;"]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { GradientOverlay, ProgressFill, ProgressRow, ProgressTrack, SubtitleText, TextBlock, TitleText } from './styles';
|
|
3
|
+
import { NativeRichMediaCloseChip } from '../../components/NativeRichMediaCloseChip';
|
|
4
|
+
import { NativeRichMediaCoverImg } from '../../components/NativeRichMediaCoverImg';
|
|
5
|
+
import { PT, asText } from '../../helpers';
|
|
6
|
+
import { ButtonRow, TemplateLayer } from '../../styles';
|
|
7
|
+
export function NativeRichMediaStoriesView(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 _jsxs(TemplateLayer, {
|
|
17
|
+
children: [_jsx(NativeRichMediaCoverImg, {
|
|
18
|
+
url: item.image,
|
|
19
|
+
position: "absolute",
|
|
20
|
+
inset: true,
|
|
21
|
+
backgroundColor: "#000"
|
|
22
|
+
}), _jsx(GradientOverlay, {}), _jsx(ProgressRow, {
|
|
23
|
+
"$top": PT.SAFE_TOP + 14,
|
|
24
|
+
children: items.map((_, i) => _jsxs(ProgressTrack
|
|
25
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
26
|
+
, {
|
|
27
|
+
onClick: () => onNavigate(i),
|
|
28
|
+
children: [i < idx && _jsx(ProgressFill, {
|
|
29
|
+
"$full": true
|
|
30
|
+
}), i === idx && _jsx(ProgressFill, {})]
|
|
31
|
+
}, `stories-bar-${i}`))
|
|
32
|
+
}), block.showClose !== false && _jsx(NativeRichMediaCloseChip, {
|
|
33
|
+
top: PT.SAFE_TOP + 14 + 3 + 10,
|
|
34
|
+
right: 16
|
|
35
|
+
}), _jsxs(TextBlock, {
|
|
36
|
+
"$bottom": PT.SAFE_BOTTOM + 24,
|
|
37
|
+
children: [item.title && _jsx(TitleText, {
|
|
38
|
+
children: asText(item.title)
|
|
39
|
+
}), item.subtitle && _jsx(SubtitleText, {
|
|
40
|
+
children: asText(item.subtitle)
|
|
41
|
+
}), item.button && item.url && _jsx(ButtonRow, {
|
|
42
|
+
"$marginTop": 16,
|
|
43
|
+
"$borderRadius": 26,
|
|
44
|
+
"$background": "#FFF",
|
|
45
|
+
"$color": "#0F0F0F",
|
|
46
|
+
"$boxShadow": "0 6px 14px rgba(0,0,0,0.28)",
|
|
47
|
+
children: asText(item.button)
|
|
48
|
+
})]
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaStoriesView } from './NativeRichMediaStoriesView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NativeRichMediaStoriesView } from './NativeRichMediaStoriesView';
|