@stokr/components-library 3.0.70 → 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/Auth.js +1 -1
- package/dist/context/AuthContext.js +3 -3
- package/dist/index.js +20 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { sizes } from "../../styles/rwd.js";
|
|
4
4
|
import { Text } from "../Text/Text.styles.js";
|
|
5
|
-
import
|
|
5
|
+
import stdin_default$2 from "../Button/Button.styles.js";
|
|
6
6
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
7
|
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
8
8
|
import { QRCodeSVG } from "qrcode.react";
|
|
@@ -38,7 +38,7 @@ const Connect2FA = (props) => {
|
|
|
38
38
|
)
|
|
39
39
|
] }),
|
|
40
40
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingBottom: true, center: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
41
|
-
|
|
41
|
+
stdin_default$2,
|
|
42
42
|
{
|
|
43
43
|
minWidth: "150px",
|
|
44
44
|
id: "enable-2fa-connect-continue-btn",
|
|
@@ -4,7 +4,7 @@ import { Formik } from "formik";
|
|
|
4
4
|
import { Modal } from "../Modal/Modal.js";
|
|
5
5
|
import stdin_default$1 from "../Form/Form.js";
|
|
6
6
|
import { Text } from "../Text/Text.styles.js";
|
|
7
|
-
import
|
|
7
|
+
import stdin_default$3 from "../Button/Button.styles.js";
|
|
8
8
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
9
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
10
10
|
import stdin_default$2 from "../Input/OtpInput.js";
|
|
@@ -50,7 +50,7 @@ const EnterCode = (props) => {
|
|
|
50
50
|
/* @__PURE__ */ jsx(FormError, { show: errors.otpInput && touched.otpInput, children: errors.otpInput })
|
|
51
51
|
] }) }),
|
|
52
52
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
53
|
-
|
|
53
|
+
stdin_default$3,
|
|
54
54
|
{
|
|
55
55
|
type: "submit",
|
|
56
56
|
id: "2fa-enter-code-btn",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Text } from "../Text/Text.styles.js";
|
|
4
|
-
import
|
|
4
|
+
import stdin_default$1 from "../Button/Button.styles.js";
|
|
5
5
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
6
6
|
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
7
7
|
import GoogleAuthLogo from "../../static/images/google_auth.png.js";
|
|
@@ -19,7 +19,7 @@ const InstallAuthApp = (props) => {
|
|
|
19
19
|
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
20
20
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { small: true, children: /* @__PURE__ */ jsx("p", { children: "Click 'Continue' if you already have an app installed." }) }) }),
|
|
21
21
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsxs(
|
|
22
|
-
|
|
22
|
+
stdin_default$1,
|
|
23
23
|
{
|
|
24
24
|
minWidth: "150px",
|
|
25
25
|
id: "enable-2fa-download-app-btn",
|
|
@@ -49,7 +49,7 @@ const InstallAuthApp = (props) => {
|
|
|
49
49
|
}
|
|
50
50
|
) }),
|
|
51
51
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, center: true, children: /* @__PURE__ */ jsx(
|
|
52
|
-
|
|
52
|
+
stdin_default$1,
|
|
53
53
|
{
|
|
54
54
|
minWidth: "150px",
|
|
55
55
|
id: "enable-2fa-install-app-continue-btn",
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Text } from "../Text/Text.styles.js";
|
|
5
|
-
import
|
|
5
|
+
import stdin_default$1 from "../Button/Button.styles.js";
|
|
6
6
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
7
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
8
8
|
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
@@ -32,7 +32,7 @@ const Sucess2FA = ({
|
|
|
32
32
|
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
33
33
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: textRight }) }) }),
|
|
34
34
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
35
|
-
|
|
35
|
+
stdin_default$1,
|
|
36
36
|
{
|
|
37
37
|
id: continueButtonId,
|
|
38
38
|
minWidth: "240px",
|
|
@@ -5,7 +5,7 @@ import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js
|
|
|
5
5
|
import { Modal } from "../Modal/Modal.js";
|
|
6
6
|
import { ModalInner, ModalWrapper } from "../Modal/Modal.styles.js";
|
|
7
7
|
import { Text } from "../Text/Text.styles.js";
|
|
8
|
-
import
|
|
8
|
+
import stdin_default$2 from "../Button/Button.styles.js";
|
|
9
9
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
10
|
import stdin_default$1 from "./Sucess2FA.js";
|
|
11
11
|
import fetchData from "../../api/fetchData.js";
|
|
@@ -80,7 +80,7 @@ const Disable2FA = ({ showFlow, setShowFlow, onSuccess, onRequiresRecentLoginErr
|
|
|
80
80
|
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
81
81
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: "Do you want to remove your log in 2FA authentication?" }) }) }),
|
|
82
82
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
83
|
-
|
|
83
|
+
stdin_default$2,
|
|
84
84
|
{
|
|
85
85
|
secondary: true,
|
|
86
86
|
style: { marginRight: 20 },
|
|
@@ -91,7 +91,7 @@ const Disable2FA = ({ showFlow, setShowFlow, onSuccess, onRequiresRecentLoginErr
|
|
|
91
91
|
children: "NO"
|
|
92
92
|
}
|
|
93
93
|
) }),
|
|
94
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, children: /* @__PURE__ */ jsx(
|
|
94
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, children: /* @__PURE__ */ jsx(stdin_default$2, { id: "disable-2fa-confirm-yes-btn", "data-cy": "disable-2fa-confirm-yes", onClick: handleDisableClick, fluid: true, children: "Yes" }) })
|
|
95
95
|
] }) })
|
|
96
96
|
] }) }) })
|
|
97
97
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import rwd from "../../styles/rwd.js";
|
|
2
2
|
import theme from "../../styles/theme.js";
|
|
3
|
-
import
|
|
3
|
+
import stdin_default from "../Button/Button.styles.js";
|
|
4
4
|
import styled, { css } from "styled-components";
|
|
5
5
|
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
6
6
|
const Content = styled.div.withConfig({
|
|
@@ -190,7 +190,7 @@ const Category = styled(Breakdown).withConfig({
|
|
|
190
190
|
}
|
|
191
191
|
`}
|
|
192
192
|
`;
|
|
193
|
-
const StyledButton = styled(
|
|
193
|
+
const StyledButton = styled(stdin_default)`
|
|
194
194
|
opacity: 0;
|
|
195
195
|
transition: opacity 0.3s ease;
|
|
196
196
|
|
|
@@ -41,6 +41,10 @@ const Button = styled.button.withConfig({
|
|
|
41
41
|
margin: 0;
|
|
42
42
|
outline: 0;
|
|
43
43
|
vertical-align: baseline;
|
|
44
|
+
/* Rendered as an <a> via the "as" prop should still look like a button —
|
|
45
|
+
don't rely on the app's global anchor reset (which only strips the
|
|
46
|
+
underline on :hover, not by default). */
|
|
47
|
+
text-decoration: none;
|
|
44
48
|
text-shadow: none;
|
|
45
49
|
user-select: none;
|
|
46
50
|
cursor: pointer;
|
|
@@ -200,7 +204,8 @@ Button.propTypes = {
|
|
|
200
204
|
outline: PropTypes.bool,
|
|
201
205
|
outlineBlack: PropTypes.bool
|
|
202
206
|
};
|
|
207
|
+
var stdin_default = Button;
|
|
203
208
|
export {
|
|
204
209
|
Button,
|
|
205
|
-
|
|
210
|
+
stdin_default as default
|
|
206
211
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import
|
|
3
|
+
import stdin_default from "./Button.styles.js";
|
|
4
4
|
import { colors } from "../../styles/colors.js";
|
|
5
5
|
import { useInView } from "react-intersection-observer";
|
|
6
6
|
import { useState, useRef, useId, useEffect } from "react";
|
|
@@ -37,7 +37,7 @@ const ButtonWrapper = styled.div.withConfig({
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
`}
|
|
39
39
|
`;
|
|
40
|
-
const StyledButton = styled(
|
|
40
|
+
const StyledButton = styled(stdin_default).withConfig({
|
|
41
41
|
shouldForwardProp: (props) => !["beauty", "backgroundColor", "textColor", "borderColor", "fullWidth", "disabledColor"].includes(props)
|
|
42
42
|
})`
|
|
43
43
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import
|
|
2
|
+
import stdin_default from "../Button/Button.styles.js";
|
|
3
3
|
const ButtonContainer = styled.div.withConfig({
|
|
4
4
|
shouldForwardProp: (props) => !["flexColumn"].includes(props)
|
|
5
5
|
})`
|
|
@@ -10,7 +10,7 @@ const ButtonContainer = styled.div.withConfig({
|
|
|
10
10
|
flex-direction:column;
|
|
11
11
|
`}
|
|
12
12
|
|
|
13
|
-
${
|
|
13
|
+
${stdin_default} {
|
|
14
14
|
min-width: 150px;
|
|
15
15
|
max-width: 300px;
|
|
16
16
|
}
|
|
@@ -18,7 +18,7 @@ const ButtonContainer = styled.div.withConfig({
|
|
|
18
18
|
@media screen and (max-width: 767px) {
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
|
|
21
|
-
${
|
|
21
|
+
${stdin_default} {
|
|
22
22
|
min-width: 150px;
|
|
23
23
|
max-width: 400px;
|
|
24
24
|
}
|
|
@@ -31,7 +31,7 @@ const ButtonGridContainer = styled.div`
|
|
|
31
31
|
justify-items: center;
|
|
32
32
|
align-items: center;
|
|
33
33
|
|
|
34
|
-
${
|
|
34
|
+
${stdin_default} {
|
|
35
35
|
min-width: 150px;
|
|
36
36
|
max-width: 300px;
|
|
37
37
|
width: 100%;
|
|
@@ -40,7 +40,7 @@ const ButtonGridContainer = styled.div`
|
|
|
40
40
|
@media screen and (max-width: 767px) {
|
|
41
41
|
grid-template-columns: repeat(1, 1fr);
|
|
42
42
|
|
|
43
|
-
${
|
|
43
|
+
${stdin_default} {
|
|
44
44
|
max-width: 400px;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { resolveCopy } from "./copySource.js";
|
|
5
|
+
const Copy = ({ id, fallback }) => {
|
|
6
|
+
const value = resolveCopy(id);
|
|
7
|
+
return /* @__PURE__ */ jsx(Fragment, { children: value ?? fallback ?? id });
|
|
8
|
+
};
|
|
9
|
+
Copy.propTypes = {
|
|
10
|
+
id: PropTypes.string.isRequired,
|
|
11
|
+
/** Shown when the copy source has no value for this id (or none is registered). */
|
|
12
|
+
fallback: PropTypes.string
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
Copy
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { flatten } from "./flatten.js";
|
|
2
|
+
let source = {};
|
|
3
|
+
function setCopySource(copy) {
|
|
4
|
+
source = copy ? flatten(copy) : {};
|
|
5
|
+
}
|
|
6
|
+
function resolveCopy(id) {
|
|
7
|
+
return source[id];
|
|
8
|
+
}
|
|
9
|
+
function getCopySource() {
|
|
10
|
+
return source;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
getCopySource,
|
|
14
|
+
resolveCopy,
|
|
15
|
+
setCopySource
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function flatten(obj, prefix = "", out = {}) {
|
|
2
|
+
if (obj == null) return out;
|
|
3
|
+
if (typeof obj === "string") {
|
|
4
|
+
out[prefix] = obj;
|
|
5
|
+
return out;
|
|
6
|
+
}
|
|
7
|
+
if (typeof obj === "number" || typeof obj === "boolean") {
|
|
8
|
+
out[prefix] = String(obj);
|
|
9
|
+
return out;
|
|
10
|
+
}
|
|
11
|
+
if (Array.isArray(obj)) {
|
|
12
|
+
obj.forEach((item, i) => flatten(item, prefix ? `${prefix}.${i}` : String(i), out));
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
if (typeof obj === "object") {
|
|
16
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
17
|
+
flatten(value, prefix ? `${prefix}.${key}` : key, out);
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
const NON_COPY_LEAVES = /* @__PURE__ */ new Set(["id", "buttonId", "link", "href", "to", "order", "image", "eventType", "authorId"]);
|
|
24
|
+
function isCopyKey(key) {
|
|
25
|
+
const last = key.split(".").pop() ?? key;
|
|
26
|
+
return !NON_COPY_LEAVES.has(last);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
flatten,
|
|
30
|
+
isCopyKey
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import
|
|
4
|
+
import stdin_default from "../Button/Button.styles.js";
|
|
5
5
|
import { Container, Row, Column, Avatar, AvatarImg, Name } from "./CryptoAddressDetails.styles.js";
|
|
6
6
|
const CryptoAddressDetails = ({ data }) => /* @__PURE__ */ jsxs(Container, { children: [
|
|
7
7
|
/* @__PURE__ */ jsxs(Row, { head: true, children: [
|
|
@@ -15,7 +15,7 @@ const CryptoAddressDetails = ({ data }) => /* @__PURE__ */ jsxs(Container, { chi
|
|
|
15
15
|
/* @__PURE__ */ jsx(Name, { children: datum.name })
|
|
16
16
|
] }),
|
|
17
17
|
/* @__PURE__ */ jsx(Column, { balance: true, balanceText: true, children: datum.balance }),
|
|
18
|
-
/* @__PURE__ */ jsx(Column, { transfer: true, children: /* @__PURE__ */ jsx(
|
|
18
|
+
/* @__PURE__ */ jsx(Column, { transfer: true, children: /* @__PURE__ */ jsx(stdin_default, { outline: true, fluid: true, onClick: datum.transferClick, children: "Transfer" }) })
|
|
19
19
|
] }, `${datum.id}-${index.toString()}`))
|
|
20
20
|
] });
|
|
21
21
|
CryptoAddressDetails.propTypes = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import rwd from "../../styles/rwd.js";
|
|
3
|
-
import
|
|
3
|
+
import stdin_default from "../Button/Button.styles.js";
|
|
4
4
|
const DoubleButtons = styled.div.withConfig({
|
|
5
5
|
shouldForwardProp: (props) => !["column"].includes(props)
|
|
6
6
|
})`
|
|
7
7
|
margin: -12px;
|
|
8
8
|
|
|
9
|
-
${
|
|
9
|
+
${stdin_default} {
|
|
10
10
|
width: 100%;
|
|
11
11
|
margin: 12px;
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ const DoubleButtons = styled.div.withConfig({
|
|
|
16
16
|
flex-direction: ${({ column }) => column ? "column" : "row"};
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
${
|
|
19
|
+
${stdin_default} {
|
|
20
20
|
width: auto;
|
|
21
21
|
flex: 1;
|
|
22
22
|
}
|
|
@@ -7,7 +7,7 @@ import { Modal } from "../Modal/Modal.js";
|
|
|
7
7
|
import stdin_default$1 from "../Form/Form.js";
|
|
8
8
|
import { Text } from "../Text/Text.styles.js";
|
|
9
9
|
import { Input } from "../Input/Input.js";
|
|
10
|
-
import
|
|
10
|
+
import stdin_default$2 from "../Button/Button.styles.js";
|
|
11
11
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
12
12
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
13
13
|
import { emailRegex } from "../../constants/globalVariables.js";
|
|
@@ -86,7 +86,7 @@ class ForgotPasswordModal extends PureComponent {
|
|
|
86
86
|
/* @__PURE__ */ jsx(FormError, { show: errors.email && touched.email, children: errors.email })
|
|
87
87
|
] }) }),
|
|
88
88
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
89
|
-
|
|
89
|
+
stdin_default$2,
|
|
90
90
|
{
|
|
91
91
|
type: "submit",
|
|
92
92
|
id: "forgot-password-submit-btn",
|
|
@@ -2,15 +2,15 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo, useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import stdin_default$1 from "../SmartLink/SmartLink.js";
|
|
5
|
-
import
|
|
5
|
+
import stdin_default$3 from "../Button/Button.styles.js";
|
|
6
6
|
import stdin_default$2 from "../SvgIcons/LogoSvg.js";
|
|
7
7
|
import { MenuNav } from "../MenuNav/MenuNav.styles.js";
|
|
8
|
-
import stdin_default$
|
|
8
|
+
import stdin_default$5 from "../MainMenu/MainMenu.js";
|
|
9
9
|
import { StepsProgressSignup, StepsProgressHeader } from "../StepsProgress/StepsProgress.js";
|
|
10
10
|
import { NotificationCounter } from "../NotificationCounter/NotificationCounter.styles.js";
|
|
11
11
|
import avatarPlaceholder from "../../static/images/avatar-placeholder.png.js";
|
|
12
12
|
import { StyledHeader, SidebarToggle, HamburgerIcon, HeaderInner, MainNavWrap, Logo, HeaderMainNav, ProgressWrap, QuickNavWrap, MobileMenuToggler, HeaderQuickNav, LoginButton, UserAccount, UserButton, SignupButton, MobileMenu, MobileMenuPart, MobileMenuItem, MobileMenuLink, CTAContainer, SocialLinksContainer, UserAvatar, MobileMenuWrapper, StyledSubMenu } from "./Header.styles.js";
|
|
13
|
-
import stdin_default$
|
|
13
|
+
import stdin_default$4 from "../MainMenu/DynamicMainMenu.js";
|
|
14
14
|
import { SocialLink, ArrowDown } from "../Footer/FooterMenu.styles.js";
|
|
15
15
|
import { Collapse } from "react-collapse";
|
|
16
16
|
import { usePrevious, useMobileView } from "../../utils/customHooks.js";
|
|
@@ -235,7 +235,7 @@ function HeaderView({
|
|
|
235
235
|
}
|
|
236
236
|
),
|
|
237
237
|
isMobile && checkTodoStatus(user) > 0 && !signupFlow && /* @__PURE__ */ jsx(NotificationCounter, { mobile: true, isActive: currentActiveMenu === "main", children: checkTodoStatus(user) }),
|
|
238
|
-
/* @__PURE__ */ jsx(HeaderQuickNav, { isUserLogged: hasLoggedInSession(user), children: /* @__PURE__ */ jsx(Fragment, { children: hasLoggedInSession(user) ? /* @__PURE__ */ jsx(Fragment, { children: signupFlow ? /* @__PURE__ */ jsx(
|
|
238
|
+
/* @__PURE__ */ jsx(HeaderQuickNav, { isUserLogged: hasLoggedInSession(user), children: /* @__PURE__ */ jsx(Fragment, { children: hasLoggedInSession(user) ? /* @__PURE__ */ jsx(Fragment, { children: signupFlow ? /* @__PURE__ */ jsx(stdin_default$3, { onClick: logoutUser, children: "Log Out" }) : /* @__PURE__ */ jsxs(FlexContainer, { itemsCenter: true, children: [
|
|
239
239
|
/* @__PURE__ */ jsx(Breakdown, { children: /* @__PURE__ */ jsx(
|
|
240
240
|
LoginButton,
|
|
241
241
|
{
|
|
@@ -350,11 +350,11 @@ function HeaderView({
|
|
|
350
350
|
}
|
|
351
351
|
) })
|
|
352
352
|
] }) }) }) }),
|
|
353
|
-
/* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, noPaddingTop: !signupFlow, borderTop: signupFlow, isLast: true, children: /* @__PURE__ */ jsx(
|
|
353
|
+
/* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, noPaddingTop: !signupFlow, borderTop: signupFlow, isLast: true, children: /* @__PURE__ */ jsx(stdin_default$3, { minWidth: "160px", secondary: true, onClick: () => logoutUser(), children: "log out" }) })
|
|
354
354
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
355
355
|
withoutLoginSignupButton ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
356
356
|
/* @__PURE__ */ jsx(Breakdown, { alignCenter: true, children: /* @__PURE__ */ jsx(
|
|
357
|
-
|
|
357
|
+
stdin_default$3,
|
|
358
358
|
{
|
|
359
359
|
onClick: () => {
|
|
360
360
|
track("header_link_clicked", { link: "login" });
|
|
@@ -393,10 +393,10 @@ function HeaderView({
|
|
|
393
393
|
] })
|
|
394
394
|
] })
|
|
395
395
|
] }),
|
|
396
|
-
/* @__PURE__ */ jsx(stdin_default$
|
|
397
|
-
/* @__PURE__ */ jsx(stdin_default$
|
|
396
|
+
/* @__PURE__ */ jsx(stdin_default$4, { isMenuActive: currentActiveMenu === "products", options: productMenuItems }),
|
|
397
|
+
/* @__PURE__ */ jsx(stdin_default$4, { isMenuActive: currentActiveMenu === "media", options: mediaMenuItems }),
|
|
398
398
|
/* @__PURE__ */ jsx(
|
|
399
|
-
stdin_default$
|
|
399
|
+
stdin_default$5,
|
|
400
400
|
{
|
|
401
401
|
isMenuActive: currentActiveMenu === "main",
|
|
402
402
|
logoutUser,
|
|
@@ -3,7 +3,7 @@ import stdin_default from "../SmartLink/SmartLink.js";
|
|
|
3
3
|
import rwd, { rwdMax } from "../../styles/rwd.js";
|
|
4
4
|
import { colors } from "../../styles/colors.js";
|
|
5
5
|
import spacing from "../../styles/spacing.js";
|
|
6
|
-
import
|
|
6
|
+
import stdin_default$1 from "../Button/Button.styles.js";
|
|
7
7
|
import { WHITE_HEX, BLUE_BASE_RELEASED_HEX, GRAY_BASE_HEX } from "../../constants/style.js";
|
|
8
8
|
import { SocialLink } from "../Footer/FooterMenu.styles.js";
|
|
9
9
|
import { iconsMap, Icon } from "../Icon/Icon.style.js";
|
|
@@ -472,7 +472,7 @@ const LoginButton = styled.span`
|
|
|
472
472
|
display: block;
|
|
473
473
|
}
|
|
474
474
|
`;
|
|
475
|
-
const SignupButton = styled(
|
|
475
|
+
const SignupButton = styled(stdin_default$1).withConfig({
|
|
476
476
|
shouldForwardProp: (props) => !["isMobile"].includes(props)
|
|
477
477
|
})`
|
|
478
478
|
padding-right: 32px !important;
|
|
@@ -9,7 +9,7 @@ import stdin_default$1 from "../Form/Form.js";
|
|
|
9
9
|
import { Text } from "../Text/Text.styles.js";
|
|
10
10
|
import { Input } from "../Input/Input.js";
|
|
11
11
|
import stdin_default$2 from "../Input/InputPassword.js";
|
|
12
|
-
import
|
|
12
|
+
import stdin_default$3 from "../Button/Button.styles.js";
|
|
13
13
|
import { TextLink } from "../TextLink/TextLink.styles.js";
|
|
14
14
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
15
15
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
@@ -115,7 +115,7 @@ const LoginModal = (props) => {
|
|
|
115
115
|
/* @__PURE__ */ jsx(FormError, { show: errors.password && touched.password, children: errors.password })
|
|
116
116
|
] }) }),
|
|
117
117
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
118
|
-
|
|
118
|
+
stdin_default$3,
|
|
119
119
|
{
|
|
120
120
|
type: "submit",
|
|
121
121
|
id: "login-submit-btn",
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useCallback, useEffect } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { DotLottieReact } from "@lottiefiles/dotlottie-react";
|
|
5
|
+
import { AnimationWrapper } from "./LottieAnimation.styles.js";
|
|
6
|
+
import progressAnimation from "../../static/animations/progress.lottie.js";
|
|
7
|
+
import uploadAnimation from "../../static/animations/upload.lottie.js";
|
|
8
|
+
import successAnimation from "../../static/animations/checked.lottie.js";
|
|
9
|
+
const LOTTIE_ANIMATIONS = {
|
|
10
|
+
progress: { src: progressAnimation, segment: null, loop: false },
|
|
11
|
+
upload: { src: uploadAnimation, segment: null, loop: false },
|
|
12
|
+
success: { src: successAnimation, segment: [0, 50], loop: false }
|
|
13
|
+
};
|
|
14
|
+
const LottieAnimation = ({
|
|
15
|
+
variant = "progress",
|
|
16
|
+
src,
|
|
17
|
+
loop,
|
|
18
|
+
autoplay = true,
|
|
19
|
+
segment,
|
|
20
|
+
speed = 1,
|
|
21
|
+
size = 80,
|
|
22
|
+
style,
|
|
23
|
+
className
|
|
24
|
+
}) => {
|
|
25
|
+
const config = LOTTIE_ANIMATIONS[variant] || LOTTIE_ANIMATIONS.progress;
|
|
26
|
+
const animationSrc = src || config.src;
|
|
27
|
+
const animationLoop = loop !== void 0 ? loop : config.loop;
|
|
28
|
+
const animationSegment = segment || config.segment;
|
|
29
|
+
const dotRef = useRef(null);
|
|
30
|
+
const timersRef = useRef([]);
|
|
31
|
+
const clearTimers = () => {
|
|
32
|
+
timersRef.current.forEach(clearTimeout);
|
|
33
|
+
timersRef.current = [];
|
|
34
|
+
};
|
|
35
|
+
const refCallback = useCallback(
|
|
36
|
+
(dot) => {
|
|
37
|
+
clearTimers();
|
|
38
|
+
dotRef.current = dot || null;
|
|
39
|
+
if (!dot || animationLoop || !animationSegment) return;
|
|
40
|
+
const [startFrame, endFrame] = animationSegment;
|
|
41
|
+
const armHold = () => {
|
|
42
|
+
const d = dotRef.current;
|
|
43
|
+
if (!d) return;
|
|
44
|
+
if (!d.isLoaded || !d.duration || !d.totalFrames) {
|
|
45
|
+
timersRef.current.push(setTimeout(armHold, 40));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const fps = d.totalFrames / d.duration;
|
|
49
|
+
const playMs = (endFrame - startFrame) / fps / (speed || 1) * 1e3;
|
|
50
|
+
timersRef.current.push(
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
const dd = dotRef.current;
|
|
53
|
+
if (!dd) return;
|
|
54
|
+
dd.pause();
|
|
55
|
+
dd.setFrame(endFrame);
|
|
56
|
+
}, playMs)
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
armHold();
|
|
60
|
+
},
|
|
61
|
+
[animationSegment, animationLoop, speed]
|
|
62
|
+
);
|
|
63
|
+
useEffect(() => clearTimers, []);
|
|
64
|
+
return /* @__PURE__ */ jsx(AnimationWrapper, { $size: size, style, className, children: /* @__PURE__ */ jsx(
|
|
65
|
+
DotLottieReact,
|
|
66
|
+
{
|
|
67
|
+
dotLottieRefCallback: refCallback,
|
|
68
|
+
src: animationSrc,
|
|
69
|
+
loop: animationLoop,
|
|
70
|
+
autoplay,
|
|
71
|
+
speed,
|
|
72
|
+
segment: animationSegment,
|
|
73
|
+
style: { width: "100%", height: "100%" }
|
|
74
|
+
}
|
|
75
|
+
) });
|
|
76
|
+
};
|
|
77
|
+
LottieAnimation.propTypes = {
|
|
78
|
+
variant: PropTypes.oneOf(Object.keys(LOTTIE_ANIMATIONS)),
|
|
79
|
+
src: PropTypes.string,
|
|
80
|
+
loop: PropTypes.bool,
|
|
81
|
+
autoplay: PropTypes.bool,
|
|
82
|
+
segment: PropTypes.arrayOf(PropTypes.number),
|
|
83
|
+
speed: PropTypes.number,
|
|
84
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
85
|
+
style: PropTypes.object,
|
|
86
|
+
className: PropTypes.string
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
LOTTIE_ANIMATIONS,
|
|
90
|
+
LottieAnimation
|
|
91
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const AnimationWrapper = styled.div`
|
|
3
|
+
width: ${(props) => typeof props.$size === "number" ? `${props.$size}px` : props.$size};
|
|
4
|
+
height: ${(props) => typeof props.$size === "number" ? `${props.$size}px` : props.$size};
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
`;
|
|
10
|
+
export {
|
|
11
|
+
AnimationWrapper
|
|
12
|
+
};
|
|
@@ -3,7 +3,7 @@ import { PureComponent } from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Collapse } from "react-collapse";
|
|
5
5
|
import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption, ExpandArrow, Settings, SettingsOptions, SettingsOption } from "./MainMenu.styles.js";
|
|
6
|
-
import
|
|
6
|
+
import stdin_default$1 from "../Button/Button.styles.js";
|
|
7
7
|
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
8
8
|
import { getConfig } from "../../runtime-config.js";
|
|
9
9
|
import { withRouter } from "../../utils/withRouter.js";
|
|
@@ -120,7 +120,7 @@ class MainMenuClass extends PureComponent {
|
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
) }),
|
|
123
|
-
/* @__PURE__ */ jsx(MainMenuOption, { children: /* @__PURE__ */ jsx(
|
|
123
|
+
/* @__PURE__ */ jsx(MainMenuOption, { children: /* @__PURE__ */ jsx(stdin_default$1, { negative: true, onClick: () => logoutUser(), children: "log out" }) })
|
|
124
124
|
] }),
|
|
125
125
|
!isAdmin && /* @__PURE__ */ jsx(Settings, { children: /* @__PURE__ */ jsx(Collapse, { isOpened: isSettingsActive, children: /* @__PURE__ */ jsxs(SettingsOptions, { children: [
|
|
126
126
|
/* @__PURE__ */ jsx(
|
|
@@ -9,11 +9,11 @@ import { emailRegex, ProjectTypes } from "../../../constants/globalVariables.js"
|
|
|
9
9
|
import { Modal } from "../Modal.js";
|
|
10
10
|
import { Row, Column } from "../../Grid/Grid.styles.js";
|
|
11
11
|
import { Text } from "../../Text/Text.styles.js";
|
|
12
|
-
import stdin_default from "../../Form/Form.js";
|
|
12
|
+
import stdin_default$1 from "../../Form/Form.js";
|
|
13
13
|
import { ComponentWrapper } from "../../ComponentWrapper/ComponentWrapper.styles.js";
|
|
14
14
|
import { Input } from "../../Input/Input.js";
|
|
15
|
-
import stdin_default$
|
|
16
|
-
import
|
|
15
|
+
import stdin_default$2 from "../../Checkbox/Checkbox.js";
|
|
16
|
+
import stdin_default from "../../Button/Button.styles.js";
|
|
17
17
|
import { useNewVentureForm } from "../../../hooks/useNewVentureForm.js";
|
|
18
18
|
import { getConfig } from "../../../runtime-config.js";
|
|
19
19
|
import { ModalInner } from "../Modal.styles.js";
|
|
@@ -94,7 +94,7 @@ const NewVentureModal = (props) => {
|
|
|
94
94
|
/* @__PURE__ */ jsx("br", {}),
|
|
95
95
|
/* @__PURE__ */ jsx("p", { children: errorMessage ? errorMessage : successMessage }),
|
|
96
96
|
successMessage && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
97
|
-
|
|
97
|
+
stdin_default,
|
|
98
98
|
{
|
|
99
99
|
fluid: true,
|
|
100
100
|
id: "private-investor-success-button",
|
|
@@ -148,7 +148,7 @@ const NewVentureModal = (props) => {
|
|
|
148
148
|
};
|
|
149
149
|
const requiresIdentityFields = !isLoggedIn;
|
|
150
150
|
const submitDisabled = requiresIdentityFields && (!values.email || !!errors.email || !values.name || !!errors.name) || isSubmitting || !oneOfCheckbox || !optionalCheckBoxForm;
|
|
151
|
-
return /* @__PURE__ */ jsxs(stdin_default, { children: [
|
|
151
|
+
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
152
152
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
153
153
|
!isLoggedIn && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
154
154
|
/* @__PURE__ */ jsx(
|
|
@@ -187,7 +187,7 @@ const NewVentureModal = (props) => {
|
|
|
187
187
|
] })
|
|
188
188
|
] }),
|
|
189
189
|
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "1rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
190
|
-
stdin_default$
|
|
190
|
+
stdin_default$2,
|
|
191
191
|
{
|
|
192
192
|
id: "createPrivateInvestor",
|
|
193
193
|
name: "privateInvestorList",
|
|
@@ -200,7 +200,7 @@ const NewVentureModal = (props) => {
|
|
|
200
200
|
}
|
|
201
201
|
) }),
|
|
202
202
|
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
203
|
-
stdin_default$
|
|
203
|
+
stdin_default$2,
|
|
204
204
|
{
|
|
205
205
|
id: "subscribeToProject",
|
|
206
206
|
name: "mailingList",
|
|
@@ -213,7 +213,7 @@ const NewVentureModal = (props) => {
|
|
|
213
213
|
}
|
|
214
214
|
) }),
|
|
215
215
|
optionalCheckBox && /* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
216
|
-
stdin_default$
|
|
216
|
+
stdin_default$2,
|
|
217
217
|
{
|
|
218
218
|
id: "optionalCheckBox",
|
|
219
219
|
name: "optionalCheckBoxChecked",
|
|
@@ -237,7 +237,7 @@ const NewVentureModal = (props) => {
|
|
|
237
237
|
) })
|
|
238
238
|
] }) }),
|
|
239
239
|
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsx(
|
|
240
|
-
|
|
240
|
+
stdin_default,
|
|
241
241
|
{
|
|
242
242
|
type: "submit",
|
|
243
243
|
id: "private-investor-subscribe-button",
|
|
@@ -7,7 +7,7 @@ import { Text } from "../Text/Text.styles.js";
|
|
|
7
7
|
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
8
8
|
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
9
|
import stdin_default from "../CryptoAddress/CryptoAddress.js";
|
|
10
|
-
import
|
|
10
|
+
import stdin_default$1 from "../Button/Button.styles.js";
|
|
11
11
|
import { getCurrencySymbol } from "../../utils/formatCurrencyValue.js";
|
|
12
12
|
import theme from "../../styles/theme.js";
|
|
13
13
|
import { Icon, iconsMap } from "../Icon/Icon.style.js";
|
|
@@ -108,7 +108,7 @@ const PaymentModal = ({
|
|
|
108
108
|
formatInTimeZone(new Date(secondsRemaining * 1e3), "UTC", "mm:ss"),
|
|
109
109
|
" Waiting for payment..."
|
|
110
110
|
] }) }) }),
|
|
111
|
-
!noCTA && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
111
|
+
!noCTA && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(stdin_default$1, { "data-cy": "payment-modal-cta", onClick: onCTAClick, children: CTAText }) })
|
|
112
112
|
] }),
|
|
113
113
|
/* @__PURE__ */ jsx(Column, { part: 8, children: error ? error : /* @__PURE__ */ jsxs(Text, { children: [
|
|
114
114
|
sendTokenTextRight,
|