@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,230 @@
|
|
|
1
|
+
import styled, { keyframes, css } from "styled-components";
|
|
2
|
+
import { colors } from "../../styles/colors.js";
|
|
3
|
+
const slideIn = keyframes`
|
|
4
|
+
from {
|
|
5
|
+
opacity: 0;
|
|
6
|
+
transform: translateX(100%);
|
|
7
|
+
}
|
|
8
|
+
to {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
transform: translateX(0);
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
const slideOut = keyframes`
|
|
14
|
+
from {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: translateX(0);
|
|
17
|
+
}
|
|
18
|
+
to {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transform: translateX(100%);
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const slideInLeft = keyframes`
|
|
24
|
+
from {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transform: translateX(-100%);
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
transform: translateX(0);
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
const slideInUp = keyframes`
|
|
34
|
+
from {
|
|
35
|
+
opacity: 0;
|
|
36
|
+
transform: translateY(100%);
|
|
37
|
+
}
|
|
38
|
+
to {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
transform: translateY(0);
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
const slideInDown = keyframes`
|
|
44
|
+
from {
|
|
45
|
+
opacity: 0;
|
|
46
|
+
transform: translateY(-100%);
|
|
47
|
+
}
|
|
48
|
+
to {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
transform: translateY(0);
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
const progressExpire = keyframes`
|
|
54
|
+
from {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
to {
|
|
58
|
+
width: 0%;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const variantStyles = {
|
|
62
|
+
info: {
|
|
63
|
+
borderColor: colors.blue,
|
|
64
|
+
iconColor: colors.blue
|
|
65
|
+
},
|
|
66
|
+
error: {
|
|
67
|
+
borderColor: colors.orangishRed,
|
|
68
|
+
iconColor: colors.orangishRed
|
|
69
|
+
},
|
|
70
|
+
success: {
|
|
71
|
+
borderColor: colors.progressAccentStart,
|
|
72
|
+
iconColor: colors.progressAccentStart
|
|
73
|
+
},
|
|
74
|
+
warning: {
|
|
75
|
+
borderColor: colors.warningOrange,
|
|
76
|
+
iconColor: colors.warningOrange
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const positionStyles = {
|
|
80
|
+
"top-right": css`
|
|
81
|
+
top: 20px;
|
|
82
|
+
right: 20px;
|
|
83
|
+
animation: ${slideIn} 0.3s ease-out forwards;
|
|
84
|
+
`,
|
|
85
|
+
"top-left": css`
|
|
86
|
+
top: 20px;
|
|
87
|
+
left: 20px;
|
|
88
|
+
animation: ${slideInLeft} 0.3s ease-out forwards;
|
|
89
|
+
`,
|
|
90
|
+
"top-center": css`
|
|
91
|
+
top: 20px;
|
|
92
|
+
left: 50%;
|
|
93
|
+
transform: translateX(-50%);
|
|
94
|
+
animation: ${slideInDown} 0.3s ease-out forwards;
|
|
95
|
+
`,
|
|
96
|
+
"bottom-right": css`
|
|
97
|
+
bottom: 20px;
|
|
98
|
+
right: 20px;
|
|
99
|
+
animation: ${slideIn} 0.3s ease-out forwards;
|
|
100
|
+
`,
|
|
101
|
+
"bottom-left": css`
|
|
102
|
+
bottom: 20px;
|
|
103
|
+
left: 20px;
|
|
104
|
+
animation: ${slideInLeft} 0.3s ease-out forwards;
|
|
105
|
+
`,
|
|
106
|
+
"bottom-center": css`
|
|
107
|
+
bottom: 20px;
|
|
108
|
+
left: 50%;
|
|
109
|
+
transform: translateX(-50%);
|
|
110
|
+
animation: ${slideInUp} 0.3s ease-out forwards;
|
|
111
|
+
`
|
|
112
|
+
};
|
|
113
|
+
const SnackbarContainer = styled.div.withConfig({
|
|
114
|
+
shouldForwardProp: (props) => !["$isContained", "$position"].includes(props)
|
|
115
|
+
})`
|
|
116
|
+
position: ${({ $isContained }) => $isContained ? "absolute" : "fixed"};
|
|
117
|
+
z-index: 1100;
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
gap: 10px;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
|
|
123
|
+
${({ $position }) => positionStyles[$position] || positionStyles["top-right"]}
|
|
124
|
+
`;
|
|
125
|
+
const SnackbarWrapper = styled.div.withConfig({
|
|
126
|
+
shouldForwardProp: (props) => !["$variant", "$isExiting", "$duration", "$isPermanent", "$hasClick"].includes(props)
|
|
127
|
+
})`
|
|
128
|
+
position: relative;
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 12px;
|
|
132
|
+
min-width: 320px;
|
|
133
|
+
max-width: 480px;
|
|
134
|
+
padding: 12px 16px;
|
|
135
|
+
background-color: ${colors.white};
|
|
136
|
+
box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.12);
|
|
137
|
+
border-radius: 6px;
|
|
138
|
+
border: 1px solid ${colors.grey};
|
|
139
|
+
//border-bottom: 3px solid ${colors.grey};
|
|
140
|
+
pointer-events: auto;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
animation: ${({ $isExiting }) => $isExiting ? slideOut : "none"} 0.3s ease-out forwards;
|
|
143
|
+
|
|
144
|
+
/* Progress bar that expires with duration */
|
|
145
|
+
&::after {
|
|
146
|
+
content: '';
|
|
147
|
+
position: absolute;
|
|
148
|
+
bottom: 0;
|
|
149
|
+
left: 0;
|
|
150
|
+
height: 3px;
|
|
151
|
+
background-color: ${({ $variant }) => variantStyles[$variant]?.borderColor || colors.blue};
|
|
152
|
+
border-radius: 0 0 0 6px;
|
|
153
|
+
${({ $duration, $isPermanent }) => $isPermanent ? css`
|
|
154
|
+
width: 100%;
|
|
155
|
+
` : css`
|
|
156
|
+
animation: ${progressExpire} ${$duration}ms linear forwards;
|
|
157
|
+
`}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
${({ $hasClick }) => $hasClick && css`
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
|
|
163
|
+
&:hover {
|
|
164
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
|
|
165
|
+
}
|
|
166
|
+
`}
|
|
167
|
+
`;
|
|
168
|
+
const IconWrapper = styled.div.withConfig({
|
|
169
|
+
shouldForwardProp: (props) => !["$variant"].includes(props)
|
|
170
|
+
})`
|
|
171
|
+
flex-shrink: 0;
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
width: 20px;
|
|
176
|
+
height: 20px;
|
|
177
|
+
color: ${({ $variant }) => variantStyles[$variant]?.iconColor || colors.blue};
|
|
178
|
+
|
|
179
|
+
svg {
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
184
|
+
const Message = styled.div`
|
|
185
|
+
flex: 1;
|
|
186
|
+
font-size: 16px;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
line-height: 24px;
|
|
189
|
+
letter-spacing: 0.6px;
|
|
190
|
+
color: ${colors.black};
|
|
191
|
+
`;
|
|
192
|
+
const CloseButton = styled.button`
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
width: 24px;
|
|
198
|
+
height: 24px;
|
|
199
|
+
padding: 0;
|
|
200
|
+
background: transparent;
|
|
201
|
+
border: none;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
transition: opacity 0.2s ease;
|
|
204
|
+
|
|
205
|
+
&:hover {
|
|
206
|
+
opacity: 0.7;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
svg {
|
|
210
|
+
width: 12px;
|
|
211
|
+
height: 12px;
|
|
212
|
+
|
|
213
|
+
path {
|
|
214
|
+
stroke: ${colors.grey2};
|
|
215
|
+
stroke-width: 2;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:hover svg path {
|
|
220
|
+
stroke: ${colors.black};
|
|
221
|
+
}
|
|
222
|
+
`;
|
|
223
|
+
export {
|
|
224
|
+
CloseButton,
|
|
225
|
+
IconWrapper,
|
|
226
|
+
Message,
|
|
227
|
+
SnackbarContainer,
|
|
228
|
+
SnackbarWrapper,
|
|
229
|
+
variantStyles
|
|
230
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useState, useCallback, useMemo } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Snackbar } from "./Snackbar.js";
|
|
5
|
+
const SnackbarContext = createContext(null);
|
|
6
|
+
let snackbarId = 0;
|
|
7
|
+
const SnackbarProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
position = "top-right",
|
|
10
|
+
maxSnacks = 5,
|
|
11
|
+
defaultDuration = 5e3,
|
|
12
|
+
container = null
|
|
13
|
+
}) => {
|
|
14
|
+
const [snackbars, setSnackbars] = useState([]);
|
|
15
|
+
const closeSnackbar = useCallback((id) => {
|
|
16
|
+
setSnackbars((prev) => prev.filter((s) => s.id !== id));
|
|
17
|
+
}, []);
|
|
18
|
+
const showSnackbar = useCallback(
|
|
19
|
+
(options) => {
|
|
20
|
+
const id = options.id ?? ++snackbarId;
|
|
21
|
+
const newSnackbar = {
|
|
22
|
+
id,
|
|
23
|
+
message: options.message,
|
|
24
|
+
variant: options.variant || "info",
|
|
25
|
+
icon: options.icon,
|
|
26
|
+
onClick: options.onClick,
|
|
27
|
+
duration: options.duration ?? defaultDuration
|
|
28
|
+
};
|
|
29
|
+
setSnackbars((prev) => {
|
|
30
|
+
const updated = [...prev, newSnackbar];
|
|
31
|
+
if (updated.length > maxSnacks) {
|
|
32
|
+
return updated.slice(-maxSnacks);
|
|
33
|
+
}
|
|
34
|
+
return updated;
|
|
35
|
+
});
|
|
36
|
+
return id;
|
|
37
|
+
},
|
|
38
|
+
[maxSnacks, defaultDuration]
|
|
39
|
+
);
|
|
40
|
+
const clearAll = useCallback(() => {
|
|
41
|
+
setSnackbars([]);
|
|
42
|
+
}, []);
|
|
43
|
+
const contextValue = useMemo(
|
|
44
|
+
() => ({
|
|
45
|
+
showSnackbar,
|
|
46
|
+
closeSnackbar,
|
|
47
|
+
clearAll
|
|
48
|
+
}),
|
|
49
|
+
[showSnackbar, closeSnackbar, clearAll]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsxs(SnackbarContext.Provider, { value: contextValue, children: [
|
|
52
|
+
children,
|
|
53
|
+
/* @__PURE__ */ jsx(Snackbar, { snackbars, onClose: closeSnackbar, position, container })
|
|
54
|
+
] });
|
|
55
|
+
};
|
|
56
|
+
SnackbarProvider.propTypes = {
|
|
57
|
+
children: PropTypes.node.isRequired,
|
|
58
|
+
position: PropTypes.oneOf(["top-right", "top-left", "top-center", "bottom-right", "bottom-left", "bottom-center"]),
|
|
59
|
+
maxSnacks: PropTypes.number,
|
|
60
|
+
defaultDuration: PropTypes.number,
|
|
61
|
+
container: PropTypes.instanceOf(Element)
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
SnackbarContext,
|
|
65
|
+
SnackbarProvider
|
|
66
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { SnackbarContext } from "./SnackbarProvider.js";
|
|
3
|
+
const useSnackbar = () => {
|
|
4
|
+
const context = useContext(SnackbarContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error("useSnackbar must be used within a SnackbarProvider");
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useSnackbar
|
|
12
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const SpanButton = styled.span.withConfig({
|
|
3
|
+
shouldForwardProp: (props) => !["urlLink"].includes(props)
|
|
4
|
+
})`
|
|
5
|
+
color: #0050ca;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
|
|
9
|
+
${(props) => props.urlLink && `
|
|
10
|
+
text-decoration: underline;
|
|
11
|
+
`}
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
color: #202020;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export {
|
|
18
|
+
SpanButton
|
|
19
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
const StatusBadge = styled.div`
|
|
4
|
+
display: inline-block;
|
|
5
|
+
vertical-align: top;
|
|
6
|
+
padding: 0px 16px;
|
|
7
|
+
background-color: ${() => theme.cBlack};
|
|
8
|
+
color: ${() => theme.cWhite};
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: 8px;
|
|
11
|
+
letter-spacing: 1.78px;
|
|
12
|
+
line-height: 16px;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
margin-left: 12px;
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
StatusBadge
|
|
18
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { InfoIcon } from "../InfoIcon/InfoIcon.js";
|
|
4
|
+
import { Icon, iconsMap } from "../Icon/Icon.style.js";
|
|
5
|
+
import SvgTransferIcon from "../../static/images/transfer-icon.svg.js";
|
|
6
|
+
import SvgCheckmarkCircleIcon from "../../static/images/checkmark-circle-icon.svg.js";
|
|
7
|
+
import SvgCloseCircleIcon from "../../static/images/close-circle-icon.svg.js";
|
|
8
|
+
import SvgAddFolderIcon from "../../static/images/add-folder-icon.svg.js";
|
|
9
|
+
import { colors } from "../../styles/colors.js";
|
|
10
|
+
import { StatusTagContainer, StatusTagWrapper, IconWrapper, StatusText } from "./StatusTag.styles.js";
|
|
11
|
+
const variantConfig = {
|
|
12
|
+
pending: {
|
|
13
|
+
icon: /* @__PURE__ */ jsx(SvgAddFolderIcon, { width: 12, height: 12 }),
|
|
14
|
+
iconColor: "#021128",
|
|
15
|
+
hoverColor: "#021128",
|
|
16
|
+
disableHoverColor: true,
|
|
17
|
+
useStroke: true
|
|
18
|
+
},
|
|
19
|
+
initiated: {
|
|
20
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: iconsMap.inProgress, size: 11 }),
|
|
21
|
+
iconColor: "#032F78",
|
|
22
|
+
hoverColor: "#032F78",
|
|
23
|
+
disableHoverColor: false
|
|
24
|
+
},
|
|
25
|
+
confirmed: {
|
|
26
|
+
icon: /* @__PURE__ */ jsx(SvgCheckmarkCircleIcon, { width: 12, height: 12 }),
|
|
27
|
+
iconColor: colors.grey2,
|
|
28
|
+
hoverColor: colors.blue,
|
|
29
|
+
disableHoverColor: false
|
|
30
|
+
},
|
|
31
|
+
declined: {
|
|
32
|
+
icon: /* @__PURE__ */ jsx(SvgCloseCircleIcon, { width: 12, height: 12 }),
|
|
33
|
+
iconColor: colors.darkRed,
|
|
34
|
+
hoverColor: colors.darkRed,
|
|
35
|
+
disableHoverColor: false,
|
|
36
|
+
useStroke: true
|
|
37
|
+
},
|
|
38
|
+
paid: {
|
|
39
|
+
icon: /* @__PURE__ */ jsx(SvgTransferIcon, { width: 14, height: 14 }),
|
|
40
|
+
iconColor: "#3D9626",
|
|
41
|
+
hoverColor: "#3D9626",
|
|
42
|
+
disableHoverColor: false
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const StatusTag = ({
|
|
46
|
+
variant,
|
|
47
|
+
icon,
|
|
48
|
+
text,
|
|
49
|
+
tooltip,
|
|
50
|
+
tooltipProps,
|
|
51
|
+
iconColor,
|
|
52
|
+
hoverColor,
|
|
53
|
+
disableHoverColor,
|
|
54
|
+
colorActive,
|
|
55
|
+
minWidth,
|
|
56
|
+
className,
|
|
57
|
+
containerStyle,
|
|
58
|
+
iconStyle,
|
|
59
|
+
textStyle,
|
|
60
|
+
onClick,
|
|
61
|
+
center,
|
|
62
|
+
...props
|
|
63
|
+
}) => {
|
|
64
|
+
const variantData = variant ? variantConfig[variant] : null;
|
|
65
|
+
const finalIconColor = iconColor !== void 0 ? iconColor : variantData?.iconColor || colors.grey2;
|
|
66
|
+
const finalHoverColor = hoverColor !== void 0 ? hoverColor : variantData?.hoverColor;
|
|
67
|
+
const finalDisableHoverColor = disableHoverColor !== void 0 ? disableHoverColor : variantData?.disableHoverColor ?? false;
|
|
68
|
+
let finalIcon = null;
|
|
69
|
+
if (icon) {
|
|
70
|
+
finalIcon = icon;
|
|
71
|
+
} else if (variantData?.icon) {
|
|
72
|
+
finalIcon = variantData.icon;
|
|
73
|
+
}
|
|
74
|
+
const content = /* @__PURE__ */ jsx(StatusTagContainer, { className, style: containerStyle, onClick, hasClick: !!onClick, ...props, children: /* @__PURE__ */ jsxs(StatusTagWrapper, { minWidth, center, children: [
|
|
75
|
+
finalIcon && /* @__PURE__ */ jsx(
|
|
76
|
+
IconWrapper,
|
|
77
|
+
{
|
|
78
|
+
iconColor: finalIconColor,
|
|
79
|
+
hoverColor: finalHoverColor,
|
|
80
|
+
disableHoverColor: finalDisableHoverColor,
|
|
81
|
+
colorActive,
|
|
82
|
+
useStroke: variantData?.useStroke,
|
|
83
|
+
style: iconStyle,
|
|
84
|
+
children: finalIcon
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
text && /* @__PURE__ */ jsx(
|
|
88
|
+
StatusText,
|
|
89
|
+
{
|
|
90
|
+
style: textStyle,
|
|
91
|
+
hoverColor: finalHoverColor,
|
|
92
|
+
disableHoverColor: finalDisableHoverColor,
|
|
93
|
+
colorActive,
|
|
94
|
+
children: text
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] }) });
|
|
98
|
+
if (tooltip) {
|
|
99
|
+
return /* @__PURE__ */ jsx(InfoIcon, { title: tooltip, position: "top", noIcon: true, noMarginLeft: true, noMarginRight: true, ...tooltipProps, children: content });
|
|
100
|
+
}
|
|
101
|
+
return content;
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
StatusTag
|
|
105
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { colors } from "../../styles/colors.js";
|
|
3
|
+
const StatusTagContainer = styled.div.withConfig({
|
|
4
|
+
shouldForwardProp: (props) => !["hasClick"].includes(props)
|
|
5
|
+
})`
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
cursor: ${(props) => props.hasClick ? "pointer" : "default"};
|
|
8
|
+
transition: opacity 0.2s ease;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
opacity: ${(props) => props.hasClick ? 0.8 : 1};
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
const StatusTagWrapper = styled.div.withConfig({
|
|
15
|
+
shouldForwardProp: (props) => !["minWidth", "center"].includes(props)
|
|
16
|
+
})`
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 6px;
|
|
20
|
+
padding: 5px 8px;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
border: 1px solid ${colors.lightGrey};
|
|
23
|
+
border-radius: 6px;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
min-width: ${(props) => props.minWidth || "auto"};
|
|
26
|
+
justify-content: ${(props) => props.center ? "center" : "flex-start"};
|
|
27
|
+
`;
|
|
28
|
+
const IconWrapper = styled.div.withConfig({
|
|
29
|
+
shouldForwardProp: (props) => !["colorActive", "hoverColor", "iconColor", "useStroke", "disableHoverColor"].includes(props)
|
|
30
|
+
})`
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
width: 12px;
|
|
36
|
+
height: 12px;
|
|
37
|
+
color: ${(props) => props.colorActive && props.hoverColor ? props.hoverColor : props.iconColor || colors.grey2};
|
|
38
|
+
transition: color 0.2s ease;
|
|
39
|
+
|
|
40
|
+
svg {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Apply color to SVG - use stroke for stroke-based icons, fill for others */
|
|
47
|
+
svg path,
|
|
48
|
+
svg circle,
|
|
49
|
+
svg rect,
|
|
50
|
+
svg line {
|
|
51
|
+
${(props) => props.useStroke ? `
|
|
52
|
+
stroke: currentColor;
|
|
53
|
+
fill: none;
|
|
54
|
+
` : `
|
|
55
|
+
fill: currentColor;
|
|
56
|
+
`}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Hover color change - only if not disabled and not already active */
|
|
60
|
+
${(props) => !props.disableHoverColor && !props.colorActive && props.hoverColor && `
|
|
61
|
+
${StatusTagContainer}:hover & {
|
|
62
|
+
color: ${props.hoverColor};
|
|
63
|
+
}
|
|
64
|
+
`}
|
|
65
|
+
`;
|
|
66
|
+
const StatusText = styled.span.withConfig({
|
|
67
|
+
shouldForwardProp: (props) => !["colorActive", "hoverColor", "disableHoverColor"].includes(props)
|
|
68
|
+
})`
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
line-height: 18px;
|
|
72
|
+
color: ${(props) => props.colorActive && props.hoverColor ? props.hoverColor : colors.black};
|
|
73
|
+
letter-spacing: 0.6px;
|
|
74
|
+
transition: color 0.2s ease;
|
|
75
|
+
|
|
76
|
+
/* Hover color change - only if not disabled and not already active */
|
|
77
|
+
${(props) => !props.disableHoverColor && !props.colorActive && props.hoverColor && `
|
|
78
|
+
${StatusTagContainer}:hover & {
|
|
79
|
+
color: ${props.hoverColor};
|
|
80
|
+
}
|
|
81
|
+
`}
|
|
82
|
+
`;
|
|
83
|
+
export {
|
|
84
|
+
IconWrapper,
|
|
85
|
+
StatusTagContainer,
|
|
86
|
+
StatusTagWrapper,
|
|
87
|
+
StatusText
|
|
88
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default, { PureComponent, Fragment } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Transition } from "../../utils/transition.js";
|
|
5
|
+
import { StepsProgressContainer, StepContainer } from "./StepController.styles.js";
|
|
6
|
+
import stdin_default$1 from "./StepControllerProgress.js";
|
|
7
|
+
const timeout = 300;
|
|
8
|
+
const getTransitionStyles = {
|
|
9
|
+
entering: {
|
|
10
|
+
position: "absolute",
|
|
11
|
+
opacity: 0
|
|
12
|
+
},
|
|
13
|
+
entered: {
|
|
14
|
+
transition: `opacity ${timeout}ms ease-in-out`,
|
|
15
|
+
opacity: 1
|
|
16
|
+
},
|
|
17
|
+
exiting: {
|
|
18
|
+
transition: `opacity ${timeout}ms ease-in-out`,
|
|
19
|
+
opacity: 0
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
class StepController extends PureComponent {
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
this.stepRef = React__default.createRef();
|
|
26
|
+
}
|
|
27
|
+
componentDidMount() {
|
|
28
|
+
const { changeStep, stepsProgressList } = this.props;
|
|
29
|
+
changeStep(stepsProgressList[0].id);
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
const { children, stepsProgressList, currentStep, activeStepIndex, doneStepsIndexes, touchedStepsIndexes } = this.props;
|
|
33
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
|
+
/* @__PURE__ */ jsx(StepsProgressContainer, { children: /* @__PURE__ */ jsx(
|
|
35
|
+
stdin_default$1,
|
|
36
|
+
{
|
|
37
|
+
activeStepIndex,
|
|
38
|
+
doneStepsIndexes,
|
|
39
|
+
touchedStepsIndexes,
|
|
40
|
+
stepsProgressList
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
/* @__PURE__ */ jsx(StepContainer, { children: /* @__PURE__ */ jsx(
|
|
44
|
+
Transition,
|
|
45
|
+
{
|
|
46
|
+
timeout: {
|
|
47
|
+
enter: timeout,
|
|
48
|
+
exit: timeout
|
|
49
|
+
},
|
|
50
|
+
nodeRef: this.stepRef,
|
|
51
|
+
children: (status) => /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: this.stepRef,
|
|
55
|
+
style: {
|
|
56
|
+
height: "100%",
|
|
57
|
+
...getTransitionStyles[status]
|
|
58
|
+
},
|
|
59
|
+
children: React__default.Children.map(children, (child) => {
|
|
60
|
+
if (child.props.id === currentStep && React__default.isValidElement(child)) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Fragment, { children: child }, child.props.id);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
},
|
|
68
|
+
currentStep
|
|
69
|
+
) })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
StepController.propTypes = {
|
|
74
|
+
children: PropTypes.node.isRequired,
|
|
75
|
+
stepsProgressList: PropTypes.instanceOf(Array).isRequired,
|
|
76
|
+
currentStep: PropTypes.string.isRequired,
|
|
77
|
+
activeStepIndex: PropTypes.number.isRequired,
|
|
78
|
+
touchedStepsIndexes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
79
|
+
doneStepsIndexes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
80
|
+
changeStep: PropTypes.func.isRequired
|
|
81
|
+
};
|
|
82
|
+
var stdin_default = StepController;
|
|
83
|
+
export {
|
|
84
|
+
StepController,
|
|
85
|
+
stdin_default as default
|
|
86
|
+
};
|
|
@@ -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 StepsProgressContainer = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 40px;
|
|
8
|
+
padding: 4px 0;
|
|
9
|
+
box-shadow: 0 1px 0 0 ${() => theme.cLightGrey};
|
|
10
|
+
|
|
11
|
+
${rwd.Medium`
|
|
12
|
+
height: 56px;
|
|
13
|
+
padding: 12px 0;
|
|
14
|
+
`}
|
|
15
|
+
`;
|
|
16
|
+
const StepContainer = styled.div.withConfig({
|
|
17
|
+
shouldForwardProp: (props) => !["heightLimited"].includes(props)
|
|
18
|
+
})`
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
${rwd.Medium`
|
|
25
|
+
${(props) => props.heightLimited && `
|
|
26
|
+
height: 80vh;
|
|
27
|
+
`}
|
|
28
|
+
`}
|
|
29
|
+
`;
|
|
30
|
+
export {
|
|
31
|
+
StepContainer,
|
|
32
|
+
StepsProgressContainer
|
|
33
|
+
};
|