@web3auth/modal 10.16.0 → 11.0.0-beta.1
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/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.cjs/packages/modal/src/account-linking/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/react.js +22 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/vue.js +22 -0
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +473 -17
- package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.cjs/packages/modal/src/react/context/WalletServicesInnerContext.js +3 -56
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +15 -152
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthConnect.js +30 -43
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthInner.js +8 -4
- package/dist/lib.cjs/packages/modal/src/react/index.js +61 -28
- package/dist/lib.cjs/packages/modal/src/react/solana/index.js +21 -8
- package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +34 -17
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +15 -18
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +11 -12
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +6 -6
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +132 -44
- package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +20 -19
- package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +22 -24
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +6 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +30 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +12 -12
- package/dist/lib.cjs/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.cjs/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +109 -0
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +77 -29
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +20 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +41 -33
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +13 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +13 -7
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Embed/Embed.js +12 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/Login.js +95 -80
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +12 -12
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +14 -14
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +250 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +185 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +110 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +158 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/RootContext.js +64 -21
- package/dist/lib.cjs/packages/modal/src/ui/context/WidgetContext.js +52 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +28 -1
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +186 -46
- package/dist/lib.cjs/packages/modal/src/vue/WalletServicesInnerProvider.js +2 -50
- package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +7 -170
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthConnect.js +31 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.cjs/packages/modal/src/vue/index.js +61 -28
- package/dist/lib.cjs/packages/modal/src/vue/solana/index.js +29 -8
- package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +37 -23
- package/dist/lib.cjs/packages/modal/src/x402/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/x402/react.js +26 -0
- package/dist/lib.cjs/packages/modal/src/x402/vue.js +18 -0
- package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
- package/dist/lib.cjs/types/account-linking/react.d.ts +2 -0
- package/dist/lib.cjs/types/account-linking/vue.d.ts +2 -0
- package/dist/lib.cjs/types/interface.d.ts +2 -2
- package/dist/lib.cjs/types/modalManager.d.ts +46 -4
- package/dist/lib.cjs/types/react/context/WalletServicesInnerContext.d.ts +12 -5
- package/dist/lib.cjs/types/react/context/Web3AuthInnerContext.d.ts +4 -3
- package/dist/lib.cjs/types/react/hooks/index.d.ts +16 -14
- package/dist/lib.cjs/types/react/hooks/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/react/hooks/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/react/interfaces.d.ts +3 -2
- package/dist/lib.cjs/types/react/solana/hooks/index.d.ts +5 -4
- package/dist/lib.cjs/types/react/solana/index.d.ts +1 -0
- package/dist/lib.cjs/types/react/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +4 -3
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +7 -5
- package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.type.d.ts +2 -1
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.d.ts +4 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.type.d.ts +9 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/constants.d.ts +7 -4
- package/dist/lib.cjs/types/ui/containers/AccountLinking/AccountLinking.d.ts +6 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWallet.type.d.ts +7 -0
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.type.d.ts +3 -9
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/containers/Login/Login.type.d.ts +6 -0
- package/dist/lib.cjs/types/ui/{components → containers}/Root/Root.d.ts +1 -1
- package/dist/lib.cjs/types/ui/containers/Root/Root.type.d.ts +3 -0
- package/dist/lib.cjs/types/ui/containers/Root/RootBodySheets/RootBodySheets.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/Widget/Widget.type.d.ts +5 -0
- package/dist/lib.cjs/types/ui/context/ModalStateContext.d.ts +28 -0
- package/dist/lib.cjs/types/ui/context/RootContext.d.ts +19 -7
- package/dist/lib.cjs/types/ui/context/WidgetContext.d.ts +45 -0
- package/dist/lib.cjs/types/ui/interfaces.d.ts +53 -15
- package/dist/lib.cjs/types/ui/loginModal.d.ts +31 -4
- package/dist/lib.cjs/types/ui/utils.d.ts +1 -1
- package/dist/lib.cjs/types/vue/composables/index.d.ts +3 -14
- package/dist/lib.cjs/types/vue/composables/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/vue/composables/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/vue/interfaces.d.ts +3 -17
- package/dist/lib.cjs/types/vue/solana/composables/index.d.ts +3 -4
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaClient.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/constants.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/index.d.ts +2 -0
- package/dist/lib.cjs/types/vue/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/x402/index.d.ts +1 -0
- package/dist/lib.cjs/types/x402/react.d.ts +2 -0
- package/dist/lib.cjs/types/x402/vue.d.ts +2 -0
- package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.esm/packages/modal/src/account-linking/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/vue.js +1 -0
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +478 -19
- package/dist/lib.esm/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.esm/packages/modal/src/react/context/WalletServicesInnerContext.js +4 -57
- package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +12 -151
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthConnect.js +28 -41
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthInner.js +7 -3
- package/dist/lib.esm/packages/modal/src/react/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/react/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +34 -17
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +15 -18
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +12 -13
- package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +133 -45
- package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +20 -19
- package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +22 -24
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +4 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +28 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +14 -14
- package/dist/lib.esm/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.esm/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +107 -0
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +81 -32
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +20 -11
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +41 -33
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +15 -13
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +13 -7
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Embed/Embed.js +12 -11
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/Login.js +99 -83
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +12 -12
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +14 -14
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +253 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +183 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +108 -0
- package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +161 -0
- package/dist/lib.esm/packages/modal/src/ui/context/RootContext.js +60 -22
- package/dist/lib.esm/packages/modal/src/ui/context/WidgetContext.js +49 -0
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +26 -2
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +188 -48
- package/dist/lib.esm/packages/modal/src/vue/WalletServicesInnerProvider.js +5 -54
- package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +9 -176
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthConnect.js +28 -30
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.esm/packages/modal/src/vue/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/vue/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +33 -19
- package/dist/lib.esm/packages/modal/src/x402/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/vue.js +1 -0
- package/package.json +94 -47
- package/dist/lib.cjs/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -12
- package/dist/lib.cjs/packages/modal/src/react/hooks/useChain.js +0 -16
- package/dist/lib.cjs/packages/modal/src/react/hooks/useCheckout.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useEnableMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useFunding.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useIdentityToken.js +0 -46
- package/dist/lib.cjs/packages/modal/src/react/hooks/useManageMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useReceive.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwap.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwitchChain.js +0 -32
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletUI.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -50
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -37
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -68
- package/dist/lib.cjs/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -88
- package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +0 -513
- package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +0 -251
- package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +0 -9
- package/dist/lib.cjs/packages/modal/src/vue/composables/useChain.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useCheckout.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useEnableMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useFunding.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useIdentityToken.js +0 -51
- package/dist/lib.cjs/packages/modal/src/vue/composables/useManageMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useReceive.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwap.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwitchChain.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletUI.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -54
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -39
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -67
- package/dist/lib.cjs/types/providers/ethereum-mpc-provider/index.d.ts +0 -1
- package/dist/lib.cjs/types/react/hooks/useChain.d.ts +0 -6
- package/dist/lib.cjs/types/react/hooks/useCheckout.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useEnableMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useFunding.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useIdentityToken.d.ts +0 -13
- package/dist/lib.cjs/types/react/hooks/useManageMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useReceive.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwap.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwitchChain.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useWalletConnectScanner.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/react/hooks/useWalletUI.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthDisconnect.d.ts +0 -9
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthUser.d.ts +0 -9
- package/dist/lib.cjs/types/react/solana/hooks/useSignAndSendTransaction.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignMessage.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignTransaction.d.ts +0 -13
- package/dist/lib.cjs/types/react/solana/hooks/useSolanaWallet.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.d.ts +0 -3
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.type.d.ts +0 -19
- package/dist/lib.cjs/types/ui/components/CircularLoader/index.d.ts +0 -2
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.type.d.ts +0 -27
- package/dist/lib.cjs/types/ui/components/Login/Login.type.d.ts +0 -35
- package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +0 -36
- package/dist/lib.cjs/types/ui/components/Widget/Widget.type.d.ts +0 -24
- package/dist/lib.cjs/types/ui/context/ThemeContext.d.ts +0 -3
- package/dist/lib.cjs/types/vue/composables/useChain.d.ts +0 -7
- package/dist/lib.cjs/types/vue/composables/useCheckout.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useEnableMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useFunding.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useIdentityToken.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useManageMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useReceive.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwap.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwitchChain.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWalletConnectScanner.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/vue/composables/useWalletUI.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthDisconnect.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthUser.d.ts +0 -10
- package/dist/lib.cjs/types/vue/solana/composables/useSignAndSendTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignMessage.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaWallet.d.ts +0 -9
- package/dist/lib.esm/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -1
- package/dist/lib.esm/packages/modal/src/react/hooks/useChain.js +0 -14
- package/dist/lib.esm/packages/modal/src/react/hooks/useCheckout.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useEnableMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useFunding.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useIdentityToken.js +0 -44
- package/dist/lib.esm/packages/modal/src/react/hooks/useManageMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useReceive.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwap.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwitchChain.js +0 -30
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletUI.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -48
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -35
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -64
- package/dist/lib.esm/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -86
- package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +0 -524
- package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +0 -253
- package/dist/lib.esm/packages/modal/src/ui/context/ThemeContext.js +0 -7
- package/dist/lib.esm/packages/modal/src/vue/composables/useChain.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useCheckout.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useEnableMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useFunding.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useIdentityToken.js +0 -49
- package/dist/lib.esm/packages/modal/src/vue/composables/useManageMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useReceive.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwap.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwitchChain.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletUI.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -52
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -37
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -65
- package/dist/modal.umd.min.js +0 -2
- package/dist/modal.umd.min.js.LICENSE.txt +0 -102
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWallet.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/Login.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Root/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/Widget.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/index.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CHAIN_NAMESPACES } from '@web3auth/no-modal';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useWidget } from '../../../context/WidgetContext.js';
|
|
4
5
|
import i18nInstance from '../../../localeImport.js';
|
|
5
6
|
import { getIcons, cn } from '../../../utils.js';
|
|
6
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -10,9 +11,14 @@ function ConnectWalletChainFilter(props) {
|
|
|
10
11
|
isDark,
|
|
11
12
|
isLoading,
|
|
12
13
|
selectedChain,
|
|
13
|
-
setSelectedChain
|
|
14
|
-
chainNamespace
|
|
14
|
+
setSelectedChain
|
|
15
15
|
} = props;
|
|
16
|
+
const {
|
|
17
|
+
uiConfig
|
|
18
|
+
} = useWidget();
|
|
19
|
+
const {
|
|
20
|
+
chainNamespaces
|
|
21
|
+
} = uiConfig;
|
|
16
22
|
const [t] = useTranslation(undefined, {
|
|
17
23
|
i18n: i18nInstance
|
|
18
24
|
});
|
|
@@ -22,7 +28,7 @@ function ConnectWalletChainFilter(props) {
|
|
|
22
28
|
name: "modal.allChains",
|
|
23
29
|
icon: ""
|
|
24
30
|
}];
|
|
25
|
-
for (const chain of
|
|
31
|
+
for (const chain of chainNamespaces) {
|
|
26
32
|
if (chain === CHAIN_NAMESPACES.EIP155 || chain === CHAIN_NAMESPACES.SOLANA) {
|
|
27
33
|
chains.push({
|
|
28
34
|
id: chain,
|
|
@@ -32,31 +38,34 @@ function ConnectWalletChainFilter(props) {
|
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
return chains;
|
|
35
|
-
}, [
|
|
41
|
+
}, [chainNamespaces]);
|
|
42
|
+
if (chainNamespaces.length > 1) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
36
45
|
if (isLoading) {
|
|
37
46
|
return /*#__PURE__*/jsx("div", {
|
|
38
|
-
className: "
|
|
47
|
+
className: "wta:flex wta:items-center wta:justify-between wta:gap-x-2",
|
|
39
48
|
children: Array.from({
|
|
40
49
|
length: chains.length
|
|
41
50
|
}).map((_, index) => /*#__PURE__*/jsx("div", {
|
|
42
|
-
className: "
|
|
51
|
+
className: "wta:h-12 wta:w-[100px] wta:animate-pulse wta:rounded-2xl wta:bg-app-gray-200 wta:dark:bg-app-gray-700"
|
|
43
52
|
}, `chain-loader-${index}`))
|
|
44
53
|
});
|
|
45
54
|
}
|
|
46
55
|
return /*#__PURE__*/jsx("div", {
|
|
47
|
-
className: "
|
|
56
|
+
className: "wta:flex wta:items-center wta:justify-items-start wta:gap-x-4",
|
|
48
57
|
children: chains.map(chain => /*#__PURE__*/jsxs("button", {
|
|
49
58
|
type: "button",
|
|
50
|
-
className: cn("
|
|
51
|
-
"
|
|
59
|
+
className: cn("wta:flex wta:w-[104px] wta:items-center wta:justify-center wta:gap-x-1 wta:text-xs wta:font-medium wta:px-4 wta:py-3 wta:text-app-gray-500 wta:dark:text-app-gray-300 wta:hover:bg-app-gray-200 wta:dark:hover:bg-app-gray-700 wta:h-12 wta:rounded-2xl wta:border wta:border-transparent", {
|
|
60
|
+
"wta:bg-app-gray-100 wta:dark:bg-app-gray-800 wta:border-app-gray-200 wta:dark:border-app-gray-700 wta:text-app-gray-900 wta:dark:text-app-white wta:hover:bg-app-gray-100! wta:dark:hover:bg-app-gray-800!": selectedChain === chain.id
|
|
52
61
|
}),
|
|
53
62
|
onClick: () => setSelectedChain(chain.id),
|
|
54
63
|
children: [chain.icon && /*#__PURE__*/jsx("img", {
|
|
55
64
|
src: getIcons(isDark ? `${chain.icon}-dark` : `${chain.icon}-light`),
|
|
56
65
|
alt: chain.name,
|
|
57
|
-
className: "
|
|
66
|
+
className: "wta:size-5 wta:object-contain"
|
|
58
67
|
}), /*#__PURE__*/jsx("span", {
|
|
59
|
-
className: "first-letter:
|
|
68
|
+
className: "wta:first-letter:capitalize",
|
|
60
69
|
children: t(chain.name)
|
|
61
70
|
})]
|
|
62
71
|
}, chain.id))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import Image from '../../../components/Image/Image.js';
|
|
2
3
|
import i18nInstance from '../../../localeImport.js';
|
|
3
4
|
import { getIcons } from '../../../utils.js';
|
|
4
|
-
import Image from '../../Image/Image.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
const ConnectWalletChainNamespaceSelect = props => {
|
|
@@ -24,13 +24,13 @@ const ConnectWalletChainNamespaceSelect = props => {
|
|
|
24
24
|
});
|
|
25
25
|
return /*#__PURE__*/jsxs("div", {
|
|
26
26
|
children: [/*#__PURE__*/jsx("div", {
|
|
27
|
-
className: "
|
|
27
|
+
className: "wta:flex wta:items-center wta:justify-center",
|
|
28
28
|
children: /*#__PURE__*/jsx("p", {
|
|
29
|
-
className: "
|
|
29
|
+
className: "wta:text-base wta:font-medium wta:text-app-gray-900 wta:dark:text-app-white",
|
|
30
30
|
children: t("modal.external.select-chain")
|
|
31
31
|
})
|
|
32
32
|
}), /*#__PURE__*/jsx("div", {
|
|
33
|
-
className: "
|
|
33
|
+
className: "wta:my-6 wta:flex wta:justify-center",
|
|
34
34
|
children: /*#__PURE__*/jsx(Image, {
|
|
35
35
|
imageId: `login-${wallet.name}`,
|
|
36
36
|
hoverImageId: `login-${wallet.name}`,
|
|
@@ -41,12 +41,12 @@ const ConnectWalletChainNamespaceSelect = props => {
|
|
|
41
41
|
extension: wallet.imgExtension
|
|
42
42
|
})
|
|
43
43
|
}), /*#__PURE__*/jsx("p", {
|
|
44
|
-
className: "
|
|
44
|
+
className: "wta:my-6 wta:text-center wta:text-sm wta:text-app-gray-500 wta:dark:text-app-gray-400",
|
|
45
45
|
children: t("modal.external.select-chain-description", {
|
|
46
46
|
wallet: wallet.displayName
|
|
47
47
|
})
|
|
48
48
|
}), /*#__PURE__*/jsx("ul", {
|
|
49
|
-
className: "
|
|
49
|
+
className: "wta:flex wta:flex-col wta:gap-3",
|
|
50
50
|
children: chainNamespaces.map(({
|
|
51
51
|
chainNamespace,
|
|
52
52
|
displayName,
|
|
@@ -54,13 +54,13 @@ const ConnectWalletChainNamespaceSelect = props => {
|
|
|
54
54
|
}) => /*#__PURE__*/jsx("li", {
|
|
55
55
|
children: /*#__PURE__*/jsxs("button", {
|
|
56
56
|
type: "button",
|
|
57
|
-
className: "w3a--btn
|
|
57
|
+
className: "w3a--btn wta:group wta:relative wta:h-11 wta:w-full wta:items-center wta:justify-between! wta:overflow-hidden wta:rounded-full",
|
|
58
58
|
onClick: () => handleExternalWalletClick({
|
|
59
59
|
connector: wallet.name,
|
|
60
60
|
chainNamespace
|
|
61
61
|
}),
|
|
62
62
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63
|
-
className: "
|
|
63
|
+
className: "wta:flex wta:items-center",
|
|
64
64
|
children: [/*#__PURE__*/jsx(Image, {
|
|
65
65
|
imageId: imageId,
|
|
66
66
|
hoverImageId: imageId,
|
|
@@ -70,12 +70,12 @@ const ConnectWalletChainNamespaceSelect = props => {
|
|
|
70
70
|
isButton: true,
|
|
71
71
|
extension: "svg"
|
|
72
72
|
}), /*#__PURE__*/jsx("p", {
|
|
73
|
-
className: "
|
|
73
|
+
className: "wta:ml-2 wta:text-left wta:text-sm wta:text-app-gray-900 wta:first-letter:capitalize wta:dark:text-app-gray-200",
|
|
74
74
|
children: displayName
|
|
75
75
|
})]
|
|
76
76
|
}), /*#__PURE__*/jsx("img", {
|
|
77
77
|
id: "chain-namespace-arrow",
|
|
78
|
-
className: "
|
|
78
|
+
className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-6 wta:-translate-y-1/2 wta:opacity-0 wta:transition-all wta:duration-300 wta:group-hover:translate-x-0 wta:group-hover:opacity-100",
|
|
79
79
|
src: getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
80
80
|
alt: "arrow"
|
|
81
81
|
})]
|
|
@@ -9,7 +9,8 @@ function ConnectWalletHeader(props) {
|
|
|
9
9
|
disableBackButton,
|
|
10
10
|
onBackClick,
|
|
11
11
|
currentPage,
|
|
12
|
-
selectedButton
|
|
12
|
+
selectedButton,
|
|
13
|
+
isLinking
|
|
13
14
|
} = props;
|
|
14
15
|
const [t] = useTranslation(undefined, {
|
|
15
16
|
i18n: i18nInstance
|
|
@@ -20,17 +21,17 @@ function ConnectWalletHeader(props) {
|
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
return /*#__PURE__*/jsxs("div", {
|
|
23
|
-
className: "
|
|
24
|
-
children: [!hideBackButton ? /*#__PURE__*/jsx("button", {
|
|
24
|
+
className: "wta:flex wta:items-center wta:justify-between",
|
|
25
|
+
children: [!hideBackButton && !isLinking ? /*#__PURE__*/jsx("button", {
|
|
25
26
|
type: "button",
|
|
26
|
-
className: "
|
|
27
|
+
className: "wta:z-20 wta:flex wta:size-5 wta:cursor-pointer wta:items-center wta:justify-center wta:rounded-full",
|
|
27
28
|
onClick: handleBack,
|
|
28
29
|
disabled: disableBackButton,
|
|
29
30
|
children: /*#__PURE__*/jsx("svg", {
|
|
30
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
32
|
fill: "none",
|
|
32
33
|
viewBox: "0 0 20 20",
|
|
33
|
-
className: `
|
|
34
|
+
className: `wta:text-app-gray-500 wta:dark:text-app-gray-200 ${disableBackButton ? "wta:cursor-not-allowed wta:opacity-50" : "wta:hover:text-app-gray-900 wta:dark:hover:text-app-white"}`,
|
|
34
35
|
children: /*#__PURE__*/jsx("path", {
|
|
35
36
|
fill: "currentColor",
|
|
36
37
|
fillRule: "evenodd",
|
|
@@ -39,10 +40,10 @@ function ConnectWalletHeader(props) {
|
|
|
39
40
|
})
|
|
40
41
|
})
|
|
41
42
|
}) : /*#__PURE__*/jsx("div", {}), /*#__PURE__*/jsx("p", {
|
|
42
|
-
className: "
|
|
43
|
-
children: currentPage === CONNECT_WALLET_PAGES.SELECTED_WALLET ? selectedButton === null || selectedButton === void 0 ? void 0 : selectedButton.displayName : currentPage === CONNECT_WALLET_PAGES.CONNECT_WALLET ? t("modal.connectYourWallet") : currentPage
|
|
43
|
+
className: "wta:text-base wta:font-medium wta:text-app-gray-900 wta:dark:text-app-white",
|
|
44
|
+
children: currentPage === CONNECT_WALLET_PAGES.SELECTED_WALLET ? selectedButton === null || selectedButton === void 0 ? void 0 : selectedButton.displayName : currentPage === CONNECT_WALLET_PAGES.CONNECT_WALLET ? isLinking ? t("modal.linkYourWallet") : t("modal.connectYourWallet") : currentPage
|
|
44
45
|
}), /*#__PURE__*/jsx("div", {
|
|
45
|
-
className: "
|
|
46
|
+
className: "wta:z-[-1] wta:size-5"
|
|
46
47
|
})]
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import Button from '../../../components/Button/Button.js';
|
|
3
|
+
import { BUTTON_TYPE } from '../../../components/Button/Button.type.js';
|
|
4
|
+
import { useWidget } from '../../../context/WidgetContext.js';
|
|
2
5
|
import i18nInstance from '../../../localeImport.js';
|
|
3
6
|
import { cn, getIcons } from '../../../utils.js';
|
|
4
|
-
import Button from '../../Button/Button.js';
|
|
5
|
-
import { BUTTON_TYPE } from '../../Button/Button.type.js';
|
|
6
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
|
8
9
|
function NoWalletsFound() {
|
|
@@ -10,7 +11,7 @@ function NoWalletsFound() {
|
|
|
10
11
|
i18n: i18nInstance
|
|
11
12
|
});
|
|
12
13
|
return /*#__PURE__*/jsx("div", {
|
|
13
|
-
className: "
|
|
14
|
+
className: "wta:flex wta:w-full wta:items-center wta:justify-center wta:py-6 wta:text-center wta:text-app-gray-400 wta:dark:text-app-gray-500",
|
|
14
15
|
children: t("modal.external.no-wallets-found")
|
|
15
16
|
});
|
|
16
17
|
}
|
|
@@ -19,29 +20,36 @@ function WalletsFound(props) {
|
|
|
19
20
|
externalButtons,
|
|
20
21
|
isLoading,
|
|
21
22
|
handleWalletClick,
|
|
22
|
-
|
|
23
|
-
walletConnectUri,
|
|
24
|
-
buttonRadius
|
|
23
|
+
walletConnectUri
|
|
25
24
|
} = props;
|
|
25
|
+
const {
|
|
26
|
+
deviceDetails,
|
|
27
|
+
uiConfig,
|
|
28
|
+
isDark
|
|
29
|
+
} = useWidget();
|
|
30
|
+
const {
|
|
31
|
+
buttonRadiusType: buttonRadius
|
|
32
|
+
} = uiConfig;
|
|
26
33
|
if (isLoading) {
|
|
27
34
|
return /*#__PURE__*/jsx("div", {
|
|
28
|
-
className: "
|
|
35
|
+
className: "wta:flex wta:flex-col wta:gap-y-2",
|
|
29
36
|
children: Array.from({
|
|
30
37
|
length: 6
|
|
31
38
|
}).map((_, index) => /*#__PURE__*/jsx("div", {
|
|
32
|
-
className: cn("
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
39
|
+
className: cn("wta:h-12 wta:w-full wta:animate-pulse wta:rounded-2xl wta:bg-app-gray-200 wta:dark:bg-app-gray-700", {
|
|
40
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
41
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
42
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
36
43
|
})
|
|
37
44
|
}, `loader-${index}`))
|
|
38
45
|
});
|
|
39
46
|
}
|
|
40
47
|
return /*#__PURE__*/jsx("div", {
|
|
41
|
-
className: "
|
|
48
|
+
className: "wta:flex wta:flex-col wta:gap-y-2",
|
|
42
49
|
children: externalButtons.map(button => /*#__PURE__*/jsx(Button, {
|
|
43
50
|
type: BUTTON_TYPE.WALLET,
|
|
44
51
|
props: {
|
|
52
|
+
isDark,
|
|
45
53
|
label: button.displayName,
|
|
46
54
|
onClick: () => handleWalletClick(button),
|
|
47
55
|
button,
|
|
@@ -58,9 +66,14 @@ function MoreWalletsButton(props) {
|
|
|
58
66
|
initialWalletCount,
|
|
59
67
|
handleMoreWallets,
|
|
60
68
|
isLoading,
|
|
61
|
-
isDark
|
|
62
|
-
buttonRadius
|
|
69
|
+
isDark
|
|
63
70
|
} = props;
|
|
71
|
+
const {
|
|
72
|
+
uiConfig
|
|
73
|
+
} = useWidget();
|
|
74
|
+
const {
|
|
75
|
+
buttonRadiusType: buttonRadius
|
|
76
|
+
} = uiConfig;
|
|
64
77
|
const [t] = useTranslation(undefined, {
|
|
65
78
|
i18n: i18nInstance
|
|
66
79
|
});
|
|
@@ -71,19 +84,19 @@ function MoreWalletsButton(props) {
|
|
|
71
84
|
};
|
|
72
85
|
if (isLoading && initialWalletCount < totalExternalWalletsCount) {
|
|
73
86
|
return /*#__PURE__*/jsx("div", {
|
|
74
|
-
className: cn("
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
87
|
+
className: cn("wta:h-12 wta:w-full wta:animate-pulse wta:bg-app-gray-200 wta:dark:bg-app-gray-700", {
|
|
88
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
89
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
90
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
78
91
|
})
|
|
79
92
|
});
|
|
80
93
|
}
|
|
81
94
|
return /*#__PURE__*/jsxs("button", {
|
|
82
95
|
type: "button",
|
|
83
|
-
className: cn("
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
96
|
+
className: cn("wta:flex wta:items-center wta:justify-start wta:gap-x-2 wta:bg-app-gray-50 wta:p-3 wta:hover:bg-app-gray-200 wta:dark:bg-app-gray-800 wta:dark:hover:bg-app-gray-600 wta:active:scale-95 wta:transition-all wta:duration-150", {
|
|
97
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
98
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
99
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
87
100
|
}),
|
|
88
101
|
onClick: onMoreWalletsClick,
|
|
89
102
|
children: [/*#__PURE__*/jsx("img", {
|
|
@@ -92,10 +105,10 @@ function MoreWalletsButton(props) {
|
|
|
92
105
|
height: "24",
|
|
93
106
|
width: "24"
|
|
94
107
|
}), /*#__PURE__*/jsx("p", {
|
|
95
|
-
className: "
|
|
108
|
+
className: "wta:text-base wta:font-normal wta:text-app-gray-700 wta:dark:text-app-white",
|
|
96
109
|
children: t("modal.connect-wallet.more-wallets")
|
|
97
110
|
}), /*#__PURE__*/jsx("span", {
|
|
98
|
-
className: "
|
|
111
|
+
className: "wta:inline-flex wta:items-center wta:rounded-full wta:bg-app-primary-100 wta:px-2 wta:py-1 wta:text-xs wta:font-medium wta:text-app-primary-800 wta:dark:border wta:dark:border-app-primary-400 wta:dark:bg-transparent wta:dark:text-app-primary-400",
|
|
99
112
|
children: totalExternalWalletsCount - initialWalletCount
|
|
100
113
|
})]
|
|
101
114
|
});
|
|
@@ -109,9 +122,7 @@ function ConnectWalletList(props) {
|
|
|
109
122
|
handleWalletClick,
|
|
110
123
|
handleMoreWallets,
|
|
111
124
|
isDark,
|
|
112
|
-
deviceDetails,
|
|
113
125
|
walletConnectUri,
|
|
114
|
-
buttonRadius,
|
|
115
126
|
isShowAllWallets
|
|
116
127
|
} = props;
|
|
117
128
|
const onShowMoreWalletsClick = () => {
|
|
@@ -120,24 +131,21 @@ function ConnectWalletList(props) {
|
|
|
120
131
|
const showMoreWalletsButton = !isShowAllWallets;
|
|
121
132
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
122
133
|
children: [/*#__PURE__*/jsx("ul", {
|
|
123
|
-
className: cn("
|
|
124
|
-
"
|
|
134
|
+
className: cn("wta:overflow-y-auto wta:flex wta:flex-col wta:gap-y-2 wta:h-[280px] w3a--social-container wta:-mx-5 wta:px-5", {
|
|
135
|
+
"wta:h-[328px]": !showMoreWalletsButton
|
|
125
136
|
}),
|
|
126
137
|
children: externalButtons.length === 0 ? /*#__PURE__*/jsx(NoWalletsFound, {}) : /*#__PURE__*/jsx(WalletsFound, {
|
|
127
138
|
externalButtons: externalButtons,
|
|
128
139
|
isLoading: isLoading,
|
|
129
140
|
handleWalletClick: handleWalletClick,
|
|
130
|
-
|
|
131
|
-
walletConnectUri: walletConnectUri,
|
|
132
|
-
buttonRadius: buttonRadius
|
|
141
|
+
walletConnectUri: walletConnectUri
|
|
133
142
|
})
|
|
134
143
|
}), showMoreWalletsButton && !isLoading && initialWalletCount < totalExternalWalletsCount && /*#__PURE__*/jsx(MoreWalletsButton, {
|
|
135
144
|
totalExternalWalletsCount: totalExternalWalletsCount,
|
|
136
145
|
initialWalletCount: initialWalletCount,
|
|
137
146
|
handleMoreWallets: onShowMoreWalletsClick,
|
|
138
147
|
isLoading: isLoading,
|
|
139
|
-
isDark: isDark
|
|
140
|
-
buttonRadius: buttonRadius
|
|
148
|
+
isDark: isDark
|
|
141
149
|
})]
|
|
142
150
|
});
|
|
143
151
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import Bowser from 'bowser';
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { QRCode } from 'react-qrcode-logo';
|
|
6
|
+
import Image from '../../../components/Image/Image.js';
|
|
6
7
|
import { WALLET_CONNECT_LOGO } from '../../../constants.js';
|
|
7
|
-
import {
|
|
8
|
+
import { useBodyState, useToast } from '../../../context/RootContext.js';
|
|
8
9
|
import { TOAST_TYPE } from '../../../interfaces.js';
|
|
9
10
|
import i18nInstance from '../../../localeImport.js';
|
|
10
|
-
import Image from '../../Image/Image.js';
|
|
11
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
function ConnectWalletQrCode(props) {
|
|
@@ -17,9 +17,11 @@ function ConnectWalletQrCode(props) {
|
|
|
17
17
|
});
|
|
18
18
|
const {
|
|
19
19
|
bodyState,
|
|
20
|
-
setBodyState
|
|
20
|
+
setBodyState
|
|
21
|
+
} = useBodyState();
|
|
22
|
+
const {
|
|
21
23
|
setToast
|
|
22
|
-
} =
|
|
24
|
+
} = useToast();
|
|
23
25
|
const {
|
|
24
26
|
qrCodeValue,
|
|
25
27
|
isDark,
|
|
@@ -47,12 +49,12 @@ function ConnectWalletQrCode(props) {
|
|
|
47
49
|
const modalColor = ((_getComputedStyle = getComputedStyle(root)) === null || _getComputedStyle === void 0 || (_getComputedStyle = _getComputedStyle.getPropertyValue("--app-gray-800")) === null || _getComputedStyle === void 0 ? void 0 : _getComputedStyle.trim()) || "#1f2a37";
|
|
48
50
|
const qrColor = primaryColor && primaryColor.toLowerCase() === "#ffffff" ? "#000000" : primaryColor;
|
|
49
51
|
return /*#__PURE__*/jsxs("div", {
|
|
50
|
-
className: "
|
|
52
|
+
className: "wta:contents",
|
|
51
53
|
children: [qrCodeValue ? /*#__PURE__*/jsxs("div", {
|
|
52
|
-
className: "
|
|
54
|
+
className: "wta:flex wta:flex-col wta:items-center wta:justify-center wta:gap-y-4 wta:rounded-2xl wta:border wta:border-app-gray-200 wta:p-4 wta:dark:border-app-gray-700",
|
|
53
55
|
children: [/*#__PURE__*/jsx("button", {
|
|
54
56
|
type: "button",
|
|
55
|
-
className: "
|
|
57
|
+
className: "wta:relative wta:flex wta:size-[300px] wta:appearance-none wta:items-center wta:justify-center wta:rounded-2xl",
|
|
56
58
|
onClick: () => {
|
|
57
59
|
navigator.clipboard.writeText(qrCodeValue);
|
|
58
60
|
setToast({
|
|
@@ -75,11 +77,11 @@ function ConnectWalletQrCode(props) {
|
|
|
75
77
|
fgColor: isDark ? whiteColor : blackColor
|
|
76
78
|
})
|
|
77
79
|
}), /*#__PURE__*/jsx("p", {
|
|
78
|
-
className: "
|
|
80
|
+
className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
|
|
79
81
|
children: t("modal.external.walletconnect-copy")
|
|
80
82
|
})]
|
|
81
83
|
}) : /*#__PURE__*/jsx("div", {
|
|
82
|
-
className: "
|
|
84
|
+
className: "wta:mx-auto wta:flex wta:size-[300px] wta:animate-pulse wta:items-center wta:justify-center wta:rounded-lg wta:bg-app-gray-200 wta:p-2 wta:dark:bg-app-gray-700",
|
|
83
85
|
children: /*#__PURE__*/jsx(Image, {
|
|
84
86
|
imageId: `login-${selectedButton.name}`,
|
|
85
87
|
hoverImageId: `login-${selectedButton.name}`,
|
|
@@ -90,15 +92,15 @@ function ConnectWalletQrCode(props) {
|
|
|
90
92
|
extension: selectedButton.imgExtension
|
|
91
93
|
})
|
|
92
94
|
}), showGetWalletComponent && /*#__PURE__*/jsxs("div", {
|
|
93
|
-
className: "
|
|
95
|
+
className: "wta:flex wta:w-full wta:items-center wta:justify-between wta:rounded-2xl wta:bg-app-gray-50 wta:px-4 wta:py-2 wta:text-app-gray-900 wta:dark:bg-app-gray-800 wta:dark:text-app-white",
|
|
94
96
|
children: [/*#__PURE__*/jsxs("p", {
|
|
95
|
-
className: "
|
|
97
|
+
className: "wta:text-sm wta:text-app-gray-900 wta:dark:text-app-white",
|
|
96
98
|
children: [t("modal.external.dont-have"), " ", /*#__PURE__*/jsx("span", {
|
|
97
99
|
children: selectedButton === null || selectedButton === void 0 ? void 0 : selectedButton.displayName
|
|
98
100
|
}), "?"]
|
|
99
101
|
}), /*#__PURE__*/jsx("button", {
|
|
100
102
|
type: "button",
|
|
101
|
-
className: "
|
|
103
|
+
className: "wta:appearance-none wta:rounded-full wta:border wta:border-app-gray-200 wta:bg-transparent wta:px-5 wta:py-2 wta:text-base wta:font-normal wta:text-app-gray-700 wta:transition-all wta:duration-150 wta:hover:border-transparent wta:hover:shadow-light wta:active:scale-95 wta:dark:border-app-gray-700 wta:dark:text-app-gray-300 wta:dark:hover:border-transparent wta:dark:hover:shadow-dark",
|
|
102
104
|
onClick: () => {
|
|
103
105
|
setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
|
|
104
106
|
installLinks: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { useWidget } from '../../../context/WidgetContext.js';
|
|
3
4
|
import i18nInstance from '../../../localeImport.js';
|
|
4
5
|
import { cn } from '../../../utils.js';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -9,9 +10,14 @@ function ConnectWalletSearch(props) {
|
|
|
9
10
|
totalExternalWalletCount,
|
|
10
11
|
isLoading,
|
|
11
12
|
walletSearch,
|
|
12
|
-
handleWalletSearch
|
|
13
|
-
buttonRadius
|
|
13
|
+
handleWalletSearch
|
|
14
14
|
} = props;
|
|
15
|
+
const {
|
|
16
|
+
uiConfig
|
|
17
|
+
} = useWidget();
|
|
18
|
+
const {
|
|
19
|
+
buttonRadiusType: buttonRadius
|
|
20
|
+
} = uiConfig;
|
|
15
21
|
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
16
22
|
const [t] = useTranslation(undefined, {
|
|
17
23
|
i18n: i18nInstance
|
|
@@ -24,7 +30,7 @@ function ConnectWalletSearch(props) {
|
|
|
24
30
|
// const isShowSearch = totalExternalWalletCount > 15 && !isLoading;
|
|
25
31
|
|
|
26
32
|
// if (!isShowSearch) {
|
|
27
|
-
// return <div className="
|
|
33
|
+
// return <div className="wta:h-[50px] wta:w-full wta:animate-pulse wta:rounded-full wta:bg-app-gray-200 wta:dark:bg-app-gray-700" />;
|
|
28
34
|
// }
|
|
29
35
|
|
|
30
36
|
return /*#__PURE__*/jsx("input", {
|
|
@@ -45,10 +51,10 @@ function ConnectWalletSearch(props) {
|
|
|
45
51
|
count: totalExternalWalletCount
|
|
46
52
|
}),
|
|
47
53
|
disabled: isLoading,
|
|
48
|
-
className: cn("w3a--input
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
54
|
+
className: cn("w3a--input wta:appearance-none wta:outline-none wta:active:outline-none wta:focus:outline-none wta:bg-transparent wta:placeholder:text-app-gray-400 wta:dark:placeholder:text-app-gray-500 wta:text-app-gray-900 wta:dark:text-app-white", isInputFocused && "wta:border-app-primary-600!", {
|
|
55
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
56
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
57
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
52
58
|
})
|
|
53
59
|
});
|
|
54
60
|
}
|
|
@@ -26,6 +26,7 @@ function Embed(props) {
|
|
|
26
26
|
setIsOpen(true);
|
|
27
27
|
}, 50);
|
|
28
28
|
} else {
|
|
29
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect -- intentional
|
|
29
30
|
setIsOpen(false);
|
|
30
31
|
}
|
|
31
32
|
}, [open]);
|
|
@@ -34,18 +35,18 @@ function Embed(props) {
|
|
|
34
35
|
};
|
|
35
36
|
if (!isOpen) return null;
|
|
36
37
|
return /*#__PURE__*/jsxs("div", {
|
|
37
|
-
className: cn("
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
38
|
+
className: cn("wta:bg-app-light-surface1 wta:dark:bg-app-dark-surface-main wta:rounded-3xl wta:w-[356px] wta:[@media(min-width:375px)]:w-[393px] wta:h-auto wta:flex wta:flex-col wta:duration-500", {
|
|
39
|
+
"wta:translate-y-0 wta:delay-100": isOpen,
|
|
40
|
+
"wta:translate-y-[100vh]": !isOpen,
|
|
41
|
+
"wta:p-4": padding,
|
|
42
|
+
"wta:shadow-xl wta:sm:shadow-lg": shadow,
|
|
43
|
+
"wta:border wta:border-app-gray-100 wta:dark:border-app-gray-800": border,
|
|
44
|
+
"wta:rounded-[30px]": borderRadius === "large",
|
|
45
|
+
"wta:rounded-2xl": borderRadius === "medium",
|
|
46
|
+
"wta:rounded-none": borderRadius === "small"
|
|
46
47
|
}),
|
|
47
48
|
children: [showCloseIcon && /*#__PURE__*/jsx("div", {
|
|
48
|
-
className: "
|
|
49
|
+
className: "wta:absolute wta:right-6 wta:top-[30px] wta:z-10 wta:cursor-pointer",
|
|
49
50
|
children: /*#__PURE__*/jsx("svg", {
|
|
50
51
|
width: "13",
|
|
51
52
|
height: "13",
|
|
@@ -53,7 +54,7 @@ function Embed(props) {
|
|
|
53
54
|
fill: "none",
|
|
54
55
|
xmlns: "http://www.w3.org/2000/svg",
|
|
55
56
|
onClick: onCloseHandler,
|
|
56
|
-
className: "
|
|
57
|
+
className: "wta:text-app-gray-900 wta:dark:text-app-white",
|
|
57
58
|
children: /*#__PURE__*/jsx("path", {
|
|
58
59
|
fillRule: "evenodd",
|
|
59
60
|
clipRule: "evenodd",
|