@0xsquid/ui 2.4.9 → 2.4.10-beta.1
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 -27
- package/dist/cjs/types/components/buttons/Button.d.ts +2 -1
- package/dist/cjs/types/components/icons/Arrow.d.ts +10 -2
- package/dist/cjs/types/components/layout/HashLink.d.ts +5 -2
- package/dist/cjs/types/components/layout/Join.d.ts +1 -1
- package/dist/cjs/types/components/layout/TxProgressViewHeader.d.ts +7 -0
- package/dist/cjs/types/components/layout/UnsupportedPairNotice.d.ts +7 -0
- package/dist/cjs/types/components/layout/index.d.ts +2 -1
- package/dist/cjs/types/components/lists/PropertyListItem.d.ts +3 -1
- package/dist/cjs/types/components/views/DepositAddressView.d.ts +29 -0
- package/dist/cjs/types/components/views/index.d.ts +1 -0
- package/dist/cjs/types/core/utils.d.ts +1 -1
- package/dist/cjs/types/hooks/useCountdown.d.ts +1 -0
- package/dist/cjs/types/stories/badges/Image.stories.d.ts +1 -0
- package/dist/cjs/types/stories/buttons/Button.stories.d.ts +2 -0
- package/dist/cjs/types/stories/layout/TxProgressViewHeader.stories.d.ts +7 -0
- package/dist/cjs/types/stories/layout/UnsupportedPairNotice.stories.d.ts +6 -0
- package/dist/cjs/types/stories/views/DepositAddressView.stories.d.ts +6 -0
- package/dist/esm/index.js +87 -27
- package/dist/esm/types/components/buttons/Button.d.ts +2 -1
- package/dist/esm/types/components/icons/Arrow.d.ts +10 -2
- package/dist/esm/types/components/layout/HashLink.d.ts +5 -2
- package/dist/esm/types/components/layout/Join.d.ts +1 -1
- package/dist/esm/types/components/layout/TxProgressViewHeader.d.ts +7 -0
- package/dist/esm/types/components/layout/UnsupportedPairNotice.d.ts +7 -0
- package/dist/esm/types/components/layout/index.d.ts +2 -1
- package/dist/esm/types/components/lists/PropertyListItem.d.ts +3 -1
- package/dist/esm/types/components/views/DepositAddressView.d.ts +29 -0
- package/dist/esm/types/components/views/index.d.ts +1 -0
- package/dist/esm/types/core/utils.d.ts +1 -1
- package/dist/esm/types/hooks/useCountdown.d.ts +1 -0
- package/dist/esm/types/stories/badges/Image.stories.d.ts +1 -0
- package/dist/esm/types/stories/buttons/Button.stories.d.ts +2 -0
- package/dist/esm/types/stories/layout/TxProgressViewHeader.stories.d.ts +7 -0
- package/dist/esm/types/stories/layout/UnsupportedPairNotice.stories.d.ts +6 -0
- package/dist/esm/types/stories/views/DepositAddressView.stories.d.ts +6 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +65 -16
- package/package.json +1 -1
- package/dist/cjs/types/components/layout/SwapProgressViewHeader.d.ts +0 -6
- package/dist/cjs/types/stories/layout/SwapProgressViewHeader.stories.d.ts +0 -6
- package/dist/esm/types/components/layout/SwapProgressViewHeader.d.ts +0 -6
- package/dist/esm/types/stories/layout/SwapProgressViewHeader.stories.d.ts +0 -6
package/dist/cjs/index.js
CHANGED
|
@@ -2808,6 +2808,20 @@ const formatDuration = (elapsedTime) => {
|
|
|
2808
2808
|
// Show only minutes if total time is 1 minute or more
|
|
2809
2809
|
return `${minutes}m`;
|
|
2810
2810
|
};
|
|
2811
|
+
function formatCountdown(seconds) {
|
|
2812
|
+
const hours = Math.floor((seconds / 3600) % 24);
|
|
2813
|
+
const minutes = Math.floor((seconds / 60) % 60);
|
|
2814
|
+
const secs = seconds % 60;
|
|
2815
|
+
if (hours > 0) {
|
|
2816
|
+
return `${hours}h : ${String(minutes).padStart(2, "0")}m : ${String(secs).padStart(2, "0")}s`;
|
|
2817
|
+
}
|
|
2818
|
+
else if (minutes > 0) {
|
|
2819
|
+
return `${minutes}m : ${String(secs).padStart(2, "0")}s`;
|
|
2820
|
+
}
|
|
2821
|
+
else {
|
|
2822
|
+
return `${secs}s`;
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2811
2825
|
const formatTime = (timestampSeconds) => {
|
|
2812
2826
|
const date = new Date(timestampSeconds * 1000);
|
|
2813
2827
|
const hours = date.getHours();
|
|
@@ -2870,9 +2884,6 @@ const formatRelativeDate = (timestampSeconds) => {
|
|
|
2870
2884
|
});
|
|
2871
2885
|
return formattedDate;
|
|
2872
2886
|
};
|
|
2873
|
-
function truncateHash(hash) {
|
|
2874
|
-
return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
|
|
2875
|
-
}
|
|
2876
2887
|
const calcLerp = (a, b, t) => `calc(${a} + (${b} - ${a}) * ${t})`;
|
|
2877
2888
|
/**
|
|
2878
2889
|
* Returns an array including the first `count` unique values of the array
|
|
@@ -3662,11 +3673,11 @@ function Approve() {
|
|
|
3662
3673
|
function ArrowRightIcon() {
|
|
3663
3674
|
return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M14 6L20 12L14 18M19 12H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3664
3675
|
}
|
|
3665
|
-
function ArrowRightDownIcon() {
|
|
3666
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width:
|
|
3676
|
+
function ArrowRightDownIcon({ size = "10", className, strokeWidth = "2", }) {
|
|
3677
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 10 10", className: className, children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, d: "M9 3v6H3M1.167 1.167l7.166 7.166" }) }));
|
|
3667
3678
|
}
|
|
3668
|
-
function ArrowRightUpIcon() {
|
|
3669
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width:
|
|
3679
|
+
function ArrowRightUpIcon({ size = "10", className, strokeWidth = "2", }) {
|
|
3680
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: "none", viewBox: "0 0 10 10", className: className, children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: strokeWidth, d: "M9 7V1m0 0H3m6 0L1.167 8.833" }) }));
|
|
3670
3681
|
}
|
|
3671
3682
|
function ChevronArrowIcon({ size = "16", className, }) {
|
|
3672
3683
|
return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.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" }) }));
|
|
@@ -4327,12 +4338,14 @@ function UsdAmount({ usdAmount }) {
|
|
|
4327
4338
|
return (jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-text-grey-500", children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "$" }), jsxRuntime.jsx(CaptionText, { children: usdAmount.toString() })] }));
|
|
4328
4339
|
}
|
|
4329
4340
|
|
|
4330
|
-
function HashLink({ showTx = false, hash, showCopyButton = false, url, children, }) {
|
|
4331
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsxRuntime.jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children :
|
|
4341
|
+
function HashLink({ showTx = false, hash, showCopyButton = false, url, children, className, formattedHash, copyIconSize = "16", }) {
|
|
4342
|
+
return (jsxRuntime.jsxs("div", { className: cn("tw-flex tw-items-center", className), children: [showTx && jsxRuntime.jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : formattedHash, url && (jsxRuntime.jsx("a", { href: url, target: "_blank", className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", rel: "noreferrer", children: jsxRuntime.jsx(SquareArrowTopRight2Icon, { strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-text-royal-500" }) })), showCopyButton && (jsxRuntime.jsx("span", { className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: jsxRuntime.jsx(Copy, { size: copyIconSize, strokeWidth: "2", className: "tw-cursor-pointer tw-text-royal-500", onClick: () => {
|
|
4343
|
+
navigator.clipboard.writeText(hash).catch(() => { });
|
|
4344
|
+
} }) }))] }));
|
|
4332
4345
|
}
|
|
4333
4346
|
|
|
4334
4347
|
function WalletLink({ imageURI, address }) {
|
|
4335
|
-
return (jsxRuntime.jsx(IconLabel, { src: imageURI, rounded: "full", children: jsxRuntime.jsx(HashLink, { hash: address, showCopyButton: true, children: jsxRuntime.jsx(BodyText, { size: "small", children:
|
|
4348
|
+
return (jsxRuntime.jsx(IconLabel, { src: imageURI, rounded: "full", children: jsxRuntime.jsx(HashLink, { hash: address, showCopyButton: true, children: jsxRuntime.jsx(BodyText, { size: "small", children: address }) }) }));
|
|
4336
4349
|
}
|
|
4337
4350
|
|
|
4338
4351
|
const extraPaddingMap = {
|
|
@@ -4400,9 +4413,9 @@ const buttonVariantClassMap = {
|
|
|
4400
4413
|
const buttonDisabledClass = "!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed";
|
|
4401
4414
|
const loadingClassname = "tw-invisible tw-opacity-0";
|
|
4402
4415
|
function Button$1(_a) {
|
|
4403
|
-
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"]);
|
|
4416
|
+
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"]);
|
|
4404
4417
|
const chipElement = chip != null ? (jsxRuntime.jsx(Chip, Object.assign({}, chip, { className: cn("tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10", chip.className) }))) : null;
|
|
4405
|
-
const children = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!disabled && !isLoading && (jsxRuntime.jsx(ButtonHoverOverlay, { className: roundedClassMap[size][variant] })), jsxRuntime.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" ? (jsxRuntime.
|
|
4418
|
+
const children = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!disabled && !isLoading && (jsxRuntime.jsx(ButtonHoverOverlay, { className: roundedClassMap[size][variant] })), jsxRuntime.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" ? (jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-px-squid-m", children: [showLoader && jsxRuntime.jsx(Loader, {}), jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label })] })) : size === "md" ? (label != null && icon == null ? (
|
|
4406
4419
|
// label only
|
|
4407
4420
|
jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "small", children: label })) : label == null && icon != null ? (
|
|
4408
4421
|
// icon only
|
|
@@ -18888,7 +18901,7 @@ const borderTypeClassMap = {
|
|
|
18888
18901
|
};
|
|
18889
18902
|
function ModalContent(_a) {
|
|
18890
18903
|
var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
|
|
18891
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[
|
|
18904
|
+
return (jsxRuntime.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 })));
|
|
18892
18905
|
}
|
|
18893
18906
|
function ModalContentDivider() {
|
|
18894
18907
|
return (jsxRuntime.jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
|
|
@@ -18952,19 +18965,23 @@ function LogoContainer({ children }) {
|
|
|
18952
18965
|
}
|
|
18953
18966
|
|
|
18954
18967
|
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, }) {
|
|
18955
|
-
var _a, _b
|
|
18968
|
+
var _a, _b;
|
|
18956
18969
|
const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
|
|
18957
18970
|
const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
|
|
18958
18971
|
const isFetching = isFetchingProp || isLoading;
|
|
18959
|
-
|
|
18972
|
+
const showWalletButtonLabel = !isLoading &&
|
|
18973
|
+
!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) &&
|
|
18974
|
+
!!token &&
|
|
18975
|
+
(!!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.address) || !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel));
|
|
18976
|
+
return (jsxRuntime.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: [jsxRuntime.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: jsxRuntime.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: jsxRuntime.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: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), showWalletButtonLabel && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18960
18977
|
? "tw-text-grey-300"
|
|
18961
18978
|
: "tw-text-royal-500", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18962
18979
|
? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
|
|
18963
|
-
:
|
|
18980
|
+
: walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel }), jsxRuntime.jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18964
18981
|
? "tw-text-grey-600"
|
|
18965
18982
|
: "tw-text-royal-500" })] })] }))] }) })) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (jsxRuntime.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: jsxRuntime.jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsxRuntime.jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
|
|
18966
|
-
decimals: (
|
|
18967
|
-
symbol: (
|
|
18983
|
+
decimals: (_a = token === null || token === void 0 ? void 0 : token.decimals) !== null && _a !== void 0 ? _a : 18,
|
|
18984
|
+
symbol: (_b = token === null || token === void 0 ? void 0 : token.symbol) !== null && _b !== void 0 ? _b : "",
|
|
18968
18985
|
price: tokenPrice,
|
|
18969
18986
|
}, onAmountChange: (value) => {
|
|
18970
18987
|
onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
|
|
@@ -18974,10 +18991,6 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
|
|
|
18974
18991
|
}, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
|
|
18975
18992
|
}
|
|
18976
18993
|
|
|
18977
|
-
function SwapProgressViewHeader({ title, description, }) {
|
|
18978
|
-
return (jsxRuntime.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: [jsxRuntime.jsx(BodyText, { size: "large", className: "tw-min-h-squid-m !tw-leading-[25px] tw-text-grey-300", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
|
|
18979
|
-
}
|
|
18980
|
-
|
|
18981
18994
|
function AccountListItem({ isConnected, imageUrls = [], imageUrl, badgeUrl, actions, subtitle, title, }) {
|
|
18982
18995
|
const badge = {
|
|
18983
18996
|
src: isConnected ? badgeUrl : undefined,
|
|
@@ -19489,9 +19502,9 @@ function SmallBodyText(props) {
|
|
|
19489
19502
|
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
19490
19503
|
}
|
|
19491
19504
|
function PropertyListItem(_a) {
|
|
19492
|
-
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"]);
|
|
19505
|
+
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"]);
|
|
19493
19506
|
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
19494
|
-
return (jsxRuntime.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: jsxRuntime.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: [jsxRuntime.jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsxRuntime.
|
|
19507
|
+
return (jsxRuntime.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: jsxRuntime.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: [jsxRuntime.jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsxRuntime.jsxs(Text, { className: cn("tw-flex tw-min-w-fit tw-flex-1 tw-gap-squid-xxs tw-text-grey-500", labelClassName), children: [jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: label }), !!tooltip && (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { children: jsxRuntime.jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-500" }) })))] }), jsxRuntime.jsx(Text, { truncate: variant === "small" || undefined, className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
|
|
19495
19508
|
}
|
|
19496
19509
|
|
|
19497
19510
|
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
@@ -19829,7 +19842,7 @@ const TransactionItemHeader = ({ isLoading = false, variant, type, hash, status,
|
|
|
19829
19842
|
if (variant === "full") {
|
|
19830
19843
|
if (!type || !hash)
|
|
19831
19844
|
return null;
|
|
19832
|
-
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TxTypeLabel, { type: type }), jsxRuntime.jsx("span", { className: "tw-text-grey-500", children:
|
|
19845
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TxTypeLabel, { type: type }), jsxRuntime.jsx("span", { className: "tw-text-grey-500", children: hash })] }));
|
|
19833
19846
|
}
|
|
19834
19847
|
if (status && type) {
|
|
19835
19848
|
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TransactionState, { status: status, variant: "small" }), jsxRuntime.jsx(TxTypeLabel, { type: type })] }));
|
|
@@ -25950,6 +25963,14 @@ function PopLayout(props) {
|
|
|
25950
25963
|
return jsxRuntime.jsx(motion.div, Object.assign({ ref: ref }, props));
|
|
25951
25964
|
}
|
|
25952
25965
|
|
|
25966
|
+
function TxProgressViewHeader({ title, description, isWarning = false, }) {
|
|
25967
|
+
return (jsxRuntime.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: [jsxRuntime.jsx(BodyText, { size: "large", className: "tw-min-h-squid-m !tw-leading-[25px] tw-text-grey-300", children: title }), jsxRuntime.jsx(CaptionText, { className: cn("tw-h-squid-l", isWarning ? "tw-text-status-partial" : "tw-text-grey-500"), children: description })] }));
|
|
25968
|
+
}
|
|
25969
|
+
|
|
25970
|
+
function UnsupportedPairNotice({ description, fromImageUrl, toImageUrl, }) {
|
|
25971
|
+
return (jsxRuntime.jsxs("article", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs -tw-space-x-[18px] tw-p-squid-xs", children: [jsxRuntime.jsx(Image$1, { src: fromImageUrl, size: "large", rounded: "xs" }), jsxRuntime.jsx("span", { className: "tw-z-[1] tw-rounded-full tw-bg-grey-900", children: jsxRuntime.jsx(CircleXFilledIcon, {}) }), jsxRuntime.jsx(Image$1, { src: toImageUrl, size: "large", rounded: "xs" })] }), jsxRuntime.jsx(CaptionText, { className: "tw-max-w-[260px] tw-text-balance tw-text-center tw-text-grey-500", children: description })] }));
|
|
25972
|
+
}
|
|
25973
|
+
|
|
25953
25974
|
var lib = {};
|
|
25954
25975
|
|
|
25955
25976
|
var uaParser_min = {exports: {}};
|
|
@@ -27795,6 +27816,45 @@ const List = ({ children }) => {
|
|
|
27795
27816
|
return (jsxRuntime.jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
|
|
27796
27817
|
};
|
|
27797
27818
|
|
|
27819
|
+
function useCountdown(initialSeconds) {
|
|
27820
|
+
const [secondsLeft, setSecondsLeft] = React$1.useState(initialSeconds);
|
|
27821
|
+
React$1.useEffect(() => {
|
|
27822
|
+
if (secondsLeft <= 0)
|
|
27823
|
+
return;
|
|
27824
|
+
const timer = setInterval(() => {
|
|
27825
|
+
setSecondsLeft((prev) => Math.max(prev - 1, 0));
|
|
27826
|
+
}, 1000);
|
|
27827
|
+
return () => {
|
|
27828
|
+
clearInterval(timer);
|
|
27829
|
+
};
|
|
27830
|
+
}, [secondsLeft]);
|
|
27831
|
+
return formatCountdown(secondsLeft);
|
|
27832
|
+
}
|
|
27833
|
+
|
|
27834
|
+
function DepositAddressView({ isOpen = true, fromToken, toToken, handleClose, fromChain, toChain, fromAmount, toAmount, depositAddress, depositAddressFormatted, timeRemainingSeconds = 0, tooltips, description, title, }) {
|
|
27835
|
+
return (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onBackdropClick: handleClose, children: [jsxRuntime.jsxs(ModalContent, { style: {
|
|
27836
|
+
[CSS_VARS.SCALE_AND_FADE_DOWN_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
|
|
27837
|
+
[CSS_VARS.SCALE_AND_FADE_UP_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
|
|
27838
|
+
}, borderType: "outline", children: [jsxRuntime.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: {
|
|
27839
|
+
// box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
|
|
27840
|
+
boxShadow: "0 1px 0 currentColor",
|
|
27841
|
+
}, children: jsxRuntime.jsx("div", { className: "tw-absolute tw-right-squid-xs tw-top-squid-xs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "secondary", label: "Copy" }) }) }), jsxRuntime.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: jsxRuntime.jsx(Image$1, { src: fromToken.logoUrl, rounded: "full", shadow: true, size: "xlarge" }) }), jsxRuntime.jsx(TxProgressViewHeader, { title: title, description: description, isWarning: true }), jsxRuntime.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: [jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(WalletFilledIcon, { size: "24" }), label: "Deposit address", detail: jsxRuntime.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)
|
|
27842
|
+
? {
|
|
27843
|
+
tooltipContent: tooltips.depositAddress,
|
|
27844
|
+
tooltipWidth: "max",
|
|
27845
|
+
}
|
|
27846
|
+
: undefined }), jsxRuntime.jsx(PropertyListItem, { iconClassName: "tw-flex tw-items-center tw-justify-center", icon: jsxRuntime.jsx(ArrowRightUpIcon, { size: "15", strokeWidth: "1.5" }), label: "Send exactly", detail: jsxRuntime.jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: jsxRuntime.jsx(CaptionText, { children: fromAmount }) }) }), jsxRuntime.jsx(PropertyListItem, { iconClassName: "tw-flex tw-items-center tw-justify-center", icon: jsxRuntime.jsx(ArrowRightDownIcon, { size: "15", strokeWidth: "1.5" }), label: "You receive", detail: jsxRuntime.jsx(IconLabel, { src: toToken.logoUrl, rounded: "full", children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: toAmount }), jsxRuntime.jsx(Loader, { size: "16" })] }) }) }), jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(ChainLink, { size: "24", strokeWidth: "2" }), label: "Chain", detail: jsxRuntime.jsx(Transfer, { from: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Image$1, { src: fromChain.logoUrl, rounded: "xxs", shadow: true, size: "medium" }), jsxRuntime.jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Image$1, { src: toChain.logoUrl, rounded: "xxs", shadow: true, size: "medium" }), jsxRuntime.jsx(CaptionText, { children: toChain.networkName })] }) }) }), jsxRuntime.jsx(TimeRemaining, { timeRemainingSeconds: timeRemainingSeconds, tooltipContent: tooltips === null || tooltips === void 0 ? void 0 : tooltips.timeRemaining })] })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Cancel", onClick: handleClose, className: "tw-min-h-button" })] }));
|
|
27847
|
+
}
|
|
27848
|
+
function TimeRemaining({ timeRemainingSeconds, tooltipContent, }) {
|
|
27849
|
+
const timeRemaining = useCountdown(timeRemainingSeconds);
|
|
27850
|
+
return (jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(TimeFliesIcon, {}), label: "Time remaining", detail: timeRemaining, tooltip: tooltipContent
|
|
27851
|
+
? {
|
|
27852
|
+
tooltipWidth: "max",
|
|
27853
|
+
tooltipContent,
|
|
27854
|
+
}
|
|
27855
|
+
: undefined }));
|
|
27856
|
+
}
|
|
27857
|
+
|
|
27798
27858
|
function MainView({ isLoading = false }) {
|
|
27799
27859
|
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { isLoading: isLoading, title: "Swap", actions: [
|
|
27800
27860
|
{
|
|
@@ -69367,7 +69427,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
69367
69427
|
}, secondToken: {
|
|
69368
69428
|
bgColor: toToken.bgColor,
|
|
69369
69429
|
logoURI: toToken.logoUrl,
|
|
69370
|
-
} })) }), jsxRuntime.jsx(
|
|
69430
|
+
} })) }), jsxRuntime.jsx(TxProgressViewHeader, { title: headerTitle, description: headerDescription }), jsxRuntime.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: [jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(ArrowsSwapIcon, {}), label: "Swap", detail: jsxRuntime.jsx(Transfer, { from: jsxRuntime.jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: fromAmount }), to: jsxRuntime.jsx(IconLabel, { src: toToken.logoUrl, rounded: "full", children: toAmount }) }) }), jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(ChainLink, { size: "24", strokeWidth: "2" }), label: "Chain", detail: jsxRuntime.jsx(Transfer, { from: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: fromChain.logoUrl }), jsxRuntime.jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("img", { className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs", src: toChain.logoUrl }), jsxRuntime.jsx(CaptionText, { children: toChain.networkName })] }) }) }), jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(WalletFilledIcon, { size: "24" }), label: "Wallet", detail: jsxRuntime.jsx(Transfer, { from: fromAddressFormatted, to: toAddressFormatted }) }), jsxRuntime.jsx(PropertyListItem, { icon: jsxRuntime.jsx(TimeFliesIcon, {}), label: "Time to complete", detail: swapState === SwapState.PROGRESS ? (jsxRuntime.jsx(Transfer, { from: timer, to: estimatedTimeToComplete })) : swapState === SwapState.COMPLETED ? (jsxRuntime.jsx(CaptionText, { children: timer })) : (jsxRuntime.jsx(CaptionText, { children: estimatedTimeToComplete })) })] })] }), jsxRuntime.jsx(TrackTransactionView, { ref: trackTransactionViewRef, onTxEnd: () => {
|
|
69371
69431
|
stopTimer();
|
|
69372
69432
|
}, onTxStart: () => {
|
|
69373
69433
|
startTimer();
|
|
@@ -69922,6 +69982,7 @@ exports.CopyOutlinedIcon = CopyOutlinedIcon;
|
|
|
69922
69982
|
exports.CrossAnimatedIcon = CrossAnimatedIcon;
|
|
69923
69983
|
exports.CrossedOutSunSolidIcon = CrossedOutSunSolidIcon;
|
|
69924
69984
|
exports.DashboardFast = DashboardFast;
|
|
69985
|
+
exports.DepositAddressView = DepositAddressView;
|
|
69925
69986
|
exports.DescriptionBlocks = DescriptionBlocks;
|
|
69926
69987
|
exports.DetailsToolbar = DetailsToolbar;
|
|
69927
69988
|
exports.DiscordIcon = DiscordIcon;
|
|
@@ -70072,7 +70133,6 @@ exports.SwapHeader = SwapHeader;
|
|
|
70072
70133
|
exports.SwapIcon = SwapIcon;
|
|
70073
70134
|
exports.SwapInputsIcon = SwapInputsIcon;
|
|
70074
70135
|
exports.SwapProgressView = SwapProgressView;
|
|
70075
|
-
exports.SwapProgressViewHeader = SwapProgressViewHeader;
|
|
70076
70136
|
exports.SwapProperties = SwapProperties;
|
|
70077
70137
|
exports.SwapStepItem = SwapStepItem;
|
|
70078
70138
|
exports.SwapStepSeparator = SwapStepSeparator;
|
|
@@ -70112,6 +70172,8 @@ exports.TransactionViewLayout = TransactionViewLayout;
|
|
|
70112
70172
|
exports.Transfer = Transfer;
|
|
70113
70173
|
exports.TranslateIcon = TranslateIcon;
|
|
70114
70174
|
exports.TriangleExclamation = TriangleExclamation;
|
|
70175
|
+
exports.TxProgressViewHeader = TxProgressViewHeader;
|
|
70176
|
+
exports.UnsupportedPairNotice = UnsupportedPairNotice;
|
|
70115
70177
|
exports.UsdAmount = UsdAmount;
|
|
70116
70178
|
exports.WalletFilledIcon = WalletFilledIcon;
|
|
70117
70179
|
exports.WalletIcon = WalletIcon;
|
|
@@ -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(
|
|
4
|
-
|
|
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 {};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface UnsupportedPairNoticeProps {
|
|
2
|
+
description: string;
|
|
3
|
+
fromImageUrl: string;
|
|
4
|
+
toImageUrl: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function UnsupportedPairNotice({ description, fromImageUrl, toImageUrl, }: UnsupportedPairNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -20,7 +20,6 @@ export * from "./PipeSeparator";
|
|
|
20
20
|
export * from "./ProductCard";
|
|
21
21
|
export * from "./ProfileHeaderBackground";
|
|
22
22
|
export * from "./SwapConfiguration";
|
|
23
|
-
export * from "./SwapProgressViewHeader";
|
|
24
23
|
export * from "./SwapStepsCollapsed";
|
|
25
24
|
export * from "./Toast";
|
|
26
25
|
export * from "./TokenDetailsView";
|
|
@@ -41,3 +40,5 @@ export * from "./TransactionProperties/SwapProperties";
|
|
|
41
40
|
export * from "./TransactionProperties/TransactionProperties";
|
|
42
41
|
export * from "./TransactionSearch";
|
|
43
42
|
export * from "./Transfer";
|
|
43
|
+
export * from "./TxProgressViewHeader";
|
|
44
|
+
export * from "./UnsupportedPairNotice";
|
|
@@ -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,29 @@
|
|
|
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, fromChain, toChain, fromAmount, toAmount, depositAddress, depositAddressFormatted, timeRemainingSeconds, tooltips, description, title, }: {
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
fromToken: Token;
|
|
13
|
+
toToken: Token;
|
|
14
|
+
handleClose?: () => void;
|
|
15
|
+
fromChain: ChainData;
|
|
16
|
+
toChain: ChainData;
|
|
17
|
+
fromAmount: string;
|
|
18
|
+
toAmount: string;
|
|
19
|
+
depositAddress: string;
|
|
20
|
+
depositAddressFormatted: string;
|
|
21
|
+
timeRemainingSeconds?: number;
|
|
22
|
+
tooltips?: {
|
|
23
|
+
depositAddress?: React.ReactNode;
|
|
24
|
+
timeRemaining?: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -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 { UnsupportedPairNotice } from "../../components/layout/UnsupportedPairNotice";
|
|
3
|
+
declare const meta: Meta<typeof UnsupportedPairNotice>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: 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;
|