@dynamic-labs/sdk-react-core 0.18.0-RC.8 → 0.18.0-beta.28
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 +275 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +9 -9
- package/src/index.cjs +19 -11
- package/src/index.d.ts +3 -1
- package/src/index.js +9 -4
- package/src/lib/Main.cjs +53 -10
- package/src/lib/Main.js +53 -10
- package/src/lib/assets/index.d.ts +1 -0
- package/src/lib/assets/no-wallet-found.cjs +75 -0
- package/src/lib/assets/no-wallet-found.js +51 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +4 -2
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +4 -2
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +4 -2
- package/src/lib/components/AnimatePresence/AnimatePresence.js +4 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +4 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +4 -2
- package/src/lib/components/Button/Button.cjs +12 -4
- package/src/lib/components/Button/Button.d.ts +3 -2
- package/src/lib/components/Button/Button.js +12 -4
- package/src/lib/components/ChainCard/ChainCard.cjs +1 -1
- package/src/lib/components/ChainCard/ChainCard.js +1 -1
- package/src/lib/components/Divider/Divider.cjs +4 -2
- package/src/lib/components/Divider/Divider.js +4 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -2
- package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
- package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
- package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/index.d.ts +2 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.cjs +9 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.d.ts +2 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.js +5 -0
- package/src/lib/components/LegacySafariCssOverrides/index.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +17 -3
- package/src/lib/components/LogoutButton/LogoutButton.js +17 -3
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +86 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +82 -0
- package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +34 -0
- package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
- package/src/lib/components/MenuList/MenuList/MenuList.js +30 -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/Modal/Modal.cjs +39 -1
- package/src/lib/components/Modal/Modal.d.ts +3 -0
- package/src/lib/components/Modal/Modal.js +39 -1
- package/src/lib/components/ModalCard/ModalCard.cjs +4 -1
- package/src/lib/components/ModalCard/ModalCard.d.ts +6 -1
- package/src/lib/components/ModalCard/ModalCard.js +4 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +13 -15
- package/src/lib/components/NetworkPicker/NetworkPicker.js +13 -15
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +4 -2
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +4 -2
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +4 -2
- package/src/lib/components/NetworkPicker/components/Network/Network.js +4 -2
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +0 -5
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +1 -1
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +0 -5
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +4 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +4 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +4 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +4 -2
- package/src/lib/components/OverlayCard/OverlayCard.cjs +13 -13
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
- package/src/lib/components/OverlayCard/OverlayCard.js +14 -13
- 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/PopperContext/PopperContext.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 +6 -4
- package/src/lib/components/Portal/Portal.js +6 -4
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +9 -1
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +9 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +4 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.js +4 -2
- package/src/lib/components/Step/Step.cjs +35 -3
- package/src/lib/components/Step/Step.d.ts +3 -3
- package/src/lib/components/Step/Step.js +36 -4
- package/src/lib/components/Toolkit/Toolkit.cjs +3 -3
- package/src/lib/components/Toolkit/Toolkit.js +3 -3
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.cjs +18 -0
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +8 -0
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.js +14 -0
- package/src/lib/components/Toolkit/components/index.d.ts +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +4 -2
- package/src/lib/components/Tooltip/Tooltip.js +4 -2
- package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -3
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +1 -6
- package/src/lib/components/TosAndPp/TosAndPp.js +19 -4
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +5 -3
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +5 -3
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +4 -2
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +4 -2
- package/src/lib/components/UserAddress/UserAddress.cjs +32 -2
- package/src/lib/components/UserAddress/UserAddress.d.ts +4 -2
- package/src/lib/components/UserAddress/UserAddress.js +32 -2
- package/src/lib/components/UserProfile/UserProfile.cjs +6 -14
- package/src/lib/components/UserProfile/UserProfile.js +6 -14
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +4 -2
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +17 -67
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.d.ts +2 -4
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +17 -67
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +33 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.d.ts +11 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +29 -0
- package/src/lib/components/WalletInformationCard/index.d.ts +1 -0
- package/src/lib/components/index.d.ts +3 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.cjs +27 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.d.ts +17 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.js +21 -0
- package/src/lib/context/AccountExistsContext/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +190 -84
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +13 -127
- package/src/lib/context/DynamicContext/DynamicContext.js +193 -88
- package/src/lib/context/DynamicContext/helpers.cjs +16 -2
- package/src/lib/context/DynamicContext/helpers.d.ts +8 -0
- package/src/lib/context/DynamicContext/helpers.js +16 -3
- package/src/lib/context/DynamicContext/hooks/index.d.ts +4 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +33 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +29 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +146 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +7 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +4 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +4 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +9 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +9 -3
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +8 -3
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +2 -2
- package/src/lib/context/DynamicContext/useDynamicContext.js +8 -3
- package/src/lib/context/DynamicContext/useInternalDynamicContext.d.ts +1 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +13 -1
- package/src/lib/context/FundingContext/FundingContext.js +13 -1
- package/src/lib/context/MockContext/MockContext.cjs +36 -2
- package/src/lib/context/MockContext/MockContext.d.ts +1 -1
- package/src/lib/context/MockContext/MockContext.js +36 -2
- package/src/lib/context/MockContext/constants/index.cjs +64 -0
- package/src/lib/context/MockContext/constants/index.d.ts +2 -0
- package/src/lib/context/MockContext/constants/index.js +60 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +4 -2
- package/src/lib/context/QrCodeContext/QrCodeContext.js +4 -2
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +4 -2
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +4 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +6 -5
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +6 -5
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +4 -1
- package/src/lib/context/WalletContext/WalletContext.js +4 -1
- package/src/lib/data/api.cjs +27 -0
- package/src/lib/data/api.d.ts +4 -0
- package/src/lib/data/api.js +28 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +25 -21
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +26 -22
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +7 -3
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +7 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +5 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +5 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +4 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +4 -2
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +8 -5
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +8 -5
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +61 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +57 -0
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
- package/src/lib/layouts/{SelectWalletListLayout/SelectWalletListLayout.cjs → BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs} +8 -7
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.d.ts +9 -0
- package/src/lib/layouts/{SelectWalletListLayout/SelectWalletListLayout.js → BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js} +8 -7
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/index.d.ts +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +4 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +4 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +6 -4
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +6 -4
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +4 -2
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +4 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +4 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +4 -2
- package/src/lib/modals/index.d.ts +0 -1
- package/src/lib/shared/types/index.d.ts +6 -2
- package/src/lib/shared/utils/classes/storage/localStorage.cjs +42 -24
- package/src/lib/shared/utils/classes/storage/localStorage.d.ts +17 -3
- package/src/lib/shared/utils/classes/storage/localStorage.js +43 -25
- package/src/lib/shared/utils/hooks/index.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.cjs +27 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.d.ts +17 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.js +23 -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/constants/localStorage.cjs +3 -1
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +3 -2
- package/src/lib/utils/constants/onrampProviders.cjs +7 -0
- package/src/lib/utils/constants/onrampProviders.d.ts +1 -0
- package/src/lib/utils/constants/onrampProviders.js +3 -0
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +10 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +10 -1
- package/src/lib/utils/functions/generateMessages/index.cjs +3 -3
- package/src/lib/utils/functions/generateMessages/index.d.ts +1 -1
- package/src/lib/utils/functions/generateMessages/index.js +3 -3
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +2 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +2 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +16 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +3 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.js +12 -0
- package/src/lib/utils/functions/getMissingChains/index.d.ts +1 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -2
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +3 -3
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -2
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +3 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +3 -1
- package/src/lib/utils/functions/index.d.ts +4 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +4 -2
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +4 -2
- package/src/lib/utils/functions/isOnrampProvider/index.d.ts +1 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.cjs +9 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.d.ts +2 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.js +5 -0
- package/src/lib/utils/functions/isProviderEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.cjs +7 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isProviderEnabled/isProviderEnabled.js +3 -0
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -2
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.d.ts +1 -1
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -2
- package/src/lib/utils/functions/isSocialKycEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs +7 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.js +3 -0
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
- package/src/lib/utils/functions/storeAuthToken/index.cjs +1 -3
- package/src/lib/utils/functions/storeAuthToken/index.js +1 -3
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +31 -6
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +32 -7
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +11 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +11 -2
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +5 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +5 -2
- package/src/lib/utils/hooks/index.d.ts +2 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +17 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +8 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +13 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +22 -5
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +5 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +22 -5
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +9 -11
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +9 -11
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.cjs +29 -0
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.d.ts +5 -0
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.js +25 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -5
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -5
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +16 -3
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +16 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +142 -97
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +17 -15
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +143 -98
- package/src/lib/utils/hooks/useConnectWithEmail/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +6 -4
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +1 -4
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +6 -4
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +13 -23
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +13 -23
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +69 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +65 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +5 -4
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +5 -4
- package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
- package/src/lib/utils/hooks/useEmailProvider/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +54 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +10 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +50 -0
- package/src/lib/utils/hooks/useEventListener/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.cjs +25 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.d.ts +1 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.js +21 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -2
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +6 -10
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +7 -11
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +20 -5
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +20 -5
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +17 -2
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +17 -2
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +93 -29
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +33 -3
- package/src/lib/utils/hooks/usePromise/usePromise.js +94 -30
- package/src/lib/utils/hooks/usePromise/usePromise.types.d.ts +9 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.cjs +18 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.d.ts +13 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.js +14 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePromise/utils/index.d.ts +2 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +32 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.d.ts +5 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +28 -0
- package/src/lib/utils/hooks/useSocialAccounts/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +159 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +10 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +155 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +32 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +8 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +33 -7
- package/src/lib/utils/hooks/useValidateSession/index.d.ts +1 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +82 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +12 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +78 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +18 -21
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +19 -22
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +12 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +12 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +31 -4
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +5 -4
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +31 -4
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -6
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +4 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +4 -2
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +6 -0
- package/src/lib/utils/hooks/useWallets/useWallets.js +7 -1
- package/src/lib/utils/hooks/useWallets/utils/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +35 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.d.ts +6 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +29 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +73 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.d.ts +2 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.js +69 -0
- package/src/lib/views/AccountExistsView/index.d.ts +1 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +38 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.d.ts +2 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +34 -0
- package/src/lib/views/BridgeNextWalletConnectionView/index.d.ts +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +44 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.d.ts +2 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +40 -0
- package/src/lib/views/BridgeSummaryView/index.d.ts +1 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +48 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.d.ts +2 -0
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +44 -0
- package/src/lib/views/BridgeWelcomeView/index.d.ts +1 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +6 -5
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +6 -5
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +5 -3
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +5 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +14 -5
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +14 -5
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +4 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +4 -2
- 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 +5 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +5 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +5 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +5 -3
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +4 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +4 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +14 -6
- package/src/lib/views/EmailVerification/EmailVerification.js +15 -7
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +4 -2
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +4 -2
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +5 -3
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +5 -3
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +27 -52
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +27 -52
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +2 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +2 -2
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +11 -7
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +11 -7
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +28 -23
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +29 -24
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +28 -22
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +28 -22
- package/src/lib/views/NoAccess/NoAccess.cjs +16 -23
- package/src/lib/views/NoAccess/NoAccess.js +16 -23
- package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +4 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +4 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +4 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +4 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +4 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.js +4 -2
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +4 -2
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +4 -2
- package/src/lib/views/QrCodeView/QRCode.cjs +4 -2
- package/src/lib/views/QrCodeView/QRCode.js +4 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +4 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +4 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +4 -2
- package/src/lib/views/QrCodeView/QrCodeView.js +4 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +6 -4
- package/src/lib/views/SendBalanceView/SendBalanceView.js +6 -4
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +4 -2
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +4 -2
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -2
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +4 -2
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +4 -2
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +5 -3
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +5 -3
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.cjs → SearchNotFoundMessage/SearchNotFoundMessage.cjs} +7 -4
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +8 -0
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.js → SearchNotFoundMessage/SearchNotFoundMessage.js} +7 -4
- package/src/lib/views/WalletList/SearchNotFoundMessage/index.d.ts +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +9 -7
- package/src/lib/views/WalletList/WalletList.js +10 -8
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +9 -6
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +9 -6
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.types.d.ts +1 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +5 -3
- package/src/lib/views/WalletLockedView/WalletLockedView.js +5 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +9 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.js +9 -4
- package/src/lib/views/viewToComponentMap.cjs +9 -0
- package/src/lib/views/viewToComponentMap.js +9 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +19 -11
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +20 -12
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +4 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +4 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +4 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +4 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +31 -10
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +32 -11
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +61 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.d.ts +7 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +57 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/index.d.ts +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +20 -13
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +20 -13
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +11 -11
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.d.ts +6 -6
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +12 -12
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +14 -6
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +16 -8
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +10 -8
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +10 -8
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +5 -3
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +8 -6
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +8 -6
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +8 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +8 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +7 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +7 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +5 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +6 -4
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +4 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +4 -2
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +17 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +17 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +5 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +4 -2
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +4 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +4 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +4 -2
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +4 -2
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +4 -2
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -71
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -65
- 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/Toolkit/components/BrandStyleSwitch.cjs +0 -22
- package/src/lib/components/Toolkit/components/BrandStyleSwitch.d.ts +0 -2
- package/src/lib/components/Toolkit/components/BrandStyleSwitch.js +0 -18
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.cjs +0 -77
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.d.ts +0 -2
- package/src/lib/modals/MultiWalletStepSelectorModal/MultiWalletStepSelectorModal.js +0 -73
- package/src/lib/modals/MultiWalletStepSelectorModal/index.d.ts +0 -1
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.cjs +0 -62
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.d.ts +0 -6
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/ResumeView.js +0 -58
- package/src/lib/modals/MultiWalletStepSelectorModal/views/ResumeView/index.d.ts +0 -1
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.cjs +0 -89
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.d.ts +0 -8
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/SelectWalletView.js +0 -85
- package/src/lib/modals/MultiWalletStepSelectorModal/views/SelectWalletView/index.d.ts +0 -1
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.cjs +0 -72
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.d.ts +0 -7
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/WelcomeView.js +0 -68
- package/src/lib/modals/MultiWalletStepSelectorModal/views/WelcomeView/index.d.ts +0 -1
- package/src/lib/modals/MultiWalletStepSelectorModal/views/index.d.ts +0 -3
- package/src/lib/utils/functions/groupBy/groupBy.cjs +0 -30
- package/src/lib/utils/functions/groupBy/groupBy.js +0 -26
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.d.ts +0 -2
- package/src/lib/views/WalletList/SearchInstead/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs +0 -23
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.d.ts +0 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js +0 -19
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -53
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -10
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -45
- /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
|
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var Typography = require('../Typography/Typography.cjs');
|
|
7
7
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
8
|
|
|
9
|
-
const ChainCard = ({ onClick, chainName, startSlot, endSlot, className, }) => (jsxRuntime.jsxs("div", Object.assign({ onClick: onClick, role: 'button', tabIndex: 1, className: classNames.classNames('chain-card', className) }, { children: [startSlot, jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal', weight: 'medium' }, { children: chainName })), endSlot] })));
|
|
9
|
+
const ChainCard = ({ onClick, chainName, startSlot, endSlot, className, }) => (jsxRuntime.jsxs("div", Object.assign({ onClick: onClick, role: 'button', tabIndex: 1, className: classNames.classNames('chain-card', className) }, { children: [startSlot, jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal', weight: 'medium', className: 'chain-card__text' }, { children: chainName })), endSlot] })));
|
|
10
10
|
|
|
11
11
|
exports.ChainCard = ChainCard;
|
|
@@ -2,6 +2,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Typography } from '../Typography/Typography.js';
|
|
3
3
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
4
|
|
|
5
|
-
const ChainCard = ({ onClick, chainName, startSlot, endSlot, className, }) => (jsxs("div", Object.assign({ onClick: onClick, role: 'button', tabIndex: 1, className: classNames('chain-card', className) }, { children: [startSlot, jsx(Typography, Object.assign({ color: 'primary', variant: 'body_normal', weight: 'medium' }, { children: chainName })), endSlot] })));
|
|
5
|
+
const ChainCard = ({ onClick, chainName, startSlot, endSlot, className, }) => (jsxs("div", Object.assign({ onClick: onClick, role: 'button', tabIndex: 1, className: classNames('chain-card', className) }, { children: [startSlot, jsx(Typography, Object.assign({ color: 'primary', variant: 'body_normal', weight: 'medium', className: 'chain-card__text' }, { children: chainName })), endSlot] })));
|
|
6
6
|
|
|
7
7
|
export { ChainCard };
|
|
@@ -28,12 +28,12 @@ require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
|
28
28
|
require('../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
29
|
require('../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
|
+
require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
31
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
32
33
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
35
|
require('../IconButton/IconButton.cjs');
|
|
34
36
|
require('../Alert/Alert.cjs');
|
|
35
|
-
require('../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
36
|
-
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
37
37
|
require('../../context/MockContext/MockContext.cjs');
|
|
38
38
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
39
39
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -41,6 +41,8 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
41
41
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
42
42
|
require('formik');
|
|
43
43
|
require('yup');
|
|
44
|
+
require('../InlineWidget/InlineWidget.cjs');
|
|
45
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
44
46
|
|
|
45
47
|
const Divider = ({ text, className = '', fullWidth = false }) => (jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('divider', className, {
|
|
46
48
|
'divider__full-width': fullWidth,
|
|
@@ -24,12 +24,12 @@ import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
24
24
|
import '../Transition/OpacityTransition/OpacityTransition.js';
|
|
25
25
|
import '../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
|
+
import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
28
29
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
31
|
import '../IconButton/IconButton.js';
|
|
30
32
|
import '../Alert/Alert.js';
|
|
31
|
-
import '../../context/WalletGroupContext/WalletGroupContext.js';
|
|
32
|
-
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
33
33
|
import '../../context/MockContext/MockContext.js';
|
|
34
34
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
35
35
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -37,6 +37,8 @@ import '../Popper/Popper/Popper.js';
|
|
|
37
37
|
import '../Popper/PopperContext/PopperContext.js';
|
|
38
38
|
import 'formik';
|
|
39
39
|
import 'yup';
|
|
40
|
+
import '../InlineWidget/InlineWidget.js';
|
|
41
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
40
42
|
|
|
41
43
|
const Divider = ({ text, className = '', fullWidth = false }) => (jsxs("div", Object.assign({ className: classNames('divider', className, {
|
|
42
44
|
'divider__full-width': fullWidth,
|
|
@@ -4,6 +4,7 @@ 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');
|
|
7
8
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
9
|
require('@dynamic-labs/sdk-api');
|
|
9
10
|
require('../../shared/logger.cjs');
|
|
@@ -11,7 +12,6 @@ require('@dynamic-labs/iconic');
|
|
|
11
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
13
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
14
|
require('@dynamic-labs/wallet-book');
|
|
14
|
-
require('@dynamic-labs/utils');
|
|
15
15
|
require('../../utils/constants/colors.cjs');
|
|
16
16
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
17
17
|
require('ethers');
|
|
@@ -42,7 +42,7 @@ const IconWithSpinner = ({ iconSize = 24, Icon, isSpinning = false, className =
|
|
|
42
42
|
} }, { children: [Icon && (jsxRuntime.jsxs("div", Object.assign({ style: {
|
|
43
43
|
height: pixelToRem.pixelToRem(realIconSize),
|
|
44
44
|
width: pixelToRem.pixelToRem(realIconSize),
|
|
45
|
-
}, className: 'icon-with-spinner__icon-container' }, { children: [typeof Icon === 'function' ? (jsxRuntime.jsx(Icon, { height: realIconSize, width: realIconSize })) : (Icon), indicator && jsxRuntime.jsx(Indicator.Indicator, { indicator: indicator, iconSize: iconSize })] }))), isSpinning && (jsxRuntime.jsx("div", Object.assign({ className: 'icon-with-spinner__spinner-container', "data-chromatic": 'ignore', style: {
|
|
45
|
+
}, className: 'icon-with-spinner__icon-container' }, { children: [typeof Icon === 'function' ? (jsxRuntime.jsx(Icon, { height: realIconSize, width: realIconSize })) : (Icon), indicator && jsxRuntime.jsx(Indicator.Indicator, { indicator: indicator, iconSize: iconSize })] }))), isSpinning && !utils.isLegacySafari() && (jsxRuntime.jsx("div", Object.assign({ className: 'icon-with-spinner__spinner-container', "data-chromatic": 'ignore', style: {
|
|
46
46
|
height: pixelToRem.pixelToRem(iconSize),
|
|
47
47
|
transform: `rotate(${spinningDegrees}deg)`,
|
|
48
48
|
width: pixelToRem.pixelToRem(iconSize),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
|
+
import { isLegacySafari } from '@dynamic-labs/utils';
|
|
3
4
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
5
|
import '@dynamic-labs/sdk-api';
|
|
5
6
|
import '../../shared/logger.js';
|
|
@@ -7,7 +8,6 @@ import '@dynamic-labs/iconic';
|
|
|
7
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
10
|
import '@dynamic-labs/wallet-book';
|
|
10
|
-
import '@dynamic-labs/utils';
|
|
11
11
|
import '../../utils/constants/colors.js';
|
|
12
12
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
13
13
|
import 'ethers';
|
|
@@ -38,7 +38,7 @@ const IconWithSpinner = ({ iconSize = 24, Icon, isSpinning = false, className =
|
|
|
38
38
|
} }, { children: [Icon && (jsxs("div", Object.assign({ style: {
|
|
39
39
|
height: pixelToRem(realIconSize),
|
|
40
40
|
width: pixelToRem(realIconSize),
|
|
41
|
-
}, className: 'icon-with-spinner__icon-container' }, { children: [typeof Icon === 'function' ? (jsx(Icon, { height: realIconSize, width: realIconSize })) : (Icon), indicator && jsx(Indicator, { indicator: indicator, iconSize: iconSize })] }))), isSpinning && (jsx("div", Object.assign({ className: 'icon-with-spinner__spinner-container', "data-chromatic": 'ignore', style: {
|
|
41
|
+
}, className: 'icon-with-spinner__icon-container' }, { children: [typeof Icon === 'function' ? (jsx(Icon, { height: realIconSize, width: realIconSize })) : (Icon), indicator && jsx(Indicator, { indicator: indicator, iconSize: iconSize })] }))), isSpinning && !isLegacySafari() && (jsx("div", Object.assign({ className: 'icon-with-spinner__spinner-container', "data-chromatic": 'ignore', style: {
|
|
42
42
|
height: pixelToRem(iconSize),
|
|
43
43
|
transform: `rotate(${spinningDegrees}deg)`,
|
|
44
44
|
width: pixelToRem(iconSize),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
|
+
|
|
9
|
+
const InlineWidget = React.forwardRef(({ children, className, dataTestId }, ref) => (jsxRuntime.jsx("div", Object.assign({ ref: ref, "data-testid": dataTestId, className: classNames.classNames('inline-widget', className) }, { children: children }))));
|
|
10
|
+
InlineWidget.displayName = 'InlineWidget';
|
|
11
|
+
|
|
12
|
+
exports.InlineWidget = InlineWidget;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InlineWidget: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
dataTestId?: string | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
|
+
|
|
5
|
+
const InlineWidget = forwardRef(({ children, className, dataTestId }, ref) => (jsx("div", Object.assign({ ref: ref, "data-testid": dataTestId, className: classNames('inline-widget', className) }, { children: children }))));
|
|
6
|
+
InlineWidget.displayName = 'InlineWidget';
|
|
7
|
+
|
|
8
|
+
export { InlineWidget };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var Typography = require('../../../Typography/Typography.cjs');
|
|
7
|
+
var Icon = require('../../../Icon/Icon.cjs');
|
|
8
|
+
var classNames = require('../../../../utils/functions/classNames/classNames.cjs');
|
|
9
|
+
|
|
10
|
+
const InlineWidgetButton = ({ onClick, children, icon, className }) => (jsxRuntime.jsxs("button", Object.assign({ className: classNames.classNames('inline-widget-button', className), onClick: onClick }, { children: [icon && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'inline-widget-button__icon' }, { children: icon })), jsxRuntime.jsx("div", { className: 'inline-widget-button__vertical-divider' })] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary', weight: 'medium' }, { children: children }))] })));
|
|
11
|
+
|
|
12
|
+
exports.InlineWidgetButton = InlineWidgetButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, MouseEventHandler, PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
type InlineWidgetButtonProps = {
|
|
3
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
icon?: ReactElement;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const InlineWidgetButton: FC<PropsWithChildren<InlineWidgetButtonProps>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Typography } from '../../../Typography/Typography.js';
|
|
3
|
+
import { Icon } from '../../../Icon/Icon.js';
|
|
4
|
+
import { classNames } from '../../../../utils/functions/classNames/classNames.js';
|
|
5
|
+
|
|
6
|
+
const InlineWidgetButton = ({ onClick, children, icon, className }) => (jsxs("button", Object.assign({ className: classNames('inline-widget-button', className), onClick: onClick }, { children: [icon && (jsxs(Fragment, { children: [jsx(Icon, Object.assign({ className: 'inline-widget-button__icon' }, { children: icon })), jsx("div", { className: 'inline-widget-button__vertical-divider' })] })), jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary', weight: 'medium' }, { children: children }))] })));
|
|
7
|
+
|
|
8
|
+
export { InlineWidgetButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InlineWidgetButton } from './InlineWidgetButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InlineWidgetButton';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const LegacySafariCssOverrides = () => (jsxRuntime.jsx("link", { rel: 'stylesheet', href: 'https://app.dynamic.xyz/assets/legacySafari/styles.css' }));
|
|
8
|
+
|
|
9
|
+
exports.LegacySafariCssOverrides = LegacySafariCssOverrides;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LegacySafariCssOverrides } from './LegacySafariCssOverrides';
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
6
8
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
9
|
require('@dynamic-labs/sdk-api');
|
|
8
|
-
require('../../shared/logger.cjs');
|
|
10
|
+
var logger = require('../../shared/logger.cjs');
|
|
9
11
|
require('@dynamic-labs/iconic');
|
|
10
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
11
13
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
12
|
-
require('react');
|
|
13
14
|
var logout = require('../../shared/assets/logout.cjs');
|
|
14
15
|
require('@dynamic-labs/wallet-book');
|
|
15
16
|
require('@dynamic-labs/utils');
|
|
@@ -20,8 +21,21 @@ require('../../shared/consts/index.cjs');
|
|
|
20
21
|
var Button = require('../Button/Button.cjs');
|
|
21
22
|
|
|
22
23
|
const LogoutButton = ({ buttonClassName = '', isTextButton = false, }) => {
|
|
24
|
+
const [loading, setLoading] = React.useState(false);
|
|
23
25
|
const { handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
|
|
24
|
-
|
|
26
|
+
const onLogOutClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
try {
|
|
28
|
+
setLoading(true);
|
|
29
|
+
yield handleLogOut();
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
logger.logger.error(e);
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
setLoading(false);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: buttonClassName, buttonVariant: 'tertiary', buttonRounded: 'small', buttonPadding: isTextButton ? 'none' : 'medium', loading: loading, disabled: loading, onClick: onLogOutClick, typographyProps: isTextButton
|
|
25
39
|
? { color: 'secondary', variant: 'button_tertiary' }
|
|
26
40
|
: { color: 'primary', variant: 'button_secondary' }, dataTestId: 'logout-button', startSlot: isTextButton ? jsxRuntime.jsx(logout.ReactComponent, {}) : undefined, expanded: !isTextButton, type: 'button' }, { children: "Log out" })));
|
|
27
41
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
1
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState } from 'react';
|
|
2
4
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
5
|
import '@dynamic-labs/sdk-api';
|
|
4
|
-
import '../../shared/logger.js';
|
|
6
|
+
import { logger } from '../../shared/logger.js';
|
|
5
7
|
import '@dynamic-labs/iconic';
|
|
6
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
7
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
8
|
-
import 'react';
|
|
9
10
|
import { ReactComponent as SvgLogout } from '../../shared/assets/logout.js';
|
|
10
11
|
import '@dynamic-labs/wallet-book';
|
|
11
12
|
import '@dynamic-labs/utils';
|
|
@@ -16,8 +17,21 @@ import '../../shared/consts/index.js';
|
|
|
16
17
|
import { Button } from '../Button/Button.js';
|
|
17
18
|
|
|
18
19
|
const LogoutButton = ({ buttonClassName = '', isTextButton = false, }) => {
|
|
20
|
+
const [loading, setLoading] = useState(false);
|
|
19
21
|
const { handleLogOut } = useInternalDynamicContext();
|
|
20
|
-
|
|
22
|
+
const onLogOutClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
try {
|
|
24
|
+
setLoading(true);
|
|
25
|
+
yield handleLogOut();
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
logger.error(e);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return (jsx(Button, Object.assign({ buttonClassName: buttonClassName, buttonVariant: 'tertiary', buttonRounded: 'small', buttonPadding: isTextButton ? 'none' : 'medium', loading: loading, disabled: loading, onClick: onLogOutClick, typographyProps: isTextButton
|
|
21
35
|
? { color: 'secondary', variant: 'button_tertiary' }
|
|
22
36
|
: { color: 'primary', variant: 'button_secondary' }, dataTestId: 'logout-button', startSlot: isTextButton ? jsx(SvgLogout, {}) : undefined, expanded: !isTextButton, type: 'button' }, { children: "Log out" })));
|
|
23
37
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var classNames = require('../../../utils/functions/classNames/classNames.cjs');
|
|
9
|
+
var Popper = require('../../Popper/Popper/Popper.cjs');
|
|
10
|
+
var PopperContext = require('../../Popper/PopperContext/PopperContext.cjs');
|
|
11
|
+
var watchToScrollInHierarchy = require('../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs');
|
|
12
|
+
require('../../../shared/logger.cjs');
|
|
13
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
14
|
+
var index = require('../../../shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
15
|
+
var useForwardedRef = require('../../../shared/utils/hooks/useForwardedRef/useForwardedRef.cjs');
|
|
16
|
+
require('@dynamic-labs/sdk-api');
|
|
17
|
+
require('@dynamic-labs/iconic');
|
|
18
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
19
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
20
|
+
require('@dynamic-labs/wallet-book');
|
|
21
|
+
require('@dynamic-labs/utils');
|
|
22
|
+
require('../../../utils/constants/colors.cjs');
|
|
23
|
+
require('ethers');
|
|
24
|
+
require('../../../shared/consts/index.cjs');
|
|
25
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
26
|
+
require('@dynamic-labs/multi-wallet');
|
|
27
|
+
require('@dynamic-labs/rpc-providers');
|
|
28
|
+
require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
29
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
30
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
31
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
|
+
var useTransition = require('../../../utils/hooks/useTransition/useTransition.cjs');
|
|
34
|
+
require('react-dom');
|
|
35
|
+
require('../../ShadowDOM/ShadowDOM.cjs');
|
|
36
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
37
|
+
require('react-focus-lock');
|
|
38
|
+
require('../../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
39
|
+
require('../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
40
|
+
require('../../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
41
|
+
require('../../IconButton/IconButton.cjs');
|
|
42
|
+
require('../../Alert/Alert.cjs');
|
|
43
|
+
require('formik');
|
|
44
|
+
require('yup');
|
|
45
|
+
require('../../InlineWidget/InlineWidget.cjs');
|
|
46
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
47
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
48
|
+
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
49
|
+
|
|
50
|
+
const IN_DURATION = 300;
|
|
51
|
+
const OUT_DURATION = 300;
|
|
52
|
+
const Dropdown = React.forwardRef((_a, ref) => {
|
|
53
|
+
var { children, isOpen, onClickOutside, onScroll, className, style, maxHeight = 300 } = _a, popperProps = _tslib.__rest(_a, ["children", "isOpen", "onClickOutside", "onScroll", "className", "style", "maxHeight"]);
|
|
54
|
+
// Get popper container
|
|
55
|
+
const { containerRef } = PopperContext.usePopper();
|
|
56
|
+
// ==============================
|
|
57
|
+
// OPEN/CLOSE LOGIC
|
|
58
|
+
// ==============================
|
|
59
|
+
const contentRef = useForwardedRef.useForwardedRef(ref);
|
|
60
|
+
// Close on click outside
|
|
61
|
+
index.useOnClickOutside(contentRef, () => onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside());
|
|
62
|
+
// Listen for scroll events to auto close
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (!containerRef.current || !popperProps.anchorRef.current)
|
|
65
|
+
return;
|
|
66
|
+
return watchToScrollInHierarchy.watchToScrollInHierarchy(containerRef.current, popperProps.anchorRef.current, () => onScroll === null || onScroll === void 0 ? void 0 : onScroll());
|
|
67
|
+
}, [containerRef, popperProps.anchorRef, onScroll]);
|
|
68
|
+
// ==============================
|
|
69
|
+
// ANIMATIONS
|
|
70
|
+
// ==============================
|
|
71
|
+
const { mount, stage, currentDuration } = useTransition.useTransition({
|
|
72
|
+
inDuration: IN_DURATION,
|
|
73
|
+
isShown: isOpen,
|
|
74
|
+
outDuration: OUT_DURATION,
|
|
75
|
+
});
|
|
76
|
+
const transitionClassName = classNames.classNames({
|
|
77
|
+
'dropdown--entering': stage === 'ENTERING',
|
|
78
|
+
'dropdown--exiting': stage === 'EXITING',
|
|
79
|
+
});
|
|
80
|
+
if (!mount)
|
|
81
|
+
return null;
|
|
82
|
+
return (jsxRuntime.jsx(Popper.Popper, Object.assign({}, popperProps, { ref: contentRef }, { children: jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('dropdown', transitionClassName, className), style: Object.assign({ '--max-height': `${maxHeight}px`, animationDuration: `${currentDuration}ms` }, style) }, { children: children })) })));
|
|
83
|
+
});
|
|
84
|
+
Dropdown.displayName = 'Dropdown';
|
|
85
|
+
|
|
86
|
+
exports.Dropdown = Dropdown;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PopperProps } from '../../Popper/Popper/Popper';
|
|
3
|
+
export type DropdownProps = PopperProps & {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClickOutside?: () => void;
|
|
6
|
+
onScroll?: () => void;
|
|
7
|
+
maxHeight?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const Dropdown: import("react").ForwardRefExoticComponent<PopperProps & {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
onClickOutside?: (() => void) | undefined;
|
|
12
|
+
onScroll?: (() => void) | undefined;
|
|
13
|
+
maxHeight?: number | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { __rest } from '../../../../../_virtual/_tslib.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, useEffect } from 'react';
|
|
4
|
+
import { classNames } from '../../../utils/functions/classNames/classNames.js';
|
|
5
|
+
import { Popper } from '../../Popper/Popper/Popper.js';
|
|
6
|
+
import { usePopper } from '../../Popper/PopperContext/PopperContext.js';
|
|
7
|
+
import { watchToScrollInHierarchy } from '../utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js';
|
|
8
|
+
import '../../../shared/logger.js';
|
|
9
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
10
|
+
import { useOnClickOutside } from '../../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
11
|
+
import { useForwardedRef } from '../../../shared/utils/hooks/useForwardedRef/useForwardedRef.js';
|
|
12
|
+
import '@dynamic-labs/sdk-api';
|
|
13
|
+
import '@dynamic-labs/iconic';
|
|
14
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
15
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
16
|
+
import '@dynamic-labs/wallet-book';
|
|
17
|
+
import '@dynamic-labs/utils';
|
|
18
|
+
import '../../../utils/constants/colors.js';
|
|
19
|
+
import 'ethers';
|
|
20
|
+
import '../../../shared/consts/index.js';
|
|
21
|
+
import '../../../config/ApiEndpoint.js';
|
|
22
|
+
import '@dynamic-labs/multi-wallet';
|
|
23
|
+
import '@dynamic-labs/rpc-providers';
|
|
24
|
+
import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
25
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
26
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
27
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
28
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
|
+
import { useTransition } from '../../../utils/hooks/useTransition/useTransition.js';
|
|
30
|
+
import 'react-dom';
|
|
31
|
+
import '../../ShadowDOM/ShadowDOM.js';
|
|
32
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
33
|
+
import 'react-focus-lock';
|
|
34
|
+
import '../../Transition/ZoomTransition/ZoomTransition.js';
|
|
35
|
+
import '../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
36
|
+
import '../../Transition/OpacityTransition/OpacityTransition.js';
|
|
37
|
+
import '../../IconButton/IconButton.js';
|
|
38
|
+
import '../../Alert/Alert.js';
|
|
39
|
+
import 'formik';
|
|
40
|
+
import 'yup';
|
|
41
|
+
import '../../InlineWidget/InlineWidget.js';
|
|
42
|
+
import '../../../context/MockContext/MockContext.js';
|
|
43
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
44
|
+
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
45
|
+
|
|
46
|
+
const IN_DURATION = 300;
|
|
47
|
+
const OUT_DURATION = 300;
|
|
48
|
+
const Dropdown = forwardRef((_a, ref) => {
|
|
49
|
+
var { children, isOpen, onClickOutside, onScroll, className, style, maxHeight = 300 } = _a, popperProps = __rest(_a, ["children", "isOpen", "onClickOutside", "onScroll", "className", "style", "maxHeight"]);
|
|
50
|
+
// Get popper container
|
|
51
|
+
const { containerRef } = usePopper();
|
|
52
|
+
// ==============================
|
|
53
|
+
// OPEN/CLOSE LOGIC
|
|
54
|
+
// ==============================
|
|
55
|
+
const contentRef = useForwardedRef(ref);
|
|
56
|
+
// Close on click outside
|
|
57
|
+
useOnClickOutside(contentRef, () => onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside());
|
|
58
|
+
// Listen for scroll events to auto close
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!containerRef.current || !popperProps.anchorRef.current)
|
|
61
|
+
return;
|
|
62
|
+
return watchToScrollInHierarchy(containerRef.current, popperProps.anchorRef.current, () => onScroll === null || onScroll === void 0 ? void 0 : onScroll());
|
|
63
|
+
}, [containerRef, popperProps.anchorRef, onScroll]);
|
|
64
|
+
// ==============================
|
|
65
|
+
// ANIMATIONS
|
|
66
|
+
// ==============================
|
|
67
|
+
const { mount, stage, currentDuration } = useTransition({
|
|
68
|
+
inDuration: IN_DURATION,
|
|
69
|
+
isShown: isOpen,
|
|
70
|
+
outDuration: OUT_DURATION,
|
|
71
|
+
});
|
|
72
|
+
const transitionClassName = classNames({
|
|
73
|
+
'dropdown--entering': stage === 'ENTERING',
|
|
74
|
+
'dropdown--exiting': stage === 'EXITING',
|
|
75
|
+
});
|
|
76
|
+
if (!mount)
|
|
77
|
+
return null;
|
|
78
|
+
return (jsx(Popper, Object.assign({}, popperProps, { ref: contentRef }, { children: jsx("div", Object.assign({ className: classNames('dropdown', transitionClassName, className), style: Object.assign({ '--max-height': `${maxHeight}px`, animationDuration: `${currentDuration}ms` }, style) }, { children: children })) })));
|
|
79
|
+
});
|
|
80
|
+
Dropdown.displayName = 'Dropdown';
|
|
81
|
+
|
|
82
|
+
export { Dropdown };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
|
+
var classNames = require('../../../utils/functions/classNames/classNames.cjs');
|
|
8
|
+
var OverlayCard = require('../../OverlayCard/OverlayCard.cjs');
|
|
9
|
+
require('react');
|
|
10
|
+
require('../../OverlayCard/OverlayCard.context.cjs');
|
|
11
|
+
var Dropdown = require('../Dropdown/Dropdown.cjs');
|
|
12
|
+
var ModalHeader = require('../../ModalHeader/ModalHeader.cjs');
|
|
13
|
+
var Typography = require('../../Typography/Typography.cjs');
|
|
14
|
+
var IconButton = require('../../IconButton/IconButton.cjs');
|
|
15
|
+
require('@dynamic-labs/sdk-api');
|
|
16
|
+
require('../../../shared/logger.cjs');
|
|
17
|
+
require('@dynamic-labs/iconic');
|
|
18
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
19
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
20
|
+
var close = require('../../../shared/assets/close.cjs');
|
|
21
|
+
require('@dynamic-labs/wallet-book');
|
|
22
|
+
require('../../../utils/constants/colors.cjs');
|
|
23
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
24
|
+
require('ethers');
|
|
25
|
+
require('../../../shared/consts/index.cjs');
|
|
26
|
+
|
|
27
|
+
const MenuList = ({ isOpen, onClickClose, popperProps, dropdownClassName, dropdownStyle, overlayCardClassName, overlayCardStyle, className, style, children, mobileTitle, }) => {
|
|
28
|
+
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickClose, type: 'button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
29
|
+
if (utils.isMobile())
|
|
30
|
+
return (jsxRuntime.jsxs(OverlayCard.OverlayCard, Object.assign({ isOpen: isOpen, onClickOverlay: onClickClose, className: classNames.classNames(overlayCardClassName, className), style: Object.assign(Object.assign({}, style), overlayCardStyle) }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary' }, { children: mobileTitle })) })), jsxRuntime.jsx("div", Object.assign({ className: 'menu-list__overlay-card__container' }, { children: children }))] })));
|
|
31
|
+
return (jsxRuntime.jsx(Dropdown.Dropdown, Object.assign({ isOpen: isOpen, onClickOutside: onClickClose, onScroll: onClickClose, className: classNames.classNames(dropdownClassName, className), style: Object.assign(Object.assign({}, style), dropdownStyle) }, popperProps, { children: children })));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.MenuList = MenuList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties, FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { PopperProps } from '../../Popper/Popper/Popper';
|
|
3
|
+
export interface MenuListProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
popperProps: Omit<Omit<PopperProps, 'className'>, 'style'>;
|
|
6
|
+
onClickClose?: () => void;
|
|
7
|
+
mobileTitle?: string;
|
|
8
|
+
dropdownClassName?: string;
|
|
9
|
+
dropdownStyle?: CSSProperties;
|
|
10
|
+
overlayCardClassName?: string;
|
|
11
|
+
overlayCardStyle?: CSSProperties;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare const MenuList: FC<PropsWithChildren<MenuListProps>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { isMobile } from '@dynamic-labs/utils';
|
|
3
|
+
import { classNames } from '../../../utils/functions/classNames/classNames.js';
|
|
4
|
+
import { OverlayCard } from '../../OverlayCard/OverlayCard.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../OverlayCard/OverlayCard.context.js';
|
|
7
|
+
import { Dropdown } from '../Dropdown/Dropdown.js';
|
|
8
|
+
import { ModalHeader } from '../../ModalHeader/ModalHeader.js';
|
|
9
|
+
import { Typography } from '../../Typography/Typography.js';
|
|
10
|
+
import { IconButton } from '../../IconButton/IconButton.js';
|
|
11
|
+
import '@dynamic-labs/sdk-api';
|
|
12
|
+
import '../../../shared/logger.js';
|
|
13
|
+
import '@dynamic-labs/iconic';
|
|
14
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
15
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
16
|
+
import { ReactComponent as SvgClose } from '../../../shared/assets/close.js';
|
|
17
|
+
import '@dynamic-labs/wallet-book';
|
|
18
|
+
import '../../../utils/constants/colors.js';
|
|
19
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
20
|
+
import 'ethers';
|
|
21
|
+
import '../../../shared/consts/index.js';
|
|
22
|
+
|
|
23
|
+
const MenuList = ({ isOpen, onClickClose, popperProps, dropdownClassName, dropdownStyle, overlayCardClassName, overlayCardStyle, className, style, children, mobileTitle, }) => {
|
|
24
|
+
const closeButton = (jsx(IconButton, Object.assign({ onClick: onClickClose, type: 'button' }, { children: jsx(SvgClose, {}) })));
|
|
25
|
+
if (isMobile())
|
|
26
|
+
return (jsxs(OverlayCard, Object.assign({ isOpen: isOpen, onClickOverlay: onClickClose, className: classNames(overlayCardClassName, className), style: Object.assign(Object.assign({}, style), overlayCardStyle) }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary' }, { children: mobileTitle })) })), jsx("div", Object.assign({ className: 'menu-list__overlay-card__container' }, { children: children }))] })));
|
|
27
|
+
return (jsx(Dropdown, Object.assign({ isOpen: isOpen, onClickOutside: onClickClose, onScroll: onClickClose, className: classNames(dropdownClassName, className), style: Object.assign(Object.assign({}, style), dropdownStyle) }, popperProps, { children: children })));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { MenuList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MenuList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './watchToScrollInHierarchy';
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var isScrollable = require('
|
|
5
|
+
var isScrollable = require('../../../Popper/utils/isScrollable/isScrollable.cjs');
|
|
6
6
|
|
|
7
|
+
// eslint-disable-next-line multiline-comment-style
|
|
8
|
+
/** Listens for scroll events in all elements in the hierarchy range between the root and the element,
|
|
9
|
+
* and executes the callback whenever it is triggered.
|
|
10
|
+
* @returns A callback to clean up all event listeners created
|
|
11
|
+
*/
|
|
7
12
|
const watchToScrollInHierarchy = (root, element, callback) => {
|
|
8
13
|
const elementsWithListener = [];
|
|
9
14
|
let currentElement = element;
|
package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Listens for scroll events in all elements in the hierarchy range between the root and the element,
|
|
2
|
+
* and executes the callback whenever it is triggered.
|
|
3
|
+
* @returns A callback to clean up all event listeners created
|
|
4
|
+
*/
|
|
5
|
+
export declare const watchToScrollInHierarchy: (root: HTMLElement, element: HTMLElement, callback: () => void) => () => void;
|