@stokr/components-library 3.0.16 → 3.0.17
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 +187 -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/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 +89 -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 +224 -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/index.js +628 -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/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 +56 -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 +146 -146
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import rwd, { rwdMax } from "../../styles/rwd.js";
|
|
3
|
+
import { colors } from "../../styles/colors.js";
|
|
4
|
+
import spacing from "../../styles/spacing.js";
|
|
5
|
+
import { Button } from "../Button/Button.styles.js";
|
|
6
|
+
import { WHITE_HEX, BLUE_BASE_RELEASED_HEX, GRAY_BASE_HEX } from "../../constants/style.js";
|
|
7
|
+
import { SocialLink } from "../Footer/FooterMenu.styles.js";
|
|
8
|
+
import { iconsMap, Icon } from "../Icon/Icon.style.js";
|
|
9
|
+
const StyledSubMenu = styled.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
`;
|
|
12
|
+
const StyledHeader = styled.header.withConfig({
|
|
13
|
+
shouldForwardProp: (props) => !["noFixedPosition"].includes(props)
|
|
14
|
+
})`
|
|
15
|
+
z-index: 1000;
|
|
16
|
+
position: relative;
|
|
17
|
+
color: ${colors.black};
|
|
18
|
+
border-bottom: 1px solid rgb(237, 237, 237);
|
|
19
|
+
|
|
20
|
+
${rwd.MLarge`
|
|
21
|
+
position: fixed;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: ${spacing.headerHeight}px;
|
|
26
|
+
background-color: ${colors.white};
|
|
27
|
+
box-shadow: inset 0 -1px 0 0 ${colors.lightGrey};
|
|
28
|
+
|
|
29
|
+
/* Compensate for scrollbar when modal is open */
|
|
30
|
+
padding-right: var(--scrollbar-compensation, 0px);
|
|
31
|
+
|
|
32
|
+
${(props) => props.noFixedPosition && `
|
|
33
|
+
position:initial;
|
|
34
|
+
`}
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
37
|
+
const HeaderInner = styled.div.withConfig({
|
|
38
|
+
shouldForwardProp: (props) => !["withSidebar"].includes(props)
|
|
39
|
+
})`
|
|
40
|
+
position: relative;
|
|
41
|
+
padding: 24px;
|
|
42
|
+
|
|
43
|
+
${(props) => props.withSidebar && `
|
|
44
|
+
left: 64px;
|
|
45
|
+
transition: 0.3s width;
|
|
46
|
+
`}
|
|
47
|
+
|
|
48
|
+
${rwd.MLarge`
|
|
49
|
+
display: flex;
|
|
50
|
+
padding: 28px 64px;
|
|
51
|
+
align-items: center;
|
|
52
|
+
|
|
53
|
+
${(props) => props.withSidebar && `
|
|
54
|
+
width:100%;
|
|
55
|
+
left:0;
|
|
56
|
+
`}
|
|
57
|
+
`}
|
|
58
|
+
`;
|
|
59
|
+
const MainNavWrap = styled.div.withConfig({
|
|
60
|
+
shouldForwardProp: (props) => !["isFixedWidth", "noProgress", "hasProgress"].includes(props)
|
|
61
|
+
})`
|
|
62
|
+
z-index: 2;
|
|
63
|
+
position: relative;
|
|
64
|
+
font-size: 0;
|
|
65
|
+
|
|
66
|
+
${rwd.MLarge`
|
|
67
|
+
flex-grow: ${({ isFixedWidth }) => !isFixedWidth && 1};
|
|
68
|
+
width: ${({ isFixedWidth }) => isFixedWidth && "200px"};
|
|
69
|
+
|
|
70
|
+
${(props) => props.noProgress && `
|
|
71
|
+
flex-grow: 3;
|
|
72
|
+
`}
|
|
73
|
+
|
|
74
|
+
${(props) => props.hasProgress && `
|
|
75
|
+
width:33.3%;
|
|
76
|
+
`}
|
|
77
|
+
`}
|
|
78
|
+
`;
|
|
79
|
+
const SidebarToggle = styled.div.withConfig({
|
|
80
|
+
shouldForwardProp: (props) => !["isSidebarExpanded"].includes(props)
|
|
81
|
+
})`
|
|
82
|
+
width: 64px;
|
|
83
|
+
height: 100%;
|
|
84
|
+
background: ${colors.rustyRed};
|
|
85
|
+
transition: 0.3s width;
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
display: flex;
|
|
88
|
+
position: absolute;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
z-index: 10;
|
|
91
|
+
|
|
92
|
+
${rwd.MLarge`
|
|
93
|
+
position: relative;
|
|
94
|
+
width: 100px;
|
|
95
|
+
`}
|
|
96
|
+
|
|
97
|
+
${(props) => props.isSidebarExpanded && rwd.MLarge`
|
|
98
|
+
width: 300px;
|
|
99
|
+
`}
|
|
100
|
+
`;
|
|
101
|
+
const HamburgerIcon = styled(Icon)`
|
|
102
|
+
display: block;
|
|
103
|
+
width: 18px;
|
|
104
|
+
height: 18px;
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 50%;
|
|
107
|
+
left: 50%;
|
|
108
|
+
margin-top: -9px;
|
|
109
|
+
margin-left: -9px;
|
|
110
|
+
font-size: 18px;
|
|
111
|
+
line-height: 18px;
|
|
112
|
+
color: ${colors.white};
|
|
113
|
+
|
|
114
|
+
&:before {
|
|
115
|
+
content: '${iconsMap.hamburger}';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
${rwd.MLarge`
|
|
119
|
+
left: 50px;
|
|
120
|
+
`}
|
|
121
|
+
`;
|
|
122
|
+
const ProgressWrap = styled.div`
|
|
123
|
+
z-index: 0;
|
|
124
|
+
position: relative;
|
|
125
|
+
text-align: center;
|
|
126
|
+
margin-top: 24px;
|
|
127
|
+
|
|
128
|
+
${rwd.MLarge`
|
|
129
|
+
flex-grow: 2;
|
|
130
|
+
margin-top: 0;
|
|
131
|
+
`}
|
|
132
|
+
`;
|
|
133
|
+
const QuickNavWrap = styled.div.withConfig({
|
|
134
|
+
shouldForwardProp: (props) => !["isFixeWidth", "hasProgress"].includes(props)
|
|
135
|
+
})`
|
|
136
|
+
z-index: 2;
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 0;
|
|
139
|
+
right: 0;
|
|
140
|
+
height: 100%;
|
|
141
|
+
|
|
142
|
+
${rwd.MLarge`
|
|
143
|
+
position: relative;
|
|
144
|
+
right: auto;
|
|
145
|
+
flex-grow: ${({ isFixedWidth }) => !isFixedWidth && 1};
|
|
146
|
+
width: ${({ isFixedWidth }) => isFixedWidth && "200px"};
|
|
147
|
+
text-align: right;
|
|
148
|
+
|
|
149
|
+
${(props) => props.hasProgress && `
|
|
150
|
+
width:33.3%;
|
|
151
|
+
`}
|
|
152
|
+
`}
|
|
153
|
+
`;
|
|
154
|
+
const Logo = styled.div.withConfig({
|
|
155
|
+
shouldForwardProp: (props) => !["isHighlight"].includes(props)
|
|
156
|
+
})`
|
|
157
|
+
display: inline-block;
|
|
158
|
+
vertical-align: middle;
|
|
159
|
+
color: ${colors.black};
|
|
160
|
+
transition: color 0.4s;
|
|
161
|
+
|
|
162
|
+
${(props) => props.isHighlight && `
|
|
163
|
+
color: ${colors.blue};
|
|
164
|
+
`}
|
|
165
|
+
|
|
166
|
+
a {
|
|
167
|
+
display: block;
|
|
168
|
+
transition: opacity 0.2s;
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
opacity: 0.5;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
img {
|
|
176
|
+
display: block;
|
|
177
|
+
height: 16px;
|
|
178
|
+
width: auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
svg {
|
|
182
|
+
display: block;
|
|
183
|
+
height: 16px;
|
|
184
|
+
width: auto;
|
|
185
|
+
fill: currentColor;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
${rwd.MLarge`
|
|
189
|
+
margin-left: 0;
|
|
190
|
+
margin-right: 42px;
|
|
191
|
+
`}
|
|
192
|
+
`;
|
|
193
|
+
const HeaderMainNav = styled.div`
|
|
194
|
+
display: none;
|
|
195
|
+
|
|
196
|
+
${rwd.MLarge`
|
|
197
|
+
display: inline-block;
|
|
198
|
+
`}
|
|
199
|
+
|
|
200
|
+
button {
|
|
201
|
+
text-transform: uppercase;
|
|
202
|
+
}
|
|
203
|
+
`;
|
|
204
|
+
const HeaderQuickNav = styled.div.withConfig({
|
|
205
|
+
shouldForwardProp: (props) => !["isUserLogged"].includes(props)
|
|
206
|
+
})`
|
|
207
|
+
display: none;
|
|
208
|
+
|
|
209
|
+
${rwd.MLarge`
|
|
210
|
+
display: inline-block;
|
|
211
|
+
|
|
212
|
+
& > * {
|
|
213
|
+
margin-left: 32px;
|
|
214
|
+
|
|
215
|
+
&:first-child {
|
|
216
|
+
margin-left: 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
${(props) => !props.isUserLogged && `
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: flex-end;
|
|
224
|
+
`}
|
|
225
|
+
`}
|
|
226
|
+
|
|
227
|
+
button {
|
|
228
|
+
text-transform: uppercase;
|
|
229
|
+
|
|
230
|
+
${rwd.MLarge`
|
|
231
|
+
vertical-align: middle;
|
|
232
|
+
`}
|
|
233
|
+
}
|
|
234
|
+
`;
|
|
235
|
+
const MobileMenuToggler = styled.button.withConfig({
|
|
236
|
+
shouldForwardProp: (props) => !["withSidebar", "isActive"].includes(props)
|
|
237
|
+
})`
|
|
238
|
+
display: block;
|
|
239
|
+
width: 32px;
|
|
240
|
+
height: 32px;
|
|
241
|
+
position: absolute;
|
|
242
|
+
top: 16px;
|
|
243
|
+
right: 16px;
|
|
244
|
+
outline: none;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
border: none;
|
|
247
|
+
background-color: inherit;
|
|
248
|
+
|
|
249
|
+
${(props) => props.withSidebar && `
|
|
250
|
+
right:-15px;
|
|
251
|
+
`}
|
|
252
|
+
|
|
253
|
+
${rwd.MLarge`
|
|
254
|
+
display: none;
|
|
255
|
+
`}
|
|
256
|
+
|
|
257
|
+
span {
|
|
258
|
+
display: block;
|
|
259
|
+
width: 16px;
|
|
260
|
+
height: 2px;
|
|
261
|
+
position: absolute;
|
|
262
|
+
top: 50%;
|
|
263
|
+
left: 50%;
|
|
264
|
+
margin-top: -1px;
|
|
265
|
+
margin-left: -8px;
|
|
266
|
+
background-color: ${colors.black};
|
|
267
|
+
transition:
|
|
268
|
+
background-color 0.4s,
|
|
269
|
+
transform 0.4s;
|
|
270
|
+
|
|
271
|
+
&:nth-child(1) {
|
|
272
|
+
transform: translateY(-6px);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
&:nth-child(3) {
|
|
276
|
+
transform: translateY(6px);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
${(props) => props.isActive && `
|
|
281
|
+
span {
|
|
282
|
+
background-color: ${colors.blue};
|
|
283
|
+
|
|
284
|
+
&:nth-child(1) {
|
|
285
|
+
transform: translateY(0) rotate(135deg);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&:nth-child(2) {
|
|
289
|
+
transform: scaleX(0);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
&:nth-child(3) {
|
|
293
|
+
transform: translateY(0) rotate(-135deg);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`}
|
|
297
|
+
`;
|
|
298
|
+
const MobileMenu = styled.nav.withConfig({
|
|
299
|
+
shouldForwardProp: (props) => !["isActive", "withSidebar"].includes(props)
|
|
300
|
+
})`
|
|
301
|
+
z-index: 100;
|
|
302
|
+
position: absolute;
|
|
303
|
+
top: 65px;
|
|
304
|
+
left: 0;
|
|
305
|
+
display: flex;
|
|
306
|
+
flex-direction: column;
|
|
307
|
+
width: 100%;
|
|
308
|
+
min-height: calc(100vh - 65px);
|
|
309
|
+
background-color: ${colors.white};
|
|
310
|
+
padding: 0;
|
|
311
|
+
text-align: center;
|
|
312
|
+
opacity: 0;
|
|
313
|
+
visibility: hidden;
|
|
314
|
+
transition:
|
|
315
|
+
opacity 0.4s,
|
|
316
|
+
visibility 0.4s;
|
|
317
|
+
|
|
318
|
+
height: 100%;
|
|
319
|
+
overflow: auto;
|
|
320
|
+
|
|
321
|
+
${(props) => props.isActive && `
|
|
322
|
+
opacity: 1;
|
|
323
|
+
visibility: visible;
|
|
324
|
+
`}
|
|
325
|
+
|
|
326
|
+
${(props) => props.withSidebar && `
|
|
327
|
+
width:100vw;
|
|
328
|
+
left:-64px;
|
|
329
|
+
`}
|
|
330
|
+
|
|
331
|
+
// &:before {
|
|
332
|
+
// content: '';
|
|
333
|
+
// display: block;
|
|
334
|
+
// width: 100%;
|
|
335
|
+
// height: 1px;
|
|
336
|
+
// background-color: ${colors.lightGrey};
|
|
337
|
+
// position: absolute;
|
|
338
|
+
// top: 0;
|
|
339
|
+
// left: 0;
|
|
340
|
+
// }
|
|
341
|
+
|
|
342
|
+
${rwd.MLarge`
|
|
343
|
+
display: none;
|
|
344
|
+
`}
|
|
345
|
+
|
|
346
|
+
button {
|
|
347
|
+
text-transform: uppercase;
|
|
348
|
+
}
|
|
349
|
+
`;
|
|
350
|
+
const MobileMenuItem = styled.li.withConfig({
|
|
351
|
+
shouldForwardProp: (props) => !["red"].includes(props)
|
|
352
|
+
})`
|
|
353
|
+
align-items: center;
|
|
354
|
+
display: flex !important;
|
|
355
|
+
justify-content: center;
|
|
356
|
+
|
|
357
|
+
${(props) => props.red && `
|
|
358
|
+
background: #D2200D;
|
|
359
|
+
color:white;
|
|
360
|
+
border-bottom: 1px solid #979797;
|
|
361
|
+
`}
|
|
362
|
+
`;
|
|
363
|
+
const MobileMenuWrapper = styled.div`
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
`;
|
|
366
|
+
const MobileMenuLink = styled.a`
|
|
367
|
+
width: 100%;
|
|
368
|
+
`;
|
|
369
|
+
const MobileMenuPart = styled.div.withConfig({
|
|
370
|
+
shouldForwardProp: (props) => !["withPadding", "isLast", "grow", "flexColumn", "noPaddingTop", "borderTop"].includes(props)
|
|
371
|
+
})`
|
|
372
|
+
${(props) => props.withPadding && `
|
|
373
|
+
padding: 30px 0;
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
@media screen and (max-width: 320px) {
|
|
377
|
+
padding: 15px 0;
|
|
378
|
+
}
|
|
379
|
+
`}
|
|
380
|
+
${(props) => props.isLast && `
|
|
381
|
+
// padding-bottom: env(safe-area-inset-bottom);
|
|
382
|
+
padding-bottom:100px;
|
|
383
|
+
`}
|
|
384
|
+
|
|
385
|
+
${(props) => props.grow && `
|
|
386
|
+
flex-grow: ${props.grow};
|
|
387
|
+
`}
|
|
388
|
+
|
|
389
|
+
${(props) => props.flexColumn && `
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-direction: column;
|
|
392
|
+
justify-content: center;
|
|
393
|
+
align-items: center;
|
|
394
|
+
|
|
395
|
+
button {
|
|
396
|
+
margin: 10px 0;
|
|
397
|
+
}
|
|
398
|
+
`}
|
|
399
|
+
|
|
400
|
+
${(props) => props.noPaddingTop && `
|
|
401
|
+
padding-top: 0;
|
|
402
|
+
`}
|
|
403
|
+
|
|
404
|
+
${(props) => props.borderTop && `
|
|
405
|
+
border-top: 1px solid ${colors.lightGrey};
|
|
406
|
+
`}
|
|
407
|
+
`;
|
|
408
|
+
const UserAccount = styled.div`
|
|
409
|
+
z-index: 1;
|
|
410
|
+
position: relative;
|
|
411
|
+
display: inline-block;
|
|
412
|
+
vertical-align: middle;
|
|
413
|
+
|
|
414
|
+
${rwd.MLarge`
|
|
415
|
+
margin: -4px 0;
|
|
416
|
+
margin-left: 32px;
|
|
417
|
+
`}
|
|
418
|
+
`;
|
|
419
|
+
const UserButton = styled.button`
|
|
420
|
+
display: inline-block;
|
|
421
|
+
vertical-align: middle;
|
|
422
|
+
width: 48px;
|
|
423
|
+
height: 48px;
|
|
424
|
+
border-radius: 24px;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
background-color: ${colors.grey2};
|
|
427
|
+
opacity: 1;
|
|
428
|
+
transition: opacity 0.2s;
|
|
429
|
+
outline: none;
|
|
430
|
+
cursor: pointer;
|
|
431
|
+
box-shadow: none;
|
|
432
|
+
border: none;
|
|
433
|
+
background-color: buttonface;
|
|
434
|
+
background-color: transparent;
|
|
435
|
+
padding: 0;
|
|
436
|
+
|
|
437
|
+
/* &:hover {
|
|
438
|
+
opacity: 0.5;
|
|
439
|
+
} */
|
|
440
|
+
`;
|
|
441
|
+
const UserAvatar = styled.img`
|
|
442
|
+
display: block;
|
|
443
|
+
width: 100%;
|
|
444
|
+
height: 100%;
|
|
445
|
+
object-fit: cover;
|
|
446
|
+
object-position: center center;
|
|
447
|
+
`;
|
|
448
|
+
styled.div`
|
|
449
|
+
z-index: 0;
|
|
450
|
+
position: relative;
|
|
451
|
+
display: block;
|
|
452
|
+
padding-top: 36px;
|
|
453
|
+
padding-bottom: 20px;
|
|
454
|
+
font-weight: 600;
|
|
455
|
+
font-size: 16px;
|
|
456
|
+
line-height: 24px;
|
|
457
|
+
background-color: ${colors.orangishRed};
|
|
458
|
+
color: ${colors.white};
|
|
459
|
+
margin-top: -24px;
|
|
460
|
+
`;
|
|
461
|
+
const LoginButton = styled.span`
|
|
462
|
+
cursor: pointer;
|
|
463
|
+
margin-right: 24px;
|
|
464
|
+
display: none;
|
|
465
|
+
|
|
466
|
+
&:hover {
|
|
467
|
+
opacity: 0.6;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
@media screen and (min-width: 992px) {
|
|
471
|
+
display: block;
|
|
472
|
+
}
|
|
473
|
+
`;
|
|
474
|
+
const SignupButton = styled(Button).withConfig({
|
|
475
|
+
shouldForwardProp: (props) => !["isMobile"].includes(props)
|
|
476
|
+
})`
|
|
477
|
+
padding-right: 32px !important;
|
|
478
|
+
color: ${WHITE_HEX} !important;
|
|
479
|
+
|
|
480
|
+
&:hover {
|
|
481
|
+
background: ${BLUE_BASE_RELEASED_HEX};
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
${(props) => props.isMobile && `
|
|
485
|
+
margin: 0;
|
|
486
|
+
width: 163.94px;
|
|
487
|
+
`}
|
|
488
|
+
`;
|
|
489
|
+
const CTAContainer = styled.div`
|
|
490
|
+
align-items: center;
|
|
491
|
+
border-top: 1px solid ${GRAY_BASE_HEX};
|
|
492
|
+
display: flex;
|
|
493
|
+
flex-direction: column;
|
|
494
|
+
justify-content: center;
|
|
495
|
+
padding: 56px 0;
|
|
496
|
+
width: 100%;
|
|
497
|
+
|
|
498
|
+
span {
|
|
499
|
+
color: 1px solid ${GRAY_BASE_HEX};
|
|
500
|
+
font-size: 10px;
|
|
501
|
+
letter-spacing: 2.1px;
|
|
502
|
+
margin-bottom: 14px;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
div {
|
|
506
|
+
display: flex;
|
|
507
|
+
flex-wrap: wrap;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
${rwdMax.Medium`
|
|
511
|
+
div{
|
|
512
|
+
width: 192px; /* Fit exactly 3 icons */
|
|
513
|
+
}
|
|
514
|
+
`}
|
|
515
|
+
|
|
516
|
+
${SocialLink} {
|
|
517
|
+
display: flex;
|
|
518
|
+
justify-content: center;
|
|
519
|
+
|
|
520
|
+
background: transparent;
|
|
521
|
+
margin: 12px;
|
|
522
|
+
|
|
523
|
+
svg {
|
|
524
|
+
fill: rgb(32, 32, 32);
|
|
525
|
+
height: 18px !important;
|
|
526
|
+
width: 18px !important;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
`;
|
|
530
|
+
const SocialLinksContainer = styled.div.withConfig({
|
|
531
|
+
shouldForwardProp: (props) => !["isHeader"].includes(props)
|
|
532
|
+
})`
|
|
533
|
+
display: flex !important;
|
|
534
|
+
flex-wrap: nowrap !important;
|
|
535
|
+
justify-content: ${(props) => props.isHeader ? "center" : null};
|
|
536
|
+
|
|
537
|
+
// fixes SVG icons stretching
|
|
538
|
+
& > * {
|
|
539
|
+
flex: none !important;
|
|
540
|
+
}
|
|
541
|
+
`;
|
|
542
|
+
export {
|
|
543
|
+
CTAContainer,
|
|
544
|
+
HamburgerIcon,
|
|
545
|
+
HeaderInner,
|
|
546
|
+
HeaderMainNav,
|
|
547
|
+
HeaderQuickNav,
|
|
548
|
+
LoginButton,
|
|
549
|
+
Logo,
|
|
550
|
+
MainNavWrap,
|
|
551
|
+
MobileMenu,
|
|
552
|
+
MobileMenuItem,
|
|
553
|
+
MobileMenuLink,
|
|
554
|
+
MobileMenuPart,
|
|
555
|
+
MobileMenuToggler,
|
|
556
|
+
MobileMenuWrapper,
|
|
557
|
+
ProgressWrap,
|
|
558
|
+
QuickNavWrap,
|
|
559
|
+
SidebarToggle,
|
|
560
|
+
SignupButton,
|
|
561
|
+
SocialLinksContainer,
|
|
562
|
+
StyledHeader,
|
|
563
|
+
StyledSubMenu,
|
|
564
|
+
UserAccount,
|
|
565
|
+
UserAvatar,
|
|
566
|
+
UserButton
|
|
567
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { useRef, useEffect } from "react";
|
|
4
|
+
import { useInView } from "react-intersection-observer";
|
|
5
|
+
const VideoContainer = styled.div`
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
`;
|
|
11
|
+
const VideoBackground = styled.video`
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
object-fit: cover;
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
`;
|
|
19
|
+
const now = Date.now();
|
|
20
|
+
const HeroVideoBlock = () => {
|
|
21
|
+
const videoRef = useRef(null);
|
|
22
|
+
const lastTimeRef = useRef(0);
|
|
23
|
+
const lastVisibleTime = useRef(now);
|
|
24
|
+
const playVideo = () => {
|
|
25
|
+
if (!videoRef.current) return;
|
|
26
|
+
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
27
|
+
if (videoRef.current.currentTime > 0) {
|
|
28
|
+
lastTimeRef.current = videoRef.current.currentTime;
|
|
29
|
+
}
|
|
30
|
+
const playPromise = videoRef.current.play();
|
|
31
|
+
if (playPromise !== void 0) {
|
|
32
|
+
playPromise.catch((error) => {
|
|
33
|
+
console.log("Video play error:", error);
|
|
34
|
+
if (isMobile && videoRef.current) {
|
|
35
|
+
const resetNeeded = Date.now() - lastVisibleTime.current > 2e3;
|
|
36
|
+
if (resetNeeded) {
|
|
37
|
+
videoRef.current.currentTime = lastTimeRef.current || 0.1;
|
|
38
|
+
videoRef.current.play().catch((e) => console.log("Retry failed:", e));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const handleVisibilityChange = (isVisible) => {
|
|
45
|
+
if (isVisible) {
|
|
46
|
+
lastVisibleTime.current = Date.now();
|
|
47
|
+
if (videoRef.current) {
|
|
48
|
+
playVideo();
|
|
49
|
+
}
|
|
50
|
+
} else if (videoRef.current) {
|
|
51
|
+
lastTimeRef.current = videoRef.current.currentTime;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const { ref: windowViewportRef } = useInView({
|
|
55
|
+
threshold: 0,
|
|
56
|
+
// partialVisibility equivalent - triggers as soon as any part is visible
|
|
57
|
+
onChange: (inView, _entry) => {
|
|
58
|
+
handleVisibilityChange(inView);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
let visibilityTimeoutId;
|
|
63
|
+
const handleDocVisibilityChange = () => {
|
|
64
|
+
if (document.visibilityState === "visible") {
|
|
65
|
+
lastVisibleTime.current = Date.now();
|
|
66
|
+
if (visibilityTimeoutId != null) clearTimeout(visibilityTimeoutId);
|
|
67
|
+
visibilityTimeoutId = setTimeout(() => {
|
|
68
|
+
playVideo();
|
|
69
|
+
}, 300);
|
|
70
|
+
} else if (videoRef.current) {
|
|
71
|
+
lastTimeRef.current = videoRef.current.currentTime;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
document.addEventListener("visibilitychange", handleDocVisibilityChange);
|
|
75
|
+
playVideo();
|
|
76
|
+
return () => {
|
|
77
|
+
if (visibilityTimeoutId != null) clearTimeout(visibilityTimeoutId);
|
|
78
|
+
document.removeEventListener("visibilitychange", handleDocVisibilityChange);
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
81
|
+
return /* @__PURE__ */ jsx("div", { ref: windowViewportRef, children: /* @__PURE__ */ jsx(VideoContainer, { children: /* @__PURE__ */ jsx(
|
|
82
|
+
VideoBackground,
|
|
83
|
+
{
|
|
84
|
+
ref: videoRef,
|
|
85
|
+
autoPlay: true,
|
|
86
|
+
muted: true,
|
|
87
|
+
loop: true,
|
|
88
|
+
playsInline: true,
|
|
89
|
+
preload: "metadata",
|
|
90
|
+
"data-vsc-ignore": "true",
|
|
91
|
+
fetchPriority: "high",
|
|
92
|
+
children: /* @__PURE__ */ jsx(
|
|
93
|
+
"source",
|
|
94
|
+
{
|
|
95
|
+
src: "https://res.cloudinary.com/stokr/video/upload/f_auto,q_auto:best/v1745923531/Static/Hero_section_video_kuatj1.mp4",
|
|
96
|
+
type: "video/mp4",
|
|
97
|
+
fetchPriority: "high"
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
) }) });
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
HeroVideoBlock
|
|
105
|
+
};
|