@unifold/ui-react 0.1.34 → 0.1.36

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.js CHANGED
@@ -1209,24 +1209,34 @@ function CurrencyModal({
1209
1209
  onClose: handleClose
1210
1210
  }
1211
1211
  ),
1212
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-relative", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1213
- "input",
1214
- {
1215
- type: "text",
1216
- value: searchQuery,
1217
- onChange: (e) => setSearchQuery(e.target.value),
1218
- placeholder: "Search",
1219
- className: "uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
1220
- style: {
1221
- backgroundColor: components.search.backgroundColor,
1222
- color: components.search.inputColor,
1223
- fontFamily: fonts.regular,
1224
- borderRadius: components.input.borderRadius,
1225
- border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
1212
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-pb-2", children: [
1213
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1214
+ "style",
1215
+ {
1216
+ dangerouslySetInnerHTML: {
1217
+ __html: `.uf-currency-modal-search::placeholder { color: ${components.search.placeholderColor}; }`
1218
+ }
1226
1219
  }
1227
- }
1228
- ) }) }),
1229
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-flex-1 sm:uf-flex-none uf-overflow-y-auto uf-pb-6 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden sm:uf-min-h-[200px] sm:uf-max-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-space-y-2", children: [
1220
+ ),
1221
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-relative", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1222
+ "input",
1223
+ {
1224
+ type: "text",
1225
+ value: searchQuery,
1226
+ onChange: (e) => setSearchQuery(e.target.value),
1227
+ placeholder: "Search",
1228
+ className: "uf-currency-modal-search uf-w-full uf-p-4 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
1229
+ style: {
1230
+ backgroundColor: components.search.backgroundColor,
1231
+ color: components.search.inputColor,
1232
+ fontFamily: fonts.regular,
1233
+ borderRadius: components.input.borderRadius,
1234
+ border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
1235
+ }
1236
+ }
1237
+ ) })
1238
+ ] }),
1239
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-flex-1 sm:uf-flex-none uf-overflow-y-auto uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden sm:uf-min-h-[200px] sm:uf-max-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-space-y-2", children: [
1230
1240
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1231
1241
  CurrencyListSection,
