@0xsquid/ui 0.27.3 → 0.27.5
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 +89 -42
- package/dist/cjs/types/components/buttons/StopsButton.d.ts +1 -0
- package/dist/cjs/types/components/layout/PipeSeparator.d.ts +1 -1
- package/dist/cjs/types/components/views/SwapProgressView.d.ts +2 -2
- package/dist/cjs/types/core/numbers.d.ts +8 -7
- 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 +89 -42
- package/dist/esm/types/components/buttons/StopsButton.d.ts +1 -0
- package/dist/esm/types/components/layout/PipeSeparator.d.ts +1 -1
- package/dist/esm/types/components/views/SwapProgressView.d.ts +2 -2
- package/dist/esm/types/core/numbers.d.ts +8 -7
- 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 +7 -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,29 +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", {
|
|
6627
|
+
minimumFractionDigits: 0,
|
|
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,
|
|
6633
|
+
minimumSignificantDigits: 2,
|
|
6634
|
+
maximumSignificantDigits: 4,
|
|
6635
|
+
});
|
|
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);
|
|
6648
|
+
}
|
|
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", {
|
|
6652
|
+
style: "currency",
|
|
6653
|
+
currency: "USD",
|
|
6626
6654
|
minimumFractionDigits: 2,
|
|
6627
|
-
maximumFractionDigits:
|
|
6655
|
+
maximumFractionDigits: 2,
|
|
6628
6656
|
});
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
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",
|
|
6662
|
+
notation: "compact",
|
|
6663
|
+
compactDisplay: "short",
|
|
6664
|
+
minimumFractionDigits: 2,
|
|
6665
|
+
maximumFractionDigits: 2,
|
|
6666
|
+
});
|
|
6667
|
+
function formatUsdAmount(amount = "0", { includeSign = true } = {}) {
|
|
6668
|
+
const parsedAmount = Number(amount);
|
|
6669
|
+
if (parsedAmount < 0.01 && parsedAmount > 0) {
|
|
6670
|
+
return includeSign ? "<$0.01" : "<0.01";
|
|
6671
|
+
}
|
|
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 ? "$" : "");
|
|
6637
6678
|
}
|
|
6638
6679
|
function trimExtraDecimals(value, maxDecimals) {
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
if (
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
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
|
|
6648
6692
|
return value;
|
|
6649
6693
|
}
|
|
6650
6694
|
|
|
@@ -17753,7 +17797,7 @@ function Providers({ providers }) {
|
|
|
17753
17797
|
return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-1 tw-self-stretch tw-rounded-squid-m tw-p-squid-xs", children: [jsxRuntime.jsx(Vector, { className: "tw-absolute -tw-top-0 tw-left-1/2 -tw-translate-x-1/2 tw-rounded-bl-full tw-rounded-br-full tw-bg-royal-500 tw-bg-gradient-to-t tw-text-grey-500" }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-[44px] tw-max-w-[44px] tw-items-center tw-justify-center", children: providersToDisplay.map((provider, index, self) => (jsxRuntime.jsx("img", { style: {
|
|
17754
17798
|
transform: `translate(${spacing[self.length][index]}px)`,
|
|
17755
17799
|
zIndex: self.length - 1 - index,
|
|
17756
|
-
}, src: provider.logoUrl, className: "tw-relative tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs tw-border-2 tw-border-grey-900 tw-bg-grey-900" }, provider.
|
|
17800
|
+
}, src: provider.logoUrl, className: "tw-relative tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs tw-border-2 tw-border-grey-900 tw-bg-grey-900" }, provider.key))) }), jsxRuntime.jsx(Vector, { className: "tw-absolute -tw-bottom-0 tw-left-1/2 -tw-translate-x-1/2 tw-rounded-tl-full tw-rounded-tr-full tw-bg-royal-500 tw-bg-gradient-to-b tw-text-grey-500" })] }));
|
|
17757
17801
|
}
|
|
17758
17802
|
const Vector = ({ className }) => (jsxRuntime.jsx("div", { className: cn("tw-h-2.5 tw-w-1 tw-from-current tw-to-grey-900 group-hover/stops-button:tw-to-material-light-blend-grey-900", className) }));
|
|
17759
17803
|
|
|
@@ -17869,9 +17913,8 @@ function NavigationBar(_a) {
|
|
|
17869
17913
|
: "tw-flex"), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
17870
17914
|
}
|
|
17871
17915
|
|
|
17872
|
-
function PipeSeparator(
|
|
17873
|
-
|
|
17874
|
-
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) })));
|
|
17875
17918
|
}
|
|
17876
17919
|
|
|
17877
17920
|
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
@@ -18830,7 +18873,7 @@ function ListItem(_a) {
|
|
|
18830
18873
|
};
|
|
18831
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
|
|
18832
18875
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18833
|
-
: "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
|
|
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",
|
|
18834
18877
|
// 'large' variant has extra padding
|
|
18835
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" &&
|
|
18836
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
|
|
@@ -18841,10 +18884,9 @@ function ListItem(_a) {
|
|
|
18841
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 &&
|
|
18842
18885
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18843
18886
|
}
|
|
18844
|
-
const ListItemActionsButton = React$1.forwardRef((
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
: "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" }) })));
|
|
18848
18890
|
});
|
|
18849
18891
|
|
|
18850
18892
|
const dropdownPositionClassMap = {
|
|
@@ -19260,6 +19302,7 @@ const SwapStepsCollapsed = React$1.forwardRef((props, ref) => {
|
|
|
19260
19302
|
// show separator for all steps except the first one
|
|
19261
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" }) })] }) })] }) }) }));
|
|
19262
19304
|
});
|
|
19305
|
+
SwapStepsCollapsed.displayName = "SwapStepsCollapsed";
|
|
19263
19306
|
|
|
19264
19307
|
const WIDTH_SM = "69";
|
|
19265
19308
|
const HEIGHT_SM = "31";
|
|
@@ -25201,7 +25244,9 @@ function PopLayout(props) {
|
|
|
25201
25244
|
}
|
|
25202
25245
|
|
|
25203
25246
|
function Toast({ headerContent, actionsContent, description, chipLabel, title, }) {
|
|
25204
|
-
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" }))] }));
|
|
25205
25250
|
}
|
|
25206
25251
|
|
|
25207
25252
|
var lib = {};
|
|
@@ -26315,10 +26360,7 @@ const tooltipThresholdPaddingMap = {
|
|
|
26315
26360
|
xl: "40px",
|
|
26316
26361
|
xxl: "60px",
|
|
26317
26362
|
};
|
|
26318
|
-
const TooltipContainer = (
|
|
26319
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
26320
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-relative", className) })));
|
|
26321
|
-
};
|
|
26363
|
+
const TooltipContainer = (props) => (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-relative", props.className) })));
|
|
26322
26364
|
const TooltipTriggerWrapper = (_a) => {
|
|
26323
26365
|
var { elementRef } = _a, props = __rest$1(_a, ["elementRef"]);
|
|
26324
26366
|
return jsxRuntime.jsx("div", Object.assign({}, props, { ref: elementRef }));
|
|
@@ -26525,7 +26567,7 @@ function NumericInput(_a) {
|
|
|
26525
26567
|
onAmountChange,
|
|
26526
26568
|
]);
|
|
26527
26569
|
const handleInputChange = (e) => {
|
|
26528
|
-
|
|
26570
|
+
const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
|
|
26529
26571
|
const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
|
|
26530
26572
|
const isValidAmount = new RegExp(`^\\d*\\.?\\d{0,${maxDecimalsForInputType}}$`).test(value);
|
|
26531
26573
|
if (isValidAmount) {
|
|
@@ -26605,14 +26647,18 @@ function NumericInput(_a) {
|
|
|
26605
26647
|
return "0";
|
|
26606
26648
|
if (userInputType === UserInputType.TOKEN) {
|
|
26607
26649
|
if (direction === "from") {
|
|
26608
|
-
return
|
|
26650
|
+
return formatUsdAmount(convertTokenAmountToUSD(inputValue, token.price, maxUsdDecimals), {
|
|
26651
|
+
includeSign: false,
|
|
26652
|
+
});
|
|
26609
26653
|
}
|
|
26610
26654
|
else {
|
|
26611
|
-
return
|
|
26655
|
+
return formatUsdAmount((_a = inputModeButton === null || inputModeButton === void 0 ? void 0 : inputModeButton.amountUsd) !== null && _a !== void 0 ? _a : "0", {
|
|
26656
|
+
includeSign: false,
|
|
26657
|
+
});
|
|
26612
26658
|
}
|
|
26613
26659
|
}
|
|
26614
26660
|
else {
|
|
26615
|
-
return
|
|
26661
|
+
return formatTokenAmount(convertUSDToTokenAmount(inputValue, token.price, token.decimals));
|
|
26616
26662
|
}
|
|
26617
26663
|
}, [
|
|
26618
26664
|
inputValue,
|
|
@@ -26629,7 +26675,7 @@ function NumericInput(_a) {
|
|
|
26629
26675
|
: "tw-text-grey-300";
|
|
26630
26676
|
const BalanceChipTag = balanceChipClickable ? "button" : "div";
|
|
26631
26677
|
const balanceFormatted = React$1.useMemo(() => {
|
|
26632
|
-
return
|
|
26678
|
+
return formatTokenAmount(balance !== null && balance !== void 0 ? balance : "0");
|
|
26633
26679
|
}, [balance]);
|
|
26634
26680
|
const containerClassname = "tw-px-squid-xs tw-pb-[15px] tw-pt-[5px] tw-text-heading-small tw-font-heading-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
|
|
26635
26681
|
const inputRef = React$1.useRef(null);
|
|
@@ -62031,7 +62077,7 @@ const getSwapProgressTitle = ({ fromToken, toToken, swapState, }) => {
|
|
|
62031
62077
|
return "Needs gas on destination";
|
|
62032
62078
|
}
|
|
62033
62079
|
};
|
|
62034
|
-
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, }) => {
|
|
62080
|
+
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, }) => {
|
|
62035
62081
|
switch (swapState) {
|
|
62036
62082
|
case SwapState.CONFIRM: {
|
|
62037
62083
|
return "Authenticate the transaction in your wallet.";
|
|
@@ -62052,7 +62098,7 @@ const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, to
|
|
|
62052
62098
|
return "You declined the transaction in your wallet.";
|
|
62053
62099
|
}
|
|
62054
62100
|
case SwapState.PARTIAL_SUCCESS: {
|
|
62055
|
-
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}.`;
|
|
62056
62102
|
}
|
|
62057
62103
|
case SwapState.NEEDS_GAS: {
|
|
62058
62104
|
return "Add gas to the transaction via Axelarscan to complete the swap";
|
|
@@ -62069,7 +62115,7 @@ const swapProgressButtonTexts = {
|
|
|
62069
62115
|
[SwapState.PARTIAL_SUCCESS]: "Cancel",
|
|
62070
62116
|
[SwapState.NEEDS_GAS]: "Go to Axelarscan",
|
|
62071
62117
|
};
|
|
62072
|
-
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, }) {
|
|
62073
62119
|
const [showSwapInfoSection, setShowSwapInfoSection] = React$1.useState(true);
|
|
62074
62120
|
const isFirstRenderRef = React$1.useRef(true);
|
|
62075
62121
|
const { timer, stopTimer, startTimer } = useTimer({
|
|
@@ -62099,6 +62145,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
62099
62145
|
toChain,
|
|
62100
62146
|
toToken,
|
|
62101
62147
|
toAddressFormatted,
|
|
62148
|
+
refundTokenSymbol,
|
|
62102
62149
|
});
|
|
62103
62150
|
return {
|
|
62104
62151
|
headerTitle,
|
|
@@ -9,5 +9,6 @@ export interface StopsProps extends React.ComponentProps<"button"> {
|
|
|
9
9
|
export declare function StopsButton({ stopsCount, estimatedTime, tooltip, providers, ...props }: StopsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
type Provider = {
|
|
11
11
|
logoUrl: string;
|
|
12
|
+
key: string;
|
|
12
13
|
};
|
|
13
14
|
export {};
|
|
@@ -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;
|
|
@@ -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,11 +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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare function
|
|
16
|
+
export declare function formatTokenAmount(amount: string, { exact }?: {
|
|
17
|
+
exact?: boolean | undefined;
|
|
18
|
+
}): string;
|
|
19
|
+
interface FormatUsdAmountOptions {
|
|
20
|
+
includeSign?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign }?: FormatUsdAmountOptions): string;
|
|
23
23
|
export declare function trimExtraDecimals(value: string, maxDecimals?: number): string;
|
|
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,29 +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", {
|
|
6607
|
+
minimumFractionDigits: 0,
|
|
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,
|
|
6613
|
+
minimumSignificantDigits: 2,
|
|
6614
|
+
maximumSignificantDigits: 4,
|
|
6615
|
+
});
|
|
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);
|
|
6628
|
+
}
|
|
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", {
|
|
6632
|
+
style: "currency",
|
|
6633
|
+
currency: "USD",
|
|
6606
6634
|
minimumFractionDigits: 2,
|
|
6607
|
-
maximumFractionDigits:
|
|
6635
|
+
maximumFractionDigits: 2,
|
|
6608
6636
|
});
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
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",
|
|
6642
|
+
notation: "compact",
|
|
6643
|
+
compactDisplay: "short",
|
|
6644
|
+
minimumFractionDigits: 2,
|
|
6645
|
+
maximumFractionDigits: 2,
|
|
6646
|
+
});
|
|
6647
|
+
function formatUsdAmount(amount = "0", { includeSign = true } = {}) {
|
|
6648
|
+
const parsedAmount = Number(amount);
|
|
6649
|
+
if (parsedAmount < 0.01 && parsedAmount > 0) {
|
|
6650
|
+
return includeSign ? "<$0.01" : "<0.01";
|
|
6651
|
+
}
|
|
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 ? "$" : "");
|
|
6617
6658
|
}
|
|
6618
6659
|
function trimExtraDecimals(value, maxDecimals) {
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
if (
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
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
|
|
6628
6672
|
return value;
|
|
6629
6673
|
}
|
|
6630
6674
|
|
|
@@ -17733,7 +17777,7 @@ function Providers({ providers }) {
|
|
|
17733
17777
|
return (jsxs("div", { className: "tw-relative tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-1 tw-self-stretch tw-rounded-squid-m tw-p-squid-xs", children: [jsx(Vector, { className: "tw-absolute -tw-top-0 tw-left-1/2 -tw-translate-x-1/2 tw-rounded-bl-full tw-rounded-br-full tw-bg-royal-500 tw-bg-gradient-to-t tw-text-grey-500" }), jsx("div", { className: "tw-flex tw-h-squid-m tw-w-[44px] tw-max-w-[44px] tw-items-center tw-justify-center", children: providersToDisplay.map((provider, index, self) => (jsx("img", { style: {
|
|
17734
17778
|
transform: `translate(${spacing[self.length][index]}px)`,
|
|
17735
17779
|
zIndex: self.length - 1 - index,
|
|
17736
|
-
}, src: provider.logoUrl, className: "tw-relative tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs tw-border-2 tw-border-grey-900 tw-bg-grey-900" }, provider.
|
|
17780
|
+
}, src: provider.logoUrl, className: "tw-relative tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs tw-border-2 tw-border-grey-900 tw-bg-grey-900" }, provider.key))) }), jsx(Vector, { className: "tw-absolute -tw-bottom-0 tw-left-1/2 -tw-translate-x-1/2 tw-rounded-tl-full tw-rounded-tr-full tw-bg-royal-500 tw-bg-gradient-to-b tw-text-grey-500" })] }));
|
|
17737
17781
|
}
|
|
17738
17782
|
const Vector = ({ className }) => (jsx("div", { className: cn("tw-h-2.5 tw-w-1 tw-from-current tw-to-grey-900 group-hover/stops-button:tw-to-material-light-blend-grey-900", className) }));
|
|
17739
17783
|
|
|
@@ -17849,9 +17893,8 @@ function NavigationBar(_a) {
|
|
|
17849
17893
|
: "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
17850
17894
|
}
|
|
17851
17895
|
|
|
17852
|
-
function PipeSeparator(
|
|
17853
|
-
|
|
17854
|
-
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) })));
|
|
17855
17898
|
}
|
|
17856
17899
|
|
|
17857
17900
|
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
@@ -18810,7 +18853,7 @@ function ListItem(_a) {
|
|
|
18810
18853
|
};
|
|
18811
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
|
|
18812
18855
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18813
|
-
: "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
|
|
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",
|
|
18814
18857
|
// 'large' variant has extra padding
|
|
18815
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" &&
|
|
18816
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
|
|
@@ -18821,10 +18864,9 @@ function ListItem(_a) {
|
|
|
18821
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 &&
|
|
18822
18865
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18823
18866
|
}
|
|
18824
|
-
const ListItemActionsButton = forwardRef((
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
: "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" }) })));
|
|
18828
18870
|
});
|
|
18829
18871
|
|
|
18830
18872
|
const dropdownPositionClassMap = {
|
|
@@ -19240,6 +19282,7 @@ const SwapStepsCollapsed = forwardRef((props, ref) => {
|
|
|
19240
19282
|
// show separator for all steps except the first one
|
|
19241
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" }) })] }) })] }) }) }));
|
|
19242
19284
|
});
|
|
19285
|
+
SwapStepsCollapsed.displayName = "SwapStepsCollapsed";
|
|
19243
19286
|
|
|
19244
19287
|
const WIDTH_SM = "69";
|
|
19245
19288
|
const HEIGHT_SM = "31";
|
|
@@ -25181,7 +25224,9 @@ function PopLayout(props) {
|
|
|
25181
25224
|
}
|
|
25182
25225
|
|
|
25183
25226
|
function Toast({ headerContent, actionsContent, description, chipLabel, title, }) {
|
|
25184
|
-
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" }))] }));
|
|
25185
25230
|
}
|
|
25186
25231
|
|
|
25187
25232
|
var lib = {};
|
|
@@ -26295,10 +26340,7 @@ const tooltipThresholdPaddingMap = {
|
|
|
26295
26340
|
xl: "40px",
|
|
26296
26341
|
xxl: "60px",
|
|
26297
26342
|
};
|
|
26298
|
-
const TooltipContainer = (
|
|
26299
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
26300
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-relative", className) })));
|
|
26301
|
-
};
|
|
26343
|
+
const TooltipContainer = (props) => (jsx("div", Object.assign({}, props, { className: cn("tw-relative", props.className) })));
|
|
26302
26344
|
const TooltipTriggerWrapper = (_a) => {
|
|
26303
26345
|
var { elementRef } = _a, props = __rest$1(_a, ["elementRef"]);
|
|
26304
26346
|
return jsx("div", Object.assign({}, props, { ref: elementRef }));
|
|
@@ -26505,7 +26547,7 @@ function NumericInput(_a) {
|
|
|
26505
26547
|
onAmountChange,
|
|
26506
26548
|
]);
|
|
26507
26549
|
const handleInputChange = (e) => {
|
|
26508
|
-
|
|
26550
|
+
const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
|
|
26509
26551
|
const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
|
|
26510
26552
|
const isValidAmount = new RegExp(`^\\d*\\.?\\d{0,${maxDecimalsForInputType}}$`).test(value);
|
|
26511
26553
|
if (isValidAmount) {
|
|
@@ -26585,14 +26627,18 @@ function NumericInput(_a) {
|
|
|
26585
26627
|
return "0";
|
|
26586
26628
|
if (userInputType === UserInputType.TOKEN) {
|
|
26587
26629
|
if (direction === "from") {
|
|
26588
|
-
return
|
|
26630
|
+
return formatUsdAmount(convertTokenAmountToUSD(inputValue, token.price, maxUsdDecimals), {
|
|
26631
|
+
includeSign: false,
|
|
26632
|
+
});
|
|
26589
26633
|
}
|
|
26590
26634
|
else {
|
|
26591
|
-
return
|
|
26635
|
+
return formatUsdAmount((_a = inputModeButton === null || inputModeButton === void 0 ? void 0 : inputModeButton.amountUsd) !== null && _a !== void 0 ? _a : "0", {
|
|
26636
|
+
includeSign: false,
|
|
26637
|
+
});
|
|
26592
26638
|
}
|
|
26593
26639
|
}
|
|
26594
26640
|
else {
|
|
26595
|
-
return
|
|
26641
|
+
return formatTokenAmount(convertUSDToTokenAmount(inputValue, token.price, token.decimals));
|
|
26596
26642
|
}
|
|
26597
26643
|
}, [
|
|
26598
26644
|
inputValue,
|
|
@@ -26609,7 +26655,7 @@ function NumericInput(_a) {
|
|
|
26609
26655
|
: "tw-text-grey-300";
|
|
26610
26656
|
const BalanceChipTag = balanceChipClickable ? "button" : "div";
|
|
26611
26657
|
const balanceFormatted = useMemo(() => {
|
|
26612
|
-
return
|
|
26658
|
+
return formatTokenAmount(balance !== null && balance !== void 0 ? balance : "0");
|
|
26613
26659
|
}, [balance]);
|
|
26614
26660
|
const containerClassname = "tw-px-squid-xs tw-pb-[15px] tw-pt-[5px] tw-text-heading-small tw-font-heading-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
|
|
26615
26661
|
const inputRef = useRef(null);
|
|
@@ -62011,7 +62057,7 @@ const getSwapProgressTitle = ({ fromToken, toToken, swapState, }) => {
|
|
|
62011
62057
|
return "Needs gas on destination";
|
|
62012
62058
|
}
|
|
62013
62059
|
};
|
|
62014
|
-
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, }) => {
|
|
62060
|
+
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, }) => {
|
|
62015
62061
|
switch (swapState) {
|
|
62016
62062
|
case SwapState.CONFIRM: {
|
|
62017
62063
|
return "Authenticate the transaction in your wallet.";
|
|
@@ -62032,7 +62078,7 @@ const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, to
|
|
|
62032
62078
|
return "You declined the transaction in your wallet.";
|
|
62033
62079
|
}
|
|
62034
62080
|
case SwapState.PARTIAL_SUCCESS: {
|
|
62035
|
-
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}.`;
|
|
62036
62082
|
}
|
|
62037
62083
|
case SwapState.NEEDS_GAS: {
|
|
62038
62084
|
return "Add gas to the transaction via Axelarscan to complete the swap";
|
|
@@ -62049,7 +62095,7 @@ const swapProgressButtonTexts = {
|
|
|
62049
62095
|
[SwapState.PARTIAL_SUCCESS]: "Cancel",
|
|
62050
62096
|
[SwapState.NEEDS_GAS]: "Go to Axelarscan",
|
|
62051
62097
|
};
|
|
62052
|
-
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, }) {
|
|
62053
62099
|
const [showSwapInfoSection, setShowSwapInfoSection] = useState(true);
|
|
62054
62100
|
const isFirstRenderRef = useRef(true);
|
|
62055
62101
|
const { timer, stopTimer, startTimer } = useTimer({
|
|
@@ -62079,6 +62125,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
62079
62125
|
toChain,
|
|
62080
62126
|
toToken,
|
|
62081
62127
|
toAddressFormatted,
|
|
62128
|
+
refundTokenSymbol,
|
|
62082
62129
|
});
|
|
62083
62130
|
return {
|
|
62084
62131
|
headerTitle,
|
|
@@ -9,5 +9,6 @@ export interface StopsProps extends React.ComponentProps<"button"> {
|
|
|
9
9
|
export declare function StopsButton({ stopsCount, estimatedTime, tooltip, providers, ...props }: StopsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
type Provider = {
|
|
11
11
|
logoUrl: string;
|
|
12
|
+
key: string;
|
|
12
13
|
};
|
|
13
14
|
export {};
|
|
@@ -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;
|
|
@@ -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,11 +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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare function
|
|
16
|
+
export declare function formatTokenAmount(amount: string, { exact }?: {
|
|
17
|
+
exact?: boolean | undefined;
|
|
18
|
+
}): string;
|
|
19
|
+
interface FormatUsdAmountOptions {
|
|
20
|
+
includeSign?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function formatUsdAmount(amount?: number | bigint | string, { includeSign }?: FormatUsdAmountOptions): string;
|
|
23
23
|
export declare function trimExtraDecimals(value: string, maxDecimals?: number): string;
|
|
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,
|
|
@@ -1339,6 +1339,7 @@ interface StopsProps extends React.ComponentProps<"button"> {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
type Provider = {
|
|
1341
1341
|
logoUrl: string;
|
|
1342
|
+
key: string;
|
|
1342
1343
|
};
|
|
1343
1344
|
|
|
1344
1345
|
interface DetailsToolbarProps {
|
|
@@ -1456,7 +1457,7 @@ interface NavigationBarProps extends React.ComponentProps<"nav"> {
|
|
|
1456
1457
|
}
|
|
1457
1458
|
declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, onBackButtonClick, actions, isLoading, ...props }: NavigationBarProps): react_jsx_runtime.JSX.Element;
|
|
1458
1459
|
|
|
1459
|
-
declare function PipeSeparator(
|
|
1460
|
+
declare function PipeSeparator(props: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
1460
1461
|
|
|
1461
1462
|
interface CollapsibleMenuProps {
|
|
1462
1463
|
menuRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
@@ -2382,14 +2383,13 @@ declare function SwapDetailsView({ isLoading, canToggleBoostMode, }: {
|
|
|
2382
2383
|
type ChainData = {
|
|
2383
2384
|
networkName: string;
|
|
2384
2385
|
logoUrl: string;
|
|
2385
|
-
bgColor: string;
|
|
2386
2386
|
};
|
|
2387
2387
|
type Token = {
|
|
2388
2388
|
symbol: string;
|
|
2389
2389
|
logoUrl: string;
|
|
2390
2390
|
bgColor: string;
|
|
2391
2391
|
};
|
|
2392
|
-
declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, }: {
|
|
2392
|
+
declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete, socialLink, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, }: {
|
|
2393
2393
|
steps: SwapStep[];
|
|
2394
2394
|
handleClose?: (swapState: SwapState) => void;
|
|
2395
2395
|
handleComplete?: () => void;
|
|
@@ -2407,6 +2407,7 @@ declare function SwapProgressView({ steps, isOpen, handleClose, handleComplete,
|
|
|
2407
2407
|
swapState: SwapState;
|
|
2408
2408
|
estimatedTimeToComplete?: string;
|
|
2409
2409
|
footerButton?: SwapStepsCollapsedFooterButton;
|
|
2410
|
+
refundTokenSymbol?: string;
|
|
2410
2411
|
}): react_jsx_runtime.JSX.Element;
|
|
2411
2412
|
|
|
2412
2413
|
interface BaseTransactionViewProps {
|
|
@@ -2654,4 +2655,4 @@ declare const baseTailwindConfig: Config;
|
|
|
2654
2655
|
*/
|
|
2655
2656
|
declare const cn: (...inputs: ClassValue[]) => string;
|
|
2656
2657
|
|
|
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 };
|
|
2658
|
+
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 };
|