@dynamic-labs/sdk-react-core 2.0.0-alpha.2 → 2.0.0-alpha.21
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/CHANGELOG.md +236 -0
- package/package.cjs +6 -5
- package/package.js +6 -5
- package/package.json +18 -15
- package/src/index.cjs +78 -62
- package/src/index.d.ts +3 -4
- package/src/index.js +47 -34
- package/src/lib/Main.cjs +29 -19
- package/src/lib/Main.js +30 -20
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +18 -13
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +18 -13
- package/src/lib/components/Alert/Alert.cjs +1 -1
- package/src/lib/components/Alert/Alert.js +1 -1
- package/src/lib/components/Alert/Alert.types.d.ts +1 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +18 -13
- package/src/lib/components/AnimatePresence/AnimatePresence.js +18 -13
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +24 -15
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +24 -15
- package/src/lib/components/Captcha/Captcha.cjs +17 -12
- package/src/lib/components/Captcha/Captcha.js +17 -12
- package/src/lib/components/ChainIcon/ChainIcon.cjs +26 -0
- package/src/lib/components/ChainIcon/ChainIcon.d.ts +8 -0
- package/src/lib/components/ChainIcon/ChainIcon.js +22 -0
- package/src/lib/components/ChainIcon/index.d.ts +1 -0
- package/src/lib/components/Checkbox/Checkbox.cjs +0 -1
- package/src/lib/components/Checkbox/Checkbox.js +0 -1
- package/src/lib/components/Divider/Divider.cjs +19 -14
- package/src/lib/components/Divider/Divider.js +19 -14
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +18 -13
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +18 -13
- package/src/lib/components/EmailIcon/EmailIcon.cjs +14 -0
- package/src/lib/components/EmailIcon/EmailIcon.d.ts +2 -0
- package/src/lib/components/EmailIcon/EmailIcon.js +10 -0
- package/src/lib/components/EmailIcon/index.d.ts +1 -0
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +1 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.js +1 -2
- package/src/lib/components/HardwareWalletToggle/HardwareWalletToggle.cjs +0 -1
- package/src/lib/components/HardwareWalletToggle/HardwareWalletToggle.js +0 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +3 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +3 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +3 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +3 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +3 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +3 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +3 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +3 -1
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.cjs +90 -0
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.d.ts +10 -0
- package/src/lib/components/InlineSubmitButton/InlineSubmitButton.js +86 -0
- package/src/lib/components/InlineSubmitButton/index.d.ts +1 -0
- package/src/lib/components/Input/Input.cjs +9 -6
- package/src/lib/components/Input/Input.d.ts +13 -2
- package/src/lib/components/Input/Input.js +9 -6
- package/src/lib/components/Input/Input.types.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +18 -13
- package/src/lib/components/LogoutButton/LogoutButton.js +18 -13
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +18 -13
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +18 -13
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +2 -3
- package/src/lib/components/MenuList/MenuList/MenuList.js +2 -3
- package/src/lib/components/MenuList/index.d.ts +1 -0
- package/src/lib/components/MockedQrCode/MockedQrCode.cjs +66 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.js +66 -1
- package/src/lib/components/Modal/Modal.cjs +18 -13
- package/src/lib/components/Modal/Modal.js +18 -13
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +18 -13
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +18 -13
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +29 -25
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +29 -25
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +20 -15
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +20 -15
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +19 -14
- package/src/lib/components/NetworkPicker/components/Network/Network.js +19 -14
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +7 -1
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +7 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +71 -1
- package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +72 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +24 -15
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +25 -16
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +0 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +0 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +13 -20
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +9 -4
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +13 -20
- package/src/lib/components/OverlayCard/OverlayCard.cjs +39 -28
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +2 -3
- package/src/lib/components/OverlayCard/OverlayCard.js +40 -29
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs +46 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.d.ts +17 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/OverlayCardTarget.js +40 -0
- package/src/lib/components/OverlayCard/OverlayCardTarget/index.d.ts +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +17 -12
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +17 -12
- package/src/lib/components/PhoneIcon/PhoneIcon.cjs +14 -0
- package/src/lib/components/PhoneIcon/PhoneIcon.d.ts +2 -0
- package/src/lib/components/PhoneIcon/PhoneIcon.js +10 -0
- package/src/lib/components/PhoneIcon/index.d.ts +1 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +115 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.d.ts +15 -0
- package/src/lib/components/PhoneNumberField/PhoneNumberField.js +111 -0
- package/src/lib/components/PhoneNumberField/getCustomCountries/getCustomCountries.cjs +23 -0
- package/src/lib/components/PhoneNumberField/getCustomCountries/getCustomCountries.d.ts +4 -0
- package/src/lib/components/PhoneNumberField/getCustomCountries/getCustomCountries.js +18 -0
- package/src/lib/components/PhoneNumberField/getCustomCountries/index.d.ts +1 -0
- package/src/lib/components/PhoneNumberField/index.d.ts +1 -0
- package/src/lib/components/PhoneNumberField/usePhoneInputLogic/index.d.ts +1 -0
- package/src/lib/components/PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.cjs +216 -0
- package/src/lib/components/PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.d.ts +35 -0
- package/src/lib/components/PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.js +211 -0
- package/src/lib/components/Portal/Portal.cjs +20 -13
- package/src/lib/components/Portal/Portal.js +20 -13
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +18 -13
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +18 -13
- package/src/lib/{views/QrCodeView → components/QRCode}/QRCode.cjs +30 -25
- package/src/lib/{views/QrCodeView → components/QRCode}/QRCode.js +30 -25
- package/src/lib/components/QRCode/index.d.ts +1 -0
- package/src/lib/{views/QrCodeView → components/QrCodeWrapper}/QrCodeContainer/QrCodeContainer.cjs +41 -31
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.d.ts +14 -0
- package/src/lib/{views/QrCodeView → components/QrCodeWrapper}/QrCodeContainer/QrCodeContainer.js +41 -31
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +88 -0
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.d.ts +11 -0
- package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +84 -0
- package/src/lib/components/QrCodeWrapper/index.d.ts +1 -0
- package/src/lib/components/RenderView/RenderView.cjs +19 -14
- package/src/lib/components/RenderView/RenderView.js +19 -14
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +21 -16
- package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +21 -16
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.cjs +106 -0
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.d.ts +2 -0
- package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.js +102 -0
- package/src/lib/components/SandboxIndicatorWrapper/index.d.ts +1 -0
- package/src/lib/components/{SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs → SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs} +20 -15
- package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.d.ts +6 -0
- package/src/lib/components/{SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js → SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js} +20 -15
- package/src/lib/components/SecureEmbeddedWalletCard/index.d.ts +1 -0
- package/src/lib/components/Select/Select.cjs +0 -1
- package/src/lib/components/Select/Select.js +0 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +10 -15
- package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +2 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +10 -15
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +81 -12
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +3 -6
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +81 -12
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -2
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +20 -13
- package/src/lib/components/ShadowDOM/ShadowDOM.js +20 -14
- package/src/lib/components/ShadowDOM/utils.cjs +0 -1
- package/src/lib/components/ShadowDOM/utils.js +0 -1
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.cjs +0 -1
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.js +0 -1
- package/src/lib/components/Skeleton/Skeleton.cjs +2 -2
- package/src/lib/components/Skeleton/Skeleton.d.ts +2 -1
- package/src/lib/components/Skeleton/Skeleton.js +2 -2
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +22 -17
- package/src/lib/components/SocialSignIn/SocialSignIn.js +22 -17
- package/src/lib/components/Spinner/spinner.cjs +0 -1
- package/src/lib/components/Spinner/spinner.js +0 -1
- package/src/lib/components/Step/Step.cjs +0 -1
- package/src/lib/components/Step/Step.js +0 -1
- package/src/lib/components/{SyncPasskeyFlow/SyncPasskeyFlow.cjs → SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.cjs} +45 -24
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.d.ts +1 -0
- package/src/lib/components/{SyncPasskeyFlow/SyncPasskeyFlow.js → SyncEmbeddedWalletAuthFlow/SyncEmbeddedWalletAuthFlow.js} +46 -25
- package/src/lib/components/SyncEmbeddedWalletAuthFlow/index.d.ts +1 -0
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +95 -0
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.d.ts +8 -0
- package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +91 -0
- package/src/lib/components/ToggleVisibilityButton/index.d.ts +1 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +21 -16
- package/src/lib/components/Toolkit/Toolkit.js +21 -16
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +19 -14
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +19 -14
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +21 -18
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +21 -18
- package/src/lib/components/Tooltip/Tooltip.cjs +18 -13
- package/src/lib/components/Tooltip/Tooltip.js +18 -13
- package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -13
- package/src/lib/components/TosAndPp/TosAndPp.js +18 -13
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +17 -12
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +17 -12
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +18 -13
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +18 -13
- package/src/lib/components/Transition/OpacityTransition/OpacityTransition.cjs +2 -2
- package/src/lib/components/Transition/OpacityTransition/OpacityTransition.js +2 -2
- package/src/lib/components/Transition/SlideInUpTransition/SlideInUpTransition.cjs +2 -2
- package/src/lib/components/Transition/SlideInUpTransition/SlideInUpTransition.js +2 -2
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +18 -13
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +18 -13
- package/src/lib/components/Transition/ZoomTransition/ZoomTransition.cjs +2 -2
- package/src/lib/components/Transition/ZoomTransition/ZoomTransition.js +2 -2
- package/src/lib/components/Typography/Typography.cjs +2 -2
- package/src/lib/components/Typography/Typography.js +2 -2
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +20 -15
- package/src/lib/components/UserAddress/UserAddress.js +20 -15
- package/src/lib/components/UserProfile/UserProfile.cjs +34 -16
- package/src/lib/components/UserProfile/UserProfile.js +34 -16
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +37 -17
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +37 -17
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedUserFieldIcon/VerifiedUserFieldIcon.cjs +26 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedUserFieldIcon/VerifiedUserFieldIcon.d.ts +9 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedUserFieldIcon/VerifiedUserFieldIcon.js +22 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/components/index.d.ts +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +19 -14
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +19 -14
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +22 -15
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +22 -15
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +26 -21
- package/src/lib/components/UserProfileForm/UserProfileForm.d.ts +1 -1
- package/src/lib/components/UserProfileForm/UserProfileForm.js +25 -20
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +0 -1
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +0 -1
- package/src/lib/components/index.d.ts +15 -5
- package/src/lib/context/CaptchaContext/CaptchaContext.d.ts +1 -1
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.cjs +18 -13
- package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.js +18 -13
- package/src/lib/context/DynamicContext/DynamicContext.cjs +46 -62
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +4 -5
- package/src/lib/context/DynamicContext/DynamicContext.js +47 -63
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.cjs +1 -5
- package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.js +1 -5
- package/src/lib/context/DynamicContext/helpers/helpers.cjs +10 -1
- package/src/lib/context/DynamicContext/helpers/helpers.d.ts +5 -0
- package/src/lib/context/DynamicContext/helpers/helpers.js +10 -2
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +3 -20
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +4 -21
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.types.d.ts +1 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +3 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/types.d.ts +0 -2
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +24 -16
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +24 -16
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +0 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +0 -1
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.cjs +5 -5
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.d.ts +8 -6
- package/src/lib/context/DynamicContext/hooks/useShowAuthFlow/useShowAuthFlow.js +5 -5
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +24 -18
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +24 -18
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +0 -1
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +0 -1
- package/src/lib/context/DynamicContext/types/index.d.ts +18 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +2 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +12 -17
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +12 -17
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +1 -3
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +1 -3
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +18 -13
- package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +18 -13
- package/src/lib/context/DynamicContext/validators/validators.cjs +0 -1
- package/src/lib/context/DynamicContext/validators/validators.js +0 -1
- package/src/lib/context/ErrorContext/ErrorContext.cjs +7 -0
- package/src/lib/context/ErrorContext/ErrorContext.d.ts +1 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +7 -0
- package/src/lib/context/FieldsStateContext/FieldsStateContext.cjs +23 -0
- package/src/lib/context/FieldsStateContext/FieldsStateContext.d.ts +12 -0
- package/src/lib/context/FieldsStateContext/FieldsStateContext.js +17 -0
- package/src/lib/context/FieldsStateContext/index.d.ts +1 -0
- package/src/lib/context/FundingContext/FundingContext.cjs +20 -13
- package/src/lib/context/FundingContext/FundingContext.js +20 -13
- package/src/lib/context/LoadingContext/LoadingContext.cjs +17 -12
- package/src/lib/context/LoadingContext/LoadingContext.js +17 -12
- package/src/lib/context/MockContext/MockContext.cjs +16 -10
- package/src/lib/context/MockContext/MockContext.js +16 -10
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +26 -17
- package/src/lib/context/PasskeyContext/PasskeyContext.js +26 -17
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +28 -17
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +28 -17
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +37 -16
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.d.ts +1 -0
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +37 -16
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +27 -19
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +28 -20
- package/src/lib/context/SendBalanceContext/SendBalanceContext.types.d.ts +1 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +19 -14
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +19 -14
- package/src/lib/context/ThemeContext/themesData.cjs +0 -1
- package/src/lib/context/ThemeContext/themesData.js +0 -1
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +18 -13
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +18 -13
- package/src/lib/context/VerificationContext/VerificationContext.cjs +34 -0
- package/src/lib/context/VerificationContext/VerificationContext.d.ts +35 -0
- package/src/lib/context/VerificationContext/VerificationContext.js +28 -0
- package/src/lib/context/VerificationContext/index.d.ts +1 -0
- package/src/lib/context/ViewContext/ViewContext.cjs +7 -0
- package/src/lib/context/ViewContext/ViewContext.js +7 -0
- package/src/lib/context/ViewContext/types/index.d.ts +5 -3
- package/src/lib/context/WalletContext/WalletContext.cjs +30 -14
- package/src/lib/context/WalletContext/WalletContext.d.ts +8 -3
- package/src/lib/context/WalletContext/WalletContext.js +31 -16
- package/src/lib/data/api.cjs +168 -3
- package/src/lib/data/api.d.ts +53 -2
- package/src/lib/data/api.js +162 -6
- package/src/lib/events/dynamicEvents.d.ts +14 -3
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +18 -14
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +18 -14
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +33 -17
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +33 -17
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +18 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +18 -13
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +19 -14
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +19 -14
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +20 -15
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +20 -15
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +23 -18
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +23 -18
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +19 -14
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +19 -14
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +21 -16
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +21 -16
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +19 -14
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +19 -14
- package/src/lib/locale/en/translation.cjs +322 -28
- package/src/lib/locale/en/translation.d.ts +318 -24
- package/src/lib/locale/en/translation.js +322 -28
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.cjs +82 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.d.ts +3 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.js +78 -0
- package/src/lib/modals/ConfirmationModal/ConfirmationModal.types.d.ts +8 -0
- package/src/lib/modals/ConfirmationModal/index.d.ts +1 -0
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.cjs +88 -0
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.d.ts +3 -0
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.js +84 -0
- package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.types.d.ts +5 -0
- package/src/lib/modals/CreatePasswordModal/index.d.ts +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +20 -14
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +20 -14
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.cjs +88 -0
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.d.ts +3 -0
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.js +84 -0
- package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.types.d.ts +6 -0
- package/src/lib/modals/EnterPasswordModal/index.d.ts +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +24 -19
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.d.ts +1 -2
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +24 -19
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +21 -16
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +21 -16
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +22 -26
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +22 -26
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +3 -5
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +18 -13
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +18 -13
- package/src/lib/modals/index.d.ts +3 -0
- package/src/lib/shared/assets/chevron-down.cjs +53 -0
- package/src/lib/shared/assets/chevron-down.js +29 -0
- package/src/lib/shared/assets/download.cjs +53 -0
- package/src/lib/shared/assets/download.js +29 -0
- package/src/lib/shared/assets/index.d.ts +19 -13
- package/src/lib/shared/assets/password-hero.cjs +53 -0
- package/src/lib/shared/assets/password-hero.js +29 -0
- package/src/lib/shared/assets/save-password-hero.cjs +127 -0
- package/src/lib/shared/assets/save-password-hero.js +103 -0
- package/src/lib/shared/assets/sign-in-with-phone.cjs +53 -0
- package/src/lib/shared/assets/sign-in-with-phone.js +29 -0
- package/src/lib/shared/assets/wallet-claim-hero.cjs +127 -0
- package/src/lib/shared/assets/wallet-claim-hero.js +103 -0
- package/src/lib/shared/types/connectionAndSignature.d.ts +15 -0
- package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +48 -0
- package/src/lib/shared/types/embeddedWallets.d.ts +6 -0
- package/src/lib/shared/types/general.d.ts +5 -0
- package/src/lib/shared/types/index.d.ts +8 -220
- package/src/lib/shared/types/localStorage.d.ts +18 -0
- package/src/lib/shared/types/ui.d.ts +14 -0
- package/src/lib/shared/types/user.d.ts +15 -0
- package/src/lib/shared/types/wallets.d.ts +85 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.cjs +14 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.d.ts +1 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.js +10 -0
- package/src/lib/shared/utils/functions/generateRandomPassword/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/index.d.ts +2 -3
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.cjs +3 -0
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.d.ts +1 -1
- package/src/lib/shared/utils/functions/providerLabel/providerLabel.js +3 -0
- package/src/lib/shared/utils/functions/validatePassword/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.cjs +59 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.d.ts +13 -0
- package/src/lib/shared/utils/functions/validatePassword/validatePassword.js +55 -0
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs +10 -28
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.d.ts +1 -5
- package/src/lib/shared/utils/hooks/useGlobalLoading/useGlobalLoading.js +10 -28
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.cjs +1 -0
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.d.ts +1 -1
- package/src/lib/shared/utils/hooks/useThrottle/useThrottle.js +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/fields.cjs +7 -0
- package/src/lib/utils/constants/fields.d.ts +1 -0
- package/src/lib/utils/constants/fields.js +3 -0
- package/src/lib/utils/constants/index.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.cjs +2 -0
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +2 -1
- package/src/lib/utils/constants/values.d.ts +1 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.cjs +7 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.d.ts +2 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.js +3 -0
- package/src/lib/utils/functions/findCoinbaseMPCWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.cjs +6 -3
- package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.d.ts +1 -1
- package/src/lib/utils/functions/findEmbeddedWalletFromVerifiedCredentials/findEmbeddedWalletFromVerifiedCredentials.js +6 -3
- package/src/lib/utils/functions/formatPhone/formatPhone.cjs +28 -0
- package/src/lib/utils/functions/formatPhone/formatPhone.d.ts +5 -0
- package/src/lib/utils/functions/formatPhone/formatPhone.js +24 -0
- package/src/lib/utils/functions/formatPhone/index.d.ts +1 -0
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +0 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +0 -1
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.cjs +32 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.d.ts +10 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.js +28 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/index.d.ts +1 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.cjs +38 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.d.ts +3 -0
- package/src/lib/utils/functions/getEOAWallet/getEOAWallet.js +34 -0
- package/src/lib/utils/functions/getEOAWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.cjs +38 -0
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.d.ts +2 -0
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/getEnabledEmbeddedWalletProviders.js +34 -0
- package/src/lib/utils/functions/getEnabledEmbeddedWalletProviders/index.d.ts +1 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +0 -1
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +0 -1
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.cjs +44 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.d.ts +6 -0
- package/src/lib/utils/functions/getUserIdentifier/getUserIdentifier.js +40 -0
- package/src/lib/utils/functions/getUserIdentifier/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.cjs +25 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.d.ts +9 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/getUserVerifiedCredentialType.js +21 -0
- package/src/lib/utils/functions/getUserVerifiedCredentialType/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserWalletsFromVerifiedCredentials/getUserWalletsFromVerifiedCredentials.cjs +0 -1
- package/src/lib/utils/functions/getUserWalletsFromVerifiedCredentials/getUserWalletsFromVerifiedCredentials.js +0 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +2 -2
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +8 -17
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.d.ts +1 -2
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +8 -17
- package/src/lib/utils/functions/index.d.ts +16 -0
- package/src/lib/utils/functions/isAllowedToLinkWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.cjs +37 -0
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.d.ts +2 -0
- package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.js +33 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.cjs +13 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.js +9 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +5 -4
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.d.ts +1 -1
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +5 -4
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.cjs +28 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isPhoneNumberProviderEnabled/isPhoneNumberProviderEnabled.js +24 -0
- package/src/lib/utils/functions/mergeNetworks/index.d.ts +1 -0
- package/src/lib/utils/functions/mergeNetworks/mergeNetworks.cjs +26 -0
- package/src/lib/utils/functions/mergeNetworks/mergeNetworks.d.ts +13 -0
- package/src/lib/utils/functions/mergeNetworks/mergeNetworks.js +22 -0
- package/src/lib/utils/functions/modulo/index.d.ts +1 -0
- package/src/lib/utils/functions/modulo/modulo.cjs +8 -0
- package/src/lib/utils/functions/modulo/modulo.d.ts +2 -0
- package/src/lib/utils/functions/modulo/modulo.js +4 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.cjs +0 -1
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +0 -1
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/index.d.ts +1 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.cjs +15 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.d.ts +2 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.js +11 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/index.d.ts +1 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +35 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.d.ts +2 -0
- package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +31 -0
- package/src/lib/utils/functions/storeAuthToken/index.cjs +0 -1
- package/src/lib/utils/functions/storeAuthToken/index.js +0 -1
- package/src/lib/utils/functions/updateJWTAndCreateUserProfile/index.d.ts +1 -0
- package/src/lib/utils/functions/updateJWTAndCreateUserProfile/updateJWTAndCreateUserProfile.cjs +19 -0
- package/src/lib/utils/functions/updateJWTAndCreateUserProfile/updateJWTAndCreateUserProfile.d.ts +1 -0
- package/src/lib/utils/functions/updateJWTAndCreateUserProfile/updateJWTAndCreateUserProfile.js +15 -0
- package/src/lib/utils/functions/validatePhoneLength/index.d.ts +1 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.cjs +15 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.d.ts +3 -0
- package/src/lib/utils/functions/validatePhoneLength/validatePhoneLength.js +11 -0
- package/src/lib/utils/hooks/authenticationHooks/index.d.ts +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +25 -18
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +25 -18
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +25 -19
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.d.ts +4 -4
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +25 -19
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/index.d.ts +1 -0
- package/src/lib/utils/hooks/authenticationHooks/{useEmailVerificationRequest/useEmailVerificationRequest.cjs → useOtpVerificationRequest/useOtpVerificationRequest.cjs} +58 -34
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.d.ts +7 -0
- package/src/lib/utils/hooks/authenticationHooks/{useEmailVerificationRequest/useEmailVerificationRequest.js → useOtpVerificationRequest/useOtpVerificationRequest.js} +59 -35
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +21 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.d.ts +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +21 -16
- package/src/lib/utils/hooks/index.d.ts +6 -2
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +3 -14
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +1 -2
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +3 -14
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +22 -21
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +22 -21
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +17 -12
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +17 -12
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +29 -16
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +29 -16
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +18 -13
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +18 -13
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +0 -1
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +0 -1
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +0 -1
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +0 -1
- package/src/lib/utils/hooks/useConfirmationPortal/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConfirmationPortal/useConfirmationPortal.cjs +59 -0
- package/src/lib/utils/hooks/useConfirmationPortal/useConfirmationPortal.d.ts +13 -0
- package/src/lib/utils/hooks/useConfirmationPortal/useConfirmationPortal.js +55 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +5 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +5 -4
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +18 -13
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +18 -13
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +18 -13
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +18 -13
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +22 -22
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +22 -22
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +27 -23
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +27 -23
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +16 -4
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +16 -4
- package/src/lib/utils/hooks/useDynamicModals/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +112 -0
- package/src/lib/{context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.d.ts → utils/hooks/useDynamicModals/useDynamicModals.d.ts} +4 -7
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +108 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +18 -13
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +18 -13
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +21 -15
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +21 -15
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +51 -21
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +51 -21
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +215 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +5 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +211 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +80 -22
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +2 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +80 -22
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.cjs +29 -26
- package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.js +29 -26
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +131 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.d.ts +4 -0
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +127 -0
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +15 -21
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +16 -22
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +84 -91
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +2 -9
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +87 -92
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +0 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +0 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +2 -7
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +2 -7
- package/src/lib/utils/hooks/useHandleVerificationRequired/index.d.ts +1 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +62 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.d.ts +16 -0
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +56 -0
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +18 -13
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +18 -13
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +23 -23
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +23 -23
- package/src/lib/utils/hooks/useInterval/useInterval.cjs +27 -0
- package/src/lib/utils/hooks/useInterval/useInterval.js +23 -0
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +28 -18
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +28 -18
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +20 -18
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +20 -18
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +18 -13
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +18 -13
- package/src/lib/utils/hooks/useNetworkDataFromWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +92 -0
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.d.ts +3 -0
- package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +88 -0
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +18 -13
- package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +18 -13
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +23 -23
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +23 -23
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +3 -1
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +3 -1
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs +20 -55
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts +5 -3
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/useProcessNetworkConfigurations.js +20 -55
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +1 -2
- package/src/lib/utils/hooks/usePromise/usePromise.js +1 -2
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +4 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +4 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -1
- package/src/lib/utils/hooks/useSendDynamicProps/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs +84 -0
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.d.ts +11 -0
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.js +78 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +38 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.d.ts +2 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +34 -0
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.cjs +0 -1
- package/src/lib/utils/hooks/useSetWalletConnectorVerifiedCredentials/useSetWalletConnectorVerifiedCredentials.js +0 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +19 -13
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +19 -13
- package/src/lib/utils/hooks/useSocialAuth/farcaster.cjs +88 -0
- package/src/lib/utils/hooks/useSocialAuth/farcaster.d.ts +34 -0
- package/src/lib/utils/hooks/useSocialAuth/farcaster.js +82 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +104 -40
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +106 -42
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +18 -13
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +18 -13
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +0 -1
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +0 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +52 -43
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.d.ts +2 -1
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +52 -43
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +39 -22
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +39 -22
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +1 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +1 -4
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +2 -45
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +1 -5
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +2 -45
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +23 -16
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +6 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +23 -16
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +18 -13
- package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +18 -13
- package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.cjs +7 -4
- package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.js +7 -4
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.cjs +1 -3
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.d.ts +1 -2
- package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.js +1 -3
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +3 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +3 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.cjs +3 -1
- package/src/lib/utils/hooks/useWalletConnectorOptions/utils/verifyZeroDevIsSetup/verifyZeroDevIsSetup.js +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +4 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +4 -2
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +3 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.cjs +4 -7
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.js +4 -7
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +0 -33
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -6
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +1 -34
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +22 -15
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +22 -15
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +62 -20
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +62 -20
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.types.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +3 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +3 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +20 -15
- package/src/lib/views/AccountExistsView/AccountExistsView.js +20 -15
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +18 -13
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +18 -13
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +18 -13
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +18 -13
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +19 -14
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +19 -14
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +19 -14
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +19 -14
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +98 -0
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.d.ts +2 -0
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +94 -0
- package/src/lib/views/CoinbaseMPCClaimIntro/index.d.ts +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +21 -16
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +21 -16
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +29 -24
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +28 -23
- package/src/lib/views/CollectUserDataView/UserDataFields/{index.cjs → UserDataFields.cjs} +25 -16
- package/src/lib/views/CollectUserDataView/UserDataFields/UserDataFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/{index.js → UserDataFields.js} +25 -16
- package/src/lib/views/{SendBalanceView/components/TransactionStage/TransactionStage.cjs → CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs} +41 -36
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.d.ts +12 -0
- package/src/lib/views/{SendBalanceView/components/TransactionStage/TransactionStage.js → CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js} +41 -36
- package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/index.d.ts +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.d.ts +1 -11
- package/src/lib/views/CollectUserDataView/useFields.cjs +36 -5
- package/src/lib/views/CollectUserDataView/useFields.js +36 -5
- package/src/lib/views/{CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs → CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs} +26 -19
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.d.ts +13 -0
- package/src/lib/views/{CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js → CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js} +26 -19
- package/src/lib/views/CollectUserDataViewNoWallet/index.d.ts +1 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +179 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.d.ts +12 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +175 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordStep/index.d.ts +1 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordView.cjs +151 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordView.d.ts +9 -0
- package/src/lib/views/CreatePasswordView/CreatePasswordView.js +147 -0
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +127 -0
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.d.ts +12 -0
- package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +123 -0
- package/src/lib/views/CreatePasswordView/SavePasswordStep/index.d.ts +1 -0
- package/src/lib/views/CreatePasswordView/index.d.ts +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +19 -14
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +19 -14
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +21 -16
- package/src/lib/views/EmailUpdate/EmailUpdate.js +21 -16
- package/src/lib/views/EmailVerification/EmailVerification.cjs +38 -40
- package/src/lib/views/EmailVerification/EmailVerification.js +38 -40
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +36 -29
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +36 -29
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +67 -38
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.d.ts +2 -3
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +67 -38
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +0 -1
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +1 -1
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +0 -1
- package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +123 -0
- package/src/lib/views/EnterPasswordView/EnterPasswordView.d.ts +8 -0
- package/src/lib/views/EnterPasswordView/EnterPasswordView.js +119 -0
- package/src/lib/views/EnterPasswordView/index.d.ts +1 -0
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.cjs +84 -0
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.d.ts +5 -0
- package/src/lib/views/FarcasterConnectView/FarcasterConnectView.js +80 -0
- package/src/lib/views/FarcasterConnectView/index.d.ts +1 -0
- package/src/lib/views/LoginView/LoginView.cjs +54 -28
- package/src/lib/views/LoginView/LoginView.js +54 -28
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +28 -36
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +30 -38
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +113 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.d.ts +3 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +109 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +153 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.d.ts +10 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +149 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +19 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +19 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +19 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +19 -14
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +18 -13
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +18 -13
- package/src/lib/views/{TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs → LoginView/sections/ToggleableSection/ToggleableSection.cjs} +37 -47
- package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.d.ts +13 -0
- package/src/lib/views/{TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js → LoginView/sections/ToggleableSection/ToggleableSection.js} +38 -48
- package/src/lib/views/LoginView/sections/ToggleableSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +18 -13
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +18 -13
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +19 -14
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +19 -14
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +18 -13
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +18 -13
- package/src/lib/views/LoginView/sections/index.d.ts +3 -1
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.cjs +62 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.d.ts +28 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/getLoginViewStructure.js +58 -0
- package/src/lib/views/LoginView/useLoginView/getLoginViewStructure/index.d.ts +1 -0
- package/src/lib/views/LoginView/useLoginView/index.d.ts +1 -0
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +208 -0
- package/src/lib/views/LoginView/{useLoginView.d.ts → useLoginView/useLoginView.d.ts} +1 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +203 -0
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +26 -27
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +26 -27
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +19 -14
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +19 -14
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +18 -13
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +18 -13
- package/src/lib/views/NoAccess/NoAccess.cjs +22 -17
- package/src/lib/views/NoAccess/NoAccess.js +22 -17
- package/src/lib/views/NoAccess/useNoAccessText.cjs +18 -13
- package/src/lib/views/NoAccess/useNoAccessText.js +18 -13
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +19 -14
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +19 -14
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +19 -14
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.d.ts +2 -3
- package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +19 -14
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +18 -13
- package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +18 -13
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +19 -14
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +19 -14
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +20 -15
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +20 -15
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +19 -14
- package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +19 -14
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +22 -21
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.d.ts +2 -3
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +22 -21
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +24 -24
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +24 -24
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +19 -14
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.d.ts +2 -3
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +19 -14
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +20 -15
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +20 -15
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +5 -1
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +5 -1
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +2 -1
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +2 -1
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.cjs +2 -2
- package/src/lib/views/Passkey/utils/findEmailOtpWalletConnector/findEmailOtpWalletConnector.js +2 -2
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +2 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +19 -14
- package/src/lib/views/PendingConnectView/PendingConnectView.js +19 -14
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +19 -14
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +19 -14
- package/src/lib/views/QrCodeView/QrCodeView.cjs +25 -27
- package/src/lib/views/QrCodeView/QrCodeView.js +26 -28
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +20 -15
- package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +20 -15
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.cjs +17 -12
- package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.js +17 -12
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +19 -14
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +19 -14
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +64 -84
- package/src/lib/views/SendBalanceView/SendBalanceView.d.ts +1 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +65 -85
- package/src/lib/views/SmsVerification/SmsVerification.cjs +106 -0
- package/src/lib/views/SmsVerification/SmsVerification.d.ts +2 -0
- package/src/lib/views/SmsVerification/SmsVerification.js +102 -0
- package/src/lib/views/SmsVerification/index.d.ts +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/index.d.ts +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +226 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.d.ts +10 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +222 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +19 -14
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +19 -14
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +19 -14
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +19 -14
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +92 -92
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +7 -5
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +93 -94
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +17 -3
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +17 -3
- package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +0 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +20 -15
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +20 -15
- package/src/lib/views/UserFieldEditorView/UserFieldsToIcon/UserFieldsToIcon.cjs +0 -1
- package/src/lib/views/UserFieldEditorView/UserFieldsToIcon/UserFieldsToIcon.js +0 -1
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +18 -13
- package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +18 -13
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +28 -25
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +28 -25
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +20 -15
- package/src/lib/views/WalletGroupView/WalletGroupView.js +20 -15
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +19 -14
- package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +19 -14
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +19 -14
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +19 -14
- package/src/lib/views/WalletList/WalletList.cjs +26 -13
- package/src/lib/views/WalletList/WalletList.js +26 -13
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +31 -27
- package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +31 -27
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +19 -14
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +19 -14
- package/src/lib/views/WalletList/data.cjs +2 -7
- package/src/lib/views/WalletList/data.d.ts +1 -1
- package/src/lib/views/WalletList/data.js +2 -7
- package/src/lib/views/WalletList/hooks/useTabState.cjs +18 -13
- package/src/lib/views/WalletList/hooks/useTabState.js +18 -13
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +19 -14
- package/src/lib/views/WalletLockedView/WalletLockedView.js +19 -14
- package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +87 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.d.ts +2 -0
- package/src/lib/views/WalletRedirectView/WalletRedirectView.js +83 -0
- package/src/lib/views/WalletRedirectView/index.d.ts +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +18 -13
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +18 -13
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +27 -29
- package/src/lib/views/WalletUsedView/WalletUsedView.js +27 -29
- package/src/lib/views/index.d.ts +7 -6
- package/src/lib/views/viewToComponentMap.cjs +49 -33
- package/src/lib/views/viewToComponentMap.d.ts +62 -2
- package/src/lib/views/viewToComponentMap.js +49 -33
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +19 -14
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +19 -14
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +18 -13
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +21 -16
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +21 -16
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +18 -12
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +18 -12
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +19 -14
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +19 -14
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +17 -12
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +17 -12
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +17 -12
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +17 -12
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +19 -12
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +19 -12
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +72 -1
- package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +72 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +18 -13
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +42 -45
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +42 -45
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +17 -12
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +17 -12
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +23 -15
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +23 -15
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/index.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +33 -30
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +34 -31
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +28 -17
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +28 -17
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +4 -54
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +4 -54
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +19 -14
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +19 -14
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +19 -12
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +19 -12
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +31 -34
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +32 -35
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +18 -13
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +17 -12
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +17 -12
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +19 -14
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +21 -14
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +21 -14
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +19 -14
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +18 -13
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +23 -19
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +23 -19
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +17 -12
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +17 -12
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +19 -14
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithNetwork/WalletIconWithNetwork.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +18 -13
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +24 -16
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +24 -16
- package/src/lib/widgets/DynamicWidget/helpers/getPasskeyProviderFromUserAgent.cjs +0 -1
- package/src/lib/widgets/DynamicWidget/helpers/getPasskeyProviderFromUserAgent.js +0 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +2 -4
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +1 -3
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +18 -13
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +21 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +21 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +26 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +26 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +23 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.d.ts +4 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +23 -16
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +19 -14
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +18 -13
- package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +18 -13
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +20 -27
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +20 -27
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +22 -15
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +23 -16
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +21 -28
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +21 -28
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +19 -14
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +23 -18
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +23 -18
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +19 -14
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +19 -14
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +19 -14
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +18 -12
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +18 -12
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +37 -23
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +37 -23
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +22 -17
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +22 -17
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +18 -13
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +18 -13
- package/src/lib/components/OverlayCard/OverlayCard.context.cjs +0 -9
- package/src/lib/components/OverlayCard/OverlayCard.context.d.ts +0 -6
- package/src/lib/components/OverlayCard/OverlayCard.context.js +0 -5
- package/src/lib/components/OverlayCard/OverlayCardTarget.cjs +0 -17
- package/src/lib/components/OverlayCard/OverlayCardTarget.d.ts +0 -2
- package/src/lib/components/OverlayCard/OverlayCardTarget.js +0 -13
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.d.ts +0 -6
- package/src/lib/components/SecureTurnkeyWalletCard/index.d.ts +0 -1
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.d.ts +0 -1
- package/src/lib/components/SyncPasskeyFlow/index.d.ts +0 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +0 -86
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.d.ts +0 -7
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +0 -82
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/index.d.ts +0 -1
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.cjs +0 -49
- package/src/lib/context/DynamicContext/hooks/useSetShowLinkNewWalletModal/useSetShowLinkNewWalletModal.js +0 -45
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.cjs +0 -31
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.d.ts +0 -13
- package/src/lib/context/EmailVerificationContext/EmailVerificationContext.js +0 -25
- package/src/lib/context/EmailVerificationContext/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/ceil/ceil.cjs +0 -10
- package/src/lib/shared/utils/functions/ceil/ceil.d.ts +0 -1
- package/src/lib/shared/utils/functions/ceil/ceil.js +0 -6
- package/src/lib/shared/utils/functions/ceil/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +0 -21
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +0 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +0 -17
- package/src/lib/shared/utils/functions/formatBigNumber/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/trimEnd/index.d.ts +0 -1
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.cjs +0 -13
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.d.ts +0 -1
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.js +0 -9
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.cjs +0 -9
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.d.ts +0 -2
- package/src/lib/utils/functions/authenication/isEmailVerificationRequired/isEmailVerificationRequired.js +0 -5
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.cjs +0 -18
- package/src/lib/utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.js +0 -14
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.cjs +0 -10
- package/src/lib/utils/functions/isMagicConnector/isMagicConnector.js +0 -6
- package/src/lib/utils/functions/isSameWalletName/index.d.ts +0 -1
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.cjs +0 -9
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.d.ts +0 -1
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.js +0 -5
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/index.d.ts +0 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.d.ts +0 -8
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/utils/index.d.ts +0 -1
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -1
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -16
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -2
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -12
- package/src/lib/utils/hooks/useTransactionEstimatedGas/index.d.ts +0 -1
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.cjs +0 -33
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.d.ts +0 -20
- package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.js +0 -29
- package/src/lib/utils/hooks/useTransactionWithGasPrice/index.d.ts +0 -1
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs +0 -56
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.d.ts +0 -32
- package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.js +0 -52
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.d.ts +0 -2
- package/src/lib/views/CollectUserDataViewLoginWithEmail/index.d.ts +0 -1
- package/src/lib/views/LoginView/useLoginView.cjs +0 -265
- package/src/lib/views/LoginView/useLoginView.js +0 -260
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +0 -14
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +0 -11
- package/src/lib/views/SendBalanceView/components/TransactionStage/index.d.ts +0 -1
- package/src/lib/views/SendBalanceView/components/index.d.ts +0 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/index.d.ts +0 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts +0 -11
- /package/src/lib/{views/QrCodeView → components/QRCode}/QRCode.d.ts +0 -0
- /package/src/lib/{views/QrCodeView → components/QrCodeWrapper}/QrCodeContainer/index.d.ts +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactInternationalPhone = require('react-international-phone');
|
|
7
|
+
var localStorage = require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
8
|
+
var useThrottle = require('../../../shared/utils/hooks/useThrottle/useThrottle.cjs');
|
|
9
|
+
var localStorage$1 = require('../../../utils/constants/localStorage.cjs');
|
|
10
|
+
var modulo = require('../../../utils/functions/modulo/modulo.cjs');
|
|
11
|
+
var getCustomCountries = require('../getCustomCountries/getCustomCountries.cjs');
|
|
12
|
+
|
|
13
|
+
const customCountries = getCustomCountries.getCustomCountries();
|
|
14
|
+
/** The default country we want to use */
|
|
15
|
+
const getDefaultCountry = () => {
|
|
16
|
+
var _a;
|
|
17
|
+
const defaultCountryIso2 = (_a = localStorage.LocalStorage.getFromLS(localStorage$1.PHONE_INPUT_DEFAULT_COUNTRY)) !== null && _a !== void 0 ? _a : 'us';
|
|
18
|
+
return customCountries
|
|
19
|
+
.map(reactInternationalPhone.parseCountry)
|
|
20
|
+
.find(({ iso2 }) => iso2 === defaultCountryIso2);
|
|
21
|
+
};
|
|
22
|
+
const MENU_DISPLAY_THROTTLE = 50;
|
|
23
|
+
const COUNTRY_INPUT_SCROLL_DELAY = 20;
|
|
24
|
+
const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage, onUpdate, initialPhone, }) => {
|
|
25
|
+
var _a, _b, _c, _d;
|
|
26
|
+
const { inputValue: formattedPhone, phone, country: currentCountry, setCountry: setSelectedCountry, handlePhoneValueChange: handlePhoneInput, inputRef, } = reactInternationalPhone.usePhoneInput({
|
|
27
|
+
countries: customCountries,
|
|
28
|
+
defaultCountry: (_b = (_a = getDefaultCountry()) === null || _a === void 0 ? void 0 : _a.iso2) !== null && _b !== void 0 ? _b : 'us',
|
|
29
|
+
disableDialCodeAndPrefix: true,
|
|
30
|
+
value: initialPhone,
|
|
31
|
+
});
|
|
32
|
+
/** What is currently displayed on the country input */
|
|
33
|
+
const [countryInput, setCountryInput] = React.useState((_d = (_c = getDefaultCountry()) === null || _c === void 0 ? void 0 : _c.dialCode) !== null && _d !== void 0 ? _d : '1');
|
|
34
|
+
// Justification for effect:
|
|
35
|
+
// Since the library controls the states, we can't call this callback inside the setters.
|
|
36
|
+
// We could wrap setCountry and handlePhoneInput, but that only accounts for
|
|
37
|
+
// country and phone, not formattedPhone.
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate({ country: currentCountry, formattedPhone, phone });
|
|
40
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
|
+
}, [currentCountry.iso2, formattedPhone, onUpdate, phone]);
|
|
42
|
+
// =================================================================
|
|
43
|
+
// DROPDOWN
|
|
44
|
+
// =================================================================
|
|
45
|
+
/** String to filter the countries with */
|
|
46
|
+
// Even though this value is similar to countryInput, it needs to differ for a specific scenario:
|
|
47
|
+
// The user inputs a value (say 55) and then starts cycling with the arrow keys.
|
|
48
|
+
// If we were using the countryInput to filter the list, that filter would change with each new country.
|
|
49
|
+
const [filterQuery, setFilterQuery] = React.useState('');
|
|
50
|
+
/** List of countries, but filtered by the current input */
|
|
51
|
+
const filteredCountries = React.useMemo(() => {
|
|
52
|
+
if (!filterQuery)
|
|
53
|
+
return customCountries;
|
|
54
|
+
// If input is a country name
|
|
55
|
+
if (isNaN(parseInt(filterQuery)))
|
|
56
|
+
return customCountries.filter((countryData) => {
|
|
57
|
+
const { name, iso2 } = reactInternationalPhone.parseCountry(countryData);
|
|
58
|
+
return (name.toLowerCase().includes(filterQuery.toLowerCase()) ||
|
|
59
|
+
iso2 === filterQuery.toLowerCase() ||
|
|
60
|
+
currentCountry.iso2 === iso2);
|
|
61
|
+
});
|
|
62
|
+
return customCountries.filter((countryData) => {
|
|
63
|
+
const { dialCode, iso2 } = reactInternationalPhone.parseCountry(countryData);
|
|
64
|
+
return dialCode.includes(filterQuery) || currentCountry.iso2 === iso2;
|
|
65
|
+
});
|
|
66
|
+
}, [currentCountry.iso2, filterQuery]);
|
|
67
|
+
const openDropdown = () => {
|
|
68
|
+
// Don't filter on open, wait for input
|
|
69
|
+
setFilterQuery('');
|
|
70
|
+
setCountryDropdownOpen(true);
|
|
71
|
+
};
|
|
72
|
+
const closeDropdown = React.useCallback(() => {
|
|
73
|
+
setCountryDropdownOpen(false);
|
|
74
|
+
}, [setCountryDropdownOpen]);
|
|
75
|
+
// =================================================================
|
|
76
|
+
// COUNTRY INPUT
|
|
77
|
+
// =================================================================
|
|
78
|
+
/** The last inputted value for country that was valid */
|
|
79
|
+
const lastValidCountry = React.useRef(getDefaultCountry());
|
|
80
|
+
const handleCountryInput = ({ target, }) => {
|
|
81
|
+
const value = target.value.slice(0, 4);
|
|
82
|
+
setCountryInput(value);
|
|
83
|
+
// Start filtering as soon as there is any input
|
|
84
|
+
setFilterQuery(value);
|
|
85
|
+
// Check which country this dial code corresponds to
|
|
86
|
+
const { country: guessedCountry } = reactInternationalPhone.guessCountryByPartialPhoneNumber({
|
|
87
|
+
countries: customCountries,
|
|
88
|
+
currentCountryIso2: currentCountry.iso2,
|
|
89
|
+
phone: value,
|
|
90
|
+
});
|
|
91
|
+
if (!guessedCountry)
|
|
92
|
+
return;
|
|
93
|
+
lastValidCountry.current = guessedCountry;
|
|
94
|
+
setSelectedCountry(guessedCountry.iso2);
|
|
95
|
+
localStorage.LocalStorage.setToLS(localStorage$1.PHONE_INPUT_DEFAULT_COUNTRY, guessedCountry.iso2);
|
|
96
|
+
setTimeout(() => scrollCountryIntoView(guessedCountry.iso2), COUNTRY_INPUT_SCROLL_DELAY);
|
|
97
|
+
};
|
|
98
|
+
const resetToLastValidCountry = () => {
|
|
99
|
+
if (!lastValidCountry.current ||
|
|
100
|
+
countryInput === lastValidCountry.current.dialCode)
|
|
101
|
+
return;
|
|
102
|
+
setSelectedCountry(lastValidCountry.current.iso2);
|
|
103
|
+
localStorage.LocalStorage.setToLS(localStorage$1.PHONE_INPUT_DEFAULT_COUNTRY, lastValidCountry.current.iso2);
|
|
104
|
+
setCountryInput(lastValidCountry.current.dialCode);
|
|
105
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
106
|
+
setInvalidNumberMessage(undefined);
|
|
107
|
+
};
|
|
108
|
+
/** Handles up and down arrow input */
|
|
109
|
+
const handleArrowInput = React.useCallback((event) => {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
const currentIndex = filteredCountries.findIndex((countryData) => reactInternationalPhone.parseCountry(countryData).iso2 === currentCountry.iso2);
|
|
112
|
+
const direction = event.key === 'ArrowUp' ? -1 : 1;
|
|
113
|
+
const newCountry = reactInternationalPhone.parseCountry(filteredCountries[modulo.modulo(currentIndex + direction, filteredCountries.length)]);
|
|
114
|
+
scrollCountryIntoView(newCountry.iso2);
|
|
115
|
+
// We don't set filterQuery here because we don't want to change
|
|
116
|
+
// the filter while the user is cycling through the list
|
|
117
|
+
setCountryInput(newCountry.dialCode);
|
|
118
|
+
setSelectedCountry(newCountry.iso2);
|
|
119
|
+
lastValidCountry.current = newCountry;
|
|
120
|
+
localStorage.LocalStorage.setToLS(localStorage$1.PHONE_INPUT_DEFAULT_COUNTRY, newCountry.iso2);
|
|
121
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
122
|
+
setInvalidNumberMessage(undefined);
|
|
123
|
+
}, [
|
|
124
|
+
currentCountry.iso2,
|
|
125
|
+
filteredCountries,
|
|
126
|
+
setInvalidNumberMessage,
|
|
127
|
+
setSelectedCountry,
|
|
128
|
+
]);
|
|
129
|
+
const handleEnterInput = React.useCallback(() => {
|
|
130
|
+
var _a;
|
|
131
|
+
closeDropdown();
|
|
132
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.select();
|
|
133
|
+
}, [closeDropdown, inputRef]);
|
|
134
|
+
const handleCountryKeyDown = React.useCallback((event) => {
|
|
135
|
+
// When navigating away, close dropdown but don't prevent navigation
|
|
136
|
+
if (event.key === 'Tab')
|
|
137
|
+
return closeDropdown();
|
|
138
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown')
|
|
139
|
+
return handleArrowInput(event);
|
|
140
|
+
if (event.key === 'Enter')
|
|
141
|
+
return handleEnterInput(event);
|
|
142
|
+
}, [closeDropdown, handleArrowInput, handleEnterInput]);
|
|
143
|
+
// =================================================================
|
|
144
|
+
// UTILITIES
|
|
145
|
+
// =================================================================
|
|
146
|
+
// Due to the way react-international-phone works, numberInput always has a value (the dial code),
|
|
147
|
+
// even if it's not visible in the input itself.
|
|
148
|
+
/** Tells whether the phone input has any characters typed into it */
|
|
149
|
+
const hasInput = React.useMemo(() => reactInternationalPhone.removeDialCode({
|
|
150
|
+
charAfterDialCode: '+',
|
|
151
|
+
dialCode: currentCountry.dialCode,
|
|
152
|
+
phone,
|
|
153
|
+
}).length > 0, [currentCountry.dialCode, phone]);
|
|
154
|
+
/** Ref of the entire form */
|
|
155
|
+
const countriesContainer = React.useRef(null);
|
|
156
|
+
const scrollCountryIntoView = (iso2) => {
|
|
157
|
+
var _a;
|
|
158
|
+
const selectedItem = (_a = countriesContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector('#' + iso2);
|
|
159
|
+
selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.scrollIntoView({
|
|
160
|
+
behavior: 'instant',
|
|
161
|
+
block: 'center',
|
|
162
|
+
inline: 'center',
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
// We pass this as a ref to the countries dropdown. React fires it multiple times, so we throttle
|
|
166
|
+
const onMenuDisplayToggle = useThrottle.useThrottle((menu) => {
|
|
167
|
+
var _a;
|
|
168
|
+
const wasOpen = Boolean(countriesContainer.current);
|
|
169
|
+
const isOpen = Boolean(menu);
|
|
170
|
+
countriesContainer.current = menu;
|
|
171
|
+
// If we receive null that means the menu was closed
|
|
172
|
+
// The rest on the code should only execute when going from hidden to shown
|
|
173
|
+
if (wasOpen || !isOpen)
|
|
174
|
+
return;
|
|
175
|
+
(_a = countryInputRef.current) === null || _a === void 0 ? void 0 : _a.select();
|
|
176
|
+
scrollCountryIntoView(currentCountry.iso2);
|
|
177
|
+
}, MENU_DISPLAY_THROTTLE);
|
|
178
|
+
/** Sets all the state related to country */
|
|
179
|
+
const setCountry = (newCountry) => {
|
|
180
|
+
setCountryInput(newCountry.dialCode);
|
|
181
|
+
setSelectedCountry(newCountry.iso2);
|
|
182
|
+
localStorage.LocalStorage.setToLS(localStorage$1.PHONE_INPUT_DEFAULT_COUNTRY, newCountry.iso2);
|
|
183
|
+
lastValidCountry.current = newCountry;
|
|
184
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
185
|
+
setInvalidNumberMessage(undefined);
|
|
186
|
+
};
|
|
187
|
+
/** Override fontsize of country code for larger inputs */
|
|
188
|
+
const countryFontSize = React.useMemo(() => {
|
|
189
|
+
if (countryInput.length > 3)
|
|
190
|
+
return 'var(--dynamic-text-size-body-mini)';
|
|
191
|
+
if (countryInput.length > 2)
|
|
192
|
+
return 'var(--dynamic-text-size-body-small)';
|
|
193
|
+
return 'var(--dynamic-text-size-body-normal)';
|
|
194
|
+
}, [countryInput.length]);
|
|
195
|
+
return {
|
|
196
|
+
closeDropdown,
|
|
197
|
+
countryFontSize,
|
|
198
|
+
countryInput,
|
|
199
|
+
currentCountry,
|
|
200
|
+
filteredCountries,
|
|
201
|
+
formattedPhone,
|
|
202
|
+
handleCountryInput,
|
|
203
|
+
handleCountryKeyDown,
|
|
204
|
+
handlePhoneInput,
|
|
205
|
+
hasInput,
|
|
206
|
+
inputRef,
|
|
207
|
+
onBlurCountry: resetToLastValidCountry,
|
|
208
|
+
onFocusCountry: openDropdown,
|
|
209
|
+
onMenuDisplayToggle,
|
|
210
|
+
openDropdown,
|
|
211
|
+
setCountry,
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
exports.getDefaultCountry = getDefaultCountry;
|
|
216
|
+
exports.usePhoneInputLogic = usePhoneInputLogic;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChangeEventHandler, Dispatch, KeyboardEventHandler, RefObject, SetStateAction } from 'react';
|
|
2
|
+
import { ParsedCountry } from 'react-international-phone';
|
|
3
|
+
export type OnUpdatePhoneData = (values: {
|
|
4
|
+
phone: string;
|
|
5
|
+
formattedPhone: string;
|
|
6
|
+
country: ParsedCountry;
|
|
7
|
+
}) => void;
|
|
8
|
+
type UsePhoneLogicProps = {
|
|
9
|
+
countryInputRef: RefObject<HTMLInputElement>;
|
|
10
|
+
setCountryDropdownOpen: Dispatch<SetStateAction<boolean>>;
|
|
11
|
+
setInvalidNumberMessage: Dispatch<SetStateAction<string | undefined>>;
|
|
12
|
+
onUpdate?: OnUpdatePhoneData;
|
|
13
|
+
initialPhone?: string;
|
|
14
|
+
};
|
|
15
|
+
/** The default country we want to use */
|
|
16
|
+
export declare const getDefaultCountry: () => ParsedCountry | undefined;
|
|
17
|
+
export declare const usePhoneInputLogic: ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage, onUpdate, initialPhone, }: UsePhoneLogicProps) => {
|
|
18
|
+
closeDropdown: () => void;
|
|
19
|
+
countryFontSize: string;
|
|
20
|
+
countryInput: string;
|
|
21
|
+
currentCountry: ParsedCountry;
|
|
22
|
+
filteredCountries: import("react-international-phone").CountryData[];
|
|
23
|
+
formattedPhone: string;
|
|
24
|
+
handleCountryInput: ChangeEventHandler<HTMLInputElement>;
|
|
25
|
+
handleCountryKeyDown: KeyboardEventHandler<HTMLInputElement>;
|
|
26
|
+
handlePhoneInput: (e: import("react").ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => string;
|
|
27
|
+
hasInput: boolean;
|
|
28
|
+
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
29
|
+
onBlurCountry: () => void;
|
|
30
|
+
onFocusCountry: () => void;
|
|
31
|
+
onMenuDisplayToggle: (menu: HTMLDivElement | null) => void;
|
|
32
|
+
openDropdown: () => void;
|
|
33
|
+
setCountry: (newCountry: ParsedCountry) => void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { useState, useEffect, useMemo, useCallback, useRef } from 'react';
|
|
2
|
+
import { usePhoneInput, parseCountry, removeDialCode, guessCountryByPartialPhoneNumber } from 'react-international-phone';
|
|
3
|
+
import { LocalStorage } from '../../../shared/utils/classes/storage/localStorage.js';
|
|
4
|
+
import { useThrottle } from '../../../shared/utils/hooks/useThrottle/useThrottle.js';
|
|
5
|
+
import { PHONE_INPUT_DEFAULT_COUNTRY } from '../../../utils/constants/localStorage.js';
|
|
6
|
+
import { modulo } from '../../../utils/functions/modulo/modulo.js';
|
|
7
|
+
import { getCustomCountries } from '../getCustomCountries/getCustomCountries.js';
|
|
8
|
+
|
|
9
|
+
const customCountries = getCustomCountries();
|
|
10
|
+
/** The default country we want to use */
|
|
11
|
+
const getDefaultCountry = () => {
|
|
12
|
+
var _a;
|
|
13
|
+
const defaultCountryIso2 = (_a = LocalStorage.getFromLS(PHONE_INPUT_DEFAULT_COUNTRY)) !== null && _a !== void 0 ? _a : 'us';
|
|
14
|
+
return customCountries
|
|
15
|
+
.map(parseCountry)
|
|
16
|
+
.find(({ iso2 }) => iso2 === defaultCountryIso2);
|
|
17
|
+
};
|
|
18
|
+
const MENU_DISPLAY_THROTTLE = 50;
|
|
19
|
+
const COUNTRY_INPUT_SCROLL_DELAY = 20;
|
|
20
|
+
const usePhoneInputLogic = ({ countryInputRef, setCountryDropdownOpen, setInvalidNumberMessage, onUpdate, initialPhone, }) => {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
22
|
+
const { inputValue: formattedPhone, phone, country: currentCountry, setCountry: setSelectedCountry, handlePhoneValueChange: handlePhoneInput, inputRef, } = usePhoneInput({
|
|
23
|
+
countries: customCountries,
|
|
24
|
+
defaultCountry: (_b = (_a = getDefaultCountry()) === null || _a === void 0 ? void 0 : _a.iso2) !== null && _b !== void 0 ? _b : 'us',
|
|
25
|
+
disableDialCodeAndPrefix: true,
|
|
26
|
+
value: initialPhone,
|
|
27
|
+
});
|
|
28
|
+
/** What is currently displayed on the country input */
|
|
29
|
+
const [countryInput, setCountryInput] = useState((_d = (_c = getDefaultCountry()) === null || _c === void 0 ? void 0 : _c.dialCode) !== null && _d !== void 0 ? _d : '1');
|
|
30
|
+
// Justification for effect:
|
|
31
|
+
// Since the library controls the states, we can't call this callback inside the setters.
|
|
32
|
+
// We could wrap setCountry and handlePhoneInput, but that only accounts for
|
|
33
|
+
// country and phone, not formattedPhone.
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate({ country: currentCountry, formattedPhone, phone });
|
|
36
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
+
}, [currentCountry.iso2, formattedPhone, onUpdate, phone]);
|
|
38
|
+
// =================================================================
|
|
39
|
+
// DROPDOWN
|
|
40
|
+
// =================================================================
|
|
41
|
+
/** String to filter the countries with */
|
|
42
|
+
// Even though this value is similar to countryInput, it needs to differ for a specific scenario:
|
|
43
|
+
// The user inputs a value (say 55) and then starts cycling with the arrow keys.
|
|
44
|
+
// If we were using the countryInput to filter the list, that filter would change with each new country.
|
|
45
|
+
const [filterQuery, setFilterQuery] = useState('');
|
|
46
|
+
/** List of countries, but filtered by the current input */
|
|
47
|
+
const filteredCountries = useMemo(() => {
|
|
48
|
+
if (!filterQuery)
|
|
49
|
+
return customCountries;
|
|
50
|
+
// If input is a country name
|
|
51
|
+
if (isNaN(parseInt(filterQuery)))
|
|
52
|
+
return customCountries.filter((countryData) => {
|
|
53
|
+
const { name, iso2 } = parseCountry(countryData);
|
|
54
|
+
return (name.toLowerCase().includes(filterQuery.toLowerCase()) ||
|
|
55
|
+
iso2 === filterQuery.toLowerCase() ||
|
|
56
|
+
currentCountry.iso2 === iso2);
|
|
57
|
+
});
|
|
58
|
+
return customCountries.filter((countryData) => {
|
|
59
|
+
const { dialCode, iso2 } = parseCountry(countryData);
|
|
60
|
+
return dialCode.includes(filterQuery) || currentCountry.iso2 === iso2;
|
|
61
|
+
});
|
|
62
|
+
}, [currentCountry.iso2, filterQuery]);
|
|
63
|
+
const openDropdown = () => {
|
|
64
|
+
// Don't filter on open, wait for input
|
|
65
|
+
setFilterQuery('');
|
|
66
|
+
setCountryDropdownOpen(true);
|
|
67
|
+
};
|
|
68
|
+
const closeDropdown = useCallback(() => {
|
|
69
|
+
setCountryDropdownOpen(false);
|
|
70
|
+
}, [setCountryDropdownOpen]);
|
|
71
|
+
// =================================================================
|
|
72
|
+
// COUNTRY INPUT
|
|
73
|
+
// =================================================================
|
|
74
|
+
/** The last inputted value for country that was valid */
|
|
75
|
+
const lastValidCountry = useRef(getDefaultCountry());
|
|
76
|
+
const handleCountryInput = ({ target, }) => {
|
|
77
|
+
const value = target.value.slice(0, 4);
|
|
78
|
+
setCountryInput(value);
|
|
79
|
+
// Start filtering as soon as there is any input
|
|
80
|
+
setFilterQuery(value);
|
|
81
|
+
// Check which country this dial code corresponds to
|
|
82
|
+
const { country: guessedCountry } = guessCountryByPartialPhoneNumber({
|
|
83
|
+
countries: customCountries,
|
|
84
|
+
currentCountryIso2: currentCountry.iso2,
|
|
85
|
+
phone: value,
|
|
86
|
+
});
|
|
87
|
+
if (!guessedCountry)
|
|
88
|
+
return;
|
|
89
|
+
lastValidCountry.current = guessedCountry;
|
|
90
|
+
setSelectedCountry(guessedCountry.iso2);
|
|
91
|
+
LocalStorage.setToLS(PHONE_INPUT_DEFAULT_COUNTRY, guessedCountry.iso2);
|
|
92
|
+
setTimeout(() => scrollCountryIntoView(guessedCountry.iso2), COUNTRY_INPUT_SCROLL_DELAY);
|
|
93
|
+
};
|
|
94
|
+
const resetToLastValidCountry = () => {
|
|
95
|
+
if (!lastValidCountry.current ||
|
|
96
|
+
countryInput === lastValidCountry.current.dialCode)
|
|
97
|
+
return;
|
|
98
|
+
setSelectedCountry(lastValidCountry.current.iso2);
|
|
99
|
+
LocalStorage.setToLS(PHONE_INPUT_DEFAULT_COUNTRY, lastValidCountry.current.iso2);
|
|
100
|
+
setCountryInput(lastValidCountry.current.dialCode);
|
|
101
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
102
|
+
setInvalidNumberMessage(undefined);
|
|
103
|
+
};
|
|
104
|
+
/** Handles up and down arrow input */
|
|
105
|
+
const handleArrowInput = useCallback((event) => {
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
const currentIndex = filteredCountries.findIndex((countryData) => parseCountry(countryData).iso2 === currentCountry.iso2);
|
|
108
|
+
const direction = event.key === 'ArrowUp' ? -1 : 1;
|
|
109
|
+
const newCountry = parseCountry(filteredCountries[modulo(currentIndex + direction, filteredCountries.length)]);
|
|
110
|
+
scrollCountryIntoView(newCountry.iso2);
|
|
111
|
+
// We don't set filterQuery here because we don't want to change
|
|
112
|
+
// the filter while the user is cycling through the list
|
|
113
|
+
setCountryInput(newCountry.dialCode);
|
|
114
|
+
setSelectedCountry(newCountry.iso2);
|
|
115
|
+
lastValidCountry.current = newCountry;
|
|
116
|
+
LocalStorage.setToLS(PHONE_INPUT_DEFAULT_COUNTRY, newCountry.iso2);
|
|
117
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
118
|
+
setInvalidNumberMessage(undefined);
|
|
119
|
+
}, [
|
|
120
|
+
currentCountry.iso2,
|
|
121
|
+
filteredCountries,
|
|
122
|
+
setInvalidNumberMessage,
|
|
123
|
+
setSelectedCountry,
|
|
124
|
+
]);
|
|
125
|
+
const handleEnterInput = useCallback(() => {
|
|
126
|
+
var _a;
|
|
127
|
+
closeDropdown();
|
|
128
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.select();
|
|
129
|
+
}, [closeDropdown, inputRef]);
|
|
130
|
+
const handleCountryKeyDown = useCallback((event) => {
|
|
131
|
+
// When navigating away, close dropdown but don't prevent navigation
|
|
132
|
+
if (event.key === 'Tab')
|
|
133
|
+
return closeDropdown();
|
|
134
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown')
|
|
135
|
+
return handleArrowInput(event);
|
|
136
|
+
if (event.key === 'Enter')
|
|
137
|
+
return handleEnterInput(event);
|
|
138
|
+
}, [closeDropdown, handleArrowInput, handleEnterInput]);
|
|
139
|
+
// =================================================================
|
|
140
|
+
// UTILITIES
|
|
141
|
+
// =================================================================
|
|
142
|
+
// Due to the way react-international-phone works, numberInput always has a value (the dial code),
|
|
143
|
+
// even if it's not visible in the input itself.
|
|
144
|
+
/** Tells whether the phone input has any characters typed into it */
|
|
145
|
+
const hasInput = useMemo(() => removeDialCode({
|
|
146
|
+
charAfterDialCode: '+',
|
|
147
|
+
dialCode: currentCountry.dialCode,
|
|
148
|
+
phone,
|
|
149
|
+
}).length > 0, [currentCountry.dialCode, phone]);
|
|
150
|
+
/** Ref of the entire form */
|
|
151
|
+
const countriesContainer = useRef(null);
|
|
152
|
+
const scrollCountryIntoView = (iso2) => {
|
|
153
|
+
var _a;
|
|
154
|
+
const selectedItem = (_a = countriesContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector('#' + iso2);
|
|
155
|
+
selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.scrollIntoView({
|
|
156
|
+
behavior: 'instant',
|
|
157
|
+
block: 'center',
|
|
158
|
+
inline: 'center',
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
// We pass this as a ref to the countries dropdown. React fires it multiple times, so we throttle
|
|
162
|
+
const onMenuDisplayToggle = useThrottle((menu) => {
|
|
163
|
+
var _a;
|
|
164
|
+
const wasOpen = Boolean(countriesContainer.current);
|
|
165
|
+
const isOpen = Boolean(menu);
|
|
166
|
+
countriesContainer.current = menu;
|
|
167
|
+
// If we receive null that means the menu was closed
|
|
168
|
+
// The rest on the code should only execute when going from hidden to shown
|
|
169
|
+
if (wasOpen || !isOpen)
|
|
170
|
+
return;
|
|
171
|
+
(_a = countryInputRef.current) === null || _a === void 0 ? void 0 : _a.select();
|
|
172
|
+
scrollCountryIntoView(currentCountry.iso2);
|
|
173
|
+
}, MENU_DISPLAY_THROTTLE);
|
|
174
|
+
/** Sets all the state related to country */
|
|
175
|
+
const setCountry = (newCountry) => {
|
|
176
|
+
setCountryInput(newCountry.dialCode);
|
|
177
|
+
setSelectedCountry(newCountry.iso2);
|
|
178
|
+
LocalStorage.setToLS(PHONE_INPUT_DEFAULT_COUNTRY, newCountry.iso2);
|
|
179
|
+
lastValidCountry.current = newCountry;
|
|
180
|
+
// Changing country resets the phone number, so we must also reset any errors
|
|
181
|
+
setInvalidNumberMessage(undefined);
|
|
182
|
+
};
|
|
183
|
+
/** Override fontsize of country code for larger inputs */
|
|
184
|
+
const countryFontSize = useMemo(() => {
|
|
185
|
+
if (countryInput.length > 3)
|
|
186
|
+
return 'var(--dynamic-text-size-body-mini)';
|
|
187
|
+
if (countryInput.length > 2)
|
|
188
|
+
return 'var(--dynamic-text-size-body-small)';
|
|
189
|
+
return 'var(--dynamic-text-size-body-normal)';
|
|
190
|
+
}, [countryInput.length]);
|
|
191
|
+
return {
|
|
192
|
+
closeDropdown,
|
|
193
|
+
countryFontSize,
|
|
194
|
+
countryInput,
|
|
195
|
+
currentCountry,
|
|
196
|
+
filteredCountries,
|
|
197
|
+
formattedPhone,
|
|
198
|
+
handleCountryInput,
|
|
199
|
+
handleCountryKeyDown,
|
|
200
|
+
handlePhoneInput,
|
|
201
|
+
hasInput,
|
|
202
|
+
inputRef,
|
|
203
|
+
onBlurCountry: resetToLastValidCountry,
|
|
204
|
+
onFocusCountry: openDropdown,
|
|
205
|
+
onMenuDisplayToggle,
|
|
206
|
+
openDropdown,
|
|
207
|
+
setCountry,
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export { getDefaultCountry, usePhoneInputLogic };
|
|
@@ -22,21 +22,24 @@ require('@dynamic-labs/wallet-book');
|
|
|
22
22
|
require('../../utils/constants/colors.cjs');
|
|
23
23
|
require('../../utils/constants/values.cjs');
|
|
24
24
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
25
|
-
require('viem');
|
|
26
25
|
require('../../shared/consts/index.cjs');
|
|
27
26
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
28
27
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
29
28
|
require('@dynamic-labs/multi-wallet');
|
|
29
|
+
require('react-international-phone');
|
|
30
|
+
require('viem');
|
|
30
31
|
require('viem/chains');
|
|
32
|
+
require('../../config/ApiEndpoint.cjs');
|
|
31
33
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
34
|
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
|
-
require('../../
|
|
34
|
-
require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
35
|
+
require('../../context/VerificationContext/VerificationContext.cjs');
|
|
35
36
|
var useElementById = require('../../utils/hooks/useElementById/useElementById.cjs');
|
|
37
|
+
require('../../context/WalletContext/WalletContext.cjs');
|
|
36
38
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
37
39
|
require('@dynamic-labs/types');
|
|
38
40
|
require('yup');
|
|
39
41
|
require('react-i18next');
|
|
42
|
+
require('../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
40
43
|
require('../../context/MockContext/MockContext.cjs');
|
|
41
44
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
42
45
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -46,28 +49,30 @@ require('../Alert/Alert.cjs');
|
|
|
46
49
|
var ShadowDOM = require('../ShadowDOM/ShadowDOM.cjs');
|
|
47
50
|
require('../IconButton/IconButton.cjs');
|
|
48
51
|
require('../InlineWidget/InlineWidget.cjs');
|
|
52
|
+
require('../Input/Input.cjs');
|
|
49
53
|
require('../IsBrowser/IsBrowser.cjs');
|
|
50
54
|
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
55
|
+
require('../OverlayCard/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
56
|
+
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
57
|
+
require('../PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.cjs');
|
|
51
58
|
require('../Popper/Popper/Popper.cjs');
|
|
52
59
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
53
60
|
var useKeyboardEventListener = require('../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs');
|
|
61
|
+
require('qrcode');
|
|
54
62
|
require('formik');
|
|
55
|
-
require('i18next');
|
|
56
|
-
require('../OverlayCard/OverlayCard.context.cjs');
|
|
57
|
-
require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
58
|
-
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
59
63
|
require('../../views/WalletList/WalletList.cjs');
|
|
60
|
-
require('qrcode');
|
|
61
|
-
require('@hcaptcha/react-hcaptcha');
|
|
62
|
-
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
63
64
|
require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
64
|
-
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
65
65
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
66
|
+
require('i18next');
|
|
67
|
+
require('@hcaptcha/react-hcaptcha');
|
|
68
|
+
require('../../context/LoadingContext/LoadingContext.cjs');
|
|
66
69
|
require('../../context/FooterAnimationContext/index.cjs');
|
|
70
|
+
require('../../locale/locale.cjs');
|
|
71
|
+
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
72
|
+
require('../../context/PasskeyContext/PasskeyContext.cjs');
|
|
67
73
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
68
74
|
require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
69
|
-
require('
|
|
70
|
-
require('@dynamic-labs/viem-utils');
|
|
75
|
+
require('../../views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs');
|
|
71
76
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
72
77
|
|
|
73
78
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -80,6 +85,8 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
|
|
|
80
85
|
view.type !== 'collect-user-data' &&
|
|
81
86
|
view.type !== 'update-email' &&
|
|
82
87
|
view.type !== 'login-with-email-verification' &&
|
|
88
|
+
view.type !== 'login-with-sms-verification' &&
|
|
89
|
+
view.type !== 'verify-sms' &&
|
|
83
90
|
view.type !== 'verify-email';
|
|
84
91
|
const onBackdropClick = (e) => {
|
|
85
92
|
if (!shouldCloseOnBackdropClick)
|
|
@@ -18,21 +18,24 @@ import '@dynamic-labs/wallet-book';
|
|
|
18
18
|
import '../../utils/constants/colors.js';
|
|
19
19
|
import '../../utils/constants/values.js';
|
|
20
20
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
21
|
-
import 'viem';
|
|
22
21
|
import '../../shared/consts/index.js';
|
|
23
22
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
24
23
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
25
24
|
import '@dynamic-labs/multi-wallet';
|
|
25
|
+
import 'react-international-phone';
|
|
26
|
+
import 'viem';
|
|
26
27
|
import 'viem/chains';
|
|
28
|
+
import '../../config/ApiEndpoint.js';
|
|
27
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
28
30
|
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
|
-
import '../../
|
|
30
|
-
import '../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
31
|
+
import '../../context/VerificationContext/VerificationContext.js';
|
|
31
32
|
import { useElementById } from '../../utils/hooks/useElementById/useElementById.js';
|
|
33
|
+
import '../../context/WalletContext/WalletContext.js';
|
|
32
34
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
33
35
|
import '@dynamic-labs/types';
|
|
34
36
|
import 'yup';
|
|
35
37
|
import 'react-i18next';
|
|
38
|
+
import '../../context/FieldsStateContext/FieldsStateContext.js';
|
|
36
39
|
import '../../context/MockContext/MockContext.js';
|
|
37
40
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
38
41
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -42,28 +45,30 @@ import '../Alert/Alert.js';
|
|
|
42
45
|
import { ShadowDOM } from '../ShadowDOM/ShadowDOM.js';
|
|
43
46
|
import '../IconButton/IconButton.js';
|
|
44
47
|
import '../InlineWidget/InlineWidget.js';
|
|
48
|
+
import '../Input/Input.js';
|
|
45
49
|
import '../IsBrowser/IsBrowser.js';
|
|
46
50
|
import '../MenuList/Dropdown/Dropdown.js';
|
|
51
|
+
import '../OverlayCard/OverlayCardTarget/OverlayCardTarget.js';
|
|
52
|
+
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
53
|
+
import '../PhoneNumberField/usePhoneInputLogic/usePhoneInputLogic.js';
|
|
47
54
|
import '../Popper/Popper/Popper.js';
|
|
48
55
|
import '../Popper/PopperContext/PopperContext.js';
|
|
49
56
|
import { useKeyboardEventListener } from '../../utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js';
|
|
57
|
+
import 'qrcode';
|
|
50
58
|
import 'formik';
|
|
51
|
-
import 'i18next';
|
|
52
|
-
import '../OverlayCard/OverlayCard.context.js';
|
|
53
|
-
import '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
54
|
-
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
55
59
|
import '../../views/WalletList/WalletList.js';
|
|
56
|
-
import 'qrcode';
|
|
57
|
-
import '@hcaptcha/react-hcaptcha';
|
|
58
|
-
import '../../context/LoadingContext/LoadingContext.js';
|
|
59
60
|
import '../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
60
|
-
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
61
61
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
62
|
+
import 'i18next';
|
|
63
|
+
import '@hcaptcha/react-hcaptcha';
|
|
64
|
+
import '../../context/LoadingContext/LoadingContext.js';
|
|
62
65
|
import '../../context/FooterAnimationContext/index.js';
|
|
66
|
+
import '../../locale/locale.js';
|
|
67
|
+
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
68
|
+
import '../../context/PasskeyContext/PasskeyContext.js';
|
|
63
69
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
64
70
|
import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
65
|
-
import '
|
|
66
|
-
import '@dynamic-labs/viem-utils';
|
|
71
|
+
import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
67
72
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
68
73
|
|
|
69
74
|
const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, whiteList, }) => {
|
|
@@ -72,6 +77,8 @@ const ModalComponent = ({ children, handleClose, withBackdrop = true, zIndex, wh
|
|
|
72
77
|
view.type !== 'collect-user-data' &&
|
|
73
78
|
view.type !== 'update-email' &&
|
|
74
79
|
view.type !== 'login-with-email-verification' &&
|
|
80
|
+
view.type !== 'login-with-sms-verification' &&
|
|
81
|
+
view.type !== 'verify-sms' &&
|
|
75
82
|
view.type !== 'verify-email';
|
|
76
83
|
const onBackdropClick = (e) => {
|
|
77
84
|
if (!shouldCloseOnBackdropClick)
|