@stokr/components-library 3.0.77 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/components/Input/InputPassword.js +3 -5
  2. package/dist/components/Input/OtpInput.js +1 -3
  3. package/dist/components/MenuNav/MenuNav.styles.js +1 -2
  4. package/dist/components/Modal/Modal.styles.js +2 -3
  5. package/dist/components/Newsletter/Newsletter.js +1 -3
  6. package/dist/components/NotificationCounter/NotificationCounter.styles.js +1 -2
  7. package/dist/components/SmartLink/SmartLink.js +0 -2
  8. package/dist/components/StepController/StepController.js +3 -5
  9. package/dist/components/StepController/StepController.styles.js +102 -1
  10. package/dist/components/StepController/StepControllerProgress.js +1 -1
  11. package/dist/components/Switch/Switch.js +1 -3
  12. package/dist/components/ToDoList/ToDoListTask.js +15 -3
  13. package/dist/components/taxId/register-taxid.js +7 -5
  14. package/dist/index.js +67 -141
  15. package/dist/runtime-config.js +4 -70
  16. package/dist/styles/global.js +1 -2
  17. package/dist/styles/ioniconsStyles.js +13 -10
  18. package/dist/utils/check-todo-status.js +1 -2
  19. package/package.json +8 -14
  20. package/dist/api/authenticationApi.js +0 -13
  21. package/dist/auth/index.js +0 -34
  22. package/dist/components/2FA/Connect2FA.js +0 -58
  23. package/dist/components/2FA/EnterCode.js +0 -74
  24. package/dist/components/2FA/InstallAuthApp.js +0 -68
  25. package/dist/components/2FA/ResetCode.js +0 -34
  26. package/dist/components/2FA/Sucess2FA.js +0 -63
  27. package/dist/components/2FA/disable-2fa-flow.js +0 -104
  28. package/dist/components/2FA/enable-2fa-flow.js +0 -167
  29. package/dist/components/2FA/login-with-otp-flow.js +0 -262
  30. package/dist/components/2FA/main-flow.js +0 -273
  31. package/dist/components/Footer/Footer.js +0 -69
  32. package/dist/components/Footer/Footer.styles.js +0 -277
  33. package/dist/components/Footer/FooterLayout.js +0 -150
  34. package/dist/components/Footer/FooterMenu.js +0 -107
  35. package/dist/components/Footer/FooterMenu.styles.js +0 -334
  36. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -121
  37. package/dist/components/Header/Header.js +0 -441
  38. package/dist/components/Header/Header.styles.js +0 -568
  39. package/dist/components/Layout/Layout.js +0 -76
  40. package/dist/components/LoginModal/LoginModal.js +0 -165
  41. package/dist/components/MainMenu/DynamicMainMenu.js +0 -38
  42. package/dist/components/MainMenu/MainMenu.js +0 -220
  43. package/dist/components/MainMenu/MainMenu.styles.js +0 -362
  44. package/dist/components/Modal/NewVentureModal/NewVentureModal.js +0 -273
  45. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -74
  46. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -20
  47. package/dist/components/RegisterModal/RegisterModal.js +0 -278
  48. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +0 -40
  49. package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +0 -41
  50. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +0 -145
  51. package/dist/components/StepsProgress/StepIndicator.js +0 -40
  52. package/dist/components/StepsProgress/StepIndicator.styles.js +0 -69
  53. package/dist/components/StepsProgress/StepsProgress.js +0 -67
  54. package/dist/components/StepsProgress/StepsProgress.styles.js +0 -105
  55. package/dist/components/TermsModal/TermsModal.js +0 -145
  56. package/dist/components/TermsModal/_styles.js +0 -313
  57. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +0 -122
  58. package/dist/components/headerHo/HeaderHo.js +0 -707
  59. package/dist/config.js +0 -33
  60. package/dist/context/Auth.js +0 -423
  61. package/dist/context/AuthContext.js +0 -1016
  62. package/dist/firebase-config.js +0 -56
  63. package/dist/hooks/useNewVentureForm.js +0 -235
  64. package/dist/static/images/background3.png.js +0 -4
  65. package/dist/static/images/google_auth.png.js +0 -4
  66. package/dist/static/images/iso27001-black.svg.js +0 -4
  67. package/dist/static/images/mangopay.svg.js +0 -4
  68. package/dist/static/images/social/Facebook_Logo.png.js +0 -4
  69. package/dist/static/images/social/LI-In-Bug.png.js +0 -4
  70. package/dist/static/images/social/Telegram-Logo.png.js +0 -4
  71. package/dist/static/images/social/X-logo-black.png.js +0 -4
  72. package/dist/static/images/social/youtube_social_circle_red.png.js +0 -4
  73. package/dist/utils/show-account-locked-modal.js +0 -23
  74. package/dist/utils/user-identity.js +0 -10
  75. package/dist/utils/withRouter.js +0 -26
