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/index.js
CHANGED
|
@@ -1839,62 +1839,101 @@ function UniportModal({
|
|
|
1839
1839
|
portalRoot
|
|
1840
1840
|
);
|
|
1841
1841
|
}
|
|
1842
|
+
var sharedButtonStyle = {
|
|
1843
|
+
display: "inline-flex",
|
|
1844
|
+
alignItems: "center",
|
|
1845
|
+
justifyContent: "center",
|
|
1846
|
+
cursor: "pointer",
|
|
1847
|
+
transition: "all 0.2s ease",
|
|
1848
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
1849
|
+
};
|
|
1842
1850
|
var buttonStyles = {
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
alignItems: "center",
|
|
1880
|
-
justifyContent: "center",
|
|
1881
|
-
gap: "8px",
|
|
1882
|
-
padding: "12px 24px",
|
|
1883
|
-
fontSize: "14px",
|
|
1884
|
-
fontWeight: 500,
|
|
1885
|
-
color: "#4F46E5",
|
|
1886
|
-
background: "transparent",
|
|
1887
|
-
border: "2px solid #4F46E5",
|
|
1888
|
-
borderRadius: "12px",
|
|
1889
|
-
cursor: "pointer",
|
|
1890
|
-
transition: "all 0.2s ease",
|
|
1891
|
-
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
1851
|
+
light: {
|
|
1852
|
+
default: {
|
|
1853
|
+
...sharedButtonStyle,
|
|
1854
|
+
gap: "8px",
|
|
1855
|
+
padding: "12px 24px",
|
|
1856
|
+
fontSize: "14px",
|
|
1857
|
+
fontWeight: 600,
|
|
1858
|
+
color: "#ffffff",
|
|
1859
|
+
background: "#1c1c1e",
|
|
1860
|
+
border: "1px solid #1c1c1e",
|
|
1861
|
+
borderRadius: "12px",
|
|
1862
|
+
boxShadow: "0 8px 24px rgba(28, 28, 30, 0.18)"
|
|
1863
|
+
},
|
|
1864
|
+
compact: {
|
|
1865
|
+
...sharedButtonStyle,
|
|
1866
|
+
gap: "6px",
|
|
1867
|
+
padding: "8px 16px",
|
|
1868
|
+
fontSize: "13px",
|
|
1869
|
+
fontWeight: 600,
|
|
1870
|
+
color: "#ffffff",
|
|
1871
|
+
background: "#1c1c1e",
|
|
1872
|
+
border: "1px solid #1c1c1e",
|
|
1873
|
+
borderRadius: "8px",
|
|
1874
|
+
boxShadow: "0 6px 18px rgba(28, 28, 30, 0.16)"
|
|
1875
|
+
},
|
|
1876
|
+
outline: {
|
|
1877
|
+
...sharedButtonStyle,
|
|
1878
|
+
gap: "8px",
|
|
1879
|
+
padding: "12px 24px",
|
|
1880
|
+
fontSize: "14px",
|
|
1881
|
+
fontWeight: 600,
|
|
1882
|
+
color: "#1c1c1e",
|
|
1883
|
+
background: "transparent",
|
|
1884
|
+
border: "1px solid #1c1c1e",
|
|
1885
|
+
borderRadius: "12px"
|
|
1886
|
+
}
|
|
1892
1887
|
},
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1888
|
+
dark: {
|
|
1889
|
+
default: {
|
|
1890
|
+
...sharedButtonStyle,
|
|
1891
|
+
gap: "8px",
|
|
1892
|
+
padding: "12px 24px",
|
|
1893
|
+
fontSize: "14px",
|
|
1894
|
+
fontWeight: 600,
|
|
1895
|
+
color: "#111113",
|
|
1896
|
+
background: "#ffffff",
|
|
1897
|
+
border: "1px solid rgba(255, 255, 255, 0.9)",
|
|
1898
|
+
borderRadius: "12px",
|
|
1899
|
+
boxShadow: "0 8px 24px rgba(0, 0, 0, 0.32)"
|
|
1900
|
+
},
|
|
1901
|
+
compact: {
|
|
1902
|
+
...sharedButtonStyle,
|
|
1903
|
+
gap: "6px",
|
|
1904
|
+
padding: "8px 16px",
|
|
1905
|
+
fontSize: "13px",
|
|
1906
|
+
fontWeight: 600,
|
|
1907
|
+
color: "#111113",
|
|
1908
|
+
background: "#ffffff",
|
|
1909
|
+
border: "1px solid rgba(255, 255, 255, 0.9)",
|
|
1910
|
+
borderRadius: "8px",
|
|
1911
|
+
boxShadow: "0 6px 18px rgba(0, 0, 0, 0.28)"
|
|
1912
|
+
},
|
|
1913
|
+
outline: {
|
|
1914
|
+
...sharedButtonStyle,
|
|
1915
|
+
gap: "8px",
|
|
1916
|
+
padding: "12px 24px",
|
|
1917
|
+
fontSize: "14px",
|
|
1918
|
+
fontWeight: 600,
|
|
1919
|
+
color: "#ffffff",
|
|
1920
|
+
background: "transparent",
|
|
1921
|
+
border: "1px solid rgba(255, 255, 255, 0.72)",
|
|
1922
|
+
borderRadius: "12px"
|
|
1923
|
+
}
|
|
1896
1924
|
}
|
|
1897
1925
|
};
|
|
1926
|
+
var disabledButtonStyle = {
|
|
1927
|
+
opacity: 0.5,
|
|
1928
|
+
cursor: "not-allowed",
|
|
1929
|
+
boxShadow: "none"
|
|
1930
|
+
};
|
|
1931
|
+
function getButtonStyle(variant, theme, disabled) {
|
|
1932
|
+
return {
|
|
1933
|
+
...buttonStyles[theme][variant],
|
|
1934
|
+
...disabled ? disabledButtonStyle : {}
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1898
1937
|
function UniportButton({
|
|
1899
1938
|
recipient,
|
|
1900
1939
|
refundAddress,
|
|
@@ -1920,10 +1959,7 @@ function UniportButton({
|
|
|
1920
1959
|
setIsOpen(false);
|
|
1921
1960
|
onOpenChange?.(false);
|
|
1922
1961
|
};
|
|
1923
|
-
const style =
|
|
1924
|
-
...buttonStyles[variant],
|
|
1925
|
-
...disabled ? buttonStyles.disabled : {}
|
|
1926
|
-
};
|
|
1962
|
+
const style = getButtonStyle(variant, theme, disabled);
|
|
1927
1963
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1928
1964
|
/* @__PURE__ */ jsxs(
|
|
1929
1965
|
"button",
|