coinley-checkout 0.5.0 → 0.5.2
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.
@@ -19199,16 +19199,17 @@ var jsxRuntimeExports = jsxRuntime.exports;
|
|
19199
19199
|
const ThemeContext = createContext();
|
19200
19200
|
const useTheme = () => useContext(ThemeContext);
|
19201
19201
|
const ThemeProvider = ({ initialTheme = "light", children }) => {
|
19202
|
-
const [
|
19202
|
+
const [theme2, setTheme] = useState(initialTheme);
|
19203
19203
|
const toggleTheme = () => {
|
19204
19204
|
setTheme((prevTheme) => prevTheme === "light" ? "dark" : "light");
|
19205
19205
|
};
|
19206
19206
|
useEffect(() => {
|
19207
19207
|
document.documentElement.classList.remove("light", "dark");
|
19208
|
-
document.documentElement.classList.add(
|
19209
|
-
}, [
|
19210
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children });
|
19208
|
+
document.documentElement.classList.add(theme2);
|
19209
|
+
}, [theme2]);
|
19210
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext.Provider, { value: { theme: theme2, setTheme, toggleTheme }, children });
|
19211
19211
|
};
|
19212
|
+
const theme = "";
|
19212
19213
|
const CoinleyContext = createContext();
|
19213
19214
|
const useCoinley = () => useContext(CoinleyContext);
|
19214
19215
|
const CoinleyProvider = ({
|
@@ -20397,7 +20398,7 @@ const QRCode = ({
|
|
20397
20398
|
amount,
|
20398
20399
|
currency,
|
20399
20400
|
network,
|
20400
|
-
theme = "light",
|
20401
|
+
theme: theme2 = "light",
|
20401
20402
|
size = 200
|
20402
20403
|
}) => {
|
20403
20404
|
const [qrData, setQrData] = useState("");
|
@@ -20505,8 +20506,8 @@ const QRCode = ({
|
|
20505
20506
|
{
|
20506
20507
|
value: qrData,
|
20507
20508
|
size,
|
20508
|
-
bgColor:
|
20509
|
-
fgColor:
|
20509
|
+
bgColor: theme2 === "dark" ? "#374151" : "#FFFFFF",
|
20510
|
+
fgColor: theme2 === "dark" ? "#FFFFFF" : "#000000",
|
20510
20511
|
level: "H",
|
20511
20512
|
includeMargin: true
|
20512
20513
|
}
|
@@ -20586,7 +20587,7 @@ const QRCode = ({
|
|
20586
20587
|
] }) })
|
20587
20588
|
] });
|
20588
20589
|
};
|
20589
|
-
const PaymentStatus = ({ status, message, theme = "light" }) => {
|
20590
|
+
const PaymentStatus = ({ status, message, theme: theme2 = "light" }) => {
|
20590
20591
|
const renderIcon = () => {
|
20591
20592
|
switch (status) {
|
20592
20593
|
case "processing":
|
@@ -20636,24 +20637,24 @@ const PaymentStatus = ({ status, message, theme = "light" }) => {
|
|
20636
20637
|
const getMessageClasses = () => {
|
20637
20638
|
switch (status) {
|
20638
20639
|
case "processing":
|
20639
|
-
return
|
20640
|
+
return theme2 === "dark" ? "text-blue-300" : "text-blue-600";
|
20640
20641
|
case "success":
|
20641
|
-
return
|
20642
|
+
return theme2 === "dark" ? "text-green-300" : "text-green-600";
|
20642
20643
|
case "error":
|
20643
|
-
return
|
20644
|
+
return theme2 === "dark" ? "text-red-300" : "text-red-600";
|
20644
20645
|
default:
|
20645
|
-
return
|
20646
|
+
return theme2 === "dark" ? "text-gray-300" : "text-gray-600";
|
20646
20647
|
}
|
20647
20648
|
};
|
20648
20649
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-6", children: [
|
20649
20650
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: renderIcon() }),
|
20650
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-xl font-bold mb-2 ${
|
20651
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-xl font-bold mb-2 ${theme2 === "dark" ? "text-white" : "text-gray-900"}`, children: getStatusTitle() }),
|
20651
20652
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-center ${getMessageClasses()}`, children: message }),
|
20652
|
-
status === "processing" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `mt-4 text-xs ${
|
20653
|
-
status === "success" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `mt-4 p-2 rounded ${
|
20653
|
+
status === "processing" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `mt-4 text-xs ${theme2 === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "This may take a few moments. Please do not close this window." }),
|
20654
|
+
status === "success" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `mt-4 p-2 rounded ${theme2 === "dark" ? "bg-gray-700" : "bg-gray-100"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-xs ${theme2 === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Your payment has been successfully processed. You will receive a confirmation shortly." }) })
|
20654
20655
|
] });
|
20655
20656
|
};
|
20656
|
-
const PaymentMethods = ({ onSelect, selected, theme = "light", supportedNetworks = [] }) => {
|
20657
|
+
const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supportedNetworks = [] }) => {
|
20657
20658
|
const [selectedNetwork, setSelectedNetwork] = useState(NETWORK_TYPES.ETHEREUM);
|
20658
20659
|
const [availableWallets, setAvailableWallets] = useState({});
|
20659
20660
|
const [showMore, setShowMore] = useState(false);
|
@@ -20664,22 +20665,22 @@ const PaymentMethods = ({ onSelect, selected, theme = "light", supportedNetworks
|
|
20664
20665
|
{
|
20665
20666
|
id: NETWORK_TYPES.ETHEREUM,
|
20666
20667
|
name: "Ethereum",
|
20667
|
-
description: "ERC-20
|
20668
|
+
description: "ERC-20"
|
20668
20669
|
},
|
20669
20670
|
{
|
20670
20671
|
id: NETWORK_TYPES.BSC,
|
20671
|
-
name: "BSC
|
20672
|
-
description: "BEP-20
|
20672
|
+
name: "BSC",
|
20673
|
+
description: "BEP-20"
|
20673
20674
|
},
|
20674
20675
|
{
|
20675
20676
|
id: NETWORK_TYPES.TRON,
|
20676
20677
|
name: "Tron",
|
20677
|
-
description: "TRC-20
|
20678
|
+
description: "TRC-20"
|
20678
20679
|
},
|
20679
20680
|
{
|
20680
20681
|
id: NETWORK_TYPES.ALGORAND,
|
20681
20682
|
name: "Algorand",
|
20682
|
-
description: "ASA
|
20683
|
+
description: "ASA"
|
20683
20684
|
}
|
20684
20685
|
];
|
20685
20686
|
const getPaymentMethodsForNetwork = (network) => {
|
@@ -20880,15 +20881,14 @@ const PaymentMethods = ({ onSelect, selected, theme = "light", supportedNetworks
|
|
20880
20881
|
return isAvailable ? `${walletNames[wallet]} detected - Ready to pay` : `${walletNames[wallet]} required - Please install to continue`;
|
20881
20882
|
}
|
20882
20883
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
20883
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-lg font-medium mb-4 ${theme === "dark" ? "text-white" : "text-gray-800"}`, children: "Select Payment Method" }),
|
20884
20884
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
|
20885
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: `block text-sm font-medium mb-2 ${
|
20885
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: `block text-sm font-medium mb-2 ${theme2 === "dark" ? "text-white" : "text-gray-700"}`, children: "Blockchain Network" }),
|
20886
20886
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
20887
20887
|
"select",
|
20888
20888
|
{
|
20889
20889
|
value: selectedNetwork,
|
20890
20890
|
onChange: (e) => handleNetworkChange(e.target.value),
|
20891
|
-
className: `w-full p-3 rounded-lg border transition-colors ${
|
20891
|
+
className: `w-full p-3 rounded-lg border transition-colors ${theme2 === "dark" ? "bg-gray-700 border-gray-600 text-white focus:border-[#7042D2]" : "bg-white border-gray-300 text-gray-900 focus:border-[#7042D2]"} focus:outline-none focus:ring-2 focus:ring-[#7042D2] focus:ring-opacity-50`,
|
20892
20892
|
children: networks.filter((network) => supportedNetworks.length === 0 || supportedNetworks.includes(network.id)).map((network) => /* @__PURE__ */ jsxRuntimeExports.jsxs("option", { value: network.id, children: [
|
20893
20893
|
network.name,
|
20894
20894
|
" - ",
|
@@ -20898,17 +20898,17 @@ const PaymentMethods = ({ onSelect, selected, theme = "light", supportedNetworks
|
|
20898
20898
|
)
|
20899
20899
|
] }),
|
20900
20900
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4", children: [
|
20901
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: `block text-sm font-medium mb-3 ${
|
20901
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: `block text-sm font-medium mb-3 ${theme2 === "dark" ? "text-white" : "text-gray-700"}`, children: "Select Stablecoin" }),
|
20902
20902
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 gap-3 mb-4", children: visibleMethods.map((method) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
20903
20903
|
"button",
|
20904
20904
|
{
|
20905
20905
|
onClick: () => handleSelectPaymentMethod(method),
|
20906
|
-
className: `p-
|
20906
|
+
className: `p-1 rounded-xl transition-all duration-200 border ${(selected == null ? void 0 : selected.currency) === method.id && (selected == null ? void 0 : selected.network) === selectedNetwork ? theme2 === "dark" ? "bg-blue-900/30 border-[#7042D2] ring-2 ring-[#7042D2] ring-opacity-50" : "bg-blue-50 border-[#7042D2] ring-2 ring-[#7042D2] ring-opacity-50" : theme2 === "dark" ? "bg-gray-700 hover:bg-gray-600 border-gray-600 hover:border-gray-500" : "bg-white hover:bg-[#ECE3FF] border-gray-200 hover:border-gray-300"}`,
|
20907
20907
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center text-center", children: [
|
20908
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0
|
20909
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
20910
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: `font-medium text-sm ${
|
20911
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-xs ${
|
20908
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 py-2 w-10 bg-white rounded-full flex items-center justify-center mb-2 shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: method.logo, alt: method.name, className: "h-6 w-6" }) }),
|
20909
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-x-2 items-center", children: [
|
20910
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: `font-medium text-sm ${theme2 === "dark" ? "text-white" : "text-gray-900"}`, children: method.name }),
|
20911
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-xs ${theme2 === "dark" ? "text-gray-300" : "text-gray-500"}`, children: method.description })
|
20912
20912
|
] }),
|
20913
20913
|
(selected == null ? void 0 : selected.currency) === method.id && (selected == null ? void 0 : selected.network) === selectedNetwork && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
20914
20914
|
"svg",
|
@@ -20935,12 +20935,12 @@ const PaymentMethods = ({ onSelect, selected, theme = "light", supportedNetworks
|
|
20935
20935
|
"button",
|
20936
20936
|
{
|
20937
20937
|
onClick: () => setShowMore(!showMore),
|
20938
|
-
className: `w-full py-2 px-4 rounded-lg text-sm font-medium transition-colors ${
|
20938
|
+
className: `w-full py-2 px-4 rounded-lg text-sm font-medium transition-colors ${theme2 === "dark" ? "bg-gray-700 text-gray-300 hover:bg-gray-600" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
|
20939
20939
|
children: showMore ? "Show Less" : `Show More (${availableMethods.length - 4} more)`
|
20940
20940
|
}
|
20941
20941
|
)
|
20942
20942
|
] }),
|
20943
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `p-3 rounded-lg text-sm ${
|
20943
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `p-3 rounded-lg text-sm ${theme2 === "dark" ? "bg-gray-800 text-gray-300" : "bg-gray-50 text-gray-600"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
20944
20944
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-2 h-2 rounded-full mr-2 ${availableWallets[getRequiredWallet(selectedNetwork)] ? "bg-green-500" : "bg-red-500"}` }),
|
20945
20945
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs", children: getNetworkRequirement(selectedNetwork) })
|
20946
20946
|
] }) })
|
@@ -20957,7 +20957,7 @@ const CoinleyModal = ({
|
|
20957
20957
|
onPayment,
|
20958
20958
|
onBack,
|
20959
20959
|
error,
|
20960
|
-
theme = "light",
|
20960
|
+
theme: theme2 = "light",
|
20961
20961
|
merchantName,
|
20962
20962
|
transactionHash,
|
20963
20963
|
walletConnection,
|
@@ -21022,9 +21022,9 @@ const CoinleyModal = ({
|
|
21022
21022
|
};
|
21023
21023
|
if (!isOpen)
|
21024
21024
|
return null;
|
21025
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto bg-black/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative p-6 w-full max-w-md mx-auto rounded-lg shadow-xl
|
21026
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mb-6 bg-
|
21027
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold
|
21025
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto bg-black/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-modal relative p-6 w-full max-w-md mx-auto rounded-lg shadow-xl", children: [
|
21026
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-header flex justify-between items-center mb-6 bg-white", children: [
|
21027
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, className: "w-24", alt: "Coinley Logo" }) }) }),
|
21028
21028
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21029
21029
|
"button",
|
21030
21030
|
{
|
@@ -21034,25 +21034,36 @@ const CoinleyModal = ({
|
|
21034
21034
|
}
|
21035
21035
|
)
|
21036
21036
|
] }),
|
21037
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
21038
|
-
|
21039
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
21040
|
-
|
21041
|
-
|
21042
|
-
|
21043
|
-
|
21044
|
-
|
21045
|
-
|
21037
|
+
payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-payment-info mb-6", children: [
|
21038
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
21039
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600", children: "Total Amount" }),
|
21040
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-amount-display text-4xl font-extrabold", children: [
|
21041
|
+
"$",
|
21042
|
+
formatAmount(payment.totalAmount || payment.amount)
|
21043
|
+
] })
|
21044
|
+
] }),
|
21045
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
21046
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600", children: "Payment To" }),
|
21047
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "coinley-merchant-name text-lg", children: merchantName })
|
21048
|
+
] }),
|
21049
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-center gap-4 text-sm", children: [
|
21050
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 rounded-lg", children: [
|
21051
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-600 text-xs", children: "Original Amount" }),
|
21052
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold", children: [
|
21046
21053
|
"$",
|
21047
|
-
formatAmount(payment.
|
21054
|
+
formatAmount(payment.amount)
|
21048
21055
|
] })
|
21049
21056
|
] }),
|
21050
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
21051
|
-
"
|
21052
|
-
|
21053
|
-
|
21054
|
-
|
21055
|
-
|
21057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 rounded-lg", children: [
|
21058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-600 text-xs", children: "Fee (1.75%)" }),
|
21059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold", children: [
|
21060
|
+
"$",
|
21061
|
+
formatAmount((payment.totalAmount || payment.amount) - payment.amount)
|
21062
|
+
] })
|
21063
|
+
] })
|
21064
|
+
] })
|
21065
|
+
] }),
|
21066
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
|
21056
21067
|
debug && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2 text-right", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21057
21068
|
"button",
|
21058
21069
|
{
|
@@ -21073,7 +21084,7 @@ const CoinleyModal = ({
|
|
21073
21084
|
{
|
21074
21085
|
onSelect: onPaymentMethodSelect,
|
21075
21086
|
selected: selectedPaymentMethod,
|
21076
|
-
theme,
|
21087
|
+
theme: theme2,
|
21077
21088
|
supportedNetworks
|
21078
21089
|
}
|
21079
21090
|
),
|
@@ -21084,7 +21095,7 @@ const CoinleyModal = ({
|
|
21084
21095
|
console.log("Proceed button clicked, calling onPaymentMethodSelect");
|
21085
21096
|
onPaymentMethodSelect(selectedPaymentMethod);
|
21086
21097
|
},
|
21087
|
-
className: "w-full py-3 px-4
|
21098
|
+
className: "coinley-button-primary w-full py-3 px-4 font-medium rounded-lg transition-colors",
|
21088
21099
|
disabled: !selectedPaymentMethod,
|
21089
21100
|
children: [
|
21090
21101
|
"Proceed with ",
|
@@ -21100,15 +21111,15 @@ const CoinleyModal = ({
|
|
21100
21111
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-medium mb-2 text-gray-800", children: "Payment Details" }),
|
21101
21112
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
21102
21113
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21103
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
21114
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Currency:" }),
|
21104
21115
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedPaymentMethod.currency })
|
21105
21116
|
] }),
|
21106
21117
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21107
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
21118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Network:" }),
|
21108
21119
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: getNetworkDisplayName(selectedPaymentMethod.network) })
|
21109
21120
|
] }),
|
21110
21121
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21111
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
21122
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Fee:" }),
|
21112
21123
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "1.75%" })
|
21113
21124
|
] })
|
21114
21125
|
] })
|
@@ -21118,7 +21129,7 @@ const CoinleyModal = ({
|
|
21118
21129
|
"button",
|
21119
21130
|
{
|
21120
21131
|
onClick: () => setPaymentType("wallet"),
|
21121
|
-
className: `py-2 px-4 text-sm font-medium ${paymentType === "wallet" ? "border-b-2 border-
|
21132
|
+
className: `py-2 px-4 text-sm font-medium ${paymentType === "wallet" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21122
21133
|
children: "Connect Wallet"
|
21123
21134
|
}
|
21124
21135
|
),
|
@@ -21126,7 +21137,7 @@ const CoinleyModal = ({
|
|
21126
21137
|
"button",
|
21127
21138
|
{
|
21128
21139
|
onClick: () => setPaymentType("qrcode"),
|
21129
|
-
className: `py-2 px-4 text-sm font-medium ${paymentType === "qrcode" ? "border-b-2 border-
|
21140
|
+
className: `py-2 px-4 text-sm font-medium ${paymentType === "qrcode" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21130
21141
|
children: "QR Code"
|
21131
21142
|
}
|
21132
21143
|
)
|
@@ -21134,7 +21145,7 @@ const CoinleyModal = ({
|
|
21134
21145
|
testMode ? (
|
21135
21146
|
// Test mode payment option
|
21136
21147
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg mb-4 bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
21137
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-
|
21148
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-600 rounded-full p-2 mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) }),
|
21138
21149
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21139
21150
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: "Test Mode Payment" }),
|
21140
21151
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: 'Click "Pay Now" to simulate a successful payment' })
|
@@ -21149,7 +21160,7 @@ const CoinleyModal = ({
|
|
21149
21160
|
amount: payment.totalAmount || payment.amount,
|
21150
21161
|
currency: selectedPaymentMethod.currency,
|
21151
21162
|
network: selectedPaymentMethod.network,
|
21152
|
-
theme
|
21163
|
+
theme: theme2
|
21153
21164
|
}
|
21154
21165
|
) })
|
21155
21166
|
) : (
|
@@ -21196,7 +21207,7 @@ const CoinleyModal = ({
|
|
21196
21207
|
console.log("Connect wallet button clicked for:", walletType);
|
21197
21208
|
onConnectWallet(walletType);
|
21198
21209
|
},
|
21199
|
-
className: "py-2 px-4
|
21210
|
+
className: "coinley-button-primary py-2 px-4 font-medium rounded-md text-sm",
|
21200
21211
|
children: "Connect"
|
21201
21212
|
}
|
21202
21213
|
)
|
@@ -21212,7 +21223,7 @@ const CoinleyModal = ({
|
|
21212
21223
|
href: getWalletInstallUrl(walletType),
|
21213
21224
|
target: "_blank",
|
21214
21225
|
rel: "noopener noreferrer",
|
21215
|
-
className: "text-sm text-
|
21226
|
+
className: "text-sm text-purple-600 hover:underline",
|
21216
21227
|
children: "Install"
|
21217
21228
|
}
|
21218
21229
|
)
|
@@ -21226,7 +21237,7 @@ const CoinleyModal = ({
|
|
21226
21237
|
{
|
21227
21238
|
type: "button",
|
21228
21239
|
onClick: onBack,
|
21229
|
-
className: "w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-
|
21240
|
+
className: "w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-purple-600 font-medium rounded-md",
|
21230
21241
|
children: "Back"
|
21231
21242
|
}
|
21232
21243
|
),
|
@@ -21235,7 +21246,7 @@ const CoinleyModal = ({
|
|
21235
21246
|
{
|
21236
21247
|
type: "button",
|
21237
21248
|
onClick: () => onPayment(paymentType === "qrcode"),
|
21238
|
-
className: "w-full py-2 px-4
|
21249
|
+
className: "coinley-button-primary w-full py-2 px-4 font-medium rounded-md",
|
21239
21250
|
disabled: !testMode && paymentType === "wallet" && !walletConnection,
|
21240
21251
|
children: paymentType === "qrcode" ? "I have sent the payment" : "Pay Now"
|
21241
21252
|
}
|
@@ -21246,7 +21257,7 @@ const CoinleyModal = ({
|
|
21246
21257
|
PaymentStatus,
|
21247
21258
|
{
|
21248
21259
|
status: "processing",
|
21249
|
-
theme,
|
21260
|
+
theme: theme2,
|
21250
21261
|
message: "Processing your payment..."
|
21251
21262
|
}
|
21252
21263
|
),
|
@@ -21255,7 +21266,7 @@ const CoinleyModal = ({
|
|
21255
21266
|
PaymentStatus,
|
21256
21267
|
{
|
21257
21268
|
status: "success",
|
21258
|
-
theme,
|
21269
|
+
theme: theme2,
|
21259
21270
|
message: "Payment successful!"
|
21260
21271
|
}
|
21261
21272
|
),
|
@@ -21268,7 +21279,7 @@ const CoinleyModal = ({
|
|
21268
21279
|
href: `${getExplorerUrl(selectedPaymentMethod.network)}/${getExplorerPath(selectedPaymentMethod.network)}/${transactionHash}`,
|
21269
21280
|
target: "_blank",
|
21270
21281
|
rel: "noopener noreferrer",
|
21271
|
-
className: "text-xs text-
|
21282
|
+
className: "text-xs text-purple-600 mt-2 inline-block",
|
21272
21283
|
children: "View on Explorer →"
|
21273
21284
|
}
|
21274
21285
|
)
|
@@ -21279,7 +21290,7 @@ const CoinleyModal = ({
|
|
21279
21290
|
PaymentStatus,
|
21280
21291
|
{
|
21281
21292
|
status: "error",
|
21282
|
-
theme,
|
21293
|
+
theme: theme2,
|
21283
21294
|
message: error || "An error occurred while processing your payment."
|
21284
21295
|
}
|
21285
21296
|
),
|
@@ -21296,7 +21307,7 @@ const CoinleyModal = ({
|
|
21296
21307
|
] }),
|
21297
21308
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-xs text-gray-500", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
21298
21309
|
"Powered by ",
|
21299
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-
|
21310
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600", children: "Coinley" }),
|
21300
21311
|
" - Secure Cryptocurrency Payments"
|
21301
21312
|
] }) })
|
21302
21313
|
] }) }) });
|
@@ -21330,7 +21341,7 @@ const CoinleyCheckout = forwardRef(({
|
|
21330
21341
|
onSuccess,
|
21331
21342
|
onError,
|
21332
21343
|
onClose,
|
21333
|
-
theme,
|
21344
|
+
theme: theme2,
|
21334
21345
|
autoOpen = false,
|
21335
21346
|
debug = false,
|
21336
21347
|
testMode = false,
|
@@ -21353,7 +21364,7 @@ const CoinleyCheckout = forwardRef(({
|
|
21353
21364
|
const effectiveApiKey = apiKey || (coinleyContext == null ? void 0 : coinleyContext.apiKey);
|
21354
21365
|
const effectiveApiSecret = apiSecret || (coinleyContext == null ? void 0 : coinleyContext.apiSecret);
|
21355
21366
|
apiUrl || (coinleyContext == null ? void 0 : coinleyContext.apiUrl);
|
21356
|
-
const effectiveTheme =
|
21367
|
+
const effectiveTheme = theme2 || contextTheme;
|
21357
21368
|
const effectiveDebug = debug || (coinleyContext == null ? void 0 : coinleyContext.debug);
|
21358
21369
|
const effectiveSupportedNetworks = supportedNetworks.length > 0 ? supportedNetworks : [NETWORK_TYPES.ETHEREUM, NETWORK_TYPES.BSC, NETWORK_TYPES.TRON, NETWORK_TYPES.ALGORAND];
|
21359
21370
|
const log = (message, data) => {
|