@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.
Files changed (172) hide show
  1. package/dist/cli/cli.mjs +26 -1
  2. package/dist/modal/ParaModal.js +16 -11
  3. package/dist/modal/components/Account/Account.js +42 -4
  4. package/dist/modal/components/Account/AccountHeader.js +10 -16
  5. package/dist/modal/components/Account/AccountProfile.d.ts +1 -1
  6. package/dist/modal/components/Account/AccountProfile.js +82 -210
  7. package/dist/modal/components/Account/AccountProfileEntry.d.ts +12 -0
  8. package/dist/modal/components/Account/AccountProfileEntry.js +220 -0
  9. package/dist/modal/components/Account/AccountProfileLinkOptions.js +15 -4
  10. package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +1 -0
  11. package/dist/modal/components/Account/AccountSend/AccountSendAsset.js +94 -0
  12. package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +1 -0
  13. package/dist/modal/components/Account/AccountSend/AccountSendForm.js +343 -0
  14. package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +1 -0
  15. package/dist/modal/components/Account/AccountSend/AccountSendNetwork.js +53 -0
  16. package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +1 -0
  17. package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.js +56 -0
  18. package/dist/modal/components/Account/AccountSend/AssetNetwork.d.ts +5 -0
  19. package/dist/modal/components/Account/AccountSend/AssetNetwork.js +36 -0
  20. package/dist/modal/components/Account/AccountSend/context.d.ts +38 -0
  21. package/dist/modal/components/Account/AccountSend/context.js +418 -0
  22. package/dist/modal/components/Account/AccountSend/index.d.ts +4 -0
  23. package/dist/modal/components/Account/AccountSend/index.js +67 -0
  24. package/dist/modal/components/Account/AccountWallet.d.ts +1 -0
  25. package/dist/modal/components/Account/AccountWallet.js +133 -0
  26. package/dist/modal/components/{WalletSelect/WalletSelect.d.ts → Account/AccountWalletSelect.d.ts} +1 -1
  27. package/dist/modal/components/{WalletSelect/WalletSelect.js → Account/AccountWalletSelect.js} +20 -6
  28. package/dist/modal/components/AddFunds/AddFunds.js +3 -2
  29. package/dist/modal/components/AddFunds/AddFundsAsset.js +7 -6
  30. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +5 -5
  31. package/dist/modal/components/AddFunds/AddFundsProvider.js +1 -2
  32. package/dist/modal/components/AddFunds/AddFundsSettings.js +13 -54
  33. package/dist/modal/components/AddFunds/common.d.ts +0 -14
  34. package/dist/modal/components/AddFunds/common.js +1 -8
  35. package/dist/modal/components/AuthInput/AuthInput.js +2 -2
  36. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +10 -1
  37. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +8 -33
  38. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +5 -2
  39. package/dist/modal/components/Body/Body.js +81 -48
  40. package/dist/modal/components/ChainSwitch/ChainSwitch.js +8 -5
  41. package/dist/modal/components/Controls/ChainSelect.js +1 -2
  42. package/dist/modal/components/Controls/Controls.js +1 -0
  43. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +5 -1
  44. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +48 -19
  45. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +5 -2
  46. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +63 -33
  47. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +3 -1
  48. package/dist/modal/components/ExternalWallets/ExternalWallets.js +22 -12
  49. package/dist/modal/components/Footer/Footer.js +4 -5
  50. package/dist/modal/components/Header/Header.js +1 -2
  51. package/dist/modal/components/Header/hooks/useStepTitle.js +53 -37
  52. package/dist/modal/components/Hero/Hero.js +5 -3
  53. package/dist/modal/components/IFrameStep/IFrameStep.js +13 -12
  54. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +4 -1
  55. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +6 -5
  56. package/dist/modal/components/OAuth/TelegramOAuthStep.js +34 -18
  57. package/dist/modal/components/OnRampComponents/AddingFunds.js +1 -1
  58. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +1 -2
  59. package/dist/modal/components/QuantityInput.d.ts +9 -0
  60. package/dist/modal/components/QuantityInput.js +91 -0
  61. package/dist/modal/components/SearchableButtonList.d.ts +34 -0
  62. package/dist/modal/components/SearchableButtonList.js +223 -0
  63. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +4 -1
  64. package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +1 -0
  65. package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.js +10 -0
  66. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +13 -2
  67. package/dist/modal/components/Waiting/Waiting.d.ts +1 -1
  68. package/dist/modal/components/Waiting/Waiting.js +7 -2
  69. package/dist/modal/components/WalletCard/WalletCard.js +2 -3
  70. package/dist/modal/components/WalletSelectOld/WalletSelectOld.d.ts +7 -1
  71. package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +33 -12
  72. package/dist/modal/components/common.d.ts +8 -10
  73. package/dist/modal/components/common.js +16 -36
  74. package/dist/modal/hooks/index.d.ts +4 -0
  75. package/dist/modal/hooks/index.js +5 -0
  76. package/dist/modal/hooks/useDebounce.d.ts +4 -0
  77. package/dist/modal/hooks/useDebounce.js +16 -0
  78. package/dist/modal/hooks/useFarcasterLogin.js +8 -1
  79. package/dist/modal/hooks/useTelegramLogin.js +4 -0
  80. package/dist/modal/index.d.ts +1 -1
  81. package/dist/modal/index.js +1 -1
  82. package/dist/modal/stores/modal/actions.js +9 -2
  83. package/dist/modal/stores/modal/useModalStore.d.ts +9 -1
  84. package/dist/modal/stores/modal/useModalStore.js +6 -2
  85. package/dist/modal/types/modalProps.d.ts +5 -1
  86. package/dist/modal/utils/authInputHelpers.js +1 -1
  87. package/dist/modal/utils/countryCodes.js +50 -1
  88. package/dist/modal/utils/getWalletDisplayName.js +1 -1
  89. package/dist/modal/utils/openPopup.d.ts +1 -1
  90. package/dist/modal/utils/openPopup.js +6 -2
  91. package/dist/modal/utils/renderTextWithLinks.d.ts +2 -0
  92. package/dist/modal/utils/renderTextWithLinks.js +34 -0
  93. package/dist/modal/utils/steps.d.ts +24 -3
  94. package/dist/modal/utils/steps.js +51 -5
  95. package/dist/modal/utils/stringFormatters.d.ts +2 -3
  96. package/dist/modal/utils/stringFormatters.js +11 -7
  97. package/dist/modal/utils/validatePortalOrigin.d.ts +2 -0
  98. package/dist/modal/utils/validatePortalOrigin.js +14 -0
  99. package/dist/provider/ParaProviderMin.js +13 -5
  100. package/dist/provider/actions/getEmbeddedAccount.d.ts +3 -2
  101. package/dist/provider/actions/getEmbeddedAccount.js +13 -4
  102. package/dist/provider/actions/index.d.ts +11 -9
  103. package/dist/provider/actions/index.js +4 -0
  104. package/dist/provider/components/CosmosWalletWrapper.js +3 -3
  105. package/dist/provider/components/EvmWalletWrapper.js +3 -3
  106. package/dist/provider/components/ExternalWalletWrapper.js +7 -1
  107. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
  108. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
  109. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
  110. package/dist/provider/hooks/mutations/index.d.ts +2 -0
  111. package/dist/provider/hooks/mutations/index.js +4 -0
  112. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +42 -0
  113. package/dist/provider/hooks/mutations/useAddAuthMethod.js +59 -0
  114. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
  115. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
  116. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +5 -5
  117. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
  118. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
  119. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
  120. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
  121. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +15 -0
  122. package/dist/provider/hooks/mutations/useExportPrivateKey.js +32 -0
  123. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
  124. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
  125. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
  126. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +8 -2
  127. package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
  128. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
  129. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
  130. package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
  131. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
  132. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
  133. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +57 -0
  134. package/dist/provider/hooks/mutations/useSwitchWallets.js +30 -0
  135. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
  136. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
  137. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +18 -27
  138. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +5 -5
  139. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +14 -11
  140. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
  141. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +5 -5
  142. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
  143. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
  144. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
  145. package/dist/provider/hooks/queries/index.d.ts +1 -0
  146. package/dist/provider/hooks/queries/index.js +2 -0
  147. package/dist/provider/hooks/queries/useAccount.js +58 -24
  148. package/dist/provider/hooks/queries/useLinkedAccounts.js +4 -2
  149. package/dist/provider/hooks/queries/useProfileBalance.d.ts +29 -0
  150. package/dist/provider/hooks/queries/useProfileBalance.js +65 -0
  151. package/dist/provider/hooks/utils/useAssetInfo.d.ts +3 -0
  152. package/dist/provider/hooks/utils/useAssetInfo.js +21 -0
  153. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
  154. package/dist/provider/hooks/utils/useEventListeners.js +22 -5
  155. package/dist/provider/hooks/utils/useModal.js +3 -3
  156. package/dist/provider/hooks/utils/useWalletState.d.ts +2 -1
  157. package/dist/provider/hooks/utils/useWalletState.js +2 -1
  158. package/dist/provider/providers/AccountLinkProvider.js +18 -11
  159. package/dist/provider/providers/AssetsProvider.d.ts +14 -0
  160. package/dist/provider/providers/AssetsProvider.js +68 -0
  161. package/dist/provider/providers/AuthProvider.d.ts +6 -1
  162. package/dist/provider/providers/AuthProvider.js +204 -44
  163. package/dist/provider/providers/ExternalWalletProvider.d.ts +19 -5
  164. package/dist/provider/providers/ExternalWalletProvider.js +363 -44
  165. package/dist/provider/stores/getters.d.ts +2 -2
  166. package/dist/provider/stores/slices/modal.js +4 -1
  167. package/dist/provider/stores/types.d.ts +6 -3
  168. package/package.json +8 -8
  169. package/dist/modal/constants/constants.d.ts +0 -35
  170. package/dist/modal/constants/constants.js +0 -148
  171. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  172. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
