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