@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,108 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Wrapper, Label, InputWrap } from "./Input.styles.js";
|
|
5
|
+
const Input = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
type = "text",
|
|
8
|
+
id,
|
|
9
|
+
name,
|
|
10
|
+
label = "",
|
|
11
|
+
placeholder = "",
|
|
12
|
+
value = "",
|
|
13
|
+
error = false,
|
|
14
|
+
touched = false,
|
|
15
|
+
readOnly = false,
|
|
16
|
+
inverted = false,
|
|
17
|
+
dashboard = false,
|
|
18
|
+
disabled,
|
|
19
|
+
inputWrapStyle,
|
|
20
|
+
wrapperStyle,
|
|
21
|
+
autoHeightLabel,
|
|
22
|
+
// Destructure these so they don't get spread to the input
|
|
23
|
+
onChange: onChangeProp,
|
|
24
|
+
onBlur: onBlurProp,
|
|
25
|
+
onFocus: onFocusProp,
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
const [labelUp, setLabelUp] = useState(false);
|
|
29
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
30
|
+
const checkLabel = (focus) => {
|
|
31
|
+
setHasFocus(focus);
|
|
32
|
+
setLabelUp(focus || !!value);
|
|
33
|
+
};
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
checkLabel(false);
|
|
36
|
+
}, []);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!!value && !labelUp) {
|
|
39
|
+
checkLabel(false);
|
|
40
|
+
}
|
|
41
|
+
}, [labelUp, value]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (value && !labelUp) setLabelUp(true);
|
|
44
|
+
}, [value, labelUp]);
|
|
45
|
+
const onBlur = (e, field) => {
|
|
46
|
+
onBlurProp?.(e, field);
|
|
47
|
+
checkLabel(false);
|
|
48
|
+
};
|
|
49
|
+
const onFocus = (e, field) => {
|
|
50
|
+
onFocusProp?.(e, field);
|
|
51
|
+
checkLabel(true);
|
|
52
|
+
};
|
|
53
|
+
const onChange = (e, field) => {
|
|
54
|
+
onChangeProp?.(e, field);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsxs(Wrapper, { inverted, style: wrapperStyle, children: [
|
|
57
|
+
label && /* @__PURE__ */ jsx(Label, { isUp: labelUp, active: hasFocus, error: error && touched, htmlFor: id, autoHeightLabel, children: label }),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
InputWrap,
|
|
60
|
+
{
|
|
61
|
+
error: error && touched,
|
|
62
|
+
dashboard,
|
|
63
|
+
disabled,
|
|
64
|
+
style: inputWrapStyle,
|
|
65
|
+
autoHeightLabel,
|
|
66
|
+
children: /* @__PURE__ */ jsx(
|
|
67
|
+
"input",
|
|
68
|
+
{
|
|
69
|
+
type,
|
|
70
|
+
id,
|
|
71
|
+
name,
|
|
72
|
+
value,
|
|
73
|
+
onChange,
|
|
74
|
+
onBlur,
|
|
75
|
+
onFocus,
|
|
76
|
+
readOnly,
|
|
77
|
+
placeholder,
|
|
78
|
+
disabled,
|
|
79
|
+
style: { WebkitAppearance: "none", WebkitBorderRadius: 0 },
|
|
80
|
+
...restProps
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
};
|
|
87
|
+
Input.propTypes = {
|
|
88
|
+
type: PropTypes.string,
|
|
89
|
+
id: PropTypes.string.isRequired,
|
|
90
|
+
name: PropTypes.string.isRequired,
|
|
91
|
+
label: PropTypes.string,
|
|
92
|
+
placeholder: PropTypes.string,
|
|
93
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
94
|
+
error: PropTypes.bool,
|
|
95
|
+
touched: PropTypes.bool,
|
|
96
|
+
onChange: PropTypes.func,
|
|
97
|
+
onBlur: PropTypes.func,
|
|
98
|
+
onFocus: PropTypes.func,
|
|
99
|
+
readOnly: PropTypes.bool,
|
|
100
|
+
inverted: PropTypes.bool,
|
|
101
|
+
dashboard: PropTypes.bool
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
Input,
|
|
105
|
+
Label as InputLabel,
|
|
106
|
+
InputWrap,
|
|
107
|
+
Wrapper as InputWrapper
|
|
108
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import theme from "../../styles/theme.js";
|
|
3
|
+
const Label = styled.label.withConfig({
|
|
4
|
+
shouldForwardProp: (props) => !["autoHeightLabel", "isUp", "active", "error"].includes(props)
|
|
5
|
+
})`
|
|
6
|
+
z-index: 11;
|
|
7
|
+
display: block;
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: 0;
|
|
10
|
+
top: -2px;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
height: 12px;
|
|
13
|
+
font-size: 11px;
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
letter-spacing: 2px;
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
color: ${() => theme.cBlack};
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
transform: translateY(15px);
|
|
20
|
+
transition:
|
|
21
|
+
transform 0.2s,
|
|
22
|
+
font-size 0.2s;
|
|
23
|
+
|
|
24
|
+
${(props) => props.autoHeightLabel && `
|
|
25
|
+
height:auto;
|
|
26
|
+
position: relative;
|
|
27
|
+
`}
|
|
28
|
+
|
|
29
|
+
${(props) => props.isUp && `
|
|
30
|
+
font-size: 10px;
|
|
31
|
+
transform: translateY(0);
|
|
32
|
+
`}
|
|
33
|
+
|
|
34
|
+
${(props) => props.active && `
|
|
35
|
+
color: ${theme.cPrimary};
|
|
36
|
+
`}
|
|
37
|
+
|
|
38
|
+
${(props) => props.error && `
|
|
39
|
+
color: ${theme.cWarning};
|
|
40
|
+
`}
|
|
41
|
+
`;
|
|
42
|
+
const InputWrap = styled.div.withConfig({
|
|
43
|
+
shouldForwardProp: (props) => !["autoHeightLabel", "disabled", "dashboard", "error"].includes(props)
|
|
44
|
+
})`
|
|
45
|
+
position: relative;
|
|
46
|
+
|
|
47
|
+
& > input {
|
|
48
|
+
z-index: 0;
|
|
49
|
+
font-family: 'Open sans';
|
|
50
|
+
display: block;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 40px;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
line-height: 18px;
|
|
56
|
+
padding: 15px 0;
|
|
57
|
+
padding-bottom: 5px;
|
|
58
|
+
box-shadow: none;
|
|
59
|
+
border: 0;
|
|
60
|
+
outline: 0;
|
|
61
|
+
border-top: 1px solid transparent;
|
|
62
|
+
border-bottom: 1px solid ${() => theme.cGrey};
|
|
63
|
+
color: ${() => theme.cBlack};
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
transition: border-color 0.2s;
|
|
66
|
+
|
|
67
|
+
${(props) => props.autoHeightLabel && `
|
|
68
|
+
height:20px;
|
|
69
|
+
padding-top:0;
|
|
70
|
+
`}
|
|
71
|
+
|
|
72
|
+
&:focus,
|
|
73
|
+
&:hover {
|
|
74
|
+
border-top-color: transparent;
|
|
75
|
+
border-bottom-color: ${() => theme.cPrimary};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&::placeholder {
|
|
79
|
+
color: transparent;
|
|
80
|
+
opacity: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
${(props) => props.disabled && css`
|
|
85
|
+
& > input {
|
|
86
|
+
color: ${() => theme.cGrey2};
|
|
87
|
+
&:focus,
|
|
88
|
+
&:hover {
|
|
89
|
+
border-top-color: transparent;
|
|
90
|
+
border-bottom-color: ${() => theme.cGrey};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`}
|
|
94
|
+
|
|
95
|
+
${(props) => props.dashboard && css`
|
|
96
|
+
& > input {
|
|
97
|
+
border: 0;
|
|
98
|
+
padding: 0;
|
|
99
|
+
height: 22px;
|
|
100
|
+
font-family: 'Open Sans';
|
|
101
|
+
font-weight: 300;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
line-height: 22px;
|
|
104
|
+
letter-spacing: 0.53px;
|
|
105
|
+
text-transform: normal;
|
|
106
|
+
color: ${theme.cBlack};
|
|
107
|
+
|
|
108
|
+
&::placeholder {
|
|
109
|
+
color: ${theme.cGrey2};
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`}
|
|
114
|
+
|
|
115
|
+
${(props) => props.error && `
|
|
116
|
+
color: ${theme.cWarning};
|
|
117
|
+
`}
|
|
118
|
+
`;
|
|
119
|
+
const Wrapper = styled.div.withConfig({
|
|
120
|
+
shouldForwardProp: (props) => !["inverted"].includes(props)
|
|
121
|
+
})`
|
|
122
|
+
position: relative;
|
|
123
|
+
display: block;
|
|
124
|
+
|
|
125
|
+
input:-webkit-autofill {
|
|
126
|
+
border: none;
|
|
127
|
+
border-bottom: 1px solid #e1e1e1;
|
|
128
|
+
box-shadow: 0 0 0px 1000px #fff inset;
|
|
129
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
${(props) => props.inverted && css`
|
|
133
|
+
${Label} {
|
|
134
|
+
color: ${theme.cWhite};
|
|
135
|
+
opacity: 0.4;
|
|
136
|
+
}
|
|
137
|
+
${InputWrap} {
|
|
138
|
+
& > input {
|
|
139
|
+
color: ${theme.cWhite};
|
|
140
|
+
border-bottom-color: ${theme.cWhite};
|
|
141
|
+
|
|
142
|
+
&:focus,
|
|
143
|
+
&:hover {
|
|
144
|
+
border-bottom-color: rgba(255, 255, 255, 0.4);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
`}
|
|
149
|
+
`;
|
|
150
|
+
export {
|
|
151
|
+
InputWrap,
|
|
152
|
+
Label,
|
|
153
|
+
Wrapper
|
|
154
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import stdin_default$1 from "../SvgIcons/CapsLockSvg.js";
|
|
5
|
+
import "../SvgIcons/SocialInstagram.js";
|
|
6
|
+
import { InfoIcon } from "../InfoIcon/InfoIcon.js";
|
|
7
|
+
import { Wrapper, Label, InputWrap } from "./Input.styles.js";
|
|
8
|
+
import { InfoIconWrapper, ShowPassword, BottomWrap, PasswordStrengthWrap, PasswordStrengthIndicators, PasswordStrengthIndicator, PasswordStrengthText, CapslockIndicator } from "./InputPassword.styles.js";
|
|
9
|
+
const PasswordStrength = {
|
|
10
|
+
NONE: "none",
|
|
11
|
+
WEAK: "Weak",
|
|
12
|
+
MEDIUM: "Average",
|
|
13
|
+
STRONG: "Excellent"
|
|
14
|
+
};
|
|
15
|
+
const InputPassword = (props) => {
|
|
16
|
+
const {
|
|
17
|
+
label = "",
|
|
18
|
+
id,
|
|
19
|
+
name,
|
|
20
|
+
value = "",
|
|
21
|
+
error = false,
|
|
22
|
+
touched = false,
|
|
23
|
+
info = "",
|
|
24
|
+
showStrength = false,
|
|
25
|
+
autoComplete = "current-password"
|
|
26
|
+
} = props;
|
|
27
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
28
|
+
const [isCapslockOn, setIsCapslockOn] = useState(false);
|
|
29
|
+
const [labelUp, setLabelUp] = useState(!!value);
|
|
30
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setLabelUp(hasFocus || !!value);
|
|
33
|
+
}, [hasFocus, value]);
|
|
34
|
+
const togglePasswordVisibility = () => {
|
|
35
|
+
setIsPasswordVisible(!isPasswordVisible);
|
|
36
|
+
};
|
|
37
|
+
const handleCapslock = (e) => {
|
|
38
|
+
setIsCapslockOn(e.getModifierState("CapsLock"));
|
|
39
|
+
};
|
|
40
|
+
const onFocus = (e, field) => {
|
|
41
|
+
props.onFocus?.(e, field);
|
|
42
|
+
setHasFocus(true);
|
|
43
|
+
};
|
|
44
|
+
const onBlur = (e, field) => {
|
|
45
|
+
if (props.onBlur) props.onBlur(e, field);
|
|
46
|
+
setHasFocus(false);
|
|
47
|
+
};
|
|
48
|
+
const onChange = (e, field) => {
|
|
49
|
+
props.onChange?.(e, field);
|
|
50
|
+
};
|
|
51
|
+
const passwordStrengthFunction = () => {
|
|
52
|
+
if (value.length === 0) {
|
|
53
|
+
return PasswordStrength.NONE;
|
|
54
|
+
}
|
|
55
|
+
if (value.length < 6) {
|
|
56
|
+
return PasswordStrength.WEAK;
|
|
57
|
+
}
|
|
58
|
+
if (value.length < 11) {
|
|
59
|
+
return PasswordStrength.MEDIUM;
|
|
60
|
+
}
|
|
61
|
+
return PasswordStrength.STRONG;
|
|
62
|
+
};
|
|
63
|
+
const passwordStrength = passwordStrengthFunction();
|
|
64
|
+
return /* @__PURE__ */ jsxs(Wrapper, { children: [
|
|
65
|
+
label && /* @__PURE__ */ jsx(Label, { isUp: labelUp, active: hasFocus, error: error && touched, htmlFor: id, children: label }),
|
|
66
|
+
info && /* @__PURE__ */ jsx(InfoIconWrapper, { isPassword: true, labelUp, children: /* @__PURE__ */ jsx(InfoIcon, { position: "bottom", title: info, noMarginLeft: true }) }),
|
|
67
|
+
/* @__PURE__ */ jsx(InputWrap, { error: error && touched, children: /* @__PURE__ */ jsx(
|
|
68
|
+
"input",
|
|
69
|
+
{
|
|
70
|
+
type: isPasswordVisible ? "text" : "password",
|
|
71
|
+
id,
|
|
72
|
+
name,
|
|
73
|
+
value,
|
|
74
|
+
autoComplete,
|
|
75
|
+
onChange,
|
|
76
|
+
onBlur,
|
|
77
|
+
onFocus,
|
|
78
|
+
onKeyUp: handleCapslock,
|
|
79
|
+
onKeyDown: handleCapslock
|
|
80
|
+
}
|
|
81
|
+
) }),
|
|
82
|
+
/* @__PURE__ */ jsx(ShowPassword, { onClick: togglePasswordVisibility, children: isPasswordVisible ? /* @__PURE__ */ jsx("i", { className: "ion ion-md-eye-off" }) : /* @__PURE__ */ jsx("i", { className: "ion ion-md-eye" }) }),
|
|
83
|
+
/* @__PURE__ */ jsxs(BottomWrap, { children: [
|
|
84
|
+
showStrength ? /* @__PURE__ */ jsxs(PasswordStrengthWrap, { children: [
|
|
85
|
+
/* @__PURE__ */ jsxs(PasswordStrengthIndicators, { passwordStrength, children: [
|
|
86
|
+
/* @__PURE__ */ jsx(PasswordStrengthIndicator, {}),
|
|
87
|
+
/* @__PURE__ */ jsx(PasswordStrengthIndicator, {}),
|
|
88
|
+
/* @__PURE__ */ jsx(PasswordStrengthIndicator, {})
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ jsx(PasswordStrengthText, { children: passwordStrength !== PasswordStrength.NONE && passwordStrength })
|
|
91
|
+
] }) : (
|
|
92
|
+
// info && (
|
|
93
|
+
// <InfoIconWrapper>
|
|
94
|
+
// <InfoIcon position="bottom" title={info} noMarginLeft />
|
|
95
|
+
// </InfoIconWrapper>
|
|
96
|
+
// )
|
|
97
|
+
/* @__PURE__ */ jsx(Fragment, {})
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(CapslockIndicator, { children: isCapslockOn && /* @__PURE__ */ jsx(stdin_default$1, {}) })
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
102
|
+
};
|
|
103
|
+
InputPassword.propTypes = {
|
|
104
|
+
id: PropTypes.string.isRequired,
|
|
105
|
+
name: PropTypes.string.isRequired,
|
|
106
|
+
label: PropTypes.string,
|
|
107
|
+
value: PropTypes.string,
|
|
108
|
+
error: PropTypes.bool,
|
|
109
|
+
touched: PropTypes.bool,
|
|
110
|
+
onChange: PropTypes.func,
|
|
111
|
+
onBlur: PropTypes.func,
|
|
112
|
+
onFocus: PropTypes.func,
|
|
113
|
+
info: PropTypes.string,
|
|
114
|
+
showStrength: PropTypes.bool,
|
|
115
|
+
autoComplete: PropTypes.string
|
|
116
|
+
};
|
|
117
|
+
var stdin_default = InputPassword;
|
|
118
|
+
export {
|
|
119
|
+
InputPassword,
|
|
120
|
+
PasswordStrength,
|
|
121
|
+
stdin_default as default
|
|
122
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { PasswordStrength } from "./InputPassword.js";
|
|
3
|
+
import theme from "../../styles/theme.js";
|
|
4
|
+
const BottomWrap = styled.div`
|
|
5
|
+
position: relative;
|
|
6
|
+
margin-top: 6px;
|
|
7
|
+
`;
|
|
8
|
+
const ShowPassword = styled.div`
|
|
9
|
+
display: block;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: color 0.2s;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
line-height: 16px;
|
|
17
|
+
padding: 12px 0;
|
|
18
|
+
height: 40px;
|
|
19
|
+
width: 20px;
|
|
20
|
+
text-align: right;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
color: ${() => theme.cPrimary};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const CapslockIndicator = styled.div`
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 4px;
|
|
29
|
+
right: 2px;
|
|
30
|
+
|
|
31
|
+
& > svg {
|
|
32
|
+
fill: ${() => theme.cBlack};
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
const PasswordStrengthWrap = styled.div`
|
|
36
|
+
padding: 3px 0;
|
|
37
|
+
display: block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding-right: 20px;
|
|
40
|
+
font-size: 0;
|
|
41
|
+
`;
|
|
42
|
+
const PasswordStrengthIndicator = styled.div`
|
|
43
|
+
display: inline-block;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
width: 32px;
|
|
46
|
+
height: 6px;
|
|
47
|
+
border-radius: 3px;
|
|
48
|
+
margin: 3px 4px;
|
|
49
|
+
background-color: ${() => theme.cGrey};
|
|
50
|
+
`;
|
|
51
|
+
const PasswordStrengthText = styled.div`
|
|
52
|
+
display: inline-block;
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
font-weight: 300;
|
|
55
|
+
font-size: 9px;
|
|
56
|
+
line-height: 12px;
|
|
57
|
+
letter-spacing: 0.4px;
|
|
58
|
+
font-style: italic;
|
|
59
|
+
color: ${() => theme.cText};
|
|
60
|
+
`;
|
|
61
|
+
styled.div`
|
|
62
|
+
&&& > .DayPickerInput {
|
|
63
|
+
z-index: 100;
|
|
64
|
+
display: block;
|
|
65
|
+
position: relative;
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&&& > .DayPickerInput > input {
|
|
70
|
+
font-family: 'Open sans';
|
|
71
|
+
display: block;
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 40px;
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
line-height: 18px;
|
|
77
|
+
padding: 13px 0;
|
|
78
|
+
padding-bottom: 7px;
|
|
79
|
+
border-radius: 0;
|
|
80
|
+
box-shadow: none;
|
|
81
|
+
outline: 0;
|
|
82
|
+
border: 0;
|
|
83
|
+
border-top: 1px solid transparent;
|
|
84
|
+
border-bottom: 1px solid ${() => theme.cGrey};
|
|
85
|
+
color: ${() => theme.cBlack};
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
transition: border-color 0.2s;
|
|
88
|
+
|
|
89
|
+
&:focus,
|
|
90
|
+
&:hover {
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
border-top-color: transparent;
|
|
93
|
+
border-bottom-color: ${() => theme.cPrimary};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&::placeholder {
|
|
97
|
+
color: transparent;
|
|
98
|
+
opacity: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
const InfoIconWrapper = styled.div.withConfig({
|
|
103
|
+
shouldForwardProp: (props) => !["isPassword", "labelUp"].includes(props)
|
|
104
|
+
})`
|
|
105
|
+
display: inline-block;
|
|
106
|
+
vertical-align: middle;
|
|
107
|
+
margin: -2px 0;
|
|
108
|
+
|
|
109
|
+
left: 80px;
|
|
110
|
+
|
|
111
|
+
position: absolute;
|
|
112
|
+
z-index: 10;
|
|
113
|
+
top: 2px;
|
|
114
|
+
|
|
115
|
+
transition: all 0.5s;
|
|
116
|
+
|
|
117
|
+
${({ isPassword }) => isPassword && css`
|
|
118
|
+
opacity: ${({ labelUp }) => labelUp ? 1 : 0};
|
|
119
|
+
pointer-events: ${({ labelUp }) => labelUp ? "auto" : "none"};
|
|
120
|
+
`}
|
|
121
|
+
`;
|
|
122
|
+
const PasswordStrengthIndicators = styled.div.withConfig({
|
|
123
|
+
shouldForwardProp: (props) => !["passwordStrength"].includes(props)
|
|
124
|
+
})`
|
|
125
|
+
display: inline-block;
|
|
126
|
+
vertical-align: middle;
|
|
127
|
+
margin: 0 -4px;
|
|
128
|
+
padding-right: 12px;
|
|
129
|
+
|
|
130
|
+
${(props) => props.passwordStrength === PasswordStrength.WEAK && css`
|
|
131
|
+
${PasswordStrengthIndicator} {
|
|
132
|
+
&:nth-child(1) {
|
|
133
|
+
background-color: ${theme.cWarning};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`}
|
|
137
|
+
|
|
138
|
+
${(props) => props.passwordStrength === PasswordStrength.MEDIUM && css`
|
|
139
|
+
${PasswordStrengthIndicator} {
|
|
140
|
+
&:nth-child(1),
|
|
141
|
+
&:nth-child(2) {
|
|
142
|
+
background-color: ${theme.cYellow};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
`}
|
|
146
|
+
|
|
147
|
+
${(props) => props.passwordStrength === PasswordStrength.STRONG && css`
|
|
148
|
+
${PasswordStrengthIndicator} {
|
|
149
|
+
&:nth-child(1),
|
|
150
|
+
&:nth-child(2),
|
|
151
|
+
&:nth-child(3) {
|
|
152
|
+
background-color: ${theme.cLighterGreen};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`}
|
|
156
|
+
`;
|
|
157
|
+
export {
|
|
158
|
+
BottomWrap,
|
|
159
|
+
CapslockIndicator,
|
|
160
|
+
InfoIconWrapper,
|
|
161
|
+
PasswordStrengthIndicator,
|
|
162
|
+
PasswordStrengthIndicators,
|
|
163
|
+
PasswordStrengthText,
|
|
164
|
+
PasswordStrengthWrap,
|
|
165
|
+
ShowPassword
|
|
166
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PureComponent } from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Wrapper, Label, InputWrap } from "./Input.styles.js";
|
|
5
|
+
class InputUsername extends PureComponent {
|
|
6
|
+
state = {
|
|
7
|
+
labelUp: false,
|
|
8
|
+
hasFocus: false
|
|
9
|
+
};
|
|
10
|
+
componentDidMount() {
|
|
11
|
+
this.checkLabel(false);
|
|
12
|
+
}
|
|
13
|
+
componentDidUpdate() {
|
|
14
|
+
this.checkLabel(false);
|
|
15
|
+
}
|
|
16
|
+
onFocus = (e, field) => {
|
|
17
|
+
const { onFocus } = this.props;
|
|
18
|
+
onFocus?.(e, field);
|
|
19
|
+
this.checkLabel(true);
|
|
20
|
+
};
|
|
21
|
+
onBlur = (e, field) => {
|
|
22
|
+
const { onBlur } = this.props;
|
|
23
|
+
onBlur?.(e, field);
|
|
24
|
+
this.checkLabel(false);
|
|
25
|
+
};
|
|
26
|
+
onChange = (e, field) => {
|
|
27
|
+
const { onChange } = this.props;
|
|
28
|
+
onChange?.(e, field);
|
|
29
|
+
};
|
|
30
|
+
checkLabel = (focus) => {
|
|
31
|
+
const { value } = this.props;
|
|
32
|
+
this.setState({
|
|
33
|
+
labelUp: focus || !!value,
|
|
34
|
+
hasFocus: focus
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
render() {
|
|
38
|
+
const { labelUp, hasFocus } = this.state;
|
|
39
|
+
const {
|
|
40
|
+
type = "text",
|
|
41
|
+
id,
|
|
42
|
+
name,
|
|
43
|
+
label = "",
|
|
44
|
+
placeholder = "",
|
|
45
|
+
value = "",
|
|
46
|
+
error = false,
|
|
47
|
+
touched = false,
|
|
48
|
+
readOnly = false,
|
|
49
|
+
inverted = false,
|
|
50
|
+
dashboard = false
|
|
51
|
+
} = this.props;
|
|
52
|
+
if (value && !labelUp) {
|
|
53
|
+
this.setState({ labelUp: true });
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ jsxs(Wrapper, { inverted, children: [
|
|
56
|
+
label && /* @__PURE__ */ jsx(Label, { isUp: labelUp, active: hasFocus, error: error && touched, htmlFor: id, children: label }),
|
|
57
|
+
/* @__PURE__ */ jsx(InputWrap, { error: error && touched, dashboard, children: /* @__PURE__ */ jsx(
|
|
58
|
+
"input",
|
|
59
|
+
{
|
|
60
|
+
type,
|
|
61
|
+
id,
|
|
62
|
+
name,
|
|
63
|
+
value,
|
|
64
|
+
onChange: this.onChange,
|
|
65
|
+
onBlur: this.onBlur,
|
|
66
|
+
onFocus: this.onFocus,
|
|
67
|
+
readOnly,
|
|
68
|
+
placeholder
|
|
69
|
+
}
|
|
70
|
+
) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
InputUsername.propTypes = {
|
|
75
|
+
type: PropTypes.string,
|
|
76
|
+
id: PropTypes.string.isRequired,
|
|
77
|
+
name: PropTypes.string,
|
|
78
|
+
label: PropTypes.string,
|
|
79
|
+
placeholder: PropTypes.string,
|
|
80
|
+
value: PropTypes.string,
|
|
81
|
+
error: PropTypes.bool,
|
|
82
|
+
touched: PropTypes.bool,
|
|
83
|
+
onChange: PropTypes.func,
|
|
84
|
+
onBlur: PropTypes.func,
|
|
85
|
+
onFocus: PropTypes.func,
|
|
86
|
+
readOnly: PropTypes.bool,
|
|
87
|
+
inverted: PropTypes.bool,
|
|
88
|
+
dashboard: PropTypes.bool
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
InputUsername
|
|
92
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { Container, InputWrap, Input, ButtonWrap } from "./InputWithButton.styles.js";
|
|
5
|
+
const InputWithButton = ({
|
|
6
|
+
children,
|
|
7
|
+
type = "search",
|
|
8
|
+
id,
|
|
9
|
+
name,
|
|
10
|
+
placeholder = "",
|
|
11
|
+
value = "",
|
|
12
|
+
onChange = () => {
|
|
13
|
+
},
|
|
14
|
+
onBlur = () => {
|
|
15
|
+
},
|
|
16
|
+
onFocus = () => {
|
|
17
|
+
},
|
|
18
|
+
separatorTop = false
|
|
19
|
+
}) => /* @__PURE__ */ jsxs(Container, { separatorTop, children: [
|
|
20
|
+
/* @__PURE__ */ jsx(InputWrap, { children: /* @__PURE__ */ jsx(
|
|
21
|
+
Input,
|
|
22
|
+
{
|
|
23
|
+
type,
|
|
24
|
+
id,
|
|
25
|
+
name,
|
|
26
|
+
value,
|
|
27
|
+
onChange,
|
|
28
|
+
onBlur,
|
|
29
|
+
onFocus,
|
|
30
|
+
placeholder
|
|
31
|
+
}
|
|
32
|
+
) }),
|
|
33
|
+
/* @__PURE__ */ jsx(ButtonWrap, { children })
|
|
34
|
+
] });
|
|
35
|
+
InputWithButton.propTypes = {
|
|
36
|
+
children: PropTypes.node.isRequired,
|
|
37
|
+
type: PropTypes.string,
|
|
38
|
+
id: PropTypes.string.isRequired,
|
|
39
|
+
name: PropTypes.string.isRequired,
|
|
40
|
+
placeholder: PropTypes.string,
|
|
41
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
42
|
+
error: PropTypes.bool,
|
|
43
|
+
touched: PropTypes.bool,
|
|
44
|
+
onChange: PropTypes.func,
|
|
45
|
+
onBlur: PropTypes.func,
|
|
46
|
+
onFocus: PropTypes.func,
|
|
47
|
+
separatorTop: PropTypes.bool
|
|
48
|
+
};
|
|
49
|
+
var stdin_default = InputWithButton;
|
|
50
|
+
export {
|
|
51
|
+
InputWithButton,
|
|
52
|
+
stdin_default as default
|
|
53
|
+
};
|