@0xsquid/ui 3.1.0 → 3.2.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.
- package/dist/cjs/index.js +106 -45
- package/dist/cjs/types/components/buttons/CopyButton.d.ts +7 -0
- package/dist/cjs/types/components/buttons/LinkButton.d.ts +5 -0
- package/dist/cjs/types/components/icons/Arrow.d.ts +5 -0
- package/dist/cjs/types/components/icons/Timeline.d.ts +1 -1
- package/dist/cjs/types/components/layout/AnimationWrapper.d.ts +1 -1
- package/dist/cjs/types/components/layout/HashLink.d.ts +2 -2
- package/dist/cjs/types/components/layout/PipeSeparator.d.ts +6 -2
- package/dist/cjs/types/components/lists/TransactionAction/FeesAction.d.ts +2 -1
- package/dist/cjs/types/components/lists/TransactionAction/SuccessAction.d.ts +1 -1
- package/dist/cjs/types/components/lists/TransactionAction/TransactionAction.d.ts +1 -1
- package/dist/cjs/types/components/views/SwapProgressView.d.ts +2 -1
- package/dist/cjs/types/components/views/TransactionView/BridgeTransactionView.d.ts +12 -4
- package/dist/cjs/types/components/views/TransactionView/SwapTransactionView.d.ts +4 -2
- package/dist/cjs/types/components/views/TransactionView/TransactionView.d.ts +2 -2
- package/dist/cjs/types/stories/views/SwapProgressView.stories.d.ts +1 -0
- package/dist/cjs/types/stories/views/TransactionView.stories.d.ts +12 -6
- package/dist/esm/index.js +106 -46
- package/dist/esm/types/components/buttons/CopyButton.d.ts +7 -0
- package/dist/esm/types/components/buttons/LinkButton.d.ts +5 -0
- package/dist/esm/types/components/icons/Arrow.d.ts +5 -0
- package/dist/esm/types/components/icons/Timeline.d.ts +1 -1
- package/dist/esm/types/components/layout/AnimationWrapper.d.ts +1 -1
- package/dist/esm/types/components/layout/HashLink.d.ts +2 -2
- package/dist/esm/types/components/layout/PipeSeparator.d.ts +6 -2
- package/dist/esm/types/components/lists/TransactionAction/FeesAction.d.ts +2 -1
- package/dist/esm/types/components/lists/TransactionAction/SuccessAction.d.ts +1 -1
- package/dist/esm/types/components/lists/TransactionAction/TransactionAction.d.ts +1 -1
- package/dist/esm/types/components/views/SwapProgressView.d.ts +2 -1
- package/dist/esm/types/components/views/TransactionView/BridgeTransactionView.d.ts +12 -4
- package/dist/esm/types/components/views/TransactionView/SwapTransactionView.d.ts +4 -2
- package/dist/esm/types/components/views/TransactionView/TransactionView.d.ts +2 -2
- package/dist/esm/types/stories/views/SwapProgressView.stories.d.ts +1 -0
- package/dist/esm/types/stories/views/TransactionView.stories.d.ts +12 -6
- package/dist/index.css +1 -1
- package/dist/index.d.ts +37 -17
- package/package.json +1 -1
|
@@ -15,11 +15,11 @@ export type TransactionViewProps = {
|
|
|
15
15
|
[Type in TransactionType]: {
|
|
16
16
|
type: Type;
|
|
17
17
|
isLoading?: false;
|
|
18
|
-
data: ComponentProps<TransactionViewComponents[Type]>;
|
|
18
|
+
data: Omit<Partial<ComponentProps<TransactionViewComponents[Type]>>, "isLoading">;
|
|
19
19
|
} | {
|
|
20
20
|
type: Type;
|
|
21
21
|
isLoading: true;
|
|
22
|
-
data?: Partial<ComponentProps<TransactionViewComponents[Type]
|
|
22
|
+
data?: Omit<Partial<ComponentProps<TransactionViewComponents[Type]>>, "isLoading">;
|
|
23
23
|
};
|
|
24
24
|
}[TransactionType];
|
|
25
25
|
export declare function TransactionView({ type, isLoading, data, }: TransactionViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -34,8 +34,9 @@ export declare const Swap: {
|
|
|
34
34
|
};
|
|
35
35
|
fromAddress: string;
|
|
36
36
|
toAddress: string;
|
|
37
|
+
fromLink: string;
|
|
38
|
+
toLink: string;
|
|
37
39
|
exchangeRate: string;
|
|
38
|
-
boosted: boolean;
|
|
39
40
|
timeToComplete: string;
|
|
40
41
|
actions: ({
|
|
41
42
|
type: "success";
|
|
@@ -214,7 +215,6 @@ export declare const BuyNFT: {
|
|
|
214
215
|
};
|
|
215
216
|
fromAddress: string;
|
|
216
217
|
toAddress: string;
|
|
217
|
-
boosted: boolean;
|
|
218
218
|
timeToComplete: string;
|
|
219
219
|
actions: ({
|
|
220
220
|
type: "success";
|
|
@@ -349,7 +349,6 @@ export declare const Interaction: {
|
|
|
349
349
|
hash: string;
|
|
350
350
|
status: string;
|
|
351
351
|
url: string;
|
|
352
|
-
boosted: boolean;
|
|
353
352
|
chain: {
|
|
354
353
|
logoURI: string;
|
|
355
354
|
name: string;
|
|
@@ -490,12 +489,20 @@ export declare const Bridge: {
|
|
|
490
489
|
hash: string;
|
|
491
490
|
url: string;
|
|
492
491
|
status: string;
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
fromAmount: string;
|
|
493
|
+
toAmount: string;
|
|
494
|
+
toToken: {
|
|
495
|
+
logoURI: string;
|
|
496
|
+
bgColor: string;
|
|
497
|
+
symbol: string;
|
|
498
|
+
};
|
|
499
|
+
fromToken: {
|
|
495
500
|
logoURI: string;
|
|
496
501
|
bgColor: string;
|
|
497
502
|
symbol: string;
|
|
498
503
|
};
|
|
504
|
+
fromLink: string;
|
|
505
|
+
toLink: string;
|
|
499
506
|
fromChain: {
|
|
500
507
|
logoURI: string;
|
|
501
508
|
name: string;
|
|
@@ -507,7 +514,6 @@ export declare const Bridge: {
|
|
|
507
514
|
bgColor: string;
|
|
508
515
|
};
|
|
509
516
|
address: string;
|
|
510
|
-
boosted: boolean;
|
|
511
517
|
timeToComplete: string;
|
|
512
518
|
actions: ({
|
|
513
519
|
type: "success";
|
package/dist/esm/index.js
CHANGED
|
@@ -3718,7 +3718,7 @@ var ImageState;
|
|
|
3718
3718
|
ImageState[ImageState["LOADED"] = 1] = "LOADED";
|
|
3719
3719
|
ImageState[ImageState["ERROR"] = 2] = "ERROR";
|
|
3720
3720
|
})(ImageState || (ImageState = {}));
|
|
3721
|
-
const sizeClassMap$
|
|
3721
|
+
const sizeClassMap$2 = {
|
|
3722
3722
|
small: "tw-w-squid-s",
|
|
3723
3723
|
medium: "tw-w-squid-m",
|
|
3724
3724
|
large: "tw-w-squid-l",
|
|
@@ -3750,7 +3750,7 @@ const borderClassMap = {
|
|
|
3750
3750
|
};
|
|
3751
3751
|
function Image$1(_a) {
|
|
3752
3752
|
var { src, size = "medium", className: propsClassName, placeholderImageUrl, border = "none", rounded = "xxs", shadow = false, children, containerProps } = _a, props = __rest$1(_a, ["src", "size", "className", "placeholderImageUrl", "border", "rounded", "shadow", "children", "containerProps"]);
|
|
3753
|
-
const className = cn("tw-object-cover tw-aspect-square tw-relative tw-duration-300 tw-transition-[width,height] tw-max-w-full tw-bg-grey-500", sizeClassMap$
|
|
3753
|
+
const className = cn("tw-object-cover tw-aspect-square tw-relative tw-duration-300 tw-transition-[width,height] tw-max-w-full tw-bg-grey-500", sizeClassMap$2[size], propsClassName, roundedClassMap[rounded], shadow && boxShadowClassMap[size], borderClassMap[border]);
|
|
3754
3754
|
const [imageState, setImageState] = useState(ImageState.LOADED);
|
|
3755
3755
|
return (jsxs("div", Object.assign({}, containerProps, { className: cn("tw-relative", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: [children != null ? (jsx("div", Object.assign({ className: cn(className, "tw-flex tw-items-center tw-justify-center") }, props, { children: children }))) : ((imageState !== ImageState.LOADED || !src) &&
|
|
3756
3756
|
(placeholderImageUrl ? (jsx("img", Object.assign({ src: placeholderImageUrl, className: className }, props))) : (jsx("div", Object.assign({ className: className }, props))))), children == null && src && (jsx("img", Object.assign({}, props, { src: src, onError: () => {
|
|
@@ -3870,7 +3870,7 @@ function IconLabel({ src, children, rounded }) {
|
|
|
3870
3870
|
return (jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsx(Image$1, { src: src, rounded: rounded, size: "medium" }), typeof children === "string" ? (jsx(CaptionText, { children: children })) : (children)] }));
|
|
3871
3871
|
}
|
|
3872
3872
|
|
|
3873
|
-
const sizeClassMap = {
|
|
3873
|
+
const sizeClassMap$1 = {
|
|
3874
3874
|
large: "tw-h-squid-xxl tw-w-squid-xxl tw-rounded-squid-s",
|
|
3875
3875
|
small: "tw-h-squid-xl tw-w-squid-xl tw-rounded-squid-xs",
|
|
3876
3876
|
};
|
|
@@ -3887,7 +3887,7 @@ const customImageStylesMap = {
|
|
|
3887
3887
|
},
|
|
3888
3888
|
};
|
|
3889
3889
|
function ImageGroup({ imageUrls, badge, size = "large", }) {
|
|
3890
|
-
return (jsxs("div", { className: cn("tw-relative tw-flex tw-flex-shrink-0 tw-flex-wrap tw-content-center tw-items-center tw-justify-center tw-gap-0.5 tw-border tw-border-solid tw-border-material-light-thin tw-bg-grey-700", sizeClassMap[size]), children: [imageUrls.map((url) => (jsx(Image$1, { src: url, size: "medium", rounded: "xxs", style: customImageStylesMap[size] }, url))), badge != null && size !== "small" && (jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px]", children: jsx(Image$1, Object.assign({}, badge, { border: "outline-lg", size: "medium" })) }))] }));
|
|
3890
|
+
return (jsxs("div", { className: cn("tw-relative tw-flex tw-flex-shrink-0 tw-flex-wrap tw-content-center tw-items-center tw-justify-center tw-gap-0.5 tw-border tw-border-solid tw-border-material-light-thin tw-bg-grey-700", sizeClassMap$1[size]), children: [imageUrls.map((url) => (jsx(Image$1, { src: url, size: "medium", rounded: "xxs", style: customImageStylesMap[size] }, url))), badge != null && size !== "small" && (jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px]", children: jsx(Image$1, Object.assign({}, badge, { border: "outline-lg", size: "medium" })) }))] }));
|
|
3891
3891
|
}
|
|
3892
3892
|
|
|
3893
3893
|
function Approve() {
|
|
@@ -3945,6 +3945,9 @@ function ArrowOutOfBoxIcon() {
|
|
|
3945
3945
|
function ChevronGrabberVerticalIcon({ size = "16", className, }) {
|
|
3946
3946
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsx("path", { d: "M5.33301 6.00002L7.52827 3.80476C7.78862 3.54441 8.21073 3.54441 8.47108 3.80476L10.6663 6.00002M5.33301 10L7.52827 12.1953C7.78862 12.4556 8.21073 12.4556 8.47108 12.1953L10.6663 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3947
3947
|
}
|
|
3948
|
+
function SquareArrowTopRightIcon({ className, size = "24", strokeWidth = "2", }) {
|
|
3949
|
+
return (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M9 6H8.8C7.11984 6 6.27976 6 5.63803 6.32698C5.07354 6.6146 4.6146 7.07354 4.32698 7.63803C4 8.27976 4 9.11984 4 10.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H13.2C14.8802 20 15.7202 20 16.362 19.673C16.9265 19.3854 17.3854 18.9265 17.673 18.362C18 17.7202 18 16.8802 18 15.2V15M14 4H20M20 4V10M20 4L11 13", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3950
|
+
}
|
|
3948
3951
|
function SquareArrowTopRight2Icon({ className, size = "16", strokeWidth = "2", }) {
|
|
3949
3952
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsx("path", { d: "M6.00033 2.66663H4.80033C4.05359 2.66663 3.68022 2.66663 3.395 2.81195C3.14412 2.93978 2.94015 3.14376 2.81232 3.39464C2.66699 3.67985 2.66699 4.05322 2.66699 4.79996L2.66699 11.2C2.66699 11.9467 2.66699 12.3201 2.81232 12.6053C2.94015 12.8562 3.14412 13.0601 3.395 13.188C3.68022 13.3333 4.05359 13.3333 4.80033 13.3333L11.2003 13.3333C11.9471 13.3333 12.3204 13.3333 12.6056 13.188C12.8565 13.0601 13.0605 12.8562 13.1883 12.6053C13.3337 12.3201 13.3337 11.9467 13.3337 11.2V9.99996M9.33366 2.66663L13.3337 2.66663M13.3337 2.66663V6.66663M13.3337 2.66663L7.33366 8.66663", stroke: "currentColor", strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) }));
|
|
3950
3953
|
}
|
|
@@ -4593,10 +4596,21 @@ function UsdAmount({ usdAmount }) {
|
|
|
4593
4596
|
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() })] }));
|
|
4594
4597
|
}
|
|
4595
4598
|
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4599
|
+
const CopyButton = (_a) => {
|
|
4600
|
+
var { copyText, className, size } = _a, props = __rest$1(_a, ["copyText", "className", "size"]);
|
|
4601
|
+
const [copied, setCopied] = useState(false);
|
|
4602
|
+
const handleCopy = () => {
|
|
4603
|
+
navigator.clipboard.writeText(copyText).catch(() => { });
|
|
4604
|
+
setCopied(true);
|
|
4605
|
+
setTimeout(() => {
|
|
4606
|
+
setCopied(false);
|
|
4607
|
+
}, 1500);
|
|
4608
|
+
};
|
|
4609
|
+
return (jsxs("button", Object.assign({ type: "button", onClick: handleCopy, className: cn("tw-relative tw-cursor-pointer tw-rounded-squid-xs tw-p-0.5 tw-text-royal-500 hover:tw-bg-material-light-thin", className) }, props, { children: [jsx(CopyOutlinedIcon, { strokeWidth: "2", size: size === "small" ? "1rem" : "1.5rem", className: cn("tw-text-royal-500", copied ? "tw-invisible" : "tw-visible") }), jsx("span", { className: cn("tw-absolute tw-left-1/2 tw-top-1/2 -tw-translate-x-1/2 -tw-translate-y-1/2", copied ? "tw-visible" : "tw-invisible"), children: jsx(Checkmark1Icon, { size: size === "small" ? "0.75rem" : "1.35rem" }) })] })));
|
|
4610
|
+
};
|
|
4611
|
+
|
|
4612
|
+
function HashLink({ showTx = false, hash, showCopyButton = false, url, children, className, formattedHash, size, }) {
|
|
4613
|
+
return (jsxs("div", { className: cn("tw-flex tw-items-center tw-gap-1", className), children: [showTx && jsx("span", { className: "tw-mr-1 tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : formattedHash, url && (jsx("a", { href: url, target: "_blank", className: "tw-ml-0.5 tw-rounded-squid-xs tw-p-0.5 tw-text-royal-500 hover:tw-bg-material-light-thin", rel: "noreferrer", children: jsx(SquareArrowTopRightIcon, { size: size === "small" ? "16" : "24" }) })), showCopyButton && jsx(CopyButton, { copyText: hash, size: size })] }));
|
|
4600
4614
|
}
|
|
4601
4615
|
|
|
4602
4616
|
function WalletLink({ imageURI, address }) {
|
|
@@ -38213,8 +38227,14 @@ function NavigationBar(_a) {
|
|
|
38213
38227
|
: "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
38214
38228
|
}
|
|
38215
38229
|
|
|
38216
|
-
|
|
38217
|
-
|
|
38230
|
+
const sizeClassMap = {
|
|
38231
|
+
default: "tw-h-[0.8em]",
|
|
38232
|
+
small: "tw-h-2.5",
|
|
38233
|
+
large: "tw-h-5",
|
|
38234
|
+
};
|
|
38235
|
+
function PipeSeparator(_a) {
|
|
38236
|
+
var { className, size = "default" } = _a, props = __rest$1(_a, ["className", "size"]);
|
|
38237
|
+
return (jsx("div", Object.assign({}, props, { className: cn("tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", sizeClassMap[size], className) })));
|
|
38218
38238
|
}
|
|
38219
38239
|
|
|
38220
38240
|
function ProductCard({ children }) {
|
|
@@ -38987,7 +39007,7 @@ function PropertyListItem(_a) {
|
|
|
38987
39007
|
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
38988
39008
|
const isCollapsible = !!collapsibleContent;
|
|
38989
39009
|
const ContentWrapperTag = isCollapsible ? "button" : "div";
|
|
38990
|
-
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 && "tw-
|
|
39010
|
+
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 && "tw-squid-property-row-bg", addExtraPadding && containerPaddingClassNameMap[variant], className), children: jsxs(ContentWrapperTag, { onClick: isCollapsible ? handleToggleCollapsed : undefined, className: "tw-w-full tw-rounded-squid-xs", children: [jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-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, showGradient: false, 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, showGradient: false, children: detail }) }), isCollapsible && (jsx(ChevronLargeRightIcon, { className: cn("tw-text-grey-600 tw-duration-generic", !isCollapsed && "tw-rotate-90"), size: "16" }))] }), isCollapsible && (jsx(Collapse, { collapsed: isCollapsed, children: collapsibleContent }))] }) })));
|
|
38991
39011
|
}
|
|
38992
39012
|
|
|
38993
39013
|
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
@@ -39172,10 +39192,10 @@ function TokenGroups({ groups, className, onGroupChildClick, variant = "large",
|
|
|
39172
39192
|
}
|
|
39173
39193
|
|
|
39174
39194
|
function ActionLayout({ lineCap = jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
39175
|
-
return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: statusIcon, children: description }), title && (jsxs(Fragment, { children: [jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }), jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), jsx(BodyText, { size: "large", className: cn("tw-flex tw-min-h-squid-l tw-items-center !tw-leading-[1] tw-text-grey-300 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0"), children: title })] })] })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsx(Timeline.Straight, {})] }), jsx("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xs tw-pb-squid-xs tw-text-grey-500 tw-transition-
|
|
39195
|
+
return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: statusIcon, children: jsx(BodyText, { size: "small", tight: true, className: "tw-block tw-w-full tw-font-medium tw-text-grey-300", children: description }) }), title && (jsxs(Fragment, { children: [jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }), jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), jsx(BodyText, { size: "large", className: cn("tw-flex tw-min-h-squid-l tw-items-center !tw-leading-[1] tw-text-grey-300 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0"), children: title })] })] })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsx(Timeline.Straight, {})] }), jsx("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xs tw-overflow-hidden tw-pb-squid-xs tw-text-grey-500 tw-transition-all tw-duration-200", !showBody ? "tw-max-h-0 !tw-pt-0 tw-opacity-0" : "tw-max-h-20", title && "tw-pt-squid-xxs"), children: children })] })] }));
|
|
39176
39196
|
}
|
|
39177
39197
|
function ActionProperties({ timestamp, hash, url, }) {
|
|
39178
|
-
return (jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsx(Timestamp, { time: timestamp }), timestamp && hash && jsx(PipeSeparator, { className: "tw-text-grey-700" }), hash && jsx(HashLink, { hash: hash, url: url, showTx: true })] }));
|
|
39198
|
+
return (jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsx(Timestamp, { time: timestamp }), timestamp && hash && (jsx(PipeSeparator, { size: "small", className: "tw-text-grey-700" })), hash && (jsx(HashLink, { size: "small", hash: hash, url: url, formattedHash: formatHash(hash), showTx: true, showCopyButton: true }))] }));
|
|
39179
39199
|
}
|
|
39180
39200
|
function renderStatusIcon(status, defaultIcon) {
|
|
39181
39201
|
switch (status) {
|
|
@@ -39194,7 +39214,7 @@ function renderStatusIcon(status, defaultIcon) {
|
|
|
39194
39214
|
}
|
|
39195
39215
|
}
|
|
39196
39216
|
const ActionLineOutRow = ({ status }) => (jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", status ? statusTextClassMap[status] : "!tw-text-[transparent]"), children: [jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }));
|
|
39197
|
-
const ActionStatusRow = ({ children, status, icon, }) => (jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(
|
|
39217
|
+
const ActionStatusRow = ({ children, status, icon, }) => (jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx("span", { className: "tw-block tw-w-full tw-text-grey-300", children: children }) })] }));
|
|
39198
39218
|
function ActionRow(_a) {
|
|
39199
39219
|
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
39200
39220
|
return (jsx("div", Object.assign({}, props, { className: cn("tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m", className) })));
|
|
@@ -39218,15 +39238,13 @@ function FeesAction({ status, nextStatus, showTimeline = false, total, lines, })
|
|
|
39218
39238
|
return (jsxs(Fragment, { children: [jsx(FeesTotal, { status: status, nextStatus: nextStatus, total: total, showTimeline: lines !== undefined || showTimeline }), lines && (jsx(FeesLines, { status: status, lines: lines, showTimeline: showTimeline }))] }));
|
|
39219
39239
|
}
|
|
39220
39240
|
function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
|
|
39221
|
-
return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: jsx(TagIconFilled, {}), children: jsx(FeesRow, Object.assign({ collapsed: collapsed }, total)) }), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
|
|
39241
|
+
return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: jsx(TagIconFilled, {}), children: jsx(FeesRow, Object.assign({ className: "tw-text-grey-300", collapsed: collapsed }, total)) }), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
|
|
39222
39242
|
}
|
|
39223
|
-
function FeesLines({ status, lines
|
|
39224
|
-
return (
|
|
39225
|
-
? statusTextClassMap[status]
|
|
39226
|
-
: "!tw-text-[transparent]"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
|
|
39243
|
+
function FeesLines({ status, lines }) {
|
|
39244
|
+
return (jsx(ActionWrapper, { status: status, children: lines && (jsx("div", { children: lines.map((line, index) => (jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-h-10", children: jsxs(Timeline, { className: statusTextClassMap[status], children: [jsx(Timeline.Straight, {}), jsx(Timeline.ArrowRight, {}), jsx(Timeline.Straight, { className: index < lines.length - 1 ? "visible" : "tw-invisible" })] }) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(FeesRow, Object.assign({ className: "tw-text-grey-400" }, line)) })] }, index))) })) }));
|
|
39227
39245
|
}
|
|
39228
|
-
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
39229
|
-
return (jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsx(SizeTransition, { disableInitialAnimation: true, children: jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate
|
|
39246
|
+
function FeesRow({ label, usd, amount, symbol, collapsed = false, className, }) {
|
|
39247
|
+
return (jsxs("div", { className: cn("tw-flex tw-h-5 tw-w-full tw-items-center tw-gap-squid-xs", className), children: [jsx(SizeTransition, { disableInitialAnimation: true, children: jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate", !collapsed && "tw-w-[100px]"), children: label }) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(PipeSeparator, { size: "large", className: "tw-text-grey-700" }) }), jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
|
|
39230
39248
|
}
|
|
39231
39249
|
|
|
39232
39250
|
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
@@ -39278,7 +39296,7 @@ function StartAction({ status, nextStatus, showTimeline = false, showBody = fals
|
|
|
39278
39296
|
function SuccessAction({ nextStatus, status, description = status === "error"
|
|
39279
39297
|
? "Transaction failed"
|
|
39280
39298
|
: "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
|
|
39281
|
-
return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp
|
|
39299
|
+
return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp !== null && timestamp !== void 0 ? timestamp : hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
39282
39300
|
}
|
|
39283
39301
|
|
|
39284
39302
|
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
@@ -87230,27 +87248,39 @@ const swapProgressAnimations = {
|
|
|
87230
87248
|
[SwapState.CONFIRMATION_REJECTED]: transactionRejectedAnimation,
|
|
87231
87249
|
[SwapState.NEEDS_GAS]: transactionErrorPauseAnimation,
|
|
87232
87250
|
};
|
|
87233
|
-
const getSwapProgressTitle = ({ fromToken, toToken, swapState, isSendTransaction, }) => {
|
|
87251
|
+
const getSwapProgressTitle = ({ fromToken, toToken, swapState, isSendTransaction, isBridgeTransaction, }) => {
|
|
87234
87252
|
switch (swapState) {
|
|
87235
87253
|
case SwapState.CONFIRM:
|
|
87236
87254
|
if (isSendTransaction) {
|
|
87237
87255
|
return "Confirm transaction";
|
|
87238
87256
|
}
|
|
87257
|
+
if (isBridgeTransaction) {
|
|
87258
|
+
return "Confirm bridge";
|
|
87259
|
+
}
|
|
87239
87260
|
return "Confirm swap";
|
|
87240
87261
|
case SwapState.PROGRESS:
|
|
87241
87262
|
if (isSendTransaction) {
|
|
87242
87263
|
return `Send ${fromToken.symbol}`;
|
|
87243
87264
|
}
|
|
87265
|
+
if (isBridgeTransaction) {
|
|
87266
|
+
return `Bridge ${fromToken.symbol}`;
|
|
87267
|
+
}
|
|
87244
87268
|
return `Swap ${fromToken.symbol} to ${toToken.symbol}`;
|
|
87245
87269
|
case SwapState.COMPLETED:
|
|
87246
87270
|
if (isSendTransaction) {
|
|
87247
87271
|
return "Tokens received";
|
|
87248
87272
|
}
|
|
87273
|
+
if (isBridgeTransaction) {
|
|
87274
|
+
return "Bridge complete";
|
|
87275
|
+
}
|
|
87249
87276
|
return "Swap complete";
|
|
87250
87277
|
case SwapState.ERROR:
|
|
87251
87278
|
if (isSendTransaction) {
|
|
87252
87279
|
return "Transaction failed";
|
|
87253
87280
|
}
|
|
87281
|
+
if (isBridgeTransaction) {
|
|
87282
|
+
return "Bridge failed";
|
|
87283
|
+
}
|
|
87254
87284
|
return "Swap failed";
|
|
87255
87285
|
case SwapState.CONFIRMATION_TOO_LONG:
|
|
87256
87286
|
return "Confirmation taking too long";
|
|
@@ -87258,14 +87288,23 @@ const getSwapProgressTitle = ({ fromToken, toToken, swapState, isSendTransaction
|
|
|
87258
87288
|
if (isSendTransaction) {
|
|
87259
87289
|
return "Transaction rejected";
|
|
87260
87290
|
}
|
|
87291
|
+
if (isBridgeTransaction) {
|
|
87292
|
+
return "Bridge rejected";
|
|
87293
|
+
}
|
|
87261
87294
|
return "Swap rejected";
|
|
87262
87295
|
case SwapState.PARTIAL_SUCCESS:
|
|
87296
|
+
if (isSendTransaction) {
|
|
87297
|
+
return "Transaction failed to complete";
|
|
87298
|
+
}
|
|
87299
|
+
if (isBridgeTransaction) {
|
|
87300
|
+
return "Bridge failed to complete";
|
|
87301
|
+
}
|
|
87263
87302
|
return "Swap failed to complete";
|
|
87264
87303
|
case SwapState.NEEDS_GAS:
|
|
87265
87304
|
return "Needs gas on destination";
|
|
87266
87305
|
}
|
|
87267
87306
|
};
|
|
87268
|
-
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, isSendTransaction, }) => {
|
|
87307
|
+
const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, toAddressFormatted, refundTokenSymbol, isSendTransaction, isBridgeTransaction, }) => {
|
|
87269
87308
|
switch (swapState) {
|
|
87270
87309
|
case SwapState.CONFIRM: {
|
|
87271
87310
|
return "Authenticate the transaction in your wallet.";
|
|
@@ -87274,6 +87313,9 @@ const getSwapProgressDescriptions = ({ swapState, toAmount, toChain, toToken, to
|
|
|
87274
87313
|
if (isSendTransaction) {
|
|
87275
87314
|
return "Feel free to dismiss this dialog, we’ll notify you when the recipient receives your tokens.";
|
|
87276
87315
|
}
|
|
87316
|
+
if (isBridgeTransaction) {
|
|
87317
|
+
return "Feel free to dismiss this dialog, we’ll notify you when the bridge is complete.";
|
|
87318
|
+
}
|
|
87277
87319
|
return "Feel free to dismiss this dialog, we’ll notify you when the swap is complete.";
|
|
87278
87320
|
}
|
|
87279
87321
|
case SwapState.COMPLETED: {
|
|
@@ -87309,7 +87351,7 @@ const swapProgressButtonTexts = {
|
|
|
87309
87351
|
[SwapState.PARTIAL_SUCCESS]: "Cancel",
|
|
87310
87352
|
[SwapState.NEEDS_GAS]: "Go to Axelarscan",
|
|
87311
87353
|
};
|
|
87312
|
-
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, addGasLink, shareSwapDropdownContent, isSendTransaction = false, }) {
|
|
87354
|
+
function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, supportLink, fromAmount, fromChain, fromToken, toAmount, toChain, toToken, fromAddressFormatted, toAddressFormatted, swapState, estimatedTimeToComplete, footerButton, refundTokenSymbol, addGasLink, shareSwapDropdownContent, isSendTransaction = false, isBridgeTransaction = false, }) {
|
|
87313
87355
|
const [showSwapInfoSection, setShowSwapInfoSection] = useState(true);
|
|
87314
87356
|
const isFirstRenderRef = useRef(true);
|
|
87315
87357
|
const { timer, stopTimer, startTimer } = useTimer({
|
|
@@ -87333,6 +87375,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
87333
87375
|
fromToken,
|
|
87334
87376
|
toToken,
|
|
87335
87377
|
isSendTransaction,
|
|
87378
|
+
isBridgeTransaction,
|
|
87336
87379
|
});
|
|
87337
87380
|
const headerDescription = getSwapProgressDescriptions({
|
|
87338
87381
|
swapState,
|
|
@@ -87342,12 +87385,13 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
87342
87385
|
toAddressFormatted,
|
|
87343
87386
|
refundTokenSymbol,
|
|
87344
87387
|
isSendTransaction,
|
|
87388
|
+
isBridgeTransaction,
|
|
87345
87389
|
});
|
|
87346
87390
|
return {
|
|
87347
87391
|
headerTitle,
|
|
87348
87392
|
headerDescription,
|
|
87349
87393
|
};
|
|
87350
|
-
}, [swapState, fromToken, toToken, toAmount, toChain]);
|
|
87394
|
+
}, [swapState, fromToken, toToken, toAmount, toChain, isBridgeTransaction]);
|
|
87351
87395
|
const trackTransactionViewRef = useRef(null);
|
|
87352
87396
|
const handleCollapseRouteSteps = () => { var _a; return (_a = trackTransactionViewRef.current) === null || _a === void 0 ? void 0 : _a.handleToggleRouteSteps(); };
|
|
87353
87397
|
return (jsxs(Modal, { isOpen: isOpen, onBackdropClick:
|
|
@@ -87367,13 +87411,18 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
87367
87411
|
height: "100%",
|
|
87368
87412
|
maxHeight: "100%",
|
|
87369
87413
|
width: "auto",
|
|
87370
|
-
}, autoplay: true, loop: true, src: swapProgressAnimations[swapState] }) }), 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: swapState === SwapState.COMPLETED ? (jsxs(Fragment, { children: [jsx("span", { className: "-tw-mb-1 -tw-ml-1", children: jsx(SwapSuccessIcon, {}) }), shareSwapDropdownContent ? (jsx(ShareSwapButton, { dropdownContent: shareSwapDropdownContent })) : null] })) : swapState === SwapState.ERROR ? (jsx(SwapErrorTopMenu, { supportLink: supportLink, type: "error" })) : swapState === SwapState.PARTIAL_SUCCESS ? (jsx(SwapErrorTopMenu, { supportLink: supportLink, type: "warning" })) : isSendTransaction ? (jsx(Image$1, { src: fromToken.logoUrl, rounded: "full", size: "xlarge", shadow: true })) : (jsx(TokenPair, { firstToken: {
|
|
87414
|
+
}, autoplay: true, loop: true, src: swapProgressAnimations[swapState] }) }), 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: swapState === SwapState.COMPLETED ? (jsxs(Fragment, { children: [jsx("span", { className: "-tw-mb-1 -tw-ml-1", children: jsx(SwapSuccessIcon, {}) }), shareSwapDropdownContent ? (jsx(ShareSwapButton, { dropdownContent: shareSwapDropdownContent })) : null] })) : swapState === SwapState.ERROR ? (jsx(SwapErrorTopMenu, { supportLink: supportLink, type: "error" })) : swapState === SwapState.PARTIAL_SUCCESS ? (jsx(SwapErrorTopMenu, { supportLink: supportLink, type: "warning" })) : isSendTransaction || isBridgeTransaction ? (jsx(Image$1, { src: fromToken.logoUrl, rounded: "full", size: "xlarge", shadow: true })) : (jsx(TokenPair, { firstToken: {
|
|
87371
87415
|
bgColor: fromToken.bgColor,
|
|
87372
87416
|
logoURI: fromToken.logoUrl,
|
|
87373
87417
|
}, secondToken: {
|
|
87374
87418
|
bgColor: toToken.bgColor,
|
|
87375
87419
|
logoURI: toToken.logoUrl,
|
|
87376
|
-
} })) }), jsx(TxProgressViewHeader, { title: headerTitle, description: headerDescription }), jsxs("ul", { className: "tw-
|
|
87420
|
+
} })) }), 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 tw-squid-property-gradient-bg-odd-container mobile-xs-height:tw-h-[195px] mobile-sm-height:tw-py-squid-s", children: [jsx(PropertyListItem, { icon: isSendTransaction ? (jsx(ArrowRightUpCircleIcon, {})) : (jsx(ArrowsSwapIcon, {})), label: isSendTransaction
|
|
87421
|
+
? "Send"
|
|
87422
|
+
: isBridgeTransaction
|
|
87423
|
+
? "Bridge"
|
|
87424
|
+
: "Swap", detail: isSendTransaction ? (jsx(IconLabel, { src: fromToken.logoUrl, rounded: "full", children: fromAmount })) : (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: isSendTransaction ||
|
|
87425
|
+
fromChain.networkName === toChain.networkName ? (jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(Image$1, { size: "medium", rounded: "xxs", src: fromChain.logoUrl }), jsx(CaptionText, { children: fromChain.networkName })] })) : (jsx(Transfer, { from: jsxs(Fragment, { children: [jsx(Image$1, { size: "medium", rounded: "xxs", src: fromChain.logoUrl }), jsx(CaptionText, { children: fromChain.networkName })] }), to: jsxs(Fragment, { children: [jsx(Image$1, { size: "medium", rounded: "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: () => {
|
|
87377
87426
|
stopTimer();
|
|
87378
87427
|
}, onTxStart: () => {
|
|
87379
87428
|
startTimer();
|
|
@@ -87475,20 +87524,27 @@ function TransactionViewLayout(_a) {
|
|
|
87475
87524
|
var { isLoading, header, properties, actions, fees } = _a, props = __rest$1(_a, ["isLoading", "header", "properties", "actions", "fees"]);
|
|
87476
87525
|
const [actionsCollapsed, setActionsCollapsed] = useState(true);
|
|
87477
87526
|
const [feesCollapsed, setFeesCollapsed] = useState(true);
|
|
87478
|
-
|
|
87527
|
+
const items = useMemo(() => {
|
|
87528
|
+
if (actions)
|
|
87529
|
+
return linkActionTimelineProps(actions, actionsCollapsed);
|
|
87530
|
+
return [];
|
|
87531
|
+
}, [actions, actionsCollapsed]);
|
|
87532
|
+
return (jsx("div", Object.assign({ className: "tw-relative tw-divide-y tw-divide-material-light-thin tw-squid-property-gradient-bg-even-container" }, props, { children: isLoading ? (jsxs(Fragment, { children: [jsx("div", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-full tw-animate-shimmer tw-bg-shimmer tw-text-transparent", style: {
|
|
87479
87533
|
backgroundSize: "200% 100%",
|
|
87480
|
-
} }), jsx(TransactionHeaderLayout, { isLoading: true }), jsx(PropertiesSkeleton, {})] })) : (jsxs(Fragment, { children: [header, properties,
|
|
87481
|
-
|
|
87482
|
-
|
|
87483
|
-
|
|
87484
|
-
|
|
87485
|
-
|
|
87486
|
-
|
|
87487
|
-
|
|
87488
|
-
|
|
87489
|
-
|
|
87490
|
-
|
|
87491
|
-
|
|
87534
|
+
} }), jsx(TransactionHeaderLayout, { isLoading: true }), jsx(PropertiesSkeleton, {})] })) : (jsxs(Fragment, { children: [header, properties, actions && (jsx(CollapsibleSection, { header: jsx("div", { className: "tw-w-full", children: items[0] && jsx(TransactionAction, Object.assign({}, items[0])) }), collapsed: actionsCollapsed, setCollapsed: setActionsCollapsed, children: linkActionTimelineProps(actions, actionsCollapsed)
|
|
87535
|
+
.slice(1, linkActionTimelineProps.length)
|
|
87536
|
+
.map((props, i) => (jsx("div", { className: cn(i > 0 && "tw-border-t tw-border-t-material-light-thin"), children: jsx(TransactionAction, Object.assign({}, props)) }, i))) })), fees && (jsx(CollapsibleSection, { header: jsx(FeesTotal, Object.assign({ collapsed: feesCollapsed, showTimeline: true }, fees)), collapsed: feesCollapsed, setCollapsed: setFeesCollapsed, children: jsx(FeesLines, Object.assign({}, fees)) }))] })) })));
|
|
87537
|
+
}
|
|
87538
|
+
function CollapsibleSection({ header, children, collapsed, setCollapsed, collapsedHeight = 0, }) {
|
|
87539
|
+
return (jsx("div", { className: cn("tw-group/collapsible-section tw-relative tw-bg-grey-900", collapsed ? "tw-cursor-pointer" : ""), children: jsx("div", { className: cn("tw-relative tw-border-material-light-thin tw-transition-[border-width] tw-duration-200", !collapsed && "tw-border-t-[4px]"), children: jsxs("div", { className: "tw-border-t tw-border-t-material-light-thin", children: [jsxs("span", { className: "tw-relative tw-z-10 tw-flex tw-flex tw-w-full tw-cursor-pointer tw-items-center tw-justify-between tw-text-left hover:tw-bg-grey-800", onClick: (e) => {
|
|
87540
|
+
const target = e.target;
|
|
87541
|
+
if (target.tagName === "BUTTON" ||
|
|
87542
|
+
target.tagName === "A" ||
|
|
87543
|
+
target.closest("button, a, input, select, textarea")) {
|
|
87544
|
+
return;
|
|
87545
|
+
}
|
|
87546
|
+
setCollapsed((prev) => !prev);
|
|
87547
|
+
}, children: [jsx("div", { className: "tw-w-full", children: header }), jsx(ChevronLargeDownIcon, { className: cn("tw-absolute tw-right-squid-m tw-top-1/2 tw-origin-center -tw-translate-y-1/2 tw-text-grey-300 tw-transition-transform tw-duration-200", collapsed && "-tw-rotate-90") })] }), jsx(Collapse, { collapsed: collapsed, collapsedHeight: collapsedHeight, children: children })] }) }) }));
|
|
87492
87548
|
}
|
|
87493
87549
|
function PropertiesSkeleton() {
|
|
87494
87550
|
return (jsx(PropertiesLayout, { children: Array.from({ length: 5 }, (_, i) => (jsx(PropertyListItem, { variant: "large", isLoading: true, showGradientBg: false }, i))) }));
|
|
@@ -87509,16 +87565,20 @@ function InteractionTransactionView({ title = "Interaction", hash, status, url,
|
|
|
87509
87565
|
return (jsx(TransactionViewLayout, { isLoading: isLoading, header: jsx(TransactionHeaderLayout, { title: title, status: status, media: jsx("div", { className: "tw-flex tw-h-10 tw-w-10 tw-items-center tw-justify-center tw-rounded-md tw-bg-royal-400 tw-text-grey-900", children: jsx(ThumbsUp, { size: "24" }) }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }), properties: jsxs(PropertiesLayout, { children: [jsx(PropertyListItem, { variant: "large", icon: jsx(ChainLink, { size: "24" }), label: "Chain", detail: jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(WalletFilledIcon, {}), label: "Wallet", detail: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: address, showCopyButton: true }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: jsxs("div", { className: "tw-flex tw-items-center", children: [boosted && jsx(BoostBadge, {}), jsx(BodyText, { size: "small", children: timeToComplete })] }) })] }), actions: actions, fees: fees }));
|
|
87510
87566
|
}
|
|
87511
87567
|
|
|
87512
|
-
function
|
|
87568
|
+
function LinkButton({ href }) {
|
|
87569
|
+
return (jsx("a", { href: href, target: "_blank", className: "tw-ml-0.5 tw-rounded-squid-xs tw-p-0.5 tw-text-royal-500 hover:tw-bg-material-light-thin", rel: "noreferrer", children: jsx(SquareArrowTopRightIcon, {}) }));
|
|
87570
|
+
}
|
|
87571
|
+
|
|
87572
|
+
function SwapTransactionView({ title = "Swap", hash, toLink, fromLink, status, url, fromAmount, fromToken, toAmount, toToken, fromChain, toChain, fromAddress, toAddress, exchangeRate, boosted, timeToComplete, actions, fees, isLoading, }) {
|
|
87513
87573
|
if (isLoading)
|
|
87514
87574
|
return jsx(TransactionViewLayout, { isLoading: isLoading });
|
|
87515
|
-
return (jsx(TransactionViewLayout, { header: jsx(TransactionHeaderLayout, { title: title, status: status, media: jsx(Drip, { direction: "horizontal", from: fromToken, to: toToken }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true, formattedHash: formatHash(hash) })] }) }), properties: jsxs(PropertiesLayout, { children: [jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ArrowRightUpCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Swap ", fromToken.symbol] }), detail: jsx(IconLabel, { src: fromToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: fromAmount }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(ArrowRightDownCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Receive ", toToken.symbol] }), detail: jsx(IconLabel, { src: toToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: toAmount }) }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ChainLink, { size: "24" }), label: "Chain", detail: jsx(Transfer, { from: jsx(IconLabel, { src: fromChain.logoURI, children: jsx(BodyText, { size: "small", children: fromChain.name }) }), to: jsx(IconLabel, { src: toChain.logoURI, children: jsx(BodyText, { size: "small", children: toChain.name }) }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(WalletFilledIcon, {}), label: "Wallet", detail: jsx(Transfer, { from: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: fromAddress, showCopyButton: true, formattedHash: formatHash(fromAddress) }) }), to: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: toAddress, showCopyButton: true, formattedHash: formatHash(toAddress) }) }) }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ArrowsSwapIcon, {}), label: "Exchange rate", detail: jsx(Transfer, { from: jsxs(BodyText, { size: "small", children: ["1 ", fromToken.symbol] }), to: jsxs(BodyText, { size: "small", children: [exchangeRate, " ", toToken.symbol] }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: jsxs("div", { className: "tw-flex tw-items-center", children: [boosted && jsx(BoostBadge, {}), jsx(BodyText, { size: "small", children: timeToComplete })] }) })] }), actions: actions, fees: fees }));
|
|
87575
|
+
return (jsx(TransactionViewLayout, { header: jsx(TransactionHeaderLayout, { title: title, status: status, media: jsx(Drip, { direction: "horizontal", from: fromToken, to: toToken }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true, formattedHash: formatHash(hash) })] }) }), properties: jsxs(PropertiesLayout, { children: [jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ArrowRightUpCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Swap ", fromToken.symbol] }), detail: jsxs("span", { className: "tw-inline-flex tw-inline-flex tw-gap-0.5", children: [jsx(IconLabel, { src: fromToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: fromAmount }) }), fromLink && jsx(LinkButton, { href: fromLink })] }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(ArrowRightDownCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Receive ", toToken.symbol] }), detail: jsxs("span", { className: "tw-inline-flex tw-items-center tw-gap-0.5", children: [jsx(IconLabel, { src: toToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: toAmount }) }), toLink && jsx(LinkButton, { href: toLink })] }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ChainLink, { size: "24" }), label: "Chain", detail: jsx(Transfer, { from: jsx(IconLabel, { src: fromChain.logoURI, children: jsx(BodyText, { size: "small", children: fromChain.name }) }), to: jsx(IconLabel, { src: toChain.logoURI, children: jsx(BodyText, { size: "small", children: toChain.name }) }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(WalletFilledIcon, {}), label: "Wallet", detail: jsx(Transfer, { from: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: fromAddress, showCopyButton: true, formattedHash: formatHash(fromAddress) }) }), to: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: toAddress, showCopyButton: true, formattedHash: formatHash(toAddress) }) }) }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ArrowsSwapIcon, {}), label: "Exchange rate", detail: jsx(Transfer, { from: jsxs(BodyText, { size: "small", children: ["1 ", fromToken.symbol] }), to: jsxs(BodyText, { size: "small", children: [exchangeRate, " ", toToken.symbol] }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: jsxs("div", { className: "tw-flex tw-items-center", children: [boosted && jsx(BoostBadge, {}), jsx(BodyText, { size: "small", children: timeToComplete })] }) })] }), actions: actions, fees: fees }));
|
|
87516
87576
|
}
|
|
87517
87577
|
|
|
87518
|
-
function BridgeTransactionView({ title = "Bridge", hash, status, url,
|
|
87578
|
+
function BridgeTransactionView({ title = "Bridge", hash, fromLink, toLink, status, url, fromAmount, toAmount, fromToken, toToken, fromChain, toChain, address, actions, fees, boosted, timeToComplete, isLoading, }) {
|
|
87519
87579
|
if (isLoading)
|
|
87520
87580
|
return jsx(TransactionViewLayout, { isLoading: isLoading });
|
|
87521
|
-
return (jsx(TransactionViewLayout, { isLoading: isLoading, header: jsx(TransactionHeaderLayout, { title: title, status: status, media: jsxs("div", { className: "tw-relative", children: [jsx(Image$1, { src: fromChain.logoURI, size: "xlarge", rounded: "full" }), jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px] tw-rounded-md tw-border tw-border-white", children: jsx(Image$1, { src: toChain.logoURI, size: "medium" }) })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true, formattedHash: formatHash(hash) })
|
|
87581
|
+
return (jsx(TransactionViewLayout, { isLoading: isLoading, header: jsx(TransactionHeaderLayout, { title: title, status: status, media: jsxs("div", { className: "tw-relative", children: [jsx(Image$1, { src: fromChain.logoURI, size: "xlarge", rounded: "full" }), jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px] tw-rounded-md tw-border tw-border-white", children: jsx(Image$1, { src: toChain.logoURI, size: "medium" }) })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true, formattedHash: formatHash(hash) })] }) }), properties: jsxs(PropertiesLayout, { children: [jsx(PropertyListItem, { variant: "large", icon: jsx(ArrowRightUpCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Bridge ", fromToken.symbol] }), detail: jsxs("span", { className: "tw-inline-flex tw-inline-flex tw-gap-0.5", children: [jsx(IconLabel, { src: fromToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: fromAmount }) }), fromLink && jsx(LinkButton, { href: fromLink })] }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(ArrowRightDownCircleIcon, {}), label: jsxs(BodyText, { size: "small", children: ["Receive ", toToken.symbol] }), detail: jsxs("span", { className: "tw-inline-flex tw-items-center tw-gap-0.5", children: [jsx(IconLabel, { src: toToken.logoURI, rounded: "full", children: jsx(BodyText, { size: "small", children: toAmount }) }), toLink && jsx(LinkButton, { href: toLink })] }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(ChainLink, { size: "24" }), label: "Chain", detail: jsx(Transfer, { from: jsx(IconLabel, { src: fromChain.logoURI, children: jsx(BodyText, { size: "small", children: fromChain.name }) }), to: jsx(IconLabel, { src: toChain.logoURI, children: jsx(BodyText, { size: "small", children: toChain.name }) }) }) }), jsx(PropertyListItem, { variant: "large", icon: jsx(WalletFilledIcon, {}), label: "Wallet", detail: jsx(BodyText, { size: "small", children: jsx(HashLink, { hash: address, showCopyButton: true, formattedHash: address }) }) }), jsx(PropertyListItem, { variant: "large", showGradientBg: false, icon: jsx(TimeFliesIcon, {}), label: "Time to complete", detail: jsxs("div", { className: "tw-flex tw-items-center", children: [boosted && jsx(BoostBadge, {}), jsx(BodyText, { size: "small", children: timeToComplete })] }) })] }), actions: actions, fees: fees }));
|
|
87522
87582
|
}
|
|
87523
87583
|
|
|
87524
87584
|
function TransactionView({ type, isLoading, data, }) {
|
|
@@ -87863,4 +87923,4 @@ function ThemeProvider(_a) {
|
|
|
87863
87923
|
return (jsx("div", Object.assign({ id: "squid-style-container" }, 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", "squid-style-container", props.className), children: children })));
|
|
87864
87924
|
}
|
|
87865
87925
|
|
|
87866
|
-
export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AddressHeader, AnimateNumber, AnimationCard, AnimationWrapper, Announcement, AppContainer, ApplePayIcon, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowExpandIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleFilledIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, BoostBadge, BorderedContainer, Breadcrumb, BridgeAction, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, Card, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleCheckIcon, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy2Icon, CopyOutlinedIcon, CreditCardIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DepositAddressView, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, Drip, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FarcasterIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostCircleIcon, GhostIcon, GithubIcon, GooglePayIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageStack, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionTransactionView, Join, LaptopIcon, LargeNumericInput, LimitIcon, LinkIcon, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, LoadingText, MEDIA_QUERIES, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, ModalTitle, MoneyBagIcon, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PluginIcon, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, PropertiesLayout, PropertyListItem, PunkIcon, QrCode, QrCodeIcon, QrCodeModal, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, 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, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapErrorIcon, SwapIcon, SwapInputsIcon, SwapProgressView, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TelegramIcon, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeaderLayout, TransactionItem, TransactionItemSkeleton, TransactionNotFoundView, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, TxProgressViewHeader, UnsupportedPairNotice, UsdAmount, UserInputType, WalletFilledIcon, WalletIcon, WalletLink, WrapAction, XSocialIcon, adjustColorForContrast, baseTailwindConfig, blendColors, buttonRoundedClassMap, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, themeKeysToCssVariables, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useNumericInput, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
87926
|
+
export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AddressHeader, AnimateNumber, AnimationCard, AnimationWrapper, Announcement, AppContainer, ApplePayIcon, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowExpandIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleFilledIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, BoostBadge, BorderedContainer, Breadcrumb, BridgeAction, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, Card, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleCheckIcon, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy2Icon, CopyOutlinedIcon, CreditCardIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DepositAddressView, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, Drip, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FarcasterIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostCircleIcon, GhostIcon, GithubIcon, GooglePayIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageStack, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionTransactionView, Join, LaptopIcon, LargeNumericInput, LimitIcon, LinkIcon, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, LoadingText, MEDIA_QUERIES, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, ModalTitle, MoneyBagIcon, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PluginIcon, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, PropertiesLayout, PropertyListItem, PunkIcon, QrCode, QrCodeIcon, QrCodeModal, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, 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, SquareArrowTopRightIcon, SquidLogo, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapErrorIcon, SwapIcon, SwapInputsIcon, SwapProgressView, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TelegramIcon, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeaderLayout, TransactionItem, TransactionItemSkeleton, TransactionNotFoundView, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, TxProgressViewHeader, UnsupportedPairNotice, UsdAmount, UserInputType, WalletFilledIcon, WalletIcon, WalletLink, WrapAction, XSocialIcon, adjustColorForContrast, baseTailwindConfig, blendColors, buttonRoundedClassMap, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, themeKeysToCssVariables, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useNumericInput, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
copyText: string;
|
|
4
|
+
size?: "default" | "small";
|
|
5
|
+
}
|
|
6
|
+
export declare const CopyButton: ({ copyText, className, size, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -49,6 +49,11 @@ export declare function ChevronGrabberVerticalIcon({ size, className, }: {
|
|
|
49
49
|
size?: string;
|
|
50
50
|
className?: string;
|
|
51
51
|
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function SquareArrowTopRightIcon({ className, size, strokeWidth, }: {
|
|
53
|
+
className?: string;
|
|
54
|
+
size?: string;
|
|
55
|
+
strokeWidth?: string;
|
|
56
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
52
57
|
export declare function SquareArrowTopRight2Icon({ className, size, strokeWidth, }: {
|
|
53
58
|
className?: string;
|
|
54
59
|
size?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
export declare function Timeline({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace Timeline {
|
|
4
4
|
var ArrowDown: (props: import("react").SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type LottieComponentProps } from "lottie-react";
|
|
3
|
-
interface Props extends Omit<LottieComponentProps, "src"> {
|
|
3
|
+
interface Props extends Omit<LottieComponentProps, "src" | "animationData"> {
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
autoplay?: boolean;
|
|
6
6
|
loop?: boolean;
|
|
@@ -7,7 +7,7 @@ interface HashLinkProps {
|
|
|
7
7
|
url?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
formattedHash?: string;
|
|
10
|
-
|
|
10
|
+
size?: "default" | "small";
|
|
11
11
|
}
|
|
12
|
-
export declare function HashLink({ showTx, hash, showCopyButton, url, children, className, formattedHash,
|
|
12
|
+
export declare function HashLink({ showTx, hash, showCopyButton, url, children, className, formattedHash, size, }: HashLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
interface Props extends ComponentProps<"div"> {
|
|
3
|
+
size?: "default" | "small" | "large";
|
|
4
|
+
}
|
|
5
|
+
export declare function PipeSeparator({ className, size, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -18,12 +18,13 @@ interface FeesLinesProps {
|
|
|
18
18
|
lines?: FeesRowProps[];
|
|
19
19
|
showTimeline?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare function FeesLines({ status, lines
|
|
21
|
+
export declare function FeesLines({ status, lines }: FeesLinesProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
interface FeesRowProps {
|
|
23
23
|
label: string;
|
|
24
24
|
amount: number | string;
|
|
25
25
|
symbol: string;
|
|
26
26
|
usd: number | string;
|
|
27
27
|
collapsed?: boolean;
|
|
28
|
+
className?: string;
|
|
28
29
|
}
|
|
29
30
|
export {};
|