uniport-sdk 0.0.3 → 0.0.4
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/components/index.cjs +92 -56
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +92 -56
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +92 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +92 -56
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1774,62 +1774,101 @@ function UniportModal({
|
|
|
1774
1774
|
portalRoot
|
|
1775
1775
|
);
|
|
1776
1776
|
}
|
|
1777
|
+
var sharedButtonStyle = {
|
|
1778
|
+
display: "inline-flex",
|
|
1779
|
+
alignItems: "center",
|
|
1780
|
+
justifyContent: "center",
|
|
1781
|
+
cursor: "pointer",
|
|
1782
|
+
transition: "all 0.2s ease",
|
|
1783
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
1784
|
+
};
|
|
1777
1785
|
var buttonStyles = {
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
alignItems: "center",
|
|
1815
|
-
justifyContent: "center",
|
|
1816
|
-
gap: "8px",
|
|
1817
|
-
padding: "12px 24px",
|
|
1818
|
-
fontSize: "14px",
|
|
1819
|
-
fontWeight: 500,
|
|
1820
|
-
color: "#4F46E5",
|
|
1821
|
-
background: "transparent",
|
|
1822
|
-
border: "2px solid #4F46E5",
|
|
1823
|
-
borderRadius: "12px",
|
|
1824
|
-
cursor: "pointer",
|
|
1825
|
-
transition: "all 0.2s ease",
|
|
1826
|
-
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
1786
|
+
light: {
|
|
1787
|
+
default: {
|
|
1788
|
+
...sharedButtonStyle,
|
|
1789
|
+
gap: "8px",
|
|
1790
|
+
padding: "12px 24px",
|
|
1791
|
+
fontSize: "14px",
|
|
1792
|
+
fontWeight: 600,
|
|
1793
|
+
color: "#ffffff",
|
|
1794
|
+
background: "#1c1c1e",
|
|
1795
|
+
border: "1px solid #1c1c1e",
|
|
1796
|
+
borderRadius: "12px",
|
|
1797
|
+
boxShadow: "0 8px 24px rgba(28, 28, 30, 0.18)"
|
|
1798
|
+
},
|
|
1799
|
+
compact: {
|
|
1800
|
+
...sharedButtonStyle,
|
|
1801
|
+
gap: "6px",
|
|
1802
|
+
padding: "8px 16px",
|
|
1803
|
+
fontSize: "13px",
|
|
1804
|
+
fontWeight: 600,
|
|
1805
|
+
color: "#ffffff",
|
|
1806
|
+
background: "#1c1c1e",
|
|
1807
|
+
border: "1px solid #1c1c1e",
|
|
1808
|
+
borderRadius: "8px",
|
|
1809
|
+
boxShadow: "0 6px 18px rgba(28, 28, 30, 0.16)"
|
|
1810
|
+
},
|
|
1811
|
+
outline: {
|
|
1812
|
+
...sharedButtonStyle,
|
|
1813
|
+
gap: "8px",
|
|
1814
|
+
padding: "12px 24px",
|
|
1815
|
+
fontSize: "14px",
|
|
1816
|
+
fontWeight: 600,
|
|
1817
|
+
color: "#1c1c1e",
|
|
1818
|
+
background: "transparent",
|
|
1819
|
+
border: "1px solid #1c1c1e",
|
|
1820
|
+
borderRadius: "12px"
|
|
1821
|
+
}
|
|
1827
1822
|
},
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1823
|
+
dark: {
|
|
1824
|
+
default: {
|
|
1825
|
+
...sharedButtonStyle,
|
|
1826
|
+
gap: "8px",
|
|
1827
|
+
padding: "12px 24px",
|
|
1828
|
+
fontSize: "14px",
|
|
1829
|
+
fontWeight: 600,
|
|
1830
|
+
color: "#111113",
|
|
1831
|
+
background: "#ffffff",
|
|
1832
|
+
border: "1px solid rgba(255, 255, 255, 0.9)",
|
|
1833
|
+
borderRadius: "12px",
|
|
1834
|
+
boxShadow: "0 8px 24px rgba(0, 0, 0, 0.32)"
|
|
1835
|
+
},
|
|
1836
|
+
compact: {
|
|
1837
|
+
...sharedButtonStyle,
|
|
1838
|
+
gap: "6px",
|
|
1839
|
+
padding: "8px 16px",
|
|
1840
|
+
fontSize: "13px",
|
|
1841
|
+
fontWeight: 600,
|
|
1842
|
+
color: "#111113",
|
|
1843
|
+
background: "#ffffff",
|
|
1844
|
+
border: "1px solid rgba(255, 255, 255, 0.9)",
|
|
1845
|
+
borderRadius: "8px",
|
|
1846
|
+
boxShadow: "0 6px 18px rgba(0, 0, 0, 0.28)"
|
|
1847
|
+
},
|
|
1848
|
+
outline: {
|
|
1849
|
+
...sharedButtonStyle,
|
|
1850
|
+
gap: "8px",
|
|
1851
|
+
padding: "12px 24px",
|
|
1852
|
+
fontSize: "14px",
|
|
1853
|
+
fontWeight: 600,
|
|
1854
|
+
color: "#ffffff",
|
|
1855
|
+
background: "transparent",
|
|
1856
|
+
border: "1px solid rgba(255, 255, 255, 0.72)",
|
|
1857
|
+
borderRadius: "12px"
|
|
1858
|
+
}
|
|
1831
1859
|
}
|
|
1832
1860
|
};
|
|
1861
|
+
var disabledButtonStyle = {
|
|
1862
|
+
opacity: 0.5,
|
|
1863
|
+
cursor: "not-allowed",
|
|
1864
|
+
boxShadow: "none"
|
|
1865
|
+
};
|
|
1866
|
+
function getButtonStyle(variant, theme, disabled) {
|
|
1867
|
+
return {
|
|
1868
|
+
...buttonStyles[theme][variant],
|
|
1869
|
+
...disabled ? disabledButtonStyle : {}
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1833
1872
|
function UniportButton({
|
|
1834
1873
|
recipient,
|
|
1835
1874
|
refundAddress,
|
|
@@ -1855,10 +1894,7 @@ function UniportButton({
|
|
|
1855
1894
|
setIsOpen(false);
|
|
1856
1895
|
onOpenChange?.(false);
|
|
1857
1896
|
};
|
|
1858
|
-
const style =
|
|
1859
|
-
...buttonStyles[variant],
|
|
1860
|
-
...disabled ? buttonStyles.disabled : {}
|
|
1861
|
-
};
|
|
1897
|
+
const style = getButtonStyle(variant, theme, disabled);
|
|
1862
1898
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1863
1899
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1864
1900
|
"button",
|