@dynamic-labs/sdk-react-core 0.17.25 → 0.17.26
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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +3 -0
- package/src/index.js +2 -0
- package/src/lib/Main.cjs +3 -2
- package/src/lib/Main.js +3 -2
- 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/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/Divider/Divider.cjs +1 -0
- package/src/lib/components/Divider/Divider.js +1 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +83 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +79 -0
- package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +33 -0
- package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
- package/src/lib/components/MenuList/MenuList/MenuList.js +29 -0
- package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/utils/index.d.ts +1 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
- package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -12
- package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -12
- 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/OTPVerificationView/OTPVerificationView.cjs +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +10 -11
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
- package/src/lib/components/OverlayCard/OverlayCard.js +11 -11
- package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
- package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
- package/src/lib/components/Popper/Popper/Popper.js +12 -12
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +0 -1
- package/src/lib/components/Portal/Portal.cjs +1 -0
- package/src/lib/components/Portal/Portal.js +1 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
- package/src/lib/components/Tooltip/Tooltip.js +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
- 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/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.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 +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.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 +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
- package/src/lib/shared/utils/hooks/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/useTransition/useTransition.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
- 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 +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -0
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -0
- 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 +1 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +1 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +1 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +4 -3
- 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 +4 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +4 -3
- 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 +5 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +5 -4
- 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/DynamicUserProfile/DynamicUserProfile.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +4 -1
- 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 +4 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
- 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 +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
- 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/Wallet/Wallet.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +2 -1
- 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/helpers/helpers.cjs +19 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +19 -1
- 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/IndexView/IndexView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +1 -0
- 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/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -69
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -63
- package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
- /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { isMobile } from '@dynamic-labs/utils';
|
|
4
3
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
5
4
|
import '@dynamic-labs/sdk-api';
|
|
6
5
|
import '../../../../shared/logger.js';
|
|
@@ -9,6 +8,7 @@ import '@dynamic-labs/iconic';
|
|
|
9
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
9
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
11
10
|
import { shortenWalletAddress } from '../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
|
|
11
|
+
import '@dynamic-labs/utils';
|
|
12
12
|
import '../../../../utils/constants/colors.js';
|
|
13
13
|
import 'ethers';
|
|
14
14
|
import '../../../../shared/consts/index.js';
|
|
@@ -36,11 +36,12 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
36
36
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
40
|
+
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
39
41
|
import { NetworkPicker } from '../../../../components/NetworkPicker/NetworkPicker.js';
|
|
40
42
|
import { useFetchNameService } from '../../hooks/useFetchNameService/useFetchNameService.js';
|
|
41
43
|
import { Balance } from '../Balance/Balance.js';
|
|
42
44
|
import { DotsMenu } from '../DotsMenu/DotsMenu.js';
|
|
43
|
-
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
44
45
|
|
|
45
46
|
const ICON_SIZE = 28;
|
|
46
47
|
const ActiveWalletInformation = () => {
|
|
@@ -70,7 +71,7 @@ const ActiveWalletInformation = () => {
|
|
|
70
71
|
[];
|
|
71
72
|
return (jsxs("div", Object.assign({ className: 'active-wallet-information-container', "data-testid": 'active-wallet-information' }, { children: [jsxs("div", Object.assign({ className: 'active-wallet-information' }, { children: [(nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("div", Object.assign({ className: 'active-wallet-information__avatar' }, { children: jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) }))) : (jsx("div", Object.assign({ className: 'active-wallet-information__wallet-img' }, { children: jsx(AuthProviderIcon, { jwt: authToken, iconSize: ICON_SIZE, showStatus: true }) }))), jsxs("div", Object.assign({ className: 'active-wallet-information__details' }, { children: [jsxs("div", Object.assign({ className: classNames('active-wallet-information__actions-container', {
|
|
72
73
|
'active-wallet-information__actions-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
73
|
-
}) }, { children: [jsxs("div", { children: [jsx(Typography, Object.assign({ className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal' }, { children: nameService === null || nameService === void 0 ? void 0 : nameService.name })), jsx(Typography, Object.assign({ className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary' }, { children: shortenWalletAddress(address, 4, 4) }))] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
74
|
+
}) }, { children: [jsxs("div", { children: [jsx(Typography, Object.assign({ className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal' }, { children: nameService === null || nameService === void 0 ? void 0 : nameService.name })), jsx(Typography, Object.assign({ className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary' }, { children: shortenWalletAddress(address, 4, 4) }))] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] })), jsx(NetworkPicker, { connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] }))] })), jsxs("div", Object.assign({ className: 'balance-container' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_small' }, { children: "Balance" })), primaryWallet && (jsx(Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] }))] })));
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
export { ActiveWalletInformation };
|
|
@@ -40,6 +40,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
40
40
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
var helpers = require('../../helpers/helpers.cjs');
|
|
44
45
|
|
|
45
46
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -36,6 +36,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
36
36
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
import { roundBalance } from '../../helpers/helpers.js';
|
|
40
41
|
|
|
41
42
|
const Balance = ({ connector, address, network, className }) => {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var utils = require('@dynamic-labs/utils');
|
|
8
7
|
require('@dynamic-labs/sdk-api');
|
|
9
8
|
require('../../../../shared/logger.cjs');
|
|
10
9
|
require('../../../../config/LSSuffix.cjs');
|
|
@@ -12,6 +11,7 @@ require('@dynamic-labs/iconic');
|
|
|
12
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
12
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
14
13
|
var threeDots = require('../../../../shared/assets/three-dots.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
15
15
|
require('../../../../utils/constants/colors.cjs');
|
|
16
16
|
require('ethers');
|
|
17
17
|
var index = require('../../../../shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
@@ -36,18 +36,19 @@ require('../../../../components/Alert/Alert.cjs');
|
|
|
36
36
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
37
37
|
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
38
38
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
39
|
-
|
|
39
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
40
40
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
|
+
var Dropdown = require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
var DotsMenuDropdown = require('../DotsMenuDropdown/DotsMenuDropdown.cjs');
|
|
44
45
|
|
|
45
|
-
const DotsMenu = ({ options,
|
|
46
|
+
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
46
47
|
const dotsMenuRef = React.useRef(null);
|
|
47
48
|
const popperContentRef = React.useRef(null);
|
|
48
49
|
const [showMenu, setShowMenu] = React.useState(false);
|
|
49
50
|
index.useOnClickOutside(popperContentRef, () => setShowMenu(false));
|
|
50
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }) })), jsxRuntime.jsx(
|
|
51
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) }) })), jsxRuntime.jsx(Dropdown.Dropdown, Object.assign({ isOpen: showMenu, onClickOutside: () => setShowMenu(false), onScroll: () => setShowMenu(false), anchorRef: dotsMenuRef, ref: popperContentRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right' }, { children: jsxRuntime.jsx(DotsMenuDropdown.DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) }))] }));
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
exports.DotsMenu = DotsMenu;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnchorOrigin, TransformOrigin } from '../../../../components/Popper/Popper.types';
|
|
1
|
+
import { ReactElement } from 'react';
|
|
3
2
|
export type DotsMenuOption = {
|
|
4
3
|
Icon: ReactElement | null;
|
|
5
4
|
callback: VoidFunction;
|
|
6
5
|
text: string;
|
|
7
6
|
};
|
|
8
7
|
type Props = {
|
|
9
|
-
|
|
8
|
+
options: DotsMenuOption[];
|
|
9
|
+
direction?: 'right' | 'left';
|
|
10
10
|
buttonClassName?: string;
|
|
11
11
|
buttonClassNameWithOpenMenu?: string;
|
|
12
|
-
options: DotsMenuOption[];
|
|
13
|
-
title?: ReactNode;
|
|
14
|
-
transformOrigin?: TransformOrigin;
|
|
15
12
|
};
|
|
16
|
-
export declare const DotsMenu: ({ options,
|
|
13
|
+
export declare const DotsMenu: ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction, }: Props) => JSX.Element;
|
|
17
14
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
|
-
import { isMobile } from '@dynamic-labs/utils';
|
|
4
3
|
import '@dynamic-labs/sdk-api';
|
|
5
4
|
import '../../../../shared/logger.js';
|
|
6
5
|
import '../../../../config/LSSuffix.js';
|
|
@@ -8,6 +7,7 @@ import '@dynamic-labs/iconic';
|
|
|
8
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
8
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
10
9
|
import { ReactComponent as SvgThreeDots } from '../../../../shared/assets/three-dots.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
11
|
import '../../../../utils/constants/colors.js';
|
|
12
12
|
import 'ethers';
|
|
13
13
|
import { useOnClickOutside } from '../../../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
@@ -32,18 +32,19 @@ import '../../../../components/Alert/Alert.js';
|
|
|
32
32
|
import '../../../../context/MockContext/MockContext.js';
|
|
33
33
|
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
34
34
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
35
|
-
import
|
|
35
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
36
36
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import { Dropdown } from '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
import { DotsMenuDropdown } from '../DotsMenuDropdown/DotsMenuDropdown.js';
|
|
40
41
|
|
|
41
|
-
const DotsMenu = ({ options,
|
|
42
|
+
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', }) => {
|
|
42
43
|
const dotsMenuRef = useRef(null);
|
|
43
44
|
const popperContentRef = useRef(null);
|
|
44
45
|
const [showMenu, setShowMenu] = useState(false);
|
|
45
46
|
useOnClickOutside(popperContentRef, () => setShowMenu(false));
|
|
46
|
-
return (jsxs(Fragment, { children: [jsx(IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsx(Icon, { children: jsx(SvgThreeDots, {}) }) })), jsx(
|
|
47
|
+
return (jsxs(Fragment, { children: [jsx(IconButton, Object.assign({ ref: dotsMenuRef, onClick: () => setShowMenu(true), "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName }, { children: jsx(Icon, { children: jsx(SvgThreeDots, {}) }) })), jsx(Dropdown, Object.assign({ isOpen: showMenu, onClickOutside: () => setShowMenu(false), onScroll: () => setShowMenu(false), anchorRef: dotsMenuRef, ref: popperContentRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right' }, { children: jsx(DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) }))] }));
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
export { DotsMenu };
|
|
@@ -39,6 +39,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
|
|
43
44
|
const DotsMenuDropdown = ({ options, setShowMenu, }) => (jsxRuntime.jsx("div", Object.assign({ className: 'dots-menu-dropdown__container', style: { zIndex: index.tooltipZIndex } }, { children: options.map((option) => (jsxRuntime.jsxs("div", Object.assign({ className: 'dots-menu-dropdown__item', onClick: () => {
|
|
44
45
|
option.callback();
|
|
@@ -35,6 +35,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
|
|
39
40
|
const DotsMenuDropdown = ({ options, setShowMenu, }) => (jsx("div", Object.assign({ className: 'dots-menu-dropdown__container', style: { zIndex: tooltipZIndex } }, { children: options.map((option) => (jsxs("div", Object.assign({ className: 'dots-menu-dropdown__item', onClick: () => {
|
|
40
41
|
option.callback();
|
|
@@ -42,8 +42,11 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
var IsBrowser = require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
46
47
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
48
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
49
|
+
var OverlayCardTarget = require('../../../../components/OverlayCard/OverlayCardTarget.cjs');
|
|
47
50
|
|
|
48
51
|
const DynamicUserProfile = ({ variant, }) => {
|
|
49
52
|
const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -57,7 +60,7 @@ const DynamicUserProfile = ({ variant, }) => {
|
|
|
57
60
|
if (!projectSettings)
|
|
58
61
|
return null;
|
|
59
62
|
const shouldRenderHeader = dynamicWidgetView !== 'send-balance';
|
|
60
|
-
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(DynamicWidgetVariants.DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: index.widgetModalZIndex }, { children: jsxRuntime.
|
|
63
|
+
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(DynamicWidgetVariants.DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: index.widgetModalZIndex }, { children: jsxRuntime.jsx(DynamicWidgetCard.DynamicWidgetCard, Object.assign({ ref: widgetRef }, { children: jsxRuntime.jsxs(OverlayCardTarget.OverlayCardTarget, { children: [shouldRenderHeader && jsxRuntime.jsx(DynamicWidgetHeader.MemoizedDynamicWidgetHeader, { variant: variant }), jsxRuntime.jsx(DynamicWidgetViews.DynamicWidgetViews, {}), jsxRuntime.jsx(DynamicWidgetPrompts.DynamicWidgetPrompts, {})] }) })) })) }));
|
|
61
64
|
};
|
|
62
65
|
const ShadowedDynamicUserProfile = () => (jsxRuntime.jsx(ShadowDOM.ShadowDOM, Object.assign({ zIndex: index.widgetModalZIndex }, { children: jsxRuntime.jsx(DynamicUserProfile, {}) })));
|
|
63
66
|
|
|
@@ -38,8 +38,11 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
import { IsBrowser } from '../../../../components/IsBrowser/IsBrowser.js';
|
|
42
43
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
44
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
45
|
+
import { OverlayCardTarget } from '../../../../components/OverlayCard/OverlayCardTarget.js';
|
|
43
46
|
|
|
44
47
|
const DynamicUserProfile = ({ variant, }) => {
|
|
45
48
|
const { projectSettings } = useInternalDynamicContext();
|
|
@@ -53,7 +56,7 @@ const DynamicUserProfile = ({ variant, }) => {
|
|
|
53
56
|
if (!projectSettings)
|
|
54
57
|
return null;
|
|
55
58
|
const shouldRenderHeader = dynamicWidgetView !== 'send-balance';
|
|
56
|
-
return (jsx(IsBrowser, { children: jsx(DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: widgetModalZIndex }, { children:
|
|
59
|
+
return (jsx(IsBrowser, { children: jsx(DynamicWidgetVariants, Object.assign({ isOpen: isOpen, setIsOpen: setIsOpen, variant: _variant, zIndex: widgetModalZIndex }, { children: jsx(DynamicWidgetCard, Object.assign({ ref: widgetRef }, { children: jsxs(OverlayCardTarget, { children: [shouldRenderHeader && jsx(MemoizedDynamicWidgetHeader, { variant: variant }), jsx(DynamicWidgetViews, {}), jsx(DynamicWidgetPrompts, {})] }) })) })) }));
|
|
57
60
|
};
|
|
58
61
|
const ShadowedDynamicUserProfile = () => (jsx(ShadowDOM, Object.assign({ zIndex: widgetModalZIndex }, { children: jsx(DynamicUserProfile, {}) })));
|
|
59
62
|
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs
CHANGED
|
@@ -34,6 +34,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
34
34
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
35
|
require('formik');
|
|
36
36
|
require('yup');
|
|
37
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
37
38
|
var useKYCFlag = require('../../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
38
39
|
var useMultiWalletFlag = require('../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
39
40
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
@@ -30,6 +30,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
30
30
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
31
|
import 'formik';
|
|
32
32
|
import 'yup';
|
|
33
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
33
34
|
import { useKYCFlag } from '../../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
34
35
|
import { useMultiWalletFlag } from '../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
35
36
|
import '../../../../context/MockContext/MockContext.js';
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
7
|
var iconic = require('@dynamic-labs/iconic');
|
|
8
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
var Typography = require('../../../../../components/Typography/Typography.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
var logger = require('../../../../../shared/logger.cjs');
|
|
@@ -43,10 +43,11 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
46
47
|
var FundingContext = require('../../../../../context/FundingContext/FundingContext.cjs');
|
|
47
|
-
var ActiveWalletInformation = require('../../ActiveWalletInformation/ActiveWalletInformation.cjs');
|
|
48
|
-
var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
|
|
49
48
|
var SendBalanceContext = require('../../../../../context/SendBalanceContext/SendBalanceContext.cjs');
|
|
49
|
+
var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
|
|
50
|
+
var ActiveWalletInformation = require('../../ActiveWalletInformation/ActiveWalletInformation.cjs');
|
|
50
51
|
|
|
51
52
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
52
53
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
|
-
import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
3
|
import { UserProfileIcon } from '@dynamic-labs/iconic';
|
|
4
|
+
import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { Typography } from '../../../../../components/Typography/Typography.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import { logger } from '../../../../../shared/logger.js';
|
|
@@ -39,10 +39,11 @@ import '../../../../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
42
43
|
import { useFundingContext } from '../../../../../context/FundingContext/FundingContext.js';
|
|
43
|
-
import { ActiveWalletInformation } from '../../ActiveWalletInformation/ActiveWalletInformation.js';
|
|
44
|
-
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
45
44
|
import { useSendBalance } from '../../../../../context/SendBalanceContext/SendBalanceContext.js';
|
|
45
|
+
import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
|
|
46
|
+
import { ActiveWalletInformation } from '../../ActiveWalletInformation/ActiveWalletInformation.js';
|
|
46
47
|
|
|
47
48
|
const DynamicWidgetWalletHeader = ({ variant, }) => {
|
|
48
49
|
const { primaryWallet, user } = useInternalDynamicContext();
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs
CHANGED
|
@@ -38,6 +38,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
41
42
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
42
43
|
|
|
43
44
|
const options = [
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js
CHANGED
|
@@ -34,6 +34,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
37
38
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
38
39
|
|
|
39
40
|
const options = [
|
|
@@ -35,6 +35,7 @@ require('../../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
35
35
|
var PopperContext = require('../../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
36
36
|
require('formik');
|
|
37
37
|
require('yup');
|
|
38
|
+
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
38
39
|
require('../../../../../../context/MockContext/MockContext.cjs');
|
|
39
40
|
require('../../../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
40
41
|
require('../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -31,6 +31,7 @@ import '../../../../../../components/Popper/Popper/Popper.js';
|
|
|
31
31
|
import { PopperProvider } from '../../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
32
32
|
import 'formik';
|
|
33
33
|
import 'yup';
|
|
34
|
+
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
34
35
|
import '../../../../../../context/MockContext/MockContext.js';
|
|
35
36
|
import '../../../../../../context/CaptchaContext/CaptchaContext.js';
|
|
36
37
|
import '../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -39,6 +39,7 @@ require('../../../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
var PopperContext = require('../../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
|
|
43
44
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
44
45
|
usePreventPageScroll.usePreventPageScroll(Boolean(isShown));
|
|
@@ -35,6 +35,7 @@ import '../../../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import { PopperProvider } from '../../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
|
|
39
40
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, transitionEvents = {}, }) => {
|
|
40
41
|
usePreventPageScroll(Boolean(isShown));
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs
CHANGED
|
@@ -39,6 +39,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
var getWalletVerifiedCredential = require('../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs');
|
|
43
44
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
44
45
|
var EmptyWallets = require('../EmptyWallets/EmptyWallets.cjs');
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js
CHANGED
|
@@ -35,6 +35,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
import { getWalletVerifiedCredential } from '../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js';
|
|
39
40
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
40
41
|
import { EmptyWallets } from '../EmptyWallets/EmptyWallets.js';
|
|
@@ -39,6 +39,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
|
|
43
44
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
44
45
|
|
|
@@ -35,6 +35,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
|
|
39
40
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxs(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
40
41
|
|
|
@@ -40,6 +40,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
40
40
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
|
|
44
45
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
45
46
|
const { setSelectedWalletWithAction, selectedWalletWithAction, setPrimaryWalletId, setMultiWalletWidgetState, computeConnectedStateForWallets, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -36,6 +36,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
36
36
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
|
|
40
41
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
41
42
|
const { setSelectedWalletWithAction, selectedWalletWithAction, setPrimaryWalletId, setMultiWalletWidgetState, computeConnectedStateForWallets, } = useInternalDynamicContext();
|
|
@@ -40,6 +40,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
40
40
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
|
|
44
45
|
const EmptyWallets = () => (jsxRuntime.jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsxRuntime.jsx(addWallet.ReactComponent, {}) })) })), jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
45
46
|
|
|
@@ -36,6 +36,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
36
36
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
|
|
40
41
|
const EmptyWallets = () => (jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsx(Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsx(SvgAddWallet, {}) })) })), jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
41
42
|
|
package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs
CHANGED
|
@@ -39,6 +39,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
var helpers = require('../../helpers/helpers.cjs');
|
|
43
44
|
|
|
44
45
|
const SingleWalletButtons = () => {
|
|
@@ -35,6 +35,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
39
40
|
|
|
40
41
|
const SingleWalletButtons = () => {
|
|
@@ -43,6 +43,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
43
43
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
46
47
|
var DotsMenu = require('../DotsMenu/DotsMenu.cjs');
|
|
47
48
|
var helpers = require('../../helpers/helpers.cjs');
|
|
48
49
|
var AuthProviderIcon = require('../../../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
@@ -93,7 +94,7 @@ const Wallet = ({ wallet, ens }) => {
|
|
|
93
94
|
computeConnectedStateForWallets();
|
|
94
95
|
setSelectedWalletConnector(connector);
|
|
95
96
|
});
|
|
96
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsxRuntime.jsx("div", { className: 'wallet__row__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })))] })), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
97
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsxRuntime.jsx("div", { className: 'wallet__row__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })))] })), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'wallet__menu', direction: 'left' })] })));
|
|
97
98
|
};
|
|
98
99
|
|
|
99
100
|
exports.Wallet = Wallet;
|
|
@@ -39,6 +39,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
39
39
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
42
43
|
import { DotsMenu } from '../DotsMenu/DotsMenu.js';
|
|
43
44
|
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
44
45
|
import { AuthProviderIcon } from '../../../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
@@ -89,7 +90,7 @@ const Wallet = ({ wallet, ens }) => {
|
|
|
89
90
|
computeConnectedStateForWallets();
|
|
90
91
|
setSelectedWalletConnector(connector);
|
|
91
92
|
});
|
|
92
|
-
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsx("div", { className: 'wallet__row__seperator' }), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress(address, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress(address, 4, 4) })))] })), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options,
|
|
93
|
+
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(AuthProviderIcon, { iconSize: iconSize, jwt: authToken, wallet: wallet, showStatus: true }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsx("div", { className: 'wallet__row__seperator' }), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress(address, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress(address, 4, 4) })))] })), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'wallet__menu', direction: 'left' })] })));
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
export { Wallet };
|
|
@@ -39,6 +39,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
39
39
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
40
|
require('formik');
|
|
41
41
|
require('yup');
|
|
42
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
42
43
|
|
|
43
44
|
const WidgetPortal = ({ children, onBackdropClick, disablePadding, showCloseButton, }) => {
|
|
44
45
|
const { accountSwitchState, setMultiWalletWidgetState, setSelectedWalletWithAction, selectedWalletWithAction, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -35,6 +35,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
35
35
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
36
|
import 'formik';
|
|
37
37
|
import 'yup';
|
|
38
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
38
39
|
|
|
39
40
|
const WidgetPortal = ({ children, onBackdropClick, disablePadding, showCloseButton, }) => {
|
|
40
41
|
const { accountSwitchState, setMultiWalletWidgetState, setSelectedWalletWithAction, selectedWalletWithAction, } = useInternalDynamicContext();
|
|
@@ -34,6 +34,7 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
34
34
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
35
|
require('formik');
|
|
36
36
|
require('yup');
|
|
37
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
37
38
|
var useKYCFlag = require('../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
38
39
|
var useMultiWalletFlag = require('../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
39
40
|
require('../../../context/MockContext/MockContext.cjs');
|
|
@@ -30,6 +30,7 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
30
30
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
31
|
import 'formik';
|
|
32
32
|
import 'yup';
|
|
33
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
33
34
|
import { useKYCFlag } from '../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
34
35
|
import { useMultiWalletFlag } from '../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
35
36
|
import '../../../context/MockContext/MockContext.js';
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('@dynamic-labs/sdk-api');
|
|
6
|
+
require('../../../shared/logger.cjs');
|
|
7
|
+
require('../../../config/LSSuffix.cjs');
|
|
8
|
+
require('@dynamic-labs/iconic');
|
|
9
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
10
|
+
require('react/jsx-runtime');
|
|
11
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('react');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../utils/constants/colors.cjs');
|
|
15
|
+
require('ethers');
|
|
16
|
+
var ceil = require('../../../shared/utils/functions/ceil/ceil.cjs');
|
|
17
|
+
require('../../../shared/consts/index.cjs');
|
|
18
|
+
|
|
5
19
|
const replaceAll = (text, char, replace) => {
|
|
6
20
|
const re = new RegExp(char, 'g');
|
|
7
21
|
return text.replace(re, replace);
|
|
@@ -9,6 +23,10 @@ const replaceAll = (text, char, replace) => {
|
|
|
9
23
|
const copyToClipboard = (textToCopy) => {
|
|
10
24
|
navigator.clipboard.writeText(textToCopy);
|
|
11
25
|
};
|
|
26
|
+
/** Applies Math.floor, but takes into account edge cases, like how 2.99999 should be 3 */
|
|
27
|
+
// First apply ceil with very high accuracy, to account for floating point inaccuracies
|
|
28
|
+
// const smartFloor = (value: number) => Math.floor(value);
|
|
29
|
+
const smartFloor = (value) => Math.floor(ceil.ceil(value, 13));
|
|
12
30
|
const MIN_BALANCE_VALUE = 0.0001;
|
|
13
31
|
const WITHOUT_DECIMAL_VALUE = 1000;
|
|
14
32
|
const MAX_BALANCE_VALUE = 1000000;
|
|
@@ -26,7 +44,7 @@ const roundBalance = (balanceString) => {
|
|
|
26
44
|
}
|
|
27
45
|
if (clearedBalance < MIN_BALANCE_VALUE && clearedBalance > 0)
|
|
28
46
|
return `< ${MIN_BALANCE_VALUE}`;
|
|
29
|
-
const roundedBalance =
|
|
47
|
+
const roundedBalance = smartFloor(clearedBalance * PRECISION_FLOOR_DIVIDER) /
|
|
30
48
|
PRECISION_FLOOR_DIVIDER;
|
|
31
49
|
if (roundedBalance === 0)
|
|
32
50
|
return '0.0';
|