@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,50 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Container } from "./Number.styles.js";
|
|
5
|
+
import SvgNumberOne from "../../static/images/numbers/number_one.svg.js";
|
|
6
|
+
import SvgNumberTwo from "../../static/images/numbers/number_two.svg.js";
|
|
7
|
+
import SvgNumberThree from "../../static/images/numbers/number_three.svg.js";
|
|
8
|
+
import SvgNumberFour from "../../static/images/numbers/number_four.svg.js";
|
|
9
|
+
import SvgNumberFive from "../../static/images/numbers/number_five.svg.js";
|
|
10
|
+
import SvgNumberSix from "../../static/images/numbers/number_six.svg.js";
|
|
11
|
+
import SvgNumberSeven from "../../static/images/numbers/number_seven.svg.js";
|
|
12
|
+
import SvgNumberEight from "../../static/images/numbers/number_eight.svg.js";
|
|
13
|
+
import SvgNumberNine from "../../static/images/numbers/number_nine.svg.js";
|
|
14
|
+
import SvgNumberZero from "../../static/images/numbers/number_zero.svg.js";
|
|
15
|
+
const getIcon = (number) => {
|
|
16
|
+
switch (number) {
|
|
17
|
+
case 1:
|
|
18
|
+
return /* @__PURE__ */ jsx(SvgNumberOne, {});
|
|
19
|
+
case 2:
|
|
20
|
+
return /* @__PURE__ */ jsx(SvgNumberTwo, {});
|
|
21
|
+
case 3:
|
|
22
|
+
return /* @__PURE__ */ jsx(SvgNumberThree, {});
|
|
23
|
+
case 4:
|
|
24
|
+
return /* @__PURE__ */ jsx(SvgNumberFour, {});
|
|
25
|
+
case 5:
|
|
26
|
+
return /* @__PURE__ */ jsx(SvgNumberFive, {});
|
|
27
|
+
case 6:
|
|
28
|
+
return /* @__PURE__ */ jsx(SvgNumberSix, {});
|
|
29
|
+
case 7:
|
|
30
|
+
return /* @__PURE__ */ jsx(SvgNumberSeven, {});
|
|
31
|
+
case 8:
|
|
32
|
+
return /* @__PURE__ */ jsx(SvgNumberEight, {});
|
|
33
|
+
case 9:
|
|
34
|
+
return /* @__PURE__ */ jsx(SvgNumberNine, {});
|
|
35
|
+
case 0:
|
|
36
|
+
return /* @__PURE__ */ jsx(SvgNumberZero, {});
|
|
37
|
+
default:
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const Number = ({ number, containerStyle }) => /* @__PURE__ */ jsx("div", { style: containerStyle, children: getIcon(number) });
|
|
42
|
+
const NumberWithContainer = ({ number, containerStyle }) => /* @__PURE__ */ jsx(Container, { style: containerStyle, children: getIcon(number) });
|
|
43
|
+
Number.propTypes = {
|
|
44
|
+
number: PropTypes.number.isRequired,
|
|
45
|
+
containerStyle: PropTypes.object
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Number,
|
|
49
|
+
NumberWithContainer
|
|
50
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
const Container = styled.div`
|
|
4
|
+
display: inline-block;
|
|
5
|
+
vertical-align: top;
|
|
6
|
+
width: 24px;
|
|
7
|
+
height: 24px;
|
|
8
|
+
padding: 4px;
|
|
9
|
+
background-color: ${() => theme.cWarning};
|
|
10
|
+
font-size: 0;
|
|
11
|
+
text-align: center;
|
|
12
|
+
margin-right: 12px;
|
|
13
|
+
|
|
14
|
+
& > svg {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
height: 16px;
|
|
17
|
+
width: auto;
|
|
18
|
+
fill: ${() => theme.cWhite};
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export {
|
|
22
|
+
Container
|
|
23
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { TransitionGroup, Transition } from "../../utils/transition.js";
|
|
5
|
+
const timeout = 300;
|
|
6
|
+
const getTransitionStyles = {
|
|
7
|
+
entering: {
|
|
8
|
+
position: "absolute",
|
|
9
|
+
opacity: 0
|
|
10
|
+
},
|
|
11
|
+
entered: {
|
|
12
|
+
transition: `opacity ${timeout}ms ease-in-out`,
|
|
13
|
+
opacity: 1
|
|
14
|
+
},
|
|
15
|
+
exiting: {
|
|
16
|
+
transition: `opacity ${timeout}ms ease-in-out`,
|
|
17
|
+
opacity: 0
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const PageTransition = (props) => {
|
|
21
|
+
const { children, location } = props;
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
+
/* @__PURE__ */ jsx(TransitionGroup, { children: /* @__PURE__ */ jsx(
|
|
24
|
+
Transition,
|
|
25
|
+
{
|
|
26
|
+
timeout: {
|
|
27
|
+
enter: timeout,
|
|
28
|
+
exit: timeout
|
|
29
|
+
},
|
|
30
|
+
children: (status) => /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
style: {
|
|
34
|
+
...getTransitionStyles[status]
|
|
35
|
+
},
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
location.pathname
|
|
41
|
+
) }),
|
|
42
|
+
/* @__PURE__ */ jsx("div", { id: "modalPortal" })
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
45
|
+
PageTransition.propTypes = {
|
|
46
|
+
children: PropTypes.node.isRequired,
|
|
47
|
+
location: PropTypes.instanceOf(Object).isRequired
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
PageTransition
|
|
51
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { usePagination, DOTS } from "./usePagination.js";
|
|
4
|
+
import { StyledList } from "./Pagination.styles.js";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import { Icon, iconsMap } from "../Icon/Icon.style.js";
|
|
7
|
+
const Pagination = (props) => {
|
|
8
|
+
const { onPageChange, totalCount, siblingCount = 1, currentPage, pageSize = 10 } = props;
|
|
9
|
+
const paginationRange = usePagination({
|
|
10
|
+
currentPage,
|
|
11
|
+
totalCount,
|
|
12
|
+
siblingCount,
|
|
13
|
+
pageSize
|
|
14
|
+
});
|
|
15
|
+
if (currentPage === 0) {
|
|
16
|
+
onPageChange(1);
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const onNext = () => {
|
|
20
|
+
onPageChange(currentPage + 1);
|
|
21
|
+
};
|
|
22
|
+
const onPrevious = () => {
|
|
23
|
+
onPageChange(currentPage - 1);
|
|
24
|
+
};
|
|
25
|
+
const displayRange = paginationRange.length < 2 ? [1] : paginationRange;
|
|
26
|
+
let lastPage = displayRange[displayRange.length - 1];
|
|
27
|
+
return /* @__PURE__ */ jsxs(StyledList, { listStyle: props.listStyle, children: [
|
|
28
|
+
/* @__PURE__ */ jsx(StyledList.Item, { disabled: currentPage === 1 || displayRange.length === 1, onClick: onPrevious, arrow: true, children: /* @__PURE__ */ jsx(Icon, { icon: iconsMap.arrowLeft }) }),
|
|
29
|
+
displayRange.map((pageNumber) => {
|
|
30
|
+
if (pageNumber === DOTS) {
|
|
31
|
+
return /* @__PURE__ */ jsx(StyledList.Item, { dots: true, children: "…" }, pageNumber);
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
StyledList.Item,
|
|
35
|
+
{
|
|
36
|
+
selected: pageNumber === currentPage,
|
|
37
|
+
onClick: () => onPageChange(pageNumber),
|
|
38
|
+
disabled: displayRange.length === 1,
|
|
39
|
+
children: pageNumber
|
|
40
|
+
},
|
|
41
|
+
pageNumber
|
|
42
|
+
);
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx(StyledList.Item, { disabled: currentPage === lastPage || displayRange.length === 1, onClick: onNext, arrow: true, children: /* @__PURE__ */ jsx(Icon, { icon: iconsMap.arrowRight }) })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
Pagination.propTypes = {
|
|
48
|
+
onPageChange: PropTypes.func.isRequired,
|
|
49
|
+
totalCount: PropTypes.number.isRequired,
|
|
50
|
+
currentPage: PropTypes.number.isRequired,
|
|
51
|
+
siblingCount: PropTypes.number,
|
|
52
|
+
pageSize: PropTypes.number
|
|
53
|
+
};
|
|
54
|
+
var stdin_default = Pagination;
|
|
55
|
+
export {
|
|
56
|
+
Pagination,
|
|
57
|
+
stdin_default as default
|
|
58
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
const StyledList = styled.ul.withConfig({
|
|
4
|
+
shouldForwardProp: (props) => !["listStyle"].includes(props)
|
|
5
|
+
})`
|
|
6
|
+
display: flex;
|
|
7
|
+
list-style-type: none;
|
|
8
|
+
padding: 0;
|
|
9
|
+
${({ listStyle }) => listStyle}
|
|
10
|
+
`;
|
|
11
|
+
const ListItem = styled.li.withConfig({
|
|
12
|
+
shouldForwardProp: (props) => !["arrow", "selected", "disabled", "dots"].includes(props)
|
|
13
|
+
})`
|
|
14
|
+
padding: 0 12px;
|
|
15
|
+
height: 32px;
|
|
16
|
+
text-align: center;
|
|
17
|
+
margin: auto 4px;
|
|
18
|
+
color: ${theme.cBlack};
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
letter-spacing: 0.01071em;
|
|
22
|
+
border-radius: 16px;
|
|
23
|
+
line-height: 1.43;
|
|
24
|
+
font-size: 15px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
min-width: 32px;
|
|
27
|
+
|
|
28
|
+
${(props) => props.arrow && `
|
|
29
|
+
padding:0 9px;
|
|
30
|
+
`}
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background-color: ${theme.cPrimary};
|
|
34
|
+
color: ${theme.cWhite};
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
${(props) => props.selected && `
|
|
39
|
+
color: ${theme.cWhite};
|
|
40
|
+
background-color: ${theme.cPrimary};
|
|
41
|
+
`}
|
|
42
|
+
|
|
43
|
+
${(props) => props.disabled && `
|
|
44
|
+
pointer-events:none;
|
|
45
|
+
opacity: 0.6;
|
|
46
|
+
`}
|
|
47
|
+
|
|
48
|
+
${(props) => props.dots && `
|
|
49
|
+
&:hover{
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
cursor: default;
|
|
52
|
+
color:${theme.cBlack}
|
|
53
|
+
}
|
|
54
|
+
`}
|
|
55
|
+
`;
|
|
56
|
+
StyledList.Item = ListItem;
|
|
57
|
+
export {
|
|
58
|
+
StyledList
|
|
59
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
5
|
+
import stdin_default$1 from "./Pagination.js";
|
|
6
|
+
import { Card, CardTitle } from "../Card/Card.styles.js";
|
|
7
|
+
import stdin_default$2 from "../Input/InputWithButton.js";
|
|
8
|
+
import { Button } from "../Button/Button.styles.js";
|
|
9
|
+
const PaginationControls = ({
|
|
10
|
+
currentPage,
|
|
11
|
+
totalCount,
|
|
12
|
+
pageSize,
|
|
13
|
+
onPageChange,
|
|
14
|
+
inputPageSize,
|
|
15
|
+
setInputPageSize,
|
|
16
|
+
setPageSize,
|
|
17
|
+
scrollRef,
|
|
18
|
+
scrollOffset = -100,
|
|
19
|
+
containerStyle,
|
|
20
|
+
showPageSizeControl = true,
|
|
21
|
+
pageSizeLabel = "Page Size:",
|
|
22
|
+
applyButtonText = "apply",
|
|
23
|
+
listStyle
|
|
24
|
+
}) => {
|
|
25
|
+
const handlePageChange = (page) => {
|
|
26
|
+
onPageChange(page);
|
|
27
|
+
if (scrollRef?.current) {
|
|
28
|
+
const yOffset = scrollOffset;
|
|
29
|
+
const element = scrollRef.current;
|
|
30
|
+
const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset;
|
|
31
|
+
window.scrollTo({ top: y, behavior: "smooth" });
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const isValidPageSize = Number(inputPageSize) > 0;
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
ComponentWrapper,
|
|
37
|
+
{
|
|
38
|
+
noPaddingHorizontal: true,
|
|
39
|
+
flex: true,
|
|
40
|
+
style: {
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
flexWrap: "wrap",
|
|
43
|
+
...containerStyle
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
stdin_default$1,
|
|
48
|
+
{
|
|
49
|
+
currentPage,
|
|
50
|
+
totalCount,
|
|
51
|
+
pageSize,
|
|
52
|
+
onPageChange: handlePageChange,
|
|
53
|
+
listStyle
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
showPageSizeControl && /* @__PURE__ */ jsxs(Card, { noPadding: true, children: [
|
|
57
|
+
/* @__PURE__ */ jsx(CardTitle, { style: { padding: "2px 20px" }, children: pageSizeLabel }),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
stdin_default$2,
|
|
60
|
+
{
|
|
61
|
+
id: "pageSize",
|
|
62
|
+
name: "pageSize",
|
|
63
|
+
value: inputPageSize?.toString(),
|
|
64
|
+
type: "number",
|
|
65
|
+
placeholder: "Page size",
|
|
66
|
+
onChange: (e) => {
|
|
67
|
+
const value = e.target.value === "" ? "" : Math.min(totalCount, Math.max(0, Number(e.target.value)));
|
|
68
|
+
setInputPageSize(value);
|
|
69
|
+
},
|
|
70
|
+
children: /* @__PURE__ */ jsx(
|
|
71
|
+
Button,
|
|
72
|
+
{
|
|
73
|
+
onClick: () => {
|
|
74
|
+
const newPageSize = Math.max(1, Number(inputPageSize) || 1);
|
|
75
|
+
setPageSize(newPageSize);
|
|
76
|
+
const maxPage = Math.ceil(totalCount / newPageSize);
|
|
77
|
+
if (currentPage > maxPage && maxPage > 0) {
|
|
78
|
+
handlePageChange(maxPage);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
disabled: !isValidPageSize,
|
|
82
|
+
style: { opacity: 1 },
|
|
83
|
+
children: applyButtonText
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
PaginationControls.propTypes = {
|
|
94
|
+
currentPage: PropTypes.number.isRequired,
|
|
95
|
+
totalCount: PropTypes.number.isRequired,
|
|
96
|
+
pageSize: PropTypes.number.isRequired,
|
|
97
|
+
onPageChange: PropTypes.func.isRequired,
|
|
98
|
+
inputPageSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
99
|
+
setInputPageSize: PropTypes.func.isRequired,
|
|
100
|
+
setPageSize: PropTypes.func.isRequired,
|
|
101
|
+
scrollRef: PropTypes.shape({ current: PropTypes.any }),
|
|
102
|
+
scrollOffset: PropTypes.number,
|
|
103
|
+
containerStyle: PropTypes.object,
|
|
104
|
+
showPageSizeControl: PropTypes.bool,
|
|
105
|
+
pageSizeLabel: PropTypes.string,
|
|
106
|
+
applyButtonText: PropTypes.string,
|
|
107
|
+
listStyle: PropTypes.object
|
|
108
|
+
};
|
|
109
|
+
var stdin_default = PaginationControls;
|
|
110
|
+
export {
|
|
111
|
+
PaginationControls,
|
|
112
|
+
stdin_default as default
|
|
113
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
const DOTS = "...";
|
|
3
|
+
const range = (start, end) => {
|
|
4
|
+
let length = end - start + 1;
|
|
5
|
+
return Array.from({ length }, (_, idx) => idx + start);
|
|
6
|
+
};
|
|
7
|
+
const usePagination = ({ totalCount, pageSize, siblingCount = 1, currentPage }) => {
|
|
8
|
+
const paginationRange = useMemo(() => {
|
|
9
|
+
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
10
|
+
const totalPageNumbers = siblingCount + 5;
|
|
11
|
+
if (totalPageNumbers >= totalPageCount) {
|
|
12
|
+
return range(1, totalPageCount);
|
|
13
|
+
}
|
|
14
|
+
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
15
|
+
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
|
|
16
|
+
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
17
|
+
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
18
|
+
const firstPageIndex = 1;
|
|
19
|
+
const lastPageIndex = totalPageCount;
|
|
20
|
+
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
21
|
+
let leftItemCount = 3 + 2 * siblingCount;
|
|
22
|
+
let leftRange = range(1, leftItemCount);
|
|
23
|
+
return [...leftRange, DOTS, totalPageCount];
|
|
24
|
+
}
|
|
25
|
+
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
26
|
+
let rightItemCount = 3 + 2 * siblingCount;
|
|
27
|
+
let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
|
|
28
|
+
return [firstPageIndex, DOTS, ...rightRange];
|
|
29
|
+
}
|
|
30
|
+
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
31
|
+
let middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
32
|
+
return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
|
|
33
|
+
}
|
|
34
|
+
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
35
|
+
return paginationRange;
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
DOTS,
|
|
39
|
+
usePagination
|
|
40
|
+
};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { colors } from "../../styles/colors.js";
|
|
5
|
+
import { InfoIcon } from "../InfoIcon/InfoIcon.js";
|
|
6
|
+
import { formatCurrencyValue, getCurrencyIcon } from "../../utils/formatCurrencyValue.js";
|
|
7
|
+
const CardContainer = styled.div`
|
|
8
|
+
background: ${colors.white};
|
|
9
|
+
border-radius: 10px;
|
|
10
|
+
border: 1px solid ${colors.lightGrey};
|
|
11
|
+
padding: 20px 32px;
|
|
12
|
+
`;
|
|
13
|
+
const CardTitle = styled.div`
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
letter-spacing: 0.6px;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
color: ${colors.futureBlack};
|
|
18
|
+
background: #f1f5f9;
|
|
19
|
+
padding: 12px 24px;
|
|
20
|
+
margin: -20px -32px 20px -32px;
|
|
21
|
+
border-radius: 9px 9px 0 0;
|
|
22
|
+
border-bottom: 1px solid ${colors.lightGrey};
|
|
23
|
+
text-align: start;
|
|
24
|
+
`;
|
|
25
|
+
const AmountSection = styled.div``;
|
|
26
|
+
const AmountLabel = styled.div`
|
|
27
|
+
font-size: 11px;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
line-height: 20px;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
letter-spacing: 2px;
|
|
32
|
+
margin-bottom: 12px;
|
|
33
|
+
color: ${colors.futureBlack};
|
|
34
|
+
text-align: start;
|
|
35
|
+
`;
|
|
36
|
+
const AmountDisplay = styled.div`
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 16px;
|
|
40
|
+
`;
|
|
41
|
+
const CurrencyLogo = styled.div.withConfig({
|
|
42
|
+
shouldForwardProp: (props) => !["color"].includes(props)
|
|
43
|
+
})`
|
|
44
|
+
width: 32px;
|
|
45
|
+
height: 32px;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
background-color: ${(props) => props.color || colors.black};
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
color: ${colors.white};
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
`;
|
|
57
|
+
const CurrencyIcon = styled.img`
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
|
|
61
|
+
object-fit: contain;
|
|
62
|
+
`;
|
|
63
|
+
const AmountValue = styled.div`
|
|
64
|
+
font-size: 34px;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
text-transform: uppercase;
|
|
67
|
+
line-height: 40px;
|
|
68
|
+
letter-spacing: 1.5px;
|
|
69
|
+
word-wrap: break-word;
|
|
70
|
+
color: ${colors.futureBlack};
|
|
71
|
+
`;
|
|
72
|
+
const Separator = styled.hr`
|
|
73
|
+
border: none;
|
|
74
|
+
border-top: 1px solid ${colors.lightGrey};
|
|
75
|
+
margin: 20px -32px;
|
|
76
|
+
`;
|
|
77
|
+
const DetailsSection = styled.div.withConfig({
|
|
78
|
+
shouldForwardProp: (props) => !["noMargin"].includes(props)
|
|
79
|
+
})`
|
|
80
|
+
margin-bottom: ${(props) => props.noMargin ? "0" : "24px"};
|
|
81
|
+
`;
|
|
82
|
+
const DetailRow = styled.div`
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: space-between;
|
|
85
|
+
align-items: flex-start;
|
|
86
|
+
padding: 10px 0;
|
|
87
|
+
border-bottom: 1px solid #f1f5f9;
|
|
88
|
+
|
|
89
|
+
&:first-child {
|
|
90
|
+
padding-top: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:last-child {
|
|
94
|
+
padding: 10px 0 0 0;
|
|
95
|
+
border-bottom: none;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
const DetailLabel = styled.div`
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 10px;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
line-height: 20px;
|
|
105
|
+
letter-spacing: 0.5px;
|
|
106
|
+
color: #56606f;
|
|
107
|
+
|
|
108
|
+
i {
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
const DetailValue = styled.div`
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
line-height: 20px;
|
|
116
|
+
letter-spacing: 0.5px;
|
|
117
|
+
word-wrap: break-word;
|
|
118
|
+
text-align: right;
|
|
119
|
+
max-width: 60%;
|
|
120
|
+
color: ${colors.black};
|
|
121
|
+
`;
|
|
122
|
+
const PlaceholderValue = styled.span`
|
|
123
|
+
color: #62748e;
|
|
124
|
+
font-weight: 300;
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
letter-spacing: 0.5px;
|
|
127
|
+
`;
|
|
128
|
+
const InfoSectionContainer = styled.div`
|
|
129
|
+
margin-top: 24px;
|
|
130
|
+
`;
|
|
131
|
+
const DetailItem = ({ label, value, tooltip, placeholder, isCustom }) => {
|
|
132
|
+
const renderValue = () => {
|
|
133
|
+
if (isCustom && value) {
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
if (value !== void 0 && value !== null && value !== "") {
|
|
137
|
+
return value;
|
|
138
|
+
}
|
|
139
|
+
if (placeholder) {
|
|
140
|
+
return /* @__PURE__ */ jsx(PlaceholderValue, { children: placeholder });
|
|
141
|
+
}
|
|
142
|
+
return /* @__PURE__ */ jsx(PlaceholderValue, { children: "-" });
|
|
143
|
+
};
|
|
144
|
+
return /* @__PURE__ */ jsxs(DetailRow, { children: [
|
|
145
|
+
/* @__PURE__ */ jsxs(DetailLabel, { children: [
|
|
146
|
+
label,
|
|
147
|
+
tooltip && /* @__PURE__ */ jsx(InfoIcon, { containerStyle: { width: 14, height: 14 }, title: tooltip, noMargin: true })
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ jsx(DetailValue, { children: renderValue() })
|
|
150
|
+
] });
|
|
151
|
+
};
|
|
152
|
+
const PaymentDetailsCard = ({
|
|
153
|
+
title,
|
|
154
|
+
amountSection,
|
|
155
|
+
details,
|
|
156
|
+
infoSection,
|
|
157
|
+
showSeparators = true,
|
|
158
|
+
containerStyle
|
|
159
|
+
}) => {
|
|
160
|
+
const renderAmountSection = () => {
|
|
161
|
+
if (!amountSection) return null;
|
|
162
|
+
if (React__default.isValidElement(amountSection)) {
|
|
163
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
164
|
+
amountSection,
|
|
165
|
+
showSeparators && /* @__PURE__ */ jsx(Separator, {})
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
const { label = "Amount", amount, currency, currencyColor, icon } = amountSection;
|
|
169
|
+
const displayAmount = formatCurrencyValue(currency, amount, 2, {
|
|
170
|
+
valueFirst: true
|
|
171
|
+
});
|
|
172
|
+
const currencyIcon = getCurrencyIcon(currency, icon);
|
|
173
|
+
const logoColor = currencyColor || colors.black;
|
|
174
|
+
const renderCurrencyLogo = () => {
|
|
175
|
+
if (currencyIcon) {
|
|
176
|
+
return /* @__PURE__ */ jsx(CurrencyLogo, { color: "transparent", children: /* @__PURE__ */ jsx(CurrencyIcon, { src: currencyIcon, alt: currency || "currency" }) });
|
|
177
|
+
}
|
|
178
|
+
return /* @__PURE__ */ jsx(CurrencyLogo, { color: logoColor, children: currency ? currency.charAt(0).toUpperCase() : "" });
|
|
179
|
+
};
|
|
180
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
181
|
+
/* @__PURE__ */ jsxs(AmountSection, { children: [
|
|
182
|
+
/* @__PURE__ */ jsx(AmountLabel, { children: label }),
|
|
183
|
+
/* @__PURE__ */ jsxs(AmountDisplay, { children: [
|
|
184
|
+
renderCurrencyLogo(),
|
|
185
|
+
/* @__PURE__ */ jsx(AmountValue, { children: displayAmount })
|
|
186
|
+
] })
|
|
187
|
+
] }),
|
|
188
|
+
showSeparators && /* @__PURE__ */ jsx(Separator, {})
|
|
189
|
+
] });
|
|
190
|
+
};
|
|
191
|
+
const renderDetailsSection = () => {
|
|
192
|
+
if (!details || details.length === 0) return null;
|
|
193
|
+
return /* @__PURE__ */ jsx(DetailsSection, { noMargin: !infoSection, children: details.map((detail, index) => /* @__PURE__ */ jsx(
|
|
194
|
+
DetailItem,
|
|
195
|
+
{
|
|
196
|
+
label: detail.label,
|
|
197
|
+
value: detail.value,
|
|
198
|
+
tooltip: detail.tooltip,
|
|
199
|
+
placeholder: detail.placeholder,
|
|
200
|
+
isCustom: detail.isCustom
|
|
201
|
+
},
|
|
202
|
+
detail.key || index
|
|
203
|
+
)) });
|
|
204
|
+
};
|
|
205
|
+
const renderInfoSection = () => {
|
|
206
|
+
if (!infoSection) return null;
|
|
207
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
208
|
+
showSeparators && /* @__PURE__ */ jsx(Separator, {}),
|
|
209
|
+
/* @__PURE__ */ jsx(InfoSectionContainer, { children: infoSection })
|
|
210
|
+
] });
|
|
211
|
+
};
|
|
212
|
+
return /* @__PURE__ */ jsxs(CardContainer, { style: containerStyle, children: [
|
|
213
|
+
title && /* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
214
|
+
renderAmountSection(),
|
|
215
|
+
renderDetailsSection(),
|
|
216
|
+
renderInfoSection()
|
|
217
|
+
] });
|
|
218
|
+
};
|
|
219
|
+
export {
|
|
220
|
+
CurrencyLogo,
|
|
221
|
+
DetailItem,
|
|
222
|
+
DetailsSection,
|
|
223
|
+
PaymentDetailsCard
|
|
224
|
+
};
|