@stokr/components-library 3.0.30 → 3.0.32

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.
Files changed (39) hide show
  1. package/dist/analytics/index.js +2 -1
  2. package/dist/components/2FA/Connect2FA.js +11 -1
  3. package/dist/components/2FA/EnterCode.js +13 -2
  4. package/dist/components/2FA/InstallAuthApp.js +4 -0
  5. package/dist/components/2FA/ResetCode.js +2 -1
  6. package/dist/components/2FA/Sucess2FA.js +14 -2
  7. package/dist/components/2FA/disable-2fa-flow.js +15 -2
  8. package/dist/components/2FA/enable-2fa-flow.js +5 -0
  9. package/dist/components/2FA/main-flow.js +3 -0
  10. package/dist/components/BackButton/BackButton.js +4 -2
  11. package/dist/components/Checklist/ChecklistCard.js +2 -1
  12. package/dist/components/ConfirmModal/ConfirmModal.js +21 -2
  13. package/dist/components/FAQ/FAQ.js +37 -23
  14. package/dist/components/Footer/FooterMenu.styles.js +2 -1
  15. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +24 -3
  16. package/dist/components/Header/Header.js +20 -25
  17. package/dist/components/Header/Header.styles.js +2 -1
  18. package/dist/components/Input/InputPassword.js +27 -12
  19. package/dist/components/Input/OtpInput.js +21 -7
  20. package/dist/components/Input/Select.js +11 -2
  21. package/dist/components/Input/TableFilterDropdown.js +23 -7
  22. package/dist/components/LoginModal/LoginModal.js +7 -4
  23. package/dist/components/Modal/Modal.styles.js +10 -2
  24. package/dist/components/Modal/NewVentureModal/NewVentureModal.js +21 -6
  25. package/dist/components/Modal/PaymentModal.js +16 -16
  26. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +1 -1
  27. package/dist/components/RegisterModal/RegisterModal.js +30 -5
  28. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +1 -1
  29. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +16 -4
  30. package/dist/components/StepController/StepControllerProgress.js +1 -0
  31. package/dist/components/Switch/Switch.js +5 -3
  32. package/dist/components/ToDoList/ToDoListTask.js +1 -0
  33. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +14 -2
  34. package/dist/components/headerHo/HeaderHo.js +2 -0
  35. package/dist/components/taxId/complete.js +23 -2
  36. package/dist/components/taxId/flow.js +11 -1
  37. package/dist/components/taxId/register-taxid.js +25 -4
  38. package/dist/utils/formatCurrencyValue.js +4 -2
  39. package/package.json +1 -1
@@ -95,7 +95,8 @@ function initAnalytics({
95
95
  rage_click: true,
96
96
  scroll,
97
97
  submit: true,
98
- capture_text_content: false
98
+ capture_text_content: false,
99
+ capture_extra_attrs: ["data-cy"]
99
100
  },
100
101
  record_sessions_percent: 100,
101
102
  record_heatmap_data: true,
@@ -44,7 +44,17 @@ const Connect2FA = (props) => {
44
44
  }
45
45
  )
46
46
  ] }),
47
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, center: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { minWidth: "150px", onClick: changeStep, fluid: true, children: "Continue" }) })
47
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, center: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
48
+ Button,
49
+ {
50
+ minWidth: "150px",
51
+ id: "enable-2fa-connect-continue-btn",
52
+ "data-cy": "enable-2fa-connect-continue",
53
+ onClick: changeStep,
54
+ fluid: true,
55
+ children: "Continue"
56
+ }
57
+ ) })
48
58
  ] }) })
49
59
  ] }) });
50
60
  };
@@ -19,7 +19,7 @@ const EnterCode = (props) => {
19
19
  /* @__PURE__ */ jsx("h3", { children: "Enter 2FA code" }),
20
20
  /* @__PURE__ */ jsx("p", { children: "Enter the log in 2FA code from your authenticator app" })
21
21
  ] }) }),
22
- /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: onModalSwitch && /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", onClick: onModalSwitch, children: "Lost your device?" }) }) })
22
+ /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: onModalSwitch && /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", "data-cy": "2fa-enter-code-lost-device", onClick: onModalSwitch, children: "Lost your device?" }) }) })
23
23
  ] }),