1232
1242
  {
@@ -1774,188 +1784,153 @@ function DepositDetailContent({ execution }) {
1774
1784
  className: "uf-overflow-hidden uf-mb-3",
1775
1785
  style: { backgroundColor: components.card.backgroundColor, borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` },
1776
1786
  children: [
1777
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1778
- "div",
1779
- {
1780
- className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
1781
- style: { borderColor: colors2.border },
1782
- children: [
1783
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1784
- "span",
1785
- {
1786
- className: "uf-text-sm",
1787
- style: {
1788
- color: components.card.labelColor,
1789
- fontFamily: fonts.regular
1790
- },
1791
- children: "Amount Sent"
1792
- }
1793
- ),
1794
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1795
- "span",
1796
- {
1797
- style: {
1798
- color: components.card.titleColor,
1799
- fontFamily: fonts.regular,
1800
- fontSize: "14px"
1801
- },
1802
- children: [
1803
- formatAmount(
1804
- execution.source_amount_base_unit,
1805
- execution.source_token_metadata?.decimals
1806
- ),
1807
- " ",
1808
- formatCurrency(execution.source_currency)
1809
- ]
1810
- }
1811
- )
1812
- ]
1813
- }
1814
- ),
1815
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1816
- "div",
1817
- {
1818
- className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
1819
- style: { borderColor: colors2.border },
1820
- children: [
1821
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1822
- "span",
1823
- {
1824
- className: "uf-text-sm",
1825
- style: {
1826
- color: components.card.labelColor,
1827
- fontFamily: fonts.regular
1828
- },
1829
- children: "Amount Received"
1830
- }
1831
- ),
1832
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1833
- "span",
1834
- {
1835
- style: {
1836
- color: components.card.titleColor,
1837
- fontFamily: fonts.regular,
1838
- fontSize: "14px"
1839
- },
1840
- children: [
1841
- formatAmount(
1842
- execution.destination_amount_base_unit,
1843
- execution.destination_token_metadata?.decimals
1844
- ),
1845
- " ",
1846
- formatCurrency(execution.destination_currency)
1847
- ]
1848
- }
1849
- )
1850
- ]
1851
- }
1852
- ),
1853
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1854
- "div",
1855
- {
1856
- className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
1857
- style: { borderColor: colors2.border },
1858
- children: [
1859
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1860
- "span",
1861
- {
1862
- className: "uf-text-sm",
1863
- style: {
1864
- color: components.card.labelColor,
1865
- fontFamily: fonts.regular
1866
- },
1867
- children: "USD Value"
1868
- }
1869
- ),
1870
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1871
- "span",
1872
- {
1873
- style: {
1874
- color: components.card.titleColor,
1875
- fontFamily: fonts.regular,
1876
- fontSize: "14px"
1877
- },
1878
- children: formatUsdAmount2(
1879
- execution.source_amount_usd,
1880
- execution.source_amount_base_unit
1881
- )
1882
- }
1883
- )
1884
- ]
1885
- }
1886
- ),
1887
- isPending && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1888
- "div",
1889
- {
1890
- className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
1891
- style: { borderColor: colors2.border },
1892
- children: [
1893
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1894
- "span",
1895
- {
1896
- className: "uf-text-sm",
1897
- style: {
1898
- color: components.card.labelColor,
1899
- fontFamily: fonts.regular
1900
- },
1901
- children: "Estimated delivery time"
1902
- }
1903
- ),
1904
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1905
- "span",
1906
- {
1907
- style: {
1908
- color: components.card.titleColor,
1909
- fontFamily: fonts.regular,
1910
- fontSize: "14px"
1911
- },
1912
- children: formatEstimatedTime(execution?.estimated_processing_time)
1913
- }
1787
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1789
+ "span",
1790
+ {
1791
+ className: "uf-text-sm",
1792
+ style: {
1793
+ color: components.card.rowLeftLabel,
1794
+ fontFamily: fonts.regular
1795
+ },
1796
+ children: "Amount Sent"
1797
+ }
1798
+ ),
1799
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1800
+ "span",
1801
+ {
1802
+ style: {
1803
+ color: components.card.rowRightLabel,
1804
+ fontFamily: fonts.regular,
1805
+ fontSize: "14px"
1806
+ },
1807
+ children: [
1808
+ formatAmount(
1809
+ execution.source_amount_base_unit,
1810
+ execution.source_token_metadata?.decimals
1811
+ ),
1812
+ " ",
1813
+ formatCurrency(execution.source_currency)
1814
+ ]
1815
+ }
1816
+ )
1817
+ ] }),
1818
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1819
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1820
+ "span",
1821
+ {
1822
+ className: "uf-text-sm",
1823
+ style: {
1824
+ color: components.card.rowLeftLabel,
1825
+ fontFamily: fonts.regular
1826
+ },
1827
+ children: "Amount Received"
1828
+ }
1829
+ ),
1830
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1831
+ "span",
1832
+ {
1833
+ style: {
1834
+ color: components.card.rowRightLabel,
1835
+ fontFamily: fonts.regular,
1836
+ fontSize: "14px"
1837
+ },
1838
+ children: [
1839
+ formatAmount(
1840
+ execution.destination_amount_base_unit,
1841
+ execution.destination_token_metadata?.decimals
1842
+ ),
1843
+ " ",
1844
+ formatCurrency(execution.destination_currency)
1845
+ ]
1846
+ }
1847
+ )
1848
+ ] }),
1849
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1850
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1851
+ "span",
1852
+ {
1853
+ className: "uf-text-sm",
1854
+ style: {
1855
+ color: components.card.rowLeftLabel,
1856
+ fontFamily: fonts.regular
1857
+ },
1858
+ children: "USD Value"
1859
+ }
1860
+ ),
1861
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1862
+ "span",
1863
+ {
1864
+ style: {
1865
+ color: components.card.rowRightLabel,
1866
+ fontFamily: fonts.regular,
1867
+ fontSize: "14px"
1868
+ },
1869
+ children: formatUsdAmount2(
1870
+ execution.source_amount_usd,
1871
+ execution.source_amount_base_unit
1914
1872
  )
1915
- ]
1916
- }
1917
- ),
1918
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1919
- "div",
1920
- {
1921
- className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
1922
- style: { borderColor: colors2.border },
1923
- children: [
1924
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1925
- "span",
1926
- {
1927
- className: "uf-text-sm",
1928
- style: {
1929
- color: components.card.labelColor,
1930
- fontFamily: fonts.regular
1931
- },
1932
- children: "Source Network"
1933
- }
1934
- ),
1935
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1936
- "span",
1937
- {
1938
- style: {
1939
- color: components.card.titleColor,
1940
- fontFamily: fonts.regular,
1941
- fontSize: "14px"
1942
- },
1943
- children: getNetworkName(
1944
- execution.source_chain_type,
1945
- execution.source_chain_id
1946
- )
1947
- }
1873
+ }
1874
+ )
1875
+ ] }),
1876
+ isPending && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1877
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1878
+ "span",
1879
+ {
1880
+ className: "uf-text-sm",
1881
+ style: {
1882
+ color: components.card.rowLeftLabel,
1883
+ fontFamily: fonts.regular
1884
+ },
1885
+ children: "Estimated delivery time"
1886
+ }
1887
+ ),
1888
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1889
+ "span",
1890
+ {
1891
+ style: {
1892
+ color: components.card.rowRightLabel,
1893
+ fontFamily: fonts.regular,
1894
+ fontSize: "14px"
1895
+ },
1896
+ children: formatEstimatedTime(execution?.estimated_processing_time)
1897
+ }
1898
+ )
1899
+ ] }),
1900
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1901
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1902
+ "span",
1903
+ {
1904
+ className: "uf-text-sm",
1905
+ style: {
1906
+ color: components.card.rowLeftLabel,
1907
+ fontFamily: fonts.regular
1908
+ },
1909
+ children: "Source Network"
1910
+ }
1911
+ ),
1912
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1913
+ "span",
1914
+ {
1915
+ style: {
1916
+ color: components.card.rowRightLabel,
1917
+ fontFamily: fonts.regular,
1918
+ fontSize: "14px"
1919
+ },
1920
+ children: getNetworkName(
1921
+ execution.source_chain_type,
1922
+ execution.source_chain_id
1948
1923
  )
1949
- ]
1950
- }
1951
- ),
1924
+ }
1925
+ )
1926
+ ] }),
1952
1927
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
1953
1928
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1954
1929
  "span",
1955
1930
  {
1956
1931
  className: "uf-text-sm",
1957
1932
  style: {
1958
- color: components.card.labelColor,
1933
+ color: components.card.rowLeftLabel,
1959
1934
  fontFamily: fonts.regular
1960
1935
  },
1961
1936
  children: "Destination Network"
@@ -1965,7 +1940,7 @@ function DepositDetailContent({ execution }) {
1965
1940
  "span",
1966
1941
  {
1967
1942
  style: {
1968
- color: components.card.titleColor,
1943
+ color: components.card.rowRightLabel,
1969
1944
  fontFamily: fonts.regular,
1970
1945
  fontSize: "14px"
1971
1946
  },
@@ -2007,15 +1982,14 @@ function DepositDetailContent({ execution }) {
2007
1982
  href: execution.explorer_url,
2008
1983
  target: "_blank",
2009
1984
  rel: "noopener noreferrer",
2010
- className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 uf-border-b hover:uf-bg-card/50 uf-transition-colors",
2011
- style: { borderColor: colors2.border },
1985
+ className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 hover:uf-bg-card/50 uf-transition-colors",
2012
1986
  children: [
2013
1987
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2014
1988
  "div",
2015
1989
  {
2016
1990
  className: "uf-text-sm",
2017
1991
  style: {
2018
- color: components.card.labelColor,
1992
+ color: components.card.rowLeftLabel,
2019
1993
  fontFamily: fonts.regular
2020
1994
  },
2021
1995
  children: "Deposit Tx"
@@ -2026,7 +2000,7 @@ function DepositDetailContent({ execution }) {
2026
2000
  {
2027
2001
  className: "uf-text-sm uf-text-right",
2028
2002
  style: {
2029
- color: components.card.titleColor,
2003
+ color: components.card.rowRightLabel,
2030
2004
  fontFamily: fonts.regular
2031
2005
  },
2032
2006
  children: formatTransactionHash(execution.transaction_hash)
@@ -2036,7 +2010,7 @@ function DepositDetailContent({ execution }) {
2036
2010
  import_lucide_react4.ExternalLink,
2037
2011
  {
2038
2012
  className: "uf-w-3.5 uf-h-3.5 uf-block",
2039
- style: { color: components.card.actionColor }
2013
+ style: { color: components.card.actionIcon }
2040
2014
  }
2041
2015
  )
2042
2016
  ]
@@ -2055,7 +2029,7 @@ function DepositDetailContent({ execution }) {
2055
2029
  {
2056
2030
  className: "uf-text-sm",
2057
2031
  style: {
2058
- color: components.card.labelColor,
2032
+ color: components.card.rowLeftLabel,
2059
2033
  fontFamily: fonts.regular
2060
2034
  },
2061
2035
  children: "Completion Tx"
@@ -2066,7 +2040,7 @@ function DepositDetailContent({ execution }) {
2066
2040
  {
2067
2041
  className: "uf-text-sm uf-text-right",
2068
2042
  style: {
2069
- color: components.card.titleColor,
2043
+ color: components.card.rowRightLabel,
2070
2044
  fontFamily: fonts.regular
2071
2045
  },
2072
2046
  children: formatTransactionHash(
@@ -2078,7 +2052,7 @@ function DepositDetailContent({ execution }) {
2078
2052
  import_lucide_react4.ExternalLink,
2079
2053
  {
2080
2054
  className: "uf-w-3.5 uf-h-3.5 uf-block",
2081
- style: { color: components.card.actionColor }
2055
+ style: { color: components.card.actionIcon }
2082
2056
  }
2083
2057
  )
2084
2058
  ]
@@ -2846,25 +2820,28 @@ function BuyWithCard({
2846
2820
  }
2847
2821
  }
2848
2822
  ) }) }),
2849
- selectedCurrencyData?.suggested_amounts && selectedCurrencyData.suggested_amounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: selectedCurrencyData.suggested_amounts.map((quickAmount) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2850
- "button",
2851
- {
2852
- onClick: () => handleQuickAmount(quickAmount),
2853
- className: "uf-w-24 uf-py-2 hover:uf-bg-accent uf-transition-colors uf-text-sm uf-font-medium",
2854
- style: {
2855
- backgroundColor: components.card.backgroundColor,
2856
- color: components.card.titleColor,
2857
- fontFamily: fonts.medium,
2858
- borderRadius: components.card.borderRadius,
2859
- border: `${components.card.borderWidth}px solid ${components.card.borderColor}`
2823
+ selectedCurrencyData?.suggested_amounts && selectedCurrencyData.suggested_amounts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: selectedCurrencyData.suggested_amounts.map((quickAmount) => {
2824
+ const isSelected = parseFloat(amount) === quickAmount;
2825
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2826
+ "button",
2827
+ {
2828
+ onClick: () => handleQuickAmount(quickAmount),
2829
+ className: "uf-w-24 uf-py-2 hover:uf-bg-accent uf-transition-colors uf-text-sm uf-font-medium",
2830
+ style: {
2831
+ backgroundColor: components.card.backgroundColor,
2832
+ color: components.card.titleColor,
2833
+ fontFamily: fonts.medium,
2834
+ borderRadius: components.card.borderRadius,
2835
+ border: `${components.card.borderWidth}px solid ${isSelected ? colors2.primary : components.card.borderColor}`
2836
+ },
2837
+ children: [
2838
+ getCurrencySymbol(currency),
2839
+ quickAmount.toLocaleString()
2840
+ ]
2860
2841
  },
2861
- children: [
2862
- getCurrencySymbol(currency),
2863
- quickAmount.toLocaleString()
2864
- ]
2865
- },
2866
- quickAmount
2867
- )) }),
2842
+ quickAmount
2843
+ );
2844
+ }) }),
2868
2845
  amountValidationError && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2869
2846
  "div",
2870
2847
  {
@@ -2883,7 +2860,7 @@ function BuyWithCard({
2883
2860
  "span",
2884
2861
  {
2885
2862
  style: {
2886
- color: components.card.headerColor,
2863
+ color: components.card.labelColor,
2887
2864
  fontFamily: fonts.medium
2888
2865
  },
2889
2866
  children: "Provider"
@@ -2942,7 +2919,7 @@ function BuyWithCard({
2942
2919
  {
2943
2920
  className: "uf-text-xs uf-font-normal uf-mb-2",
2944
2921
  style: {
2945
- color: components.card.labelColor,
2922
+ color: components.card.headerColor,
2946
2923
  fontFamily: fonts.regular
2947
2924
  },
2948
2925
  children: "Auto-picked for you"
@@ -3057,8 +3034,8 @@ function BuyWithCard({
3057
3034
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3058
3035
  "div",
3059
3036
  {
3060
- className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
3061
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index) => {
3037
+ className: `uf-transition-all uf-duration-300 uf-min-h-[420px] uf-flex uf-flex-col ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
3038
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-space-y-2 uf-pt-2 uf-pb-8 uf-overflow-y-auto uf-flex-1 uf-min-h-0", children: sortedQuotes.map((quote, index) => {
3062
3039
  const badges = getProviderBadges(quote, sortedQuotes);
3063
3040
  const displayName = quote.service_provider_display_name;
3064
3041
  const isSelected = selectedProvider?.service_provider === quote.service_provider;
@@ -3075,11 +3052,11 @@ function BuyWithCard({
3075
3052
  },
3076
3053
  onMouseEnter: () => setHoveredProviderIndex(index),
3077
3054
  onMouseLeave: () => setHoveredProviderIndex(null),
3078
- className: `uf-w-full uf-transition-colors uf-p-3 uf-flex uf-items-center uf-justify-between uf-group ${isSelected ? "uf-ring-2 uf-ring-inset uf-ring-primary" : ""}`,
3055
+ className: "uf-w-full uf-transition-colors uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
3079
3056
  style: {
3080
3057
  backgroundColor: hoveredProviderIndex === index ? colors2.cardHover : components.card.backgroundColor,
3081
3058
  borderRadius: components.card.borderRadius,
3082
- border: `${components.card.borderWidth}px solid ${components.card.borderColor}`
3059
+ border: isSelected ? `2px solid ${colors2.primary}` : `${components.card.borderWidth}px solid ${components.card.borderColor}`
3083
3060
  },
3084
3061
  children: [
3085
3062
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
@@ -3106,7 +3083,8 @@ function BuyWithCard({
3106
3083
  badges.map((badge, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3107
3084
  "span",
3108
3085
  {
3109
- className: "uf-text-[10px] uf-text-green-400 uf-font-normal",
3086
+ className: "uf-text-[10px] uf-font-normal",
3087
+ style: { color: colors2.success },
3110
3088
  children: [
3111
3089
  badge,
3112
3090
  i < badges.length - 1 && ","
@@ -3114,8 +3092,25 @@ function BuyWithCard({
3114
3092
  },
3115
3093
  i
3116
3094
  )),
3117
- quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
3118
- quote.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
3095
+ quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3096
+ "span",
3097
+ {
3098
+ className: "uf-text-[10px]",
3099
+ style: { color: components.card.subtextRightColor },
3100
+ children: "\u2022"
3101
+ }
3102
+ ),
3103
+ quote.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3104
+ "span",
3105
+ {
3106
+ className: "uf-text-[10px] uf-font-normal",
3107
+ style: {
3108
+ color: components.card.subtextRightColor,
3109
+ fontFamily: fonts.regular
3110
+ },
3111
+ children: "No document upload"
3112
+ }
3113
+ )
3119
3114
  ] })
3120
3115
  ] })
3121
3116
  ] }),
