@dynamic-labs/sdk-react-core 1.1.0-alpha.0 → 1.1.0-alpha.2
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 +9 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +13 -13
- package/src/index.cjs +3 -2
- package/src/index.js +2 -1
- package/src/lib/Main.cjs +1 -0
- package/src/lib/Main.js +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
- package/src/lib/components/Alert/Alert.types.d.ts +2 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
- package/src/lib/components/Button/Button.cjs +2 -2
- package/src/lib/components/Button/Button.d.ts +2 -1
- package/src/lib/components/Button/Button.js +2 -2
- package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
- package/src/lib/components/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
- package/src/lib/components/Input/Input.types.d.ts +2 -1
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -0
- package/src/lib/components/Modal/Modal.cjs +1 -0
- package/src/lib/components/Modal/Modal.js +1 -0
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +4 -3
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +4 -3
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +8 -6
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +8 -6
- package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +1 -0
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +2 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +2 -1
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Search/Search.cjs +1 -1
- package/src/lib/components/Search/Search.d.ts +2 -1
- package/src/lib/components/Search/Search.js +1 -1
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +1 -0
- package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +1 -0
- package/src/lib/components/TextButton/TextButton.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +3 -2
- package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.js +3 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
- package/src/lib/components/UserProfile/UserProfile.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +10 -21
- package/src/lib/context/DynamicContext/DynamicContext.js +11 -22
- package/src/lib/context/DynamicContext/hooks/index.d.ts +2 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +75 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.d.ts +3 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +71 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +0 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +3 -5
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -24
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -24
- package/src/lib/context/LoadingContext/LoadingContext.cjs +55 -15
- package/src/lib/context/LoadingContext/LoadingContext.d.ts +1 -1
- package/src/lib/context/LoadingContext/LoadingContext.js +56 -16
- package/src/lib/context/MockContext/MockContext.cjs +1 -0
- package/src/lib/context/MockContext/MockContext.js +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +1 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +4 -14
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +5 -15
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
- package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
- package/src/lib/context/ViewContext/ViewContext.cjs +4 -15
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -3
- package/src/lib/context/ViewContext/ViewContext.js +5 -16
- package/src/lib/data/api.js +1 -1
- package/src/lib/{context/DynamicContext/internalEvents/internalEvents.cjs → events/dynamicEvents.cjs} +2 -3
- package/src/lib/{context/DynamicContext/internalEvents/internalEvents.d.ts → events/dynamicEvents.d.ts} +4 -4
- package/src/lib/events/dynamicEvents.js +5 -0
- package/src/lib/events/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +3 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +3 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +3 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +3 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +3 -2
- package/src/lib/locale/en/translation.cjs +124 -1
- package/src/lib/locale/en/translation.d.ts +124 -1
- package/src/lib/locale/en/translation.js +124 -1
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -0
- package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
- package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +5 -3
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +5 -3
- package/src/lib/utils/hooks/events/index.d.ts +3 -0
- package/src/lib/utils/hooks/events/types.d.ts +14 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/index.d.ts +1 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.cjs +21 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +8 -0
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.js +17 -0
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.cjs +1 -0
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.d.ts +2 -11
- package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/useWalletConnectorEvent.js +1 -0
- package/src/lib/utils/hooks/index.d.ts +1 -2
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +57 -48
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +57 -48
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +7 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +7 -7
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +27 -2
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +27 -2
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -1
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +5 -7
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +5 -7
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +5 -5
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +5 -5
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +2 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -1
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +3 -2
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +3 -2
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +3 -2
- package/src/lib/views/AccountExistsView/AccountExistsView.js +3 -2
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +4 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +4 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +5 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +5 -4
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +10 -8
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +10 -8
- package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/useFields.js +11 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +4 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +3 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +3 -5
- package/src/lib/views/EmailVerification/EmailVerification.js +3 -5
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +11 -5
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +11 -5
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -0
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +2 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +4 -3
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +4 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +3 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +3 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +4 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +4 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -1
- package/src/lib/views/NoAccess/NoAccess.js +2 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +7 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +7 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +11 -5
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +11 -5
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +1 -0
- package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +1 -0
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +4 -3
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +4 -3
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +2 -1
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +2 -1
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +6 -5
- package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +6 -5
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +4 -3
- package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +4 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +8 -4
- package/src/lib/views/PendingConnectView/PendingConnectView.js +8 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +9 -5
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +9 -5
- package/src/lib/views/QrCodeView/QRCode.cjs +1 -0
- package/src/lib/views/QrCodeView/QRCode.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +12 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +12 -8
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +2 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +2 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -0
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +5 -3
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +5 -3
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +10 -7
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +10 -7
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +2 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +2 -1
- package/src/lib/views/WalletList/WalletList.cjs +2 -2
- package/src/lib/views/WalletList/WalletList.js +2 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +4 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.js +4 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +5 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +5 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +5 -5
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +5 -5
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +2 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +6 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +6 -3
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +7 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +7 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
- package/src/lib/context/DynamicContext/internalEvents/index.d.ts +0 -1
- package/src/lib/context/DynamicContext/internalEvents/internalEvents.js +0 -6
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.cjs +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.d.ts +0 -0
- /package/src/lib/utils/hooks/{useEventListener → events/useEventListener}/useEventListener.js +0 -0
- /package/src/lib/utils/hooks/{useWalletConnectorEvent → events/useWalletConnectorEvent}/index.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
3
4
|
import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
|
|
4
5
|
import { Typography } from '../Typography/Typography.js';
|
|
@@ -12,10 +13,13 @@ const typographyColor = {
|
|
|
12
13
|
notice: 'brand-primary',
|
|
13
14
|
success: 'green-1',
|
|
14
15
|
};
|
|
15
|
-
const ModalHeaderBanner = ({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const ModalHeaderBanner = ({ messageKey, type = 'error', disableTruncate = false, }) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
return (jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }), children: Boolean(messageKey) && (jsx("div", { className: classNames('modal-header-banner', {
|
|
19
|
+
'modal-header-banner__error': type === 'error',
|
|
20
|
+
'modal-header-banner__notice': type === 'notice',
|
|
21
|
+
'modal-header-banner__success': type === 'success',
|
|
22
|
+
}), children: jsx(Typography, { variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false, copykey: messageKey, children: t(messageKey || '') }) })) }));
|
|
23
|
+
};
|
|
20
24
|
|
|
21
25
|
export { ModalHeaderBanner };
|
|
@@ -7,6 +7,7 @@ var reactI18next = require('react-i18next');
|
|
|
7
7
|
var sdkApi = require('@dynamic-labs/sdk-api');
|
|
8
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
9
|
require('react');
|
|
10
|
+
require('../../events/dynamicEvents.cjs');
|
|
10
11
|
require('@dynamic-labs/utils');
|
|
11
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
13
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -80,7 +81,7 @@ const NeedHelpSection = () => {
|
|
|
80
81
|
if (!hasContactInfo) {
|
|
81
82
|
return null;
|
|
82
83
|
}
|
|
83
|
-
return (jsxRuntime.jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
84
|
+
return (jsxRuntime.jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', copykey: 'dyn_need_help_section.contact_support', children: jsxRuntime.jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
84
85
|
};
|
|
85
86
|
const getPasskeyRecoverySession = () => {
|
|
86
87
|
if (!isRecoveryEnabled) {
|
|
@@ -90,14 +91,14 @@ const NeedHelpSection = () => {
|
|
|
90
91
|
const finalRecoveryText = hasContactInfo
|
|
91
92
|
? recoveryText
|
|
92
93
|
: recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
|
|
93
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasContactInfo && (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsxRuntime.jsx(TextButton.TextButton, { className: classNames.classNames('helper-link', {
|
|
94
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasContactInfo && (jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.divider', children: t('dyn_need_help_section.divider') })), jsxRuntime.jsx(TextButton.TextButton, { copykey: 'dyn_need_help_section.recovery_button', className: classNames.classNames('helper-link', {
|
|
94
95
|
'need-help-section--captalize': !hasContactInfo,
|
|
95
96
|
}), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
|
|
96
97
|
};
|
|
97
98
|
if (!hasContactInfo && !isRecoveryEnabled) {
|
|
98
99
|
return null;
|
|
99
100
|
}
|
|
100
|
-
return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
101
|
+
return (jsxRuntime.jsxs("div", { className: 'need-help-section', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.info', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
101
102
|
};
|
|
102
103
|
|
|
103
104
|
exports.NeedHelpSection = NeedHelpSection;
|
|
@@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
3
3
|
import { ProviderEnum } from '@dynamic-labs/sdk-api';
|
|
4
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
5
|
import 'react';
|
|
6
|
+
import '../../events/dynamicEvents.js';
|
|
6
7
|
import '@dynamic-labs/utils';
|
|
7
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
9
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -76,7 +77,7 @@ const NeedHelpSection = () => {
|
|
|
76
77
|
if (!hasContactInfo) {
|
|
77
78
|
return null;
|
|
78
79
|
}
|
|
79
|
-
return (jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
80
|
+
return (jsxs("div", { className: 'need-help-section__links', children: [supportUrl && (jsx(Typography, { variant: 'body_small', color: 'link', copykey: 'dyn_need_help_section.contact_support', children: jsx("a", { href: supportUrl, rel: 'noreferrer', target: '_blank', children: t('dyn_need_help_section.contact_support') }) })), supportEmail && (jsx(Typography, { variant: 'body_small', color: 'link', children: jsx("a", { href: `mailto:${supportEmail}`, children: supportEmail }) }))] }));
|
|
80
81
|
};
|
|
81
82
|
const getPasskeyRecoverySession = () => {
|
|
82
83
|
if (!isRecoveryEnabled) {
|
|
@@ -86,14 +87,14 @@ const NeedHelpSection = () => {
|
|
|
86
87
|
const finalRecoveryText = hasContactInfo
|
|
87
88
|
? recoveryText
|
|
88
89
|
: recoveryText.slice(0, 1).toUpperCase() + recoveryText.slice(1);
|
|
89
|
-
return (jsxs(Fragment, { children: [hasContactInfo && (jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.divider') })), jsx(TextButton, { className: classNames('helper-link', {
|
|
90
|
+
return (jsxs(Fragment, { children: [hasContactInfo && (jsx(Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.divider', children: t('dyn_need_help_section.divider') })), jsx(TextButton, { copykey: 'dyn_need_help_section.recovery_button', className: classNames('helper-link', {
|
|
90
91
|
'need-help-section--captalize': !hasContactInfo,
|
|
91
92
|
}), onClick: initPasskeyRecoveryProcess, children: finalRecoveryText })] }));
|
|
92
93
|
};
|
|
93
94
|
if (!hasContactInfo && !isRecoveryEnabled) {
|
|
94
95
|
return null;
|
|
95
96
|
}
|
|
96
|
-
return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
97
|
+
return (jsxs("div", { className: 'need-help-section', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', copykey: 'dyn_need_help_section.info', children: t('dyn_need_help_section.info') }), getSupportHelpSession(), getPasskeyRecoverySession()] }));
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
export { NeedHelpSection };
|
|
@@ -21,6 +21,7 @@ require('@dynamic-labs/multi-wallet');
|
|
|
21
21
|
var isNetworkUnsupported = require('../../utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs');
|
|
22
22
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
23
23
|
var MenuList = require('../MenuList/MenuList/MenuList.cjs');
|
|
24
|
+
require('../../events/dynamicEvents.cjs');
|
|
24
25
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
25
26
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
26
27
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
@@ -17,6 +17,7 @@ import '@dynamic-labs/multi-wallet';
|
|
|
17
17
|
import { isNetworkUnsupported } from '../../utils/functions/isNetworkUnsupported/isNetworkUnsupported.js';
|
|
18
18
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
19
19
|
import { MenuList } from '../MenuList/MenuList/MenuList.js';
|
|
20
|
+
import '../../events/dynamicEvents.js';
|
|
20
21
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
21
22
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
22
23
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
@@ -9,6 +9,7 @@ require('../../../../context/ViewContext/ViewContext.cjs');
|
|
|
9
9
|
require('react');
|
|
10
10
|
var stroke = require('../../../../shared/assets/stroke.cjs');
|
|
11
11
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
12
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
12
13
|
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
13
14
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
15
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -5,6 +5,7 @@ import '../../../../context/ViewContext/ViewContext.js';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import { ReactComponent as SvgStroke } from '../../../../shared/assets/stroke.js';
|
|
7
7
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
8
|
+
import '../../../../events/dynamicEvents.js';
|
|
8
9
|
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
9
10
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
11
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
7
7
|
require('react');
|
|
8
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
9
10
|
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
10
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '../../../../events/dynamicEvents.js';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
5
6
|
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
6
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
7
7
|
require('react');
|
|
8
|
+
require('../../../../events/dynamicEvents.cjs');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
9
10
|
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
10
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '../../../../events/dynamicEvents.js';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
5
6
|
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
6
7
|
import '@dynamic-labs/wallet-connector-core';
|
package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var Typography = require('../../../Typography/Typography.cjs');
|
|
|
22
22
|
|
|
23
23
|
const UnsupportedNetwork = ({ showMsg }) => {
|
|
24
24
|
const { t } = reactI18next.useTranslation();
|
|
25
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(error.ReactComponent, {}) }), showMsg && (jsxRuntime.jsx(Typography.Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', children: t('dyn_network_not_supported.button') }))] }));
|
|
25
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(error.ReactComponent, {}) }), showMsg && (jsxRuntime.jsx(Typography.Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', copykey: 'dyn_network_not_supported.button', children: t('dyn_network_not_supported.button') }))] }));
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
exports.UnsupportedNetwork = UnsupportedNetwork;
|
package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Typography } from '../../../Typography/Typography.js';
|
|
|
18
18
|
|
|
19
19
|
const UnsupportedNetwork = ({ showMsg }) => {
|
|
20
20
|
const { t } = useTranslation();
|
|
21
|
-
return (jsxs(Fragment, { children: [jsx(Icon, { size: 'small', children: jsx(SvgError, {}) }), showMsg && (jsx(Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', children: t('dyn_network_not_supported.button') }))] }));
|
|
21
|
+
return (jsxs(Fragment, { children: [jsx(Icon, { size: 'small', children: jsx(SvgError, {}) }), showMsg && (jsx(Typography, { className: 'evm-network-control__network-name', as: 'span', color: 'error-1', variant: 'body_small', copykey: 'dyn_network_not_supported.button', children: t('dyn_network_not_supported.button') }))] }));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { UnsupportedNetwork };
|
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
8
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
9
|
+
require('../../events/dynamicEvents.cjs');
|
|
9
10
|
require('@dynamic-labs/utils');
|
|
10
11
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
11
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -71,18 +72,19 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
71
72
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
72
73
|
require('react-focus-lock');
|
|
73
74
|
|
|
74
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange,
|
|
75
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerTextKey, }) => {
|
|
75
76
|
const { t } = reactI18next.useTranslation();
|
|
76
77
|
const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
77
78
|
const EmailIcon = React.useMemo(() => {
|
|
78
79
|
const EmailIcon = (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signInWithEmail.ReactComponent, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) }));
|
|
79
80
|
return EmailIcon;
|
|
80
81
|
}, []);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
const titleCopyKey = () => isValid
|
|
83
|
+
? 'dyn_otp_verification.verification_succeeded'
|
|
84
|
+
: 'dyn_otp_verification.confirm_code';
|
|
85
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsxRuntime.jsx("div", { className: 'otp-verification-view__status-header', children: jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', copykey: titleCopyKey(), children: t(titleCopyKey()) }) }) }), successBannerTextKey && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'notice', messageKey: successBannerTextKey, disableTruncate: true })), jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', messageKey: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsxs("div", { className: classNames.classNames('otp-verification-view', {
|
|
86
|
+
'otp-verification-view--message': Boolean(successBannerTextKey || error),
|
|
87
|
+
}), children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxRuntime.jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.hang_tight', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.code_sent', children: t('dyn_otp_verification.code_sent') }), jsxRuntime.jsxs("div", { className: 'otp-verification-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) }), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) }))] })] }))] }), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
exports.OTPVerificationView = OTPVerificationView;
|
|
@@ -8,7 +8,7 @@ type OtpVerificationLayoutProps = {
|
|
|
8
8
|
onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
|
|
9
9
|
onPinChange?: (value: string) => void;
|
|
10
10
|
onPinComplete: (value: string) => void;
|
|
11
|
-
|
|
11
|
+
successBannerTextKey?: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
|
|
14
14
|
export {};
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
5
|
+
import '../../events/dynamicEvents.js';
|
|
5
6
|
import '@dynamic-labs/utils';
|
|
6
7
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
7
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -67,18 +68,19 @@ import '../Popper/Popper/Popper.js';
|
|
|
67
68
|
import '../Popper/PopperContext/PopperContext.js';
|
|
68
69
|
import 'react-focus-lock';
|
|
69
70
|
|
|
70
|
-
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange,
|
|
71
|
+
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, successBannerTextKey, }) => {
|
|
71
72
|
const { t } = useTranslation();
|
|
72
73
|
const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
73
74
|
const EmailIcon = useMemo(() => {
|
|
74
75
|
const EmailIcon = (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignInWithEmail, Object.assign({}, props, { "data-testid": 'sign-in-with-email-icon' })) }));
|
|
75
76
|
return EmailIcon;
|
|
76
77
|
}, []);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
const titleCopyKey = () => isValid
|
|
79
|
+
? 'dyn_otp_verification.verification_succeeded'
|
|
80
|
+
: 'dyn_otp_verification.confirm_code';
|
|
81
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { alignContent: 'bottom', leading: onClickBack && backButton, children: jsx("div", { className: 'otp-verification-view__status-header', children: jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title', copykey: titleCopyKey(), children: t(titleCopyKey()) }) }) }), successBannerTextKey && (jsx(ModalHeaderBanner, { type: 'notice', messageKey: successBannerTextKey, disableTruncate: true })), jsx(ModalHeaderBanner, { type: 'error', messageKey: error === null || error === void 0 ? void 0 : error.message }), jsxs("div", { className: classNames('otp-verification-view', {
|
|
82
|
+
'otp-verification-view--message': Boolean(successBannerTextKey || error),
|
|
83
|
+
}), children: [isValid && (jsx(IconWithStatus, { Icon: EmailIcon, iconSize: 96, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: isLoading, className: 'otp-verification-view__icon-with-spinner', treatAsFunctionComponent: true })), jsxs("div", { className: 'otp-verification-view__body', children: [isValid && (jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.hang_tight', children: t('dyn_otp_verification.hang_tight') })), !isValid && (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_otp_verification.code_sent', children: t('dyn_otp_verification.code_sent') }), jsxs("div", { className: 'otp-verification-view__email-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) }), onClickEditEmail && (jsx(IconButton, { onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) }))] })] }))] }), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange })] })] }));
|
|
82
84
|
};
|
|
83
85
|
|
|
84
86
|
export { OTPVerificationView };
|
|
@@ -9,6 +9,7 @@ var AnimatePresence = require('../AnimatePresence/AnimatePresence.cjs');
|
|
|
9
9
|
require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
10
10
|
var SlideInUpTransition = require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
11
11
|
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
12
|
+
require('../../events/dynamicEvents.cjs');
|
|
12
13
|
require('@dynamic-labs/utils');
|
|
13
14
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
14
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -5,6 +5,7 @@ import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
|
|
|
5
5
|
import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
6
6
|
import { SlideInUpTransition } from '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
7
7
|
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
8
|
+
import '../../events/dynamicEvents.js';
|
|
8
9
|
import '@dynamic-labs/utils';
|
|
9
10
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
10
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -9,6 +9,7 @@ require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
9
9
|
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
10
10
|
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
11
11
|
require('react');
|
|
12
|
+
require('../../events/dynamicEvents.cjs');
|
|
12
13
|
require('@dynamic-labs/utils');
|
|
13
14
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
15
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
@@ -63,7 +64,7 @@ require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/
|
|
|
63
64
|
const PasskeyCreatedSuccessBanner = ({ className }) => {
|
|
64
65
|
const { showPasskeyCreatedSuccess } = useInternalDynamicContext.useInternalDynamicContext();
|
|
65
66
|
const { t } = reactI18next.useTranslation();
|
|
66
|
-
return (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'success', className: className, children: t('dyn_passkey_created_success.text') })) }));
|
|
67
|
+
return (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'success', className: className, copykey: 'dyn_passkey_created_success.text', children: t('dyn_passkey_created_success.text') })) }));
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
exports.PasskeyCreatedSuccessBanner = PasskeyCreatedSuccessBanner;
|
|
@@ -5,6 +5,7 @@ import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
|
5
5
|
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
6
6
|
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
7
7
|
import 'react';
|
|
8
|
+
import '../../events/dynamicEvents.js';
|
|
8
9
|
import '@dynamic-labs/utils';
|
|
9
10
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
11
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
@@ -59,7 +60,7 @@ import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/P
|
|
|
59
60
|
const PasskeyCreatedSuccessBanner = ({ className }) => {
|
|
60
61
|
const { showPasskeyCreatedSuccess } = useInternalDynamicContext();
|
|
61
62
|
const { t } = useTranslation();
|
|
62
|
-
return (jsx(AnimatePresence, { animationComponent: jsx(OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsx(ErrorContainer, { variant: 'success', className: className, children: t('dyn_passkey_created_success.text') })) }));
|
|
63
|
+
return (jsx(AnimatePresence, { animationComponent: jsx(OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsx(ErrorContainer, { variant: 'success', className: className, copykey: 'dyn_passkey_created_success.text', children: t('dyn_passkey_created_success.text') })) }));
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
export { PasskeyCreatedSuccessBanner };
|
|
@@ -9,6 +9,7 @@ require('../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
9
9
|
require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
10
10
|
var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
11
11
|
require('react');
|
|
12
|
+
require('../../events/dynamicEvents.cjs');
|
|
12
13
|
require('@dynamic-labs/utils');
|
|
13
14
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
14
15
|
require('@dynamic-labs/wallet-connector-core');
|
|
@@ -5,6 +5,7 @@ import '../Transition/ZoomTransition/ZoomTransition.js';
|
|
|
5
5
|
import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
6
6
|
import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
|
|
7
7
|
import 'react';
|
|
8
|
+
import '../../events/dynamicEvents.js';
|
|
8
9
|
import '@dynamic-labs/utils';
|
|
9
10
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
10
11
|
import '@dynamic-labs/wallet-connector-core';
|
|
@@ -7,6 +7,6 @@ require('react');
|
|
|
7
7
|
var search = require('../../assets/search.cjs');
|
|
8
8
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
9
9
|
|
|
10
|
-
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, }) => (jsxRuntime.jsxs("label", { htmlFor: id, className: classNames.classNames('search__container', value ? 'search__container--active' : undefined), children: [jsxRuntime.jsx("div", { className: 'search-icon__container', children: jsxRuntime.jsx(search.ReactComponent, {}) }), jsxRuntime.jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames.classNames('search__input', className), "data-testid": 'Search' }), value.length > 0 && (jsxRuntime.jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', children: "Clear" }))] }));
|
|
10
|
+
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) => (jsxRuntime.jsxs("label", { htmlFor: id, className: classNames.classNames('search__container', value ? 'search__container--active' : undefined), children: [jsxRuntime.jsx("div", { className: 'search-icon__container', children: jsxRuntime.jsx(search.ReactComponent, {}) }), jsxRuntime.jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames.classNames('search__input', className), "data-testid": 'Search', copykey: copykey }), value.length > 0 && (jsxRuntime.jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', children: "Clear" }))] }));
|
|
11
11
|
|
|
12
12
|
exports.Search = Search;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { CopyKey } from '../../shared';
|
|
1
2
|
import { InputProps } from './Search.types';
|
|
2
|
-
export declare const Search: ({ className, id, label, type, onChange, onBlur, name, value, onClickClear, }: InputProps) => JSX.Element;
|
|
3
|
+
export declare const Search: ({ className, id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }: InputProps & CopyKey) => JSX.Element;
|
|
@@ -3,6 +3,6 @@ import 'react';
|
|
|
3
3
|
import { ReactComponent as SvgSearch } from '../../assets/search.js';
|
|
4
4
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
5
5
|
|
|
6
|
-
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, }) => (jsxs("label", { htmlFor: id, className: classNames('search__container', value ? 'search__container--active' : undefined), children: [jsx("div", { className: 'search-icon__container', children: jsx(SvgSearch, {}) }), jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames('search__input', className), "data-testid": 'Search' }), value.length > 0 && (jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', children: "Clear" }))] }));
|
|
6
|
+
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) => (jsxs("label", { htmlFor: id, className: classNames('search__container', value ? 'search__container--active' : undefined), children: [jsx("div", { className: 'search-icon__container', children: jsx(SvgSearch, {}) }), jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames('search__input', className), "data-testid": 'Search', copykey: copykey }), value.length > 0 && (jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', children: "Clear" }))] }));
|
|
7
7
|
|
|
8
8
|
export { Search };
|
|
@@ -16,9 +16,9 @@ const SecureTurnkeyWalletCard = ({ className }) => {
|
|
|
16
16
|
const { initPasskeyRecoveryProcess } = usePasskeyRecovery.usePasskeyRecovery();
|
|
17
17
|
if (!isTurnkeyWalletWithoutAuthenticator)
|
|
18
18
|
return null;
|
|
19
|
-
return (jsxRuntime.jsxs("div", { className: classNames.classNames('secure-turnkey-wallet-card', className), children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', color: 'primary', children: t('dyn_secure_pregenerated_wallet.description') }), jsxRuntime.jsx(Button.Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
|
|
19
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('secure-turnkey-wallet-card', className), children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', color: 'primary', copykey: 'dyn_secure_pregenerated_wallet.description', children: t('dyn_secure_pregenerated_wallet.description') }), jsxRuntime.jsx(Button.Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
|
|
20
20
|
color: 'inherit',
|
|
21
|
-
}, showInternalLoading: false, children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
|
|
21
|
+
}, showInternalLoading: false, copykey: 'dyn_secure_pregenerated_wallet.secure_button', children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
exports.SecureTurnkeyWalletCard = SecureTurnkeyWalletCard;
|
|
@@ -12,9 +12,9 @@ const SecureTurnkeyWalletCard = ({ className }) => {
|
|
|
12
12
|
const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
|
|
13
13
|
if (!isTurnkeyWalletWithoutAuthenticator)
|
|
14
14
|
return null;
|
|
15
|
-
return (jsxs("div", { className: classNames('secure-turnkey-wallet-card', className), children: [jsx(Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', color: 'primary', children: t('dyn_secure_pregenerated_wallet.description') }), jsx(Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
|
|
15
|
+
return (jsxs("div", { className: classNames('secure-turnkey-wallet-card', className), children: [jsx(Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', color: 'primary', copykey: 'dyn_secure_pregenerated_wallet.description', children: t('dyn_secure_pregenerated_wallet.description') }), jsx(Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
|
|
16
16
|
color: 'inherit',
|
|
17
|
-
}, showInternalLoading: false, children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
|
|
17
|
+
}, showInternalLoading: false, copykey: 'dyn_secure_pregenerated_wallet.secure_button', children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { SecureTurnkeyWalletCard };
|
|
@@ -78,9 +78,9 @@ const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) =
|
|
|
78
78
|
.matches(/^0x[0-9a-fA-F]{40}$/, 'invalidFormat'),
|
|
79
79
|
});
|
|
80
80
|
}, [balance, decimals]);
|
|
81
|
-
return (jsxRuntime.jsx(formik.Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxRuntime.jsxs(formik.Form, { className: 'send-balance-form', children: [jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input.Input, error: errors['amount'], message: touched['amount'] &&
|
|
82
|
-
getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input.Input, error: errors['recipient'], message: touched['recipient'] &&
|
|
83
|
-
getDisplayErrorMessage(errors, t, 'recipient') }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsxRuntime.jsx(Button.Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
|
|
81
|
+
return (jsxRuntime.jsx(formik.Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxRuntime.jsxs(formik.Form, { className: 'send-balance-form', children: [jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input.Input, error: errors['amount'], copykey: 'dyn_send_transaction.data.amount.label', message: touched['amount'] &&
|
|
82
|
+
getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input.Input, error: errors['recipient'], copykey: 'dyn_send_transaction.data.recipient.label', message: touched['recipient'] &&
|
|
83
|
+
getDisplayErrorMessage(errors, t, 'recipient') }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsxRuntime.jsx(Button.Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', copykey: 'dyn_send_transaction.send_button', children: t('dyn_send_transaction.send_button') })] })) }));
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
exports.SendBalanceForm = SendBalanceForm;
|
|
@@ -74,9 +74,9 @@ const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) =
|
|
|
74
74
|
.matches(/^0x[0-9a-fA-F]{40}$/, 'invalidFormat'),
|
|
75
75
|
});
|
|
76
76
|
}, [balance, decimals]);
|
|
77
|
-
return (jsx(Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxs(Form, { className: 'send-balance-form', children: [jsx(Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input, error: errors['amount'], message: touched['amount'] &&
|
|
78
|
-
getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsx(Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input, error: errors['recipient'], message: touched['recipient'] &&
|
|
79
|
-
getDisplayErrorMessage(errors, t, 'recipient') }), jsx(SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsx(Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
|
|
77
|
+
return (jsx(Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxs(Form, { className: 'send-balance-form', children: [jsx(Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input, error: errors['amount'], copykey: 'dyn_send_transaction.data.amount.label', message: touched['amount'] &&
|
|
78
|
+
getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsx(Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input, error: errors['recipient'], copykey: 'dyn_send_transaction.data.recipient.label', message: touched['recipient'] &&
|
|
79
|
+
getDisplayErrorMessage(errors, t, 'recipient') }), jsx(SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsx(Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', copykey: 'dyn_send_transaction.send_button', children: t('dyn_send_transaction.send_button') })] })) }));
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
export { SendBalanceForm };
|
|
@@ -47,7 +47,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
|
|
|
47
47
|
return;
|
|
48
48
|
return parseFloat(balance);
|
|
49
49
|
}, [balance]);
|
|
50
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, trailing: closeButton, children: jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__header-content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: t('dyn_send_transaction.data.from') }), walletKey && (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletKey }) })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) })] }) }), jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__body', children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'send-balance-page-layout__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), networkName && networkIcon && (jsxRuntime.jsx("div", { className: 'send-balance-page-layout__network-container', children: jsxRuntime.jsx(Chip.Chip, { icon: networkIcon, children: networkName }) })), jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, { divider: true, children: "Token" }), jsxRuntime.jsx(TokenBalanceCard.TokenBalanceCard, { chainIcon: networkIcon, currencySymbol: currencySymbol, balance: balance })] }), jsxRuntime.jsx(SendBalanceForm.SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber, decimals: networkCurrencyDecimals }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] })] }));
|
|
50
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, trailing: closeButton, children: jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__header-content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', as: 'p', copykey: 'dyn_send_transaction.data.from', children: t('dyn_send_transaction.data.from') }), walletKey && (jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletKey }) })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) })] }) }), jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__body', children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'send-balance-page-layout__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), networkName && networkIcon && (jsxRuntime.jsx("div", { className: 'send-balance-page-layout__network-container', children: jsxRuntime.jsx(Chip.Chip, { icon: networkIcon, children: networkName }) })), jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, { divider: true, children: "Token" }), jsxRuntime.jsx(TokenBalanceCard.TokenBalanceCard, { chainIcon: networkIcon, currencySymbol: currencySymbol, balance: balance })] }), jsxRuntime.jsx(SendBalanceForm.SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber, decimals: networkCurrencyDecimals }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] })] }));
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
exports.SendBalancePageLayout = SendBalancePageLayout;
|
|
@@ -43,7 +43,7 @@ const SendBalancePageLayout = ({ error, walletAddress, onClickClose, onClickBack
|
|
|
43
43
|
return;
|
|
44
44
|
return parseFloat(balance);
|
|
45
45
|
}, [balance]);
|
|
46
|
-
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, trailing: closeButton, children: jsxs("div", { className: 'send-balance-page-layout__header-content', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: t('dyn_send_transaction.data.from') }), walletKey && (jsx(Icon, { size: 'small', children: jsx(WalletIcon, { walletKey: walletKey }) })), jsx(Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: shortenWalletAddress(walletAddress, 3, 3) })] }) }), jsxs("div", { className: 'send-balance-page-layout__body', children: [jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'send-balance-page-layout__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), networkName && networkIcon && (jsx("div", { className: 'send-balance-page-layout__network-container', children: jsx(Chip, { icon: networkIcon, children: networkName }) })), jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsx(FormFieldLabel, { divider: true, children: "Token" }), jsx(TokenBalanceCard, { chainIcon: networkIcon, currencySymbol: currencySymbol, balance: balance })] }), jsx(SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber, decimals: networkCurrencyDecimals }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] })] }));
|
|
46
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: backButton, trailing: closeButton, children: jsxs("div", { className: 'send-balance-page-layout__header-content', children: [jsx(Typography, { variant: 'body_normal', color: 'primary', as: 'p', copykey: 'dyn_send_transaction.data.from', children: t('dyn_send_transaction.data.from') }), walletKey && (jsx(Icon, { size: 'small', children: jsx(WalletIcon, { walletKey: walletKey }) })), jsx(Typography, { variant: 'body_normal', color: 'primary', as: 'p', children: shortenWalletAddress(walletAddress, 3, 3) })] }) }), jsxs("div", { className: 'send-balance-page-layout__body', children: [jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'send-balance-page-layout__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), networkName && networkIcon && (jsx("div", { className: 'send-balance-page-layout__network-container', children: jsx(Chip, { icon: networkIcon, children: networkName }) })), jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsx(FormFieldLabel, { divider: true, children: "Token" }), jsx(TokenBalanceCard, { chainIcon: networkIcon, currencySymbol: currencySymbol, balance: balance })] }), jsx(SendBalanceForm, { onSubmit: onSubmit, initialValues: initialValues, balance: balanceNumber, decimals: networkCurrencyDecimals }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'send-balance-page-layout__footer' }))] })] }));
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
export { SendBalancePageLayout };
|
package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
|
|
|
9
9
|
|
|
10
10
|
const TokenBalanceCard = ({ chainIcon, currencySymbol, balance, }) => {
|
|
11
11
|
const { t } = reactI18next.useTranslation();
|
|
12
|
-
return (jsxRuntime.jsxs("div", { className: 'token-balance-card', children: [jsxRuntime.jsxs("div", { className: 'token-balance-card__chain', children: [Boolean(chainIcon) && (jsxRuntime.jsx("div", { className: 'token-balance-card__chain__icon', children: chainIcon })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: currencySymbol })] }), balance !== undefined && (jsxRuntime.jsxs("div", { className: 'token-balance-card__balance-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'tertiary', children: t('dyn_send_transaction.data.balance.label') }), jsxRuntime.jsxs("div", { className: 'token-balance-card__balance', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: helpers.roundBalance(balance, 6) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'tertiary', children: currencySymbol })] })] }))] }));
|
|
12
|
+
return (jsxRuntime.jsxs("div", { className: 'token-balance-card', children: [jsxRuntime.jsxs("div", { className: 'token-balance-card__chain', children: [Boolean(chainIcon) && (jsxRuntime.jsx("div", { className: 'token-balance-card__chain__icon', children: chainIcon })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: currencySymbol })] }), balance !== undefined && (jsxRuntime.jsxs("div", { className: 'token-balance-card__balance-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'tertiary', copykey: 'dyn_send_transaction.data.balance.label', children: t('dyn_send_transaction.data.balance.label') }), jsxRuntime.jsxs("div", { className: 'token-balance-card__balance', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: helpers.roundBalance(balance, 6) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'tertiary', children: currencySymbol })] })] }))] }));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
exports.TokenBalanceCard = TokenBalanceCard;
|
package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js
CHANGED
|
@@ -5,7 +5,7 @@ import { roundBalance } from '../../../../widgets/DynamicWidget/helpers/helpers.
|
|
|
5
5
|
|
|
6
6
|
const TokenBalanceCard = ({ chainIcon, currencySymbol, balance, }) => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
|
-
return (jsxs("div", { className: 'token-balance-card', children: [jsxs("div", { className: 'token-balance-card__chain', children: [Boolean(chainIcon) && (jsx("div", { className: 'token-balance-card__chain__icon', children: chainIcon })), jsx(Typography, { variant: 'body_normal', color: 'primary', children: currencySymbol })] }), balance !== undefined && (jsxs("div", { className: 'token-balance-card__balance-container', children: [jsx(Typography, { variant: 'body_small', color: 'tertiary', children: t('dyn_send_transaction.data.balance.label') }), jsxs("div", { className: 'token-balance-card__balance', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', children: roundBalance(balance, 6) }), jsx(Typography, { variant: 'body_small', color: 'tertiary', children: currencySymbol })] })] }))] }));
|
|
8
|
+
return (jsxs("div", { className: 'token-balance-card', children: [jsxs("div", { className: 'token-balance-card__chain', children: [Boolean(chainIcon) && (jsx("div", { className: 'token-balance-card__chain__icon', children: chainIcon })), jsx(Typography, { variant: 'body_normal', color: 'primary', children: currencySymbol })] }), balance !== undefined && (jsxs("div", { className: 'token-balance-card__balance-container', children: [jsx(Typography, { variant: 'body_small', color: 'tertiary', copykey: 'dyn_send_transaction.data.balance.label', children: t('dyn_send_transaction.data.balance.label') }), jsxs("div", { className: 'token-balance-card__balance', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', children: roundBalance(balance, 6) }), jsx(Typography, { variant: 'body_small', color: 'tertiary', children: currencySymbol })] })] }))] }));
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { TokenBalanceCard };
|
|
@@ -19,6 +19,7 @@ require('@dynamic-labs/utils');
|
|
|
19
19
|
require('../../shared/consts/index.cjs');
|
|
20
20
|
var capitalize = require('../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
21
21
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
22
|
+
require('../../events/dynamicEvents.cjs');
|
|
22
23
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
23
24
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
25
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -15,6 +15,7 @@ import '@dynamic-labs/utils';
|
|
|
15
15
|
import '../../shared/consts/index.js';
|
|
16
16
|
import { capitalize } from '../../shared/utils/functions/capitalize/capitalize.js';
|
|
17
17
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
18
|
+
import '../../events/dynamicEvents.js';
|
|
18
19
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
19
20
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
20
21
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -18,6 +18,7 @@ var localStorage = require('../../shared/utils/classes/storage/localStorage.cjs'
|
|
|
18
18
|
require('viem');
|
|
19
19
|
require('@dynamic-labs/utils');
|
|
20
20
|
require('../../shared/consts/index.cjs');
|
|
21
|
+
require('../../events/dynamicEvents.cjs');
|
|
21
22
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
22
23
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
23
24
|
require('@dynamic-labs/multi-wallet');
|
|
@@ -14,6 +14,7 @@ import { LocalStorage } from '../../shared/utils/classes/storage/localStorage.js
|
|
|
14
14
|
import 'viem';
|
|
15
15
|
import '@dynamic-labs/utils';
|
|
16
16
|
import '../../shared/consts/index.js';
|
|
17
|
+
import '../../events/dynamicEvents.js';
|
|
17
18
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
18
19
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
19
20
|
import '@dynamic-labs/multi-wallet';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
|
|
2
|
+
import { CopyKey } from '../../shared';
|
|
3
|
+
export declare const TextButton: ({ className, ...props }: ComponentPropsWithoutRef<'button'> & CopyKey) => JSX.Element;
|