@stokr/components-library 3.0.16 → 3.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +261 -262
- package/dist/analytics/index.js +180 -0
- package/dist/api/auth.js +15 -0
- package/dist/api/fetchData.js +27 -0
- package/dist/api/fetchDataPublic.js +19 -0
- package/dist/auth/index.js +32 -0
- package/dist/components/2FA/Connect2FA.js +55 -0
- package/dist/components/2FA/EnterCode.js +63 -0
- package/dist/components/2FA/InstallAuthApp.js +64 -0
- package/dist/components/2FA/ResetCode.js +33 -0
- package/dist/components/2FA/Sucess2FA.js +51 -0
- package/dist/components/2FA/disable-2fa-flow.js +91 -0
- package/dist/components/2FA/enable-2fa-flow.js +137 -0
- package/dist/components/2FA/login-with-otp-flow.js +206 -0
- package/dist/components/2FA/main-flow.js +217 -0
- package/dist/components/AccountBalance/AccountBalance.js +35 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +48 -0
- package/dist/components/AdminDashboard/Table/ReactTable.js +266 -0
- package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +65 -0
- package/dist/components/AdminDashboard/Table/Table.js +123 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +263 -0
- package/dist/components/AgreementItem/AgreementItem.js +39 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +32 -0
- package/dist/components/BackButton/BackButton.js +34 -0
- package/dist/components/BackButton/BackButton.styles.js +123 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.styles.js +119 -0
- package/dist/components/BasicTable/BasicTable.js +25 -0
- package/dist/components/BasicTable/BasicTable.styles.js +76 -0
- package/dist/components/BlogPost/BlogPost.js +98 -0
- package/dist/components/BlogPost/BlogPost.styles.js +230 -0
- package/dist/components/Button/Button.styles.js +207 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +51 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +18 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +41 -0
- package/dist/components/Card/Card.styles.js +97 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +133 -0
- package/dist/components/Checkbox/Checkbox.js +80 -0
- package/dist/components/Checkbox/Checkbox.styles.js +133 -0
- package/dist/components/Checklist/ChecklistCard.js +71 -0
- package/dist/components/Checklist/ChecklistCard.styles.js +82 -0
- package/dist/components/Chips/Chip.js +23 -0
- package/dist/components/Chips/Chip.styles.js +72 -0
- package/dist/components/Chips/ChipWrapper.js +50 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +70 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +127 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +165 -0
- package/dist/components/ConfirmModal/ConfirmModal.js +199 -0
- package/dist/components/ConfirmModal/ConfirmModal.styles.js +44 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +16 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +151 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +443 -0
- package/dist/components/CryptoAddress/RadioWrap.js +47 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +34 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +125 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +25 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +111 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +27 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/components/FAQ/FAQ.js +73 -0
- package/dist/components/FAQ/FAQ.styles.js +128 -0
- package/dist/components/Footer/Footer.js +55 -0
- package/dist/components/Footer/Footer.styles.js +256 -0
- package/dist/components/Footer/FooterLayout.js +145 -0
- package/dist/components/Footer/FooterMenu.js +100 -0
- package/dist/components/Footer/FooterMenu.styles.js +321 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +100 -0
- package/dist/components/Form/Form.js +21 -0
- package/dist/components/Form/Form.styles.js +72 -0
- package/dist/components/Grid/Grid.styles.js +212 -0
- package/dist/components/Header/Header.js +425 -0
- package/dist/components/Header/Header.styles.js +567 -0
- package/dist/components/HeroBlock/HeroVideoBlock.js +105 -0
- package/dist/components/Icon/Icon.style.js +92 -0
- package/dist/components/Icon/Icon2.js +12 -0
- package/dist/components/InfoBox/InfoBox.js +93 -0
- package/dist/components/InfoIcon/InfoIcon.js +62 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +64 -0
- package/dist/components/Input/DatePickerInput.js +139 -0
- package/dist/components/Input/DatePickerInput.styles.js +165 -0
- package/dist/components/Input/Input.js +108 -0
- package/dist/components/Input/Input.styles.js +154 -0
- package/dist/components/Input/InputPassword.js +122 -0
- package/dist/components/Input/InputPassword.styles.js +166 -0
- package/dist/components/Input/InputUsername.js +92 -0
- package/dist/components/Input/InputWithButton.js +53 -0
- package/dist/components/Input/InputWithButton.styles.js +57 -0
- package/dist/components/Input/MultiSelect.js +306 -0
- package/dist/components/Input/OtpInput.js +70 -0
- package/dist/components/Input/RangeInput.js +80 -0
- package/dist/components/Input/RangeInput.styles.js +129 -0
- package/dist/components/Input/SearchInput.js +68 -0
- package/dist/components/Input/SearchInput.styles.js +92 -0
- package/dist/components/Input/Select.js +151 -0
- package/dist/components/Input/Select.styles.js +148 -0
- package/dist/components/Input/TableFilterDropdown.js +247 -0
- package/dist/components/Input/Textarea.js +51 -0
- package/dist/components/Input/Textarea.styles.js +62 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +283 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +94 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +24 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +62 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +24 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +90 -0
- package/dist/components/Layout/Layout.js +69 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +32 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +208 -0
- package/dist/components/LearnMorePage/LearnMore.js +190 -0
- package/dist/components/LearnMorePage/LearnMore.propTypes.js +20 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +56 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +276 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +57 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +234 -0
- package/dist/components/LearnMoreSection/LearnMore.js +138 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +147 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +33 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +60 -0
- package/dist/components/LoginModal/LoginModal.js +142 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +38 -0
- package/dist/components/MainMenu/MainMenu.js +210 -0
- package/dist/components/MainMenu/MainMenu.styles.js +362 -0
- package/dist/components/MenuNav/MenuNav.styles.js +66 -0
- package/dist/components/Modal/Modal.js +119 -0
- package/dist/components/Modal/Modal.styles.js +450 -0
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +262 -0
- package/dist/components/Modal/PaymentModal.js +149 -0
- package/dist/components/Modal/SideModal.js +134 -0
- package/dist/components/Modal/SideModal.styles.js +55 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.js +170 -0
- package/dist/components/Modal/SuccessModal/SuccessModal.styles.js +53 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +30 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +105 -0
- package/dist/components/Newsletter/Newsletter.js +122 -0
- package/dist/components/Newsletter/Newsletter.styles.js +186 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +38 -0
- package/dist/components/Number/Number.js +50 -0
- package/dist/components/Number/Number.styles.js +23 -0
- package/dist/components/PageTransition/PageTransition.js +51 -0
- package/dist/components/Pagination/Pagination.js +58 -0
- package/dist/components/Pagination/Pagination.styles.js +59 -0
- package/dist/components/Pagination/PaginationControls.js +113 -0
- package/dist/components/Pagination/usePagination.js +40 -0
- package/dist/components/Payment/PaymentDetailsCard.js +359 -0
- package/dist/components/Payment/PaymentDisplay.js +199 -0
- package/dist/components/Payment/TimerComponent.js +92 -0
- package/dist/components/Process/Process.styles.js +84 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +35 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +53 -0
- package/dist/components/ProfileBox/ProfileBox.js +27 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +67 -0
- package/dist/components/ProfileStat/ProfileStat.js +29 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +90 -0
- package/dist/components/QRCode/QRCode.js +51 -0
- package/dist/components/Radio/Radio.js +51 -0
- package/dist/components/Radio/Radio.styles.js +100 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +64 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +65 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +20 -0
- package/dist/components/RegisterModal/RegisterModal.js +248 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +43 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +44 -0
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +41 -0
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +134 -0
- package/dist/components/SEO/SEO.js +66 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +26 -0
- package/dist/components/SideLine/SideLine.js +7 -0
- package/dist/components/SideLine/SideLine.styles.js +33 -0
- package/dist/components/Slider/Slider.js +31 -0
- package/dist/components/Slider/Slider.styles.js +120 -0
- package/dist/components/Snackbar/Snackbar.js +111 -0
- package/dist/components/Snackbar/Snackbar.styles.js +230 -0
- package/dist/components/Snackbar/SnackbarProvider.js +66 -0
- package/dist/components/Snackbar/useSnackbar.js +12 -0
- package/dist/components/SpanButton/SpanButton.styles.js +19 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +18 -0
- package/dist/components/StatusTag/StatusTag.js +105 -0
- package/dist/components/StatusTag/StatusTag.styles.js +88 -0
- package/dist/components/StepController/StepController.js +86 -0
- package/dist/components/StepController/StepController.styles.js +33 -0
- package/dist/components/StepController/StepControllerContext.js +65 -0
- package/dist/components/StepController/StepControllerProgress.js +37 -0
- package/dist/components/StepsProgress/StepIndicator.js +40 -0
- package/dist/components/StepsProgress/StepIndicator.styles.js +69 -0
- package/dist/components/StepsProgress/StepsProgress.js +67 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +105 -0
- package/dist/components/StokrLoader/StokrLoader.js +111 -0
- package/dist/components/StokrLoader/media.js +23 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +27 -0
- package/dist/components/SvgIcons/CameraSvg.js +31 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +36 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +20 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +41 -0
- package/dist/components/SvgIcons/DocumentSvg.js +39 -0
- package/dist/components/SvgIcons/EthSvg.js +28 -0
- package/dist/components/SvgIcons/EurSvg.js +27 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +17 -0
- package/dist/components/SvgIcons/FourSvg.js +7 -0
- package/dist/components/SvgIcons/Glassess.js +26 -0
- package/dist/components/SvgIcons/LogoSvg.js +17 -0
- package/dist/components/SvgIcons/OneSvg.js +10 -0
- package/dist/components/SvgIcons/PassportSvg.js +37 -0
- package/dist/components/SvgIcons/RefreshSvg.js +28 -0
- package/dist/components/SvgIcons/SocialFacebook.js +22 -0
- package/dist/components/SvgIcons/SocialInstagram.js +13 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +31 -0
- package/dist/components/SvgIcons/SocialMedium.js +21 -0
- package/dist/components/SvgIcons/SocialReddit.js +21 -0
- package/dist/components/SvgIcons/SocialTelegram.js +60 -0
- package/dist/components/SvgIcons/SocialTwitter.js +62 -0
- package/dist/components/SvgIcons/SocialYoutube.js +22 -0
- package/dist/components/SvgIcons/ThreeSvg.js +7 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +48 -0
- package/dist/components/SvgIcons/TwoSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +12 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +10 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +11 -0
- package/dist/components/SvgIcons/UploadSvg.js +12 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +16 -0
- package/dist/components/Switch/Switch.js +63 -0
- package/dist/components/Switch/Switch.styles.js +126 -0
- package/dist/components/Tabs/Tabs.js +54 -0
- package/dist/components/Tabs/Tabs.styles.js +15 -0
- package/dist/components/TabsNav/TabNav.js +16 -0
- package/dist/components/TabsNav/TabsNav.js +30 -0
- package/dist/components/TabsNav/TabsNav.styles.js +103 -0
- package/dist/components/TeamOverview/TeamOverview.js +80 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +167 -0
- package/dist/components/TermsModal/TermsModal.js +145 -0
- package/dist/components/TermsModal/_styles.js +313 -0
- package/dist/components/Text/Text.styles.js +220 -0
- package/dist/components/TextLink/TextLink.styles.js +67 -0
- package/dist/components/Timeline/Timeline.js +44 -0
- package/dist/components/Timeline/Timeline.styles.js +147 -0
- package/dist/components/Timeline/TimelineStep.js +58 -0
- package/dist/components/ToDoList/ToDoList.js +172 -0
- package/dist/components/ToDoList/ToDoList.styles.js +122 -0
- package/dist/components/ToDoList/ToDoListTask.js +95 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +119 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +38 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +41 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +75 -0
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +126 -0
- package/dist/components/headerHo/HeaderHo.js +709 -0
- package/dist/components/icons/Arrow.js +38 -0
- package/dist/components/icons/ArrowSimple.js +34 -0
- package/dist/components/icons/Check.js +16 -0
- package/dist/components/icons/Facebook.js +10 -0
- package/dist/components/icons/Info.js +27 -0
- package/dist/components/icons/Instagram.js +10 -0
- package/dist/components/icons/LinkIcon.js +49 -0
- package/dist/components/icons/LinkedIn.js +13 -0
- package/dist/components/icons/Medium.js +13 -0
- package/dist/components/icons/Reddit.js +16 -0
- package/dist/components/icons/Share.js +31 -0
- package/dist/components/icons/Telegram.js +13 -0
- package/dist/components/icons/Twitter.js +10 -0
- package/dist/components/icons/X.js +10 -0
- package/dist/components/icons/Youtube.js +10 -0
- package/dist/components/icons/index.js +32 -0
- package/dist/components/landing-page/List.js +51 -0
- package/dist/components/landing-page/PageContent.js +65 -0
- package/dist/components/landing-page/PageText.js +171 -0
- package/dist/components/landing-page/PageTitle.js +259 -0
- package/dist/components/logo/Logo.js +57 -0
- package/dist/components/taxId/complete.js +24 -0
- package/dist/components/taxId/flow.js +53 -0
- package/dist/components/taxId/register-taxid.js +166 -0
- package/dist/config.js +44 -0
- package/dist/constants/globalVariables.js +87 -0
- package/dist/constants/style.js +48 -0
- package/dist/context/Auth.js +396 -0
- package/dist/context/AuthContext.js +781 -0
- package/dist/context/Checkbox/CheckboxContext.js +151 -0
- package/dist/firebase-config.js +73 -0
- package/dist/hooks/useNewVentureForm.js +262 -0
- package/dist/hooks/useTimer.js +89 -0
- package/dist/hooks/useTransactionPolling.js +100 -0
- package/dist/index.js +632 -25463
- package/dist/model/axios.js +10 -0
- package/dist/model/axiosPublic.js +9 -0
- package/dist/services/TimerService.js +80 -0
- package/dist/static/animations/checked.lottie.js +4 -0
- package/dist/static/animations/progress.lottie.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.ttf.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff.js +4 -0
- package/dist/static/fonts/Ionicons/Ionicons.woff2.js +4 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Bold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-ExtraBold.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Light.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-Regular.woff2.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.ttf.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff.js +4 -0
- package/dist/static/fonts/OpenSans/OpenSans-SemiBold.woff2.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.eot.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.svg.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.ttf.js +4 -0
- package/dist/static/fonts/icomoon/icomoon.woff.js +4 -0
- package/dist/static/images/add-folder-icon.svg.js +5 -0
- package/dist/static/images/address-refreshing.gif.js +4 -0
- package/dist/static/images/arrow-down-black.svg.js +4 -0
- package/dist/static/images/avatar-placeholder.png.js +4 -0
- package/dist/static/images/background3.png.js +4 -0
- package/dist/static/images/bitcoin-logo.svg.js +4 -0
- package/dist/static/images/bmn2-logo.svg.js +4 -0
- package/dist/static/images/check-icon.svg.js +5 -0
- package/dist/static/images/checkmark-circle-icon.svg.js +5 -0
- package/dist/static/images/close-circle-icon.svg.js +5 -0
- package/dist/static/images/copy_icon.svg.js +5 -0
- package/dist/static/images/cross-icon.svg.js +5 -0
- package/dist/static/images/early-adopter.png.js +4 -0
- package/dist/static/images/eth_logo.svg.js +4 -0
- package/dist/static/images/external-link-icon.svg +3 -0
- package/dist/static/images/external-link-icon.svg.js +4 -0
- package/dist/static/images/filter-icon.svg.js +5 -0
- package/dist/static/images/google_auth.png.js +4 -0
- package/dist/static/images/graduation.png.js +4 -0
- package/dist/static/images/mangopay.svg.js +4 -0
- package/dist/static/images/numbers/number_eight.svg.js +5 -0
- package/dist/static/images/numbers/number_five.svg.js +5 -0
- package/dist/static/images/numbers/number_four.svg.js +5 -0
- package/dist/static/images/numbers/number_nine.svg.js +5 -0
- package/dist/static/images/numbers/number_one.svg.js +5 -0
- package/dist/static/images/numbers/number_seven.svg.js +5 -0
- package/dist/static/images/numbers/number_six.svg.js +5 -0
- package/dist/static/images/numbers/number_three.svg.js +5 -0
- package/dist/static/images/numbers/number_two.svg.js +5 -0
- package/dist/static/images/numbers/number_zero.svg.js +5 -0
- package/dist/static/images/process-waiting.gif.js +4 -0
- package/dist/static/images/search-icon.svg.js +5 -0
- package/dist/static/images/social/Facebook_Logo.png.js +4 -0
- package/dist/static/images/social/LI-In-Bug.png.js +4 -0
- package/dist/static/images/social/Telegram-Logo.png.js +4 -0
- package/dist/static/images/social/X-logo-black.png.js +4 -0
- package/dist/static/images/social/youtube_social_circle_red.png.js +4 -0
- package/dist/static/images/transfer-icon.svg.js +5 -0
- package/dist/static/images/usdc-logo.svg.js +4 -0
- package/dist/static/images/usdq-logo.png.js +4 -0
- package/dist/static/images/warning-filled.svg.js +5 -0
- package/dist/styles/colors.js +57 -0
- package/dist/styles/fonts.js +100 -0
- package/dist/styles/global.js +74 -0
- package/dist/styles/grid.js +11 -0
- package/dist/styles/ioniconsStyles.js +31 -0
- package/dist/styles/reactTippy.js +40 -0
- package/dist/styles/rwd.js +56 -0
- package/dist/styles/semanticUi.js +84 -0
- package/dist/styles/spacing.js +8 -0
- package/dist/styles/theme.js +34 -0
- package/dist/utils/check-sale-time-left.js +85 -0
- package/dist/utils/check-todo-status.js +11 -0
- package/dist/utils/checklistGenerator.js +195 -0
- package/dist/utils/copyToClipboard.js +92 -0
- package/dist/utils/customHooks.js +126 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +12 -0
- package/dist/utils/fix-decimals.js +5 -0
- package/dist/utils/formatCurrencyValue.js +95 -0
- package/dist/utils/get-cookie-domain.js +10 -0
- package/dist/utils/get-short-address.js +4 -0
- package/dist/utils/isUSInvestor.js +6 -0
- package/dist/utils/km_ify.js +33 -0
- package/dist/utils/moment.js +26 -0
- package/dist/utils/redirect-url.js +5 -0
- package/dist/utils/saveAs.js +17 -0
- package/dist/utils/scrollUtils.js +63 -0
- package/dist/utils/set-redirect-cookie.js +16 -0
- package/dist/utils/transition.js +101 -0
- package/dist/utils/withRouter.js +24 -0
- package/package.json +11 -11
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
const iconsMap = {
|
|
3
|
+
expand: "\\e923",
|
|
4
|
+
shrink: "\\e924",
|
|
5
|
+
emoji: "\\e922",
|
|
6
|
+
arrowDown: "\\e900",
|
|
7
|
+
arrowLeft: "\\e901",
|
|
8
|
+
arrowRight: "\\e902",
|
|
9
|
+
arrowUp: "\\e903",
|
|
10
|
+
heart: "\\e904",
|
|
11
|
+
heartFill: "\\e921",
|
|
12
|
+
lock: "\\e905",
|
|
13
|
+
menu: "\\e906",
|
|
14
|
+
pen: "\\e907",
|
|
15
|
+
star: "\\e908",
|
|
16
|
+
trash: "\\e909",
|
|
17
|
+
unread: "\\e90a",
|
|
18
|
+
user: "\\e90b",
|
|
19
|
+
edit: "\\e90c",
|
|
20
|
+
check: "\\e90d",
|
|
21
|
+
inProgress: "\\e90e",
|
|
22
|
+
warning: "\\e90f",
|
|
23
|
+
logout: "\\e910",
|
|
24
|
+
tokenHolder: "\\e911",
|
|
25
|
+
teams: "\\e912",
|
|
26
|
+
tokenSales: "\\e913",
|
|
27
|
+
analytics: "\\e914",
|
|
28
|
+
updates: "\\e915",
|
|
29
|
+
overview: "\\e916",
|
|
30
|
+
comments: "\\e917",
|
|
31
|
+
hamburger: "\\e918",
|
|
32
|
+
share: "\\e919",
|
|
33
|
+
facebook: "\\e91a",
|
|
34
|
+
linkedin: "\\e91b",
|
|
35
|
+
medium: "\\e91c",
|
|
36
|
+
reddit: "\\e91d",
|
|
37
|
+
telegram: "\\e91e",
|
|
38
|
+
twitter: "\\e91f",
|
|
39
|
+
youtube: "\\e920",
|
|
40
|
+
cog: "\\e926",
|
|
41
|
+
pin: "\\e925",
|
|
42
|
+
cross: "\\274C",
|
|
43
|
+
euro: "\\e93c"
|
|
44
|
+
};
|
|
45
|
+
const TooltipIcon = styled.i.attrs({
|
|
46
|
+
className: "ion ion-md-information-circle"
|
|
47
|
+
})`
|
|
48
|
+
position: relative;
|
|
49
|
+
left: -0.4px;
|
|
50
|
+
font-size: 18px;
|
|
51
|
+
opacity: 0.2;
|
|
52
|
+
transform: rotateY(180deg);
|
|
53
|
+
margin: 0 14px;
|
|
54
|
+
`;
|
|
55
|
+
const Icon = styled.i.withConfig({
|
|
56
|
+
shouldForwardProp: (props) => !["size", "color", "icon", "checklist"].includes(props)
|
|
57
|
+
})`
|
|
58
|
+
font-family: 'icomoon' !important;
|
|
59
|
+
speak: none;
|
|
60
|
+
font-style: normal;
|
|
61
|
+
font-weight: normal;
|
|
62
|
+
font-variant: normal;
|
|
63
|
+
text-transform: none;
|
|
64
|
+
line-height: 1;
|
|
65
|
+
|
|
66
|
+
${(props) => props.size && `
|
|
67
|
+
font-size: ${props.size}px;
|
|
68
|
+
`}
|
|
69
|
+
|
|
70
|
+
${(props) => props.color && `
|
|
71
|
+
color: ${props.color};
|
|
72
|
+
`}
|
|
73
|
+
|
|
74
|
+
/* Better Font Rendering =========== */
|
|
75
|
+
-webkit-font-smoothing: antialiased;
|
|
76
|
+
-moz-osx-font-smoothing: grayscale;
|
|
77
|
+
|
|
78
|
+
&::before {
|
|
79
|
+
content: '${(props) => props.icon}';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
${({ checklist }) => checklist && css`
|
|
83
|
+
margin-left: 3px;
|
|
84
|
+
margin-right: 11px;
|
|
85
|
+
`}
|
|
86
|
+
`;
|
|
87
|
+
export {
|
|
88
|
+
Icon,
|
|
89
|
+
TooltipIcon,
|
|
90
|
+
Icon as default,
|
|
91
|
+
iconsMap
|
|
92
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as index from "../icons/index.js";
|
|
3
|
+
const Icon2 = ({ name = "IconNotFound", ...p }) => {
|
|
4
|
+
const Ico = index[name];
|
|
5
|
+
if (typeof Ico === "undefined") {
|
|
6
|
+
console.error(`Icon name ${name} not found`);
|
|
7
|
+
}
|
|
8
|
+
return Ico ? /* @__PURE__ */ jsx(Ico, { ...p }) : null;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
Icon2
|
|
12
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { colors } from "../../styles/colors.js";
|
|
5
|
+
const VARIANTS = {
|
|
6
|
+
warning: {
|
|
7
|
+
background: "#FFFBEB",
|
|
8
|
+
border: colors.warningOrange,
|
|
9
|
+
iconColor: "black"
|
|
10
|
+
},
|
|
11
|
+
info: {
|
|
12
|
+
background: "#F8FAFC",
|
|
13
|
+
border: colors.blueDark,
|
|
14
|
+
iconColor: "black"
|
|
15
|
+
},
|
|
16
|
+
error: {
|
|
17
|
+
background: "#FDEDEC",
|
|
18
|
+
border: colors.darkRed,
|
|
19
|
+
iconColor: "black"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const Container = styled.div`
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 12px;
|
|
29
|
+
padding: 12px 20px 12px 16px;
|
|
30
|
+
background: ${(props) => props.$bg};
|
|
31
|
+
border: 1px solid ${(props) => props.$border};
|
|
32
|
+
border-radius: 8px;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
line-height: 18px;
|
|
35
|
+
letter-spacing: 0.6px;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
color: ${colors.black};
|
|
38
|
+
|
|
39
|
+
${(props) => !props.$noLeftBorder && `
|
|
40
|
+
&:before {
|
|
41
|
+
content: '';
|
|
42
|
+
display: block;
|
|
43
|
+
width: 4px;
|
|
44
|
+
position: absolute;
|
|
45
|
+
height: 100%;
|
|
46
|
+
left: 0px;
|
|
47
|
+
background: ${props.$border};
|
|
48
|
+
}
|
|
49
|
+
`}
|
|
50
|
+
`;
|
|
51
|
+
const DefaultIcon = styled.i.attrs({
|
|
52
|
+
className: "ion ion-md-information-circle-outline"
|
|
53
|
+
})`
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
font-size: 18px;
|
|
56
|
+
line-height: 18px;
|
|
57
|
+
color: ${(props) => props.$color};
|
|
58
|
+
margin-top: 1px;
|
|
59
|
+
`;
|
|
60
|
+
const CustomIconWrapper = styled.span`
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
margin-top: 1px;
|
|
66
|
+
`;
|
|
67
|
+
const Content = styled.div`
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
`;
|
|
71
|
+
const InfoBox = ({
|
|
72
|
+
variant = "warning",
|
|
73
|
+
children,
|
|
74
|
+
icon,
|
|
75
|
+
style,
|
|
76
|
+
className,
|
|
77
|
+
noLeftBorder
|
|
78
|
+
}) => {
|
|
79
|
+
const theme = VARIANTS[variant] || VARIANTS.warning;
|
|
80
|
+
const renderIcon = () => {
|
|
81
|
+
if (icon) {
|
|
82
|
+
return /* @__PURE__ */ jsx(CustomIconWrapper, { children: icon });
|
|
83
|
+
}
|
|
84
|
+
return /* @__PURE__ */ jsx(DefaultIcon, { $color: theme.iconColor });
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ jsxs(Container, { $bg: theme.background, $noLeftBorder: noLeftBorder, $border: theme.border, style, className, children: [
|
|
87
|
+
renderIcon(),
|
|
88
|
+
/* @__PURE__ */ jsx(Content, { children })
|
|
89
|
+
] });
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
InfoBox
|
|
93
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Tooltip } from "react-tippy";
|
|
5
|
+
import { Container, Icon } from "./InfoIcon.styles.js";
|
|
6
|
+
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
7
|
+
const InfoIcon = ({
|
|
8
|
+
title = null,
|
|
9
|
+
html = null,
|
|
10
|
+
position = "bottom",
|
|
11
|
+
noMargin = false,
|
|
12
|
+
noMarginLeft = false,
|
|
13
|
+
noMarginRight = false,
|
|
14
|
+
noIcon,
|
|
15
|
+
disabled,
|
|
16
|
+
fullWidth,
|
|
17
|
+
outline = false,
|
|
18
|
+
containerStyle,
|
|
19
|
+
...props
|
|
20
|
+
}) => {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx(IoniconsStyles, {}),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
Container,
|
|
25
|
+
{
|
|
26
|
+
noMargin,
|
|
27
|
+
noMarginLeft,
|
|
28
|
+
noMarginRight,
|
|
29
|
+
fullWidth,
|
|
30
|
+
style: containerStyle,
|
|
31
|
+
children: /* @__PURE__ */ jsx(
|
|
32
|
+
Tooltip,
|
|
33
|
+
{
|
|
34
|
+
...props,
|
|
35
|
+
position,
|
|
36
|
+
title,
|
|
37
|
+
html,
|
|
38
|
+
theme: "light",
|
|
39
|
+
arrow: true,
|
|
40
|
+
duration: 200,
|
|
41
|
+
disabled,
|
|
42
|
+
children: noIcon ? props.children : /* @__PURE__ */ jsx(Icon, { outline })
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
InfoIcon.propTypes = {
|
|
50
|
+
title: PropTypes.string,
|
|
51
|
+
html: PropTypes.node,
|
|
52
|
+
position: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
53
|
+
noMargin: PropTypes.bool,
|
|
54
|
+
noMarginLeft: PropTypes.bool,
|
|
55
|
+
noMarginRight: PropTypes.bool,
|
|
56
|
+
outline: PropTypes.bool
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
InfoIcon,
|
|
60
|
+
Container as InfoIconContainer,
|
|
61
|
+
Icon as InfoIconWrapper
|
|
62
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
const Container = styled.div.withConfig({
|
|
4
|
+
shouldForwardProp: (props) => !["noMargin", "noMarginLeft", "noMarginRight", "fullWidth"].includes(props)
|
|
5
|
+
})`
|
|
6
|
+
display: inline-block;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
margin: 0 12px;
|
|
9
|
+
font-size: 0;
|
|
10
|
+
line-height: 0;
|
|
11
|
+
|
|
12
|
+
${(props) => props.noMargin && `
|
|
13
|
+
margin: 0;
|
|
14
|
+
`}
|
|
15
|
+
${(props) => props.noMarginLeft && `
|
|
16
|
+
margin-left: 0;
|
|
17
|
+
`}
|
|
18
|
+
${(props) => props.noMarginRight && `
|
|
19
|
+
margin-right: 0;
|
|
20
|
+
`}
|
|
21
|
+
|
|
22
|
+
${(props) => props.fullWidth && `
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
`}
|
|
26
|
+
|
|
27
|
+
& > div {
|
|
28
|
+
position: relative;
|
|
29
|
+
display: inline-block !important;
|
|
30
|
+
|
|
31
|
+
${(props) => props.fullWidth && `
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
display: flex !important;
|
|
35
|
+
align-content: center;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
`}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
const Icon = styled.i.withConfig({
|
|
42
|
+
shouldForwardProp: (props) => !["outline"].includes(props)
|
|
43
|
+
}).attrs((props) => ({
|
|
44
|
+
className: props.outline ? "ion ion-md-information-circle-outline" : "ion ion-md-information-circle"
|
|
45
|
+
}))`
|
|
46
|
+
position: relative;
|
|
47
|
+
left: -0.4px;
|
|
48
|
+
|
|
49
|
+
display: inline-block;
|
|
50
|
+
vertical-align: middle;
|
|
51
|
+
font-size: 16px;
|
|
52
|
+
line-height: 16px;
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
color: ${() => theme.cGrey2};
|
|
55
|
+
transition: color 0.2s;
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
color: ${() => theme.cPrimary};
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
export {
|
|
62
|
+
Container,
|
|
63
|
+
Icon
|
|
64
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { isValid, format, parse } from "date-fns";
|
|
5
|
+
import { DayPicker } from "react-day-picker";
|
|
6
|
+
import { Wrapper, Label } from "./Input.styles.js";
|
|
7
|
+
import { DatePickerOverlay, InputWrapper, DateInput, ClearButton } from "./DatePickerInput.styles.js";
|
|
8
|
+
import { useComponentVisible } from "../../utils/customHooks.js";
|
|
9
|
+
const DATE_FORMAT = "MMM dd, yyyy";
|
|
10
|
+
const now = /* @__PURE__ */ new Date();
|
|
11
|
+
const DatePickerInput = (props) => {
|
|
12
|
+
const {
|
|
13
|
+
onChange,
|
|
14
|
+
name,
|
|
15
|
+
value = void 0,
|
|
16
|
+
id,
|
|
17
|
+
label = "",
|
|
18
|
+
placeholder = "",
|
|
19
|
+
error = false,
|
|
20
|
+
touched = false,
|
|
21
|
+
dashboard = false,
|
|
22
|
+
dateFormat = DATE_FORMAT,
|
|
23
|
+
...dayPickerProps
|
|
24
|
+
} = props;
|
|
25
|
+
const [labelUp, setLabelUp] = useState(false);
|
|
26
|
+
const [inputValue, setInputValue] = useState("");
|
|
27
|
+
const [month, setMonth] = useState(now);
|
|
28
|
+
const [selectedDate, setSelectedDate] = useState(void 0);
|
|
29
|
+
const { ref, isComponentVisible, setIsComponentVisible } = useComponentVisible(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (value) {
|
|
32
|
+
const dateValue = value instanceof Date ? value : new Date(value);
|
|
33
|
+
if (isValid(dateValue)) {
|
|
34
|
+
setSelectedDate(dateValue);
|
|
35
|
+
setMonth(dateValue);
|
|
36
|
+
setInputValue(format(dateValue, dateFormat));
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
setSelectedDate(void 0);
|
|
40
|
+
setInputValue("");
|
|
41
|
+
}
|
|
42
|
+
}, [value, dateFormat]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
setLabelUp(!!inputValue || isComponentVisible);
|
|
45
|
+
}, [inputValue, isComponentVisible]);
|
|
46
|
+
const handleInputChange = (e) => {
|
|
47
|
+
const newValue = e.target.value;
|
|
48
|
+
setInputValue(newValue);
|
|
49
|
+
const parsedDate = parse(newValue, dateFormat, now);
|
|
50
|
+
if (isValid(parsedDate)) {
|
|
51
|
+
setSelectedDate(parsedDate);
|
|
52
|
+
setMonth(parsedDate);
|
|
53
|
+
onChange?.(parsedDate, { name, value: parsedDate });
|
|
54
|
+
} else {
|
|
55
|
+
setSelectedDate(void 0);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const handleDaySelect = (date) => {
|
|
59
|
+
if (date) {
|
|
60
|
+
setSelectedDate(date);
|
|
61
|
+
setMonth(date);
|
|
62
|
+
setInputValue(format(date, dateFormat));
|
|
63
|
+
onChange?.(date, { name, value: date });
|
|
64
|
+
} else {
|
|
65
|
+
setSelectedDate(void 0);
|
|
66
|
+
setInputValue("");
|
|
67
|
+
onChange?.(void 0, { name, value: void 0 });
|
|
68
|
+
}
|
|
69
|
+
setIsComponentVisible(false);
|
|
70
|
+
};
|
|
71
|
+
const handleClear = (e) => {
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
setSelectedDate(void 0);
|
|
74
|
+
setInputValue("");
|
|
75
|
+
onChange?.(void 0, { name, value: void 0 });
|
|
76
|
+
setIsComponentVisible(false);
|
|
77
|
+
};
|
|
78
|
+
const handleInputClick = () => {
|
|
79
|
+
setIsComponentVisible(true);
|
|
80
|
+
};
|
|
81
|
+
const handleInputFocus = () => {
|
|
82
|
+
setLabelUp(true);
|
|
83
|
+
};
|
|
84
|
+
const handleInputBlur = () => {
|
|
85
|
+
if (!inputValue) {
|
|
86
|
+
setLabelUp(false);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ jsxs(Wrapper, { ref, children: [
|
|
90
|
+
label && /* @__PURE__ */ jsx(Label, { isUp: labelUp, error: error && touched, htmlFor: id, active: isComponentVisible, children: label }),
|
|
91
|
+
/* @__PURE__ */ jsxs(DatePickerOverlay, { children: [
|
|
92
|
+
/* @__PURE__ */ jsxs(InputWrapper, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
DateInput,
|
|
95
|
+
{
|
|
96
|
+
id,
|
|
97
|
+
name,
|
|
98
|
+
type: "text",
|
|
99
|
+
value: inputValue,
|
|
100
|
+
placeholder,
|
|
101
|
+
onChange: handleInputChange,
|
|
102
|
+
onClick: handleInputClick,
|
|
103
|
+
onFocus: handleInputFocus,
|
|
104
|
+
onBlur: handleInputBlur,
|
|
105
|
+
dashboard,
|
|
106
|
+
autoComplete: "off"
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
selectedDate && /* @__PURE__ */ jsx(ClearButton, { type: "button", onClick: handleClear, dashboard, title: "Clear date", children: "✕" })
|
|
110
|
+
] }),
|
|
111
|
+
isComponentVisible && /* @__PURE__ */ jsx(
|
|
112
|
+
DayPicker,
|
|
113
|
+
{
|
|
114
|
+
mode: "single",
|
|
115
|
+
month,
|
|
116
|
+
onMonthChange: setMonth,
|
|
117
|
+
selected: selectedDate,
|
|
118
|
+
onSelect: handleDaySelect,
|
|
119
|
+
...dayPickerProps
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] })
|
|
123
|
+
] });
|
|
124
|
+
};
|
|
125
|
+
DatePickerInput.propTypes = {
|
|
126
|
+
id: PropTypes.string,
|
|
127
|
+
name: PropTypes.string,
|
|
128
|
+
label: PropTypes.string,
|
|
129
|
+
placeholder: PropTypes.string,
|
|
130
|
+
error: PropTypes.bool,
|
|
131
|
+
touched: PropTypes.bool,
|
|
132
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
|
|
133
|
+
onChange: PropTypes.func,
|
|
134
|
+
dashboard: PropTypes.bool,
|
|
135
|
+
dateFormat: PropTypes.string
|
|
136
|
+
};
|
|
137
|
+
export {
|
|
138
|
+
DatePickerInput
|
|
139
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
import { colors } from "../../styles/colors.js";
|
|
4
|
+
const InputWrapper = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
`;
|
|
9
|
+
const ClearButton = styled.button.withConfig({
|
|
10
|
+
shouldForwardProp: (props) => !["dashboard"].includes(props)
|
|
11
|
+
})`
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 0;
|
|
14
|
+
top: 50%;
|
|
15
|
+
transform: translateY(-50%);
|
|
16
|
+
background: none;
|
|
17
|
+
border: none;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
padding: 4px 8px;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: ${colors.lightGrey};
|
|
22
|
+
line-height: 1;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
color: ${colors.black};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${(props) => props.dashboard && css`
|
|
32
|
+
right: 0;
|
|
33
|
+
padding: 2px 4px;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
`}
|
|
36
|
+
`;
|
|
37
|
+
const DateInput = styled.input.withConfig({
|
|
38
|
+
shouldForwardProp: (props) => !["dashboard"].includes(props)
|
|
39
|
+
})`
|
|
40
|
+
font-family: 'Open sans';
|
|
41
|
+
display: block;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 40px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
line-height: 18px;
|
|
47
|
+
padding: 13px 0;
|
|
48
|
+
padding-bottom: 7px;
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
outline: 0;
|
|
52
|
+
border: 0;
|
|
53
|
+
border-top: 1px solid transparent;
|
|
54
|
+
border-bottom: 1px solid ${theme.cGrey};
|
|
55
|
+
color: ${theme.cBlack};
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
transition: border-color 0.2s;
|
|
58
|
+
|
|
59
|
+
&:focus,
|
|
60
|
+
&:hover {
|
|
61
|
+
box-shadow: none;
|
|
62
|
+
border-top-color: transparent;
|
|
63
|
+
border-bottom-color: ${theme.cPrimary};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&::placeholder {
|
|
67
|
+
color: transparent;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
${(props) => props.dashboard && css`
|
|
72
|
+
border: 0;
|
|
73
|
+
padding: 0;
|
|
74
|
+
height: 22px;
|
|
75
|
+
font-family: 'Open Sans';
|
|
76
|
+
font-weight: 300;
|
|
77
|
+
font-size: 14px;
|
|
78
|
+
line-height: 22px;
|
|
79
|
+
letter-spacing: 0.53px;
|
|
80
|
+
text-transform: normal;
|
|
81
|
+
color: ${theme.cBlack};
|
|
82
|
+
|
|
83
|
+
&::placeholder {
|
|
84
|
+
color: ${theme.cGrey2};
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
`}
|
|
88
|
+
`;
|
|
89
|
+
const DatePickerOverlay = styled.div`
|
|
90
|
+
position: relative;
|
|
91
|
+
|
|
92
|
+
.rdp {
|
|
93
|
+
position: absolute;
|
|
94
|
+
z-index: 20;
|
|
95
|
+
background-color: white;
|
|
96
|
+
margin: 0;
|
|
97
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
98
|
+
padding: 12px;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
min-width: fit-content;
|
|
101
|
+
|
|
102
|
+
/* v9 CSS Variables */
|
|
103
|
+
--rdp-accent-color: ${colors.blue};
|
|
104
|
+
--rdp-accent-background-color: ${colors.blue};
|
|
105
|
+
--rdp-day-height: 32px;
|
|
106
|
+
--rdp-day-width: 32px;
|
|
107
|
+
--rdp-selected-font: 600 13px 'Open Sans', sans-serif;
|
|
108
|
+
--rdp-weekday-font: 600 11px 'Open Sans', sans-serif;
|
|
109
|
+
--rdp-font-family: 'Open Sans', sans-serif;
|
|
110
|
+
|
|
111
|
+
/* Remove outline on selected */
|
|
112
|
+
--rdp-selected-border: none;
|
|
113
|
+
--rdp-outside-opacity: 0.4;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Day cells */
|
|
117
|
+
.rdp-day {
|
|
118
|
+
font-size: 13px;
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Selected day - filled blue circle */
|
|
123
|
+
.rdp-selected .rdp-day_button,
|
|
124
|
+
.rdp-day_button[aria-selected='true'] {
|
|
125
|
+
background-color: ${colors.blue} !important;
|
|
126
|
+
color: white !important;
|
|
127
|
+
border: none !important;
|
|
128
|
+
outline: none !important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Today's date */
|
|
132
|
+
.rdp-today:not(.rdp-selected) .rdp-day_button {
|
|
133
|
+
font-weight: 700;
|
|
134
|
+
color: ${colors.blue};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Weekday headers - uppercase */
|
|
138
|
+
.rdp-weekday {
|
|
139
|
+
font-size: 11px;
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
text-transform: uppercase;
|
|
142
|
+
color: ${colors.black};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Month caption */
|
|
146
|
+
.rdp-month_caption {
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Navigation buttons */
|
|
151
|
+
.rdp-chevron {
|
|
152
|
+
fill: ${colors.grey2};
|
|
153
|
+
|
|
154
|
+
&:hover {
|
|
155
|
+
fill: ${colors.black};
|
|
156
|
+
background: transparent;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
export {
|
|
161
|
+
ClearButton,
|
|
162
|
+
DateInput,
|
|
163
|
+
DatePickerOverlay,
|
|
164
|
+
InputWrapper
|
|
165
|
+
};
|