@stokr/components-library 3.0.55 → 3.0.57

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 (36) hide show
  1. package/dist/components/2FA/EnterCode.js +3 -3
  2. package/dist/components/2FA/ResetCode.js +4 -4
  3. package/dist/components/BackButton/BackButton.js +1 -3
  4. package/dist/components/ComponentScroll/ComponentScroll.js +1 -1
  5. package/dist/components/FAQ/FAQ.js +2 -5
  6. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +2 -2
  7. package/dist/components/LoginModal/LoginModal.js +24 -4
  8. package/dist/components/MultiProgressBar/MultiProgressBar.js +1 -3
  9. package/dist/components/Payment/PaymentDetailsCard.js +17 -5
  10. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +14 -5
  11. package/dist/components/RegisterModal/RegisterModal.js +3 -3
  12. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +3 -7
  13. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +2 -2
  14. package/dist/components/Tabs/Tabs.js +1 -3
  15. package/dist/components/TabsNav/TabsNav.js +1 -3
  16. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +2 -1
  17. package/dist/index.js +2 -18
  18. package/dist/utils/fix-decimals.js +8 -1
  19. package/dist/utils/formatCurrencyValue.js +18 -26
  20. package/dist/utils/scrollUtils.js +9 -9
  21. package/package.json +4 -13
  22. package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +0 -18
  23. package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +0 -41
  24. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +0 -32
  25. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +0 -208
  26. package/dist/components/LearnMorePage/LearnMore.js +0 -190
  27. package/dist/components/LearnMorePage/LearnMore.propTypes.js +0 -20
  28. package/dist/components/LearnMorePage/LearnMore.shared.styles.js +0 -56
  29. package/dist/components/LearnMorePage/LearnMore.styles.js +0 -276
  30. package/dist/components/LearnMorePage/LearnMoreExampleObject.js +0 -120
  31. package/dist/components/LearnMorePage/LearnMoreItem.js +0 -57
  32. package/dist/components/LearnMorePage/LearnMoreItem.styles.js +0 -234
  33. package/dist/components/LearnMoreSection/LearnMore.js +0 -138
  34. package/dist/components/LearnMoreSection/LearnMore.styles.js +0 -147
  35. package/dist/components/LearnMoreSection/LearnMoreItem.js +0 -33
  36. package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +0 -60
@@ -16,10 +16,10 @@ const EnterCode = (props) => {
16
16
  return /* @__PURE__ */ jsx(Wrapper, { isModal, ...props, children: /* @__PURE__ */ jsxs(Row, { children: [
17
17
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
18
18
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
19
- /* @__PURE__ */ jsx("h3", { children: "Enter 2FA code" }),
20
- /* @__PURE__ */ jsx("p", { children: "Enter the log in 2FA code from your authenticator app" })
19
+ /* @__PURE__ */ jsx("h3", { children: "TWO-FACTOR AUTHENTICATION" }),
20
+ /* @__PURE__ */ jsx("p", { children: "Enter the verification code from your authenticator application." })
21
21
  ] }) }),
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?" }) }) })
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 access to your device?" }) }) })
23
23
  ] }),
24
24
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
25
25
  Formik,
@@ -9,10 +9,10 @@ const ResetCode = (props) => {
9
9
  return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
10
10
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
11
11
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
12
- /* @__PURE__ */ jsx("h3", { children: "Lost your device?" }),
13
- /* @__PURE__ */ jsx("p", { children: "No problem! We are here to help you..." })
12
+ /* @__PURE__ */ jsx("h3", { children: "AUTHENTICATION DEVICE UNAVAILABLE" }),
13
+ /* @__PURE__ */ jsx("p", { children: "Please contact our support team to reset your two-factor authentication." })
14
14
  ] }) }),
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" }) }) })
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: "Return to log in" }) }) })
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",
@@ -22,7 +22,7 @@ const ResetCode = (props) => {
22
22
  rel: "noreferrer",
23
23
  "data-cy": "2fa-reset-code-contact-support",
24
24
  style: { textDecoration: "underline" },
25
- children: "Contact us to reset your 2FA."
25
+ children: "Contact us to reset your two-factor authentication."
26
26
  }
27
27
  ) }) }) }) })
28
28
  ] }) });
@@ -25,12 +25,10 @@ BackButton.propTypes = {
25
25
  to: PropTypes.string,
26
26
  href: PropTypes.string
27
27
  };
