@0xsquid/ui 2.4.8 → 2.4.10-beta.0

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.
Files changed (39) hide show
  1. package/dist/cjs/index.js +92 -28
  2. package/dist/cjs/types/components/buttons/Button.d.ts +2 -1
  3. package/dist/cjs/types/components/icons/Arrow.d.ts +10 -2
  4. package/dist/cjs/types/components/layout/HashLink.d.ts +5 -2
  5. package/dist/cjs/types/components/layout/Join.d.ts +1 -1
  6. package/dist/cjs/types/components/layout/TxProgressViewHeader.d.ts +7 -0
  7. package/dist/cjs/types/components/layout/index.d.ts +1 -1
  8. package/dist/cjs/types/components/lists/PropertyListItem.d.ts +3 -1
  9. package/dist/cjs/types/components/views/DepositAddressView.d.ts +33 -0
  10. package/dist/cjs/types/components/views/index.d.ts +1 -0
  11. package/dist/cjs/types/core/utils.d.ts +1 -1
  12. package/dist/cjs/types/hooks/useCountdown.d.ts +1 -0
  13. package/dist/cjs/types/stories/badges/Image.stories.d.ts +1 -0
  14. package/dist/cjs/types/stories/buttons/Button.stories.d.ts +2 -0
  15. package/dist/cjs/types/stories/layout/TxProgressViewHeader.stories.d.ts +7 -0
  16. package/dist/cjs/types/stories/views/DepositAddressView.stories.d.ts +6 -0
  17. package/dist/esm/index.js +91 -28
  18. package/dist/esm/types/components/buttons/Button.d.ts +2 -1
  19. package/dist/esm/types/components/icons/Arrow.d.ts +10 -2
  20. package/dist/esm/types/components/layout/HashLink.d.ts +5 -2
  21. package/dist/esm/types/components/layout/Join.d.ts +1 -1
  22. package/dist/esm/types/components/layout/TxProgressViewHeader.d.ts +7 -0
  23. package/dist/esm/types/components/layout/index.d.ts +1 -1
  24. package/dist/esm/types/components/lists/PropertyListItem.d.ts +3 -1
  25. package/dist/esm/types/components/views/DepositAddressView.d.ts +33 -0
  26. package/dist/esm/types/components/views/index.d.ts +1 -0
  27. package/dist/esm/types/core/utils.d.ts +1 -1
  28. package/dist/esm/types/hooks/useCountdown.d.ts +1 -0
  29. package/dist/esm/types/stories/badges/Image.stories.d.ts +1 -0
  30. package/dist/esm/types/stories/buttons/Button.stories.d.ts +2 -0
  31. package/dist/esm/types/stories/layout/TxProgressViewHeader.stories.d.ts +7 -0
  32. package/dist/esm/types/stories/views/DepositAddressView.stories.d.ts +6 -0
  33. package/dist/index.css +1 -1
  34. package/dist/index.d.ts +58 -12
  35. package/package.json +1 -1
  36. package/dist/cjs/types/components/layout/SwapProgressViewHeader.d.ts +0 -6
  37. package/dist/cjs/types/stories/layout/SwapProgressViewHeader.stories.d.ts +0 -6
  38. package/dist/esm/types/components/layout/SwapProgressViewHeader.d.ts +0 -6
  39. package/dist/esm/types/stories/layout/SwapProgressViewHeader.stories.d.ts +0 -6
package/dist/esm/index.js CHANGED
@@ -2788,6 +2788,20 @@ const formatDuration = (elapsedTime) => {
2788
2788
  // Show only minutes if total time is 1 minute or more
2789
2789
  return `${minutes}m`;
2790
2790
  };
2791
+ function formatCountdown(seconds) {
2792
+ const hours = Math.floor((seconds / 3600) % 24);
2793
+ const minutes = Math.floor((seconds / 60) % 60);
2794
+ const secs = seconds % 60;
2795
+ if (hours > 0) {
2796
+ return `${hours}h : ${String(minutes).padStart(2, "0")}m : ${String(secs).padStart(2, "0")}s`;
2797
+ }
2798
+ else if (minutes > 0) {
2799
+ return `${minutes}m : ${String(secs).padStart(2, "0")}s`;
2800
+ }
2801
+ else {
2802
+ return `${secs}s`;
2803
+ }
2804
+ }
2791
2805
  const formatTime = (timestampSeconds) => {
2792
2806
  const date = new Date(timestampSeconds * 1000);
2793
2807
  const hours = date.getHours();
@@ -2850,9 +2864,6 @@ const formatRelativeDate = (timestampSeconds) => {
2850
2864
  });