@@ -3216,7 +3211,7 @@ function BuyWithCard({
3216
3211
  }
3217
3212
  )
3218
3213
  ] }),
3219
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.actionColor } }) }),
3214
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.iconColor } }) }),
3220
3215
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
3221
3216
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "uf-relative", children: [
3222
3217
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -3259,7 +3254,7 @@ function BuyWithCard({
3259
3254
  }
3260
3255
  )
3261
3256
  ] }),
3262
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.actionColor } }) }),
3257
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react6.ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.iconColor } }) }),
3263
3258
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
3264
3259
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "uf-relative", children: [
3265
3260
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -3752,7 +3747,7 @@ function DepositExecutionItem({
3752
3747
  {
3753
3748
  className: "uf-font-medium uf-text-sm uf-flex-shrink-0",
3754
3749
  style: {
3755
- color: components.card.titleColor,
3750
+ color: components.card.textRightColor,
3756
3751
  fontFamily: fonts.medium
3757
3752
  },
3758
3753
  children: formatUsdAmount2(execution.source_amount_usd || "0")
@@ -3806,7 +3801,7 @@ function TransferCryptoButton({
3806
3801
  import_lucide_react9.Zap,
3807
3802
  {
3808
3803
  className: "uf-w-5 uf-h-5",
3809
- style: { color: colors2.foregroundMuted }
3804
+ style: { color: components.card.iconColor }
3810
3805
  }
3811
3806
  ) }),
3812
3807
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "uf-text-left", children: [
@@ -3898,7 +3893,7 @@ function DepositWithCardButton({
3898
3893
  import_lucide_react10.CreditCard,
3899
3894
  {
3900
3895
  className: "uf-w-5 uf-h-5",
3901
- style: { color: colors2.foregroundMuted }
3896
+ style: { color: components.card.iconColor }
3902
3897
  }
3903
3898
  ) }),
3904
3899
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "uf-text-left", children: [
@@ -3996,7 +3991,7 @@ function PayWithExchangeButton({
3996
3991
  import_lucide_react11.ArrowLeftRight,
3997
3992
  {
3998
3993
  className: "uf-w-5 uf-h-5",
3999
- style: { color: colors2.foregroundMuted }
3994
+ style: { color: components.card.iconColor }
4000
3995
  }
4001
3996
  ) }),
4002
3997
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "uf-text-left", children: [
@@ -4088,7 +4083,7 @@ function DepositTrackerButton({
4088
4083
  import_lucide_react12.Clock,
4089
4084
  {
4090
4085
  className: "uf-w-5 uf-h-5",
4091
- style: { color: colors2.foregroundMuted }
4086
+ style: { color: components.card.iconColor }
4092
4087
  }
4093
4088
  ),
4094
4089
  badge !== void 0 && badge > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
@@ -7027,7 +7022,7 @@ function DepositsModal({
7027
7022
  onClose: handleClose
7028
7023
  }
7029
7024
  ),
7030
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-flex-1 uf-min-h-0 uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7025
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-flex-1 uf-min-h-0 uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-space-y-2 uf-pb-8", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7031
7026
  "div",
7032
7027
  {
7033
7028
  className: "uf-text-sm",
@@ -7226,23 +7221,33 @@ function TokenSelectorSheet({
7226
7221
  ),
7227
7222
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-w-7 uf-h-5 uf-invisible" })
7228
7223
  ] }),
7229
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7230
- "input",
7231
- {
7232
- type: "text",
7233
- placeholder: "Search",
7234
- value: searchQuery,
7235
- onChange: (e) => setSearchQuery(e.target.value),
7236
- className: "uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
7237
- style: {
7238
- backgroundColor: components.search.backgroundColor,
7239
- color: components.search.inputColor,
7240
- fontFamily: fonts.regular,
7241
- borderRadius: components.input.borderRadius,
7242
- border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
7224
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-pb-3", children: [
7225
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7226
+ "style",
7227
+ {
7228
+ dangerouslySetInnerHTML: {
7229
+ __html: `.uf-token-sheet-search::placeholder { color: ${components.search.placeholderColor}; }`
7230
+ }
7243
7231
  }
7244
- }
7245
- ) }) }),
7232
+ ),
7233
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7234
+ "input",
7235
+ {
7236
+ type: "text",
7237
+ placeholder: "Search",
7238
+ value: searchQuery,
7239
+ onChange: (e) => setSearchQuery(e.target.value),
7240
+ className: "uf-token-sheet-search uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
7241
+ style: {
7242
+ backgroundColor: components.search.backgroundColor,
7243
+ color: components.search.inputColor,
7244
+ fontFamily: fonts.regular,
7245
+ borderRadius: components.input.borderRadius,
7246
+ border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
7247
+ }
7248
+ }
7249
+ ) })
7250
+ ] }),
7246
7251
  quickSelectOptions.length > 0 && !searchQuery && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-pb-3 uf--mx-6", children: [
