coinley-checkout 0.5.1 → 0.5.3

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.
@@ -20665,22 +20665,22 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
20665
20665
  {
20666
20666
  id: NETWORK_TYPES.ETHEREUM,
20667
20667
  name: "Ethereum",
20668
- description: "ERC-20 tokens"
20668
+ description: "ERC-20"
20669
20669
  },
20670
20670
  {
20671
20671
  id: NETWORK_TYPES.BSC,
20672
- name: "BSC (Binance Smart Chain)",
20673
- description: "BEP-20 tokens"
20672
+ name: "BSC",
20673
+ description: "BEP-20"
20674
20674
  },
20675
20675
  {
20676
20676
  id: NETWORK_TYPES.TRON,
20677
20677
  name: "Tron",
20678
- description: "TRC-20 tokens"
20678
+ description: "TRC-20"
20679
20679
  },
20680
20680
  {
20681
20681
  id: NETWORK_TYPES.ALGORAND,
20682
20682
  name: "Algorand",
20683
- description: "ASA tokens"
20683
+ description: "ASA"
20684
20684
  }
20685
20685
  ];
20686
20686
  const getPaymentMethodsForNetwork = (network) => {
@@ -20881,7 +20881,6 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
20881
20881
  return isAvailable ? `${walletNames[wallet]} detected - Ready to pay` : `${walletNames[wallet]} required - Please install to continue`;
20882
20882
  }
20883
20883
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
20884
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-lg font-medium mb-4 ${theme2 === "dark" ? "text-white" : "text-gray-800"}`, children: "Select Payment Method" }),
20885
20884
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
20886
20885
  /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: `block text-sm font-medium mb-2 ${theme2 === "dark" ? "text-white" : "text-gray-700"}`, children: "Blockchain Network" }),
20887
20886
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -20904,10 +20903,10 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
20904
20903
  "button",
20905
20904
  {
20906
20905
  onClick: () => handleSelectPaymentMethod(method),
20907
- className: `p-4 rounded-lg transition-all duration-200 border-1 ${(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-gray-50 border-gray-200 hover:border-gray-300"}`,
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"}`,
20908
20907
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center text-center", children: [
20909
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 h-10 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" }) }),
20910
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
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: [
20911
20910
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: `font-medium text-sm ${theme2 === "dark" ? "text-white" : "text-gray-900"}`, children: method.name }),
20912
20911
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-xs ${theme2 === "dark" ? "text-gray-300" : "text-gray-500"}`, children: method.description })
20913
20912
  ] }),
@@ -21023,9 +21022,9 @@ const CoinleyModal = ({
21023
21022
  };
21024
21023
  if (!isOpen)
21025
21024
  return null;
21026
- 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: [
21027
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-header flex justify-between items-center mb-6", children: [
21028
- /* @__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-32", alt: "Coinley Logo" }) }) }),
21025
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto", 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 bg-gray-100", children: [
21026
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-header flex justify-between items-center mb-6 p-2 rounded-xl 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" }) }) }),
21029
21028
  /* @__PURE__ */ jsxRuntimeExports.jsx(
21030
21029
  "button",
21031
21030
  {
@@ -21036,38 +21035,33 @@ const CoinleyModal = ({
21036
21035
  )
21037
21036
  ] }),
21038
21037
  payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-payment-info mb-6", children: [
21039
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-4", children: [
21040
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600 mb-1", children: "Total Amount" }),
21041
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-amount-display text-3xl font-bold", 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: [
21042
21041
  "$",
21043
21042
  formatAmount(payment.totalAmount || payment.amount)
21044
21043
  ] })
21045
21044
  ] }),
21046
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-4", children: [
21047
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600 mb-1", children: "Payment To" }),
21045
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
21046
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600", children: "Payment To" }),
21048
21047
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "coinley-merchant-name text-lg", children: merchantName })
21049
21048
  ] }),
21050
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
21051
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white/50 px-3 py-2 rounded-lg", children: [
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: [
21052
21051
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-600 text-xs", children: "Original Amount" }),
21053
21052
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold", children: [
21054
21053
  "$",
21055
21054
  formatAmount(payment.amount)
21056
21055
  ] })
21057
21056
  ] }),
21058
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white/50 px-3 py-2 rounded-lg", children: [
21057
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 rounded-lg", children: [
21059
21058
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-600 text-xs", children: "Fee (1.75%)" }),
21060
21059
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold", children: [
21061
21060
  "$",
21062
21061
  formatAmount((payment.totalAmount || payment.amount) - payment.amount)
21063
21062
  ] })
21064
21063
  ] })
21065
- ] }),
21066
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center mt-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", children: [
21067
- "Payment ID: ",
21068
- payment.id ? payment.id.slice(0, 8) : "",
21069
- "..."
21070
- ] }) })
21064
+ ] })
21071
21065
  ] }),
21072
21066
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
21073
21067
  debug && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2 text-right", children: /* @__PURE__ */ jsxRuntimeExports.jsx(