coinley-test 0.0.28 → 0.0.30
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/index.esm.js
CHANGED
|
@@ -1641,45 +1641,42 @@ const SimpleCoinleyPayment = ({
|
|
|
1641
1641
|
}
|
|
1642
1642
|
)
|
|
1643
1643
|
] }),
|
|
1644
|
-
currentStep === "method" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-
|
|
1645
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
children: [
|
|
1656
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
1657
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
children: [
|
|
1673
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
1674
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
)
|
|
1681
|
-
] })
|
|
1682
|
-
] }),
|
|
1644
|
+
currentStep === "method" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
|
|
1645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1646
|
+
"button",
|
|
1647
|
+
{
|
|
1648
|
+
onClick: () => {
|
|
1649
|
+
setPaymentMethod("wallet");
|
|
1650
|
+
setCurrentStep("network");
|
|
1651
|
+
},
|
|
1652
|
+
className: `w-full p-4 border-2 rounded-lg hover:border-purple-500 text-left flex items-center space-x-3 transition-colors ${isDark ? "border-gray-600 hover:bg-gray-800" : "border-gray-200 hover:bg-gray-50"}`,
|
|
1653
|
+
children: [
|
|
1654
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl", children: "🦊" }),
|
|
1655
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
1656
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "MetaMask Wallet" }),
|
|
1657
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-sm ${isDark ? "text-gray-400" : "text-gray-500"}`, children: "Connect and pay instantly" })
|
|
1658
|
+
] })
|
|
1659
|
+
]
|
|
1660
|
+
}
|
|
1661
|
+
),
|
|
1662
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1663
|
+
"button",
|
|
1664
|
+
{
|
|
1665
|
+
onClick: () => {
|
|
1666
|
+
setPaymentMethod("qr");
|
|
1667
|
+
setCurrentStep("network");
|
|
1668
|
+
},
|
|
1669
|
+
className: `w-full p-4 border-2 rounded-lg hover:border-purple-500 text-left flex items-center space-x-3 transition-colors ${isDark ? "border-gray-600 hover:bg-gray-800" : "border-gray-200 hover:bg-gray-50"}`,
|
|
1670
|
+
children: [
|
|
1671
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl", children: "📱" }),
|
|
1672
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
1673
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "QR Code" }),
|
|
1674
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-sm ${isDark ? "text-gray-400" : "text-gray-500"}`, children: "Scan with mobile wallet" })
|
|
1675
|
+
] })
|
|
1676
|
+
]
|
|
1677
|
+
}
|
|
1678
|
+
)
|
|
1679
|
+
] }) }),
|
|
1683
1680
|
currentStep === "network" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
1684
1681
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1685
1682
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -2029,14 +2026,17 @@ const ModernDropdown = ({
|
|
|
2029
2026
|
renderOption,
|
|
2030
2027
|
getOptionKey,
|
|
2031
2028
|
getOptionValue,
|
|
2029
|
+
getSearchableText,
|
|
2030
|
+
// NEW: Function to get searchable text
|
|
2032
2031
|
disabled = false
|
|
2033
2032
|
}) => {
|
|
2034
2033
|
const [isOpen, setIsOpen] = useState(false);
|
|
2035
2034
|
const [searchTerm, setSearchTerm] = useState("");
|
|
2036
2035
|
const dropdownRef = useRef(null);
|
|
2037
|
-
const filteredOptions = options.filter(
|
|
2038
|
-
(option)
|
|
2039
|
-
|
|
2036
|
+
const filteredOptions = options.filter((option) => {
|
|
2037
|
+
const searchableText = getSearchableText ? getSearchableText(option) : "";
|
|
2038
|
+
return searchableText.toLowerCase().includes(searchTerm.toLowerCase());
|
|
2039
|
+
});
|
|
2040
2040
|
const selectedOption = options.find((option) => getOptionValue(option) === value);
|
|
2041
2041
|
useEffect(() => {
|
|
2042
2042
|
const handleClickOutside = (event) => {
|
|
@@ -2720,6 +2720,7 @@ const EnhancedSimpleCoinleyPayment = ({
|
|
|
2720
2720
|
renderOption: renderNetworkOption,
|
|
2721
2721
|
getOptionKey: (network) => network.id,
|
|
2722
2722
|
getOptionValue: (network) => network.id,
|
|
2723
|
+
getSearchableText: (network) => `${network.name} ${network.shortName}`,
|
|
2723
2724
|
disabled: loading
|
|
2724
2725
|
}
|
|
2725
2726
|
)
|
|
@@ -2749,6 +2750,7 @@ const EnhancedSimpleCoinleyPayment = ({
|
|
|
2749
2750
|
renderOption: renderTokenOption,
|
|
2750
2751
|
getOptionKey: (token) => token.id,
|
|
2751
2752
|
getOptionValue: (token) => token.id,
|
|
2753
|
+
getSearchableText: (token) => `${token.name} ${token.symbol}`,
|
|
2752
2754
|
disabled: loading
|
|
2753
2755
|
}
|
|
2754
2756
|
)
|