7247
7252
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7248
7253
  "div",
@@ -7494,12 +7499,13 @@ function TokenSelectorSheet({
7494
7499
  style: {
7495
7500
  fontSize: 12,
7496
7501
  flexShrink: 0,
7497
- color: components.card.labelColor,
7498
7502
  fontFamily: fonts.regular
7499
7503
  },
7500
7504
  children: [
7501
- "Minimum:",
7502
- " ",
7505
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { color: components.card.textRightColor }, children: [
7506
+ "Minimum:",
7507
+ " "
7508
+ ] }),
7503
7509
  /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { color: components.card.labelHighlightRightColor }, children: [
7504
7510
  "$",
7505
7511
  chain.minimum_deposit_amount_usd
@@ -7581,13 +7587,15 @@ var import_jsx_runtime36 = require("react/jsx-runtime");
7581
7587
  function DepositFooterLinks({
7582
7588
  onGlossaryClick
7583
7589
  }) {
7590
+ const { colors: colors2 } = useTheme();
7584
7591
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "uf-flex uf-justify-end uf-items-center uf-gap-2 uf-text-xs uf-text-muted-foreground", children: [
7585
7592
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7586
7593
  "a",
7587
7594
  {
7588
7595
  href: "https://unifold.io/terms",
7589
7596
  target: "_blank",
7590
- className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
7597
+ className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
7598
+ style: { color: colors2.primary },
7591
7599
  children: "Terms"
7592
7600
  }
7593
7601
  ),
@@ -7597,7 +7605,8 @@ function DepositFooterLinks({
7597
7605
  {
7598
7606
  href: "https://unifold.io/support",
7599
7607
  target: "_blank",
7600
- className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
7608
+ className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
7609
+ style: { color: colors2.primary },
7601
7610
  children: "Help"
7602
7611
  }
7603
7612
  ),
@@ -7605,8 +7614,9 @@ function DepositFooterLinks({
7605
7614
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7606
7615
  "div",
7607
7616
  {
7608
- className: "uf-cursor-pointer hover:uf-text-foreground uf-transition-colors",
7617
+ className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
7609
7618
  onClick: onGlossaryClick,
7619
+ style: { color: colors2.primary },
7610
7620
  children: "Glossary"
7611
7621
  }
7612
7622
  )
@@ -7620,61 +7630,117 @@ var t3 = i18n.transferCrypto;
7620
7630
  function GlossaryModal({
7621
7631
  open,
7622
7632
  onOpenChange,
7623
- themeClass,
7624
- colors: colors2
7633
+ backgroundColor: backgroundColorProp,
7634
+ themeClass: themeClassProp,
7635
+ colors: colorsProp
7625
7636
  }) {
7637
+ const { themeClass, colors: colors2, components } = useTheme();
7638
+ const resolvedThemeClass = themeClassProp ?? themeClass;
7639
+ const modalBackground = backgroundColorProp ?? colors2.background;
7626
7640
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7627
7641
  DialogContent,
7628
7642
  {
7629
- className: `sm:uf-max-w-[400px] !uf-top-auto !uf-h-auto sm:!uf-top-[50%] uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
7630
- style: { backgroundColor: colors2.card },
7643
+ className: `sm:uf-max-w-[400px] !uf-top-auto !uf-h-auto sm:!uf-top-[50%] uf-border-secondary uf-p-0 uf-gap-0 [&>button]:uf-hidden ${resolvedThemeClass}`,
7644
+ style: { backgroundColor: modalBackground },
7631
7645
  children: [
7632
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-p-4 uf-pb-2", children: [
7633
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DialogTitle, { className: "uf-text-base uf-font-semibold", children: "Glossary" }),
7646
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-relative uf-flex uf-items-center uf-justify-between", children: [
7647
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "uf-invisible uf-w-9 uf-h-9 uf-flex uf-shrink-0 uf-items-center uf-justify-center", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react15.X, { className: "uf-w-4 uf-h-4" }) }),
7648
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7649
+ DialogTitle,
7650
+ {
7651
+ className: "uf-text-base uf-font-medium uf-absolute uf-left-0 uf-right-0 uf-text-center uf-pointer-events-none",
7652
+ style: { color: components.header.titleColor },
7653
+ children: "Glossary"
7654
+ }
7655
+ ),
7634
7656
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7635
7657
  "button",
7636
7658
  {
7637
7659
  onClick: () => onOpenChange(false),
7638
- className: "uf-p-1 uf-rounded-lg hover:uf-bg-secondary uf-transition-colors uf-text-muted-foreground hover:uf-text-foreground",
7660
+ className: "uf-p-1 uf-rounded-lg hover:uf-bg-secondary uf-transition-colors uf-flex-shrink-0 uf-z-[1]",
7661
+ style: { color: components.header.buttonColor },
7639
7662
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react15.X, { className: "uf-w-4 uf-h-4" })
7640
7663
  }
7641
7664
  )
7642
7665
  ] }),
7643
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-max-h-[60vh] sm:uf-max-h-[400px] uf-overflow-y-auto uf-px-4 uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-space-y-4", children: [
7644
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7645
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Your Deposit Token" }),
7646
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t3.selectTokenDepositTooltip })
7647
- ] }),
7648
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7649
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7650
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Deposit Address" }),
7651
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "A unique wallet address generated for you. Send supported tokens to this address and they will be automatically converted and deposited into your account." })
7652
- ] }),
7653
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7654
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7655
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Price Impact" }),
7656
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t3.priceImpact.tooltip })
7657
- ] }),
7658
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7659
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7660
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Slippage" }),
7661
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t3.slippage.tooltip })
7662
- ] }),
7663
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7664
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7665
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Processing Time" }),
7666
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "The estimated time for your deposit to be confirmed and credited. This depends on the source network's block confirmation time and current congestion." })
7667
- ] }),
7668
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7669
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7670
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Minimum Deposit" }),
7671
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t3.minDeposit.tooltip })
7672
- ] }),
7673
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-border-t uf-border-border" }),
7674
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
7675
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", children: "Recipient Address" }),
7676
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: "The destination address on the target blockchain where your converted deposit will be sent. This is typically your wallet address on the application's native chain." })
7677
- ] })
7666
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-max-h-[60vh] sm:uf-max-h-[400px] uf-overflow-y-auto uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-space-y-3", children: [
7667
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7668
+ "div",
7669
+ {
7670
+ className: "uf-rounded-xl uf-p-3",
7671
+ style: { backgroundColor: components.card.backgroundColor },
7672
+ children: [
7673
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Your Deposit Token" }),
7674
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.selectTokenDepositTooltip })
7675
+ ]
7676
+ }
7677
+ ),
7678
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7679
+ "div",
7680
+ {
7681
+ className: "uf-rounded-xl uf-p-3",
7682
+ style: { backgroundColor: components.card.backgroundColor },
7683
+ children: [
7684
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Deposit Address" }),
7685
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "A unique wallet address generated for you. Send supported tokens to this address and they will be automatically converted and deposited into your account." })
7686
+ ]
7687
+ }
7688
+ ),
7689
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7690
+ "div",
7691
+ {
7692
+ className: "uf-rounded-xl uf-p-3",
7693
+ style: { backgroundColor: components.card.backgroundColor },
7694
+ children: [
7695
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Price Impact" }),
7696
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.priceImpact.tooltip })
7697
+ ]
7698
+ }
7699
+ ),
7700
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7701
+ "div",
7702
+ {
7703
+ className: "uf-rounded-xl uf-p-3",
7704
+ style: { backgroundColor: components.card.backgroundColor },
7705
+ children: [
7706
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Slippage" }),
7707
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.slippage.tooltip })
7708
+ ]
7709
+ }
7710
+ ),
7711
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7712
+ "div",
7713
+ {
7714
+ className: "uf-rounded-xl uf-p-3",
7715
+ style: { backgroundColor: components.card.backgroundColor },
7716
+ children: [
7717
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Processing Time" }),
7718
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "The estimated time for your deposit to be confirmed and credited. This depends on the source network's block confirmation time and current congestion." })
7719
+ ]
7720
+ }
7721
+ ),
7722
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7723
+ "div",
7724
+ {
7725
+ className: "uf-rounded-xl uf-p-3",
7726
+ style: { backgroundColor: components.card.backgroundColor },
7727
+ children: [
7728
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Minimum Deposit" }),
7729
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.minDeposit.tooltip })
7730
+ ]
7731
+ }
7732
+ ),
7733
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
7734
+ "div",
7735
+ {
7736
+ className: "uf-rounded-xl uf-p-3",
7737
+ style: { backgroundColor: components.card.backgroundColor },
7738
+ children: [
7739
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Recipient Address" }),
7740
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "The destination address on the target blockchain where your converted deposit will be sent. This is typically your wallet address on the application's native chain." })
7741
+ ]
7742
+ }
7743
+ )
7678
7744
  ] }) })
7679
7745
  ]
7680
7746
  }
@@ -7951,7 +8017,7 @@ function TransferCryptoSingleInput({
7951
8017
  className: "uf-space-y-3 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden",
7952
8018
  style: { backgroundColor: colors2.background },
7953
8019
  children: [
7954
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-1 uf-flex uf-items-center uf-justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-flex uf-items-center uf-gap-1", children: t4.selectTokenDeposit }) }),
8020
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-text-xs uf-mb-1 uf-flex uf-items-center uf-justify-between", style: { color: components.card.labelColor }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-flex uf-items-center uf-gap-1", children: t4.selectTokenDeposit }) }),
7955
8021
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7956
8022
  "button",
7957
8023
  {
@@ -8055,7 +8121,7 @@ function TransferCryptoSingleInput({
8055
8121
  ] })
8056
8122
  ] }),
8057
8123
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
8058
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: "Intent address" }),
8124
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: "Intent address" }),
8059
8125
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "uf-shadow-lg", style: { borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: loading || tokensLoading || !initialSelectionDone ? (
8060
8126
  // QR Skeleton - matches QR code appearance
8061
8127
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -8100,7 +8166,7 @@ function TransferCryptoSingleInput({
8100
8166
  }
8101
8167
  ) })
8102
8168
  ] }),
8103
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "uf-text-sm uf-text-muted-foreground uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
8169
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "uf-text-sm uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
8104
8170
  loading || tokensLoading || !initialSelectionDone ? (
8105
8171
  // Address skeleton
8106
8172
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -8112,12 +8178,13 @@ function TransferCryptoSingleInput({
8112
8178
  }
8113
8179
  }
8114
8180
  )
8115
- ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t4.noAddressAvailable }),
8181
+ ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "uf-text-sm uf-truncate uf-min-w-0", style: { color: components.card.titleColor }, children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t4.noAddressAvailable }),
8116
8182
  depositAddress && initialSelectionDone && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8117
8183
  "span",
8118
8184
  {
8119
8185
  onClick: handleCopyAddress,
8120
- className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
8186
+ className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
8187
+ style: { color: copied ? colors2.success : components.card.actionColor },
8121
8188
  children: copied ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react16.Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react16.Copy, { className: "uf-w-3.5 uf-h-3.5" })
8122
8189
  }
8123
8190
  )
@@ -8179,7 +8246,8 @@ function TransferCryptoSingleInput({
8179
8246
  "span",
8180
8247
  {
8181
8248
  onClick: () => handleCopyRecipientAddress(recipientAddress),
8182
- className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copiedRecipient ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
8249
+ className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
8250
+ style: { color: copiedRecipient ? colors2.success : components.card.actionColor },
8183
8251
  children: copiedRecipient ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react16.Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react16.Copy, { className: "uf-w-3.5 uf-h-3.5" })
8184
8252
  }
8185
8253
  )
@@ -8585,7 +8653,7 @@ function TransferCryptoDoubleInput({
8585
8653
  children: [
8586
8654
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-grid uf-grid-cols-2 uf-gap-2.5", children: [
8587
8655
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
8588
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t5.selectedToken }),
8656
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: t5.selectedToken }),
8589
8657
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
8590
8658
  Select,
8591
8659
  {
@@ -8593,7 +8661,7 @@ function TransferCryptoDoubleInput({
8593
8661
  onValueChange: setToken,
8594
8662
  disabled: tokensLoading || supportedTokens.length === 0,
8595
8663
  children: [
8596
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectTrigger, { className: "uf-bg-secondary uf-h-10 hover:uf-bg-accent uf-text-foreground disabled:uf-opacity-50", style: { border: `1px solid ${isDarkMode ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.15)"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
8664
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectTrigger, { className: "uf-h-10 hover:uf-opacity-90 uf-text-foreground disabled:uf-opacity-50", style: { backgroundColor: components.card.backgroundColor, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
8597
8665
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", style: { border: `1px solid ${isDarkMode ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.15)"}`, ...fonts.regular ? { "--uf-font-family": fonts.regular } : {} }, children: supportedTokens.map((tokenData) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8598
8666
  SelectItem,
8599
8667
  {
@@ -8608,7 +8676,7 @@ function TransferCryptoDoubleInput({
8608
8676
  )
8609
8677
  ] }),
8610
8678
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
8611
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
8679
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: [
8612
8680
  t5.selectedChain,
8613
8681
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "uf-font-medium", style: { color: components.card.labelHighlightRightColor }, children: [
8614
8682
  "$",
@@ -8624,7 +8692,7 @@ function TransferCryptoDoubleInput({
8624
8692
  onValueChange: setChain,
8625
8693
  disabled: tokensLoading || availableChainsForToken.length === 0,
8626
8694
  children: [
8627
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectTrigger, { className: "uf-bg-secondary uf-h-10 hover:uf-bg-accent uf-text-foreground disabled:uf-opacity-50", style: { border: `1px solid ${isDarkMode ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.15)"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
8695
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectTrigger, { className: "uf-h-10 hover:uf-opacity-90 uf-text-foreground disabled:uf-opacity-50", style: { backgroundColor: components.card.backgroundColor, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
8628
8696
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8629
8697
  SelectContent,
8630
8698
  {
@@ -8667,7 +8735,7 @@ function TransferCryptoDoubleInput({
8667
8735
  ] })
8668
8736
  ] }),
8669
8737
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
8670
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: "Intent address" }),
8738
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: "Intent address" }),
8671
8739
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "uf-shadow-lg", style: { borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: loading || tokensLoading || !initialSelectionDone ? (
8672
8740
  // QR Skeleton - matches QR code appearance
8673
8741
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
@@ -8712,7 +8780,7 @@ function TransferCryptoDoubleInput({
8712
8780
  }
8713
8781
  ) })
8714
8782
  ] }),
