@0xsquid/ui 2.4.10-beta.6 → 2.5.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +29 -194
- package/dist/cjs/types/components/icons/Generic.d.ts +8 -0
- 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 +27 -188
- package/dist/esm/types/components/icons/Generic.d.ts +8 -0
- 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 +45 -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" }) }));
|
|
@@ -19492,7 +19503,7 @@ function MenuItem({ label, imageUrl, icon }) {
|
|
|
19492
19503
|
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
19504
|
}
|
|
19494
19505
|
|
|
19495
|
-
const
|
|
19506
|
+
const containerPaddingClassNameMap = {
|
|
19496
19507
|
small: "tw-px-squid-xs",
|
|
19497
19508
|
large: "tw-px-squid-0",
|
|
19498
19509
|
};
|
|
@@ -19504,9 +19515,15 @@ function SmallBodyText(props) {
|
|
|
19504
19515
|
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
19505
19516
|
}
|
|
19506
19517
|
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"]);
|
|
19518
|
+
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"]);
|
|
19519
|
+
const [isCollapsed, setIsCollapsed] = React$1.useState(true);
|
|
19520
|
+
const handleToggleCollapsed = React$1.useCallback(() => {
|
|
19521
|
+
setIsCollapsed((prev) => !prev);
|
|
19522
|
+
}, []);
|
|
19508
19523
|
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
19509
|
-
|
|
19524
|
+
const isCollapsible = !!collapsibleContent;
|
|
19525
|
+
const ContentWrapperTag = isCollapsible ? "button" : "div";
|
|
19526
|
+
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
19527
|
}
|
|
19511
19528
|
|
|
19512
19529
|
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
@@ -27802,22 +27819,6 @@ function Tab(_a) {
|
|
|
27802
27819
|
}, 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
27820
|
}
|
|
27804
27821
|
|
|
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
27822
|
function useCountdown(initialSeconds) {
|
|
27822
27823
|
const [secondsLeft, setSecondsLeft] = React$1.useState(initialSeconds);
|
|
27823
27824
|
React$1.useEffect(() => {
|
|
@@ -27840,7 +27841,7 @@ function DepositAddressView({ isOpen = true, fromToken, toToken, handleClose, fr
|
|
|
27840
27841
|
}, 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
27842
|
// box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
|
|
27842
27843
|
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)
|
|
27844
|
+
}, 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
27845
|
? {
|
|
27845
27846
|
tooltipContent: tooltips.depositAddress,
|
|
27846
27847
|
tooltipWidth: "max",
|
|
@@ -27857,164 +27858,6 @@ function TimeRemaining({ timeRemainingSeconds, tooltipContent, }) {
|
|
|
27857
27858
|
: undefined }));
|
|
27858
27859
|
}
|
|
27859
27860
|
|
|
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
27861
|
var v$6 = "5.10.0";
|
|
28019
27862
|
var fr$6 = 25;
|
|
28020
27863
|
var ip$6 = 0;
|
|
@@ -69429,7 +69272,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
69429
69272
|
}, secondToken: {
|
|
69430
69273
|
bgColor: toToken.bgColor,
|
|
69431
69274
|
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: () => {
|
|
69275
|
+
} })) }), 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
69276
|
stopTimer();
|
|
69434
69277
|
}, onTxStart: () => {
|
|
69435
69278
|
startTimer();
|
|
@@ -69519,10 +69362,6 @@ function PropertiesSkeleton() {
|
|
|
69519
69362
|
return (jsxRuntime.jsx(PropertiesLayout, { children: Array.from({ length: 5 }, (_, i) => (jsxRuntime.jsx(PropertyListItem, { variant: "large", isLoading: true }, i))) }));
|
|
69520
69363
|
}
|
|
69521
69364
|
|
|
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
69365
|
function BuyNFTTransactionView({ title, hash, status, url, imageURI, collection, price, token, marketplace, fromChain, toChain, fromAddress, toAddress, boosted, timeToComplete, tokenId, nftType, actions, fees, }) {
|
|
69527
69366
|
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
69367
|
}
|
|
@@ -69535,6 +69374,10 @@ function SwapTransactionView({ title, hash, status, url, fromAmount, fromToken,
|
|
|
69535
69374
|
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
69375
|
}
|
|
69537
69376
|
|
|
69377
|
+
function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, }) {
|
|
69378
|
+
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 }));
|
|
69379
|
+
}
|
|
69380
|
+
|
|
69538
69381
|
const componentMap = {
|
|
69539
69382
|
swap: SwapTransactionView,
|
|
69540
69383
|
buy_nft: BuyNFTTransactionView,
|
|
@@ -69546,10 +69389,6 @@ function TransactionView({ type, props }) {
|
|
|
69546
69389
|
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
69547
69390
|
}
|
|
69548
69391
|
|
|
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
69392
|
var isMergeableObject = function isMergeableObject(value) {
|
|
69554
69393
|
return isNonNullObject(value)
|
|
69555
69394
|
&& !isSpecial(value)
|
|
@@ -69905,6 +69744,7 @@ exports.ArrowBottomTopIcon = ArrowBottomTopIcon;
|
|
|
69905
69744
|
exports.ArrowButton = ArrowButton;
|
|
69906
69745
|
exports.ArrowCornerDownRightIcon = ArrowCornerDownRightIcon;
|
|
69907
69746
|
exports.ArrowDownIcon = ArrowDownIcon;
|
|
69747
|
+
exports.ArrowExpandIcon = ArrowExpandIcon;
|
|
69908
69748
|
exports.ArrowLeftIcon = ArrowLeftIcon;
|
|
69909
69749
|
exports.ArrowOutOfBoxIcon = ArrowOutOfBoxIcon;
|
|
69910
69750
|
exports.ArrowRightDownCircleIcon = ArrowRightDownCircleIcon;
|
|
@@ -69919,7 +69759,6 @@ exports.ArrowUpIcon = ArrowUpIcon;
|
|
|
69919
69759
|
exports.ArrowWallDownIcon = ArrowWallDownIcon;
|
|
69920
69760
|
exports.ArrowsSwapIcon = ArrowsSwapIcon;
|
|
69921
69761
|
exports.AssetsButton = AssetsButton;
|
|
69922
|
-
exports.AssetsView = AssetsView;
|
|
69923
69762
|
exports.AtomIcon = AtomIcon;
|
|
69924
69763
|
exports.BackpackIcon = BackpackIcon;
|
|
69925
69764
|
exports.BadgeImage = BadgeImage;
|
|
@@ -69935,7 +69774,6 @@ exports.Breadcrumb = Breadcrumb;
|
|
|
69935
69774
|
exports.BridgeAction = BridgeAction;
|
|
69936
69775
|
exports.BridgeHeader = BridgeHeader;
|
|
69937
69776
|
exports.BridgeProperties = BridgeProperties;
|
|
69938
|
-
exports.BridgeTransactionView = BridgeTransactionView;
|
|
69939
69777
|
exports.BrokenHeartIcon = BrokenHeartIcon;
|
|
69940
69778
|
exports.BubblesIcon = BubblesIcon;
|
|
69941
69779
|
exports.Button = Button$1;
|
|
@@ -70035,6 +69873,7 @@ exports.Image = Image$1;
|
|
|
70035
69873
|
exports.ImageGroup = ImageGroup;
|
|
70036
69874
|
exports.ImageIcon = ImageIcon;
|
|
70037
69875
|
exports.ImageSparkle = ImageSparkle;
|
|
69876
|
+
exports.ImageStack = ImageStack;
|
|
70038
69877
|
exports.IncompleteAction = IncompleteAction;
|
|
70039
69878
|
exports.InfinityIcon = InfinityIcon;
|
|
70040
69879
|
exports.InfoBox = InfoBox;
|
|
@@ -70048,14 +69887,12 @@ exports.LaptopIcon = LaptopIcon;
|
|
|
70048
69887
|
exports.LightningIcon = LightningIcon;
|
|
70049
69888
|
exports.LimitIcon = LimitIcon;
|
|
70050
69889
|
exports.LinkIcon = LinkIcon;
|
|
70051
|
-
exports.List = List;
|
|
70052
69890
|
exports.ListItem = ListItem;
|
|
70053
69891
|
exports.ListItemActionsButton = ListItemActionsButton;
|
|
70054
69892
|
exports.Loader = Loader;
|
|
70055
69893
|
exports.LoadingProvider = LoadingProvider;
|
|
70056
69894
|
exports.LoadingSkeleton = LoadingSkeleton;
|
|
70057
69895
|
exports.MEDIA_QUERIES = MEDIA_QUERIES;
|
|
70058
|
-
exports.MainView = MainView;
|
|
70059
69896
|
exports.MarketCapIcon = MarketCapIcon;
|
|
70060
69897
|
exports.MaxIcon = MaxIcon;
|
|
70061
69898
|
exports.Menu = Menu;
|
|
@@ -70065,6 +69902,7 @@ exports.MirrorIcon = MirrorIcon;
|
|
|
70065
69902
|
exports.Modal = Modal;
|
|
70066
69903
|
exports.ModalContent = ModalContent;
|
|
70067
69904
|
exports.ModalContentDivider = ModalContentDivider;
|
|
69905
|
+
exports.MoneyBagIcon = MoneyBagIcon;
|
|
70068
69906
|
exports.MoonIcon = MoonIcon;
|
|
70069
69907
|
exports.NavigationBar = NavigationBar;
|
|
70070
69908
|
exports.NewsIcon = NewsIcon;
|
|
@@ -70092,7 +69930,6 @@ exports.RangeInput = RangeInput;
|
|
|
70092
69930
|
exports.ReceiptBillIcon = ReceiptBillIcon;
|
|
70093
69931
|
exports.ReceiveNFTAction = ReceiveNFTAction;
|
|
70094
69932
|
exports.ReceiveTokensAction = ReceiveTokensAction;
|
|
70095
|
-
exports.RecipientView = RecipientView;
|
|
70096
69933
|
exports.RefreshIcon = RefreshIcon;
|
|
70097
69934
|
exports.ReorderIcon = ReorderIcon;
|
|
70098
69935
|
exports.RouteStep = RouteStep;
|
|
@@ -70129,7 +69966,6 @@ exports.SunriseIcon = SunriseIcon;
|
|
|
70129
69966
|
exports.SunriseSmallIcon = SunriseSmallIcon;
|
|
70130
69967
|
exports.SwapAction = SwapAction;
|
|
70131
69968
|
exports.SwapConfiguration = SwapConfiguration;
|
|
70132
|
-
exports.SwapDetailsView = SwapDetailsView;
|
|
70133
69969
|
exports.SwapErrorIcon = SwapErrorIcon;
|
|
70134
69970
|
exports.SwapHeader = SwapHeader;
|
|
70135
69971
|
exports.SwapIcon = SwapIcon;
|
|
@@ -70180,7 +70016,6 @@ exports.UsdAmount = UsdAmount;
|
|
|
70180
70016
|
exports.WalletFilledIcon = WalletFilledIcon;
|
|
70181
70017
|
exports.WalletIcon = WalletIcon;
|
|
70182
70018
|
exports.WalletLink = WalletLink;
|
|
70183
|
-
exports.WalletsView = WalletsView;
|
|
70184
70019
|
exports.WrapAction = WrapAction;
|
|
70185
70020
|
exports.XSocial = XSocial;
|
|
70186
70021
|
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;
|
|
@@ -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";
|