@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,44 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { RED_BASE_HEX } from "../../constants/style.js";
|
|
6
|
+
import { Modal } from "../Modal/Modal.js";
|
|
7
|
+
import { Button } from "../Button/Button.styles.js";
|
|
8
|
+
import { Text } from "../Text/Text.styles.js";
|
|
9
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
|
+
import { ContainerWithLine } from "./ResetConfirmModal.styles.js";
|
|
11
|
+
import { ModalInner } from "../Modal/Modal.styles.js";
|
|
12
|
+
const RedBar = styled.div`
|
|
13
|
+
background: ${RED_BASE_HEX};
|
|
14
|
+
bottom: 0;
|
|
15
|
+
height: 30%;
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: 0;
|
|
18
|
+
width: 50%;
|
|
19
|
+
`;
|
|
20
|
+
const ResetConfirmModal = ({ isModalOpen, onModalClose, onModalSwitch }) => /* @__PURE__ */ jsxs(Modal, { isOpen: isModalOpen, onClose: onModalClose, closeIsFullHeight: true, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Row, { isConfirmModal: true, children: /* @__PURE__ */ jsx(Column, { relative: true, part: 10, isConfirmModal: true, children: /* @__PURE__ */ jsx(ModalInner, { isConfirmModal: true, children: /* @__PURE__ */ jsxs(ContainerWithLine, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxs(Text, { withBorder: true, isConfirm: true, children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("h3", { children: [
|
|
24
|
+
"Abracadabra!",
|
|
25
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
26
|
+
"You're back in the game!"
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ jsx("p", { children: "Your new password has been set." })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
31
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
32
|
+
/* @__PURE__ */ jsx(Button, { onClick: onModalSwitch, children: "Login" })
|
|
33
|
+
] }) }) }) }),
|
|
34
|
+
/* @__PURE__ */ jsx(RedBar, {})
|
|
35
|
+
] });
|
|
36
|
+
ResetConfirmModal.propTypes = {
|
|
37
|
+
isModalOpen: PropTypes.bool.isRequired,
|
|
38
|
+
onModalClose: PropTypes.func.isRequired
|
|
39
|
+
};
|
|
40
|
+
var stdin_default = ResetConfirmModal;
|
|
41
|
+
export {
|
|
42
|
+
ResetConfirmModal,
|
|
43
|
+
stdin_default as default
|
|
44
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Text } from "../Text/Text.styles.js";
|
|
3
|
+
import { colors } from "../../styles/colors.js";
|
|
4
|
+
const ContainerWithLine = styled(Text)`
|
|
5
|
+
position: relative;
|
|
6
|
+
padding-left: 48px;
|
|
7
|
+
|
|
8
|
+
&::before {
|
|
9
|
+
content: '';
|
|
10
|
+
width: 8px;
|
|
11
|
+
height: 72px;
|
|
12
|
+
background: ${colors.blue};
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
top: 6px;
|
|
16
|
+
@media screen and (max-width: 767px) {
|
|
17
|
+
top: 33px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// &::after {
|
|
22
|
+
// content: '';
|
|
23
|
+
// width: 1px;
|
|
24
|
+
// height: 800px;
|
|
25
|
+
// background: #ededed;
|
|
26
|
+
// position: absolute;
|
|
27
|
+
// left: 0;
|
|
28
|
+
// top: -200px;
|
|
29
|
+
|
|
30
|
+
// @media screen and (max-width: 767px) {
|
|
31
|
+
// height: 200vh;
|
|
32
|
+
// }
|
|
33
|
+
// }
|
|
34
|
+
|
|
35
|
+
@media screen and (max-width: 767px) {
|
|
36
|
+
top: -20vh;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
export {
|
|
40
|
+
ContainerWithLine
|
|
41
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Formik } from "formik";
|
|
5
|
+
import * as Yup from "yup";
|
|
6
|
+
import { Modal } from "../Modal/Modal.js";
|
|
7
|
+
import stdin_default$1 from "../Form/Form.js";
|
|
8
|
+
import { Text } from "../Text/Text.styles.js";
|
|
9
|
+
import stdin_default$2 from "../Input/InputPassword.js";
|
|
10
|
+
import { Button } from "../Button/Button.styles.js";
|
|
11
|
+
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
12
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
13
|
+
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
14
|
+
import { FormField, FormError } from "../Form/Form.styles.js";
|
|
15
|
+
const ResetPasswordModal = ({
|
|
16
|
+
isModalOpen,
|
|
17
|
+
onModalClose,
|
|
18
|
+
onFormSend,
|
|
19
|
+
onModalSwitch,
|
|
20
|
+
popupError,
|
|
21
|
+
isActionLoading,
|
|
22
|
+
onLoad
|
|
23
|
+
}) => {
|
|
24
|
+
const initialValues = {
|
|
25
|
+
password: "",
|
|
26
|
+
confirmPassword: ""
|
|
27
|
+
};
|
|
28
|
+
const validationSchema = Yup.object().shape({
|
|
29
|
+
password: Yup.string().required("Oops, this can‘t be blank"),
|
|
30
|
+
confirmPassword: Yup.string().required("Oops, this can‘t be blank")
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
onLoad?.();
|
|
34
|
+
}, []);
|
|
35
|
+
return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
36
|
+
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
37
|
+
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx("h3", { children: "RESET YOUR PASSWORD" }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { children: "Please set your new password." })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsxs(ModalLinkWrap, { children: [
|
|
42
|
+
"Remember your password? ",
|
|
43
|
+
/* @__PURE__ */ jsx(ModalLink, { to: "#", onClick: onModalSwitch, children: "Log in" })
|
|
44
|
+
] }) })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
|
|
47
|
+
Formik,
|
|
48
|
+
{
|
|
49
|
+
initialValues,
|
|
50
|
+
validationSchema,
|
|
51
|
+
onSubmit: (values) => {
|
|
52
|
+
onFormSend(values);
|
|
53
|
+
},
|
|
54
|
+
children: ({ values, errors, touched, handleBlur, setFieldValue, setFieldTouched }) => {
|
|
55
|
+
const onChangeWithTouch = (e) => {
|
|
56
|
+
const field = e.target;
|
|
57
|
+
setFieldValue(field.name, field.value, false);
|
|
58
|
+
setFieldTouched(field.name);
|
|
59
|
+
};
|
|
60
|
+
const submitDisabled = values.password.length <= 5 || values.password !== values.confirmPassword || isActionLoading === "resetPassword";
|
|
61
|
+
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
63
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
64
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
stdin_default$2,
|
|
67
|
+
{
|
|
68
|
+
id: "reset-password",
|
|
69
|
+
name: "password",
|
|
70
|
+
type: "password",
|
|
71
|
+
label: "Password",
|
|
72
|
+
value: values.password,
|
|
73
|
+
onChange: onChangeWithTouch,
|
|
74
|
+
onBlur: handleBlur,
|
|
75
|
+
error: !!errors.password,
|
|
76
|
+
touched: !!touched.password,
|
|
77
|
+
info: "For a stronger password, try a mix of lowercase, capitals, numbers and special characters.",
|
|
78
|
+
autoComplete: "new-password"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(FormError, { show: errors.password && touched.password, children: errors.password }),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
FormError,
|
|
84
|
+
{
|
|
85
|
+
show: !errors.password && touched.password && values.password.length <= 5,
|
|
86
|
+
children: "The password must be at least 6 characters long"
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] }) }),
|
|
90
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
91
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
stdin_default$2,
|
|
94
|
+
{
|
|
95
|
+
id: "confirm-reset-password",
|
|
96
|
+
name: "confirmPassword",
|
|
97
|
+
type: "password",
|
|
98
|
+
label: "Confirm password",
|
|
99
|
+
value: values.confirmPassword,
|
|
100
|
+
onChange: onChangeWithTouch,
|
|
101
|
+
onBlur: handleBlur,
|
|
102
|
+
error: !!errors.confirmPassword,
|
|
103
|
+
touched: !!touched.confirmPassword,
|
|
104
|
+
autoComplete: "new-password"
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(FormError, { show: errors.confirmPassword && touched.confirmPassword, children: errors.confirmPassword })
|
|
108
|
+
] }) }),
|
|
109
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Button, { type: "submit", id: "reset-password-submit-btn", fluid: true, disabled: submitDisabled, children: isActionLoading === "resetPassword" ? "Resetting" : "Reset" }) }),
|
|
110
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
111
|
+
FormError,
|
|
112
|
+
{
|
|
113
|
+
show: touched.password && touched.confirmPassword && values.password !== values.confirmPassword,
|
|
114
|
+
children: "The passwords must match"
|
|
115
|
+
}
|
|
116
|
+
) }),
|
|
117
|
+
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError.popup === "resetPassword", children: popupError.message }) })
|
|
118
|
+
] });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
) }) })
|
|
122
|
+
] }) });
|
|
123
|
+
};
|
|
124
|
+
ResetPasswordModal.propTypes = {
|
|
125
|
+
isModalOpen: PropTypes.bool.isRequired,
|
|
126
|
+
onModalClose: PropTypes.func.isRequired,
|
|
127
|
+
onFormSend: PropTypes.func.isRequired,
|
|
128
|
+
onModalSwitch: PropTypes.func.isRequired
|
|
129
|
+
};
|
|
130
|
+
var stdin_default = ResetPasswordModal;
|
|
131
|
+
export {
|
|
132
|
+
ResetPasswordModal,
|
|
133
|
+
stdin_default as default
|
|
134
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import Helmet from "react-helmet";
|
|
5
|
+
function SEO({ description = "", lang = "en", meta = [], keywords = [], title, author = "" }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Helmet,
|
|
8
|
+
{
|
|
9
|
+
htmlAttributes: {
|
|
10
|
+
lang
|
|
11
|
+
},
|
|
12
|
+
title,
|
|
13
|
+
titleTemplate: "STOKR • %s",
|
|
14
|
+
meta: [
|
|
15
|
+
{
|
|
16
|
+
name: "description",
|
|
17
|
+
content: description
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
property: "og:title",
|
|
21
|
+
content: title
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
property: "og:description",
|
|
25
|
+
content: description
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
property: "og:type",
|
|
29
|
+
content: "website"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "twitter:card",
|
|
33
|
+
content: "summary"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "twitter:creator",
|
|
37
|
+
content: author
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "twitter:title",
|
|
41
|
+
content: title
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "twitter:description",
|
|
45
|
+
content: description
|
|
46
|
+
}
|
|
47
|
+
].concat(
|
|
48
|
+
keywords?.length > 0 ? {
|
|
49
|
+
name: "keywords",
|
|
50
|
+
content: keywords.join(", ")
|
|
51
|
+
} : []
|
|
52
|
+
).concat(meta)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
SEO.propTypes = {
|
|
57
|
+
description: PropTypes.string,
|
|
58
|
+
lang: PropTypes.string,
|
|
59
|
+
meta: PropTypes.instanceOf(Array),
|
|
60
|
+
keywords: PropTypes.arrayOf(PropTypes.string),
|
|
61
|
+
title: PropTypes.string.isRequired,
|
|
62
|
+
author: PropTypes.string
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
SEO
|
|
66
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const SectionTitle = styled.h2`
|
|
3
|
+
position: relative;
|
|
4
|
+
font-family: 'Open Sans';
|
|
5
|
+
font-weight: normal;
|
|
6
|
+
font-size: 11px;
|
|
7
|
+
line-height: 20px;
|
|
8
|
+
letter-spacing: 2px;
|
|
9
|
+
text-transform: uppercase;
|
|
10
|
+
padding: 0;
|
|
11
|
+
border: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
|
|
14
|
+
span {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
strong {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export {
|
|
24
|
+
SectionTitle,
|
|
25
|
+
SectionTitle as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import rwd from "../../styles/rwd.js";
|
|
3
|
+
import theme from "../../styles/theme.js";
|
|
4
|
+
const Line = styled.div`
|
|
5
|
+
display: none;
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
right: 20px;
|
|
9
|
+
width: 8px;
|
|
10
|
+
height: 100%;
|
|
11
|
+
font-size: 0;
|
|
12
|
+
border-left: 1px solid ${() => theme.cGrey};
|
|
13
|
+
|
|
14
|
+
${rwd.Medium`
|
|
15
|
+
display: block;
|
|
16
|
+
`}
|
|
17
|
+
|
|
18
|
+
${rwd.Large`
|
|
19
|
+
right: 30px;
|
|
20
|
+
`}
|
|
21
|
+
`;
|
|
22
|
+
const Bar = styled.div`
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 60px;
|
|
25
|
+
left: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 40px;
|
|
28
|
+
background-color: ${() => theme.cPrimary};
|
|
29
|
+
`;
|
|
30
|
+
export {
|
|
31
|
+
Bar,
|
|
32
|
+
Line
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import Slick from "react-slick";
|
|
5
|
+
import "slick-carousel/slick/slick.css";
|
|
6
|
+
import "slick-carousel/slick/slick-theme.css";
|
|
7
|
+
import { WrapperSlider } from "./Slider.styles.js";
|
|
8
|
+
const Slider = ({ children, autoplay = 0, dots = false, arrows = false, infinite = true, rtl = false }) => {
|
|
9
|
+
const settings = {
|
|
10
|
+
dots,
|
|
11
|
+
arrows,
|
|
12
|
+
infinite,
|
|
13
|
+
speed: 600,
|
|
14
|
+
autoplay: !!autoplay,
|
|
15
|
+
autoplaySpeed: autoplay,
|
|
16
|
+
slidesToShow: 1,
|
|
17
|
+
slidesToScroll: 1,
|
|
18
|
+
rtl
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsx(WrapperSlider, { children: /* @__PURE__ */ jsx(Slick, { ...settings, children }) });
|
|
21
|
+
};
|
|
22
|
+
Slider.propTypes = {
|
|
23
|
+
children: PropTypes.node.isRequired,
|
|
24
|
+
autoplay: PropTypes.number,
|
|
25
|
+
dots: PropTypes.bool,
|
|
26
|
+
arrows: PropTypes.bool,
|
|
27
|
+
infinite: PropTypes.bool
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
Slider
|
|
31
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const WrapperSlider = styled.div`
|
|
3
|
+
height: 100%;
|
|
4
|
+
|
|
5
|
+
.slick-list {
|
|
6
|
+
z-index: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.slick-arrow {
|
|
10
|
+
z-index: 1;
|
|
11
|
+
width: 24px;
|
|
12
|
+
height: 24px;
|
|
13
|
+
|
|
14
|
+
&.slick-prev,
|
|
15
|
+
&.slick-next {
|
|
16
|
+
&:before {
|
|
17
|
+
font-family: 'Ionicons';
|
|
18
|
+
speak: none;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-weight: normal;
|
|
21
|
+
font-variant: normal;
|
|
22
|
+
text-transform: none;
|
|
23
|
+
text-rendering: auto;
|
|
24
|
+
-webkit-font-smoothing: antialiased;
|
|
25
|
+
-moz-osx-font-smoothing: grayscale;
|
|
26
|
+
font-size: 20px;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
text-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);
|
|
30
|
+
opacity: 1;
|
|
31
|
+
color: #fff;
|
|
32
|
+
transition: color 0.2s;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
&:before {
|
|
37
|
+
color: #0050ca;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.slick-prev {
|
|
43
|
+
left: 4px;
|
|
44
|
+
|
|
45
|
+
&:before {
|
|
46
|
+
content: '\f3cf';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.slick-next {
|
|
51
|
+
right: 4px;
|
|
52
|
+
|
|
53
|
+
&:before {
|
|
54
|
+
content: '\f3d1';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.slick-dots {
|
|
60
|
+
z-index: 1;
|
|
61
|
+
height: auto;
|
|
62
|
+
bottom: 4px;
|
|
63
|
+
|
|
64
|
+
li {
|
|
65
|
+
display: inline-block;
|
|
66
|
+
width: 24px;
|
|
67
|
+
height: 24px;
|
|
68
|
+
margin: 0;
|
|
69
|
+
|
|
70
|
+
button {
|
|
71
|
+
display: block;
|
|
72
|
+
padding: 8px;
|
|
73
|
+
width: 24px;
|
|
74
|
+
height: 24px;
|
|
75
|
+
|
|
76
|
+
&:before {
|
|
77
|
+
position: relative;
|
|
78
|
+
content: '';
|
|
79
|
+
display: block;
|
|
80
|
+
width: 8px;
|
|
81
|
+
height: 8px;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
background-color: #fff;
|
|
84
|
+
opacity: 1;
|
|
85
|
+
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);
|
|
86
|
+
transition: background-color 0.2s;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
&:before {
|
|
91
|
+
background-color: #0050ca;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.slick-active {
|
|
97
|
+
button {
|
|
98
|
+
&:before {
|
|
99
|
+
background-color: #ee220d;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
const ImageSlide = styled.img`
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 100%;
|
|
109
|
+
object-fit: cover;
|
|
110
|
+
object-position: center center;
|
|
111
|
+
`;
|
|
112
|
+
const ImageSlideWrapper = styled.div`
|
|
113
|
+
height: 193px;
|
|
114
|
+
position: relative;
|
|
115
|
+
`;
|
|
116
|
+
export {
|
|
117
|
+
ImageSlide,
|
|
118
|
+
ImageSlideWrapper,
|
|
119
|
+
WrapperSlider
|
|
120
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useEffect } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import { SnackbarContainer, SnackbarWrapper, IconWrapper, Message, CloseButton } from "./Snackbar.styles.js";
|
|
6
|
+
import SvgCrossIcon from "../../static/images/cross-icon.svg.js";
|
|
7
|
+
import SvgWarningFilled from "../../static/images/warning-filled.svg.js";
|
|
8
|
+
const InfoIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }),
|
|
10
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
11
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "8", r: "1", fill: "currentColor" })
|
|
12
|
+
] });
|
|
13
|
+
const ErrorIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }),
|
|
15
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "8", x2: "12", y2: "12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
16
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "16", r: "1", fill: "currentColor" })
|
|
17
|
+
] });
|
|
18
|
+
const SuccessIcon = () => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
19
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }),
|
|
20
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12L10.5 14.5L16 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
21
|
+
] });
|
|
22
|
+
const defaultIcons = {
|
|
23
|
+
info: /* @__PURE__ */ jsx(InfoIcon, {}),
|
|
24
|
+
error: /* @__PURE__ */ jsx(ErrorIcon, {}),
|
|
25
|
+
success: /* @__PURE__ */ jsx(SuccessIcon, {}),
|
|
26
|
+
warning: /* @__PURE__ */ jsx(SvgWarningFilled, {})
|
|
27
|
+
};
|
|
28
|
+
const SnackbarItem = ({ id, message, variant = "info", icon, onClick, onClose, duration = 5e3 }) => {
|
|
29
|
+
const [isExiting, setIsExiting] = useState(false);
|
|
30
|
+
const handleClose = useCallback(() => {
|
|
31
|
+
setIsExiting(true);
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
onClose(id);
|
|
34
|
+
}, 300);
|
|
35
|
+
}, [id, onClose]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (duration === "permanent" || duration === 0) return;
|
|
38
|
+
const timer = setTimeout(() => {
|
|
39
|
+
handleClose();
|
|
40
|
+
}, duration);
|
|
41
|
+
return () => clearTimeout(timer);
|
|
42
|
+
}, [duration, handleClose]);
|
|
43
|
+
const handleClick = () => {
|
|
44
|
+
if (onClick) {
|
|
45
|
+
onClick();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const displayIcon = icon !== void 0 ? icon : defaultIcons[variant];
|
|
49
|
+
const isPermanent = duration === "permanent" || duration === 0;
|
|
50
|
+
return /* @__PURE__ */ jsxs(
|
|
51
|
+
SnackbarWrapper,
|
|
52
|
+
{
|
|
53
|
+
$variant: variant,
|
|
54
|
+
$isExiting: isExiting,
|
|
55
|
+
$hasClick: !!onClick,
|
|
56
|
+
$duration: duration,
|
|
57
|
+
$isPermanent: isPermanent,
|
|
58
|
+
onClick: onClick ? handleClick : void 0,
|
|
59
|
+
children: [
|
|
60
|
+
displayIcon && /* @__PURE__ */ jsx(IconWrapper, { $variant: variant, children: displayIcon }),
|
|
61
|
+
/* @__PURE__ */ jsx(Message, { children: message }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
CloseButton,
|
|
64
|
+
{
|
|
65
|
+
onClick: (e) => {
|
|
66
|
+
e.stopPropagation();
|
|
67
|
+
handleClose();
|
|
68
|
+
},
|
|
69
|
+
"aria-label": "Close",
|
|
70
|
+
children: /* @__PURE__ */ jsx(SvgCrossIcon, {})
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
SnackbarItem.propTypes = {
|
|
78
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
79
|
+
message: PropTypes.node.isRequired,
|
|
80
|
+
variant: PropTypes.oneOf(["info", "error", "success", "warning"]),
|
|
81
|
+
icon: PropTypes.node,
|
|
82
|
+
onClick: PropTypes.func,
|
|
83
|
+
onClose: PropTypes.func.isRequired,
|
|
84
|
+
duration: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(["permanent"])])
|
|
85
|
+
};
|
|
86
|
+
const Snackbar = ({ snackbars = [], onClose, position = "top-right", container = null }) => {
|
|
87
|
+
if (snackbars.length === 0) return null;
|
|
88
|
+
const content = /* @__PURE__ */ jsx(SnackbarContainer, { $position: position, $isContained: !!container, children: snackbars.map((snackbar) => /* @__PURE__ */ jsx(SnackbarItem, { ...snackbar, onClose }, snackbar.id)) });
|
|
89
|
+
if (container) {
|
|
90
|
+
return createPortal(content, container);
|
|
91
|
+
}
|
|
92
|
+
return createPortal(content, document.body);
|
|
93
|
+
};
|
|
94
|
+
Snackbar.propTypes = {
|
|
95
|
+
snackbars: PropTypes.arrayOf(
|
|
96
|
+
PropTypes.shape({
|
|
97
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
98
|
+
message: PropTypes.node.isRequired,
|
|
99
|
+
variant: PropTypes.oneOf(["info", "error", "success", "warning"]),
|
|
100
|
+
icon: PropTypes.node,
|
|
101
|
+
onClick: PropTypes.func,
|
|
102
|
+
duration: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(["permanent"])])
|
|
103
|
+
})
|
|
104
|
+
),
|
|
105
|
+
onClose: PropTypes.func.isRequired,
|
|
106
|
+
position: PropTypes.oneOf(["top-right", "top-left", "top-center", "bottom-right", "bottom-left", "bottom-center"]),
|
|
107
|
+
container: PropTypes.instanceOf(Element)
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
Snackbar
|
|
111
|
+
};
|