8715
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-text-sm uf-text-muted-foreground uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
8783
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "uf-text-sm uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
8716
8784
  loading || tokensLoading || !initialSelectionDone ? (
8717
8785
  // Address skeleton
8718
8786
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
@@ -8724,12 +8792,13 @@ function TransferCryptoDoubleInput({
8724
8792
  }
8725
8793
  }
8726
8794
  )
8727
- ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t5.noAddressAvailable }),
8795
+ ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "uf-text-sm uf-truncate uf-min-w-0", style: { color: components.card.titleColor }, children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t5.noAddressAvailable }),
8728
8796
  depositAddress && initialSelectionDone && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8729
8797
  "span",
8730
8798
  {
8731
8799
  onClick: handleCopyAddress,
8732
- className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copied ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
8800
+ className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
8801
+ style: { color: copied ? colors2.success : components.card.actionColor },
8733
8802
  children: copied ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.Copy, { className: "uf-w-3.5 uf-h-3.5" })
8734
8803
  }
8735
8804
  )
@@ -8791,7 +8860,8 @@ function TransferCryptoDoubleInput({
8791
8860
  "span",
8792
8861
  {
8793
8862
  onClick: () => handleCopyRecipientAddress(recipientAddress),
8794
- className: `uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer ${copiedRecipient ? "uf-text-green-500" : "uf-text-muted-foreground"}`,
8863
+ className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
8864
+ style: { color: copiedRecipient ? colors2.success : components.card.actionColor },
8795
8865
  children: copiedRecipient ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.Copy, { className: "uf-w-3.5 uf-h-3.5" })
8796
8866
  }
8797
8867
  )
