@bosonprotocol/react-kit 0.34.0-alpha.8 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/buttons/BaseButton.d.ts +9 -3
- package/dist/cjs/components/buttons/BaseButton.d.ts.map +1 -1
- package/dist/cjs/components/buttons/BaseButton.js +11 -22
- package/dist/cjs/components/buttons/BaseButton.js.map +1 -1
- package/dist/cjs/components/buttons/Button.d.ts +1 -1
- package/dist/cjs/components/config/ConfigContext.d.ts +2 -1
- package/dist/cjs/components/config/ConfigContext.d.ts.map +1 -1
- package/dist/cjs/components/config/ConfigContext.js.map +1 -1
- package/dist/cjs/components/config/ConfigProvider.d.ts.map +1 -1
- package/dist/cjs/components/config/ConfigProvider.js +4 -1
- package/dist/cjs/components/config/ConfigProvider.js.map +1 -1
- package/dist/cjs/components/connection/utils.d.ts.map +1 -1
- package/dist/cjs/components/connection/utils.js +0 -1
- package/dist/cjs/components/connection/utils.js.map +1 -1
- package/dist/cjs/components/cta/common/CtaButton.d.ts.map +1 -1
- package/dist/cjs/components/cta/common/CtaButton.js +1 -1
- package/dist/cjs/components/cta/common/CtaButton.js.map +1 -1
- package/dist/cjs/components/cta/common/styles.d.ts.map +1 -1
- package/dist/cjs/components/cta/common/styles.js +10 -8
- package/dist/cjs/components/cta/common/styles.js.map +1 -1
- package/dist/cjs/components/currencyDisplay/CurrencyDisplay.d.ts +5 -2
- package/dist/cjs/components/currencyDisplay/CurrencyDisplay.d.ts.map +1 -1
- package/dist/cjs/components/currencyDisplay/CurrencyDisplay.js +6 -7
- package/dist/cjs/components/currencyDisplay/CurrencyDisplay.js.map +1 -1
- package/dist/cjs/components/exchangeCard/ExchangeCard.d.ts +1 -1
- package/dist/cjs/components/form/BaseCheckbox.d.ts +1 -1
- package/dist/cjs/components/form/BaseCheckbox.d.ts.map +1 -1
- package/dist/cjs/components/form/BaseCheckbox.js +9 -5
- package/dist/cjs/components/form/BaseCheckbox.js.map +1 -1
- package/dist/cjs/components/form/CountrySelect.d.ts +2 -2
- package/dist/cjs/components/form/CountrySelect.d.ts.map +1 -1
- package/dist/cjs/components/form/CountrySelect.js.map +1 -1
- package/dist/cjs/components/form/Field.styles.d.ts +28 -22
- package/dist/cjs/components/form/Field.styles.d.ts.map +1 -1
- package/dist/cjs/components/form/Field.styles.js +40 -13
- package/dist/cjs/components/form/Field.styles.js.map +1 -1
- package/dist/cjs/components/form/Select.d.ts +2 -2
- package/dist/cjs/components/form/Select.d.ts.map +1 -1
- package/dist/cjs/components/form/Select.js +2 -2
- package/dist/cjs/components/form/Select.js.map +1 -1
- package/dist/cjs/components/form/Upload/BaseUpload.d.ts +8 -0
- package/dist/cjs/components/form/Upload/BaseUpload.d.ts.map +1 -1
- package/dist/cjs/components/form/Upload/BaseUpload.js +99 -21
- package/dist/cjs/components/form/Upload/BaseUpload.js.map +1 -1
- package/dist/cjs/components/form/Upload/UploadedFile.d.ts +2 -1
- package/dist/cjs/components/form/Upload/UploadedFile.d.ts.map +1 -1
- package/dist/cjs/components/form/Upload/UploadedFile.js +3 -3
- package/dist/cjs/components/form/Upload/UploadedFile.js.map +1 -1
- package/dist/cjs/components/form/Upload/UploadedFiles.d.ts +2 -1
- package/dist/cjs/components/form/Upload/UploadedFiles.d.ts.map +1 -1
- package/dist/cjs/components/form/Upload/UploadedFiles.js +2 -2
- package/dist/cjs/components/form/Upload/UploadedFiles.js.map +1 -1
- package/dist/cjs/components/form/Upload/WithUploadToIpfs.d.ts +3 -1
- package/dist/cjs/components/form/Upload/WithUploadToIpfs.d.ts.map +1 -1
- package/dist/cjs/components/form/Upload/WithUploadToIpfs.js +5 -1
- package/dist/cjs/components/form/Upload/WithUploadToIpfs.js.map +1 -1
- package/dist/cjs/components/form/types.d.ts +21 -13
- package/dist/cjs/components/form/types.d.ts.map +1 -1
- package/dist/cjs/components/image/Image.styles.d.ts.map +1 -1
- package/dist/cjs/components/image/Image.styles.js +0 -2
- package/dist/cjs/components/image/Image.styles.js.map +1 -1
- package/dist/cjs/components/magicLink/MagicProvider.js +1 -1
- package/dist/cjs/components/magicLink/MagicProvider.js.map +1 -1
- package/dist/cjs/components/magicLink/UserContext.d.ts.map +1 -1
- package/dist/cjs/components/magicLink/UserContext.js +10 -2
- package/dist/cjs/components/magicLink/UserContext.js.map +1 -1
- package/dist/cjs/components/modal/components/Redeem/MyItems/Exchange.js +1 -1
- package/dist/cjs/components/modal/components/Redeem/MyItems/Exchange.js.map +1 -1
- package/dist/cjs/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
- package/dist/cjs/components/modal/components/common/detail/Detail.style.d.ts +51 -51
- package/dist/cjs/components/productCard/ProductCard.d.ts +5 -2
- package/dist/cjs/components/productCard/ProductCard.d.ts.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.js +42 -34
- package/dist/cjs/components/productCard/ProductCard.js.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.styles.d.ts +111 -4
- package/dist/cjs/components/productCard/ProductCard.styles.d.ts.map +1 -1
- package/dist/cjs/components/productCard/ProductCard.styles.js +52 -31
- package/dist/cjs/components/productCard/ProductCard.styles.js.map +1 -1
- package/dist/cjs/components/productCard/commonStyles.d.ts.map +1 -1
- package/dist/cjs/components/productCard/commonStyles.js +0 -1
- package/dist/cjs/components/productCard/commonStyles.js.map +1 -1
- package/dist/cjs/components/skeleton/CollectionsCardSkeleton.d.ts.map +1 -1
- package/dist/cjs/components/skeleton/CollectionsCardSkeleton.js +39 -17
- package/dist/cjs/components/skeleton/CollectionsCardSkeleton.js.map +1 -1
- package/dist/cjs/components/skeleton/ProductCardSkeleton.d.ts.map +1 -1
- package/dist/cjs/components/skeleton/ProductCardSkeleton.js +18 -19
- package/dist/cjs/components/skeleton/ProductCardSkeleton.js.map +1 -1
- package/dist/cjs/components/ui/ThemedButton.d.ts +1 -1
- package/dist/cjs/components/ui/Video.js +1 -1
- package/dist/cjs/components/ui/Video.js.map +1 -1
- package/dist/cjs/components/ui/column/index.d.ts +1 -1
- package/dist/cjs/components/ui/styles.d.ts +1 -1
- package/dist/cjs/components/ui/styles.d.ts.map +1 -1
- package/dist/cjs/components/ui/styles.js +18 -27
- package/dist/cjs/components/ui/styles.js.map +1 -1
- package/dist/cjs/components/wallet/ConnectButton.d.ts.map +1 -1
- package/dist/cjs/components/wallet/ConnectButton.js +3 -2
- package/dist/cjs/components/wallet/ConnectButton.js.map +1 -1
- package/dist/cjs/components/wallet/wallet-connection.d.ts +9559 -9559
- package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts +3 -3
- package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.js +2 -2
- package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.js.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/IconButton.js +4 -3
- package/dist/cjs/components/wallet2/accountDrawer/IconButton.js.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.d.ts +3 -3
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.js +2 -2
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.js.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts +5 -2
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js +3 -2
- package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.d.ts +6 -1
- package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.js +7 -5
- package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.js.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/Option.d.ts +5 -1
- package/dist/cjs/components/wallet2/walletModal/Option.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/Option.js +5 -2
- package/dist/cjs/components/wallet2/walletModal/Option.js.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/index.d.ts +12 -4
- package/dist/cjs/components/wallet2/walletModal/index.d.ts.map +1 -1
- package/dist/cjs/components/wallet2/walletModal/index.js +3 -3
- package/dist/cjs/components/wallet2/walletModal/index.js.map +1 -1
- package/dist/cjs/hooks/connection/connection.d.ts.map +1 -1
- package/dist/cjs/hooks/connection/connection.js +41 -12
- package/dist/cjs/hooks/connection/connection.js.map +1 -1
- package/dist/cjs/hooks/connection/useSyncChainQuery.js.map +1 -1
- package/dist/cjs/hooks/index.d.ts +2 -0
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.js +7 -1
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/magic.d.ts +4 -4
- package/dist/cjs/hooks/magic.d.ts.map +1 -1
- package/dist/cjs/hooks/magic.js +9 -6
- package/dist/cjs/hooks/magic.js.map +1 -1
- package/dist/cjs/lib/config/config.d.ts.map +1 -1
- package/dist/cjs/lib/config/config.js +0 -3
- package/dist/cjs/lib/config/config.js.map +1 -1
- package/dist/cjs/lib/signer/externalSigner.d.ts.map +1 -1
- package/dist/cjs/lib/signer/externalSigner.js +7 -0
- package/dist/cjs/lib/signer/externalSigner.js.map +1 -1
- package/dist/cjs/theme.d.ts +2 -0
- package/dist/cjs/theme.d.ts.map +1 -1
- package/dist/cjs/theme.js +3 -1
- package/dist/cjs/theme.js.map +1 -1
- package/dist/cjs/types/helpers.d.ts +3 -12
- package/dist/cjs/types/helpers.d.ts.map +1 -1
- package/dist/cjs/types/helpers.js +0 -1
- package/dist/cjs/types/helpers.js.map +1 -1
- package/dist/esm/components/buttons/BaseButton.d.ts +9 -3
- package/dist/esm/components/buttons/BaseButton.d.ts.map +1 -1
- package/dist/esm/components/buttons/BaseButton.js +11 -22
- package/dist/esm/components/buttons/BaseButton.js.map +1 -1
- package/dist/esm/components/buttons/Button.d.ts +1 -1
- package/dist/esm/components/config/ConfigContext.d.ts +2 -1
- package/dist/esm/components/config/ConfigContext.d.ts.map +1 -1
- package/dist/esm/components/config/ConfigContext.js.map +1 -1
- package/dist/esm/components/config/ConfigProvider.d.ts.map +1 -1
- package/dist/esm/components/config/ConfigProvider.js +4 -1
- package/dist/esm/components/config/ConfigProvider.js.map +1 -1
- package/dist/esm/components/connection/utils.d.ts.map +1 -1
- package/dist/esm/components/connection/utils.js +0 -1
- package/dist/esm/components/connection/utils.js.map +1 -1
- package/dist/esm/components/cta/common/CtaButton.d.ts.map +1 -1
- package/dist/esm/components/cta/common/CtaButton.js +1 -1
- package/dist/esm/components/cta/common/CtaButton.js.map +1 -1
- package/dist/esm/components/cta/common/styles.d.ts.map +1 -1
- package/dist/esm/components/cta/common/styles.js +10 -8
- package/dist/esm/components/cta/common/styles.js.map +1 -1
- package/dist/esm/components/currencyDisplay/CurrencyDisplay.d.ts +5 -2
- package/dist/esm/components/currencyDisplay/CurrencyDisplay.d.ts.map +1 -1
- package/dist/esm/components/currencyDisplay/CurrencyDisplay.js +6 -7
- package/dist/esm/components/currencyDisplay/CurrencyDisplay.js.map +1 -1
- package/dist/esm/components/exchangeCard/ExchangeCard.d.ts +1 -1
- package/dist/esm/components/form/BaseCheckbox.d.ts +1 -1
- package/dist/esm/components/form/BaseCheckbox.d.ts.map +1 -1
- package/dist/esm/components/form/BaseCheckbox.js +8 -5
- package/dist/esm/components/form/BaseCheckbox.js.map +1 -1
- package/dist/esm/components/form/CountrySelect.d.ts +2 -2
- package/dist/esm/components/form/CountrySelect.d.ts.map +1 -1
- package/dist/esm/components/form/CountrySelect.js.map +1 -1
- package/dist/esm/components/form/Field.styles.d.ts +28 -22
- package/dist/esm/components/form/Field.styles.d.ts.map +1 -1
- package/dist/esm/components/form/Field.styles.js +39 -12
- package/dist/esm/components/form/Field.styles.js.map +1 -1
- package/dist/esm/components/form/Select.d.ts +2 -2
- package/dist/esm/components/form/Select.d.ts.map +1 -1
- package/dist/esm/components/form/Select.js +2 -2
- package/dist/esm/components/form/Select.js.map +1 -1
- package/dist/esm/components/form/Upload/BaseUpload.d.ts +8 -0
- package/dist/esm/components/form/Upload/BaseUpload.d.ts.map +1 -1
- package/dist/esm/components/form/Upload/BaseUpload.js +101 -25
- package/dist/esm/components/form/Upload/BaseUpload.js.map +1 -1
- package/dist/esm/components/form/Upload/UploadedFile.d.ts +2 -1
- package/dist/esm/components/form/Upload/UploadedFile.d.ts.map +1 -1
- package/dist/esm/components/form/Upload/UploadedFile.js +4 -4
- package/dist/esm/components/form/Upload/UploadedFile.js.map +1 -1
- package/dist/esm/components/form/Upload/UploadedFiles.d.ts +2 -1
- package/dist/esm/components/form/Upload/UploadedFiles.d.ts.map +1 -1
- package/dist/esm/components/form/Upload/UploadedFiles.js +2 -2
- package/dist/esm/components/form/Upload/UploadedFiles.js.map +1 -1
- package/dist/esm/components/form/Upload/WithUploadToIpfs.d.ts +3 -1
- package/dist/esm/components/form/Upload/WithUploadToIpfs.d.ts.map +1 -1
- package/dist/esm/components/form/Upload/WithUploadToIpfs.js +5 -1
- package/dist/esm/components/form/Upload/WithUploadToIpfs.js.map +1 -1
- package/dist/esm/components/form/types.d.ts +21 -13
- package/dist/esm/components/form/types.d.ts.map +1 -1
- package/dist/esm/components/image/Image.styles.d.ts.map +1 -1
- package/dist/esm/components/image/Image.styles.js +0 -2
- package/dist/esm/components/image/Image.styles.js.map +1 -1
- package/dist/esm/components/magicLink/MagicProvider.js +1 -1
- package/dist/esm/components/magicLink/MagicProvider.js.map +1 -1
- package/dist/esm/components/magicLink/UserContext.d.ts.map +1 -1
- package/dist/esm/components/magicLink/UserContext.js +10 -2
- package/dist/esm/components/magicLink/UserContext.js.map +1 -1
- package/dist/esm/components/modal/components/Redeem/MyItems/Exchange.js +1 -1
- package/dist/esm/components/modal/components/Redeem/MyItems/Exchange.js.map +1 -1
- package/dist/esm/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
- package/dist/esm/components/modal/components/common/detail/Detail.style.d.ts +51 -51
- package/dist/esm/components/productCard/ProductCard.d.ts +5 -2
- package/dist/esm/components/productCard/ProductCard.d.ts.map +1 -1
- package/dist/esm/components/productCard/ProductCard.js +20 -32
- package/dist/esm/components/productCard/ProductCard.js.map +1 -1
- package/dist/esm/components/productCard/ProductCard.styles.d.ts +111 -4
- package/dist/esm/components/productCard/ProductCard.styles.d.ts.map +1 -1
- package/dist/esm/components/productCard/ProductCard.styles.js +51 -29
- package/dist/esm/components/productCard/ProductCard.styles.js.map +1 -1
- package/dist/esm/components/productCard/commonStyles.d.ts.map +1 -1
- package/dist/esm/components/productCard/commonStyles.js +0 -1
- package/dist/esm/components/productCard/commonStyles.js.map +1 -1
- package/dist/esm/components/skeleton/CollectionsCardSkeleton.d.ts.map +1 -1
- package/dist/esm/components/skeleton/CollectionsCardSkeleton.js +39 -17
- package/dist/esm/components/skeleton/CollectionsCardSkeleton.js.map +1 -1
- package/dist/esm/components/skeleton/ProductCardSkeleton.d.ts.map +1 -1
- package/dist/esm/components/skeleton/ProductCardSkeleton.js +19 -20
- package/dist/esm/components/skeleton/ProductCardSkeleton.js.map +1 -1
- package/dist/esm/components/ui/ThemedButton.d.ts +1 -1
- package/dist/esm/components/ui/Video.js +1 -1
- package/dist/esm/components/ui/Video.js.map +1 -1
- package/dist/esm/components/ui/column/index.d.ts +1 -1
- package/dist/esm/components/ui/styles.d.ts +1 -1
- package/dist/esm/components/ui/styles.d.ts.map +1 -1
- package/dist/esm/components/ui/styles.js +17 -26
- package/dist/esm/components/ui/styles.js.map +1 -1
- package/dist/esm/components/wallet/ConnectButton.d.ts.map +1 -1
- package/dist/esm/components/wallet/ConnectButton.js +4 -3
- package/dist/esm/components/wallet/ConnectButton.js.map +1 -1
- package/dist/esm/components/wallet/wallet-connection.d.ts +9559 -9559
- package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts +3 -3
- package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.js +2 -2
- package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.js.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/IconButton.js +4 -3
- package/dist/esm/components/wallet2/accountDrawer/IconButton.js.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.d.ts +3 -3
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.d.ts.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.js +2 -2
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.js.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts +5 -2
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts.map +1 -1
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js +3 -2
- package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js.map +1 -1
- package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.d.ts +6 -1
- package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.d.ts.map +1 -1
- package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.js +7 -5
- package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.js.map +1 -1
- package/dist/esm/components/wallet2/walletModal/Option.d.ts +5 -1
- package/dist/esm/components/wallet2/walletModal/Option.d.ts.map +1 -1
- package/dist/esm/components/wallet2/walletModal/Option.js +5 -2
- package/dist/esm/components/wallet2/walletModal/Option.js.map +1 -1
- package/dist/esm/components/wallet2/walletModal/index.d.ts +12 -4
- package/dist/esm/components/wallet2/walletModal/index.d.ts.map +1 -1
- package/dist/esm/components/wallet2/walletModal/index.js +3 -3
- package/dist/esm/components/wallet2/walletModal/index.js.map +1 -1
- package/dist/esm/hooks/connection/connection.d.ts.map +1 -1
- package/dist/esm/hooks/connection/connection.js +41 -12
- package/dist/esm/hooks/connection/connection.js.map +1 -1
- package/dist/esm/hooks/connection/useSyncChainQuery.js.map +1 -1
- package/dist/esm/hooks/index.d.ts +2 -0
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/magic.d.ts +4 -4
- package/dist/esm/hooks/magic.d.ts.map +1 -1
- package/dist/esm/hooks/magic.js +9 -6
- package/dist/esm/hooks/magic.js.map +1 -1
- package/dist/esm/lib/config/config.d.ts.map +1 -1
- package/dist/esm/lib/config/config.js +0 -3
- package/dist/esm/lib/config/config.js.map +1 -1
- package/dist/esm/lib/signer/externalSigner.d.ts.map +1 -1
- package/dist/esm/lib/signer/externalSigner.js +7 -0
- package/dist/esm/lib/signer/externalSigner.js.map +1 -1
- package/dist/esm/theme.d.ts +2 -0
- package/dist/esm/theme.d.ts.map +1 -1
- package/dist/esm/theme.js +3 -1
- package/dist/esm/theme.js.map +1 -1
- package/dist/esm/types/helpers.d.ts +3 -12
- package/dist/esm/types/helpers.d.ts.map +1 -1
- package/dist/esm/types/helpers.js +0 -1
- package/dist/esm/types/helpers.js.map +1 -1
- package/package.json +5 -5
- package/src/components/buttons/BaseButton.tsx +20 -38
- package/src/components/config/ConfigContext.ts +2 -1
- package/src/components/config/ConfigProvider.tsx +5 -2
- package/src/components/connection/utils.ts +0 -1
- package/src/components/cta/common/CtaButton.tsx +1 -1
- package/src/components/cta/common/styles.ts +10 -8
- package/src/components/currencyDisplay/CurrencyDisplay.tsx +21 -18
- package/src/components/exchangeCard/ExchangeCard.tsx +1 -1
- package/src/components/form/BaseCheckbox.tsx +15 -3
- package/src/components/form/CountrySelect.tsx +27 -26
- package/src/components/form/Field.styles.ts +49 -13
- package/src/components/form/Select.tsx +11 -11
- package/src/components/form/Upload/BaseUpload.tsx +186 -70
- package/src/components/form/Upload/UploadedFile.tsx +5 -3
- package/src/components/form/Upload/UploadedFiles.tsx +7 -1
- package/src/components/form/Upload/WithUploadToIpfs.tsx +8 -2
- package/src/components/form/types.ts +67 -20
- package/src/components/image/Image.styles.ts +0 -2
- package/src/components/magicLink/MagicProvider.tsx +1 -1
- package/src/components/magicLink/UserContext.tsx +10 -3
- package/src/components/modal/components/Redeem/MyItems/Exchange.tsx +1 -1
- package/src/components/productCard/ProductCard.styles.ts +58 -31
- package/src/components/productCard/ProductCard.tsx +54 -56
- package/src/components/productCard/commonStyles.ts +0 -1
- package/src/components/skeleton/CollectionsCardSkeleton.tsx +63 -39
- package/src/components/skeleton/ProductCardSkeleton.tsx +24 -37
- package/src/components/ui/Video.tsx +1 -1
- package/src/components/ui/styles.ts +18 -27
- package/src/components/wallet/ConnectButton.tsx +12 -9
- package/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx +5 -6
- package/src/components/wallet2/accountDrawer/IconButton.tsx +4 -4
- package/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx +8 -4
- package/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx +8 -2
- package/src/components/wallet2/walletModal/ConnectionErrorView.tsx +21 -6
- package/src/components/wallet2/walletModal/Option.tsx +9 -2
- package/src/components/wallet2/walletModal/index.tsx +17 -6
- package/src/hooks/connection/connection.ts +42 -12
- package/src/hooks/connection/useSyncChainQuery.ts +1 -1
- package/src/hooks/index.ts +7 -0
- package/src/hooks/magic.ts +9 -6
- package/src/lib/config/config.ts +0 -5
- package/src/lib/signer/externalSigner.ts +7 -0
- package/src/stories/ConnectWallet.stories.tsx +34 -1
- package/src/stories/ProductCard.stories.tsx +1 -7
- package/src/stories/buttons/Upload.stories.tsx +17 -7
- package/src/stories/form/BaseCheckbox.stories.tsx +8 -0
- package/src/stories/widgets/Commit.stories.tsx +2 -1
- package/src/theme.ts +3 -1
- package/src/types/helpers.ts +3 -27
|
@@ -3,27 +3,45 @@ import styled from "styled-components";
|
|
|
3
3
|
import { theme } from "../../theme";
|
|
4
4
|
import { cardWrapperStyles } from "../productCard/commonStyles";
|
|
5
5
|
import { LoadingBubble } from "./common";
|
|
6
|
-
|
|
6
|
+
import { Grid } from "../ui/Grid";
|
|
7
|
+
const colors = theme.colors.light;
|
|
7
8
|
const Container = styled.div`
|
|
8
|
-
display:
|
|
9
|
-
|
|
10
|
-
grid-template-rows: repeat(2, min-content);
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
11
|
${cardWrapperStyles}
|
|
12
|
+
/* REMs gives bad height here on smaller views */
|
|
13
|
+
height: 279px;
|
|
14
|
+
min-width: 265px;
|
|
12
15
|
`;
|
|
13
16
|
|
|
14
17
|
const ImagesContainer = styled.div`
|
|
15
18
|
width: 100%;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
grid-row-gap: 1px;
|
|
19
|
+
position: relative;
|
|
20
|
+
/* REMs gives bad height here on smaller views */
|
|
21
|
+
height: 208px;
|
|
22
|
+
background-color: ${colors.lightGrey};
|
|
21
23
|
`;
|
|
22
24
|
|
|
23
25
|
const BottomCard = styled.div`
|
|
24
|
-
padding: 1rem 1.5rem 1rem
|
|
26
|
+
padding: 1rem 1.5rem 1rem 0.3125rem;
|
|
25
27
|
`;
|
|
26
28
|
|
|
29
|
+
const ImageOne = styled.div`
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 50%;
|
|
32
|
+
left: 10%;
|
|
33
|
+
transform: translateY(-50%);
|
|
34
|
+
`;
|
|
35
|
+
const ImageTwo = styled.div`
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 10%;
|
|
38
|
+
top: 5%;
|
|
39
|
+
`;
|
|
40
|
+
const ImageThree = styled.div`
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 10%;
|
|
43
|
+
bottom: 5%;
|
|
44
|
+
`;
|
|
27
45
|
type SkeletonCardProps = ButtonHTMLAttributes<HTMLDivElement> & {
|
|
28
46
|
withBottomText?: boolean;
|
|
29
47
|
};
|
|
@@ -31,36 +49,42 @@ export const CollectionsCardSkeleton = (props: SkeletonCardProps) => {
|
|
|
31
49
|
return (
|
|
32
50
|
<Container>
|
|
33
51
|
<ImagesContainer>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
<ImageOne>
|
|
53
|
+
<LoadingBubble
|
|
54
|
+
$width="140px"
|
|
55
|
+
$height="102px"
|
|
56
|
+
$borderRadius="0px"
|
|
57
|
+
$backgroundColor={theme.colors.light.darkGrey}
|
|
58
|
+
/>
|
|
59
|
+
</ImageOne>
|
|
60
|
+
<ImageTwo>
|
|
61
|
+
<LoadingBubble
|
|
62
|
+
$width="60px"
|
|
63
|
+
$height="50px"
|
|
64
|
+
$borderRadius="0px"
|
|
65
|
+
$backgroundColor={theme.colors.light.darkGrey}
|
|
66
|
+
/>
|
|
67
|
+
</ImageTwo>
|
|
68
|
+
<ImageThree>
|
|
69
|
+
<LoadingBubble
|
|
70
|
+
$width="60px"
|
|
71
|
+
$height="50px"
|
|
72
|
+
$borderRadius="0px"
|
|
73
|
+
$backgroundColor={theme.colors.light.darkGrey}
|
|
74
|
+
/>
|
|
75
|
+
</ImageThree>
|
|
58
76
|
</ImagesContainer>
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
<Grid
|
|
78
|
+
justifyContent="flex-start"
|
|
79
|
+
align-items="center"
|
|
80
|
+
marginLeft={"1.5rem"}
|
|
81
|
+
>
|
|
82
|
+
<LoadingBubble $width="43px" $height="43px" $borderRadius={"100%"} />
|
|
83
|
+
<BottomCard>
|
|
84
|
+
<LoadingBubble $width="52px" $height="18px" $margin="0 0 4.375px 0" />
|
|
85
|
+
<LoadingBubble $width="30px" $height="25px" />
|
|
86
|
+
</BottomCard>
|
|
87
|
+
</Grid>
|
|
64
88
|
</Container>
|
|
65
89
|
);
|
|
66
90
|
};
|
|
@@ -2,72 +2,59 @@ import React, { ButtonHTMLAttributes } from "react";
|
|
|
2
2
|
import {
|
|
3
3
|
BottomText,
|
|
4
4
|
ProductCardBottom,
|
|
5
|
-
ProductCardBottomContent,
|
|
6
|
-
ProductCardCreator,
|
|
7
|
-
ProductCardCreatorAvatar,
|
|
8
|
-
ProductCardCreatorName,
|
|
9
|
-
ProductCardData,
|
|
10
5
|
ProductCardImageWrapper,
|
|
11
|
-
ProductCardPrice,
|
|
12
|
-
ProductCardPriceWrapper,
|
|
13
6
|
ProductCardTitle,
|
|
14
7
|
ProductCardTitleWrapper,
|
|
15
8
|
ProductCardWrapper
|
|
16
9
|
} from "../productCard/ProductCard.styles";
|
|
17
|
-
import { Grid } from "../ui/Grid";
|
|
18
10
|
import { theme } from "../../theme";
|
|
19
11
|
import { LoadingBubble } from "./common";
|
|
12
|
+
import styled from "styled-components";
|
|
20
13
|
|
|
21
14
|
type SkeletonCardProps = ButtonHTMLAttributes<HTMLDivElement> & {
|
|
22
15
|
withBottomText?: boolean;
|
|
23
16
|
};
|
|
17
|
+
|
|
18
|
+
const ProductCardImageWrapperStyled = styled(ProductCardImageWrapper)`
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
width: 100%;
|
|
21
|
+
/* REMs gives bad height here on smaller views */
|
|
22
|
+
max-height: 210px;
|
|
23
|
+
min-height: 11.25rem;
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const ProductCardTitleWrapperStyled = styled(ProductCardTitleWrapper)`
|
|
27
|
+
margin-bottom: 5px;
|
|
28
|
+
`;
|
|
24
29
|
export const ProductCardSkeleton = (props: SkeletonCardProps) => {
|
|
25
30
|
const { withBottomText } = props;
|
|
26
31
|
|
|
27
32
|
return (
|
|
28
33
|
<ProductCardWrapper {...props} $isHoverDisabled={true}>
|
|
29
|
-
<
|
|
34
|
+
<ProductCardImageWrapperStyled>
|
|
30
35
|
<LoadingBubble
|
|
31
36
|
$width="100%"
|
|
32
37
|
$height="340px"
|
|
33
38
|
$borderRadius="0px"
|
|
34
39
|
$backgroundColor={theme.colors.light.darkGrey}
|
|
35
40
|
/>
|
|
36
|
-
</
|
|
41
|
+
</ProductCardImageWrapperStyled>
|
|
37
42
|
<ProductCardBottom>
|
|
38
43
|
<div>
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<ProductCardCreatorName data-avatarname="product-card">
|
|
46
|
-
<LoadingBubble $width="50px" $height="12.5px" />
|
|
47
|
-
</ProductCardCreatorName>
|
|
48
|
-
</ProductCardCreator>
|
|
49
|
-
</ProductCardData>
|
|
50
|
-
<ProductCardPriceWrapper>
|
|
51
|
-
<ProductCardPrice>
|
|
52
|
-
<Grid justifyContent="flex-end">
|
|
53
|
-
<LoadingBubble $width="30px" $height="10px" />
|
|
54
|
-
</Grid>
|
|
55
|
-
</ProductCardPrice>
|
|
56
|
-
<Grid justifyContent="flex-end" gap="8px">
|
|
57
|
-
<LoadingBubble $width="24px" $height="24px" />
|
|
58
|
-
<LoadingBubble $width="calc(100% - 24px - 8px)" />
|
|
59
|
-
</Grid>
|
|
60
|
-
</ProductCardPriceWrapper>
|
|
61
|
-
</ProductCardBottomContent>
|
|
62
|
-
<ProductCardTitleWrapper>
|
|
44
|
+
<ProductCardTitleWrapperStyled>
|
|
45
|
+
<ProductCardTitle>
|
|
46
|
+
<LoadingBubble $width="50%" $height="12px" />
|
|
47
|
+
</ProductCardTitle>
|
|
48
|
+
</ProductCardTitleWrapperStyled>
|
|
49
|
+
<ProductCardTitleWrapperStyled>
|
|
63
50
|
<ProductCardTitle>
|
|
64
|
-
<LoadingBubble $width="
|
|
51
|
+
<LoadingBubble $width="20%" $height="8px" />
|
|
65
52
|
</ProductCardTitle>
|
|
66
|
-
</
|
|
53
|
+
</ProductCardTitleWrapperStyled>
|
|
67
54
|
</div>
|
|
68
55
|
{withBottomText && (
|
|
69
56
|
<BottomText>
|
|
70
|
-
<LoadingBubble $width="
|
|
57
|
+
<LoadingBubble $width="15%" $height="13px" />
|
|
71
58
|
</BottomText>
|
|
72
59
|
)}
|
|
73
60
|
</ProductCardBottom>
|
|
@@ -198,7 +198,7 @@ export const Video: React.FC<VideoProps> = ({
|
|
|
198
198
|
return <ComponentWhileLoading />;
|
|
199
199
|
}
|
|
200
200
|
return (
|
|
201
|
-
<VideoWrapper {...rest}>
|
|
201
|
+
<VideoWrapper {...rest} className="video-container">
|
|
202
202
|
<VideoPlaceholder $position="static">
|
|
203
203
|
<Typography tag="div">
|
|
204
204
|
<Loading />
|
|
@@ -5,6 +5,14 @@ export const transition = css`
|
|
|
5
5
|
transition: all 150ms ease-in-out;
|
|
6
6
|
`;
|
|
7
7
|
|
|
8
|
+
export const buttonText = css`
|
|
9
|
+
letter-spacing: 0.5px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
line-height: 24px;
|
|
14
|
+
`;
|
|
15
|
+
|
|
8
16
|
export const button = css`
|
|
9
17
|
box-sizing: border-box;
|
|
10
18
|
cursor: pointer;
|
|
@@ -18,7 +26,7 @@ export const button = css`
|
|
|
18
26
|
position: relative;
|
|
19
27
|
overflow: hidden;
|
|
20
28
|
box-shadow: 0px 0px 0px #000000;
|
|
21
|
-
|
|
29
|
+
${buttonText}
|
|
22
30
|
${transition}
|
|
23
31
|
svg {
|
|
24
32
|
${transition}
|
|
@@ -47,51 +55,34 @@ export const text = css`
|
|
|
47
55
|
line-height: 24px;
|
|
48
56
|
`;
|
|
49
57
|
|
|
50
|
-
export const buttonText = css`
|
|
51
|
-
letter-spacing: 0.5px;
|
|
52
|
-
font-style: normal;
|
|
53
|
-
font-size: 1rem;
|
|
54
|
-
font-weight: 500;
|
|
55
|
-
line-height: 24px;
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
58
|
export const small = css`
|
|
59
59
|
min-height: 2.125rem;
|
|
60
60
|
padding: 0.5rem 1rem;
|
|
61
|
-
|
|
62
|
-
font-size: 0.75rem !important;
|
|
63
|
-
}
|
|
64
|
-
#buttonText {
|
|
61
|
+
* {
|
|
65
62
|
font-size: 0.75rem;
|
|
66
63
|
}
|
|
67
64
|
`;
|
|
68
65
|
export const regular = css`
|
|
69
66
|
min-height: 2.813rem;
|
|
70
67
|
padding: 0.75rem 1.5rem;
|
|
71
|
-
|
|
72
|
-
font-size: 1rem
|
|
68
|
+
* {
|
|
69
|
+
font-size: 1rem;
|
|
73
70
|
}
|
|
74
71
|
${breakpoint.xxs} {
|
|
75
|
-
|
|
76
|
-
font-size: 0.875rem
|
|
72
|
+
* {
|
|
73
|
+
font-size: 0.875rem;
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
#buttonText {
|
|
80
|
-
font-size: 0.875rem;
|
|
81
|
-
}
|
|
82
76
|
`;
|
|
83
77
|
export const large = css`
|
|
84
78
|
min-height: 3.5rem;
|
|
85
79
|
padding: 1rem 2rem;
|
|
86
|
-
|
|
87
|
-
font-size: 1.125rem
|
|
80
|
+
* {
|
|
81
|
+
font-size: 1.125rem;
|
|
88
82
|
}
|
|
89
83
|
${breakpoint.xxs} {
|
|
90
|
-
|
|
91
|
-
font-size: 1rem
|
|
84
|
+
* {
|
|
85
|
+
font-size: 1rem;
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
|
-
#buttonText {
|
|
95
|
-
font-size: 1rem;
|
|
96
|
-
}
|
|
97
88
|
`;
|
|
@@ -10,7 +10,7 @@ import ThemedButton, { bosonButtonThemes } from "../ui/ThemedButton";
|
|
|
10
10
|
import { useBreakpoints } from "../../hooks/useBreakpoints";
|
|
11
11
|
import { saveItemInStorage } from "../../hooks/storage/useBosonLocalStorage";
|
|
12
12
|
import { SignOut, Wallet } from "phosphor-react";
|
|
13
|
-
import { useIsMagicLoggedIn } from "../../hooks";
|
|
13
|
+
import { useConfigContext, useIsMagicLoggedIn } from "../../hooks";
|
|
14
14
|
import { useAccount, useChainId } from "../../hooks/connection/connection";
|
|
15
15
|
import { useDisconnect } from "../../hooks/connection/useDisconnect";
|
|
16
16
|
import { MagicLoginButton } from "../magicLink/Login";
|
|
@@ -79,6 +79,7 @@ export default function ConnectButton({
|
|
|
79
79
|
showChangeWallet,
|
|
80
80
|
...rest
|
|
81
81
|
}: Props) {
|
|
82
|
+
const { withMagicLink } = useConfigContext();
|
|
82
83
|
const { isLteXS, isLteS } = useBreakpoints();
|
|
83
84
|
const isSideBar = ["left", "right"].includes(navigationBarPosition);
|
|
84
85
|
const buttonPadding = isSideBar ? "0.75rem 1rem" : "";
|
|
@@ -120,14 +121,16 @@ export default function ConnectButton({
|
|
|
120
121
|
|
|
121
122
|
return (
|
|
122
123
|
<>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
{withMagicLink && (
|
|
125
|
+
<MagicLoginButton
|
|
126
|
+
buttonProps={{
|
|
127
|
+
size: isLteXS ? "small" : "regular",
|
|
128
|
+
theme: bosonButtonThemes({
|
|
129
|
+
withBosonStyle: false
|
|
130
|
+
})["primary"]
|
|
131
|
+
}}
|
|
132
|
+
/>
|
|
133
|
+
)}
|
|
131
134
|
<Button
|
|
132
135
|
onClick={() => {
|
|
133
136
|
saveItemInStorage(
|
|
@@ -9,13 +9,12 @@ import {
|
|
|
9
9
|
} from "phosphor-react";
|
|
10
10
|
import React, { useCallback, useState } from "react";
|
|
11
11
|
import styled, { CSSProperties } from "styled-components";
|
|
12
|
-
|
|
13
12
|
import { Typography } from "../../ui/Typography";
|
|
14
13
|
import StatusIcon from "../identicon/StatusIcon";
|
|
15
14
|
import { FiatLink, useFiatLinkContext } from "./fiatOnrampModal/FiatLink";
|
|
16
15
|
// import FiatOnrampModal from "./fiatOnrampModal";
|
|
17
16
|
import { IconWithConfirmTextButton } from "./IconButton";
|
|
18
|
-
import MiniPortfolio from "./miniPortfolio";
|
|
17
|
+
import MiniPortfolio, { MiniPortfolioProps } from "./miniPortfolio";
|
|
19
18
|
import { Column } from "../../ui/column";
|
|
20
19
|
import { theme } from "../../../theme";
|
|
21
20
|
import { useENSName } from "../../../hooks/ens/useENSName";
|
|
@@ -131,8 +130,7 @@ export function PortfolioArrow({
|
|
|
131
130
|
<ArrowUpRight size={20} {...rest} />
|
|
132
131
|
);
|
|
133
132
|
}
|
|
134
|
-
export type AuthenticatedHeaderProps = {
|
|
135
|
-
account: string;
|
|
133
|
+
export type AuthenticatedHeaderProps = MiniPortfolioProps & {
|
|
136
134
|
onUserDisconnect?: () => unknown;
|
|
137
135
|
disconnectColor: CSSProperties["color"];
|
|
138
136
|
disconnectBackgroundColor: CSSProperties["backgroundColor"];
|
|
@@ -145,7 +143,8 @@ export function AuthenticatedHeader({
|
|
|
145
143
|
disconnectColor,
|
|
146
144
|
disconnectBackgroundColor,
|
|
147
145
|
disconnectBorderRadius,
|
|
148
|
-
buyCryptoTheme
|
|
146
|
+
buyCryptoTheme,
|
|
147
|
+
defaultTokens
|
|
149
148
|
}: AuthenticatedHeaderProps) {
|
|
150
149
|
const { connector } = useWeb3React();
|
|
151
150
|
const { ENSName } = useENSName(account);
|
|
@@ -292,7 +291,7 @@ export function AuthenticatedHeader({
|
|
|
292
291
|
</Tooltip>
|
|
293
292
|
</FiatOnrampNotAvailableText>
|
|
294
293
|
)}
|
|
295
|
-
<MiniPortfolio account={account} />
|
|
294
|
+
<MiniPortfolio account={account} defaultTokens={defaultTokens} />
|
|
296
295
|
</PortfolioDrawerContainer>
|
|
297
296
|
</AuthenticatedHeaderWrapper>
|
|
298
297
|
);
|
|
@@ -112,19 +112,19 @@ const IconBlock = forwardRef<
|
|
|
112
112
|
borderRadius: CSSProperties["borderRadius"];
|
|
113
113
|
}
|
|
114
114
|
>(function IconBlock(props, ref) {
|
|
115
|
-
const { color, backgroundColor, borderRadius } = props;
|
|
116
115
|
if ("href" in props) {
|
|
116
|
+
const { color, backgroundColor, borderRadius, ...restProps } = props;
|
|
117
117
|
return (
|
|
118
118
|
<IconBlockLink
|
|
119
119
|
ref={ref as React.ForwardedRef<HTMLAnchorElement>}
|
|
120
120
|
$color={color}
|
|
121
121
|
$backgroundColor={backgroundColor}
|
|
122
122
|
$borderRadius={borderRadius}
|
|
123
|
-
{...
|
|
123
|
+
{...restProps}
|
|
124
124
|
/>
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
const { color, backgroundColor, borderRadius, ...restProps } = props;
|
|
128
128
|
return (
|
|
129
129
|
<IconBlockButton
|
|
130
130
|
// ignoring 'button' 'type' conflict between React and styled-components
|
|
@@ -134,7 +134,7 @@ const IconBlock = forwardRef<
|
|
|
134
134
|
$color={color}
|
|
135
135
|
$backgroundColor={backgroundColor}
|
|
136
136
|
$borderRadius={borderRadius}
|
|
137
|
-
{...
|
|
137
|
+
{...restProps}
|
|
138
138
|
/>
|
|
139
139
|
);
|
|
140
140
|
});
|
|
@@ -3,7 +3,7 @@ import styled from "styled-components";
|
|
|
3
3
|
|
|
4
4
|
import { Grid } from "../../../ui/Grid";
|
|
5
5
|
import { Typography } from "../../../ui/Typography";
|
|
6
|
-
import Tokens from "./tokens";
|
|
6
|
+
import Tokens, { TokensProps } from "./tokens";
|
|
7
7
|
import { breakpointNumbers } from "../../../../lib/ui/breakpoint";
|
|
8
8
|
import { Column } from "../../../ui/column";
|
|
9
9
|
|
|
@@ -41,7 +41,7 @@ const PageWrapper = styled.div`
|
|
|
41
41
|
interface Page {
|
|
42
42
|
title: React.ReactNode;
|
|
43
43
|
key: string;
|
|
44
|
-
component: ({ account }:
|
|
44
|
+
component: ({ account }: MiniPortfolioProps) => JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const Pages: Array<Page> = [
|
|
@@ -52,7 +52,11 @@ const Pages: Array<Page> = [
|
|
|
52
52
|
}
|
|
53
53
|
];
|
|
54
54
|
|
|
55
|
-
export
|
|
55
|
+
export type MiniPortfolioProps = TokensProps;
|
|
56
|
+
export default function MiniPortfolio({
|
|
57
|
+
account,
|
|
58
|
+
defaultTokens
|
|
59
|
+
}: MiniPortfolioProps) {
|
|
56
60
|
const [currentPage, setCurrentPage] = useState(0);
|
|
57
61
|
|
|
58
62
|
const { component: Page } = Pages[currentPage];
|
|
@@ -72,7 +76,7 @@ export default function MiniPortfolio({ account }: { account: string }) {
|
|
|
72
76
|
})}
|
|
73
77
|
</Nav>
|
|
74
78
|
<PageWrapper data-testid="mini-portfolio-page">
|
|
75
|
-
<Page account={account} />
|
|
79
|
+
<Page account={account} defaultTokens={defaultTokens} />
|
|
76
80
|
</PageWrapper>
|
|
77
81
|
</Wrapper>
|
|
78
82
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Token as TokenType } from "@bosonprotocol/common";
|
|
2
3
|
import { Token } from "@uniswap/sdk-core";
|
|
3
4
|
import { ethers } from "ethers";
|
|
4
5
|
import styled from "styled-components";
|
|
@@ -20,11 +21,16 @@ import {
|
|
|
20
21
|
import { nativeOnChain } from "../../../../../lib/const/tokens";
|
|
21
22
|
import { PortfolioLogo } from "../../../../logo/PortfolioLogo";
|
|
22
23
|
|
|
23
|
-
export
|
|
24
|
+
export type TokensProps = {
|
|
25
|
+
account: string;
|
|
26
|
+
defaultTokens?: TokenType[];
|
|
27
|
+
};
|
|
28
|
+
export default function Tokens({ account, defaultTokens }: TokensProps) {
|
|
24
29
|
const chainId = useChainId();
|
|
25
30
|
const { data: tokenBalances, isLoading } = useTokenBalances({
|
|
26
31
|
address: account,
|
|
27
|
-
chainId
|
|
32
|
+
chainId,
|
|
33
|
+
tokens: defaultTokens
|
|
28
34
|
});
|
|
29
35
|
|
|
30
36
|
if (!chainId || isLoading) {
|
|
@@ -5,12 +5,13 @@ import styled from "styled-components";
|
|
|
5
5
|
import { Typography } from "../../ui/Typography";
|
|
6
6
|
import { useCloseAccountDrawer } from "../accountDrawer";
|
|
7
7
|
import { flexColumnNoWrap } from "../styles";
|
|
8
|
-
import { Button } from "../../buttons/Button";
|
|
9
8
|
import {
|
|
10
9
|
ActivationStatus,
|
|
11
10
|
useActivationState
|
|
12
11
|
} from "../../connection/activate";
|
|
13
12
|
import { theme } from "../../../theme";
|
|
13
|
+
import { Grid } from "../../ui/Grid";
|
|
14
|
+
import { BaseButton, BaseButtonProps } from "../../buttons/BaseButton";
|
|
14
15
|
const colors = theme.colors.light;
|
|
15
16
|
const Wrapper = styled.div`
|
|
16
17
|
${flexColumnNoWrap};
|
|
@@ -27,8 +28,15 @@ const AlertTriangleIcon = styled(Warning)`
|
|
|
27
28
|
color: ${colors.red};
|
|
28
29
|
`;
|
|
29
30
|
|
|
31
|
+
export type ConnectionErrorViewProps = {
|
|
32
|
+
tryAgainTheme: BaseButtonProps["theme"];
|
|
33
|
+
backToWalletSelectionTheme: BaseButtonProps["theme"];
|
|
34
|
+
};
|
|
30
35
|
// TODO(cartcrom): move this to a top level modal, rather than inline in the drawer
|
|
31
|
-
export default function ConnectionErrorView(
|
|
36
|
+
export default function ConnectionErrorView({
|
|
37
|
+
tryAgainTheme,
|
|
38
|
+
backToWalletSelectionTheme
|
|
39
|
+
}: ConnectionErrorViewProps) {
|
|
32
40
|
const { activationState, tryActivation, cancelActivation } =
|
|
33
41
|
useActivationState();
|
|
34
42
|
const closeDrawer = useCloseAccountDrawer();
|
|
@@ -50,10 +58,17 @@ export default function ConnectionErrorView() {
|
|
|
50
58
|
The connection attempt failed. Please click try again and follow the
|
|
51
59
|
steps to connect in your wallet.
|
|
52
60
|
</Typography>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
<Grid gap="1rem">
|
|
62
|
+
<BaseButton onClick={retry} theme={tryAgainTheme}>
|
|
63
|
+
Try Again
|
|
64
|
+
</BaseButton>
|
|
65
|
+
<BaseButton
|
|
66
|
+
onClick={cancelActivation}
|
|
67
|
+
theme={backToWalletSelectionTheme}
|
|
68
|
+
>
|
|
69
|
+
<Typography marginBottom={12}>Back to wallet selection</Typography>
|
|
70
|
+
</BaseButton>
|
|
71
|
+
</Grid>
|
|
57
72
|
</Wrapper>
|
|
58
73
|
);
|
|
59
74
|
}
|
|
@@ -110,6 +110,9 @@ export interface OptionProps {
|
|
|
110
110
|
hoverColor: CSSProperties["color"];
|
|
111
111
|
backgroundColor: CSSProperties["backgroundColor"];
|
|
112
112
|
borderRadius: CSSProperties["borderRadius"];
|
|
113
|
+
onOptionClick?: (arg0: {
|
|
114
|
+
activationState: ReturnType<typeof useActivationState>["activationState"];
|
|
115
|
+
}) => void;
|
|
113
116
|
}
|
|
114
117
|
export function Option({
|
|
115
118
|
connection,
|
|
@@ -117,7 +120,8 @@ export function Option({
|
|
|
117
120
|
hoverFocusBackgroundColor,
|
|
118
121
|
hoverColor,
|
|
119
122
|
backgroundColor,
|
|
120
|
-
borderRadius
|
|
123
|
+
borderRadius,
|
|
124
|
+
onOptionClick
|
|
121
125
|
}: OptionProps) {
|
|
122
126
|
const { activationState, tryActivation } = useActivationState();
|
|
123
127
|
const toggleAccountDrawer = useToggleAccountDrawer();
|
|
@@ -139,7 +143,10 @@ export function Option({
|
|
|
139
143
|
>
|
|
140
144
|
<OptionCardClickable
|
|
141
145
|
disabled={isSomeOptionPending}
|
|
142
|
-
onClick={
|
|
146
|
+
onClick={() => {
|
|
147
|
+
activate();
|
|
148
|
+
onOptionClick?.({ activationState });
|
|
149
|
+
}}
|
|
143
150
|
selected={isCurrentOptionPending}
|
|
144
151
|
data-testid={`wallet-option-${connection.type}`}
|
|
145
152
|
>
|
|
@@ -5,7 +5,9 @@ import styled, { CSSProperties } from "styled-components";
|
|
|
5
5
|
|
|
6
6
|
import { Grid } from "../../ui/Grid";
|
|
7
7
|
import { flexColumnNoWrap } from "../styles";
|
|
8
|
-
import ConnectionErrorView
|
|
8
|
+
import ConnectionErrorView, {
|
|
9
|
+
ConnectionErrorViewProps
|
|
10
|
+
} from "./ConnectionErrorView";
|
|
9
11
|
import { Option, OptionProps } from "./Option";
|
|
10
12
|
import {
|
|
11
13
|
ActivationStatus,
|
|
@@ -39,7 +41,6 @@ const OptionGrid = styled.div<{ $borderRadius: CSSProperties["borderRadius"] }>`
|
|
|
39
41
|
|
|
40
42
|
export type WalletModalProps = {
|
|
41
43
|
PrivacyPolicy: React.FC;
|
|
42
|
-
magicLoginButtonProps: MagicLoginButtonProps;
|
|
43
44
|
optionProps: Pick<
|
|
44
45
|
OptionProps,
|
|
45
46
|
| "color"
|
|
@@ -47,12 +48,20 @@ export type WalletModalProps = {
|
|
|
47
48
|
| "hoverColor"
|
|
48
49
|
| "backgroundColor"
|
|
49
50
|
| "borderRadius"
|
|
51
|
+
| "onOptionClick"
|
|
50
52
|
> & { iconBorderRadius: CSSProperties["borderRadius"] };
|
|
51
|
-
|
|
53
|
+
withMagicLogin?: boolean;
|
|
54
|
+
connectionErrorProps: ConnectionErrorViewProps;
|
|
55
|
+
} & (
|
|
56
|
+
| { withMagicLogin: true; magicLoginButtonProps: MagicLoginButtonProps }
|
|
57
|
+
| { withMagicLogin?: false; magicLoginButtonProps?: undefined }
|
|
58
|
+
);
|
|
52
59
|
export function WalletModal({
|
|
53
60
|
PrivacyPolicy,
|
|
54
61
|
magicLoginButtonProps,
|
|
55
|
-
optionProps
|
|
62
|
+
optionProps,
|
|
63
|
+
withMagicLogin = true,
|
|
64
|
+
connectionErrorProps
|
|
56
65
|
}: WalletModalProps) {
|
|
57
66
|
const chainId = useChainId();
|
|
58
67
|
const { config } = useConfigContext();
|
|
@@ -82,7 +91,7 @@ export function WalletModal({
|
|
|
82
91
|
Connect a wallet
|
|
83
92
|
</Grid>
|
|
84
93
|
{activationState.status === ActivationStatus.ERROR ? (
|
|
85
|
-
<ConnectionErrorView />
|
|
94
|
+
<ConnectionErrorView {...connectionErrorProps} />
|
|
86
95
|
) : (
|
|
87
96
|
<AutoColumn $gap="16px">
|
|
88
97
|
<OptionGrid
|
|
@@ -100,7 +109,9 @@ export function WalletModal({
|
|
|
100
109
|
/>
|
|
101
110
|
))}
|
|
102
111
|
</OptionGrid>
|
|
103
|
-
|
|
112
|
+
{withMagicLogin && magicLoginButtonProps && (
|
|
113
|
+
<MagicLoginButton {...magicLoginButtonProps} />
|
|
114
|
+
)}
|
|
104
115
|
<PrivacyPolicy />
|
|
105
116
|
</AutoColumn>
|
|
106
117
|
)}
|