@@ -4,7 +4,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useEffect, useMemo, useRef } from "react";
5
5
  import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
6
6
  import { useDropdownPosition } from "../AuthInput/hooks/useDropdownPosition.js";
7
- import { getExternalWalletIcon, safeStyled, useCopyToClipboard } from "@getpara/react-common";
7
+ import { getExternalWalletIcon, MOBILE_SIZE, safeStyled, useCopyToClipboard } from "@getpara/react-common";
8
8
  import { useAccount, useWallet, useWalletState } from "../../../provider/index.js";
9
9
  import { CpslButton, CpslIcon, CpslSelect, CpslSelectItem, CpslText } from "@getpara/react-components";
10
10
  import { truncateAddress } from "@getpara/web-sdk";
@@ -62,7 +62,7 @@ const Wallet = ({
62
62
  )
63
63
  ] });
64
64
  };
65
- const WalletSelect = () => {
65
+ const AccountWalletSelect = () => {
66
66
  var _a, _b, _c;
67
67
  const containerRef = useRef(null);
68
68
  const { dropdownMaxHeight, dropdownWidth, mobileAnchor, resize } = useDropdownPosition(containerRef);
@@ -92,7 +92,7 @@ const WalletSelect = () => {
92
92
  anchorElId: "addressInputContainer",
93
93
  dropdownMaxHeight,
94
94
  $width: dropdownWidth != null ? dropdownWidth : 0,
95
- $top: (mobileAnchor != null ? mobileAnchor : 0) + 16 + 1,
95
+ $top: (mobileAnchor != null ? mobileAnchor : 0) + 184 + 1,
96
96
  selectedItemVariant: "bodyXS",
97
97
  icon: isMultiWallet ? "chevronUp" : null,
98
98
  disabled: !isMultiWallet,
@@ -108,6 +108,7 @@ const WalletSelect = () => {
108
108
  ) }) });