24
24
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
25
25
  Formik,
@@ -38,6 +38,7 @@ const EnterCode = (props) => {
38
38
  id: "otp-input",
39
39
  name: "otpInput",
40
40
  numInputs: 6,
41
+ dataCyPrefix: "2fa-enter-code-otp",
41
42
  value: values.otpInput,
42
43
  onChange: (e) => {
43
44
  setFieldValue("otpInput", e);
@@ -48,7 +49,17 @@ const EnterCode = (props) => {
48
49
  ),
49
50
  /* @__PURE__ */ jsx(FormError, { show: errors.otpInput && touched.otpInput, children: errors.otpInput })
50
51
  ] }) }),
51
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "2fa-enter-code-btn", fluid: true, disabled: submitDisabled, children: "Continue" }) }),
52
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
53
+ Button,
54
+ {
55
+ type: "submit",
56
+ id: "2fa-enter-code-btn",
57
+ "data-cy": "2fa-enter-code-submit",
58
+ fluid: true,
59
+ disabled: submitDisabled,
60
+ children: "Continue"
61
+ }
62
+ ) }),
52
63
  /* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError?.popup === "enter2fa", children: popupError.message }) })
53
64
  ] });
54
65
  }
@@ -22,6 +22,8 @@ const InstallAuthApp = (props) => {
22
22
  Button,
23
23
  {
24
24
  minWidth: "150px",
25
+ id: "enable-2fa-download-app-btn",
26
+ "data-cy": "enable-2fa-download-auth-app",
25
27
  fluid: true,
26
28
  onClick: () => {
27
29
  window.open("https://onelink.to/ev63j9", "_blank");
@@ -50,6 +52,8 @@ const InstallAuthApp = (props) => {
50
52
  Button,
51
53
  {
52
54
  minWidth: "150px",
55
+ id: "enable-2fa-install-app-continue-btn",
56
+ "data-cy": "enable-2fa-install-app-continue",
53
57
  onClick: changeStep,
54
58
  fluid: true,
55
59
  children: "Continue"
@@ -12,7 +12,7 @@ const ResetCode = (props) => {
12
12
  /* @__PURE__ */ jsx("h3", { children: "Lost your device?" }),
13
13
  /* @__PURE__ */ jsx("p", { children: "No problem! We are here to help you..." })
14
14
  ] }) }),
15
- /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", onClick: onModalSwitch, children: "Enter 2FA code" }) }) })
15
+ /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", "data-cy": "2fa-reset-code-back-to-enter-code", onClick: onModalSwitch, children: "Enter 2FA code" }) }) })
16
16
  ] }),
