@0xsquid/ui 2.5.0 → 2.5.1-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 +34 -201
- package/dist/cjs/types/components/icons/Generic.d.ts +8 -0
- package/dist/cjs/types/components/layout/ImageStack.d.ts +3 -1
- package/dist/cjs/types/components/layout/index.d.ts +1 -0
- package/dist/cjs/types/components/lists/PropertyListItem.d.ts +3 -1
- package/dist/cjs/types/components/views/index.d.ts +1 -12
- package/dist/cjs/types/stories/lists/PropertyListItem.stories.d.ts +1 -0
- package/dist/esm/index.js +32 -195
- package/dist/esm/types/components/icons/Generic.d.ts +8 -0
- package/dist/esm/types/components/layout/ImageStack.d.ts +3 -1
- package/dist/esm/types/components/layout/index.d.ts +1 -0
- package/dist/esm/types/components/lists/PropertyListItem.d.ts +3 -1
- package/dist/esm/types/components/views/index.d.ts +1 -12
- package/dist/esm/types/stories/lists/PropertyListItem.stories.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +46 -69
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3016,6 +3016,10 @@ const backgrounds = {
|
|
|
3016
3016
|
rgba(180, 143, 233, 1) 100%
|
|
3017
3017
|
)`,
|
|
3018
3018
|
};
|
|
3019
|
+
const transitionDuration = Object.entries(ANIMATION_DURATIONS).reduce((finalObj, [key, value]) => {
|
|
3020
|
+
finalObj[key.toLowerCase().replaceAll("_", "-")] = String(value);
|
|
3021
|
+
return finalObj;
|
|
3022
|
+
}, {});
|
|
3019
3023
|
const baseTailwindConfig = {
|
|
3020
3024
|
prefix: "tw-",
|
|
3021
3025
|
content: ["./src/**/*.{ts,tsx,js,jsx}", ".storybook/**/*.{ts,tsx,js,jsx}"],
|
|
@@ -3279,6 +3283,7 @@ const baseTailwindConfig = {
|
|
|
3279
3283
|
backgroundImage: backgrounds,
|
|
3280
3284
|
backdropBlur,
|
|
3281
3285
|
colors: mapToCssVariables(themeKeysToCssVariables.color),
|
|
3286
|
+
transitionDuration,
|
|
3282
3287
|
},
|
|
3283
3288
|
},
|
|
3284
3289
|
plugins: [
|
|
@@ -4013,6 +4018,12 @@ function StarLinesIcon({ size = "20", className, }) {
|
|
|
4013
4018
|
function QrCodeIcon({ size = "24", className, }) {
|
|
4014
4019
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M14 14V16H16M18 14H20M20 18H18V20M14 19.99V20M16 10H18C19.1046 10 20 9.10457 20 8V6C20 4.89543 19.1046 4 18 4H16C14.8954 4 14 4.89543 14 6V8C14 9.10457 14.8954 10 16 10ZM6 20H8C9.10457 20 10 19.1046 10 18V16C10 14.8954 9.10457 14 8 14H6C4.89543 14 4 14.8954 4 16V18C4 19.1046 4.89543 20 6 20ZM6 10H8C9.10457 10 10 9.10457 10 8V6C10 4.89543 9.10457 4 8 4H6C4.89543 4 4 4.89543 4 6V8C4 9.10457 4.89543 10 6 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4015
4020
|
}
|
|
4021
|
+
function ArrowExpandIcon({ className, size = "24", }) {
|
|
4022
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M18 8L22 12M22 12L18 16M22 12H2M6 8L2 12M2 12L6 16", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4023
|
+
}
|
|
4024
|
+
function MoneyBagIcon({ className, size = "24", }) {
|
|
4025
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M9.5 8H14.5M9.5 8C9.5 8 3.99996 11 4 16C4.00003 20.0207 7.97931 21 12 21C16.0207 21 20 20.0207 20 16C20 11 14.5 8 14.5 8M9.5 8L8.55725 5.48601C8.23089 4.6157 8.56249 3.64123 9.45158 3.37016C10.1074 3.1702 10.9686 3 12 3C13.0314 3 13.8926 3.1702 14.5484 3.37016C15.4375 3.64123 15.7691 4.6157 15.4427 5.48601L14.5 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4026
|
+
}
|
|
4016
4027
|
|
|
4017
4028
|
function EmptyHeartIcon({ className }) {
|
|
4018
4029
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M21 10C21 15.75 12.75 20 12 20C11.25 20 3 15.75 3 10C3 6 5.5 4 8 4C10.5 4 12 5.5 12 5.5C12 5.5 13.5 4 16 4C18.5 4 21 6 21 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }) }));
|
|
@@ -4353,21 +4364,19 @@ const extraPaddingMap = {
|
|
|
4353
4364
|
"outline-lg": "3px",
|
|
4354
4365
|
};
|
|
4355
4366
|
function ImageStack(_a) {
|
|
4356
|
-
var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates"]);
|
|
4367
|
+
var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false, containerProps } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates", "containerProps"]);
|
|
4357
4368
|
const imagesToRender = removeDuplicates ? [...new Set(imageUrls)] : imageUrls;
|
|
4358
|
-
return (jsxRuntime.jsx("div", { style: {
|
|
4369
|
+
return (jsxRuntime.jsx("div", Object.assign({}, containerProps, { style: Object.assign(Object.assign({}, containerProps === null || containerProps === void 0 ? void 0 : containerProps.style), {
|
|
4359
4370
|
// @ts-expect-error Custom CSS property
|
|
4360
|
-
"--image-stack-spacing": spacing,
|
|
4361
|
-
padding: addExtraPadding && imageProps.border
|
|
4371
|
+
"--image-stack-spacing": spacing, padding: addExtraPadding && imageProps.border
|
|
4362
4372
|
? extraPaddingMap[imageProps.border]
|
|
4363
|
-
: undefined,
|
|
4364
|
-
}, className: "tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", children: imagesToRender.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
|
|
4373
|
+
: undefined }), className: cn("tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: imagesToRender.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
|
|
4365
4374
|
? {
|
|
4366
4375
|
style: {
|
|
4367
4376
|
zIndex: self.length - index,
|
|
4368
4377
|
},
|
|
4369
4378
|
}
|
|
4370
|
-
: undefined }, imageProps), index))) }));
|
|
4379
|
+
: undefined }, imageProps), index))) })));
|
|
4371
4380
|
}
|
|
4372
4381
|
|
|
4373
4382
|
function Chip(_a) {
|
|
@@ -19492,7 +19501,7 @@ function MenuItem({ label, imageUrl, icon }) {
|
|
|
19492
19501
|
return (jsxRuntime.jsxs("li", { className: "tw-mx-squid-xxs tw-inline-flex tw-max-h-list-item-small tw-items-center tw-justify-start tw-gap-squid-xxs tw-rounded-squid-xs tw-bg-grey-900 tw-py-squid-xxs tw-pl-squid-xxs tw-pr-squid-xl tw-text-grey-300", children: [jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsxRuntime.jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsxRuntime.jsx(CaptionText, { children: label })] }));
|
|
19493
19502
|
}
|
|
19494
19503
|
|
|
19495
|
-
const
|
|
19504
|
+
const containerPaddingClassNameMap = {
|
|
19496
19505
|
small: "tw-px-squid-xs",
|
|
19497
19506
|
large: "tw-px-squid-0",
|
|
19498
19507
|
};
|
|
@@ -19504,9 +19513,15 @@ function SmallBodyText(props) {
|
|
|
19504
19513
|
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
19505
19514
|
}
|
|
19506
19515
|
function PropertyListItem(_a) {
|
|
19507
|
-
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"]);
|
|
19516
|
+
var { isLoading = false, label, detail, icon, className, variant = "small", showGradientBg = true, labelClassName, iconClassName, detailClassName, tooltip, collapsibleContent, addExtraPadding = true } = _a, props = __rest$1(_a, ["isLoading", "label", "detail", "icon", "className", "variant", "showGradientBg", "labelClassName", "iconClassName", "detailClassName", "tooltip", "collapsibleContent", "addExtraPadding"]);
|
|
19517
|
+
const [isCollapsed, setIsCollapsed] = React$1.useState(true);
|
|
19518
|
+
const handleToggleCollapsed = React$1.useCallback(() => {
|
|
19519
|
+
setIsCollapsed((prev) => !prev);
|
|
19520
|
+
}, []);
|
|
19508
19521
|
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
19509
|
-
|
|
19522
|
+
const isCollapsible = !!collapsibleContent;
|
|
19523
|
+
const ContentWrapperTag = isCollapsible ? "button" : "div";
|
|
19524
|
+
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", addExtraPadding && containerPaddingClassNameMap[variant], className), children: jsxRuntime.jsxs(ContentWrapperTag, { onClick: isCollapsible ? handleToggleCollapsed : undefined, className: "tw-w-full tw-rounded-squid-xs", 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", 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 }) }), isCollapsible && (jsxRuntime.jsx(ChevronLargeRightIcon, { className: cn("tw-text-grey-600 tw-duration-generic", !isCollapsed && "tw-rotate-90"), size: "16" }))] }), isCollapsible && (jsxRuntime.jsx(Collapse, { collapsed: isCollapsed, children: collapsibleContent }))] }) })));
|
|
19510
19525
|
}
|
|
19511
19526
|
|
|
19512
19527
|
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
@@ -27802,22 +27817,6 @@ function Tab(_a) {
|
|
|
27802
27817
|
}, children: [jsxRuntime.jsx(BodyText, { size: size, children: label }), !props.disabled && (jsxRuntime.jsx("span", { className: cn("tw-absolute tw-w-[calc(100%+20px)] tw-rounded-squid-s tw-p-squid-xs group-hover/tab-button:tw-bg-material-light-thin", size === "small" ? "tw-h-squid-l" : "tw-h-squid-xl") }))] })));
|
|
27803
27818
|
}
|
|
27804
27819
|
|
|
27805
|
-
function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
27806
|
-
const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
|
|
27807
|
-
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { displayBackButton: true, subtitle: "Select a token to receive" }), jsxRuntime.jsx("div", { className: "tw-max-h-[60px] tw-px-squid-m tw-py-squid-xs", children: jsxRuntime.jsx(Input, {}) }), jsxRuntime.jsx(BorderedContainer, { className: "!tw-grid tw-overflow-hidden", children: jsxRuntime.jsxs("div", { className: cn("tw-grid tw-overflow-hidden", matchesMobileLg
|
|
27808
|
-
? "tw-grid-cols-[180px_299px]"
|
|
27809
|
-
: "tw-grid-cols-[70px_1fr]"), children: [jsxRuntime.jsxs("div", { style: {
|
|
27810
|
-
scrollbarWidth: "none",
|
|
27811
|
-
}, className: cn("tw-flex tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden", matchesMobileLg
|
|
27812
|
-
? "tw-w-[180px] tw-max-w-[180px] tw-pt-0"
|
|
27813
|
-
: "tw-w-[70px] tw-max-w-[70px] tw-pt-squid-xs"), children: [jsxRuntime.jsx(SectionTitle, { title: "Chains", icon: jsxRuntime.jsx(ChainLink, {}), className: cn(matchesMobileLg ? "tw-flex" : "tw-hidden") }), jsxRuntime.jsxs(List, { children: [jsxRuntime.jsx(ListItem, { size: "small", mainIcon: jsxRuntime.jsx("span", { className: "tw-flex tw-h-squid-l tw-w-squid-l tw-flex-1 tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-[#FBFBFD]", children: jsxRuntime.jsx(ChainLink, { size: "24" }) }), itemTitle: "All Chains", compactOnMobile: true, onClick: () => { } }), chains.map((item) => (jsxRuntime.jsx(ListItem, { size: "small", mainImageUrl: item.iconUrl, itemTitle: item.name, detail: item.name, compactOnMobile: true, onClick: () => { } }, item.name)))] })] }), jsxRuntime.jsxs("div", { style: {
|
|
27814
|
-
scrollbarWidth: "none",
|
|
27815
|
-
}, className: cn("tw-flex tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden", matchesMobileLg ? "tw-w-[299px] tw-max-w-[299px]" : "tw-w-full"), children: [jsxRuntime.jsx(SectionTitle, { title: "Favorite tokens", icon: jsxRuntime.jsx(HeartSmallIcon, {}) }), jsxRuntime.jsx(List, { children: favoriteTokens.map((favToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: favToken.iconUrl, secondaryImageUrl: favToken.iconUrl, itemTitle: favToken.name, subtitle: favToken.symbol, rounded: "full", onClick: () => { }, dropdownMenuContent: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(DropdownMenuItem, { label: "Add to favorites", icon: jsxRuntime.jsx(FilledHeartIcon, {}) }) }) }, favToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Your tokens loading", icon: jsxRuntime.jsx(CoinsIcon, {}) }), jsxRuntime.jsx(List, { children: userTokens.map((userToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: "full", onClick: () => { }, loading: { subtitle: userToken.symbol } }, userToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Your tokens & balance", icon: jsxRuntime.jsx(CoinsIcon, {}) }), jsxRuntime.jsx(List, { children: userTokens.map((userToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: "full", onClick: () => { } }, userToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Popular tokens", icon: jsxRuntime.jsx(SparkleIcon, {}) }), jsxRuntime.jsx(List, { children: popularTokens.map((popToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: popToken.iconUrl, secondaryImageUrl: popToken.iconUrl, itemTitle: popToken.name, subtitle: popToken.symbol, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: "full", onClick: () => { } }, popToken.name))) })] })] }) })] }));
|
|
27816
|
-
}
|
|
27817
|
-
const List = ({ children }) => {
|
|
27818
|
-
return (jsxRuntime.jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
|
|
27819
|
-
};
|
|
27820
|
-
|
|
27821
27820
|
function useCountdown(initialSeconds) {
|
|
27822
27821
|
const [secondsLeft, setSecondsLeft] = React$1.useState(initialSeconds);
|
|
27823
27822
|
React$1.useEffect(() => {
|
|
@@ -27840,7 +27839,7 @@ function DepositAddressView({ isOpen = true, fromToken, toToken, handleClose, fr
|
|
|
27840
27839
|
}, borderType: "outline", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-h-[160px] 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", style: {
|
|
27841
27840
|
// box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
|
|
27842
27841
|
boxShadow: "0 1px 0 currentColor",
|
|
27843
|
-
}, 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" }) }), headerContent] }), 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-start tw-gap-squid-xxs tw-overflow-auto tw-rounded-squid-l tw-pb-squid-s tw-scrollbar-hidden", 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
|
+
}, 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" }) }), headerContent] }), 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: "squid-property-gradient-bg-even-container tw-flex tw-w-full tw-flex-col tw-items-center tw-justify-start tw-gap-squid-xxs tw-overflow-auto tw-rounded-squid-l tw-pb-squid-s tw-scrollbar-hidden", 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)
|
|
27844
27843
|
? {
|
|
27845
27844
|
tooltipContent: tooltips.depositAddress,
|
|
27846
27845
|
tooltipWidth: "max",
|
|
@@ -27857,164 +27856,6 @@ function TimeRemaining({ timeRemainingSeconds, tooltipContent, }) {
|
|
|
27857
27856
|
: undefined }));
|
|
27858
27857
|
}
|
|
27859
27858
|
|
|
27860
|
-
function MainView({ isLoading = false }) {
|
|
27861
|
-
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { isLoading: isLoading, title: "Swap", actions: [
|
|
27862
|
-
{
|
|
27863
|
-
labelOrIcon: jsxRuntime.jsx(ClockOutlineIcon, {}),
|
|
27864
|
-
id: "history",
|
|
27865
|
-
tooltip: {
|
|
27866
|
-
tooltipContent: "Swap history",
|
|
27867
|
-
},
|
|
27868
|
-
},
|
|
27869
|
-
{
|
|
27870
|
-
labelOrIcon: jsxRuntime.jsx(SettingsGearIcon, {}),
|
|
27871
|
-
id: "settings",
|
|
27872
|
-
tooltip: {
|
|
27873
|
-
tooltipContent: "Swap preferences",
|
|
27874
|
-
},
|
|
27875
|
-
},
|
|
27876
|
-
] }), jsxRuntime.jsx(SwapConfiguration, { isLoading: isLoading, direction: "from", chain: {
|
|
27877
|
-
iconUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/blast.svg",
|
|
27878
|
-
bgColor: "#fcfc03",
|
|
27879
|
-
}, token: {
|
|
27880
|
-
iconUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg",
|
|
27881
|
-
symbol: "ETH",
|
|
27882
|
-
bgColor: "#627eea",
|
|
27883
|
-
textColor: "#fff",
|
|
27884
|
-
decimals: 18,
|
|
27885
|
-
}, priceImpactPercentage: "0.3", balance: "4.57", walletButton: {
|
|
27886
|
-
address: "so-so.eth",
|
|
27887
|
-
onClick: () => { },
|
|
27888
|
-
tooltip: {
|
|
27889
|
-
tooltipContent: "Connect wallet",
|
|
27890
|
-
},
|
|
27891
|
-
}, assetsButton: {
|
|
27892
|
-
tooltip: {
|
|
27893
|
-
tooltipContent: "Select token",
|
|
27894
|
-
},
|
|
27895
|
-
}, balanceButton: {
|
|
27896
|
-
tooltip: {
|
|
27897
|
-
tooltipContent: "Max balance",
|
|
27898
|
-
},
|
|
27899
|
-
}, inputModeButton: {
|
|
27900
|
-
usdModeTooltip: {
|
|
27901
|
-
tooltipContent: "Enter token amount",
|
|
27902
|
-
},
|
|
27903
|
-
tokenModeTooltip: {
|
|
27904
|
-
tooltipContent: "Enter in USD",
|
|
27905
|
-
},
|
|
27906
|
-
} }), jsxRuntime.jsx(DetailsToolbar, { flipButton: {
|
|
27907
|
-
isDisabled: true,
|
|
27908
|
-
tooltip: {
|
|
27909
|
-
tooltipContent: "Not enough USDC to flip the swap",
|
|
27910
|
-
displayDelayMs: 0,
|
|
27911
|
-
},
|
|
27912
|
-
}, stopsButton: {
|
|
27913
|
-
providers: [
|
|
27914
|
-
{
|
|
27915
|
-
logoUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/png128/providers/uniswap.png",
|
|
27916
|
-
key: "uniswap",
|
|
27917
|
-
},
|
|
27918
|
-
{
|
|
27919
|
-
logoUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/png128/providers/axelar.png",
|
|
27920
|
-
key: "axelar",
|
|
27921
|
-
},
|
|
27922
|
-
],
|
|
27923
|
-
tooltip: {
|
|
27924
|
-
tooltipContent: "Open route preview",
|
|
27925
|
-
displayDelayMs: 700,
|
|
27926
|
-
},
|
|
27927
|
-
}, feeButton: {
|
|
27928
|
-
feeInUsd: "0.4",
|
|
27929
|
-
onClick: () => { },
|
|
27930
|
-
tooltip: {
|
|
27931
|
-
tooltipContent: "View fees",
|
|
27932
|
-
},
|
|
27933
|
-
}, isLoading: isLoading, isEmpty: isLoading }), jsxRuntime.jsx(SwapConfiguration, { isLoading: isLoading, direction: "to", chain: {
|
|
27934
|
-
iconUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/avax.svg",
|
|
27935
|
-
bgColor: "#e84142",
|
|
27936
|
-
}, token: {
|
|
27937
|
-
iconUrl: "https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg",
|
|
27938
|
-
symbol: "USDC",
|
|
27939
|
-
bgColor: "#2775ca",
|
|
27940
|
-
textColor: "#fff",
|
|
27941
|
-
decimals: 6,
|
|
27942
|
-
}, priceImpactPercentage: isLoading ? undefined : "7.2", balance: "2854", walletButton: {
|
|
27943
|
-
address: "so-so.eth",
|
|
27944
|
-
onClick: () => { },
|
|
27945
|
-
tooltip: {
|
|
27946
|
-
tooltipContent: "Connect wallet",
|
|
27947
|
-
},
|
|
27948
|
-
}, amount: isLoading ? undefined : "100", assetsButton: {
|
|
27949
|
-
tooltip: {
|
|
27950
|
-
tooltipContent: "Select token",
|
|
27951
|
-
},
|
|
27952
|
-
}, balanceButton: {
|
|
27953
|
-
tooltip: {
|
|
27954
|
-
tooltipContent: "Max balance",
|
|
27955
|
-
},
|
|
27956
|
-
}, inputModeButton: {
|
|
27957
|
-
usdModeTooltip: {
|
|
27958
|
-
tooltipContent: "Enter token amount",
|
|
27959
|
-
},
|
|
27960
|
-
tokenModeTooltip: {
|
|
27961
|
-
tooltipContent: "Enter in USD",
|
|
27962
|
-
},
|
|
27963
|
-
} }), jsxRuntime.jsx("div", { className: "tw-h-full tw-max-h-[80px] tw-px-squid-m tw-pb-squid-m", children: jsxRuntime.jsx(Button$1, { variant: isLoading ? "tertiary" : "primary", size: "lg", label: "Swap", isLoading: isLoading }) })] }));
|
|
27964
|
-
}
|
|
27965
|
-
|
|
27966
|
-
function RecipientView({ type }) {
|
|
27967
|
-
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { title: type === "paymentMethod" ? "Pay" : "Receive", displayBackButton: true }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsx(FlexContainer, { children: type === "paymentMethod" || type === "recipientEmpty" ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle, { title: "Your wallet", icon: jsxRuntime.jsx(PunkIcon, {}) }), jsxRuntime.jsx(ListItem, { itemTitle: "so-so.eth", subtitle: "0x2276\u2026F3c56", mainImageUrl: "/assets/images/avatar.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { }, detail: "Connected" }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "primary", label: "Change wallet", className: "tw-w-full", containerClassName: "tw-w-full" }) })] })) : type === "recipientTypingEns" ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx(ListItem, { itemTitle: "souljabags.eth", subtitle: "0x25c9\u202623d5", mainImageUrl: "/assets/images/punks.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(ListItem, { itemTitle: "souljaboy.eth", subtitle: "0x0ec8\u202604c1", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(PunkIcon, { size: "30" }) }), size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } })] })) : type === "recipientTypingAddress" ? (jsxRuntime.jsx(SearchAddress, { type: type })) : null }) }), type === "paymentMethod" ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SectionTitle, { title: "Centralized Exchange", icon: type === "paymentMethod" ? jsxRuntime.jsx(BankIcon, {}) : jsxRuntime.jsx(WalletIcon, {}) }), jsxRuntime.jsx(DepositSection, {})] }) })) : type === "recipientEmpty" ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-px-squid-xxl tw-py-squid-xl", children: jsxRuntime.jsx(CaptionText, { className: "tw-max-w-[200px] tw-text-center tw-text-grey-500", children: "Wallets you add and swap to will appear here" }) })] }) })) : type === "recipientTypingEns" || type === "recipientTypingAddress" ? (jsxRuntime.jsx("div", {})) : null, " "] }));
|
|
27968
|
-
}
|
|
27969
|
-
const FlexContainer = ({ children }) => (jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-flex-1 tw-flex-col tw-items-center tw-gap-squid-xxs tw-px-0 mobile-lg:tw-px-squid-xs", children: children }));
|
|
27970
|
-
const DepositSection = () => {
|
|
27971
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ListItem, { itemTitle: "Deposit", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(CoinsAddIcon, {}) }), className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(CaptionText, { className: "tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: "In case of swapping from a centralized exchange, you can send your tokens to a temporary deposit account that will handle the swap instead." }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-w-full", containerClassName: "tw-w-full" }) })] }));
|
|
27972
|
-
};
|
|
27973
|
-
const SearchAddress = ({ type }) => {
|
|
27974
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle, { title: "Custom wallet", icon: jsxRuntime.jsx(WalletIcon, {}), accessory: type === "recipientTypingEns"
|
|
27975
|
-
? null
|
|
27976
|
-
: "CEX addresses are not supported" }), jsxRuntime.jsxs("nav", { className: "tw-flex tw-w-full tw-items-center tw-gap-squid-xxs tw-px-squid-m tw-py-squid-xxs", children: [type === "recipientEmpty" ? (jsxRuntime.jsx(Input, { className: "tw-flex-1", placeholder: "Address on Blast", actionButtonProps: {
|
|
27977
|
-
label: "Paste",
|
|
27978
|
-
variant: "tertiary",
|
|
27979
|
-
}, icon: jsxRuntime.jsx("img", { src: "/assets/images/blast.jpg", className: "tw-rounded-squid-xxs" }) })) : type === "recipientTypingEns" ? (jsxRuntime.jsx(Input, { className: "tw-flex-1", placeholder: "Address on Blast", value: "souljab", actionButtonProps: {
|
|
27980
|
-
label: "Paste",
|
|
27981
|
-
variant: "tertiary",
|
|
27982
|
-
}, icon: jsxRuntime.jsx(Loader, {}) })) : type === "recipientTypingAddress" ? (jsxRuntime.jsx(Input, { className: "tw-flex-1", placeholder: "Address on Blast", value: "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", actionButtonProps: {
|
|
27983
|
-
label: "Paste",
|
|
27984
|
-
variant: "tertiary",
|
|
27985
|
-
}, icon: jsxRuntime.jsx("img", { src: "/assets/images/blast.jpg", className: "tw-rounded-squid-xxs" }) })) : null, jsxRuntime.jsx(Button$1, { size: "md", variant: "primary", icon: jsxRuntime.jsx(ArrowRightIcon, {}), disabled: type === "recipientEmpty" })] })] }));
|
|
27986
|
-
};
|
|
27987
|
-
|
|
27988
|
-
const ROUTING_TOKEN_SUPPORT_ARTICLE = "https://support.squidrouter.com/squid-overview/liquidity-pools/what-is-a-routing-token";
|
|
27989
|
-
|
|
27990
|
-
function SwapDetailsView({ isLoading, canToggleBoostMode = true, displayBoostMode = false, }) {
|
|
27991
|
-
const [isModalOpen, setIsModalOpen] = React$1.useState(true);
|
|
27992
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Modal, { isOpen: isModalOpen, onBackdropClick: () => {
|
|
27993
|
-
setIsModalOpen(false);
|
|
27994
|
-
}, children: [jsxRuntime.jsxs(ModalContent, { children: [displayBoostMode && (jsxRuntime.jsx(Settings, { canToggleBoostMode: canToggleBoostMode })), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-items-start tw-gap-squid-xxs tw-self-stretch tw-py-squid-m", children: [jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowBottomTopIcon, {}), label: "Exchange rate", detail: "1 ETH = 4,031.05 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowWallDownIcon, {}), label: "Receive minimum", detail: "750.5 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(GasIcon, {}), label: "Cross-chain gas fees", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.02534 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$9.92" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReorderIcon, {}), label: "Expected gas refund", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "-0.06336 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "-$2.48" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReceiptBillIcon, {}), label: "Total fee", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.0177 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$7.43" })] }) })] }), jsxRuntime.jsx("span", { children: jsxRuntime.jsx(InfoBox, { icon: jsxRuntime.jsx(SnapIcon, {}), title: "Squid's price commitment", description: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(CaptionText, { className: "tw-text-grey-500", children: ["In case of market prices fluctuating significantly, your transaction may revert and you will receive one of Squid's routing tokens on the destination chain instead.", " ", jsxRuntime.jsx("a", { className: "tw-text-grey-300", href: ROUTING_TOKEN_SUPPORT_ARTICLE, target: "_blank", rel: "noreferrer", children: "Learn more" })] }) }) }) })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Close", onClick: () => {
|
|
27995
|
-
setIsModalOpen(false);
|
|
27996
|
-
} })] }) }));
|
|
27997
|
-
}
|
|
27998
|
-
function Settings({ canToggleBoostMode }) {
|
|
27999
|
-
return (jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-py-squid-xxs", children: jsxRuntime.jsx(SettingsItem, { icon: jsxRuntime.jsx(LightningIcon, { className: "tw-text-grey-500" }), label: "Boost", control: {
|
|
28000
|
-
type: "switch",
|
|
28001
|
-
checked: false,
|
|
28002
|
-
disabled: !canToggleBoostMode,
|
|
28003
|
-
onChange: console.log,
|
|
28004
|
-
tooltip: canToggleBoostMode
|
|
28005
|
-
? undefined
|
|
28006
|
-
: {
|
|
28007
|
-
tooltipWidth: "max",
|
|
28008
|
-
containerClassName: "tw-h-[30px]",
|
|
28009
|
-
tooltipContent: "Boost not supported for this route",
|
|
28010
|
-
},
|
|
28011
|
-
}, transparent: true, helpTooltip: {
|
|
28012
|
-
tooltipWidth: "max",
|
|
28013
|
-
tooltipClassName: "tw-left-[15px]",
|
|
28014
|
-
tooltipContent: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "Boost by Squid reduces transaction times across chains down to" }), " ", jsxRuntime.jsx(CaptionText, { className: "tw-text-status-positive", children: "5-30 seconds" }), jsxRuntime.jsx(CaptionText, { children: ". It\u2019s currently only available for swaps below a value of" }), " ", jsxRuntime.jsx(CaptionText, { className: "tw-text-status-positive", children: "$20,000 USD" }), "."] })),
|
|
28015
|
-
} }) }));
|
|
28016
|
-
}
|
|
28017
|
-
|
|
28018
27859
|
var v$6 = "5.10.0";
|
|
28019
27860
|
var fr$6 = 25;
|
|
28020
27861
|
var ip$6 = 0;
|
|
@@ -69429,7 +69270,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
69429
69270
|
}, secondToken: {
|
|
69430
69271
|
bgColor: toToken.bgColor,
|
|
69431
69272
|
logoURI: toToken.logoUrl,
|
|
69432
|
-
} })) }), 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: () => {
|
|
69273
|
+
} })) }), jsxRuntime.jsx(TxProgressViewHeader, { title: headerTitle, description: headerDescription }), jsxRuntime.jsxs("ul", { className: "squid-property-gradient-bg-odd-container 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: () => {
|
|
69433
69274
|
stopTimer();
|
|
69434
69275
|
}, onTxStart: () => {
|
|
69435
69276
|
startTimer();
|
|
@@ -69519,10 +69360,6 @@ function PropertiesSkeleton() {
|
|
|
69519
69360
|
return (jsxRuntime.jsx(PropertiesLayout, { children: Array.from({ length: 5 }, (_, i) => (jsxRuntime.jsx(PropertyListItem, { variant: "large", isLoading: true }, i))) }));
|
|
69520
69361
|
}
|
|
69521
69362
|
|
|
69522
|
-
function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, }) {
|
|
69523
|
-
return (jsxRuntime.jsx(TransactionViewLayout, { header: jsxRuntime.jsx(BridgeHeader, { tokenLogoURI: token.logoURI, chainLogoURI: toChain.logoURI, title: title, hash: hash, url: url, status: status }), properties: jsxRuntime.jsx(BridgeProperties, { amount: amount, token: token, fromChain: fromChain, toChain: toChain, wallet: address, boosted: boosted, timeToComplete: timeToComplete }), actions: actions, fees: fees }));
|
|
69524
|
-
}
|
|
69525
|
-
|
|
69526
69363
|
function BuyNFTTransactionView({ title, hash, status, url, imageURI, collection, price, token, marketplace, fromChain, toChain, fromAddress, toAddress, boosted, timeToComplete, tokenId, nftType, actions, fees, }) {
|
|
69527
69364
|
return (jsxRuntime.jsx(TransactionViewLayout, { header: jsxRuntime.jsx(BuyNFTHeader, { imageUrl: imageURI, title: title, hash: hash, url: url, status: status }), properties: jsxRuntime.jsx(BuyNFTProperties, { title: title, imageURI: imageURI, collection: collection, price: price, token: token, marketplace: marketplace, fromChain: fromChain, toChain: toChain, fromAddress: fromAddress, toAddress: toAddress, boosted: boosted, timeToComplete: timeToComplete, tokenId: tokenId, nftType: nftType }), actions: actions, fees: fees }));
|
|
69528
69365
|
}
|
|
@@ -69535,6 +69372,10 @@ function SwapTransactionView({ title, hash, status, url, fromAmount, fromToken,
|
|
|
69535
69372
|
return (jsxRuntime.jsx(TransactionViewLayout, { header: jsxRuntime.jsx(SwapHeader, { fromToken: fromToken, toToken: toToken, title: title, hash: hash, url: url, status: status }), properties: jsxRuntime.jsx(SwapProperties, { fromAmount: fromAmount, fromToken: fromToken, toAmount: toAmount, toToken: toToken, fromChain: fromChain, toChain: toChain, fromAddress: fromAddress, toAddress: toAddress, exchangeRate: exchangeRate, boosted: boosted, timeToComplete: timeToComplete }), actions: actions, fees: fees }));
|
|
69536
69373
|
}
|
|
69537
69374
|
|
|
69375
|
+
function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, }) {
|
|
69376
|
+
return (jsxRuntime.jsx(TransactionViewLayout, { header: jsxRuntime.jsx(BridgeHeader, { tokenLogoURI: token.logoURI, chainLogoURI: toChain.logoURI, title: title, hash: hash, url: url, status: status }), properties: jsxRuntime.jsx(BridgeProperties, { amount: amount, token: token, fromChain: fromChain, toChain: toChain, wallet: address, boosted: boosted, timeToComplete: timeToComplete }), actions: actions, fees: fees }));
|
|
69377
|
+
}
|
|
69378
|
+
|
|
69538
69379
|
const componentMap = {
|
|
69539
69380
|
swap: SwapTransactionView,
|
|
69540
69381
|
buy_nft: BuyNFTTransactionView,
|
|
@@ -69546,10 +69387,6 @@ function TransactionView({ type, props }) {
|
|
|
69546
69387
|
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
69547
69388
|
}
|
|
69548
69389
|
|
|
69549
|
-
function WalletsView() {
|
|
69550
|
-
return (jsxRuntime.jsxs(Modal, { maxHeight: true, children: [jsxRuntime.jsxs(ModalContent, { addGap: true, children: [jsxRuntime.jsx("div", { className: "tw-px-squid-xs tw-py-squid-xxs", children: jsxRuntime.jsx(Input, { placeholder: "Select your wallet" }) }), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-overflow-auto tw-py-squid-xxs", children: [jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), jsxRuntime.jsx("span", { className: "tw-text-material-light-thin", children: jsxRuntime.jsx(ModalContentDivider, {}) }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", subtitle: "Connect with an Injected Wallet", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Browser Extension" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-500", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" })] })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Cancel" })] }));
|
|
69551
|
-
}
|
|
69552
|
-
|
|
69553
69390
|
var isMergeableObject = function isMergeableObject(value) {
|
|
69554
69391
|
return isNonNullObject(value)
|
|
69555
69392
|
&& !isSpecial(value)
|
|
@@ -69905,6 +69742,7 @@ exports.ArrowBottomTopIcon = ArrowBottomTopIcon;
|
|
|
69905
69742
|
exports.ArrowButton = ArrowButton;
|
|
69906
69743
|
exports.ArrowCornerDownRightIcon = ArrowCornerDownRightIcon;
|
|
69907
69744
|
exports.ArrowDownIcon = ArrowDownIcon;
|
|
69745
|
+
exports.ArrowExpandIcon = ArrowExpandIcon;
|
|
69908
69746
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
69909
69747
|
exports.ArrowOutOfBoxIcon = ArrowOutOfBoxIcon;
|
|
69910
69748
|
exports.ArrowRightDownCircleIcon = ArrowRightDownCircleIcon;
|
|
@@ -69919,7 +69757,6 @@ exports.ArrowUpIcon = ArrowUpIcon;
|
|
|
69919
69757
|
exports.ArrowWallDownIcon = ArrowWallDownIcon;
|
|
69920
69758
|
exports.ArrowsSwapIcon = ArrowsSwapIcon;
|
|
69921
69759
|
exports.AssetsButton = AssetsButton;
|
|
69922
|
-
exports.AssetsView = AssetsView;
|
|
69923
69760
|
exports.AtomIcon = AtomIcon;
|
|
69924
69761
|
exports.BackpackIcon = BackpackIcon;
|
|
69925
69762
|
exports.BadgeImage = BadgeImage;
|
|
@@ -69935,7 +69772,6 @@ exports.Breadcrumb = Breadcrumb;
|
|
|
69935
69772
|
exports.BridgeAction = BridgeAction;
|
|
69936
69773
|
exports.BridgeHeader = BridgeHeader;
|
|
69937
69774
|
exports.BridgeProperties = BridgeProperties;
|
|
69938
|
-
exports.BridgeTransactionView = BridgeTransactionView;
|
|
69939
69775
|
exports.BrokenHeartIcon = BrokenHeartIcon;
|
|
69940
69776
|
exports.BubblesIcon = BubblesIcon;
|
|
69941
69777
|
exports.Button = Button$1;
|
|
@@ -70035,6 +69871,7 @@ exports.Image = Image$1;
|
|
|
70035
69871
|
exports.ImageGroup = ImageGroup;
|
|
70036
69872
|
exports.ImageIcon = ImageIcon;
|
|
70037
69873
|
exports.ImageSparkle = ImageSparkle;
|
|
69874
|
+
exports.ImageStack = ImageStack;
|
|
70038
69875
|
exports.IncompleteAction = IncompleteAction;
|
|
70039
69876
|
exports.InfinityIcon = InfinityIcon;
|
|
70040
69877
|
exports.InfoBox = InfoBox;
|
|
@@ -70048,14 +69885,12 @@ exports.LaptopIcon = LaptopIcon;
|
|
|
70048
69885
|
exports.LightningIcon = LightningIcon;
|
|
70049
69886
|
exports.LimitIcon = LimitIcon;
|
|
70050
69887
|
exports.LinkIcon = LinkIcon;
|
|
70051
|
-
exports.List = List;
|
|
70052
69888
|
exports.ListItem = ListItem;
|
|
70053
69889
|
exports.ListItemActionsButton = ListItemActionsButton;
|
|
70054
69890
|
exports.Loader = Loader;
|
|
70055
69891
|
exports.LoadingProvider = LoadingProvider;
|
|
70056
69892
|
exports.LoadingSkeleton = LoadingSkeleton;
|
|
70057
69893
|
exports.MEDIA_QUERIES = MEDIA_QUERIES;
|
|
70058
|
-
exports.MainView = MainView;
|
|
70059
69894
|
exports.MarketCapIcon = MarketCapIcon;
|
|
70060
69895
|
exports.MaxIcon = MaxIcon;
|
|
70061
69896
|
exports.Menu = Menu;
|
|
@@ -70065,6 +69900,7 @@ exports.MirrorIcon = MirrorIcon;
|
|
|
70065
69900
|
exports.Modal = Modal;
|
|
70066
69901
|
exports.ModalContent = ModalContent;
|
|
70067
69902
|
exports.ModalContentDivider = ModalContentDivider;
|
|
69903
|
+
exports.MoneyBagIcon = MoneyBagIcon;
|
|
70068
69904
|
exports.MoonIcon = MoonIcon;
|
|
70069
69905
|
exports.NavigationBar = NavigationBar;
|
|
70070
69906
|
exports.NewsIcon = NewsIcon;
|
|
@@ -70092,7 +69928,6 @@ exports.RangeInput = RangeInput;
|
|
|
70092
69928
|
exports.ReceiptBillIcon = ReceiptBillIcon;
|
|
70093
69929
|
exports.ReceiveNFTAction = ReceiveNFTAction;
|
|
70094
69930
|
exports.ReceiveTokensAction = ReceiveTokensAction;
|
|
70095
|
-
exports.RecipientView = RecipientView;
|
|
70096
69931
|
exports.RefreshIcon = RefreshIcon;
|
|
70097
69932
|
exports.ReorderIcon = ReorderIcon;
|
|
70098
69933
|
exports.RouteStep = RouteStep;
|
|
@@ -70129,7 +69964,6 @@ exports.SunriseIcon = SunriseIcon;
|
|
|
70129
69964
|
exports.SunriseSmallIcon = SunriseSmallIcon;
|
|
70130
69965
|
exports.SwapAction = SwapAction;
|
|
70131
69966
|
exports.SwapConfiguration = SwapConfiguration;
|
|
70132
|
-
exports.SwapDetailsView = SwapDetailsView;
|
|
70133
69967
|
exports.SwapErrorIcon = SwapErrorIcon;
|
|
70134
69968
|
exports.SwapHeader = SwapHeader;
|
|
70135
69969
|
exports.SwapIcon = SwapIcon;
|
|
@@ -70180,7 +70014,6 @@ exports.UsdAmount = UsdAmount;
|
|
|
70180
70014
|
exports.WalletFilledIcon = WalletFilledIcon;
|
|
70181
70015
|
exports.WalletIcon = WalletIcon;
|
|
70182
70016
|
exports.WalletLink = WalletLink;
|
|
70183
|
-
exports.WalletsView = WalletsView;
|
|
70184
70017
|
exports.WrapAction = WrapAction;
|
|
70185
70018
|
exports.XSocial = XSocial;
|
|
70186
70019
|
exports.adjustColorForContrast = adjustColorForContrast;
|
|
@@ -105,3 +105,11 @@ export declare function QrCodeIcon({ size, className, }: {
|
|
|
105
105
|
size?: string;
|
|
106
106
|
className?: string;
|
|
107
107
|
}): import("react/jsx-runtime").JSX.Element;
|
|
108
|
+
export declare function ArrowExpandIcon({ className, size, }: {
|
|
109
|
+
className?: string;
|
|
110
|
+
size?: string;
|
|
111
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
export declare function MoneyBagIcon({ className, size, }: {
|
|
113
|
+
className?: string;
|
|
114
|
+
size?: string;
|
|
115
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type ImageProps } from "../badges";
|
|
2
3
|
interface ImageStackProps extends ImageProps {
|
|
3
4
|
imageUrls: string[];
|
|
@@ -8,6 +9,7 @@ interface ImageStackProps extends ImageProps {
|
|
|
8
9
|
stackOnTop?: boolean;
|
|
9
10
|
addExtraPadding?: boolean;
|
|
10
11
|
removeDuplicates?: boolean;
|
|
12
|
+
containerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
11
13
|
}
|
|
12
|
-
export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, containerProps, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -12,5 +12,7 @@ export interface PropertyListItemProps extends ComponentProps<"li"> {
|
|
|
12
12
|
iconClassName?: string;
|
|
13
13
|
detailClassName?: string;
|
|
14
14
|
tooltip?: Omit<TooltipProps, "children">;
|
|
15
|
+
collapsibleContent?: React.ReactNode;
|
|
16
|
+
addExtraPadding?: boolean;
|
|
15
17
|
}
|
|
16
|
-
export declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, showGradientBg, labelClassName, iconClassName, detailClassName, tooltip, ...props }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, showGradientBg, labelClassName, iconClassName, detailClassName, tooltip, collapsibleContent, addExtraPadding, ...props }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export * from "./AssetsView";
|
|
2
1
|
export * from "./DepositAddressView";
|
|
3
|
-
export * from "./MainView";
|
|
4
|
-
export * from "./RecipientView";
|
|
5
|
-
export * from "./SwapDetailsView";
|
|
6
2
|
export * from "./SwapProgressView";
|
|
7
|
-
export * from "./TransactionView
|
|
8
|
-
export * from "./TransactionView/BridgeTransactionView";
|
|
9
|
-
export * from "./TransactionView/BuyNFTTransactionView";
|
|
10
|
-
export * from "./TransactionView/InteractionTransactionView";
|
|
11
|
-
export * from "./TransactionView/SwapTransactionView";
|
|
12
|
-
export * from "./TransactionView/TransactionView";
|
|
13
|
-
export * from "./TransactionView/TransactionViewLayout";
|
|
14
|
-
export * from "./WalletsView";
|
|
3
|
+
export * from "./TransactionView";
|