109
109
  };
110
110
  const Container = safeStyled.div`
111
+ flex: 0;
111
112
  display: flex;
112
113
  flex-direction: column;
113
114
  gap: 8px;
@@ -145,6 +146,18 @@ const Select = safeStyled(CpslSelect)`
145
146
  min-width: ${({ $width }) => `${$width - 2}px`};
146
147
  }
147
148
 
149
+ &::part(popover) {
150
+ /* 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 */
151
+ @media (max-width: ${MOBILE_SIZE}px) {
152
+ top: ${({ $top }) => $top ? `${$top}px` : "0px"};
153
+ bottom: 16px;
154
+ }
155
+ cpsl-auth-modal.force-mobile-media & {
156
+ top: ${({ $top }) => $top ? `${$top}px` : "0px"};
157
+ bottom: 16px;
158
+ }
159
+ }
160
+
148
161
  &::part(icon) {
149
162
  --icon-color: var(--cpsl-color-text-primary);
150
163
  }
@@ -170,7 +183,8 @@ const SelectContainer = safeStyled.div`
170
183
  border-radius: var(--cpsl-border-radius-tile-button);
171
184
  background-color: transparent;
172
185
  `;
173
- const WalletIcon = safeStyled(CpslIcon)` --icon-border: 1px solid var(--cpsl-color-background-8);
186
+ const WalletIcon = safeStyled(CpslIcon)`
187
+ --icon-border: 1px solid var(--cpsl-color-background-8);
174
188
  --icon-background: var(--cpsl-color-background-0);
175
189
  --icon-border-radius: 4px;
176
190
  `;
@@ -181,8 +195,8 @@ const CopyButton = safeStyled(CpslButton)`
181
195
  }