@@ -10819,14 +10889,23 @@ function DepositModal({
10819
10889
  onDepositSuccess,
10820
10890
  onDepositError,
10821
10891
  theme = "dark",
10822
- hideOverlay = false
10892
+ hideOverlay = false,
10893
+ initialScreen = "main"
10823
10894
  }) {
10824
10895
  const { colors: colors2, fonts, components } = useTheme();
10896
+ const effectiveInitialScreen = (0, import_react16.useMemo)(() => {
10897
+ const s = initialScreen ?? "main";
10898
+ if (s === "tracker" && hideDepositTracker) return "main";
10899
+ return s;
10900
+ }, [initialScreen, hideDepositTracker]);
10825
10901
  const [containerEl, setContainerEl] = (0, import_react16.useState)(null);
10826
10902
  const containerCallbackRef = (0, import_react16.useCallback)((el) => {
10827
10903
  setContainerEl(el);
10828
10904
  }, []);
10829
- const [view, setView] = (0, import_react16.useState)("main");
10905
+ const [view, setView] = (0, import_react16.useState)(
10906
+ effectiveInitialScreen
10907
+ );
10908
+ const resetViewTimeoutRef = (0, import_react16.useRef)(null);
10830
10909
  const [cardView, setCardView] = (0, import_react16.useState)(
10831
10910
  "amount"
10832
10911
  );
@@ -10946,6 +11025,43 @@ function DepositModal({
10946
11025
  const template = errors[code] ?? addressValidationMessages.defaultError;
10947
11026
  return interpolate(template, metadata);
10948
11027
  };
11028
+ const openingScreen = effectiveInitialScreen;
11029
+ const sessionOpenedFromMenu = openingScreen === "main";
11030
+ const standaloneNeedsDepositPrereq = openingScreen !== "main" && (view === "transfer" || view === "card");
11031
+ let depositPrerequisiteBody;
11032
+ if (isCountryLoading || isAddressValidationLoading || tokensLoading || walletsLoading || !projectConfig) {
11033
+ depositPrerequisiteBody = standaloneNeedsDepositPrereq ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11034
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
11035
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
11036
+ !hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, {})
11037
+ ] });
11038
+ } else if (countryError) {
11039
+ depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11040
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11041
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
11042
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
11043
+ ] });
11044
+ } else if (!isAllowed) {
11045
+ depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11046
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11047
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
11048
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
11049
+ ] });
11050
+ } else if (isAddressValid === false) {
11051
+ depositPrerequisiteBody = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11052
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11053
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
11054
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
11055
+ addressFailureCode,
11056
+ addressFailureMetadata
11057
+ ) })
11058
+ ] });
11059
+ } else {
11060
+ depositPrerequisiteBody = null;
11061
+ }
11062
+ const showBackTransfer = sessionOpenedFromMenu;
11063
+ const showBackCard = cardView !== "amount" || sessionOpenedFromMenu;
11064
+ const showBackTracker = selectedExecution !== null || sessionOpenedFromMenu;
10949
11065
  const themeClass = resolvedTheme === "dark" ? "uf-dark" : "";
