@getpara/react-sdk-lite 2.0.0-dev.6 → 2.0.0
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/cli/cli.mjs +26 -1
- package/dist/modal/ParaModal.js +16 -11
- package/dist/modal/components/Account/Account.js +42 -4
- package/dist/modal/components/Account/AccountHeader.js +10 -16
- package/dist/modal/components/Account/AccountProfile.d.ts +1 -1
- package/dist/modal/components/Account/AccountProfile.js +82 -210
- package/dist/modal/components/Account/AccountProfileEntry.d.ts +12 -0
- package/dist/modal/components/Account/AccountProfileEntry.js +220 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +15 -4
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.js +94 -0
- package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendForm.js +343 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.js +53 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.js +56 -0
- package/dist/modal/components/Account/AccountSend/AssetNetwork.d.ts +5 -0
- package/dist/modal/components/Account/AccountSend/AssetNetwork.js +36 -0
- package/dist/modal/components/Account/AccountSend/context.d.ts +38 -0
- package/dist/modal/components/Account/AccountSend/context.js +418 -0
- package/dist/modal/components/Account/AccountSend/index.d.ts +4 -0
- package/dist/modal/components/Account/AccountSend/index.js +67 -0
- package/dist/modal/components/Account/AccountWallet.d.ts +1 -0
- package/dist/modal/components/Account/AccountWallet.js +133 -0
- package/dist/modal/components/{WalletSelect/WalletSelect.d.ts → Account/AccountWalletSelect.d.ts} +1 -1
- package/dist/modal/components/{WalletSelect/WalletSelect.js → Account/AccountWalletSelect.js} +20 -6
- package/dist/modal/components/AddFunds/AddFunds.js +3 -2
- package/dist/modal/components/AddFunds/AddFundsAsset.js +7 -6
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +5 -5
- package/dist/modal/components/AddFunds/AddFundsProvider.js +1 -2
- package/dist/modal/components/AddFunds/AddFundsSettings.js +13 -54
- package/dist/modal/components/AddFunds/common.d.ts +0 -14
- package/dist/modal/components/AddFunds/common.js +1 -8
- package/dist/modal/components/AuthInput/AuthInput.js +2 -2
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +10 -1
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +8 -33
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +5 -2
- package/dist/modal/components/Body/Body.js +81 -48
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +8 -5
- package/dist/modal/components/Controls/ChainSelect.js +1 -2
- package/dist/modal/components/Controls/Controls.js +1 -0
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +5 -1
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +48 -19
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +5 -2
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +63 -33
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +3 -1
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +22 -12
- package/dist/modal/components/Footer/Footer.js +4 -5
- package/dist/modal/components/Header/Header.js +1 -2
- package/dist/modal/components/Header/hooks/useStepTitle.js +53 -37
- package/dist/modal/components/Hero/Hero.js +5 -3
- package/dist/modal/components/IFrameStep/IFrameStep.js +13 -12
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +4 -1
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +6 -5
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +34 -18
- package/dist/modal/components/OnRampComponents/AddingFunds.js +1 -1
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +1 -2
- package/dist/modal/components/QuantityInput.d.ts +9 -0
- package/dist/modal/components/QuantityInput.js +91 -0
- package/dist/modal/components/SearchableButtonList.d.ts +34 -0
- package/dist/modal/components/SearchableButtonList.js +223 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +4 -1
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +1 -0
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.js +10 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +13 -2
- package/dist/modal/components/Waiting/Waiting.d.ts +1 -1
- package/dist/modal/components/Waiting/Waiting.js +7 -2
- package/dist/modal/components/WalletCard/WalletCard.js +2 -3
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.d.ts +7 -1
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +33 -12
- package/dist/modal/components/common.d.ts +8 -10
- package/dist/modal/components/common.js +16 -36
- package/dist/modal/hooks/index.d.ts +4 -0
- package/dist/modal/hooks/index.js +5 -0
- package/dist/modal/hooks/useDebounce.d.ts +4 -0
- package/dist/modal/hooks/useDebounce.js +16 -0
- package/dist/modal/hooks/useFarcasterLogin.js +8 -1
- package/dist/modal/hooks/useTelegramLogin.js +4 -0
- package/dist/modal/index.d.ts +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/modal/stores/modal/actions.js +9 -2
- package/dist/modal/stores/modal/useModalStore.d.ts +9 -1
- package/dist/modal/stores/modal/useModalStore.js +6 -2
- package/dist/modal/types/modalProps.d.ts +5 -1
- package/dist/modal/utils/authInputHelpers.js +1 -1
- package/dist/modal/utils/countryCodes.js +50 -1
- package/dist/modal/utils/getWalletDisplayName.js +1 -1
- package/dist/modal/utils/openPopup.d.ts +1 -1
- package/dist/modal/utils/openPopup.js +6 -2
- package/dist/modal/utils/renderTextWithLinks.d.ts +2 -0
- package/dist/modal/utils/renderTextWithLinks.js +34 -0
- package/dist/modal/utils/steps.d.ts +24 -3
- package/dist/modal/utils/steps.js +51 -5
- package/dist/modal/utils/stringFormatters.d.ts +2 -3
- package/dist/modal/utils/stringFormatters.js +11 -7
- package/dist/modal/utils/validatePortalOrigin.d.ts +2 -0
- package/dist/modal/utils/validatePortalOrigin.js +14 -0
- package/dist/provider/ParaProviderMin.js +13 -5
- package/dist/provider/actions/getEmbeddedAccount.d.ts +3 -2
- package/dist/provider/actions/getEmbeddedAccount.js +13 -4
- package/dist/provider/actions/index.d.ts +11 -9
- package/dist/provider/actions/index.js +4 -0
- package/dist/provider/components/CosmosWalletWrapper.js +3 -3
- package/dist/provider/components/EvmWalletWrapper.js +3 -3
- package/dist/provider/components/ExternalWalletWrapper.js +7 -1
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
- package/dist/provider/hooks/mutations/index.d.ts +2 -0
- package/dist/provider/hooks/mutations/index.js +4 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +42 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.js +59 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +5 -5
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +15 -0
- package/dist/provider/hooks/mutations/useExportPrivateKey.js +32 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +8 -2
- package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +57 -0
- package/dist/provider/hooks/mutations/useSwitchWallets.js +30 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +18 -27
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +5 -5
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +14 -11
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +5 -5
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
- package/dist/provider/hooks/queries/index.d.ts +1 -0
- package/dist/provider/hooks/queries/index.js +2 -0
- package/dist/provider/hooks/queries/useAccount.js +58 -24
- package/dist/provider/hooks/queries/useLinkedAccounts.js +4 -2
- package/dist/provider/hooks/queries/useProfileBalance.d.ts +29 -0
- package/dist/provider/hooks/queries/useProfileBalance.js +65 -0
- package/dist/provider/hooks/utils/useAssetInfo.d.ts +3 -0
- package/dist/provider/hooks/utils/useAssetInfo.js +21 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +22 -5
- package/dist/provider/hooks/utils/useModal.js +3 -3
- package/dist/provider/hooks/utils/useWalletState.d.ts +2 -1
- package/dist/provider/hooks/utils/useWalletState.js +2 -1
- package/dist/provider/providers/AccountLinkProvider.js +18 -11
- package/dist/provider/providers/AssetsProvider.d.ts +14 -0
- package/dist/provider/providers/AssetsProvider.js +68 -0
- package/dist/provider/providers/AuthProvider.d.ts +6 -1
- package/dist/provider/providers/AuthProvider.js +204 -44
- package/dist/provider/providers/ExternalWalletProvider.d.ts +19 -5
- package/dist/provider/providers/ExternalWalletProvider.js +363 -44
- package/dist/provider/stores/getters.d.ts +2 -2
- package/dist/provider/stores/slices/modal.js +4 -1
- package/dist/provider/stores/types.d.ts +6 -3
- package/package.json +8 -8
- package/dist/modal/constants/constants.d.ts +0 -35
- package/dist/modal/constants/constants.js +0 -148
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
|
@@ -30,7 +30,7 @@ const LoginDoneStep = ({ onClose }) => {
|
|
|
30
30
|
return /* @__PURE__ */ jsx(WalletCard, { id, type, showAddFunds: false }, `${id}-${type}`);
|
|
31
31
|
}, [para.externalWalletConnectionType, para.externalWallets, para.wallets]);
|
|
32
32
|
useEffect(() => {
|
|
33
|
-
setTimeout(() => {
|
|
33
|
+
const timerId = setTimeout(() => {
|
|
34
34
|
if (bareModal) {
|
|
35
35
|
setFlow("account");
|
|
36
36
|
setStep(ModalStep.ACCOUNT_MAIN);
|
|
@@ -38,6 +38,9 @@ const LoginDoneStep = ({ onClose }) => {
|
|
|
38
38
|
onClose();
|
|
39
39
|
}
|
|
40
40
|
}, 1600);
|
|
41
|
+
return () => {
|
|
42
|
+
clearTimeout(timerId);
|
|
43
|
+
};
|
|
41
44
|
}, []);
|
|
42
45
|
return /* @__PURE__ */ jsxs(StepContainer, { children: [
|
|
43
46
|
/* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
|
|
@@ -5,8 +5,8 @@ import { CpslSpinner } from "@getpara/react-components";
|
|
|
5
5
|
import { useFarcasterLogin } from "../../hooks/useFarcasterLogin.js";
|
|
6
6
|
import { safeStyled } from "@getpara/react-common";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
|
-
import { getPortalBaseURL } from "@getpara/web-sdk";
|
|
9
8
|
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
9
|
+
import { validatePortalOrigin } from "../../utils/validatePortalOrigin.js";
|
|
10
10
|
function FarcasterOAuthStep() {
|
|
11
11
|
const { url, isLoaded, setIsLoaded } = useFarcasterLogin({
|
|
12
12
|
isActive: true
|
|
@@ -18,8 +18,7 @@ function FarcasterOAuthStep() {
|
|
|
18
18
|
if (!url) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
if (!event.origin.startsWith(portalBase)) {
|
|
21
|
+
if (!validatePortalOrigin(event, para.ctx)) {
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
25
24
|
if (event.data) {
|
|
@@ -28,8 +27,10 @@ function FarcasterOAuthStep() {
|
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
};
|
|
31
|
-
window.addEventListener("message", handleMessage);
|
|
32
|
-
return () =>
|
|
30
|
+
typeof window !== "undefined" && window.addEventListener("message", handleMessage);
|
|
31
|
+
return () => {
|
|
32
|
+
typeof window !== "undefined" && window.removeEventListener("message", handleMessage);
|
|
33
|
+
};
|
|
33
34
|
}, [url]);
|
|
34
35
|
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
35
36
|
url && /* @__PURE__ */ jsx(IFrame, { style: { display: isLoaded ? "block" : "none", height }, src: url, onLoad: () => setIsLoaded(true) }),
|
|
@@ -2,31 +2,54 @@
|
|
|
2
2
|
import "../../../chunk-MMUBH76A.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { safeStyled } from "@getpara/react-common";
|
|
5
|
-
import { HeroSpinner } from "@getpara/react-common";
|
|
6
5
|
import { CpslSpinner } from "@getpara/react-components";
|
|
7
6
|
import { useTelegramLogin } from "../../hooks/useTelegramLogin.js";
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
8
|
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
9
|
-
import { AccountTypeIcon } from "../common.js";
|
|
10
9
|
import { useModalStore } from "../../stores/index.js";
|
|
10
|
+
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
11
|
+
import { validatePortalOrigin } from "../../utils/validatePortalOrigin.js";
|
|
11
12
|
function TelegramOAuthStep() {
|
|
12
13
|
const { verifyTelegramStatus, verifyTelegram } = useAuthActions();
|
|
13
|
-
const { url,
|
|
14
|
+
const { url, isLoaded, setIsLoaded } = useTelegramLogin({
|
|
14
15
|
isActive: true,
|
|
15
16
|
status: verifyTelegramStatus,
|
|
16
17
|
onSubmit: verifyTelegram,
|
|
17
18
|
isLinking: false
|
|
18
19
|
});
|
|
19
|
-
const
|
|
20
|
+
const refs = useModalStore((state) => state.refs);
|
|
21
|
+
const para = useInternalClient();
|
|
22
|
+
const [height, setHeight] = useState(0);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const handleMessage = (event) => {
|
|
25
|
+
if (!url) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!validatePortalOrigin(event, para.ctx)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (event.data) {
|
|
32
|
+
if (event.data.type === "HEIGHT") {
|
|
33
|
+
setHeight(event.data.height);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
typeof window !== "undefined" && window.addEventListener("message", handleMessage);
|
|
38
|
+
return () => {
|
|
39
|
+
typeof window !== "undefined" && window.removeEventListener("message", handleMessage);
|
|
40
|
+
};
|
|
41
|
+
}, [url]);
|
|
20
42
|
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
21
|
-
|
|
22
|
-
|
|
43
|
+
url && /* @__PURE__ */ jsx(
|
|
44
|
+
IFrame,
|
|
23
45
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
46
|
+
ref: refs.telegramIFrame,
|
|
47
|
+
style: { display: isLoaded ? "block" : "none", height },
|
|
48
|
+
src: url,
|
|
49
|
+
onLoad: () => setIsLoaded(true)
|
|
27
50
|
}
|
|
28
|
-
)
|
|
29
|
-
/* @__PURE__ */ jsx(
|
|
51
|
+
),
|
|
52
|
+
(!url || !isLoaded) && /* @__PURE__ */ jsx(CpslSpinner, {})
|
|
30
53
|
] });
|
|
31
54
|
}
|
|
32
55
|
function TelegramIFrame({
|
|
@@ -57,13 +80,6 @@ const Container = safeStyled.div`
|
|
|
57
80
|
justify-content: center;
|
|
58
81
|
width: 100%;
|
|
59
82
|
`;
|
|
60
|
-
const HeroContainer = safeStyled.div`
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: 16px;
|
|
65
|
-
flex: 1;
|
|
66
|
-
`;
|
|
67
83
|
const IFrame = safeStyled.iframe`
|
|
68
84
|
width: 100%;
|
|
69
85
|
height: 52px;
|
|
@@ -3,7 +3,7 @@ import "../../../chunk-MMUBH76A.js";
|
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { OnRampPurchaseStatus } from "@getpara/web-sdk";
|
|
5
5
|
import { SpinnerContainer } from "../common.js";
|
|
6
|
-
import { ON_RAMP_PROVIDERS } from "
|
|
6
|
+
import { ON_RAMP_PROVIDERS } from "@getpara/react-common";
|
|
7
7
|
import { useModalStore } from "../../stores/index.js";
|
|
8
8
|
import { CpslSpinner, CpslText } from "@getpara/react-components";
|
|
9
9
|
const AddingFunds = () => {
|
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
} from "../../../chunk-MMUBH76A.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { ON_RAMP_PROVIDERS } from "
|
|
8
|
-
import { safeStyled } from "@getpara/react-common";
|
|
7
|
+
import { safeStyled, ON_RAMP_PROVIDERS } from "@getpara/react-common";
|
|
9
8
|
import { CpslButton, CpslIcon, CpslSpinner, CpslText } from "@getpara/react-components";
|
|
10
9
|
import { motion } from "framer-motion";
|
|
11
10
|
const OnRampProviderButton = ({ config, index, onClick: _onClick }) => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function QuantityInput({ value, onChange, onFocus, onBlur, placeholder, size, symbol, }: {
|
|
2
|
+
value: string | null;
|
|
3
|
+
onFocus?: () => void;
|
|
4
|
+
onBlur?: () => void;
|
|
5
|
+
onChange: (_: string | null) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
symbol?: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { safeStyled } from "@getpara/react-common";
|
|
5
|
+
function QuantityInput({
|
|
6
|
+
value,
|
|
7
|
+
onChange,
|
|
8
|
+
onFocus,
|
|
9
|
+
onBlur,
|
|
10
|
+
placeholder,
|
|
11
|
+
size = "72px",
|
|
12
|
+
symbol
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsxs(Container, { style: { fontSize: size, position: "relative" }, children: [
|
|
15
|
+
symbol && /* @__PURE__ */ jsx(CurrencySign, { slot: "start", children: symbol }),
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
Input,
|
|
18
|
+
{
|
|
19
|
+
value: value != null ? value : "",
|
|
20
|
+
onFocus: (e) => {
|
|
21
|
+
e.currentTarget.select();
|
|
22
|
+
onFocus == null ? void 0 : onFocus();
|
|
23
|
+
},
|
|
24
|
+
onKeyDown: (e) => {
|
|
25
|
+
if (!/^(\d|\.)$/.test(e.key) && !["Delete", "Backspace", "Tab", "Shift", "ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
onChange: (e) => {
|
|
30
|
+
const rawValue = e.currentTarget.value;
|
|
31
|
+
if (rawValue === "") {
|
|
32
|
+
onChange(null);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const numericValue = rawValue.replace(/[^0-9.]/g, "");
|
|
36
|
+
if (numericValue === "") {
|
|
37
|
+
onChange(null);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const isValidNumberFormat = /^\d*\.?\d*$/.test(numericValue);
|
|
41
|
+
if (isValidNumberFormat) {
|
|
42
|
+
onChange(numericValue);
|
|
43
|
+
} else {
|
|
44
|
+
onChange(null);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
onBlur: (e) => {
|
|
48
|
+
const numericValue = (e.currentTarget.value || "").replace(/[^0-9.]/g, "");
|
|
49
|
+
if (numericValue === "") {
|
|
50
|
+
onChange(null);
|
|
51
|
+
} else {
|
|
52
|
+
const parsed = parseFloat(numericValue);
|
|
53
|
+
if (!isNaN(parsed)) {
|
|
54
|
+
onChange(parsed.toString());
|
|
55
|
+
} else {
|
|
56
|
+
onChange(null);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
onBlur == null ? void 0 : onBlur();
|
|
60
|
+
},
|
|
61
|
+
placeholder: placeholder || "0"
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
const Container = safeStyled.div`
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
font-family: var(--cpsl-font-family);
|
|
71
|
+
color: var(--cpsl-color-text-primary);
|
|
72
|
+
`;
|
|
73
|
+
const CurrencySign = safeStyled.div`
|
|
74
|
+
position: relative;
|
|
75
|
+
left: 0px;
|
|
76
|
+
`;
|
|
77
|
+
const Input = safeStyled.input`
|
|
78
|
+
font-family: var(--cpsl-font-family);
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
color: inherit;
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
height: auto;
|
|
83
|
+
border-width: 0;
|
|
84
|
+
text-align: center;
|
|
85
|
+
width: 100%;
|
|
86
|
+
outline: none;
|
|
87
|
+
field-sizing: content;
|
|
88
|
+
`;
|
|
89
|
+
export {
|
|
90
|
+
QuantityInput
|
|
91
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type AssetItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
textSecondary?: ReactNode;
|
|
7
|
+
endText?: ReactNode;
|
|
8
|
+
endTextSecondary?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const contentMotionProps: {
|
|
11
|
+
transition: {
|
|
12
|
+
duration: number;
|
|
13
|
+
};
|
|
14
|
+
initial: {
|
|
15
|
+
opacity: number;
|
|
16
|
+
};
|
|
17
|
+
animate: {
|
|
18
|
+
opacity: number;
|
|
19
|
+
};
|
|
20
|
+
exit: {
|
|
21
|
+
opacity: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function SearchableButtonList<T>({ items, transformItem, searchFilter, searchPlaceholder, onSelect, }: {
|
|
25
|
+
items: T[];
|
|
26
|
+
transformItem: (_: T) => AssetItem;
|
|
27
|
+
searchFilter?: (_: {
|
|
28
|
+
item: T;
|
|
29
|
+
searchStr: string;
|
|
30
|
+
}) => boolean;
|
|
31
|
+
searchPlaceholder?: string;
|
|
32
|
+
onSelect: (_: T) => void;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../chunk-MMUBH76A.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as comp from "@getpara/react-components";
|
|
8
|
+
import { safeStyled } from "@getpara/react-common";
|
|
9
|
+
import { useState, useMemo, useRef, useEffect } from "react";
|
|
10
|
+
import { GradientScroll } from "./common.js";
|
|
11
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
12
|
+
const contentMotionProps = {
|
|
13
|
+
transition: { duration: 0.2 },
|
|
14
|
+
initial: { opacity: 0 },
|
|
15
|
+
animate: { opacity: 1 },
|
|
16
|
+
exit: { opacity: 0 }
|
|
17
|
+
};
|
|
18
|
+
const ESTIMATED_ITEM_HEIGHT = 72;
|
|
19
|
+
const VISIBILITY_BUFFER = 3;
|
|
20
|
+
function SearchableButtonList({
|
|
21
|
+
items,
|
|
22
|
+
transformItem,
|
|
23
|
+
searchFilter,
|
|
24
|
+
searchPlaceholder = "Search for an asset",
|
|
25
|
+
onSelect
|
|
26
|
+
}) {
|
|
27
|
+
const [searchStr, setSearchStr] = useState("");
|
|
28
|
+
const outerContainerRef = useRef(null);
|
|
29
|
+
const scrollContainerRef = useRef(null);
|
|
30
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
31
|
+
const [containerHeight, setContainerHeight] = useState(0);
|
|
32
|
+
const [contentHeight, setContentHeight] = useState(0);
|
|
33
|
+
const [renderedRange, setRenderedRange] = useState({ start: 0, end: 0 });
|
|
34
|
+
const transformedAndFiltered = useMemo(() => {
|
|
35
|
+
return items.filter((item) => !searchFilter || searchFilter({ item, searchStr })).map((item) => ({
|
|
36
|
+
assetItem: transformItem(item),
|
|
37
|
+
originalItem: item
|
|
38
|
+
}));
|
|
39
|
+
}, [items, searchFilter, searchStr, transformItem]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
setRenderedRange({ start: 0, end: 0 });
|
|
42
|
+
}, [items, searchStr]);
|
|
43
|
+
const desiredRange = useMemo(() => {
|
|
44
|
+
if (containerHeight === 0) {
|
|
45
|
+
return { start: 0, end: transformedAndFiltered.length };
|
|
46
|
+
}
|
|
47
|
+
const startIndex = Math.max(0, Math.floor(scrollTop / ESTIMATED_ITEM_HEIGHT) - VISIBILITY_BUFFER);
|
|
48
|
+
const endIndex = Math.min(
|
|
49
|
+
transformedAndFiltered.length,
|
|
50
|
+
Math.ceil((scrollTop + containerHeight) / ESTIMATED_ITEM_HEIGHT) + VISIBILITY_BUFFER
|
|
51
|
+
);
|
|
52
|
+
return { start: startIndex, end: endIndex };
|
|
53
|
+
}, [scrollTop, containerHeight, transformedAndFiltered.length]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
setRenderedRange((prev) => ({
|
|
56
|
+
start: Math.min(desiredRange.start, prev.start),
|
|
57
|
+
end: Math.max(desiredRange.end, prev.end)
|
|
58
|
+
}));
|
|
59
|
+
}, [desiredRange]);
|
|
60
|
+
const visibleRange = renderedRange;
|
|
61
|
+
const visibleItems = useMemo(() => {
|
|
62
|
+
return transformedAndFiltered.slice(visibleRange.start, visibleRange.end);
|
|
63
|
+
}, [transformedAndFiltered, visibleRange.start, visibleRange.end]);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
const container = (_b = (_a = scrollContainerRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement;
|
|
67
|
+
if (!container) return;
|
|
68
|
+
const updateDimensions = () => {
|
|
69
|
+
setContainerHeight(container.clientHeight);
|
|
70
|
+
setContentHeight(container.scrollHeight);
|
|
71
|
+
};
|
|
72
|
+
let scrollTimeout;
|
|
73
|
+
const handleScroll = () => {
|
|
74
|
+
if (scrollTimeout) {
|
|
75
|
+
cancelAnimationFrame(scrollTimeout);
|
|
76
|
+
}
|
|
77
|
+
scrollTimeout = requestAnimationFrame(() => {
|
|
78
|
+
setScrollTop(container.scrollTop);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
updateDimensions();
|
|
82
|
+
container.addEventListener("scroll", handleScroll, { passive: true });
|
|
83
|
+
const resizeObserver = new ResizeObserver(updateDimensions);
|
|
84
|
+
resizeObserver.observe(container);
|
|
85
|
+
const contentDiv = scrollContainerRef.current;
|
|
86
|
+
if (contentDiv) {
|
|
87
|
+
const contentResizeObserver = new ResizeObserver(updateDimensions);
|
|
88
|
+
contentResizeObserver.observe(contentDiv);
|
|
89
|
+
return () => {
|
|
90
|
+
if (scrollTimeout) {
|
|
91
|
+
cancelAnimationFrame(scrollTimeout);
|
|
92
|
+
}
|
|
93
|
+
container.removeEventListener("scroll", handleScroll);
|
|
94
|
+
resizeObserver.disconnect();
|
|
95
|
+
contentResizeObserver.disconnect();
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return () => {
|
|
99
|
+
if (scrollTimeout) {
|
|
100
|
+
cancelAnimationFrame(scrollTimeout);
|
|
101
|
+
}
|
|
102
|
+
container.removeEventListener("scroll", handleScroll);
|
|
103
|
+
resizeObserver.disconnect();
|
|
104
|
+
};
|
|
105
|
+
}, []);
|
|
106
|
+
const paddingTop = visibleRange.start * ESTIMATED_ITEM_HEIGHT;
|
|
107
|
+
const paddingBottom = Math.max(0, (transformedAndFiltered.length - visibleRange.end) * ESTIMATED_ITEM_HEIGHT);
|
|
108
|
+
const MAX_CONTAINER_HEIGHT = 480;
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
const container = (_b = (_a = scrollContainerRef.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement;
|
|
112
|
+
if (container) {
|
|
113
|
+
requestAnimationFrame(() => {
|
|
114
|
+
setContentHeight(container.scrollHeight);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, [visibleRange.start, visibleRange.end, transformedAndFiltered.length]);
|
|
118
|
+
const outerContainerHeight = useMemo(() => {
|
|
119
|
+
if (contentHeight === 0) {
|
|
120
|
+
return MAX_CONTAINER_HEIGHT;
|
|
121
|
+
}
|
|
122
|
+
const searchInputHeight = items.length >= 4 && !!searchFilter ? 56 : 0;
|
|
123
|
+
const totalNeededHeight = contentHeight + searchInputHeight;
|
|
124
|
+
if (totalNeededHeight < MAX_CONTAINER_HEIGHT) {
|
|
125
|
+
return totalNeededHeight + 4;
|
|
126
|
+
}
|
|
127
|
+
return MAX_CONTAINER_HEIGHT;
|
|
128
|
+
}, [contentHeight, items.length, searchFilter]);
|
|
129
|
+
return /* @__PURE__ */ jsxs(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
ref: outerContainerRef,
|
|
133
|
+
style: {
|
|
134
|
+
display: "flex",
|
|
135
|
+
flexDirection: "column",
|
|
136
|
+
height: `${outerContainerHeight}px`,
|
|
137
|
+
maxHeight: `${MAX_CONTAINER_HEIGHT}px`,
|
|
138
|
+
overflow: "hidden"
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
items.length >= 4 && !!searchFilter && /* @__PURE__ */ jsx(
|
|
142
|
+
SearchInput,
|
|
143
|
+
{
|
|
144
|
+
placeholder: searchPlaceholder,
|
|
145
|
+
value: searchStr,
|
|
146
|
+
onCpslInput: (e) => {
|
|
147
|
+
setSearchStr(e.detail.value);
|
|
148
|
+
},
|
|
149
|
+
style: { marginBottom: "8px" },
|
|
150
|
+
children: /* @__PURE__ */ jsx(comp.CpslIcon, { icon: "search", slot: "start" })
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ jsx(GradientScroll, { height: "100%", gap: "8px", children: /* @__PURE__ */ jsx("div", { ref: scrollContainerRef, children: /* @__PURE__ */ jsx(List, { style: { paddingTop, paddingBottom }, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "sync", children: visibleItems.map(({ assetItem, originalItem }) => {
|
|
154
|
+
const { key, icon, text, textSecondary, endText, endTextSecondary } = assetItem;
|
|
155
|
+
return /* @__PURE__ */ jsx(motion.li, __spreadProps(__spreadValues({ style: { width: "100%" } }, contentMotionProps), { children: /* @__PURE__ */ jsxs(AssetButton, { fullWidth: true, variant: "secondary", onClick: () => onSelect(originalItem), children: [
|
|
156
|
+
icon,
|
|
157
|
+
/* @__PURE__ */ jsxs(Info, { children: [
|
|
158
|
+
/* @__PURE__ */ jsx(Code, { color: "contrast", variant: "bodyL", children: text }),
|
|
159
|
+
textSecondary && /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyS", children: textSecondary })
|
|
160
|
+
] }),
|
|
161
|
+
endText && /* @__PURE__ */ jsxs(End, { children: [
|
|
162
|
+
/* @__PURE__ */ jsx(EndText, { color: "primary", variant: "bodyM", children: endText }),
|
|
163
|
+
endTextSecondary && /* @__PURE__ */ jsx(EndTextSecondary, { color: "contrast", variant: "bodyS", children: endTextSecondary })
|
|
164
|
+
] })
|
|
165
|
+
] }) }), key);
|
|
166
|
+
}) }) }) }) })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
const List = safeStyled.ul`
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
width: 100%;
|
|
175
|
+
gap: 8px;
|
|
176
|
+
list-style: none;
|
|
177
|
+
padding-inline-start: 0;
|
|
178
|
+
padding-inline-end: 0;
|
|
179
|
+
margin: 0;
|
|
180
|
+
`;
|
|
181
|
+
const AssetButton = safeStyled(comp.CpslButton)`
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
align-items: center;
|
|
185
|
+
gap: 8px;
|
|
186
|
+
--button-secondary-background-color: var(--cpsl-color-background-8);
|
|
187
|
+
--button-secondary-border-color: var(--cpsl-color-background-8);
|
|
188
|
+
--button-secondary-hover-background-color: var(--cpsl-color-background-16);
|
|
189
|
+
--button-secondary-hover-border-color: var(--cpsl-color-background-16);
|
|
190
|
+
`;
|
|
191
|
+
const Info = safeStyled(comp.CpslCol)`
|
|
192
|
+
text-align: left;
|
|
193
|
+
min-width: 0;
|
|
194
|
+
`, Code = comp.CpslText, Name = safeStyled(comp.CpslText)`
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: flex-start;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
min-width: 0;
|
|
201
|
+
height: 20px;
|
|
202
|
+
`, EndText = safeStyled(comp.CpslText)`
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
text-overflow: ellipsis;
|
|
205
|
+
white-space: nowrap;
|
|
206
|
+
min-width: 0;
|
|
207
|
+
`, EndTextSecondary = safeStyled(comp.CpslText)`
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
`;
|
|
210
|
+
const End = safeStyled(comp.CpslCol)`
|
|
211
|
+
text-align: right;
|
|
212
|
+
align-items: flex-end;
|
|
213
|
+
gap: 4px;
|
|
214
|
+
min-width: 0;
|
|
215
|
+
`;
|
|
216
|
+
const SearchInput = safeStyled(comp.CpslInput)`
|
|
217
|
+
--container-background-color: var(--cpsl-color-background-8);
|
|
218
|
+
--input-background-color: transparent;
|
|
219
|
+
`;
|
|
220
|
+
export {
|
|
221
|
+
SearchableButtonList,
|
|
222
|
+
contentMotionProps
|
|
223
|
+
};
|
|
@@ -32,10 +32,13 @@ const Setup2FAStep = ({ onClose }) => {
|
|
|
32
32
|
const params = (twoFactorStatus == null ? void 0 : twoFactorStatus.uri) ? new URL(twoFactorStatus.uri).searchParams : void 0;
|
|
33
33
|
const secret = params == null ? void 0 : params.get("secret");
|
|
34
34
|
useEffect(() => {
|
|
35
|
-
setTimeout(() => {
|
|
35
|
+
const timerId = setTimeout(() => {
|
|
36
36
|
var _a, _b, _c, _d;
|
|
37
37
|
(_d = (_c = (_b = (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelectorAll("input")) == null ? void 0 : _c[0]) == null ? void 0 : _d.focus();
|
|
38
38
|
}, 10);
|
|
39
|
+
return () => {
|
|
40
|
+
clearTimeout(timerId);
|
|
41
|
+
};
|
|
39
42
|
}, [isVerifying]);
|
|
40
43
|
useEffect(() => {
|
|
41
44
|
if (code.length === 6) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SwitchWalletsStep: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../../chunk-MMUBH76A.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Waiting } from "../Waiting/Waiting.js";
|
|
5
|
+
const SwitchWalletsStep = () => {
|
|
6
|
+
return /* @__PURE__ */ jsx(Waiting, { heading: "Switching Wallets", subheading: "Please complete the wallet selection in the popup window." });
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
SwitchWalletsStep
|
|
10
|
+
};
|
|
@@ -13,16 +13,20 @@ import { useResendVerificationCode } from "../../../provider/index.js";
|
|
|
13
13
|
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
14
14
|
const VerificationCode = ({ authInfo, onResend, onSubmit, status, error }) => {
|
|
15
15
|
const inputRef = useRef(null);
|
|
16
|
+
const resendTimerRef = useRef();
|
|
16
17
|
const [code, setCode] = useState("");
|
|
17
18
|
const [isPending, setIsPending] = useState(status === "pending");
|
|
18
19
|
const [codeError, setCodeError] = useState(null);
|
|
19
20
|
const [resendDisabled, setResendDisabled] = useState(false);
|
|
20
21
|
const isEmail = (authInfo == null ? void 0 : authInfo.authType) === "email";
|
|
21
22
|
useEffect(() => {
|
|
22
|
-
setTimeout(() => {
|
|
23
|
+
const timerId = setTimeout(() => {
|
|
23
24
|
var _a, _b, _c, _d;
|
|
24
25
|
(_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();
|
|
25
26
|
}, 10);
|
|
27
|
+
return () => {
|
|
28
|
+
clearTimeout(timerId);
|
|
29
|
+
};
|
|
26
30
|
}, []);
|
|
27
31
|
useEffect(() => {
|
|
28
32
|
setCodeError(null);
|
|
@@ -41,12 +45,19 @@ const VerificationCode = ({ authInfo, onResend, onSubmit, status, error }) => {
|
|
|
41
45
|
try {
|
|
42
46
|
onResend();
|
|
43
47
|
} finally {
|
|
44
|
-
setTimeout(() => {
|
|
48
|
+
resendTimerRef.current = setTimeout(() => {
|
|
45
49
|
setResendDisabled(false);
|
|
46
50
|
}, 3e3);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
});
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
return () => {
|
|
56
|
+
if (resendTimerRef.current) {
|
|
57
|
+
clearTimeout(resendTimerRef.current);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
50
61
|
const handleCodeInput = (e) => {
|
|
51
62
|
setCode(e.detail.value.trim());
|
|
52
63
|
};
|
|
@@ -3,15 +3,20 @@ import "../../../chunk-MMUBH76A.js";
|
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { CpslSpinner, CpslText } from "@getpara/react-components";
|
|
5
5
|
import { Heading, SpinnerContainer, StepContainer, InnerStepContainer } from "../common.js";
|
|
6
|
+
import { safeStyled } from "@getpara/react-common";
|
|
6
7
|
const Waiting = ({ heading, subheading }) => {
|
|
7
|
-
return /* @__PURE__ */ jsxs(
|
|
8
|
+
return /* @__PURE__ */ jsxs(Container, { $wide: true, children: [
|
|
8
9
|
/* @__PURE__ */ jsx(SpinnerContainer, { children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) }),
|
|
9
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
10
|
+
heading && /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
10
11
|
/* @__PURE__ */ jsx(Heading, { children: heading }),
|
|
11
12
|
subheading && /* @__PURE__ */ jsx(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: subheading })
|
|
12
13
|
] })
|
|
13
14
|
] });
|
|
14
15
|
};
|
|
16
|
+
const Container = safeStyled(StepContainer)`
|
|
17
|
+
flex: 1;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
`;
|
|
15
20
|
export {
|
|
16
21
|
Waiting
|
|
17
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../../chunk-MMUBH76A.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { safeStyled } from "@getpara/react-common";
|
|
4
|
+
import { safeStyled, WalletTypeIcon } from "@getpara/react-common";
|
|
5
5
|
import { useModalStore } from "../../stores/index.js";
|
|
6
6
|
import { CpslButton, CpslIcon, CpslText } from "@getpara/react-components";
|
|
7
7
|
import { truncateAddress } from "@getpara/web-sdk";
|
|
@@ -9,7 +9,6 @@ import { ModalStep } from "../../utils/steps.js";
|
|
|
9
9
|
import { useWalletState } from "../../../provider/index.js";
|
|
10
10
|
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
11
11
|
import { useStore } from "../../../provider/stores/useStore.js";
|
|
12
|
-
import { WalletTypeIcon } from "../common.js";
|
|
13
12
|
const ExternalWalletCard = ({
|
|
14
13
|
address,
|
|
15
14
|
showAddFunds
|
|
@@ -129,7 +128,7 @@ const WalletNameContainer = safeStyled.div`
|
|
|
129
128
|
const Name = safeStyled(CpslText)`
|
|
130
129
|
width: 100%;
|
|
131
130
|
&::part(text-element) {
|
|
132
|
-
line-height:
|
|
131
|
+
line-height: 150%;
|
|
133
132
|
text-overflow: ellipsis;
|
|
134
133
|
overflow: hidden;
|
|
135
134
|
white-space: nowrap;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { TWalletType } from '@getpara/web-sdk';
|
|
2
|
+
export declare const WalletSelectOld: ({ style, noTitle, types, isEmbeddedOnly, }: {
|
|
3
|
+
style?: React.CSSProperties;
|
|
4
|
+
noTitle?: boolean;
|
|
5
|
+
types?: TWalletType[];
|
|
6
|
+
isEmbeddedOnly?: boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
8
|
export declare const Select: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
3
9
|
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;
|
|
4
10
|
}, {
|