@getpara/react-sdk-lite 2.0.0-alpha.33
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/dist/chunk-MMUBH76A.js +59 -0
- package/dist/cli/cli.mjs +51 -0
- package/dist/css/modal.css +13 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -0
- package/dist/modal/ParaModal.d.ts +2 -0
- package/dist/modal/ParaModal.js +308 -0
- package/dist/modal/components/Account/Account.d.ts +5 -0
- package/dist/modal/components/Account/Account.js +148 -0
- package/dist/modal/components/Account/AccountProfile.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfile.js +168 -0
- package/dist/modal/components/Account/AccountProfileLink.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileLink.js +206 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +111 -0
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +1 -0
- package/dist/modal/components/Account/AccountProfileUnlink.js +47 -0
- package/dist/modal/components/AddFunds/AddFunds.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFunds.js +69 -0
- package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsAsset.js +125 -0
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +78 -0
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +31 -0
- package/dist/modal/components/AddFunds/AddFundsContext.js +160 -0
- package/dist/modal/components/AddFunds/AddFundsDone.d.ts +6 -0
- package/dist/modal/components/AddFunds/AddFundsDone.js +49 -0
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsProvider.js +109 -0
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsReceive.js +83 -0
- package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +1 -0
- package/dist/modal/components/AddFunds/AddFundsSettings.js +237 -0
- package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +2 -0
- package/dist/modal/components/AddFunds/MoonPayEmbed.js +7 -0
- package/dist/modal/components/AddFunds/common.d.ts +19 -0
- package/dist/modal/components/AddFunds/common.js +24 -0
- package/dist/modal/components/AddFunds/index.d.ts +3 -0
- package/dist/modal/components/AddFunds/index.js +4 -0
- package/dist/modal/components/AuthInput/AuthInput.d.ts +20 -0
- package/dist/modal/components/AuthInput/AuthInput.js +277 -0
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +7 -0
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +33 -0
- package/dist/modal/components/AuthInput/phoneMasks.d.ts +247 -0
- package/dist/modal/components/AuthInput/phoneMasks.js +253 -0
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +9 -0
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +50 -0
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +9 -0
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +179 -0
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +9 -0
- package/dist/modal/components/AuthOptions/AuthOptions.js +85 -0
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +1 -0
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +18 -0
- package/dist/modal/components/AwaitingIFrameStep/AwaitingIFrameStep.d.ts +1 -0
- package/dist/modal/components/AwaitingIFrameStep/AwaitingIFrameStep.js +12 -0
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +1 -0
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +10 -0
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +1 -0
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +18 -0
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +5 -0
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +49 -0
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -0
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +62 -0
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -0
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +48 -0
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +6 -0
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +29 -0
- package/dist/modal/components/Body/Body.d.ts +11 -0
- package/dist/modal/components/Body/Body.js +354 -0
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -0
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +95 -0
- package/dist/modal/components/ChainSwitch/config.d.ts +7 -0
- package/dist/modal/components/ChainSwitch/config.js +17 -0
- package/dist/modal/components/Controls/Controls.d.ts +5 -0
- package/dist/modal/components/Controls/Controls.js +78 -0
- package/dist/modal/components/Controls/Selects.d.ts +2 -0
- package/dist/modal/components/Controls/Selects.js +173 -0
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +1 -0
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +75 -0
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +8 -0
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +175 -0
- package/dist/modal/components/ExternalWalletStep/config.d.ts +7 -0
- package/dist/modal/components/ExternalWalletStep/config.js +17 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +1 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +39 -0
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +1 -0
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +182 -0
- package/dist/modal/components/Footer/Footer.d.ts +1 -0
- package/dist/modal/components/Footer/Footer.js +95 -0
- package/dist/modal/components/Header/Header.d.ts +1 -0
- package/dist/modal/components/Header/Header.js +43 -0
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +3 -0
- package/dist/modal/components/Header/hooks/useStepTitle.js +62 -0
- package/dist/modal/components/Hero/Hero.d.ts +1 -0
- package/dist/modal/components/Hero/Hero.js +116 -0
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +1 -0
- package/dist/modal/components/IFrameStep/IFrameStep.js +70 -0
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +5 -0
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +44 -0
- package/dist/modal/components/ModalContent/ModalContent.d.ts +10 -0
- package/dist/modal/components/ModalContent/ModalContent.js +88 -0
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +3 -0
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +31 -0
- package/dist/modal/components/OAuth/OAuth.d.ts +6 -0
- package/dist/modal/components/OAuth/OAuth.js +81 -0
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +8 -0
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +74 -0
- package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +1 -0
- package/dist/modal/components/OnRampComponents/AddingFunds.js +23 -0
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +9 -0
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +77 -0
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +6 -0
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +107 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +5 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +132 -0
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +5 -0
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +27 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +12 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +160 -0
- package/dist/modal/components/Waiting/Waiting.d.ts +6 -0
- package/dist/modal/components/Waiting/Waiting.js +17 -0
- package/dist/modal/components/WalletCard/PartnerIcon.d.ts +6 -0
- package/dist/modal/components/WalletCard/PartnerIcon.js +34 -0
- package/dist/modal/components/WalletCard/WalletCard.d.ts +18 -0
- package/dist/modal/components/WalletCard/WalletCard.js +128 -0
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +6 -0
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +83 -0
- package/dist/modal/components/common.d.ts +59 -0
- package/dist/modal/components/common.js +261 -0
- package/dist/modal/components/index.d.ts +1 -0
- package/dist/modal/components/index.js +2 -0
- package/dist/modal/constants/constants.d.ts +40 -0
- package/dist/modal/constants/constants.js +142 -0
- package/dist/modal/constants/defaults.d.ts +5 -0
- package/dist/modal/constants/defaults.js +10 -0
- package/dist/modal/constants/oAuthLogos.d.ts +17 -0
- package/dist/modal/constants/oAuthLogos.js +158 -0
- package/dist/modal/constants/walletTypeConfig.d.ts +6 -0
- package/dist/modal/constants/walletTypeConfig.js +13 -0
- package/dist/modal/hooks/useGoBack.d.ts +1 -0
- package/dist/modal/hooks/useGoBack.js +43 -0
- package/dist/modal/hooks/useTelegramLogin.d.ts +12 -0
- package/dist/modal/hooks/useTelegramLogin.js +65 -0
- package/dist/modal/index.d.ts +8 -0
- package/dist/modal/index.js +29 -0
- package/dist/modal/stores/index.d.ts +1 -0
- package/dist/modal/stores/index.js +2 -0
- package/dist/modal/stores/modal/actions.d.ts +3 -0
- package/dist/modal/stores/modal/actions.js +139 -0
- package/dist/modal/stores/modal/useModalStore.d.ts +105 -0
- package/dist/modal/stores/modal/useModalStore.js +75 -0
- package/dist/modal/types/commonTypes.d.ts +6 -0
- package/dist/modal/types/commonTypes.js +1 -0
- package/dist/modal/types/modalProps.d.ts +129 -0
- package/dist/modal/types/modalProps.js +12 -0
- package/dist/modal/utils/authInputHelpers.d.ts +5 -0
- package/dist/modal/utils/authInputHelpers.js +41 -0
- package/dist/modal/utils/authLayoutHelpers.d.ts +3 -0
- package/dist/modal/utils/authLayoutHelpers.js +8 -0
- package/dist/modal/utils/countryCodes.d.ts +8 -0
- package/dist/modal/utils/countryCodes.js +45 -0
- package/dist/modal/utils/getMailtoLink.d.ts +1 -0
- package/dist/modal/utils/getMailtoLink.js +10 -0
- package/dist/modal/utils/getTileButtonFlex.d.ts +1 -0
- package/dist/modal/utils/getTileButtonFlex.js +20 -0
- package/dist/modal/utils/getWalletDisplayName.d.ts +5 -0
- package/dist/modal/utils/getWalletDisplayName.js +22 -0
- package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
- package/dist/modal/utils/isPasskeySupported.js +15 -0
- package/dist/modal/utils/openPopup.d.ts +6 -0
- package/dist/modal/utils/openPopup.js +60 -0
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +1 -0
- package/dist/modal/utils/routeMobileExternalWallet.js +31 -0
- package/dist/modal/utils/steps.d.ts +136 -0
- package/dist/modal/utils/steps.js +279 -0
- package/dist/modal/utils/stringFormatters.d.ts +5 -0
- package/dist/modal/utils/stringFormatters.js +19 -0
- package/dist/modal/utils/validateOnRampConfig.d.ts +5 -0
- package/dist/modal/utils/validateOnRampConfig.js +32 -0
- package/dist/package.json +6 -0
- package/dist/provider/ParaProvider.d.ts +4 -0
- package/dist/provider/ParaProvider.js +140 -0
- package/dist/provider/actions/getEmbeddedAccount.d.ts +26 -0
- package/dist/provider/actions/getEmbeddedAccount.js +57 -0
- package/dist/provider/actions/getWallet.d.ts +5 -0
- package/dist/provider/actions/getWallet.js +18 -0
- package/dist/provider/actions/index.d.ts +47 -0
- package/dist/provider/actions/index.js +79 -0
- package/dist/provider/actions/utils.d.ts +4 -0
- package/dist/provider/actions/utils.js +34 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
- package/dist/provider/components/CosmosWalletWrapper.js +43 -0
- package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
- package/dist/provider/components/EvmWalletWrapper.js +43 -0
- package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
- package/dist/provider/components/ExternalWalletWrapper.js +140 -0
- package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
- package/dist/provider/components/SolanaWalletWrapper.js +44 -0
- package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
- package/dist/provider/external/getParaCosmosConnector.js +19 -0
- package/dist/provider/external/getParaCosmosLib.d.ts +4 -0
- package/dist/provider/external/getParaCosmosLib.js +16 -0
- package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
- package/dist/provider/external/getParaEvmConnector.js +19 -0
- package/dist/provider/external/getParaEvmLib.d.ts +4 -0
- package/dist/provider/external/getParaEvmLib.js +16 -0
- package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
- package/dist/provider/external/getParaSolanaConnector.js +19 -0
- package/dist/provider/external/getParaSolanaLib.d.ts +4 -0
- package/dist/provider/external/getParaSolanaLib.js +16 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +8 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +8 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +2 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +8 -0
- package/dist/provider/hooks/index.d.ts +3 -0
- package/dist/provider/hooks/index.js +4 -0
- package/dist/provider/hooks/mutations/core.d.ts +27 -0
- package/dist/provider/hooks/mutations/core.js +66 -0
- package/dist/provider/hooks/mutations/index.d.ts +3 -0
- package/dist/provider/hooks/mutations/index.js +9 -0
- package/dist/provider/hooks/mutations/useLinkAccount.d.ts +9 -0
- package/dist/provider/hooks/mutations/useLinkAccount.js +18 -0
- package/dist/provider/hooks/mutations/utils.d.ts +12 -0
- package/dist/provider/hooks/mutations/utils.js +90 -0
- package/dist/provider/hooks/queries/core.d.ts +4 -0
- package/dist/provider/hooks/queries/core.js +16 -0
- package/dist/provider/hooks/queries/index.d.ts +5 -0
- package/dist/provider/hooks/queries/index.js +13 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +90 -0
- package/dist/provider/hooks/queries/useAccount.js +141 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +5 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +24 -0
- package/dist/provider/hooks/queries/useParaStatus.d.ts +22 -0
- package/dist/provider/hooks/queries/useParaStatus.js +25 -0
- package/dist/provider/hooks/queries/useWallet.d.ts +5 -0
- package/dist/provider/hooks/queries/useWallet.js +26 -0
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +6 -0
- package/dist/provider/hooks/queries/useWalletBalance.js +55 -0
- package/dist/provider/hooks/queries/utils.d.ts +7 -0
- package/dist/provider/hooks/queries/utils.js +25 -0
- package/dist/provider/hooks/utils/index.d.ts +3 -0
- package/dist/provider/hooks/utils/index.js +10 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +3 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +74 -0
- package/dist/provider/hooks/utils/useClient.d.ts +5 -0
- package/dist/provider/hooks/utils/useClient.js +10 -0
- package/dist/provider/hooks/utils/useEventListeners.d.ts +2 -0
- package/dist/provider/hooks/utils/useEventListeners.js +157 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +4 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +27 -0
- package/dist/provider/hooks/utils/useInternalClient.d.ts +5 -0
- package/dist/provider/hooks/utils/useInternalClient.js +10 -0
- package/dist/provider/hooks/utils/useModal.d.ts +11 -0
- package/dist/provider/hooks/utils/useModal.js +27 -0
- package/dist/provider/hooks/utils/useWalletState.d.ts +15 -0
- package/dist/provider/hooks/utils/useWalletState.js +48 -0
- package/dist/provider/index.d.ts +6 -0
- package/dist/provider/index.js +11 -0
- package/dist/provider/providers/AccountLinkProvider.d.ts +47 -0
- package/dist/provider/providers/AccountLinkProvider.js +452 -0
- package/dist/provider/providers/AuthProvider.d.ts +38 -0
- package/dist/provider/providers/AuthProvider.js +575 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.js +66 -0
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/EvmExternalWalletProvider.js +74 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +61 -0
- package/dist/provider/providers/ExternalWalletProvider.js +626 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.js +66 -0
- package/dist/provider/stores/getters.d.ts +4 -0
- package/dist/provider/stores/getters.js +13 -0
- package/dist/provider/stores/setters.d.ts +1 -0
- package/dist/provider/stores/setters.js +7 -0
- package/dist/provider/stores/slices/analytics.d.ts +3 -0
- package/dist/provider/stores/slices/analytics.js +9 -0
- package/dist/provider/stores/slices/client.d.ts +3 -0
- package/dist/provider/stores/slices/client.js +9 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/config.js +11 -0
- package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
- package/dist/provider/stores/slices/externalWallets.js +46 -0
- package/dist/provider/stores/slices/index.d.ts +5 -0
- package/dist/provider/stores/slices/index.js +6 -0
- package/dist/provider/stores/slices/modal.d.ts +3 -0
- package/dist/provider/stores/slices/modal.js +18 -0
- package/dist/provider/stores/slices/wallet.d.ts +3 -0
- package/dist/provider/stores/slices/wallet.js +13 -0
- package/dist/provider/stores/types.d.ts +86 -0
- package/dist/provider/stores/types.js +1 -0
- package/dist/provider/stores/useStore.d.ts +17 -0
- package/dist/provider/stores/useStore.js +34 -0
- package/dist/provider/types/externalWalletProviders.d.ts +12 -0
- package/dist/provider/types/externalWalletProviders.js +1 -0
- package/dist/provider/types/provider.d.ts +166 -0
- package/dist/provider/types/provider.js +1 -0
- package/dist/provider/types/query.d.ts +3 -0
- package/dist/provider/types/query.js +1 -0
- package/dist/provider/types/utils.d.ts +45 -0
- package/dist/provider/types/utils.js +1 -0
- package/dist/provider/utils/constants.d.ts +5 -0
- package/dist/provider/utils/constants.js +10 -0
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
- package/dist/provider/utils/paraConfigTypeGuards.js +13 -0
- package/dist/provider/utils/renameMutations.d.ts +5 -0
- package/dist/provider/utils/renameMutations.js +18 -0
- package/dist/public/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/package.json +63 -0
- package/styles.css/package.json +3 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { CpslIcon, CpslInput, CpslSelect, CpslSelectItem, CpslText, CpslTileButton } from "@getpara/react-components";
|
|
5
|
+
import { safeStyled } from "@getpara/react-common";
|
|
6
|
+
import { MOBILE_SIZE, NETWORKS, ON_RAMP_ASSETS } from "../constants/constants.js";
|
|
7
|
+
import { useStore } from "../../provider/stores/useStore.js";
|
|
8
|
+
import { ACCOUNT_TYPES } from "../constants/oAuthLogos.js";
|
|
9
|
+
import { useEffect, useRef, useState } from "react";
|
|
10
|
+
const SpinnerContainer = safeStyled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
`;
|
|
15
|
+
const QRContainer = safeStyled.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 286px;
|
|
20
|
+
height: 286px;
|
|
21
|
+
`;
|
|
22
|
+
const InfoBoxContent = safeStyled.div`
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
`;
|
|
27
|
+
const InfoBoxHeader = safeStyled.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
|
|
32
|
+
cpsl-icon {
|
|
33
|
+
--height: 20px;
|
|
34
|
+
--width: 20px;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
const FilledDisabledInput = safeStyled(CpslInput)`
|
|
38
|
+
--container-border-color: var(--cpsl-color-input-border-placeholder);
|
|
39
|
+
--container-background-color: var(--cpsl-color-background-0);
|
|
40
|
+
--input-background-color: transparent;
|
|
41
|
+
--input-font-weight: 500;
|
|
42
|
+
--input-color: var(--cpsl-color-text-secondary);
|
|
43
|
+
`;
|
|
44
|
+
const FullWidthFilledDisabledInput = safeStyled(FilledDisabledInput)`
|
|
45
|
+
width: 100%;
|
|
46
|
+
`;
|
|
47
|
+
const CenteredText = safeStyled(CpslText)`
|
|
48
|
+
width: 100%;
|
|
49
|
+
text-align: center;
|
|
50
|
+
`;
|
|
51
|
+
const InnerStepContainer = safeStyled.div`
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
align-self: center;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 8px;
|
|
59
|
+
`;
|
|
60
|
+
const StepContainer = safeStyled(InnerStepContainer)`
|
|
61
|
+
gap: ${({ $wide }) => $wide ? "32px" : "24px"};
|
|
62
|
+
`;
|
|
63
|
+
const Heading = safeStyled(CenteredText)``;
|
|
64
|
+
const StyledCpslTileButton = safeStyled(CpslTileButton)`
|
|
65
|
+
--button-width: 100%;
|
|
66
|
+
--button-height: 87px;
|
|
67
|
+
--button-icon-height: 32px;
|
|
68
|
+
--button-icon-width: 32px;
|
|
69
|
+
`;
|
|
70
|
+
const HeroIcon = safeStyled(CpslIcon)`
|
|
71
|
+
--height: 80px;
|
|
72
|
+
--width: 80px;
|
|
73
|
+
--icon-color: var(--cpsl-color-text-primary);
|
|
74
|
+
`;
|
|
75
|
+
const HeaderSelect = safeStyled(CpslSelect)`
|
|
76
|
+
--container-height: 26px;
|
|
77
|
+
--container-border-width: 0px;
|
|
78
|
+
--container-padding-end: 0px;
|
|
79
|
+
--container-padding-start: 0px;
|
|
80
|
+
--container-background-color: transparent;
|
|
81
|
+
--container-box-shadow: none;
|
|
82
|
+
--container-gap: 2px;
|
|
83
|
+
--icon-width: 16px;
|
|
84
|
+
--icon-height: 16px;
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
&::part(selected-text) {
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&::part(dropdown) {
|
|
92
|
+
min-width: ${({ $width }) => `${$width - 2}px`};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&::part(popover) {
|
|
96
|
+
/* Have to adjust the top of the popover here since we're using a transform on the modal which causes fixed position items to not be relative to the viewport */
|
|
97
|
+
@media (max-width: ${MOBILE_SIZE}px) {
|
|
98
|
+
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
99
|
+
bottom: 16px;
|
|
100
|
+
}
|
|
101
|
+
cpsl-auth-modal.force-mobile-media & {
|
|
102
|
+
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
103
|
+
bottom: 16px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::part(icon) {
|
|
108
|
+
--icon-color: var(--cpsl-color-contrast);
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
const HeaderSelectItem = safeStyled(CpslSelectItem)`
|
|
112
|
+
--outer-container-padding-start: 4px;
|
|
113
|
+
--outer-container-padding-end: 4px;
|
|
114
|
+
--outer-container-padding-top: 4px;
|
|
115
|
+
--outer-container-padding-bottom: 4px;
|
|
116
|
+
`;
|
|
117
|
+
const HeaderSelectContainer = safeStyled.div`
|
|
118
|
+
position: relative;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
gap: 8px;
|
|
122
|
+
border-radius: 1000px;
|
|
123
|
+
background-color: var(--cpsl-color-background-8);
|
|
124
|
+
padding: 4px;
|
|
125
|
+
`;
|
|
126
|
+
const StyledIcon = safeStyled(CpslIcon)`
|
|
127
|
+
background: var(--cpsl-color-background-0);
|
|
128
|
+
border-radius: 100%;
|
|
129
|
+
`;
|
|
130
|
+
function AssetIcon({ asset, size }) {
|
|
131
|
+
const isDark = useStore((state) => {
|
|
132
|
+
var _a, _b;
|
|
133
|
+
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
134
|
+
});
|
|
135
|
+
const data = ON_RAMP_ASSETS[asset];
|
|
136
|
+
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
137
|
+
}
|
|
138
|
+
function NetworkIcon({ network, size }) {
|
|
139
|
+
const isDark = useStore((state) => {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
142
|
+
});
|
|
143
|
+
const data = NETWORKS[network];
|
|
144
|
+
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
145
|
+
}
|
|
146
|
+
const ErrorContainer = safeStyled.div`
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
gap: 4px;
|
|
151
|
+
`;
|
|
152
|
+
const ErrorIcon = safeStyled(CpslIcon)`
|
|
153
|
+
--height: 16px;
|
|
154
|
+
--width: 16px;
|
|
155
|
+
--icon-color: var(--cpsl-color-text-error);
|
|
156
|
+
`;
|
|
157
|
+
function AccountTypeIcon({
|
|
158
|
+
accountType,
|
|
159
|
+
size,
|
|
160
|
+
inset
|
|
161
|
+
}) {
|
|
162
|
+
var _a;
|
|
163
|
+
const isDark = useStore((state) => {
|
|
164
|
+
var _a2, _b;
|
|
165
|
+
return ((_b = (_a2 = state.modalConfig) == null ? void 0 : _a2.theme) == null ? void 0 : _b.mode) === "dark";
|
|
166
|
+
});
|
|
167
|
+
const data = accountType ? ACCOUNT_TYPES[accountType] : null;
|
|
168
|
+
return data ? /* @__PURE__ */ jsx(CpslIcon, { size, inset, icon: (_a = data.logoBranded) != null ? _a : data.logo, invert: isDark && data.isDark }) : null;
|
|
169
|
+
}
|
|
170
|
+
function HeroAccountTypeIcon({ accountType }) {
|
|
171
|
+
if (accountType === "EMAIL" || accountType === "PHONE") {
|
|
172
|
+
return /* @__PURE__ */ jsx(HeroGenericIcon, { accountType });
|
|
173
|
+
}
|
|
174
|
+
return /* @__PURE__ */ jsx(AccountTypeIcon, { accountType, size: "60px" });
|
|
175
|
+
}
|
|
176
|
+
function HeroSuccessIcon() {
|
|
177
|
+
return /* @__PURE__ */ jsx(CpslIcon, { icon: "checkCircleFilled", size: "80px", style: { ["--icon-color"]: "var(--cpsl-color-utility-green" } });
|
|
178
|
+
}
|
|
179
|
+
function GradientScroll({ height, gap, children }) {
|
|
180
|
+
const [isNotAtBottom, setIsNotAtBottom] = useState(false);
|
|
181
|
+
const [isNotAtTop, setIsNotAtTop] = useState(false);
|
|
182
|
+
const ref = useRef(null);
|
|
183
|
+
const onScroll = () => {
|
|
184
|
+
if (ref.current) {
|
|
185
|
+
const { scrollTop, scrollHeight, clientHeight } = ref.current;
|
|
186
|
+
if (height && scrollHeight <= parseInt(height)) {
|
|
187
|
+
setIsNotAtTop(false);
|
|
188
|
+
setIsNotAtBottom(false);
|
|
189
|
+
} else {
|
|
190
|
+
setIsNotAtTop(scrollTop > 30);
|
|
191
|
+
setIsNotAtBottom(scrollTop + clientHeight < scrollHeight - 30);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
onScroll();
|
|
197
|
+
}, []);
|
|
198
|
+
return /* @__PURE__ */ jsx(
|
|
199
|
+
GradientScrollContainer,
|
|
200
|
+
{
|
|
201
|
+
ref,
|
|
202
|
+
$height: height,
|
|
203
|
+
$gap: gap,
|
|
204
|
+
$isNotAtBottom: isNotAtBottom,
|
|
205
|
+
$isNotAtTop: isNotAtTop,
|
|
206
|
+
onScroll,
|
|
207
|
+
children: /* @__PURE__ */ jsx("div", { children })
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
const HeroGenericIcon = ({ accountType }) => {
|
|
212
|
+
return /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx(AccountTypeIcon, { accountType, size: "24px" }) });
|
|
213
|
+
};
|
|
214
|
+
const GradientScrollContainer = safeStyled.div`
|
|
215
|
+
max-height: ${({ $height }) => $height || "100%"};
|
|
216
|
+
width: 100%;
|
|
217
|
+
overflow-y: auto;
|
|
218
|
+
mask-image: ${({ $isNotAtBottom, $isNotAtTop }) => $isNotAtBottom && $isNotAtTop ? "linear-gradient(to bottom, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%)" : $isNotAtBottom ? "linear-gradient(to bottom, black calc(100% - 24px), transparent 100%)" : $isNotAtTop ? "linear-gradient(to top, black calc(100% - 24px), transparent 100%)" : "none"};
|
|
219
|
+
|
|
220
|
+
& > div {
|
|
221
|
+
width: 100%;
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: ${({ $gap }) => $gap || "8px"};
|
|
225
|
+
}
|
|
226
|
+
`;
|
|
227
|
+
const Avatar = safeStyled.div`
|
|
228
|
+
width: 80px;
|
|
229
|
+
height: 80px;
|
|
230
|
+
border-radius: 100%;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
background-color: var(--cpsl-color-background-8);
|
|
235
|
+
`;
|
|
236
|
+
export {
|
|
237
|
+
AccountTypeIcon,
|
|
238
|
+
AssetIcon,
|
|
239
|
+
CenteredText,
|
|
240
|
+
ErrorContainer,
|
|
241
|
+
ErrorIcon,
|
|
242
|
+
FilledDisabledInput,
|
|
243
|
+
FullWidthFilledDisabledInput,
|
|
244
|
+
GradientScroll,
|
|
245
|
+
HeaderSelect,
|
|
246
|
+
HeaderSelectContainer,
|
|
247
|
+
HeaderSelectItem,
|
|
248
|
+
Heading,
|
|
249
|
+
HeroAccountTypeIcon,
|
|
250
|
+
HeroGenericIcon,
|
|
251
|
+
HeroIcon,
|
|
252
|
+
HeroSuccessIcon,
|
|
253
|
+
InfoBoxContent,
|
|
254
|
+
InfoBoxHeader,
|
|
255
|
+
InnerStepContainer,
|
|
256
|
+
NetworkIcon,
|
|
257
|
+
QRContainer,
|
|
258
|
+
SpinnerContainer,
|
|
259
|
+
StepContainer,
|
|
260
|
+
StyledCpslTileButton
|
|
261
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ModalContent/ModalContent.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from '@getpara/core-sdk';
|
|
2
|
+
import { IconType } from '@getpara/react-components';
|
|
3
|
+
import { Transition, Variants } from 'framer-motion';
|
|
4
|
+
export declare const PARA_CONNECT = "https://connect.getpara.com/";
|
|
5
|
+
export declare const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
6
|
+
export interface OnRampProviderConfig {
|
|
7
|
+
name: string;
|
|
8
|
+
feeLower: number;
|
|
9
|
+
feeUpper?: number;
|
|
10
|
+
methods: OnRampMethod[];
|
|
11
|
+
icon: IconType;
|
|
12
|
+
backgroundColors: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare const ON_RAMP_PROVIDERS: Record<OnRampProvider, OnRampProviderConfig>;
|
|
15
|
+
type Networks = Record<Network, {
|
|
16
|
+
name: string;
|
|
17
|
+
icon: IconType;
|
|
18
|
+
isCircular?: boolean;
|
|
19
|
+
isDark?: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const NETWORKS: Networks;
|
|
22
|
+
export declare const ON_RAMP_ASSETS: Record<OnRampAsset, {
|
|
23
|
+
name: string;
|
|
24
|
+
code: string;
|
|
25
|
+
icon: IconType;
|
|
26
|
+
isCircular?: boolean;
|
|
27
|
+
isDark?: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function getNetworkName(str: Network | string): string;
|
|
30
|
+
export declare function getNetworkIcon(str: Network | string): IconType;
|
|
31
|
+
export declare function getAssetCode(str: OnRampAsset | string): string;
|
|
32
|
+
export declare function getAssetName(str: OnRampAsset | string): string;
|
|
33
|
+
export declare function getAssetIcon(str: OnRampAsset | string): "key" | "phone" | "farcaster" | "telegram" | "discord" | "x" | "search" | "wallet" | "cosmos" | "solana" | "para" | "walletConnect" | "close" | "copy" | "safe" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowNarrow" | "arrow" | "asterisk" | "backpack" | "backupKit" | "bank" | "baseBrand" | "beraBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "clubhouseBrand" | "clubhouse" | "code" | "coinbase" | "copy07" | "cosmosCircle" | "cosmostation" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dots" | "downloadCloud" | "download" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "glow" | "googleBrand" | "google" | "gridDots" | "haha" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "image" | "infoCircle" | "instagramBrand" | "instagram" | "keplr" | "laptop" | "leap" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "menu" | "metamask" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "okx" | "optimismBrand" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "passcode" | "phantom" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "polygon" | "puzzlePiece" | "qrCode02" | "qrCode" | "rabby" | "rainbow" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "send" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solanaCircle" | "solflare" | "spacingHeight" | "star04Filled" | "star05" | "stars01Filled" | "stars02" | "stars" | "stopSquare" | "stripeBrand" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "userCircle" | "userPlus" | "user" | "valora" | "youtubeBrand" | "youtube" | "zerion" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BQ2" | "BQ3" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CD2" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SI" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WS" | "YE" | "ZA" | "ZM" | "ZW";
|
|
34
|
+
export declare const MOBILE_SIZE = 480;
|
|
35
|
+
export declare const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
36
|
+
export declare const EMAIL_REGEX: RegExp;
|
|
37
|
+
export declare const BODY_MOTION_VARIANTS: Variants;
|
|
38
|
+
export declare const BODY_TRANSITION: Transition;
|
|
39
|
+
export declare const SDK_VERSION: string;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../chunk-MMUBH76A.js";
|
|
6
|
+
import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from "@getpara/core-sdk";
|
|
7
|
+
const PARA_CONNECT = "https://connect.getpara.com/";
|
|
8
|
+
const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
9
|
+
const ON_RAMP_PROVIDERS = {
|
|
10
|
+
[OnRampProvider.STRIPE]: {
|
|
11
|
+
name: "Stripe",
|
|
12
|
+
feeLower: 0.99,
|
|
13
|
+
feeUpper: 4.49,
|
|
14
|
+
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
15
|
+
icon: "stripeBrand",
|
|
16
|
+
backgroundColors: ["#6772E5", "#808AF4"]
|
|
17
|
+
},
|
|
18
|
+
[OnRampProvider.RAMP]: {
|
|
19
|
+
name: "Ramp",
|
|
20
|
+
feeLower: 0.99,
|
|
21
|
+
feeUpper: 4.49,
|
|
22
|
+
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
23
|
+
icon: "rampNetworkBrand",
|
|
24
|
+
backgroundColors: ["#21BF73", "#3AE492"]
|
|
25
|
+
},
|
|
26
|
+
[OnRampProvider.MOONPAY]: {
|
|
27
|
+
name: "MoonPay",
|
|
28
|
+
feeLower: 1,
|
|
29
|
+
feeUpper: 4.5,
|
|
30
|
+
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
31
|
+
icon: "moonpayBrand",
|
|
32
|
+
backgroundColors: ["#7715F5", "#9647fd"]
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const ICON_TYPES = {
|
|
36
|
+
ethereum: { isDark: true },
|
|
37
|
+
usdcBrand: { isCircular: true },
|
|
38
|
+
arbitrumBrand: { isCircular: true },
|
|
39
|
+
baseBrand: { isCircular: true },
|
|
40
|
+
optimismBrand: { isCircular: true },
|
|
41
|
+
cosmos: { isCircular: true, isDark: true },
|
|
42
|
+
celoBrand: { isCircular: true },
|
|
43
|
+
tetherBrand: { isCircular: true }
|
|
44
|
+
};
|
|
45
|
+
const NETWORKS = Object.entries({
|
|
46
|
+
[Network.ETHEREUM]: { name: "Ethereum", icon: "ethereum" },
|
|
47
|
+
[Network.SEPOLIA]: { name: "Sepolia", icon: "ethereum" },
|
|
48
|
+
[Network.ARBITRUM]: { name: "Arbitrum", icon: "arbitrumBrand" },
|
|
49
|
+
[Network.BASE]: { name: "Base", icon: "baseBrand" },
|
|
50
|
+
[Network.OPTIMISM]: { name: "Optimism", icon: "optimismBrand" },
|
|
51
|
+
[Network.POLYGON]: { name: "Polygon", icon: "polygonBrand" },
|
|
52
|
+
[Network.SOLANA]: { name: "Solana", icon: "solana" },
|
|
53
|
+
[Network.COSMOS]: { name: "Cosmos", icon: "cosmos" },
|
|
54
|
+
[Network.CELO]: { name: "Celo", icon: "celoBrand" },
|
|
55
|
+
[Network.SOLANA_DEVNET]: { name: "Solana Devnet", icon: "solana" },
|
|
56
|
+
[Network.NOBLE]: { name: "Noble", icon: "nobleBrand" },
|
|
57
|
+
[Network.BERACHAIN]: { name: "Berachain", icon: "beraBrand" }
|
|
58
|
+
}).reduce((acc, [key, entry]) => {
|
|
59
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
60
|
+
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
61
|
+
});
|
|
62
|
+
}, {});
|
|
63
|
+
const ON_RAMP_ASSETS = Object.entries({
|
|
64
|
+
[OnRampAsset.ETHEREUM]: { name: "Ethereum", code: "ETH", icon: "ethereum" },
|
|
65
|
+
[OnRampAsset.USDC]: { name: "USD Coin", code: "USDC", icon: "usdcBrand" },
|
|
66
|
+
[OnRampAsset.POLYGON]: { name: "Polygon", code: "POL", icon: "polygonBrand" },
|
|
67
|
+
[OnRampAsset.SOLANA]: { name: "Solana", code: "SOL", icon: "solana" },
|
|
68
|
+
[OnRampAsset.ATOM]: { name: "Atom", code: "ATOM", icon: "cosmos" },
|
|
69
|
+
[OnRampAsset.CELO]: { name: "Celo", code: "CELO", icon: "celoBrand" },
|
|
70
|
+
[OnRampAsset.TETHER]: { name: "Tether", code: "USDT", icon: "tetherBrand" },
|
|
71
|
+
[OnRampAsset.CUSD]: { name: "Celo Dollar", code: "CUSD", icon: "celoBrand" },
|
|
72
|
+
[OnRampAsset.CEUR]: { name: "Celo Euro", code: "CEUR", icon: "celoBrand" },
|
|
73
|
+
[OnRampAsset.CREAL]: { name: "Celo Real", code: "CREAL", icon: "celoBrand" },
|
|
74
|
+
[OnRampAsset.BERA]: { name: "Berachain", code: "BERA", icon: "beraBrand" }
|
|
75
|
+
}).reduce((acc, [key, entry]) => {
|
|
76
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
77
|
+
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
78
|
+
});
|
|
79
|
+
}, {});
|
|
80
|
+
function getNetworkName(str) {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.name) != null ? _b : `${str[0]}${str.slice(1).toLowerCase()}`;
|
|
83
|
+
}
|
|
84
|
+
function getNetworkIcon(str) {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.icon) != null ? _b : "globe";
|
|
87
|
+
}
|
|
88
|
+
function getAssetCode(str) {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.code) != null ? _b : str;
|
|
91
|
+
}
|
|
92
|
+
function getAssetName(str) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.name) != null ? _b : str;
|
|
95
|
+
}
|
|
96
|
+
function getAssetIcon(str) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.icon) != null ? _b : "emptyCircle";
|
|
99
|
+
}
|
|
100
|
+
const MOBILE_SIZE = 480;
|
|
101
|
+
const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
102
|
+
const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
103
|
+
const BODY_MOTION_VARIANTS = {
|
|
104
|
+
enter: (direction) => {
|
|
105
|
+
return {
|
|
106
|
+
scale: direction > 0 ? 0.9 : 1.1,
|
|
107
|
+
opacity: 0
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
center: {
|
|
111
|
+
scale: 1,
|
|
112
|
+
opacity: 1
|
|
113
|
+
},
|
|
114
|
+
exit: (direction) => {
|
|
115
|
+
return {
|
|
116
|
+
scale: direction < 0 ? 0.9 : 1.1,
|
|
117
|
+
opacity: 0
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const BODY_TRANSITION = {
|
|
122
|
+
duration: 0.2
|
|
123
|
+
};
|
|
124
|
+
const SDK_VERSION = "2.0.0-alpha.33";
|
|
125
|
+
export {
|
|
126
|
+
BODY_MOTION_VARIANTS,
|
|
127
|
+
BODY_TRANSITION,
|
|
128
|
+
EMAIL_REGEX,
|
|
129
|
+
MOBILE_SIZE,
|
|
130
|
+
NETWORKS,
|
|
131
|
+
NETWORK_NOT_SUPPORTED_ERROR,
|
|
132
|
+
ON_RAMP_ASSETS,
|
|
133
|
+
ON_RAMP_PROVIDERS,
|
|
134
|
+
PARA_CONNECT,
|
|
135
|
+
PARA_TERMS_AND_CONDITIONS,
|
|
136
|
+
SDK_VERSION,
|
|
137
|
+
getAssetCode,
|
|
138
|
+
getAssetIcon,
|
|
139
|
+
getAssetName,
|
|
140
|
+
getNetworkIcon,
|
|
141
|
+
getNetworkName
|
|
142
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TExternalWallet } from '@getpara/web-sdk';
|
|
2
|
+
import { IconType } from '@getpara/react-components';
|
|
3
|
+
import { TLinkedAccountType } from '@getpara/web-sdk';
|
|
4
|
+
export declare const ACCOUNT_TYPES: {
|
|
5
|
+
[key in TLinkedAccountType | TExternalWallet]: {
|
|
6
|
+
logo: IconType;
|
|
7
|
+
logoBranded?: IconType;
|
|
8
|
+
name: string;
|
|
9
|
+
isDark?: boolean;
|
|
10
|
+
inline?: string;
|
|
11
|
+
isExternalWallet?: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function getAccountTypeName(type: TLinkedAccountType | TExternalWallet | undefined, { inline }?: {
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
}): string | undefined;
|
|
17
|
+
export declare function getAccountTypeLogo(type: TLinkedAccountType | undefined): IconType | undefined;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
const ACCOUNT_TYPES = {
|
|
4
|
+
EMAIL: {
|
|
5
|
+
logo: "mail",
|
|
6
|
+
name: "Email",
|
|
7
|
+
inline: "email address",
|
|
8
|
+
isDark: true
|
|
9
|
+
},
|
|
10
|
+
PHONE: {
|
|
11
|
+
logo: "phone",
|
|
12
|
+
name: "Phone",
|
|
13
|
+
inline: "phone number",
|
|
14
|
+
isDark: true
|
|
15
|
+
},
|
|
16
|
+
EXTERNAL_WALLET: {
|
|
17
|
+
logo: "wallet",
|
|
18
|
+
name: "External Wallet",
|
|
19
|
+
inline: "external wallet",
|
|
20
|
+
isDark: true
|
|
21
|
+
},
|
|
22
|
+
GOOGLE: {
|
|
23
|
+
logo: "google",
|
|
24
|
+
logoBranded: "googleBrand",
|
|
25
|
+
name: "Google"
|
|
26
|
+
},
|
|
27
|
+
TWITTER: {
|
|
28
|
+
logo: "twitter",
|
|
29
|
+
logoBranded: "twitterBrand",
|
|
30
|
+
name: "X / Twitter",
|
|
31
|
+
inline: "X account",
|
|
32
|
+
isDark: true
|
|
33
|
+
},
|
|
34
|
+
APPLE: {
|
|
35
|
+
logo: "apple",
|
|
36
|
+
logoBranded: "appleBrand",
|
|
37
|
+
name: "Apple",
|
|
38
|
+
isDark: true
|
|
39
|
+
},
|
|
40
|
+
DISCORD: {
|
|
41
|
+
logo: "discord",
|
|
42
|
+
logoBranded: "discordBrand",
|
|
43
|
+
name: "Discord"
|
|
44
|
+
},
|
|
45
|
+
FACEBOOK: {
|
|
46
|
+
logo: "facebook",
|
|
47
|
+
logoBranded: "facebookBrand",
|
|
48
|
+
name: "Facebook"
|
|
49
|
+
},
|
|
50
|
+
FARCASTER: {
|
|
51
|
+
logo: "farcaster",
|
|
52
|
+
logoBranded: "farcasterBrand",
|
|
53
|
+
name: "Farcaster"
|
|
54
|
+
},
|
|
55
|
+
TELEGRAM: {
|
|
56
|
+
logo: "telegram",
|
|
57
|
+
logoBranded: "telegramBrand",
|
|
58
|
+
name: "Telegram"
|
|
59
|
+
},
|
|
60
|
+
METAMASK: {
|
|
61
|
+
logo: "metamask",
|
|
62
|
+
name: "MetaMask",
|
|
63
|
+
isExternalWallet: true
|
|
64
|
+
},
|
|
65
|
+
RAINBOW: {
|
|
66
|
+
logo: "rainbow",
|
|
67
|
+
name: "Rainbow",
|
|
68
|
+
isExternalWallet: true
|
|
69
|
+
},
|
|
70
|
+
COINBASE: {
|
|
71
|
+
logo: "coinbase",
|
|
72
|
+
name: "Coinbase Wallet",
|
|
73
|
+
isExternalWallet: true
|
|
74
|
+
},
|
|
75
|
+
WALLETCONNECT: {
|
|
76
|
+
logo: "walletConnect",
|
|
77
|
+
name: "WalletConnect",
|
|
78
|
+
isExternalWallet: true
|
|
79
|
+
},
|
|
80
|
+
ZERION: {
|
|
81
|
+
logo: "zerion",
|
|
82
|
+
name: "Zerion",
|
|
83
|
+
isExternalWallet: true
|
|
84
|
+
},
|
|
85
|
+
SAFE: {
|
|
86
|
+
logo: "safe",
|
|
87
|
+
name: "Safe",
|
|
88
|
+
isExternalWallet: true
|
|
89
|
+
},
|
|
90
|
+
RABBY: {
|
|
91
|
+
logo: "rabby",
|
|
92
|
+
name: "Rabby",
|
|
93
|
+
isExternalWallet: true
|
|
94
|
+
},
|
|
95
|
+
OKX: {
|
|
96
|
+
logo: "okx",
|
|
97
|
+
name: "OKX",
|
|
98
|
+
isExternalWallet: true
|
|
99
|
+
},
|
|
100
|
+
PHANTOM: {
|
|
101
|
+
logo: "phantom",
|
|
102
|
+
name: "Phantom",
|
|
103
|
+
isExternalWallet: true
|
|
104
|
+
},
|
|
105
|
+
GLOW: {
|
|
106
|
+
logo: "glow",
|
|
107
|
+
name: "Glow",
|
|
108
|
+
isExternalWallet: true
|
|
109
|
+
},
|
|
110
|
+
BACKPACK: {
|
|
111
|
+
logo: "backpack",
|
|
112
|
+
name: "Backpack",
|
|
113
|
+
isExternalWallet: true
|
|
114
|
+
},
|
|
115
|
+
KEPLR: {
|
|
116
|
+
logo: "keplr",
|
|
117
|
+
name: "Keplr",
|
|
118
|
+
isExternalWallet: true
|
|
119
|
+
},
|
|
120
|
+
LEAP: {
|
|
121
|
+
logo: "leap",
|
|
122
|
+
name: "Leap",
|
|
123
|
+
isExternalWallet: true
|
|
124
|
+
},
|
|
125
|
+
HAHA: {
|
|
126
|
+
logo: "haha",
|
|
127
|
+
name: "HaHa",
|
|
128
|
+
isExternalWallet: true
|
|
129
|
+
},
|
|
130
|
+
COSMOSTATION: {
|
|
131
|
+
logo: "cosmostation",
|
|
132
|
+
name: "Cosmostation",
|
|
133
|
+
isExternalWallet: true
|
|
134
|
+
},
|
|
135
|
+
SOLFLARE: {
|
|
136
|
+
logo: "solflare",
|
|
137
|
+
name: "Solflare",
|
|
138
|
+
isExternalWallet: true
|
|
139
|
+
},
|
|
140
|
+
VALORA: {
|
|
141
|
+
logo: "valora",
|
|
142
|
+
name: "Valora",
|
|
143
|
+
isExternalWallet: true
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
function getAccountTypeName(type, { inline = false } = {}) {
|
|
147
|
+
var _a;
|
|
148
|
+
const data = type ? ACCOUNT_TYPES[type] : void 0;
|
|
149
|
+
return data ? inline ? (_a = data.inline) != null ? _a : `${data.name} ${data.isExternalWallet ? "wallet" : "account"}` : data.name : void 0;
|
|
150
|
+
}
|
|
151
|
+
function getAccountTypeLogo(type) {
|
|
152
|
+
return type ? ACCOUNT_TYPES[type].logoBranded || ACCOUNT_TYPES[type].logo : void 0;
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
ACCOUNT_TYPES,
|
|
156
|
+
getAccountTypeLogo,
|
|
157
|
+
getAccountTypeName
|
|
158
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
const WALLET_TYPE_CONFIG = {
|
|
4
|
+
EVM: {
|
|
5
|
+
name: "Ethereum",
|
|
6
|
+
icon: "ethCircle"
|
|
7
|
+
},
|
|
8
|
+
SOLANA: { name: "Solana", icon: "solanaCircle" },
|
|
9
|
+
COSMOS: { name: "Cosmos", icon: "cosmosCircle" }
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
WALLET_TYPE_CONFIG
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGoBack: () => () => void;
|