182
196
  `;
183
197
  export {
198
+ AccountWalletSelect,
184
199
  Select,
185
200
  SelectContainer,
186
- SelectItem,
187
- WalletSelect
201
+ SelectItem
188
202
  };
@@ -17,6 +17,7 @@ import { AnimatePresence } from "framer-motion";
17
17
  import { AddFundsSettings } from "./AddFundsSettings.js";
18
18
  import { WalletSelectOld } from "../WalletSelectOld/WalletSelectOld.js";
19
19
  const AddFunds = () => {
20
+ var _a;
20
21
  const step = useModalStore((state) => state.step);
21
22
  const onRampConfig = useModalStore((state) => state.onRampConfig);
22
23
  const onRampStep = useModalStore((state) => state.onRampStep);
@@ -29,7 +30,7 @@ const AddFunds = () => {
29
30
  const tabs = TABS.filter(
30
31
  ([enabledFlow, key]) => !!(onRampConfig == null ? void 0 : onRampConfig[key]) && (!isGuestMode || enabledFlow === EnabledFlow.RECEIVE)
31
32
  );
32
- const tab = storedTab != null ? storedTab : tabs[0][0];
33
+ const tab = storedTab != null ? storedTab : (_a = tabs[0]) == null ? void 0 : _a[0];
33
34
  const isMultiFlow = (tab === EnabledFlow.BUY || tab === EnabledFlow.RECEIVE) && (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) && (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled);
34
35
  const onSetTab = (event) => {
35
36
  setModalStep(getAddFundsStep(event.detail.tab));
@@ -52,7 +53,7 @@ const AddFunds = () => {
52
53
  useEffect(() => {
53
54
  setOnRampPurchase(void 0);
54
55
  }, []);
55
- if (!onRampConfig || !activeWallet) {
56
+ if (!onRampConfig || !activeWallet || !tab) {
56
57
  return /* @__PURE__ */ jsx(SpinnerContainer, { children: /* @__PURE__ */ jsx(CpslSpinner, {}) });
57
58
  }
58
59
  return /* @__PURE__ */ jsxs(StepContainer, { children: [
@@ -6,20 +6,20 @@ import {
6
6
  } from "../../../chunk-MMUBH76A.js";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import * as comp from "@getpara/react-components";
9
- import { getOnRampNetworks } from "@getpara/web-sdk";
10
- import { safeStyled } from "@getpara/react-common";
11
- import { getAssetCode, getAssetName, ON_RAMP_ASSETS } from "../../constants/constants.js";
9
+ import { formatCurrency, getOnRampNetworks } from "@getpara/web-sdk";
10
+ import { safeStyled, getAssetCode, getAssetName, ON_RAMP_ASSETS } from "@getpara/react-common";
12
11
  import { useModalStore } from "../../stores/index.js";
13
12
  import { useState } from "react";
14
13
  import { useAddFunds } from "./AddFundsContext.js";
15
14
  import { useWallet } from "../../../provider/hooks/queries/useWallet.js";
16
- import { AssetIcon, GradientScroll } from "../common.js";
15
+ import { AssetIcon, contentMotionProps, GradientScroll } from "../common.js";
17
16
  import { AnimatePresence, motion } from "framer-motion";
18
- import { contentMotionProps } from "./common.js";
17
+ import { useAssets } from "../../../provider/providers/AssetsProvider.js";
19
18
  function AddFundsAsset() {
20
19
  const onRampConfig = useModalStore((state) => state.onRampConfig);
21
20
  const { assets, setAsset, network, setNetwork } = useAddFunds();
22
21
  const { data: activeWallet } = useWallet();
22
+ const { assetMetadata } = useAssets();
23
23
  const [searchStr, setSearchStr] = useState("");
24
24
  const onSelect = (_asset) => __async(this, null, function* () {
25
25
  yield setAsset(_asset);
@@ -59,7 +59,8 @@ function AddFundsAsset() {
59
59
  /* @__PURE__ */ jsxs(Info, { children: [
60
60
  /* @__PURE__ */ jsx(Code, { color: "contrast", variant: "bodyL", children: ON_RAMP_ASSETS[asset].code }),
61
61
  /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyS", children: ON_RAMP_ASSETS[asset].name })
62
- ] })
62
+ ] }),
63
+ (assetMetadata == null ? void 0 : assetMetadata[asset]) && /* @__PURE__ */ jsx(comp.CpslText, { variant: "bodyM", children: formatCurrency(assetMetadata[asset].price) })
63
64
  ] }, asset)
64
65
  },
65
66
  asset
@@ -1,6 +1,6 @@
1
1
  import { Dispatch, PropsWithChildren, ReactNode, SetStateAction } from 'react';
2
2
  import { useWallet } from '../../../provider/hooks/index.js';
3
- import { EnabledFlow, Network, OnRampAsset, OnRampConfig, OnRampProvider } from '@getpara/web-sdk';
3
+ import { EnabledFlow, TNetwork, TOnRampAsset, OnRampConfig, OnRampProvider } from '@getpara/web-sdk';
4
4
  import { IconType } from '@getpara/react-components';
5
5
  export type Tab = EnabledFlow;
6
6
  export declare const TABS: [
@@ -10,14 +10,14 @@ export declare const TABS: [
10
10
  ReactNode
11
11
  ][];
12
12
  type Value = {
13
- network: Network | undefined;
13
+ network: TNetwork | undefined;
14
14
  setNetwork: Dispatch<SetStateAction<Value['network']>>;
15
- asset: OnRampAsset | undefined;
15
+ asset: TOnRampAsset | undefined;
16
16
  setAsset: Dispatch<SetStateAction<Value['asset']>>;
17
17
  fiatQuantity: string | undefined;
18
18
  setFiatQuantity: Dispatch<SetStateAction<Value['fiatQuantity']>>;
19
- networks: Network[];
20
- assets: OnRampAsset[];
19
+ networks: TNetwork[];
20
+ assets: TOnRampAsset[];
21
21
  isProviderAllowed: Partial<Record<OnRampProvider, boolean>>;
22
22
  tab: Tab;
23
23
  activeWallet: ReturnType<typeof useWallet>['data'];
@@ -6,7 +6,7 @@ import {
6
6
  } from "../../../chunk-MMUBH76A.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { safeStyled } from "@getpara/react-common";
9
- import { Heading, InnerStepContainer } from "../common.js";
9
+ import { contentMotionProps, Heading, InnerStepContainer } from "../common.js";
10
10
  import { CpslText } from "@getpara/react-components";
11
11
  import { useAddFunds } from "./AddFundsContext.js";
12
12
  import { useModalStore } from "../../stores/index.js";
@@ -15,7 +15,6 @@ import { motion, AnimatePresence } from "framer-motion";
15
15
  import { OnRampProviderButton } from "../OnRampComponents/OnRampProviderButton.js";
16
16
  import { useWallet } from "../../../provider/index.js";
17
17
  import { EnabledFlow, OnRampPurchaseType } from "@getpara/web-sdk";
18
- import { contentMotionProps } from "./common.js";
19
18
  import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
20
19
  function AddFundsProvider() {
21
20
  const para = useInternalClient();
@@ -6,14 +6,21 @@ import {
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { useEffect, useMemo, useState } from "react";
8
8
  import { useAddFunds } from "./AddFundsContext.js";
9
- import { CpslButton, CpslIcon, CpslInput, CpslRow, CpslText } from "@getpara/react-components";
10
- import { AssetIcon, HeaderSelect, HeaderSelectContainer, HeaderSelectItem, NetworkIcon } from "../common.js";
11
- import { getAssetCode, getNetworkName } from "../../constants/constants.js";
9
+ import { CpslButton, CpslIcon, CpslRow, CpslText } from "@getpara/react-components";
10
+ import {
11
+ AssetIcon,
12
+ contentMotionProps,
13
+ HeaderSelect,
14
+ HeaderSelectContainer,
15
+ HeaderSelectItem,
16
+ NetworkIcon
17
+ } from "../common.js";
18
+ import { QuantityInput } from "../QuantityInput.js";
12
19
  import { EnabledFlow, getOnRampNetworks, OnRampPurchaseType } from "@getpara/web-sdk";
13
20
  import { OnRampStep, useModalStore } from "../../stores/index.js";
14
21
  import { useStore } from "../../../provider/stores/useStore.js";
15
- import { safeStyled } from "@getpara/react-common";
16
- import { contentMotionProps, NoProviders } from "./common.js";
22
+ import { safeStyled, getAssetCode, getNetworkName } from "@getpara/react-common";
23
+ import { NoProviders } from "./common.js";
17
24
  import { AnimatePresence, motion, useIsPresent } from "framer-motion";
18
25
  import { AddFundsAsset } from "./AddFundsAsset.js";
19
26
  function NetworkPill({
@@ -118,40 +125,7 @@ function AddFundsSettings() {
118
125
  ) : network ? /* @__PURE__ */ jsx(NetworkPill, { network, start: NetworkLabel, fix: true }) : null })
119
126
  ] }),
120
127
  /* @__PURE__ */ jsxs(CpslRow, { col: true, gap: "16px", children: [
121
- /* @__PURE__ */ jsx(
122
- Input,
123
- {
124
- value: value || "",
125
- fitContent: true,
126
- autoselect: true,
127
- onKeyDown: (e) => {
128
- if (!/^(\d|\.)$/.test(e.key) && !["Delete", "Backspace", "Tab", "Shift"].includes(e.key)) {
129
- e.preventDefault();
130
- }
131
- },
132
- onChange: (e) => {
133
- var _a;
134
- const numericValue = (((_a = e.currentTarget) == null ? void 0 : _a.value) || "").replace(/[^0-9.]/g, "");
135
- if (numericValue !== "") {
136
- const formattedValue = parseFloat(numericValue).toFixed(2);
137
- setValue(formattedValue);
138
- } else {
139
- setValue(null);
140
- }
141
- },
142
- onBlur: (e) => {
143
- const numericValue = (e.currentTarget.value || "").replace(/[^0-9.]/g, "");
144
- if (numericValue === "") {
145
- setValue(null);
146
- } else {
147
- setValue(parseFloat(numericValue).toFixed(2));
148
- }
149
- },
150
- placeholder: "0",
151
- children: /* @__PURE__ */ jsx(CurrencySign, { slot: "start", children: "$" })
152
- },
153
- value || ""
154
- ),
128
+ /* @__PURE__ */ jsx(QuantityInput, { value, onChange: setValue, symbol: "$" }),
155
129
  /* @__PURE__ */ jsx(CpslRow, { style: { width: "100%" }, children: ["25", "50", "100"].map((quantity) => {
156
130
  return /* @__PURE__ */ jsxs(PresetButton, { fullWidth: true, variant: "secondary", onClick: () => setValue(`${quantity}.00`), children: [
157
131
  "$",
@@ -207,12 +181,6 @@ const Container = safeStyled(motion.div)`
207
181
  const AssetContainer = safeStyled(Container)`
208
182
  gap: 8px;
209
183
  `;
