@0xsquid/ui 0.27.3-beta.0 → 0.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +109 -61
- package/dist/cjs/types/components/layout/PipeSeparator.d.ts +1 -1
- package/dist/cjs/types/components/layout/useOnClickOutside.d.ts +3 -3
- package/dist/cjs/types/components/views/SwapProgressView.d.ts +2 -2
- package/dist/cjs/types/core/numbers.d.ts +4 -9
- package/dist/cjs/types/types/components.d.ts +2 -2
- package/dist/cjs/types/types/index.d.ts +1 -1
- package/dist/esm/index.js +109 -61
- package/dist/esm/types/components/layout/PipeSeparator.d.ts +1 -1
- package/dist/esm/types/components/layout/useOnClickOutside.d.ts +3 -3
- package/dist/esm/types/components/views/SwapProgressView.d.ts +2 -2
- package/dist/esm/types/core/numbers.d.ts +4 -9
- package/dist/esm/types/types/components.d.ts +2 -2
- package/dist/esm/types/types/index.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -6601,7 +6601,7 @@ var debounce$1 = /*@__PURE__*/getDefaultExportFromCjs(debounce_1);
|
|
|
6601
6601
|
* @param {string|number} tokenPrice - The price of one token in USD
|
|
6602
6602
|
* @returns {BigNumber} - The equivalent amount in USD
|
|
6603
6603
|
*/
|
|
6604
|
-
function convertTokenAmountToUSD(tokenAmount, tokenPrice, maxDecimals =
|
|
6604
|
+
function convertTokenAmountToUSD(tokenAmount, tokenPrice, maxDecimals = 4) {
|
|
6605
6605
|
if (!tokenAmount || !tokenPrice)
|
|
6606
6606
|
return "";
|
|
6607
6607
|
const amount = new BigNumber(tokenAmount);
|
|
@@ -6622,47 +6622,73 @@ function convertUSDToTokenAmount(usdAmount, tokenPrice, maxDecimals) {
|
|
|
6622
6622
|
const price = new BigNumber(tokenPrice);
|
|
6623
6623
|
return amount.dividedBy(price).decimalPlaces(maxDecimals).toString();
|
|
6624
6624
|
}
|
|
6625
|
-
const
|
|
6625
|
+
const MAX_TOKEN_DECIMALS = 8;
|
|
6626
|
+
const TOKEN_EXACT_AMOUNT_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6626
6627
|
minimumFractionDigits: 0,
|
|
6627
|
-
maximumFractionDigits:
|
|
6628
|
+
maximumFractionDigits: MAX_TOKEN_DECIMALS,
|
|
6629
|
+
});
|
|
6630
|
+
const TOKEN_ROUNDED_AMOUNT_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6631
|
+
minimumFractionDigits: 0,
|
|
6632
|
+
maximumFractionDigits: MAX_TOKEN_DECIMALS,
|
|
6628
6633
|
minimumSignificantDigits: 2,
|
|
6629
6634
|
maximumSignificantDigits: 4,
|
|
6630
6635
|
});
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6636
|
+
function formatTokenAmount(amount, { exact = true } = {}) {
|
|
6637
|
+
const numericAmount = parseFloat(amount || "0");
|
|
6638
|
+
if (numericAmount <= 0) {
|
|
6639
|
+
return "0";
|
|
6640
|
+
}
|
|
6641
|
+
// Check if numericAmount is less than the smallest displayable amount
|
|
6642
|
+
if (numericAmount < Math.pow(10, -MAX_TOKEN_DECIMALS)) {
|
|
6643
|
+
return `<${Math.pow(10, -MAX_TOKEN_DECIMALS).toFixed(MAX_TOKEN_DECIMALS)}`;
|
|
6644
|
+
}
|
|
6645
|
+
return exact
|
|
6646
|
+
? TOKEN_EXACT_AMOUNT_INTL_FORMATTER.format(numericAmount)
|
|
6647
|
+
: TOKEN_ROUNDED_AMOUNT_INTL_FORMATTER.format(numericAmount);
|
|
6639
6648
|
}
|
|
6640
|
-
|
|
6649
|
+
// For values below 100,000, use exact integer precision
|
|
6650
|
+
// e.g 1,234.56, 98,765.43
|
|
6651
|
+
const STANDARD_USD_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6641
6652
|
style: "currency",
|
|
6642
6653
|
currency: "USD",
|
|
6643
6654
|
minimumFractionDigits: 2,
|
|
6644
6655
|
maximumFractionDigits: 2,
|
|
6656
|
+
});
|
|
6657
|
+
// For values above 100,000, use compact notation
|
|
6658
|
+
// e.g $12,34K, $98,765.43M
|
|
6659
|
+
const COMPACT_USD_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6660
|
+
style: "currency",
|
|
6661
|
+
currency: "USD",
|
|
6645
6662
|
notation: "compact",
|
|
6646
6663
|
compactDisplay: "short",
|
|
6664
|
+
minimumFractionDigits: 2,
|
|
6665
|
+
maximumFractionDigits: 2,
|
|
6647
6666
|
});
|
|
6648
|
-
function formatUsdAmount(amount = "0", { includeSign = true
|
|
6667
|
+
function formatUsdAmount(amount = "0", { includeSign = true } = {}) {
|
|
6649
6668
|
const parsedAmount = Number(amount);
|
|
6650
|
-
if (parsedAmount <
|
|
6669
|
+
if (parsedAmount < 0.01 && parsedAmount > 0) {
|
|
6651
6670
|
return includeSign ? "<$0.01" : "<0.01";
|
|
6652
6671
|
}
|
|
6653
|
-
|
|
6654
|
-
|
|
6672
|
+
// Handle amounts less than 100,000 with exact integer precision
|
|
6673
|
+
if (parsedAmount < 100000) {
|
|
6674
|
+
return STANDARD_USD_INTL_FORMATTER.format(parsedAmount).replace(/^\$/, includeSign ? "$" : "");
|
|
6675
|
+
}
|
|
6676
|
+
// Handle amounts 100,000 or more with compact notation
|
|
6677
|
+
return COMPACT_USD_INTL_FORMATTER.format(parsedAmount).replace(/^\$/, includeSign ? "$" : "");
|
|
6655
6678
|
}
|
|
6656
6679
|
function trimExtraDecimals(value, maxDecimals) {
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
if (
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6680
|
+
const [integerPart = "0", decimalPart] = value.split(".");
|
|
6681
|
+
// Return just the integer part if maxDecimals is zero
|
|
6682
|
+
if (maxDecimals === 0) {
|
|
6683
|
+
return integerPart;
|
|
6684
|
+
}
|
|
6685
|
+
// Process decimals if present and maxDecimals is not zero
|
|
6686
|
+
if (decimalPart &&
|
|
6687
|
+
maxDecimals !== undefined &&
|
|
6688
|
+
decimalPart.length > maxDecimals) {
|
|
6689
|
+
return `${integerPart}.${decimalPart.slice(0, maxDecimals)}`;
|
|
6690
|
+
}
|
|
6691
|
+
// Return the original value if there are no excess decimals or maxDecimals is undefined
|
|
6666
6692
|
return value;
|
|
6667
6693
|
}
|
|
6668
6694
|
|
|
@@ -17887,9 +17913,8 @@ function NavigationBar(_a) {
|
|
|
17887
17913
|
: "tw-flex"), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
17888
17914
|
}
|
|
17889
17915
|
|
|
17890
|
-
function PipeSeparator(
|
|
17891
|
-
|
|
17892
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
|
|
17916
|
+
function PipeSeparator(props) {
|
|
17917
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", props.className) })));
|
|
17893
17918
|
}
|
|
17894
17919
|
|
|
17895
17920
|
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
@@ -18764,6 +18789,21 @@ function DropdownMenuItemWithSubmenu(_a) {
|
|
|
18764
18789
|
}, children: submenu })) })) }));
|
|
18765
18790
|
}
|
|
18766
18791
|
|
|
18792
|
+
function useOnClickOutside(callback, externalRef) {
|
|
18793
|
+
const internalRef = React$1.useRef(null);
|
|
18794
|
+
const ref = externalRef || internalRef;
|
|
18795
|
+
React$1.useEffect(() => {
|
|
18796
|
+
const handleMouseDown = (e) => {
|
|
18797
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
18798
|
+
callback();
|
|
18799
|
+
}
|
|
18800
|
+
};
|
|
18801
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
18802
|
+
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
18803
|
+
}, [callback, ref]);
|
|
18804
|
+
return { ref };
|
|
18805
|
+
}
|
|
18806
|
+
|
|
18767
18807
|
const dropdownPositionClassMap$1 = {
|
|
18768
18808
|
top: "tw-right-full tw-bottom-[50px]",
|
|
18769
18809
|
bottom: "tw-right-full tw-top-[50px]",
|
|
@@ -18779,6 +18819,14 @@ const collapsedListItemClassMap = {
|
|
|
18779
18819
|
};
|
|
18780
18820
|
function ListItem(_a) {
|
|
18781
18821
|
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuContent } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile", "extraPadding", "itemsContainerRef", "dropdownMenuContent"]);
|
|
18822
|
+
const { isDropdownOpen, dropdownRef, openDropdown, closeDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18823
|
+
itemsContainerRef,
|
|
18824
|
+
});
|
|
18825
|
+
useOnClickOutside(() => {
|
|
18826
|
+
if (isDropdownOpen) {
|
|
18827
|
+
closeDropdown();
|
|
18828
|
+
}
|
|
18829
|
+
}, itemRef);
|
|
18782
18830
|
const subtitleClassName = cn("tw-h-[14px] tw-max-w-full tw-truncate !tw-leading-[16px] tw-text-grey-500", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block");
|
|
18783
18831
|
// 'small' variant does not have detail
|
|
18784
18832
|
const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
@@ -18809,23 +18857,36 @@ function ListItem(_a) {
|
|
|
18809
18857
|
const isInteractive = !!props.onClick;
|
|
18810
18858
|
const ItemTag = isInteractive ? "button" : "div";
|
|
18811
18859
|
const itemProps = isInteractive ? props : {};
|
|
18812
|
-
const
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18860
|
+
const handleInteraction = (e) => {
|
|
18861
|
+
var _a;
|
|
18862
|
+
e.preventDefault();
|
|
18863
|
+
e.stopPropagation();
|
|
18864
|
+
if ("onClick" in props && e.type === "click") {
|
|
18865
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
18866
|
+
}
|
|
18867
|
+
};
|
|
18868
|
+
// Handle List item click, close dropdown if it's open
|
|
18869
|
+
const handleItemClick = (e) => {
|
|
18870
|
+
handleInteraction(e);
|
|
18871
|
+
if (isDropdownOpen)
|
|
18872
|
+
closeDropdown();
|
|
18873
|
+
};
|
|
18874
|
+
return (jsxRuntime.jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-highlight-adjacent tw-relative tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
18816
18875
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18817
|
-
: "tw-w-full", className), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon
|
|
18876
|
+
: "tw-w-full", className), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { onClick: handleItemClick, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon || (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon || (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs",
|
|
18818
18877
|
// 'large' variant has extra padding
|
|
18819
18878
|
size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (jsxRuntime.jsx(BodyText, { size: "small", className: cn("tw-max-w-full tw-truncate", subtitle && "tw-h-[17px] !tw-leading-[17px]", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block"), children: itemTitle })) : (itemTitle), size === "large" &&
|
|
18820
18879
|
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxRuntime.jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsxRuntime.jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (jsxRuntime.jsxs(DetailTag, Object.assign({}, detailProps, { className: cn("tw-flex tw-w-fit tw-items-center tw-justify-center tw-rounded-squid-xs", size === "large" ? "tw-h-squid-xl" : "tw-h-squid-l", showDetailOnHoverOnly
|
|
18821
18880
|
? "tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100"
|
|
18822
|
-
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] })))
|
|
18881
|
+
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))), !!dropdownMenuContent && (jsxRuntime.jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: (e) => {
|
|
18882
|
+
e.stopPropagation();
|
|
18883
|
+
isDropdownOpen ? closeDropdown() : openDropdown();
|
|
18884
|
+
}, isActive: isDropdownOpen, className: "tw-z-20 peer-hover/list-item:tw-opacity-100" }))] })), isDropdownOpen && !!dropdownMenuContent ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
|
|
18823
18885
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18824
18886
|
}
|
|
18825
|
-
const ListItemActionsButton = React$1.forwardRef((
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
: "tw-opacity-0", props.className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18887
|
+
const ListItemActionsButton = React$1.forwardRef((_a, ref) => {
|
|
18888
|
+
var { isActive, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
18889
|
+
return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, className: cn("tw-peer tw-absolute tw-right-squid-s tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-p-2 tw-text-grey-300 hover:tw-bg-material-light-thin hover:tw-opacity-100 focus-visible:tw-opacity-100", isActive ? "tw-bg-material-light-thin tw-opacity-100" : "tw-opacity-0", className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18829
18890
|
});
|
|
18830
18891
|
|
|
18831
18892
|
const dropdownPositionClassMap = {
|
|
@@ -19241,6 +19302,7 @@ const SwapStepsCollapsed = React$1.forwardRef((props, ref) => {
|
|
|
19241
19302
|
// show separator for all steps except the first one
|
|
19242
19303
|
showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? "pending" : step.status }, index))) }), jsxRuntime.jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full", containerClassName: "tw-w-full" }) })] }) })] }) }) }));
|
|
19243
19304
|
});
|
|
19305
|
+
SwapStepsCollapsed.displayName = "SwapStepsCollapsed";
|
|
19244
19306
|
|
|
19245
19307
|
const WIDTH_SM = "69";
|
|
19246
19308
|
const HEIGHT_SM = "31";
|
|
@@ -25001,20 +25063,6 @@ function DayPicker(props) {
|
|
|
25001
25063
|
return (jsxRuntime.jsx(RootProvider, __assign({}, props, { children: jsxRuntime.jsx(Root, { initialProps: props }) })));
|
|
25002
25064
|
}
|
|
25003
25065
|
|
|
25004
|
-
function useOnClickOutside(callback) {
|
|
25005
|
-
const ref = React$1.useRef(null);
|
|
25006
|
-
React$1.useEffect(() => {
|
|
25007
|
-
const handleClick = (e) => {
|
|
25008
|
-
if (ref.current && !ref.current.contains(e.target)) {
|
|
25009
|
-
callback();
|
|
25010
|
-
}
|
|
25011
|
-
};
|
|
25012
|
-
document.addEventListener("click", handleClick);
|
|
25013
|
-
return () => document.removeEventListener("click", handleClick);
|
|
25014
|
-
}, [callback]);
|
|
25015
|
-
return { ref };
|
|
25016
|
-
}
|
|
25017
|
-
|
|
25018
25066
|
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status = [], setStatus, chains, }) {
|
|
25019
25067
|
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxRuntime.jsx(FilterSection, { title: "Chain", children: jsxRuntime.jsx(ChainsFilter, { chainType: chainType, setChainType: setChainType, chain: chain, setChain: setChain, chains: chains }) }), jsxRuntime.jsx(FilterSection, { title: "Date", initCollapsed: true, children: jsxRuntime.jsx(DateFilters, { fromDate: fromDate, setFromDate: setFromDate, toDate: toDate, setToDate: setToDate }) }), jsxRuntime.jsx(FilterSection, { title: "Status", initCollapsed: true, children: jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: ["success", "ongoing", "error"].map((s) => (jsxRuntime.jsx(StatusFilter, { status: s, selected: status.length === 0 || status.includes(s), onChange: () => setStatus(arrayToggle(status, s)), icon: s === "ongoing" ? jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {}) : undefined }, s))) }) })] }));
|
|
25020
25068
|
}
|
|
@@ -25196,7 +25244,9 @@ function PopLayout(props) {
|
|
|
25196
25244
|
}
|
|
25197
25245
|
|
|
25198
25246
|
function Toast({ headerContent, actionsContent, description, chipLabel, title, }) {
|
|
25199
|
-
return (jsxRuntime.jsxs(Menu, { contentClassName: "tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs",
|
|
25247
|
+
return (jsxRuntime.jsxs(Menu, { contentClassName: "tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", contentWrapperProps: {
|
|
25248
|
+
className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs",
|
|
25249
|
+
}, rounded: "sm", children: [headerContent, jsxRuntime.jsx("header", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-0 tw-py-squid-xxs", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-100", children: title }) }), jsxRuntime.jsx(CaptionText, { className: "tw-text-center tw-text-material-light-thick", children: description }), jsxRuntime.jsx("menu", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: actionsContent }), chipLabel && (jsxRuntime.jsx(Chip, { label: chipLabel, className: "tw-absolute tw-right-squid-xs tw-top-squid-xs" }))] }));
|
|
25200
25250
|
}
|
|
25201
25251
|
|
|
25202
25252
|
var lib = {};
|
|
@@ -26310,10 +26360,7 @@ const tooltipThresholdPaddingMap = {
|
|
|
26310
26360
|
xl: "40px",
|
|
26311
26361
|
xxl: "60px",
|
|
26312
26362
|
};
|
|
26313
|
-
const TooltipContainer = (
|
|
26314
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
26315
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-relative", className) })));
|
|
26316
|
-
};
|
|
26363
|
+
const TooltipContainer = (props) => (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-relative", props.className) })));
|
|
26317
26364
|
const TooltipTriggerWrapper = (_a) => {
|
|
26318
26365
|
var { elementRef } = _a, props = __rest$1(_a, ["elementRef"]);
|
|
26319
26366
|
return jsxRuntime.jsx("div", Object.assign({}, props, { ref: elementRef }));
|
|
@@ -26520,7 +26567,7 @@ function NumericInput(_a) {
|
|
|
26520
26567
|
onAmountChange,
|
|
26521
26568
|
]);
|
|
26522
26569
|
const handleInputChange = (e) => {
|
|
26523
|
-
|
|
26570
|
+
const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
|
|
26524
26571
|
const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
|
|
26525
26572
|
const isValidAmount = new RegExp(`^\\d*\\.?\\d{0,${maxDecimalsForInputType}}$`).test(value);
|
|
26526
26573
|
if (isValidAmount) {
|
|
@@ -62030,7 +62077,7 @@ const getSwapProgressTitle = ({ fromToken, toToken, swapState, }) => {
|
|
|
62030
62077
|
return "Needs gas on destination";
|
|
62031
62078
|
}
|
|
62032
62079
|
};
|
|
62033
|
-
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, }) => {
|
|
62080
|
+
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, }) => {
|
|
62034
62081
|
switch (swapState) {
|
|
62035
62082
|
case SwapState.CONFIRM: {
|
|
62036
62083
|
return "Authenticate the transaction in your wallet.";
|
|
@@ -62051,7 +62098,7 @@ const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, to
|
|
|
62051
62098
|
return "You declined the transaction in your wallet.";
|
|
62052
62099
|
}
|
|
62053
62100
|
case SwapState.PARTIAL_SUCCESS: {
|
|
62054
|
-
return `You received a refund of
|
|
62101
|
+
return `You received a refund of ${refundTokenSymbol} to your wallet ${toAddressFormatted} on ${toChain === null || toChain === void 0 ? void 0 : toChain.networkName}.`;
|
|
62055
62102
|
}
|
|
62056
62103
|
case SwapState.NEEDS_GAS: {
|
|
62057
62104
|
return "Add gas to the transaction via Axelarscan to complete the swap";
|
|
@@ -62068,7 +62115,7 @@ const swapProgressButtonTexts = {
|
|
|
62068
62115
|
[SwapState.PARTIAL_SUCCESS]: "Cancel",
|
|
62069
62116
|
[SwapState.NEEDS_GAS]: "Go to Axelarscan",
|
|
62070
62117
|
};
|
|
62071
|
-
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }) {
|
|
62118
|
+
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }) {
|
|
62072
62119
|
const [showSwapInfoSection, setShowSwapInfoSection] = React$1.useState(true);
|
|
62073
62120
|
const isFirstRenderRef = React$1.useRef(true);
|
|
62074
62121
|
const { timer, stopTimer, startTimer } = useTimer({
|
|
@@ -62098,6 +62145,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
62098
62145
|
toChain,
|
|
62099
62146
|
toToken,
|
|
62100
62147
|
toAddressFormatted,
|
|
62148
|
+
refundTokenSymbol,
|
|
62101
62149
|
});
|
|
62102
62150
|
return {
|
|
62103
62151
|
headerTitle,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
export declare function PipeSeparator(
|
|
2
|
+
export declare function PipeSeparator(props: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useOnClickOutside(callback: () => void): {
|
|
3
|
-
ref:
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export declare function useOnClickOutside(callback: () => void, externalRef?: RefObject<HTMLElement>): {
|
|
3
|
+
ref: RefObject<HTMLElement>;
|
|
4
4
|
};
|
|
@@ -3,14 +3,13 @@ import { SwapStepsCollapsedFooterButton } from "../layout/SwapStepsCollapsed";
|
|
|
3
3
|
type ChainData = {
|
|
4
4
|
networkName: string;
|
|
5
5
|
logoUrl: string;
|
|
6
|
-
bgColor: string;
|
|
7
6
|
};
|
|
8
7
|
type Token = {
|
|
9
8
|
symbol: string;
|
|
10
9
|
logoUrl: string;
|
|
11
10
|
bgColor: string;
|
|
12
11
|
};
|
|
13
|
-
export declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }: {
|
|
12
|
+
export declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }: {
|
|
14
13
|
steps: SwapStep[];
|
|
15
14
|
handleClose?: (swapState: SwapState) => void;
|
|
16
15
|
handleComplete?: () => void;
|
|
@@ -28,5 +27,6 @@ export declare function SwapProgressView({ steps, isOpen, handleClose, handleCom
|
|
|
28
27
|
swapState: SwapState;
|
|
29
28
|
estimatedTimeToComplete?: string;
|
|
30
29
|
footerButton?: SwapStepsCollapsedFooterButton;
|
|
30
|
+
refundTokenSymbol?: string;
|
|
31
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -13,17 +13,12 @@ export declare function convertTokenAmountToUSD(tokenAmount: string | number, to
|
|
|
13
13
|
* @returns {BigNumber} - The equivalent amount of tokens
|
|
14
14
|
*/
|
|
15
15
|
export declare function convertUSDToTokenAmount(usdAmount: string | number, tokenPrice: string | number, maxDecimals: number): string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @param amount - The number to format
|
|
20
|
-
* @returns The formatted string
|
|
21
|
-
*/
|
|
22
|
-
export declare function formatTokenAmount(amount?: number | bigint | string): string;
|
|
16
|
+
export declare function formatTokenAmount(amount: string, { exact }?: {
|
|
17
|
+
exact?: boolean | undefined;
|
|
18
|
+
}): string;
|
|
23
19
|
interface FormatUsdAmountOptions {
|
|
24
20
|
includeSign?: boolean;
|
|
25
|
-
formatIfVerySmall?: number;
|
|
26
21
|
}
|
|
27
|
-
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign
|
|
22
|
+
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign }?: FormatUsdAmountOptions): string;
|
|
28
23
|
export declare function trimExtraDecimals(value: string, maxDecimals?: number): string;
|
|
29
24
|
export {};
|
|
@@ -13,11 +13,11 @@ export type DescriptionBlock = {
|
|
|
13
13
|
value: string;
|
|
14
14
|
rounded?: boolean;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export interface SwapStep {
|
|
17
17
|
descriptionBlocks: DescriptionBlock[];
|
|
18
18
|
link?: string;
|
|
19
19
|
status: ActionStatus;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
export declare enum SwapState {
|
|
22
22
|
CONFIRM = 0,
|
|
23
23
|
PROGRESS = 1,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { SquidTheme } from "./config";
|
|
2
2
|
export * from "./utils";
|
|
3
|
-
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, } from "./components";
|
|
3
|
+
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, DescriptionBlock, } from "./components";
|
package/dist/esm/index.js
CHANGED
|
@@ -6581,7 +6581,7 @@ var debounce$1 = /*@__PURE__*/getDefaultExportFromCjs(debounce_1);
|
|
|
6581
6581
|
* @param {string|number} tokenPrice - The price of one token in USD
|
|
6582
6582
|
* @returns {BigNumber} - The equivalent amount in USD
|
|
6583
6583
|
*/
|
|
6584
|
-
function convertTokenAmountToUSD(tokenAmount, tokenPrice, maxDecimals =
|
|
6584
|
+
function convertTokenAmountToUSD(tokenAmount, tokenPrice, maxDecimals = 4) {
|
|
6585
6585
|
if (!tokenAmount || !tokenPrice)
|
|
6586
6586
|
return "";
|
|
6587
6587
|
const amount = new BigNumber(tokenAmount);
|
|
@@ -6602,47 +6602,73 @@ function convertUSDToTokenAmount(usdAmount, tokenPrice, maxDecimals) {
|
|
|
6602
6602
|
const price = new BigNumber(tokenPrice);
|
|
6603
6603
|
return amount.dividedBy(price).decimalPlaces(maxDecimals).toString();
|
|
6604
6604
|
}
|
|
6605
|
-
const
|
|
6605
|
+
const MAX_TOKEN_DECIMALS = 8;
|
|
6606
|
+
const TOKEN_EXACT_AMOUNT_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6606
6607
|
minimumFractionDigits: 0,
|
|
6607
|
-
maximumFractionDigits:
|
|
6608
|
+
maximumFractionDigits: MAX_TOKEN_DECIMALS,
|
|
6609
|
+
});
|
|
6610
|
+
const TOKEN_ROUNDED_AMOUNT_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6611
|
+
minimumFractionDigits: 0,
|
|
6612
|
+
maximumFractionDigits: MAX_TOKEN_DECIMALS,
|
|
6608
6613
|
minimumSignificantDigits: 2,
|
|
6609
6614
|
maximumSignificantDigits: 4,
|
|
6610
6615
|
});
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6616
|
+
function formatTokenAmount(amount, { exact = true } = {}) {
|
|
6617
|
+
const numericAmount = parseFloat(amount || "0");
|
|
6618
|
+
if (numericAmount <= 0) {
|
|
6619
|
+
return "0";
|
|
6620
|
+
}
|
|
6621
|
+
// Check if numericAmount is less than the smallest displayable amount
|
|
6622
|
+
if (numericAmount < Math.pow(10, -MAX_TOKEN_DECIMALS)) {
|
|
6623
|
+
return `<${Math.pow(10, -MAX_TOKEN_DECIMALS).toFixed(MAX_TOKEN_DECIMALS)}`;
|
|
6624
|
+
}
|
|
6625
|
+
return exact
|
|
6626
|
+
? TOKEN_EXACT_AMOUNT_INTL_FORMATTER.format(numericAmount)
|
|
6627
|
+
: TOKEN_ROUNDED_AMOUNT_INTL_FORMATTER.format(numericAmount);
|
|
6619
6628
|
}
|
|
6620
|
-
|
|
6629
|
+
// For values below 100,000, use exact integer precision
|
|
6630
|
+
// e.g 1,234.56, 98,765.43
|
|
6631
|
+
const STANDARD_USD_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6621
6632
|
style: "currency",
|
|
6622
6633
|
currency: "USD",
|
|
6623
6634
|
minimumFractionDigits: 2,
|
|
6624
6635
|
maximumFractionDigits: 2,
|
|
6636
|
+
});
|
|
6637
|
+
// For values above 100,000, use compact notation
|
|
6638
|
+
// e.g $12,34K, $98,765.43M
|
|
6639
|
+
const COMPACT_USD_INTL_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
6640
|
+
style: "currency",
|
|
6641
|
+
currency: "USD",
|
|
6625
6642
|
notation: "compact",
|
|
6626
6643
|
compactDisplay: "short",
|
|
6644
|
+
minimumFractionDigits: 2,
|
|
6645
|
+
maximumFractionDigits: 2,
|
|
6627
6646
|
});
|
|
6628
|
-
function formatUsdAmount(amount = "0", { includeSign = true
|
|
6647
|
+
function formatUsdAmount(amount = "0", { includeSign = true } = {}) {
|
|
6629
6648
|
const parsedAmount = Number(amount);
|
|
6630
|
-
if (parsedAmount <
|
|
6649
|
+
if (parsedAmount < 0.01 && parsedAmount > 0) {
|
|
6631
6650
|
return includeSign ? "<$0.01" : "<0.01";
|
|
6632
6651
|
}
|
|
6633
|
-
|
|
6634
|
-
|
|
6652
|
+
// Handle amounts less than 100,000 with exact integer precision
|
|
6653
|
+
if (parsedAmount < 100000) {
|
|
6654
|
+
return STANDARD_USD_INTL_FORMATTER.format(parsedAmount).replace(/^\$/, includeSign ? "$" : "");
|
|
6655
|
+
}
|
|
6656
|
+
// Handle amounts 100,000 or more with compact notation
|
|
6657
|
+
return COMPACT_USD_INTL_FORMATTER.format(parsedAmount).replace(/^\$/, includeSign ? "$" : "");
|
|
6635
6658
|
}
|
|
6636
6659
|
function trimExtraDecimals(value, maxDecimals) {
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
if (
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6660
|
+
const [integerPart = "0", decimalPart] = value.split(".");
|
|
6661
|
+
// Return just the integer part if maxDecimals is zero
|
|
6662
|
+
if (maxDecimals === 0) {
|
|
6663
|
+
return integerPart;
|
|
6664
|
+
}
|
|
6665
|
+
// Process decimals if present and maxDecimals is not zero
|
|
6666
|
+
if (decimalPart &&
|
|
6667
|
+
maxDecimals !== undefined &&
|
|
6668
|
+
decimalPart.length > maxDecimals) {
|
|
6669
|
+
return `${integerPart}.${decimalPart.slice(0, maxDecimals)}`;
|
|
6670
|
+
}
|
|
6671
|
+
// Return the original value if there are no excess decimals or maxDecimals is undefined
|
|
6646
6672
|
return value;
|
|
6647
6673
|
}
|
|
6648
6674
|
|
|
@@ -17867,9 +17893,8 @@ function NavigationBar(_a) {
|
|
|
17867
17893
|
: "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
17868
17894
|
}
|
|
17869
17895
|
|
|
17870
|
-
function PipeSeparator(
|
|
17871
|
-
|
|
17872
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
|
|
17896
|
+
function PipeSeparator(props) {
|
|
17897
|
+
return (jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", props.className) })));
|
|
17873
17898
|
}
|
|
17874
17899
|
|
|
17875
17900
|
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
@@ -18744,6 +18769,21 @@ function DropdownMenuItemWithSubmenu(_a) {
|
|
|
18744
18769
|
}, children: submenu })) })) }));
|
|
18745
18770
|
}
|
|
18746
18771
|
|
|
18772
|
+
function useOnClickOutside(callback, externalRef) {
|
|
18773
|
+
const internalRef = useRef(null);
|
|
18774
|
+
const ref = externalRef || internalRef;
|
|
18775
|
+
useEffect(() => {
|
|
18776
|
+
const handleMouseDown = (e) => {
|
|
18777
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
18778
|
+
callback();
|
|
18779
|
+
}
|
|
18780
|
+
};
|
|
18781
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
18782
|
+
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
18783
|
+
}, [callback, ref]);
|
|
18784
|
+
return { ref };
|
|
18785
|
+
}
|
|
18786
|
+
|
|
18747
18787
|
const dropdownPositionClassMap$1 = {
|
|
18748
18788
|
top: "tw-right-full tw-bottom-[50px]",
|
|
18749
18789
|
bottom: "tw-right-full tw-top-[50px]",
|
|
@@ -18759,6 +18799,14 @@ const collapsedListItemClassMap = {
|
|
|
18759
18799
|
};
|
|
18760
18800
|
function ListItem(_a) {
|
|
18761
18801
|
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuContent } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile", "extraPadding", "itemsContainerRef", "dropdownMenuContent"]);
|
|
18802
|
+
const { isDropdownOpen, dropdownRef, openDropdown, closeDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18803
|
+
itemsContainerRef,
|
|
18804
|
+
});
|
|
18805
|
+
useOnClickOutside(() => {
|
|
18806
|
+
if (isDropdownOpen) {
|
|
18807
|
+
closeDropdown();
|
|
18808
|
+
}
|
|
18809
|
+
}, itemRef);
|
|
18762
18810
|
const subtitleClassName = cn("tw-h-[14px] tw-max-w-full tw-truncate !tw-leading-[16px] tw-text-grey-500", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block");
|
|
18763
18811
|
// 'small' variant does not have detail
|
|
18764
18812
|
const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
@@ -18789,23 +18837,36 @@ function ListItem(_a) {
|
|
|
18789
18837
|
const isInteractive = !!props.onClick;
|
|
18790
18838
|
const ItemTag = isInteractive ? "button" : "div";
|
|
18791
18839
|
const itemProps = isInteractive ? props : {};
|
|
18792
|
-
const
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18840
|
+
const handleInteraction = (e) => {
|
|
18841
|
+
var _a;
|
|
18842
|
+
e.preventDefault();
|
|
18843
|
+
e.stopPropagation();
|
|
18844
|
+
if ("onClick" in props && e.type === "click") {
|
|
18845
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
18846
|
+
}
|
|
18847
|
+
};
|
|
18848
|
+
// Handle List item click, close dropdown if it's open
|
|
18849
|
+
const handleItemClick = (e) => {
|
|
18850
|
+
handleInteraction(e);
|
|
18851
|
+
if (isDropdownOpen)
|
|
18852
|
+
closeDropdown();
|
|
18853
|
+
};
|
|
18854
|
+
return (jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-highlight-adjacent tw-relative tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
18796
18855
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18797
|
-
: "tw-w-full", className), children: [jsxs(ItemTag, Object.assign({}, itemProps, { className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon
|
|
18856
|
+
: "tw-w-full", className), children: [jsxs(ItemTag, Object.assign({}, itemProps, { onClick: handleItemClick, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon || (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon || (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxs("div", { className: cn("tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs",
|
|
18798
18857
|
// 'large' variant has extra padding
|
|
18799
18858
|
size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (jsx(BodyText, { size: "small", className: cn("tw-max-w-full tw-truncate", subtitle && "tw-h-[17px] !tw-leading-[17px]", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block"), children: itemTitle })) : (itemTitle), size === "large" &&
|
|
18800
18859
|
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (jsxs(DetailTag, Object.assign({}, detailProps, { className: cn("tw-flex tw-w-fit tw-items-center tw-justify-center tw-rounded-squid-xs", size === "large" ? "tw-h-squid-xl" : "tw-h-squid-l", showDetailOnHoverOnly
|
|
18801
18860
|
? "tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100"
|
|
18802
|
-
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] })))
|
|
18861
|
+
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))), !!dropdownMenuContent && (jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: (e) => {
|
|
18862
|
+
e.stopPropagation();
|
|
18863
|
+
isDropdownOpen ? closeDropdown() : openDropdown();
|
|
18864
|
+
}, isActive: isDropdownOpen, className: "tw-z-20 peer-hover/list-item:tw-opacity-100" }))] })), isDropdownOpen && !!dropdownMenuContent ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
|
|
18803
18865
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18804
18866
|
}
|
|
18805
|
-
const ListItemActionsButton = forwardRef((
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
: "tw-opacity-0", props.className), children: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18867
|
+
const ListItemActionsButton = forwardRef((_a, ref) => {
|
|
18868
|
+
var { isActive, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
18869
|
+
return (jsx("button", Object.assign({}, props, { ref: ref, className: cn("tw-peer tw-absolute tw-right-squid-s tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-p-2 tw-text-grey-300 hover:tw-bg-material-light-thin hover:tw-opacity-100 focus-visible:tw-opacity-100", isActive ? "tw-bg-material-light-thin tw-opacity-100" : "tw-opacity-0", className), children: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18809
18870
|
});
|
|
18810
18871
|
|
|
18811
18872
|
const dropdownPositionClassMap = {
|
|
@@ -19221,6 +19282,7 @@ const SwapStepsCollapsed = forwardRef((props, ref) => {
|
|
|
19221
19282
|
// show separator for all steps except the first one
|
|
19222
19283
|
showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? "pending" : step.status }, index))) }), jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full", containerClassName: "tw-w-full" }) })] }) })] }) }) }));
|
|
19223
19284
|
});
|
|
19285
|
+
SwapStepsCollapsed.displayName = "SwapStepsCollapsed";
|
|
19224
19286
|
|
|
19225
19287
|
const WIDTH_SM = "69";
|
|
19226
19288
|
const HEIGHT_SM = "31";
|
|
@@ -24981,20 +25043,6 @@ function DayPicker(props) {
|
|
|
24981
25043
|
return (jsx(RootProvider, __assign({}, props, { children: jsx(Root, { initialProps: props }) })));
|
|
24982
25044
|
}
|
|
24983
25045
|
|
|
24984
|
-
function useOnClickOutside(callback) {
|
|
24985
|
-
const ref = useRef(null);
|
|
24986
|
-
useEffect(() => {
|
|
24987
|
-
const handleClick = (e) => {
|
|
24988
|
-
if (ref.current && !ref.current.contains(e.target)) {
|
|
24989
|
-
callback();
|
|
24990
|
-
}
|
|
24991
|
-
};
|
|
24992
|
-
document.addEventListener("click", handleClick);
|
|
24993
|
-
return () => document.removeEventListener("click", handleClick);
|
|
24994
|
-
}, [callback]);
|
|
24995
|
-
return { ref };
|
|
24996
|
-
}
|
|
24997
|
-
|
|
24998
25046
|
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status = [], setStatus, chains, }) {
|
|
24999
25047
|
return (jsxs("div", { className: "tw-flex tw-flex-col", children: [jsx(FilterSection, { title: "Chain", children: jsx(ChainsFilter, { chainType: chainType, setChainType: setChainType, chain: chain, setChain: setChain, chains: chains }) }), jsx(FilterSection, { title: "Date", initCollapsed: true, children: jsx(DateFilters, { fromDate: fromDate, setFromDate: setFromDate, toDate: toDate, setToDate: setToDate }) }), jsx(FilterSection, { title: "Status", initCollapsed: true, children: jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: ["success", "ongoing", "error"].map((s) => (jsx(StatusFilter, { status: s, selected: status.length === 0 || status.includes(s), onChange: () => setStatus(arrayToggle(status, s)), icon: s === "ongoing" ? jsx(DotGrid1x3HorizontalIcon, {}) : undefined }, s))) }) })] }));
|
|
25000
25048
|
}
|
|
@@ -25176,7 +25224,9 @@ function PopLayout(props) {
|
|
|
25176
25224
|
}
|
|
25177
25225
|
|
|
25178
25226
|
function Toast({ headerContent, actionsContent, description, chipLabel, title, }) {
|
|
25179
|
-
return (jsxs(Menu, { contentClassName: "tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs",
|
|
25227
|
+
return (jsxs(Menu, { contentClassName: "tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", contentWrapperProps: {
|
|
25228
|
+
className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs",
|
|
25229
|
+
}, rounded: "sm", children: [headerContent, jsx("header", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-0 tw-py-squid-xxs", children: jsx(BodyText, { size: "small", className: "tw-text-grey-100", children: title }) }), jsx(CaptionText, { className: "tw-text-center tw-text-material-light-thick", children: description }), jsx("menu", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: actionsContent }), chipLabel && (jsx(Chip, { label: chipLabel, className: "tw-absolute tw-right-squid-xs tw-top-squid-xs" }))] }));
|
|
25180
25230
|
}
|
|
25181
25231
|
|
|
25182
25232
|
var lib = {};
|
|
@@ -26290,10 +26340,7 @@ const tooltipThresholdPaddingMap = {
|
|
|
26290
26340
|
xl: "40px",
|
|
26291
26341
|
xxl: "60px",
|
|
26292
26342
|
};
|
|
26293
|
-
const TooltipContainer = (
|
|
26294
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
26295
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-relative", className) })));
|
|
26296
|
-
};
|
|
26343
|
+
const TooltipContainer = (props) => (jsx("div", Object.assign({}, props, { className: cn("tw-relative", props.className) })));
|
|
26297
26344
|
const TooltipTriggerWrapper = (_a) => {
|
|
26298
26345
|
var { elementRef } = _a, props = __rest$1(_a, ["elementRef"]);
|
|
26299
26346
|
return jsx("div", Object.assign({}, props, { ref: elementRef }));
|
|
@@ -26500,7 +26547,7 @@ function NumericInput(_a) {
|
|
|
26500
26547
|
onAmountChange,
|
|
26501
26548
|
]);
|
|
26502
26549
|
const handleInputChange = (e) => {
|
|
26503
|
-
|
|
26550
|
+
const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
|
|
26504
26551
|
const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
|
|
26505
26552
|
const isValidAmount = new RegExp(`^\\d*\\.?\\d{0,${maxDecimalsForInputType}}$`).test(value);
|
|
26506
26553
|
if (isValidAmount) {
|
|
@@ -62010,7 +62057,7 @@ const getSwapProgressTitle = ({ fromToken, toToken, swapState, }) => {
|
|
|
62010
62057
|
return "Needs gas on destination";
|
|
62011
62058
|
}
|
|
62012
62059
|
};
|
|
62013
|
-
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, }) => {
|
|
62060
|
+
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, }) => {
|
|
62014
62061
|
switch (swapState) {
|
|
62015
62062
|
case SwapState.CONFIRM: {
|
|
62016
62063
|
return "Authenticate the transaction in your wallet.";
|
|
@@ -62031,7 +62078,7 @@ const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, to
|
|
|
62031
62078
|
return "You declined the transaction in your wallet.";
|
|
62032
62079
|
}
|
|
62033
62080
|
case SwapState.PARTIAL_SUCCESS: {
|
|
62034
|
-
return `You received a refund of
|
|
62081
|
+
return `You received a refund of ${refundTokenSymbol} to your wallet ${toAddressFormatted} on ${toChain === null || toChain === void 0 ? void 0 : toChain.networkName}.`;
|
|
62035
62082
|
}
|
|
62036
62083
|
case SwapState.NEEDS_GAS: {
|
|
62037
62084
|
return "Add gas to the transaction via Axelarscan to complete the swap";
|
|
@@ -62048,7 +62095,7 @@ const swapProgressButtonTexts = {
|
|
|
62048
62095
|
[SwapState.PARTIAL_SUCCESS]: "Cancel",
|
|
62049
62096
|
[SwapState.NEEDS_GAS]: "Go to Axelarscan",
|
|
62050
62097
|
};
|
|
62051
|
-
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }) {
|
|
62098
|
+
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }) {
|
|
62052
62099
|
const [showSwapInfoSection, setShowSwapInfoSection] = useState(true);
|
|
62053
62100
|
const isFirstRenderRef = useRef(true);
|
|
62054
62101
|
const { timer, stopTimer, startTimer } = useTimer({
|
|
@@ -62078,6 +62125,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
62078
62125
|
toChain,
|
|
62079
62126
|
toToken,
|
|
62080
62127
|
toAddressFormatted,
|
|
62128
|
+
refundTokenSymbol,
|
|
62081
62129
|
});
|
|
62082
62130
|
return {
|
|
62083
62131
|
headerTitle,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
export declare function PipeSeparator(
|
|
2
|
+
export declare function PipeSeparator(props: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useOnClickOutside(callback: () => void): {
|
|
3
|
-
ref:
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export declare function useOnClickOutside(callback: () => void, externalRef?: RefObject<HTMLElement>): {
|
|
3
|
+
ref: RefObject<HTMLElement>;
|
|
4
4
|
};
|
|
@@ -3,14 +3,13 @@ import { SwapStepsCollapsedFooterButton } from "../layout/SwapStepsCollapsed";
|
|
|
3
3
|
type ChainData = {
|
|
4
4
|
networkName: string;
|
|
5
5
|
logoUrl: string;
|
|
6
|
-
bgColor: string;
|
|
7
6
|
};
|
|
8
7
|
type Token = {
|
|
9
8
|
symbol: string;
|
|
10
9
|
logoUrl: string;
|
|
11
10
|
bgColor: string;
|
|
12
11
|
};
|
|
13
|
-
export declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }: {
|
|
12
|
+
export declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }: {
|
|
14
13
|
steps: SwapStep[];
|
|
15
14
|
handleClose?: (swapState: SwapState) => void;
|
|
16
15
|
handleComplete?: () => void;
|
|
@@ -28,5 +27,6 @@ export declare function SwapProgressView({ steps, isOpen, handleClose, handleCom
|
|
|
28
27
|
swapState: SwapState;
|
|
29
28
|
estimatedTimeToComplete?: string;
|
|
30
29
|
footerButton?: SwapStepsCollapsedFooterButton;
|
|
30
|
+
refundTokenSymbol?: string;
|
|
31
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -13,17 +13,12 @@ export declare function convertTokenAmountToUSD(tokenAmount: string | number, to
|
|
|
13
13
|
* @returns {BigNumber} - The equivalent amount of tokens
|
|
14
14
|
*/
|
|
15
15
|
export declare function convertUSDToTokenAmount(usdAmount: string | number, tokenPrice: string | number, maxDecimals: number): string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @param amount - The number to format
|
|
20
|
-
* @returns The formatted string
|
|
21
|
-
*/
|
|
22
|
-
export declare function formatTokenAmount(amount?: number | bigint | string): string;
|
|
16
|
+
export declare function formatTokenAmount(amount: string, { exact }?: {
|
|
17
|
+
exact?: boolean | undefined;
|
|
18
|
+
}): string;
|
|
23
19
|
interface FormatUsdAmountOptions {
|
|
24
20
|
includeSign?: boolean;
|
|
25
|
-
formatIfVerySmall?: number;
|
|
26
21
|
}
|
|
27
|
-
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign
|
|
22
|
+
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign }?: FormatUsdAmountOptions): string;
|
|
28
23
|
export declare function trimExtraDecimals(value: string, maxDecimals?: number): string;
|
|
29
24
|
export {};
|
|
@@ -13,11 +13,11 @@ export type DescriptionBlock = {
|
|
|
13
13
|
value: string;
|
|
14
14
|
rounded?: boolean;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export interface SwapStep {
|
|
17
17
|
descriptionBlocks: DescriptionBlock[];
|
|
18
18
|
link?: string;
|
|
19
19
|
status: ActionStatus;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
export declare enum SwapState {
|
|
22
22
|
CONFIRM = 0,
|
|
23
23
|
PROGRESS = 1,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { SquidTheme } from "./config";
|
|
2
2
|
export * from "./utils";
|
|
3
|
-
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, } from "./components";
|
|
3
|
+
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, DescriptionBlock, } from "./components";
|
package/dist/index.d.ts
CHANGED
|
@@ -37,11 +37,11 @@ type DescriptionBlock = {
|
|
|
37
37
|
value: string;
|
|
38
38
|
rounded?: boolean;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
interface SwapStep {
|
|
41
41
|
descriptionBlocks: DescriptionBlock[];
|
|
42
42
|
link?: string;
|
|
43
43
|
status: ActionStatus;
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
declare enum SwapState {
|
|
46
46
|
CONFIRM = 0,
|
|
47
47
|
PROGRESS = 1,
|
|
@@ -1456,7 +1456,7 @@ interface NavigationBarProps extends React.ComponentProps<"nav"> {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, onBackButtonClick, actions, isLoading, ...props }: NavigationBarProps): react_jsx_runtime.JSX.Element;
|
|
1458
1458
|
|
|
1459
|
-
declare function PipeSeparator(
|
|
1459
|
+
declare function PipeSeparator(props: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1460
1460
|
|
|
1461
1461
|
interface CollapsibleMenuProps {
|
|
1462
1462
|
menuRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
@@ -2382,14 +2382,13 @@ declare function SwapDetailsView({ isLoading, canToggleBoostMode, }: {
|
|
|
2382
2382
|
type ChainData = {
|
|
2383
2383
|
networkName: string;
|
|
2384
2384
|
logoUrl: string;
|
|
2385
|
-
bgColor: string;
|
|
2386
2385
|
};
|
|
2387
2386
|
type Token = {
|
|
2388
2387
|
symbol: string;
|
|
2389
2388
|
logoUrl: string;
|
|
2390
2389
|
bgColor: string;
|
|
2391
2390
|
};
|
|
2392
|
-
declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }: {
|
|
2391
|
+
declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }: {
|
|
2393
2392
|
steps: SwapStep[];
|
|
2394
2393
|
handleClose?: (swapState: SwapState) => void;
|
|
2395
2394
|
handleComplete?: () => void;
|
|
@@ -2407,6 +2406,7 @@ declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete,
|
|
|
2407
2406
|
swapState: SwapState;
|
|
2408
2407
|
estimatedTimeToComplete?: string;
|
|
2409
2408
|
footerButton?: SwapStepsCollapsedFooterButton;
|
|
2409
|
+
refundTokenSymbol?: string;
|
|
2410
2410
|
}): react_jsx_runtime.JSX.Element;
|
|
2411
2411
|
|
|
2412
2412
|
interface BaseTransactionViewProps {
|
|
@@ -2654,4 +2654,4 @@ declare const baseTailwindConfig: Config;
|
|
|
2654
2654
|
*/
|
|
2655
2655
|
declare const cn: (...inputs: ClassValue[]) => string;
|
|
2656
2656
|
|
|
2657
|
-
export { type ActionButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, type AllOrNone, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, type AssetsButtonVariant, AssetsView, BackpackIcon, BadgeImage, BankIcon, type BaseActionProps, type BaseTransactionViewProps, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, type ChipProps, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CrossAnimatedIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuTitle, type DropdownPosition, type DropdownStyles, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FeeButton, FeesAction, type FeesActionProps, FeesLines, FeesTotal, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, type HistoryItemStatus, HomeIcon, IconButton, IconLabel, Image, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, type PropertyListItemProps, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsGearIcon, SettingsItem, type SettingsItemProps, SettingsSlider, SettingsSliderIcon, type SettingsSliderProps, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidConfigProvider, SquidLogo, type SquidTheme, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, type SwapHeaderProps, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, type SwapPropertiesProps, SwapState, type SwapStep, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, type SwapStepsCollapsedFooterButton, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, type SwitchProps, TagIcon, TagIconFilled, TextSkeleton, type ThemeType, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, TradingViewStepsIcon, TransactionAction, type TransactionActionProps, type TransactionActionType, TransactionFilters, TransactionHeader, TransactionHeaderLayout, type TransactionHeaderProps, type TransactionHeaderType, TransactionItem, TransactionProperties, type TransactionPropertiesProps, type TransactionPropertiesType, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, type TransactionViewProps, type TransactionViewType, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, cn, darkTheme, lightTheme, linkActionTimelineProps, statusTextClassMap, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useVersion };
|
|
2657
|
+
export { type ActionButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, type ActionStatus, ActionStatusRow, ActionWrapper, AddressButton, type AllOrNone, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, type AssetsButtonVariant, AssetsView, BackpackIcon, BadgeImage, BankIcon, type BaseActionProps, type BaseTransactionViewProps, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, type ChipProps, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CrossAnimatedIcon, DashboardFast, type DescriptionBlock, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuTitle, type DropdownPosition, type DropdownStyles, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FeeButton, FeesAction, type FeesActionProps, FeesLines, FeesTotal, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, type HistoryItemStatus, HomeIcon, IconButton, IconLabel, Image, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, type PropertyListItemProps, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsGearIcon, SettingsItem, type SettingsItemProps, SettingsSlider, SettingsSliderIcon, type SettingsSliderProps, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidConfigProvider, SquidLogo, type SquidTheme, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, type SwapHeaderProps, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, type SwapPropertiesProps, SwapState, type SwapStep, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, type SwapStepsCollapsedFooterButton, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, type SwitchProps, TagIcon, TagIconFilled, TextSkeleton, type ThemeType, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, TradingViewStepsIcon, TransactionAction, type TransactionActionProps, type TransactionActionType, TransactionFilters, TransactionHeader, TransactionHeaderLayout, type TransactionHeaderProps, type TransactionHeaderType, TransactionItem, TransactionProperties, type TransactionPropertiesProps, type TransactionPropertiesType, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, type TransactionViewProps, type TransactionViewType, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, cn, darkTheme, lightTheme, linkActionTimelineProps, statusTextClassMap, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useVersion };
|