@stokr/components-library 1.0.8 → 1.1.0
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/dist/api/StokrWeb3.js +184 -0
- package/dist/api/fetchData.js +76 -0
- package/dist/api/fetchDataPublic.js +65 -0
- package/dist/components/AccountBalance/AccountBalance.js +53 -0
- package/dist/components/AccountBalance/AccountBalance.stories.js +89 -0
- package/dist/components/AccountBalance/AccountBalance.styles.js +40 -0
- package/dist/components/AdminDashboard/Table/Table.js +170 -0
- package/dist/components/AdminDashboard/Table/Table.styles.js +79 -0
- package/dist/components/AgreementItem/AgreementItem.js +51 -0
- package/dist/components/AgreementItem/AgreementItem.stories.js +110 -0
- package/dist/components/AgreementItem/AgreementItem.styles.js +35 -0
- package/dist/components/AnalyticGraphs/Analytic.js +781 -0
- package/dist/components/AnalyticGraphs/Analytic.styles.js +37 -0
- package/dist/components/BackButton/BackButton.js +32 -0
- package/dist/components/BackButton/BackButton.stories.js +36 -0
- package/dist/components/BackButton/BackButton.styles.js +76 -0
- package/dist/components/Background/Background.js +45 -0
- package/dist/components/Background/Background.stories.js +79 -0
- package/dist/components/Background/Background.styles.js +76 -0
- package/dist/components/BarChart/BarChart.js +306 -0
- package/dist/components/BarChart/BarChart.stories.js +71 -0
- package/dist/components/BarChart/BarChart.styles.js +33 -0
- package/dist/components/BarChartLegend/BarChartLegend.js +106 -0
- package/dist/components/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/components/BasicTable/BasicTable.js +32 -0
- package/dist/components/BasicTable/BasicTable.stories.js +64 -0
- package/dist/components/BasicTable/BasicTable.styles.js +52 -0
- package/dist/components/Button/Button.stories.js +80 -0
- package/dist/components/Button/Button.styles.js +83 -0
- package/dist/components/ButtonContainer/ButtonContainer.styles.js +18 -0
- package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +46 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.js +34 -0
- package/dist/components/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +34 -0
- package/dist/components/ChartBox/ChartBox.js +44 -0
- package/dist/components/ChartBox/ChartBox.stories.js +20 -0
- package/dist/components/ChartBox/ChartBox.styles.js +33 -0
- package/dist/components/ChartBox/ChartBoxDistribution.js +30 -0
- package/dist/components/ChartBox/ChartBoxDistribution.stories.js +21 -0
- package/dist/components/ChartLegend/ChartLegend.js +62 -0
- package/dist/components/ChartLegend/ChartLegend.stories.js +88 -0
- package/dist/components/ChartLegend/ChartLegend.styles.js +64 -0
- package/dist/components/Checkbox/Checkbox.js +116 -0
- package/dist/components/Checkbox/Checkbox.stories.js +93 -0
- package/dist/components/Checkbox/Checkbox.styles.js +45 -0
- package/dist/components/Checklist/UserChecklist.js +298 -0
- package/dist/components/Checklist/UserChecklist.stories.js +352 -0
- package/dist/components/ComponentScroll/ComponentScroll.js +100 -0
- package/dist/components/ComponentScroll/ComponentScroll.stories.js +102 -0
- package/dist/components/ComponentScroll/ComponentScroll.styles.js +66 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.styles.js +68 -0
- package/dist/components/CryptoAddress/ComponentWrap.js +37 -0
- package/dist/components/CryptoAddress/CryptoAddress.js +187 -0
- package/dist/components/CryptoAddress/CryptoAddress.stories.js +211 -0
- package/dist/components/CryptoAddress/CryptoAddress.styles.js +191 -0
- package/dist/components/CryptoAddress/RadioWrap.js +56 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +54 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +75 -0
- package/dist/components/CryptoAddressDetails/CryptoAddressDetails.styles.js +67 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +40 -0
- package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +59 -0
- package/dist/components/DonutChart/DonutChart.js +182 -0
- package/dist/components/DonutChart/DonutChart.stories.js +58 -0
- package/dist/components/DonutChart/DonutChart.styles.js +50 -0
- package/dist/components/DoubleButton/DoubleButton.styles.js +22 -0
- package/dist/components/ErrorMessage/ErrorMessage.styles.js +15 -0
- package/dist/components/FAQ/FAQ.js +75 -0
- package/dist/components/FAQ/FAQ.stories.js +75 -0
- package/dist/components/FAQ/FAQ.styles.js +48 -0
- package/dist/components/Footer/Footer.js +66 -0
- package/dist/components/Footer/Footer.stories.js +55 -0
- package/dist/components/Footer/Footer.styles.js +74 -0
- package/dist/components/Footer/FooterLayout.js +119 -0
- package/dist/components/Footer/FooterLayout.stories.js +32 -0
- package/dist/components/Footer/FooterMenu.js +117 -0
- package/dist/components/Footer/FooterMenu.stories.js +122 -0
- package/dist/components/Footer/FooterMenu.styles.js +80 -0
- package/dist/components/Footer/index.js +27 -0
- package/dist/components/Footer/sicos-logo.svg +1 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +127 -0
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +43 -0
- package/dist/components/Form/Form.js +68 -0
- package/dist/components/Form/Form.stories.js +36 -0
- package/dist/components/Form/Form.styles.js +59 -0
- package/dist/components/FullscreenCard/FullscreenCard.styles.js +32 -0
- package/dist/components/Grid/Grid.styles.js +68 -0
- package/dist/components/Header/Header.js +461 -0
- package/dist/components/Header/Header.stories.js +223 -0
- package/dist/components/Header/Header.styles.js +182 -0
- package/dist/components/Icon/Icon.style.js +71 -0
- package/dist/components/InfoIcon/InfoIcon.js +50 -0
- package/dist/components/InfoIcon/InfoIcon.stories.js +53 -0
- package/dist/components/InfoIcon/InfoIcon.styles.js +31 -0
- package/dist/components/InfoPanel/InfoPanel.js +146 -0
- package/dist/components/Input/DatePickerInput.js +85 -0
- package/dist/components/Input/DatePickerInput.stories.js +92 -0
- package/dist/components/Input/DatePickerInput.styles.js +29 -0
- package/dist/components/Input/Input.js +125 -0
- package/dist/components/Input/Input.stories.js +149 -0
- package/dist/components/Input/Input.styles.js +53 -0
- package/dist/components/Input/InputPassword.js +151 -0
- package/dist/components/Input/InputPassword.stories.js +86 -0
- package/dist/components/Input/InputPassword.styles.js +80 -0
- package/dist/components/Input/RangeInput.js +97 -0
- package/dist/components/Input/RangeInput.stories.js +62 -0
- package/dist/components/Input/RangeInput.styles.js +53 -0
- package/dist/components/Input/Select.js +148 -0
- package/dist/components/Input/Select.stories.js +143 -0
- package/dist/components/Input/Select.styles.js +65 -0
- package/dist/components/InvestCalculator/InvestCalculator.js +367 -0
- package/dist/components/InvestCalculator/InvestCalculator.stories.js +138 -0
- package/dist/components/InvestCalculator/InvestCalculator.styles.js +66 -0
- package/dist/components/InvestmentStat/InvestmentStat.js +40 -0
- package/dist/components/InvestmentStat/InvestmentStat.stories.js +57 -0
- package/dist/components/InvestmentStat/InvestmentStat.styles.js +43 -0
- package/dist/components/KYCFlow/BasicInfo.js +489 -0
- package/dist/components/KYCFlow/Confirmation.js +51 -0
- package/dist/components/KYCFlow/DocumentFileUpload.js +276 -0
- package/dist/components/KYCFlow/DocumentScan.js +74 -0
- package/dist/components/KYCFlow/DocumentScanUpload.js +258 -0
- package/dist/components/KYCFlow/DocumentSelect.js +148 -0
- package/dist/components/KYCFlow/DocumentSuccess.js +64 -0
- package/dist/components/KYCFlow/DocumentUpload.js +54 -0
- package/dist/components/KYCFlow/DocumentVerificationType.js +161 -0
- package/dist/components/KYCFlow/FaceScan.js +55 -0
- package/dist/components/KYCFlow/FaceScanRecognition.js +60 -0
- package/dist/components/KYCFlow/FaceScanSuccess.js +59 -0
- package/dist/components/KYCFlow/Terms.js +142 -0
- package/dist/components/KYCFlow/_styles.js +160 -0
- package/dist/components/KYCFlow/index.js +97 -0
- package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +41 -0
- package/dist/components/LatestUpdate/LatestUpdate.js +51 -0
- package/dist/components/LatestUpdate/LatestUpdate.stories.js +63 -0
- package/dist/components/LatestUpdate/LatestUpdate.styles.js +71 -0
- package/dist/components/Layout/Layout-func-no-work.js +78 -0
- package/dist/components/Layout/Layout.js +103 -0
- package/dist/components/Layout/Layout.stories.js +67 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.js +47 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +71 -0
- package/dist/components/LearnMoreCarousel/LearnMoreCarousel.styles.js +43 -0
- package/dist/components/LearnMorePage/LearnMore.js +255 -0
- package/dist/components/LearnMorePage/LearnMore.shared.styles.js +40 -0
- package/dist/components/LearnMorePage/LearnMore.stories.js +52 -0
- package/dist/components/LearnMorePage/LearnMore.styles.js +120 -0
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +87 -0
- package/dist/components/LearnMorePage/LearnMoreItem.js +75 -0
- package/dist/components/LearnMorePage/LearnMoreItem.stories.js +66 -0
- package/dist/components/LearnMorePage/LearnMoreItem.styles.js +87 -0
- package/dist/components/LearnMoreSection/LearnMore.js +199 -0
- package/dist/components/LearnMoreSection/LearnMore.stories.js +34 -0
- package/dist/components/LearnMoreSection/LearnMore.styles.js +73 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.js +52 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +63 -0
- package/dist/components/LearnMoreSection/LearnMoreItem.styles.js +50 -0
- package/dist/components/LoginModal/LoginModal.js +182 -0
- package/dist/components/LoginModal/LoginModal.stories.js +70 -0
- package/dist/components/MainMenu/DynamicMainMenu.js +51 -0
- package/dist/components/MainMenu/MainMenu.js +261 -0
- package/dist/components/MainMenu/MainMenu.styles.js +125 -0
- package/dist/components/MatomoConnect/Matomo.js +490 -0
- package/dist/components/MatomoConnect/Matomo_fuckup.js +387 -0
- package/dist/components/MenuNav/MenuNav.styles.js +42 -0
- package/dist/components/Modal/Modal.js +139 -0
- package/dist/components/Modal/Modal.stories.js +83 -0
- package/dist/components/Modal/Modal.styles.js +142 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.js +48 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +73 -0
- package/dist/components/MultiProgressBar/MultiProgressBar.styles.js +41 -0
- package/dist/components/Newsletter/Newsletter.js +162 -0
- package/dist/components/Newsletter/Newsletter.stories.js +20 -0
- package/dist/components/Newsletter/Newsletter.styles.js +83 -0
- package/dist/components/NotificationContext/NotificationContext.js +173 -0
- package/dist/components/NotificationContext/NotificationContext.stories.js +33 -0
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +26 -0
- package/dist/components/Number/Number.js +35 -0
- package/dist/components/Number/Number.stories.js +41 -0
- package/dist/components/Number/Number.styles.js +20 -0
- package/dist/components/PageTransition/PageTransition.js +57 -0
- package/dist/components/Process/Process.stories.js +48 -0
- package/dist/components/Process/Process.styles.js +33 -0
- package/dist/components/ProfileBadge/ProfileBadge.js +53 -0
- package/dist/components/ProfileBadge/ProfileBadge.stories.js +49 -0
- package/dist/components/ProfileBadge/ProfileBadge.styles.js +32 -0
- package/dist/components/ProfileBox/ProfileBox.js +39 -0
- package/dist/components/ProfileBox/ProfileBox.stories.js +39 -0
- package/dist/components/ProfileBox/ProfileBox.styles.js +49 -0
- package/dist/components/ProfileHeader/ProfileHeader-CLb4.js +477 -0
- package/dist/components/ProfileHeader/ProfileHeader.js +313 -0
- package/dist/components/ProfileHeader/ProfileHeader.styles.js +87 -0
- package/dist/components/ProfileStat/ProfileStat.js +42 -0
- package/dist/components/ProfileStat/ProfileStat.stories.js +72 -0
- package/dist/components/ProfileStat/ProfileStat.styles.js +42 -0
- package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +69 -0
- package/dist/components/ROI/ROI.js +312 -0
- package/dist/components/ROI/ROI.styles.js +63 -0
- package/dist/components/ROI/ROIChart.js +469 -0
- package/dist/components/ROI/ROIChart.styles.js +33 -0
- package/dist/components/ROI/ROIModal.js +91 -0
- package/dist/components/ROI/ROIScenarioBox.js +55 -0
- package/dist/components/ROI/ROIScenarioBox.styles.js +52 -0
- package/dist/components/Radio/Radio.js +68 -0
- package/dist/components/Radio/Radio.stories.js +77 -0
- package/dist/components/Radio/Radio.styles.js +31 -0
- package/dist/components/RefreshButton/RefreshButton.js +21 -0
- package/dist/components/RefreshButton/RefreshButton.stories.js +43 -0
- package/dist/components/RefreshButton/RefreshButton.styles.js +39 -0
- package/dist/components/RegisterAlgorand/AlgoAddressName.js +138 -0
- package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +444 -0
- package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +47 -0
- package/dist/components/RegisterAlgorand/AlgoSuccess.js +38 -0
- package/dist/components/RegisterAlgorand/Algorand.stories.js +80 -0
- package/dist/components/RegisterAlgorand/ChooseWallet.js +97 -0
- package/dist/components/RegisterAlgorand/SelectProject.js +90 -0
- package/dist/components/RegisterAlgorand/_styles.js +28 -0
- package/dist/components/RegisterAlgorand/flow.js +409 -0
- package/dist/components/RegisterAlgorand/flowWithMemo.js +410 -0
- package/dist/components/RegisterAlgorand/index.js +48 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +40 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +34 -0
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +16 -0
- package/dist/components/RegisterEthereum/EthAddressLedger.js +226 -0
- package/dist/components/RegisterEthereum/EthAddressMetamask.js +204 -0
- package/dist/components/RegisterEthereum/EthAddressName.js +135 -0
- package/dist/components/RegisterEthereum/EthConnectLedger.js +194 -0
- package/dist/components/RegisterEthereum/EthConnectMetamask.js +35 -0
- package/dist/components/RegisterEthereum/EthFinish.js +41 -0
- package/dist/components/RegisterEthereum/EthIntro.js +95 -0
- package/dist/components/RegisterEthereum/_styles.js +28 -0
- package/dist/components/RegisterEthereum/index.js +68 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.js +106 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +66 -0
- package/dist/components/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +48 -0
- package/dist/components/RegisterLiquidSteps/complete.js +37 -0
- package/dist/components/RegisterLiquidSteps/flow.js +197 -0
- package/dist/components/RegisterLiquidSteps/index.js +52 -0
- package/dist/components/RegisterLiquidSteps/register-liquid.js +240 -0
- package/dist/components/RegisterModal/RegisterModal.js +180 -0
- package/dist/components/RegisterModal/RegisterModal.stories.js +47 -0
- package/dist/components/RequestDataBox/RequestDataBox.js +31 -0
- package/dist/components/RequestDataBox/RequestDataBox.stories.js +41 -0
- package/dist/components/RequestDataBox/RequestDataBox.styles.js +31 -0
- package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +185 -0
- package/dist/components/RiskQuestionnaire/_styles.js +15 -0
- package/dist/components/SEO/SEO.js +71 -0
- package/dist/components/SEO/SEO.stories.js +64 -0
- package/dist/components/SectionTitle/SectionTitle.styles.js +15 -0
- package/dist/components/SideLine/SideLine.js +15 -0
- package/dist/components/SideLine/SideLine.stories.js +31 -0
- package/dist/components/SideLine/SideLine.styles.js +26 -0
- package/dist/components/SigningSubflow/SignSubAddressMetamask.js +137 -0
- package/dist/components/SigningSubflow/SignSubConnectLedger.js +150 -0
- package/dist/components/SigningSubflow/SignSubConnectMetamask.js +137 -0
- package/dist/components/SigningSubflow/SignSubIntro.js +54 -0
- package/dist/components/SigningSubflow/SignSubSendLedger.js +150 -0
- package/dist/components/SigningSubflow/SignSubSendMetamask.js +62 -0
- package/dist/components/SigningSubflow/SignSubTransactionLedger.js +161 -0
- package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +166 -0
- package/dist/components/SigningSubflow/_styles.js +45 -0
- package/dist/components/SigningSubflow/index.js +74 -0
- package/dist/components/Slider/Slider.js +50 -0
- package/dist/components/Slider/Slider.stories.js +73 -0
- package/dist/components/Slider/Slider.styles.js +23 -0
- package/dist/components/SpanButton/SpanButton.styles.js +15 -0
- package/dist/components/StatusBadge/StatusBadge.styles.js +20 -0
- package/dist/components/StepController/StepController.js +111 -0
- package/dist/components/StepController/StepController.stories.js +64 -0
- package/dist/components/StepController/StepController.styles.js +26 -0
- package/dist/components/StepController/StepControllerContext.js +104 -0
- package/dist/components/StepController/StepControllerProgress.js +40 -0
- package/dist/components/StepController/StepControllerProgress.stories.js +53 -0
- package/dist/components/StepsProgress/StepsProgress.js +146 -0
- package/dist/components/StepsProgress/StepsProgress.stories.js +51 -0
- package/dist/components/StepsProgress/StepsProgress.styles.js +36 -0
- package/dist/components/StokrLoader/StokrLoader.js +32 -0
- package/dist/components/StokrLoader/media.js +27 -0
- package/dist/components/SvgIcons/AdminBadgeSvg.js +26 -0
- package/dist/components/SvgIcons/CameraSvg.js +36 -0
- package/dist/components/SvgIcons/CapsLockSvg.js +31 -0
- package/dist/components/SvgIcons/DocumentBackSvg.js +35 -0
- package/dist/components/SvgIcons/DocumentSmallSvg.js +61 -0
- package/dist/components/SvgIcons/DocumentSvg.js +38 -0
- package/dist/components/SvgIcons/Early.js +24 -0
- package/dist/components/SvgIcons/EthSvg.js +40 -0
- package/dist/components/SvgIcons/EurSvg.js +26 -0
- package/dist/components/SvgIcons/FaceScanIconSvg.js +31 -0
- package/dist/components/SvgIcons/FourSvg.js +21 -0
- package/dist/components/SvgIcons/Glassess.js +29 -0
- package/dist/components/SvgIcons/LogoSvg.js +24 -0
- package/dist/components/SvgIcons/OneSvg.js +23 -0
- package/dist/components/SvgIcons/PassportSvg.js +56 -0
- package/dist/components/SvgIcons/RefreshSvg.js +27 -0
- package/dist/components/SvgIcons/SocialFacebook.js +25 -0
- package/dist/components/SvgIcons/SocialInstagram.js +26 -0
- package/dist/components/SvgIcons/SocialLinkedIn.js +25 -0
- package/dist/components/SvgIcons/SocialMedium.js +25 -0
- package/dist/components/SvgIcons/SocialReddit.js +25 -0
- package/dist/components/SvgIcons/SocialTelegram.js +25 -0
- package/dist/components/SvgIcons/SocialTwitter.js +28 -0
- package/dist/components/SvgIcons/SocialYoutube.js +25 -0
- package/dist/components/SvgIcons/ThreeSvg.js +20 -0
- package/dist/components/SvgIcons/TwoSidedDocumentSvg.js +82 -0
- package/dist/components/SvgIcons/TwoSvg.js +23 -0
- package/dist/components/SvgIcons/UpdateDefaultSvg.js +29 -0
- package/dist/components/SvgIcons/UpdateHardSvg.js +25 -0
- package/dist/components/SvgIcons/UpdateSoftSvg.js +27 -0
- package/dist/components/SvgIcons/UploadSvg.js +34 -0
- package/dist/components/SvgIcons/VerifiedBadge.js +23 -0
- package/dist/components/SvgIcons/index.js +223 -0
- package/dist/components/Switch/Switch.js +70 -0
- package/dist/components/Switch/Switch.stories.js +87 -0
- package/dist/components/Switch/Switch.styles.js +47 -0
- package/dist/components/Tabs/Tabs.js +70 -0
- package/dist/components/Tabs/Tabs.stories.js +40 -0
- package/dist/components/Tabs/Tabs.styles.js +18 -0
- package/dist/components/TabsNav/TabNav.js +31 -0
- package/dist/components/TabsNav/TabNav.stories.js +45 -0
- package/dist/components/TabsNav/TabsNav.js +43 -0
- package/dist/components/TabsNav/TabsNav.stories.js +41 -0
- package/dist/components/TabsNav/TabsNav.styles.js +43 -0
- package/dist/components/TeamOverview/TeamOverview.js +125 -0
- package/dist/components/TeamOverview/TeamOverview.stories.js +81 -0
- package/dist/components/TeamOverview/TeamOverview.styles.js +81 -0
- package/dist/components/Text/Headline.js +29 -0
- package/dist/components/Text/Headline.stories.js +52 -0
- package/dist/components/Text/StyledText.js +19 -0
- package/dist/components/Text/Text.stories.js +75 -0
- package/dist/components/Text/Text.styles.js +40 -0
- package/dist/components/TextLink/TextLink.styles.js +30 -0
- package/dist/components/ToDoList/ToDoList.js +189 -0
- package/dist/components/ToDoList/ToDoList.stories.js +138 -0
- package/dist/components/ToDoList/ToDoList.styles.js +83 -0
- package/dist/components/ToDoList/ToDoListTask.js +120 -0
- package/dist/components/ToDoList/ToDoListTask.stories.js +73 -0
- package/dist/components/ToDoList/ToDoListTask.styles.js +74 -0
- package/dist/components/TransactionDetails/TransactionDetails.js +46 -0
- package/dist/components/TransactionDetails/TransactionDetails.stories.js +60 -0
- package/dist/components/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/components/TransactionInfo/TransactionInfo.js +58 -0
- package/dist/components/TransactionInfo/TransactionInfo.stories.js +65 -0
- package/dist/components/TransactionInfo/TransactionInfo.styles.js +54 -0
- package/dist/components/TwoFactorModal/TwoFactorModal.js +122 -0
- package/dist/components/breakdown/Breakdown.js +57 -0
- package/dist/components/breakdown/index.js +27 -0
- package/dist/components/context/Auth.js +207 -0
- package/dist/components/context/AuthContext.js +334 -0
- package/dist/components/icons/Arrow.js +70 -0
- package/dist/components/icons/Arrow.stories.js +49 -0
- package/dist/components/icons/ArrowSimple.js +59 -0
- package/dist/components/icons/ArrowSimple.stories.js +55 -0
- package/dist/components/icons/Check.js +43 -0
- package/dist/components/icons/Check.stories.js +25 -0
- package/dist/components/icons/Facebook.js +26 -0
- package/dist/components/icons/Facebook.stories.js +24 -0
- package/dist/components/icons/Info.js +55 -0
- package/dist/components/icons/Info.stories.js +19 -0
- package/dist/components/icons/Instagram.js +26 -0
- package/dist/components/icons/Instagram.stories.js +24 -0
- package/dist/components/icons/LinkIcon.js +34 -0
- package/dist/components/icons/LinkIcon.stories.js +24 -0
- package/dist/components/icons/LinkedIn.js +43 -0
- package/dist/components/icons/LinkedIn.stories.js +19 -0
- package/dist/components/icons/Medium.js +42 -0
- package/dist/components/icons/Medium.stories.js +19 -0
- package/dist/components/icons/Reddit.js +32 -0
- package/dist/components/icons/Reddit.stories.js +24 -0
- package/dist/components/icons/Share.js +62 -0
- package/dist/components/icons/Share.stories.js +19 -0
- package/dist/components/icons/Telegram.js +42 -0
- package/dist/components/icons/Telegram.stories.js +19 -0
- package/dist/components/icons/Twitter.js +26 -0
- package/dist/components/icons/Twitter.stories.js +24 -0
- package/dist/components/icons/X.js +26 -0
- package/dist/components/icons/X.stories.js +19 -0
- package/dist/components/icons/Youtube.js +26 -0
- package/dist/components/icons/Youtube.stories.js +24 -0
- package/dist/components/icons/index.js +170 -0
- package/dist/components/renderToBody/index.js +27 -0
- package/dist/components/renderToBody/renderToBody.js +68 -0
- package/dist/components/taxId/TaxId.stories.js +56 -0
- package/dist/components/taxId/complete.js +32 -0
- package/dist/components/taxId/flow.js +71 -0
- package/dist/components/taxId/index.js +27 -0
- package/dist/components/taxId/register-taxid.js +203 -0
- package/dist/components/video/Video.js +174 -0
- package/dist/components/video/Video.stories.js +56 -0
- package/dist/components/video/index.js +27 -0
- package/dist/constants/globalVariables.js +16 -0
- package/dist/constants/style.js +52 -0
- package/dist/index.js +1050 -2
- package/dist/model/axios.js +18 -0
- package/dist/model/axiosPublic.js +18 -0
- package/dist/static/fonts/Ionicons/ionicons.min.css +13 -0
- package/dist/static/fonts/icomoon/selection.json +1 -0
- package/dist/static/fonts/icomoon/style.css +137 -0
- package/dist/static/images/1.svg +4 -0
- package/dist/static/images/2.svg +4 -0
- package/dist/static/images/3.svg +3 -0
- package/dist/static/images/4.svg +3 -0
- package/dist/static/images/Glassess.svg +5 -0
- package/dist/static/images/VerifiedBadge.svg +1 -0
- package/dist/static/images/admin-badge.svg +3 -0
- package/dist/static/images/amazon-logo.png +0 -0
- package/dist/static/images/arrow-down-black.svg +21 -0
- package/dist/static/images/avatar-cog.png +0 -0
- package/dist/static/images/avatar.png +0 -0
- package/dist/static/images/background.png +0 -0
- package/dist/static/images/camera.svg +1 -0
- package/dist/static/images/caps-lock.svg +6 -0
- package/dist/static/images/covers/blockchain.png +0 -0
- package/dist/static/images/covers/country.jpg +0 -0
- package/dist/static/images/covers/ethereum.jpg +0 -0
- package/dist/static/images/covers/index.png +0 -0
- package/dist/static/images/covers/liquid.png +0 -0
- package/dist/static/images/covers/money.png +0 -0
- package/dist/static/images/covers/overview.jpg +0 -0
- package/dist/static/images/covers/risk-questionnaire.jpg +0 -0
- package/dist/static/images/covers/rocket.png +0 -0
- package/dist/static/images/covers/verify-identity.jpg +0 -0
- package/dist/static/images/covers/virtual-iban.jpg +0 -0
- package/dist/static/images/document-back.svg +1 -0
- package/dist/static/images/document-small.svg +1 -0
- package/dist/static/images/document.svg +1 -0
- package/dist/static/images/early-adopter.png +0 -0
- package/dist/static/images/early-adopter.svg +1 -0
- package/dist/static/images/eth.svg +10 -0
- package/dist/static/images/eur.svg +3 -0
- package/dist/static/images/face-scan-icon.svg +1 -0
- package/dist/static/images/favicon.png +0 -0
- package/dist/static/images/favicon.svg +57 -0
- package/dist/static/images/google-logo.png +0 -0
- package/dist/static/images/graduation.png +0 -0
- package/dist/static/images/hdd.png +0 -0
- package/dist/static/images/lemonway.png +0 -0
- package/dist/static/images/logo.svg +1 -0
- package/dist/static/images/member-item-picture.png +0 -0
- package/dist/static/images/one.jpg +0 -0
- package/dist/static/images/passport.svg +1 -0
- package/dist/static/images/process-waiting.gif +0 -0
- package/dist/static/images/profile-picture-placeholder.png +0 -0
- package/dist/static/images/profile-picture-placeholder.svg +1 -0
- package/dist/static/images/profile-picture.png +0 -0
- package/dist/static/images/refresh.svg +9 -0
- package/dist/static/images/shark.jpg +0 -0
- package/dist/static/images/sicos.png +0 -0
- package/dist/static/images/slider/1.jpg +0 -0
- package/dist/static/images/slider/2.jpg +0 -0
- package/dist/static/images/slider/3.jpg +0 -0
- package/dist/static/images/social/facebook.svg +3 -0
- package/dist/static/images/social/linkedin.svg +3 -0
- package/dist/static/images/social/medium.svg +3 -0
- package/dist/static/images/social/reddit.svg +3 -0
- package/dist/static/images/social/telegram.svg +3 -0
- package/dist/static/images/social/twitter.svg +3 -0
- package/dist/static/images/social/youtube.svg +3 -0
- package/dist/static/images/three.jpg +0 -0
- package/dist/static/images/two-sided-document.svg +26 -0
- package/dist/static/images/two.jpg +0 -0
- package/dist/static/images/upload.svg +1 -0
- package/dist/static/images/user-profile.png +0 -0
- package/dist/static/videos/Capybara-with-mandarin orange-on-head.mp4 +0 -0
- package/dist/styles/colors.js +55 -0
- package/dist/styles/fonts.js +34 -0
- package/dist/styles/global.js +18 -0
- package/dist/styles/grid.js +16 -0
- package/dist/styles/reactTippy.js +12 -0
- package/dist/styles/rwd.js +52 -0
- package/dist/styles/semanticUi.js +12 -0
- package/dist/styles/spacing.js +12 -0
- package/dist/styles/theme.js +43 -0
- package/dist/utils/allowed-countries-list.js +1375 -0
- package/dist/utils/breakpoint.js +19 -0
- package/dist/utils/countries-list.js +1008 -0
- package/dist/utils/customHooks.js +54 -0
- package/dist/utils/delete-redirect-cookie-and-navigate.js +20 -0
- package/dist/utils/fix-decimals.js +11 -0
- package/dist/utils/get-cookie-domain.js +16 -0
- package/dist/utils/get-short-address.js +10 -0
- package/dist/utils/km_ify.js +38 -0
- package/dist/utils/lock-body.js +20 -0
- package/dist/utils/redirect-url.js +10 -0
- package/dist/utils/set-redirect-cookie.js +20 -0
- package/dist/utils/withRouter.js +20 -0
- package/package.json +84 -89
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -7
- package/Dockerfile +0 -20
- package/buildpushndeploy.sh +0 -9
- package/devops/Dockerfile +0 -20
- package/devops/Jenkinsfile +0 -56
- package/devops/ansible/docker-stack-deploy.yml +0 -32
- package/devops/ansible/hosts.ini +0 -7
- package/devops/docker-compose.yml +0 -25
- package/dist/08418fc6c324f51f7e56.svg +0 -1
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/index.js.LICENSE.txt +0 -1
- package/docker-compose.yml +0 -25
- package/storybook-static/favicon.ico +0 -0
- /package/dist/{03f9f978feb2b015b6812ba10f689967.png → components/Footer/lemonway.png} +0 -0
- /package/dist/{98b7d3182f652f021bc3.ttf → static/fonts/Ionicons/Ionicons.ttf} +0 -0
- /package/dist/{4e528d6445ca1974c313.woff → static/fonts/Ionicons/Ionicons.woff} +0 -0
- /package/dist/{643c37f102b41f7f90c3.woff2 → static/fonts/Ionicons/Ionicons.woff2} +0 -0
- /package/dist/{9bea22b57dc165ed4382.ttf → static/fonts/OpenSans/OpenSans-Bold.ttf} +0 -0
- /package/dist/{a750292d6a0b5a760679.woff → static/fonts/OpenSans/OpenSans-Bold.woff} +0 -0
- /package/dist/{cbfc24090ef8bacab132.woff2 → static/fonts/OpenSans/OpenSans-Bold.woff2} +0 -0
- /package/dist/{bcb6531cf820152b7538.ttf → static/fonts/OpenSans/OpenSans-ExtraBold.ttf} +0 -0
- /package/dist/{81f3ef07b7952e249da1.woff → static/fonts/OpenSans/OpenSans-ExtraBold.woff} +0 -0
- /package/dist/{21e493d43617de76dbc7.woff2 → static/fonts/OpenSans/OpenSans-ExtraBold.woff2} +0 -0
- /package/dist/{55053cc0a8e6482eca64.ttf → static/fonts/OpenSans/OpenSans-Light.ttf} +0 -0
- /package/dist/{c6a4bc1bd034d6303053.woff → static/fonts/OpenSans/OpenSans-Light.woff} +0 -0
- /package/dist/{179ef2df02cb0b68c9fd.woff2 → static/fonts/OpenSans/OpenSans-Light.woff2} +0 -0
- /package/dist/{d97d7385fe8771611848.ttf → static/fonts/OpenSans/OpenSans-Regular.ttf} +0 -0
- /package/dist/{9ec738fbb66068dc1ca7.woff → static/fonts/OpenSans/OpenSans-Regular.woff} +0 -0
- /package/dist/{3caa0d4f9b7d58668066.woff2 → static/fonts/OpenSans/OpenSans-Regular.woff2} +0 -0
- /package/dist/{d2b1865643b98c0e8b54.ttf → static/fonts/OpenSans/OpenSans-SemiBold.ttf} +0 -0
- /package/dist/{39f5961b2d3eb4aa5bf5.woff → static/fonts/OpenSans/OpenSans-SemiBold.woff} +0 -0
- /package/dist/{311956ded96d3fd2813d.woff2 → static/fonts/OpenSans/OpenSans-SemiBold.woff2} +0 -0
- /package/dist/{2640959b1f9381cde047.eot → static/fonts/icomoon/icomoon.eot} +0 -0
- /package/dist/{07233f511246c9825a0d58e5ab2641f3.svg → static/fonts/icomoon/icomoon.svg} +0 -0
- /package/dist/{a1d7666a48f976227722.ttf → static/fonts/icomoon/icomoon.ttf} +0 -0
- /package/dist/{4c3c428d0ce82f840710.woff → static/fonts/icomoon/icomoon.woff} +0 -0
- /package/dist/{14aa35d4e84aebef77cf00b421fc393a.gif → static/images/address-refreshing.gif} +0 -0
- /package/dist/{2ba2db4ff86a2663686a100e75b50ba9.png → static/images/avatar-placeholder.png} +0 -0
- /package/dist/{b85a961d44cc55c58050cbf7c53dd505.png → static/images/whales.png} +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ImagesCarousel = ImagesCarousel;
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _Slider = _interopRequireDefault(require("../Slider/Slider"));
|
|
11
|
+
var _Slider2 = require("../Slider/Slider.styles");
|
|
12
|
+
var _CaptialRaisedSummary = _interopRequireDefault(require("../CapitalRaisedSummary/CaptialRaisedSummary"));
|
|
13
|
+
var _Grid = require("../Grid/Grid.styles");
|
|
14
|
+
var _InvestmentStat = _interopRequireDefault(require("../InvestmentStat/InvestmentStat"));
|
|
15
|
+
var _parseBlockContent = _interopRequireDefault(require("../../utils/parseBlockContent"));
|
|
16
|
+
var _ProjectContext = require("context/Project/ProjectContext");
|
|
17
|
+
var _video = require("../video");
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
25
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
30
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
31
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
32
|
+
function ImagesCarousel(params) {
|
|
33
|
+
var _useState = (0, _react.useState)(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
shouldRenderPage = _useState2[0],
|
|
36
|
+
setShouldRenderPage = _useState2[1];
|
|
37
|
+
var _useState3 = (0, _react.useState)([]),
|
|
38
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
39
|
+
carouselItems = _useState4[0],
|
|
40
|
+
setCarouselItems = _useState4[1];
|
|
41
|
+
// const [venture, setVenture] = useState({})
|
|
42
|
+
var _useContext = (0, _react.useContext)(_ProjectContext.ProjectContext),
|
|
43
|
+
project = _useContext.project;
|
|
44
|
+
var _useState5 = (0, _react.useState)(false),
|
|
45
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
46
|
+
isVideoOpen = _useState6[0],
|
|
47
|
+
setIsVideoOpen = _useState6[1];
|
|
48
|
+
var _useState7 = (0, _react.useState)(''),
|
|
49
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
50
|
+
videoUri = _useState8[0],
|
|
51
|
+
setVideoUri = _useState8[1];
|
|
52
|
+
(0, _react.useEffect)(function () {
|
|
53
|
+
var carouselFiles = generateCarouselItems(project.blocks.media);
|
|
54
|
+
setCarouselItems(carouselFiles);
|
|
55
|
+
setShouldRenderPage(true);
|
|
56
|
+
}, []);
|
|
57
|
+
var generateCarouselItems = function generateCarouselItems(media) {
|
|
58
|
+
var mediaParsed = (0, _parseBlockContent.default)(media);
|
|
59
|
+
var carouselFiles = [];
|
|
60
|
+
var tempObj = {};
|
|
61
|
+
|
|
62
|
+
// Find only carousel items
|
|
63
|
+
Object.keys(mediaParsed).forEach(function (key) {
|
|
64
|
+
if (key.includes('carouselFiles')) {
|
|
65
|
+
var index = key.split('carouselFiles_')[1].split('_')[0];
|
|
66
|
+
|
|
67
|
+
// Group video and its thumbnail
|
|
68
|
+
if (key.includes('videoThumbnail')) {
|
|
69
|
+
tempObj[index] = _objectSpread(_objectSpread({}, tempObj[index]), {}, {
|
|
70
|
+
videoThumbnail: mediaParsed[key]
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
tempObj[index] = _objectSpread(_objectSpread({}, tempObj[index]), mediaParsed[key]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
Object.keys(tempObj).forEach(function (key) {
|
|
78
|
+
carouselFiles.push(tempObj[key]);
|
|
79
|
+
});
|
|
80
|
+
return carouselFiles;
|
|
81
|
+
};
|
|
82
|
+
var openVideo = function openVideo(videoUri) {
|
|
83
|
+
setIsVideoOpen(true);
|
|
84
|
+
setVideoUri(videoUri);
|
|
85
|
+
};
|
|
86
|
+
var closeVideo = function closeVideo() {
|
|
87
|
+
setIsVideoOpen(false);
|
|
88
|
+
setVideoUri();
|
|
89
|
+
};
|
|
90
|
+
return shouldRenderPage ? /*#__PURE__*/_react.default.createElement(_Grid.Row, null, /*#__PURE__*/_react.default.createElement(_video.Video, {
|
|
91
|
+
src: videoUri,
|
|
92
|
+
isVideoOpen: true,
|
|
93
|
+
noPlayButton: true,
|
|
94
|
+
play: isVideoOpen,
|
|
95
|
+
onClose: closeVideo
|
|
96
|
+
}), /*#__PURE__*/_react.default.createElement(_Grid.Column, {
|
|
97
|
+
part: 2,
|
|
98
|
+
full: 3
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_Slider.default, {
|
|
100
|
+
dots: true
|
|
101
|
+
}, carouselItems.map(function (item) {
|
|
102
|
+
if (item.type === 'image') {
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_Slider2.ImageSlideWrapper, {
|
|
104
|
+
key: item.uri
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_Slider2.ImageSlide, {
|
|
106
|
+
src: item.uri,
|
|
107
|
+
alt: ""
|
|
108
|
+
}));
|
|
109
|
+
} else if (item.type === 'video') {
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_Slider2.ImageSlideWrapper, {
|
|
111
|
+
key: item.uri
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement(_Slider2.ImageSlide, {
|
|
113
|
+
src: item.videoThumbnail.uri,
|
|
114
|
+
alt: ""
|
|
115
|
+
}), /*#__PURE__*/_react.default.createElement(_video.PlayButton, {
|
|
116
|
+
onClick: function onClick() {
|
|
117
|
+
return openVideo(item.uri);
|
|
118
|
+
}
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
120
|
+
alt: "Play video",
|
|
121
|
+
src: require('../video/img/play-btn.svg')
|
|
122
|
+
})));
|
|
123
|
+
}
|
|
124
|
+
})), /*#__PURE__*/_react.default.createElement(_CaptialRaisedSummary.default, {
|
|
125
|
+
capital: project.totalSold,
|
|
126
|
+
multiProgressBar: project.multiProgressBar
|
|
127
|
+
})), /*#__PURE__*/_react.default.createElement(_Grid.Column, {
|
|
128
|
+
part: 1,
|
|
129
|
+
full: 3
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_InvestmentStat.default, {
|
|
131
|
+
content: project.sharePercentage,
|
|
132
|
+
title: project.name === 'aquarius' ? 'Target return' : project.shareType,
|
|
133
|
+
tooltip: project.name === 'aquarius' ? 'The target yield per annum in accordance with the Offering Memorandum. Please read carefully the Offering Memorandum before investing' : project.name === 'mazzanti' ? 'The Securities represent the right to 50% of the sale proceeds for the sale of 1 (one) Millecavalli R car (minus any taxes).' : project.name === 'blockstream-mining' ? 'The percentage represents all Bitcoins mined over a period of 36 months in accordance with the Terms and Conditions. Please carefully read the Terms and Conditions before investing.' : "The percentage of the venture\u2019s future ".concat(project.name === 'infinite-fleet' ? 'profits' : 'revenues', " to be distributed in accordance with the Offering Terms. Please carefully read the Offering Terms and Offering Document\n before investing."),
|
|
134
|
+
borderTop: true
|
|
135
|
+
}), /*#__PURE__*/_react.default.createElement(_InvestmentStat.default, {
|
|
136
|
+
content: project.name === 'aquarius' ? 'OPEN-ENDED' : project.name === 'infinite-fleet' ? 'TBD' : project.daysLeft,
|
|
137
|
+
title: project.name === 'aquarius' ? 'fund typ' : project.daysLeftText,
|
|
138
|
+
borderTop: true
|
|
139
|
+
}), /*#__PURE__*/_react.default.createElement(_InvestmentStat.default, {
|
|
140
|
+
content: project.name === 'aquarius' ? 'PROFESSIONAL' : project.investmentCount.toString(),
|
|
141
|
+
title: "Investors",
|
|
142
|
+
primaryBg: true
|
|
143
|
+
}))) : '';
|
|
144
|
+
}
|
|
145
|
+
var _default = ImagesCarousel;
|
|
146
|
+
exports.default = _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.DatePickerInput = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _reactDayPicker = require("react-day-picker");
|
|
11
|
+
var _Input = require("./Input.styles");
|
|
12
|
+
var _DatePickerInput = require("./DatePickerInput.styles");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
var DatePickerInput = function DatePickerInput(props) {
|
|
23
|
+
var id = props.id,
|
|
24
|
+
name = props.name,
|
|
25
|
+
label = props.label,
|
|
26
|
+
placeholder = props.placeholder,
|
|
27
|
+
value = props.value,
|
|
28
|
+
error = props.error,
|
|
29
|
+
touched = props.touched,
|
|
30
|
+
dashboard = props.dashboard;
|
|
31
|
+
var _useState = (0, _react.useState)(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
labelUp = _useState2[0],
|
|
34
|
+
setLabelUp = _useState2[1];
|
|
35
|
+
(0, _react.useEffect)(function () {
|
|
36
|
+
checkLabel(false);
|
|
37
|
+
}, []);
|
|
38
|
+
var onChange = function onChange(value) {
|
|
39
|
+
props.onChange && props.onChange(null, {
|
|
40
|
+
name: name,
|
|
41
|
+
value: value
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var checkLabel = function checkLabel(focus) {
|
|
45
|
+
setLabelUp(focus || !!value);
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_Input.Wrapper, null, label && /*#__PURE__*/_react.default.createElement(_Input.Label, {
|
|
48
|
+
isUp: labelUp,
|
|
49
|
+
error: error && touched,
|
|
50
|
+
htmlFor: id
|
|
51
|
+
}, label), /*#__PURE__*/_react.default.createElement(_DatePickerInput.DatePickerOverlay, {
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
return checkLabel(true);
|
|
54
|
+
},
|
|
55
|
+
dashboard: dashboard
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_reactDayPicker.DayPicker, {
|
|
57
|
+
id: id,
|
|
58
|
+
name: name,
|
|
59
|
+
value: value,
|
|
60
|
+
placeholder: placeholder,
|
|
61
|
+
onDayChange: onChange,
|
|
62
|
+
error: error
|
|
63
|
+
})));
|
|
64
|
+
};
|
|
65
|
+
exports.DatePickerInput = DatePickerInput;
|
|
66
|
+
DatePickerInput.propTypes = {
|
|
67
|
+
id: _propTypes.default.string.isRequired,
|
|
68
|
+
name: _propTypes.default.string.isRequired,
|
|
69
|
+
label: _propTypes.default.string,
|
|
70
|
+
placeholder: _propTypes.default.string,
|
|
71
|
+
error: _propTypes.default.bool,
|
|
72
|
+
touched: _propTypes.default.bool,
|
|
73
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.instanceOf(Date)]).isRequired,
|
|
74
|
+
onChange: _propTypes.default.func.isRequired,
|
|
75
|
+
dashboard: _propTypes.default.bool
|
|
76
|
+
};
|
|
77
|
+
DatePickerInput.defaultProps = {
|
|
78
|
+
label: '',
|
|
79
|
+
placeholder: '',
|
|
80
|
+
error: false,
|
|
81
|
+
touched: false,
|
|
82
|
+
dashboard: false
|
|
83
|
+
};
|
|
84
|
+
var _default = DatePickerInput;
|
|
85
|
+
exports.default = _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DatePickerInputFilled = exports.DatePickerInputEmpty = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _DatePickerInput = require("./DatePickerInput");
|
|
9
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
// import { date } from '@storybook/addon-knobs'
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Components Library/Inputs/Date Picker Input',
|
|
15
|
+
component: _DatePickerInput.DatePickerInput,
|
|
16
|
+
argTypes: {
|
|
17
|
+
id: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
defaultValue: ''
|
|
28
|
+
},
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
defaultValue: ''
|
|
32
|
+
},
|
|
33
|
+
value: {
|
|
34
|
+
type: 'date',
|
|
35
|
+
control: {
|
|
36
|
+
type: 'object'
|
|
37
|
+
},
|
|
38
|
+
// control: { type: 'date' },
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
//oneOf string, date, required,
|
|
42
|
+
error: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
defaultValue: false
|
|
45
|
+
},
|
|
46
|
+
touched: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
defaultValue: false
|
|
49
|
+
},
|
|
50
|
+
dashboard: {
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
defaultValue: false
|
|
53
|
+
},
|
|
54
|
+
checkLabel: {
|
|
55
|
+
type: 'function'
|
|
56
|
+
},
|
|
57
|
+
onChange: {
|
|
58
|
+
action: 'change',
|
|
59
|
+
type: 'function',
|
|
60
|
+
required: true
|
|
61
|
+
},
|
|
62
|
+
onBlur: {
|
|
63
|
+
action: 'blur',
|
|
64
|
+
type: 'function'
|
|
65
|
+
},
|
|
66
|
+
onFocus: {
|
|
67
|
+
action: 'hasFocus',
|
|
68
|
+
type: 'function'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.default = _default;
|
|
73
|
+
var Template = function Template(args) {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_DatePickerInput.DatePickerInput, args)));
|
|
75
|
+
};
|
|
76
|
+
var DatePickerInputFilled = Template.bind({});
|
|
77
|
+
exports.DatePickerInputFilled = DatePickerInputFilled;
|
|
78
|
+
DatePickerInputFilled.args = {
|
|
79
|
+
label: 'label date',
|
|
80
|
+
value: '2022-1-4'
|
|
81
|
+
};
|
|
82
|
+
var DatePickerInputEmpty = Template.bind({});
|
|
83
|
+
exports.DatePickerInputEmpty = DatePickerInputEmpty;
|
|
84
|
+
DatePickerInputEmpty.args = {
|
|
85
|
+
label: 'label date'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//doublecheck:
|
|
89
|
+
|
|
90
|
+
//works fine if clicking on element itself to change date,
|
|
91
|
+
//but changes to "value" in SB controls print UNIX timestamp
|
|
92
|
+
//value: new Date(2022, 0, 1, 0, 4) also not working interactively
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.DatePickerOverlay = void 0;
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _theme = _interopRequireDefault(require("../../styles/theme"));
|
|
10
|
+
var _templateObject;
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
var DatePickerOverlay = _styledComponents.default.div.withConfig({
|
|
16
|
+
displayName: "DatePickerInputstyles__DatePickerOverlay",
|
|
17
|
+
componentId: "sc-102qruz-0"
|
|
18
|
+
})(["&&& > .DayPickerInput{display:block;position:relative;width:100%;}&&& > .DayPickerInput-OverlayWrapper{z-index:100;}&&& > .DayPickerInput > input{font-family:'Open sans';display:block;width:100%;height:40px;font-weight:600;font-size:12px;line-height:18px;padding:13px 0;padding-bottom:7px;border-radius:0;box-shadow:none;outline:0;border:0;border-top:1px solid transparent;border-bottom:1px solid ", ";color:", ";background-color:transparent;transition:border-color 0.2s;&:focus,&:hover{box-shadow:none;border-top-color:transparent;border-bottom-color:", ";}&::placeholder{color:transparent;opacity:0;}}", ""], function (props) {
|
|
19
|
+
return _theme.default.cGrey;
|
|
20
|
+
}, function (props) {
|
|
21
|
+
return _theme.default.cBlack;
|
|
22
|
+
}, function (props) {
|
|
23
|
+
return _theme.default.cPrimary;
|
|
24
|
+
}, function (props) {
|
|
25
|
+
return props.dashboard && (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &&& > .DayPickerInput > input {\n border: 0;\n padding: 0;\n height: 22px;\n font-family: 'Open Sans';\n font-weight: 300;\n font-size: 14px;\n line-height: 22px;\n letter-spacing: 0.53px;\n text-transform: normal;\n color: ", ";\n\n &::placeholder {\n color: ", ";\n opacity: 1;\n }\n }\n "])), _theme.default.cBlack, _theme.default.cGrey2);
|
|
26
|
+
});
|
|
27
|
+
exports.DatePickerOverlay = DatePickerOverlay;
|
|
28
|
+
var _default = DatePickerOverlay;
|
|
29
|
+
exports.default = _default;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.Input = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _Input = require("./Input.styles");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
var Input = function Input(props) {
|
|
21
|
+
var type = props.type,
|
|
22
|
+
id = props.id,
|
|
23
|
+
name = props.name,
|
|
24
|
+
label = props.label,
|
|
25
|
+
placeholder = props.placeholder,
|
|
26
|
+
value = props.value,
|
|
27
|
+
error = props.error,
|
|
28
|
+
touched = props.touched,
|
|
29
|
+
readOnly = props.readOnly,
|
|
30
|
+
inverted = props.inverted,
|
|
31
|
+
dashboard = props.dashboard;
|
|
32
|
+
var _useState = (0, _react.useState)(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
labelUp = _useState2[0],
|
|
35
|
+
setLabelUp = _useState2[1];
|
|
36
|
+
var _useState3 = (0, _react.useState)(false),
|
|
37
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
|
+
hasFocus = _useState4[0],
|
|
39
|
+
setHasFocus = _useState4[1];
|
|
40
|
+
(0, _react.useEffect)(function () {
|
|
41
|
+
checkLabel(false);
|
|
42
|
+
}, []);
|
|
43
|
+
(0, _react.useEffect)(function () {
|
|
44
|
+
checkLabel(false);
|
|
45
|
+
}, [hasFocus, value]);
|
|
46
|
+
(0, _react.useEffect)(function () {
|
|
47
|
+
if (value && !labelUp) setLabelUp(true);
|
|
48
|
+
}, [value, labelUp]);
|
|
49
|
+
var onFocus = function onFocus(e, field) {
|
|
50
|
+
var onFocus = props.onFocus;
|
|
51
|
+
onFocus && onFocus(e, field);
|
|
52
|
+
checkLabel(true);
|
|
53
|
+
};
|
|
54
|
+
var onBlur = function onBlur(e, field) {
|
|
55
|
+
var onBlur = props.onBlur;
|
|
56
|
+
onBlur && onBlur(e, field);
|
|
57
|
+
checkLabel(false);
|
|
58
|
+
};
|
|
59
|
+
var onChange = function onChange(e, field) {
|
|
60
|
+
var onChange = props.onChange;
|
|
61
|
+
onChange && onChange(e, field);
|
|
62
|
+
};
|
|
63
|
+
var checkLabel = function checkLabel(focus) {
|
|
64
|
+
setHasFocus(focus);
|
|
65
|
+
setLabelUp(focus || !!value);
|
|
66
|
+
};
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_Input.Wrapper, {
|
|
68
|
+
inverted: inverted
|
|
69
|
+
}, label && /*#__PURE__*/_react.default.createElement(_Input.Label, {
|
|
70
|
+
isUp: labelUp,
|
|
71
|
+
active: hasFocus,
|
|
72
|
+
error: error && touched,
|
|
73
|
+
htmlFor: id
|
|
74
|
+
}, label), /*#__PURE__*/_react.default.createElement(_Input.InputWrap, {
|
|
75
|
+
error: error && touched,
|
|
76
|
+
dashboard: dashboard
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
78
|
+
type: type,
|
|
79
|
+
id: id,
|
|
80
|
+
name: name,
|
|
81
|
+
value: value,
|
|
82
|
+
onChange: onChange,
|
|
83
|
+
onBlur: onBlur,
|
|
84
|
+
onFocus: onFocus,
|
|
85
|
+
readOnly: readOnly,
|
|
86
|
+
placeholder: placeholder,
|
|
87
|
+
style: {
|
|
88
|
+
WebkitAppearance: 'none',
|
|
89
|
+
WebkitBorderRadius: 0
|
|
90
|
+
}
|
|
91
|
+
})));
|
|
92
|
+
};
|
|
93
|
+
exports.Input = Input;
|
|
94
|
+
Input.propTypes = {
|
|
95
|
+
type: _propTypes.default.string,
|
|
96
|
+
id: _propTypes.default.string.isRequired,
|
|
97
|
+
name: _propTypes.default.string.isRequired,
|
|
98
|
+
label: _propTypes.default.string,
|
|
99
|
+
placeholder: _propTypes.default.string,
|
|
100
|
+
value: _propTypes.default.string,
|
|
101
|
+
error: _propTypes.default.bool,
|
|
102
|
+
touched: _propTypes.default.bool,
|
|
103
|
+
onChange: _propTypes.default.func,
|
|
104
|
+
onBlur: _propTypes.default.func,
|
|
105
|
+
onFocus: _propTypes.default.func,
|
|
106
|
+
readOnly: _propTypes.default.bool,
|
|
107
|
+
inverted: _propTypes.default.bool,
|
|
108
|
+
dashboard: _propTypes.default.bool
|
|
109
|
+
};
|
|
110
|
+
Input.defaultProps = {
|
|
111
|
+
type: 'text',
|
|
112
|
+
label: '',
|
|
113
|
+
placeholder: '',
|
|
114
|
+
value: '',
|
|
115
|
+
error: false,
|
|
116
|
+
touched: false,
|
|
117
|
+
readOnly: false,
|
|
118
|
+
inverted: false,
|
|
119
|
+
dashboard: false,
|
|
120
|
+
onChange: function onChange() {},
|
|
121
|
+
onBlur: function onBlur() {},
|
|
122
|
+
onFocus: function onFocus() {}
|
|
123
|
+
};
|
|
124
|
+
var _default = Input;
|
|
125
|
+
exports.default = _default;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.InputLabeled = exports.InputFilled = exports.InputFillInverted = exports.InputEmpty = void 0;
|
|
7
|
+
var _addonViewport = require("@storybook/addon-viewport");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Input = require("./Input");
|
|
10
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
11
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
var _default = {
|
|
14
|
+
title: 'Components Library/Inputs/Input',
|
|
15
|
+
component: _Input.Input,
|
|
16
|
+
argTypes: {
|
|
17
|
+
type: {
|
|
18
|
+
type: 'string'
|
|
19
|
+
},
|
|
20
|
+
id: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
defaultValue: ''
|
|
31
|
+
},
|
|
32
|
+
placeholder: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
defaultValue: ''
|
|
35
|
+
},
|
|
36
|
+
value: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
defaultValue: ''
|
|
39
|
+
},
|
|
40
|
+
error: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
touched: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
defaultValue: false
|
|
47
|
+
},
|
|
48
|
+
readOnly: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
defaultValue: false
|
|
51
|
+
},
|
|
52
|
+
inverted: {
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
defaultValue: false
|
|
55
|
+
},
|
|
56
|
+
dashboard: {
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
defaultValue: false
|
|
59
|
+
},
|
|
60
|
+
checkLabel: {
|
|
61
|
+
type: 'function'
|
|
62
|
+
},
|
|
63
|
+
onChange: {
|
|
64
|
+
action: 'change',
|
|
65
|
+
type: 'function'
|
|
66
|
+
},
|
|
67
|
+
onBlur: {
|
|
68
|
+
action: 'blur',
|
|
69
|
+
type: 'function'
|
|
70
|
+
},
|
|
71
|
+
onFocus: {
|
|
72
|
+
action: 'hasFocus',
|
|
73
|
+
type: 'function'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
parameters: {
|
|
77
|
+
viewport: {
|
|
78
|
+
viewports: _addonViewport.INITIAL_VIEWPORTS,
|
|
79
|
+
defaultViewport: 'resetviewport'
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.default = _default;
|
|
84
|
+
var Template = function Template(args) {
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_Input.Input, args)));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//trying to integrate state:
|
|
89
|
+
// const Template = args => {
|
|
90
|
+
// const [value, setValue] = useState(args.value ?? '')
|
|
91
|
+
// return (
|
|
92
|
+
// <Input
|
|
93
|
+
// {...args}
|
|
94
|
+
// onChange={(...params) => {
|
|
95
|
+
// args.onChange(...params)
|
|
96
|
+
// setValue(...params)
|
|
97
|
+
// }}
|
|
98
|
+
// value={value}
|
|
99
|
+
// />
|
|
100
|
+
// }
|
|
101
|
+
|
|
102
|
+
var InputLabeled = Template.bind({});
|
|
103
|
+
exports.InputLabeled = InputLabeled;
|
|
104
|
+
InputLabeled.args = {
|
|
105
|
+
label: 'input description (label)'
|
|
106
|
+
};
|
|
107
|
+
InputLabeled.parameters = {
|
|
108
|
+
backgrounds: {
|
|
109
|
+
default: 'resetviewport'
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var InputFilled = Template.bind({});
|
|
113
|
+
exports.InputFilled = InputFilled;
|
|
114
|
+
InputFilled.args = {
|
|
115
|
+
label: 'input description (label)',
|
|
116
|
+
value: 'your text (value)'
|
|
117
|
+
};
|
|
118
|
+
InputFilled.parameters = {
|
|
119
|
+
backgrounds: {
|
|
120
|
+
default: 'resetviewport'
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var InputFillInverted = Template.bind({});
|
|
124
|
+
exports.InputFillInverted = InputFillInverted;
|
|
125
|
+
InputFillInverted.args = {
|
|
126
|
+
type: 'text',
|
|
127
|
+
label: 'input description (label) inverted',
|
|
128
|
+
value: 'your text (value) inverted',
|
|
129
|
+
inverted: true
|
|
130
|
+
};
|
|
131
|
+
InputFillInverted.parameters = {
|
|
132
|
+
backgrounds: {
|
|
133
|
+
default: 'grey'
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var InputEmpty = Template.bind({});
|
|
137
|
+
exports.InputEmpty = InputEmpty;
|
|
138
|
+
InputEmpty.args = {};
|
|
139
|
+
InputEmpty.parameters = {
|
|
140
|
+
backgrounds: {
|
|
141
|
+
default: 'resetviewport'
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
//doublecheck:
|
|
146
|
+
|
|
147
|
+
// state?
|
|
148
|
+
// make error true version?
|
|
149
|
+
// why can I not fill in the input in storybook on page? not important?
|