@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,26 @@
|
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
export class RenderToBody extends PureComponent {
|
|
4
|
+
componentDidMount() {
|
|
5
|
+
this.outsideWrapper = document.createElement('div');
|
|
6
|
+
document.body.appendChild(this.outsideWrapper);
|
|
7
|
+
this.renderOutsideBody();
|
|
8
|
+
}
|
|
9
|
+
componentDidUpdate() {
|
|
10
|
+
this.renderOutsideBody();
|
|
11
|
+
}
|
|
12
|
+
componentWillUnmount() {
|
|
13
|
+
ReactDOM.unmountComponentAtNode(this.outsideWrapper);
|
|
14
|
+
document.body.removeChild(this.outsideWrapper);
|
|
15
|
+
}
|
|
16
|
+
renderOutsideBody = () => {
|
|
17
|
+
const {
|
|
18
|
+
children
|
|
19
|
+
} = this.props;
|
|
20
|
+
ReactDOM.render(children, this.outsideWrapper);
|
|
21
|
+
};
|
|
22
|
+
render() {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export default RenderToBody;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TaxIdModal from './flow';
|
|
3
|
+
|
|
4
|
+
// import { AlgoAdressSelect } from 'index'
|
|
5
|
+
import { AuthProvider } from 'components/context/AuthContext';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components Library/Tax Id',
|
|
8
|
+
component: TaxIdModal,
|
|
9
|
+
argTypes: {
|
|
10
|
+
showFlow: {
|
|
11
|
+
type: 'boolean',
|
|
12
|
+
defaultValue: true
|
|
13
|
+
},
|
|
14
|
+
setShowFlow: {},
|
|
15
|
+
showBackButton: {
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
defaultValue: false
|
|
18
|
+
},
|
|
19
|
+
showSkipButton: {
|
|
20
|
+
type: 'boolean',
|
|
21
|
+
defaultValue: false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const Template = args => /*#__PURE__*/React.createElement(AuthProvider, null, /*#__PURE__*/React.createElement(TaxIdModal, args));
|
|
26
|
+
export const TaxIdModalFlow = Template.bind({});
|
|
27
|
+
export const TaxIdFlowWithBackButton = Template.bind({});
|
|
28
|
+
TaxIdFlowWithBackButton.args = {
|
|
29
|
+
showBackButton: true,
|
|
30
|
+
showSkipButton: true
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Text from 'components/Text/Text.styles';
|
|
3
|
+
import { navigate } from '@reach/router';
|
|
4
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
5
|
+
import { TextButton } from 'components/TextLink/TextLink.styles';
|
|
6
|
+
import Button from 'components/Button/Button.styles';
|
|
7
|
+
const RegisterTaxIdComplete = ({
|
|
8
|
+
showBackButton,
|
|
9
|
+
onClick = () => {}
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showBackButton && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
12
|
+
noPaddingVertical: true
|
|
13
|
+
}, /*#__PURE__*/React.createElement(TextButton, {
|
|
14
|
+
onClick: () => navigate('/verify-identity')
|
|
15
|
+
}, "Back to verify identity")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("h1", null, "Your Tax Id has been submitted"), /*#__PURE__*/React.createElement("p", null, "You have successfully submitted your Tax ID information on STOKR. You will be ready to invest once you have completed all required steps on your checklist. Please continue!"))), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
16
|
+
noPaddingTop: true
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
18
|
+
onClick: onClick
|
|
19
|
+
}, "Continue")));
|
|
20
|
+
};
|
|
21
|
+
export default RegisterTaxIdComplete;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Modal, ModalInner } from 'components/Modal/Modal';
|
|
3
|
+
import RegisterTaxId from './register-taxid';
|
|
4
|
+
import ComponentScroll from 'components/ComponentScroll/ComponentScroll';
|
|
5
|
+
import RegisterTaxIdComplete from './complete';
|
|
6
|
+
const RegisterTaxIdFlow = ({
|
|
7
|
+
showFlow,
|
|
8
|
+
setShowFlow,
|
|
9
|
+
showBackButton,
|
|
10
|
+
showSkipButton
|
|
11
|
+
}) => {
|
|
12
|
+
const [showComplete, setShowComplete] = useState(false);
|
|
13
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
14
|
+
fullscreen: true,
|
|
15
|
+
isOpen: showFlow,
|
|
16
|
+
onClose: () => setShowFlow(false)
|
|
17
|
+
}, /*#__PURE__*/React.createElement(ModalInner, {
|
|
18
|
+
noPaddingHorizontal: true
|
|
19
|
+
}, /*#__PURE__*/React.createElement(ComponentScroll, null, showComplete ? /*#__PURE__*/React.createElement(RegisterTaxIdComplete, {
|
|
20
|
+
showBackButton: showBackButton,
|
|
21
|
+
onClick: () => {
|
|
22
|
+
setShowComplete(false);
|
|
23
|
+
setShowFlow(false);
|
|
24
|
+
}
|
|
25
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RegisterTaxId, {
|
|
26
|
+
setShowComplete: setShowComplete,
|
|
27
|
+
showBackButton: showBackButton,
|
|
28
|
+
showSkipButton: showSkipButton
|
|
29
|
+
})))));
|
|
30
|
+
};
|
|
31
|
+
export default RegisterTaxIdFlow;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
|
+
import { navigate } from '@reach/router';
|
|
3
|
+
import styled from 'styled-components/macro';
|
|
4
|
+
import Text from 'components/Text/Text.styles';
|
|
5
|
+
import * as Yup from 'yup';
|
|
6
|
+
import { Formik } from 'formik';
|
|
7
|
+
import Input from 'components/Input/Input';
|
|
8
|
+
import Form, { FormField, FormError } from 'components/Form/Form';
|
|
9
|
+
import ToDoTask from 'components/ToDoList/ToDoListTask';
|
|
10
|
+
import { ToDoTaskState } from 'components/ToDoList/ToDoList';
|
|
11
|
+
import { iconsMap } from 'components/Icon/Icon.style';
|
|
12
|
+
import ComponentWrapper from 'components/ComponentWrapper/ComponentWrapper.styles';
|
|
13
|
+
import { TextButton } from 'components/TextLink/TextLink.styles';
|
|
14
|
+
import Button from 'components/Button/Button.styles';
|
|
15
|
+
import CryptoAddressWrapper from 'components/CryptoAddressWrapper/CryptoAddressWrapper';
|
|
16
|
+
import RefreshButton from 'components/RefreshButton/RefreshButton';
|
|
17
|
+
import SectionTitle from 'components/SectionTitle/SectionTitle.styles';
|
|
18
|
+
import FAQ from 'components/FAQ/FAQ';
|
|
19
|
+
import { AuthContext } from 'components/context/AuthContext';
|
|
20
|
+
const LiquidDescription = styled.div`
|
|
21
|
+
li {
|
|
22
|
+
font-size: 20px !important;
|
|
23
|
+
line-height: 1.5em;
|
|
24
|
+
|
|
25
|
+
img {
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
padding-bottom: 2px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const RegisterTaxId = ({
|
|
32
|
+
setShowComplete = () => {},
|
|
33
|
+
showBackButton,
|
|
34
|
+
showSkipButton
|
|
35
|
+
}) => {
|
|
36
|
+
const {
|
|
37
|
+
user = {}
|
|
38
|
+
} = useContext(AuthContext);
|
|
39
|
+
const {
|
|
40
|
+
taxId
|
|
41
|
+
} = user;
|
|
42
|
+
const {
|
|
43
|
+
updateUser
|
|
44
|
+
} = useContext(AuthContext);
|
|
45
|
+
const [isUpdatingUser, setIsUpdatingUser] = useState(false);
|
|
46
|
+
const [error, setError] = useState('');
|
|
47
|
+
const initialValues = {
|
|
48
|
+
taxId: ''
|
|
49
|
+
};
|
|
50
|
+
const validationSchema = Yup.object().shape({
|
|
51
|
+
taxId: Yup.string().required('Oops, this can‘t be blank')
|
|
52
|
+
});
|
|
53
|
+
const handleOnSubmit = async e => {
|
|
54
|
+
setIsUpdatingUser(true);
|
|
55
|
+
try {
|
|
56
|
+
await updateUser({
|
|
57
|
+
taxId: e.taxId
|
|
58
|
+
});
|
|
59
|
+
setShowComplete(true);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
setError('Something went wrong. Try again.');
|
|
62
|
+
setIsUpdatingUser(false);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const onRefreshClick = () => {
|
|
66
|
+
setError(false);
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showBackButton && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
69
|
+
noPaddingVertical: true
|
|
70
|
+
}, /*#__PURE__*/React.createElement(TextButton, {
|
|
71
|
+
onClick: () => navigate('/verify-identity')
|
|
72
|
+
}, "Back to verify identity")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(LiquidDescription, null, /*#__PURE__*/React.createElement("h1", null, "Provide your tax id"), /*#__PURE__*/React.createElement("p", null, "Depending on the offering you want to invest in, you may need to provide your tax ID. This step is optional and you will have to add it later on from your investor dashboard. Please keep in mind that you won't be allowed to invest in some offerings without providing your tax ID.")))), taxId && /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement("p", null, "You have successfully submitted your Tax ID information."))), !isUpdatingUser && !error && !taxId && /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(Formik, {
|
|
73
|
+
initialValues: initialValues,
|
|
74
|
+
validationSchema: validationSchema,
|
|
75
|
+
onSubmit: handleOnSubmit
|
|
76
|
+
}, ({
|
|
77
|
+
values,
|
|
78
|
+
errors,
|
|
79
|
+
touched,
|
|
80
|
+
handleChange,
|
|
81
|
+
handleBlur
|
|
82
|
+
}) => {
|
|
83
|
+
const submitDisabled = !values.taxId;
|
|
84
|
+
return /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
85
|
+
noPadding: true
|
|
86
|
+
}, /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(Input, {
|
|
87
|
+
id: "tax-id",
|
|
88
|
+
name: "taxId",
|
|
89
|
+
type: "input",
|
|
90
|
+
label: "enter your tax id",
|
|
91
|
+
value: values.taxId,
|
|
92
|
+
onChange: handleChange,
|
|
93
|
+
onBlur: handleBlur,
|
|
94
|
+
error: !!errors.taxId,
|
|
95
|
+
touched: !!touched.taxId
|
|
96
|
+
}), /*#__PURE__*/React.createElement(FormError, {
|
|
97
|
+
show: errors.taxId && touched.taxId
|
|
98
|
+
}, errors.taxId))), /*#__PURE__*/React.createElement("br", null), !taxId && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
99
|
+
noPaddingTop: true
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
101
|
+
minWidth: "230px",
|
|
102
|
+
type: "submit",
|
|
103
|
+
disabled: submitDisabled || isUpdatingUser || taxId
|
|
104
|
+
}, "Submit")));
|
|
105
|
+
})), (isUpdatingUser || error) && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
106
|
+
borderTop: true,
|
|
107
|
+
borderBottom: true,
|
|
108
|
+
center: true
|
|
109
|
+
}, /*#__PURE__*/React.createElement(CryptoAddressWrapper, {
|
|
110
|
+
noFailedIcon: true,
|
|
111
|
+
relative: true,
|
|
112
|
+
refresh: isUpdatingUser && 'Please wait while we submit your Tax ID.',
|
|
113
|
+
failed: error
|
|
114
|
+
})), error && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
115
|
+
center: true
|
|
116
|
+
}, /*#__PURE__*/React.createElement(RefreshButton, {
|
|
117
|
+
onClick: onRefreshClick
|
|
118
|
+
}, "TRY AGAIN")), taxId && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
119
|
+
noPaddingTop: true
|
|
120
|
+
}, /*#__PURE__*/React.createElement(ToDoTask, {
|
|
121
|
+
title: "Tax ID",
|
|
122
|
+
message: "You tax ID is submitted",
|
|
123
|
+
state: ToDoTaskState.APPROVED,
|
|
124
|
+
icon: iconsMap.check
|
|
125
|
+
})), showSkipButton && /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
126
|
+
noPaddingTop: true
|
|
127
|
+
}, /*#__PURE__*/React.createElement(TextButton, {
|
|
128
|
+
onClick: () => {
|
|
129
|
+
navigate('/risk-questionnaire');
|
|
130
|
+
}
|
|
131
|
+
}, taxId ? 'Continue' : "I'll do this later")), /*#__PURE__*/React.createElement(ComponentWrapper, {
|
|
132
|
+
noPaddingBottom: true
|
|
133
|
+
}, /*#__PURE__*/React.createElement(SectionTitle, null, "Frequently Asked Questions")), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
134
|
+
items: [{
|
|
135
|
+
title: 'Why do I need to provide my Tax ID?',
|
|
136
|
+
content: `Luxembourg has implemented the Common Reporting Standard (the “CRS”) through the law of 18 December 2015 ( the “CRS Act”) and some Luxembourg based entities are likely to be treated as a Luxembourg Reporting Financial Institution.
|
|
137
|
+
As a result, some of the Issuers on STOKR will be required to report information on their Noteholders to comply with the CRS due diligence and reporting requirements, as adopted by the CRS Act. The Issuer is required to annually report to the Luxembourg tax authorities personal and financial information related,
|
|
138
|
+
inter alia, to the identification of, holdings by and payments made to certain Noteholders qualifying as Reportable Persons (each, a Reportable Person) being (i) Individuals resident of a reportable jurisdiction, i.e. an EU Member State or a third country listed in a Grand-Ducal Regulation, (ii) Certain entities resident of a reportable jurisdiction (unless exempt from reporting), and (iii) Controlling Persons of passive non-financial entities (NFEs) which are themselves Reportable Persons.
|
|
139
|
+
This information, as exhaustively set out in Annex I of the CRS Act, will include personal data related to the Reportable Persons.
|
|
140
|
+
In this respect, Noteholders may be required to provide additional information to the Issuer to enable it to satisfy its obligations under the CRS. Failure to provide requested information may subject a Noteholder to liability for any resulting penalties or other charges and/or mandatory termination of its holding of Notes.
|
|
141
|
+
`
|
|
142
|
+
}]
|
|
143
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
144
|
+
items: [{
|
|
145
|
+
title: 'How will my information be used?',
|
|
146
|
+
content: `The Issuer, or the Management Company of the Issuer if applicable, acting on behalf of the Issuer, is responsible for the processing of personal data and each Noteholder has among others the right to access the data communicated to the Luxembourg tax authorities and to correct such data (if necessary). Any data obtained by the Issuer are to be processed in accordance with the applicable data protection legislation.
|
|
147
|
+
The Noteholders are further informed that the Information related to Reportable Persons will be disclosed to the Luxembourg tax authorities annually for the purposes set out in the CRS Act. `
|
|
148
|
+
}]
|
|
149
|
+
})), /*#__PURE__*/React.createElement(ComponentWrapper, null, /*#__PURE__*/React.createElement(FAQ, {
|
|
150
|
+
items: [{
|
|
151
|
+
title: "What if I'd like to do this later?",
|
|
152
|
+
content: 'You can always skip this step and complete it from the Checklist in your Investor Dashboard at a later point in time. However, you will not be able to invest before doing so and being verified.'
|
|
153
|
+
}]
|
|
154
|
+
})));
|
|
155
|
+
};
|
|
156
|
+
export default RegisterTaxId;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import * as sc from 'constants/style';
|
|
6
|
+
import { breakpoint } from 'utils/breakpoint';
|
|
7
|
+
import { CSSTransition } from 'react-transition-group';
|
|
8
|
+
import { RenderToBody } from 'components/renderToBody';
|
|
9
|
+
import { X } from 'components/icons';
|
|
10
|
+
const Wrapper = styled.div`
|
|
11
|
+
position: relative;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
${({
|
|
14
|
+
videoStyle
|
|
15
|
+
}) => videoStyle}
|
|
16
|
+
|
|
17
|
+
${({
|
|
18
|
+
isInvestingExpanded
|
|
19
|
+
}) => isInvestingExpanded && css`
|
|
20
|
+
align-items: center;
|
|
21
|
+
display: flex;
|
|
22
|
+
`}
|
|
23
|
+
`;
|
|
24
|
+
const zIndex = 9999;
|
|
25
|
+
const LightboxVideo = styled.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
position: fixed;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
z-index: ${zIndex};
|
|
35
|
+
|
|
36
|
+
&::before {
|
|
37
|
+
display: block;
|
|
38
|
+
content: '';
|
|
39
|
+
position: fixed;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
background-color: white;
|
|
45
|
+
opacity: 0.8;
|
|
46
|
+
z-index: ${zIndex - 1};
|
|
47
|
+
transform-origin: left center;
|
|
48
|
+
}
|
|
49
|
+
&.lightbox-enter::before {
|
|
50
|
+
transform: scaleX(0.01);
|
|
51
|
+
transition: all ${props => props.lightboxAnimationLen}ms
|
|
52
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
53
|
+
}
|
|
54
|
+
&.lightbox-enter-active::before {
|
|
55
|
+
transform: scaleX(1);
|
|
56
|
+
}
|
|
57
|
+
&.lightbox-exit::before {
|
|
58
|
+
transform: scaleX(1);
|
|
59
|
+
transform-origin: right center;
|
|
60
|
+
}
|
|
61
|
+
&.lightbox-exit-active::before {
|
|
62
|
+
transform: scaleX(0);
|
|
63
|
+
transition: all ${props => props.lightboxAnimationLen / 2}ms
|
|
64
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
65
|
+
transition-delay: ${props => props.videoAnimationLen / 2}ms;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
video {
|
|
69
|
+
max-width: 80vw;
|
|
70
|
+
max-height: 90vh;
|
|
71
|
+
position: relative;
|
|
72
|
+
z-index: ${zIndex + 1};
|
|
73
|
+
box-shadow: 0 0 20px 1px black;
|
|
74
|
+
transition: all 0.4s;
|
|
75
|
+
|
|
76
|
+
${breakpoint.below('tablet')} {
|
|
77
|
+
max-width: 88vw;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media screen and (max-width: 768px) {
|
|
81
|
+
max-width: 95vw;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
&.lightbox-enter video {
|
|
85
|
+
transform: scale(0.8) translate3d(-12%, 0, 0);
|
|
86
|
+
opacity: 0.01;
|
|
87
|
+
transition: all ${props => props.videoAnimationLen}ms
|
|
88
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
89
|
+
transition-delay: ${props => props.lightboxAnimationLen * 0.75}ms;
|
|
90
|
+
}
|
|
91
|
+
&.lightbox-enter-active video {
|
|
92
|
+
transform: scale(1) translate3d(0, 0, 0);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
&.lightbox-exit video {
|
|
96
|
+
transform: scale(1) translate3d(0, 0, 0);
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
&.lightbox-exit-active video {
|
|
100
|
+
transform: scale(0.8) translate3d(13%, 0, 0);
|
|
101
|
+
opacity: 0;
|
|
102
|
+
transition: all ${props => props.videoAnimationLen * 0.75}ms
|
|
103
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
const PlayButton = styled.div`
|
|
107
|
+
position: absolute;
|
|
108
|
+
height: 100%;
|
|
109
|
+
left: 0;
|
|
110
|
+
right: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
display: flex;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
align-items: ${({
|
|
115
|
+
isSmallCard
|
|
116
|
+
}) => isSmallCard ? 'flex-start' : 'center'};
|
|
117
|
+
z-index: 10;
|
|
118
|
+
|
|
119
|
+
${({
|
|
120
|
+
isCenter
|
|
121
|
+
}) => isCenter && css`
|
|
122
|
+
height: calc(100% - 48px);
|
|
123
|
+
`}
|
|
124
|
+
|
|
125
|
+
${({
|
|
126
|
+
isInvestingExpanded
|
|
127
|
+
}) => isInvestingExpanded && css`
|
|
128
|
+
bottom: unset;
|
|
129
|
+
`}
|
|
130
|
+
|
|
131
|
+
img {
|
|
132
|
+
transition: transform 0.3s;
|
|
133
|
+
position: relative;
|
|
134
|
+
top: ${({
|
|
135
|
+
isSmallCard
|
|
136
|
+
}) => isSmallCard ? '100px' : '0px'};
|
|
137
|
+
|
|
138
|
+
@media screen and (min-width: 769px) {
|
|
139
|
+
top: ${({
|
|
140
|
+
isSmallCard
|
|
141
|
+
}) => isSmallCard ? '132px' : '0px'};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:hover,
|
|
146
|
+
&:focus,
|
|
147
|
+
&:active {
|
|
148
|
+
img {
|
|
149
|
+
transform: scale(1.25);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
const CloseButtonContainer = styled.div`
|
|
154
|
+
align-items: center;
|
|
155
|
+
background: ${sc.BLUE_BASE_HEX};
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
display: flex;
|
|
158
|
+
height: 48px;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
position: absolute;
|
|
161
|
+
right: 0;
|
|
162
|
+
top: 0;
|
|
163
|
+
width: 48px;
|
|
164
|
+
transition: all 0.2s;
|
|
165
|
+
z-index: 99999;
|
|
166
|
+
|
|
167
|
+
&:hover {
|
|
168
|
+
background: transparent;
|
|
169
|
+
|
|
170
|
+
svg {
|
|
171
|
+
transform: rotate(-180deg);
|
|
172
|
+
fill: #000;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
svg {
|
|
177
|
+
fill: #fff;
|
|
178
|
+
transition: all 0.2s;
|
|
179
|
+
}
|
|
180
|
+
`;
|
|
181
|
+
export const StyledSlideImage = styled.div`
|
|
182
|
+
background-size: cover;
|
|
183
|
+
background-position: center;
|
|
184
|
+
height: 400px;
|
|
185
|
+
width: 100%;
|
|
186
|
+
@media screen and (max-width: 480px) {
|
|
187
|
+
height: 250px;
|
|
188
|
+
}
|
|
189
|
+
`;
|
|
190
|
+
export const Video = props => {
|
|
191
|
+
const [isPlaying, setIsPlaying] = useState(props.autoplay);
|
|
192
|
+
const {
|
|
193
|
+
src,
|
|
194
|
+
poster,
|
|
195
|
+
videoStyle,
|
|
196
|
+
isCenter,
|
|
197
|
+
isSmallCard,
|
|
198
|
+
isInvestingExpanded,
|
|
199
|
+
noPlayButton,
|
|
200
|
+
play,
|
|
201
|
+
prevProps,
|
|
202
|
+
onOpen,
|
|
203
|
+
onClose,
|
|
204
|
+
lightboxAnimationLen,
|
|
205
|
+
videoAnimationLen,
|
|
206
|
+
animationLen,
|
|
207
|
+
...otherProps
|
|
208
|
+
} = props;
|
|
209
|
+
props.lightboxAnimationLen = 550;
|
|
210
|
+
props.videoAnimationLen = 440;
|
|
211
|
+
props.animationLen = props.lightboxAnimationLen + props.videoAnimationLen;
|
|
212
|
+
const mounted = useRef(); //initializing .current for componentDidUpdate
|
|
213
|
+
|
|
214
|
+
useEffect(() => {
|
|
215
|
+
if (!mounted.current) {
|
|
216
|
+
// do componentDidMount logic
|
|
217
|
+
mounted.current = true;
|
|
218
|
+
} else {
|
|
219
|
+
// do componentDidUpdate logic
|
|
220
|
+
if (prevProps.play !== play) {
|
|
221
|
+
play ? togglePlay() : toggleStop();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
const togglePlay = () => {
|
|
226
|
+
setIsPlaying(true);
|
|
227
|
+
onOpen && onOpen();
|
|
228
|
+
document.body.style.overflow = 'hidden';
|
|
229
|
+
};
|
|
230
|
+
const toggleStop = () => {
|
|
231
|
+
setIsPlaying(false);
|
|
232
|
+
onClose && onClose();
|
|
233
|
+
document.body.style.overflow = 'unset';
|
|
234
|
+
};
|
|
235
|
+
delete otherProps.onOpen;
|
|
236
|
+
delete otherProps.onClose;
|
|
237
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
238
|
+
onClick: !noPlayButton ? this.togglePlay : () => {},
|
|
239
|
+
videoStyle: videoStyle,
|
|
240
|
+
isInvestingExpanded: isInvestingExpanded
|
|
241
|
+
}, poster && poster, !noPlayButton && /*#__PURE__*/React.createElement(PlayButton, {
|
|
242
|
+
isCenter: isCenter,
|
|
243
|
+
isSmallCard: isSmallCard,
|
|
244
|
+
isInvestingExpanded: isInvestingExpanded
|
|
245
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
246
|
+
alt: "Play video",
|
|
247
|
+
src: require('./img/play-btn.svg')
|
|
248
|
+
})), /*#__PURE__*/React.createElement(RenderToBody, null, /*#__PURE__*/React.createElement(CSSTransition, {
|
|
249
|
+
in: isPlaying,
|
|
250
|
+
timeout: animationLen,
|
|
251
|
+
classNames: "lightbox",
|
|
252
|
+
unmountOnExit: true
|
|
253
|
+
}, /*#__PURE__*/React.createElement(LightboxVideo, {
|
|
254
|
+
isPlaying: isPlaying,
|
|
255
|
+
onClick: toggleStop,
|
|
256
|
+
lightboxAnimationLen: lightboxAnimationLen,
|
|
257
|
+
videoAnimationLen: videoAnimationLen
|
|
258
|
+
}, /*#__PURE__*/React.createElement(CloseButtonContainer, null, /*#__PURE__*/React.createElement(X, null)), /*#__PURE__*/React.createElement("video", _extends({
|
|
259
|
+
ref: video => video && video.play(),
|
|
260
|
+
controls: true,
|
|
261
|
+
src: src
|
|
262
|
+
}, otherProps))))));
|
|
263
|
+
};
|
|
264
|
+
Video.propTypes = {
|
|
265
|
+
src: PropTypes.string.isRequired,
|
|
266
|
+
autoplay: PropTypes.bool,
|
|
267
|
+
// Hack to let the component know the default attribute
|
|
268
|
+
poster: PropTypes.any,
|
|
269
|
+
onOpen: PropTypes.func,
|
|
270
|
+
onClose: PropTypes.func
|
|
271
|
+
};
|
|
272
|
+
export default Video;
|
|
273
|
+
|
|
274
|
+
//doublecheck: do not know whether this is working, no working storybook to check.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Video from './Video';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components Library/Video',
|
|
5
|
+
component: Video,
|
|
6
|
+
argTypes: {
|
|
7
|
+
src: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
defaultValue: '',
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
autoplay: {
|
|
13
|
+
type: 'boolean',
|
|
14
|
+
defaultValue: true
|
|
15
|
+
},
|
|
16
|
+
poster: {
|
|
17
|
+
type: 'any'
|
|
18
|
+
},
|
|
19
|
+
onOpen: {
|
|
20
|
+
type: 'function',
|
|
21
|
+
action: 'onOpen'
|
|
22
|
+
},
|
|
23
|
+
onClose: {
|
|
24
|
+
type: 'function',
|
|
25
|
+
action: 'onClose'
|
|
26
|
+
},
|
|
27
|
+
isPlaying: {
|
|
28
|
+
type: 'boolean',
|
|
29
|
+
defaultValue: false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const Template = args => /*#__PURE__*/React.createElement(Video, args);
|
|
34
|
+
|
|
35
|
+
// export const VideoDefault = Template.bind({})
|
|
36
|
+
// VideoDefault.args = {}
|
|
37
|
+
|
|
38
|
+
export const VideoMP4 = Template.bind({});
|
|
39
|
+
VideoMP4.args = {
|
|
40
|
+
src: '/static/videos/Capybara-with-mandarin orange-on-head.mp4'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// doublecheck:
|
|
44
|
+
//src should be mp4
|
|
45
|
+
// constant styles(<found and copied folder to CL) and breakpoint from utils breaking storybook
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="60" viewBox="0 0 60 60"><defs><path id="ftiva" d="M392 327c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z"/><path id="ftivd" d="M417.5 323l6.5 8h-13z"/><mask id="ftivc" width="2" height="2" x="-1" y="-1"><path fill="#fff" d="M392 303h48v48h-48z"/><use xlink:href="#ftiva"/></mask><filter id="ftivb" width="82" height="84" x="375" y="286" filterUnits="userSpaceOnUse"><feOffset dy="2" in="SourceGraphic" result="FeOffset1029Out"/><feGaussianBlur in="FeOffset1029Out" result="FeGaussianBlur1030Out" stdDeviation="2.8 2.8"/></filter></defs><g><g transform="translate(-386 -299)"><g><g><g><g filter="url(#ftivb)"><use fill="none" stroke-opacity=".16" stroke-width="0" mask="url("#ftivc")" xlink:href="#ftiva"/><use fill-opacity=".16" xlink:href="#ftiva"/></g><use fill="#ee220d" xlink:href="#ftiva"/></g><g transform="rotate(90 417.5 327)"><use fill="#fff" xlink:href="#ftivd"/></g></g></g></g></g></svg>
|