28
- var stdin_default = BackButton;
29
28
  export {
30
29
  BackButton,
31
30
  BackButtonIcon,
32
31
  StyledBackButton,
33
32
  StyledBackButtonExternal,
34
- StyledWindowBackButton,
35
- stdin_default as default
33
+ StyledWindowBackButton
36
34
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useEffect } from "react";
3
3
  import PropTypes from "prop-types";
4
- import { Scrollbars } from "react-custom-scrollbars-2";
4
+ import { Scrollbars } from "react-custom-scrollbars-4";
5
5
  import { Container, Outer, Inner, ThumbV, TrackV, ThumbH, TrackH } from "./ComponentScroll.styles.js";
6
6
  const ComponentScroll = (props) => {
7
7
  const {
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import PropTypes from "prop-types";
3
3
  import { Text } from "../Text/Text.styles.js";
4
4
  import { useState } from "react";
5
- import scrollToElement from "scroll-to-element";
5
+ import { scrollToElement } from "../../utils/scrollUtils.js";
6
6
  import { FaqItems, FaqItem, FaqTitle, FaqDropdownIcon, FaqContent, FaqText } from "./FAQ.styles.js";
7
7
  function slugFromTitle(title) {
8
8
  if (title == null) return "";
@@ -22,10 +22,7 @@ const FAQ = (props) => {
22
22
  scrollRef?.current.scrollToBottom();
23
23
  }, 0);
24
24
  } else {
25
- scrollToElement?.(e.target.parentElement, {
26
- duration: 300,
27
- offset: 20
28
- });
25
+ scrollToElement(e.target.parentElement, { offset: 20 });
29
26
  }
30
27
  }
31
28
  };
@@ -33,8 +33,8 @@ class ForgotPasswordModal extends PureComponent {
33
33
  isResettingExpiredToken
34
34
  } = this.props;
35
35
  const headerTextContent = isResettingExpiredToken ? "This Invite Link Has Expired" : "Reset Your password";
36
- const mainTextContent = isResettingExpiredToken ? "To continue, request a new one using your email, and access will be sent shortly." : "No hints. No nudges. Just a nice, easy reset link direct to your inbox.";
37
- const footerTextContent = isResettingExpiredToken ? "Already have an account? " : "Remember your password? ";
36
+ const mainTextContent = isResettingExpiredToken ? "To continue, request a new one using your email, and access will be sent shortly." : "Enter your email address and we will send you a link to reset your password.";
37
+ const footerTextContent = isResettingExpiredToken ? "Already registered? " : "Remember your password? ";
38
38
  return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
39
39
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
40
40
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
@@ -45,11 +45,21 @@ const LoginModal = (props) => {
45
45
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
46
46
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
47
47
  /* @__PURE__ */ jsx("h3", { children: "Log in" }),
48
- /* @__PURE__ */ jsx("p", { children: "Come on in to stoke up innovation..." })
48
+ /* @__PURE__ */ jsx("p", { children: "Access your account and manage your investments." })
49
49
  ] }) }),
50
50
  /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
51
- "Don't have an account yet? ",
52
- /* @__PURE__ */ jsx(ModalLink, { type: "button", to: "#", as: "button", "data-cy": "login-modal-switch-to-signup", onClick: onModalSwitch, children: "Sign up" })
51
+ "Don't have an account? ",
52
+ /* @__PURE__ */ jsx(
53
+ ModalLink,
54
+ {
55
+ type: "button",
56
+ to: "#",
57
+ as: "button",
58
+ "data-cy": "login-modal-switch-to-signup",
59
+ onClick: onModalSwitch,
60
+ children: "Sign up"
61
+ }
62
+ )
53
63
  ] }) })
54
64
  ] }),
55
65
  /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
@@ -104,7 +114,17 @@ const LoginModal = (props) => {
104
114
  ),
105
115
  /* @__PURE__ */ jsx(FormError, { show: errors.password && touched.password, children: errors.password })
106
116
  ] }) }),