17
17
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(
18
18
  "a",
@@ -20,6 +20,7 @@ const ResetCode = (props) => {
20
20
  href: "https://stokr.zendesk.com/hc/en-us/requests/new",
21
21
  target: "_blank",
22
22
  rel: "noreferrer",
23
+ "data-cy": "2fa-reset-code-contact-support",
23
24
  style: { textDecoration: "underline" },
24
25
  children: "Contact us to reset your 2FA."
25
26
  }
@@ -12,7 +12,11 @@ const Sucess2FA = ({
12
12
  titleText = "Success!",
13
13
  subTitleLeft = "",
14
14
  textRight = "",
15
- buttonText = "Continue"
15
+ buttonText = "Continue",
16
+ /** DOM id for the primary action button — override per screen (verify email, enable/disable 2FA, etc.) */
17
+ continueButtonId = "success-flow-continue-btn",
18
+ /** Playwright / analytics-friendly selector for the primary button */
19
+ continueButtonDataCy = "success-flow-continue"
16
20
  }) => {
17
21
  return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
18
22
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
@@ -30,7 +34,9 @@ const Sucess2FA = ({
30
34
  /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
31
35
  Button,
32
36
  {
37
+ id: continueButtonId,
33
38
  minWidth: "240px",
39
+ "data-cy": continueButtonDataCy,
34
40
  onClick: () => {
35
41
  onClick();
36
42
  },
@@ -42,7 +48,13 @@ const Sucess2FA = ({
42
48
  ] }) });
43
49
  };
44
50
  Sucess2FA.propTypes = {
45
- onClick: PropTypes.func.isRequired
51
+ onClick: PropTypes.func.isRequired,
52
+ titleText: PropTypes.string,
53
+ subTitleLeft: PropTypes.string,
54
+ textRight: PropTypes.string,
55
+ buttonText: PropTypes.string,
56
+ continueButtonId: PropTypes.string,
57
+ continueButtonDataCy: PropTypes.string
46
58
  };
47
59
  var stdin_default = Sucess2FA;
48
60
  export {
@@ -60,6 +60,8 @@ const Disable2FA = ({ showFlow, setShowFlow, onSuccess, onRequiresRecentLoginErr
60
60
  children: /* @__PURE__ */ jsx(ModalInner, { noPadding: true, children: isModalOpen.sucess ? /* @__PURE__ */ jsx(
61
61
  stdin_default$1,
62
62
  {
63
+ continueButtonId: "disable-2fa-success-continue-btn",
64
+ continueButtonDataCy: "disable-2fa-success-continue",
63
65
  onClick: () => {
64
66
  setShowFlow(false);
65
67
  onSuccess?.();
@@ -77,8 +79,19 @@ const Disable2FA = ({ showFlow, setShowFlow, onSuccess, onRequiresRecentLoginErr
77
79
  ] }),
78
80
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
79
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?" }) }) }),
80
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { secondary: true, style: { marginRight: 20 }, onClick: () => setShowFlow(false), fluid: true, children: "NO" }) }),
81
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, children: /* @__PURE__ */ jsx(Button, { onClick: handleDisableClick, fluid: true, children: "Yes" }) })
82
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
83
+ Button,
84
+ {
85
+ secondary: true,
86
+ style: { marginRight: 20 },
87
+ id: "disable-2fa-confirm-no-btn",
88
+ "data-cy": "disable-2fa-confirm-no",
89
+ onClick: () => setShowFlow(false),
90
+ fluid: true,
91
+ children: "NO"
92
+ }
93
+ ) }),
94
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, children: /* @__PURE__ */ jsx(Button, { id: "disable-2fa-confirm-yes-btn", "data-cy": "disable-2fa-confirm-yes", onClick: handleDisableClick, fluid: true, children: "Yes" }) })
82
95
  ] }) })
83
96
  ] }) }) })
84
97
  }
