@0xsquid/ui 0.17.3 → 0.17.5
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 +55 -48
- package/dist/cjs/types/components/badges/LoadingSkeleton.d.ts +1 -1
- package/dist/cjs/types/components/buttons/FilterButton.d.ts +2 -1
- package/dist/cjs/types/components/layout/AppContainer.d.ts +7 -0
- package/dist/cjs/types/components/layout/ExploreLayout.d.ts +3 -7
- package/dist/cjs/types/components/layout/TransactionFilters.d.ts +9 -9
- package/dist/cjs/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +3 -2
- package/dist/cjs/types/components/layout/TransactionSearch.d.ts +2 -1
- package/dist/cjs/types/components/layout/index.d.ts +1 -0
- package/dist/cjs/types/components/lists/TransactionAction/FeesAction.d.ts +3 -2
- package/dist/cjs/types/components/lists/TransactionAction/SuccessAction.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionAction/SwapAction.d.ts +3 -3
- package/dist/cjs/types/components/typography/HeadingText.d.ts +2 -1
- package/dist/cjs/types/core/utils.d.ts +3 -0
- package/dist/cjs/types/stories/data/actions.d.ts +6 -4
- package/dist/cjs/types/stories/layout/AppContainer.stories.d.ts +6 -0
- package/dist/esm/index.js +55 -50
- package/dist/esm/types/components/badges/LoadingSkeleton.d.ts +1 -1
- package/dist/esm/types/components/buttons/FilterButton.d.ts +2 -1
- package/dist/esm/types/components/layout/AppContainer.d.ts +7 -0
- package/dist/esm/types/components/layout/ExploreLayout.d.ts +3 -7
- package/dist/esm/types/components/layout/TransactionFilters.d.ts +9 -9
- package/dist/esm/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +3 -2
- package/dist/esm/types/components/layout/TransactionSearch.d.ts +2 -1
- package/dist/esm/types/components/layout/index.d.ts +1 -0
- package/dist/esm/types/components/lists/TransactionAction/FeesAction.d.ts +3 -2
- package/dist/esm/types/components/lists/TransactionAction/SuccessAction.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionAction/SwapAction.d.ts +3 -3
- package/dist/esm/types/components/typography/HeadingText.d.ts +2 -1
- package/dist/esm/types/core/utils.d.ts +3 -0
- package/dist/esm/types/stories/data/actions.d.ts +6 -4
- package/dist/esm/types/stories/layout/AppContainer.stories.d.ts +6 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +48 -38
- package/package.json +2 -1
- package/dist/cjs/types/stories/data/transaction.d.ts +0 -49
- package/dist/cjs/types/types/data.d.ts +0 -155
- package/dist/esm/types/stories/data/transaction.d.ts +0 -49
- package/dist/esm/types/types/data.d.ts +0 -155
package/dist/cjs/index.js
CHANGED
|
@@ -2601,6 +2601,12 @@ const formatRelativeDate = (timestampSeconds) => {
|
|
|
2601
2601
|
function truncateHash(hash) {
|
|
2602
2602
|
return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
|
|
2603
2603
|
}
|
|
2604
|
+
const styled = (tag, className) => {
|
|
2605
|
+
const Component = React.forwardRef((props, ref) => React.createElement(tag, mergeProps({ ref, className }, props)));
|
|
2606
|
+
Component.displayName = `styled ${tag}`;
|
|
2607
|
+
return Component;
|
|
2608
|
+
};
|
|
2609
|
+
const mergeProps = (a, b) => (Object.assign(Object.assign(Object.assign({}, a), b), { className: cn(a.className, b.className), style: Object.assign(Object.assign({}, a.style), b.style) }));
|
|
2604
2610
|
|
|
2605
2611
|
const badgeSizeClassMap = {
|
|
2606
2612
|
sm: 'tw-w-4 tw-h-4',
|
|
@@ -2740,9 +2746,9 @@ const LoadingProvider = LoadingContext.Provider;
|
|
|
2740
2746
|
function LoadingSkeleton({ className, height = '20', isLoading: isLoadingProp, children, width = '100', }) {
|
|
2741
2747
|
const contextValue = React.useContext(LoadingContext);
|
|
2742
2748
|
const isLoading = isLoadingProp !== undefined ? isLoadingProp : contextValue;
|
|
2743
|
-
if (
|
|
2749
|
+
if (children && !isLoading)
|
|
2744
2750
|
return children;
|
|
2745
|
-
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_1246_29063)", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_1246_29063", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient tw-text-material-light-thin", children: [jsxRuntime.jsx("stop", { stopColor: "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.395881", stopColor: "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.597867", stopColor: "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-average group-data-[squid-theme-type=light]:tw-text-transparent" }), jsxRuntime.jsx("stop", { offset: "0.697004", stopColor: "currentColor" })] }), jsxRuntime.jsx("clipPath", { id: "clip0_1246_29063", children: jsxRuntime.jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })
|
|
2751
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.jsx("g", { clipPath: "url(#clip0_1246_29063)", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_1246_29063", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient tw-text-material-light-thin", children: [jsxRuntime.jsx("stop", { stopColor: "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.395881", stopColor: "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.597867", stopColor: "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-average group-data-[squid-theme-type=light]:tw-text-transparent" }), jsxRuntime.jsx("stop", { offset: "0.697004", stopColor: "currentColor" })] }), jsxRuntime.jsx("clipPath", { id: "clip0_1246_29063", children: jsxRuntime.jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })] }));
|
|
2746
2752
|
}
|
|
2747
2753
|
|
|
2748
2754
|
function Checkmark1Icon() {
|
|
@@ -2915,7 +2921,7 @@ function Copy(_a) {
|
|
|
2915
2921
|
}
|
|
2916
2922
|
|
|
2917
2923
|
function HashLink({ showTx = false, hash, showCopyButton = false, url, children, }) {
|
|
2918
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsxRuntime.jsx("span", { className: "tw-text-grey-700", children: "TX" }), jsxRuntime.
|
|
2924
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsxRuntime.jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : truncateHash(hash), url && (jsxRuntime.jsx("a", { href: url, target: "_blank", className: 'tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin', children: jsxRuntime.jsx(SquareArrowTopRight2Icon, { strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-text-royal-500" }) })), showCopyButton && (jsxRuntime.jsx("span", { className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: jsxRuntime.jsx(Copy, { size: "16", strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-cursor-pointer tw-text-royal-500", onClick: () => navigator.clipboard.writeText(hash) }) }))] }));
|
|
2919
2925
|
}
|
|
2920
2926
|
|
|
2921
2927
|
function WalletLink({ imageURI, address }) {
|
|
@@ -6733,9 +6739,10 @@ function useOnResize(ref, callback) {
|
|
|
6733
6739
|
const observer = new ResizeObserver(([entry]) => {
|
|
6734
6740
|
if (!entry)
|
|
6735
6741
|
return;
|
|
6736
|
-
|
|
6742
|
+
callbackRef.current(entry.contentRect);
|
|
6737
6743
|
});
|
|
6738
6744
|
observer.observe(ref.current);
|
|
6745
|
+
callbackRef.current(ref.current.getBoundingClientRect());
|
|
6739
6746
|
return () => observer.disconnect();
|
|
6740
6747
|
}, [ref.current]);
|
|
6741
6748
|
}
|
|
@@ -6762,7 +6769,7 @@ function Collapse(_a) {
|
|
|
6762
6769
|
const containerRef = React.useRef(null);
|
|
6763
6770
|
const contentsRef = React.useRef(null);
|
|
6764
6771
|
const contentsRect = useRect(contentsRef);
|
|
6765
|
-
const expandedHeight = contentsRect.height;
|
|
6772
|
+
const expandedHeight = Math.max(contentsRect.height, collapsedHeight);
|
|
6766
6773
|
return (jsxRuntime.jsx("div", Object.assign({ ref: containerRef, style: {
|
|
6767
6774
|
[expandednessVar]: collapsed ? 0 : 1,
|
|
6768
6775
|
transition: `${expandednessVar} ${duration}ms ${ANIMATION_TIMINGS.SHOW_ROUTE}`,
|
|
@@ -7229,7 +7236,7 @@ function ActionRow(_a) {
|
|
|
7229
7236
|
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m', className) })));
|
|
7230
7237
|
}
|
|
7231
7238
|
function ActionWrapper({ children, status, className, }) {
|
|
7232
|
-
return (jsxRuntime.jsx("div", { className: cn('tw-relative tw-flex tw-flex-col tw-gap-squid-xxs', status === 'waiting'
|
|
7239
|
+
return (jsxRuntime.jsx("div", { className: cn('tw-relative tw-flex tw-flex-col tw-gap-squid-xxs', status === 'waiting' && 'tw-bg-grey-800', className), children: children }));
|
|
7233
7240
|
}
|
|
7234
7241
|
function Timestamp({ time }) {
|
|
7235
7242
|
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsxRuntime.jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
|
|
@@ -7244,7 +7251,7 @@ function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, ch
|
|
|
7244
7251
|
}
|
|
7245
7252
|
|
|
7246
7253
|
function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
|
|
7247
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(SquareArrowTopLeftIcon, {}), description: jsxRuntime.jsxs(Inline, { children: ["Bridge", jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: token.symbol }), "to", jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7254
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(SquareArrowTopLeftIcon, {}), description: jsxRuntime.jsxs(Inline, { children: ["Bridge", jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7248
7255
|
}
|
|
7249
7256
|
|
|
7250
7257
|
function TagIcon({ size = '20' }) {
|
|
@@ -7265,8 +7272,8 @@ function FeesLines({ status, lines, showTimeline = false, }) {
|
|
|
7265
7272
|
? statusTextClassMap[status]
|
|
7266
7273
|
: '!tw-text-[transparent]'), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
7267
7274
|
}
|
|
7268
|
-
function FeesRow({ label, usd,
|
|
7269
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsxRuntime.jsx(SizeTransition, { children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: cn('tw-block tw-
|
|
7275
|
+
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
7276
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsxRuntime.jsx(SizeTransition, { children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: cn('tw-block tw-truncate tw-text-grey-300', !collapsed && 'tw-w-[100px]'), children: label }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-items-center", children: jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxRuntime.jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxRuntime.jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
|
|
7270
7277
|
}
|
|
7271
7278
|
|
|
7272
7279
|
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
@@ -7282,11 +7289,11 @@ function linkActionTimelineProps(actions, collapsed) {
|
|
|
7282
7289
|
}
|
|
7283
7290
|
|
|
7284
7291
|
function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
|
|
7285
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsxRuntime.jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7292
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsxRuntime.jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7286
7293
|
}
|
|
7287
7294
|
|
|
7288
7295
|
function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
7289
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), ' ', jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7296
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), ' ', jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7290
7297
|
}
|
|
7291
7298
|
|
|
7292
7299
|
function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
@@ -7300,9 +7307,9 @@ function PieChartIcon() {
|
|
|
7300
7307
|
function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
|
|
7301
7308
|
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(PieChartIcon, {}), description: jsxRuntime.jsx(Inline, { children: [
|
|
7302
7309
|
'Stake',
|
|
7303
|
-
jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: token.symbol }),
|
|
7310
|
+
jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }),
|
|
7304
7311
|
'on',
|
|
7305
|
-
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name }),
|
|
7312
|
+
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) }),
|
|
7306
7313
|
] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7307
7314
|
}
|
|
7308
7315
|
|
|
@@ -7322,22 +7329,15 @@ function StartAction({ status, nextStatus, showTimeline = false, showBody = fals
|
|
|
7322
7329
|
function SuccessAction({ nextStatus, status, description = status === 'error'
|
|
7323
7330
|
? 'Transaction failed'
|
|
7324
7331
|
: 'Transaction successful', showTimeline, showBody, timestamp, hash, url, }) {
|
|
7325
|
-
return (jsxRuntime.jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7332
|
+
return (jsxRuntime.jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
7326
7333
|
}
|
|
7327
7334
|
|
|
7328
7335
|
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
7329
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Swap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: fromToken.symbol }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: toToken.symbol }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7336
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Swap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7330
7337
|
}
|
|
7331
7338
|
|
|
7332
7339
|
function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
7333
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.
|
|
7334
|
-
'Wrap',
|
|
7335
|
-
jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: fromToken.symbol }),
|
|
7336
|
-
'to',
|
|
7337
|
-
jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: toToken.symbol }),
|
|
7338
|
-
'via',
|
|
7339
|
-
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name }),
|
|
7340
|
-
] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7340
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Wrap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7341
7341
|
}
|
|
7342
7342
|
|
|
7343
7343
|
const actionComponentMap = {
|
|
@@ -7382,9 +7382,8 @@ function DropdownMenu({ dropdownRef, items, className, menuRef, isHidden = false
|
|
|
7382
7382
|
return (jsxRuntime.jsx("div", { ref: dropdownRef, className: "tw-relative", children: jsxRuntime.jsx(Menu, { menuRef: menuRef, rounded: "sm", containerClassName: cn('tw-absolute tw-right-0 tw-z-20', className), contentClassName: "!tw-p-0", children: !isHidden && (jsxRuntime.jsx("ul", { className: cn('tw-flex tw-max-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-auto tw-px-0 tw-py-squid-xxs', listClassName), children: items.map((item) => (jsxRuntime.jsx(DropdownMenuItem, Object.assign({}, item), item.label))) })) }) }));
|
|
7383
7383
|
}
|
|
7384
7384
|
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
}
|
|
7385
|
+
const ExploreLayout = styled('div', 'tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-shadow-elevation-light-3');
|
|
7386
|
+
const ExploreNav = styled('div', 'tw-flex tw-min-h-squid-xl tw-items-center tw-border-b tw-border-b-material-dark-thin tw-bg-grey-800 tw-px-squid-m tw-text-grey-500 dark:tw-border-b-material-light-thin');
|
|
7388
7387
|
|
|
7389
7388
|
function InfoBox({ title, description, icon }) {
|
|
7390
7389
|
return (jsxRuntime.jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
|
|
@@ -7444,7 +7443,7 @@ function NavigationBar({ title, displayBackButton = false, logoUrl, transparent
|
|
|
7444
7443
|
}
|
|
7445
7444
|
|
|
7446
7445
|
function ProductCard({ children }) {
|
|
7447
|
-
return (jsxRuntime.jsx("div", { className: "
|
|
7446
|
+
return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-max-w-[100vw] tw-flex-col tw-justify-center tw-overflow-hidden tw-bg-grey-900 tw-text-grey-300 tw-outline tw-outline-1 tw-outline-material-light-thin group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-3 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-3 mobile-lg:tw-max-w-card-large mobile-lg:tw-rounded-squid-l", children: jsxRuntime.jsx("div", { className: "tw-relative tw-h-card-compact tw-min-h-card-compact tw-w-full mobile-lg:tw-h-card-large mobile-lg:tw-min-h-card-large mobile-lg:tw-w-card-large", children: children }) }));
|
|
7448
7447
|
}
|
|
7449
7448
|
function BorderedContainer({ children, className, }) {
|
|
7450
7449
|
return (jsxRuntime.jsx("section", { className: cn('tw-border-t tw-border-t-material-light-thin', className), children: children }));
|
|
@@ -13342,13 +13341,13 @@ function Tick({ className }) {
|
|
|
13342
13341
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "7", fill: "none", viewBox: "0 0 9 7", className: className, children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M7.497 1l-4.5 4.5-2-2" }) }));
|
|
13343
13342
|
}
|
|
13344
13343
|
|
|
13345
|
-
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status, setStatus, chains, }) {
|
|
13346
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-
|
|
13344
|
+
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status = [], setStatus, chains, }) {
|
|
13345
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxRuntime.jsx(FilterSection, { title: "Chain", children: jsxRuntime.jsx(ChainsFilter, { chainType: chainType, setChainType: setChainType, chain: chain, setChain: setChain, chains: chains }) }), jsxRuntime.jsx(FilterSection, { title: "Date", initCollapsed: true, children: jsxRuntime.jsx(DateFilters, { fromDate: fromDate, setFromDate: setFromDate, toDate: toDate, setToDate: setToDate }) }), jsxRuntime.jsx(FilterSection, { title: "Status", initCollapsed: true, children: jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: ['success', 'ongoing', 'error'].map((s) => (jsxRuntime.jsx(StatusFilter, { status: s, selected: status.length === 0 || status.includes(s), onChange: () => setStatus(arrayToggle(status, s)), icon: s === 'ongoing' ? jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {}) : undefined }, s))) }) })] }));
|
|
13347
13346
|
}
|
|
13348
13347
|
const arrayToggle = (array, value) => array.includes(value) ? array.filter((v) => v !== value) : [...array, value];
|
|
13349
13348
|
function ChainsFilter({ chainType, setChainType, chain, setChain, chains, }) {
|
|
13350
13349
|
const [search, setSearch] = React.useState('');
|
|
13351
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-gap-squid-xxs", children: [jsxRuntime.jsxs(Toggle, { selected: chainType === 'source', onClick: () => setChainType('source'), children: [jsxRuntime.jsx(ArrowRightUpCircleIcon, {}), "Source"] }), jsxRuntime.jsxs(Toggle, { selected: chainType === 'destination', onClick: () => setChainType('destination'), children: [jsxRuntime.jsx(ArrowRightDownCircleIcon, {}), "Destination"] })] }), jsxRuntime.jsx(Input, { value: search, onChange: (e) => setSearch(e.target.value) }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: [jsxRuntime.jsx(ChainFilter, { name: "All Chains", logoURI: chainDataURL, selected: chain === null, onClick: () => setChain(
|
|
13350
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-gap-squid-xxs", children: [jsxRuntime.jsxs(Toggle, { selected: chainType === 'source', onClick: () => setChainType('source'), children: [jsxRuntime.jsx(ArrowRightUpCircleIcon, {}), "Source"] }), jsxRuntime.jsxs(Toggle, { selected: chainType === 'destination', onClick: () => setChainType('destination'), children: [jsxRuntime.jsx(ArrowRightDownCircleIcon, {}), "Destination"] })] }), jsxRuntime.jsx(Input, { value: search, onChange: (e) => setSearch(e.target.value) }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: [jsxRuntime.jsx(ChainFilter, { name: "All Chains", logoURI: chainDataURL, selected: chain === null, onClick: () => setChain(undefined) }), chains
|
|
13352
13351
|
.filter(({ name }) => search === '' ||
|
|
13353
13352
|
name.toLocaleLowerCase().includes(search.toLocaleLowerCase()))
|
|
13354
13353
|
.map(({ logoURI, name }, index) => (jsxRuntime.jsx(ChainFilter, { name: name, logoURI: logoURI, selected: chain === name, onClick: () => setChain(name) }, index)))] })] }));
|
|
@@ -13380,7 +13379,7 @@ function DateFilter({ label, placeholder, fromDate, toDate, type, onChange, expa
|
|
|
13380
13379
|
const onDayPickerSelect = (date) => {
|
|
13381
13380
|
if (!date) {
|
|
13382
13381
|
setInputValue('');
|
|
13383
|
-
onChange(
|
|
13382
|
+
onChange(undefined);
|
|
13384
13383
|
}
|
|
13385
13384
|
else {
|
|
13386
13385
|
onChange(date);
|
|
@@ -13396,7 +13395,7 @@ function DateFilter({ label, placeholder, fromDate, toDate, type, onChange, expa
|
|
|
13396
13395
|
setMonth(date);
|
|
13397
13396
|
}
|
|
13398
13397
|
else {
|
|
13399
|
-
onChange(
|
|
13398
|
+
onChange(undefined);
|
|
13400
13399
|
}
|
|
13401
13400
|
};
|
|
13402
13401
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-200", children: label }), jsxRuntime.jsx(Input, { className: "date-input-no-icon", icon: jsxRuntime.jsx(Calendar, {}), placeholder: placeholder, value: inputValue, onClick: () => setExpanded(true), type: "date", onChange: onInputChange }), jsxRuntime.jsx(Collapse, { collapsed: !expanded, children: jsxRuntime.jsx(DayPicker, { weekStartsOn: 1, formatters: {
|
|
@@ -13428,16 +13427,16 @@ function Checkbox({ checked, onChange, children, className }) {
|
|
|
13428
13427
|
}
|
|
13429
13428
|
const chainDataURL = "data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='30' height='30' fill='%239E79D2'/%3E%3Cpath d='M13.125 8.90625L13.8295 8.21098C16.0274 6.01301 19.5911 6.01301 21.789 8.21098C23.987 10.4089 23.987 13.9726 21.789 16.1705L21.0938 16.875M8.90625 13.125L8.21097 13.8295C6.01301 16.0274 6.01301 19.5911 8.21098 21.789C10.4089 23.987 13.9726 23.987 16.1705 21.789L16.875 21.0938M13.125 16.875L16.875 13.125' stroke='%23FBFBFD' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round'/%3E%3C/svg%3E%0A";
|
|
13430
13429
|
|
|
13431
|
-
function TransactionHeaderLayout({ status, title, image = jsxRuntime.jsx("span", {}), children, }) {
|
|
13432
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-
|
|
13430
|
+
function TransactionHeaderLayout({ status, title, image = jsxRuntime.jsx("span", {}), children, isLoading, }) {
|
|
13431
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs tw-bg-grey-900 tw-py-squid-l tw-pl-[75px] tw-pr-squid-l", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-justify-between", children: [image, status && jsxRuntime.jsx(TransactionState, { status: status })] }), jsxRuntime.jsx(LoadingSkeleton, { isLoading: isLoading, children: jsxRuntime.jsx(HeadingText, { size: "small", className: "tw-text-grey-300", children: title }) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(LoadingSkeleton, { isLoading: isLoading, children: children }) })] }));
|
|
13433
13432
|
}
|
|
13434
13433
|
|
|
13435
13434
|
function BridgeHeader({ tokenLogoURI, chainLogoURI, title = 'Bridge', hash, url, status, }) {
|
|
13436
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(ImageIcon, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsxRuntime.jsx(ImageIcon, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13435
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(ImageIcon, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsxRuntime.jsx(ImageIcon, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13437
13436
|
}
|
|
13438
13437
|
|
|
13439
13438
|
function BuyNFTHeader({ imageUrl, title = 'Buy NFT', hash, url, status, }) {
|
|
13440
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(ImageIcon, { src: imageUrl, size: "xlarge" }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13439
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(ImageIcon, { src: imageUrl, size: "xlarge" }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13441
13440
|
}
|
|
13442
13441
|
|
|
13443
13442
|
function Approve() {
|
|
@@ -13445,7 +13444,7 @@ function Approve() {
|
|
|
13445
13444
|
}
|
|
13446
13445
|
|
|
13447
13446
|
function InteractionHeader({ title = 'Interaction', image = jsxRuntime.jsx(Approve, {}), hash, url, status, }) {
|
|
13448
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: image, children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13447
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: image, children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13449
13448
|
}
|
|
13450
13449
|
|
|
13451
13450
|
function CoinsIcon() {
|
|
@@ -13466,7 +13465,7 @@ function ProfilePicture({ src }) {
|
|
|
13466
13465
|
}
|
|
13467
13466
|
|
|
13468
13467
|
function SwapHeader({ fromToken, toToken, title = 'Swap', hash, url, status, }) {
|
|
13469
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(TokenPair, { firstToken: fromToken, secondToken: toToken }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13468
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(TokenPair, { firstToken: fromToken, secondToken: toToken }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13470
13469
|
}
|
|
13471
13470
|
|
|
13472
13471
|
const headerComponentsMap = {
|
|
@@ -13548,13 +13547,17 @@ function TransactionProperties({ type, props, }) {
|
|
|
13548
13547
|
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
13549
13548
|
}
|
|
13550
13549
|
|
|
13551
|
-
function TransactionSearch({ query, setQuery, children, }) {
|
|
13552
|
-
return (jsxRuntime.jsx("div", { className:
|
|
13550
|
+
function TransactionSearch({ query, setQuery, children, className, }) {
|
|
13551
|
+
return (jsxRuntime.jsx("div", { className: cn('tw-relative tw-h-[50px]', className), children: jsxRuntime.jsxs("div", { className: "tw-l-0 tw-absolute tw-top-0 tw-flex tw-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-hidden tw-rounded-[25px] tw-border-material-light-thin tw-bg-material-dark-thin tw-p-squid-xxs tw-backdrop-blur-2xl dark:tw-bg-material-dark-thick", children: [jsxRuntime.jsx(Input, { placeholder: "Transaction hash or address", value: query, onChange: (e) => setQuery(e.target.value), actionButtonProps: {
|
|
13553
13552
|
label: 'Paste',
|
|
13554
13553
|
onClick: () => __awaiter$1(this, void 0, void 0, function* () { return setQuery(yield navigator.clipboard.readText()); }),
|
|
13555
13554
|
} }), children && (jsxRuntime.jsx("div", { className: "tw-max-h-[80vh] tw-overflow-y-auto tw-overflow-x-hidden tw-rounded-[20px]", children: children }))] }) }));
|
|
13556
13555
|
}
|
|
13557
13556
|
|
|
13557
|
+
function Toast({ headerContent, actionsContent, description, chipLabel, title, }) {
|
|
13558
|
+
return (jsxRuntime.jsxs(Menu, { contentClassName: "tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", rounded: "sm", children: [headerContent, jsxRuntime.jsx("header", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-0 tw-py-squid-xxs", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-100", children: title }) }), jsxRuntime.jsx(CaptionText, { className: "tw-text-center tw-text-material-light-thick", children: description }), jsxRuntime.jsx("menu", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: actionsContent }), chipLabel && (jsxRuntime.jsx(Chip, { label: chipLabel, className: "tw-absolute tw-right-squid-xs tw-top-squid-xs" }))] }));
|
|
13559
|
+
}
|
|
13560
|
+
|
|
13558
13561
|
const buttonClassName = 'tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs';
|
|
13559
13562
|
// checks that the value includes at least one character different than `0` (zero), or `.` (dot)
|
|
13560
13563
|
const RegExpNonZeroValue = /[^0.]/;
|
|
@@ -13846,10 +13849,10 @@ function FilterIcon() {
|
|
|
13846
13849
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "16", fill: "none", viewBox: "0 0 20 16", children: jsxRuntime.jsx("path", { fill: "currentColor", fillOpacity: "0.66", fillRule: "evenodd", d: "M0 1a1 1 0 011-1h18a1 1 0 110 2H1a1 1 0 01-1-1zm3 7a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3 7a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1z", clipRule: "evenodd" }) }));
|
|
13847
13850
|
}
|
|
13848
13851
|
|
|
13849
|
-
function FilterButton({ selected, numApplied = 0 }) {
|
|
13852
|
+
function FilterButton({ selected, numApplied = 0, onClick, }) {
|
|
13850
13853
|
return (jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(Button$1, { variant: "tertiary", size: "md", className: cn(selected
|
|
13851
13854
|
? '!tw-bg-grey-500 !tw-text-grey-800'
|
|
13852
|
-
: '!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500'), children: jsxRuntime.jsx(FilterIcon, {}) }), numApplied > 0 && (jsxRuntime.jsx("div", { className: "tw-absolute tw-right-0 tw-top-0 tw-h-squid-m tw-w-squid-xl -tw-translate-y-1/2 tw-translate-x-1/2 tw-rounded-full tw-bg-[#E4FE53] tw-text-center tw-leading-[1] tw-text-grey-200 dark:tw-text-grey-900", children: jsxRuntime.jsx(CaptionText, { children: numApplied }) }))] }));
|
|
13855
|
+
: '!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500'), onClick: onClick, children: jsxRuntime.jsx(FilterIcon, {}) }), numApplied > 0 && (jsxRuntime.jsx("div", { className: "tw-absolute tw-right-0 tw-top-0 tw-h-squid-m tw-w-squid-xl -tw-translate-y-1/2 tw-translate-x-1/2 tw-rounded-full tw-bg-[#E4FE53] tw-text-center tw-leading-[1] tw-text-grey-200 dark:tw-text-grey-900", children: jsxRuntime.jsx(CaptionText, { children: numApplied }) }))] }));
|
|
13853
13856
|
}
|
|
13854
13857
|
|
|
13855
13858
|
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
@@ -13871,11 +13874,11 @@ function SparkleIcon() {
|
|
|
13871
13874
|
}
|
|
13872
13875
|
|
|
13873
13876
|
function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
13874
|
-
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { displayBackButton: true }), jsxRuntime.jsx("div", { className: "tw-max-h-[60px] tw-px-squid-m tw-py-squid-xs", children: jsxRuntime.jsx(Input, {}) }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsxs("div", { className: "
|
|
13877
|
+
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { displayBackButton: true }), jsxRuntime.jsx("div", { className: "tw-max-h-[60px] tw-px-squid-m tw-py-squid-xs", children: jsxRuntime.jsx(Input, {}) }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsxs("div", { className: "tw-grid tw-grid-cols-[70px_1fr] mobile-lg:!tw-grid-cols-[180px_299px]", children: [jsxRuntime.jsxs("div", { style: {
|
|
13875
13878
|
scrollbarWidth: 'none',
|
|
13876
|
-
}, className: "
|
|
13879
|
+
}, className: "tw-flex tw-max-h-[540px] tw-w-[70px] tw-max-w-[70px] tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden tw-pt-squid-xs mobile-lg:tw-w-[180px] mobile-lg:tw-max-w-[180px] mobile-lg:tw-pt-0", children: [jsxRuntime.jsx(SectionTitle, { title: "Chains", icon: jsxRuntime.jsx(ChainLink, {}), className: "tw-hidden mobile-lg:tw-flex" }), 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: {
|
|
13877
13880
|
scrollbarWidth: 'none',
|
|
13878
|
-
}, className: "mobile-lg:tw-
|
|
13881
|
+
}, className: "mobile-lg:tw-max-w-[299px tw-flex tw-max-h-[540px] tw-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden mobile-lg:tw-w-[299px]", 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, icon: jsxRuntime.jsx(BrokenHeartIcon, { className: "tw-text-status-negative" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { } }, 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" }), showDetailOnHoverOnly: true, rounded: true, 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" }), showDetailOnHoverOnly: true, rounded: true, 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" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { } }, popToken.name))) })] })] }) })] }));
|
|
13879
13882
|
}
|
|
13880
13883
|
const List = ({ children }) => {
|
|
13881
13884
|
return (jsxRuntime.jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
|
|
@@ -49096,13 +49099,15 @@ function TransactionViewLayout(_a) {
|
|
|
49096
49099
|
return (jsxRuntime.jsxs("div", Object.assign({ className: "tw-divide-y tw-divide-material-light-thin" }, props, { children: [header, properties, jsxRuntime.jsx(CollapsingSection, { collapsed: actionsCollapsed, setCollapsed: setActionsCollapsed, children: linkActionTimelineProps(actions, actionsCollapsed).map((props, i) => (jsxRuntime.jsx("div", { className: cn(i > 0 && 'tw-border-t tw-border-t-material-light-thin'), children: jsxRuntime.jsx(TransactionAction, Object.assign({}, props)) }, i))) }), jsxRuntime.jsxs(CollapsingSection, { collapsed: feesCollapsed, setCollapsed: setFeesCollapsed, children: [jsxRuntime.jsx(FeesTotal, Object.assign({ collapsed: feesCollapsed, showTimeline: true }, fees)), jsxRuntime.jsx(FeesLines, Object.assign({}, fees))] })] })));
|
|
49097
49100
|
}
|
|
49098
49101
|
function CollapsingSection({ children, collapsed, setCollapsed, collapsedHeight = 50, }) {
|
|
49099
|
-
return (jsxRuntime.jsx("div", { className: cn('tw-relative', collapsed ? 'tw-cursor-pointer' : ''), onClick: () => {
|
|
49102
|
+
return (jsxRuntime.jsx("div", { className: cn('tw-group/collapsing-section tw-relative tw-bg-grey-900', collapsed ? 'tw-cursor-pointer' : ''), onClick: () => {
|
|
49100
49103
|
if (collapsed)
|
|
49101
49104
|
setCollapsed(false);
|
|
49102
49105
|
}, children: jsxRuntime.jsxs("div", { className: cn('tw-relative tw-border-material-light-thin tw-transition-[border-width] tw-duration-200', !collapsed && 'tw-border-y-[4px]'), children: [jsxRuntime.jsx("div", { className: "cursor-pointer tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-flex tw-h-full tw-cursor-pointer tw-items-center tw-pr-squid-m", style: { height: `${collapsedHeight}px` }, onClick: () => {
|
|
49103
49106
|
if (!collapsed)
|
|
49104
49107
|
setCollapsed(true);
|
|
49105
|
-
}, children: jsxRuntime.jsx(ChevronLargeDownIcon, { className: cn('tw-origin-center tw-text-grey-300 tw-transition-transform tw-duration-200', collapsed && '-tw-rotate-90') }) }), jsxRuntime.jsx(
|
|
49108
|
+
}, children: jsxRuntime.jsx(ChevronLargeDownIcon, { className: cn('tw-origin-center tw-text-grey-300 tw-transition-transform tw-duration-200', collapsed && '-tw-rotate-90') }) }), jsxRuntime.jsx("div", {
|
|
49109
|
+
// hover highlight
|
|
49110
|
+
className: "tw-pointer-events-none tw-absolute tw-left-0 tw-top-0 tw-h-[50px] tw-w-full", children: jsxRuntime.jsx("div", { className: cn('tw-absolute tw-bottom-squid-xxs tw-left-squid-xs tw-right-squid-xs tw-top-squid-xxs tw-rounded-squid-xs tw-bg-material-light-thin tw-opacity-0 tw-transition-opacity tw-duration-200', collapsed && 'group-hover/collapsing-section:tw-opacity-100') }) }), jsxRuntime.jsx(Collapse, { collapsed: collapsed, collapsedHeight: collapsedHeight, children: children })] }) }));
|
|
49106
49111
|
}
|
|
49107
49112
|
|
|
49108
49113
|
function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, }) {
|
|
@@ -49318,7 +49323,7 @@ function blendColors(foreground, background) {
|
|
|
49318
49323
|
|
|
49319
49324
|
function SquidConfigProvider({ theme = lightTheme, children, themeType = 'light', }) {
|
|
49320
49325
|
const parsedStyle = parseSquidTheme(theme);
|
|
49321
|
-
return (jsxRuntime.jsx("div", { style:
|
|
49326
|
+
return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-h-screen tw-font-geist mobile-lg:tw-h-auto", children: children }));
|
|
49322
49327
|
}
|
|
49323
49328
|
|
|
49324
49329
|
exports.ActionLayout = ActionLayout;
|
|
@@ -49356,6 +49361,7 @@ exports.DropdownMenu = DropdownMenu;
|
|
|
49356
49361
|
exports.DropdownMenuItem = DropdownMenuItem;
|
|
49357
49362
|
exports.ErrorMessage = ErrorMessage;
|
|
49358
49363
|
exports.ExploreLayout = ExploreLayout;
|
|
49364
|
+
exports.ExploreNav = ExploreNav;
|
|
49359
49365
|
exports.FeeButton = FeeButton;
|
|
49360
49366
|
exports.FeesAction = FeesAction;
|
|
49361
49367
|
exports.FeesLines = FeesLines;
|
|
@@ -49417,6 +49423,7 @@ exports.SwapStepsCollapsed = SwapStepsCollapsed;
|
|
|
49417
49423
|
exports.SwapTransactionView = SwapTransactionView;
|
|
49418
49424
|
exports.Switch = Switch;
|
|
49419
49425
|
exports.Timestamp = Timestamp;
|
|
49426
|
+
exports.Toast = Toast;
|
|
49420
49427
|
exports.TokenPair = TokenPair;
|
|
49421
49428
|
exports.Tooltip = Tooltip;
|
|
49422
49429
|
exports.TransactionAction = TransactionAction;
|
|
@@ -7,5 +7,5 @@ interface LoadingSkeletonProps {
|
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
width?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function LoadingSkeleton({ className, height, isLoading: isLoadingProp, children, width, }: LoadingSkeletonProps): string | number |
|
|
10
|
+
export declare function LoadingSkeleton({ className, height, isLoading: isLoadingProp, children, width, }: LoadingSkeletonProps): string | number | true | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface FilterButtonProps {
|
|
2
2
|
selected: boolean;
|
|
3
3
|
numApplied?: number;
|
|
4
|
+
onClick?: () => void;
|
|
4
5
|
}
|
|
5
|
-
export declare function FilterButton({ selected, numApplied }: FilterButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function FilterButton({ selected, numApplied, onClick, }: FilterButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function ExploreLayout({ navigation, children }: ExploreLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ExploreLayout: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<import("react").ElementType<"div">>>;
|
|
3
|
+
export declare const ExploreNav: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<import("react").ElementType<"div">>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import 'react-day-picker/dist/style.css';
|
|
2
2
|
import { ChainTypeFilter, StatusFilter as TStatusFilter } from '../../types/components';
|
|
3
3
|
interface TransactionFiltersProps {
|
|
4
|
-
chainType
|
|
4
|
+
chainType?: ChainTypeFilter;
|
|
5
5
|
setChainType: (chainType: ChainTypeFilter) => void;
|
|
6
|
-
chain
|
|
7
|
-
setChain: (chain
|
|
8
|
-
fromDate
|
|
9
|
-
setFromDate: (fromDate
|
|
10
|
-
toDate
|
|
11
|
-
setToDate: (toDate
|
|
12
|
-
status
|
|
13
|
-
setStatus: (status
|
|
6
|
+
chain?: string;
|
|
7
|
+
setChain: (chain?: string) => void;
|
|
8
|
+
fromDate?: Date;
|
|
9
|
+
setFromDate: (fromDate?: Date) => void;
|
|
10
|
+
toDate?: Date;
|
|
11
|
+
setToDate: (toDate?: Date) => void;
|
|
12
|
+
status?: TStatusFilter[];
|
|
13
|
+
setStatus: (status?: TStatusFilter[]) => void;
|
|
14
14
|
chains: {
|
|
15
15
|
name: string;
|
|
16
16
|
logoURI: string;
|
|
@@ -2,9 +2,10 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ActionStatus } from '../../../types/components';
|
|
3
3
|
interface TransactionHeaderLayoutProps {
|
|
4
4
|
status?: ActionStatus;
|
|
5
|
-
title
|
|
5
|
+
title?: string;
|
|
6
6
|
image?: ReactNode;
|
|
7
7
|
children?: ReactNode;
|
|
8
|
+
isLoading?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare function TransactionHeaderLayout({ status, title, image, children, }: TransactionHeaderLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TransactionHeaderLayout({ status, title, image, children, isLoading, }: TransactionHeaderLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -3,6 +3,7 @@ interface TransactionSearchProps {
|
|
|
3
3
|
query: string;
|
|
4
4
|
setQuery: (query: string) => void;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function TransactionSearch({ query, setQuery, children, }: TransactionSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TransactionSearch({ query, setQuery, children, className, }: TransactionSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -21,8 +21,9 @@ interface FeesLinesProps {
|
|
|
21
21
|
export declare function FeesLines({ status, lines, showTimeline, }: FeesLinesProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
interface FeesRowProps {
|
|
23
23
|
label: string;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
amount: number | string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
usd: number | string;
|
|
26
27
|
collapsed?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseActionProps } from './BaseActionProps';
|
|
2
2
|
interface SuccessActionProps extends BaseActionProps {
|
|
3
3
|
description?: string;
|
|
4
|
-
timestamp
|
|
5
|
-
hash
|
|
6
|
-
url
|
|
4
|
+
timestamp?: number;
|
|
5
|
+
hash?: string;
|
|
6
|
+
url?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function SuccessAction({ nextStatus, status, description, showTimeline, showBody, timestamp, hash, url, }: SuccessActionProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -12,9 +12,9 @@ interface SwapActionProps extends BaseActionProps {
|
|
|
12
12
|
logoURI: string;
|
|
13
13
|
name: string;
|
|
14
14
|
};
|
|
15
|
-
timestamp
|
|
16
|
-
hash
|
|
17
|
-
url
|
|
15
|
+
timestamp?: number;
|
|
16
|
+
hash?: string;
|
|
17
|
+
url?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }: SwapActionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* Combines multiple class names into a single string
|
|
4
5
|
*
|
|
@@ -21,4 +22,6 @@ export declare function capitalize(text: string): string;
|
|
|
21
22
|
type Falsy = false | null | undefined | 0 | '';
|
|
22
23
|
export declare function truthy<T>(value: T): value is Exclude<T, Falsy>;
|
|
23
24
|
export declare function truncateHash(hash: string): string;
|
|
25
|
+
export declare const styled: <Tag extends keyof JSX.IntrinsicElements>(tag: Tag, className: string) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<ComponentProps<Tag>> & import("react").RefAttributes<ElementType<Tag>>>;
|
|
26
|
+
export declare const mergeProps: <Tag extends keyof JSX.IntrinsicElements = any>(a: ComponentProps<Tag>, b: ComponentProps<Tag>) => ComponentProps<Tag>;
|
|
24
27
|
export {};
|
|
@@ -201,13 +201,15 @@ export declare const transactionActions: {
|
|
|
201
201
|
status: "executed";
|
|
202
202
|
total: {
|
|
203
203
|
label: string;
|
|
204
|
-
usd:
|
|
205
|
-
|
|
204
|
+
usd: number;
|
|
205
|
+
amount: number;
|
|
206
|
+
symbol: string;
|
|
206
207
|
};
|
|
207
208
|
lines: {
|
|
208
209
|
label: string;
|
|
209
|
-
usd:
|
|
210
|
-
|
|
210
|
+
usd: number;
|
|
211
|
+
amount: number;
|
|
212
|
+
symbol: string;
|
|
211
213
|
}[];
|
|
212
214
|
};
|
|
213
215
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
declare const meta: Meta<typeof SwitchingAppContainer>;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
5
|
+
declare function SwitchingAppContainer(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Default: Story;
|