2851
2865
  return formattedDate;
2852
2866
  };
2853
- function truncateHash(hash) {
2854
- return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
2855
- }
2856
2867
  const calcLerp = (a, b, t) => `calc(${a} + (${b} - ${a}) * ${t})`;
2857
2868
  /**
2858
2869
  * Returns an array including the first `count` unique values of the array
@@ -3642,11 +3653,11 @@ function Approve() {
3642
3653
  function ArrowRightIcon() {
3643
3654
  return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M14 6L20 12L14 18M19 12H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
3644
3655
  }
3645
- function ArrowRightDownIcon() {
3646
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", fill: "none", viewBox: "0 0 10 10", children: jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 3v6H3M1.167 1.167l7.166 7.166" }) }));
3656
+ function ArrowRightDownIcon({ size = "10", className, strokeWidth = "2", }) {
3657
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 10 10", className: className, children: jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, d: "M9 3v6H3M1.167 1.167l7.166 7.166" }) }));
3647
3658
  }
3648
- function ArrowRightUpIcon() {
3649
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", fill: "none", viewBox: "0 0 10 10", children: jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 7V1m0 0H3m6 0L1.167 8.833" }) }));
3659
+ function ArrowRightUpIcon({ size = "10", className, strokeWidth = "2", }) {
3660
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 10 10", className: className, children: jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, d: "M9 7V1m0 0H3m6 0L1.167 8.833" }) }));
3650
3661
  }
3651
3662
  function ChevronArrowIcon({ size = "16", className, }) {
3652
3663
  return (jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M6.66663 14L9.64022 8.64754C9.86394 8.24484 9.86394 7.75519 9.64022 7.35249L6.66663 2", stroke: "currentColor", strokeOpacity: "0.66", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
@@ -4307,12 +4318,14 @@ function UsdAmount({ usdAmount }) {
4307
4318
  return (jsxs("span", { className: "tw-flex tw-items-center tw-text-grey-500", children: [jsx(CaptionText, { className: "tw-opacity-66", children: "$" }), jsx(CaptionText, { children: usdAmount.toString() })] }));
4308
4319
  }
4309
4320
 
4310
- function HashLink({ showTx = false, hash, showCopyButton = false, url, children, }) {
4311
- return (jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : truncateHash(hash), url && (jsx("a", { href: url, target: "_blank", className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: jsx(SquareArrowTopRight2Icon, { strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-text-royal-500" }) })), showCopyButton && (jsx("span", { className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: jsx(Copy, { size: "16", strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-cursor-pointer tw-text-royal-500", onClick: () => navigator.clipboard.writeText(hash) }) }))] }));
4321
+ function HashLink({ showTx = false, hash, showCopyButton = false, url, children, className, formattedHash, copyIconSize = "16", }) {
4322
+ return (jsxs("div", { className: cn("tw-flex tw-items-center", className), children: [showTx && jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : formattedHash, url && (jsx("a", { href: url, target: "_blank", className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", rel: "noreferrer", children: jsx(SquareArrowTopRight2Icon, { strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-text-royal-500" }) })), showCopyButton && (jsx("span", { className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: jsx(Copy, { size: copyIconSize, strokeWidth: "2", className: "tw-cursor-pointer tw-text-royal-500", onClick: () => {
4323
+ navigator.clipboard.writeText(hash).catch(() => { });
4324
+ } }) }))] }));
4312
4325
  }
4313
4326
 
4314
4327
  function WalletLink({ imageURI, address }) {
4315
- return (jsx(IconLabel, { src: imageURI, rounded: "full", children: jsx(HashLink, { hash: address, showCopyButton: true, children: jsx(BodyText, { size: "small", children: truncateHash(address) }) }) }));
4328
+ return (jsx(IconLabel, { src: imageURI, rounded: "full", children: jsx(HashLink, { hash: address, showCopyButton: true, children: jsx(BodyText, { size: "small", children: address }) }) }));
4316
4329
  }
4317
4330
 
4318
4331
  const extraPaddingMap = {
@@ -4380,9 +4393,9 @@ const buttonVariantClassMap = {
4380
4393
  const buttonDisabledClass = "!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed";
4381
4394
  const loadingClassname = "tw-invisible tw-opacity-0";
4382
4395
  function Button$1(_a) {
4383
- var { label, disabled = false, size, variant, icon, link, isLoading = false, chip, containerClassName, anchorRef, buttonRef } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip", "containerClassName", "anchorRef", "buttonRef"]);
4396
+ var { label, disabled = false, size, variant, icon, link, isLoading = false, showLoader = false, chip, containerClassName, anchorRef, buttonRef } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "showLoader", "chip", "containerClassName", "anchorRef", "buttonRef"]);
4384
4397
  const chipElement = chip != null ? (jsx(Chip, Object.assign({}, chip, { className: cn("tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10", chip.className) }))) : null;
4385
- const children = (jsxs(Fragment, { children: [!disabled && !isLoading && (jsx(ButtonHoverOverlay, { className: roundedClassMap[size][variant] })), jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: label == null && icon == null ? (props.children) : size === "lg" ? (jsx("span", { className: "tw-px-squid-m", children: jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label }) })) : size === "md" ? (label != null && icon == null ? (
4398
+ const children = (jsxs(Fragment, { children: [!disabled && !isLoading && (jsx(ButtonHoverOverlay, { className: roundedClassMap[size][variant] })), jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: label == null && icon == null ? (props.children) : size === "lg" ? (jsxs("span", { className: "tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-px-squid-m", children: [showLoader && jsx(Loader, {}), jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label })] })) : size === "md" ? (label != null && icon == null ? (
4386
4399
  // label only
4387
4400
  jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "small", children: label })) : label == null && icon != null ? (
4388
4401
  // icon only
@@ -18868,7 +18881,7 @@ const borderTypeClassMap = {
18868
18881
  };
18869
18882
  function ModalContent(_a) {
18870
18883
  var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
18871
- return (jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-modal tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
18884
+ return (jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[415px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-modal tw-bg-grey-800 tw-text-grey-300 mobile-xs-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
18872
18885
  }
18873
18886
  function ModalContentDivider() {
18874
18887
  return (jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
@@ -18932,19 +18945,23 @@ function LogoContainer({ children }) {
18932
18945
  }
18933
18946
 
18934
18947
  function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp = false, chain, token, direction = "from", onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive = true, isLoading = false, inputModeButton, balanceButton, assetsButton, walletButton, showNumericInputDetails = true, }) {
18935
- var _a, _b, _c;
18948
+ var _a, _b;
18936
18949
  const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18937
18950
  const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
18938
18951
  const isFetching = isFetchingProp || isLoading;
18939
- return (jsxs("section", { className: "tw-relative tw-flex tw-h-full tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m mobile-lg:tw-w-card-large", children: [jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), !isLoading && !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) && !!token && (jsxs(Fragment, { children: [jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18952
+ const showWalletButtonLabel = !isLoading &&
18953
+ !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) &&
18954
+ !!token &&
18955
+ (!!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.address) || !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel));
18956
+ return (jsxs("section", { className: "tw-relative tw-flex tw-h-full tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m mobile-lg:tw-w-card-large", children: [jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), showWalletButtonLabel && (jsxs(Fragment, { children: [jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18940
18957
  ? "tw-text-grey-300"
18941
18958
  : "tw-text-royal-500", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18942
18959
  ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
18943
- : (_a = walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel) !== null && _a !== void 0 ? _a : "Connect wallet" }), jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18960
+ : walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel }), jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18944
18961
  ? "tw-text-grey-600"
18945
18962
  : "tw-text-royal-500" })] })] }))] }) })) }), jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (jsx("div", { className: "tw-absolute tw-bottom-2 tw-left-squid-m tw-z-10 tw-overflow-hidden mobile-lg:tw-left-squid-l", children: jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
18946
- decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
18947
- symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
18963
+ decimals: (_a = token === null || token === void 0 ? void 0 : token.decimals) !== null && _a !== void 0 ? _a : 18,
18964
+ symbol: (_b = token === null || token === void 0 ? void 0 : token.symbol) !== null && _b !== void 0 ? _b : "",
18948
18965
  price: tokenPrice,
18949
18966
  }, onAmountChange: (value) => {
18950
18967
  onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
@@ -18954,8 +18971,8 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
18954
18971
  }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
18955
18972
  }
18956
18973
 
18957
- function SwapProgressViewHeader({ title, description, }) {
18958
- return (jsxs("header", { className: "tw-flex tw-min-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-min-h-squid-m !tw-leading-[25px] tw-text-grey-300", children: title }), jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
18974
+ function TxProgressViewHeader({ title, description, isWarning = false, }) {
18975
+ return (jsxs("header", { className: "tw-flex tw-min-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-min-h-squid-m !tw-leading-[25px] tw-text-grey-300", children: title }), jsx(CaptionText, { className: cn("tw-h-squid-l", isWarning ? "tw-text-status-partial" : "tw-text-grey-500"), children: description })] }));
18959
18976
  }
18960
18977
 
18961
18978
  function AccountListItem({ isConnected, imageUrls = [], imageUrl, badgeUrl, actions, subtitle, title, }) {
@@ -19469,9 +19486,9 @@ function SmallBodyText(props) {
19469
19486
  return jsx(BodyText, Object.assign({ size: "small" }, props));
19470
19487
  }
19471
19488
  function PropertyListItem(_a) {
19472
- var { isLoading = false, label, detail, icon, className, variant = "small", showGradientBg = true, labelClassName, iconClassName, detailClassName } = _a, props = __rest$1(_a, ["isLoading", "label", "detail", "icon", "className", "variant", "showGradientBg", "labelClassName", "iconClassName", "detailClassName"]);
19489
+ var { isLoading = false, label, detail, icon, className, variant = "small", showGradientBg = true, labelClassName, iconClassName, detailClassName, tooltip } = _a, props = __rest$1(_a, ["isLoading", "label", "detail", "icon", "className", "variant", "showGradientBg", "labelClassName", "iconClassName", "detailClassName", "tooltip"]);
19473
19490
  const Text = variant === "small" ? CaptionText : SmallBodyText;
19474
- return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsx(Text, { className: cn("tw-min-w-fit tw-flex-1 tw-text-grey-500", labelClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsx(Text, { truncate: variant === "small" || undefined, className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
19491
+ return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsxs(Text, { className: cn("tw-flex tw-min-w-fit tw-flex-1 tw-gap-squid-xxs tw-text-grey-500", labelClassName), children: [jsx(TextSkeleton, { isLoading: isLoading, children: label }), !!tooltip && (jsx(Tooltip, Object.assign({}, tooltip, { children: jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-500" }) })))] }), jsx(Text, { truncate: variant === "small" || undefined, className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
19475
19492
  }
19476
19493
 
19477
19494
  function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
@@ -19809,7 +19826,7 @@ const TransactionItemHeader = ({ isLoading = false, variant, type, hash, status,
19809
19826
  if (variant === "full") {
19810
19827
  if (!type || !hash)
19811
19828
  return null;
19812
- return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TxTypeLabel, { type: type }), jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
19829
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TxTypeLabel, { type: type }), jsx("span", { className: "tw-text-grey-500", children: hash })] }));
19813
19830
  }
19814
19831
  if (status && type) {
19815
19832
  return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TransactionState, { status: status, variant: "small" }), jsx(TxTypeLabel, { type: type })] }));
@@ -27356,8 +27373,15 @@ function NumericInput(_a) {
27356
27373
  : "tw-text-grey-300";
27357
27374
  const BalanceChipTag = balanceChipClickable ? "button" : "div";
27358
27375
  const balanceFormatted = useMemo(() => {
27359
- return formatTokenAmount(balance !== null && balance !== void 0 ? balance : "0");
27360
- }, [balance]);
27376
+ switch (userInputType) {
27377
+ case UserInputType.TOKEN:
27378
+ return formatTokenAmount(balance !== null && balance !== void 0 ? balance : "0");
27379
+ case UserInputType.USD:
27380
+ return formatUsdAmount(convertTokenAmountToUSD(balance !== null && balance !== void 0 ? balance : "0", token === null || token === void 0 ? void 0 : token.price), {
27381
+ includeSign: false,
27382
+ });
27383
+ }
27384
+ }, [userInputType, balance, token.price]);
27361
27385
  const containerClassname = "tw-px-squid-xs !tw-h-full tw-pt-squid-xxs mobile-xs-height:tw-pb-squid-s tw-text-heading-small tw-font-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
27362
27386
  const inputRef = useRef(null);
27363
27387
  return (jsxs(Fragment, { children: [isInteractive && !isLoading ? (jsxs("form", { className: containerClassname, onSubmit: (e) => {
@@ -27376,7 +27400,7 @@ function NumericInput(_a) {
27376
27400
  ? "tw-opacity-0"
27377
27401
  : "" }), jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat("%") })] })) : null] }) }))), jsx(Tooltip, Object.assign({}, (isLoading ? undefined : balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.tooltip), { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn(buttonClassName, balanceChipClickable
27378
27402
  ? interactiveChipClassName
27379
- : notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balanceFormatted }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsx(Chip, { label: "Max" })] }) }))] }))] }));
27403
+ : notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxs("div", { children: [userInputType === UserInputType.USD && (jsx(CaptionText, { className: "tw-opacity-66", children: "$" })), jsx(CaptionText, { children: balanceFormatted })] }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsx(Chip, { label: "Max" })] }) }))] }))] }));
27380
27404
  }
27381
27405
 
27382
27406
  function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
@@ -27768,6 +27792,45 @@ const List = ({ children }) => {
27768
27792
  return (jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
27769
27793
  };
27770
27794
 
27795
+ function useCountdown(initialSeconds) {
27796
+ const [secondsLeft, setSecondsLeft] = useState(initialSeconds);
27797
+ useEffect(() => {
27798
+ if (secondsLeft <= 0)
27799
+ return;
27800
+ const timer = setInterval(() => {
27801
+ setSecondsLeft((prev) => Math.max(prev - 1, 0));
27802
+ }, 1000);
27803
+ return () => {
27804
+ clearInterval(timer);
27805
+ };
27806
+ }, [secondsLeft]);
27807
+ return formatCountdown(secondsLeft);
27808
+ }
27809
+
27810
+ function DepositAddressView({ isOpen = true, fromToken, toToken, handleClose, openInWalletButton, fromChain, toChain, fromAmount, toAmount, depositAddress, depositAddressFormatted, timeRemainingSeconds = 0, tooltips, description, title, }) {
27811
+ return (jsxs(Modal, { isOpen: isOpen, onBackdropClick: handleClose, children: [jsxs(ModalContent, { style: {
27812
+ [CSS_VARS.SCALE_AND_FADE_DOWN_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
27813
+ [CSS_VARS.SCALE_AND_FADE_UP_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
27814
+ }, borderType: "outline", children: [jsx("div", { className: "tw-relative tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-modal tw-rounded-tr-modal tw-bg-grey-900 tw-py-squid-s tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
27815
+ // box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
27816
+ boxShadow: "0 1px 0 currentColor",
27817
+ }, children: jsx("div", { className: "tw-absolute tw-right-squid-xs tw-top-squid-xs", children: jsx(Button$1, { size: "md", variant: "secondary", label: "Copy" }) }) }), jsx("div", { className: "tw-relative tw-flex tw-h-squid-m tw-w-full tw-items-end tw-justify-between tw-self-stretch tw-px-squid-m", children: jsx(Image$1, { src: fromToken.logoUrl, rounded: "full", shadow: true, size: "xlarge" }) }), jsx(TxProgressViewHeader, { title: title, description: description, isWarning: true }), jsxs("ul", { className: "tw-flex tw-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-rounded-squid-l tw-pb-squid-s mobile-xs-height:tw-max-h-[195px]", children: [jsx(PropertyListItem, { icon: jsx(WalletFilledIcon, { size: "24" }), label: "Deposit address", detail: jsx(HashLink, { className: "tw-text-royal-500", formattedHash: depositAddressFormatted, hash: depositAddress, showCopyButton: true, copyIconSize: "24" }), tooltip: (tooltips === null || tooltips === void 0 ? void 0 : tooltips.depositAddress)
27818
+ ? {
27819
+ tooltipContent: tooltips.depositAddress,
27820
+ tooltipWidth: "max",
27821
+ }
27822
+ : undefined }), jsx(PropertyListItem, { iconClassName: "tw-flex tw-items-center tw-justify-center", icon: jsx(ArrowRightUpIcon, { size: "15", strokeWidth: "1.5" }), label: "Send exactly", detail: jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: jsx(CaptionText, { children: fromAmount }) }) }), jsx(PropertyListItem, { iconClassName: "tw-flex tw-items-center tw-justify-center", icon: jsx(ArrowRightDownIcon, { size: "15", strokeWidth: "1.5" }), label: "You receive", detail: jsx(IconLabel, { src: toToken.logoUrl, rounded: "full", children: jsxs(Fragment, { children: [jsx(CaptionText, { children: toAmount }), jsx(Loader, { size: "16" })] }) }) }), jsx(PropertyListItem, { icon: jsx(ChainLink, { size: "24", strokeWidth: "2" }), label: "Chain", detail: jsx(Transfer, { from: jsxs(Fragment, { children: [jsx(Image$1, { src: fromChain.logoUrl, rounded: "xxs", shadow: true, size: "medium" }), jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxs(Fragment, { children: [jsx(Image$1, { src: toChain.logoUrl, rounded: "xxs", shadow: true, size: "medium" }), jsx(CaptionText, { children: toChain.networkName })] }) }) }), jsx(TimeRemaining, { timeRemainingSeconds: timeRemainingSeconds, tooltipContent: tooltips === null || tooltips === void 0 ? void 0 : tooltips.timeRemaining })] })] }), jsx(Button$1, { size: "lg", variant: "primary", label: "Open in wallet", onClick: openInWalletButton === null || openInWalletButton === void 0 ? void 0 : openInWalletButton.onClick, disabled: openInWalletButton === null || openInWalletButton === void 0 ? void 0 : openInWalletButton.disabled, className: "tw-min-h-button" }), jsx(Button$1, { size: "lg", variant: "secondary", label: "Cancel", onClick: handleClose, className: "tw-min-h-button" })] }));
27823
+ }
27824
+ function TimeRemaining({ timeRemainingSeconds, tooltipContent, }) {
27825
+ const timeRemaining = useCountdown(timeRemainingSeconds);
27826
+ return (jsx(PropertyListItem, { icon: jsx(TimeFliesIcon, {}), label: "Time remaining", detail: timeRemaining, tooltip: tooltipContent
27827
+ ? {
27828
+ tooltipWidth: "max",
27829
+ tooltipContent,
27830
+ }
27831
+ : undefined }));
27832
+ }
27833
+
27771
27834
  function MainView({ isLoading = false }) {
27772
27835
  return (jsxs(ProductCard, { children: [jsx(NavigationBar, { isLoading: isLoading, title: "Swap", actions: [
27773
27836
  {
@@ -69340,7 +69403,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
69340
69403
  }, secondToken: {
69341
69404
  bgColor: toToken.bgColor,
69342
69405
  logoURI: toToken.logoUrl,
69343
- } })) }), jsx(SwapProgressViewHeader, { title: headerTitle, description: headerDescription }), jsxs("ul", { className: "tw-flex tw-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-rounded-squid-l tw-pb-squid-s tw-pt-squid-xs mobile-xs-height:tw-h-[195px] mobile-sm-height:tw-py-squid-s", children: [jsx(PropertyListItem, { icon: jsx(ArrowsSwapIcon, {}), label: "Swap", detail: jsx(Transfer, { from: jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: fromAmount }), to: jsx(IconLabel, { src: toToken.logoUrl, rounded: "full", children: toAmount }) }) }), jsx(PropertyListItem, { icon: jsx(ChainLink, { size: "24", strokeWidth: "2" }), label: "Chain", detail: jsx(Transfer, { from: jsxs(Fragment, { children: [jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: fromChain.logoUrl }), jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxs(Fragment, { children: [jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: toChain.logoUrl }), jsx(CaptionText, { children: toChain.networkName })] }) }) }), jsx(PropertyListItem, { icon: jsx(WalletFilledIcon, { size: "24" }), label: "Wallet", detail: jsx(Transfer, { from: fromAddressFormatted, to: toAddressFormatted }) }), jsx(PropertyListItem, { icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: swapState === SwapState.PROGRESS ? (jsx(Transfer, { from: timer, to: estimatedTimeToComplete })) : swapState === SwapState.COMPLETED ? (jsx(CaptionText, { children: timer })) : (jsx(CaptionText, { children: estimatedTimeToComplete })) })] })] }), jsx(TrackTransactionView, { ref: trackTransactionViewRef, onTxEnd: () => {
69406
+ } })) }), jsx(TxProgressViewHeader, { title: headerTitle, description: headerDescription }), jsxs("ul", { className: "tw-flex tw-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-rounded-squid-l tw-pb-squid-s tw-pt-squid-xs mobile-xs-height:tw-h-[195px] mobile-sm-height:tw-py-squid-s", children: [jsx(PropertyListItem, { icon: jsx(ArrowsSwapIcon, {}), label: "Swap", detail: jsx(Transfer, { from: jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: fromAmount }), to: jsx(IconLabel, { src: toToken.logoUrl, rounded: "full", children: toAmount }) }) }), jsx(PropertyListItem, { icon: jsx(ChainLink, { size: "24", strokeWidth: "2" }), label: "Chain", detail: jsx(Transfer, { from: jsxs(Fragment, { children: [jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: fromChain.logoUrl }), jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxs(Fragment, { children: [jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: toChain.logoUrl }), jsx(CaptionText, { children: toChain.networkName })] }) }) }), jsx(PropertyListItem, { icon: jsx(WalletFilledIcon, { size: "24" }), label: "Wallet", detail: jsx(Transfer, { from: fromAddressFormatted, to: toAddressFormatted }) }), jsx(PropertyListItem, { icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: swapState === SwapState.PROGRESS ? (jsx(Transfer, { from: timer, to: estimatedTimeToComplete })) : swapState === SwapState.COMPLETED ? (jsx(CaptionText, { children: timer })) : (jsx(CaptionText, { children: estimatedTimeToComplete })) })] })] }), jsx(TrackTransactionView, { ref: trackTransactionViewRef, onTxEnd: () => {
69344
69407
  stopTimer();
69345
69408
  }, onTxStart: () => {
69346
69409
  startTimer();
@@ -69797,4 +69860,4 @@ function ThemeProvider(_a) {
69797
69860
  return (jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-group tw-relative tw-flex tw-font-squid-main tw-h-d-screen mobile-lg:tw-h-auto", props.className), children: children })));
69798
69861
  }
69799
69862
 
69800
- export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CopyOutlinedIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, QrCodeIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, adjustColorForContrast, baseTailwindConfig, blendColors, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
69863
+ export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CopyOutlinedIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DepositAddressView, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, QrCodeIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, TxProgressViewHeader, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, adjustColorForContrast, baseTailwindConfig, blendColors, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
@@ -9,10 +9,11 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
9
9
  disabled?: boolean;
10
10
  link?: string;
11
11
  isLoading?: boolean;
12
+ showLoader?: boolean;
12
13
  chip?: ChipProps;
13
14
  containerClassName?: string;
14
15
  buttonRef?: React.Ref<HTMLButtonElement>;
15
16
  anchorRef?: React.Ref<HTMLAnchorElement>;
16
17
  }
17
- export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, anchorRef, buttonRef, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Button({ label, disabled, size, variant, icon, link, isLoading, showLoader, chip, containerClassName, anchorRef, buttonRef, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -1,7 +1,15 @@
1
1
  import { type ComponentProps } from "react";
2
2
  export declare function ArrowRightIcon(): import("react/jsx-runtime").JSX.Element;
3
- export declare function ArrowRightDownIcon(): import("react/jsx-runtime").JSX.Element;
4
- export declare function ArrowRightUpIcon(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ArrowRightDownIcon({ size, className, strokeWidth, }: {
4
+ size?: string;
5
+ className?: string;
6
+ strokeWidth?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ArrowRightUpIcon({ size, className, strokeWidth, }: {
9
+ size?: string;
10
+ className?: string;
11
+ strokeWidth?: string;
12
+ }): import("react/jsx-runtime").JSX.Element;
5
13
  export declare function ChevronArrowIcon({ size, className, }: {
6
14
  size?: string;
7
15
  className?: string;
@@ -1,10 +1,13 @@
1
- import { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  interface HashLinkProps {
3
3
  showTx?: boolean;
4
4
  hash: string;
5
5
  children?: ReactNode;
6
6
  showCopyButton?: boolean;
7
7
  url?: string;
8
+ className?: string;
9
+ formattedHash?: string;
10
+ copyIconSize?: string;
8
11
  }
9
- export declare function HashLink({ showTx, hash, showCopyButton, url, children, }: HashLinkProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function HashLink({ showTx, hash, showCopyButton, url, children, className, formattedHash, copyIconSize, }: HashLinkProps): import("react/jsx-runtime").JSX.Element;
10
13
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  interface JoinProps {
3
3
  children?: ReactNode;
4
4
  glue: () => ReactNode;
@@ -0,0 +1,7 @@
1
+ interface TxProgressViewHeaderProps {
2
+ title: string;
3
+ description: string;
4
+ isWarning?: boolean;
5
+ }
6
+ export declare function TxProgressViewHeader({ title, description, isWarning, }: TxProgressViewHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -20,7 +20,7 @@ export * from "./PipeSeparator";
20
20
  export * from "./ProductCard";
21
21
  export * from "./ProfileHeaderBackground";
22
22
  export * from "./SwapConfiguration";
23
- export * from "./SwapProgressViewHeader";
23
+ export * from "./TxProgressViewHeader";
24
24
  export * from "./SwapStepsCollapsed";
25
25
  export * from "./Toast";
26
26
  export * from "./TokenDetailsView";
@@ -1,5 +1,6 @@
1
1
  import { type ComponentProps } from "react";
2
2
  import { type PropertyListItemSize } from "../../types/components";
3
+ import { type TooltipProps } from "../controls";
3
4
  export interface PropertyListItemProps extends ComponentProps<"li"> {
4
5
  isLoading?: boolean;
5
6
  label?: React.ReactNode;
@@ -10,5 +11,6 @@ export interface PropertyListItemProps extends ComponentProps<"li"> {
10
11
  labelClassName?: string;
11
12
  iconClassName?: string;
12
13
  detailClassName?: string;
14
+ tooltip?: Omit<TooltipProps, "children">;
13
15
  }
14
- export declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, showGradientBg, labelClassName, iconClassName, detailClassName, ...props }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, showGradientBg, labelClassName, iconClassName, detailClassName, tooltip, ...props }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ interface ChainData {
3
+ networkName: string;
4
+ logoUrl: string;
5
+ }
6
+ interface Token {
7
+ symbol: string;
8
+ logoUrl: string;
9
+ }
10
+ export declare function DepositAddressView({ isOpen, fromToken, toToken, handleClose, openInWalletButton, fromChain, toChain, fromAmount, toAmount, depositAddress, depositAddressFormatted, timeRemainingSeconds, tooltips, description, title, }: {
11
+ isOpen?: boolean;
12
+ fromToken: Token;
13
+ toToken: Token;
14
+ handleClose?: () => void;
15
+ openInWalletButton?: {
16
+ disabled?: boolean;
17
+ onClick?: () => void;
18
+ };
19
+ fromChain: ChainData;
20
+ toChain: ChainData;
21
+ fromAmount: string;
22
+ toAmount: string;
23
+ depositAddress: string;
24
+ depositAddressFormatted: string;
25
+ timeRemainingSeconds?: number;
26
+ tooltips?: {
27
+ depositAddress?: React.ReactNode;
28
+ timeRemaining?: React.ReactNode;
29
+ };
30
+ title: string;
31
+ description: string;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ export {};
@@ -1,4 +1,5 @@
1
1
  export * from "./AssetsView";
2
+ export * from "./DepositAddressView";
2
3
  export * from "./MainView";
3
4
  export * from "./RecipientView";
4
5
  export * from "./SwapDetailsView";
@@ -16,13 +16,13 @@ interface DebouncedFunction<F extends AnyFunction> {
16
16
  }
17
17
  export declare function debounce<F extends AnyFunction>(func: F, delay: number): DebouncedFunction<F>;
18
18
  export declare const formatDuration: (elapsedTime: number) => string;
19
+ export declare function formatCountdown(seconds: number): string;
19
20
  export declare const formatTime: (timestampSeconds: number) => string;
20
21
  export declare const formatRelativeTime: (timestampSeconds: number) => string;
21
22
  export declare const formatRelativeDate: (timestampSeconds: number) => string;
22
23
  export declare function capitalize(text: string): string;
23
24
  type Falsy = false | null | undefined | 0 | "";
24
25
  export declare function truthy<T>(value: T): value is Exclude<T, Falsy>;
25
- export declare function truncateHash(hash: string): string;
26
26
  export declare const styled: <Tag extends keyof JSX.IntrinsicElements>(tag: Tag, className: string) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<ComponentProps<Tag>> & import("react").RefAttributes<ElementType<Tag>>>;
27
27
  export declare const mergeProps: <Tag extends keyof JSX.IntrinsicElements = any>(a: ComponentProps<Tag>, b: ComponentProps<Tag>) => ComponentProps<Tag>;
28
28
  export declare const calcLerp: (a: string, b: string, t: string | number) => string;
@@ -0,0 +1 @@
1
+ export declare function useCountdown(initialSeconds: number): string;
@@ -13,6 +13,7 @@ export declare const GradientBorder: Story;
13
13
  export declare const InsetBorder: Story;
14
14
  export declare const OutlineBorder: Story;
15
15
  export declare const RoundedFull: Story;
16
+ export declare const Shadow: Story;
16
17
  export declare const CustomContent: Story;
17
18
  export declare const PlaceholderForMissingImage: Story;
18
19
  export declare const PlaceholderForBrokenImage: Story;
@@ -23,6 +23,8 @@ export declare const LargeTertiary: Story;
23
23
  export declare const LargeDisabled: Story;
24
24
  export declare const LargeAndLink: Story;
25
25
  export declare const LargeAndLinkDisabled: Story;
26
+ export declare const LargeWithLoader: Story;
27
+ export declare const LargeDisabledWithLoader: Story;
26
28
  export declare const MediumWithIconLoading: Story;
27
29
  export declare const MediumWithLabelLoading: Story;
28
30
  export declare const MediumWithLongLabelLoading: Story;
@@ -0,0 +1,7 @@
1
+ import { type Meta, type StoryObj } from "@storybook/react";
2
+ import { TxProgressViewHeader } from "../../components/layout/TxProgressViewHeader";
3
+ declare const meta: Meta<typeof TxProgressViewHeader>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Warning: Story;
@@ -0,0 +1,6 @@
1
+ import { type Meta, type StoryObj } from "@storybook/react";
2
+ import { DepositAddressView } from "../../components/views/DepositAddressView";
3
+ declare const meta: Meta<typeof DepositAddressView>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;