@web3auth/modal 10.0.0-beta.0 → 10.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/modalManager.js +186 -132
- package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +2 -2
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +26 -26
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +2 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +60 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +47 -22
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.type.js +8 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +53 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +68 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWallet.js +202 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +62 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/{ExternalWallet/ExternalWalletChainNamespace.js → ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js} +28 -30
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +49 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.js +140 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +93 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +55 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Embed/Embed.js +70 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +53 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +89 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +151 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Login/Login.js +489 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Login/LoginOtp/LoginOtp.js +116 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Login/LoginPasswordLess/LoginPasswordLess.js +117 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +52 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +87 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +190 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +18 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +452 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +156 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +70 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +229 -0
- package/dist/lib.cjs/packages/modal/src/ui/config.js +12 -1
- package/dist/lib.cjs/packages/modal/src/ui/constants.js +18 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/RootContext.js +20 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +2 -2
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +8 -0
- package/dist/lib.cjs/packages/modal/src/ui/handlers/AbstractHandler.js +117 -0
- package/dist/lib.cjs/packages/modal/src/ui/handlers/EmailPasswordlessHandler.js +54 -0
- package/dist/lib.cjs/packages/modal/src/ui/handlers/SmsPasswordlessHandler.js +57 -0
- package/dist/lib.cjs/packages/modal/src/ui/handlers/factory.js +19 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +37 -2
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +7 -10
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +69 -44
- package/dist/lib.cjs/packages/modal/src/ui/utils.js +107 -1
- package/dist/lib.cjs/types/modalManager.d.ts +4 -1
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +7 -0
- package/dist/lib.cjs/types/ui/components/BottomSheet/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Button/Button.d.ts +2 -15
- package/dist/lib.cjs/types/ui/components/Button/Button.type.d.ts +12 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/ButtonSocial.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/ButtonSocial.type.d.ts +14 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.type.d.ts +13 -0
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Button/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.type.d.ts +24 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.type.d.ts +13 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.type.d.ts +10 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +6 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.type.d.ts +19 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.type.d.ts +9 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.type.d.ts +9 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/ConnectWallet/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Embed/Embed.d.ts +8 -0
- package/dist/lib.cjs/types/ui/components/Embed/Embed.type.d.ts +12 -0
- package/dist/lib.cjs/types/ui/components/Embed/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Footer/Footer.d.ts +7 -0
- package/dist/lib.cjs/types/ui/components/Footer/Footer.type.d.ts +4 -0
- package/dist/lib.cjs/types/ui/components/Footer/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Image/Image.d.ts +7 -0
- package/dist/lib.cjs/types/ui/components/{Image.d.ts → Image/Image.type.d.ts} +2 -1
- package/dist/lib.cjs/types/ui/components/Image/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Loader/Loader.d.ts +8 -0
- package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +12 -0
- package/dist/lib.cjs/types/ui/components/Loader/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Login/Login.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Login/Login.type.d.ts +29 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginOtp/LoginOtp.d.ts +8 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginOtp/LoginOtp.type.d.ts +10 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginOtp/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/LoginPasswordLess.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/LoginPasswordLess.type.d.ts +13 -0
- package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Login/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.type.d.ts +6 -0
- package/dist/lib.cjs/types/ui/components/LoginHint/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Modal/Modal.d.ts +8 -0
- package/dist/lib.cjs/types/ui/components/Modal/Modal.type.d.ts +14 -0
- package/dist/lib.cjs/types/ui/components/Modal/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Otp/Otp.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Otp/Otp.type.d.ts +22 -0
- package/dist/lib.cjs/types/ui/components/Otp/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/PulseLoader/PulseLoader.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/PulseLoader/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/Root/Root.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +27 -0
- package/dist/lib.cjs/types/ui/components/Root/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/SocialLoginList/SocialLoginList.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/SocialLoginList/SocialLoginList.type.d.ts +11 -0
- package/dist/lib.cjs/types/ui/components/SocialLoginList/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Toast/Toast.d.ts +2 -0
- package/dist/lib.cjs/types/ui/components/Toast/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/Widget/Widget.d.ts +3 -0
- package/dist/lib.cjs/types/ui/components/{Modal.d.ts → Widget/Widget.type.d.ts} +4 -5
- package/dist/lib.cjs/types/ui/components/Widget/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/config.d.ts +4 -1
- package/dist/lib.cjs/types/ui/constants.d.ts +13 -0
- package/dist/lib.cjs/types/ui/context/RootContext.d.ts +18 -0
- package/dist/lib.cjs/types/ui/handlers/AbstractHandler.d.ts +20 -0
- package/dist/lib.cjs/types/ui/handlers/EmailPasswordlessHandler.d.ts +8 -0
- package/dist/lib.cjs/types/ui/handlers/SmsPasswordlessHandler.d.ts +9 -0
- package/dist/lib.cjs/types/ui/handlers/factory.d.ts +5 -0
- package/dist/lib.cjs/types/ui/interfaces.d.ts +115 -14
- package/dist/lib.cjs/types/ui/loginModal.d.ts +9 -7
- package/dist/lib.cjs/types/ui/utils.d.ts +17 -2
- package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +191 -138
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +58 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +48 -24
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.type.js +6 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +51 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +66 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWallet.js +200 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +60 -0
- package/dist/lib.esm/packages/modal/src/ui/components/{ExternalWallet/ExternalWalletChainNamespace.js → ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js} +28 -31
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +47 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.js +138 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +91 -0
- package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +56 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Embed/Embed.js +68 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +51 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +87 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +152 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Login/Login.js +489 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Login/LoginOtp/LoginOtp.js +115 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Login/LoginPasswordLess/LoginPasswordLess.js +115 -0
- package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +50 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +85 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +188 -0
- package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +16 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +462 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +154 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +68 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +231 -0
- package/dist/lib.esm/packages/modal/src/ui/config.js +10 -3
- package/dist/lib.esm/packages/modal/src/ui/constants.js +13 -0
- package/dist/lib.esm/packages/modal/src/ui/context/RootContext.js +18 -0
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +6 -0
- package/dist/lib.esm/packages/modal/src/ui/handlers/AbstractHandler.js +115 -0
- package/dist/lib.esm/packages/modal/src/ui/handlers/EmailPasswordlessHandler.js +52 -0
- package/dist/lib.esm/packages/modal/src/ui/handlers/SmsPasswordlessHandler.js +55 -0
- package/dist/lib.esm/packages/modal/src/ui/handlers/factory.js +17 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +37 -3
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +8 -9
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +70 -45
- package/dist/lib.esm/packages/modal/src/ui/utils.js +105 -3
- package/dist/modal.umd.min.js +1 -1
- package/dist/modal.umd.min.js.LICENSE.txt +8 -8
- package/package.json +14 -11
- package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-dark.svg.js +0 -7
- package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-light.svg.js +0 -7
- package/dist/lib.cjs/packages/modal/src/ui/assets/x-dark.svg.js +0 -7
- package/dist/lib.cjs/packages/modal/src/ui/assets/x-light.svg.js +0 -7
- package/dist/lib.cjs/packages/modal/src/ui/components/AdapterLoader.js +0 -108
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/styles.css.js +0 -8
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +0 -44
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +0 -67
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +0 -43
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +0 -46
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +0 -167
- package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallets.js +0 -279
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer.js +0 -20
- package/dist/lib.cjs/packages/modal/src/ui/components/Header.js +0 -81
- package/dist/lib.cjs/packages/modal/src/ui/components/Icon.js +0 -73
- package/dist/lib.cjs/packages/modal/src/ui/components/Image.js +0 -51
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader.js +0 -59
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal.js +0 -278
- package/dist/lib.cjs/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +0 -30
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginPasswordless.js +0 -150
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLogins.js +0 -153
- package/dist/lib.cjs/packages/modal/src/ui/components/WalletConnect.js +0 -84
- package/dist/lib.cjs/packages/modal/src/ui/css/web3auth.css.js +0 -8
- package/dist/lib.cjs/types/ui/components/AdapterLoader.d.ts +0 -11
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletButton.d.ts +0 -7
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletChainNamespace.d.ts +0 -9
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletConnect.d.ts +0 -9
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletDetails.d.ts +0 -10
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletHeader.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletInstall.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/ExternalWallets.d.ts +0 -15
- package/dist/lib.cjs/types/ui/components/Footer.d.ts +0 -1
- package/dist/lib.cjs/types/ui/components/Header.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/Icon.d.ts +0 -9
- package/dist/lib.cjs/types/ui/components/Loader.d.ts +0 -10
- package/dist/lib.cjs/types/ui/components/SelfCustodyViaWeb3Auth.d.ts +0 -1
- package/dist/lib.cjs/types/ui/components/SocialLoginPasswordless.d.ts +0 -14
- package/dist/lib.cjs/types/ui/components/SocialLogins.d.ts +0 -10
- package/dist/lib.cjs/types/ui/components/WalletConnect.d.ts +0 -8
- package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-dark.svg.js +0 -5
- package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-light.svg.js +0 -5
- package/dist/lib.esm/packages/modal/src/ui/assets/x-dark.svg.js +0 -5
- package/dist/lib.esm/packages/modal/src/ui/assets/x-light.svg.js +0 -5
- package/dist/lib.esm/packages/modal/src/ui/components/AdapterLoader.js +0 -106
- package/dist/lib.esm/packages/modal/src/ui/components/Button/styles.css.js +0 -6
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +0 -42
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +0 -65
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +0 -44
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +0 -44
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +0 -165
- package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallets.js +0 -281
- package/dist/lib.esm/packages/modal/src/ui/components/Footer.js +0 -18
- package/dist/lib.esm/packages/modal/src/ui/components/Header.js +0 -79
- package/dist/lib.esm/packages/modal/src/ui/components/Icon.js +0 -71
- package/dist/lib.esm/packages/modal/src/ui/components/Image.js +0 -49
- package/dist/lib.esm/packages/modal/src/ui/components/Loader.js +0 -57
- package/dist/lib.esm/packages/modal/src/ui/components/Modal.js +0 -277
- package/dist/lib.esm/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +0 -28
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginPasswordless.js +0 -148
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLogins.js +0 -152
- package/dist/lib.esm/packages/modal/src/ui/components/WalletConnect.js +0 -82
- package/dist/lib.esm/packages/modal/src/ui/css/web3auth.css.js +0 -6
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { BorderRadiusType } from "../../interfaces";
|
|
3
|
+
export interface EmbedProps {
|
|
4
|
+
children: JSX.Element[] | JSX.Element;
|
|
5
|
+
padding?: boolean;
|
|
6
|
+
shadow?: boolean;
|
|
7
|
+
border?: boolean;
|
|
8
|
+
showCloseIcon?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
borderRadius?: BorderRadiusType;
|
|
12
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface ImageProps {
|
|
2
|
+
id?: string;
|
|
2
3
|
hoverImageId?: string;
|
|
3
4
|
imageId: string;
|
|
5
|
+
imageData?: string;
|
|
4
6
|
isButton?: boolean;
|
|
5
7
|
height?: string;
|
|
6
8
|
width?: string;
|
|
@@ -9,4 +11,3 @@ export interface ImageProps {
|
|
|
9
11
|
darkImageId?: string;
|
|
10
12
|
darkHoverImageId?: string;
|
|
11
13
|
}
|
|
12
|
-
export default function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ModalStatusType } from "../../interfaces";
|
|
2
|
+
export interface LoaderProps {
|
|
3
|
+
message?: string;
|
|
4
|
+
appLogo?: string;
|
|
5
|
+
connector: string;
|
|
6
|
+
connectorName: string;
|
|
7
|
+
modalStatus: ModalStatusType;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export type ConnectingStatusType = Pick<LoaderProps, "connectorName" | "appLogo" | "connector">;
|
|
11
|
+
export type ConnectedStatusType = Pick<LoaderProps, "message">;
|
|
12
|
+
export type ErroredStatusType = Pick<LoaderProps, "message">;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { WEB3AUTH_NETWORK_TYPE } from "@web3auth/no-modal";
|
|
2
|
+
import type { ButtonRadiusType, ExternalButton, ExternalWalletEventType, LogoAlignmentType, SocialLoginEventType, SocialLoginsConfig } from "../../interfaces";
|
|
3
|
+
export interface LoginProps {
|
|
4
|
+
web3authClientId: string;
|
|
5
|
+
web3authNetwork: WEB3AUTH_NETWORK_TYPE;
|
|
6
|
+
isModalVisible: boolean;
|
|
7
|
+
isDark: boolean;
|
|
8
|
+
appLogo?: string;
|
|
9
|
+
appName?: string;
|
|
10
|
+
showPasswordLessInput: boolean;
|
|
11
|
+
showExternalWalletButton: boolean;
|
|
12
|
+
showExternalWalletCount: boolean;
|
|
13
|
+
showInstalledExternalWallets: boolean;
|
|
14
|
+
socialLoginsConfig: SocialLoginsConfig;
|
|
15
|
+
installedExternalWalletConfig: ExternalButton[];
|
|
16
|
+
areSocialLoginsVisible: boolean;
|
|
17
|
+
isEmailPrimary: boolean;
|
|
18
|
+
isExternalPrimary: boolean;
|
|
19
|
+
isEmailPasswordLessLoginVisible: boolean;
|
|
20
|
+
isSmsPasswordLessLoginVisible: boolean;
|
|
21
|
+
totalExternalWallets: number;
|
|
22
|
+
logoAlignment?: LogoAlignmentType;
|
|
23
|
+
buttonRadius?: ButtonRadiusType;
|
|
24
|
+
enableMainSocialLoginButton?: boolean;
|
|
25
|
+
handleExternalWalletBtnClick?: (flag: boolean) => void;
|
|
26
|
+
handleSocialLoginClick: (params: SocialLoginEventType) => void;
|
|
27
|
+
handleExternalWalletClick: (params: ExternalWalletEventType) => void;
|
|
28
|
+
handleSocialLoginHeight: () => void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LoginOtpProps } from "./LoginOtp.type";
|
|
2
|
+
/**
|
|
3
|
+
* LoginOtp component
|
|
4
|
+
* @param props - LoginOtpProps
|
|
5
|
+
* @returns LoginOtp component
|
|
6
|
+
*/
|
|
7
|
+
declare function LoginOtp(props: LoginOtpProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default LoginOtp;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AUTH_CONNECTION_TYPE } from "@web3auth/auth";
|
|
2
|
+
export interface LoginOtpProps {
|
|
3
|
+
otpLoading: boolean;
|
|
4
|
+
authConnection: AUTH_CONNECTION_TYPE;
|
|
5
|
+
loginHint?: string;
|
|
6
|
+
errorMessage: string;
|
|
7
|
+
setShowOtpFlow: (showOtpFlow: boolean) => void;
|
|
8
|
+
handleOtpComplete: (otp: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export type OtpInputProps = Pick<LoginOtpProps, "otpLoading" | "loginHint" | "setShowOtpFlow" | "handleOtpComplete" | "authConnection" | "errorMessage">;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonRadiusType } from "../../../interfaces";
|
|
2
|
+
export interface LoginPasswordLessProps {
|
|
3
|
+
isModalVisible: boolean;
|
|
4
|
+
isPasswordLessCtaClicked: boolean;
|
|
5
|
+
isPasswordLessLoading: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
placeholder: string;
|
|
8
|
+
errorMessage: string;
|
|
9
|
+
isDark: boolean;
|
|
10
|
+
buttonRadius?: ButtonRadiusType;
|
|
11
|
+
handleFormSubmit: (loginHint: string) => void;
|
|
12
|
+
setIsPasswordLessCtaClicked: (isPasswordLessCtaClicked: boolean) => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from "react";
|
|
2
|
+
import { BorderRadiusType } from "../../interfaces";
|
|
3
|
+
export type ModalPlacement = "center" | "top-center" | "bottom-center" | "left" | "right";
|
|
4
|
+
export interface ModalProps {
|
|
5
|
+
children: JSX.Element[] | JSX.Element;
|
|
6
|
+
open: boolean;
|
|
7
|
+
placement?: ModalPlacement;
|
|
8
|
+
padding?: boolean;
|
|
9
|
+
shadow?: boolean;
|
|
10
|
+
border?: boolean;
|
|
11
|
+
showCloseIcon?: boolean;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
borderRadius?: BorderRadiusType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export type OtpClassesType = "root" | "inputContainer" | "ctaContainer" | "resendBtnText" | "timerText" | "input" | "success" | "error" | "disabled" | "helperText";
|
|
3
|
+
export interface OtpProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "placeholder"> {
|
|
4
|
+
length: number;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
resendTimer?: number;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onComplete: (otp: string) => void;
|
|
11
|
+
onChange?: (otp: string) => void;
|
|
12
|
+
onResendTimer?: () => void;
|
|
13
|
+
resendBtnText?: string;
|
|
14
|
+
classes?: Partial<Record<OtpClassesType, string>>;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
showCta?: boolean;
|
|
17
|
+
showTimer?: boolean;
|
|
18
|
+
autoFocus?: boolean;
|
|
19
|
+
autoComplete?: HTMLInputElement["autocomplete"];
|
|
20
|
+
placeholder?: string | string[];
|
|
21
|
+
type?: "text" | "number" | "password";
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./PulseLoader";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
|
|
2
|
+
import { ModalState, SocialLoginEventType, SocialLoginsConfig, UIConfig } from "../../interfaces";
|
|
3
|
+
export interface RootProps {
|
|
4
|
+
appLogo?: string;
|
|
5
|
+
appName?: string;
|
|
6
|
+
chainNamespaces: ChainNamespaceType[];
|
|
7
|
+
walletRegistry?: WalletRegistry;
|
|
8
|
+
showPasswordLessInput: boolean;
|
|
9
|
+
showExternalWalletButton: boolean;
|
|
10
|
+
socialLoginsConfig: SocialLoginsConfig;
|
|
11
|
+
areSocialLoginsVisible: boolean;
|
|
12
|
+
isEmailPrimary: boolean;
|
|
13
|
+
isExternalPrimary: boolean;
|
|
14
|
+
showExternalWalletPage: boolean;
|
|
15
|
+
modalState: ModalState;
|
|
16
|
+
isEmailPasswordLessLoginVisible: boolean;
|
|
17
|
+
isSmsPasswordLessLoginVisible: boolean;
|
|
18
|
+
uiConfig: UIConfig;
|
|
19
|
+
handleSocialLoginClick: (params: SocialLoginEventType) => void;
|
|
20
|
+
handleExternalWalletBtnClick?: (flag: boolean) => void;
|
|
21
|
+
preHandleExternalWalletClick: (params: {
|
|
22
|
+
connector: string;
|
|
23
|
+
chainNamespace?: ChainNamespaceType;
|
|
24
|
+
}) => void;
|
|
25
|
+
setModalState: (state: ModalState) => void;
|
|
26
|
+
onCloseLoader: () => void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonRadiusType, rowType, SocialLoginEventType, SocialLoginsConfig } from "../../interfaces";
|
|
2
|
+
export interface SocialLoginListProps {
|
|
3
|
+
isDark: boolean;
|
|
4
|
+
visibleRow: rowType[];
|
|
5
|
+
canShowMore: boolean;
|
|
6
|
+
socialLoginsConfig: SocialLoginsConfig;
|
|
7
|
+
otherRow?: rowType[];
|
|
8
|
+
handleSocialLoginClick: (params: SocialLoginEventType) => void;
|
|
9
|
+
handleExpandSocialLogins: () => void;
|
|
10
|
+
buttonRadius?: ButtonRadiusType;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Toast";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SafeEventEmitter } from "@web3auth/auth";
|
|
2
2
|
import { ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
|
|
3
|
-
import { ExternalWalletEventType, SocialLoginEventType, StateEmitterEvents } from "
|
|
4
|
-
interface
|
|
3
|
+
import { ExternalWalletEventType, SocialLoginEventType, StateEmitterEvents, UIConfig } from "../../interfaces";
|
|
4
|
+
export interface WidgetProps {
|
|
5
5
|
stateListener: SafeEventEmitter<StateEmitterEvents>;
|
|
6
6
|
appLogo?: string;
|
|
7
7
|
appName?: string;
|
|
@@ -11,6 +11,5 @@ interface ModalProps {
|
|
|
11
11
|
handleExternalWalletClick: (params: ExternalWalletEventType) => void;
|
|
12
12
|
handleShowExternalWallets: (externalWalletsInitialized: boolean) => void;
|
|
13
13
|
closeModal: () => void;
|
|
14
|
+
uiConfig: UIConfig;
|
|
14
15
|
}
|
|
15
|
-
export default function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Widget";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { AUTH_CONNECTION_TYPE } from "@web3auth/auth";
|
|
1
|
+
import { AUTH_CONNECTION_TYPE, BUILD_ENV_TYPE } from "@web3auth/auth";
|
|
2
2
|
export declare function capitalizeFirstLetter(string: string): string;
|
|
3
|
+
export declare const restrictedLoginMethods: Set<AUTH_CONNECTION_TYPE>;
|
|
3
4
|
export declare const AUTH_PROVIDERS: ("google" | "telegram" | "facebook" | "reddit" | "discord" | "twitch" | "apple" | "github" | "linkedin" | "twitter" | "weibo" | "line" | "email_passwordless" | "sms_passwordless" | "kakao" | "wechat" | "farcaster" | "custom" | "passkeys" | "authenticator")[];
|
|
4
5
|
export declare const AUTH_PROVIDERS_NAMES: Record<AUTH_CONNECTION_TYPE, string>;
|
|
6
|
+
export declare const PASSWORDLESS_BUILD_ENV_MAP: Record<BUILD_ENV_TYPE, string>;
|
|
7
|
+
export declare const CAPTCHA_SITE_KEY = "d5f0c15c-eeda-4f9c-934a-d8e0348e83b2";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const PAGES: {
|
|
2
|
+
LOGIN: string;
|
|
3
|
+
SHOW_SOCIAL_LOGINS: string;
|
|
4
|
+
CONNECT_WALLET: string;
|
|
5
|
+
SELECTED_WALLET: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const CONNECT_WALLET_PAGES: {
|
|
8
|
+
CONNECT_WALLET: string;
|
|
9
|
+
SELECTED_WALLET: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg";
|
|
12
|
+
export declare const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg";
|
|
13
|
+
export declare const WALLET_CONNECT_LOGO = "https://images.web3auth.io/login-wallet-connect.svg";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { ExternalButton, ToastType } from "../interfaces";
|
|
3
|
+
export type BodyState = {
|
|
4
|
+
showWalletDetails?: boolean;
|
|
5
|
+
showMultiChainSelector?: boolean;
|
|
6
|
+
walletDetails?: ExternalButton;
|
|
7
|
+
};
|
|
8
|
+
export type ToastState = {
|
|
9
|
+
message: string;
|
|
10
|
+
type: ToastType;
|
|
11
|
+
};
|
|
12
|
+
export type RootContextType = {
|
|
13
|
+
bodyState: BodyState;
|
|
14
|
+
setBodyState: Dispatch<SetStateAction<BodyState>>;
|
|
15
|
+
toast: ToastState;
|
|
16
|
+
setToast: Dispatch<SetStateAction<ToastState>>;
|
|
17
|
+
};
|
|
18
|
+
export declare const RootContext: import("react").Context<RootContextType>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CodeInitiateRequestBodyParams, CodeVerifyRequestBodyParams, IStartResponse, IVerifyResponse, PasswordlessHandlerParams, WhiteLabelParams } from "../interfaces";
|
|
2
|
+
export declare abstract class PasswordlessHandler {
|
|
3
|
+
readonly authBaseApiUrl: string;
|
|
4
|
+
passwordlessParams: PasswordlessHandlerParams;
|
|
5
|
+
trackingIdentifier?: string;
|
|
6
|
+
constructor(params: PasswordlessHandlerParams);
|
|
7
|
+
get name(): string;
|
|
8
|
+
get connection(): "email" | "sms";
|
|
9
|
+
get trackingId(): string | undefined;
|
|
10
|
+
get sessionStorageAvailable(): boolean;
|
|
11
|
+
get whiteLabelParams(): WhiteLabelParams;
|
|
12
|
+
set trackingId(value: string | undefined);
|
|
13
|
+
protected start(params: CodeInitiateRequestBodyParams): Promise<IStartResponse>;
|
|
14
|
+
protected verify(params: CodeVerifyRequestBodyParams): Promise<IVerifyResponse>;
|
|
15
|
+
private handleError;
|
|
16
|
+
abstract sendVerificationCode(params?: {
|
|
17
|
+
captchaToken: string;
|
|
18
|
+
}): Promise<IStartResponse>;
|
|
19
|
+
abstract verifyCode(code: string): Promise<IVerifyResponse>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PasswordlessHandlerParams } from "../interfaces";
|
|
2
|
+
import { PasswordlessHandler } from "./AbstractHandler";
|
|
3
|
+
export default class EmailPasswordlessHandler extends PasswordlessHandler {
|
|
4
|
+
mailSent: boolean;
|
|
5
|
+
constructor(params: PasswordlessHandlerParams);
|
|
6
|
+
sendVerificationCode(): Promise<import("..").IStartResponse>;
|
|
7
|
+
verifyCode(code: string): Promise<import("..").IVerifyResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PasswordlessHandlerParams } from "../interfaces";
|
|
2
|
+
import { PasswordlessHandler } from "./AbstractHandler";
|
|
3
|
+
export default class SmsPasswordlessHandler extends PasswordlessHandler {
|
|
4
|
+
constructor(params: PasswordlessHandlerParams);
|
|
5
|
+
sendVerificationCode(params?: {
|
|
6
|
+
captchaToken: string;
|
|
7
|
+
}): Promise<import("..").IStartResponse>;
|
|
8
|
+
verifyCode(code: string): Promise<import("..").IVerifyResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AUTH_CONNECTION_TYPE } from "@web3auth/auth";
|
|
2
|
+
import type { PasswordlessHandlerParams } from "../interfaces";
|
|
3
|
+
import EmailPasswordlessHandler from "./EmailPasswordlessHandler";
|
|
4
|
+
import SmsPasswordlessHandler from "./SmsPasswordlessHandler";
|
|
5
|
+
export declare const createPasswordlessHandler: (authConnection: AUTH_CONNECTION_TYPE, params: PasswordlessHandlerParams) => EmailPasswordlessHandler | SmsPasswordlessHandler;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { SafeEventEmitter } from "@web3auth/auth";
|
|
2
|
-
import { type AuthLoginParams, type BaseConnectorConfig, type ChainNamespaceType, type LoginMethodConfig, type UIConfig as CoreUIConfig, type WALLET_CONNECTOR_TYPE, type WalletRegistry, type WalletRegistryItem, type Web3AuthNoModalEvents } from "@web3auth/no-modal";
|
|
3
|
-
export interface UIConfig extends CoreUIConfig {
|
|
1
|
+
import type { AUTH_CONNECTION_TYPE, EMAIL_FLOW_TYPE, ExtraLoginOptions, LANGUAGES, SafeEventEmitter, THEME_MODE_TYPE, WEB3AUTH_NETWORK_TYPE } from "@web3auth/auth";
|
|
2
|
+
import { type AuthLoginParams, type BaseConnectorConfig, type ChainNamespaceType, type LoginMethodConfig, type LoginModalConfig, type UIConfig as CoreUIConfig, type WALLET_CONNECTOR_TYPE, type WalletRegistry, type WalletRegistryItem, type Web3AuthNoModalEvents } from "@web3auth/no-modal";
|
|
3
|
+
export interface UIConfig extends CoreUIConfig, LoginModalConfig {
|
|
4
|
+
/**
|
|
5
|
+
* ID of the element to embed the widget into
|
|
6
|
+
*/
|
|
7
|
+
targetId?: string;
|
|
4
8
|
/**
|
|
5
9
|
* order of how login methods are shown
|
|
6
10
|
*
|
|
@@ -40,12 +44,26 @@ export type ModalLoginParams = Pick<AuthLoginParams, "authConnection" | "authCon
|
|
|
40
44
|
export interface LoginModalProps extends UIConfig {
|
|
41
45
|
chainNamespaces: ChainNamespaceType[];
|
|
42
46
|
walletRegistry: WalletRegistry;
|
|
47
|
+
web3authClientId: string;
|
|
48
|
+
web3authNetwork: WEB3AUTH_NETWORK_TYPE;
|
|
49
|
+
}
|
|
50
|
+
export interface LoginModalCallbacks {
|
|
51
|
+
onInitExternalWallets: (params: {
|
|
52
|
+
externalWalletsInitialized: boolean;
|
|
53
|
+
}) => Promise<void>;
|
|
54
|
+
onSocialLogin: (params: {
|
|
55
|
+
connector: WALLET_CONNECTOR_TYPE;
|
|
56
|
+
loginParams: ModalLoginParams;
|
|
57
|
+
}) => Promise<void>;
|
|
58
|
+
onExternalWalletLogin: (params: {
|
|
59
|
+
connector: WALLET_CONNECTOR_TYPE;
|
|
60
|
+
loginParams: {
|
|
61
|
+
chainNamespace: ChainNamespaceType;
|
|
62
|
+
};
|
|
63
|
+
}) => Promise<void>;
|
|
64
|
+
onModalVisibility: (visibility: boolean) => Promise<void>;
|
|
43
65
|
}
|
|
44
66
|
export declare const LOGIN_MODAL_EVENTS: {
|
|
45
|
-
readonly INIT_EXTERNAL_WALLETS: "INIT_EXTERNAL_WALLETS";
|
|
46
|
-
readonly EXTERNAL_WALLET_LOGIN: "EXTERNAL_WALLET_LOGIN";
|
|
47
|
-
readonly SOCIAL_LOGIN: "SOCIAL_LOGIN";
|
|
48
|
-
readonly DISCONNECT: "DISCONNECT";
|
|
49
67
|
readonly MODAL_VISIBILITY: "MODAL_VISIBILITY";
|
|
50
68
|
};
|
|
51
69
|
export type SocialLoginsConfig = {
|
|
@@ -55,10 +73,10 @@ export type SocialLoginsConfig = {
|
|
|
55
73
|
uiConfig: Omit<UIConfig, "connectorListener">;
|
|
56
74
|
};
|
|
57
75
|
export declare const MODAL_STATUS: {
|
|
58
|
-
INITIALIZED:
|
|
59
|
-
CONNECTED:
|
|
60
|
-
CONNECTING:
|
|
61
|
-
ERRORED:
|
|
76
|
+
readonly INITIALIZED: "initialized";
|
|
77
|
+
readonly CONNECTED: "connected";
|
|
78
|
+
readonly CONNECTING: "connecting";
|
|
79
|
+
readonly ERRORED: "errored";
|
|
62
80
|
};
|
|
63
81
|
export type ModalStatusType = (typeof MODAL_STATUS)[keyof typeof MODAL_STATUS];
|
|
64
82
|
export interface ModalState {
|
|
@@ -75,6 +93,9 @@ export interface ModalState {
|
|
|
75
93
|
detailedLoaderConnector: string;
|
|
76
94
|
detailedLoaderConnectorName: string;
|
|
77
95
|
showExternalWalletsOnly: boolean;
|
|
96
|
+
currentPage?: string;
|
|
97
|
+
web3authClientId: string;
|
|
98
|
+
web3authNetwork: WEB3AUTH_NETWORK_TYPE;
|
|
78
99
|
}
|
|
79
100
|
export type SocialLoginEventType = {
|
|
80
101
|
connector: string;
|
|
@@ -84,9 +105,6 @@ export type ExternalWalletEventType = {
|
|
|
84
105
|
connector: string;
|
|
85
106
|
chainNamespace?: ChainNamespaceType;
|
|
86
107
|
};
|
|
87
|
-
export declare const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg";
|
|
88
|
-
export declare const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg";
|
|
89
|
-
export declare const WALLET_CONNECT_LOGO = "https://images.web3auth.io/login-wallet-connect.svg";
|
|
90
108
|
export type StateEmitterEvents = {
|
|
91
109
|
STATE_UPDATED: (state: Partial<ModalState>) => void;
|
|
92
110
|
MOUNTED: () => void;
|
|
@@ -95,6 +113,7 @@ export type ExternalButton = {
|
|
|
95
113
|
name: string;
|
|
96
114
|
displayName?: string;
|
|
97
115
|
href?: string;
|
|
116
|
+
icon?: string;
|
|
98
117
|
hasInjectedWallet: boolean;
|
|
99
118
|
hasWalletConnect: boolean;
|
|
100
119
|
hasInstallLinks: boolean;
|
|
@@ -102,3 +121,85 @@ export type ExternalButton = {
|
|
|
102
121
|
imgExtension?: string;
|
|
103
122
|
chainNamespaces?: ChainNamespaceType[];
|
|
104
123
|
};
|
|
124
|
+
export type os = "iOS" | "Android";
|
|
125
|
+
export type platform = "mobile" | "desktop" | "tablet";
|
|
126
|
+
export type browser = "chrome" | "firefox" | "edge" | "safari" | "brave";
|
|
127
|
+
export type mobileOs = "ios" | "android";
|
|
128
|
+
export type rowType = {
|
|
129
|
+
method: string;
|
|
130
|
+
isDark: boolean;
|
|
131
|
+
isPrimaryBtn: boolean;
|
|
132
|
+
name: string;
|
|
133
|
+
connector: SocialLoginsConfig["connector"];
|
|
134
|
+
loginParams: {
|
|
135
|
+
authConnection: AUTH_CONNECTION_TYPE;
|
|
136
|
+
name: string;
|
|
137
|
+
login_hint: string;
|
|
138
|
+
authConnectionId?: string;
|
|
139
|
+
groupedAuthConnectionId?: string;
|
|
140
|
+
extraLoginOptions?: ExtraLoginOptions;
|
|
141
|
+
};
|
|
142
|
+
order: number;
|
|
143
|
+
isMainOption: boolean;
|
|
144
|
+
};
|
|
145
|
+
export type PasswordlessHandlerParams = {
|
|
146
|
+
authConnection: AUTH_CONNECTION_TYPE;
|
|
147
|
+
web3authClientId: string;
|
|
148
|
+
loginHint: string;
|
|
149
|
+
network: string;
|
|
150
|
+
uiConfig?: Omit<UIConfig, "connectorListener">;
|
|
151
|
+
};
|
|
152
|
+
export interface WhiteLabelParams {
|
|
153
|
+
name?: string;
|
|
154
|
+
url?: string;
|
|
155
|
+
language?: keyof typeof LANGUAGES;
|
|
156
|
+
theme?: Record<string, string>;
|
|
157
|
+
logo?: string;
|
|
158
|
+
mode?: THEME_MODE_TYPE;
|
|
159
|
+
}
|
|
160
|
+
export interface CodeInitiateRequestBodyParams {
|
|
161
|
+
client_id: string;
|
|
162
|
+
connection: "email" | "sms";
|
|
163
|
+
login_hint: string;
|
|
164
|
+
web3auth_client_id: string;
|
|
165
|
+
tracking_id?: string;
|
|
166
|
+
whitelabel?: WhiteLabelParams;
|
|
167
|
+
version?: string;
|
|
168
|
+
network?: string;
|
|
169
|
+
flow_type?: EMAIL_FLOW_TYPE;
|
|
170
|
+
captcha_token?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface CodeVerifyRequestBodyParams {
|
|
173
|
+
client_id: string;
|
|
174
|
+
login_hint: string;
|
|
175
|
+
code: string;
|
|
176
|
+
connection: "email" | "sms";
|
|
177
|
+
tracking_id: string;
|
|
178
|
+
version?: string;
|
|
179
|
+
network?: string;
|
|
180
|
+
flow_type?: EMAIL_FLOW_TYPE;
|
|
181
|
+
}
|
|
182
|
+
export type IStartResponse = {
|
|
183
|
+
success?: boolean;
|
|
184
|
+
error?: string;
|
|
185
|
+
data?: {
|
|
186
|
+
trackingId: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
export type IVerifyResponse = {
|
|
190
|
+
success?: boolean;
|
|
191
|
+
error?: string;
|
|
192
|
+
data?: {
|
|
193
|
+
id_token: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
export type LogoAlignmentType = UIConfig["logoAlignment"];
|
|
197
|
+
export type BorderRadiusType = UIConfig["borderRadiusType"];
|
|
198
|
+
export type ButtonRadiusType = UIConfig["buttonRadiusType"];
|
|
199
|
+
export declare enum TOAST_TYPE {
|
|
200
|
+
SUCCESS = "success",
|
|
201
|
+
ERROR = "error",
|
|
202
|
+
WARNING = "warning",
|
|
203
|
+
INFO = "info"
|
|
204
|
+
}
|
|
205
|
+
export type ToastType = (typeof TOAST_TYPE)[keyof typeof TOAST_TYPE];
|