@@ -1,122 +0,0 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import React__default from "react";
3
- import PropTypes from "prop-types";
4
- import { Modal } from "../Modal/Modal.js";
5
- import { Text } from "../Text/Text.styles.js";
6
- import { Row, Column } from "../Grid/Grid.styles.js";
7
- import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
8
- import { FormField, FormError } from "../Form/Form.styles.js";
9
- import stdin_default$3 from "../Button/Button.styles.js";
10
- import { Formik } from "formik";
11
- import * as Yup from "yup";
12
- import stdin_default$2 from "../Form/Form.js";
13
- import { Input } from "../Input/Input.js";
14
- import { useCooldown } from "../../utils/customHooks.js";
15
- import stdin_default$1 from "../2FA/Sucess2FA.js";
16
- import { emailRegex } from "../../constants/globalVariables.js";
17
- import { ModalInner } from "../Modal/Modal.styles.js";
18
- const renderSuccessModal = (continueUrl) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
19
- stdin_default$1,
20
- {
21
- continueButtonId: "verify-email-success-continue-btn",
22
- continueButtonDataCy: "verify-email-success-continue",
23
- onClick: () => {
24
- window.open(continueUrl, "_self");
25
- },
26
- titleText: "Email verified",
27
- textRight: "Your email address has been verified."
28
- }
29
- ) });
30
- const RenderErrorModal = (props) => {
31
- const { error, isActionLoading, popupError, onResend } = props;
32
- const { isDisabled, secondsRemaining, startCooldown } = useCooldown(60);
33
- const userEmail = error && error.email;
34
- React__default.useEffect(() => {
35
- if (error?.email && !isDisabled) {
36
- startCooldown();
37
- onResend({ email: error.email });
38
- }
39
- }, [error]);
40
- const validationSchema = Yup.object().shape({
41
- email: Yup.string().matches(emailRegex, "Oops, that's not a valid address").required("Oops, this can‘t be blank")
42
- });
43
- return /* @__PURE__ */ jsxs(Row, { children: [
44
- /* @__PURE__ */ jsxs(Column, { part: 8, children: [
45
- /* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
46
- /* @__PURE__ */ jsx("h3", { children: "Oops..." }),
47
- /* @__PURE__ */ jsx("p", { children: error?.message || "Something went wrong." })
48
- ] }) }),
49
- /* @__PURE__ */ jsx(ModalInner, { modalBot: true })
50
- ] }),
51
- /* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
52
- Formik,
53
- {
54
- initialValues: {
55
- email: userEmail || ""
56
- },
57
- validationSchema,
58
- validateOnBlur: true,
59
- validateOnChange: true,
60
- onSubmit: (values) => {
61
- startCooldown();
62
- onResend(values);
63
- },
64
- children: ({ values, errors, touched, handleBlur, handleChange }) => {
65
- const submitDisabled = !values.email || !!errors.email || isDisabled || isActionLoading === "resend";
66
- return /* @__PURE__ */ jsxs(stdin_default$2, { children: [
67
- /* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
68
- /* @__PURE__ */ jsx(
69
- Input,
70
- {
71
- id: "verify-email",
72
- name: "email",
73
- type: "email",
74
- label: "Your email",
75
- value: values.email,
76
- onChange: handleChange,
77
- onBlur: handleBlur,
78
- error: !!errors.email,
79
- touched: !!touched.email,
80
- "data-cy": "verify-email-modal-email-input"
81
- }
82
- ),
83
- /* @__PURE__ */ jsx(FormError, { show: errors.email && touched.email, children: errors.email })
84
- ] }) }),
85
- /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
86
- stdin_default$3,
87
- {
88
- type: "submit",
89
- id: "verify-email-submit-btn",
90
- "data-cy": "verify-email-modal-resend-submit",
91
- disabled: submitDisabled,
92
- children: isActionLoading === "resend" ? "Resending email" : "Resend email"
93
- }
94
- ) }),
95
- /* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "resend", children: popupError.message }) }),
96
- isDisabled && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: isDisabled, children: `You can try again in ${secondsRemaining} seconds` }) })
97
- ] });
98
- }
99
- }
100
- ) }) }) })
101
- ] });
102
- };
103
- const VerifyEmailModal = ({ id, isModalOpen, onModalClose, continueUrl, isSuccess, ...props }) => {
104
- return /* @__PURE__ */ jsx(
105
- Modal,
106
- {
107
- isOpen: isModalOpen,
108
- onClose: onModalClose,
109
- id,
110
- children: isSuccess ? renderSuccessModal(continueUrl) : RenderErrorModal(props)
111
- }
112
- );
113
- };
114
- VerifyEmailModal.propTypes = {
115
- isModalOpen: PropTypes.bool.isRequired,
116
- onModalClose: PropTypes.func.isRequired
117
- };
118
- var stdin_default = VerifyEmailModal;
119
- export {
120
- VerifyEmailModal,
121
- stdin_default as default
122
- };