coinley-pay 0.53.0 → 0.54.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/{CoinleyPayment-BFkZ0Fq5.js → CoinleyPayment-BD6rtaxd.js} +49 -49
- package/dist/{appKitEVM-BC0nAR77.js → appKitEVM-B3xgIRTz.js} +2 -2
- package/dist/{appKitSolana-B1EqivHA.js → appKitSolana-FcW9To4k.js} +2 -2
- package/dist/coinley-vanilla.min.js +1 -1
- package/dist/{index-DkzxitOg.js → index-Bp7JOqpt.js} +3 -3
- package/dist/{index-C6Se76f1.js → index-DCmGzoG3.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
5
5
|
import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
6
6
|
import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
|
|
7
7
|
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
8
|
-
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-
|
|
8
|
+
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-Bp7JOqpt.js";
|
|
9
9
|
import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
|
|
10
10
|
import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
|
|
11
11
|
import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
|
|
@@ -21126,7 +21126,7 @@ const WalletSelector = ({
|
|
|
21126
21126
|
try {
|
|
21127
21127
|
setAppKitError(null);
|
|
21128
21128
|
setWalletConnectAddress(solanaAccountState.address);
|
|
21129
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
21129
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-FcW9To4k.js");
|
|
21130
21130
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
21131
21131
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
21132
21132
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -21231,7 +21231,7 @@ const WalletSelector = ({
|
|
|
21231
21231
|
setAppKitLoading(true);
|
|
21232
21232
|
setAppKitError(null);
|
|
21233
21233
|
try {
|
|
21234
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
21234
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-B3xgIRTz.js");
|
|
21235
21235
|
await initializeAppKitEVM(wagmiConfig);
|
|
21236
21236
|
await openAppKitModal();
|
|
21237
21237
|
} catch (error) {
|
|
@@ -21251,7 +21251,7 @@ const WalletSelector = ({
|
|
|
21251
21251
|
setAppKitError(null);
|
|
21252
21252
|
try {
|
|
21253
21253
|
console.log("📦 Loading AppKit Solana module...");
|
|
21254
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
21254
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-FcW9To4k.js");
|
|
21255
21255
|
console.log("✅ Module loaded, initializing...");
|
|
21256
21256
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21257
21257
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -26449,7 +26449,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26449
26449
|
if (currentStep === PAYMENT_STEPS.PROCESSING) {
|
|
26450
26450
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26451
26451
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
|
|
26452
|
-
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-
|
|
26452
|
+
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-7 shadow-2xl animate-slide-up-sheet" : "relative flex h-[500px] w-[430px] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-7 shadow-2xl", children: [
|
|
26453
26453
|
/* @__PURE__ */ jsx(
|
|
26454
26454
|
"button",
|
|
26455
26455
|
{
|
|
@@ -26491,7 +26491,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26491
26491
|
if (offsetSuccessDetails) {
|
|
26492
26492
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26493
26493
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
26494
|
-
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-
|
|
26494
|
+
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
|
|
26495
26495
|
/* @__PURE__ */ jsx(
|
|
26496
26496
|
"button",
|
|
26497
26497
|
{
|
|
@@ -26575,7 +26575,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26575
26575
|
if (refundSuccessDetails) {
|
|
26576
26576
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26577
26577
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
26578
|
-
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-
|
|
26578
|
+
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-4 pt-8 animate-slide-up-sheet" : "relative flex h-auto min-h-[554px] w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-4 pt-8", children: [
|
|
26579
26579
|
/* @__PURE__ */ jsx(
|
|
26580
26580
|
"button",
|
|
26581
26581
|
{
|
|
@@ -26661,7 +26661,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26661
26661
|
}
|
|
26662
26662
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
26663
26663
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50" }),
|
|
26664
|
-
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-
|
|
26664
|
+
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsx("div", { className: isMobile ? "coinley-mobile-sheet relative flex w-full max-h-[92dvh] flex-col overflow-hidden rounded-t-[24px] bg-white px-4 pb-5 pt-5 animate-slide-up-sheet" : "relative flex h-[640px] max-h-[calc(100vh-32px)] min-h-0 w-[450px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-[28px] bg-white px-4 pb-5 pt-5", children: /* @__PURE__ */ jsx(
|
|
26665
26665
|
PaymentStatus,
|
|
26666
26666
|
{
|
|
26667
26667
|
status: "success",
|
|
@@ -26712,11 +26712,11 @@ const CoinleyPaymentInternal = ({
|
|
|
26712
26712
|
const isCompactCheckoutSetupView = isCrossChainTransferSetupView || isTransferSetupView || isQrSetupView || isWalletExtensionSetupView;
|
|
26713
26713
|
const isCompactCheckoutView = isCompactCheckoutSetupView || isWalletExtensionReadyView || isWalletExtensionConfirmView;
|
|
26714
26714
|
const isTightWalletView = isWalletExtensionReadyView || isWalletExtensionConfirmView;
|
|
26715
|
-
const renderPaymentSummary = () => /* @__PURE__ */ jsxs("div", { className:
|
|
26715
|
+
const renderPaymentSummary = () => /* @__PURE__ */ jsxs("div", { className: isTightWalletView ? "mb-3" : isCompactCheckoutView ? "mb-6 mt-[-5px]" : "mb-8", children: [
|
|
26716
26716
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
26717
26717
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
26718
26718
|
/* @__PURE__ */ jsx("p", { className: "text-[11px] leading-none text-[#9EA0A8] mb-1", children: "Sending to:" }),
|
|
26719
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
26719
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-semibold text-[#1F2430] truncate max-w-[120px]", children: (config == null ? void 0 : config.merchantName) || "Merchant" })
|
|
26720
26720
|
] }),
|
|
26721
26721
|
/* @__PURE__ */ jsx("div", { className: "flex-1 pt-[13px] border-t border-dashed border-[#DFE1E7]" }),
|
|
26722
26722
|
/* @__PURE__ */ jsxs("div", { className: "text-right", children: [
|
|
@@ -26730,7 +26730,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26730
26730
|
] }),
|
|
26731
26731
|
currencyError && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-red-500 mt-2", children: currencyError })
|
|
26732
26732
|
] });
|
|
26733
|
-
const renderMethodTabs = () => /* @__PURE__ */ jsxs("div", { className:
|
|
26733
|
+
const renderMethodTabs = () => /* @__PURE__ */ jsxs("div", { className: isTightWalletView ? "mb-2" : isCompactCheckoutView ? "mb-3" : "mb-4", children: [
|
|
26734
26734
|
/* @__PURE__ */ jsx("p", { className: `text-xs text-[#9EA0A8] ${isTightWalletView ? "mb-1" : "mb-2"}`, children: "Payment methods" }),
|
|
26735
26735
|
/* @__PURE__ */ jsx("div", { className: "flex overflow-hidden rounded-xl bg-[#F6F6F7] p-1", children: [
|
|
26736
26736
|
{ tab: PAYMENT_TABS.TRANSFER, label: "Transfer to address" },
|
|
@@ -26741,13 +26741,13 @@ const CoinleyPaymentInternal = ({
|
|
|
26741
26741
|
{
|
|
26742
26742
|
type: "button",
|
|
26743
26743
|
onClick: () => isMobile ? handleMobileTabSelect(method.tab) : setActiveTab(method.tab),
|
|
26744
|
-
className: `min-w-0 ${
|
|
26744
|
+
className: `min-w-0 ${isTightWalletView ? "h-7 px-2 text-[13px]" : "h-9 px-2.5 text-sm"} rounded-lg transition-colors whitespace-nowrap ${method.tab === PAYMENT_TABS.TRANSFER ? "flex-[1.35]" : "flex-1"} ${activeTab === method.tab ? "bg-white text-[#5B2EEA] shadow-[0_1px_3px_rgba(31,36,48,0.08)]" : "text-[#535865] hover:text-[#1F2430]"}`,
|
|
26745
26745
|
children: method.label
|
|
26746
26746
|
},
|
|
26747
26747
|
method.tab
|
|
26748
26748
|
)) })
|
|
26749
26749
|
] });
|
|
26750
|
-
const renderUnderpaymentWarning = (title = "Amount received is less than expected", description = null) => /* @__PURE__ */ jsxs("div", { className:
|
|
26750
|
+
const renderUnderpaymentWarning = (title = "Amount received is less than expected", description = null) => /* @__PURE__ */ jsxs("div", { className: "mb-5 rounded-lg border border-[#F5E5B8] bg-[#FFF9E8] px-3 py-2", children: [
|
|
26751
26751
|
/* @__PURE__ */ jsxs("div", { className: `flex items-start gap-2 text-[#B54708] ${title && description ? "mb-1" : ""}`, children: [
|
|
26752
26752
|
/* @__PURE__ */ jsx("svg", { className: "mt-0.5 h-4 w-4 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v4m0 4h.01M12 3a9 9 0 110 18 9 9 0 010-18z" }) }),
|
|
26753
26753
|
title ? /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: title }) : /* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#B54708]", children: description })
|
|
@@ -26766,12 +26766,12 @@ const CoinleyPaymentInternal = ({
|
|
|
26766
26766
|
setRefundRequestStatus(null);
|
|
26767
26767
|
setRefundRequestMessage("");
|
|
26768
26768
|
},
|
|
26769
|
-
className: `relative flex
|
|
26769
|
+
className: `relative flex min-h-[112px] flex-col items-start rounded-xl border p-3 text-left transition-colors ${selected ? "border-[#8B5CF6] bg-[#F4EEFF]" : "border-[#ECEEF2] bg-white hover:border-[#D7C5FF]"}`,
|
|
26770
26770
|
children: [
|
|
26771
26771
|
selected && /* @__PURE__ */ jsx("span", { className: "absolute right-[-7px] top-[-9px] flex h-5 w-5 items-center justify-center rounded-full border border-[#8B5CF6] bg-white text-[#7042D2]", children: /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 13l4 4L19 7" }) }) }),
|
|
26772
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
26772
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3 flex h-6 w-6 items-center justify-center text-[#111827]", children: icon }),
|
|
26773
26773
|
/* @__PURE__ */ jsx("p", { className: "mb-1 text-sm font-semibold text-[#111827]", children: title }),
|
|
26774
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
26774
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs leading-4 text-[#A3A5AC]", children: description })
|
|
26775
26775
|
]
|
|
26776
26776
|
}
|
|
26777
26777
|
);
|
|
@@ -26799,13 +26799,13 @@ const CoinleyPaymentInternal = ({
|
|
|
26799
26799
|
})
|
|
26800
26800
|
] })
|
|
26801
26801
|
] });
|
|
26802
|
-
const renderRecoveryLoadingPanel = ({ title, description, detail }) => /* @__PURE__ */ jsxs("div", { className:
|
|
26803
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
26802
|
+
const renderRecoveryLoadingPanel = ({ title, description, detail }) => /* @__PURE__ */ jsxs("div", { className: "flex min-h-[292px] flex-col items-center justify-center px-3 py-4 text-center", children: [
|
|
26803
|
+
/* @__PURE__ */ jsxs("div", { className: "relative mb-4 flex h-28 w-40 items-center justify-center", children: [
|
|
26804
26804
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-5 bottom-1 h-4 rounded-full bg-[#7042D2]/10 blur-md" }),
|
|
26805
|
-
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className:
|
|
26805
|
+
/* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Processing", className: "relative h-28 w-40 object-contain" })
|
|
26806
26806
|
] }),
|
|
26807
|
-
/* @__PURE__ */ jsx("h3", { className:
|
|
26808
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
26807
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-lg font-semibold text-[#111827]", children: title }),
|
|
26808
|
+
/* @__PURE__ */ jsx("p", { className: "mx-auto max-w-[330px] text-sm leading-5 text-[#8B8E98]", children: description }),
|
|
26809
26809
|
detail && /* @__PURE__ */ jsxs("div", { className: "mt-5 w-full rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-3 text-left", children: [
|
|
26810
26810
|
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between text-xs", children: [
|
|
26811
26811
|
/* @__PURE__ */ jsx("span", { className: "text-[#A3A5AC]", children: "Status" }),
|
|
@@ -26819,12 +26819,12 @@ const CoinleyPaymentInternal = ({
|
|
|
26819
26819
|
description: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.description : "We are checking the blockchain for your offset payment. This usually takes a few seconds.",
|
|
26820
26820
|
detail: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.detail : `Waiting for the remaining ${underpaymentOffsetAmountLabel} on ${underpaymentInfo.refundNetworkLabel || getOffsetSuccessNetworkName(selectedNetwork)}.`
|
|
26821
26821
|
}) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26822
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
26823
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
26822
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-start gap-3", children: [
|
|
26823
|
+
/* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: (ccResult ? ccQrCode : depositQrCode) ? /* @__PURE__ */ jsx("img", { src: ccResult ? ccQrCode : depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
|
|
26824
26824
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pt-1", children: [
|
|
26825
26825
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Same Wallet address" }),
|
|
26826
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
26827
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
26826
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-[58px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
|
|
26827
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: activeTransferDepositAddress }),
|
|
26828
26828
|
/* @__PURE__ */ jsx(
|
|
26829
26829
|
"button",
|
|
26830
26830
|
{
|
|
@@ -26897,7 +26897,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26897
26897
|
const selectedLabel = selectedOption ? getLabel(selectedOption) : placeholder;
|
|
26898
26898
|
const selectedIcon = selectedOption && getIcon ? getIcon(selectedOption) : null;
|
|
26899
26899
|
const isOpen2 = openCheckoutDropdown === dropdownId && !disabled;
|
|
26900
|
-
const dropdownListMaxHeight = maxVisibleItems *
|
|
26900
|
+
const dropdownListMaxHeight = maxVisibleItems * 40;
|
|
26901
26901
|
const searchValue = checkoutDropdownSearch[dropdownId] || "";
|
|
26902
26902
|
const normalizedSearch = searchValue.trim().toLowerCase();
|
|
26903
26903
|
const filteredOptions = normalizedSearch ? options.filter((option) => {
|
|
@@ -26905,7 +26905,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26905
26905
|
const optionLabel = getLabel(option);
|
|
26906
26906
|
return (optionLabel == null ? void 0 : optionLabel.toLowerCase().includes(normalizedSearch)) || ((_b = (_a2 = option == null ? void 0 : option.name) == null ? void 0 : _a2.toLowerCase) == null ? void 0 : _b.call(_a2).includes(normalizedSearch)) || ((_d = (_c = option == null ? void 0 : option.symbol) == null ? void 0 : _c.toLowerCase) == null ? void 0 : _d.call(_c).includes(normalizedSearch)) || ((_f = (_e = option == null ? void 0 : option.shortName) == null ? void 0 : _e.toLowerCase) == null ? void 0 : _f.call(_e).includes(normalizedSearch));
|
|
26907
26907
|
}) : options;
|
|
26908
|
-
return /* @__PURE__ */ jsxs("div", { className: `relative ${isOpen2 ? elevated ? "z-[120]" : "z-50" : "z-10"} ${
|
|
26908
|
+
return /* @__PURE__ */ jsxs("div", { className: `relative ${isOpen2 ? elevated ? "z-[120]" : "z-50" : "z-10"} ${compact ? "mb-3" : "mb-4"} text-left`, children: [
|
|
26909
26909
|
/* @__PURE__ */ jsx("label", { className: "block text-xs text-[#1F2430] mb-2", children: label }),
|
|
26910
26910
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
26911
26911
|
/* @__PURE__ */ jsxs(
|
|
@@ -26914,7 +26914,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26914
26914
|
type: "button",
|
|
26915
26915
|
disabled,
|
|
26916
26916
|
onClick: () => setOpenCheckoutDropdown(isOpen2 ? null : dropdownId),
|
|
26917
|
-
className:
|
|
26917
|
+
className: "flex h-11 w-full items-center gap-2 rounded-xl border border-[#EEF0F4] bg-white px-4 pr-10 text-left text-sm text-[#1F2430] outline-none transition-colors focus:border-[#B49AF0] disabled:bg-[#FAFAFB] disabled:text-[#B5B7BE]",
|
|
26918
26918
|
children: [
|
|
26919
26919
|
selectedIcon && /* @__PURE__ */ jsx(
|
|
26920
26920
|
"img",
|
|
@@ -26931,7 +26931,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26931
26931
|
]
|
|
26932
26932
|
}
|
|
26933
26933
|
),
|
|
26934
|
-
/* @__PURE__ */ jsx("svg", { className:
|
|
26934
|
+
/* @__PURE__ */ jsx("svg", { className: "pointer-events-none absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-[#B5B7BE]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }),
|
|
26935
26935
|
isOpen2 && /* @__PURE__ */ jsxs("div", { className: `absolute left-0 right-0 top-[calc(100%+6px)] ${elevated ? "z-[130]" : "z-[60]"} rounded-xl border border-[#EEF0F4] bg-white p-1 shadow-[0_12px_30px_rgba(31,36,48,0.14)]`, children: [
|
|
26936
26936
|
/* @__PURE__ */ jsx("div", { className: "p-1", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
26937
26937
|
/* @__PURE__ */ jsx("svg", { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#B5B7BE]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-4.35-4.35m1.35-5.65a7 7 0 11-14 0 7 7 0 0114 0z" }) }),
|
|
@@ -26967,7 +26967,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26967
26967
|
[dropdownId]: ""
|
|
26968
26968
|
}));
|
|
26969
26969
|
},
|
|
26970
|
-
className: `flex
|
|
26970
|
+
className: `flex h-10 w-full items-center gap-2 rounded-lg px-3 text-left text-sm transition-colors ${isSelected ? "bg-purple-50 text-[#5B2EEA]" : "text-[#1F2430] hover:bg-[#F8F8F9]"}`,
|
|
26971
26971
|
children: [
|
|
26972
26972
|
optionIcon && /* @__PURE__ */ jsx(
|
|
26973
26973
|
"img",
|
|
@@ -27297,10 +27297,10 @@ const CoinleyPaymentInternal = ({
|
|
|
27297
27297
|
/* @__PURE__ */ jsx("p", { className: "text-xs leading-5 text-[#9EA0A8]", children: "Simply select a wallet app to generate the QR code then input the amount, and transfer your funds" })
|
|
27298
27298
|
] });
|
|
27299
27299
|
const renderQrPaymentPanel = () => /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27300
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
27301
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
27300
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col gap-3 min-[380px]:flex-row min-[380px]:items-start", children: [
|
|
27301
|
+
/* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: qrCodeDataUrl ? /* @__PURE__ */ jsx("img", { src: qrCodeDataUrl, alt: "Payment QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
|
|
27302
27302
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27303
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
27303
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-base font-semibold text-[#111827]", children: "Instructions" }),
|
|
27304
27304
|
/* @__PURE__ */ jsxs("ol", { className: "list-inside list-decimal space-y-1 text-xs leading-5 text-[#111827]", children: [
|
|
27305
27305
|
/* @__PURE__ */ jsx("li", { children: "Scan QR code with your phone camera" }),
|
|
27306
27306
|
/* @__PURE__ */ jsx("li", { children: "The payment page will open inside your wallet app" }),
|
|
@@ -27416,7 +27416,7 @@ const CoinleyPaymentInternal = ({
|
|
|
27416
27416
|
type: type2,
|
|
27417
27417
|
onClick,
|
|
27418
27418
|
disabled,
|
|
27419
|
-
className:
|
|
27419
|
+
className: `h-11 w-full rounded-xl px-4 text-sm font-semibold transition-colors disabled:cursor-not-allowed ${variant === "secondary" ? "border border-[#7042D2] bg-white text-[#7042D2] hover:bg-purple-50 disabled:opacity-60" : "bg-[#7042D2] text-white hover:bg-[#5b34b1] disabled:bg-[#B59AE9] disabled:text-white"}`,
|
|
27420
27420
|
children: label
|
|
27421
27421
|
}
|
|
27422
27422
|
);
|
|
@@ -27566,17 +27566,17 @@ const CoinleyPaymentInternal = ({
|
|
|
27566
27566
|
};
|
|
27567
27567
|
const renderCheckoutFooter = () => {
|
|
27568
27568
|
const checkoutAction = renderCheckoutAction();
|
|
27569
|
-
return /* @__PURE__ */ jsxs("div", { className: `mt-auto shrink-0 ${
|
|
27570
|
-
/* @__PURE__ */ jsx("div", { className: checkoutAction ?
|
|
27571
|
-
/* @__PURE__ */ jsxs("div", { className: `flex items-center justify-center gap-1.5 ${
|
|
27572
|
-
/* @__PURE__ */ jsxs("svg", { className: `${
|
|
27569
|
+
return /* @__PURE__ */ jsxs("div", { className: `mt-auto shrink-0 ${isTightWalletView ? "pt-2 pb-0" : isCompactCheckoutView ? "pt-3 pb-0" : "pt-4 pb-1"} text-center`, children: [
|
|
27570
|
+
/* @__PURE__ */ jsx("div", { className: checkoutAction ? "mb-3 min-h-[44px]" : "mb-3 min-h-[44px]", children: checkoutAction }),
|
|
27571
|
+
/* @__PURE__ */ jsxs("div", { className: `flex items-center justify-center gap-1.5 ${isTightWalletView ? "text-xs" : "text-sm"} text-[#1F2430]`, children: [
|
|
27572
|
+
/* @__PURE__ */ jsxs("svg", { className: `${isTightWalletView ? "h-3.5 w-3.5" : "h-4 w-4"}`, fill: "none", stroke: "currentColor", strokeWidth: "1.8", viewBox: "0 0 24 24", children: [
|
|
27573
27573
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
27574
27574
|
/* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7v5l3 2" })
|
|
27575
27575
|
] }),
|
|
27576
27576
|
/* @__PURE__ */ jsx("span", { children: "Time remaining for this payment" }),
|
|
27577
27577
|
/* @__PURE__ */ jsx("span", { className: `tabular-nums ${timeRemaining <= 5 * 60 * 1e3 ? "text-red-500" : "text-[#5B2EEA]"}`, children: formatCountdown(timeRemaining) })
|
|
27578
27578
|
] }),
|
|
27579
|
-
/* @__PURE__ */ jsx("p", { className: `${
|
|
27579
|
+
/* @__PURE__ */ jsx("p", { className: `${isTightWalletView ? "mt-1" : isCompactCheckoutView ? "mt-2" : "mt-3"} text-xs text-[#A9ABB2]`, children: "Powered by Stablezact" })
|
|
27580
27580
|
] });
|
|
27581
27581
|
};
|
|
27582
27582
|
const renderTabContent = () => {
|
|
@@ -27889,11 +27889,11 @@ const CoinleyPaymentInternal = ({
|
|
|
27889
27889
|
!isCrossChainTransferSetupView && !ccResult && !(paymentData == null ? void 0 : paymentData.depositAddress) && renderTransferSetupPanel(),
|
|
27890
27890
|
!ccResult && (paymentData == null ? void 0 : paymentData.depositAddress) && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27891
27891
|
!underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
|
|
27892
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
27892
|
+
/* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: depositQrCode ? /* @__PURE__ */ jsx("img", { src: depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
|
|
27893
27893
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27894
27894
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
|
|
27895
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
27896
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
27895
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-[60px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
|
|
27896
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: paymentData.depositAddress }),
|
|
27897
27897
|
/* @__PURE__ */ jsx(
|
|
27898
27898
|
"button",
|
|
27899
27899
|
{
|
|
@@ -27917,11 +27917,11 @@ const CoinleyPaymentInternal = ({
|
|
|
27917
27917
|
] }),
|
|
27918
27918
|
ccResult && /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
27919
27919
|
!underpaymentInfo && /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-4", children: [
|
|
27920
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
27920
|
+
/* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: ccQrCode ? /* @__PURE__ */ jsx("img", { src: ccQrCode, alt: "Payment Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
|
|
27921
27921
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
27922
27922
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-[#1F2430]", children: "Wallet address" }),
|
|
27923
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
27924
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
27923
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-[60px] items-center gap-2 rounded-xl border border-[#EEF0F4] bg-[#FAFAFB] px-3 py-2", children: [
|
|
27924
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-all text-sm leading-5 text-[#1F2430]", children: ccResult.relayDepositAddress }),
|
|
27925
27925
|
/* @__PURE__ */ jsx(
|
|
27926
27926
|
"button",
|
|
27927
27927
|
{
|
|
@@ -28054,14 +28054,14 @@ const CoinleyPaymentInternal = ({
|
|
|
28054
28054
|
].includes(openCheckoutDropdown);
|
|
28055
28055
|
return /* @__PURE__ */ jsxs("div", { id: SDK_ROOT_ID, className: `${SDK_ROOT_CLASS} fixed inset-0 z-50`, style: { fontFamily: FONT_FAMILY }, children: [
|
|
28056
28056
|
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50", onClick: handleCancel }),
|
|
28057
|
-
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-
|
|
28057
|
+
/* @__PURE__ */ jsx("div", { className: isMobile ? "fixed inset-0 flex items-end" : "fixed inset-0 flex items-center justify-center p-4", style: { zIndex: 51 }, children: /* @__PURE__ */ jsxs("div", { className: isMobile ? "coinley-mobile-sheet relative bg-white rounded-t-[24px] shadow-2xl w-full max-h-[96dvh] overflow-hidden flex flex-col animate-slide-up-sheet" : `relative bg-white rounded-[28px] shadow-2xl w-[430px] ${isTransferAddressGenerated ? "h-[640px]" : "h-[600px]"} max-h-[calc(100vh-32px)] overflow-hidden flex flex-col`, children: [
|
|
28058
28058
|
!isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28059
28059
|
/* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute left-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` }),
|
|
28060
28060
|
/* @__PURE__ */ jsx("span", { className: `pointer-events-none absolute right-[-10px] ${isTransferAddressGenerated ? "top-[36%]" : "top-[44%]"} z-20 h-5 w-5 rounded-full bg-black/50` })
|
|
28061
28061
|
] }),
|
|
28062
28062
|
isMobile && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-3 pb-1 flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 bg-gray-300 rounded-full" }) }),
|
|
28063
|
-
/* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col
|
|
28064
|
-
/* @__PURE__ */ jsxs("div", { className: `${
|
|
28063
|
+
/* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-1 flex-col ${isMobile ? "px-3" : "px-4"} ${isTightWalletView ? "pb-2 pt-3" : "pb-4 pt-4"}`, children: [
|
|
28064
|
+
/* @__PURE__ */ jsxs("div", { className: `${isTightWalletView ? "mb-3" : "mb-5"} flex items-center justify-between`, children: [
|
|
28065
28065
|
isTransferAddressGenerated || isWalletReadyForPayment || isQrPaymentActiveView || isWalletBackHeaderView || isWalletTokenSelectionView ? /* @__PURE__ */ jsx(
|
|
28066
28066
|
"button",
|
|
28067
28067
|
{
|
|
@@ -28122,4 +28122,4 @@ export {
|
|
|
28122
28122
|
chainTransports as c,
|
|
28123
28123
|
isFeatureEnabled as i
|
|
28124
28124
|
};
|
|
28125
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
28125
|
+
//# sourceMappingURL=CoinleyPayment-BD6rtaxd.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BD6rtaxd.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -113,4 +113,4 @@ export {
|
|
|
113
113
|
initializeAppKitEVM,
|
|
114
114
|
openAppKitModal
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=appKitEVM-
|
|
116
|
+
//# sourceMappingURL=appKitEVM-B3xgIRTz.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BD6rtaxd.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -243,4 +243,4 @@ export {
|
|
|
243
243
|
disconnectWalletConnect,
|
|
244
244
|
initializeAppKitSolana
|
|
245
245
|
};
|
|
246
|
-
//# sourceMappingURL=appKitSolana-
|
|
246
|
+
//# sourceMappingURL=appKitSolana-FcW9To4k.js.map
|