107
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "login-submit-btn", "data-cy": "login-modal-submit", fluid: true, disabled: submitDisabled, children: isActionLoading === "login" ? "Logging in" : "Login" }) }),
117
+ /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
118
+ Button,
119
+ {
120
+ type: "submit",
121
+ id: "login-submit-btn",
122
+ "data-cy": "login-modal-submit",
123
+ fluid: true,
124
+ disabled: submitDisabled,
125
+ children: isActionLoading === "login" ? "Logging in" : "Login"
126
+ }
127
+ ) }),
108
128
  /* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "login", children: popupError.message }) }),
109
129
  /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
110
130
  TextLink,
@@ -22,9 +22,7 @@ const MultiProgressBarPropTypes = {
22
22
  fill: PropTypes.number.isRequired
23
23
  };
24
24
  MultiProgressBar.propTypes = MultiProgressBarPropTypes;
25
- var stdin_default = MultiProgressBar;
26
25
  export {
27
26
  MultiProgressBar,
28
- MultiProgressBarPropTypes,
29
- stdin_default as default
27
+ MultiProgressBarPropTypes
30
28
  };
@@ -4,7 +4,7 @@ import styled from "styled-components";
4
4
  import { colors } from "../../styles/colors.js";
5
5
  import { InfoIcon } from "../InfoIcon/InfoIcon.js";
6
6
  import { ArrowSimple } from "../icons/ArrowSimple.js";
7
- import { formatCurrencyValue, getCurrencyIcon } from "../../utils/formatCurrencyValue.js";
7
+ import { getCurrencyConfig, getCurrencyIcon } from "../../utils/formatCurrencyValue.js";
8
8
  import externalLinkIcon from "../../static/images/external-link-icon.svg.js";
9
9
  const CardContainer = styled.div`
10
10
  background: ${colors.white};
@@ -65,6 +65,7 @@ const CurrencyTicker = styled.div`
65
65
  line-height: 28px;
66
66
  flex-shrink: 0;
67
67
  margin-left: auto;
68
+ text-transform: uppercase;
68
69
  `;
69
70
  const CurrencyLogo = styled.div.withConfig({
70
71
  shouldForwardProp: (props) => !["color"].includes(props)
@@ -245,12 +246,23 @@ const AmountBlock = ({ config }) => {
245
246
  if (React__default.isValidElement(config)) {
246
247
  return config;
247
248
  }
248
- const { label = "Amount", subtitle, amount, currency, currencyColor, icon, showTicker = true, banner } = config;
249
- const formattedAmount = amount !== void 0 && amount !== null && amount !== "" ? formatCurrencyValue(currency, amount, 2, { valueFirst: true }) : null;
249
+ const {
250
+ label = "Amount",
251
+ subtitle,
252
+ amount,
253
+ currency,
254
+ decimals,
255
+ currencyColor,
256
+ icon,
257
+ showTicker = true,
258
+ banner
259
+ } = config;
260
+ const { symbol, decimals: resolvedDecimals } = getCurrencyConfig(currency, decimals ?? 2);
261
+ const hasAmount = amount !== void 0 && amount !== null && amount !== "";
262
+ const displayValue = hasAmount ? parseFloat(Math.abs(amount)).toFixed(resolvedDecimals) : null;
250
263
  const currencyIcon = getCurrencyIcon(currency, icon);
251
264
  const logoColor = currencyColor || colors.black;
252
- const ticker = showTicker ? (currency || "").toUpperCase() : null;
253
- const displayValue = formattedAmount ? formattedAmount.replace(/\s*\S+$/, "") : null;
265
+ const ticker = showTicker ? symbol : null;
254
266
  const renderCurrencyLogo = () => {
255
267
  if (currencyIcon) {
256
268
  return /* @__PURE__ */ jsx(CurrencyLogo, { color: "transparent", children: /* @__PURE__ */ jsx(CurrencyIcon, { src: currencyIcon, alt: currency || "currency" }) });
