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