@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,262 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Formik } from "formik";
|
|
5
|
+
import * as Yup from "yup";
|
|
6
|
+
import { AuthContext } from "../../../context/AuthContext.js";
|
|
7
|
+
import { emailRegex, ProjectTypes } from "../../../constants/globalVariables.js";
|
|
8
|
+
import { Modal } from "../Modal.js";
|
|
9
|
+
import { Row, Column } from "../../Grid/Grid.styles.js";
|
|
10
|
+
import { Text } from "../../Text/Text.styles.js";
|
|
11
|
+
import stdin_default from "../../Form/Form.js";
|
|
12
|
+
import { ComponentWrapper } from "../../ComponentWrapper/ComponentWrapper.styles.js";
|
|
13
|
+
import { Input } from "../../Input/Input.js";
|
|
14
|
+
import stdin_default$1 from "../../Checkbox/Checkbox.js";
|
|
15
|
+
import { Button } from "../../Button/Button.styles.js";
|
|
16
|
+
import { useNewVentureForm } from "../../../hooks/useNewVentureForm.js";
|
|
17
|
+
import { ModalInner } from "../Modal.styles.js";
|
|
18
|
+
import { FormField, FormError } from "../../Form/Form.styles.js";
|
|
19
|
+
const defaultProject = {
|
|
20
|
+
_id: "",
|
|
21
|
+
name: "",
|
|
22
|
+
type: "fund",
|
|
23
|
+
title: "",
|
|
24
|
+
description: ""
|
|
25
|
+
};
|
|
26
|
+
const NewVentureModal = (props) => {
|
|
27
|
+
const { user } = useContext(AuthContext);
|
|
28
|
+
const {
|
|
29
|
+
title = "Register Your Interest",
|
|
30
|
+
description = "Register your interest and learn more about this investment opportunity.",
|
|
31
|
+
isModalOpen,
|
|
32
|
+
onModalClose,
|
|
33
|
+
onFormSend,
|
|
34
|
+
popupError = null,
|
|
35
|
+
project = defaultProject,
|
|
36
|
+
salesChannel = "investor",
|
|
37
|
+
modalBotContent,
|
|
38
|
+
onSuccessMessageBtnClick,
|
|
39
|
+
customSuccessMessage
|
|
40
|
+
} = props;
|
|
41
|
+
const {
|
|
42
|
+
email,
|
|
43
|
+
name,
|
|
44
|
+
mailingList,
|
|
45
|
+
privateInvestorList,
|
|
46
|
+
mailingListText,
|
|
47
|
+
privateInvestorListText,
|
|
48
|
+
mailingListDisabled,
|
|
49
|
+
privateInvestorListDisabled,
|
|
50
|
+
optionalCheckBox,
|
|
51
|
+
optionalCheckBoxText,
|
|
52
|
+
optionalCheckBoxChecked,
|
|
53
|
+
checkedCheckboxes,
|
|
54
|
+
isSubmitting,
|
|
55
|
+
successMessage,
|
|
56
|
+
errorMessage,
|
|
57
|
+
handleSubmit,
|
|
58
|
+
updateCheckedCheckboxes
|
|
59
|
+
} = useNewVentureForm({
|
|
60
|
+
project: props.project,
|
|
61
|
+
user,
|
|
62
|
+
salesChannel,
|
|
63
|
+
customSuccessMessage
|
|
64
|
+
});
|
|
65
|
+
const validationSchema = Yup.object().shape({
|
|
66
|
+
email: Yup.string().matches(emailRegex, "Oops, that's not a valid address").required("Oops, this can't be blank"),
|
|
67
|
+
name: Yup.string().required("Oops, this can't be blank")
|
|
68
|
+
});
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
Modal,
|
|
71
|
+
{
|
|
72
|
+
isOpen: isModalOpen,
|
|
73
|
+
onClose: (e) => {
|
|
74
|
+
onModalClose(e);
|
|
75
|
+
},
|
|
76
|
+
children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx("h3", { children: errorMessage ? "OOPS.." : successMessage ? "AWESOME!" : title }),
|
|
80
|
+
!(successMessage || errorMessage) && /* @__PURE__ */ jsx("p", { children: description })
|
|
81
|
+
] }) }),
|
|
82
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: modalBotContent })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: successMessage || errorMessage ? /* @__PURE__ */ jsxs(Text, { children: [
|
|
85
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
86
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
87
|
+
/* @__PURE__ */ jsx("p", { children: errorMessage ? errorMessage : successMessage }),
|
|
88
|
+
successMessage && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
89
|
+
Button,
|
|
90
|
+
{
|
|
91
|
+
fluid: true,
|
|
92
|
+
id: "private-investor-success-button",
|
|
93
|
+
onClick: () => {
|
|
94
|
+
if (onSuccessMessageBtnClick) {
|
|
95
|
+
onSuccessMessageBtnClick();
|
|
96
|
+
} else {
|
|
97
|
+
if (user?._id) {
|
|
98
|
+
window.location.href = `https://dashboard.${"stokr.info"}/checklist`;
|
|
99
|
+
} else {
|
|
100
|
+
window.location.href = `/signup?email=${email}`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
children: "Continue"
|
|
105
|
+
}
|
|
106
|
+
) })
|
|
107
|
+
] }) : /* @__PURE__ */ jsx(
|
|
108
|
+
Formik,
|
|
109
|
+
{
|
|
110
|
+
initialValues: {
|
|
111
|
+
email: email || "",
|
|
112
|
+
name: name || "",
|
|
113
|
+
mailingList: mailingList || false,
|
|
114
|
+
privateInvestorList: privateInvestorList || false,
|
|
115
|
+
optionalCheckBoxChecked: optionalCheckBoxChecked || false
|
|
116
|
+
},
|
|
117
|
+
validationSchema,
|
|
118
|
+
onSubmit: (values) => {
|
|
119
|
+
onFormSend(values);
|
|
120
|
+
handleSubmit(values);
|
|
121
|
+
},
|
|
122
|
+
id: "register-interest-form",
|
|
123
|
+
children: ({ values, errors, touched, handleBlur, handleChange, setFieldValue, setFieldTouched }) => {
|
|
124
|
+
const onChangeWithTouch = async (e) => {
|
|
125
|
+
const field = e.target;
|
|
126
|
+
await setFieldValue(field.name, field.value, false);
|
|
127
|
+
await setFieldTouched(field.name);
|
|
128
|
+
};
|
|
129
|
+
const oneOfCheckbox = values.mailingList && !mailingListDisabled || values.privateInvestorList && !privateInvestorListDisabled;
|
|
130
|
+
const optionalCheckBoxForm = optionalCheckBox ? values.optionalCheckBoxChecked : true;
|
|
131
|
+
if (email && !values.email) {
|
|
132
|
+
setFieldValue("email", email);
|
|
133
|
+
setFieldTouched("email");
|
|
134
|
+
}
|
|
135
|
+
if (name && !values.name) {
|
|
136
|
+
setFieldValue("name", name);
|
|
137
|
+
setFieldTouched("name");
|
|
138
|
+
}
|
|
139
|
+
if (mailingList && !values.mailingList) {
|
|
140
|
+
setFieldValue("mailingList", mailingList);
|
|
141
|
+
}
|
|
142
|
+
if (privateInvestorList && !values.privateInvestorList) {
|
|
143
|
+
setFieldValue("privateInvestorList", privateInvestorList);
|
|
144
|
+
}
|
|
145
|
+
const handleCheckboxChange = (e) => {
|
|
146
|
+
handleChange(e);
|
|
147
|
+
if (e.target.checked) {
|
|
148
|
+
updateCheckedCheckboxes([...checkedCheckboxes, e.target.id]);
|
|
149
|
+
} else {
|
|
150
|
+
updateCheckedCheckboxes(checkedCheckboxes.filter((item) => item !== e.target.id));
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
var submitDisabled = !touched.email || !!errors.email || !touched.name || !!errors.name || isSubmitting || !oneOfCheckbox || !optionalCheckBoxForm;
|
|
154
|
+
return /* @__PURE__ */ jsxs(stdin_default, { children: [
|
|
155
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
156
|
+
!user?._id && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
Input,
|
|
159
|
+
{
|
|
160
|
+
id: "new-venture-email",
|
|
161
|
+
name: "email",
|
|
162
|
+
type: "email",
|
|
163
|
+
label: "Your email",
|
|
164
|
+
value: values.email,
|
|
165
|
+
onChange: onChangeWithTouch,
|
|
166
|
+
onBlur: handleBlur,
|
|
167
|
+
error: !!errors.email,
|
|
168
|
+
touched: !!touched.email
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ jsx(FormError, { show: touched.email && errors.email, children: errors.email }),
|
|
172
|
+
/* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, paddingVeticalHalf: true, noPaddingBottom: true, children: [
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
Input,
|
|
175
|
+
{
|
|
176
|
+
id: "new-venture-name",
|
|
177
|
+
name: "name",
|
|
178
|
+
type: "text",
|
|
179
|
+
label: "Your name",
|
|
180
|
+
value: values.name,
|
|
181
|
+
onChange: onChangeWithTouch,
|
|
182
|
+
onBlur: handleBlur,
|
|
183
|
+
error: !!errors.name,
|
|
184
|
+
touched: !!touched.name
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ jsx(FormError, { show: touched.name && errors.name, children: errors.name })
|
|
188
|
+
] })
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "1rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
191
|
+
stdin_default$1,
|
|
192
|
+
{
|
|
193
|
+
id: "createPrivateInvestor",
|
|
194
|
+
name: "privateInvestorList",
|
|
195
|
+
text: privateInvestorListText,
|
|
196
|
+
checked: values.privateInvestorList,
|
|
197
|
+
disabled: privateInvestorListDisabled,
|
|
198
|
+
onChange: handleCheckboxChange,
|
|
199
|
+
onBlur: handleBlur
|
|
200
|
+
}
|
|
201
|
+
) }),
|
|
202
|
+
/* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
203
|
+
stdin_default$1,
|
|
204
|
+
{
|
|
205
|
+
id: "subscribeToProject",
|
|
206
|
+
name: "mailingList",
|
|
207
|
+
text: mailingListText,
|
|
208
|
+
checked: values.mailingList,
|
|
209
|
+
disabled: mailingListDisabled,
|
|
210
|
+
onChange: handleCheckboxChange,
|
|
211
|
+
onBlur: handleBlur
|
|
212
|
+
}
|
|
213
|
+
) }),
|
|
214
|
+
optionalCheckBox && /* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
215
|
+
stdin_default$1,
|
|
216
|
+
{
|
|
217
|
+
id: "optionalCheckBox",
|
|
218
|
+
name: "optionalCheckBoxChecked",
|
|
219
|
+
text: optionalCheckBoxText,
|
|
220
|
+
value: values.optionalCheckBoxChecked,
|
|
221
|
+
checked: values.optionalCheckBoxChecked,
|
|
222
|
+
onChange: handleChange,
|
|
223
|
+
onBlur: handleBlur
|
|
224
|
+
}
|
|
225
|
+
) }),
|
|
226
|
+
project.type === ProjectTypes.FUND && /* @__PURE__ */ jsx(FormField, { style: { marginTop: "2rem", marginBottom: -5 }, children: /* @__PURE__ */ jsx(
|
|
227
|
+
"p",
|
|
228
|
+
{
|
|
229
|
+
style: {
|
|
230
|
+
margin: 0,
|
|
231
|
+
fontSize: 12
|
|
232
|
+
},
|
|
233
|
+
children: /* @__PURE__ */ jsx("strong", { children: "The fund, as well as its fund manager(s) and affiliates, may not be subject to any registration or other local marketing or private placement laws in your jurisdiction." })
|
|
234
|
+
}
|
|
235
|
+
) })
|
|
236
|
+
] }) }),
|
|
237
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "private-investor-subscribe-button", disabled: submitDisabled, children: "register" }) }),
|
|
238
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError, children: popupError }) })
|
|
239
|
+
] });
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
) }) })
|
|
243
|
+
] })
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
};
|
|
247
|
+
NewVentureModal.propTypes = {
|
|
248
|
+
isModalOpen: PropTypes.bool.isRequired,
|
|
249
|
+
onModalClose: PropTypes.func.isRequired,
|
|
250
|
+
onFormSend: PropTypes.func.isRequired,
|
|
251
|
+
onModalSwitch: PropTypes.func,
|
|
252
|
+
title: PropTypes.string,
|
|
253
|
+
description: PropTypes.string,
|
|
254
|
+
popupError: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
255
|
+
project: PropTypes.object,
|
|
256
|
+
successMsg: PropTypes.node,
|
|
257
|
+
errorMsg: PropTypes.node,
|
|
258
|
+
modalBotContent: PropTypes.node
|
|
259
|
+
};
|
|
260
|
+
export {
|
|
261
|
+
NewVentureModal
|
|
262
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { QRCodeSVG } from "qrcode.react";
|
|
4
|
+
import { formatInTimeZone } from "date-fns-tz";
|
|
5
|
+
import { Modal } from "./Modal.js";
|
|
6
|
+
import { Text } from "../Text/Text.styles.js";
|
|
7
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
8
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
|
+
import stdin_default from "../CryptoAddress/CryptoAddress.js";
|
|
10
|
+
import { Button } from "../Button/Button.styles.js";
|
|
11
|
+
import { getCurrencySymbol } from "../../utils/formatCurrencyValue.js";
|
|
12
|
+
import theme from "../../styles/theme.js";
|
|
13
|
+
import { Icon, iconsMap } from "../Icon/Icon.style.js";
|
|
14
|
+
import styled from "styled-components";
|
|
15
|
+
import { ModalInner } from "./Modal.styles.js";
|
|
16
|
+
const WarningBox = styled.div`
|
|
17
|
+
background: ${theme.cWarning};
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
padding: 10px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
position: relative;
|
|
24
|
+
z-index: 9;
|
|
25
|
+
`;
|
|
26
|
+
const BlurBox = styled.div`
|
|
27
|
+
filter: blur(4px);
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0px;
|
|
30
|
+
left: 50%;
|
|
31
|
+
transform: translate(-50%, 0px);
|
|
32
|
+
`;
|
|
33
|
+
const PaymentModal = ({
|
|
34
|
+
data = {},
|
|
35
|
+
user,
|
|
36
|
+
isModalOpen,
|
|
37
|
+
onModalClose = () => {
|
|
38
|
+
},
|
|
39
|
+
onCTAClick = () => {
|
|
40
|
+
},
|
|
41
|
+
isRedemption,
|
|
42
|
+
noCTA = false,
|
|
43
|
+
CTAText = "Done",
|
|
44
|
+
additionalInfoRight,
|
|
45
|
+
withTimer = false,
|
|
46
|
+
error,
|
|
47
|
+
secondsRemaining,
|
|
48
|
+
modalTitle = `SEND YOUR ${data?.tokenSymbolToSend}`,
|
|
49
|
+
txTextInRed = true,
|
|
50
|
+
sendTokenTextRight = /* @__PURE__ */ jsxs("p", { children: [
|
|
51
|
+
"Send your ",
|
|
52
|
+
data?.tokenSymbolToSend,
|
|
53
|
+
" to the treasury wallet below."
|
|
54
|
+
] }),
|
|
55
|
+
numberOfSecuritiesText = "Redeem securities",
|
|
56
|
+
formatAmountInLink = true
|
|
57
|
+
}) => {
|
|
58
|
+
const { projectData, tokenAmount, tokenSymbol, createdAt, tokenDecimals = 2, GAID, currencyType } = data;
|
|
59
|
+
let newTokenAmount = tokenAmount;
|
|
60
|
+
if (formatAmountInLink) {
|
|
61
|
+
newTokenAmount = (tokenAmount * Math.pow(10, tokenDecimals - 8)).toFixed(8);
|
|
62
|
+
}
|
|
63
|
+
var paymentlink = `liquidnetwork:${projectData?.companyWallet}?amount=${newTokenAmount}&assetid=${projectData?.secondaryAssetId}`;
|
|
64
|
+
const isKYCVerified = user?.kyc_status === "Accepted";
|
|
65
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("h3", { children: modalTitle }) }),
|
|
67
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
68
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, style: { paddingRight: 20 }, children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
71
|
+
"Request date:",
|
|
72
|
+
" ",
|
|
73
|
+
/* @__PURE__ */ jsx("strong", { children: createdAt && !isNaN(new Date(createdAt)) ? formatInTimeZone(new Date(createdAt), "Europe/Berlin", "dd MMM yyyy - HH:mm zzz") : "—" })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
76
|
+
"Your securities: ",
|
|
77
|
+
/* @__PURE__ */ jsxs("strong", { children: [
|
|
78
|
+
" ",
|
|
79
|
+
tokenSymbol
|
|
80
|
+
] })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
83
|
+
"Your AMP wallet:",
|
|
84
|
+
/* @__PURE__ */ jsx(stdin_default, { noHead: true, data: { value: GAID, tooltip: true, shortAddress: true }, fontSize: 16 })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
87
|
+
numberOfSecuritiesText,
|
|
88
|
+
" ",
|
|
89
|
+
/* @__PURE__ */ jsx("strong", { children: tokenAmount })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
92
|
+
isRedemption ? "Redemption currency" : "Currency",
|
|
93
|
+
":",
|
|
94
|
+
/* @__PURE__ */ jsxs("strong", { children: [
|
|
95
|
+
" ",
|
|
96
|
+
getCurrencySymbol(currencyType)
|
|
97
|
+
] })
|
|
98
|
+
] })
|
|
99
|
+
] }),
|
|
100
|
+
withTimer && typeof secondsRemaining === "number" && secondsRemaining > 0 && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsxs("p", { style: { color: theme.cWarning }, children: [
|
|
101
|
+
formatInTimeZone(new Date(secondsRemaining * 1e3), "UTC", "mm:ss"),
|
|
102
|
+
" Waiting for payment..."
|
|
103
|
+
] }) }) }),
|
|
104
|
+
!noCTA && /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { onClick: onCTAClick, children: CTAText }) })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: error ? error : /* @__PURE__ */ jsxs(Text, { children: [
|
|
107
|
+
sendTokenTextRight,
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
"p",
|
|
110
|
+
{
|
|
111
|
+
style: {
|
|
112
|
+
color: txTextInRed ? theme.cWarning : "inherit"
|
|
113
|
+
},
|
|
114
|
+
children: "We have transfered 0.00002 LBTC to cover your transaction costs."
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
isKYCVerified ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
stdin_default,
|
|
120
|
+
{
|
|
121
|
+
title: "Treasury wallet:",
|
|
122
|
+
data: {
|
|
123
|
+
value: projectData?.companyWallet,
|
|
124
|
+
tooltip: true,
|
|
125
|
+
shortAddress: true
|
|
126
|
+
},
|
|
127
|
+
fontSize: 16
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: paymentlink, size: 150 }) })
|
|
131
|
+
] }) : /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
132
|
+
/* @__PURE__ */ jsxs(WarningBox, { children: [
|
|
133
|
+
/* @__PURE__ */ jsx(Icon, { icon: iconsMap.warning, size: 32, color: "white" }),
|
|
134
|
+
/* @__PURE__ */ jsxs("p", { style: { color: theme.cWhite }, children: [
|
|
135
|
+
"Your KYC needs an update, please contact",
|
|
136
|
+
" ",
|
|
137
|
+
/* @__PURE__ */ jsx("a", { href: "mailto:compliance@stokr.io", style: { color: "inherit" }, children: "compliance@stokr.io" })
|
|
138
|
+
] })
|
|
139
|
+
] }),
|
|
140
|
+
/* @__PURE__ */ jsx(BlurBox, { children: /* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingBottom: true, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: paymentlink, size: 150 }) }) })
|
|
141
|
+
] }),
|
|
142
|
+
additionalInfoRight && additionalInfoRight
|
|
143
|
+
] }) })
|
|
144
|
+
] }) })
|
|
145
|
+
] }) }) });
|
|
146
|
+
};
|
|
147
|
+
export {
|
|
148
|
+
PaymentModal
|
|
149
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { SideModalRoot, Dimmer, SideModalBox } from "./SideModal.styles.js";
|
|
5
|
+
import { ModalClose } from "./Modal.styles.js";
|
|
6
|
+
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
7
|
+
function findScrolledElement() {
|
|
8
|
+
let best = null;
|
|
9
|
+
function walk(el) {
|
|
10
|
+
if (!el || el.nodeType !== 1) return;
|
|
11
|
+
const s = getComputedStyle(el);
|
|
12
|
+
const scrollable = (s.overflowY === "auto" || s.overflowY === "scroll" || s.overflow === "auto" || s.overflow === "scroll") && el.scrollHeight > el.clientHeight && el.scrollTop > 0;
|
|
13
|
+
if (scrollable && (!best || el.scrollTop > best.scrollTop)) best = { el, scrollTop: el.scrollTop };
|
|
14
|
+
for (let i = 0; i < el.children.length; i++) walk(el.children[i]);
|
|
15
|
+
}
|
|
16
|
+
walk(document.body);
|
|
17
|
+
return best;
|
|
18
|
+
}
|
|
19
|
+
function restoreScroll(saved) {
|
|
20
|
+
if (!saved) return;
|
|
21
|
+
if (saved.type === "window") {
|
|
22
|
+
window.scrollTo(0, saved.y);
|
|
23
|
+
} else if (saved.el && document.contains(saved.el)) {
|
|
24
|
+
saved.el.scrollTop = saved.scrollTop;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function clearBodyLock() {
|
|
28
|
+
const { style } = document.body;
|
|
29
|
+
const docEl = document.documentElement;
|
|
30
|
+
style.position = "";
|
|
31
|
+
style.top = "";
|
|
32
|
+
style.left = "";
|
|
33
|
+
style.right = "";
|
|
34
|
+
style.width = "";
|
|
35
|
+
style.height = "";
|
|
36
|
+
style.overflow = "";
|
|
37
|
+
style.paddingRight = "";
|
|
38
|
+
docEl.style.overflow = "";
|
|
39
|
+
docEl.style.setProperty("--scrollbar-compensation", "0px");
|
|
40
|
+
}
|
|
41
|
+
const SideModal = ({
|
|
42
|
+
children,
|
|
43
|
+
isOpen,
|
|
44
|
+
onClose,
|
|
45
|
+
width = 40,
|
|
46
|
+
minWidth = 400,
|
|
47
|
+
className,
|
|
48
|
+
containerStyle,
|
|
49
|
+
closeOnDimmerClick = true,
|
|
50
|
+
showCloseButton = true,
|
|
51
|
+
...props
|
|
52
|
+
}) => {
|
|
53
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
54
|
+
const savedScroll = useRef(null);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (isOpen) {
|
|
57
|
+
const found = findScrolledElement();
|
|
58
|
+
if (found) savedScroll.current = found;
|
|
59
|
+
else if (window.scrollY > 0) savedScroll.current = { type: "window", y: window.scrollY };
|
|
60
|
+
else savedScroll.current = null;
|
|
61
|
+
const saved = savedScroll.current;
|
|
62
|
+
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
63
|
+
const isWindowScroll = saved && saved.type === "window";
|
|
64
|
+
if (isWindowScroll) {
|
|
65
|
+
const y = saved.y;
|
|
66
|
+
const docHeight = document.documentElement.scrollHeight;
|
|
67
|
+
document.documentElement.style.overflow = "hidden";
|
|
68
|
+
document.documentElement.style.setProperty("--scrollbar-compensation", `${scrollbarWidth}px`);
|
|
69
|
+
document.body.style.position = "fixed";
|
|
70
|
+
document.body.style.top = `-${y}px`;
|
|
71
|
+
document.body.style.left = "0";
|
|
72
|
+
document.body.style.right = "0";
|
|
73
|
+
document.body.style.width = "100%";
|
|
74
|
+
document.body.style.height = `${docHeight}px`;
|
|
75
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
76
|
+
} else {
|
|
77
|
+
document.documentElement.style.overflow = "hidden";
|
|
78
|
+
document.body.style.overflow = "hidden";
|
|
79
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
80
|
+
document.documentElement.style.setProperty("--scrollbar-compensation", `${scrollbarWidth}px`);
|
|
81
|
+
if (saved) {
|
|
82
|
+
requestAnimationFrame(() => {
|
|
83
|
+
restoreScroll(saved);
|
|
84
|
+
requestAnimationFrame(() => restoreScroll(saved));
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const timerId = setTimeout(() => setIsVisible(true), 10);
|
|
89
|
+
return () => {
|
|
90
|
+
clearTimeout(timerId);
|
|
91
|
+
const scrollState = savedScroll.current;
|
|
92
|
+
savedScroll.current = null;
|
|
93
|
+
clearBodyLock();
|
|
94
|
+
if (scrollState) requestAnimationFrame(() => restoreScroll(scrollState));
|
|
95
|
+
};
|
|
96
|
+
} else {
|
|
97
|
+
const saved = savedScroll.current;
|
|
98
|
+
savedScroll.current = null;
|
|
99
|
+
clearBodyLock();
|
|
100
|
+
setIsVisible(false);
|
|
101
|
+
if (saved) requestAnimationFrame(() => restoreScroll(saved));
|
|
102
|
+
}
|
|
103
|
+
}, [isOpen]);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
const handleEscape = (e) => {
|
|
106
|
+
if (e.key === "Escape" && isOpen) {
|
|
107
|
+
onClose();
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
if (isOpen) {
|
|
111
|
+
document.addEventListener("keydown", handleEscape);
|
|
112
|
+
}
|
|
113
|
+
return () => {
|
|
114
|
+
document.removeEventListener("keydown", handleEscape);
|
|
115
|
+
};
|
|
116
|
+
}, [isOpen, onClose]);
|
|
117
|
+
const handleDimmerClick = (e) => {
|
|
118
|
+
if (closeOnDimmerClick && e.target === e.currentTarget) {
|
|
119
|
+
onClose();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
if (!isOpen) return null;
|
|
123
|
+
const modalContent = /* @__PURE__ */ jsxs(SideModalRoot, { className, style: containerStyle, ...props, children: [
|
|
124
|
+
/* @__PURE__ */ jsx(IoniconsStyles, {}),
|
|
125
|
+
/* @__PURE__ */ jsx(Dimmer, { onClick: handleDimmerClick, isVisible, children: /* @__PURE__ */ jsxs(SideModalBox, { width, minWidth, isVisible, onClick: (e) => e.stopPropagation(), children: [
|
|
126
|
+
showCloseButton && /* @__PURE__ */ jsx(ModalClose, { onClick: onClose }),
|
|
127
|
+
children
|
|
128
|
+
] }) })
|
|
129
|
+
] });
|
|
130
|
+
return createPortal(modalContent, document.body);
|
|
131
|
+
};
|
|
132
|
+
export {
|
|
133
|
+
SideModal
|
|
134
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { colors } from "../../styles/colors.js";
|
|
3
|
+
const SideModalRoot = styled.div`
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
z-index: 1000;
|
|
10
|
+
`;
|
|
11
|
+
const Dimmer = styled.div.withConfig({
|
|
12
|
+
shouldForwardProp: (props) => !["isVisible"].includes(props)
|
|
13
|
+
})`
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: flex-end;
|
|
22
|
+
align-items: stretch;
|
|
23
|
+
opacity: ${(props) => props.isVisible ? 1 : 0};
|
|
24
|
+
transition: opacity 0.3s ease-in-out;
|
|
25
|
+
pointer-events: ${(props) => props.isVisible ? "auto" : "none"};
|
|
26
|
+
`;
|
|
27
|
+
const SideModalBox = styled.div.withConfig({
|
|
28
|
+
shouldForwardProp: (props) => !["width", "minWidth", "isVisible"].includes(props)
|
|
29
|
+
})`
|
|
30
|
+
position: relative;
|
|
31
|
+
width: ${(props) => props.width}%;
|
|
32
|
+
min-width: ${(props) => props.minWidth}px;
|
|
33
|
+
max-width: 90%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
background-color: ${colors.white};
|
|
36
|
+
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
transform: translateX(${(props) => props.isVisible ? "0" : "100%"});
|
|
41
|
+
transition: transform 0.3s ease-in-out;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
pointer-events: auto;
|
|
44
|
+
|
|
45
|
+
@media (max-width: 768px) {
|
|
46
|
+
width: 90%;
|
|
47
|
+
min-width: 90%;
|
|
48
|
+
max-width: 90%;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
export {
|
|
52
|
+
Dimmer,
|
|
53
|
+
SideModalBox,
|
|
54
|
+
SideModalRoot
|
|
55
|
+
};
|