@0xsquid/ui 0.17.3 → 0.17.4
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 +45 -43
- 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/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 +46 -45
- 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/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 +39 -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/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useState, createContext, useContext, useMemo, useRef, useEffect, Children, Fragment as Fragment$1, isValidElement, useLayoutEffect, cloneElement, useCallback,
|
|
3
|
+
import { forwardRef, createElement, useState, createContext, useContext, useMemo, useRef, useEffect, Children, Fragment as Fragment$1, isValidElement, useLayoutEffect, cloneElement, useCallback, useImperativeHandle, useId as useId$1 } from 'react';
|
|
4
4
|
|
|
5
5
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
6
6
|
|
|
@@ -2581,6 +2581,12 @@ const formatRelativeDate = (timestampSeconds) => {
|
|
|
2581
2581
|
function truncateHash(hash) {
|
|
2582
2582
|
return `${hash.slice(0, 8)}...${hash.slice(-6)}`;
|
|
2583
2583
|
}
|
|
2584
|
+
const styled = (tag, className) => {
|
|
2585
|
+
const Component = forwardRef((props, ref) => createElement(tag, mergeProps({ ref, className }, props)));
|
|
2586
|
+
Component.displayName = `styled ${tag}`;
|
|
2587
|
+
return Component;
|
|
2588
|
+
};
|
|
2589
|
+
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) }));
|
|
2584
2590
|
|
|
2585
2591
|
const badgeSizeClassMap = {
|
|
2586
2592
|
sm: 'tw-w-4 tw-h-4',
|
|
@@ -2720,9 +2726,9 @@ const LoadingProvider = LoadingContext.Provider;
|
|
|
2720
2726
|
function LoadingSkeleton({ className, height = '20', isLoading: isLoadingProp, children, width = '100', }) {
|
|
2721
2727
|
const contextValue = useContext(LoadingContext);
|
|
2722
2728
|
const isLoading = isLoadingProp !== undefined ? isLoadingProp : contextValue;
|
|
2723
|
-
if (
|
|
2729
|
+
if (children && !isLoading)
|
|
2724
2730
|
return children;
|
|
2725
|
-
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsx("g", { clipPath: "url(#clip0_1246_29063)", children: jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxs("defs", { children: [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: [jsx("stop", { stopColor: "currentColor" }), jsx("stop", { offset: "0.395881", stopColor: "currentColor" }), 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" }), jsx("stop", { offset: "0.697004", stopColor: "currentColor" })] }), jsx("clipPath", { id: "clip0_1246_29063", children: 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" }) })] })
|
|
2731
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsx("g", { clipPath: "url(#clip0_1246_29063)", children: jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxs("defs", { children: [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: [jsx("stop", { stopColor: "currentColor" }), jsx("stop", { offset: "0.395881", stopColor: "currentColor" }), 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" }), jsx("stop", { offset: "0.697004", stopColor: "currentColor" })] }), jsx("clipPath", { id: "clip0_1246_29063", children: 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" }) })] })] }));
|
|
2726
2732
|
}
|
|
2727
2733
|
|
|
2728
2734
|
function Checkmark1Icon() {
|
|
@@ -2895,7 +2901,7 @@ function Copy(_a) {
|
|
|
2895
2901
|
}
|
|
2896
2902
|
|
|
2897
2903
|
function HashLink({ showTx = false, hash, showCopyButton = false, url, children, }) {
|
|
2898
|
-
return (jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsx("span", { className: "tw-text-grey-700", children: "TX" }),
|
|
2904
|
+
return (jsxs("div", { className: "tw-flex tw-items-center", children: [showTx && jsx("span", { className: "tw-mr-squid-xs tw-text-grey-700", children: "TX" }), children !== null && children !== void 0 ? children : truncateHash(hash), url && (jsx("a", { href: url, target: "_blank", className: 'tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin', children: jsx(SquareArrowTopRight2Icon, { strokeWidth: "1.5", className: "tw-h-[1.2em] tw-w-[1.2em] tw-text-royal-500" }) })), showCopyButton && (jsx("span", { className: "tw-rounded-squid-s tw-px-squid-xxs hover:tw-bg-material-light-thin", children: 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) }) }))] }));
|
|
2899
2905
|
}
|
|
2900
2906
|
|
|
2901
2907
|
function WalletLink({ imageURI, address }) {
|
|
@@ -6713,9 +6719,10 @@ function useOnResize(ref, callback) {
|
|
|
6713
6719
|
const observer = new ResizeObserver(([entry]) => {
|
|
6714
6720
|
if (!entry)
|
|
6715
6721
|
return;
|
|
6716
|
-
|
|
6722
|
+
callbackRef.current(entry.contentRect);
|
|
6717
6723
|
});
|
|
6718
6724
|
observer.observe(ref.current);
|
|
6725
|
+
callbackRef.current(ref.current.getBoundingClientRect());
|
|
6719
6726
|
return () => observer.disconnect();
|
|
6720
6727
|
}, [ref.current]);
|
|
6721
6728
|
}
|
|
@@ -6742,7 +6749,7 @@ function Collapse(_a) {
|
|
|
6742
6749
|
const containerRef = useRef(null);
|
|
6743
6750
|
const contentsRef = useRef(null);
|
|
6744
6751
|
const contentsRect = useRect(contentsRef);
|
|
6745
|
-
const expandedHeight = contentsRect.height;
|
|
6752
|
+
const expandedHeight = Math.max(contentsRect.height, collapsedHeight);
|
|
6746
6753
|
return (jsx("div", Object.assign({ ref: containerRef, style: {
|
|
6747
6754
|
[expandednessVar]: collapsed ? 0 : 1,
|
|
6748
6755
|
transition: `${expandednessVar} ${duration}ms ${ANIMATION_TIMINGS.SHOW_ROUTE}`,
|
|
@@ -7209,7 +7216,7 @@ function ActionRow(_a) {
|
|
|
7209
7216
|
return (jsx("div", Object.assign({}, props, { className: cn('tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m', className) })));
|
|
7210
7217
|
}
|
|
7211
7218
|
function ActionWrapper({ children, status, className, }) {
|
|
7212
|
-
return (jsx("div", { className: cn('tw-relative tw-flex tw-flex-col tw-gap-squid-xxs', status === 'waiting'
|
|
7219
|
+
return (jsx("div", { className: cn('tw-relative tw-flex tw-flex-col tw-gap-squid-xxs', status === 'waiting' && 'tw-bg-grey-800', className), children: children }));
|
|
7213
7220
|
}
|
|
7214
7221
|
function Timestamp({ time }) {
|
|
7215
7222
|
return (jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
|
|
@@ -7224,7 +7231,7 @@ function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, ch
|
|
|
7224
7231
|
}
|
|
7225
7232
|
|
|
7226
7233
|
function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
|
|
7227
|
-
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(SquareArrowTopLeftIcon, {}), description: jsxs(Inline, { children: ["Bridge", jsx(IconLabel, { src: token.logoURI, variant: "round", children: token.symbol }), "to", jsx(IconLabel, { src: chain.logoURI, children: chain.name }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7234
|
+
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(SquareArrowTopLeftIcon, {}), description: jsxs(Inline, { children: ["Bridge", jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7228
7235
|
}
|
|
7229
7236
|
|
|
7230
7237
|
function TagIcon({ size = '20' }) {
|
|
@@ -7245,8 +7252,8 @@ function FeesLines({ status, lines, showTimeline = false, }) {
|
|
|
7245
7252
|
? statusTextClassMap[status]
|
|
7246
7253
|
: '!tw-text-[transparent]'), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
|
|
7247
7254
|
}
|
|
7248
|
-
function FeesRow({ label, usd,
|
|
7249
|
-
return (jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsx(SizeTransition, { children: jsx(BodyText, { size: "small", tight: true, className: cn('tw-block tw-
|
|
7255
|
+
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
7256
|
+
return (jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsx(SizeTransition, { children: jsx(BodyText, { size: "small", tight: true, className: cn('tw-block tw-truncate tw-text-grey-300', !collapsed && 'tw-w-[100px]'), children: label }) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
|
|
7250
7257
|
}
|
|
7251
7258
|
|
|
7252
7259
|
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
@@ -7262,11 +7269,11 @@ function linkActionTimelineProps(actions, collapsed) {
|
|
|
7262
7269
|
}
|
|
7263
7270
|
|
|
7264
7271
|
function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
|
|
7265
|
-
return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7272
|
+
return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7266
7273
|
}
|
|
7267
7274
|
|
|
7268
7275
|
function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
7269
|
-
return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), ' ', jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7276
|
+
return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), ' ', jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
7270
7277
|
}
|
|
7271
7278
|
|
|
7272
7279
|
function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
@@ -7280,9 +7287,9 @@ function PieChartIcon() {
|
|
|
7280
7287
|
function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
|
|
7281
7288
|
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(PieChartIcon, {}), description: jsx(Inline, { children: [
|
|
7282
7289
|
'Stake',
|
|
7283
|
-
jsx(IconLabel, { src: token.logoURI, variant: "round", children: token.symbol }),
|
|
7290
|
+
jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }),
|
|
7284
7291
|
'on',
|
|
7285
|
-
jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name }),
|
|
7292
|
+
jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) }),
|
|
7286
7293
|
] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7287
7294
|
}
|
|
7288
7295
|
|
|
@@ -7302,22 +7309,15 @@ function StartAction({ status, nextStatus, showTimeline = false, showBody = fals
|
|
|
7302
7309
|
function SuccessAction({ nextStatus, status, description = status === 'error'
|
|
7303
7310
|
? 'Transaction failed'
|
|
7304
7311
|
: 'Transaction successful', showTimeline, showBody, timestamp, hash, url, }) {
|
|
7305
|
-
return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7312
|
+
return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
7306
7313
|
}
|
|
7307
7314
|
|
|
7308
7315
|
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
7309
|
-
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Swap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: fromToken.symbol }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: toToken.symbol }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7316
|
+
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Swap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7310
7317
|
}
|
|
7311
7318
|
|
|
7312
7319
|
function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
7313
|
-
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description:
|
|
7314
|
-
'Wrap',
|
|
7315
|
-
jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: fromToken.symbol }),
|
|
7316
|
-
'to',
|
|
7317
|
-
jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: toToken.symbol }),
|
|
7318
|
-
'via',
|
|
7319
|
-
jsx(IconLabel, { src: provider.logoURI, variant: "round", children: provider.name }),
|
|
7320
|
-
] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7320
|
+
return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Wrap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
7321
7321
|
}
|
|
7322
7322
|
|
|
7323
7323
|
const actionComponentMap = {
|
|
@@ -7362,9 +7362,8 @@ function DropdownMenu({ dropdownRef, items, className, menuRef, isHidden = false
|
|
|
7362
7362
|
return (jsx("div", { ref: dropdownRef, className: "tw-relative", children: jsx(Menu, { menuRef: menuRef, rounded: "sm", containerClassName: cn('tw-absolute tw-right-0 tw-z-20', className), contentClassName: "!tw-p-0", children: !isHidden && (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) => (jsx(DropdownMenuItem, Object.assign({}, item), item.label))) })) }) }));
|
|
7363
7363
|
}
|
|
7364
7364
|
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
}
|
|
7365
|
+
const ExploreLayout = styled('div', 'tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-shadow-elevation-light-3');
|
|
7366
|
+
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');
|
|
7368
7367
|
|
|
7369
7368
|
function InfoBox({ title, description, icon }) {
|
|
7370
7369
|
return (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, 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: [jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
|
|
@@ -13322,13 +13321,13 @@ function Tick({ className }) {
|
|
|
13322
13321
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "7", fill: "none", viewBox: "0 0 9 7", className: className, children: jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M7.497 1l-4.5 4.5-2-2" }) }));
|
|
13323
13322
|
}
|
|
13324
13323
|
|
|
13325
|
-
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status, setStatus, chains, }) {
|
|
13326
|
-
return (jsxs("div", { className: "tw-flex tw-
|
|
13324
|
+
function TransactionFilters({ chainType, setChainType, chain, setChain, fromDate, setFromDate, toDate, setToDate, status = [], setStatus, chains, }) {
|
|
13325
|
+
return (jsxs("div", { className: "tw-flex tw-flex-col", children: [jsx(FilterSection, { title: "Chain", children: jsx(ChainsFilter, { chainType: chainType, setChainType: setChainType, chain: chain, setChain: setChain, chains: chains }) }), jsx(FilterSection, { title: "Date", initCollapsed: true, children: jsx(DateFilters, { fromDate: fromDate, setFromDate: setFromDate, toDate: toDate, setToDate: setToDate }) }), jsx(FilterSection, { title: "Status", initCollapsed: true, children: jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: ['success', 'ongoing', 'error'].map((s) => (jsx(StatusFilter, { status: s, selected: status.length === 0 || status.includes(s), onChange: () => setStatus(arrayToggle(status, s)), icon: s === 'ongoing' ? jsx(DotGrid1x3HorizontalIcon, {}) : undefined }, s))) }) })] }));
|
|
13327
13326
|
}
|
|
13328
13327
|
const arrayToggle = (array, value) => array.includes(value) ? array.filter((v) => v !== value) : [...array, value];
|
|
13329
13328
|
function ChainsFilter({ chainType, setChainType, chain, setChain, chains, }) {
|
|
13330
13329
|
const [search, setSearch] = useState('');
|
|
13331
|
-
return (jsxs(Fragment, { children: [jsxs("div", { className: "tw-flex tw-gap-squid-xxs", children: [jsxs(Toggle, { selected: chainType === 'source', onClick: () => setChainType('source'), children: [jsx(ArrowRightUpCircleIcon, {}), "Source"] }), jsxs(Toggle, { selected: chainType === 'destination', onClick: () => setChainType('destination'), children: [jsx(ArrowRightDownCircleIcon, {}), "Destination"] })] }), jsx(Input, { value: search, onChange: (e) => setSearch(e.target.value) }), jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: [jsx(ChainFilter, { name: "All Chains", logoURI: chainDataURL, selected: chain === null, onClick: () => setChain(
|
|
13330
|
+
return (jsxs(Fragment, { children: [jsxs("div", { className: "tw-flex tw-gap-squid-xxs", children: [jsxs(Toggle, { selected: chainType === 'source', onClick: () => setChainType('source'), children: [jsx(ArrowRightUpCircleIcon, {}), "Source"] }), jsxs(Toggle, { selected: chainType === 'destination', onClick: () => setChainType('destination'), children: [jsx(ArrowRightDownCircleIcon, {}), "Destination"] })] }), jsx(Input, { value: search, onChange: (e) => setSearch(e.target.value) }), jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-xxs", children: [jsx(ChainFilter, { name: "All Chains", logoURI: chainDataURL, selected: chain === null, onClick: () => setChain(undefined) }), chains
|
|
13332
13331
|
.filter(({ name }) => search === '' ||
|
|
13333
13332
|
name.toLocaleLowerCase().includes(search.toLocaleLowerCase()))
|
|
13334
13333
|
.map(({ logoURI, name }, index) => (jsx(ChainFilter, { name: name, logoURI: logoURI, selected: chain === name, onClick: () => setChain(name) }, index)))] })] }));
|
|
@@ -13360,7 +13359,7 @@ function DateFilter({ label, placeholder, fromDate, toDate, type, onChange, expa
|
|
|
13360
13359
|
const onDayPickerSelect = (date) => {
|
|
13361
13360
|
if (!date) {
|
|
13362
13361
|
setInputValue('');
|
|
13363
|
-
onChange(
|
|
13362
|
+
onChange(undefined);
|
|
13364
13363
|
}
|
|
13365
13364
|
else {
|
|
13366
13365
|
onChange(date);
|
|
@@ -13376,7 +13375,7 @@ function DateFilter({ label, placeholder, fromDate, toDate, type, onChange, expa
|
|
|
13376
13375
|
setMonth(date);
|
|
13377
13376
|
}
|
|
13378
13377
|
else {
|
|
13379
|
-
onChange(
|
|
13378
|
+
onChange(undefined);
|
|
13380
13379
|
}
|
|
13381
13380
|
};
|
|
13382
13381
|
return (jsxs(Fragment, { children: [jsx(CaptionText, { className: "tw-text-grey-200", children: label }), jsx(Input, { className: "date-input-no-icon", icon: jsx(Calendar, {}), placeholder: placeholder, value: inputValue, onClick: () => setExpanded(true), type: "date", onChange: onInputChange }), jsx(Collapse, { collapsed: !expanded, children: jsx(DayPicker, { weekStartsOn: 1, formatters: {
|
|
@@ -13408,16 +13407,16 @@ function Checkbox({ checked, onChange, children, className }) {
|
|
|
13408
13407
|
}
|
|
13409
13408
|
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";
|
|
13410
13409
|
|
|
13411
|
-
function TransactionHeaderLayout({ status, title, image = jsx("span", {}), children, }) {
|
|
13412
|
-
return (jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-
|
|
13410
|
+
function TransactionHeaderLayout({ status, title, image = jsx("span", {}), children, isLoading, }) {
|
|
13411
|
+
return (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: [jsxs("div", { className: "tw-flex tw-justify-between", children: [image, status && jsx(TransactionState, { status: status })] }), jsx(LoadingSkeleton, { isLoading: isLoading, children: jsx(HeadingText, { size: "small", className: "tw-text-grey-300", children: title }) }), jsx("div", { children: jsx(LoadingSkeleton, { isLoading: isLoading, children: children }) })] }));
|
|
13413
13412
|
}
|
|
13414
13413
|
|
|
13415
13414
|
function BridgeHeader({ tokenLogoURI, chainLogoURI, title = 'Bridge', hash, url, status, }) {
|
|
13416
|
-
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxs("div", { className: "tw-relative", children: [jsx(ImageIcon, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsx(ImageIcon, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13415
|
+
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxs("div", { className: "tw-relative", children: [jsx(ImageIcon, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsx(ImageIcon, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13417
13416
|
}
|
|
13418
13417
|
|
|
13419
13418
|
function BuyNFTHeader({ imageUrl, title = 'Buy NFT', hash, url, status, }) {
|
|
13420
|
-
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(ImageIcon, { src: imageUrl, size: "xlarge" }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13419
|
+
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(ImageIcon, { src: imageUrl, size: "xlarge" }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13421
13420
|
}
|
|
13422
13421
|
|
|
13423
13422
|
function Approve() {
|
|
@@ -13425,7 +13424,7 @@ function Approve() {
|
|
|
13425
13424
|
}
|
|
13426
13425
|
|
|
13427
13426
|
function InteractionHeader({ title = 'Interaction', image = jsx(Approve, {}), hash, url, status, }) {
|
|
13428
|
-
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: image, children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13427
|
+
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: image, children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13429
13428
|
}
|
|
13430
13429
|
|
|
13431
13430
|
function CoinsIcon() {
|
|
@@ -13446,7 +13445,7 @@ function ProfilePicture({ src }) {
|
|
|
13446
13445
|
}
|
|
13447
13446
|
|
|
13448
13447
|
function SwapHeader({ fromToken, toToken, title = 'Swap', hash, url, status, }) {
|
|
13449
|
-
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(TokenPair, { firstToken: fromToken, secondToken: toToken }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-
|
|
13448
|
+
return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(TokenPair, { firstToken: fromToken, secondToken: toToken }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), ' '] }) }));
|
|
13450
13449
|
}
|
|
13451
13450
|
|
|
13452
13451
|
const headerComponentsMap = {
|
|
@@ -13528,8 +13527,8 @@ function TransactionProperties({ type, props, }) {
|
|
|
13528
13527
|
return jsx(Component, Object.assign({}, props));
|
|
13529
13528
|
}
|
|
13530
13529
|
|
|
13531
|
-
function TransactionSearch({ query, setQuery, children, }) {
|
|
13532
|
-
return (jsx("div", { className:
|
|
13530
|
+
function TransactionSearch({ query, setQuery, children, className, }) {
|
|
13531
|
+
return (jsx("div", { className: cn('tw-relative tw-h-[50px]', className), children: 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: [jsx(Input, { placeholder: "Transaction hash or address", value: query, onChange: (e) => setQuery(e.target.value), actionButtonProps: {
|
|
13533
13532
|
label: 'Paste',
|
|
13534
13533
|
onClick: () => __awaiter$1(this, void 0, void 0, function* () { return setQuery(yield navigator.clipboard.readText()); }),
|
|
13535
13534
|
} }), children && (jsx("div", { className: "tw-max-h-[80vh] tw-overflow-y-auto tw-overflow-x-hidden tw-rounded-[20px]", children: children }))] }) }));
|
|
@@ -13826,10 +13825,10 @@ function FilterIcon() {
|
|
|
13826
13825
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "16", fill: "none", viewBox: "0 0 20 16", children: 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" }) }));
|
|
13827
13826
|
}
|
|
13828
13827
|
|
|
13829
|
-
function FilterButton({ selected, numApplied = 0 }) {
|
|
13828
|
+
function FilterButton({ selected, numApplied = 0, onClick, }) {
|
|
13830
13829
|
return (jsxs("div", { className: "tw-relative", children: [jsx(Button$1, { variant: "tertiary", size: "md", className: cn(selected
|
|
13831
13830
|
? '!tw-bg-grey-500 !tw-text-grey-800'
|
|
13832
|
-
: '!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500'), children: jsx(FilterIcon, {}) }), numApplied > 0 && (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: jsx(CaptionText, { children: numApplied }) }))] }));
|
|
13831
|
+
: '!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500'), onClick: onClick, children: jsx(FilterIcon, {}) }), numApplied > 0 && (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: jsx(CaptionText, { children: numApplied }) }))] }));
|
|
13833
13832
|
}
|
|
13834
13833
|
|
|
13835
13834
|
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
@@ -49076,13 +49075,15 @@ function TransactionViewLayout(_a) {
|
|
|
49076
49075
|
return (jsxs("div", Object.assign({ className: "tw-divide-y tw-divide-material-light-thin" }, props, { children: [header, properties, jsx(CollapsingSection, { collapsed: actionsCollapsed, setCollapsed: setActionsCollapsed, children: linkActionTimelineProps(actions, actionsCollapsed).map((props, i) => (jsx("div", { className: cn(i > 0 && 'tw-border-t tw-border-t-material-light-thin'), children: jsx(TransactionAction, Object.assign({}, props)) }, i))) }), jsxs(CollapsingSection, { collapsed: feesCollapsed, setCollapsed: setFeesCollapsed, children: [jsx(FeesTotal, Object.assign({ collapsed: feesCollapsed, showTimeline: true }, fees)), jsx(FeesLines, Object.assign({}, fees))] })] })));
|
|
49077
49076
|
}
|
|
49078
49077
|
function CollapsingSection({ children, collapsed, setCollapsed, collapsedHeight = 50, }) {
|
|
49079
|
-
return (jsx("div", { className: cn('tw-relative', collapsed ? 'tw-cursor-pointer' : ''), onClick: () => {
|
|
49078
|
+
return (jsx("div", { className: cn('tw-group/collapsing-section tw-relative tw-bg-grey-900', collapsed ? 'tw-cursor-pointer' : ''), onClick: () => {
|
|
49080
49079
|
if (collapsed)
|
|
49081
49080
|
setCollapsed(false);
|
|
49082
49081
|
}, children: jsxs("div", { className: cn('tw-relative tw-border-material-light-thin tw-transition-[border-width] tw-duration-200', !collapsed && 'tw-border-y-[4px]'), children: [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: () => {
|
|
49083
49082
|
if (!collapsed)
|
|
49084
49083
|
setCollapsed(true);
|
|
49085
|
-
}, children: jsx(ChevronLargeDownIcon, { className: cn('tw-origin-center tw-text-grey-300 tw-transition-transform tw-duration-200', collapsed && '-tw-rotate-90') }) }), jsx(
|
|
49084
|
+
}, children: jsx(ChevronLargeDownIcon, { className: cn('tw-origin-center tw-text-grey-300 tw-transition-transform tw-duration-200', collapsed && '-tw-rotate-90') }) }), jsx("div", {
|
|
49085
|
+
// hover highlight
|
|
49086
|
+
className: "tw-pointer-events-none tw-absolute tw-left-0 tw-top-0 tw-h-[50px] tw-w-full", children: 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') }) }), jsx(Collapse, { collapsed: collapsed, collapsedHeight: collapsedHeight, children: children })] }) }));
|
|
49086
49087
|
}
|
|
49087
49088
|
|
|
49088
49089
|
function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, }) {
|
|
@@ -49301,4 +49302,4 @@ function SquidConfigProvider({ theme = lightTheme, children, themeType = 'light'
|
|
|
49301
49302
|
return (jsx("div", { style: Object.assign(Object.assign({}, parsedStyle), { justifyContent: 'center', alignItems: 'center', display: 'flex' }), "data-squid-theme-type": themeType, className: "mobile-lg:tw-h-auto tw-group tw-relative tw-h-screen tw-font-geist", children: children }));
|
|
49302
49303
|
}
|
|
49303
49304
|
|
|
49304
|
-
export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, ApproveAction, ArrowButton, AssetsButton, AssetsView, BadgeImage, BodyText, Boost, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CaptionText, Chip, Collapse, DescriptionBlocks, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, ExploreLayout, FeeButton, FeesAction, FeesLines, FeesTotal, FilterButton, HashLink, HeadingText, HistoryItem, IconLabel, ImageIcon, IncompleteAction, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, List, ListItem, LoadingProvider, LoadingSkeleton, MainView, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, ReceiveNFTAction, ReceiveTokensAction, RecipientView, STEP_ITEM_HEIGHT, SectionTitle, SendTokensAction, SettingsButton, SettingsItem, SettingsSlider, SizeTransition, SquidConfigProvider, StakeAction, StartAction, SuccessAction, SwapAction, SwapConfiguration, SwapDetailsView, SwapHeader, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepsCollapsed, SwapTransactionView, Switch, Timestamp, TokenPair, Tooltip, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, UsdAmount, WalletLink, WalletsView, WrapAction, linkActionTimelineProps, statusBgClassMap$1 as statusBgClassMap, statusColorClassMap, statusTextClassMap, useDropdownMenu };
|
|
49305
|
+
export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, ApproveAction, ArrowButton, AssetsButton, AssetsView, BadgeImage, BodyText, Boost, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CaptionText, Chip, Collapse, DescriptionBlocks, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, ExploreLayout, ExploreNav, FeeButton, FeesAction, FeesLines, FeesTotal, FilterButton, HashLink, HeadingText, HistoryItem, IconLabel, ImageIcon, IncompleteAction, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, List, ListItem, LoadingProvider, LoadingSkeleton, MainView, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, ReceiveNFTAction, ReceiveTokensAction, RecipientView, STEP_ITEM_HEIGHT, SectionTitle, SendTokensAction, SettingsButton, SettingsItem, SettingsSlider, SizeTransition, SquidConfigProvider, StakeAction, StartAction, SuccessAction, SwapAction, SwapConfiguration, SwapDetailsView, SwapHeader, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepsCollapsed, SwapTransactionView, Switch, Timestamp, TokenPair, Tooltip, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, UsdAmount, WalletLink, WalletsView, WrapAction, linkActionTimelineProps, statusBgClassMap$1 as statusBgClassMap, statusColorClassMap, statusTextClassMap, useDropdownMenu };
|
|
@@ -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;
|