@stokr/components-library 0.5.3 → 0.5.5
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/build/asset-manifest.json +9 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/build/static/js/main.31d6cfe0.js +0 -0
- package/dist/AccountBalance/AccountBalance.js +43 -0
- package/dist/AccountBalance/AccountBalance.stories.js +75 -0
- package/dist/AccountBalance/AccountBalance.styles.js +38 -0
- package/dist/AdminDashboard/Table/Table.js +120 -0
- package/dist/AdminDashboard/Table/Table.styles.js +111 -0
- package/dist/AgreementItem/AgreementItem.js +38 -0
- package/dist/AgreementItem/AgreementItem.stories.js +98 -0
- package/dist/AgreementItem/AgreementItem.styles.js +31 -0
- package/dist/AnalyticGraphs/Analytic.js +528 -0
- package/dist/AnalyticGraphs/Analytic.styles.js +49 -0
- package/dist/BackButton/BackButton.js +22 -0
- package/dist/BackButton/BackButton.stories.js +24 -0
- package/dist/BackButton/BackButton.styles.js +110 -0
- package/dist/Background/Background.js +34 -0
- package/dist/Background/Background.stories.js +50 -0
- package/dist/Background/Background.styles.js +113 -0
- package/dist/BarChart/BarChart.js +258 -0
- package/dist/BarChart/BarChart.stories.js +46 -0
- package/dist/BarChart/BarChart.styles.js +93 -0
- package/dist/BarChartLegend/BarChartLegend.js +74 -0
- package/dist/BarChartLegend/BarChartLegend.styles.js +26 -0
- package/dist/BasicTable/BasicTable.js +20 -0
- package/dist/BasicTable/BasicTable.stories.js +51 -0
- package/dist/BasicTable/BasicTable.styles.js +64 -0
- package/dist/Button/Button.stories.js +63 -0
- package/dist/Button/Button.styles.js +180 -0
- package/dist/ButtonContainer/ButtonContainer.styles.js +25 -0
- package/dist/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +35 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.js +23 -0
- package/dist/CapitalRaisedSummary/CaptialRaisedSummary.styles.js +36 -0
- package/dist/ChartBox/ChartBox.js +34 -0
- package/dist/ChartBox/ChartBox.stories.js +9 -0
- package/dist/ChartBox/ChartBox.styles.js +50 -0
- package/dist/ChartBox/ChartBoxDistribution.js +20 -0
- package/dist/ChartBox/ChartBoxDistribution.stories.js +10 -0
- package/dist/ChartLegend/ChartLegend.js +37 -0
- package/dist/ChartLegend/ChartLegend.stories.js +74 -0
- package/dist/ChartLegend/ChartLegend.styles.js +67 -0
- package/dist/Checkbox/Checkbox.js +108 -0
- package/dist/Checkbox/Checkbox.stories.js +82 -0
- package/dist/Checkbox/Checkbox.styles.js +123 -0
- package/dist/Checklist/UserChecklist.js +247 -0
- package/dist/Checklist/UserChecklist.stories.js +115 -0
- package/dist/ComponentScroll/ComponentScroll.js +99 -0
- package/dist/ComponentScroll/ComponentScroll.stories.js +92 -0
- package/dist/ComponentScroll/ComponentScroll.styles.js +104 -0
- package/dist/ComponentWrapper/ComponentWrapper.styles.js +128 -0
- package/dist/CryptoAddress/ComponentWrap.js +24 -0
- package/dist/CryptoAddress/CryptoAddress.js +124 -0
- package/dist/CryptoAddress/CryptoAddress.stories.js +163 -0
- package/dist/CryptoAddress/CryptoAddress.styles.js +399 -0
- package/dist/CryptoAddress/RadioWrap.js +36 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.js +42 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.stories.js +65 -0
- package/dist/CryptoAddressDetails/CryptoAddressDetails.styles.js +114 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.js +30 -0
- package/dist/CryptoAddressWrapper/CryptoAddressWrapper.styles.js +98 -0
- package/dist/DonutChart/DonutChart.js +137 -0
- package/dist/DonutChart/DonutChart.stories.js +39 -0
- package/dist/DonutChart/DonutChart.styles.js +101 -0
- package/dist/DoubleButton/DoubleButton.styles.js +25 -0
- package/dist/ErrorMessage/ErrorMessage.styles.js +9 -0
- package/dist/FAQ/FAQ.js +40 -0
- package/dist/FAQ/FAQ.stories.js +63 -0
- package/dist/FAQ/FAQ.styles.js +69 -0
- package/dist/Footer/Footer.js +54 -0
- package/dist/Footer/Footer.stories.js +41 -0
- package/dist/Footer/Footer.styles.js +230 -0
- package/dist/Footer/FooterLayout.js +114 -0
- package/dist/Footer/FooterLayout.stories.js +20 -0
- package/dist/Footer/FooterMenu.js +83 -0
- package/dist/Footer/FooterMenu.stories.js +110 -0
- package/dist/Footer/FooterMenu.styles.js +274 -0
- package/dist/Footer/index.js +4 -0
- package/dist/{03f9f978feb2b015b6812ba10f689967.png → Footer/lemonway.png} +0 -0
- package/dist/Footer/sicos-logo.svg +1 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.js +89 -0
- package/dist/ForgotPasswordModal/ForgotPasswordModal.stories.js +31 -0
- package/dist/Form/Form.js +38 -0
- package/dist/Form/Form.stories.js +24 -0
- package/dist/Form/Form.styles.js +66 -0
- package/dist/FullscreenCard/FullscreenCard.styles.js +36 -0
- package/dist/Grid/Grid.styles.js +109 -0
- package/dist/Header/Header.js +369 -0
- package/dist/Header/Header.stories.js +172 -0
- package/dist/Header/Header.styles.js +493 -0
- package/dist/Icon/Icon.style.js +75 -0
- package/dist/InfoIcon/InfoIcon.js +40 -0
- package/dist/InfoIcon/InfoIcon.stories.js +40 -0
- package/dist/InfoIcon/InfoIcon.styles.js +42 -0
- package/dist/InfoPanel/InfoPanel.js +115 -0
- package/dist/Input/DatePickerInput.js +64 -0
- package/dist/Input/DatePickerInput.stories.js +80 -0
- package/dist/Input/DatePickerInput.styles.js +67 -0
- package/dist/Input/Input.js +86 -0
- package/dist/Input/Input.stories.js +134 -0
- package/dist/Input/Input.styles.js +126 -0
- package/dist/Input/InputPassword.js +122 -0
- package/dist/Input/InputPassword.stories.js +72 -0
- package/dist/Input/InputPassword.styles.js +139 -0
- package/dist/Input/RangeInput.js +46 -0
- package/dist/Input/RangeInput.stories.js +48 -0
- package/dist/Input/RangeInput.styles.js +125 -0
- package/dist/Input/Select.js +130 -0
- package/dist/Input/Select.stories.js +129 -0
- package/dist/Input/Select.styles.js +143 -0
- package/dist/InvestCalculator/InvestCalculator.js +353 -0
- package/dist/InvestCalculator/InvestCalculator.stories.js +129 -0
- package/dist/InvestCalculator/InvestCalculator.styles.js +78 -0
- package/dist/InvestmentStat/InvestmentStat.js +33 -0
- package/dist/InvestmentStat/InvestmentStat.stories.js +44 -0
- package/dist/InvestmentStat/InvestmentStat.styles.js +53 -0
- package/dist/KYCFlow/BasicInfo.js +396 -0
- package/dist/KYCFlow/Confirmation.js +37 -0
- package/dist/KYCFlow/DocumentFileUpload.js +240 -0
- package/dist/KYCFlow/DocumentScan.js +66 -0
- package/dist/KYCFlow/DocumentScanUpload.js +228 -0
- package/dist/KYCFlow/DocumentSelect.js +101 -0
- package/dist/KYCFlow/DocumentSuccess.js +54 -0
- package/dist/KYCFlow/DocumentUpload.js +44 -0
- package/dist/KYCFlow/DocumentVerificationType.js +114 -0
- package/dist/KYCFlow/FaceScan.js +45 -0
- package/dist/KYCFlow/FaceScanRecognition.js +52 -0
- package/dist/KYCFlow/FaceScanSuccess.js +47 -0
- package/dist/KYCFlow/Terms.js +99 -0
- package/dist/KYCFlow/_styles.js +284 -0
- package/dist/KYCFlow/index.js +14 -0
- package/dist/KYCSelectBox/KYCSelectBox.styles.js +62 -0
- package/dist/LatestUpdate/LatestUpdate.js +35 -0
- package/dist/LatestUpdate/LatestUpdate.stories.js +51 -0
- package/dist/LatestUpdate/LatestUpdate.styles.js +77 -0
- package/dist/Layout/Layout-func-no-work.js +67 -0
- package/dist/Layout/Layout.js +68 -0
- package/dist/Layout/Layout.stories.js +55 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.js +39 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.stories.js +58 -0
- package/dist/LearnMoreCarousel/LearnMoreCarousel.styles.js +205 -0
- package/dist/LearnMorePage/LearnMore.js +199 -0
- package/dist/LearnMorePage/LearnMore.shared.styles.js +49 -0
- package/dist/LearnMorePage/LearnMore.stories.js +41 -0
- package/dist/LearnMorePage/LearnMore.styles.js +250 -0
- package/dist/LearnMorePage/LearnMoreExampleObject.js +102 -0
- package/dist/LearnMorePage/LearnMoreItem.js +59 -0
- package/dist/LearnMorePage/LearnMoreItem.stories.js +54 -0
- package/dist/LearnMorePage/LearnMoreItem.styles.js +218 -0
- package/dist/LearnMoreSection/LearnMore.js +144 -0
- package/dist/LearnMoreSection/LearnMore.stories.js +23 -0
- package/dist/LearnMoreSection/LearnMore.styles.js +134 -0
- package/dist/LearnMoreSection/LearnMoreItem.js +39 -0
- package/dist/LearnMoreSection/LearnMoreItem.stories.js +52 -0
- package/dist/LearnMoreSection/LearnMoreItem.styles.js +54 -0
- package/dist/LoginModal/LoginModal.js +125 -0
- package/dist/MainMenu/DynamicMainMenu.js +41 -0
- package/dist/MainMenu/MainMenu.js +207 -0
- package/dist/MainMenu/MainMenu.styles.js +361 -0
- package/dist/MatomoConnect/Matomo.js +221 -0
- package/dist/MatomoConnect/Matomo_fuckup.js +185 -0
- package/dist/MenuNav/MenuNav.styles.js +88 -0
- package/dist/Modal/Modal.js +71 -0
- package/dist/Modal/Modal.stories.js +67 -0
- package/dist/Modal/Modal.styles.js +407 -0
- package/dist/MultiProgressBar/MultiProgressBar.js +33 -0
- package/dist/MultiProgressBar/MultiProgressBar.stories.js +61 -0
- package/dist/MultiProgressBar/MultiProgressBar.styles.js +92 -0
- package/dist/Newsletter/Newsletter.js +106 -0
- package/dist/Newsletter/Newsletter.stories.js +8 -0
- package/dist/Newsletter/Newsletter.styles.js +173 -0
- package/dist/NotificationContext/NotificationContext.js +126 -0
- package/dist/NotificationContext/NotificationContext.stories.js +32 -0
- package/dist/NotificationCounter/NotificationCounter.styles.js +23 -0
- package/dist/Number/Number.js +25 -0
- package/dist/Number/Number.stories.js +18 -0
- package/dist/Number/Number.styles.js +21 -0
- package/dist/PageTransition/PageTransition.js +42 -0
- package/dist/Process/Process.stories.js +34 -0
- package/dist/Process/Process.styles.js +87 -0
- package/dist/ProfileBadge/ProfileBadge.js +46 -0
- package/dist/ProfileBadge/ProfileBadge.stories.js +37 -0
- package/dist/ProfileBadge/ProfileBadge.styles.js +47 -0
- package/dist/ProfileBox/ProfileBox.js +29 -0
- package/dist/ProfileBox/ProfileBox.stories.js +27 -0
- package/dist/ProfileBox/ProfileBox.styles.js +60 -0
- package/dist/ProfileHeader/ProfileHeader-CLb4.js +401 -0
- package/dist/ProfileHeader/ProfileHeader.js +268 -0
- package/dist/ProfileHeader/ProfileHeader.styles.js +114 -0
- package/dist/ProfileStat/ProfileStat.js +32 -0
- package/dist/ProfileStat/ProfileStat.stories.js +58 -0
- package/dist/ProfileStat/ProfileStat.styles.js +80 -0
- package/dist/ProofOfAddress/ProofOfAddress.styles.js +76 -0
- package/dist/ROI/ROI.js +261 -0
- package/dist/ROI/ROI.styles.js +71 -0
- package/dist/ROI/ROIChart.js +348 -0
- package/dist/ROI/ROIChart.styles.js +98 -0
- package/dist/ROI/ROIModal.js +74 -0
- package/dist/ROI/ROIScenarioBox.js +46 -0
- package/dist/ROI/ROIScenarioBox.styles.js +131 -0
- package/dist/Radio/Radio.js +58 -0
- package/dist/Radio/Radio.stories.js +65 -0
- package/dist/Radio/Radio.styles.js +93 -0
- package/dist/RefreshButton/RefreshButton.js +14 -0
- package/dist/RefreshButton/RefreshButton.stories.js +31 -0
- package/dist/RefreshButton/RefreshButton.styles.js +57 -0
- package/dist/RegisterAlgorand/AlgoAddressName.js +103 -0
- package/dist/RegisterAlgorand/AlgoAdressSelect.js +274 -0
- package/dist/RegisterAlgorand/AlgoConnectWallet.js +37 -0
- package/dist/RegisterAlgorand/AlgoSuccess.js +28 -0
- package/dist/RegisterAlgorand/Algorand.stories.js +63 -0
- package/dist/RegisterAlgorand/ChooseWallet.js +77 -0
- package/dist/RegisterAlgorand/SelectProject.js +77 -0
- package/dist/RegisterAlgorand/_styles.js +30 -0
- package/dist/RegisterAlgorand/flow.js +243 -0
- package/dist/RegisterAlgorand/flowWithMemo.js +244 -0
- package/dist/RegisterAlgorand/index.js +7 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.js +30 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.stories.js +22 -0
- package/dist/RegisterConfirmModal/RegisterConfirmModal.styles.js +19 -0
- package/dist/RegisterEthereum/EthAddressLedger.js +151 -0
- package/dist/RegisterEthereum/EthAddressMetamask.js +165 -0
- package/dist/RegisterEthereum/EthAddressName.js +101 -0
- package/dist/RegisterEthereum/EthConnectLedger.js +117 -0
- package/dist/RegisterEthereum/EthConnectMetamask.js +25 -0
- package/dist/RegisterEthereum/EthFinish.js +32 -0
- package/dist/RegisterEthereum/EthIntro.js +77 -0
- package/dist/RegisterEthereum/_styles.js +30 -0
- package/dist/RegisterEthereum/index.js +9 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.js +75 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.stories.js +65 -0
- package/dist/RegisterLiquidSteps/RegisterLiquidSteps.styles.js +69 -0
- package/dist/RegisterLiquidSteps/assets/nav_green.svg +31 -0
- package/dist/RegisterLiquidSteps/assets/video.mp4 +0 -0
- package/dist/RegisterLiquidSteps/assets/videothumbnail.jpg +0 -0
- package/dist/RegisterLiquidSteps/complete.js +29 -0
- package/dist/RegisterLiquidSteps/flow.js +141 -0
- package/dist/RegisterLiquidSteps/index.js +29 -0
- package/dist/RegisterLiquidSteps/register-liquid.js +197 -0
- package/dist/RegisterModal/RegisterModal.js +143 -0
- package/dist/RegisterModal/RegisterModal.stories.js +35 -0
- package/dist/RequestDataBox/RequestDataBox.js +21 -0
- package/dist/RequestDataBox/RequestDataBox.stories.js +29 -0
- package/dist/RequestDataBox/RequestDataBox.styles.js +40 -0
- package/dist/RiskQuestionnaire/RiskQuestionnaireContext.js +111 -0
- package/dist/RiskQuestionnaire/_styles.js +6 -0
- package/dist/SEO/SEO.js +63 -0
- package/dist/SEO/SEO.stories.js +53 -0
- package/dist/SectionTitle/SectionTitle.styles.js +23 -0
- package/dist/SideLine/SideLine.js +4 -0
- package/dist/SideLine/SideLine.stories.js +20 -0
- package/dist/SideLine/SideLine.styles.js +29 -0
- package/dist/SigningSubflow/SignSubAddressMetamask.js +105 -0
- package/dist/SigningSubflow/SignSubConnectLedger.js +114 -0
- package/dist/SigningSubflow/SignSubConnectMetamask.js +101 -0
- package/dist/SigningSubflow/SignSubIntro.js +45 -0
- package/dist/SigningSubflow/SignSubSendLedger.js +114 -0
- package/dist/SigningSubflow/SignSubSendMetamask.js +53 -0
- package/dist/SigningSubflow/SignSubTransactionLedger.js +125 -0
- package/dist/SigningSubflow/SignSubTransactionMetamask.js +130 -0
- package/dist/SigningSubflow/_styles.js +59 -0
- package/dist/SigningSubflow/index.js +9 -0
- package/dist/Slider/Slider.js +43 -0
- package/dist/Slider/Slider.stories.js +63 -0
- package/dist/Slider/Slider.styles.js +115 -0
- package/dist/SpanButton/SpanButton.styles.js +14 -0
- package/dist/StatusBadge/StatusBadge.styles.js +16 -0
- package/dist/StepController/StepController.js +73 -0
- package/dist/StepController/StepController.stories.js +52 -0
- package/dist/StepController/StepController.styles.js +27 -0
- package/dist/StepController/StepControllerContext.js +61 -0
- package/dist/StepController/StepControllerProgress.js +28 -0
- package/dist/StepController/StepControllerProgress.stories.js +41 -0
- package/dist/StepsProgress/StepsProgress.js +95 -0
- package/dist/StepsProgress/StepsProgress.stories.js +23 -0
- package/dist/StepsProgress/StepsProgress.styles.js +97 -0
- package/dist/StokrLoader/StokrLoader.js +60 -0
- package/dist/StokrLoader/media.js +22 -0
- package/dist/StokrLoader/stokr_loader_white_400x400.gif +0 -0
- package/dist/SvgIcons/AdminBadgeSvg.js +16 -0
- package/dist/SvgIcons/CameraSvg.js +26 -0
- package/dist/SvgIcons/CapsLockSvg.js +21 -0
- package/dist/SvgIcons/DocumentBackSvg.js +25 -0
- package/dist/SvgIcons/DocumentSmallSvg.js +51 -0
- package/dist/SvgIcons/DocumentSvg.js +28 -0
- package/dist/SvgIcons/Early.js +14 -0
- package/dist/SvgIcons/EthSvg.js +30 -0
- package/dist/SvgIcons/EurSvg.js +16 -0
- package/dist/SvgIcons/FaceScanIconSvg.js +21 -0
- package/dist/SvgIcons/FourSvg.js +11 -0
- package/dist/SvgIcons/Glassess.js +19 -0
- package/dist/SvgIcons/Icons_Badge.png +0 -0
- package/dist/SvgIcons/LogoSvg.js +14 -0
- package/dist/SvgIcons/OneSvg.js +13 -0
- package/dist/SvgIcons/PassportSvg.js +46 -0
- package/dist/SvgIcons/RefreshSvg.js +17 -0
- package/dist/SvgIcons/SocialFacebook.js +15 -0
- package/dist/SvgIcons/SocialInstagram.js +15 -0
- package/dist/SvgIcons/SocialLinkedIn.js +15 -0
- package/dist/SvgIcons/SocialMedium.js +15 -0
- package/dist/SvgIcons/SocialReddit.js +15 -0
- package/dist/SvgIcons/SocialTelegram.js +15 -0
- package/dist/SvgIcons/SocialTwitter.js +15 -0
- package/dist/SvgIcons/SocialYoutube.js +15 -0
- package/dist/SvgIcons/ThreeSvg.js +10 -0
- package/dist/SvgIcons/TwoSidedDocumentSvg.js +72 -0
- package/dist/SvgIcons/TwoSvg.js +13 -0
- package/dist/SvgIcons/UpdateDefaultSvg.js +19 -0
- package/dist/SvgIcons/UpdateHardSvg.js +15 -0
- package/dist/SvgIcons/UpdateSoftSvg.js +17 -0
- package/dist/SvgIcons/UploadSvg.js +24 -0
- package/dist/SvgIcons/VerifiedBadge.js +13 -0
- package/dist/SvgIcons/index.js +32 -0
- package/dist/Switch/Switch.js +45 -0
- package/dist/Switch/Switch.stories.js +73 -0
- package/dist/Switch/Switch.styles.js +105 -0
- package/dist/Tabs/Tabs.js +48 -0
- package/dist/Tabs/Tabs.stories.js +28 -0
- package/dist/Tabs/Tabs.styles.js +11 -0
- package/dist/TabsNav/TabNav.js +21 -0
- package/dist/TabsNav/TabNav.stories.js +32 -0
- package/dist/TabsNav/TabsNav.js +23 -0
- package/dist/TabsNav/TabsNav.stories.js +25 -0
- package/dist/TabsNav/TabsNav.styles.js +80 -0
- package/dist/TeamOverview/TeamOverview.js +69 -0
- package/dist/TeamOverview/TeamOverview.stories.js +68 -0
- package/dist/TeamOverview/TeamOverview.styles.js +152 -0
- package/dist/Text/Headline.js +34 -0
- package/dist/Text/Headline.stories.js +40 -0
- package/dist/Text/StyledText.js +30 -0
- package/dist/Text/Text.stories.js +59 -0
- package/dist/Text/Text.styles.js +166 -0
- package/dist/TextLink/TextLink.styles.js +50 -0
- package/dist/ToDoList/ToDoList.js +172 -0
- package/dist/ToDoList/ToDoList.stories.js +123 -0
- package/dist/ToDoList/ToDoList.styles.js +115 -0
- package/dist/ToDoList/ToDoListTask.js +96 -0
- package/dist/ToDoList/ToDoListTask.stories.js +60 -0
- package/dist/ToDoList/ToDoListTask.styles.js +104 -0
- package/dist/TransactionDetails/TransactionDetails.js +27 -0
- package/dist/TransactionDetails/TransactionDetails.stories.js +47 -0
- package/dist/TransactionDetails/TransactionDetails.styles.js +31 -0
- package/dist/TransactionInfo/TransactionInfo.js +48 -0
- package/dist/TransactionInfo/TransactionInfo.stories.js +53 -0
- package/dist/TransactionInfo/TransactionInfo.styles.js +64 -0
- package/dist/TwoFactorModal/TwoFactorModal.js +84 -0
- package/dist/breakdown/Breakdown.js +124 -0
- package/dist/breakdown/index.js +2 -0
- package/dist/context/Auth.js +133 -0
- package/dist/context/AuthContext.js +154 -0
- package/dist/icons/Arrow.js +62 -0
- package/dist/icons/Arrow.stories.js +37 -0
- package/dist/icons/ArrowSimple.js +51 -0
- package/dist/icons/ArrowSimple.stories.js +41 -0
- package/dist/icons/Check.js +29 -0
- package/dist/icons/Check.stories.js +14 -0
- package/dist/icons/Facebook.js +15 -0
- package/dist/icons/Facebook.stories.js +15 -0
- package/dist/icons/Info.js +41 -0
- package/dist/icons/Info.stories.js +8 -0
- package/dist/icons/Instagram.js +15 -0
- package/dist/icons/Instagram.stories.js +15 -0
- package/dist/icons/LinkIcon.js +23 -0
- package/dist/icons/LinkIcon.stories.js +15 -0
- package/dist/icons/LinkedIn.js +29 -0
- package/dist/icons/LinkedIn.stories.js +8 -0
- package/dist/icons/Medium.js +28 -0
- package/dist/icons/Medium.stories.js +8 -0
- package/dist/icons/Reddit.js +18 -0
- package/dist/icons/Reddit.stories.js +15 -0
- package/dist/icons/Share.js +48 -0
- package/dist/icons/Share.stories.js +8 -0
- package/dist/icons/Telegram.js +28 -0
- package/dist/icons/Telegram.stories.js +8 -0
- package/dist/icons/Twitter.js +15 -0
- package/dist/icons/Twitter.stories.js +15 -0
- package/dist/icons/X.js +15 -0
- package/dist/icons/X.stories.js +8 -0
- package/dist/icons/Youtube.js +15 -0
- package/dist/icons/Youtube.stories.js +15 -0
- package/dist/icons/index.js +15 -0
- package/dist/index.js +177 -1
- package/dist/renderToBody/index.js +2 -0
- package/dist/renderToBody/renderToBody.js +26 -0
- package/dist/taxId/TaxId.stories.js +31 -0
- package/dist/taxId/complete.js +21 -0
- package/dist/taxId/flow.js +31 -0
- package/dist/taxId/index.js +4 -0
- package/dist/taxId/register-taxid.js +156 -0
- package/dist/video/Video.js +274 -0
- package/dist/video/Video.stories.js +45 -0
- package/dist/video/img/play-btn.svg +1 -0
- package/dist/video/index.js +2 -0
- package/package.json +128 -133
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/dist/07233f511246c9825a0d58e5ab2641f3.svg +0 -47
- package/dist/08418fc6c324f51f7e56.svg +0 -1
- package/dist/14aa35d4e84aebef77cf00b421fc393a.gif +0 -0
- package/dist/179ef2df02cb0b68c9fd.woff2 +0 -0
- package/dist/21e493d43617de76dbc7.woff2 +0 -0
- package/dist/2640959b1f9381cde047.eot +0 -0
- package/dist/2ba2db4ff86a2663686a100e75b50ba9.png +0 -0
- package/dist/311956ded96d3fd2813d.woff2 +0 -0
- package/dist/39f5961b2d3eb4aa5bf5.woff +0 -0
- package/dist/3caa0d4f9b7d58668066.woff2 +0 -0
- package/dist/4a510354f2f82b59fced805a8e3fe2bf.svg +0 -1
- package/dist/4c3c428d0ce82f840710.woff +0 -0
- package/dist/4e528d6445ca1974c313.woff +0 -0
- package/dist/55053cc0a8e6482eca64.ttf +0 -0
- package/dist/643c37f102b41f7f90c3.woff2 +0 -0
- package/dist/76dd0ed9c3f137513fd4.svg +0 -1
- package/dist/81f3ef07b7952e249da1.woff +0 -0
- package/dist/98b7d3182f652f021bc3.ttf +0 -0
- package/dist/9bea22b57dc165ed4382.ttf +0 -0
- package/dist/9ec738fbb66068dc1ca7.woff +0 -0
- package/dist/a1d7666a48f976227722.ttf +0 -0
- package/dist/a750292d6a0b5a760679.woff +0 -0
- package/dist/b85a961d44cc55c58050cbf7c53dd505.png +0 -0
- package/dist/bcb6531cf820152b7538.ttf +0 -0
- package/dist/c6a4bc1bd034d6303053.woff +0 -0
- package/dist/cbfc24090ef8bacab132.woff2 +0 -0
- package/dist/d2b1865643b98c0e8b54.ttf +0 -0
- package/dist/d97d7385fe8771611848.ttf +0 -0
- package/dist/index.js.LICENSE.txt +0 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
2
|
+
import Slider from 'components/Slider/Slider';
|
|
3
|
+
import { ImageSlide, ImageSlideWrapper } from 'components/Slider/Slider.styles';
|
|
4
|
+
import CaptialRaisedSummary from 'components/CapitalRaisedSummary/CaptialRaisedSummary';
|
|
5
|
+
import { Row, Column } from 'components/Grid/Grid.styles';
|
|
6
|
+
import InvestmentStat from 'components/InvestmentStat/InvestmentStat';
|
|
7
|
+
import parseBlockContent from 'utils/parseBlockContent';
|
|
8
|
+
import { ProjectContext } from 'context/Project/ProjectContext';
|
|
9
|
+
import { Video, PlayButton } from 'components/video';
|
|
10
|
+
export function ImagesCarousel(params) {
|
|
11
|
+
const [shouldRenderPage, setShouldRenderPage] = useState(false);
|
|
12
|
+
const [carouselItems, setCarouselItems] = useState([]);
|
|
13
|
+
// const [venture, setVenture] = useState({})
|
|
14
|
+
let {
|
|
15
|
+
project
|
|
16
|
+
} = useContext(ProjectContext);
|
|
17
|
+
const [isVideoOpen, setIsVideoOpen] = useState(false);
|
|
18
|
+
const [videoUri, setVideoUri] = useState('');
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const carouselFiles = generateCarouselItems(project.blocks.media);
|
|
21
|
+
setCarouselItems(carouselFiles);
|
|
22
|
+
setShouldRenderPage(true);
|
|
23
|
+
}, []);
|
|
24
|
+
const generateCarouselItems = media => {
|
|
25
|
+
const mediaParsed = parseBlockContent(media);
|
|
26
|
+
const carouselFiles = [];
|
|
27
|
+
const tempObj = {};
|
|
28
|
+
|
|
29
|
+
// Find only carousel items
|
|
30
|
+
Object.keys(mediaParsed).forEach(key => {
|
|
31
|
+
if (key.includes('carouselFiles')) {
|
|
32
|
+
const index = key.split('carouselFiles_')[1].split('_')[0];
|
|
33
|
+
|
|
34
|
+
// Group video and its thumbnail
|
|
35
|
+
if (key.includes('videoThumbnail')) {
|
|
36
|
+
tempObj[index] = {
|
|
37
|
+
...tempObj[index],
|
|
38
|
+
videoThumbnail: mediaParsed[key]
|
|
39
|
+
};
|
|
40
|
+
} else {
|
|
41
|
+
tempObj[index] = {
|
|
42
|
+
...tempObj[index],
|
|
43
|
+
...mediaParsed[key]
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.keys(tempObj).forEach(key => {
|
|
49
|
+
carouselFiles.push(tempObj[key]);
|
|
50
|
+
});
|
|
51
|
+
return carouselFiles;
|
|
52
|
+
};
|
|
53
|
+
const openVideo = videoUri => {
|
|
54
|
+
setIsVideoOpen(true);
|
|
55
|
+
setVideoUri(videoUri);
|
|
56
|
+
};
|
|
57
|
+
const closeVideo = () => {
|
|
58
|
+
setIsVideoOpen(false);
|
|
59
|
+
setVideoUri();
|
|
60
|
+
};
|
|
61
|
+
return shouldRenderPage ? /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Video, {
|
|
62
|
+
src: videoUri,
|
|
63
|
+
isVideoOpen: true,
|
|
64
|
+
noPlayButton: true,
|
|
65
|
+
play: isVideoOpen,
|
|
66
|
+
onClose: closeVideo
|
|
67
|
+
}), /*#__PURE__*/React.createElement(Column, {
|
|
68
|
+
part: 2,
|
|
69
|
+
full: 3
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Slider, {
|
|
71
|
+
dots: true
|
|
72
|
+
}, carouselItems.map(item => {
|
|
73
|
+
if (item.type === 'image') {
|
|
74
|
+
return /*#__PURE__*/React.createElement(ImageSlideWrapper, {
|
|
75
|
+
key: item.uri
|
|
76
|
+
}, /*#__PURE__*/React.createElement(ImageSlide, {
|
|
77
|
+
src: item.uri,
|
|
78
|
+
alt: ""
|
|
79
|
+
}));
|
|
80
|
+
} else if (item.type === 'video') {
|
|
81
|
+
return /*#__PURE__*/React.createElement(ImageSlideWrapper, {
|
|
82
|
+
key: item.uri
|
|
83
|
+
}, /*#__PURE__*/React.createElement(ImageSlide, {
|
|
84
|
+
src: item.videoThumbnail.uri,
|
|
85
|
+
alt: ""
|
|
86
|
+
}), /*#__PURE__*/React.createElement(PlayButton, {
|
|
87
|
+
onClick: () => openVideo(item.uri)
|
|
88
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
89
|
+
alt: "Play video",
|
|
90
|
+
src: require('components/video/img/play-btn.svg')
|
|
91
|
+
})));
|
|
92
|
+
}
|
|
93
|
+
})), /*#__PURE__*/React.createElement(CaptialRaisedSummary, {
|
|
94
|
+
capital: project.totalSold,
|
|
95
|
+
multiProgressBar: project.multiProgressBar
|
|
96
|
+
})), /*#__PURE__*/React.createElement(Column, {
|
|
97
|
+
part: 1,
|
|
98
|
+
full: 3
|
|
99
|
+
}, /*#__PURE__*/React.createElement(InvestmentStat, {
|
|
100
|
+
content: project.sharePercentage,
|
|
101
|
+
title: project.name === 'aquarius' ? 'Target return' : project.shareType,
|
|
102
|
+
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’s future ${project.name === 'infinite-fleet' ? 'profits' : 'revenues'} to be distributed in accordance with the Offering Terms. Please carefully read the Offering Terms and Offering Document
|
|
103
|
+
before investing.`,
|
|
104
|
+
borderTop: true
|
|
105
|
+
}), /*#__PURE__*/React.createElement(InvestmentStat, {
|
|
106
|
+
content: project.name === 'aquarius' ? 'OPEN-ENDED' : project.name === 'infinite-fleet' ? 'TBD' : project.daysLeft,
|
|
107
|
+
title: project.name === 'aquarius' ? 'fund typ' : project.daysLeftText,
|
|
108
|
+
borderTop: true
|
|
109
|
+
}), /*#__PURE__*/React.createElement(InvestmentStat, {
|
|
110
|
+
content: project.name === 'aquarius' ? 'PROFESSIONAL' : project.investmentCount.toString(),
|
|
111
|
+
title: "Investors",
|
|
112
|
+
primaryBg: true
|
|
113
|
+
}))) : '';
|
|
114
|
+
}
|
|
115
|
+
export default ImagesCarousel;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import DayPickerInput from 'react-day-picker/DayPickerInput';
|
|
4
|
+
import { Wrapper, Label } from './Input.styles';
|
|
5
|
+
import { DatePickerOverlay } from './DatePickerInput.styles';
|
|
6
|
+
export const DatePickerInput = props => {
|
|
7
|
+
const {
|
|
8
|
+
id,
|
|
9
|
+
name,
|
|
10
|
+
label,
|
|
11
|
+
placeholder,
|
|
12
|
+
value,
|
|
13
|
+
error,
|
|
14
|
+
touched,
|
|
15
|
+
dashboard
|
|
16
|
+
} = props;
|
|
17
|
+
const [labelUp, setLabelUp] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
checkLabel(false);
|
|
20
|
+
}, []);
|
|
21
|
+
const onChange = value => {
|
|
22
|
+
props.onChange && props.onChange(null, {
|
|
23
|
+
name,
|
|
24
|
+
value
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const checkLabel = focus => {
|
|
28
|
+
setLabelUp(focus || !!value);
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/React.createElement(Wrapper, null, label && /*#__PURE__*/React.createElement(Label, {
|
|
31
|
+
isUp: labelUp,
|
|
32
|
+
error: error && touched,
|
|
33
|
+
htmlFor: id
|
|
34
|
+
}, label), /*#__PURE__*/React.createElement(DatePickerOverlay, {
|
|
35
|
+
onClick: () => checkLabel(true),
|
|
36
|
+
dashboard: dashboard
|
|
37
|
+
}, /*#__PURE__*/React.createElement(DayPickerInput, {
|
|
38
|
+
id: id,
|
|
39
|
+
name: name,
|
|
40
|
+
value: value,
|
|
41
|
+
placeholder: placeholder,
|
|
42
|
+
onDayChange: onChange,
|
|
43
|
+
error: error
|
|
44
|
+
})));
|
|
45
|
+
};
|
|
46
|
+
DatePickerInput.propTypes = {
|
|
47
|
+
id: PropTypes.string.isRequired,
|
|
48
|
+
name: PropTypes.string.isRequired,
|
|
49
|
+
label: PropTypes.string,
|
|
50
|
+
placeholder: PropTypes.string,
|
|
51
|
+
error: PropTypes.bool,
|
|
52
|
+
touched: PropTypes.bool,
|
|
53
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,
|
|
54
|
+
onChange: PropTypes.func.isRequired,
|
|
55
|
+
dashboard: PropTypes.bool
|
|
56
|
+
};
|
|
57
|
+
DatePickerInput.defaultProps = {
|
|
58
|
+
label: '',
|
|
59
|
+
placeholder: '',
|
|
60
|
+
error: false,
|
|
61
|
+
touched: false,
|
|
62
|
+
dashboard: false
|
|
63
|
+
};
|
|
64
|
+
export default DatePickerInput;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DatePickerInput } from './DatePickerInput';
|
|
3
|
+
import { ComponentWrapper } from '../ComponentWrapper/ComponentWrapper.styles';
|
|
4
|
+
// import { date } from '@storybook/addon-knobs'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components Library/Inputs/Date Picker Input',
|
|
8
|
+
component: DatePickerInput,
|
|
9
|
+
argTypes: {
|
|
10
|
+
id: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
defaultValue: ''
|
|
21
|
+
},
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
defaultValue: ''
|
|
25
|
+
},
|
|
26
|
+
value: {
|
|
27
|
+
type: 'date',
|
|
28
|
+
control: {
|
|
29
|
+
type: 'object'
|
|
30
|
+
},
|
|
31
|
+
// control: { type: 'date' },
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
//oneOf string, date, required,
|
|
35
|
+
error: {
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
defaultValue: false
|
|
38
|
+
},
|
|
39
|
+
touched: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
defaultValue: false
|
|
42
|
+
},
|
|
43
|
+
dashboard: {
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
defaultValue: false
|
|
46
|
+
},
|
|
47
|
+
checkLabel: {
|
|
48
|
+
type: 'function'
|
|
49
|
+
},
|
|
50
|
+
onChange: {
|
|
51
|
+
action: 'change',
|
|
52
|
+
type: 'function',
|
|
53
|
+
required: true
|
|
54
|
+
},
|
|
55
|
+
onBlur: {
|
|
56
|
+
action: 'blur',
|
|
57
|
+
type: 'function'
|
|
58
|
+
},
|
|
59
|
+
onFocus: {
|
|
60
|
+
action: 'hasFocus',
|
|
61
|
+
type: 'function'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const Template = args => /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(DatePickerInput, args));
|
|
66
|
+
export const DatePickerInputFilled = Template.bind({});
|
|
67
|
+
DatePickerInputFilled.args = {
|
|
68
|
+
label: 'label date',
|
|
69
|
+
value: '2022-1-4'
|
|
70
|
+
};
|
|
71
|
+
export const DatePickerInputEmpty = Template.bind({});
|
|
72
|
+
DatePickerInputEmpty.args = {
|
|
73
|
+
label: 'label date'
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//doublecheck:
|
|
77
|
+
|
|
78
|
+
//works fine if clicking on element itself to change date,
|
|
79
|
+
//but changes to "value" in SB controls print UNIX timestamp
|
|
80
|
+
//value: new Date(2022, 0, 1, 0, 4) also not working interactively
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components/macro';
|
|
2
|
+
import theme from 'styles/theme';
|
|
3
|
+
export const DatePickerOverlay = styled.div`
|
|
4
|
+
&&& > .DayPickerInput {
|
|
5
|
+
display: block;
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&&& > .DayPickerInput-OverlayWrapper {
|
|
11
|
+
z-index: 100;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&&& > .DayPickerInput > input {
|
|
15
|
+
font-family: 'Open sans';
|
|
16
|
+
display: block;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 40px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
padding: 13px 0;
|
|
23
|
+
padding-bottom: 7px;
|
|
24
|
+
border-radius: 0;
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
outline: 0;
|
|
27
|
+
border: 0;
|
|
28
|
+
border-top: 1px solid transparent;
|
|
29
|
+
border-bottom: 1px solid ${props => theme.cGrey};
|
|
30
|
+
color: ${props => theme.cBlack};
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
transition: border-color 0.2s;
|
|
33
|
+
|
|
34
|
+
&:focus,
|
|
35
|
+
&:hover {
|
|
36
|
+
box-shadow: none;
|
|
37
|
+
border-top-color: transparent;
|
|
38
|
+
border-bottom-color: ${props => theme.cPrimary};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::placeholder {
|
|
42
|
+
color: transparent;
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
${props => props.dashboard && css`
|
|
48
|
+
&&& > .DayPickerInput > input {
|
|
49
|
+
border: 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
height: 22px;
|
|
52
|
+
font-family: 'Open Sans';
|
|
53
|
+
font-weight: 300;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
line-height: 22px;
|
|
56
|
+
letter-spacing: 0.53px;
|
|
57
|
+
text-transform: normal;
|
|
58
|
+
color: ${theme.cBlack};
|
|
59
|
+
|
|
60
|
+
&::placeholder {
|
|
61
|
+
color: ${theme.cGrey2};
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`}
|
|
66
|
+
`;
|
|
67
|
+
export default DatePickerOverlay;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Wrapper, Label, InputWrap } from './Input.styles';
|
|
4
|
+
export const Input = props => {
|
|
5
|
+
const {
|
|
6
|
+
type,
|
|
7
|
+
id,
|
|
8
|
+
name,
|
|
9
|
+
label,
|
|
10
|
+
placeholder,
|
|
11
|
+
value,
|
|
12
|
+
error,
|
|
13
|
+
touched,
|
|
14
|
+
readOnly,
|
|
15
|
+
inverted,
|
|
16
|
+
dashboard
|
|
17
|
+
} = props;
|
|
18
|
+
const [labelUp, setLabelUp] = useState(false);
|
|
19
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setLabelUp(hasFocus || !!value);
|
|
22
|
+
}, [hasFocus, value]);
|
|
23
|
+
const onFocus = (e, field) => {
|
|
24
|
+
props.onFocus && props.onFocus(e, field);
|
|
25
|
+
setHasFocus(true);
|
|
26
|
+
};
|
|
27
|
+
const onBlur = (e, field) => {
|
|
28
|
+
if (props.onBlur) props.onBlur(e, field);
|
|
29
|
+
setHasFocus(false);
|
|
30
|
+
};
|
|
31
|
+
const onChange = (e, field) => {
|
|
32
|
+
props.onChange && props.onChange(e, field);
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
35
|
+
inverted: inverted
|
|
36
|
+
}, label && /*#__PURE__*/React.createElement(Label, {
|
|
37
|
+
isUp: labelUp,
|
|
38
|
+
active: hasFocus,
|
|
39
|
+
error: error && touched,
|
|
40
|
+
htmlFor: id
|
|
41
|
+
}, label), /*#__PURE__*/React.createElement(InputWrap, {
|
|
42
|
+
error: error && touched,
|
|
43
|
+
dashboard: dashboard
|
|
44
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
45
|
+
type: type,
|
|
46
|
+
id: id,
|
|
47
|
+
name: name,
|
|
48
|
+
value: value,
|
|
49
|
+
onChange: onChange,
|
|
50
|
+
onBlur: onBlur,
|
|
51
|
+
onFocus: onFocus,
|
|
52
|
+
readOnly: readOnly,
|
|
53
|
+
placeholder: placeholder
|
|
54
|
+
})));
|
|
55
|
+
};
|
|
56
|
+
Input.propTypes = {
|
|
57
|
+
type: PropTypes.string,
|
|
58
|
+
id: PropTypes.string.isRequired,
|
|
59
|
+
name: PropTypes.string.isRequired,
|
|
60
|
+
label: PropTypes.string,
|
|
61
|
+
placeholder: PropTypes.string,
|
|
62
|
+
value: PropTypes.string,
|
|
63
|
+
error: PropTypes.bool,
|
|
64
|
+
touched: PropTypes.bool,
|
|
65
|
+
onChange: PropTypes.func,
|
|
66
|
+
onBlur: PropTypes.func,
|
|
67
|
+
onFocus: PropTypes.func,
|
|
68
|
+
readOnly: PropTypes.bool,
|
|
69
|
+
inverted: PropTypes.bool,
|
|
70
|
+
dashboard: PropTypes.bool
|
|
71
|
+
};
|
|
72
|
+
Input.defaultProps = {
|
|
73
|
+
type: 'text',
|
|
74
|
+
label: '',
|
|
75
|
+
placeholder: '',
|
|
76
|
+
value: '',
|
|
77
|
+
error: false,
|
|
78
|
+
touched: false,
|
|
79
|
+
readOnly: false,
|
|
80
|
+
inverted: false,
|
|
81
|
+
dashboard: false,
|
|
82
|
+
onChange: () => {},
|
|
83
|
+
onBlur: () => {},
|
|
84
|
+
onFocus: () => {}
|
|
85
|
+
};
|
|
86
|
+
export default Input;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input } from './Input';
|
|
4
|
+
import { ComponentWrapper } from '../ComponentWrapper/ComponentWrapper.styles';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components Library/Inputs/Input',
|
|
7
|
+
component: Input,
|
|
8
|
+
argTypes: {
|
|
9
|
+
type: {
|
|
10
|
+
type: 'string'
|
|
11
|
+
},
|
|
12
|
+
id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
name: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
label: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
defaultValue: ''
|
|
23
|
+
},
|
|
24
|
+
placeholder: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
defaultValue: ''
|
|
27
|
+
},
|
|
28
|
+
value: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
defaultValue: ''
|
|
31
|
+
},
|
|
32
|
+
error: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
defaultValue: false
|
|
35
|
+
},
|
|
36
|
+
touched: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
defaultValue: false
|
|
39
|
+
},
|
|
40
|
+
readOnly: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
inverted: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
defaultValue: false
|
|
47
|
+
},
|
|
48
|
+
dashboard: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
defaultValue: false
|
|
51
|
+
},
|
|
52
|
+
checkLabel: {
|
|
53
|
+
type: 'function'
|
|
54
|
+
},
|
|
55
|
+
onChange: {
|
|
56
|
+
action: 'change',
|
|
57
|
+
type: 'function'
|
|
58
|
+
},
|
|
59
|
+
onBlur: {
|
|
60
|
+
action: 'blur',
|
|
61
|
+
type: 'function'
|
|
62
|
+
},
|
|
63
|
+
onFocus: {
|
|
64
|
+
action: 'hasFocus',
|
|
65
|
+
type: 'function'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
parameters: {
|
|
69
|
+
viewport: {
|
|
70
|
+
viewports: INITIAL_VIEWPORTS,
|
|
71
|
+
defaultViewport: 'resetviewport'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const Template = args => /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Input, args));
|
|
76
|
+
|
|
77
|
+
//trying to integrate state:
|
|
78
|
+
// const Template = args => {
|
|
79
|
+
// const [value, setValue] = useState(args.value ?? '')
|
|
80
|
+
// return (
|
|
81
|
+
// <Input
|
|
82
|
+
// {...args}
|
|
83
|
+
// onChange={(...params) => {
|
|
84
|
+
// args.onChange(...params)
|
|
85
|
+
// setValue(...params)
|
|
86
|
+
// }}
|
|
87
|
+
// value={value}
|
|
88
|
+
// />
|
|
89
|
+
// }
|
|
90
|
+
|
|
91
|
+
export const InputLabeled = Template.bind({});
|
|
92
|
+
InputLabeled.args = {
|
|
93
|
+
label: 'input description (label)'
|
|
94
|
+
};
|
|
95
|
+
InputLabeled.parameters = {
|
|
96
|
+
backgrounds: {
|
|
97
|
+
default: 'resetviewport'
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
export const InputFilled = Template.bind({});
|
|
101
|
+
InputFilled.args = {
|
|
102
|
+
label: 'input description (label)',
|
|
103
|
+
value: 'your text (value)'
|
|
104
|
+
};
|
|
105
|
+
InputFilled.parameters = {
|
|
106
|
+
backgrounds: {
|
|
107
|
+
default: 'resetviewport'
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
export const InputFillInverted = Template.bind({});
|
|
111
|
+
InputFillInverted.args = {
|
|
112
|
+
type: 'text',
|
|
113
|
+
label: 'input description (label) inverted',
|
|
114
|
+
value: 'your text (value) inverted',
|
|
115
|
+
inverted: true
|
|
116
|
+
};
|
|
117
|
+
InputFillInverted.parameters = {
|
|
118
|
+
backgrounds: {
|
|
119
|
+
default: 'grey'
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export const InputEmpty = Template.bind({});
|
|
123
|
+
InputEmpty.args = {};
|
|
124
|
+
InputEmpty.parameters = {
|
|
125
|
+
backgrounds: {
|
|
126
|
+
default: 'resetviewport'
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
//doublecheck:
|
|
131
|
+
|
|
132
|
+
// state?
|
|
133
|
+
// make error true version?
|
|
134
|
+
// why can I not fill in the input in storybook on page? not important?
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components/macro';
|
|
2
|
+
import theme from 'styles/theme';
|
|
3
|
+
export const Wrapper = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
display: block;
|
|
6
|
+
|
|
7
|
+
input:-webkit-autofill {
|
|
8
|
+
border: none;
|
|
9
|
+
border-bottom: 1px solid #f0f0f0;
|
|
10
|
+
box-shadow: 0 0 0px 1000px #fff inset;
|
|
11
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
${props => props.inverted && css`
|
|
15
|
+
${Label} {
|
|
16
|
+
color: ${theme.cWhite};
|
|
17
|
+
opacity: 0.4;
|
|
18
|
+
}
|
|
19
|
+
${InputWrap} {
|
|
20
|
+
& > input {
|
|
21
|
+
color: ${theme.cWhite};
|
|
22
|
+
border-bottom-color: ${theme.cWhite};
|
|
23
|
+
|
|
24
|
+
&:focus,
|
|
25
|
+
&:hover {
|
|
26
|
+
border-bottom-color: rgba(255, 255, 255, 0.4);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`}
|
|
31
|
+
`;
|
|
32
|
+
export const Label = styled.label`
|
|
33
|
+
z-index: 11;
|
|
34
|
+
display: block;
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: 0;
|
|
37
|
+
top: -2px;
|
|
38
|
+
height: 12px;
|
|
39
|
+
font-size: 11px;
|
|
40
|
+
line-height: 20px;
|
|
41
|
+
letter-spacing: 2px;
|
|
42
|
+
text-transform: uppercase;
|
|
43
|
+
color: ${props => theme.cBlack};
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
transform: translateY(15px);
|
|
46
|
+
transition: transform .2s, font-size .2s;
|
|
47
|
+
|
|
48
|
+
${props => props.isUp && `
|
|
49
|
+
font-size: 10px;
|
|
50
|
+
transform: translateY(0);
|
|
51
|
+
`}
|
|
52
|
+
|
|
53
|
+
${props => props.active && `
|
|
54
|
+
color: ${theme.cPrimary};
|
|
55
|
+
`}
|
|
56
|
+
|
|
57
|
+
${props => props.error && `
|
|
58
|
+
color: ${theme.cWarning};
|
|
59
|
+
`}
|
|
60
|
+
`;
|
|
61
|
+
export const InputWrap = styled.div`
|
|
62
|
+
position: relative;
|
|
63
|
+
|
|
64
|
+
& > input {
|
|
65
|
+
z-index: 0;
|
|
66
|
+
font-family: 'Open sans';
|
|
67
|
+
display: block;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 40px;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
line-height: 18px;
|
|
73
|
+
padding: 15px 0;
|
|
74
|
+
padding-bottom: 5px;
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
border: 0;
|
|
77
|
+
outline: 0;
|
|
78
|
+
border-top: 1px solid transparent;
|
|
79
|
+
border-bottom: 1px solid ${props => theme.cGrey};
|
|
80
|
+
color: ${props => theme.cBlack};
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
transition: border-color 0.2s;
|
|
83
|
+
|
|
84
|
+
&:focus,
|
|
85
|
+
&:hover {
|
|
86
|
+
border-top-color: transparent;
|
|
87
|
+
border-bottom-color: ${props => theme.cPrimary};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&::placeholder {
|
|
91
|
+
color: transparent;
|
|
92
|
+
opacity: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
${props => props.disabled && css`
|
|
97
|
+
& > input {
|
|
98
|
+
color: ${props => theme.cGrey2};
|
|
99
|
+
&:focus,
|
|
100
|
+
&:hover {
|
|
101
|
+
border-top-color: transparent;
|
|
102
|
+
border-bottom-color: ${props => theme.cGrey};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`}
|
|
106
|
+
|
|
107
|
+
${props => props.dashboard && css`
|
|
108
|
+
& > input {
|
|
109
|
+
border: 0;
|
|
110
|
+
padding: 0;
|
|
111
|
+
height: 22px;
|
|
112
|
+
font-family: 'Open Sans';
|
|
113
|
+
font-weight: 300;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
line-height: 22px;
|
|
116
|
+
letter-spacing: 0.53px;
|
|
117
|
+
text-transform: normal;
|
|
118
|
+
color: ${theme.cBlack};
|
|
119
|
+
|
|
120
|
+
&::placeholder {
|
|
121
|
+
color: ${theme.cGrey2};
|
|
122
|
+
opacity: 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
`}
|
|
126
|
+
`;
|