@@ -64,6 +64,8 @@ const Enable2FAFlow = ({ showFlow, setShowFlow, onSuccess, totpData, onRequiresR
64
64
  return /* @__PURE__ */ jsx(Modal, { isOpen: showFlow, onClose: () => setShowFlow(false), children: /* @__PURE__ */ jsx(ModalInner, { noPadding: true, children: showSuccess ? /* @__PURE__ */ jsx(
65
65
  stdin_default$1,
66
66
  {
67
+ continueButtonId: "enable-2fa-success-continue-btn",
68
+ continueButtonDataCy: "enable-2fa-success-continue",
67
69
  onClick: () => {
68
70
  if (onSuccess) onSuccess();
69
71
  setshowSuccess(false);
@@ -88,18 +90,21 @@ const Enable2FAFlow = ({ showFlow, setShowFlow, onSuccess, totpData, onRequiresR
88
90
  stepsProgressList: [
89
91
  {
90
92
  id: "app",
93
+ dataCy: "enable-2fa-progress-app",
91
94
  handleClick: () => {
92
95
  stepController.changeStep("app", 0);
93
96
  }
94
97
  },
95
98
  {
96
99
  id: "connect",
100
+ dataCy: "enable-2fa-progress-connect",
97
101
  handleClick: () => {
98
102
  stepController.changeStep("connect", 1);
99
103
  }
100
104
  },
101
105
  {
102
106
  id: "enter-code",
107
+ dataCy: "enable-2fa-progress-enter-code",
103
108
  handleClick: () => stepController.changeStep("enter-code", 2)
104
109
  }
105
110
  ],
@@ -129,6 +129,7 @@ const Main2FAFlow = ({
129
129
  children: /* @__PURE__ */ jsx(
130
130
  stdin_default$1,
131
131
  {
132
+ dataCy: "2fa-settings-toggle",
132
133
  value1: "disabled",
133
134
  value2: "enabled",
134
135
  value1Color: colors.orangishRed,
@@ -194,6 +195,8 @@ const Main2FAFlow = ({
194
195
  isFlowopen.requiresRecentLogin && /* @__PURE__ */ jsx(Modal, { isOpen: isFlowopen.requiresRecentLogin, onClose: () => handleFlowClose("requiresRecentLogin"), children: /* @__PURE__ */ jsx(ModalInner, { noPadding: true, children: /* @__PURE__ */ jsx(
195
196
  stdin_default$4,
196
197
  {
198
+ continueButtonId: "2fa-requires-recent-login-btn",
199
+ continueButtonDataCy: "2fa-requires-recent-login-submit",
197
200
  onClick: () => {
198
201
  onLoginAgainClick?.();
199
202
  },
@@ -1,9 +1,11 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import PropTypes from "prop-types";
4
- import { StyledBackButtonExternal, BackButtonIcon, StyledBackButton, StyledWindowBackButton } from "./BackButton.styles.js";
4
+ import { useNavigate } from "react-router-dom";
5
5
  import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
6
+ import { StyledBackButtonExternal, BackButtonIcon, StyledBackButton, StyledWindowBackButton } from "./BackButton.styles.js";
6
7
  const BackButton = ({ children, to, href }) => {
8
+ const navigate = useNavigate();
7
9
  return /* @__PURE__ */ jsxs(Fragment, { children: [
8
10
  /* @__PURE__ */ jsx(IoniconsStyles, {}),
9
11
  href ? /* @__PURE__ */ jsxs(StyledBackButtonExternal, { href, children: [
@@ -12,7 +14,7 @@ const BackButton = ({ children, to, href }) => {
12
14
  ] }) : to ? /* @__PURE__ */ jsxs(StyledBackButton, { to, children: [
13
15
  /* @__PURE__ */ jsx(BackButtonIcon, {}),
14
16
  children
15
- ] }) : /* @__PURE__ */ jsxs(StyledWindowBackButton, { onClick: () => window.history.back(), children: [
17
+ ] }) : /* @__PURE__ */ jsxs(StyledWindowBackButton, { onClick: () => navigate(-1), children: [
16
18
  /* @__PURE__ */ jsx(BackButtonIcon, {}),
17
19
  children
18
20
  ] })
@@ -6,6 +6,7 @@ import { CardContainer, IconBlock, IconCopy, CardTitle, CardDescription } from "
6
6
  import { Icon } from "../ToDoList/ToDoListTask.styles.js";
7
7
  import { colors } from "../../styles/colors.js";
8
8
  import SvgWarningFilled from "../../static/images/warning-filled.svg.js";
9
+ import { Link } from "react-router-dom";
9
10
  const ICON_MAP = {
10
11
  done: {
11
12
  icon: iconsMap.check,
@@ -52,7 +53,7 @@ const ChecklistCard = ({
52
53
  }
53
54
  );
54
55
  if (link && !onClick && !disabled) {
55
- return /* @__PURE__ */ jsx("a", { href: link, tabIndex: 0, "aria-disabled": disabled, style: { textDecoration: "none", color: "inherit" }, children: content });
56
+ return /* @__PURE__ */ jsx(Link, { to: link, tabIndex: 0, "aria-disabled": disabled, style: { textDecoration: "none", color: "inherit" }, children: content });
56
57
  }
57
58
  return content;
58
59
  };
@@ -89,8 +89,27 @@ const ConfirmModalComponent = ({
89
89
  onConfirm: handleConfirm,
90
90
  onCancel: handleCancel
91
91
  }) }) : /* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, flex: true, style: { gap: 16 }, children: [
92
- showCancel && /* @__PURE__ */ jsx(Button, { outlineBlack: true, minWidth: "120px", onClick: handleCancel, ...cancelButtonProps, children: cancelText }),
93
- /* @__PURE__ */ jsx(Button, { minWidth: "120px", onClick: () => handleConfirm(true), ...buttonProps, children: confirmText })
92
+ showCancel && /* @__PURE__ */ jsx(
93
+ Button,
94
+ {
95
+ outlineBlack: true,
96
+ minWidth: "120px",
97
+ onClick: handleCancel,
98
+ ...cancelButtonProps,
99
+ "data-cy": cancelButtonProps["data-cy"] ?? "confirm-modal-cancel",
100
+ children: cancelText
101
+ }
102
+ ),
103
+ /* @__PURE__ */ jsx(
104
+ Button,
105
+ {
106
+ minWidth: "120px",
107
+ onClick: () => handleConfirm(true),
108
+ ...buttonProps,
109
+ "data-cy": buttonProps["data-cy"] ?? "confirm-modal-confirm",
110
+ children: confirmText
111
+ }
112
+ )
94
113
  ] })
95
114
  ] }) }),
96
115
  showRedBar && /* @__PURE__ */ jsx(RedBar, { barColor, style: barStyle })
@@ -4,8 +4,13 @@ import { Text } from "../Text/Text.styles.js";
4
4
  import { useState } from "react";
5
5
  import scrollToElement from "scroll-to-element";
6
6
  import { FaqItems, FaqItem, FaqTitle, FaqDropdownIcon, FaqContent, FaqText } from "./FAQ.styles.js";
7
+ function slugFromTitle(title) {
8
+ if (title == null) return "";
9
+ const raw = typeof title === "string" ? title : "";
10
+ return raw.toLowerCase().trim().slice(0, 48).replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "");
11
+ }
7
12
  const FAQ = (props) => {
8
- const { items, noScroll, scrollRef, modalViewMore, withTextStyling } = props;
13
+ const { items, noScroll, scrollRef, modalViewMore, withTextStyling, dataCyPrefix = "faq" } = props;
9
14
  const [activeIndex, setActiveIndex] = useState(null);
10
15
  const onTitleClick = (e, index) => {
11
16
  e.persist();
@@ -30,27 +35,34 @@ const FAQ = (props) => {
30
35
  fontWeight: "300",
31
36
  lineHeight: "16px"
32
37
  };
33
- return /* @__PURE__ */ jsx(FaqItems, { children: items.map((item, index) => (
34
- // eslint-disable-next-line @eslint-react/no-array-index-key
35
- /* @__PURE__ */ jsxs(FaqItem, { children: [
36
- /* @__PURE__ */ jsxs(
37
- FaqTitle,
38
- {
39
- isActive: activeIndex === index,
40
- onClick: (e) => onTitleClick(e, index),
41
- modalViewMore,
42
- children: [
43
- item.title,
44
- /* @__PURE__ */ jsx(FaqDropdownIcon, {})
45
- ]
46
- }
47
- ),
48
- /* @__PURE__ */ jsx(FaqContent, { isOpened: activeIndex === index, children: !Array.isArray(item.content) ? /* @__PURE__ */ jsx(FaqText, { children: item.content }) : /* @__PURE__ */ jsxs(Fragment, { children: [
49
- /* @__PURE__ */ jsx("br", {}),
50
- /* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children: item.content.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) })
51
- ] }) })
52
- ] }, index)
53
- )) });
38
+ return /* @__PURE__ */ jsx(FaqItems, { "data-cy": `${dataCyPrefix}-accordion`, children: items.map((item, index) => {
39
+ const titleSlug = slugFromTitle(item.title);
40
+ const itemCy = titleSlug ? `${dataCyPrefix}-item-${titleSlug}` : `${dataCyPrefix}-item-${index}`;
41
+ return (
42
+ // eslint-disable-next-line @eslint-react/no-array-index-key -- FAQ order is content-defined
43
+ /* @__PURE__ */ jsxs(FaqItem, { "data-cy": `${itemCy}-wrap`, children: [
44
+ /* @__PURE__ */ jsxs(
45
+ FaqTitle,
46
+ {
47
+ type: "button",
48
+ "data-cy": `${itemCy}-toggle`,
49
+ "aria-expanded": activeIndex === index,
50
+ isActive: activeIndex === index,
51
+ onClick: (e) => onTitleClick(e, index),
52
+ modalViewMore,
53
+ children: [
54
+ item.title,
55
+ /* @__PURE__ */ jsx(FaqDropdownIcon, {})
56
+ ]
57
+ }
58
+ ),
59
+ /* @__PURE__ */ jsx(FaqContent, { "data-cy": `${itemCy}-panel`, isOpened: activeIndex === index, children: !Array.isArray(item.content) ? /* @__PURE__ */ jsx(FaqText, { children: item.content }) : /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx("br", {}),
61
+ /* @__PURE__ */ jsx(Text, { style: withTextStyling ? textStyling : {}, children: /* @__PURE__ */ jsx("ul", { children: item.content.map((answer) => /* @__PURE__ */ jsx("li", { children: answer }, answer)) }) })
62
+ ] }) })
63
+ ] }, index)
64
+ );
65
+ }) });
54
66
  };
55
67
  FAQ.propTypes = {
56
68
  items: PropTypes.arrayOf(
@@ -58,7 +70,9 @@ FAQ.propTypes = {
58
70
  title: PropTypes.node.isRequired,
59
71
  content: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.node]).isRequired
60
72
  })
61
- ).isRequired
73
+ ).isRequired,
74
+ /** Prefix for data-cy: `{prefix}-accordion`, `{prefix}-item-{slug}-toggle`, etc. */
75
+ dataCyPrefix: PropTypes.string
62
76
  };
63
77
  var stdin_default = FAQ;
64
78
  export {
@@ -1,6 +1,7 @@
1
1
  import styled from "styled-components";
2
2
  import { colors } from "../../styles/colors.js";
3
3
  import theme from "../../styles/theme.js";
4
+ import { Link as Link$1 } from "react-router-dom";
4
5
  const Container = styled.div`
5
6
  z-index: 2;
6
7
  position: relative;
@@ -185,7 +186,7 @@ const Item = styled.li.withConfig({
185
186
  padding-right: 16px;
186
187
  }
187
188
  `;
188
- const Link = styled.a`
189
+ const Link = styled(Link$1)`
189
190
  display: inline-block;
190
191
  font-family: 'Open Sans';
191
192
  font-weight: bold;
@@ -43,7 +43,17 @@ class ForgotPasswordModal extends PureComponent {
43
43
  ] }) }),
44
44
  /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
45
45
  footerTextContent,
46
- /* @__PURE__ */ jsx(ModalLink, { type: "button", to: "#", as: "button", onClick: onModalSwitch, children: "Log in" })
46
+ /* @__PURE__ */ jsx(
47
+ ModalLink,
48
+ {
49
+ type: "button",
50
+ to: "#",
51
+ as: "button",
52
+ "data-cy": "forgot-password-modal-switch-to-login",
53
+ onClick: onModalSwitch,
54
+ children: "Log in"
55
+ }
56
+ )
47
57
  ] }) })
48
58
  ] }),
49
59
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: popupSuccess.popup !== "forgot" ? /* @__PURE__ */ jsx(
@@ -69,12 +79,23 @@ class ForgotPasswordModal extends PureComponent {
69
79
  error: !!errors.email,
70
80
  touched: !!touched.email,
71
81
  onChange: handleChange,
72
- onBlur: handleBlur
82
+ onBlur: handleBlur,
83
+ "data-cy": "forgot-password-modal-email-input"
73
84
  }
74
85
  ),
75
86
  /* @__PURE__ */ jsx(FormError, { show: errors.email && touched.email, children: errors.email })
76
87
  ] }) }),
77
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "forgot-password-submit-btn", fluid: true, disabled: submitDisabled, children: isActionLoading === "forgot" ? "Sending Reset Link" : "Send Reset Link" }) }),
88
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
89
+ Button,
90
+ {
91
+ type: "submit",
92
+ id: "forgot-password-submit-btn",
93
+ "data-cy": "forgot-password-modal-submit",
94
+ fluid: true,
95
+ disabled: submitDisabled,
96
+ children: isActionLoading === "forgot" ? "Sending Reset Link" : "Send Reset Link"
97
+ }
98
+ ) }),
78
99
  /* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "forgot", children: popupError.message }) })
79
100
  ] });
80
101
  }
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useState, useEffect } from "react";
3
3
  import PropTypes from "prop-types";
4
+ import { Link } from "react-router-dom";
4
5
  import { Button } from "../Button/Button.styles.js";
5
6
  import stdin_default$1 from "../SvgIcons/LogoSvg.js";
6
7
  import "../SvgIcons/SocialInstagram.js";
@@ -65,7 +66,7 @@ const RenderSubMenu = ({
65
66
  /* @__PURE__ */ jsx("a", { children: title }),
66
67
  /* @__PURE__ */ jsx(ArrowDown, { displayAlways: true, isOpened: isActive, style: { right: "-2em", position: "absolute" } })
67
68
  ] }) }),