@@ -34,18 +34,27 @@ const RegisterConfirmModal = ({
34
34
  return /* @__PURE__ */ jsxs(Modal, { isOpen: isModalOpen, onClose: onModalClose, closeIsFullHeight: true, id, children: [
35
35
  /* @__PURE__ */ jsx(Row, { isConfirmModal: true, children: /* @__PURE__ */ jsx(Column, { part: 10, isConfirmModal: true, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsxs(ContainerWithLine, { children: [
36
36
  /* @__PURE__ */ jsxs(Text, { children: [
37
- /* @__PURE__ */ jsx("h3", { children: "GREAT! CHECK YOUR INBOX" }),
37
+ /* @__PURE__ */ jsx("h3", { children: "VERIFY YOUR EMAIL ADDRESS" }),
38
38
  /* @__PURE__ */ jsxs("p", { children: [
39
- "We sent an email to ",
39
+ "A verification link has been sent to ",
40
40
  userEmail,
41
- " tap the link to verify your address and activate your account."
41
+ ". Please follow the link in the email to confirm your email address and activate your account."
42
42
  ] })
43
43
  ] }),
44
44
  /* @__PURE__ */ jsxs(Text.Caption, { children: [
45
- "Email didn't arrive?",
45
+ "Email not received?",
46
46
  /* @__PURE__ */ jsx("br", {})
47
47
  ] }),
48
- /* @__PURE__ */ jsx(TextLink, { to: "", "data-cy": "register-confirm-modal-resend-email", onClick: onResend, disabled: cooldown?.isDisabled, children: isActionLoading === "resend" ? "Resending email" : "Resend email" }),
48
+ /* @__PURE__ */ jsx(
49
+ TextLink,
50
+ {
51
+ to: "",
52
+ "data-cy": "register-confirm-modal-resend-email",
53
+ onClick: onResend,
54
+ disabled: cooldown?.isDisabled,
55
+ children: isActionLoading === "resend" ? "Resending email" : "Resend verification email"
56
+ }
57
+ ),
49
58
  /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "resend", children: popupError.message }) }),
50
59
  /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupSuccess.popup === "resend", children: popupSuccess.message }) }),
51
60
  /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: cooldown?.isDisabled && /* @__PURE__ */ jsx(FormError, { show: cooldown?.isDisabled, children: `You can resend email in ${cooldown?.secondsRemaining} seconds` }) })
@@ -40,7 +40,7 @@ const RegisterModal = (props) => {
40
40
  title: "privacy"
41
41
  });
42
42
  const [newsletterCheckbox, setNewsletterCheckbox] = useState({
43
- agreementText: "Yes! Send me STOKR news and updates",
43
+ agreementText: "I would like to receive updates and news from STOKR.",
44
44
  label: "newsletter",
45
45
  text: "",
46
46
  title: "newsletter"
@@ -93,10 +93,10 @@ const RegisterModal = (props) => {
93
93
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
94
94
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
95
95
  /* @__PURE__ */ jsx("h3", { children: "CREATE YOUR STOKR ACCOUNT" }),
96
- /* @__PURE__ */ jsx("p", { children: "Get ready to invest in innovative business ventures. No fees. Always free." })
96
+ /* @__PURE__ */ jsx("p", { children: "Register on STOKR to access digital securities offerings and manage your investments." })
97
97
  ] }) }),
98
98
  /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
99
- "Already have an account?",
99
+ "Already registered?",
100
100
  " ",
