@dynamic-labs/sdk-react-core 0.17.24 → 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 +21 -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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState } from 'react';
|
|
4
|
+
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
4
5
|
import '@dynamic-labs/sdk-api';
|
|
5
6
|
import { logger } from '../../shared/logger.js';
|
|
6
7
|
import '../../config/LSSuffix.js';
|
|
@@ -10,12 +11,10 @@ import '../../context/ViewContext/ViewContext.js';
|
|
|
10
11
|
import '@dynamic-labs/utils';
|
|
11
12
|
import '../../utils/constants/colors.js';
|
|
12
13
|
import 'ethers';
|
|
13
|
-
import { useOnClickOutside } from '../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
14
14
|
import '../../shared/consts/index.js';
|
|
15
|
-
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
16
|
-
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
17
15
|
import '@dynamic-labs/multi-wallet';
|
|
18
16
|
import { isNetworkUnsupported } from '../../utils/functions/isNetworkUnsupported/isNetworkUnsupported.js';
|
|
17
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
19
18
|
import '../../config/ApiEndpoint.js';
|
|
20
19
|
import '@dynamic-labs/rpc-providers';
|
|
21
20
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
@@ -34,13 +33,14 @@ import '../Popper/Popper/Popper.js';
|
|
|
34
33
|
import '../Popper/PopperContext/PopperContext.js';
|
|
35
34
|
import 'formik';
|
|
36
35
|
import 'yup';
|
|
36
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
37
37
|
import '../../context/MockContext/MockContext.js';
|
|
38
38
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
39
39
|
import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
|
|
40
40
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
41
|
-
import {
|
|
42
|
-
import { ActionList } from './components/ActionList/ActionList.js';
|
|
41
|
+
import { MenuList } from '../MenuList/MenuList/MenuList.js';
|
|
43
42
|
import { NetworkAction } from './components/NetworkAction/NetworkAction.js';
|
|
43
|
+
import { NetworkControl } from './components/NetworkControl/NetworkControl.js';
|
|
44
44
|
|
|
45
45
|
const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxClassName = '', connector, evmNetworks, isNetworkPickerOpen, listClassName = '', mainClassName = '', setIsNetworkPickerOpen, showNetworkName, customCallbackOnSuccess, }) => {
|
|
46
46
|
const pickerRef = useRef(null);
|
|
@@ -48,11 +48,8 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
|
|
|
48
48
|
const { loadingNetwork, network, setNetwork } = useInternalDynamicContext();
|
|
49
49
|
const { data: supportedWalletNetworks } = usePromise(() => connector === null || connector === void 0 ? void 0 : connector.getSupportedNetworks(), [network]);
|
|
50
50
|
const shouldAllowOpenDropdown = isNetworkUnsupported(network, evmNetworks) || (evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.length) > 1;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
setIsNetworkPickerOpen(false);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
51
|
+
// Ref to anchor popper to
|
|
52
|
+
const anchorRef = useRef(null);
|
|
56
53
|
const handleNetworkChange = (networkId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
54
|
setNewNetworkId(networkId);
|
|
58
55
|
try {
|
|
@@ -72,8 +69,8 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
|
|
|
72
69
|
setIsNetworkPickerOpen(false);
|
|
73
70
|
}
|
|
74
71
|
});
|
|
75
|
-
return (jsxs("div", Object.assign({ className: classNames('non-widget-network-picker', mainClassName), ref: pickerRef }, { children: [jsx(NetworkControl, { evmNetworks: evmNetworks, activeClassName: activeClassName, network: network, loading: loadingNetwork, isOpen: isNetworkPickerOpen, setIsOpen: setIsNetworkPickerOpen, walletConnector: connector, showNetworkName: showNetworkName, buttonClassName: buttonClassName }), shouldAllowOpenDropdown && (jsx(
|
|
76
|
-
|
|
72
|
+
return (jsxs("div", Object.assign({ className: classNames('non-widget-network-picker', mainClassName), ref: pickerRef }, { children: [jsx(NetworkControl, { evmNetworks: evmNetworks, activeClassName: activeClassName, network: network, loading: loadingNetwork, isOpen: isNetworkPickerOpen, setIsOpen: setIsNetworkPickerOpen, walletConnector: connector, showNetworkName: showNetworkName, buttonClassName: buttonClassName }), jsx("div", { ref: anchorRef, style: { marginTop: 5, position: 'absolute' } }), shouldAllowOpenDropdown && (jsx(MenuList, Object.assign({ className: listClassName, isOpen: isNetworkPickerOpen, onClickClose: () => setIsNetworkPickerOpen(false), popperProps: { anchorOrigin: 'bottom-left', anchorRef }, mobileTitle: 'Select network' }, { children: evmNetworks.map(({ name, networkId, vanityName, iconUrls }) => (jsx(NetworkAction, { iconUrl: iconUrls === null || iconUrls === void 0 ? void 0 : iconUrls[0], networkId: networkId, networkName: vanityName || name, network: network, onClick: handleNetworkChange, checkboxClassName: checkboxClassName, newNetworkId: newNetworkId, notSupported: supportedWalletNetworks &&
|
|
73
|
+
!supportedWalletNetworks.includes(`${networkId}`) }, networkId))) })))] })));
|
|
77
74
|
};
|
|
78
75
|
|
|
79
76
|
export { NetworkPicker };
|
|
@@ -41,6 +41,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
41
41
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
44
45
|
var NetworkControlSkeleton = require('../NetworkControlSkeleton/NetworkControlSkeleton.cjs');
|
|
45
46
|
var UnsupportedNetwork = require('../UnsupportedNetwork/UnsupportedNetwork.cjs');
|
|
46
47
|
|
|
@@ -37,6 +37,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
37
37
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
40
41
|
import { NetworkControlSkeleton } from '../NetworkControlSkeleton/NetworkControlSkeleton.js';
|
|
41
42
|
import { UnsupportedNetwork } from '../UnsupportedNetwork/UnsupportedNetwork.js';
|
|
42
43
|
|
|
@@ -42,6 +42,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
|
|
46
47
|
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) => (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('network', className, {
|
|
47
48
|
'network--not-supported': notSupported,
|
|
@@ -38,6 +38,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
|
|
42
43
|
const Network = ({ iconUrl, isActive, networkName, className, checkboxClassName = '', isChanging, notSupported = false, }) => (jsxs("div", Object.assign({ className: classNames('network', className, {
|
|
43
44
|
'network--not-supported': notSupported,
|
|
@@ -42,6 +42,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
42
42
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
43
43
|
require('formik');
|
|
44
44
|
require('yup');
|
|
45
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
45
46
|
var capitalize = require('../../../../shared/utils/functions/capitalize/capitalize.cjs');
|
|
46
47
|
|
|
47
48
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
@@ -38,6 +38,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
38
38
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
39
39
|
import 'formik';
|
|
40
40
|
import 'yup';
|
|
41
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
41
42
|
import { capitalize } from '../../../../shared/utils/functions/capitalize/capitalize.js';
|
|
42
43
|
|
|
43
44
|
const NonNetworkSwitchingSupportedControl = ({ walletConnector, className, showNetworkName = false, }) => {
|
|
@@ -50,6 +50,7 @@ require('../Popper/PopperContext/PopperContext.cjs');
|
|
|
50
50
|
require('@dynamic-labs/wallet-book');
|
|
51
51
|
require('formik');
|
|
52
52
|
require('yup');
|
|
53
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
53
54
|
|
|
54
55
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, termsOfServiceUrl, privacyPolicyUrl, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
55
56
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
|
|
@@ -46,6 +46,7 @@ import '../Popper/PopperContext/PopperContext.js';
|
|
|
46
46
|
import '@dynamic-labs/wallet-book';
|
|
47
47
|
import 'formik';
|
|
48
48
|
import 'yup';
|
|
49
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
49
50
|
|
|
50
51
|
const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, termsOfServiceUrl, privacyPolicyUrl, onPinChange, displayPoweredByDynamic = false, }) => {
|
|
51
52
|
const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
|
|
@@ -19,13 +19,15 @@ require('@dynamic-labs/wallet-connector-core');
|
|
|
19
19
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
20
20
|
require('../../utils/constants/colors.cjs');
|
|
21
21
|
require('ethers');
|
|
22
|
+
var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
22
23
|
require('../../shared/consts/index.cjs');
|
|
23
24
|
require('@dynamic-labs/multi-wallet');
|
|
24
25
|
require('@dynamic-labs/rpc-providers');
|
|
25
26
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
26
27
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
27
28
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
28
|
-
require('
|
|
29
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
30
|
+
var ShadowDOM = require('../ShadowDOM/ShadowDOM.cjs');
|
|
29
31
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
30
32
|
require('react-focus-lock');
|
|
31
33
|
require('../IconButton/IconButton.cjs');
|
|
@@ -35,22 +37,19 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
35
37
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
36
38
|
require('formik');
|
|
37
39
|
require('yup');
|
|
40
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
38
41
|
require('../../context/MockContext/MockContext.cjs');
|
|
39
42
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
40
43
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
41
44
|
var OverlayCard_context = require('./OverlayCard.context.cjs');
|
|
42
45
|
|
|
43
|
-
const
|
|
44
|
-
const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
|
|
46
|
+
const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
|
|
45
47
|
const context = React.useContext(OverlayCard_context.overlayCardContext);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return null;
|
|
52
|
-
return reactDom.createPortal(jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(SlideInUpTransition.SlideInUpTransition, {}) }, { children: isOpen && (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && jsxRuntime.jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
|
|
48
|
+
usePreventPageScroll.usePreventPageScroll(isOpen && !context.portal);
|
|
49
|
+
const content = (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(SlideInUpTransition.SlideInUpTransition, {}) }, { children: isOpen && (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}) }, { children: isOpen && (jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames(className, 'overlay-card--content'), style: style }, { children: children }))) }))) }))] }));
|
|
50
|
+
if (context === null || context === void 0 ? void 0 : context.portal)
|
|
51
|
+
return reactDom.createPortal(content, context.portal);
|
|
52
|
+
return reactDom.createPortal(jsxRuntime.jsx(ShadowDOM.ShadowDOM, { children: content }), document.body);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
exports.OverlayCard = OverlayCard;
|
|
56
|
-
exports.noContextError = noContextError;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { FC, MouseEventHandler, PropsWithChildren } from 'react';
|
|
1
|
+
import { CSSProperties, FC, MouseEventHandler, PropsWithChildren } from 'react';
|
|
2
2
|
type OverlayCardProps = {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
onClickOverlay?: MouseEventHandler<HTMLDivElement>;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
maxHeight?: number;
|
|
5
8
|
};
|
|
6
|
-
export declare const noContextError: Error;
|
|
7
9
|
export declare const OverlayCard: FC<PropsWithChildren<OverlayCardProps>>;
|
|
8
10
|
export {};
|
|
@@ -15,13 +15,15 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
15
15
|
import '../../context/ViewContext/ViewContext.js';
|
|
16
16
|
import '../../utils/constants/colors.js';
|
|
17
17
|
import 'ethers';
|
|
18
|
+
import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
18
19
|
import '../../shared/consts/index.js';
|
|
19
20
|
import '@dynamic-labs/multi-wallet';
|
|
20
21
|
import '@dynamic-labs/rpc-providers';
|
|
21
22
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
22
23
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
23
24
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
24
|
-
import '
|
|
25
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
26
|
+
import { ShadowDOM } from '../ShadowDOM/ShadowDOM.js';
|
|
25
27
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
26
28
|
import 'react-focus-lock';
|
|
27
29
|
import '../IconButton/IconButton.js';
|
|
@@ -31,21 +33,19 @@ import '../Popper/Popper/Popper.js';
|
|
|
31
33
|
import '../Popper/PopperContext/PopperContext.js';
|
|
32
34
|
import 'formik';
|
|
33
35
|
import 'yup';
|
|
36
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
34
37
|
import '../../context/MockContext/MockContext.js';
|
|
35
38
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
36
39
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
37
40
|
import { overlayCardContext } from './OverlayCard.context.js';
|
|
38
41
|
|
|
39
|
-
const
|
|
40
|
-
const OverlayCard = ({ isOpen, children, onClickOverlay, }) => {
|
|
42
|
+
const OverlayCard = ({ isOpen, children, onClickOverlay, style, className, }) => {
|
|
41
43
|
const context = useContext(overlayCardContext);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return null;
|
|
48
|
-
return createPortal(jsxs("div", { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(SlideInUpTransition, {}) }, { children: isOpen && (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && jsx("div", Object.assign({ className: 'overlay-card--content' }, { children: children })) }))) }))] }), portal);
|
|
44
|
+
usePreventPageScroll(isOpen && !context.portal);
|
|
45
|
+
const content = (jsxs("div", { children: [jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", { onClick: onClickOverlay, className: 'overlay-card--overlay' })) })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(SlideInUpTransition, {}) }, { children: isOpen && (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(OpacityTransition, {}) }, { children: isOpen && (jsx("div", Object.assign({ className: classNames(className, 'overlay-card--content'), style: style }, { children: children }))) }))) }))] }));
|
|
46
|
+
if (context === null || context === void 0 ? void 0 : context.portal)
|
|
47
|
+
return createPortal(content, context.portal);
|
|
48
|
+
return createPortal(jsx(ShadowDOM, { children: content }), document.body);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
export { OverlayCard
|
|
51
|
+
export { OverlayCard };
|
|
@@ -5,28 +5,28 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
|
+
var PopperContent = require('../PopperContent/PopperContent.cjs');
|
|
8
9
|
var PopperContext = require('../PopperContext/PopperContext.cjs');
|
|
9
10
|
var getChildPosition = require('../utils/getChildPosition/getChildPosition.cjs');
|
|
10
|
-
var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs');
|
|
11
|
-
var PopperContent = require('../PopperContent/PopperContent.cjs');
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
// eslint-disable-next-line multiline-comment-style
|
|
13
|
+
/** Allows to render content outside of the current DOM parent and specify a reference position
|
|
14
|
+
* To allow for opening and closing of menus, see MenuList and Dropdown components
|
|
15
|
+
*/
|
|
16
|
+
const Popper = React.forwardRef(({ anchorRef, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, style, className, }, ref) => {
|
|
14
17
|
const { containerRef } = PopperContext.usePopper();
|
|
15
18
|
const [anchorPosition, setAnchorPosition] = React.useState();
|
|
16
19
|
const container = containerRef.current;
|
|
20
|
+
// Calculates anchor position based on anchorOrigin's relative position to popper's container
|
|
21
|
+
// and sets up scroll listener to close popper
|
|
17
22
|
React.useEffect(() => {
|
|
18
|
-
if (!isOpen) {
|
|
19
|
-
return setAnchorPosition(undefined);
|
|
20
|
-
}
|
|
21
23
|
const container = containerRef.current;
|
|
22
24
|
const anchor = anchorRef.current;
|
|
23
25
|
if (!container || !anchor)
|
|
24
26
|
return;
|
|
25
27
|
setAnchorPosition(getChildPosition.getChildPosition(container, anchor));
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
}, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
|
|
28
|
+
}, [anchorRef, containerRef, setAnchorPosition]);
|
|
29
|
+
/** Position of the anchor's vertex that was selected by anchorOrigin */
|
|
30
30
|
const anchorOriginPosition = React.useMemo(() => {
|
|
31
31
|
var _a;
|
|
32
32
|
const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
@@ -45,9 +45,9 @@ const Popper = React.forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin =
|
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
47
47
|
}, [anchorPosition, anchorRef, anchorOrigin]);
|
|
48
|
-
if (!
|
|
48
|
+
if (!anchorOriginPosition || container === null)
|
|
49
49
|
return null;
|
|
50
|
-
return reactDom.createPortal(jsxRuntime.jsx(PopperContent.PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
|
|
50
|
+
return reactDom.createPortal(jsxRuntime.jsx(PopperContent.PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: Object.assign(Object.assign({}, anchorOriginPosition), style), className: className }, { children: children })), container);
|
|
51
51
|
});
|
|
52
52
|
Popper.displayName = 'Popper';
|
|
53
53
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { MutableRefObject } from 'react';
|
|
1
|
+
import { CSSProperties, MutableRefObject } from 'react';
|
|
2
2
|
import { AnchorOrigin, TransformOrigin } from '../Popper.types';
|
|
3
3
|
export type PopperProps = {
|
|
4
|
-
anchorOrigin?: AnchorOrigin;
|
|
5
4
|
anchorRef: MutableRefObject<HTMLElement | null>;
|
|
6
|
-
|
|
7
|
-
setIsOpen: (isOpen: boolean) => void;
|
|
5
|
+
anchorOrigin?: AnchorOrigin;
|
|
8
6
|
transformOrigin?: TransformOrigin;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
+
/** Allows to render content outside of the current DOM parent and specify a reference position
|
|
11
|
+
* To allow for opening and closing of menus, see MenuList and Dropdown components
|
|
12
|
+
*/
|
|
10
13
|
export declare const Popper: import("react").ForwardRefExoticComponent<PopperProps & {
|
|
11
14
|
children?: import("react").ReactNode;
|
|
12
15
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef, useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
+
import { PopperContent } from '../PopperContent/PopperContent.js';
|
|
4
5
|
import { usePopper } from '../PopperContext/PopperContext.js';
|
|
5
6
|
import { getChildPosition } from '../utils/getChildPosition/getChildPosition.js';
|
|
6
|
-
import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js';
|
|
7
|
-
import { PopperContent } from '../PopperContent/PopperContent.js';
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
// eslint-disable-next-line multiline-comment-style
|
|
9
|
+
/** Allows to render content outside of the current DOM parent and specify a reference position
|
|
10
|
+
* To allow for opening and closing of menus, see MenuList and Dropdown components
|
|
11
|
+
*/
|
|
12
|
+
const Popper = forwardRef(({ anchorRef, anchorOrigin = 'top-left', transformOrigin = 'top-left', children, style, className, }, ref) => {
|
|
10
13
|
const { containerRef } = usePopper();
|
|
11
14
|
const [anchorPosition, setAnchorPosition] = useState();
|
|
12
15
|
const container = containerRef.current;
|
|
16
|
+
// Calculates anchor position based on anchorOrigin's relative position to popper's container
|
|
17
|
+
// and sets up scroll listener to close popper
|
|
13
18
|
useEffect(() => {
|
|
14
|
-
if (!isOpen) {
|
|
15
|
-
return setAnchorPosition(undefined);
|
|
16
|
-
}
|
|
17
19
|
const container = containerRef.current;
|
|
18
20
|
const anchor = anchorRef.current;
|
|
19
21
|
if (!container || !anchor)
|
|
20
22
|
return;
|
|
21
23
|
setAnchorPosition(getChildPosition(container, anchor));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
}, [anchorRef, containerRef, isOpen, setAnchorPosition, setIsOpen]);
|
|
24
|
+
}, [anchorRef, containerRef, setAnchorPosition]);
|
|
25
|
+
/** Position of the anchor's vertex that was selected by anchorOrigin */
|
|
26
26
|
const anchorOriginPosition = useMemo(() => {
|
|
27
27
|
var _a;
|
|
28
28
|
const anchorRect = (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
@@ -41,9 +41,9 @@ const Popper = forwardRef(({ anchorRef, isOpen, setIsOpen, anchorOrigin = 'top-l
|
|
|
41
41
|
return undefined;
|
|
42
42
|
}
|
|
43
43
|
}, [anchorPosition, anchorRef, anchorOrigin]);
|
|
44
|
-
if (!
|
|
44
|
+
if (!anchorOriginPosition || container === null)
|
|
45
45
|
return null;
|
|
46
|
-
return createPortal(jsx(PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: anchorOriginPosition }, { children: children })), container);
|
|
46
|
+
return createPortal(jsx(PopperContent, Object.assign({ ref: ref, transformOrigin: transformOrigin, style: Object.assign(Object.assign({}, anchorOriginPosition), style), className: className }, { children: children })), container);
|
|
47
47
|
});
|
|
48
48
|
Popper.displayName = 'Popper';
|
|
49
49
|
|
|
@@ -12,7 +12,7 @@ const mapTransformOriginToClassName = {
|
|
|
12
12
|
'top-left': 'popper-content__transform-origin-top-left',
|
|
13
13
|
'top-right': 'popper-content__transform-origin-top-right',
|
|
14
14
|
};
|
|
15
|
-
const PopperContent = React.forwardRef(({ children, transformOrigin, style }, ref) => (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames.classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
|
|
15
|
+
const PopperContent = React.forwardRef(({ children, transformOrigin, style, className }, ref) => (jsxRuntime.jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames.classNames('popper-content', mapTransformOriginToClassName[transformOrigin], className), style: style }, { children: children }))));
|
|
16
16
|
PopperContent.displayName = 'PopperContent';
|
|
17
17
|
|
|
18
18
|
exports.PopperContent = PopperContent;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { TransformOrigin } from '../Popper.types';
|
|
3
3
|
export type PopperContentProps = {
|
|
4
|
-
style?: CSSProperties;
|
|
5
4
|
transformOrigin: TransformOrigin;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
className?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const PopperContent: import("react").ForwardRefExoticComponent<PopperContentProps & {
|
|
8
9
|
children?: import("react").ReactNode;
|
|
@@ -8,7 +8,7 @@ const mapTransformOriginToClassName = {
|
|
|
8
8
|
'top-left': 'popper-content__transform-origin-top-left',
|
|
9
9
|
'top-right': 'popper-content__transform-origin-top-right',
|
|
10
10
|
};
|
|
11
|
-
const PopperContent = forwardRef(({ children, transformOrigin, style }, ref) => (jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames('popper-content', mapTransformOriginToClassName[transformOrigin]), style: style }, { children: children }))));
|
|
11
|
+
const PopperContent = forwardRef(({ children, transformOrigin, style, className }, ref) => (jsx("div", Object.assign({ "data-testid": 'popper-content', ref: ref, className: classNames('popper-content', mapTransformOriginToClassName[transformOrigin], className), style: style }, { children: children }))));
|
|
12
12
|
PopperContent.displayName = 'PopperContent';
|
|
13
13
|
|
|
14
14
|
export { PopperContent };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
/** Return element's top-left position relative to root */
|
|
5
6
|
const getChildPosition = (root, element) => {
|
|
6
7
|
const rootRect = root.getBoundingClientRect();
|
|
7
8
|
const elementRect = element.getBoundingClientRect();
|
|
@@ -36,6 +36,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
36
36
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
37
37
|
require('formik');
|
|
38
38
|
require('yup');
|
|
39
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
39
40
|
require('../../context/MockContext/MockContext.cjs');
|
|
40
41
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
41
42
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -32,6 +32,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
32
32
|
import '../Popper/PopperContext/PopperContext.js';
|
|
33
33
|
import 'formik';
|
|
34
34
|
import 'yup';
|
|
35
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
35
36
|
import '../../context/MockContext/MockContext.js';
|
|
36
37
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
37
38
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -40,6 +40,7 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
40
40
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
41
41
|
require('formik');
|
|
42
42
|
require('yup');
|
|
43
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
43
44
|
require('../../context/MockContext/MockContext.cjs');
|
|
44
45
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
45
46
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -36,6 +36,7 @@ import '../Popper/Popper/Popper.js';
|
|
|
36
36
|
import '../Popper/PopperContext/PopperContext.js';
|
|
37
37
|
import 'formik';
|
|
38
38
|
import 'yup';
|
|
39
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
39
40
|
import '../../context/MockContext/MockContext.js';
|
|
40
41
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
41
42
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -43,6 +43,7 @@ require('../Popper/PopperContext/PopperContext.cjs');
|
|
|
43
43
|
require('@dynamic-labs/wallet-book');
|
|
44
44
|
require('formik');
|
|
45
45
|
require('yup');
|
|
46
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
46
47
|
require('../../context/MockContext/MockContext.cjs');
|
|
47
48
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
48
49
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -39,6 +39,7 @@ import '../Popper/PopperContext/PopperContext.js';
|
|
|
39
39
|
import '@dynamic-labs/wallet-book';
|
|
40
40
|
import 'formik';
|
|
41
41
|
import 'yup';
|
|
42
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
42
43
|
import '../../context/MockContext/MockContext.js';
|
|
43
44
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
44
45
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -38,6 +38,7 @@ require('../../Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../../Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('../../MenuList/Dropdown/Dropdown.cjs');
|
|
41
42
|
require('../../../context/MockContext/MockContext.cjs');
|
|
42
43
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
43
44
|
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -34,6 +34,7 @@ import '../../Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../../Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import '../../MenuList/Dropdown/Dropdown.js';
|
|
37
38
|
import '../../../context/MockContext/MockContext.js';
|
|
38
39
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
39
40
|
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -38,6 +38,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
41
42
|
var VerifiedEmailIcon = require('./components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
42
43
|
|
|
43
44
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -34,6 +34,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
37
38
|
import { VerifiedEmailIcon } from './components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
38
39
|
|
|
39
40
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -38,6 +38,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
38
38
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
require('formik');
|
|
40
40
|
require('yup');
|
|
41
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
41
42
|
|
|
42
43
|
const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
43
44
|
|
|
@@ -34,6 +34,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
34
34
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import 'formik';
|
|
36
36
|
import 'yup';
|
|
37
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
37
38
|
|
|
38
39
|
const UserProfileSection = ({ title, children, }) => (jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsx(Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
39
40
|
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -44,6 +44,7 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
44
44
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
45
45
|
require('formik');
|
|
46
46
|
require('yup');
|
|
47
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
47
48
|
var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
|
|
48
49
|
var useUpdateUserProfileByJWTCallback = require('../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs');
|
|
49
50
|
var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -40,6 +40,7 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
40
40
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
41
41
|
import 'formik';
|
|
42
42
|
import 'yup';
|
|
43
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
43
44
|
import { capitalize } from '../../../../widgets/DynamicWidget/helpers/helpers.js';
|
|
44
45
|
import { useUpdateUserProfileByJWTCallback } from '../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js';
|
|
45
46
|
import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
|
|
@@ -66,7 +66,9 @@ require('../../components/Popper/Popper/Popper.cjs');
|
|
|
66
66
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
67
67
|
require('formik');
|
|
68
68
|
require('yup');
|
|
69
|
+
require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
69
70
|
var FundingContext = require('../FundingContext/FundingContext.cjs');
|
|
71
|
+
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
70
72
|
require('../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs');
|
|
71
73
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
72
74
|
require('qrcode');
|
|
@@ -62,7 +62,9 @@ import '../../components/Popper/Popper/Popper.js';
|
|
|
62
62
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
63
63
|
import 'formik';
|
|
64
64
|
import 'yup';
|
|
65
|
+
import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
65
66
|
import { FundingContextProvider } from '../FundingContext/FundingContext.js';
|
|
67
|
+
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
66
68
|
import '../../widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js';
|
|
67
69
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
68
70
|
import 'qrcode';
|