@stokr/components-library 3.0.16 → 3.0.18
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/README.md +261 -262
- package/dist/analytics/index.js +180 -0
- package/dist/api/auth.js +15 -0
- package/dist/api/fetchData.js +27 -0
- package/dist/api/fetchDataPublic.js +19 -0
- package/dist/auth/index.js +32 -0
- package/dist/components/2FA/Connect2FA.js +55 -0
- package/dist/components/2FA/EnterCode.js +63 -0
- package/dist/components/2FA/InstallAuthApp.js +64 -0
- package/dist/components/2FA/ResetCode.js +33 -0
- package/dist/components/2FA/Sucess2FA.js +51 -0
- package/dist/components/2FA/disable-2fa-flow.js +91 -0
- package/dist/components/2FA/enable-2fa-flow.js +137 -0
- package/dist/components/2FA/login-with-otp-flow.js +206 -0
- package/dist/components/2FA/main-flow.js +217 -0
- package/dist/components/AccountBalance/AccountBalance.js +35 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +48 -0
- package/dist/components/AdminDashboard/Table/ReactTable.js +266 -0
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +65 -0
- package/dist/components/AdminDashboard/Table/Table.js +123 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +263 -0
- package/dist/components/AgreementItem/AgreementItem.js +39 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +32 -0
- package/dist/components/BackButton/BackButton.js +34 -0
- package/dist/components/BackButton/BackButton.styles.js +123 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.styles.js +119 -0
- package/dist/components/BasicTable/BasicTable.js +25 -0
- package/dist/components/BasicTable/BasicTable.styles.js +76 -0
- package/dist/components/BlogPost/BlogPost.js +98 -0
- package/dist/components/BlogPost/BlogPost.styles.js +230 -0
- package/dist/components/Button/Button.styles.js +207 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +51 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +18 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +41 -0
- package/dist/components/Card/Card.styles.js +97 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +133 -0
- package/dist/components/Checkbox/Checkbox.js +80 -0
- package/dist/components/Checkbox/Checkbox.styles.js +133 -0
- package/dist/components/Checklist/ChecklistCard.js +71 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +82 -0
- package/dist/components/Chips/Chip.js +23 -0
- package/dist/components/Chips/Chip.styles.js +72 -0
- package/dist/components/Chips/ChipWrapper.js +50 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +70 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +127 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +165 -0
- package/dist/components/ConfirmModal/ConfirmModal.js +199 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +44 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +16 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +151 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +443 -0
- package/dist/components/CryptoAddress/RadioWrap.js +47 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +34 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +125 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +25 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +111 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +27 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/components/FAQ/FAQ.js +73 -0
- package/dist/components/FAQ/FAQ.styles.js +128 -0
- package/dist/components/Footer/Footer.js +55 -0
- package/dist/components/Footer/Footer.styles.js +256 -0
- package/dist/components/Footer/FooterLayout.js +145 -0
- package/dist/components/Footer/FooterMenu.js +100 -0
- package/dist/components/Footer/FooterMenu.styles.js +321 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +100 -0
- package/dist/components/Form/Form.js +21 -0
- package/dist/components/Form/Form.styles.js +72 -0
- package/dist/components/Grid/Grid.styles.js +212 -0
- package/dist/components/Header/Header.js +425 -0
- package/dist/components/Header/Header.styles.js +567 -0
- package/dist/components/HeroBlock/HeroVideoBlock.js +105 -0
- package/dist/components/Icon/Icon.style.js +92 -0
- package/dist/components/Icon/Icon2.js +12 -0
- package/dist/components/InfoBox/InfoBox.js +93 -0
- package/dist/components/InfoIcon/InfoIcon.js +62 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +64 -0
- package/dist/components/Input/DatePickerInput.js +139 -0
- package/dist/components/Input/DatePickerInput.styles.js +165 -0
- package/dist/components/Input/Input.js +108 -0
- package/dist/components/Input/Input.styles.js +154 -0
- package/dist/components/Input/InputPassword.js +122 -0
- package/dist/components/Input/InputPassword.styles.js +166 -0
- package/dist/components/Input/InputUsername.js +92 -0
- package/dist/components/Input/InputWithButton.js +53 -0
- package/dist/components/Input/InputWithButton.styles.js +57 -0
- package/dist/components/Input/MultiSelect.js +306 -0
- package/dist/components/Input/OtpInput.js +70 -0
- package/dist/components/Input/RangeInput.js +80 -0
- package/dist/components/Input/RangeInput.styles.js +129 -0
- package/dist/components/Input/SearchInput.js +68 -0
- package/dist/components/Input/SearchInput.styles.js +92 -0
- package/dist/components/Input/Select.js +151 -0
- package/dist/components/Input/Select.styles.js +148 -0
- package/dist/components/Input/TableFilterDropdown.js +247 -0
- package/dist/components/Input/Textarea.js +51 -0
- package/dist/components/Input/Textarea.styles.js +62 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +283 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +94 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +24 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +62 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +24 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +90 -0
- package/dist/components/Layout/Layout.js +69 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +32 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +208 -0
- package/dist/components/LearnMorePage/LearnMore.js +190 -0
- package/dist/components/LearnMorePage/LearnMore.propTypes.js +20 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +56 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +276 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +57 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +234 -0
- package/dist/components/LearnMoreSection/LearnMore.js +138 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +147 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +33 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +60 -0
- package/dist/components/LoginModal/LoginModal.js +142 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +38 -0
- package/dist/components/MainMenu/MainMenu.js +210 -0
- package/dist/components/MainMenu/MainMenu.styles.js +362 -0
- package/dist/components/MenuNav/MenuNav.styles.js +66 -0
- package/dist/components/Modal/Modal.js +119 -0
- package/dist/components/Modal/Modal.styles.js +450 -0
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +262 -0
- package/dist/components/Modal/PaymentModal.js +149 -0
- package/dist/components/Modal/SideModal.js +134 -0
- package/dist/components/Modal/SideModal.styles.js +55 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.js +170 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +53 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +30 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +105 -0
- package/dist/components/Newsletter/Newsletter.js +122 -0
- package/dist/components/Newsletter/Newsletter.styles.js +186 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +38 -0
- package/dist/components/Number/Number.js +50 -0
- package/dist/components/Number/Number.styles.js +23 -0
- package/dist/components/PageTransition/PageTransition.js +51 -0
- package/dist/components/Pagination/Pagination.js +58 -0
- package/dist/components/Pagination/Pagination.styles.js +59 -0
- package/dist/components/Pagination/PaginationControls.js +113 -0
- package/dist/components/Pagination/usePagination.js +40 -0
- package/dist/components/Payment/PaymentDetailsCard.js +359 -0
- package/dist/components/Payment/PaymentDisplay.js +199 -0
- package/dist/components/Payment/TimerComponent.js +92 -0
- package/dist/components/Process/Process.styles.js +84 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +35 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +53 -0
- package/dist/components/ProfileBox/ProfileBox.js +27 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +67 -0
- package/dist/components/ProfileStat/ProfileStat.js +29 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +90 -0
- package/dist/components/QRCode/QRCode.js +51 -0
- package/dist/components/Radio/Radio.js +51 -0
- package/dist/components/Radio/Radio.styles.js +100 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +64 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +65 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +20 -0
- package/dist/components/RegisterModal/RegisterModal.js +248 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +43 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +44 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +41 -0
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +134 -0
- package/dist/components/SEO/SEO.js +66 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +26 -0
- package/dist/components/SideLine/SideLine.js +7 -0
- package/dist/components/SideLine/SideLine.styles.js +33 -0
- package/dist/components/Slider/Slider.js +31 -0
- package/dist/components/Slider/Slider.styles.js +120 -0
- package/dist/components/Snackbar/Snackbar.js +111 -0
- package/dist/components/Snackbar/Snackbar.styles.js +230 -0
- package/dist/components/Snackbar/SnackbarProvider.js +66 -0
- package/dist/components/Snackbar/useSnackbar.js +12 -0
- package/dist/components/SpanButton/SpanButton.styles.js +19 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +18 -0
- package/dist/components/StatusTag/StatusTag.js +105 -0
- package/dist/components/StatusTag/StatusTag.styles.js +88 -0
- package/dist/components/StepController/StepController.js +86 -0
- package/dist/components/StepController/StepController.styles.js +33 -0
- package/dist/components/StepController/StepControllerContext.js +65 -0
- package/dist/components/StepController/StepControllerProgress.js +37 -0
- package/dist/components/StepsProgress/StepIndicator.js +40 -0
- package/dist/components/StepsProgress/StepIndicator.styles.js +69 -0
- package/dist/components/StepsProgress/StepsProgress.js +67 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +105 -0
- package/dist/components/StokrLoader/StokrLoader.js +111 -0
- package/dist/components/StokrLoader/media.js +23 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +27 -0
- package/dist/components/SvgIcons/CameraSvg.js +31 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +36 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +20 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +41 -0
- package/dist/components/SvgIcons/DocumentSvg.js +39 -0
- package/dist/components/SvgIcons/EthSvg.js +28 -0
- package/dist/components/SvgIcons/EurSvg.js +27 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +17 -0
- package/dist/components/SvgIcons/FourSvg.js +7 -0
- package/dist/components/SvgIcons/Glassess.js +26 -0
- package/dist/components/SvgIcons/LogoSvg.js +17 -0
- package/dist/components/SvgIcons/OneSvg.js +10 -0
- package/dist/components/SvgIcons/PassportSvg.js +37 -0
- package/dist/components/SvgIcons/RefreshSvg.js +28 -0
- package/dist/components/SvgIcons/SocialFacebook.js +22 -0
- package/dist/components/SvgIcons/SocialInstagram.js +13 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +31 -0
- package/dist/components/SvgIcons/SocialMedium.js +21 -0
- package/dist/components/SvgIcons/SocialReddit.js +21 -0
- package/dist/components/SvgIcons/SocialTelegram.js +60 -0
- package/dist/components/SvgIcons/SocialTwitter.js +62 -0
- package/dist/components/SvgIcons/SocialYoutube.js +22 -0
- package/dist/components/SvgIcons/ThreeSvg.js +7 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +48 -0
- package/dist/components/SvgIcons/TwoSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +12 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +11 -0
- package/dist/components/SvgIcons/UploadSvg.js +12 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +16 -0
- package/dist/components/Switch/Switch.js +63 -0
- package/dist/components/Switch/Switch.styles.js +126 -0
- package/dist/components/Tabs/Tabs.js +54 -0
- package/dist/components/Tabs/Tabs.styles.js +15 -0
- package/dist/components/TabsNav/TabNav.js +16 -0
- package/dist/components/TabsNav/TabsNav.js +30 -0
- package/dist/components/TabsNav/TabsNav.styles.js +103 -0
- package/dist/components/TeamOverview/TeamOverview.js +80 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +167 -0
- package/dist/components/TermsModal/TermsModal.js +145 -0
- package/dist/components/TermsModal/_styles.js +313 -0
- package/dist/components/Text/Text.styles.js +220 -0
- package/dist/components/TextLink/TextLink.styles.js +67 -0
- package/dist/components/Timeline/Timeline.js +44 -0
- package/dist/components/Timeline/Timeline.styles.js +147 -0
- package/dist/components/Timeline/TimelineStep.js +58 -0
- package/dist/components/ToDoList/ToDoList.js +172 -0
- package/dist/components/ToDoList/ToDoList.styles.js +122 -0
- package/dist/components/ToDoList/ToDoListTask.js +95 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +119 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +38 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +41 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +75 -0
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +126 -0
- package/dist/components/headerHo/HeaderHo.js +709 -0
- package/dist/components/icons/Arrow.js +38 -0
- package/dist/components/icons/ArrowSimple.js +34 -0
- package/dist/components/icons/Check.js +16 -0
- package/dist/components/icons/Facebook.js +10 -0
- package/dist/components/icons/Info.js +27 -0
- package/dist/components/icons/Instagram.js +10 -0
- package/dist/components/icons/LinkIcon.js +49 -0
- package/dist/components/icons/LinkedIn.js +13 -0
- package/dist/components/icons/Medium.js +13 -0
- package/dist/components/icons/Reddit.js +16 -0
- package/dist/components/icons/Share.js +31 -0
- package/dist/components/icons/Telegram.js +13 -0
- package/dist/components/icons/Twitter.js +10 -0
- package/dist/components/icons/X.js +10 -0
- package/dist/components/icons/Youtube.js +10 -0
- package/dist/components/icons/index.js +32 -0
- package/dist/components/landing-page/List.js +51 -0
- package/dist/components/landing-page/PageContent.js +65 -0
- package/dist/components/landing-page/PageText.js +171 -0
- package/dist/components/landing-page/PageTitle.js +259 -0
- package/dist/components/logo/Logo.js +57 -0
- package/dist/components/taxId/complete.js +24 -0
- package/dist/components/taxId/flow.js +53 -0
- package/dist/components/taxId/register-taxid.js +166 -0
- package/dist/config.js +44 -0
- package/dist/constants/globalVariables.js +87 -0
- package/dist/constants/style.js +48 -0
- package/dist/context/Auth.js +396 -0
- package/dist/context/AuthContext.js +781 -0
- package/dist/context/Checkbox/CheckboxContext.js +151 -0
- package/dist/firebase-config.js +73 -0
- package/dist/hooks/useNewVentureForm.js +262 -0
- package/dist/hooks/useTimer.js +89 -0
- package/dist/hooks/useTransactionPolling.js +100 -0
- package/dist/index.js +632 -25463
- package/dist/model/axios.js +10 -0
- package/dist/model/axiosPublic.js +9 -0
- package/dist/services/TimerService.js +80 -0
- package/dist/static/animations/checked.lottie.js +4 -0
- package/dist/static/animations/progress.lottie.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.ttf.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff2.js +4 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.eot.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.svg.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.ttf.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.woff.js +4 -0
- package/dist/static/images/add-folder-icon.svg.js +5 -0
- package/dist/static/images/address-refreshing.gif.js +4 -0
- package/dist/static/images/arrow-down-black.svg.js +4 -0
- package/dist/static/images/avatar-placeholder.png.js +4 -0
- package/dist/static/images/background3.png.js +4 -0
- package/dist/static/images/bitcoin-logo.svg.js +4 -0
- package/dist/static/images/bmn2-logo.svg.js +4 -0
- package/dist/static/images/check-icon.svg.js +5 -0
- package/dist/static/images/checkmark-circle-icon.svg.js +5 -0
- package/dist/static/images/close-circle-icon.svg.js +5 -0
- package/dist/static/images/copy_icon.svg.js +5 -0
- package/dist/static/images/cross-icon.svg.js +5 -0
- package/dist/static/images/early-adopter.png.js +4 -0
- package/dist/static/images/eth_logo.svg.js +4 -0
- package/dist/static/images/external-link-icon.svg +3 -0
- package/dist/static/images/external-link-icon.svg.js +4 -0
- package/dist/static/images/filter-icon.svg.js +5 -0
- package/dist/static/images/google_auth.png.js +4 -0
- package/dist/static/images/graduation.png.js +4 -0
- package/dist/static/images/mangopay.svg.js +4 -0
- package/dist/static/images/numbers/number_eight.svg.js +5 -0
- package/dist/static/images/numbers/number_five.svg.js +5 -0
- package/dist/static/images/numbers/number_four.svg.js +5 -0
- package/dist/static/images/numbers/number_nine.svg.js +5 -0
- package/dist/static/images/numbers/number_one.svg.js +5 -0
- package/dist/static/images/numbers/number_seven.svg.js +5 -0
- package/dist/static/images/numbers/number_six.svg.js +5 -0
- package/dist/static/images/numbers/number_three.svg.js +5 -0
- package/dist/static/images/numbers/number_two.svg.js +5 -0
- package/dist/static/images/numbers/number_zero.svg.js +5 -0
- package/dist/static/images/process-waiting.gif.js +4 -0
- package/dist/static/images/search-icon.svg.js +5 -0
- package/dist/static/images/social/Facebook_Logo.png.js +4 -0
- package/dist/static/images/social/LI-In-Bug.png.js +4 -0
- package/dist/static/images/social/Telegram-Logo.png.js +4 -0
- package/dist/static/images/social/X-logo-black.png.js +4 -0
- package/dist/static/images/social/youtube_social_circle_red.png.js +4 -0
- package/dist/static/images/transfer-icon.svg.js +5 -0
- package/dist/static/images/usdc-logo.svg.js +4 -0
- package/dist/static/images/usdq-logo.png.js +4 -0
- package/dist/static/images/warning-filled.svg.js +5 -0
- package/dist/styles/colors.js +57 -0
- package/dist/styles/fonts.js +100 -0
- package/dist/styles/global.js +74 -0
- package/dist/styles/grid.js +11 -0
- package/dist/styles/ioniconsStyles.js +31 -0
- package/dist/styles/reactTippy.js +40 -0
- package/dist/styles/rwd.js +56 -0
- package/dist/styles/semanticUi.js +84 -0
- package/dist/styles/spacing.js +8 -0
- package/dist/styles/theme.js +34 -0
- package/dist/utils/check-sale-time-left.js +85 -0
- package/dist/utils/check-todo-status.js +11 -0
- package/dist/utils/checklistGenerator.js +195 -0
- package/dist/utils/copyToClipboard.js +92 -0
- package/dist/utils/customHooks.js +126 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +12 -0
- package/dist/utils/fix-decimals.js +5 -0
- package/dist/utils/formatCurrencyValue.js +95 -0
- package/dist/utils/get-cookie-domain.js +10 -0
- package/dist/utils/get-short-address.js +4 -0
- package/dist/utils/isUSInvestor.js +6 -0
- package/dist/utils/km_ify.js +33 -0
- package/dist/utils/moment.js +26 -0
- package/dist/utils/redirect-url.js +5 -0
- package/dist/utils/saveAs.js +17 -0
- package/dist/utils/scrollUtils.js +63 -0
- package/dist/utils/set-redirect-cookie.js +16 -0
- package/dist/utils/transition.js +101 -0
- package/dist/utils/withRouter.js +24 -0
- package/package.json +11 -11
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PureComponent } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Collapse } from "react-collapse";
|
|
5
|
+
import stdin_default$2 from "../TabsNav/TabsNav.js";
|
|
6
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
7
|
+
import stdin_default$3 from "../Tabs/Tabs.js";
|
|
8
|
+
import { Text } from "../Text/Text.styles.js";
|
|
9
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
10
|
+
import stdin_default from "../LearnMoreCarousel/LearnMoreCarousel.js";
|
|
11
|
+
import { LearnMoreSlide } from "../LearnMoreCarousel/LearnMoreCarousel.styles.js";
|
|
12
|
+
import { getMedia } from "../../styles/rwd.js";
|
|
13
|
+
import "../LearnMorePage/LearnMore.js";
|
|
14
|
+
import { Container, TitleContainer, SidebarSubHeading, TabTitle, Arrow, TabNav, TabArrow } from "./LearnMore.styles.js";
|
|
15
|
+
import stdin_default$1 from "./LearnMoreItem.js";
|
|
16
|
+
import { learnMoreCategoryPropTypes, learnMorePostPropTypes } from "../LearnMorePage/LearnMore.propTypes.js";
|
|
17
|
+
import { Tab } from "../Tabs/Tabs.styles.js";
|
|
18
|
+
class LearnMoreSection extends PureComponent {
|
|
19
|
+
state = {
|
|
20
|
+
activeTab: 0,
|
|
21
|
+
isMobile: false
|
|
22
|
+
};
|
|
23
|
+
componentDidMount() {
|
|
24
|
+
const { categories } = this.props;
|
|
25
|
+
if (categories?.[0]) {
|
|
26
|
+
this.onTabChange(categories[0].id);
|
|
27
|
+
}
|
|
28
|
+
window.addEventListener("resize", this.onResize);
|
|
29
|
+
this.onResizeTimeout();
|
|
30
|
+
}
|
|
31
|
+
componentWillUnmount() {
|
|
32
|
+
window.removeEventListener("resize", this.onResize);
|
|
33
|
+
}
|
|
34
|
+
onTabChange = (tabId) => {
|
|
35
|
+
this.setState({
|
|
36
|
+
activeTab: tabId
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
onResize = () => {
|
|
40
|
+
clearTimeout(this.timeout);
|
|
41
|
+
this.timeout = setTimeout(this.onResizeTimeout, 200);
|
|
42
|
+
};
|
|
43
|
+
onResizeTimeout = () => {
|
|
44
|
+
this.setState({
|
|
45
|
+
isMobile: this.checkIsMobile()
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
checkIsMobile = () => !window.matchMedia(getMedia("Medium")).matches;
|
|
49
|
+
getItemsForSubcategories = (subcategories) => {
|
|
50
|
+
const { items } = this.props;
|
|
51
|
+
return subcategories.map((subcategory) => items.find((item) => item.id === subcategory.id));
|
|
52
|
+
};
|
|
53
|
+
render() {
|
|
54
|
+
const { categories } = this.props;
|
|
55
|
+
const { activeTab, isMobile } = this.state;
|
|
56
|
+
return isMobile ? /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsxs(Column, { children: [
|
|
57
|
+
/* @__PURE__ */ jsx(TitleContainer, { children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(SidebarSubHeading, { children: "INVESTMENT OPPORTUNITIES" }),
|
|
59
|
+
/* @__PURE__ */ jsx("h3", { children: "DISCOVER INVESTMENTS" })
|
|
60
|
+
] }) }),
|
|
61
|
+
categories.map((category) => {
|
|
62
|
+
const items = this.getItemsForSubcategories(category.subcategories);
|
|
63
|
+
return /* @__PURE__ */ jsxs(ComponentWrapper, { noPadding: true, borderTop: true, children: [
|
|
64
|
+
/* @__PURE__ */ jsxs(TabTitle, { onClick: () => this.onTabChange(category.id), children: [
|
|
65
|
+
category.title,
|
|
66
|
+
/* @__PURE__ */ jsx(Arrow, { isOpened: activeTab === category.id })
|
|
67
|
+
] }),
|
|
68
|
+
/* @__PURE__ */ jsx(Collapse, { isOpened: activeTab === category.id, children: /* @__PURE__ */ jsx(stdin_default, { dots: true, isMobile: true, children: items?.map((item) => /* @__PURE__ */ jsx(LearnMoreSlide, { children: /* @__PURE__ */ jsx(
|
|
69
|
+
stdin_default$1,
|
|
70
|
+
{
|
|
71
|
+
title: item.title,
|
|
72
|
+
content: item.excerpt,
|
|
73
|
+
coverSrc: item.cover,
|
|
74
|
+
postType: item.postType,
|
|
75
|
+
link: item.url,
|
|
76
|
+
videoSrc: item.videoSrc,
|
|
77
|
+
category: item.category
|
|
78
|
+
},
|
|
79
|
+
item.id
|
|
80
|
+
) }, item.id)) }) })
|
|
81
|
+
] }, category.id);
|
|
82
|
+
})
|
|
83
|
+
] }) }) }) : /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
84
|
+
/* @__PURE__ */ jsxs(Column, { part: 5, style: { height: "auto" }, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(TitleContainer, { borderRight: true, borderBottom: true, children: /* @__PURE__ */ jsxs(Text, { responsiveFont: true, children: [
|
|
86
|
+
/* @__PURE__ */ jsx(SidebarSubHeading, { children: "INVESTMENT OPPORTUNITIES" }),
|
|
87
|
+
/* @__PURE__ */ jsx("h3", { children: "DISCOVER INVESTMENTS" })
|
|
88
|
+
] }) }),
|
|
89
|
+
/* @__PURE__ */ jsx(stdin_default$2, { activeTab, children: categories?.map((category) => /* @__PURE__ */ jsxs(
|
|
90
|
+
TabNav,
|
|
91
|
+
{
|
|
92
|
+
borderBottom: true,
|
|
93
|
+
borderRight: true,
|
|
94
|
+
isActive: activeTab === category.id,
|
|
95
|
+
onClick: () => this.onTabChange(category.id),
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx(TabArrow, {}),
|
|
98
|
+
category?.title
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
category.id
|
|
102
|
+
)) }),
|
|
103
|
+
/* @__PURE__ */ jsx(TitleContainer, { borderRight: true, children: /* @__PURE__ */ jsx(Text, {}) })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsx(Column, { part: 11, children: /* @__PURE__ */ jsx(stdin_default$3, { activeTab, children: categories?.map((category) => {
|
|
106
|
+
const items = this.getItemsForSubcategories(category.subcategories);
|
|
107
|
+
return /* @__PURE__ */ jsx(Tab, { children: /* @__PURE__ */ jsxs(stdin_default, { arrows: true, dots: true, children: [
|
|
108
|
+
items?.map((item) => /* @__PURE__ */ jsx(LearnMoreSlide, { children: /* @__PURE__ */ jsx(
|
|
109
|
+
stdin_default$1,
|
|
110
|
+
{
|
|
111
|
+
title: item?.title,
|
|
112
|
+
content: item?.excerpt,
|
|
113
|
+
coverSrc: item?.cover,
|
|
114
|
+
postType: item?.postType,
|
|
115
|
+
link: item?.url,
|
|
116
|
+
videoSrc: item?.videoSrc,
|
|
117
|
+
category: item?.category
|
|
118
|
+
},
|
|
119
|
+
item?.id
|
|
120
|
+
) }, item?.id)),
|
|
121
|
+
/* @__PURE__ */ jsx(LearnMoreSlide, {})
|
|
122
|
+
] }) }, category.id);
|
|
123
|
+
}) }) })
|
|
124
|
+
] }) });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
LearnMoreSection.propTypes = {
|
|
128
|
+
items: PropTypes.arrayOf(PropTypes.shape(learnMorePostPropTypes)).isRequired,
|
|
129
|
+
categories: PropTypes.arrayOf(
|
|
130
|
+
PropTypes.shape({
|
|
131
|
+
...learnMoreCategoryPropTypes,
|
|
132
|
+
subcategories: PropTypes.arrayOf(PropTypes.shape(learnMoreCategoryPropTypes))
|
|
133
|
+
})
|
|
134
|
+
).isRequired
|
|
135
|
+
};
|
|
136
|
+
export {
|
|
137
|
+
LearnMoreSection
|
|
138
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
3
|
+
import { TabsWrapper, StyledTabs } from "../TabsNav/TabsNav.styles.js";
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
${TabsWrapper} {
|
|
9
|
+
padding: 0 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
${StyledTabs} {
|
|
13
|
+
border-bottom: none;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
const TabNav = styled(ComponentWrapper).withConfig({
|
|
17
|
+
shouldForwardProp: (props) => !["isActive"].includes(props)
|
|
18
|
+
})`
|
|
19
|
+
font-size: 11px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
|
|
24
|
+
height: 104px;
|
|
25
|
+
letter-spacing: 0.6px;
|
|
26
|
+
line-height: 1.5;
|
|
27
|
+
padding: 44px 64px !important;
|
|
28
|
+
|
|
29
|
+
${(props) => props.isActive && css`
|
|
30
|
+
border-right: none !important;
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
content: '';
|
|
34
|
+
width: 8px;
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
background: ${props.theme.cWarning};
|
|
40
|
+
}
|
|
41
|
+
`}
|
|
42
|
+
`;
|
|
43
|
+
const TabArrow = styled.i.attrs({
|
|
44
|
+
className: "ion ion-ios-arrow-forward"
|
|
45
|
+
})`
|
|
46
|
+
color: ${(props) => props.theme.cWarning};
|
|
47
|
+
margin-right: 15px;
|
|
48
|
+
`;
|
|
49
|
+
styled.div`
|
|
50
|
+
width: 100%;
|
|
51
|
+
|
|
52
|
+
.slick-arrow {
|
|
53
|
+
width: 64px;
|
|
54
|
+
height: 48px;
|
|
55
|
+
background: ${(props) => props.theme.cWarning};
|
|
56
|
+
z-index: 10;
|
|
57
|
+
transition: 0.3s ease background;
|
|
58
|
+
|
|
59
|
+
&:hover,
|
|
60
|
+
&:focus {
|
|
61
|
+
background: ${(props) => props.theme.cWarningDark};
|
|
62
|
+
|
|
63
|
+
&::before {
|
|
64
|
+
color: ${(props) => props.theme.cWhite} !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.slick-arrow.slick-prev {
|
|
70
|
+
top: auto;
|
|
71
|
+
left: auto;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
right: 64px;
|
|
74
|
+
transform: translate(0);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.slick-arrow.slick-next {
|
|
78
|
+
top: auto;
|
|
79
|
+
left: auto;
|
|
80
|
+
bottom: 0;
|
|
81
|
+
right: 0;
|
|
82
|
+
transform: translate(0);
|
|
83
|
+
border-left: 1px solid ${(props) => props.theme.cWarningDark};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.slick-dots {
|
|
87
|
+
width: auto;
|
|
88
|
+
right: 164px;
|
|
89
|
+
height: 36px;
|
|
90
|
+
bottom: 0;
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
93
|
+
const TitleContainer = styled(ComponentWrapper)`
|
|
94
|
+
height: 100%;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
flex-grow: 1;
|
|
98
|
+
`;
|
|
99
|
+
const TabTitle = styled.div`
|
|
100
|
+
padding: 42px 36px;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
text-transform: uppercase;
|
|
105
|
+
position: relative;
|
|
106
|
+
font-size: 11px;
|
|
107
|
+
line-height: 20px;
|
|
108
|
+
letter-spacing: 0.6px;
|
|
109
|
+
`;
|
|
110
|
+
const Arrow = styled.i.withConfig({
|
|
111
|
+
shouldForwardProp: (props) => !["isOpened"].includes(props)
|
|
112
|
+
}).attrs({
|
|
113
|
+
className: "ion ion-ios-arrow-down"
|
|
114
|
+
})`
|
|
115
|
+
&&& {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: 50%;
|
|
118
|
+
right: 32px;
|
|
119
|
+
transition: 0.3s transform;
|
|
120
|
+
transform: rotate(0);
|
|
121
|
+
text-align: center;
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
line-height: 16px;
|
|
124
|
+
height: 16px;
|
|
125
|
+
margin-top: -8px;
|
|
126
|
+
|
|
127
|
+
${(props) => props.isOpened && `
|
|
128
|
+
transform: rotate(180deg);
|
|
129
|
+
`}
|
|
130
|
+
}
|
|
131
|
+
`;
|
|
132
|
+
const SidebarSubHeading = styled.div`
|
|
133
|
+
font-size: 11px;
|
|
134
|
+
line-height: 24px;
|
|
135
|
+
letter-spacing: 2.1px;
|
|
136
|
+
text-transform: uppercase;
|
|
137
|
+
margin-bottom: 20px;
|
|
138
|
+
`;
|
|
139
|
+
export {
|
|
140
|
+
Arrow,
|
|
141
|
+
Container,
|
|
142
|
+
SidebarSubHeading,
|
|
143
|
+
TabArrow,
|
|
144
|
+
TabNav,
|
|
145
|
+
TabTitle,
|
|
146
|
+
TitleContainer
|
|
147
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { useNavigate } from "react-router-dom";
|
|
5
|
+
import stdin_default$1 from "../Background/Background.js";
|
|
6
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
|
+
import { Button } from "../Button/Button.styles.js";
|
|
8
|
+
import { Container, Cover, Title, Content } from "./LearnMoreItem.styles.js";
|
|
9
|
+
import { SidebarSubHeading } from "./LearnMore.styles.js";
|
|
10
|
+
const LearnMoreItemSection = ({ title, content, link, coverSrc, category }) => {
|
|
11
|
+
let navigate = useNavigate();
|
|
12
|
+
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
13
|
+
/* @__PURE__ */ jsx(Cover, { children: /* @__PURE__ */ jsx(stdin_default$1, { src: coverSrc, investmentOpportunities: true }) }),
|
|
14
|
+
/* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: [
|
|
15
|
+
/* @__PURE__ */ jsx(SidebarSubHeading, { children: category }),
|
|
16
|
+
/* @__PURE__ */ jsx(Title, { children: title })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(Content, { children: content }) }),
|
|
19
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(Button, { onClick: () => navigate(link), children: title === "ARTID" || title === "INFINITE-FLEET" || title === "BLOCKSTREAM MINING" || title === "MAZZANTI AUTOMOBILI" ? "FULL DETAILS" : `I'M INTERESTED` }) })
|
|
20
|
+
] });
|
|
21
|
+
};
|
|
22
|
+
LearnMoreItemSection.propTypes = {
|
|
23
|
+
title: PropTypes.string.isRequired,
|
|
24
|
+
content: PropTypes.string.isRequired,
|
|
25
|
+
link: PropTypes.string.isRequired,
|
|
26
|
+
coverSrc: PropTypes.string.isRequired,
|
|
27
|
+
postType: PropTypes.string.isRequired
|
|
28
|
+
};
|
|
29
|
+
var stdin_default = LearnMoreItemSection;
|
|
30
|
+
export {
|
|
31
|
+
LearnMoreItemSection,
|
|
32
|
+
stdin_default as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Link } from "react-router-dom";
|
|
3
|
+
import { Container as Container$1, Content as Content$1 } from "../Background/Background.styles.js";
|
|
4
|
+
const Container = styled.div`
|
|
5
|
+
height: 100%;
|
|
6
|
+
`;
|
|
7
|
+
const Cover = styled.div`
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
${Container$1} {
|
|
11
|
+
width: 100%;
|
|
12
|
+
padding-top: 56.25%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${Content$1} {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 50%;
|
|
18
|
+
left: 50%;
|
|
19
|
+
width: auto;
|
|
20
|
+
transform: translateY(-50%) translateX(-50%);
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
styled(Link)`
|
|
24
|
+
width: 48px;
|
|
25
|
+
height: 48px;
|
|
26
|
+
color: ${(props) => props.theme.cWhite};
|
|
27
|
+
background: ${(props) => props.theme.cWarning};
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
transition: 0.3s background;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
color: ${(props) => props.theme.cWhite};
|
|
36
|
+
background: ${(props) => props.theme.cWarningDark};
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
styled.i.attrs({
|
|
40
|
+
className: "ion ion-md-play"
|
|
41
|
+
})`
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
`;
|
|
44
|
+
const Title = styled.div`
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
`;
|
|
48
|
+
const Content = styled.div`
|
|
49
|
+
font-size: 16px;
|
|
50
|
+
font-weight: 300;
|
|
51
|
+
line-height: 1.5;
|
|
52
|
+
letter-spacing: 0.6px;
|
|
53
|
+
min-height: 100px;
|
|
54
|
+
`;
|
|
55
|
+
export {
|
|
56
|
+
Container,
|
|
57
|
+
Content,
|
|
58
|
+
Cover,
|
|
59
|
+
Title
|
|
60
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { useLocation } from "react-router-dom";
|
|
5
|
+
import { Formik } from "formik";
|
|
6
|
+
import * as Yup from "yup";
|
|
7
|
+
import { Modal } from "../Modal/Modal.js";
|
|
8
|
+
import stdin_default$1 from "../Form/Form.js";
|
|
9
|
+
import { Text } from "../Text/Text.styles.js";
|
|
10
|
+
import { Input } from "../Input/Input.js";
|
|
11
|
+
import stdin_default$2 from "../Input/InputPassword.js";
|
|
12
|
+
import { Button } from "../Button/Button.styles.js";
|
|
13
|
+
import { TextLink } from "../TextLink/TextLink.styles.js";
|
|
14
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
15
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
16
|
+
import { emailRegex } from "../../constants/globalVariables.js";
|
|
17
|
+
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
18
|
+
import { FormField, FormError } from "../Form/Form.styles.js";
|
|
19
|
+
const LoginModal = (props) => {
|
|
20
|
+
const [email, setEmail] = React__default.useState();
|
|
21
|
+
const location = useLocation();
|
|
22
|
+
React__default.useEffect(() => {
|
|
23
|
+
const { search } = location;
|
|
24
|
+
const query = new URLSearchParams(search);
|
|
25
|
+
const _email = query.get("email");
|
|
26
|
+
if (_email) {
|
|
27
|
+
setEmail(_email);
|
|
28
|
+
}
|
|
29
|
+
}, [location]);
|
|
30
|
+
const validationSchema = Yup.object().shape({
|
|
31
|
+
email: Yup.string().matches(emailRegex, "Oops, that's not a valid address").required("Oops, this can't be blank"),
|
|
32
|
+
password: Yup.string().min(6, "Password must be at least 6 characters").required("Password is required")
|
|
33
|
+
});
|
|
34
|
+
const {
|
|
35
|
+
popupError,
|
|
36
|
+
isModalOpen,
|
|
37
|
+
onModalClose,
|
|
38
|
+
onFormSend,
|
|
39
|
+
onModalSwitch,
|
|
40
|
+
onForgotPassword,
|
|
41
|
+
isActionLoading,
|
|
42
|
+
background
|
|
43
|
+
} = props;
|
|
44
|
+
return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
45
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx("h3", { children: "Log in" }),
|
|
48
|
+
/* @__PURE__ */ jsx("p", { children: "Come on in to stoke up innovation..." })
|
|
49
|
+
] }) }),
|
|
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", onClick: onModalSwitch, children: "Sign up" })
|
|
53
|
+
] }) })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
|
|
56
|
+
Formik,
|
|
57
|
+
{
|
|
58
|
+
initialValues: { email: email || "", password: "" },
|
|
59
|
+
validateOnChange: true,
|
|
60
|
+
validateOnBlur: true,
|
|
61
|
+
validationSchema,
|
|
62
|
+
onSubmit: (values) => {
|
|
63
|
+
onFormSend(values);
|
|
64
|
+
},
|
|
65
|
+
children: ({ values, errors, touched, handleChange, handleBlur }) => {
|
|
66
|
+
const submitDisabled = !values.email || !values.password || !!errors.email || !!errors.password || isActionLoading === "login";
|
|
67
|
+
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Input,
|
|
71
|
+
{
|
|
72
|
+
id: "sign-up-email",
|
|
73
|
+
name: "email",
|
|
74
|
+
type: "email",
|
|
75
|
+
label: "Your email",
|
|
76
|
+
value: values.email,
|
|
77
|
+
onChange: handleChange,
|
|
78
|
+
onBlur: handleBlur,
|
|
79
|
+
error: !!errors.email,
|
|
80
|
+
touched: !!touched.email,
|
|
81
|
+
autoComplete: "email",
|
|
82
|
+
autoFocus: true
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ jsx(FormError, { show: errors.email && touched.email, children: errors.email })
|
|
86
|
+
] }) }),
|
|
87
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
stdin_default$2,
|
|
90
|
+
{
|
|
91
|
+
id: "sign-up-password",
|
|
92
|
+
name: "password",
|
|
93
|
+
type: "password",
|
|
94
|
+
label: "Password",
|
|
95
|
+
value: values.password,
|
|
96
|
+
onChange: handleChange,
|
|
97
|
+
onBlur: handleBlur,
|
|
98
|
+
error: !!errors.password,
|
|
99
|
+
touched: !!touched.password,
|
|
100
|
+
autoComplete: "current-password"
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ jsx(FormError, { show: errors.password && touched.password, children: errors.password })
|
|
104
|
+
] }) }),
|
|
105
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "login-submit-btn", fluid: true, disabled: submitDisabled, children: isActionLoading === "login" ? "Logging in" : "Login" }) }),
|
|
106
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "login", children: popupError.message }) }),
|
|
107
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
108
|
+
TextLink,
|
|
109
|
+
{
|
|
110
|
+
type: "button",
|
|
111
|
+
as: "button",
|
|
112
|
+
onClick: (...args) => {
|
|
113
|
+
values.password = "";
|
|
114
|
+
onForgotPassword(...args);
|
|
115
|
+
},
|
|
116
|
+
children: "Forgot password?"
|
|
117
|
+
}
|
|
118
|
+
) })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
) }) })
|
|
123
|
+
] }) });
|
|
124
|
+
};
|
|
125
|
+
LoginModal.propTypes = {
|
|
126
|
+
isModalOpen: PropTypes.bool.isRequired,
|
|
127
|
+
onModalClose: PropTypes.func.isRequired,
|
|
128
|
+
onFormSend: PropTypes.func.isRequired,
|
|
129
|
+
onModalSwitch: PropTypes.func.isRequired,
|
|
130
|
+
onForgotPassword: PropTypes.func.isRequired,
|
|
131
|
+
isActionLoading: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
132
|
+
popupError: PropTypes.shape({
|
|
133
|
+
popup: PropTypes.string,
|
|
134
|
+
message: PropTypes.string
|
|
135
|
+
}).isRequired,
|
|
136
|
+
background: PropTypes.string
|
|
137
|
+
};
|
|
138
|
+
var stdin_default = LoginModal;
|
|
139
|
+
export {
|
|
140
|
+
LoginModal,
|
|
141
|
+
stdin_default as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Collapse } from "react-collapse";
|
|
5
|
+
import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption } from "./MainMenu.styles.js";
|
|
6
|
+
const DynamicMainMenu = (props) => {
|
|
7
|
+
const spanStyleForMenu = {
|
|
8
|
+
letterSpacing: "2px",
|
|
9
|
+
cursor: "pointer"
|
|
10
|
+
};
|
|
11
|
+
const { options = [], isMenuActive = false } = props;
|
|
12
|
+
return /* @__PURE__ */ jsx(StyledMainMenu, { children: /* @__PURE__ */ jsx(Collapse, { isOpened: isMenuActive, children: /* @__PURE__ */ jsx(MainMenuContainer, { children: /* @__PURE__ */ jsx(MainMenuOptions, { children: options?.map((item, index) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
MainMenuOption,
|
|
15
|
+
{
|
|
16
|
+
type: "button",
|
|
17
|
+
as: "button",
|
|
18
|
+
button: true,
|
|
19
|
+
onClick: item.onClick,
|
|
20
|
+
noBorder: true,
|
|
21
|
+
children: /* @__PURE__ */ jsx("span", { style: spanStyleForMenu, children: item.name })
|
|
22
|
+
},
|
|
23
|
+
item.name + index.toString()
|
|
24
|
+
);
|
|
25
|
+
}) }) }) }) });
|
|
26
|
+
};
|
|
27
|
+
const optionsShape = PropTypes.shape({
|
|
28
|
+
name: PropTypes.string.isRequired,
|
|
29
|
+
onClick: PropTypes.func.isRequired
|
|
30
|
+
});
|
|
31
|
+
DynamicMainMenu.propTypes = {
|
|
32
|
+
isMenuActive: PropTypes.bool.isRequired,
|
|
33
|
+
options: PropTypes.arrayOf(optionsShape)
|
|
34
|
+
};
|
|
35
|
+
var stdin_default = DynamicMainMenu;
|
|
36
|
+
export {
|
|
37
|
+
stdin_default as default
|
|
38
|
+
};
|