101
101
  /* @__PURE__ */ jsx(
102
102
  ModalLink,
@@ -20,16 +20,12 @@ const RedBar = styled.div`
20
20
  const ResetConfirmModal = ({ isModalOpen, onModalClose, onModalSwitch }) => /* @__PURE__ */ jsxs(Modal, { isOpen: isModalOpen, onClose: onModalClose, closeIsFullHeight: true, children: [
21
21
  /* @__PURE__ */ jsx(Row, { isConfirmModal: true, children: /* @__PURE__ */ jsx(Column, { relative: true, part: 10, isConfirmModal: true, children: /* @__PURE__ */ jsx(ModalInner, { isConfirmModal: true, children: /* @__PURE__ */ jsxs(ContainerWithLine, { children: [
22
22
  /* @__PURE__ */ jsxs(Text, { withBorder: true, isConfirm: true, children: [
23
- /* @__PURE__ */ jsxs("h3", { children: [
24
- "Abracadabra!",
25
- /* @__PURE__ */ jsx("br", {}),
26
- "You're back in the game!"
27
- ] }),
28
- /* @__PURE__ */ jsx("p", { children: "Your new password has been set." })
23
+ /* @__PURE__ */ jsx("h3", { children: "PASSWORD UPDATED" }),
24
+ /* @__PURE__ */ jsx("p", { children: "Your password has been updated. You may now sign in with your new credentials." })
29
25
  ] }),
30
26
  /* @__PURE__ */ jsx("br", {}),
31
27
  /* @__PURE__ */ jsx("br", {}),
32
- /* @__PURE__ */ jsx(Button, { "data-cy": "reset-confirm-modal-login", onClick: onModalSwitch, children: "Login" })
28
+ /* @__PURE__ */ jsx(Button, { "data-cy": "reset-confirm-modal-login", onClick: onModalSwitch, children: "Log in" })
33
29
  ] }) }) }) }),
34
30
  /* @__PURE__ */ jsx(RedBar, {})
35
31
  ] });
@@ -40,8 +40,8 @@ const ResetPasswordModal = ({
40
40
  return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, children: /* @__PURE__ */ jsxs(Row, { children: [
41
41
  /* @__PURE__ */ jsxs(Column, { part: 8, children: [
42
42
  /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
43
- /* @__PURE__ */ jsx("h3", { children: "RESET YOUR PASSWORD" }),
44
- /* @__PURE__ */ jsx("p", { children: "Please set your new password." })
43
+ /* @__PURE__ */ jsx("h3", { children: "SET A NEW PASSWORD" }),
44
+ /* @__PURE__ */ jsx("p", { children: "Enter and confirm your new password." })
45
45
  ] }) }),
46
46
  /* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
47
47
  "Remember your password? ",
@@ -46,9 +46,7 @@ Tabs.propTypes = {
46
46
  children: PropTypes.node.isRequired,
47
47
  activeTab: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
48
48
  };
49
- var stdin_default = Tabs;
50
49
  export {
51
50
  Tab,
52
- Tabs,
53
- stdin_default as default
51
+ Tabs
54
52
  };
@@ -16,13 +16,11 @@ TabsNav.propTypes = {
16
16
  noBorderBottom: PropTypes.bool,
17
17
  noWrapperPadding: PropTypes.bool
18
18
  };
19
- var stdin_default = TabsNav;
20
19
  export {
21
20
  LinkText,
22
21
  Scroll,
23
22
  StyledTab,
24
23
  StyledTabs,
25
24
  TabsNav,
26
- TabsWrapper,
27
- stdin_default as default
25
+ TabsWrapper
28
26
  };
@@ -23,7 +23,8 @@ const renderSuccessModal = (continueUrl) => /* @__PURE__ */ jsx(Fragment, { chil
23
23
  onClick: () => {
24
24
  window.open(continueUrl, "_self");
25
25
  },
26
- textRight: "We have successfully verified your email!"
26
+ titleText: "Email verified",
27
+ textRight: "Your email address has been verified."
27
28
  }
28
29
  ) });
29
30
  const RenderErrorModal = (props) => {
package/dist/index.js CHANGED
@@ -9,7 +9,6 @@ import { HeroVideoBlock } from "./components/HeroBlock/HeroVideoBlock.js";
9
9
  import { BasicTable } from "./components/BasicTable/BasicTable.js";
10
10
  import { Button } from "./components/Button/Button.styles.js";
11
11
  import { ButtonContainer, ButtonGridContainer } from "./components/ButtonContainer/ButtonContainer.styles.js";
12
- import { CaptialRaisedSummary } from "./components/CapitalRaisedSummary/CaptialRaisedSummary.js";
13
12
  import { ChartLegend } from "./components/ChartLegend/ChartLegend.js";
14
13
  import { CheckBoxCaption, Checkbox } from "./components/Checkbox/Checkbox.js";
15
14
  import { ComponentScroll } from "./components/ComponentScroll/ComponentScroll.js";
@@ -45,12 +44,6 @@ import { TableFilterDropdown } from "./components/Input/TableFilterDropdown.js";
45
44
  import { InvestmentStat } from "./components/InvestmentStat/InvestmentStat.js";
46
45
  import { SpanButton } from "./components/SpanButton/SpanButton.styles.js";
47
46
  import { LatestUpdate } from "./components/LatestUpdate/LatestUpdate.js";
48
- import { LearnMoreCarousel } from "./components/LearnMoreCarousel/LearnMoreCarousel.js";
49
- import { LearnMore } from "./components/LearnMorePage/LearnMore.js";
50
- import { LearnMoreExampleObject } from "./components/LearnMorePage/LearnMoreExampleObject.js";
51
- import { LearnMoreItem } from "./components/LearnMorePage/LearnMoreItem.js";
52
- import { LearnMoreSection } from "./components/LearnMoreSection/LearnMore.js";
53
- import { LearnMoreItemSection } from "./components/LearnMoreSection/LearnMoreItem.js";
54
47
  import { MainMenu } from "./components/MainMenu/MainMenu.js";
55
48
  import { MenuNav } from "./components/MenuNav/MenuNav.styles.js";
56
49
  import { GlareButton } from "./components/Button/GlareButton.js";
@@ -129,7 +122,7 @@ import { checkTodoStatus } from "./utils/check-todo-status.js";
129
122
  import { generateCoreChecklistTasks, getVerifyIdentityChecklist } from "./utils/checklistGenerator.js";
130
123
  import { CopyToClipBoardTooltip, copyTextToClipboard, useCopyToClipboard, withCopyToClipboard } from "./utils/copyToClipboard.js";
131
124
  import { cooldownHOC, useComponentVisible, useContainerSize, useCooldown, useMobileView, usePrevious } from "./utils/customHooks.js";
132
- import { fixDecimals } from "./utils/fix-decimals.js";
125
+ import { fixDecimals, formatDisplayNumber } from "./utils/fix-decimals.js";
133
126
  import { CURRENCY_CONFIG, formatCurrencyValue, getCurrencyConfig, getCurrencyIcon, getCurrencySymbol, getLiquidAssetIcon, getProjectCurrencySign } from "./utils/formatCurrencyValue.js";
134
127
  import { isUSInvestor, usCountries } from "./utils/isUSInvestor.js";
135
128
  import { ENTROPY_MEDIUM, ENTROPY_WEAK, PASSWORD_MIN_LENGTH, PASSWORD_REQUIREMENTS_MESSAGE, getPasswordCriteria, getPasswordEntropy, isPasswordValid } from "./utils/password-validation.js";
@@ -244,7 +237,6 @@ import { Youtube } from "./components/icons/Youtube.js";
244
237
  import { format } from "date-fns";
245
238
  import { getAnalyticsIngestUrl, getBackofficeAppUrl } from "./utils/app-urls-analytics-backoffice.js";
246
239
  import { getConfig, resetRuntimeConfig } from "./runtime-config.js";
247
- import { learnMoreCategoryPropTypes, learnMorePostPropTypes } from "./components/LearnMorePage/LearnMore.propTypes.js";
248
240
  import { useSnackbar } from "./components/Snackbar/useSnackbar.js";
249
241
  export {
250
242
  AccountBalance,
@@ -280,7 +272,6 @@ export {
280
272
  CURRENCY_CONFIG,
281
273
  default10 as CameraSvg,
282
274
  default11 as CapsLockSvg,
283
- CaptialRaisedSummary,
284
275
  Card,
285
276
  CardHeader,
286
277
  CardHeaderRegular,
@@ -405,12 +396,6 @@ export {
405
396
  LatestUpdate,
406
397
  LatestUpdateWrapper,
407
398
  Layout,
408
- LearnMore,
409
- LearnMoreCarousel,
410
- LearnMoreExampleObject,
411
- LearnMoreItem,
412
- LearnMoreItemSection,
413
- LearnMoreSection,
414
399
  LinkIcon,
415
400
  LinkText,
416
401
  LinkedIn,
@@ -614,6 +599,7 @@ export {
614
599
  default2 as fontFaces,
615
600
  format,
616
601
  formatCurrencyValue,
602
+ formatDisplayNumber,
617
603
  generateCoreChecklistTasks,
618
604
  getAmountBucket,
619
605
  getAnalyticsIngestUrl,
@@ -641,8 +627,6 @@ export {
641
627
  isPasswordValid,
642
628
  isUSInvestor,
643
629
  km_ify,
644
- learnMoreCategoryPropTypes,
645
- learnMorePostPropTypes,
646
630
  loaderGif,
647
631
  momentUtils,
648
632
  navigateToHref,
@@ -1,4 +1,11 @@
1
1
  const fixDecimals = (value, decimals, roundingFn = Math.round) => (roundingFn(Number(value) * 10 ** decimals) / 10 ** decimals).toFixed(decimals);
2
+ const formatDisplayNumber = (value, { minimumFractionDigits = 0, maximumFractionDigits } = {}) => {
3
+ const num = typeof value === "number" ? value : parseFloat(value);
4
+ if (num == null || Number.isNaN(num)) return "";
5
+ const max = maximumFractionDigits != null ? Math.max(maximumFractionDigits, minimumFractionDigits) : Math.max(minimumFractionDigits, 3);
6
+ return num.toLocaleString("en", { minimumFractionDigits, maximumFractionDigits: max });
7
+ };
2
8
  export {
3
- fixDecimals
9
+ fixDecimals,
10
+ formatDisplayNumber
4
11
  };
@@ -14,8 +14,8 @@ const CURRENCY_CONFIG = {
14
14
  "lusdt-bfx": ["USDT", 2],
15
15
  "lbtc-bfx": ["LBTC", 8],
16
16
  "btc-bfx": ["BTC", 8],
17
- euro: ["EUR", 2],
18
- usd: ["USD", 2],
17
+ euro: ["EUR", 2, "€"],
18
+ usd: ["USD", 2, "$"],
19
19
  chf: ["CHF", 2],
20
20
  lusdt: ["USDT", 2],
21
21
  "bitcoin-private": ["EUR", 2],
@@ -25,12 +25,17 @@ const CURRENCY_CONFIG = {
25
25
  "btc-fb": ["BTC", 8],
26
26
  "usdc-fb": ["USDC", 2],
27
27
  "usdq-fb": ["USDQ", 2],
28
+ "eth-fb": ["ETH", 4],
28
29
  xaut: ["XAUt", 6],
29
- "usd-in-kind": ["USD", 2]
30
+ "usd-in-kind": ["USD", 2, "$"]
30
31
  };
31
32
  const getCurrencyConfig = (currency, tokenDecimals = 2) => {
32
- const [symbol, decimals] = CURRENCY_CONFIG[currency] || [currency, tokenDecimals];
33
- return { symbol, decimals };
33
+ const config = CURRENCY_CONFIG[String(currency ?? "").toLowerCase()];
34
+ if (config) {
35
+ const [symbol, decimals, sign] = config;
36
+ return { symbol, decimals, sign: sign ?? symbol, matched: true };
37
+ }
38
+ return { symbol: currency, decimals: tokenDecimals, sign: currency, matched: false };
34
39
  };
35
40
  const formatCurrencyValue = (currency, value, tokenDecimals = 2, options = {}) => {
36
41
  const { valueFirst = false, formatter } = options;
@@ -41,27 +46,14 @@ const formatCurrencyValue = (currency, value, tokenDecimals = 2, options = {}) =
41
46
  const formattedValue = parseFloat(Math.abs(value)).toFixed(decimals);
42
47
  return valueFirst ? `${formattedValue} ${symbol}` : `${symbol} ${formattedValue}`;
43
48
  };
44
- const getCurrencySymbol = (currencySelected) => ({
45
- euro: "€",
46
- usd: "$",
47
- ether: "ETH",
48
- chf: "CHF",
49
- tether: "USDT",
50
- bitcoin: "BTC",
51
- lbtc: "LBTC",
52
- lusdt: "USDT",
53
- "lusdt-bfx": "USDT",
54
- "lbtc-bfx": "LBTC",
55
- "btc-bfx": "BTC",
56
- bmn1: "BMN1",
57
- bmn2: "BMN2",
58
- "btc-fb": "BTC",
59
- "usdc-fb": "USDC",
60
- "usdq-fb": "USDQ",
61
- xaut: "XAUt",
62
- "eth-fb": "ETH",
63
- "usd-in-kind": "$"
64
- })[currencySelected] || currencySelected;
49
+ const getCurrencySymbol = (currencySelected) => {
50
+ const config = CURRENCY_CONFIG[currencySelected];
51
+ if (config) {
52
+ const [symbol, , sign] = config;
53
+ return sign ?? symbol;
54
+ }
55
+ return currencySelected;
56
+ };
65
57
  const getProjectCurrencySign = (tokenCurrency) => {
66
58
  return tokenCurrency === "EUR" ? "€" : tokenCurrency === "USD" ? "$" : tokenCurrency === "BTC" ? "₿" : "";
67
59
  };
@@ -1,22 +1,22 @@
1
1
  import { useEffect, useCallback } from "react";
2
2
  import { useLocation } from "react-router-dom";
3
- const scrollToElement = (elementRef, options = {}) => {
4
- const { behavior = "smooth", block = "start", delay = 0 } = options;
3
+ const scrollToElement = (elementOrRef, options = {}) => {
4
+ const { behavior = "smooth", block = "start", delay = 0, offset = 0 } = options;
5
5
  const performScroll = () => {
6
- if (!elementRef?.current) return;
6
+ const element = elementOrRef?.current ?? elementOrRef;
7
+ if (!element) return;
7
8
  const isAppleDevice = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8
9
  requestAnimationFrame(() => {
9
- if (isAppleDevice) {
10
- const rect = elementRef.current.getBoundingClientRect();
11
- const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
12
- const targetY = rect.top + scrollTop;
10
+ const rect = element.getBoundingClientRect();
11
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
12
+ const targetY = rect.top + scrollTop - offset;
13
+ if (isAppleDevice || offset !== 0) {
13
14
  window.scrollTo({
14
15
  top: targetY,
15
16
  behavior: behavior === "smooth" ? "auto" : behavior
16
- // Use 'auto' for Apple devices
17
17
  });
18
18
  } else {
19
- elementRef.current.scrollIntoView({
19
+ element.scrollIntoView({
20
20
  behavior,
21
21
  block
22
22
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "3.0.55",
3
+ "version": "3.0.57",
4
4
  "description": "STOKR - Components Library",
5
5
  "author": "Bilal Hodzic <bilal@stokr.io>",
6
6
  "license": "MIT",
@@ -54,32 +54,25 @@
54
54
  "serve": "npx http-server ./storybook-static -p 9009"
55
55
  },
56
56
  "dependencies": {
57
- "@lottiefiles/dotlottie-react": "^0.17.13",
58
- "ajv": "^8.18.0",
57
+ "@lottiefiles/dotlottie-react": "^0.19.4",
59
58
  "axios": "^1.13.5",
60
- "bignumber.js": "^9.1.1",
61
59
  "country-flag-icons": "^1.6.17",
62
60
  "date-fns": "^4.1.0",
63
61
  "date-fns-tz": "^3.2.0",
64
62
  "dompurify": "^3.2.4",
65
63
  "firebase": "^12.4.0",
66
64
  "formik": "^2.2.9",
67
- "formik-persist": "^1.1.0",
68
65
  "html-react-parser": "^5.0.6",
69
66
  "js-cookie": "^3.0.5",
70
67
  "mixpanel-browser": "^2.74.0",
71
- "mobile-detect": "^1.4.5",
72
68
  "moment": "^2.30.1",
73
69
  "moment-timezone": "^0.6.0",
74
70
  "prop-types": "^15.8.1",
75
71
  "qrcode.react": "^4.2.0",
76
72
  "react-collapse": "^5.1.1",
77
73
  "react-copy-to-clipboard": "^5.1.0",
78
- "react-countup": "^6.4.1",
79
- "react-custom-scrollbars-2": "^4.5.0",
74
+ "react-custom-scrollbars-4": "^4.5.1",
80
75
  "react-day-picker": "^9.11.1",
81
- "react-device-detect": "^2.2.3",
82
- "react-ga4": "^2.1.0",
83
76
  "react-helmet": "^6.1.0",
84
77
  "react-intersection-observer": "^10.0.2",
85
78
  "react-otp-input": "^3.1.0",
@@ -89,15 +82,13 @@
89
82
  "react-slick": "^0.31.0",
90
83
  "react-table": "^7.8.0",
91
84
  "react-tippy": "^1.4.0",
92
- "scroll-to-element": "^2.0.3",
93
- "semantic-ui-react": "^2.1.4",
94
85
  "slick-carousel": "^1.8.1",
95
86
  "yup": "^1.0.0"
96
87
  },
97
88
  "peerDependencies": {
98
89
  "react": "^18.0.0 || ^19.0.0",
99
90
  "react-dom": "^18.0.0 || ^19.0.0",
100
- "react-router-dom": "^6.0.0",
91
+ "react-router-dom": "^6.0.0 || ^7.0.0",
101
92
  "styled-components": "^6.0.0"
102
93
  },
103
94
  "devDependencies": {
@@ -1,18 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import "react";
3
- import CountUp from "react-countup";
4
- import PropTypes from "prop-types";
5
- import stdin_default, { MultiProgressBarPropTypes } from "../MultiProgressBar/MultiProgressBar.js";
6
- import { Wrapper, Title, Amount } from "./CaptialRaisedSummary.styles.js";
7
- const CaptialRaisedSummary = ({ capital, multiProgressBar }) => /* @__PURE__ */ jsxs(Wrapper, { children: [
8
- /* @__PURE__ */ jsx(Title, { children: "CAPITAL RAISED" }),
9
- /* @__PURE__ */ jsx(Amount, { children: /* @__PURE__ */ jsx(CountUp, { end: capital, prefix: "€ ", duration: 0.01, separator: "," }) }),
10
- /* @__PURE__ */ jsx(stdin_default, { ...multiProgressBar })
11
- ] });
12
- CaptialRaisedSummary.propTypes = {
13
- capital: PropTypes.number.isRequired,
14
- multiProgressBar: PropTypes.shape(MultiProgressBarPropTypes).isRequired
15
- };
16
- export {
17
- CaptialRaisedSummary
18
- };