10950
11066
  const handleWalletDisconnect = () => {
10951
11067
  setUserDisconnectedWallet(true);
@@ -10956,13 +11072,37 @@ function DepositModal({
10956
11072
  };
10957
11073
  const handleClose = () => {
10958
11074
  onOpenChange(false);
10959
- setTimeout(() => {
10960
- setView("main");
11075
+ if (resetViewTimeoutRef.current) {
11076
+ clearTimeout(resetViewTimeoutRef.current);
11077
+ }
11078
+ resetViewTimeoutRef.current = setTimeout(() => {
11079
+ setView(effectiveInitialScreen);
10961
11080
  setCardView("amount");
10962
11081
  setExchangeView("providers");
10963
11082
  setBrowserWalletInfo(null);
11083
+ resetViewTimeoutRef.current = null;
10964
11084
  }, 200);
10965
11085
  };
11086
+ (0, import_react16.useLayoutEffect)(() => {
11087
+ if (!open) return;
11088
+ if (resetViewTimeoutRef.current) {
11089
+ clearTimeout(resetViewTimeoutRef.current);
11090
+ resetViewTimeoutRef.current = null;
11091
+ }
11092
+ setView(effectiveInitialScreen);
11093
+ setCardView("amount");
11094
+ setExchangeView("providers");
11095
+ setBrowserWalletInfo(null);
11096
+ setSelectedExecution(null);
11097
+ }, [open, effectiveInitialScreen]);
11098
+ (0, import_react16.useEffect)(
11099
+ () => () => {
11100
+ if (resetViewTimeoutRef.current) {
11101
+ clearTimeout(resetViewTimeoutRef.current);
11102
+ }
11103
+ },
11104
+ []
11105
+ );
10966
11106
  const handleBack = () => {
10967
11107
  if (view === "card" && cardView === "quotes") {
10968
11108
  setCardView("amount");
@@ -11075,95 +11215,64 @@ function DepositModal({
11075
11215
  publishableKey
11076
11216
  }
11077
11217
  ),
11078
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: isCountryLoading || isAddressValidationLoading || tokensLoading || walletsLoading || !projectConfig ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11079
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
11080
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, { variant: "with-icons" }),
11081
- !hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SkeletonButton, {})
11082
- ] }) : countryError ? (
11083
- /* Error state - couldn't verify location */
11084
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11085
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11086
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "Unable to Verify Location" }),
11087
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "We couldn't verify your location. Please check your connection and try again." })
11088
- ] })
11089
- ) : !isAllowed ? (
11090
- /* Blocked country state (isAllowed is false or null without error) */
11091
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11092
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.MapPinOff, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11093
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: "No Tokens Available" }),
11094
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: "There are no supported tokens available from your current location." })
11095
- ] })
11096
- ) : isAddressValid === false ? (
11097
- /* Invalid recipient address state (e.g., Algorand not opted in) */
11098
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-justify-center uf-py-8 uf-px-4 uf-text-center", children: [
11099
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-w-16 uf-h-16 uf-rounded-full uf-bg-muted uf-flex uf-items-center uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.AlertTriangle, { className: "uf-w-8 uf-h-8 uf-text-muted-foreground" }) }),
11100
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "uf-text-lg uf-font-semibold uf-text-foreground uf-mb-2", children: addressValidationMessages.unableToReceiveFunds }),
11101
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-max-w-[280px]", children: getAddressValidationErrorMessage(
11102
- addressFailureCode,
11103
- addressFailureMetadata
11104
- ) })
11105
- ] })
11106
- ) : (
11107
- /* Normal deposit options */
11108
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11109
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11110
- TransferCryptoButton,
11111
- {
11112
- onClick: () => setView("transfer"),
11113
- title: t6.transferCrypto.title,
11114
- subtitle: t6.transferCrypto.subtitle,
11115
- featuredTokens: projectConfig.transfer_crypto.networks
11116
- }
11117
- ),
11118
- enableConnectWallet && !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11119
- BrowserWalletButton,
11120
- {
11121
- onClick: handleBrowserWalletClick,
11122
- onConnectClick: handleWalletConnectClick,
11123
- onDisconnect: handleWalletDisconnect,
11124
- chainType: browserWalletChainType,
11125
- publishableKey
11126
- }
11127
- ),
11128
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11129
- DepositWithCardButton,
11130
- {
11131
- onClick: () => setView("card"),
11132
- title: t6.depositWithCard.title,
11133
- subtitle: t6.depositWithCard.subtitle,
11134
- paymentNetworks: projectConfig.payment_networks.networks
11135
- }
11136
- ),
11137
- showPayWithExchange && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11138
- PayWithExchangeButton,
11139
- {
11140
- onClick: () => setView("exchange"),
11141
- title: t6.payWithExchange.title,
11142
- subtitle: t6.payWithExchange.subtitle,
11143
- exchanges,
11144
- loading: exchangesLoading
11145
- }
11146
- ),
11147
- !hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11148
- DepositTrackerButton,
11149
- {
11150
- onClick: () => {
11151
- setAllExecutions(depositExecutions);
11152
- setView("tracker");
11153
- },
11154
- title: "Deposit Tracker",
11155
- subtitle: "Track your deposit progress",
11156
- badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
11157
- }
11158
- )
11159
- ] })
11160
- ) })
11218
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11219
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11220
+ TransferCryptoButton,
11221
+ {
11222
+ onClick: () => setView("transfer"),
11223
+ title: t6.transferCrypto.title,
11224
+ subtitle: t6.transferCrypto.subtitle,
11225
+ featuredTokens: projectConfig?.transfer_crypto.networks
11226
+ }
11227
+ ),
11228
+ enableConnectWallet && !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11229
+ BrowserWalletButton,
11230
+ {
11231
+ onClick: handleBrowserWalletClick,
11232
+ onConnectClick: handleWalletConnectClick,
11233
+ onDisconnect: handleWalletDisconnect,
11234
+ chainType: browserWalletChainType,
11235
+ publishableKey
11236
+ }
11237
+ ),
11238
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11239
+ DepositWithCardButton,
11240
+ {
11241
+ onClick: () => setView("card"),
11242
+ title: t6.depositWithCard.title,
11243
+ subtitle: t6.depositWithCard.subtitle,
11244
+ paymentNetworks: projectConfig?.payment_networks.networks
11245
+ }
11246
+ ),
11247
+ showPayWithExchange && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11248
+ PayWithExchangeButton,
11249
+ {
11250
+ onClick: () => setView("exchange"),
11251
+ title: t6.payWithExchange.title,
11252
+ subtitle: t6.payWithExchange.subtitle,
11253
+ exchanges,
11254
+ loading: exchangesLoading
11255
+ }
11256
+ ),
11257
+ !hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11258
+ DepositTrackerButton,
11259
+ {
11260
+ onClick: () => {
11261
+ setAllExecutions(depositExecutions);
11262
+ setView("tracker");
11263
+ },
11264
+ title: "Deposit Tracker",
11265
+ subtitle: "Track your deposit progress",
11266
+ badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
11267
+ }
11268
+ )
11269
+ ] }) })
11161
11270
  ] }) : view === "transfer" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
