@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
|
@@ -2,50 +2,30 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import HCaptcha from '@hcaptcha/react-hcaptcha';
|
|
3
3
|
import { AUTH_CONNECTION } from '@web3auth/auth';
|
|
4
4
|
import { WALLET_CONNECTORS, ANALYTICS_EVENTS, log, WalletLoginError } from '@web3auth/no-modal';
|
|
5
|
-
import { useContext, useState, useRef,
|
|
5
|
+
import { useContext, useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import Image from '../../components/Image/Image.js';
|
|
8
|
+
import SocialLoginList from '../../components/SocialLoginList/SocialLoginList.js';
|
|
7
9
|
import { capitalizeFirstLetter, CAPTCHA_SITE_KEY } from '../../config.js';
|
|
8
|
-
import { DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT } from '../../constants.js';
|
|
10
|
+
import { PAGES, DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT } from '../../constants.js';
|
|
9
11
|
import { AnalyticsContext } from '../../context/AnalyticsContext.js';
|
|
10
|
-
import {
|
|
12
|
+
import { useModalState } from '../../context/ModalStateContext.js';
|
|
13
|
+
import { useBodyState } from '../../context/RootContext.js';
|
|
14
|
+
import { useWidget } from '../../context/WidgetContext.js';
|
|
11
15
|
import { createPasswordlessHandler } from '../../handlers/factory.js';
|
|
12
16
|
import { isTestAccountPattern } from '../../helper/testAccounts.js';
|
|
13
17
|
import i18nInstance from '../../localeImport.js';
|
|
14
18
|
import { cn, getUserCountry, getIcons, validatePhoneNumber } from '../../utils.js';
|
|
15
|
-
import Image from '../Image/Image.js';
|
|
16
|
-
import SocialLoginList from '../SocialLoginList/SocialLoginList.js';
|
|
17
19
|
import LoginOtp from './LoginOtp/LoginOtp.js';
|
|
18
20
|
import LoginPasswordLess from './LoginPasswordLess/LoginPasswordLess.js';
|
|
19
21
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
22
|
|
|
21
23
|
const restrictedLoginMethods = [AUTH_CONNECTION.SMS_PASSWORDLESS, AUTH_CONNECTION.EMAIL_PASSWORDLESS, AUTH_CONNECTION.AUTHENTICATOR, AUTH_CONNECTION.PASSKEYS, AUTH_CONNECTION.TELEGRAM, AUTH_CONNECTION.CUSTOM];
|
|
22
24
|
function Login(props) {
|
|
23
|
-
// TODO: add appName, isEmailPrimary, isExternalPrimary
|
|
24
25
|
const {
|
|
25
|
-
web3authClientId,
|
|
26
|
-
web3authNetwork,
|
|
27
|
-
authBuildEnv,
|
|
28
|
-
appLogo,
|
|
29
|
-
isModalVisible,
|
|
30
|
-
handleSocialLoginHeight,
|
|
31
|
-
socialLoginsConfig,
|
|
32
26
|
installedExternalWalletConfig,
|
|
33
|
-
isDark,
|
|
34
|
-
handleSocialLoginClick,
|
|
35
27
|
totalExternalWallets,
|
|
36
|
-
remainingUndisplayedWallets
|
|
37
|
-
isEmailPasswordLessLoginVisible,
|
|
38
|
-
isSmsPasswordLessLoginVisible,
|
|
39
|
-
handleExternalWalletBtnClick,
|
|
40
|
-
handleExternalWalletClick,
|
|
41
|
-
areSocialLoginsVisible,
|
|
42
|
-
showPasswordLessInput,
|
|
43
|
-
showExternalWalletButton,
|
|
44
|
-
showExternalWalletCount,
|
|
45
|
-
showInstalledExternalWallets,
|
|
46
|
-
logoAlignment = "center",
|
|
47
|
-
buttonRadius = "pill",
|
|
48
|
-
deviceDetails
|
|
28
|
+
remainingUndisplayedWallets
|
|
49
29
|
} = props;
|
|
50
30
|
const [t] = useTranslation(undefined, {
|
|
51
31
|
i18n: i18nInstance
|
|
@@ -53,19 +33,47 @@ function Login(props) {
|
|
|
53
33
|
const {
|
|
54
34
|
bodyState,
|
|
55
35
|
setBodyState
|
|
56
|
-
} =
|
|
36
|
+
} = useBodyState();
|
|
57
37
|
const {
|
|
58
38
|
analytics
|
|
59
39
|
} = useContext(AnalyticsContext);
|
|
40
|
+
const {
|
|
41
|
+
appLogo,
|
|
42
|
+
deviceDetails,
|
|
43
|
+
uiConfig,
|
|
44
|
+
isDark
|
|
45
|
+
} = useWidget();
|
|
46
|
+
// TODO: add appName, isEmailPrimary, isExternalPrimary
|
|
47
|
+
const {
|
|
48
|
+
modalState,
|
|
49
|
+
setModalState,
|
|
50
|
+
areSocialLoginsVisible,
|
|
51
|
+
isEmailPasswordLessLoginVisible,
|
|
52
|
+
isSmsPasswordLessLoginVisible,
|
|
53
|
+
showPasswordLessInput,
|
|
54
|
+
showExternalWalletButton,
|
|
55
|
+
handleShowExternalWallets,
|
|
56
|
+
preHandleSocialLoginClick: handleSocialLoginClick,
|
|
57
|
+
preHandleExternalWalletClick: handleExternalWalletClick
|
|
58
|
+
} = useModalState();
|
|
59
|
+
const {
|
|
60
|
+
modalVisibility: isModalVisible,
|
|
61
|
+
socialLoginsConfig
|
|
62
|
+
} = modalState;
|
|
63
|
+
const {
|
|
64
|
+
buttonRadiusType: buttonRadius,
|
|
65
|
+
logoAlignment,
|
|
66
|
+
displayInstalledExternalWallets: showInstalledExternalWallets,
|
|
67
|
+
displayExternalWalletsCount: showExternalWalletCount,
|
|
68
|
+
web3authClientId,
|
|
69
|
+
web3authNetwork,
|
|
70
|
+
authBuildEnv
|
|
71
|
+
} = uiConfig;
|
|
60
72
|
const [countryCode, setCountryCode] = useState("");
|
|
61
73
|
const [countryFlag, setCountryFlag] = useState("");
|
|
62
74
|
const [passwordlessErrorMessage, setPasswordlessErrorMessage] = useState("");
|
|
63
75
|
const [otpErrorMessage, setOtpErrorMessage] = useState("");
|
|
64
76
|
const [expandSocialLogins, setExpandSocialLogins] = useState(false);
|
|
65
|
-
const [canShowMore, setCanShowMore] = useState(false);
|
|
66
|
-
const [visibleRow, setVisibleRow] = useState([]);
|
|
67
|
-
const [otherRow, setOtherRow] = useState([]);
|
|
68
|
-
const [mainOptionsRow, setMainOptionsRow] = useState([]);
|
|
69
77
|
const [isPasswordLessCtaClicked, setIsPasswordLessCtaClicked] = useState(false);
|
|
70
78
|
const [showOtpFlow, setShowOtpFlow] = useState(false);
|
|
71
79
|
const [authConnection, setAuthConnection] = useState(undefined);
|
|
@@ -78,9 +86,13 @@ function Login(props) {
|
|
|
78
86
|
const handleSocialLoginExpand = () => {
|
|
79
87
|
setExpandSocialLogins(prev => !prev);
|
|
80
88
|
setIsPasswordLessCtaClicked(false);
|
|
81
|
-
handleSocialLoginHeight();
|
|
82
89
|
};
|
|
83
|
-
|
|
90
|
+
const {
|
|
91
|
+
visibleRow,
|
|
92
|
+
otherRow,
|
|
93
|
+
mainOptionsRow,
|
|
94
|
+
canShowMore
|
|
95
|
+
} = useMemo(() => {
|
|
84
96
|
const maxOptions = Object.keys(socialLoginsConfig.loginMethods).filter(loginMethodKey => {
|
|
85
97
|
return socialLoginsConfig.loginMethods[loginMethodKey].showOnModal && !restrictedLoginMethods.includes(loginMethodKey);
|
|
86
98
|
});
|
|
@@ -133,7 +145,6 @@ function Login(props) {
|
|
|
133
145
|
isDark,
|
|
134
146
|
isPrimaryBtn,
|
|
135
147
|
name: name === "Twitter" ? "X" : name,
|
|
136
|
-
connector: socialLoginsConfig.connector,
|
|
137
148
|
loginParams: {
|
|
138
149
|
authConnection: connectorConfig.authConnection || method,
|
|
139
150
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -151,11 +162,13 @@ function Login(props) {
|
|
|
151
162
|
}
|
|
152
163
|
otherRows.push(rows);
|
|
153
164
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
165
|
+
return {
|
|
166
|
+
visibleRow: visibleRows,
|
|
167
|
+
otherRow: otherRows,
|
|
168
|
+
mainOptionsRow: mainOptionsRows,
|
|
169
|
+
canShowMore: maxOptions.length > 4
|
|
170
|
+
};
|
|
171
|
+
}, [socialLoginsConfig, isDark]);
|
|
159
172
|
const handleCustomLogin = async (authConnection, loginHint) => {
|
|
160
173
|
try {
|
|
161
174
|
const handler = createPasswordlessHandler(authConnection, {
|
|
@@ -201,7 +214,6 @@ function Login(props) {
|
|
|
201
214
|
const connectorConfig = socialLoginsConfig.loginMethods[AUTH_CONNECTION.EMAIL_PASSWORDLESS];
|
|
202
215
|
if (connectorConfig.isDefault) {
|
|
203
216
|
return handleSocialLoginClick({
|
|
204
|
-
connector: socialLoginsConfig.connector,
|
|
205
217
|
loginParams: {
|
|
206
218
|
authConnection: AUTH_CONNECTION.EMAIL_PASSWORDLESS,
|
|
207
219
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -224,7 +236,6 @@ function Login(props) {
|
|
|
224
236
|
const connectorConfig = socialLoginsConfig.loginMethods[AUTH_CONNECTION.SMS_PASSWORDLESS];
|
|
225
237
|
if (connectorConfig.isDefault) {
|
|
226
238
|
return handleSocialLoginClick({
|
|
227
|
-
connector: socialLoginsConfig.connector,
|
|
228
239
|
loginParams: {
|
|
229
240
|
authConnection: AUTH_CONNECTION.SMS_PASSWORDLESS,
|
|
230
241
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -240,7 +251,7 @@ function Login(props) {
|
|
|
240
251
|
}
|
|
241
252
|
}
|
|
242
253
|
}
|
|
243
|
-
setPasswordlessErrorMessage(
|
|
254
|
+
setPasswordlessErrorMessage(getInvalidInputErrorMessage());
|
|
244
255
|
setIsPasswordLessLoading(false);
|
|
245
256
|
return undefined;
|
|
246
257
|
};
|
|
@@ -254,11 +265,11 @@ function Login(props) {
|
|
|
254
265
|
if (isEmailPasswordLessLoginVisible) return "name@example.com";
|
|
255
266
|
return "+(00)123456";
|
|
256
267
|
}, [isEmailPasswordLessLoginVisible, isSmsPasswordLessLoginVisible]);
|
|
257
|
-
const
|
|
268
|
+
const getInvalidInputErrorMessage = () => {
|
|
258
269
|
if (isEmailPasswordLessLoginVisible && isSmsPasswordLessLoginVisible) return t("modal.errors-invalid-number-email");
|
|
259
270
|
if (isEmailPasswordLessLoginVisible) return t("modal.errors-invalid-email");
|
|
260
271
|
return t("modal.errors-invalid-number");
|
|
261
|
-
}
|
|
272
|
+
};
|
|
262
273
|
useEffect(() => {
|
|
263
274
|
const getLocation = async () => {
|
|
264
275
|
const result = await getUserCountry();
|
|
@@ -282,7 +293,6 @@ function Login(props) {
|
|
|
282
293
|
if (result !== null && result !== void 0 && (_result$data = result.data) !== null && _result$data !== void 0 && _result$data.id_token) {
|
|
283
294
|
var _result$data2;
|
|
284
295
|
return handleSocialLoginClick({
|
|
285
|
-
connector: socialLoginsConfig.connector,
|
|
286
296
|
loginParams: {
|
|
287
297
|
authConnection: authConnection,
|
|
288
298
|
authConnectionId: connectorConfig.authConnectionId,
|
|
@@ -301,6 +311,12 @@ function Login(props) {
|
|
|
301
311
|
setOtpLoading(false);
|
|
302
312
|
}
|
|
303
313
|
};
|
|
314
|
+
const handleExternalWalletBtnClick = useCallback(flag => {
|
|
315
|
+
setModalState(_objectSpread(_objectSpread({}, modalState), {}, {
|
|
316
|
+
currentPage: PAGES.WALLET_LIST
|
|
317
|
+
}));
|
|
318
|
+
handleShowExternalWallets(flag);
|
|
319
|
+
}, [modalState, setModalState, handleShowExternalWallets]);
|
|
304
320
|
|
|
305
321
|
/**
|
|
306
322
|
* Installed wallet click logic:
|
|
@@ -322,23 +338,22 @@ function Login(props) {
|
|
|
322
338
|
total_external_wallets: totalExternalWallets
|
|
323
339
|
});
|
|
324
340
|
log.info("handleInstalledWalletClick", wallet);
|
|
325
|
-
|
|
341
|
+
|
|
342
|
+
// for non-injected MetaMask on desktop, navigate to ConnectWallet page with pre-selected wallet
|
|
326
343
|
if (wallet.name === WALLET_CONNECTORS.METAMASK && !wallet.hasInjectedWallet && deviceDetails.platform === "desktop") {
|
|
327
344
|
handleExternalWalletClick({
|
|
328
345
|
connector: wallet.name
|
|
329
346
|
});
|
|
330
|
-
//
|
|
347
|
+
// Set pre-selected wallet and navigate to ConnectWallet page
|
|
331
348
|
setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
|
|
332
|
-
|
|
333
|
-
show: true,
|
|
334
|
-
wallet: wallet
|
|
335
|
-
}
|
|
349
|
+
preSelectedWallet: wallet
|
|
336
350
|
}));
|
|
351
|
+
handleExternalWalletBtnClick(true);
|
|
337
352
|
return;
|
|
338
353
|
}
|
|
339
354
|
|
|
340
355
|
// when having multiple namespaces, ask user to select one
|
|
341
|
-
if (((_wallet$chainNamespac = wallet.chainNamespaces) === null || _wallet$chainNamespac === void 0 ? void 0 : _wallet$chainNamespac.length) > 1) {
|
|
356
|
+
if (((_wallet$chainNamespac = wallet.chainNamespaces) === null || _wallet$chainNamespac === void 0 ? void 0 : _wallet$chainNamespac.length) > 1 && wallet.name !== WALLET_CONNECTORS.METAMASK) {
|
|
342
357
|
setBodyState(_objectSpread(_objectSpread({}, bodyState), {}, {
|
|
343
358
|
multiChainSelector: {
|
|
344
359
|
show: true,
|
|
@@ -363,10 +378,11 @@ function Login(props) {
|
|
|
363
378
|
});
|
|
364
379
|
setIsPasswordLessCtaClicked(false);
|
|
365
380
|
e === null || e === void 0 || e.preventDefault();
|
|
366
|
-
|
|
381
|
+
handleExternalWalletBtnClick(true);
|
|
367
382
|
}, [analytics, handleExternalWalletBtnClick, installedExternalWallets.length, totalExternalWallets]);
|
|
368
383
|
useEffect(() => {
|
|
369
384
|
if (showExternalWalletButton && !areSocialLoginsVisible && !showPasswordLessInput) {
|
|
385
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect -- intentional
|
|
370
386
|
handleConnectWallet();
|
|
371
387
|
}
|
|
372
388
|
}, [showExternalWalletButton, areSocialLoginsVisible, showPasswordLessInput, handleConnectWallet]);
|
|
@@ -410,25 +426,25 @@ function Login(props) {
|
|
|
410
426
|
};
|
|
411
427
|
const externalWalletSection = () => {
|
|
412
428
|
return /*#__PURE__*/jsxs("div", {
|
|
413
|
-
className: cn("
|
|
429
|
+
className: cn("wta:flex wta:w-full wta:flex-col wta:items-start wta:justify-start wta:gap-y-2"),
|
|
414
430
|
children: [installedExternalWallets.length > 0 && installedExternalWallets.map(wallet => /*#__PURE__*/jsxs("button", {
|
|
415
431
|
type: "button",
|
|
416
|
-
className: cn("w3a--btn
|
|
417
|
-
"
|
|
418
|
-
"
|
|
419
|
-
"
|
|
432
|
+
className: cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
|
|
433
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
434
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
435
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
420
436
|
}),
|
|
421
437
|
onClick: () => handleInstalledWalletClick(wallet),
|
|
422
438
|
children: [/*#__PURE__*/jsx("p", {
|
|
423
|
-
className: "
|
|
439
|
+
className: "wta:max-w-[180px] wta:truncate wta:text-base wta:font-normal wta:text-app-gray-700 wta:dark:text-app-white",
|
|
424
440
|
children: wallet.displayName
|
|
425
441
|
}), /*#__PURE__*/jsxs("div", {
|
|
426
|
-
className: "
|
|
442
|
+
className: "wta:absolute wta:right-4 wta:top-1/2 wta:flex wta:w-auto wta:-translate-y-1/2 wta:items-center wta:gap-x-2 wta:transition-all wta:duration-300 wta:group-hover:translate-x-6 wta:group-hover:opacity-0",
|
|
427
443
|
children: [wallet.hasInjectedWallet && /*#__PURE__*/jsx("span", {
|
|
428
|
-
className: "
|
|
444
|
+
className: "wta:inline-flex wta:items-center wta:rounded-md 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",
|
|
429
445
|
children: t("modal.external.installed")
|
|
430
446
|
}), /*#__PURE__*/jsx("figure", {
|
|
431
|
-
className: "
|
|
447
|
+
className: "wta:size-5",
|
|
432
448
|
children: /*#__PURE__*/jsx(Image, {
|
|
433
449
|
imageData: wallet.icon,
|
|
434
450
|
imageId: `login-${wallet.name}`,
|
|
@@ -442,28 +458,28 @@ function Login(props) {
|
|
|
442
458
|
})]
|
|
443
459
|
}), /*#__PURE__*/jsx("img", {
|
|
444
460
|
id: "injected-wallet-arrow",
|
|
445
|
-
className: "
|
|
461
|
+
className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-10 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",
|
|
446
462
|
src: getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
447
463
|
alt: "arrow"
|
|
448
464
|
})]
|
|
449
465
|
}, wallet.name)), remainingUndisplayedWallets > 0 && /*#__PURE__*/jsxs("button", {
|
|
450
466
|
type: "button",
|
|
451
|
-
className: cn("w3a--btn
|
|
452
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"
|
|
467
|
+
className: cn("w3a--btn wta:justify-between! wta:group wta:relative wta:overflow-hidden", {
|
|
468
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
469
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
470
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
455
471
|
}),
|
|
456
472
|
onClick: handleConnectWallet,
|
|
457
473
|
children: [/*#__PURE__*/jsx("p", {
|
|
458
|
-
className: "
|
|
474
|
+
className: "wta:text-base wta:font-normal wta:text-app-gray-900 wta:dark:text-app-white",
|
|
459
475
|
children: t("modal.external.all-wallets")
|
|
460
476
|
}), showExternalWalletCount && /*#__PURE__*/jsx("div", {
|
|
461
477
|
id: "external-wallet-count",
|
|
462
|
-
className: "
|
|
478
|
+
className: "wta:absolute wta:right-4 wta:top-1/2 wta:w-auto wta:-translate-y-1/2 wta:rounded-full wta:bg-app-primary-100 wta:px-2.5 wta:py-0.5 wta:text-xs wta:font-medium wta:text-app-primary-800 wta:transition-all wta:delay-300 wta:duration-300 wta:group-hover:translate-x-6 wta:group-hover:opacity-0 wta:group-hover:delay-0 wta:dark:border wta:dark:border-app-primary-500 wta:dark:bg-transparent wta:dark:text-app-primary-500",
|
|
463
479
|
children: remainingUndisplayedWallets
|
|
464
480
|
}), /*#__PURE__*/jsx("img", {
|
|
465
481
|
id: "external-wallet-arrow",
|
|
466
|
-
className: "
|
|
482
|
+
className: "wta:absolute wta:right-4 wta:top-1/2 wta:-translate-x-10 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",
|
|
467
483
|
src: getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
468
484
|
alt: "arrow"
|
|
469
485
|
})]
|
|
@@ -473,14 +489,14 @@ function Login(props) {
|
|
|
473
489
|
const headerLogo = [DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT].includes(appLogo) ? "" : appLogo;
|
|
474
490
|
const delimiter = index => {
|
|
475
491
|
return /*#__PURE__*/jsxs("div", {
|
|
476
|
-
className: cn("
|
|
492
|
+
className: cn("wta:flex wta:w-full wta:items-center wta:gap-x-2", headerLogo ? "wta:my-2" : "wta:my-4"),
|
|
477
493
|
children: [/*#__PURE__*/jsx("div", {
|
|
478
|
-
className: "
|
|
494
|
+
className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
|
|
479
495
|
}), /*#__PURE__*/jsx("p", {
|
|
480
|
-
className: "
|
|
496
|
+
className: "wta:text-xs wta:font-normal wta:uppercase wta:text-app-gray-400 wta:dark:text-app-gray-400",
|
|
481
497
|
children: "or"
|
|
482
498
|
}), /*#__PURE__*/jsx("div", {
|
|
483
|
-
className: "
|
|
499
|
+
className: "wta:h-px wta:w-full wta:bg-app-gray-200 wta:dark:bg-app-gray-500"
|
|
484
500
|
})]
|
|
485
501
|
}, `section-delimiter-${index}`);
|
|
486
502
|
};
|
|
@@ -530,18 +546,18 @@ function Login(props) {
|
|
|
530
546
|
};
|
|
531
547
|
const socialLoginExpandedView = () => socialLoginSection(otherRow);
|
|
532
548
|
return /*#__PURE__*/jsxs("div", {
|
|
533
|
-
className: "
|
|
549
|
+
className: "wta:flex wta:flex-col wta:items-center wta:gap-y-4 wta:p-2",
|
|
534
550
|
children: [/*#__PURE__*/jsxs("div", {
|
|
535
|
-
className: cn("
|
|
551
|
+
className: cn("wta:flex wta:flex-col wta:items-center wta:justify-center wta:gap-y-2 wta:pt-6", logoAlignment === "center" ? "" : "wta:w-full"),
|
|
536
552
|
children: [headerLogo && /*#__PURE__*/jsx("figure", {
|
|
537
|
-
className: cn("
|
|
553
|
+
className: cn("wta:mx-auto wta:h-12 wta:w-[200px]", logoAlignment === "center" ? "wta:flex wta:justify-center wta:items-center" : "wta:ml-0 wta:w-auto"),
|
|
538
554
|
children: /*#__PURE__*/jsx("img", {
|
|
539
555
|
src: headerLogo,
|
|
540
556
|
alt: "Logo",
|
|
541
|
-
className: "
|
|
557
|
+
className: "wta:size-full wta:object-contain"
|
|
542
558
|
})
|
|
543
559
|
}), /*#__PURE__*/jsx("p", {
|
|
544
|
-
className: cn("
|
|
560
|
+
className: cn("wta:text-app-gray-900 wta:dark:text-app-white", logoAlignment === "center" ? "wta:text-center" : "wta:text-left wta:w-full wta:ml-4", headerLogo ? "wta:text-lg wta:font-semibold" : "wta:text-3xl wta:font-medium"),
|
|
545
561
|
children: t("modal.social.sign-in")
|
|
546
562
|
})]
|
|
547
563
|
}), /*#__PURE__*/jsx(HCaptcha, {
|
|
@@ -555,10 +571,10 @@ function Login(props) {
|
|
|
555
571
|
onError: () => setCaptchaError("passwordless.captcha-default-error"),
|
|
556
572
|
onChalExpired: () => setCaptchaError("passwordless.captcha-default-error")
|
|
557
573
|
}), captchaError && showCaptcha && /*#__PURE__*/jsx("p", {
|
|
558
|
-
className: "
|
|
574
|
+
className: "wta:-mt-2 wta:w-full wta:pl-6 wta:text-start wta:text-xs wta:font-normal wta:text-app-red-500 wta:dark:text-app-red-400",
|
|
559
575
|
children: t(captchaError)
|
|
560
576
|
}), !showCaptcha && /*#__PURE__*/jsxs("div", {
|
|
561
|
-
className: "
|
|
577
|
+
className: "wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-2",
|
|
562
578
|
children: [!expandSocialLogins && defaultView(), expandSocialLogins && socialLoginExpandedView()]
|
|
563
579
|
})]
|
|
564
580
|
});
|
package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AUTH_CONNECTION } from '@web3auth/auth';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import OtpInput$1 from '../../../components/Otp/Otp.js';
|
|
4
5
|
import i18nInstance from '../../../localeImport.js';
|
|
5
6
|
import { getIcons } from '../../../utils.js';
|
|
6
|
-
import OtpInput$1 from '../../Otp/Otp.js';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -33,16 +33,16 @@ function OtpInput(props) {
|
|
|
33
33
|
}, [loginHint, authConnection, countryFlag]);
|
|
34
34
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
35
35
|
children: [/*#__PURE__*/jsx("div", {
|
|
36
|
-
className: "
|
|
36
|
+
className: "wta:mr-auto wta:flex wta:w-full wta:items-start wta:justify-start",
|
|
37
37
|
children: /*#__PURE__*/jsx("button", {
|
|
38
38
|
type: "button",
|
|
39
|
-
className: "
|
|
39
|
+
className: "wta:z-20 wta:flex wta:size-5 wta:cursor-pointer wta:items-center wta:justify-center wta:rounded-full",
|
|
40
40
|
onClick: () => setShowOtpFlow(false),
|
|
41
41
|
children: /*#__PURE__*/jsx("svg", {
|
|
42
42
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43
43
|
fill: "none",
|
|
44
44
|
viewBox: "0 0 20 20",
|
|
45
|
-
className: "
|
|
45
|
+
className: "wta:text-app-gray-900 wta:dark:text-app-white",
|
|
46
46
|
children: /*#__PURE__*/jsx("path", {
|
|
47
47
|
fill: "currentColor",
|
|
48
48
|
fillRule: "evenodd",
|
|
@@ -52,23 +52,23 @@ function OtpInput(props) {
|
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
54
|
}), /*#__PURE__*/jsxs("div", {
|
|
55
|
-
className: "
|
|
55
|
+
className: "wta:-mt-10 wta:flex wta:size-full wta:flex-1 wta:flex-col wta:items-center wta:justify-center wta:gap-y-4",
|
|
56
56
|
children: [/*#__PURE__*/jsx("img", {
|
|
57
57
|
src: getIcons(isMobileOtp ? "sms-otp-light" : "email-otp-light"),
|
|
58
58
|
alt: "otp",
|
|
59
|
-
className: "
|
|
59
|
+
className: "wta:size-auto"
|
|
60
60
|
}), /*#__PURE__*/jsxs("div", {
|
|
61
|
-
className: "
|
|
61
|
+
className: "wta:mx-auto wta:-mt-6 wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-2",
|
|
62
62
|
children: [/*#__PURE__*/jsx("p", {
|
|
63
|
-
className: "
|
|
63
|
+
className: "wta:text-lg wta:font-bold wta:text-app-gray-900 wta:dark:text-app-white",
|
|
64
64
|
children: isMobileOtp ? t("modal.otp.mobile-title") : t("modal.otp.email-title")
|
|
65
65
|
}), /*#__PURE__*/jsxs("div", {
|
|
66
|
-
className: "
|
|
66
|
+
className: "wta:mx-auto wta:flex wta:w-full wta:flex-col wta:items-center wta:justify-center wta:gap-y-1",
|
|
67
67
|
children: [/*#__PURE__*/jsx("p", {
|
|
68
|
-
className: "
|
|
68
|
+
className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
|
|
69
69
|
children: isMobileOtp ? t("modal.otp.mobile-subtext") : t("modal.otp.email-subtext")
|
|
70
70
|
}), /*#__PURE__*/jsx("p", {
|
|
71
|
-
className: "
|
|
71
|
+
className: "wta:text-center wta:text-sm wta:font-normal wta:text-app-gray-500 wta:dark:text-app-gray-300",
|
|
72
72
|
children: isMobileOtp ? parsedLoginHint : t("modal.otp.email-subtext-example", {
|
|
73
73
|
email: parsedLoginHint
|
|
74
74
|
})
|
|
@@ -102,7 +102,7 @@ function LoginOtp(props) {
|
|
|
102
102
|
countryFlag
|
|
103
103
|
} = props;
|
|
104
104
|
return /*#__PURE__*/jsx("div", {
|
|
105
|
-
className: "
|
|
105
|
+
className: "wta:flex wta:size-full wta:flex-1 wta:flex-col wta:items-center wta:justify-center wta:gap-y-4",
|
|
106
106
|
children: /*#__PURE__*/jsx(OtpInput, {
|
|
107
107
|
errorMessage: errorMessage,
|
|
108
108
|
setShowOtpFlow: setShowOtpFlow,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import PulseLoader from '../../../components/PulseLoader/PulseLoader.js';
|
|
3
4
|
import i18nInstance from '../../../localeImport.js';
|
|
4
5
|
import { getIcons, cn } from '../../../utils.js';
|
|
5
|
-
import PulseLoader from '../../PulseLoader/PulseLoader.js';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
function LoginPasswordLess(props) {
|
|
@@ -57,22 +57,22 @@ function LoginPasswordLess(props) {
|
|
|
57
57
|
if (!isPasswordLessCtaClicked) {
|
|
58
58
|
return /*#__PURE__*/jsxs("button", {
|
|
59
59
|
type: "button",
|
|
60
|
-
className: cn("w3a--btn
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
60
|
+
className: cn("w3a--btn wta:justify-between! wta:relative wta:group wta:overflow-hidden", {
|
|
61
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
62
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
63
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
64
64
|
}),
|
|
65
65
|
onClick: () => {
|
|
66
66
|
setIsPasswordLessCtaClicked(true);
|
|
67
67
|
},
|
|
68
68
|
children: [/*#__PURE__*/jsx("p", {
|
|
69
|
-
className: "
|
|
69
|
+
className: "wta:text-app-gray-900 wta:dark:text-app-white",
|
|
70
70
|
children: t("modal.passwordless.title", {
|
|
71
71
|
title
|
|
72
72
|
})
|
|
73
73
|
}), /*#__PURE__*/jsx("img", {
|
|
74
74
|
id: "passwordless-arrow",
|
|
75
|
-
className: "
|
|
75
|
+
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",
|
|
76
76
|
src: getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
77
77
|
alt: "arrow"
|
|
78
78
|
})]
|
|
@@ -80,10 +80,10 @@ function LoginPasswordLess(props) {
|
|
|
80
80
|
}
|
|
81
81
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
82
82
|
children: [/*#__PURE__*/jsxs("div", {
|
|
83
|
-
className: cn("w3a--input", isInputFocused && "
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
83
|
+
className: cn("w3a--input", isInputFocused && "wta:border-app-primary-600!", {
|
|
84
|
+
"wta:rounded-full": buttonRadius === "pill",
|
|
85
|
+
"wta:rounded-lg": buttonRadius === "rounded",
|
|
86
|
+
"wta:rounded-none": buttonRadius === "square"
|
|
87
87
|
}),
|
|
88
88
|
children: [/*#__PURE__*/jsx("input", {
|
|
89
89
|
ref: inputRef,
|
|
@@ -98,12 +98,12 @@ function LoginPasswordLess(props) {
|
|
|
98
98
|
setIsInputFocused(false);
|
|
99
99
|
},
|
|
100
100
|
type: "text",
|
|
101
|
-
className: cn("
|
|
101
|
+
className: cn("wta:w-full wta:appearance-none wta:bg-transparent wta:text-app-gray-900 wta:outline-none wta:placeholder:text-xs wta:placeholder:text-app-gray-400 wta:focus:outline-none wta:active:outline-none wta:dark:text-app-white wta:dark:placeholder:text-app-gray-500"),
|
|
102
102
|
onKeyDown: e => handleEnter(e),
|
|
103
103
|
disabled: isPasswordLessLoading
|
|
104
104
|
}), isPasswordLessLoading && /*#__PURE__*/jsx(PulseLoader, {}), inputValue && !isPasswordLessLoading && /*#__PURE__*/jsx("button", {
|
|
105
105
|
type: "button",
|
|
106
|
-
className: "
|
|
106
|
+
className: "wta:appearance-none",
|
|
107
107
|
onClick: onFormSubmit,
|
|
108
108
|
children: /*#__PURE__*/jsx("img", {
|
|
109
109
|
src: getIcons(isDark ? "chevron-right-dark" : "chevron-right-light"),
|
|
@@ -111,7 +111,7 @@ function LoginPasswordLess(props) {
|
|
|
111
111
|
})
|
|
112
112
|
})]
|
|
113
113
|
}), errorMessage && !isInputFocused && isPasswordLessCtaClicked && /*#__PURE__*/jsx("p", {
|
|
114
|
-
className: "
|
|
114
|
+
className: "wta:w-full wta:pl-6 wta:text-start wta:text-xs wta:font-normal wta:text-app-red-500 wta:dark:text-app-red-400",
|
|
115
115
|
children: errorMessage
|
|
116
116
|
})]
|
|
117
117
|
});
|