68
- /* @__PURE__ */ jsx(Collapse, { isOpened: isActive, children: subMenuItems.map((item) => /* @__PURE__ */ jsx(MobileMenuItem, { red: true, children: /* @__PURE__ */ jsx(MobileMenuLink, { href: basePlatformUrl + item.link, children: item.name }) }, item.name)) })
69
+ /* @__PURE__ */ jsx(Collapse, { isOpened: isActive, children: subMenuItems.map((item) => /* @__PURE__ */ jsx(MobileMenuItem, { red: true, children: /* @__PURE__ */ jsx(MobileMenuLink, { to: basePlatformUrl + item.link, children: item.name }) }, item.name)) })
69
70
  ] });
70
71
  };
71
72
  function HeaderView({
@@ -189,12 +190,12 @@ function HeaderView({
189
190
  withSidebar && /* @__PURE__ */ jsx(SidebarToggle, { isSidebarExpanded, onClick: sidebarHandler, children: /* @__PURE__ */ jsx(HamburgerIcon, {}) }),
190
191
  /* @__PURE__ */ jsxs(HeaderInner, { withSidebar, children: [
191
192
  /* @__PURE__ */ jsxs(MainNavWrap, { hasProgress: progress, children: [
192
- /* @__PURE__ */ jsx(Logo, { isHighlight: currentActiveMenu === "main", children: /* @__PURE__ */ jsx("a", { href: platformURL, "data-cy": "logo-nav-link", children: /* @__PURE__ */ jsx(stdin_default$1, {}) }) }),
193
+ /* @__PURE__ */ jsx(Logo, { isHighlight: currentActiveMenu === "main", children: /* @__PURE__ */ jsx(Link, { to: newPlatformUrl || "/", "data-cy": "logo-nav-link", children: /* @__PURE__ */ jsx(stdin_default$1, {}) }) }),
193
194
  !progress && /* @__PURE__ */ jsx(HeaderMainNav, { children: /* @__PURE__ */ jsx(MenuNav, { children: /* @__PURE__ */ jsxs("ul", { children: [
194
195
  /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
195
- "a",
196
+ Link,
196
197
  {
197
- href: newPlatformUrl + "/featured-assets",
198
+ to: newPlatformUrl + "/featured-assets",
198
199
  "data-cy": "invest-nav-link",
199
200
  onClick: () => track("header_link_clicked", { link: "invest" }),
200
201
  children: "Invest"
@@ -223,9 +224,9 @@ function HeaderView({
223
224
  }
224
225
  ) }),
225
226
  /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
226
- "a",
227
+ Link,
227
228
  {
228
- href: newPlatformUrl + "/team",
229
+ to: newPlatformUrl + "/team",
229
230
  "data-cy": "team-nav-link",
230
231
  onClick: () => track("header_link_clicked", { link: "team" }),
231
232
  children: "Team"
@@ -298,7 +299,7 @@ function HeaderView({
298
299
  ] }),
299
300
  /* @__PURE__ */ jsxs(MobileMenu, { isActive: currentActiveMenu === "main", withSidebar, children: [
300
301
  /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, children: /* @__PURE__ */ jsx(MenuNav, { mobile: true, children: /* @__PURE__ */ jsxs("ul", { children: [
301
- /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(MobileMenuLink, { href: newPlatformUrl + "/featured-assets", "data-cy": "invest-nav-link", children: "Invest" }) }),
302
+ /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(MobileMenuLink, { to: newPlatformUrl + "/featured-assets", "data-cy": "invest-nav-link", children: "Invest" }) }),
302
303
  /* @__PURE__ */ jsx(
303
304
  RenderSubMenu,
304
305
  {
@@ -323,16 +324,15 @@ function HeaderView({
323
324
  }
324
325
  }
325
326
  ),
326
- /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(MobileMenuLink, { href: newPlatformUrl + "/team", children: "Team" }) })
327
+ /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(MobileMenuLink, { to: newPlatformUrl + "/team", children: "Team" }) })
327
328
  ] }) }) }) }),
328
329
  hasLoggedInSession(user) ? /* @__PURE__ */ jsxs(Fragment, { children: [
329
- !signupFlow && /* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, borderTop: true, children: /* @__PURE__ */ jsx(MenuNav, { mobile: true, children: /* @__PURE__ */ jsx("ul", { children: isAdmin ? /* @__PURE__ */ jsx(Fragment, { children: isVentureDashboard ? /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx("a", { href: "/settings", children: "Settings" }) }) : /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
330
- "a",
330
+ !signupFlow && /* @__PURE__ */ jsx(MobileMenuPart, { withPadding: true, flexColumn: true, borderTop: true, children: /* @__PURE__ */ jsx(MenuNav, { mobile: true, children: /* @__PURE__ */ jsx("ul", { children: isAdmin ? /* @__PURE__ */ jsx(Fragment, { children: isVentureDashboard ? /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(Link, { to: "/settings", children: "Settings" }) }) : /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
331
+ Link,
331
332
  {
332
- href: getConfig("adminUrl"),
333
+ to: getConfig("adminUrl"),
333
334
  onClick: (e) => {
334
335
  e.preventDefault();
335
- navigateToHref(navigate, getConfig("adminUrl"));
336
336
  toggleMenu("main");
337
337
  },
338
338
  children: "Dashboard"
@@ -340,16 +340,11 @@ function HeaderView({
340
340
  ) }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
341
341
  /* @__PURE__ */ jsxs(MobileMenuItem, { children: [
342
342
  /* @__PURE__ */ jsx(
343
- "a",
343
+ Link,
344
344
  {
345
- href: newPlatformUrlForUserMenu ? `${newPlatformUrlForUserMenu}/overview` : "/overview",
345
+ to: newPlatformUrlForUserMenu ? `${newPlatformUrlForUserMenu}/overview` : "/overview",
346
346
  onClick: (e) => {
347
347
  e.preventDefault();
348
- if (newPlatformUrlForUserMenu) {
349
- navigateToHref(navigate, getConfig("dashboardUrl") + "/overview");
350
- } else {
351
- navigate("/overview");
352
- }
353
348
  toggleMenu("main");
354
349
  },
355
350
  children: "Dashboard"
@@ -358,25 +353,25 @@ function HeaderView({
358
353
  checkTodoStatus(user) > 0 && /* @__PURE__ */ jsx(NotificationCounter, { mobileMenu: true, children: checkTodoStatus(user) })
359
354
  ] }),
360
355
  /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
361
- "a",
356
+ Link,
362
357
  {
363
- href: `${newPlatformUrlForUserMenu}/settings/profile-and-privacy`,
358
+ to: `${newPlatformUrlForUserMenu}/settings/profile-and-privacy`,
364
359
  onClick: () => toggleMenu("main"),
365
360
  children: "Profile and Privacy"
366
361
  }
367
362
  ) }),
368
363
  /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
369
- "a",
364
+ Link,
370
365
  {
371
- href: `${newPlatformUrlForUserMenu}/settings/liquid-address`,
366
+ to: `${newPlatformUrlForUserMenu}/settings/liquid-address`,
372
367
  onClick: () => toggleMenu("main"),
373
368
  children: "Liquid Addresses"
374
369
  }
375
370
  ) }),
376
371
  /* @__PURE__ */ jsx(MobileMenuItem, { children: /* @__PURE__ */ jsx(
377
- "a",
372
+ Link,
378
373
  {
379
- href: `${newPlatformUrlForUserMenu}/settings/investment-eligibility`,
374
+ to: `${newPlatformUrlForUserMenu}/settings/investment-eligibility`,
380
375
  onClick: () => toggleMenu("main"),
381
376
  children: "Investment eligibility"
382
377
  }
@@ -1,4 +1,5 @@
1
1
  import styled from "styled-components";
2
+ import { Link } from "react-router-dom";
2
3
  import rwd, { rwdMax } from "../../styles/rwd.js";
3
4
  import { colors } from "../../styles/colors.js";
4
5
  import spacing from "../../styles/spacing.js";
@@ -363,7 +364,7 @@ const MobileMenuItem = styled.li.withConfig({
363
364
  const MobileMenuWrapper = styled.div`
364
365
  cursor: pointer;
365
366
  `;
366
- const MobileMenuLink = styled.a`
367
+ const MobileMenuLink = styled(Link)`
367
368
  width: 100%;
368
369
  `;
369
370
  const MobileMenuPart = styled.div.withConfig({