11162
11271
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11163
11272
  DepositHeader,
11164
11273
  {
11165
11274
  title: t6.transferCrypto.title,
11166
- showBack: true,
11275
+ showBack: showBackTransfer,
11167
11276
  onBack: handleBack,
11168
11277
  onClose: handleClose,
11169
11278
  showBalance: showBalanceHeader,
@@ -11175,7 +11284,7 @@ function DepositModal({
11175
11284
  publishableKey
11176
11285
  }
11177
11286
  ),
11178
- transferInputVariant === "single_input" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11287
+ standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : transferInputVariant === "single_input" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11179
11288
  TransferCryptoSingleInput,
11180
11289
  {
11181
11290
  userId,
@@ -11211,12 +11320,12 @@ function DepositModal({
11211
11320
  DepositHeader,
11212
11321
  {
11213
11322
  title: selectedExecution ? "Deposit Details" : "Deposit Tracker",
11214
- showBack: true,
11323
+ showBack: showBackTracker,
11215
11324
  onBack: handleBack,
11216
11325
  onClose: handleClose
11217
11326
  }
11218
11327
  ),
11219
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-h-[460px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: selectedExecution ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DepositDetailContent, { execution: selectedExecution }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-space-y-2 uf-pb-4", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11328
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-h-[460px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: selectedExecution ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DepositDetailContent, { execution: selectedExecution }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-space-y-2 uf-pb-8", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11220
11329
  "div",
11221
11330
  {
11222
11331
  className: "uf-text-sm",
@@ -11236,7 +11345,7 @@ function DepositModal({
11236
11345
  DepositHeader,
11237
11346
  {
11238
11347
  title: cardView === "quotes" ? t6.quotes : t6.depositWithCard.title,
11239
- showBack: true,
11348
+ showBack: showBackCard,
11240
11349
  onBack: handleBack,
11241
11350
  onClose: handleClose,
11242
11351
  badge: cardView === "quotes" ? { count: quotesCount } : void 0,
@@ -11249,7 +11358,7 @@ function DepositModal({
11249
11358
  publishableKey
11250
11359
  }
11251
11360
  ),
11252
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11361
+ standaloneNeedsDepositPrereq && depositPrerequisiteBody !== null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: depositPrerequisiteBody }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11253
11362
  BuyWithCard,
11254
11363
  {
11255
11364
  userId,