210
- const CurrencySign = safeStyled.div`
211
- font-size: 72px;
212
- color: var(--cpsl-color-text-primary);
213
- position: relative;
214
- right: -16px;
215
- `;
216
184
  const PresetButton = safeStyled(CpslButton)`
217
185
  --button-color: var(--cpsl-color-text-contrast);
218
186
  --button-font-size: 24px;
@@ -223,15 +191,6 @@ const PresetButton = safeStyled(CpslButton)`
223
191
  --button-secondary-hover-border-color: var(--cpsl-color-background-16);
224
192
  flex: 1;
225
193
  `;
226
- const Input = safeStyled(CpslInput)`
227
- --container-background-color: transparent;
228
- --container-height: 90px;
229
- --container-border-width: 0;
230
- --input-background-color: transparent;
231
- --input-font-size: 72px;
232
- --input-text-align: center;
233
- --input-width: 100%;
234
- `;
235
194
  export {
236
195
  AddFundsSettings
237
196
  };
@@ -1,17 +1,3 @@
1
- export declare const contentMotionProps: {
2
- transition: {
3
- duration: number;
4
- };
5
- initial: {
6
- opacity: number;
7
- };
8
- animate: {
9
- opacity: number;
10
- };
11
- exit: {
12
- opacity: number;
13
- };
14
- };
15
1
  export declare const NoProviders: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
16
2
  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;
17
3
  }, {
@@ -2,12 +2,6 @@
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import { CpslText } from "@getpara/react-components";
4
4
  import { safeStyled } from "@getpara/react-common";
5
- const contentMotionProps = {
6
- transition: { duration: 0.2 },
7
- initial: { opacity: 0 },
8
- animate: { opacity: 1 },
9
- exit: { opacity: 0 }
10
- };
11
5
  const NoProviders = safeStyled(CpslText)`
12
6
  width: 100%;
13
7
  text-align: center;
@@ -19,6 +13,5 @@ const NoProviders = safeStyled(CpslText)`
19
13
  transition: visibility 0.2s;
20
14
  `;
21
15
  export {
22
- NoProviders,
23
- contentMotionProps
16
+ NoProviders
24
17
  };
@@ -13,9 +13,8 @@ import {
13
13
  CpslText
14
14
  } from "@getpara/react-components";
15
15
  import { useEffect, useMemo, useRef, useState } from "react";
16
- import { safeStyled } from "@getpara/react-common";
16
+ import { safeStyled, MOBILE_SIZE } from "@getpara/react-common";
17
17
  import countryCodes from "../../utils/countryCodes.js";
18
- import { MOBILE_SIZE } from "../../constants/constants.js";
19
18
  import { useDropdownPosition } from "./hooks/useDropdownPosition.js";
20
19
  import { defaultPhoneMask, phoneMasks } from "./phoneMasks.js";
21
20
  import { extractAuthInfo } from "@getpara/user-management-client";
