decentraland-ui2 3.4.2 → 3.5.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/dist/Assets/app-store.svg +34 -0
- package/dist/Assets/dcl-logo-qr.svg +7 -0
- package/dist/Assets/download-on-the-app-store.svg +25 -0
- package/dist/Assets/get-in-on-google-play.svg +23 -0
- package/dist/Assets/get-in-on-play-store-button.svg +11 -0
- package/dist/Assets/logo-epic-black.svg +3 -0
- package/dist/Assets/qr-android.svg +1 -0
- package/dist/Assets/qr-ios.svg +1 -0
- package/dist/components/JumpIn/JumpIn.js +1 -4
- package/dist/components/JumpIn/JumpIn.js.map +1 -1
- package/dist/components/JumpIn/JumpIn.stories.js +8 -6
- package/dist/components/JumpIn/JumpIn.stories.js.map +1 -1
- package/dist/components/JumpIn/JumpIn.types.d.ts +1 -1
- package/dist/components/Modal/DownloadModal/DownloadModal.js +33 -12
- package/dist/components/Modal/DownloadModal/DownloadModal.js.map +1 -1
- package/dist/components/Modal/DownloadModal/DownloadModal.stories.d.ts +5 -5
- package/dist/components/Modal/DownloadModal/DownloadModal.stories.js +50 -96
- package/dist/components/Modal/DownloadModal/DownloadModal.stories.js.map +1 -1
- package/dist/components/Modal/DownloadModal/DownloadModal.styled.d.ts +69 -9
- package/dist/components/Modal/DownloadModal/DownloadModal.styled.js +198 -32
- package/dist/components/Modal/DownloadModal/DownloadModal.styled.js.map +1 -1
- package/dist/components/Modal/DownloadModal/DownloadModal.types.d.ts +30 -5
- package/dist/components/Modal/DownloadModal/DownloadQRModal.d.ts +3 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.js +24 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.js.map +1 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.stories.d.ts +9 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.stories.js +66 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.stories.js.map +1 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.styled.d.ts +14 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.styled.js +33 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.styled.js.map +1 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.types.d.ts +19 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.types.js +2 -0
- package/dist/components/Modal/DownloadModal/DownloadQRModal.types.js.map +1 -0
- package/dist/components/Modal/DownloadModal/icons/AppleIcon.d.ts +3 -0
- package/dist/components/Modal/DownloadModal/icons/AppleIcon.js +8 -0
- package/dist/components/Modal/DownloadModal/icons/AppleIcon.js.map +1 -0
- package/dist/components/Modal/DownloadModal/icons/DclIcon.d.ts +3 -0
- package/dist/components/Modal/DownloadModal/icons/DclIcon.js +9 -0
- package/dist/components/Modal/DownloadModal/icons/DclIcon.js.map +1 -0
- package/dist/components/Modal/DownloadModal/icons/VerifiedIcon.d.ts +2 -0
- package/dist/components/Modal/DownloadModal/icons/VerifiedIcon.js +7 -0
- package/dist/components/Modal/DownloadModal/icons/VerifiedIcon.js.map +1 -0
- package/dist/components/Modal/DownloadModal/icons/WindowsIcon.d.ts +3 -0
- package/dist/components/Modal/DownloadModal/icons/WindowsIcon.js +8 -0
- package/dist/components/Modal/DownloadModal/icons/WindowsIcon.js.map +1 -0
- package/dist/components/Modal/DownloadModal/index.d.ts +3 -2
- package/dist/components/Modal/DownloadModal/index.js +1 -1
- package/dist/components/Modal/DownloadModal/index.js.map +1 -1
- package/dist/components/SceneCard/SceneCard.js +6 -3
- package/dist/components/SceneCard/SceneCard.js.map +1 -1
- package/dist/components/ScenesTable/rows/ActionRow/ActionRow.js +6 -3
- package/dist/components/ScenesTable/rows/ActionRow/ActionRow.js.map +1 -1
- package/dist/modules/downloadUrls.d.ts +22 -0
- package/dist/modules/downloadUrls.js +44 -0
- package/dist/modules/downloadUrls.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadModal.stories.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadModal.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DownloadModal.stories.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadModal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAI7D,MAAM,IAAI,GAA6B;IACrC,KAAK,EAAE,gCAAgC;IACvC,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,+EAA+E;oBAC/E,yJAAyJ;oBACzJ,4FAA4F;aAC/F;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,GAAG;aAClB;SACF;KACF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;YAC/C,WAAW,EAAE,oDAAoD;SAClE;QACD,WAAW,EAAE;YACX,WAAW,EAAE,8CAA8C;SAC5D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,qCAAqC;SACnD;QACD,aAAa,EAAE;YACb,WAAW,EAAE,uBAAuB;SACrC;QACD,WAAW,EAAE;YACX,WAAW,EAAE,kDAAkD;SAChE;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,SAAS;SACnB;KACF;CACmC,CAAA;AAItC,MAAM,KAAK,GAAU;IACnB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,aAAa,CAAC,KAAK;QAChC,OAAO,EAAE,aAAa,CAAC,IAAI;QAC3B,aAAa,EAAE,aAAa,CAAC,UAAU;QACvC,WAAW,EAAE,aAAa,CAAC,QAAQ;KACpC;CACF,CAAA;AAED,MAAM,OAAO,GAAU;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,aAAa,CAAC,OAAO;QAClC,OAAO,EAAE,aAAa,CAAC,IAAI;QAC3B,aAAa,EAAE,aAAa,CAAC,UAAU;QACvC,WAAW,EAAE,aAAa,CAAC,QAAQ;KACpC;CACF,CAAA;AAED,MAAM,aAAa,GAAU;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,aAAa,CAAC,UAAU;QACrC,OAAO,EAAE,aAAa,CAAC,IAAI;QAC3B,aAAa,EAAE,aAAa,CAAC,UAAU;QACvC,WAAW,EAAE,aAAa,CAAC,QAAQ;KACpC;CACF,CAAA;AAED,MAAM,SAAS,GAAU;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,KAAK;QACT,WAAW,EAAE,aAAa,CAAC,QAAQ;QACnC,OAAO,EAAE,aAAa,CAAC,IAAI;QAC3B,aAAa,EAAE,aAAa,CAAC,UAAU;QACvC,WAAW,EAAE,aAAa,CAAC,QAAQ;KACpC;CACF,CAAA;AAED,oDAAoD;AACpD,eAAe,IAAI,CAAA;AAEnB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,21 +1,81 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
ref?: ((instance:
|
|
3
|
-
}, "
|
|
1
|
+
declare const StyledModal: import("@emotion/styled").StyledComponent<import("@mui/material").ModalOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "components" | "container" | "className" | "style" | "classes" | "children" | "sx" | "slots" | "slotProps" | "componentsProps" | "open" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "onTransitionEnter" | "onTransitionExited"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
6
|
+
declare const ModalContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
} & {
|
|
11
|
+
mobile?: boolean;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
declare const CloseButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
14
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
15
|
+
}, "disabled" | "color" | "className" | "style" | "classes" | "children" | "sx" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & {
|
|
16
|
+
theme?: import("@emotion/react").Theme;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
declare const ModalTitle: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme;
|
|
20
|
+
as?: React.ElementType;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
22
|
+
declare const DownloadSection: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
23
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
24
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
25
|
+
theme?: import("@emotion/react").Theme;
|
|
26
|
+
}, {}, {}>;
|
|
27
|
+
declare const PrimaryButton: import("@emotion/styled").StyledComponent<{
|
|
28
|
+
theme?: import("@emotion/react").Theme;
|
|
29
|
+
as?: React.ElementType;
|
|
30
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
31
|
+
declare const EpicButton: import("@emotion/styled").StyledComponent<{
|
|
32
|
+
theme?: import("@emotion/react").Theme;
|
|
33
|
+
as?: React.ElementType;
|
|
34
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
35
|
+
declare const StatsRow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
36
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
37
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
38
|
+
theme?: import("@emotion/react").Theme;
|
|
39
|
+
}, {}, {}>;
|
|
40
|
+
declare const StatItem: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
41
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
42
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
43
|
+
theme?: import("@emotion/react").Theme;
|
|
44
|
+
}, {}, {}>;
|
|
45
|
+
declare const StatDivider: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
46
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
47
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
4
48
|
theme?: import("@emotion/react").Theme;
|
|
5
49
|
}, {}, {}>;
|
|
6
|
-
declare const
|
|
7
|
-
ref?: ((instance:
|
|
8
|
-
},
|
|
50
|
+
declare const DividerRow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
51
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
52
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
9
53
|
theme?: import("@emotion/react").Theme;
|
|
10
54
|
}, {}, {}>;
|
|
11
|
-
declare const
|
|
55
|
+
declare const DividerLine: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
56
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
57
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
14
58
|
theme?: import("@emotion/react").Theme;
|
|
15
59
|
}, {}, {}>;
|
|
16
|
-
declare const
|
|
60
|
+
declare const DividerText: import("@emotion/styled").StyledComponent<{
|
|
61
|
+
theme?: import("@emotion/react").Theme;
|
|
62
|
+
as?: React.ElementType;
|
|
63
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
64
|
+
declare const StoreBadge: import("@emotion/styled").StyledComponent<{
|
|
65
|
+
theme?: import("@emotion/react").Theme;
|
|
66
|
+
as?: React.ElementType;
|
|
67
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
68
|
+
declare const PlatformLink: import("@emotion/styled").StyledComponent<{
|
|
69
|
+
theme?: import("@emotion/react").Theme;
|
|
70
|
+
as?: React.ElementType;
|
|
71
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
72
|
+
declare const StoreBadgesRow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
73
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
18
74
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
19
75
|
theme?: import("@emotion/react").Theme;
|
|
20
76
|
}, {}, {}>;
|
|
21
|
-
|
|
77
|
+
declare const MobileCta: import("@emotion/styled").StyledComponent<{
|
|
78
|
+
theme?: import("@emotion/react").Theme;
|
|
79
|
+
as?: React.ElementType;
|
|
80
|
+
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
81
|
+
export { CloseButton, DividerLine, DividerRow, DividerText, DownloadSection, EpicButton, MobileCta, ModalContainer, ModalTitle, PlatformLink, PrimaryButton, StatDivider, StatItem, StatsRow, StoreBadge, StoreBadgesRow, StyledModal };
|
|
@@ -1,43 +1,209 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { Box,
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { Box, IconButton, Modal as MuiModal } from '@mui/material';
|
|
3
|
+
const MODAL_GRADIENT = 'radial-gradient(ellipse at 50% 77%, rgba(116,52,177,1) 0%, rgba(94,40,143,1) 19%, rgba(72,28,108,1) 37%, rgba(43,16,64,1) 100%)';
|
|
4
|
+
const StyledModal = styled(MuiModal)({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
justifyContent: 'center'
|
|
8
|
+
});
|
|
9
|
+
const ModalContainer = styled(Box, {
|
|
10
|
+
shouldForwardProp: prop => prop !== 'mobile'
|
|
11
|
+
})(({ theme, mobile }) => ({
|
|
12
|
+
width: mobile ? 358 : 595,
|
|
13
|
+
background: MODAL_GRADIENT,
|
|
14
|
+
borderRadius: 16,
|
|
15
|
+
position: 'relative',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
gap: 48,
|
|
21
|
+
padding: mobile ? '48px 24px' : '48px 105px',
|
|
22
|
+
outline: 'none',
|
|
23
|
+
[theme.breakpoints.down('sm')]: {
|
|
24
|
+
width: '100vw',
|
|
25
|
+
minHeight: '100vh',
|
|
26
|
+
borderRadius: 0,
|
|
27
|
+
padding: 24
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
const CloseButton = styled(IconButton)({
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
top: 18,
|
|
33
|
+
right: 18,
|
|
34
|
+
color: 'white',
|
|
35
|
+
padding: 8,
|
|
36
|
+
'&:hover': {
|
|
37
|
+
backgroundColor: 'rgba(255,255,255,0.1)'
|
|
38
|
+
},
|
|
39
|
+
'& svg': {
|
|
40
|
+
width: 24,
|
|
41
|
+
height: 24
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const ModalTitle = styled('h2')({
|
|
45
|
+
fontSize: 24,
|
|
46
|
+
fontWeight: 700,
|
|
21
47
|
textAlign: 'center',
|
|
22
|
-
|
|
23
|
-
|
|
48
|
+
margin: '0 -14px',
|
|
49
|
+
lineHeight: 1.334,
|
|
50
|
+
color: 'white',
|
|
51
|
+
fontFamily: 'Inter, sans-serif'
|
|
24
52
|
});
|
|
25
|
-
const
|
|
53
|
+
const DownloadSection = styled(Box)({
|
|
26
54
|
display: 'flex',
|
|
27
55
|
flexDirection: 'column',
|
|
28
56
|
alignItems: 'center',
|
|
29
|
-
|
|
30
|
-
|
|
57
|
+
gap: 24,
|
|
58
|
+
width: '100%'
|
|
31
59
|
});
|
|
32
|
-
const
|
|
33
|
-
|
|
60
|
+
const PrimaryButton = styled('a')({
|
|
61
|
+
display: 'flex',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
gap: 16,
|
|
34
65
|
width: '100%',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
66
|
+
height: 64,
|
|
67
|
+
backgroundColor: '#FF2D55',
|
|
68
|
+
borderRadius: 16,
|
|
69
|
+
border: 'none',
|
|
70
|
+
cursor: 'pointer',
|
|
71
|
+
textDecoration: 'none',
|
|
72
|
+
fontFamily: 'Inter, sans-serif',
|
|
73
|
+
fontWeight: 600,
|
|
74
|
+
fontSize: '19.89px',
|
|
75
|
+
color: '#FCFCFC',
|
|
76
|
+
textTransform: 'uppercase',
|
|
77
|
+
letterSpacing: '0.61px',
|
|
78
|
+
boxSizing: 'border-box',
|
|
79
|
+
outline: '3px solid transparent',
|
|
80
|
+
outlineOffset: 4,
|
|
81
|
+
transition: 'outline-color 0.15s ease',
|
|
82
|
+
'&:hover': {
|
|
83
|
+
outlineColor: 'white',
|
|
84
|
+
borderRadius: 16
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const EpicButton = styled('a')({
|
|
88
|
+
display: 'flex',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
justifyContent: 'center',
|
|
91
|
+
gap: 24,
|
|
92
|
+
width: '100%',
|
|
93
|
+
height: 64,
|
|
94
|
+
backgroundColor: 'white',
|
|
95
|
+
border: '3px solid white',
|
|
96
|
+
borderRadius: 16,
|
|
97
|
+
cursor: 'pointer',
|
|
98
|
+
textDecoration: 'none',
|
|
99
|
+
fontFamily: 'Inter, sans-serif',
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
fontSize: '19.89px',
|
|
102
|
+
color: '#242129',
|
|
103
|
+
textTransform: 'uppercase',
|
|
104
|
+
letterSpacing: '0.61px',
|
|
105
|
+
boxSizing: 'border-box',
|
|
106
|
+
outline: '3px solid transparent',
|
|
107
|
+
outlineOffset: 4,
|
|
108
|
+
transition: 'outline-color 0.15s ease',
|
|
109
|
+
'&:hover': {
|
|
110
|
+
outlineColor: 'white',
|
|
111
|
+
borderRadius: 16
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const StatsRow = styled(Box)({
|
|
115
|
+
display: 'flex',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
gap: 16,
|
|
118
|
+
flexWrap: 'wrap',
|
|
119
|
+
justifyContent: 'center'
|
|
120
|
+
});
|
|
121
|
+
const StatItem = styled(Box)({
|
|
122
|
+
display: 'flex',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
gap: 12,
|
|
125
|
+
color: 'white',
|
|
126
|
+
fontFamily: 'Inter, sans-serif',
|
|
127
|
+
fontSize: 16,
|
|
128
|
+
fontWeight: 400
|
|
129
|
+
});
|
|
130
|
+
const StatDivider = styled(Box)({
|
|
131
|
+
width: 1,
|
|
132
|
+
height: 20,
|
|
133
|
+
backgroundColor: 'rgba(255,255,255,0.5)',
|
|
134
|
+
flexShrink: 0
|
|
135
|
+
});
|
|
136
|
+
const DividerRow = styled(Box)({
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
gap: 21,
|
|
140
|
+
width: '100%',
|
|
141
|
+
padding: '12px 0'
|
|
142
|
+
});
|
|
143
|
+
const DividerLine = styled(Box)({
|
|
144
|
+
flex: 1,
|
|
145
|
+
height: 1,
|
|
146
|
+
backgroundColor: 'rgba(255,255,255,1)'
|
|
147
|
+
});
|
|
148
|
+
const DividerText = styled('span')({
|
|
149
|
+
fontFamily: 'Inter, sans-serif',
|
|
150
|
+
fontSize: 16,
|
|
151
|
+
fontWeight: 400,
|
|
152
|
+
color: 'white',
|
|
153
|
+
whiteSpace: 'nowrap'
|
|
154
|
+
});
|
|
155
|
+
const StoreBadge = styled('a')({
|
|
156
|
+
display: 'block',
|
|
157
|
+
'& img': {
|
|
158
|
+
height: 61,
|
|
159
|
+
width: 'auto'
|
|
160
|
+
},
|
|
161
|
+
'&:hover': {
|
|
162
|
+
opacity: 0.9
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const PlatformLink = styled('a')({
|
|
166
|
+
display: 'flex',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
gap: 8,
|
|
169
|
+
color: '#ECEBED',
|
|
170
|
+
fontFamily: 'Inter, sans-serif',
|
|
171
|
+
fontSize: 16,
|
|
172
|
+
fontWeight: 400,
|
|
173
|
+
textDecoration: 'none',
|
|
174
|
+
cursor: 'pointer',
|
|
175
|
+
'&:hover': {
|
|
176
|
+
opacity: 0.8
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const StoreBadgesRow = styled(Box)({
|
|
180
|
+
display: 'flex',
|
|
181
|
+
alignItems: 'center',
|
|
182
|
+
gap: 22,
|
|
183
|
+
justifyContent: 'center'
|
|
184
|
+
});
|
|
185
|
+
const MobileCta = styled('a')({
|
|
186
|
+
display: 'flex',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
justifyContent: 'center',
|
|
189
|
+
width: '100%',
|
|
190
|
+
height: 64,
|
|
191
|
+
backgroundColor: '#FF2D55',
|
|
192
|
+
borderRadius: 12,
|
|
193
|
+
cursor: 'pointer',
|
|
194
|
+
textDecoration: 'none',
|
|
195
|
+
padding: '12px 20px',
|
|
196
|
+
boxSizing: 'border-box',
|
|
197
|
+
outline: '3px solid transparent',
|
|
198
|
+
outlineOffset: 4,
|
|
199
|
+
transition: 'outline-color 0.15s ease',
|
|
200
|
+
'& img': {
|
|
201
|
+
height: 40,
|
|
202
|
+
width: 'auto'
|
|
203
|
+
},
|
|
204
|
+
'&:hover': {
|
|
205
|
+
outlineColor: 'white'
|
|
40
206
|
}
|
|
41
207
|
});
|
|
42
|
-
export {
|
|
208
|
+
export { CloseButton, DividerLine, DividerRow, DividerText, DownloadSection, EpicButton, MobileCta, ModalContainer, ModalTitle, PlatformLink, PrimaryButton, StatDivider, StatItem, StatsRow, StoreBadge, StoreBadgesRow, StyledModal };
|
|
43
209
|
//# sourceMappingURL=DownloadModal.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadModal.styled.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadModal.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"DownloadModal.styled.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadModal.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAElE,MAAM,cAAc,GAClB,iIAAiI,CAAA;AAEnI,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,EAAE;IACjC,iBAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,QAAQ;CAC7C,CAAC,CAAuB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;IACzB,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,GAAG,EAAE,EAAE;IACP,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY;IAC5C,OAAO,EAAE,MAAM;IACf,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IA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: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
download: string;
|
|
4
|
+
downloadOn: string;
|
|
5
|
+
totalDownloads: string;
|
|
6
|
+
alsoAvailableOn: string;
|
|
7
7
|
};
|
|
8
|
+
type DownloadModalProps = {
|
|
9
|
+
/** Whether the modal is open */
|
|
10
|
+
open: boolean;
|
|
11
|
+
/** Called when the modal is closed */
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
/** The user's OS — drives primary download button and layout.
|
|
14
|
+
* 'apple' / 'windows' = desktop layout (primary + Epic + "Also Available on" badges)
|
|
15
|
+
* 'android' / 'ios' = mobile layout (single store CTA + total downloads) */
|
|
16
|
+
os: 'apple' | 'windows' | 'android' | 'ios';
|
|
17
|
+
/** Primary download URL (OS-specific installer) */
|
|
18
|
+
downloadUrl: string;
|
|
19
|
+
/** Epic Games store URL */
|
|
20
|
+
epicUrl: string;
|
|
21
|
+
/** Google Play store URL */
|
|
22
|
+
googlePlayUrl: string;
|
|
23
|
+
/** App Store URL */
|
|
24
|
+
appStoreUrl?: string;
|
|
25
|
+
/** i18n strings — all have English defaults */
|
|
26
|
+
i18n?: Partial<DownloadModalI18n>;
|
|
27
|
+
/** Called when the primary download button is clicked */
|
|
28
|
+
onDownloadClick?: () => void;
|
|
29
|
+
/** Called when the Epic Games button is clicked */
|
|
30
|
+
onEpicClick?: () => void;
|
|
31
|
+
};
|
|
32
|
+
export type { DownloadModalI18n, DownloadModalProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
4
|
+
import { DclIcon } from './icons/DclIcon';
|
|
5
|
+
import { VerifiedIcon } from './icons/VerifiedIcon';
|
|
6
|
+
import dclLogoQr from '../../../Assets/dcl-logo-qr.svg';
|
|
7
|
+
import { CloseButton, DownloadSection, ModalContainer, ModalTitle, StatItem, StatsRow, StyledModal } from './DownloadModal.styled';
|
|
8
|
+
import { QRContainer, QRImage, QRLogo } from './DownloadQRModal.styled';
|
|
9
|
+
const DEFAULT_I18N = {
|
|
10
|
+
title: 'Download Decentraland App for {os}',
|
|
11
|
+
totalDownloads: 'Total Downloads: +250K'
|
|
12
|
+
};
|
|
13
|
+
function DownloadQRModal(props) {
|
|
14
|
+
const { os, qrImageUrl, logoUrl = dclLogoQr, i18n: i18nPartial, open, onClose } = props;
|
|
15
|
+
const i18n = useMemo(() => ({ ...DEFAULT_I18N, ...i18nPartial }), [i18nPartial]);
|
|
16
|
+
const handleClose = useCallback((_event, _reason) => {
|
|
17
|
+
onClose();
|
|
18
|
+
}, [onClose]);
|
|
19
|
+
const osLabel = os === 'ios' ? 'iOS' : 'Android';
|
|
20
|
+
const title = i18n.title.replace('{os}', osLabel);
|
|
21
|
+
return (_jsx(StyledModal, { open: open, onClose: handleClose, children: _jsxs(ModalContainer, { children: [_jsx(CloseButton, { onClick: onClose, "aria-label": "Close", children: _jsx(CloseIcon, {}) }), _jsx(DclIcon, {}), _jsx(ModalTitle, { children: title }), _jsxs(DownloadSection, { children: [_jsxs(QRContainer, { children: [_jsx(QRImage, { src: qrImageUrl, alt: `QR code to download Decentraland for ${osLabel}` }), logoUrl && _jsx(QRLogo, { src: logoUrl, alt: "Decentraland" })] }), _jsx(StatsRow, { children: _jsxs(StatItem, { children: [_jsx(VerifiedIcon, {}), i18n.totalDownloads] }) })] })] }) }));
|
|
22
|
+
}
|
|
23
|
+
export { DownloadQRModal };
|
|
24
|
+
//# sourceMappingURL=DownloadQRModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadQRModal.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadQRModal.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,SAAS,MAAM,2BAA2B,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C/C,KAAC,SAAS,KAAG,GACD,EAEd,KAAC,OAAO,KAAG,EAEX,KAAC,UAAU,cAAE,KAAK,GAAc,EAEhC,MAAC,eAAe,eACd,MAAC,WAAW,eACV,KAAC,OAAO,IAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,wCAAwC,OAAO,EAAE,GAAI,EACnF,OAAO,IAAI,KAAC,MAAM,IAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,cAAc,GAAG,IAC3C,EAEd,KAAC,QAAQ,cACP,MAAC,QAAQ,eACP,KAAC,YAAY,KAAG,EACf,IAAI,CAAC,cAAc,IACX,GACF,IACK,IACH,GACL,CACf,CAAA;AACH,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DownloadQRModalProps } from './DownloadQRModal.types';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta<DownloadQRModalProps>;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
5
|
+
declare const Android: Story;
|
|
6
|
+
declare const IOS: Story;
|
|
7
|
+
declare const WithoutLogo: Story;
|
|
8
|
+
export default meta;
|
|
9
|
+
export { Android, IOS, WithoutLogo };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DownloadQRModal } from './DownloadQRModal';
|
|
2
|
+
import qrAndroid from '../../../Assets/qr-android.svg';
|
|
3
|
+
import qrIos from '../../../Assets/qr-ios.svg';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Decentraland UI/Download QR Modal',
|
|
6
|
+
component: DownloadQRModal,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'Modal that displays a QR code linking to the App Store or Google Play store. ' +
|
|
13
|
+
'Used on desktop to let users scan and download the mobile app. ' +
|
|
14
|
+
'The QR images are static SVGs — regenerate with `node scripts/generate-qr-codes.cjs` if URLs change. ' +
|
|
15
|
+
'A DCL logo is overlaid at the center of the QR by default (`dcl-logo-qr.svg`).'
|
|
16
|
+
},
|
|
17
|
+
story: {
|
|
18
|
+
inline: false,
|
|
19
|
+
iframeHeight: 100
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
os: {
|
|
25
|
+
control: 'radio',
|
|
26
|
+
options: ['android', 'ios'],
|
|
27
|
+
description: 'Target platform — drives the title text'
|
|
28
|
+
},
|
|
29
|
+
qrImageUrl: {
|
|
30
|
+
description: 'QR code image URL (static SVG, PNG, or data URI)'
|
|
31
|
+
},
|
|
32
|
+
logoUrl: {
|
|
33
|
+
description: 'Optional logo overlaid at the center of the QR. Defaults to DCL logo.'
|
|
34
|
+
},
|
|
35
|
+
open: {
|
|
36
|
+
control: 'boolean'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const Android = {
|
|
41
|
+
args: {
|
|
42
|
+
open: true,
|
|
43
|
+
os: 'android',
|
|
44
|
+
qrImageUrl: qrAndroid
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const IOS = {
|
|
48
|
+
name: 'iOS',
|
|
49
|
+
args: {
|
|
50
|
+
open: true,
|
|
51
|
+
os: 'ios',
|
|
52
|
+
qrImageUrl: qrIos
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const WithoutLogo = {
|
|
56
|
+
args: {
|
|
57
|
+
open: true,
|
|
58
|
+
os: 'android',
|
|
59
|
+
qrImageUrl: qrAndroid,
|
|
60
|
+
logoUrl: undefined
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
// eslint-disable-next-line import/no-default-export
|
|
64
|
+
export default meta;
|
|
65
|
+
export { Android, IOS, WithoutLogo };
|
|
66
|
+
//# sourceMappingURL=DownloadQRModal.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadQRModal.stories.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadQRModal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,SAAS,MAAM,gCAAgC,CAAA;AACtD,OAAO,KAAK,MAAM,4BAA4B,CAAA;AAI9C,MAAM,IAAI,GAA+B;IACvC,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EACP,+EAA+E;oBAC/E,iEAAiE;oBACjE,uGAAuG;oBACvG,gFAAgF;aACnF;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,GAAG;aAClB;SACF;KACF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;YAC3B,WAAW,EAAE,yCAAyC;SACvD;QACD,UAAU,EAAE;YACV,WAAW,EAAE,kDAAkD;SAChE;QACD,OAAO,EAAE;YACP,WAAW,EAAE,uEAAuE;SACrF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,SAAS;SACnB;KACF;CACqC,CAAA;AAIxC,MAAM,OAAO,GAAU;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,SAAS;QACb,UAAU,EAAE,SAAS;KACtB;CACF,CAAA;AAED,MAAM,GAAG,GAAU;IACjB,IAAI,EAAE,KAAK;IACX,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,KAAK;QACT,UAAU,EAAE,KAAK;KAClB;CACF,CAAA;AAED,MAAM,WAAW,GAAU;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,SAAS;QACb,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;KACnB;CACF,CAAA;AAED,oDAAoD;AACpD,eAAe,IAAI,CAAA;AAEnB,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const QRContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
6
|
+
declare const QRImage: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
10
|
+
declare const QRLogo: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme;
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
14
|
+
export { QRContainer, QRImage, QRLogo };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
const QRContainer = styled(Box)({
|
|
4
|
+
position: 'relative',
|
|
5
|
+
width: 263,
|
|
6
|
+
height: 263,
|
|
7
|
+
flexShrink: 0,
|
|
8
|
+
backgroundColor: 'white',
|
|
9
|
+
borderRadius: 16,
|
|
10
|
+
padding: 12,
|
|
11
|
+
boxSizing: 'content-box'
|
|
12
|
+
});
|
|
13
|
+
const QRImage = styled('img')({
|
|
14
|
+
width: '100%',
|
|
15
|
+
height: '100%',
|
|
16
|
+
borderRadius: 8,
|
|
17
|
+
objectFit: 'cover',
|
|
18
|
+
display: 'block'
|
|
19
|
+
});
|
|
20
|
+
const QRLogo = styled('img')({
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
top: '50%',
|
|
23
|
+
left: '50%',
|
|
24
|
+
transform: 'translate(-50%, -50%)',
|
|
25
|
+
width: 69,
|
|
26
|
+
height: 69,
|
|
27
|
+
borderRadius: 50,
|
|
28
|
+
border: '4px solid white',
|
|
29
|
+
backgroundColor: 'white',
|
|
30
|
+
objectFit: 'cover'
|
|
31
|
+
});
|
|
32
|
+
export { QRContainer, QRImage, QRLogo };
|
|
33
|
+
//# sourceMappingURL=DownloadQRModal.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadQRModal.styled.js","sourceRoot":"","sources":["../../../../src/components/Modal/DownloadModal/DownloadQRModal.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAEnC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC9B,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,UAAU,EAAE,CAAC;IACb,eAAe,EAAE,OAAO;IACxB,YAAY,EAAE,EAAE;IAChB,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,aAAa;CACzB,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,CAAC;IACf,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,uBAAuB;IAClC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,iBAAiB;IACzB,eAAe,EAAE,OAAO;IACxB,SAAS,EAAE,OAAO;CACnB,CAAC,CAAA;AAEF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type DownloadQRModalI18n = {
|
|
2
|
+
title: string;
|
|
3
|
+
totalDownloads: string;
|
|
4
|
+
};
|
|
5
|
+
type DownloadQRModalProps = {
|
|
6
|
+
/** Whether the modal is open */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** Called when the modal is closed */
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
/** The platform — drives the title text */
|
|
11
|
+
os: 'android' | 'ios';
|
|
12
|
+
/** QR code image URL (PNG/SVG/data URI) pointing to the store listing */
|
|
13
|
+
qrImageUrl: string;
|
|
14
|
+
/** Optional logo to overlay at the center of the QR code */
|
|
15
|
+
logoUrl?: string;
|
|
16
|
+
/** i18n strings — all have English defaults */
|
|
17
|
+
i18n?: Partial<DownloadQRModalI18n>;
|
|
18
|
+
};
|
|
19
|
+
export type { DownloadQRModalI18n, DownloadQRModalProps };
|