@deframe-sdk/components 0.1.5 → 0.1.7
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.d.mts +672 -1
- package/dist/index.d.ts +672 -1
- package/dist/index.js +1734 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1688 -4
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +415 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,6 +5,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var React6 = require('react');
|
|
6
6
|
var framerMotion = require('framer-motion');
|
|
7
7
|
var md = require('react-icons/md');
|
|
8
|
+
var hi2 = require('react-icons/hi2');
|
|
9
|
+
var io5 = require('react-icons/io5');
|
|
8
10
|
|
|
9
11
|
function _interopNamespace(e) {
|
|
10
12
|
if (e && e.__esModule) return e;
|
|
@@ -1443,6 +1445,130 @@ var SummaryDetails = ({
|
|
|
1443
1445
|
}
|
|
1444
1446
|
);
|
|
1445
1447
|
};
|
|
1448
|
+
var SummaryDetailsCryptoControlV2 = ({
|
|
1449
|
+
title,
|
|
1450
|
+
items,
|
|
1451
|
+
defaultOpen = false,
|
|
1452
|
+
className = "",
|
|
1453
|
+
summaryClassName = "",
|
|
1454
|
+
contentClassName = "",
|
|
1455
|
+
showDividers = true
|
|
1456
|
+
}) => {
|
|
1457
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1458
|
+
"details",
|
|
1459
|
+
{
|
|
1460
|
+
"data-test-id": "summary-details-v2",
|
|
1461
|
+
"data-slot": "summary-details-v2",
|
|
1462
|
+
className: tailwindMerge.twMerge(
|
|
1463
|
+
"bg-[var(--color-bg-subtle,#1a1a1a)] rounded-lg border border-border-default dark:border-border-default-dark p-4 w-full max-w-[320px] group",
|
|
1464
|
+
className
|
|
1465
|
+
),
|
|
1466
|
+
open: defaultOpen,
|
|
1467
|
+
children: [
|
|
1468
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1469
|
+
"summary",
|
|
1470
|
+
{
|
|
1471
|
+
"data-test-id": "summary-details-v2-summary",
|
|
1472
|
+
"data-slot": "summary-details-v2-summary",
|
|
1473
|
+
className: tailwindMerge.twMerge("cursor-pointer list-none", summaryClassName),
|
|
1474
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1475
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1476
|
+
"span",
|
|
1477
|
+
{
|
|
1478
|
+
"data-test-id": "summary-details-v2-title",
|
|
1479
|
+
"data-slot": "summary-details-v2-title",
|
|
1480
|
+
className: "text-[15px] font-semibold text-text-primary dark:text-text-primary-dark",
|
|
1481
|
+
children: title
|
|
1482
|
+
}
|
|
1483
|
+
),
|
|
1484
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1485
|
+
"svg",
|
|
1486
|
+
{
|
|
1487
|
+
"data-test-id": "summary-details-v2-chevron",
|
|
1488
|
+
"data-slot": "summary-details-v2-chevron",
|
|
1489
|
+
className: "w-4 h-4 text-text-secondary dark:text-text-secondary-dark transition-transform duration-300 group-open:rotate-180 flex-shrink-0",
|
|
1490
|
+
viewBox: "0 0 24 24",
|
|
1491
|
+
fill: "none",
|
|
1492
|
+
stroke: "currentColor",
|
|
1493
|
+
"aria-hidden": "true",
|
|
1494
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 9l7 7 7-7" })
|
|
1495
|
+
}
|
|
1496
|
+
)
|
|
1497
|
+
] })
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1501
|
+
"div",
|
|
1502
|
+
{
|
|
1503
|
+
"data-test-id": "summary-details-v2-top-divider",
|
|
1504
|
+
"data-slot": "summary-details-v2-top-divider",
|
|
1505
|
+
className: "h-px bg-border-default dark:bg-border-default-dark mt-3"
|
|
1506
|
+
}
|
|
1507
|
+
),
|
|
1508
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1509
|
+
"div",
|
|
1510
|
+
{
|
|
1511
|
+
"data-test-id": "summary-details-v2-content",
|
|
1512
|
+
"data-slot": "summary-details-v2-content",
|
|
1513
|
+
className: tailwindMerge.twMerge("mt-0", contentClassName),
|
|
1514
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
1515
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1516
|
+
"div",
|
|
1517
|
+
{
|
|
1518
|
+
"data-test-id": "summary-details-v2-row",
|
|
1519
|
+
"data-slot": "summary-details-v2-row",
|
|
1520
|
+
className: "flex justify-between items-center py-[10px] gap-3",
|
|
1521
|
+
children: [
|
|
1522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1523
|
+
"span",
|
|
1524
|
+
{
|
|
1525
|
+
"data-test-id": "summary-details-v2-row-label",
|
|
1526
|
+
"data-slot": "summary-details-v2-row-label",
|
|
1527
|
+
className: tailwindMerge.twMerge(
|
|
1528
|
+
"text-[11px] font-medium uppercase tracking-[0.07em] text-text-tertiary dark:text-text-tertiary-dark flex-shrink-0",
|
|
1529
|
+
item.labelClassName
|
|
1530
|
+
),
|
|
1531
|
+
children: item.label
|
|
1532
|
+
}
|
|
1533
|
+
),
|
|
1534
|
+
typeof item.value === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1535
|
+
"span",
|
|
1536
|
+
{
|
|
1537
|
+
"data-test-id": "summary-details-v2-row-value",
|
|
1538
|
+
"data-slot": "summary-details-v2-row-value",
|
|
1539
|
+
className: tailwindMerge.twMerge(
|
|
1540
|
+
"text-[13px] font-semibold text-text-primary dark:text-text-primary-dark text-right",
|
|
1541
|
+
item.valueClassName
|
|
1542
|
+
),
|
|
1543
|
+
children: item.value
|
|
1544
|
+
}
|
|
1545
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1546
|
+
"div",
|
|
1547
|
+
{
|
|
1548
|
+
"data-test-id": "summary-details-v2-row-value",
|
|
1549
|
+
"data-slot": "summary-details-v2-row-value",
|
|
1550
|
+
className: tailwindMerge.twMerge("text-right", item.valueClassName),
|
|
1551
|
+
children: item.value
|
|
1552
|
+
}
|
|
1553
|
+
)
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
showDividers && i < items.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1558
|
+
"div",
|
|
1559
|
+
{
|
|
1560
|
+
"data-test-id": "summary-details-v2-row-divider",
|
|
1561
|
+
"data-slot": "summary-details-v2-row-divider",
|
|
1562
|
+
className: "h-px bg-border-default dark:bg-border-default-dark"
|
|
1563
|
+
}
|
|
1564
|
+
)
|
|
1565
|
+
] }, i))
|
|
1566
|
+
}
|
|
1567
|
+
)
|
|
1568
|
+
]
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
};
|
|
1446
1572
|
var ActionSheet = ({
|
|
1447
1573
|
id,
|
|
1448
1574
|
currentActionSheetId,
|
|
@@ -1709,30 +1835,1633 @@ function DeframeComponentsProvider({
|
|
|
1709
1835
|
}
|
|
1710
1836
|
);
|
|
1711
1837
|
}
|
|
1838
|
+
var InfoRow = ({ children, borderBottom, className }) => {
|
|
1839
|
+
const baseClasses = "self-stretch inline-flex justify-between items-start";
|
|
1840
|
+
const borderClasses = borderBottom ? "border-b border-border-default dark:border-border-default-dark pb-sm" : "";
|
|
1841
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row", className: tailwindMerge.twMerge(baseClasses, borderClasses, className), children });
|
|
1842
|
+
};
|
|
1843
|
+
var InfoLabel = ({ children, className }) => {
|
|
1844
|
+
const baseClasses = "text-sm text-text-secondary dark:text-text-secondary-dark";
|
|
1845
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-label", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1846
|
+
};
|
|
1847
|
+
var variantClasses = {
|
|
1848
|
+
default: "text-text-primary dark:text-text-primary-dark",
|
|
1849
|
+
success: "text-state-success",
|
|
1850
|
+
warning: "text-state-warning",
|
|
1851
|
+
error: "text-state-error"
|
|
1852
|
+
};
|
|
1853
|
+
var InfoValue = ({ children, variant = "default", className }) => {
|
|
1854
|
+
const baseClasses = "text-sm font-semibold";
|
|
1855
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-value", className: tailwindMerge.twMerge(baseClasses, variantClasses[variant], className), children });
|
|
1856
|
+
};
|
|
1857
|
+
var InfoRowWithIcon = ({ children, borderBottom, className }) => {
|
|
1858
|
+
const baseClasses = "flex items-start justify-between h-[17px]";
|
|
1859
|
+
const borderClasses = borderBottom ? "border-b border-border-default dark:border-border-default-dark pb-sm" : "";
|
|
1860
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-with-icon", className: tailwindMerge.twMerge(baseClasses, borderClasses, className), children });
|
|
1861
|
+
};
|
|
1862
|
+
var InfoRowIconLabel = ({ children, className }) => {
|
|
1863
|
+
const baseClasses = "text-sm text-text-secondary dark:text-text-secondary-dark";
|
|
1864
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "info-row-icon-label", className: tailwindMerge.twMerge(baseClasses, className), children: [
|
|
1865
|
+
"\u2022 ",
|
|
1866
|
+
children
|
|
1867
|
+
] });
|
|
1868
|
+
};
|
|
1869
|
+
var InfoRowIconValue = ({ children, className }) => {
|
|
1870
|
+
const baseClasses = "text-sm font-semibold text-text-primary dark:text-text-primary-dark";
|
|
1871
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-icon-value", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1872
|
+
};
|
|
1873
|
+
var CollapsibleInfoRow = ({
|
|
1874
|
+
label,
|
|
1875
|
+
value,
|
|
1876
|
+
children,
|
|
1877
|
+
defaultOpen = false,
|
|
1878
|
+
className,
|
|
1879
|
+
collapseLabel,
|
|
1880
|
+
expandLabel
|
|
1881
|
+
}) => {
|
|
1882
|
+
const [isOpen, setIsOpen] = React6__namespace.default.useState(defaultOpen);
|
|
1883
|
+
const baseClasses = "flex flex-col gap-sm w-full";
|
|
1884
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "collapsible-info-row", className: tailwindMerge.twMerge(baseClasses, className), children: [
|
|
1885
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1886
|
+
"button",
|
|
1887
|
+
{
|
|
1888
|
+
type: "button",
|
|
1889
|
+
onClick: () => setIsOpen(!isOpen),
|
|
1890
|
+
className: "flex items-start justify-between w-full text-left h-[18px] cursor-pointer",
|
|
1891
|
+
"aria-expanded": isOpen,
|
|
1892
|
+
"aria-label": `${isOpen ? collapseLabel : expandLabel} ${label}`,
|
|
1893
|
+
children: [
|
|
1894
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-[2px]", children: [
|
|
1895
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-sm text-text-secondary dark:text-text-secondary-dark", children: label }),
|
|
1896
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronUp, { className: "w-3 h-3 text-text-secondary dark:text-text-secondary-dark" }) : /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-text-secondary dark:text-text-secondary-dark" }) })
|
|
1897
|
+
] }),
|
|
1898
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-sm font-semibold text-text-secondary dark:text-text-secondary-dark", children: value })
|
|
1899
|
+
]
|
|
1900
|
+
}
|
|
1901
|
+
),
|
|
1902
|
+
isOpen && children
|
|
1903
|
+
] });
|
|
1904
|
+
};
|
|
1905
|
+
var BackgroundContainer = ({ children, className }) => {
|
|
1906
|
+
const baseClasses = "w-full flex-1 min-h-0 px-md bg-bg-default lg:bg-bg-subtle dark:bg-bg-default-dark lg:dark:bg-bg-subtle-dark text-text-primary dark:text-text-primary-dark flex flex-col relative overflow-y-auto";
|
|
1907
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "background-container", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1908
|
+
};
|
|
1909
|
+
var SectionCard = ({ children, className }) => {
|
|
1910
|
+
const baseClasses = "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised rounded shadow-sm p-md flex flex-col gap-sm";
|
|
1911
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "section-card", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1912
|
+
};
|
|
1913
|
+
var Navbar = ({ children, className }) => {
|
|
1914
|
+
const baseClasses = "w-full px-sm pr-md pt-sm pb-md border-b items-center border-border-subtle dark:border-border-subtle-dark flex";
|
|
1915
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "data-test-id": "navbar", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1916
|
+
};
|
|
1917
|
+
var gapClasses = {
|
|
1918
|
+
xs: "gap-xs",
|
|
1919
|
+
sm: "gap-sm",
|
|
1920
|
+
md: "gap-md",
|
|
1921
|
+
lg: "gap-lg"
|
|
1922
|
+
};
|
|
1923
|
+
var FlexCol = ({ children, className, gap = "xs" }) => {
|
|
1924
|
+
const baseClasses = "flex flex-col";
|
|
1925
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-col", className: tailwindMerge.twMerge(baseClasses, gapClasses[gap], className), children });
|
|
1926
|
+
};
|
|
1927
|
+
var gapClasses2 = {
|
|
1928
|
+
xs: "gap-xs",
|
|
1929
|
+
sm: "gap-sm",
|
|
1930
|
+
md: "gap-md",
|
|
1931
|
+
lg: "gap-lg"
|
|
1932
|
+
};
|
|
1933
|
+
var FlexRow = ({ children, className, gap = "xs" }) => {
|
|
1934
|
+
const baseClasses = "flex items-center";
|
|
1935
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-row", className: tailwindMerge.twMerge(baseClasses, gapClasses2[gap], className), children });
|
|
1936
|
+
};
|
|
1937
|
+
var ScrollableContent = ({ children, className }) => {
|
|
1938
|
+
const baseClasses = "flex-1 overflow-y-auto px-md py-lg";
|
|
1939
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "scrollable-content", className: tailwindMerge.twMerge(baseClasses, className), children });
|
|
1940
|
+
};
|
|
1941
|
+
var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
|
|
1942
|
+
const baseClasses = "w-full px-sm pr-md pt-sm pb-md border-b border-border-subtle dark:border-border-subtle-dark flex items-center";
|
|
1943
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "details-header", className: tailwindMerge.twMerge(baseClasses, className), children: [
|
|
1944
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1945
|
+
"button",
|
|
1946
|
+
{
|
|
1947
|
+
"data-test-id": "details-header-back-button",
|
|
1948
|
+
onClick: onBack,
|
|
1949
|
+
className: "w-12 h-12 rounded-full flex items-center justify-center text-text-secondary dark:text-text-secondary-dark hover:text-brand-primary cursor-pointer",
|
|
1950
|
+
"aria-label": backAriaLabel,
|
|
1951
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronLeft, { className: "w-6 h-6 text-text-tertiary dark:text-text-tertiary-dark" })
|
|
1952
|
+
}
|
|
1953
|
+
),
|
|
1954
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { variant: "h-large", children: title }) })
|
|
1955
|
+
] });
|
|
1956
|
+
};
|
|
1957
|
+
var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
|
|
1958
|
+
const baseClasses = "w-12 h-12 rounded-full flex items-center justify-center text-text-secondary dark:text-text-secondary-dark hover:text-brand-primary transition-colors cursor-pointer";
|
|
1959
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1960
|
+
"button",
|
|
1961
|
+
{
|
|
1962
|
+
"data-test-id": testId != null ? testId : "close-button",
|
|
1963
|
+
onClick,
|
|
1964
|
+
className: tailwindMerge.twMerge(baseClasses, className),
|
|
1965
|
+
"aria-label": ariaLabel,
|
|
1966
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiXMark, { className: "w-6 h-6" })
|
|
1967
|
+
}
|
|
1968
|
+
);
|
|
1969
|
+
};
|
|
1970
|
+
var HighRiskBadge = ({ className, label }) => {
|
|
1971
|
+
const baseClasses = "inline-flex justify-start items-start gap-1";
|
|
1972
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "high-risk-badge", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1973
|
+
"div",
|
|
1974
|
+
{
|
|
1975
|
+
"data-size": "Small",
|
|
1976
|
+
"data-type": "Failed",
|
|
1977
|
+
className: "h-6 px-2 py-1 opacity-95 bg-red-500/20 rounded-lg outline outline-1 outline-offset-[-1px] outline-state-error flex justify-center items-center gap-1",
|
|
1978
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-start items-center gap-2.5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "justify-start text-state-error text-xs font-normal font-poppins leading-4", children: label }) })
|
|
1979
|
+
}
|
|
1980
|
+
) });
|
|
1981
|
+
};
|
|
1982
|
+
var MediumRiskBadge = ({ className, label }) => {
|
|
1983
|
+
const baseClasses = "inline-flex justify-start items-start gap-1";
|
|
1984
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "medium-risk-badge", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
|
+
"div",
|
|
1986
|
+
{
|
|
1987
|
+
"data-size": "Small",
|
|
1988
|
+
"data-type": "Warning",
|
|
1989
|
+
className: "h-6 px-2 py-1 opacity-95 bg-amber-500/20 rounded-lg outline outline-1 outline-offset-[-1px] outline-state-warning flex justify-center items-center gap-1",
|
|
1990
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-start items-center gap-2.5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "justify-start text-state-warning text-xs font-normal font-poppins leading-4", children: label }) })
|
|
1991
|
+
}
|
|
1992
|
+
) });
|
|
1993
|
+
};
|
|
1994
|
+
var LowRiskBadge = ({ className, label }) => {
|
|
1995
|
+
const baseClasses = "inline-flex justify-start items-start gap-1";
|
|
1996
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "low-risk-badge", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1997
|
+
"div",
|
|
1998
|
+
{
|
|
1999
|
+
"data-size": "Small",
|
|
2000
|
+
"data-type": "Completed",
|
|
2001
|
+
className: "h-6 px-2 py-1 opacity-95 bg-teal-600/20 rounded-lg outline outline-1 outline-offset-[-1px] outline-state-success flex justify-center items-center gap-1",
|
|
2002
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-start items-center gap-2.5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "justify-start text-state-success text-xs font-normal font-poppins leading-4", children: label }) })
|
|
2003
|
+
}
|
|
2004
|
+
) });
|
|
2005
|
+
};
|
|
2006
|
+
var gapClasses3 = {
|
|
2007
|
+
xs: "gap-xs",
|
|
2008
|
+
sm: "gap-sm",
|
|
2009
|
+
md: "gap-md",
|
|
2010
|
+
lg: "gap-lg"
|
|
2011
|
+
};
|
|
2012
|
+
var HistoryFlexCol = ({ children, className, gap = "xs" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "history-flex-col", className: tailwindMerge.twMerge("flex flex-col", gapClasses3[gap], className), children });
|
|
2013
|
+
var TransactionTypeLabel = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "transaction-type-label", className: "text-text-sm-mobile text-text-secondary dark:text-text-secondary-dark", children });
|
|
2014
|
+
var Amount = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "amount", className: "text-accent-md-mobile text-text-secondary dark:text-text-secondary-dark", children });
|
|
2015
|
+
var AmountInUsd = ({ children }) => /* @__PURE__ */ jsxRuntime.jsxs("p", { "data-test-id": "amount-in-usd", className: "text-text-sm-mobile text-text-secondary dark:text-text-secondary-dark", children: [
|
|
2016
|
+
"~ ",
|
|
2017
|
+
children
|
|
2018
|
+
] });
|
|
2019
|
+
var TokenIcon = ({ src, alt }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2020
|
+
"img",
|
|
2021
|
+
{
|
|
2022
|
+
"data-test-id": "token-icon",
|
|
2023
|
+
src,
|
|
2024
|
+
alt,
|
|
2025
|
+
className: "w-8 h-8 rounded-full",
|
|
2026
|
+
onError: (e) => {
|
|
2027
|
+
const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
|
|
2028
|
+
e.target.src = `https://placehold.co/40x40?text=${fallbackText}`;
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
);
|
|
2032
|
+
var SuccessBadge = ({ children }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "success-badge", className: "bg-[rgba(43,161,118,0.12)] flex items-center gap-xs px-[8px] py-[2px] rounded-[24px]", children: [
|
|
2033
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-2 h-2 rounded-full bg-state-success" }),
|
|
2034
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-sm-mobile text-text-primary dark:text-text-primary-dark", children })
|
|
2035
|
+
] });
|
|
2036
|
+
var truncateHash = (hash, chars = 6) => {
|
|
2037
|
+
if (hash.length <= chars * 2 + 3) return hash;
|
|
2038
|
+
return `${hash.slice(0, chars + 2)}...${hash.slice(-chars)}`;
|
|
2039
|
+
};
|
|
2040
|
+
var TransactionId = ({ hash }) => {
|
|
2041
|
+
if (!hash) {
|
|
2042
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-test-id": "transaction-id", className: "text-text-sm-mobile text-text-primary dark:text-text-primary-dark", children: "-" });
|
|
2043
|
+
}
|
|
2044
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "transaction-id", className: "flex items-center gap-xs", children: [
|
|
2045
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-sm-mobile text-text-primary dark:text-text-primary-dark", children: truncateHash(hash) }),
|
|
2046
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2047
|
+
AddressDisplay,
|
|
2048
|
+
{
|
|
2049
|
+
address: hash,
|
|
2050
|
+
className: "border-none bg-transparent p-0 gap-0",
|
|
2051
|
+
textClassName: "hidden"
|
|
2052
|
+
}
|
|
2053
|
+
)
|
|
2054
|
+
] });
|
|
2055
|
+
};
|
|
2056
|
+
var ExplorerLink = ({ href, children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2057
|
+
"a",
|
|
2058
|
+
{
|
|
2059
|
+
"data-test-id": "explorer-link",
|
|
2060
|
+
href,
|
|
2061
|
+
target: "_blank",
|
|
2062
|
+
rel: "noopener noreferrer",
|
|
2063
|
+
className: "text-brand-primary underline text-sm font-semibold font-poppins",
|
|
2064
|
+
children
|
|
2065
|
+
}
|
|
2066
|
+
);
|
|
2067
|
+
var TwoLineValue = ({ primary, secondary }) => /* @__PURE__ */ jsxRuntime.jsxs(HistoryFlexCol, { className: "items-end", children: [
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "two-line-value-primary", className: "text-text-sm-mobile text-text-secondary dark:text-text-secondary-dark font-semibold", children: primary }),
|
|
2069
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "two-line-value-secondary", className: "text-text-sm-mobile text-text-secondary dark:text-text-secondary-dark", children: secondary })
|
|
2070
|
+
] });
|
|
2071
|
+
var HistoryDepositDetailsView = ({
|
|
2072
|
+
transactionTypeLabel,
|
|
2073
|
+
symbol,
|
|
2074
|
+
amountWithSymbol,
|
|
2075
|
+
amountInUsdFormatted,
|
|
2076
|
+
shouldShowFlow,
|
|
2077
|
+
assetIn,
|
|
2078
|
+
assetOut,
|
|
2079
|
+
primaryAssetIconUrl,
|
|
2080
|
+
protocolLabel,
|
|
2081
|
+
statusLabel,
|
|
2082
|
+
txHash,
|
|
2083
|
+
date,
|
|
2084
|
+
explorerUrl,
|
|
2085
|
+
onClose,
|
|
2086
|
+
labels
|
|
2087
|
+
}) => {
|
|
2088
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { children: [
|
|
2089
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailsHeader, { title: labels.transactionDetailsTitle, onBack: onClose }),
|
|
2090
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollableContent, { children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "lg", children: [
|
|
2091
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[24px]", children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "xs", children: [
|
|
2092
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionTypeLabel, { children: transactionTypeLabel }),
|
|
2093
|
+
shouldShowFlow && assetIn && assetOut ? /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "sm", children: [
|
|
2094
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2095
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: assetIn.iconUrl, alt: assetIn.symbol }),
|
|
2096
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { children: [
|
|
2097
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Amount, { children: [
|
|
2098
|
+
assetIn.amount,
|
|
2099
|
+
" ",
|
|
2100
|
+
assetIn.symbol
|
|
2101
|
+
] }),
|
|
2102
|
+
assetIn.amountInUSD ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: assetIn.amountInUSD }) : null
|
|
2103
|
+
] })
|
|
2104
|
+
] }),
|
|
2105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2106
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: assetOut.iconUrl, alt: assetOut.symbol }),
|
|
2107
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { children: [
|
|
2108
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Amount, { children: [
|
|
2109
|
+
assetOut.amount,
|
|
2110
|
+
" ",
|
|
2111
|
+
assetOut.symbol
|
|
2112
|
+
] }),
|
|
2113
|
+
assetOut.amountInUSD ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: assetOut.amountInUSD }) : null
|
|
2114
|
+
] })
|
|
2115
|
+
] })
|
|
2116
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2117
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: primaryAssetIconUrl, alt: symbol }),
|
|
2118
|
+
/* @__PURE__ */ jsxRuntime.jsx(FlexCol, { children: /* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "xs", children: [
|
|
2119
|
+
/* @__PURE__ */ jsxRuntime.jsx(Amount, { children: amountWithSymbol }),
|
|
2120
|
+
amountInUsdFormatted !== "-" ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: amountInUsdFormatted }) : null
|
|
2121
|
+
] }) })
|
|
2122
|
+
] })
|
|
2123
|
+
] }) }),
|
|
2124
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-md", children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "sm", children: [
|
|
2125
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2126
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.currencyLabel }),
|
|
2127
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: symbol })
|
|
2128
|
+
] }),
|
|
2129
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2130
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.totalAmountLabel }),
|
|
2131
|
+
/* @__PURE__ */ jsxRuntime.jsx(TwoLineValue, { primary: amountInUsdFormatted, secondary: amountWithSymbol })
|
|
2132
|
+
] }),
|
|
2133
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2134
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.operationCostLabel }),
|
|
2135
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: labels.operationCostSponsoredLabel })
|
|
2136
|
+
] }),
|
|
2137
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2138
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.protocolLabel }),
|
|
2139
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: protocolLabel })
|
|
2140
|
+
] }),
|
|
2141
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2142
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.statusLabel }),
|
|
2143
|
+
/* @__PURE__ */ jsxRuntime.jsx(SuccessBadge, { children: statusLabel })
|
|
2144
|
+
] }),
|
|
2145
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2146
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.transactionIdLabel }),
|
|
2147
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionId, { hash: txHash })
|
|
2148
|
+
] }),
|
|
2149
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2150
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.dateLabel }),
|
|
2151
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: date })
|
|
2152
|
+
] }),
|
|
2153
|
+
explorerUrl && /* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { children: [
|
|
2154
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.transactionLabel }),
|
|
2155
|
+
/* @__PURE__ */ jsxRuntime.jsx(ExplorerLink, { href: explorerUrl, children: labels.viewOnExplorerLabel })
|
|
2156
|
+
] })
|
|
2157
|
+
] }) })
|
|
2158
|
+
] }) })
|
|
2159
|
+
] });
|
|
2160
|
+
};
|
|
2161
|
+
var HistoryWithdrawDetailsView = ({
|
|
2162
|
+
transactionTypeLabel,
|
|
2163
|
+
symbol,
|
|
2164
|
+
amountWithSymbol,
|
|
2165
|
+
amountInUsdFormatted,
|
|
2166
|
+
shouldShowFlow,
|
|
2167
|
+
assetIn,
|
|
2168
|
+
assetOut,
|
|
2169
|
+
primaryAssetIconUrl,
|
|
2170
|
+
protocolLabel,
|
|
2171
|
+
statusLabel,
|
|
2172
|
+
txHash,
|
|
2173
|
+
date,
|
|
2174
|
+
explorerUrl,
|
|
2175
|
+
onClose,
|
|
2176
|
+
labels
|
|
2177
|
+
}) => {
|
|
2178
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { children: [
|
|
2179
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailsHeader, { title: labels.transactionDetailsTitle, onBack: onClose }),
|
|
2180
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollableContent, { children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "lg", children: [
|
|
2181
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[24px]", children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "xs", children: [
|
|
2182
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionTypeLabel, { children: transactionTypeLabel }),
|
|
2183
|
+
shouldShowFlow && assetIn && assetOut ? /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "sm", children: [
|
|
2184
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2185
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: assetIn.iconUrl, alt: assetIn.symbol }),
|
|
2186
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { children: [
|
|
2187
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Amount, { children: [
|
|
2188
|
+
assetIn.amount,
|
|
2189
|
+
" ",
|
|
2190
|
+
assetIn.symbol
|
|
2191
|
+
] }),
|
|
2192
|
+
assetIn.amountInUSD ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: assetIn.amountInUSD }) : null
|
|
2193
|
+
] })
|
|
2194
|
+
] }),
|
|
2195
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2196
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: assetOut.iconUrl, alt: assetOut.symbol }),
|
|
2197
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { children: [
|
|
2198
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Amount, { children: [
|
|
2199
|
+
assetOut.amount,
|
|
2200
|
+
" ",
|
|
2201
|
+
assetOut.symbol
|
|
2202
|
+
] }),
|
|
2203
|
+
assetOut.amountInUSD ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: assetOut.amountInUSD }) : null
|
|
2204
|
+
] })
|
|
2205
|
+
] })
|
|
2206
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "sm", children: [
|
|
2207
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { src: primaryAssetIconUrl, alt: symbol }),
|
|
2208
|
+
/* @__PURE__ */ jsxRuntime.jsx(FlexCol, { children: /* @__PURE__ */ jsxRuntime.jsxs(FlexRow, { gap: "xs", children: [
|
|
2209
|
+
/* @__PURE__ */ jsxRuntime.jsx(Amount, { children: amountWithSymbol }),
|
|
2210
|
+
amountInUsdFormatted !== "-" ? /* @__PURE__ */ jsxRuntime.jsx(AmountInUsd, { children: amountInUsdFormatted }) : null
|
|
2211
|
+
] }) })
|
|
2212
|
+
] })
|
|
2213
|
+
] }) }),
|
|
2214
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-md", children: /* @__PURE__ */ jsxRuntime.jsxs(FlexCol, { gap: "sm", children: [
|
|
2215
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2216
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.currencyLabel }),
|
|
2217
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: symbol })
|
|
2218
|
+
] }),
|
|
2219
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2220
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.totalAmountLabel }),
|
|
2221
|
+
/* @__PURE__ */ jsxRuntime.jsx(TwoLineValue, { primary: amountInUsdFormatted, secondary: amountWithSymbol })
|
|
2222
|
+
] }),
|
|
2223
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2224
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.operationCostLabel }),
|
|
2225
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: labels.operationCostSponsoredLabel })
|
|
2226
|
+
] }),
|
|
2227
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2228
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.protocolLabel }),
|
|
2229
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: protocolLabel })
|
|
2230
|
+
] }),
|
|
2231
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2232
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.statusLabel }),
|
|
2233
|
+
/* @__PURE__ */ jsxRuntime.jsx(SuccessBadge, { children: statusLabel })
|
|
2234
|
+
] }),
|
|
2235
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2236
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.transactionIdLabel }),
|
|
2237
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionId, { hash: txHash })
|
|
2238
|
+
] }),
|
|
2239
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { borderBottom: true, children: [
|
|
2240
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.dateLabel }),
|
|
2241
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoValue, { children: date })
|
|
2242
|
+
] }),
|
|
2243
|
+
explorerUrl && /* @__PURE__ */ jsxRuntime.jsxs(InfoRow, { children: [
|
|
2244
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoLabel, { children: labels.transactionLabel }),
|
|
2245
|
+
/* @__PURE__ */ jsxRuntime.jsx(ExplorerLink, { href: explorerUrl, children: labels.viewOnExplorerLabel })
|
|
2246
|
+
] })
|
|
2247
|
+
] }) })
|
|
2248
|
+
] }) })
|
|
2249
|
+
] });
|
|
2250
|
+
};
|
|
2251
|
+
var SwapNetworkSelectorView = ({
|
|
2252
|
+
chainLabel,
|
|
2253
|
+
chainImage,
|
|
2254
|
+
onClick,
|
|
2255
|
+
directionLabel = "De",
|
|
2256
|
+
testId = "swap-network-selector",
|
|
2257
|
+
className
|
|
2258
|
+
}) => {
|
|
2259
|
+
const baseClasses = "flex flex-row items-center gap-xs";
|
|
2260
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": testId, className: tailwindMerge.twMerge(baseClasses, className), children: [
|
|
2261
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", variant: "text-small", className: "tracking-wide text-text-tertiary dark:text-text-tertiary-dark", children: directionLabel }),
|
|
2262
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2263
|
+
"button",
|
|
2264
|
+
{
|
|
2265
|
+
"data-testid": testId,
|
|
2266
|
+
type: "button",
|
|
2267
|
+
onClick,
|
|
2268
|
+
className: "ml-6 bg-bg-muted dark:bg-bg-muted-dark border border-border-subtle dark:border-border-subtle-dark rounded-lg flex items-center gap-xs px-sm py-xs hover:border-border-default dark:hover:border-border-default-dark transition-colors text-text-sm text-text-secondary dark:text-text-secondary-dark cursor-pointer",
|
|
2269
|
+
"aria-label": `${directionLabel} ${chainLabel}`,
|
|
2270
|
+
children: [
|
|
2271
|
+
chainImage ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: chainImage, alt: chainLabel, className: "w-3 h-3 rounded-full" }) : null,
|
|
2272
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: chainLabel }),
|
|
2273
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-text-tertiary dark:text-text-tertiary-dark" }) })
|
|
2274
|
+
]
|
|
2275
|
+
}
|
|
2276
|
+
)
|
|
2277
|
+
] });
|
|
2278
|
+
};
|
|
2279
|
+
var SwapQuoteHeaderView = ({
|
|
2280
|
+
label,
|
|
2281
|
+
timerElement,
|
|
2282
|
+
className
|
|
2283
|
+
}) => {
|
|
2284
|
+
const baseClasses = "border-b border-border-default dark:border-border-default-dark pb-sm";
|
|
2285
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2286
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", variant: "text-small", className: "font-semibold text-text-secondary dark:text-text-secondary-dark inline-flex items-center", children: label }),
|
|
2287
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-md", children: timerElement })
|
|
2288
|
+
] }) });
|
|
2289
|
+
};
|
|
2290
|
+
var SwapAmountInputView = ({
|
|
2291
|
+
value,
|
|
2292
|
+
hasError,
|
|
2293
|
+
onChange,
|
|
2294
|
+
maxFractionDigits = 6,
|
|
2295
|
+
field,
|
|
2296
|
+
ariaLabel = "Amount to swap",
|
|
2297
|
+
className
|
|
2298
|
+
}) => {
|
|
2299
|
+
const normalizeAmountInput = (raw) => {
|
|
2300
|
+
let val = raw.replace(/[^\d.,]/g, "");
|
|
2301
|
+
const endsWithSeparator = /[.,]$/.test(val);
|
|
2302
|
+
val = val.replace(/,/g, ".");
|
|
2303
|
+
const firstDot = val.indexOf(".");
|
|
2304
|
+
if (firstDot !== -1) {
|
|
2305
|
+
const intPart = val.slice(0, firstDot);
|
|
2306
|
+
const fractional = val.slice(firstDot + 1).replace(/\./g, "").slice(0, maxFractionDigits);
|
|
2307
|
+
if (fractional.length > 0) {
|
|
2308
|
+
val = `${intPart}.${fractional}`;
|
|
2309
|
+
} else {
|
|
2310
|
+
val = endsWithSeparator ? `${intPart}.` : intPart;
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
if (val.startsWith(".")) {
|
|
2314
|
+
val = `0${val}`;
|
|
2315
|
+
}
|
|
2316
|
+
return val;
|
|
2317
|
+
};
|
|
2318
|
+
const baseClasses = "text-h2-mobile font-extrabold bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-text-disabled dark:placeholder:text-text-disabled-dark";
|
|
2319
|
+
const colorClasses = hasError ? "text-state-error dark:text-state-error" : "text-text-primary dark:text-text-primary-dark";
|
|
2320
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2321
|
+
"input",
|
|
2322
|
+
__spreadProps(__spreadValues({
|
|
2323
|
+
"data-test-id": "swap-flow-amount-input",
|
|
2324
|
+
placeholder: "0.00",
|
|
2325
|
+
type: "text",
|
|
2326
|
+
inputMode: "decimal",
|
|
2327
|
+
autoComplete: "off",
|
|
2328
|
+
"aria-label": ariaLabel,
|
|
2329
|
+
min: "0",
|
|
2330
|
+
step: "any",
|
|
2331
|
+
value,
|
|
2332
|
+
className: tailwindMerge.twMerge(baseClasses, colorClasses, className)
|
|
2333
|
+
}, field), {
|
|
2334
|
+
onChange: (event) => {
|
|
2335
|
+
let normalized = normalizeAmountInput(event.target.value);
|
|
2336
|
+
if (normalized && parseFloat(normalized) < 0) {
|
|
2337
|
+
normalized = "0";
|
|
2338
|
+
}
|
|
2339
|
+
onChange(normalized);
|
|
2340
|
+
},
|
|
2341
|
+
onWheel: (event) => {
|
|
2342
|
+
event.currentTarget.blur();
|
|
2343
|
+
}
|
|
2344
|
+
})
|
|
2345
|
+
);
|
|
2346
|
+
};
|
|
2347
|
+
var SwapOutputAmountView = ({
|
|
2348
|
+
displayOutput,
|
|
2349
|
+
isLoading,
|
|
2350
|
+
loadingElement,
|
|
2351
|
+
searchingQuoteLabel = "Searching quote...",
|
|
2352
|
+
className
|
|
2353
|
+
}) => {
|
|
2354
|
+
const baseClasses = "text-h2-mobile font-extrabold text-right w-full min-w-[120px] text-text-primary dark:text-text-primary-dark";
|
|
2355
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-flow-output-amount", className: tailwindMerge.twMerge(baseClasses, className), children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", variant: "text-small", className: "text-text-disabled dark:text-text-disabled-dark inline-flex items-center", children: loadingElement != null ? loadingElement : searchingQuoteLabel }) : displayOutput });
|
|
2356
|
+
};
|
|
2357
|
+
var SwapQuoteErrorsView = ({
|
|
2358
|
+
hasQuoteError,
|
|
2359
|
+
hasBytecodeError,
|
|
2360
|
+
quoteErrorMessage = "Unable to get quote for this transaction",
|
|
2361
|
+
bytecodeErrorMessage = "Error building transaction"
|
|
2362
|
+
}) => {
|
|
2363
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "swap-quote-errors", children: [
|
|
2364
|
+
hasQuoteError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2365
|
+
BannerNotification,
|
|
2366
|
+
{
|
|
2367
|
+
type: "inline",
|
|
2368
|
+
variant: "error",
|
|
2369
|
+
message: quoteErrorMessage
|
|
2370
|
+
}
|
|
2371
|
+
) }),
|
|
2372
|
+
hasBytecodeError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2373
|
+
BannerNotification,
|
|
2374
|
+
{
|
|
2375
|
+
type: "inline",
|
|
2376
|
+
variant: "error",
|
|
2377
|
+
message: bytecodeErrorMessage
|
|
2378
|
+
}
|
|
2379
|
+
) })
|
|
2380
|
+
] });
|
|
2381
|
+
};
|
|
2382
|
+
var SLIPPAGE_OPTIONS = [10, 50, 100];
|
|
2383
|
+
var SwapSlippageToleranceButtonsView = ({
|
|
2384
|
+
slippageBps,
|
|
2385
|
+
onSelect,
|
|
2386
|
+
formatPercentage,
|
|
2387
|
+
className
|
|
2388
|
+
}) => {
|
|
2389
|
+
const baseClasses = "flex gap-xs";
|
|
2390
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-slippage-tolerance-buttons", className: tailwindMerge.twMerge(baseClasses, className), children: SLIPPAGE_OPTIONS.map((option) => {
|
|
2391
|
+
const isActive = slippageBps === option;
|
|
2392
|
+
const activeClasses = "border-brand-primary text-brand-primary bg-brand-tint dark:bg-brand-tint-dark";
|
|
2393
|
+
const inactiveClasses = "border-border-subtle dark:border-border-subtle-dark text-text-secondary dark:text-text-secondary-dark bg-bg-default dark:bg-bg-default-dark";
|
|
2394
|
+
const buttonBase = "px-sm py-xs rounded border text-text-sm cursor-pointer";
|
|
2395
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2396
|
+
"button",
|
|
2397
|
+
{
|
|
2398
|
+
"data-test-id": `slippage-option-${option}`,
|
|
2399
|
+
type: "button",
|
|
2400
|
+
onClick: () => onSelect(option),
|
|
2401
|
+
className: tailwindMerge.twMerge(buttonBase, isActive ? activeClasses : inactiveClasses),
|
|
2402
|
+
"aria-label": `${formatPercentage(option)}% slippage`,
|
|
2403
|
+
"aria-pressed": isActive,
|
|
2404
|
+
children: [
|
|
2405
|
+
formatPercentage(option),
|
|
2406
|
+
"%"
|
|
2407
|
+
]
|
|
2408
|
+
},
|
|
2409
|
+
option
|
|
2410
|
+
);
|
|
2411
|
+
}) });
|
|
2412
|
+
};
|
|
2413
|
+
var SwapTokenSelectorView = ({
|
|
2414
|
+
token,
|
|
2415
|
+
onClick,
|
|
2416
|
+
testId = "swap-token-selector",
|
|
2417
|
+
selectTokenLabel = "Select token",
|
|
2418
|
+
className
|
|
2419
|
+
}) => {
|
|
2420
|
+
const baseClasses = "h-[56px] border border-border-default dark:border-border-default-dark rounded overflow-hidden hover:border-border-strong dark:hover:border-border-strong-dark transition-colors flex items-center px-sm py-[6px] w-full cursor-pointer";
|
|
2421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2422
|
+
"button",
|
|
2423
|
+
{
|
|
2424
|
+
"data-test-id": testId,
|
|
2425
|
+
type: "button",
|
|
2426
|
+
onClick,
|
|
2427
|
+
className: tailwindMerge.twMerge(baseClasses, className),
|
|
2428
|
+
"aria-label": token ? token.symbol : selectTokenLabel,
|
|
2429
|
+
children: [
|
|
2430
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-sm flex-1", children: token ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2431
|
+
token.logoURI ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: token.logoURI, alt: token.symbol, className: "w-6 h-6 rounded-full" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-bg-raised dark:bg-bg-raised-dark text-text-secondary dark:text-text-secondary-dark flex items-center justify-center text-[10px] font-semibold", children: (token.symbol || "").slice(0, 3).toUpperCase() }),
|
|
2432
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", className: "text-text-primary dark:text-text-primary-dark", children: token.symbol })
|
|
2433
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", className: "text-text-secondary dark:text-text-secondary-dark", children: selectTokenLabel }) }),
|
|
2434
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-text-tertiary dark:text-text-tertiary-dark" }) })
|
|
2435
|
+
]
|
|
2436
|
+
}
|
|
2437
|
+
);
|
|
2438
|
+
};
|
|
2439
|
+
var SwapQuoteBlockchainCostsView = ({
|
|
2440
|
+
totalCostFormatted,
|
|
2441
|
+
feePercentage,
|
|
2442
|
+
gasCostFormatted,
|
|
2443
|
+
protocolFee,
|
|
2444
|
+
blockchainCostsLabel = "Blockchain Costs",
|
|
2445
|
+
networkGasLabel = "Network Gas",
|
|
2446
|
+
protocolFeeLabel = "Protocol Fee",
|
|
2447
|
+
collapseLabel = "Collapse",
|
|
2448
|
+
expandLabel = "Expand"
|
|
2449
|
+
}) => {
|
|
2450
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-blockchain-costs", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2451
|
+
CollapsibleInfoRow,
|
|
2452
|
+
{
|
|
2453
|
+
label: blockchainCostsLabel,
|
|
2454
|
+
value: `${totalCostFormatted} ~ ${feePercentage}%`,
|
|
2455
|
+
defaultOpen: true,
|
|
2456
|
+
collapseLabel,
|
|
2457
|
+
expandLabel,
|
|
2458
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-sm", children: [
|
|
2459
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { children: [
|
|
2460
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: networkGasLabel }),
|
|
2461
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: gasCostFormatted })
|
|
2462
|
+
] }),
|
|
2463
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { borderBottom: true, children: [
|
|
2464
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: protocolFeeLabel }),
|
|
2465
|
+
/* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: protocolFee })
|
|
2466
|
+
] })
|
|
2467
|
+
] })
|
|
2468
|
+
}
|
|
2469
|
+
) });
|
|
2470
|
+
};
|
|
2471
|
+
var ChooseAStrategyActionsheetView = ({
|
|
2472
|
+
isOpen,
|
|
2473
|
+
currentActionSheetId,
|
|
2474
|
+
assetName,
|
|
2475
|
+
apy,
|
|
2476
|
+
logoUrl,
|
|
2477
|
+
riskLevel,
|
|
2478
|
+
onStrategyClick,
|
|
2479
|
+
onClose,
|
|
2480
|
+
yieldLabel,
|
|
2481
|
+
apyLabel = "APY",
|
|
2482
|
+
riskBadgeLabels,
|
|
2483
|
+
closeAriaLabel = "Close"
|
|
2484
|
+
}) => {
|
|
2485
|
+
const resolvedYieldLabel = yieldLabel != null ? yieldLabel : `Yield ${assetName}`;
|
|
2486
|
+
const badges = {
|
|
2487
|
+
low: /* @__PURE__ */ jsxRuntime.jsx(LowRiskBadge, { label: riskBadgeLabels.low }),
|
|
2488
|
+
medium: /* @__PURE__ */ jsxRuntime.jsx(MediumRiskBadge, { label: riskBadgeLabels.medium }),
|
|
2489
|
+
high: /* @__PURE__ */ jsxRuntime.jsx(HighRiskBadge, { label: riskBadgeLabels.high })
|
|
2490
|
+
};
|
|
2491
|
+
const Badge = badges[riskLevel];
|
|
2492
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "choose-strategy-actionsheet", className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2493
|
+
ActionSheet,
|
|
2494
|
+
{
|
|
2495
|
+
id: "choose-strategy",
|
|
2496
|
+
currentActionSheetId,
|
|
2497
|
+
isOpen,
|
|
2498
|
+
onClose,
|
|
2499
|
+
position: "bottom",
|
|
2500
|
+
height: "full",
|
|
2501
|
+
contentClassName: "w-full max-w-[620px] mx-auto",
|
|
2502
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
|
|
2503
|
+
/* @__PURE__ */ jsxRuntime.jsx(Navbar, { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, ariaLabel: closeAriaLabel }) }),
|
|
2504
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 w-full p-6 overflow-hidden", children: [
|
|
2505
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0", children: [
|
|
2506
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { children: resolvedYieldLabel }),
|
|
2507
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {})
|
|
2508
|
+
] }),
|
|
2509
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 w-full mt-4 overflow-y-auto flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsxs(ListItem, { className: "flex-shrink-0", onClick: onStrategyClick, children: [
|
|
2510
|
+
/* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: assetName, className: "w-10 h-10 rounded-full" }) }),
|
|
2511
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { className: "gap-1", children: [
|
|
2512
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { children: resolvedYieldLabel }),
|
|
2513
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: Badge })
|
|
2514
|
+
] }),
|
|
2515
|
+
/* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-center items-center gap-1", children: [
|
|
2516
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-state-success", children: [
|
|
2517
|
+
apy,
|
|
2518
|
+
"% ",
|
|
2519
|
+
apyLabel
|
|
2520
|
+
] }),
|
|
2521
|
+
/* @__PURE__ */ jsxRuntime.jsx(hi2.HiArrowRight, { className: "w-4 h-4" })
|
|
2522
|
+
] }) })
|
|
2523
|
+
] }) })
|
|
2524
|
+
] })
|
|
2525
|
+
] })
|
|
2526
|
+
}
|
|
2527
|
+
) });
|
|
2528
|
+
};
|
|
2529
|
+
var StrategyDetailsView = ({
|
|
2530
|
+
logoUrl,
|
|
2531
|
+
title,
|
|
2532
|
+
description,
|
|
2533
|
+
strategyInfo,
|
|
2534
|
+
onBack,
|
|
2535
|
+
onDeposit,
|
|
2536
|
+
headerTitle = "Details",
|
|
2537
|
+
strategyInfoTitle = "Strategy Info",
|
|
2538
|
+
depositButtonLabel = "Deposit",
|
|
2539
|
+
backAriaLabel = "Back"
|
|
2540
|
+
}) => {
|
|
2541
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { children: [
|
|
2542
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailsHeader, { title: headerTitle, onBack, backAriaLabel }),
|
|
2543
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "strategy-details-content", className: "flex-1 min-h-0 overflow-y-auto p-md py-lg pb-24", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-lg min-h-full", children: [
|
|
2544
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col items-start gap-sm", children: [
|
|
2545
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { "data-test-id": "strategy-logo", src: logoUrl, alt: title, className: "w-20 h-20 rounded-full" }),
|
|
2546
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { variant: "h5", children: title })
|
|
2547
|
+
] }),
|
|
2548
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: description }),
|
|
2549
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2550
|
+
SummaryDetails,
|
|
2551
|
+
{
|
|
2552
|
+
title: strategyInfoTitle,
|
|
2553
|
+
items: strategyInfo,
|
|
2554
|
+
defaultOpen: true,
|
|
2555
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised"
|
|
2556
|
+
}
|
|
2557
|
+
)
|
|
2558
|
+
] }) }),
|
|
2559
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "strategy-details-footer", className: "sticky bottom-0 left-0 right-0 border-t border-border-subtle dark:border-border-subtle-dark px-md py-md", children: /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onDeposit, className: "w-full", children: depositButtonLabel }) })
|
|
2560
|
+
] });
|
|
2561
|
+
};
|
|
2562
|
+
var ProgressIndicator = ({
|
|
2563
|
+
progress,
|
|
2564
|
+
className = ""
|
|
2565
|
+
}) => {
|
|
2566
|
+
const clampedProgress = Math.min(100, Math.max(0, progress));
|
|
2567
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `relative h-[12px] w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute left-0 right-0 top-1/2 -translate-y-1/2 flex items-center", children: [
|
|
2568
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2569
|
+
"div",
|
|
2570
|
+
{
|
|
2571
|
+
className: "h-[4px] bg-brand-primary rounded-lg transition-all duration-300",
|
|
2572
|
+
style: { width: `${clampedProgress}%` }
|
|
2573
|
+
}
|
|
2574
|
+
),
|
|
2575
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-[4px] bg-bg-muted dark:bg-bg-muted-dark rounded-lg ml-1" })
|
|
2576
|
+
] }) });
|
|
2577
|
+
};
|
|
2578
|
+
var LoadingDots = ({ className = "" }) => {
|
|
2579
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `flex gap-0.5 ${className}`, children: [
|
|
2580
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "0ms", animationDuration: "1.4s" }, children: "." }),
|
|
2581
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "200ms", animationDuration: "1.4s" }, children: "." }),
|
|
2582
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-bounce", style: { animationDelay: "400ms", animationDuration: "1.4s" }, children: "." })
|
|
2583
|
+
] });
|
|
2584
|
+
};
|
|
2585
|
+
var SearchInput = ({
|
|
2586
|
+
placeholder = "Search",
|
|
2587
|
+
value: controlledValue,
|
|
2588
|
+
disabled = false,
|
|
2589
|
+
onChange,
|
|
2590
|
+
onSearch,
|
|
2591
|
+
className = "",
|
|
2592
|
+
inputClassName,
|
|
2593
|
+
autoFocus = false,
|
|
2594
|
+
containerTestId,
|
|
2595
|
+
inputTestId
|
|
2596
|
+
}) => {
|
|
2597
|
+
const [internalValue, setInternalValue] = React6.useState(controlledValue || "");
|
|
2598
|
+
React6.useEffect(() => {
|
|
2599
|
+
if (controlledValue !== void 0) {
|
|
2600
|
+
setInternalValue(controlledValue);
|
|
2601
|
+
}
|
|
2602
|
+
}, [controlledValue]);
|
|
2603
|
+
const handleInputChange = (newValue) => {
|
|
2604
|
+
setInternalValue(newValue);
|
|
2605
|
+
onChange == null ? void 0 : onChange(newValue);
|
|
2606
|
+
onSearch == null ? void 0 : onSearch(newValue);
|
|
2607
|
+
};
|
|
2608
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 flex items-center relative ${className}`, "data-testid": containerTestId, children: [
|
|
2609
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2610
|
+
"input",
|
|
2611
|
+
{
|
|
2612
|
+
"data-testid": inputTestId,
|
|
2613
|
+
type: "text",
|
|
2614
|
+
value: internalValue,
|
|
2615
|
+
placeholder,
|
|
2616
|
+
disabled,
|
|
2617
|
+
autoFocus,
|
|
2618
|
+
onChange: (e) => handleInputChange(e.target.value),
|
|
2619
|
+
className: [
|
|
2620
|
+
"w-full h-full rounded p-4 pr-12 leading-normal tracking-wide",
|
|
2621
|
+
!inputClassName ? "bg-bg-subtle dark:bg-bg-subtle-dark" : "",
|
|
2622
|
+
"placeholder:text-text-disabled dark:placeholder:text-text-disabled-dark text-text-primary dark:text-text-primary-dark",
|
|
2623
|
+
"focus:outline-none focus:ring-2 focus:ring-brand-primary",
|
|
2624
|
+
disabled ? "cursor-not-allowed opacity-50" : "",
|
|
2625
|
+
inputClassName || ""
|
|
2626
|
+
].filter(Boolean).join(" ")
|
|
2627
|
+
}
|
|
2628
|
+
),
|
|
2629
|
+
/* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSearch, { className: "w-4 h-4 text-text-secondary absolute right-4" })
|
|
2630
|
+
] });
|
|
2631
|
+
};
|
|
2632
|
+
var SearchEmptyState = ({
|
|
2633
|
+
title,
|
|
2634
|
+
description
|
|
2635
|
+
}) => {
|
|
2636
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col justify-center items-center gap-sm h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col justify-center items-center gap-md py-20", children: [
|
|
2637
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center items-center gap-md text-center", children: [
|
|
2638
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-bg-muted dark:bg-bg-muted-dark rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSearchOff, { className: "w-10 h-10 text-text-tertiary dark:text-text-tertiary-dark" }) }),
|
|
2639
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { variant: "h3", children: title })
|
|
2640
|
+
] }),
|
|
2641
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: description }) })
|
|
2642
|
+
] }) });
|
|
2643
|
+
};
|
|
2644
|
+
var CollapsibleSection = ({
|
|
2645
|
+
title,
|
|
2646
|
+
subtitle,
|
|
2647
|
+
children,
|
|
2648
|
+
defaultOpen = false,
|
|
2649
|
+
open: controlledOpen,
|
|
2650
|
+
onOpenChange,
|
|
2651
|
+
className = "",
|
|
2652
|
+
collapseText,
|
|
2653
|
+
expandText
|
|
2654
|
+
}) => {
|
|
2655
|
+
const [internalOpen, setInternalOpen] = React6__namespace.default.useState(defaultOpen);
|
|
2656
|
+
const isOpen = controlledOpen !== void 0 ? controlledOpen : internalOpen;
|
|
2657
|
+
const handleToggle = () => {
|
|
2658
|
+
const newOpenState = !isOpen;
|
|
2659
|
+
if (controlledOpen === void 0) {
|
|
2660
|
+
setInternalOpen(newOpenState);
|
|
2661
|
+
}
|
|
2662
|
+
onOpenChange == null ? void 0 : onOpenChange(newOpenState);
|
|
2663
|
+
};
|
|
2664
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-sm w-full ${className}`, children: [
|
|
2665
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2666
|
+
"button",
|
|
2667
|
+
{
|
|
2668
|
+
type: "button",
|
|
2669
|
+
onClick: handleToggle,
|
|
2670
|
+
className: "flex items-center justify-between w-full text-left cursor-pointer",
|
|
2671
|
+
"aria-expanded": isOpen,
|
|
2672
|
+
"aria-label": `${isOpen ? collapseText : expandText} ${title}`,
|
|
2673
|
+
children: [
|
|
2674
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-xs", children: /* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { className: "text-white font-medium", children: title }) }),
|
|
2675
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-xs", children: [
|
|
2676
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: subtitle }),
|
|
2677
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2678
|
+
framerMotion.motion.svg,
|
|
2679
|
+
{
|
|
2680
|
+
className: "w-5 h-5 text-gray-400",
|
|
2681
|
+
fill: "none",
|
|
2682
|
+
stroke: "currentColor",
|
|
2683
|
+
viewBox: "0 0 24 24",
|
|
2684
|
+
animate: { rotate: isOpen ? 180 : 0 },
|
|
2685
|
+
transition: { duration: 0.2, ease: "easeInOut" },
|
|
2686
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 9l7 7 7-7" })
|
|
2687
|
+
}
|
|
2688
|
+
)
|
|
2689
|
+
] })
|
|
2690
|
+
]
|
|
2691
|
+
}
|
|
2692
|
+
),
|
|
2693
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2694
|
+
framerMotion.motion.div,
|
|
2695
|
+
{
|
|
2696
|
+
initial: { height: 0, opacity: 0 },
|
|
2697
|
+
animate: { height: "auto", opacity: 1 },
|
|
2698
|
+
exit: { height: 0, opacity: 0 },
|
|
2699
|
+
transition: { duration: 0.2, ease: "easeInOut" },
|
|
2700
|
+
style: { overflow: "hidden" },
|
|
2701
|
+
children
|
|
2702
|
+
}
|
|
2703
|
+
) })
|
|
2704
|
+
] });
|
|
2705
|
+
};
|
|
2706
|
+
var TransactionScreenIcon = ({
|
|
2707
|
+
type,
|
|
2708
|
+
gradient = "linear-gradient(135deg, #F6A700 0%, #F59E0B 100%)"
|
|
2709
|
+
}) => {
|
|
2710
|
+
if (type === "success") {
|
|
2711
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-20 h-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full rounded-full bg-brand-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-8 h-8 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }) });
|
|
2712
|
+
}
|
|
2713
|
+
if (type === "warning") {
|
|
2714
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full rounded-full flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-8 h-8 text-bg-default dark:text-bg-default-dark", fill: "currentColor", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 5.33334C15.6444 5.33334 15.3111 5.51112 15.1111 5.8L5.11112 21.8C4.91112 22.0889 4.91112 22.4667 5.11112 22.7556C5.31112 23.0444 5.64445 23.2222 6.00001 23.2222H26C26.3556 23.2222 26.6889 23.0444 26.8889 22.7556C27.0889 22.4667 27.0889 22.0889 26.8889 21.8L16.8889 5.8C16.6889 5.51112 16.3556 5.33334 16 5.33334ZM16 10.6667C16.5333 10.6667 17 11.1333 17 11.6667V16C17 16.5333 16.5333 17 16 17C15.4667 17 15 16.5333 15 16V11.6667C15 11.1333 15.4667 10.6667 16 10.6667ZM16 19.3333C16.7333 19.3333 17.3333 19.9333 17.3333 20.6667C17.3333 21.4 16.7333 22 16 22C15.2667 22 14.6667 21.4 14.6667 20.6667C14.6667 19.9333 15.2667 19.3333 16 19.3333Z" }) }) }) });
|
|
2715
|
+
}
|
|
2716
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full rounded-full flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "10", viewBox: "0 0 11 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-8 h-8 text-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.66659 8.33301H7.33325V7.08301C7.33325 6.62468 7.15374 6.23231 6.79471 5.90593C6.43568 5.57954 6.00409 5.41634 5.49992 5.41634C4.99575 5.41634 4.56415 5.57954 4.20513 5.90593C3.8461 6.23231 3.66659 6.62468 3.66659 7.08301V8.33301ZM5.49992 4.58301C6.00409 4.58301 6.43568 4.41981 6.79471 4.09342C7.15374 3.76704 7.33325 3.37467 7.33325 2.91634V1.66634H3.66659V2.91634C3.66659 3.37467 3.8461 3.76704 4.20513 4.09342C4.56415 4.41981 4.99575 4.58301 5.49992 4.58301ZM2.29159 9.16634C2.16172 9.16634 2.05287 9.12641 1.96502 9.04655C1.87718 8.96669 1.83325 8.86773 1.83325 8.74968C1.83325 8.63162 1.87718 8.53266 1.96502 8.4528C2.05287 8.37294 2.16172 8.33301 2.29159 8.33301H2.74992V7.08301C2.74992 6.6594 2.85877 6.26183 3.07648 5.8903C3.29419 5.51877 3.59784 5.2219 3.98742 4.99967C3.59784 4.77745 3.29419 4.48058 3.07648 4.10905C2.85877 3.73752 2.74992 3.33995 2.74992 2.91634V1.66634H2.29159C2.16172 1.66634 2.05287 1.62641 1.96502 1.54655C1.87718 1.46669 1.83325 1.36773 1.83325 1.24967C1.83325 1.13162 1.87718 1.03266 1.96502 0.952799C2.05287 0.872938 2.16172 0.833008 2.29159 0.833008H8.70825C8.83811 0.833008 8.94697 0.872938 9.03481 0.952799C9.12266 1.03266 9.16659 1.13162 9.16659 1.24967C9.16659 1.36773 9.12266 1.46669 9.03481 1.54655C8.94697 1.62641 8.83811 1.66634 8.70825 1.66634H8.24992V2.91634C8.24992 3.33995 8.14106 3.73752 7.92336 4.10905C7.70565 4.48058 7.402 4.77745 7.01242 4.99967C7.402 5.2219 7.70565 5.51877 7.92336 5.8903C8.14106 6.26183 8.24992 6.6594 8.24992 7.08301V8.33301H8.70825C8.83811 8.33301 8.94697 8.37294 9.03481 8.4528C9.12266 8.53266 9.16659 8.63162 9.16659 8.74968C9.16659 8.86773 9.12266 8.96669 9.03481 9.04655C8.94697 9.12641 8.83811 9.16634 8.70825 9.16634H2.29159Z", fill: "currentColor" }) }) }) });
|
|
2717
|
+
};
|
|
2718
|
+
var TransactionScreen = ({
|
|
2719
|
+
progress,
|
|
2720
|
+
iconType,
|
|
2721
|
+
iconGradient,
|
|
2722
|
+
title,
|
|
2723
|
+
description,
|
|
2724
|
+
onClose,
|
|
2725
|
+
onBack,
|
|
2726
|
+
backTitle = "",
|
|
2727
|
+
actions,
|
|
2728
|
+
children,
|
|
2729
|
+
testId
|
|
2730
|
+
}) => {
|
|
2731
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BackgroundContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full", children: [
|
|
2732
|
+
onBack && /* @__PURE__ */ jsxRuntime.jsx(DetailsHeader, { title: backTitle, onBack }),
|
|
2733
|
+
onClose && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, className: "flex justify-start px-md pt-md", children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose }) }),
|
|
2734
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full px-md pt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(ProgressIndicator, { progress }) }),
|
|
2735
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto px-md py-lg flex flex-col gap-lg", children: [
|
|
2736
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-md pt-lg", children: [
|
|
2737
|
+
/* @__PURE__ */ jsxRuntime.jsx(TransactionScreenIcon, { type: iconType, gradient: iconGradient }),
|
|
2738
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { variant: "h-large", children: title }),
|
|
2739
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-md-mobile font-poppins text-text-secondary dark:text-text-secondary-dark text-center", style: { maxWidth: "350px" }, children: description })
|
|
2740
|
+
] }),
|
|
2741
|
+
children,
|
|
2742
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" })
|
|
2743
|
+
] }),
|
|
2744
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-md pb-md", children: actions })
|
|
2745
|
+
] }) });
|
|
2746
|
+
};
|
|
2747
|
+
var TransactionScreenInvestmentCard = ({
|
|
2748
|
+
strategyName,
|
|
2749
|
+
apyLabel,
|
|
2750
|
+
apyValue,
|
|
2751
|
+
iconSrc,
|
|
2752
|
+
iconAlt,
|
|
2753
|
+
amountUSD,
|
|
2754
|
+
amountToken
|
|
2755
|
+
}) => {
|
|
2756
|
+
const [hasImageError, setHasImageError] = React6__namespace.default.useState(false);
|
|
2757
|
+
React6__namespace.default.useEffect(() => {
|
|
2758
|
+
setHasImageError(false);
|
|
2759
|
+
}, [iconSrc]);
|
|
2760
|
+
const shouldShowImage = Boolean(iconSrc) && !hasImageError;
|
|
2761
|
+
const fallbackLabel = (iconAlt || "?").slice(0, 1).toUpperCase();
|
|
2762
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2763
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start gap-xs", children: [
|
|
2764
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-accent-lg-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: strategyName }),
|
|
2765
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
2766
|
+
apyLabel,
|
|
2767
|
+
" ",
|
|
2768
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { as: "span", className: "text-state-success", children: apyValue })
|
|
2769
|
+
] })
|
|
2770
|
+
] }),
|
|
2771
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-sm", children: [
|
|
2772
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center", children: shouldShowImage ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: iconSrc, alt: iconAlt, className: "w-6 h-6 rounded-full", onError: () => setHasImageError(true) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-text-secondary dark:text-text-secondary-dark", children: fallbackLabel }) }),
|
|
2773
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end", children: [
|
|
2774
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: amountUSD }),
|
|
2775
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: amountToken })
|
|
2776
|
+
] })
|
|
2777
|
+
] })
|
|
2778
|
+
] }) });
|
|
2779
|
+
};
|
|
2780
|
+
function StepStatusIcon({ status }) {
|
|
2781
|
+
switch (status) {
|
|
2782
|
+
case "completed":
|
|
2783
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoCheckmarkOutline, { className: "w-4 h-4", style: { color: "var(--color-state-success, #2BA176)" } }) });
|
|
2784
|
+
case "processing":
|
|
2785
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoTimeOutline, { className: "w-4 h-4", style: { color: "var(--color-state-warning, #F6A700)" } }) });
|
|
2786
|
+
case "failed":
|
|
2787
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-full bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoAlertCircleOutline, { className: "w-4 h-4", style: { color: "var(--color-state-error, #FF4D4F)" } }) });
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
function StepStatusText({
|
|
2791
|
+
step,
|
|
2792
|
+
completedText,
|
|
2793
|
+
processingText,
|
|
2794
|
+
failedText,
|
|
2795
|
+
viewOnExplorerText
|
|
2796
|
+
}) {
|
|
2797
|
+
if (step.statusText) {
|
|
2798
|
+
const textColorClass2 = step.status === "completed" ? "text-text-primary dark:text-text-primary-dark" : step.status === "processing" ? "text-text-secondary dark:text-text-secondary-dark" : step.status === "failed" ? "text-state-error" : "text-text-disabled dark:text-text-disabled-dark";
|
|
2799
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-sm ${textColorClass2}`, children: step.statusText });
|
|
2800
|
+
}
|
|
2801
|
+
if (step.status === "completed" && step.explorerUrl) {
|
|
2802
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2803
|
+
"a",
|
|
2804
|
+
{
|
|
2805
|
+
href: step.explorerUrl,
|
|
2806
|
+
target: "_blank",
|
|
2807
|
+
rel: "noopener noreferrer",
|
|
2808
|
+
className: "text-sm text-brand-primary dark:text-brand-primary-dark underline hover:no-underline",
|
|
2809
|
+
children: viewOnExplorerText
|
|
2810
|
+
}
|
|
2811
|
+
);
|
|
2812
|
+
}
|
|
2813
|
+
const defaultText = step.status === "completed" ? completedText : step.status === "processing" ? processingText : failedText;
|
|
2814
|
+
const textColorClass = step.status === "completed" ? "text-text-primary dark:text-text-primary-dark" : step.status === "processing" ? "text-text-secondary dark:text-text-secondary-dark" : "text-state-error";
|
|
2815
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-sm ${textColorClass}`, children: defaultText });
|
|
2816
|
+
}
|
|
2817
|
+
function StepDisplay({ step, completedText, processingText, failedText, viewOnExplorerText }) {
|
|
2818
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 w-full", children: [
|
|
2819
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-text-primary dark:text-text-primary-dark font-medium", children: step.label }) }),
|
|
2820
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: step.value ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary dark:text-text-secondary-dark", children: step.value }) : /* @__PURE__ */ jsxRuntime.jsx(StepStatusText, { step, completedText, processingText, failedText, viewOnExplorerText }) })
|
|
2821
|
+
] });
|
|
2822
|
+
}
|
|
2823
|
+
function TransactionProcessingDetails({
|
|
2824
|
+
steps,
|
|
2825
|
+
className = "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised",
|
|
2826
|
+
defaultOpen = true,
|
|
2827
|
+
labels
|
|
2828
|
+
}) {
|
|
2829
|
+
if (!steps || steps.length === 0) {
|
|
2830
|
+
return null;
|
|
2831
|
+
}
|
|
2832
|
+
const getProcessingSteps = () => {
|
|
2833
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col w-full", children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
|
|
2834
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
2835
|
+
step.status && /* @__PURE__ */ jsxRuntime.jsx(StepStatusIcon, { status: step.status }),
|
|
2836
|
+
index < steps.length - 1 && step.status && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px flex-1 min-h-[16px] bg-white my-1" })
|
|
2837
|
+
] }),
|
|
2838
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 pb-2 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(StepDisplay, { step, completedText: labels.completedText, processingText: labels.processingText, failedText: labels.failedText, viewOnExplorerText: labels.viewOnExplorerText }) })
|
|
2839
|
+
] }, `step-${index}`)) });
|
|
2840
|
+
};
|
|
2841
|
+
const items = [
|
|
2842
|
+
{
|
|
2843
|
+
label: "",
|
|
2844
|
+
value: getProcessingSteps(),
|
|
2845
|
+
valueClassName: "flex flex-col gap-0 w-full"
|
|
2846
|
+
}
|
|
2847
|
+
];
|
|
2848
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2849
|
+
SummaryDetails,
|
|
2850
|
+
{
|
|
2851
|
+
title: labels.title,
|
|
2852
|
+
items,
|
|
2853
|
+
defaultOpen,
|
|
2854
|
+
className
|
|
2855
|
+
}
|
|
2856
|
+
);
|
|
2857
|
+
}
|
|
2858
|
+
var TokenWithChainBadge = ({
|
|
2859
|
+
tokenLogoUrl,
|
|
2860
|
+
tokenAlt,
|
|
2861
|
+
chainLogoUrl,
|
|
2862
|
+
chainName
|
|
2863
|
+
}) => {
|
|
2864
|
+
const fallbackText = encodeURIComponent((tokenAlt || "TOK").slice(0, 3).toUpperCase());
|
|
2865
|
+
const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
|
|
2866
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-10 h-10", children: [
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2868
|
+
"img",
|
|
2869
|
+
{
|
|
2870
|
+
src: tokenLogoUrl || fallbackSrc,
|
|
2871
|
+
alt: tokenAlt || "",
|
|
2872
|
+
className: "object-cover w-10 h-10 rounded-full",
|
|
2873
|
+
onError: (e) => {
|
|
2874
|
+
e.target.src = fallbackSrc;
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
),
|
|
2878
|
+
chainLogoUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2879
|
+
"img",
|
|
2880
|
+
{
|
|
2881
|
+
src: chainLogoUrl,
|
|
2882
|
+
alt: chainName,
|
|
2883
|
+
className: "absolute object-cover w-6 h-6 p-px bg-white border rounded-full -bottom-1 -right-1 border-bg-default",
|
|
2884
|
+
onError: (e) => {
|
|
2885
|
+
e.target.style.display = "none";
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
)
|
|
2889
|
+
] });
|
|
2890
|
+
};
|
|
2891
|
+
var SwapProcessingView = ({
|
|
2892
|
+
fromTokenSymbol,
|
|
2893
|
+
fromTokenIcon,
|
|
2894
|
+
toTokenSymbol,
|
|
2895
|
+
toTokenIcon,
|
|
2896
|
+
formattedInputAmount,
|
|
2897
|
+
formattedOutputAmount,
|
|
2898
|
+
formattedInputAmountUSD,
|
|
2899
|
+
formattedOutputAmountUSD,
|
|
2900
|
+
progress,
|
|
2901
|
+
transactionSteps,
|
|
2902
|
+
onClose,
|
|
2903
|
+
onGoToHistory,
|
|
2904
|
+
titleText,
|
|
2905
|
+
descriptionPrefix,
|
|
2906
|
+
activityHistoryText,
|
|
2907
|
+
processingDetailsLabels
|
|
2908
|
+
}) => {
|
|
2909
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2910
|
+
TransactionScreen,
|
|
2911
|
+
{
|
|
2912
|
+
testId: "swap-processing-screen",
|
|
2913
|
+
onClose,
|
|
2914
|
+
progress,
|
|
2915
|
+
iconType: "processing",
|
|
2916
|
+
title: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-processing-title", children: titleText }),
|
|
2917
|
+
description: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2918
|
+
descriptionPrefix,
|
|
2919
|
+
" ",
|
|
2920
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2921
|
+
"span",
|
|
2922
|
+
{
|
|
2923
|
+
className: "font-semibold underline underline-offset-2 cursor-pointer text-brand-primary",
|
|
2924
|
+
onClick: onGoToHistory,
|
|
2925
|
+
children: [
|
|
2926
|
+
activityHistoryText,
|
|
2927
|
+
"."
|
|
2928
|
+
]
|
|
2929
|
+
}
|
|
2930
|
+
)
|
|
2931
|
+
] }),
|
|
2932
|
+
children: [
|
|
2933
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
2934
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
2935
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
2936
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
2937
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
2938
|
+
formattedInputAmount,
|
|
2939
|
+
" ",
|
|
2940
|
+
fromTokenSymbol
|
|
2941
|
+
] }),
|
|
2942
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedInputAmountUSD })
|
|
2943
|
+
] })
|
|
2944
|
+
] }),
|
|
2945
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full p-2 shadow-md z-10", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
2946
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
2947
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
2948
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
2949
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
2950
|
+
"~",
|
|
2951
|
+
formattedOutputAmount,
|
|
2952
|
+
" ",
|
|
2953
|
+
toTokenSymbol
|
|
2954
|
+
] }),
|
|
2955
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedOutputAmountUSD })
|
|
2956
|
+
] })
|
|
2957
|
+
] })
|
|
2958
|
+
] }) }),
|
|
2959
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2960
|
+
TransactionProcessingDetails,
|
|
2961
|
+
{
|
|
2962
|
+
steps: transactionSteps,
|
|
2963
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised dark:lg:!bg-bg-raised-dark",
|
|
2964
|
+
labels: processingDetailsLabels
|
|
2965
|
+
}
|
|
2966
|
+
)
|
|
2967
|
+
]
|
|
2968
|
+
}
|
|
2969
|
+
);
|
|
2970
|
+
};
|
|
2971
|
+
var SwapCrossChainProcessingView = ({
|
|
2972
|
+
fromTokenSymbol,
|
|
2973
|
+
fromTokenIcon,
|
|
2974
|
+
toTokenSymbol,
|
|
2975
|
+
toTokenIcon,
|
|
2976
|
+
originChainId,
|
|
2977
|
+
destinationChainId,
|
|
2978
|
+
originChainLogoUrl,
|
|
2979
|
+
originChainName,
|
|
2980
|
+
destinationChainLogoUrl,
|
|
2981
|
+
destinationChainName,
|
|
2982
|
+
formattedInputAmount,
|
|
2983
|
+
formattedOutputAmount,
|
|
2984
|
+
formattedInputAmountUSD,
|
|
2985
|
+
formattedOutputAmountUSD,
|
|
2986
|
+
progress,
|
|
2987
|
+
title,
|
|
2988
|
+
description,
|
|
2989
|
+
transactionSteps,
|
|
2990
|
+
onClose,
|
|
2991
|
+
onGoToHistory,
|
|
2992
|
+
viewHistoryText,
|
|
2993
|
+
processingDetailsLabels
|
|
2994
|
+
}) => {
|
|
2995
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2996
|
+
TransactionScreen,
|
|
2997
|
+
{
|
|
2998
|
+
onClose,
|
|
2999
|
+
progress,
|
|
3000
|
+
iconType: "processing",
|
|
3001
|
+
title,
|
|
3002
|
+
description: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3003
|
+
description,
|
|
3004
|
+
" ",
|
|
3005
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3006
|
+
"span",
|
|
3007
|
+
{
|
|
3008
|
+
className: "font-semibold underline cursor-pointer underline-offset-2 text-brand-primary",
|
|
3009
|
+
onClick: onGoToHistory,
|
|
3010
|
+
children: viewHistoryText
|
|
3011
|
+
}
|
|
3012
|
+
),
|
|
3013
|
+
"."
|
|
3014
|
+
] }),
|
|
3015
|
+
children: [
|
|
3016
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-between w-full px-md", children: [
|
|
3017
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3018
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3019
|
+
TokenWithChainBadge,
|
|
3020
|
+
{
|
|
3021
|
+
tokenLogoUrl: fromTokenIcon,
|
|
3022
|
+
tokenAlt: fromTokenSymbol,
|
|
3023
|
+
chainId: originChainId,
|
|
3024
|
+
chainLogoUrl: originChainLogoUrl,
|
|
3025
|
+
chainName: originChainName
|
|
3026
|
+
}
|
|
3027
|
+
),
|
|
3028
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3029
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3030
|
+
formattedInputAmount,
|
|
3031
|
+
" ",
|
|
3032
|
+
fromTokenSymbol
|
|
3033
|
+
] }),
|
|
3034
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedInputAmountUSD })
|
|
3035
|
+
] })
|
|
3036
|
+
] }),
|
|
3037
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-10 p-2 -translate-x-1/2 -translate-y-1/2 rounded-full shadow-md left-1/2 top-1/2 bg-brand-secondary", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3038
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3039
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3040
|
+
TokenWithChainBadge,
|
|
3041
|
+
{
|
|
3042
|
+
tokenLogoUrl: toTokenIcon,
|
|
3043
|
+
tokenAlt: toTokenSymbol,
|
|
3044
|
+
chainId: destinationChainId,
|
|
3045
|
+
chainLogoUrl: destinationChainLogoUrl,
|
|
3046
|
+
chainName: destinationChainName
|
|
3047
|
+
}
|
|
3048
|
+
),
|
|
3049
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3050
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3051
|
+
"~",
|
|
3052
|
+
formattedOutputAmount,
|
|
3053
|
+
" ",
|
|
3054
|
+
toTokenSymbol
|
|
3055
|
+
] }),
|
|
3056
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedOutputAmountUSD })
|
|
3057
|
+
] })
|
|
3058
|
+
] })
|
|
3059
|
+
] }) }),
|
|
3060
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3061
|
+
TransactionProcessingDetails,
|
|
3062
|
+
{
|
|
3063
|
+
steps: transactionSteps,
|
|
3064
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised dark:lg:!bg-bg-raised-dark",
|
|
3065
|
+
labels: processingDetailsLabels
|
|
3066
|
+
}
|
|
3067
|
+
)
|
|
3068
|
+
]
|
|
3069
|
+
}
|
|
3070
|
+
);
|
|
3071
|
+
};
|
|
3072
|
+
var SwapSignatureWarningView = ({
|
|
3073
|
+
fromTokenSymbol,
|
|
3074
|
+
fromTokenIcon,
|
|
3075
|
+
toTokenSymbol,
|
|
3076
|
+
toTokenIcon,
|
|
3077
|
+
formattedInputAmount,
|
|
3078
|
+
formattedOutputAmount,
|
|
3079
|
+
formattedInputAmountUSD,
|
|
3080
|
+
formattedOutputAmountUSD,
|
|
3081
|
+
progress,
|
|
3082
|
+
errorTitle,
|
|
3083
|
+
errorDescription,
|
|
3084
|
+
transactionSteps,
|
|
3085
|
+
onCancel,
|
|
3086
|
+
onTryAgain,
|
|
3087
|
+
cancelButtonText,
|
|
3088
|
+
retryButtonText,
|
|
3089
|
+
processingDetailsLabels
|
|
3090
|
+
}) => {
|
|
3091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3092
|
+
TransactionScreen,
|
|
3093
|
+
{
|
|
3094
|
+
testId: "swap-signature-warning-screen",
|
|
3095
|
+
onClose: onCancel,
|
|
3096
|
+
progress,
|
|
3097
|
+
iconType: "warning",
|
|
3098
|
+
title: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-signature-warning-title", children: errorTitle }),
|
|
3099
|
+
description: errorDescription,
|
|
3100
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "swap-signature-warning-actions", className: "flex gap-sm w-full", children: [
|
|
3101
|
+
/* @__PURE__ */ jsxRuntime.jsx(SecondaryButton, { "data-testid": "swap-signature-warning-cancel", className: "flex-1", onClick: onCancel, children: cancelButtonText }),
|
|
3102
|
+
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { "data-testid": "swap-signature-warning-retry", className: "flex-1", onClick: onTryAgain, children: retryButtonText })
|
|
3103
|
+
] }),
|
|
3104
|
+
children: [
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3106
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3107
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3108
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3109
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3110
|
+
formattedInputAmount,
|
|
3111
|
+
" ",
|
|
3112
|
+
fromTokenSymbol
|
|
3113
|
+
] }),
|
|
3114
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedInputAmountUSD })
|
|
3115
|
+
] })
|
|
3116
|
+
] }),
|
|
3117
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full p-2 shadow-md z-10", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3119
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3120
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3121
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3122
|
+
"~",
|
|
3123
|
+
formattedOutputAmount,
|
|
3124
|
+
" ",
|
|
3125
|
+
toTokenSymbol
|
|
3126
|
+
] }),
|
|
3127
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedOutputAmountUSD })
|
|
3128
|
+
] })
|
|
3129
|
+
] })
|
|
3130
|
+
] }) }),
|
|
3131
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3132
|
+
TransactionProcessingDetails,
|
|
3133
|
+
{
|
|
3134
|
+
steps: transactionSteps,
|
|
3135
|
+
defaultOpen: true,
|
|
3136
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised dark:lg:!bg-bg-raised-dark",
|
|
3137
|
+
labels: processingDetailsLabels
|
|
3138
|
+
}
|
|
3139
|
+
)
|
|
3140
|
+
]
|
|
3141
|
+
}
|
|
3142
|
+
);
|
|
3143
|
+
};
|
|
3144
|
+
var SwapSuccessView = ({
|
|
3145
|
+
fromTokenSymbol,
|
|
3146
|
+
fromTokenIcon,
|
|
3147
|
+
toTokenSymbol,
|
|
3148
|
+
toTokenIcon,
|
|
3149
|
+
formattedInputAmount,
|
|
3150
|
+
formattedOutputAmount,
|
|
3151
|
+
formattedInputAmountUSD,
|
|
3152
|
+
formattedOutputAmountUSD,
|
|
3153
|
+
transactionSteps,
|
|
3154
|
+
onClose,
|
|
3155
|
+
onStartNewSwap,
|
|
3156
|
+
onGoToWallet,
|
|
3157
|
+
labels,
|
|
3158
|
+
processingDetailsLabels
|
|
3159
|
+
}) => {
|
|
3160
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3161
|
+
TransactionScreen,
|
|
3162
|
+
{
|
|
3163
|
+
testId: "swap-success-screen",
|
|
3164
|
+
onClose,
|
|
3165
|
+
progress: 100,
|
|
3166
|
+
iconType: "success",
|
|
3167
|
+
title: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-success-title", children: labels.title }),
|
|
3168
|
+
description: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3169
|
+
labels.descriptionPrefix,
|
|
3170
|
+
" ",
|
|
3171
|
+
/* @__PURE__ */ jsxRuntime.jsxs("strong", { className: "font-semibold", children: [
|
|
3172
|
+
formattedInputAmount,
|
|
3173
|
+
" ",
|
|
3174
|
+
fromTokenSymbol
|
|
3175
|
+
] }),
|
|
3176
|
+
" ",
|
|
3177
|
+
labels.descriptionMiddle,
|
|
3178
|
+
" ",
|
|
3179
|
+
/* @__PURE__ */ jsxRuntime.jsxs("strong", { className: "font-semibold", children: [
|
|
3180
|
+
formattedOutputAmount,
|
|
3181
|
+
" ",
|
|
3182
|
+
toTokenSymbol
|
|
3183
|
+
] }),
|
|
3184
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
3185
|
+
labels.descriptionSuffix,
|
|
3186
|
+
" ",
|
|
3187
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold text-brand-primary cursor-pointer", onClick: onGoToWallet, children: labels.walletLinkText })
|
|
3188
|
+
] }),
|
|
3189
|
+
actions: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "swap-start-new-wrapper", className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { "data-testid": "swap-start-new-button", className: "w-full", onClick: onStartNewSwap, children: labels.startNewSwapButton }) }),
|
|
3190
|
+
children: [
|
|
3191
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3192
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3193
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3194
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3195
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3196
|
+
formattedInputAmount,
|
|
3197
|
+
" ",
|
|
3198
|
+
fromTokenSymbol
|
|
3199
|
+
] }),
|
|
3200
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedInputAmountUSD })
|
|
3201
|
+
] })
|
|
3202
|
+
] }),
|
|
3203
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full p-2 shadow-md z-10", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3204
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3205
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3206
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3207
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3208
|
+
"~",
|
|
3209
|
+
formattedOutputAmount,
|
|
3210
|
+
" ",
|
|
3211
|
+
toTokenSymbol
|
|
3212
|
+
] }),
|
|
3213
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedOutputAmountUSD })
|
|
3214
|
+
] })
|
|
3215
|
+
] })
|
|
3216
|
+
] }) }),
|
|
3217
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3218
|
+
TransactionProcessingDetails,
|
|
3219
|
+
{
|
|
3220
|
+
steps: transactionSteps,
|
|
3221
|
+
defaultOpen: true,
|
|
3222
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised dark:lg:!bg-bg-raised-dark",
|
|
3223
|
+
labels: processingDetailsLabels
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
]
|
|
3227
|
+
}
|
|
3228
|
+
);
|
|
3229
|
+
};
|
|
3230
|
+
var SwapTransactionFailedView = ({
|
|
3231
|
+
fromTokenSymbol,
|
|
3232
|
+
fromTokenIcon,
|
|
3233
|
+
toTokenSymbol,
|
|
3234
|
+
toTokenIcon,
|
|
3235
|
+
formattedInputAmount,
|
|
3236
|
+
formattedOutputAmount,
|
|
3237
|
+
formattedInputAmountUSD,
|
|
3238
|
+
formattedOutputAmountUSD,
|
|
3239
|
+
progress,
|
|
3240
|
+
errorTitle,
|
|
3241
|
+
errorDescription,
|
|
3242
|
+
transactionSteps,
|
|
3243
|
+
hasExplorerLink,
|
|
3244
|
+
onBack,
|
|
3245
|
+
onViewExplorer,
|
|
3246
|
+
onTryAgain,
|
|
3247
|
+
viewOnExplorerText,
|
|
3248
|
+
retryButtonText,
|
|
3249
|
+
processingDetailsLabels
|
|
3250
|
+
}) => {
|
|
3251
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3252
|
+
TransactionScreen,
|
|
3253
|
+
{
|
|
3254
|
+
testId: "swap-failed-screen",
|
|
3255
|
+
onClose: onBack,
|
|
3256
|
+
progress,
|
|
3257
|
+
iconType: "warning",
|
|
3258
|
+
iconGradient: "linear-gradient(135deg, #EF4444 0%, #DC2626 100%)",
|
|
3259
|
+
title: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-failed-title", children: errorTitle }),
|
|
3260
|
+
description: errorDescription,
|
|
3261
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "swap-failed-actions", className: "flex gap-sm w-full", children: [
|
|
3262
|
+
/* @__PURE__ */ jsxRuntime.jsx(SecondaryButton, { "data-testid": "swap-failed-view-explorer", className: "flex-1", onClick: onViewExplorer, disabled: !hasExplorerLink, children: viewOnExplorerText }),
|
|
3263
|
+
/* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { "data-testid": "swap-failed-retry", className: "flex-1", onClick: onTryAgain, children: retryButtonText })
|
|
3264
|
+
] }),
|
|
3265
|
+
children: [
|
|
3266
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3267
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3268
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3269
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3270
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3271
|
+
"~",
|
|
3272
|
+
formattedInputAmount,
|
|
3273
|
+
" ",
|
|
3274
|
+
fromTokenSymbol
|
|
3275
|
+
] }),
|
|
3276
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedInputAmountUSD })
|
|
3277
|
+
] })
|
|
3278
|
+
] }),
|
|
3279
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full p-2 shadow-md z-10", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3280
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3281
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3282
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3283
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children: [
|
|
3284
|
+
"~",
|
|
3285
|
+
formattedOutputAmount,
|
|
3286
|
+
" ",
|
|
3287
|
+
toTokenSymbol
|
|
3288
|
+
] }),
|
|
3289
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-h2-mobile font-extrabold font-poppins text-text-primary dark:text-text-primary-dark", children: formattedOutputAmountUSD })
|
|
3290
|
+
] })
|
|
3291
|
+
] })
|
|
3292
|
+
] }) }),
|
|
3293
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3294
|
+
TransactionProcessingDetails,
|
|
3295
|
+
{
|
|
3296
|
+
steps: transactionSteps,
|
|
3297
|
+
defaultOpen: true,
|
|
3298
|
+
className: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised dark:lg:!bg-bg-raised-dark",
|
|
3299
|
+
labels: processingDetailsLabels
|
|
3300
|
+
}
|
|
3301
|
+
)
|
|
3302
|
+
]
|
|
3303
|
+
}
|
|
3304
|
+
);
|
|
3305
|
+
};
|
|
3306
|
+
var ChooseAnAssetSwapView = ({
|
|
3307
|
+
actionSheetId,
|
|
3308
|
+
isOpen,
|
|
3309
|
+
currentActionSheetId,
|
|
3310
|
+
onClose,
|
|
3311
|
+
onSearch,
|
|
3312
|
+
autoFocus,
|
|
3313
|
+
displayedTokens,
|
|
3314
|
+
hasMore,
|
|
3315
|
+
onLoadMore,
|
|
3316
|
+
findBalance,
|
|
3317
|
+
isFetching,
|
|
3318
|
+
onAssetClick,
|
|
3319
|
+
labels,
|
|
3320
|
+
formatTokenAmount,
|
|
3321
|
+
formatCurrencyValue
|
|
3322
|
+
}) => {
|
|
3323
|
+
const [searchValue, setSearchValue] = React6__namespace.default.useState("");
|
|
3324
|
+
const handleSearch = (value) => {
|
|
3325
|
+
setSearchValue(value);
|
|
3326
|
+
onSearch(value);
|
|
3327
|
+
};
|
|
3328
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", "data-testid": `swap-token-actionsheet-wrapper-${actionSheetId}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3329
|
+
ActionSheet,
|
|
3330
|
+
{
|
|
3331
|
+
id: actionSheetId,
|
|
3332
|
+
currentActionSheetId,
|
|
3333
|
+
isOpen,
|
|
3334
|
+
onClose,
|
|
3335
|
+
position: "bottom",
|
|
3336
|
+
height: "full",
|
|
3337
|
+
contentClassName: "w-full max-w-[620px] mx-auto",
|
|
3338
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
|
|
3339
|
+
/* @__PURE__ */ jsxRuntime.jsx(Navbar, { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { testId: `swap-token-actionsheet-close-${actionSheetId}`, onClick: onClose }) }),
|
|
3340
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 w-full p-6 overflow-hidden", children: [
|
|
3341
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0", children: [
|
|
3342
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextHeading_default, { children: labels.title }),
|
|
3343
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
3344
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3345
|
+
SearchInput,
|
|
3346
|
+
{
|
|
3347
|
+
onSearch: handleSearch,
|
|
3348
|
+
placeholder: labels.searchPlaceholder,
|
|
3349
|
+
autoFocus,
|
|
3350
|
+
inputClassName: "bg-bg-subtle dark:bg-bg-subtle-dark lg:!bg-bg-raised lg:dark:!bg-bg-raised-dark",
|
|
3351
|
+
containerTestId: `swap-token-search-container-${actionSheetId}`,
|
|
3352
|
+
inputTestId: `swap-token-search-input-${actionSheetId}`
|
|
3353
|
+
}
|
|
3354
|
+
)
|
|
3355
|
+
] }),
|
|
3356
|
+
searchValue && displayedTokens.length === 0 && !isFetching ? /* @__PURE__ */ jsxRuntime.jsx(SearchEmptyState, { title: labels.searchEmptyTitle, description: labels.searchEmptyDescription }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 w-full mt-4 overflow-y-auto flex-1 min-h-0", children: [
|
|
3357
|
+
isFetching && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center w-full py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3358
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", className: "text-text-secondary dark:text-text-secondary-dark", children: labels.searchingText }),
|
|
3359
|
+
/* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
|
|
3360
|
+
] }) }),
|
|
3361
|
+
displayedTokens.map((token, index) => {
|
|
3362
|
+
const balance = findBalance(token);
|
|
3363
|
+
const tokenPriceUSD = Number(balance == null ? void 0 : balance.priceUSD) || 0;
|
|
3364
|
+
const formattedBalance = (balance == null ? void 0 : balance.amountUI) ? formatTokenAmount(balance.amountUI, tokenPriceUSD, 2) : "0";
|
|
3365
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3366
|
+
ListItem,
|
|
3367
|
+
{
|
|
3368
|
+
className: "w-full flex-shrink-0",
|
|
3369
|
+
onClick: () => onAssetClick(token),
|
|
3370
|
+
"data-testid": `swap-token-item-${token.symbol.toLowerCase()}-${token.chainId}`,
|
|
3371
|
+
"data-address": token.address,
|
|
3372
|
+
"data-chain-id": token.chainId,
|
|
3373
|
+
"data-symbol": token.symbol,
|
|
3374
|
+
children: [
|
|
3375
|
+
/* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: token.logoURI || "", alt: token.name, className: "w-10 h-10 rounded-full" }) }),
|
|
3376
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
|
|
3377
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { children: token.name }),
|
|
3378
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: token.symbol })
|
|
3379
|
+
] }),
|
|
3380
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ListItemRightSide, { children: [
|
|
3381
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { children: formattedBalance }),
|
|
3382
|
+
/* @__PURE__ */ jsxRuntime.jsx(TextBody_default, { variant: "text-small", children: formatCurrencyValue(Number(balance == null ? void 0 : balance.amountInUSD) || 0) })
|
|
3383
|
+
] })
|
|
3384
|
+
]
|
|
3385
|
+
},
|
|
3386
|
+
`token-${token.address}-${index}`
|
|
3387
|
+
);
|
|
3388
|
+
}),
|
|
3389
|
+
hasMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center w-full py-4 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(TertiaryButton, { onClick: onLoadMore, children: labels.loadMoreButton }) })
|
|
3390
|
+
] })
|
|
3391
|
+
] })
|
|
3392
|
+
] })
|
|
3393
|
+
}
|
|
3394
|
+
) });
|
|
3395
|
+
};
|
|
1712
3396
|
|
|
1713
3397
|
exports.ActionButton = ActionButton;
|
|
1714
3398
|
exports.ActionSheet = ActionSheet;
|
|
1715
3399
|
exports.AddressDisplay = AddressDisplay;
|
|
3400
|
+
exports.BackgroundContainer = BackgroundContainer;
|
|
1716
3401
|
exports.BannerNotification = BannerNotification;
|
|
3402
|
+
exports.ChooseAStrategyActionsheetView = ChooseAStrategyActionsheetView;
|
|
3403
|
+
exports.ChooseAnAssetSwapView = ChooseAnAssetSwapView;
|
|
3404
|
+
exports.CloseButton = CloseButton;
|
|
3405
|
+
exports.CollapsibleInfoRow = CollapsibleInfoRow;
|
|
3406
|
+
exports.CollapsibleSection = CollapsibleSection;
|
|
1717
3407
|
exports.ConnectWalletList = ConnectWalletList;
|
|
1718
3408
|
exports.Currency = Currency;
|
|
1719
3409
|
exports.DeframeComponentsProvider = DeframeComponentsProvider;
|
|
3410
|
+
exports.DetailsHeader = DetailsHeader;
|
|
1720
3411
|
exports.Fiat = Currency;
|
|
3412
|
+
exports.FlexCol = FlexCol;
|
|
3413
|
+
exports.FlexRow = FlexRow;
|
|
3414
|
+
exports.HighRiskBadge = HighRiskBadge;
|
|
3415
|
+
exports.HistoryDepositDetailsView = HistoryDepositDetailsView;
|
|
3416
|
+
exports.HistoryWithdrawDetailsView = HistoryWithdrawDetailsView;
|
|
3417
|
+
exports.InfoLabel = InfoLabel;
|
|
3418
|
+
exports.InfoRow = InfoRow;
|
|
3419
|
+
exports.InfoRowIconLabel = InfoRowIconLabel;
|
|
3420
|
+
exports.InfoRowIconValue = InfoRowIconValue;
|
|
3421
|
+
exports.InfoRowWithIcon = InfoRowWithIcon;
|
|
3422
|
+
exports.InfoValue = InfoValue;
|
|
1721
3423
|
exports.Input = Input;
|
|
1722
3424
|
exports.Link = Link;
|
|
1723
3425
|
exports.ListItem = ListItem;
|
|
1724
3426
|
exports.ListItemContent = ListItemContent;
|
|
1725
3427
|
exports.ListItemLeftSide = ListItemLeftSide;
|
|
1726
3428
|
exports.ListItemRightSide = ListItemRightSide;
|
|
3429
|
+
exports.LoadingDots = LoadingDots;
|
|
3430
|
+
exports.LowRiskBadge = LowRiskBadge;
|
|
3431
|
+
exports.MediumRiskBadge = MediumRiskBadge;
|
|
3432
|
+
exports.Navbar = Navbar;
|
|
1727
3433
|
exports.PercentageButton = PercentageButton;
|
|
1728
3434
|
exports.PrimaryButton = PrimaryButton;
|
|
3435
|
+
exports.ProgressIndicator = ProgressIndicator;
|
|
3436
|
+
exports.ScrollableContent = ScrollableContent;
|
|
3437
|
+
exports.SearchEmptyState = SearchEmptyState;
|
|
3438
|
+
exports.SearchInput = SearchInput;
|
|
1729
3439
|
exports.SecondaryButton = SecondaryButton;
|
|
3440
|
+
exports.SectionCard = SectionCard;
|
|
1730
3441
|
exports.Select = Select;
|
|
1731
3442
|
exports.SelectContent = SelectContent;
|
|
1732
3443
|
exports.SelectItem = SelectItem;
|
|
1733
3444
|
exports.SelectTrigger = SelectTrigger;
|
|
1734
3445
|
exports.Skeleton = Skeleton;
|
|
3446
|
+
exports.StepDisplay = StepDisplay;
|
|
3447
|
+
exports.StepStatusIcon = StepStatusIcon;
|
|
3448
|
+
exports.StepStatusText = StepStatusText;
|
|
3449
|
+
exports.StrategyDetailsView = StrategyDetailsView;
|
|
1735
3450
|
exports.SummaryDetails = SummaryDetails;
|
|
3451
|
+
exports.SummaryDetailsCryptoControlV2 = SummaryDetailsCryptoControlV2;
|
|
3452
|
+
exports.SwapAmountInputView = SwapAmountInputView;
|
|
3453
|
+
exports.SwapCrossChainProcessingView = SwapCrossChainProcessingView;
|
|
3454
|
+
exports.SwapNetworkSelectorView = SwapNetworkSelectorView;
|
|
3455
|
+
exports.SwapOutputAmountView = SwapOutputAmountView;
|
|
3456
|
+
exports.SwapProcessingView = SwapProcessingView;
|
|
3457
|
+
exports.SwapQuoteBlockchainCostsView = SwapQuoteBlockchainCostsView;
|
|
3458
|
+
exports.SwapQuoteErrorsView = SwapQuoteErrorsView;
|
|
3459
|
+
exports.SwapQuoteHeaderView = SwapQuoteHeaderView;
|
|
3460
|
+
exports.SwapSignatureWarningView = SwapSignatureWarningView;
|
|
3461
|
+
exports.SwapSlippageToleranceButtonsView = SwapSlippageToleranceButtonsView;
|
|
3462
|
+
exports.SwapSuccessView = SwapSuccessView;
|
|
3463
|
+
exports.SwapTokenSelectorView = SwapTokenSelectorView;
|
|
3464
|
+
exports.SwapTransactionFailedView = SwapTransactionFailedView;
|
|
1736
3465
|
exports.Tabs = Tabs;
|
|
1737
3466
|
exports.TabsContent = TabsContent;
|
|
1738
3467
|
exports.TabsList = TabsList;
|
|
@@ -1743,6 +3472,11 @@ exports.TextAccent = TextAccent_default;
|
|
|
1743
3472
|
exports.TextBody = TextBody_default;
|
|
1744
3473
|
exports.TextHeading = TextHeading_default;
|
|
1745
3474
|
exports.Title = Title;
|
|
3475
|
+
exports.TokenWithChainBadge = TokenWithChainBadge;
|
|
3476
|
+
exports.TransactionProcessingDetails = TransactionProcessingDetails;
|
|
3477
|
+
exports.TransactionScreen = TransactionScreen;
|
|
3478
|
+
exports.TransactionScreenIcon = TransactionScreenIcon;
|
|
3479
|
+
exports.TransactionScreenInvestmentCard = TransactionScreenInvestmentCard;
|
|
1746
3480
|
exports.WalletItem = WalletItem;
|
|
1747
3481
|
exports.WalletList = ConnectWalletList;
|
|
1748
3482
|
exports.WalletListContainer = WalletListContainer;
|