@@ -230,6 +229,7 @@ const CountryCodeSelect = safeStyled(CpslSelect)`
230
229
  --container-gap: 4px;
231
230
  --container-background-color: transparent;
232
231
  --container-box-shadow: none;
232
+ --dropdown-background-color: var(--cpsl-color-background-4);
233
233
 
234
234
  &::part(dropdown) {
235
235
  width: ${({ $width }) => `${$width - 2}px`};
@@ -4,8 +4,17 @@ import { jsx } from "react/jsx-runtime";
4
4
  import { useModalStore } from "../../stores/index.js";
5
5
  import { Waiting } from "../Waiting/Waiting.js";
6
6
  const AwaitingAccountStep = () => {
7
+ var _a;
7
8
  const isLogin = useModalStore((state) => state.isLogin());
8
- return /* @__PURE__ */ jsx(Waiting, { heading: isLogin ? "Logging you in..." : "Creating your account..." });
9
+ const refs = useModalStore((state) => state.refs);
10
+ const isSLOPopup = ((_a = refs.popupWindow.current) == null ? void 0 : _a.closed) === false;
11
+ return /* @__PURE__ */ jsx(
12
+ Waiting,
13
+ {
14
+ heading: isLogin ? "Logging you in..." : "Creating your account...",
15
+ subheading: isSLOPopup ? "Follow the prompts presented by your browser." : void 0
16
+ }
17
+ );
9
18
  };
10
19
  export {
11
20
  AwaitingAccountStep
@@ -1,9 +1,7 @@
1
1
  "use client";
2
2
  import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslIcon, CpslInfoBox, CpslText } from "@getpara/react-components";
5
- import { InfoBoxContent, InfoBoxHeader, StepContainer } from "../common.js";
6
- import { useEffect, useRef, useState } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { StepContainer } from "../common.js";
7
5
  import { Waiting } from "../Waiting/Waiting.js";
8
6
  import { useStore } from "../../../provider/stores/useStore.js";
9
7
  import { useAccount } from "../../../provider/index.js";
@@ -12,37 +10,14 @@ const AwaitingWalletCreationStep = ({ isGuestMode = false }) => {
12
10
  var _a;
13
11
  return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
14
12
  });
15
- const [showInfoBox, setShowInfoBox] = useState(false);
16
- const showInfoBoxTimeout = useRef();
17
13
  const { embedded } = useAccount();
18
- useEffect(() => {
19
- if (typeof window !== "undefined") {
20
- showInfoBoxTimeout.current = window.setTimeout(() => {
21
- setShowInfoBox(true);
22
- }, 4e3);
14
+ return /* @__PURE__ */ jsx(StepContainer, { $wide: true, children: /* @__PURE__ */ jsx(
15
+ Waiting,
16
+ {
17
+ heading: isGuestMode ? "Creating Guest Account" : (embedded == null ? void 0 : embedded.isGuestMode) ? hideWallets ? "Linking Guest Account" : "Linking Guest Wallet" : hideWallets ? "Creating Your Account" : "Creating Your Wallet",
18
+ subheading: "This should only take a couple of seconds."
23
19
  }
24
- return () => clearTimeout(showInfoBoxTimeout.current);
25
- }, []);
26
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
27
- /* @__PURE__ */ jsx(
28
- Waiting,
29
- {
30
- heading: isGuestMode ? "Creating Guest Account" : (embedded == null ? void 0 : embedded.isGuestMode) ? hideWallets ? "Linking Guest Account" : "Linking Guest Wallet" : hideWallets ? "Creating Your Account" : "Creating Your Wallet",
31
- subheading: "This should only take a couple of seconds."
32
- }
33
- ),
34
- showInfoBox && /* @__PURE__ */ jsx(CpslInfoBox, { children: /* @__PURE__ */ jsxs(InfoBoxContent, { children: [
35
- /* @__PURE__ */ jsxs(InfoBoxHeader, { children: [
36
- /* @__PURE__ */ jsx(CpslIcon, { icon: "clock" }),
37
- /* @__PURE__ */ jsx(CpslText, { weight: "medium", children: "Hang on" })
38
- ] }),
39
- /* @__PURE__ */ jsxs(CpslText, { variant: "bodyS", weight: "medium", color: "secondary", children: [
40
- "Creating your ",
41
- hideWallets ? "account" : "wallet",
42
- " is taking a little longer than expected, but we're working on it!"
43
- ] })
44
- ] }) })
45
- ] });
20
+ ) });
46
21
  };
47
22
  export {
48
23
  AwaitingWalletCreationStep
@@ -26,7 +26,10 @@ const BiometricLoginStep = () => {
26
26
  /* @__PURE__ */ jsx(UserIdentifier, { authInfo: para.authInfo })
27
27
  ] }),
28
28
  /* @__PURE__ */ jsxs(MainContainer, { children: [
29
- (isPassword || isPIN) && /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: () => presentLoginUi(isPIN ? AuthMethod.PIN : AuthMethod.PASSWORD, loginState), children: "Login" }),
29
+ (isPassword || isPIN) && /* @__PURE__ */ jsxs(CpslButton, { fullWidth: true, onClick: () => presentLoginUi(isPIN ? AuthMethod.PIN : AuthMethod.PASSWORD, loginState), children: [
30
+ /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "passcode" }),
31
+ isPIN && isPassword ? "Login" : isPIN ? "Login with PIN" : "Login with Password"
32
+ ] }),
30
33
  isPasskey && /* @__PURE__ */ jsxs(Fragment, { children: [
31
34
  displayKnownDevices && /* @__PURE__ */ jsxs(Fragment, { children: [
32
35
  /* @__PURE__ */ jsx(KnownDevices, { hints: biometricHints, link: passkeyKnownDeviceUrl }),
@@ -34,7 +37,7 @@ const BiometricLoginStep = () => {
34
37
  ] }),
35
38
  /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: () => presentLoginUi(AuthMethod.PASSKEY, loginState), children: isPasskeyUnavailable ? "Continue anyway" : /* @__PURE__ */ jsxs(Fragment, { children: [
36
39
  /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "key" }),
37
- "Login with passkey"
40
+ "Login with Passkey"
38
41
  ] }) })
39
42
  ] })
40
43
  ] })
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { safeStyled } from "@getpara/react-common";
4
+ import { safeStyled, WarningBanner, BODY_MOTION_VARIANTS, BODY_TRANSITION, MOBILE_SIZE } from "@getpara/react-common";
5
5
  import { IFrameSteps, ModalStep } from "../../utils/steps.js";
6
6
  import { CpslAlert, CpslIcon } from "@getpara/react-components";
7
7
  import { VerificationCodeStep } from "../VerificationCodeStep/VerificationCodeStep.js";
@@ -21,7 +21,6 @@ import { AddFundsAwaiting, AddFundsDone, AddFunds } from "../AddFunds/index.js";
21
21
  import { FarcasterOAuthStep } from "../OAuth/FarcasterOAuthStep.js";
22
22
  import { Header } from "../Header/Header.js";
23
23
  import { AuthMainStep } from "../AuthMainStep/AuthMainStep.js";
24
- import { BODY_MOTION_VARIANTS, BODY_TRANSITION, MOBILE_SIZE } from "../../constants/constants.js";
25
24
  import { Account } from "../Account/Account.js";
26
25
  import { AuthOptions } from "../AuthOptions/AuthOptions.js";
27
26
  import { ExternalWallets } from "../ExternalWallets/ExternalWallets.js";
@@ -43,13 +42,14 @@ import { AccountProfileLink } from "../Account/AccountProfileLink.js";
43
42
  import { AccountProfileUnlink } from "../Account/AccountProfileUnlink.js";
44
43
  import { ExternalWalletNetworkSelectStep } from "../ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js";
45
44
  import { AwaitingAccountStep } from "../AwaitingAccountStep/AwaitingAccountStep.js";
45
+ import { SwitchWalletsStep } from "../SwitchWalletsStep/SwitchWalletsStep.js";
46
46
  import { Footer } from "../Footer/Footer.js";
47
+ import { renderTextWithLinks } from "../../utils/renderTextWithLinks.js";
48
+ import { AccountWallet } from "../Account/AccountWallet.js";
49
+ import { AccountSend } from "../Account/AccountSend/index.js";
47
50
  const MIN_HEIGHT = {
48
51
  [ModalStep.ADD_FUNDS_AWAITING]: "680px"
49
52
  };
50
- const PADDING_TOP = {
51
- [ModalStep.TELEGRAM_OAUTH]: "36px"
52
- };
53
53
  const Body = ({
54
54
  oAuthMethods,
55
55
  twoFactorAuthEnabled,
@@ -66,6 +66,8 @@ const Body = ({
66
66
  const setStepDirection = useModalStore((state) => state.setStepDirection);
67
67
  const accountAddFundTab = useModalStore((state) => state.accountAddFundTab);
68
68
  const setAccountAddFundTab = useModalStore((state) => state.setAccountAddFundTab);
69
+ const modalError = useModalStore((state) => state.modalError);
70
+ const setModalError = useModalStore((state) => state.setModalError);
69
71
  const embeddedModal = useStore((state) => {
70
72
  var _a;
71
73
  return (_a = state.modalConfig) == null ? void 0 : _a.embeddedModal;
@@ -180,6 +182,9 @@ const Body = ({
180
182
  case ModalStep.ACCOUNT_PROFILE_REMOVE: {
181
183
  return /* @__PURE__ */ jsx(AccountProfileUnlink, {});
182
184
  }
185
+ case ModalStep.ACCOUNT_WALLET: {
186
+ return /* @__PURE__ */ jsx(AccountWallet, {});
187
+ }
183
188
  case ModalStep.EX_WALLET_SELECTED: {
184
189
  return /* @__PURE__ */ jsx(ExternalWalletStep, {});
185
190
  }
@@ -187,11 +192,38 @@ const Body = ({
187
192
  return /* @__PURE__ */ jsx(ChainSwitch, {});
188
193
  }
189
194
  case ModalStep.EX_WALLET_NETWORK_SELECT: {
190
- return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, {});
195
+ return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, { type: "CONNECT" });
196
+ }
197
+ case ModalStep.ADD_EX_WALLET_NETWORK_SELECT: {
198
+ return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, { type: "ADD_EXTERNAL" });
199
+ }
200
+ case ModalStep.LINK_EX_WALLET_NETWORK_SELECT: {
201
+ return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, { type: "ACCOUNT_LINKING" });
202
+ }
203
+ case ModalStep.ADD_EX_WALLET_MORE: {
204
+ return /* @__PURE__ */ jsx(ExternalWallets, { isAddingWallets: true });
205
+ }
206
+ case ModalStep.ADD_EX_WALLET_SELECTED: {
207
+ return /* @__PURE__ */ jsx(ExternalWalletStep, { isAddingWallets: true });
208
+ }
209
+ case ModalStep.ADD_EX_WALLET_NETWORK_SELECT: {
210
+ return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, { type: "ADD_EXTERNAL" });
191
211
  }
192
212
  case ModalStep.AWAITING_ACCOUNT: {
193
213
  return /* @__PURE__ */ jsx(AwaitingAccountStep, {});
194
214
  }
215
+ case ModalStep.SWITCH_WALLETS: {
216
+ return /* @__PURE__ */ jsx(SwitchWalletsStep, {});
217
+ }
218
+ case ModalStep.ACCOUNT_SEND: {
219
+ return /* @__PURE__ */ jsx(AccountSend, { step: "SEND_FORM" });
220
+ }
221
+ case ModalStep.ACCOUNT_SEND_ASSET: {
222
+ return /* @__PURE__ */ jsx(AccountSend, { step: "SEND_ASSET" });
223
+ }
224
+ case ModalStep.ACCOUNT_SEND_NETWORK: {
225
+ return /* @__PURE__ */ jsx(AccountSend, { step: "SEND_NETWORK" });
226
+ }
195
227
  default: {
196
228
  if (IFrameSteps.includes(currentStep)) {
197
229
  return null;
@@ -234,7 +266,7 @@ const Body = ({
234
266
  setStepDirection(1);
235
267
  },
236
268
  custom: stepDirection,
237
- children: /* @__PURE__ */ jsx(
269
+ children: /* @__PURE__ */ jsxs(
238
270
  BodyContainer,
239
271
  {
240
272
  custom: stepDirection,
@@ -243,34 +275,37 @@ const Body = ({
243
275
  animate: "center",
244
276
  exit: "exit",
245
277
  transition: BODY_TRANSITION,
246
- children: /* @__PURE__ */ jsxs(
247
- InnerContainer,
248
- {
249
- $embeddedModal: !!embeddedModal,
250
- $step: currentStep,
251
- $isIFrameStep: IFrameSteps.includes(currentStep),
252
- children: [
253
- /* @__PURE__ */ jsx(NetworkSpeedBanner, { fontSize: "12px", iconSize: "16px" }),
254
- Content(),
255
- (onRampConfig == null ? void 0 : onRampConfig.testMode) && [
256
- ModalStep.ADD_FUNDS_BUY,
257
- ModalStep.ADD_FUNDS_WITHDRAW,
258
- ModalStep.ADD_FUNDS_AWAITING,
259
- ModalStep.ADD_FUNDS_FAILURE,
260
- ModalStep.ADD_FUNDS_SUCCESS
261
- ].includes(currentStep) && isTestModeAlert && accountAddFundTab !== EnabledFlow.RECEIVE && /* @__PURE__ */ jsx(TestModeAlert, { children: /* @__PURE__ */ jsxs("div", { style: { fontSize: "14px" }, children: [
262
- "This Para Modal is configured to run on-ramp services in ",
263
- /* @__PURE__ */ jsx("b", { children: "test mode" }),
264
- " only, for development purposes. If you are a user of ",
265
- appName,
266
- ", please contact support.",
267
- /* @__PURE__ */ jsx(CloseButton, { onClick: () => setIsTestModeAlert(false), children: /* @__PURE__ */ jsx(CloseX, { icon: "x" }) })
268
- ] }) })
269
- ]
270
- }
271
- )
278
+ children: [
279
+ /* @__PURE__ */ jsxs(
280
+ InnerContainer,
281
+ {
282
+ $embeddedModal: !!embeddedModal,
283
+ $step: currentStep,
284
+ $isIFrameStep: IFrameSteps.includes(currentStep),
285
+ children: [
286
+ !IFrameSteps.includes(currentStep) && /* @__PURE__ */ jsx(NetworkSpeedBanner, { fontSize: "12px", iconSize: "16px" }),
287
+ Content(),
288
+ (onRampConfig == null ? void 0 : onRampConfig.testMode) && [
289
+ ModalStep.ADD_FUNDS_BUY,
290
+ ModalStep.ADD_FUNDS_WITHDRAW,
291
+ ModalStep.ADD_FUNDS_AWAITING,
292
+ ModalStep.ADD_FUNDS_FAILURE,
293
+ ModalStep.ADD_FUNDS_SUCCESS
294
+ ].includes(currentStep) && isTestModeAlert && accountAddFundTab !== EnabledFlow.RECEIVE && /* @__PURE__ */ jsx(TestModeAlert, { children: /* @__PURE__ */ jsxs("div", { style: { fontSize: "14px" }, children: [
295
+ "This Para Modal is configured to run on-ramp services in ",
296
+ /* @__PURE__ */ jsx("b", { children: "test mode" }),
297
+ " only, for development purposes. If you are a user of ",
298
+ appName,
299
+ ", please contact support.",
300
+ /* @__PURE__ */ jsx(CloseButton, { onClick: () => setIsTestModeAlert(false), children: /* @__PURE__ */ jsx(CloseX, { icon: "x" }) })
301
+ ] }) })
302
+ ]
303
+ }
304
+ ),
305
+ modalError && /* @__PURE__ */ jsx(WarningBanner, { onClose: () => setModalError(void 0), children: renderTextWithLinks(modalError) })
306
+ ]
272
307
  },
273
- ["ADD_FUNDS_BUY", "ADD_FUNDS_RECEIVE", "ADD_FUNDS_WITHDRAW"].includes(currentStep) ? "ADD_FUNDS" : currentStep
308
+ ["ADD_FUNDS_BUY", "ADD_FUNDS_RECEIVE", "ADD_FUNDS_WITHDRAW"].includes(currentStep) ? "ADD_FUNDS" : ["ACCOUNT_SEND", "ACCOUNT_SEND_ASSET", "ACCOUNT_SEND_NETWORK"].includes(currentStep) ? "ACCOUNT_SEND" : currentStep
274
309
  )
275
310
  }
276
311
  ),
@@ -291,7 +326,7 @@ const BodyContainer = safeStyled(motion.div)`
291
326
  position: relative;
