@getpara/react-sdk 2.0.0-alpha.7 → 2.0.0-alpha.71
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/README.md +21 -0
- package/dist/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
- package/dist/cosmos/actions/index.d.ts +2 -0
- package/dist/cosmos/actions/index.js +3 -0
- package/dist/cosmos/hooks/index.d.ts +2 -0
- package/dist/cosmos/hooks/index.js +3 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
- package/dist/cosmos/index.d.ts +2 -0
- package/dist/cosmos/index.js +3 -0
- package/dist/css/modal.css +14 -1
- package/dist/evm/actions/getViemAccount.d.ts +22 -0
- package/dist/evm/actions/getViemAccount.js +20 -0
- package/dist/evm/actions/getViemClient.d.ts +17993 -0
- package/dist/evm/actions/getViemClient.js +25 -0
- package/dist/evm/actions/index.d.ts +2 -0
- package/dist/evm/actions/index.js +3 -0
- package/dist/evm/hooks/index.d.ts +2 -0
- package/dist/evm/hooks/index.js +3 -0
- package/dist/evm/hooks/useViemAccount.d.ts +26 -0
- package/dist/evm/hooks/useViemAccount.js +32 -0
- package/dist/evm/hooks/useViemClient.d.ts +17997 -0
- package/dist/evm/hooks/useViemClient.js +30 -0
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +3 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.js +4 -9
- package/dist/provider/ParaProvider.d.ts +1 -2
- package/dist/provider/ParaProvider.js +17 -76
- package/dist/public/PPMori-Regular.woff2 +0 -0
- package/dist/public/PPMori-SemiBold.woff2 +0 -0
- package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
- package/dist/solana/actions/getSolanaSigner.js +15 -0
- package/dist/solana/actions/index.d.ts +1 -0
- package/dist/solana/actions/index.js +2 -0
- package/dist/solana/hooks/index.d.ts +1 -0
- package/dist/solana/hooks/index.js +2 -0
- package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
- package/dist/solana/hooks/useSolanaSigner.js +32 -0
- package/dist/solana/index.d.ts +2 -0
- package/dist/solana/index.js +3 -0
- package/package.json +37 -51
- package/styles.css/package.json +1 -1
- package/dist/cli/cli.mjs +0 -35
- package/dist/modal/ParaModal.d.ts +0 -2
- package/dist/modal/ParaModal.js +0 -262
- package/dist/modal/components/Account/Account.d.ts +0 -5
- package/dist/modal/components/Account/Account.js +0 -139
- package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFunds.js +0 -69
- package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
- package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
- package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
- package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
- package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
- package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
- package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
- package/dist/modal/components/AddFunds/common.d.ts +0 -19
- package/dist/modal/components/AddFunds/common.js +0 -24
- package/dist/modal/components/AddFunds/index.d.ts +0 -3
- package/dist/modal/components/AddFunds/index.js +0 -4
- package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -6
- package/dist/modal/components/AuthInput/AuthInput.js +0 -262
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
- package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
- package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -157
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
- package/dist/modal/components/AuthOptions/AuthOptions.js +0 -67
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -63
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -55
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
- package/dist/modal/components/Body/Body.d.ts +0 -11
- package/dist/modal/components/Body/Body.js +0 -327
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
- package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
- package/dist/modal/components/ChainSwitch/config.js +0 -17
- package/dist/modal/components/Controls/Controls.d.ts +0 -5
- package/dist/modal/components/Controls/Controls.js +0 -77
- package/dist/modal/components/Controls/Selects.d.ts +0 -2
- package/dist/modal/components/Controls/Selects.js +0 -189
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -144
- package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
- package/dist/modal/components/ExternalWalletStep/config.js +0 -17
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -34
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -173
- package/dist/modal/components/Footer/Footer.d.ts +0 -1
- package/dist/modal/components/Footer/Footer.js +0 -95
- package/dist/modal/components/Header/Header.d.ts +0 -1
- package/dist/modal/components/Header/Header.js +0 -43
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
- package/dist/modal/components/Header/hooks/useStepTitle.js +0 -54
- package/dist/modal/components/Hero/Hero.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.js +0 -116
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -1
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -31
- package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
- package/dist/modal/components/ModalContent/ModalContent.js +0 -95
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -2
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -27
- package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
- package/dist/modal/components/OAuth/OAuth.js +0 -79
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -1
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -90
- package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
- package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
- package/dist/modal/components/StripeComponents/StripeComponents.d.ts +0 -16
- package/dist/modal/components/StripeComponents/StripeComponents.js +0 -88
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -1
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -143
- package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
- package/dist/modal/components/Waiting/Waiting.js +0 -17
- package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
- package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
- package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
- package/dist/modal/components/WalletCard/WalletCard.js +0 -128
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -73
- package/dist/modal/components/common.d.ts +0 -42
- package/dist/modal/components/common.js +0 -175
- package/dist/modal/components/index.d.ts +0 -1
- package/dist/modal/components/index.js +0 -2
- package/dist/modal/constants/constants.d.ts +0 -39
- package/dist/modal/constants/constants.js +0 -138
- package/dist/modal/constants/defaults.d.ts +0 -5
- package/dist/modal/constants/defaults.js +0 -10
- package/dist/modal/constants/oAuthLogos.d.ts +0 -8
- package/dist/modal/constants/oAuthLogos.js +0 -24
- package/dist/modal/hooks/useGoBack.d.ts +0 -1
- package/dist/modal/hooks/useGoBack.js +0 -43
- package/dist/modal/index.d.ts +0 -8
- package/dist/modal/index.js +0 -29
- package/dist/modal/stores/index.d.ts +0 -1
- package/dist/modal/stores/index.js +0 -2
- package/dist/modal/stores/modal/actions.d.ts +0 -3
- package/dist/modal/stores/modal/actions.js +0 -133
- package/dist/modal/stores/modal/useModalStore.d.ts +0 -102
- package/dist/modal/stores/modal/useModalStore.js +0 -68
- package/dist/modal/types/commonTypes.d.ts +0 -6
- package/dist/modal/types/commonTypes.js +0 -1
- package/dist/modal/types/externalWallets.d.ts +0 -33
- package/dist/modal/types/externalWallets.js +0 -32
- package/dist/modal/types/modalProps.d.ts +0 -124
- package/dist/modal/types/modalProps.js +0 -12
- package/dist/modal/utils/authInputHelpers.d.ts +0 -7
- package/dist/modal/utils/authInputHelpers.js +0 -38
- package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
- package/dist/modal/utils/authLayoutHelpers.js +0 -8
- package/dist/modal/utils/countryCodes.d.ts +0 -8
- package/dist/modal/utils/countryCodes.js +0 -45
- package/dist/modal/utils/getMailtoLink.d.ts +0 -1
- package/dist/modal/utils/getMailtoLink.js +0 -10
- package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
- package/dist/modal/utils/getTileButtonFlex.js +0 -20
- package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
- package/dist/modal/utils/isPasskeySupported.js +0 -15
- package/dist/modal/utils/openPopup.d.ts +0 -6
- package/dist/modal/utils/openPopup.js +0 -60
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
- package/dist/modal/utils/steps.d.ts +0 -120
- package/dist/modal/utils/steps.js +0 -247
- package/dist/modal/utils/stringFormatters.d.ts +0 -5
- package/dist/modal/utils/stringFormatters.js +0 -19
- package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
- package/dist/modal/utils/validateOnRampConfig.js +0 -32
- package/dist/provider/actions/getAccount.d.ts +0 -26
- package/dist/provider/actions/getAccount.js +0 -51
- package/dist/provider/actions/getWallet.d.ts +0 -5
- package/dist/provider/actions/getWallet.js +0 -14
- package/dist/provider/actions/index.d.ts +0 -27
- package/dist/provider/actions/index.js +0 -59
- package/dist/provider/actions/utils.d.ts +0 -3
- package/dist/provider/actions/utils.js +0 -15
- package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
- package/dist/provider/components/CosmosWalletWrapper.js +0 -34
- package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
- package/dist/provider/components/EvmWalletWrapper.js +0 -34
- package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
- package/dist/provider/components/ExternalWalletWrapper.js +0 -139
- package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
- package/dist/provider/components/SolanaWalletWrapper.js +0 -36
- package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
- package/dist/provider/external/getParaCosmosConnector.js +0 -22
- package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
- package/dist/provider/external/getParaEvmConnector.js +0 -22
- package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
- package/dist/provider/external/getParaSolanaConnector.js +0 -22
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -12
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -18
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -3
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -21
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -8
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -14
- package/dist/provider/hooks/index.d.ts +0 -3
- package/dist/provider/hooks/index.js +0 -4
- package/dist/provider/hooks/mutations/index.d.ts +0 -26
- package/dist/provider/hooks/mutations/index.js +0 -61
- package/dist/provider/hooks/mutations/utils.d.ts +0 -4
- package/dist/provider/hooks/mutations/utils.js +0 -22
- package/dist/provider/hooks/queries/index.d.ts +0 -3
- package/dist/provider/hooks/queries/index.js +0 -10
- package/dist/provider/hooks/queries/useAccount.d.ts +0 -5
- package/dist/provider/hooks/queries/useAccount.js +0 -21
- package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
- package/dist/provider/hooks/queries/useWallet.js +0 -22
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
- package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
- package/dist/provider/hooks/utils/index.d.ts +0 -3
- package/dist/provider/hooks/utils/index.js +0 -10
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
- package/dist/provider/hooks/utils/useClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useClient.js +0 -10
- package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
- package/dist/provider/hooks/utils/useEventListeners.js +0 -147
- package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useInternalClient.js +0 -10
- package/dist/provider/hooks/utils/useModal.d.ts +0 -8
- package/dist/provider/hooks/utils/useModal.js +0 -17
- package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
- package/dist/provider/hooks/utils/useWalletState.js +0 -48
- package/dist/provider/index.d.ts +0 -4
- package/dist/provider/index.js +0 -9
- package/dist/provider/providers/AuthProvider.d.ts +0 -35
- package/dist/provider/providers/AuthProvider.js +0 -498
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
- package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -76
- package/dist/provider/providers/ExternalWalletProvider.js +0 -428
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
- package/dist/provider/stores/getters.d.ts +0 -4
- package/dist/provider/stores/getters.js +0 -13
- package/dist/provider/stores/setters.d.ts +0 -1
- package/dist/provider/stores/setters.js +0 -7
- package/dist/provider/stores/slices/client.d.ts +0 -3
- package/dist/provider/stores/slices/client.js +0 -9
- package/dist/provider/stores/slices/config.d.ts +0 -3
- package/dist/provider/stores/slices/config.js +0 -9
- package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
- package/dist/provider/stores/slices/externalWallets.js +0 -40
- package/dist/provider/stores/slices/index.d.ts +0 -4
- package/dist/provider/stores/slices/index.js +0 -5
- package/dist/provider/stores/slices/modal.d.ts +0 -3
- package/dist/provider/stores/slices/modal.js +0 -16
- package/dist/provider/stores/slices/wallet.d.ts +0 -3
- package/dist/provider/stores/slices/wallet.js +0 -13
- package/dist/provider/stores/types.d.ts +0 -64
- package/dist/provider/stores/types.js +0 -1
- package/dist/provider/stores/useStore.d.ts +0 -17
- package/dist/provider/stores/useStore.js +0 -28
- package/dist/provider/types/externalWalletProviders.d.ts +0 -12
- package/dist/provider/types/externalWalletProviders.js +0 -1
- package/dist/provider/types/provider.d.ts +0 -147
- package/dist/provider/types/provider.js +0 -1
- package/dist/provider/types/query.d.ts +0 -3
- package/dist/provider/types/query.js +0 -1
- package/dist/provider/types/utils.d.ts +0 -22
- package/dist/provider/types/utils.js +0 -1
- package/dist/provider/utils/constants.d.ts +0 -5
- package/dist/provider/utils/constants.js +0 -10
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
- package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
- package/dist/provider/utils/renameMutations.d.ts +0 -5
- package/dist/provider/utils/renameMutations.js +0 -18
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__async
|
|
4
|
-
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { CpslCodeInput, CpslSpinner, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { useEffect, useRef, useState } from "react";
|
|
8
|
-
import { styled } from "styled-components";
|
|
9
|
-
import { Heading, InnerStepContainer, StepContainer } from "../common.js";
|
|
10
|
-
import { displayPhoneNumber } from "@getpara/core-sdk";
|
|
11
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
12
|
-
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
13
|
-
import { useResendVerificationCode } from "../../../provider/index.js";
|
|
14
|
-
const VerificationCodeStep = () => {
|
|
15
|
-
const para = useInternalClient();
|
|
16
|
-
const authInfo = para.authInfo;
|
|
17
|
-
const { verifyNewAccount, isVerifyNewAccountPending, verifyNewAccountError } = useAuthActions();
|
|
18
|
-
const { resendVerificationCode } = useResendVerificationCode();
|
|
19
|
-
const inputRef = useRef(null);
|
|
20
|
-
const [code, setCode] = useState("");
|
|
21
|
-
const [isPending, setIsPending] = useState(false);
|
|
22
|
-
const [codeError, setCodeError] = useState(null);
|
|
23
|
-
const [resendDisabled, setResendDisabled] = useState(false);
|
|
24
|
-
const isEmail = (authInfo == null ? void 0 : authInfo.authType) === "email";
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
var _a, _b, _c, _d;
|
|
28
|
-
(_d = (_c = (_b = (_a = inputRef.current) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelectorAll("input")) == null ? void 0 : _c[0]) == null ? void 0 : _d.focus();
|
|
29
|
-
}, 10);
|
|
30
|
-
}, []);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
setCodeError(null);
|
|
33
|
-
if (code.length === 6) {
|
|
34
|
-
handleSubmitCode();
|
|
35
|
-
}
|
|
36
|
-
}, [code]);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (isVerifyNewAccountPending) {
|
|
39
|
-
setIsPending(isVerifyNewAccountPending);
|
|
40
|
-
}
|
|
41
|
-
}, [isVerifyNewAccountPending]);
|
|
42
|
-
const handleResendClick = () => __async(void 0, null, function* () {
|
|
43
|
-
if (!resendDisabled) {
|
|
44
|
-
setResendDisabled(true);
|
|
45
|
-
resendVerificationCode(void 0, {
|
|
46
|
-
onSettled: () => {
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
setResendDisabled(false);
|
|
49
|
-
}, 3e3);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
const handleCodeInput = (e) => {
|
|
55
|
-
setCode(e.detail.value.trim());
|
|
56
|
-
};
|
|
57
|
-
const handleSubmitCode = () => __async(void 0, null, function* () {
|
|
58
|
-
if (code.length === 6 && /^\d+$/.test(code)) {
|
|
59
|
-
verifyNewAccount(code);
|
|
60
|
-
} else {
|
|
61
|
-
setCodeError("Incorrect code.");
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
if (!!verifyNewAccountError) {
|
|
66
|
-
setIsPending(false);
|
|
67
|
-
const status = verifyNewAccountError.status;
|
|
68
|
-
switch (status) {
|
|
69
|
-
case 429:
|
|
70
|
-
setCodeError("Too many incorrect attempts. Please try again in 10 minutes.");
|
|
71
|
-
break;
|
|
72
|
-
default:
|
|
73
|
-
setCodeError("Incorrect code.");
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}, [verifyNewAccountError]);
|
|
78
|
-
return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
|
|
79
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
80
|
-
/* @__PURE__ */ jsxs(Heading, { variant: "headingS", weight: "bold", children: [
|
|
81
|
-
"Verify ",
|
|
82
|
-
isEmail ? "Email" : "Phone Number"
|
|
83
|
-
] }),
|
|
84
|
-
/* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
|
|
85
|
-
"Please enter the code we sent to",
|
|
86
|
-
" ",
|
|
87
|
-
/* @__PURE__ */ jsx(InlineText, { variant: "bodyS", children: (authInfo == null ? void 0 : authInfo.authType) === "phone" ? displayPhoneNumber(authInfo.identifier) : authInfo.identifier })
|
|
88
|
-
] })
|
|
89
|
-
] }),
|
|
90
|
-
/* @__PURE__ */ jsx(InnerStepContainer, { children: isPending ? /* @__PURE__ */ jsx(CpslSpinner, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
|
-
/* @__PURE__ */ jsx(
|
|
92
|
-
"form",
|
|
93
|
-
{
|
|
94
|
-
onSubmit: (e) => __async(void 0, null, function* () {
|
|
95
|
-
e.preventDefault();
|
|
96
|
-
yield handleSubmitCode();
|
|
97
|
-
}),
|
|
98
|
-
children: /* @__PURE__ */ jsx(
|
|
99
|
-
StyledCodeInput,
|
|
100
|
-
{
|
|
101
|
-
ref: inputRef,
|
|
102
|
-
length: 6,
|
|
103
|
-
type: "number",
|
|
104
|
-
code,
|
|
105
|
-
onCpslInput: handleCodeInput,
|
|
106
|
-
errorText: codeError || "",
|
|
107
|
-
onKeyDown: (e) => __async(void 0, null, function* () {
|
|
108
|
-
return e.key === "Enter" && (yield handleSubmitCode());
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
/* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
|
|
115
|
-
"Didn\u2019t receive a code?",
|
|
116
|
-
" ",
|
|
117
|
-
/* @__PURE__ */ jsx(
|
|
118
|
-
ClickableText,
|
|
119
|
-
{
|
|
120
|
-
variant: "bodyS",
|
|
121
|
-
style: { cursor: resendDisabled ? "default" : "pointer" },
|
|
122
|
-
onClick: handleResendClick,
|
|
123
|
-
children: resendDisabled ? "Resent!" : "Resend."
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] })
|
|
127
|
-
] }) })
|
|
128
|
-
] });
|
|
129
|
-
};
|
|
130
|
-
const StyledCodeInput = styled(CpslCodeInput)`
|
|
131
|
-
align-self: center;
|
|
132
|
-
`;
|
|
133
|
-
const InlineText = styled(CpslText)`
|
|
134
|
-
text-align: center;
|
|
135
|
-
display: inline-block;
|
|
136
|
-
`;
|
|
137
|
-
const ClickableText = styled(InlineText)`
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
display: inline-block;
|
|
140
|
-
`;
|
|
141
|
-
export {
|
|
142
|
-
VerificationCodeStep
|
|
143
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { CpslSpinner, CpslText } from "@getpara/react-components";
|
|
5
|
-
import { Heading, SpinnerContainer, StepContainer, InnerStepContainer } from "../common.js";
|
|
6
|
-
const Waiting = ({ heading, subheading }) => {
|
|
7
|
-
return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
|
|
8
|
-
/* @__PURE__ */ jsx(SpinnerContainer, { children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) }),
|
|
9
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Heading, { variant: "headingS", weight: "bold", children: heading }),
|
|
11
|
-
/* @__PURE__ */ jsx(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: subheading })
|
|
12
|
-
] })
|
|
13
|
-
] });
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
Waiting
|
|
17
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
import { CpslIcon, CpslText } from "@getpara/react-components";
|
|
6
|
-
const PartnerIcon = ({ partner }) => {
|
|
7
|
-
const { logoUrl, displayName, backgroundColor, foregroundColor } = partner;
|
|
8
|
-
if (logoUrl) {
|
|
9
|
-
return /* @__PURE__ */ jsx(Icon, { src: logoUrl });
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsx(Container, { $backgroundColor: backgroundColor, children: /* @__PURE__ */ jsx(Text, { variant: "bodyXS", $color: foregroundColor, children: displayName[0] }) });
|
|
12
|
-
};
|
|
13
|
-
const Container = styled.div`
|
|
14
|
-
width: 14px;
|
|
15
|
-
height: 14px;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
background-color: ${({ $backgroundColor }) => `${$backgroundColor != null ? $backgroundColor : "var(--cpsl-color-contrast)"}`};
|
|
20
|
-
border-radius: 100%;
|
|
21
|
-
`;
|
|
22
|
-
const Text = styled(CpslText)`
|
|
23
|
-
&::part(text-element) {
|
|
24
|
-
line-height: 100%;
|
|
25
|
-
color: ${({ $color }) => `${$color != null ? $color : "var(--cpsl-color-foreground-0)"}`};
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
const Icon = styled(CpslIcon)`
|
|
29
|
-
--height: 14px;
|
|
30
|
-
--width: 14px;
|
|
31
|
-
`;
|
|
32
|
-
export {
|
|
33
|
-
PartnerIcon
|
|
34
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TWalletType } from '@getpara/web-sdk';
|
|
2
|
-
export declare const ExternalWalletCard: ({ address, showAddFunds }: Pick<SharedWalletCardProps, "address" | "showAddFunds">) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
-
interface WalletCardProps {
|
|
4
|
-
id: string;
|
|
5
|
-
type: TWalletType;
|
|
6
|
-
showAddFunds?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const WalletCard: ({ id, type, showAddFunds }: WalletCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
interface SharedWalletCardProps {
|
|
10
|
-
address: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
type?: TWalletType;
|
|
13
|
-
name?: string;
|
|
14
|
-
identiconHash: string;
|
|
15
|
-
showAddFunds?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const WalletCards: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
-
export {};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
import { useModalStore } from "../../stores/index.js";
|
|
6
|
-
import { CpslButton, CpslIdenticon, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { truncateAddress } from "@getpara/web-sdk";
|
|
8
|
-
import { ModalStep } from "../../utils/steps.js";
|
|
9
|
-
import { useWalletState } from "../../../provider/index.js";
|
|
10
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
11
|
-
import { useStore } from "../../../provider/stores/useStore.js";
|
|
12
|
-
const ExternalWalletCard = ({ address, showAddFunds }) => {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const para = useInternalClient();
|
|
15
|
-
const wallet = para.externalWallets[address];
|
|
16
|
-
if (!(wallet == null ? void 0 : wallet.address) || !(wallet == null ? void 0 : wallet.type)) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
SharedWalletCard,
|
|
21
|
-
{
|
|
22
|
-
address: (_a = wallet.ensName) != null ? _a : truncateAddress(wallet.address, wallet.type),
|
|
23
|
-
identiconHash: (_b = para.getIdenticonHash(wallet.id, wallet.type)) != null ? _b : "",
|
|
24
|
-
showAddFunds
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
const WalletCard = ({ id, type, showAddFunds }) => {
|
|
29
|
-
var _a, _b, _c;
|
|
30
|
-
const para = useInternalClient();
|
|
31
|
-
const appName = useStore((state) => state.appName);
|
|
32
|
-
const wallet = para.findWallet(id, type);
|
|
33
|
-
if (!wallet) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const address = para.getDisplayAddress(wallet.id, { addressType: type });
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
SharedWalletCard,
|
|
39
|
-
{
|
|
40
|
-
id: wallet.id,
|
|
41
|
-
type: wallet.type,
|
|
42
|
-
address: (_a = wallet.ensName) != null ? _a : truncateAddress(address, type, { prefix: para.cosmosPrefix }),
|
|
43
|
-
name: (_b = wallet.name) != null ? _b : `${appName ? `${appName} ` : ""}Wallet`,
|
|
44
|
-
identiconHash: (_c = para.getIdenticonHash(wallet.id, type)) != null ? _c : "",
|
|
45
|
-
showAddFunds
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
const SharedWalletCard = ({ address, name, identiconHash, showAddFunds, id, type }) => {
|
|
50
|
-
const onRampConfig = useModalStore((state) => state.onRampConfig);
|
|
51
|
-
const { setSelectedWallet } = useWalletState();
|
|
52
|
-
const setStep = useModalStore((state) => state.setStep);
|
|
53
|
-
const isAddFundsEnabled = (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled);
|
|
54
|
-
const handleAddFundsClick = () => {
|
|
55
|
-
if (id && type) {
|
|
56
|
-
setSelectedWallet({ id, type });
|
|
57
|
-
isAddFundsEnabled && setStep(onRampConfig.isBuyEnabled ? ModalStep.ADD_FUNDS_BUY : ModalStep.ADD_FUNDS_RECEIVE);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
61
|
-
/* @__PURE__ */ jsxs(InnerContainer, { children: [
|
|
62
|
-
/* @__PURE__ */ jsx(CpslIdenticon, { size: "48px", hash: identiconHash }),
|
|
63
|
-
/* @__PURE__ */ jsxs(WalletNameContainer, { children: [
|
|
64
|
-
!!name && /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyL", weight: "semiBold", children: name }),
|
|
65
|
-
/* @__PURE__ */ jsx(Name, { color: "secondary", variant: "bodyS", weight: "medium", children: address })
|
|
66
|
-
] })
|
|
67
|
-
] }),
|
|
68
|
-
showAddFunds && isAddFundsEnabled && /* @__PURE__ */ jsx(AddFundsButton, { onClick: handleAddFundsClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "contrast", weight: "medium", children: "Add Funds" }) })
|
|
69
|
-
] });
|
|
70
|
-
};
|
|
71
|
-
const WalletCards = styled.div`
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-direction: column;
|
|
74
|
-
gap: 8px;
|
|
75
|
-
width: 100%;
|
|
76
|
-
`;
|
|
77
|
-
const Container = styled.div`
|
|
78
|
-
width: 100%;
|
|
79
|
-
padding: 24px;
|
|
80
|
-
display: flex;
|
|
81
|
-
justify-content: space-between;
|
|
82
|
-
align-items: center;
|
|
83
|
-
gap: 16px;
|
|
84
|
-
background-color: var(--cpsl-color-background-8);
|
|
85
|
-
border-radius: 16px;
|
|
86
|
-
`;
|
|
87
|
-
const InnerContainer = styled.div`
|
|
88
|
-
display: flex;
|
|
89
|
-
justify-content: flex-start;
|
|
90
|
-
gap: 8px;
|
|
91
|
-
align-items: center;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
`;
|
|
94
|
-
const WalletNameContainer = styled.div`
|
|
95
|
-
flex: 1;
|
|
96
|
-
display: flex;
|
|
97
|
-
flex-direction: column;
|
|
98
|
-
gap: 4px;
|
|
99
|
-
align-items: flex-start;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
`;
|
|
103
|
-
const Name = styled(CpslText)`
|
|
104
|
-
width: 100%;
|
|
105
|
-
&::part(text-element) {
|
|
106
|
-
line-height: 100%;
|
|
107
|
-
text-overflow: ellipsis;
|
|
108
|
-
overflow: hidden;
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
const AddFundsButton = styled(CpslButton)`
|
|
113
|
-
--button-primary-background-color: var(--cpsl-color-card-surface);
|
|
114
|
-
--button-primary-hover-background-color: var(--cpsl-color-background-4);
|
|
115
|
-
--button-primary-color: var(--cpsl-color-text-contrast);
|
|
116
|
-
--button-primary-hover-color: var(--cpsl-color-text-contrast);
|
|
117
|
-
--button-primary-active-color: var(--cpsl-color-text-contrast);
|
|
118
|
-
--button-padding-start: 8px;
|
|
119
|
-
--button-padding-end: 8px;
|
|
120
|
-
--button-padding-top: 8px;
|
|
121
|
-
--button-padding-bottom: 8px;
|
|
122
|
-
--button-border-radius: 8px;
|
|
123
|
-
`;
|
|
124
|
-
export {
|
|
125
|
-
ExternalWalletCard,
|
|
126
|
-
WalletCard,
|
|
127
|
-
WalletCards
|
|
128
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__async
|
|
4
|
-
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { CpslButton, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
|
|
8
|
-
import { useModalStore } from "../../stores/index.js";
|
|
9
|
-
import { ModalStep } from "../../utils/steps.js";
|
|
10
|
-
import { WalletCard, WalletCards } from "../WalletCard/WalletCard.js";
|
|
11
|
-
import styled from "styled-components";
|
|
12
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
13
|
-
import { useStore } from "../../../provider/stores/useStore.js";
|
|
14
|
-
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
15
|
-
import { useEffect, useState } from "react";
|
|
16
|
-
const WalletCreationDoneStep = ({ twoFactorAuthEnabled, onClose }) => {
|
|
17
|
-
const { isSetup2faPending } = useAuthActions();
|
|
18
|
-
const hideWallets = useStore((state) => {
|
|
19
|
-
var _a;
|
|
20
|
-
return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
|
|
21
|
-
});
|
|
22
|
-
const setStep = useModalStore((state) => state.setStep);
|
|
23
|
-
const isLogin = useModalStore((state) => state.isLogin());
|
|
24
|
-
const twoFactorStatus = useModalStore((state) => state.twoFactorStatus);
|
|
25
|
-
const onRampConfig = useModalStore((state) => state.onRampConfig);
|
|
26
|
-
const para = useInternalClient();
|
|
27
|
-
const [isWaiting, setIsWaiting] = useState(false);
|
|
28
|
-
const isOnRampConfigured = (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isWithdrawEnabled);
|
|
29
|
-
const onBypass2fa = () => {
|
|
30
|
-
if (isLogin) {
|
|
31
|
-
setStep(ModalStep.LOGIN_DONE);
|
|
32
|
-
} else {
|
|
33
|
-
onClose();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const handleNext = () => __async(void 0, null, function* () {
|
|
37
|
-
if (!twoFactorAuthEnabled) {
|
|
38
|
-
onBypass2fa();
|
|
39
|
-
}
|
|
40
|
-
if (!twoFactorStatus) {
|
|
41
|
-
if (isSetup2faPending) {
|
|
42
|
-
setIsWaiting(true);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
if (twoFactorStatus.isSetup) {
|
|
46
|
-
onBypass2fa();
|
|
47
|
-
} else {
|
|
48
|
-
setStep(ModalStep.SETUP_2FA);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (isWaiting && !!twoFactorStatus) {
|
|
54
|
-
setStep(ModalStep.SETUP_2FA);
|
|
55
|
-
}
|
|
56
|
-
}, [isWaiting, twoFactorStatus]);
|
|
57
|
-
return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
|
|
58
|
-
/* @__PURE__ */ jsx(CardContainer, { children: hideWallets ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
-
/* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
|
|
60
|
-
/* @__PURE__ */ jsx(CpslText, { variant: "bodyM", color: "secondary", weight: "medium", style: { marginTop: "16px" }, children: "Your account has been created." })
|
|
61
|
-
] }) : /* @__PURE__ */ jsx(WalletCards, { children: para.currentWalletIdsArray.map(([id, type]) => {
|
|
62
|
-
return /* @__PURE__ */ jsx(WalletCard, { id, type, showAddFunds: isOnRampConfigured }, id);
|
|
63
|
-
}) }) }),
|
|
64
|
-
/* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: handleNext, disabled: isWaiting, children: twoFactorAuthEnabled ? "Continue" : "Done" }) })
|
|
65
|
-
] });
|
|
66
|
-
};
|
|
67
|
-
const CardContainer = styled(InnerStepContainer)`
|
|
68
|
-
min-height: 196px;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
`;
|
|
71
|
-
export {
|
|
72
|
-
WalletCreationDoneStep
|
|
73
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { CpslInput, CpslText, CpslTileButton } from '@getpara/react-components';
|
|
2
|
-
import { Network, OnRampAsset } from '@getpara/web-sdk';
|
|
3
|
-
export declare const SpinnerContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
export declare const QRContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
-
export declare const InfoBoxContent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
-
export declare const InfoBoxHeader: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
-
export declare const FilledDisabledInput: typeof CpslInput;
|
|
8
|
-
export declare const FullWidthFilledDisabledInput: typeof CpslInput;
|
|
9
|
-
export declare const CenteredText: typeof CpslText;
|
|
10
|
-
export declare const InnerStepContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
-
export declare const StepContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
12
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
$wide?: boolean;
|
|
15
|
-
}>> & string;
|
|
16
|
-
export declare const Heading: typeof CpslText;
|
|
17
|
-
export declare const StyledCpslTileButton: typeof CpslTileButton;
|
|
18
|
-
export declare const HeroIcon: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
19
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
20
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
21
|
-
export declare const HeaderSelect: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
22
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
$width: number;
|
|
25
|
-
$top?: number;
|
|
26
|
-
}>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
27
|
-
export declare const HeaderSelectItem: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
28
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
29
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
30
|
-
export declare const HeaderSelectContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
31
|
-
export declare function AssetIcon({ asset, size }: {
|
|
32
|
-
asset: OnRampAsset;
|
|
33
|
-
size?: string;
|
|
34
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export declare function NetworkIcon({ network, size }: {
|
|
36
|
-
network: Network;
|
|
37
|
-
size?: string;
|
|
38
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
export declare const ErrorContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
40
|
-
export declare const ErrorIcon: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
41
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
42
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -1,175 +0,0 @@
|
|
|
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 { styled } from "styled-components";
|
|
6
|
-
import { MOBILE_SIZE, NETWORKS, ON_RAMP_ASSETS } from "../constants/constants.js";
|
|
7
|
-
import { useStore } from "../../provider/stores/useStore.js";
|
|
8
|
-
const SpinnerContainer = styled.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
`;
|
|
13
|
-
const QRContainer = styled.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
width: 286px;
|
|
18
|
-
height: 286px;
|
|
19
|
-
`;
|
|
20
|
-
const InfoBoxContent = styled.div`
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
gap: 8px;
|
|
24
|
-
`;
|
|
25
|
-
const InfoBoxHeader = styled.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
gap: 4px;
|
|
29
|
-
|
|
30
|
-
cpsl-icon {
|
|
31
|
-
--height: 20px;
|
|
32
|
-
--width: 20px;
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
const FilledDisabledInput = styled(CpslInput)`
|
|
36
|
-
--container-border-color: var(--cpsl-color-input-border-placeholder);
|
|
37
|
-
--container-background-color: var(--cpsl-color-background-0);
|
|
38
|
-
--input-background-color: transparent;
|
|
39
|
-
--input-font-weight: 500;
|
|
40
|
-
--input-color: var(--cpsl-color-text-secondary);
|
|
41
|
-
`;
|
|
42
|
-
const FullWidthFilledDisabledInput = styled(FilledDisabledInput)`
|
|
43
|
-
width: 100%;
|
|
44
|
-
`;
|
|
45
|
-
const CenteredText = styled(CpslText)`
|
|
46
|
-
width: 100%;
|
|
47
|
-
text-align: center;
|
|
48
|
-
`;
|
|
49
|
-
const InnerStepContainer = styled.div`
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
align-self: center;
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
gap: 8px;
|
|
57
|
-
`;
|
|
58
|
-
const StepContainer = styled(InnerStepContainer)`
|
|
59
|
-
gap: ${({ $wide }) => $wide ? "32px" : "24px"};
|
|
60
|
-
`;
|
|
61
|
-
const Heading = styled(CenteredText)``;
|
|
62
|
-
const StyledCpslTileButton = styled(CpslTileButton)`
|
|
63
|
-
--button-width: 100%;
|
|
64
|
-
--button-height: 87px;
|
|
65
|
-
--button-icon-height: 32px;
|
|
66
|
-
--button-icon-width: 32px;
|
|
67
|
-
`;
|
|
68
|
-
const HeroIcon = styled(CpslIcon)`
|
|
69
|
-
--height: 80px;
|
|
70
|
-
--width: 80px;
|
|
71
|
-
--icon-color: var(--cpsl-color-text-primary);
|
|
72
|
-
`;
|
|
73
|
-
const HeaderSelect = styled(CpslSelect)`
|
|
74
|
-
--container-height: 26px;
|
|
75
|
-
--container-border-width: 0px;
|
|
76
|
-
--container-padding-end: 0px;
|
|
77
|
-
--container-padding-start: 0px;
|
|
78
|
-
--container-background-color: transparent;
|
|
79
|
-
--container-box-shadow: none;
|
|
80
|
-
--container-gap: 2px;
|
|
81
|
-
--icon-width: 16px;
|
|
82
|
-
--icon-height: 16px;
|
|
83
|
-
position: relative;
|
|
84
|
-
|
|
85
|
-
&::part(selected-text) {
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&::part(dropdown) {
|
|
90
|
-
min-width: ${({ $width }) => `${$width - 2}px`};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&::part(popover) {
|
|
94
|
-
/* 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 */
|
|
95
|
-
@media (max-width: ${MOBILE_SIZE}px) {
|
|
96
|
-
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
97
|
-
bottom: 16px;
|
|
98
|
-
}
|
|
99
|
-
cpsl-auth-modal.force-mobile-media & {
|
|
100
|
-
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
101
|
-
bottom: 16px;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&::part(icon) {
|
|
106
|
-
--icon-color: var(--cpsl-color-contrast);
|
|
107
|
-
}
|
|
108
|
-
`;
|
|
109
|
-
const HeaderSelectItem = styled(CpslSelectItem)`
|
|
110
|
-
--outer-container-padding-start: 4px;
|
|
111
|
-
--outer-container-padding-end: 4px;
|
|
112
|
-
--outer-container-padding-top: 4px;
|
|
113
|
-
--outer-container-padding-bottom: 4px;
|
|
114
|
-
`;
|
|
115
|
-
const HeaderSelectContainer = styled.div`
|
|
116
|
-
position: relative;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
gap: 8px;
|
|
120
|
-
border-radius: 1000px;
|
|
121
|
-
background-color: var(--cpsl-color-background-8);
|
|
122
|
-
padding: 4px;
|
|
123
|
-
`;
|
|
124
|
-
const StyledIcon = styled(CpslIcon)`
|
|
125
|
-
background: var(--cpsl-color-background-0);
|
|
126
|
-
border-radius: 100%;
|
|
127
|
-
`;
|
|
128
|
-
function AssetIcon({ asset, size }) {
|
|
129
|
-
const isDark = useStore((state) => {
|
|
130
|
-
var _a, _b;
|
|
131
|
-
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
132
|
-
});
|
|
133
|
-
const data = ON_RAMP_ASSETS[asset];
|
|
134
|
-
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
135
|
-
}
|
|
136
|
-
function NetworkIcon({ network, size }) {
|
|
137
|
-
const isDark = useStore((state) => {
|
|
138
|
-
var _a, _b;
|
|
139
|
-
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
140
|
-
});
|
|
141
|
-
const data = NETWORKS[network];
|
|
142
|
-
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
143
|
-
}
|
|
144
|
-
const ErrorContainer = styled.div`
|
|
145
|
-
display: flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
gap: 4px;
|
|
149
|
-
`;
|
|
150
|
-
const ErrorIcon = styled(CpslIcon)`
|
|
151
|
-
--height: 16px;
|
|
152
|
-
--width: 16px;
|
|
153
|
-
--icon-color: var(--cpsl-color-text-error);
|
|
154
|
-
`;
|
|
155
|
-
export {
|
|
156
|
-
AssetIcon,
|
|
157
|
-
CenteredText,
|
|
158
|
-
ErrorContainer,
|
|
159
|
-
ErrorIcon,
|
|
160
|
-
FilledDisabledInput,
|
|
161
|
-
FullWidthFilledDisabledInput,
|
|
162
|
-
HeaderSelect,
|
|
163
|
-
HeaderSelectContainer,
|
|
164
|
-
HeaderSelectItem,
|
|
165
|
-
Heading,
|
|
166
|
-
HeroIcon,
|
|
167
|
-
InfoBoxContent,
|
|
168
|
-
InfoBoxHeader,
|
|
169
|
-
InnerStepContainer,
|
|
170
|
-
NetworkIcon,
|
|
171
|
-
QRContainer,
|
|
172
|
-
SpinnerContainer,
|
|
173
|
-
StepContainer,
|
|
174
|
-
StyledCpslTileButton
|
|
175
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ModalContent/ModalContent.js';
|