@stokr/components-library 3.0.71 → 3.0.72-beta.1
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/components/2FA/Connect2FA.js +2 -2
- package/dist/components/2FA/EnterCode.js +2 -2
- package/dist/components/2FA/InstallAuthApp.js +3 -3
- package/dist/components/2FA/Sucess2FA.js +2 -2
- package/dist/components/2FA/disable-2fa-flow.js +3 -3
- package/dist/components/BlogPost/BlogPost.styles.js +2 -2
- package/dist/components/Button/Button.styles.js +6 -1
- package/dist/components/Button/GlareButton.js +2 -2
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +5 -5
- package/dist/components/Copy/Copy.js +16 -0
- package/dist/components/Copy/copySource.js +16 -0
- package/dist/components/Copy/flatten.js +31 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +2 -2
- package/dist/components/DoubleButton/DoubleButton.styles.js +3 -3
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +2 -2
- package/dist/components/Header/Header.js +9 -9
- package/dist/components/Header/Header.styles.js +2 -2
- package/dist/components/LoginModal/LoginModal.js +2 -2
- package/dist/components/Lottie/LottieAnimation.js +91 -0
- package/dist/components/Lottie/LottieAnimation.styles.js +12 -0
- package/dist/components/MainMenu/MainMenu.js +2 -2
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +9 -9
- package/dist/components/Modal/PaymentModal.js +2 -2
- package/dist/components/Modal/SuccessModal/SuccessModal.js +7 -30
- package/dist/components/Newsletter/Newsletter.styles.js +2 -2
- package/dist/components/Pagination/PaginationControls.js +2 -2
- package/dist/components/Payment/DetailRows.js +36 -0
- package/dist/components/Payment/DetailsToggle.js +68 -0
- package/dist/components/Payment/PaymentDisplay.js +108 -88
- package/dist/components/Payment/PaymentPendingCard.js +106 -0
- package/dist/components/Payment/PaymentSuccessCard.js +132 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +2 -2
- package/dist/components/RegisterModal/RegisterModal.js +2 -2
- package/dist/components/RequestDataBox/RequestDataBox.js +2 -2
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +2 -2
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +2 -2
- package/dist/components/StatusDot/StatusDot.js +5 -2
- package/dist/components/StatusDot/StatusDot.styles.js +7 -2
- package/dist/components/TermsModal/_styles.js +3 -3
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +2 -2
- package/dist/components/taxId/complete.js +2 -2
- package/dist/components/taxId/register-taxid.js +10 -10
- package/dist/context/AuthContext.js +3 -3
- package/dist/index.js +20 -0
- package/package.json +1 -1
|
@@ -2,29 +2,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import { DotLottieReact } from "@lottiefiles/dotlottie-react";
|
|
6
5
|
import { Modal } from "../Modal.js";
|
|
6
|
+
import { LottieAnimation } from "../../Lottie/LottieAnimation.js";
|
|
7
7
|
import { SuccessModalContent, AnimationContainer, Title, Subtitle, ContentWrapper } from "./SuccessModal.styles.js";
|
|
8
|
-
import successAnimation from "../../../static/animations/checked.lottie.js";
|
|
9
|
-
import progressAnimation from "../../../static/animations/progress.lottie.js";
|
|
10
|
-
import uploadAnimation from "../../../static/animations/upload.lottie.js";
|
|
11
|
-
const variantConfig = {
|
|
12
|
-
success: {
|
|
13
|
-
animation: successAnimation,
|
|
14
|
-
segment: [0, 50],
|
|
15
|
-
loop: false
|
|
16
|
-
},
|
|
17
|
-
progress: {
|
|
18
|
-
animation: progressAnimation,
|
|
19
|
-
segment: null,
|
|
20
|
-
loop: false
|
|
21
|
-
},
|
|
22
|
-
upload: {
|
|
23
|
-
animation: uploadAnimation,
|
|
24
|
-
segment: null,
|
|
25
|
-
loop: false
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
8
|
const SuccessModalComponent = ({
|
|
29
9
|
isOpen,
|
|
30
10
|
onClose,
|
|
@@ -40,10 +20,6 @@ const SuccessModalComponent = ({
|
|
|
40
20
|
modalProps = {},
|
|
41
21
|
maxWidth = "800px"
|
|
42
22
|
}) => {
|
|
43
|
-
const config = variantConfig[variant] || variantConfig.success;
|
|
44
|
-
const animationSource = animationSrc || config.animation;
|
|
45
|
-
const animationLoop = loop !== void 0 ? loop : config.loop;
|
|
46
|
-
const animationSegment = segment || config.segment;
|
|
47
23
|
useEffect(() => {
|
|
48
24
|
if (!isOpen) return;
|
|
49
25
|
const handleKeyDown = (e) => {
|
|
@@ -65,14 +41,15 @@ const SuccessModalComponent = ({
|
|
|
65
41
|
...modalProps,
|
|
66
42
|
children: /* @__PURE__ */ jsxs(SuccessModalContent, { children: [
|
|
67
43
|
/* @__PURE__ */ jsx(AnimationContainer, { children: /* @__PURE__ */ jsx(
|
|
68
|
-
|
|
44
|
+
LottieAnimation,
|
|
69
45
|
{
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
variant,
|
|
47
|
+
src: animationSrc,
|
|
48
|
+
loop,
|
|
72
49
|
autoplay,
|
|
50
|
+
segment,
|
|
73
51
|
speed,
|
|
74
|
-
|
|
75
|
-
style: { width: "100%", height: "100%" }
|
|
52
|
+
size: "100%"
|
|
76
53
|
}
|
|
77
54
|
) }),
|
|
78
55
|
title && /* @__PURE__ */ jsx(Title, { children: title }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import rwd, { rwdMax } from "../../styles/rwd.js";
|
|
3
3
|
import { RED_BASE_HEX, BASE_MARGIN, MAX_WIDTH, GRAY_BASE_HEX, WHITE_HEX } from "../../constants/style.js";
|
|
4
|
-
import
|
|
4
|
+
import stdin_default from "../Button/Button.styles.js";
|
|
5
5
|
const withMarginsCss = css`
|
|
6
6
|
padding-left: ${BASE_MARGIN * 2}px;
|
|
7
7
|
padding-right: ${BASE_MARGIN * 2}px;
|
|
@@ -126,7 +126,7 @@ const SubscribeInputError = styled.p`
|
|
|
126
126
|
text-transform: uppercase;
|
|
127
127
|
top: 39px;
|
|
128
128
|
`;
|
|
129
|
-
const SubscribeSubmit = styled(
|
|
129
|
+
const SubscribeSubmit = styled(stdin_default).withConfig({
|
|
130
130
|
shouldForwardProp: (props) => !["submitSuccess"].includes(props)
|
|
131
131
|
})`
|
|
132
132
|
padding-left: 40px;
|
|
@@ -5,7 +5,7 @@ import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js
|
|
|
5
5
|
import stdin_default$1 from "./Pagination.js";
|
|
6
6
|
import { Card, CardTitle } from "../Card/Card.styles.js";
|
|
7
7
|
import stdin_default$2 from "../Input/InputWithButton.js";
|
|
8
|
-
import
|
|
8
|
+
import stdin_default$3 from "../Button/Button.styles.js";
|
|
9
9
|
const PaginationControls = ({
|
|
10
10
|
currentPage,
|
|
11
11
|
totalCount,
|
|
@@ -68,7 +68,7 @@ const PaginationControls = ({
|
|
|
68
68
|
setInputPageSize(value);
|
|
69
69
|
},
|
|
70
70
|
children: /* @__PURE__ */ jsx(
|
|
71
|
-
|
|
71
|
+
stdin_default$3,
|
|
72
72
|
{
|
|
73
73
|
onClick: () => {
|
|
74
74
|
const newPageSize = Math.max(1, Number(inputPageSize) || 1);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { colors } from "../../styles/colors.js";
|
|
5
|
+
import { DetailItem } from "./PaymentDetailsCard.js";
|
|
6
|
+
const Rows = styled.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
width: 100%;
|
|
10
|
+
`;
|
|
11
|
+
const RowDivider = styled.div`
|
|
12
|
+
height: 1px;
|
|
13
|
+
background: ${colors.lightGrey};
|
|
14
|
+
width: 100%;
|
|
15
|
+
`;
|
|
16
|
+
const DetailRows = ({ rows = [] }) => {
|
|
17
|
+
if (rows.length === 0) return null;
|
|
18
|
+
return /* @__PURE__ */ jsx(Rows, { children: rows.map((row, index) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
DetailItem,
|
|
21
|
+
{
|
|
22
|
+
label: row.label,
|
|
23
|
+
value: row.value,
|
|
24
|
+
href: row.href,
|
|
25
|
+
target: row.target,
|
|
26
|
+
tooltip: row.tooltip,
|
|
27
|
+
placeholder: row.placeholder,
|
|
28
|
+
isCustom: row.isCustom
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
index < rows.length - 1 && /* @__PURE__ */ jsx(RowDivider, {})
|
|
32
|
+
] }, row.key ?? index)) });
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
DetailRows
|
|
36
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { colors } from "../../styles/colors.js";
|
|
5
|
+
import { DetailRows } from "./DetailRows.js";
|
|
6
|
+
const ToggleButton = styled.button`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
background: none;
|
|
13
|
+
border: none;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
padding: 10px 0;
|
|
16
|
+
font-size: 11px;
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
letter-spacing: 2px;
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
color: ${colors.black};
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
color: ${colors.blue};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const Chevron = styled.svg`
|
|
27
|
+
transform: ${(props) => props.$expanded ? "rotate(180deg)" : "none"};
|
|
28
|
+
transition: transform 0.2s;
|
|
29
|
+
`;
|
|
30
|
+
const DetailsToggle = ({
|
|
31
|
+
rows = [],
|
|
32
|
+
defaultOpen = false,
|
|
33
|
+
open: controlledOpen,
|
|
34
|
+
onToggle,
|
|
35
|
+
showLabel = "show details",
|
|
36
|
+
hideLabel = "hide details"
|
|
37
|
+
}) => {
|
|
38
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
39
|
+
const isControlled = controlledOpen !== void 0;
|
|
40
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
41
|
+
const handleClick = () => {
|
|
42
|
+
const next = !open;
|
|
43
|
+
if (onToggle) onToggle(next);
|
|
44
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsxs(ToggleButton, { type: "button", onClick: handleClick, "aria-expanded": open, children: [
|
|
48
|
+
open ? hideLabel : showLabel,
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Chevron,
|
|
51
|
+
{
|
|
52
|
+
$expanded: open,
|
|
53
|
+
width: "14",
|
|
54
|
+
height: "10",
|
|
55
|
+
viewBox: "0 0 14 10",
|
|
56
|
+
fill: "none",
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
children: /* @__PURE__ */ jsx("path", { d: "M1 2L7 8L13 2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
open && /* @__PURE__ */ jsx(DetailRows, { rows })
|
|
64
|
+
] });
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
DetailsToggle
|
|
68
|
+
};
|
|
@@ -2,24 +2,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
5
|
-
import { Text } from "../Text/Text.styles.js";
|
|
6
5
|
import { colors } from "../../styles/colors.js";
|
|
7
6
|
import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
8
7
|
import { Tooltip } from "react-tippy";
|
|
9
8
|
import { CopyToClipboardButton } from "../CryptoAddress/CryptoAddress.styles.js";
|
|
10
9
|
import stdin_default from "../QRCode/QRCode.js";
|
|
11
10
|
import { SectionTitle } from "../SectionTitle/SectionTitle.styles.js";
|
|
12
|
-
import {
|
|
13
|
-
import rwd from "../../styles/rwd.js";
|
|
11
|
+
import { StatusDot } from "../StatusDot/StatusDot.js";
|
|
14
12
|
import { getCurrencyIcon } from "../../utils/formatCurrencyValue.js";
|
|
15
13
|
const CodeWrapper = styled.div.withConfig({
|
|
16
14
|
shouldForwardProp: (props) => !["maxWidth"].includes(props)
|
|
17
15
|
})`
|
|
18
|
-
background: ${colors.
|
|
19
|
-
border: 1px solid ${colors.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
padding:
|
|
16
|
+
background: ${colors.white};
|
|
17
|
+
border: 1px solid ${colors.grey4};
|
|
18
|
+
border-radius: 8px;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
padding: 48px 40px;
|
|
23
21
|
display: flex;
|
|
24
22
|
flex-direction: column;
|
|
25
23
|
align-items: center;
|
|
@@ -27,67 +25,82 @@ const CodeWrapper = styled.div.withConfig({
|
|
|
27
25
|
margin: auto;
|
|
28
26
|
max-width: ${(props) => props.maxWidth || "550px"};
|
|
29
27
|
`;
|
|
30
|
-
const
|
|
28
|
+
const AmountBlock = styled.div`
|
|
31
29
|
display: flex;
|
|
32
|
-
flex-
|
|
30
|
+
flex-direction: column;
|
|
33
31
|
align-items: center;
|
|
34
|
-
justify-content: center;
|
|
35
32
|
gap: 16px;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
letter-spacing: 0.8px;
|
|
48
|
-
|
|
49
|
-
${rwd.XLarge`
|
|
50
|
-
font-size: 22px;
|
|
51
|
-
`}
|
|
52
|
-
}
|
|
33
|
+
width: 100%;
|
|
34
|
+
`;
|
|
35
|
+
const AmountRow = styled.div`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 10px;
|
|
39
|
+
`;
|
|
40
|
+
const AmountValueGroup = styled.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 8px;
|
|
53
44
|
`;
|
|
54
|
-
const
|
|
55
|
-
|
|
45
|
+
const AmountValue = styled.p`
|
|
46
|
+
margin: 0;
|
|
47
|
+
font-size: 34px;
|
|
56
48
|
font-weight: 800;
|
|
57
49
|
text-transform: uppercase;
|
|
58
50
|
line-height: 40px;
|
|
59
51
|
letter-spacing: 1.5px;
|
|
52
|
+
color: ${colors.black};
|
|
60
53
|
word-wrap: break-word;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
`;
|
|
55
|
+
const AmountCurrency = styled.p`
|
|
56
|
+
margin: 0;
|
|
57
|
+
font-size: 34px;
|
|
58
|
+
font-weight: 300;
|
|
59
|
+
line-height: 40px;
|
|
60
|
+
color: ${colors.black};
|
|
65
61
|
`;
|
|
66
62
|
const AmountIcon = styled.img`
|
|
67
|
-
width:
|
|
68
|
-
height:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
`;
|
|
66
|
+
const AddressBlock = styled.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 16px;
|
|
71
|
+
width: 100%;
|
|
72
|
+
`;
|
|
73
|
+
const AddressGroup = styled.div`
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 8px;
|
|
78
|
+
width: 100%;
|
|
79
|
+
`;
|
|
80
|
+
const AddressRow = styled.div`
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
gap: 10px;
|
|
74
85
|
`;
|
|
75
86
|
const AddressText = styled.p`
|
|
76
|
-
letter-spacing: 0.6%;
|
|
77
|
-
word-break: break-all;
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
font-weight: 700;
|
|
80
|
-
line-height: 24px;
|
|
81
|
-
letter-spacing: 0.1;
|
|
82
87
|
margin: 0;
|
|
83
|
-
margin-top: 14px;
|
|
84
|
-
`;
|
|
85
|
-
const AddressDescription = styled.p`
|
|
86
88
|
font-size: 14px;
|
|
87
|
-
font-weight:
|
|
89
|
+
font-weight: 600;
|
|
88
90
|
line-height: 20px;
|
|
89
91
|
letter-spacing: 0.5px;
|
|
92
|
+
text-align: center;
|
|
93
|
+
word-break: break-all;
|
|
94
|
+
color: ${colors.black};
|
|
95
|
+
`;
|
|
96
|
+
const AddressDescription = styled.p`
|
|
90
97
|
margin: 0;
|
|
98
|
+
font-size: 12px;
|
|
99
|
+
font-weight: 400;
|
|
100
|
+
line-height: 18px;
|
|
101
|
+
letter-spacing: 0.6px;
|
|
102
|
+
text-align: center;
|
|
103
|
+
color: ${colors.grey2};
|
|
91
104
|
`;
|
|
92
105
|
const CopyToClipBoardTooltip = ({ value, buttonStyle, onCopy }) => {
|
|
93
106
|
const [copied, setCopied] = useState(false);
|
|
@@ -122,6 +135,9 @@ const PaymentDisplay = ({
|
|
|
122
135
|
addressDescription = "",
|
|
123
136
|
qrCodeSize = 200,
|
|
124
137
|
qrCodeStyle,
|
|
138
|
+
// Waiting/status indicator — e.g. "Waiting to detect your transaction…"
|
|
139
|
+
statusMessage,
|
|
140
|
+
statusDotColor,
|
|
125
141
|
// Style props
|
|
126
142
|
containerStyle,
|
|
127
143
|
codeWrapperStyle,
|
|
@@ -138,62 +154,66 @@ const PaymentDisplay = ({
|
|
|
138
154
|
customCurrencyIcon,
|
|
139
155
|
onAmountCopy,
|
|
140
156
|
onAddressCopy,
|
|
141
|
-
copyButtonStyle
|
|
157
|
+
copyButtonStyle,
|
|
158
|
+
// Arbitrary extra content (e.g. a "show details" toggle + table, extra
|
|
159
|
+
// buttons) — rendered last, inside the card.
|
|
160
|
+
children
|
|
142
161
|
}) => {
|
|
143
|
-
const defaultQRCodeStyle = {
|
|
144
|
-
backgroundColor: "#000000",
|
|
145
|
-
padding: 18,
|
|
146
|
-
borderRadius: 8,
|
|
147
|
-
margin: "16px 0"
|
|
148
|
-
};
|
|
149
162
|
return /* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, center: true, style: containerStyle, className, children: /* @__PURE__ */ jsxs(CodeWrapper, { style: codeWrapperStyle, maxWidth, className: codeWrapperClassName, children: [
|
|
150
|
-
/* @__PURE__ */ jsxs(
|
|
163
|
+
/* @__PURE__ */ jsxs(AmountBlock, { children: [
|
|
151
164
|
/* @__PURE__ */ jsx(SectionTitle, { children: amountTitle }),
|
|
152
|
-
/* @__PURE__ */ jsxs(
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
currency
|
|
165
|
+
/* @__PURE__ */ jsxs(AmountRow, { style: amountSectionStyle, children: [
|
|
166
|
+
/* @__PURE__ */ jsxs(AmountValueGroup, { children: [
|
|
167
|
+
/* @__PURE__ */ jsx(AmountIcon, { src: getCurrencyIcon(currency, customCurrencyIcon), style: amountIconStyle, alt: currency }),
|
|
168
|
+
/* @__PURE__ */ jsx(AmountValue, { style: amountTextStyle, children: amount }),
|
|
169
|
+
/* @__PURE__ */ jsx(AmountCurrency, { style: amountTextStyle, children: currency })
|
|
158
170
|
] }),
|
|
159
171
|
showCopyIcons && /* @__PURE__ */ jsx(
|
|
160
172
|
CopyToClipBoardTooltip,
|
|
161
173
|
{
|
|
162
174
|
value: amount.toString(),
|
|
163
|
-
buttonStyle: copyButtonStyle || { height:
|
|
175
|
+
buttonStyle: copyButtonStyle || { height: 22, width: 22 },
|
|
164
176
|
onCopy: onAmountCopy
|
|
165
177
|
}
|
|
166
178
|
)
|
|
179
|
+
] }),
|
|
180
|
+
showQRCode && qrCodeValue && /* @__PURE__ */ jsx(stdin_default, { size: qrCodeSize, padding: 0, backgroundColor: "transparent", style: qrCodeStyle, value: qrCodeValue })
|
|
181
|
+
] }),
|
|
182
|
+
showAddress && address && /* @__PURE__ */ jsxs(AddressBlock, { style: addressSectionStyle, children: [
|
|
183
|
+
/* @__PURE__ */ jsx(SectionTitle, { children: addressTitle }),
|
|
184
|
+
/* @__PURE__ */ jsxs(AddressGroup, { children: [
|
|
185
|
+
/* @__PURE__ */ jsxs(AddressRow, { children: [
|
|
186
|
+
/* @__PURE__ */ jsx(AddressText, { style: addressTextStyle, children: address }),
|
|
187
|
+
showCopyIcons && /* @__PURE__ */ jsx(
|
|
188
|
+
CopyToClipBoardTooltip,
|
|
189
|
+
{
|
|
190
|
+
value: address,
|
|
191
|
+
buttonStyle: copyButtonStyle || { height: 16, width: 16 },
|
|
192
|
+
onCopy: onAddressCopy
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] }),
|
|
196
|
+
addressDescription && /* @__PURE__ */ jsx(AddressDescription, { style: addressDescriptionStyle, children: addressDescription })
|
|
167
197
|
] })
|
|
168
198
|
] }),
|
|
169
|
-
|
|
170
|
-
|
|
199
|
+
statusMessage && /* @__PURE__ */ jsx(
|
|
200
|
+
StatusDot,
|
|
171
201
|
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
202
|
+
color: statusDotColor || colors.blue,
|
|
203
|
+
labelColor: colors.grayBlue,
|
|
204
|
+
dotSize: 8,
|
|
205
|
+
pulse: true,
|
|
206
|
+
style: { width: "100%", whiteSpace: "normal" },
|
|
207
|
+
children: statusMessage
|
|
177
208
|
}
|
|
178
209
|
),
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */ jsx(SectionTitle, { children: addressTitle }),
|
|
181
|
-
/* @__PURE__ */ jsxs(FlexContainer, { style: { gap: 16, margin: "12px 0" }, children: [
|
|
182
|
-
/* @__PURE__ */ jsx(AddressText, { style: addressTextStyle, children: address }),
|
|
183
|
-
showCopyIcons && /* @__PURE__ */ jsx(
|
|
184
|
-
CopyToClipBoardTooltip,
|
|
185
|
-
{
|
|
186
|
-
value: address,
|
|
187
|
-
buttonStyle: copyButtonStyle || { height: 16, width: 16, marginTop: 4 },
|
|
188
|
-
onCopy: onAddressCopy
|
|
189
|
-
}
|
|
190
|
-
)
|
|
191
|
-
] }),
|
|
192
|
-
addressDescription && /* @__PURE__ */ jsx(AddressDescription, { style: addressDescriptionStyle, children: addressDescription })
|
|
193
|
-
] })
|
|
210
|
+
children
|
|
194
211
|
] }) });
|
|
195
212
|
};
|
|
196
213
|
export {
|
|
214
|
+
AmountCurrency,
|
|
215
|
+
AmountIcon,
|
|
216
|
+
AmountValue,
|
|
197
217
|
CodeWrapper,
|
|
198
218
|
PaymentDisplay
|
|
199
219
|
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import styled, { keyframes } from "styled-components";
|
|
4
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
5
|
+
import { colors } from "../../styles/colors.js";
|
|
6
|
+
import { Button } from "../Button/Button.styles.js";
|
|
7
|
+
import { DetailRows } from "./DetailRows.js";
|
|
8
|
+
import { CodeWrapper } from "./PaymentDisplay.js";
|
|
9
|
+
import externalLinkIcon from "../../static/images/external-link-icon.svg.js";
|
|
10
|
+
const spin = keyframes`
|
|
11
|
+
to { transform: rotate(360deg); }
|
|
12
|
+
`;
|
|
13
|
+
const Spinner = styled.div`
|
|
14
|
+
width: 48px;
|
|
15
|
+
height: 48px;
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
border: 3px solid ${colors.lightGrey};
|
|
19
|
+
border-top-color: ${colors.blue};
|
|
20
|
+
animation: ${spin} 0.9s linear infinite;
|
|
21
|
+
`;
|
|
22
|
+
const TextBlock = styled.div`
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 12px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
width: 100%;
|
|
29
|
+
`;
|
|
30
|
+
const Title = styled.h2`
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-size: 22px;
|
|
33
|
+
font-weight: 800;
|
|
34
|
+
line-height: 28px;
|
|
35
|
+
letter-spacing: 0.8px;
|
|
36
|
+
text-transform: uppercase;
|
|
37
|
+
color: ${colors.black};
|
|
38
|
+
`;
|
|
39
|
+
const Description = styled.p`
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
font-weight: 300;
|
|
43
|
+
line-height: 24px;
|
|
44
|
+
letter-spacing: 0.6px;
|
|
45
|
+
color: ${colors.black};
|
|
46
|
+
`;
|
|
47
|
+
const ButtonIcon = styled.img`
|
|
48
|
+
width: 12px;
|
|
49
|
+
height: 12px;
|
|
50
|
+
margin-left: 8px;
|
|
51
|
+
vertical-align: -1px;
|
|
52
|
+
`;
|
|
53
|
+
const FooterNote = styled.p`
|
|
54
|
+
margin: 0;
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
line-height: 18px;
|
|
58
|
+
letter-spacing: 0.6px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
color: ${colors.grayBlue};
|
|
61
|
+
`;
|
|
62
|
+
const PaymentPendingCard = ({
|
|
63
|
+
title,
|
|
64
|
+
description,
|
|
65
|
+
rows = [],
|
|
66
|
+
explorerLabel = "View on explorer",
|
|
67
|
+
explorerHref,
|
|
68
|
+
onExplorerClick,
|
|
69
|
+
footerNote,
|
|
70
|
+
maxWidth,
|
|
71
|
+
containerStyle,
|
|
72
|
+
codeWrapperStyle,
|
|
73
|
+
className,
|
|
74
|
+
codeWrapperClassName,
|
|
75
|
+
children
|
|
76
|
+
}) => {
|
|
77
|
+
return /* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, center: true, style: containerStyle, className, children: /* @__PURE__ */ jsxs(CodeWrapper, { style: { gap: "40px", ...codeWrapperStyle }, maxWidth, className: codeWrapperClassName, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
79
|
+
(title || description) && /* @__PURE__ */ jsxs(TextBlock, { children: [
|
|
80
|
+
title && /* @__PURE__ */ jsx(Title, { children: title }),
|
|
81
|
+
description && /* @__PURE__ */ jsx(Description, { children: description })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx(DetailRows, { rows }),
|
|
84
|
+
(explorerHref || onExplorerClick) && /* @__PURE__ */ jsxs(
|
|
85
|
+
Button,
|
|
86
|
+
{
|
|
87
|
+
as: explorerHref ? "a" : "button",
|
|
88
|
+
href: explorerHref,
|
|
89
|
+
target: explorerHref ? "_blank" : void 0,
|
|
90
|
+
rel: explorerHref ? "noopener noreferrer" : void 0,
|
|
91
|
+
onClick: onExplorerClick,
|
|
92
|
+
outlineBlack: true,
|
|
93
|
+
fluid: true,
|
|
94
|
+
children: [
|
|
95
|
+
explorerLabel,
|
|
96
|
+
/* @__PURE__ */ jsx(ButtonIcon, { src: externalLinkIcon, alt: "" })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
footerNote && /* @__PURE__ */ jsx(FooterNote, { children: footerNote }),
|
|
101
|
+
children
|
|
102
|
+
] }) });
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
PaymentPendingCard
|
|
106
|
+
};
|