292
327
  display: flex;
293
328
  flex-direction: column;
294
- gap: 24px;
329
+ gap: 12px;
295
330
  will-change: auto !important;
296
331
  `;
297
332
  const InnerContainer = safeStyled.div`
@@ -312,14 +347,7 @@ const InnerContainer = safeStyled.div`
312
347
  }};
313
348
 
314
349
  @media (max-width: ${MOBILE_SIZE}px) {
315
- padding: ${({ $embeddedModal, $step, $isIFrameStep }) => {
316
- var _a;
317
- return $isIFrameStep ? "0px" : $embeddedModal ? "12px 0px 0px" : `${(_a = PADDING_TOP[$step]) != null ? _a : "72px"} 16px 0px`;
318
- }};
319
- }
320
-
321
- cpsl-auth-modal.force-mobile-media & {
322
- padding: 72px 16px 0px;
350
+ padding: ${({ $embeddedModal, $isIFrameStep }) => $isIFrameStep ? "0px" : $embeddedModal ? "12px 0px 0px" : "0px"};
323
351
  }
324
352
  `;
325
353
  const TestModeAlert = safeStyled(CpslAlert)`
@@ -333,14 +361,19 @@ const TestModeAlert = safeStyled(CpslAlert)`
333
361
  const CloseButton = safeStyled.button`
334
362
  background-color: transparent;
335
363
  border: none;
336
- padding: 4px;
364
+ padding: 0;
337
365
  cursor: pointer;
338
- position: absolute;
339
- top: 0;
340
- right: 0;
366
+ flex-shrink: 0;
367
+ display: flex;
368
+ align-items: center;
369
+ justify-content: center;
370
+ width: 20px;
371
+ height: 20px;
341
372
  `;
342
373
  const CloseX = safeStyled(CpslIcon)`
343
- --icon-color: var(--cpsl-color-foreground-0);
374
+ --icon-color: var(--cpsl-color-utility-yellow-dark, #92400e);
375
+ --height: 18px;
376
+ --width: 18px;
344
377
  `;
345
378
  export {
346
379
  Body