@0xsquid/ui 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +18495 -841
- package/dist/cjs/types/components/badges/Drip.d.ts +13 -0
- package/dist/cjs/types/components/badges/index.d.ts +1 -0
- package/dist/cjs/types/components/buttons/index.d.ts +0 -1
- package/dist/cjs/types/components/feedback/LoadingSkeleton.d.ts +2 -1
- package/dist/cjs/types/components/icons/Arrow.d.ts +3 -0
- package/dist/cjs/types/components/icons/Generic.d.ts +4 -0
- package/dist/cjs/types/components/icons/ThumbsUp.d.ts +2 -1
- package/dist/cjs/types/components/layout/AnimationWrapper.d.ts +7 -3
- package/dist/cjs/types/components/layout/Card.d.ts +8 -0
- package/dist/cjs/types/components/layout/Collapse.d.ts +3 -1
- package/dist/cjs/types/components/layout/TokenDetailsView.d.ts +1 -0
- package/dist/cjs/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +10 -6
- package/dist/cjs/types/components/layout/TransactionProperties/TransactionProperties.d.ts +4 -8
- package/dist/cjs/types/components/layout/index.d.ts +1 -11
- package/dist/cjs/types/components/lists/TokenGroup.d.ts +2 -2
- package/dist/cjs/types/components/lists/TransactionAction/FeesAction.d.ts +2 -2
- package/dist/cjs/types/components/lists/TransactionItem.d.ts +35 -20
- package/dist/cjs/types/components/lists/TransactionItemSkeleton.d.ts +1 -0
- package/dist/cjs/types/components/lists/index.d.ts +1 -0
- package/dist/cjs/types/components/views/TransactionNotFoundView.d.ts +1 -0
- package/dist/cjs/types/components/views/TransactionView/BaseTransactionViewProps.d.ts +23 -3
- package/dist/cjs/types/components/views/TransactionView/BridgeTransactionView.d.ts +10 -3
- package/dist/cjs/types/components/views/TransactionView/BuyNFTTransactionView.d.ts +9 -11
- package/dist/cjs/types/components/views/TransactionView/InteractionTransactionView.d.ts +10 -5
- package/dist/cjs/types/components/views/TransactionView/SwapTransactionView.d.ts +8 -3
- package/dist/cjs/types/components/views/TransactionView/TransactionView.d.ts +11 -6
- package/dist/cjs/types/components/views/index.d.ts +1 -0
- package/dist/cjs/types/core/utils.d.ts +1 -0
- package/dist/cjs/types/stories/badges/Drip.stories.d.ts +7 -0
- package/dist/cjs/types/stories/data/actions.d.ts +5 -0
- package/dist/cjs/types/stories/data/network.d.ts +2 -0
- package/dist/cjs/types/stories/layout/Card.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/TokenDetailsView.stories.d.ts +1 -0
- package/dist/cjs/types/stories/lists/TokenGroup.stories.d.ts +2 -0
- package/dist/cjs/types/stories/lists/TransactionItem.stories.d.ts +182 -12
- package/dist/cjs/types/stories/lists/TransactionItemSkeleton.stories.d.ts +6 -0
- package/dist/cjs/types/stories/views/TransactionNotFoundView.stories.d.ts +6 -0
- package/dist/cjs/types/stories/views/TransactionView.stories.d.ts +634 -7
- package/dist/cjs/types/types/components.d.ts +1 -0
- package/dist/esm/index.js +18240 -581
- package/dist/esm/types/components/badges/Drip.d.ts +13 -0
- package/dist/esm/types/components/badges/index.d.ts +1 -0
- package/dist/esm/types/components/buttons/index.d.ts +0 -1
- package/dist/esm/types/components/feedback/LoadingSkeleton.d.ts +2 -1
- package/dist/esm/types/components/icons/Arrow.d.ts +3 -0
- package/dist/esm/types/components/icons/Generic.d.ts +4 -0
- package/dist/esm/types/components/icons/ThumbsUp.d.ts +2 -1
- package/dist/esm/types/components/layout/AnimationWrapper.d.ts +7 -3
- package/dist/esm/types/components/layout/Card.d.ts +8 -0
- package/dist/esm/types/components/layout/Collapse.d.ts +3 -1
- package/dist/esm/types/components/layout/TokenDetailsView.d.ts +1 -0
- package/dist/esm/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +10 -6
- package/dist/esm/types/components/layout/TransactionProperties/TransactionProperties.d.ts +4 -8
- package/dist/esm/types/components/layout/index.d.ts +1 -11
- package/dist/esm/types/components/lists/TokenGroup.d.ts +2 -2
- package/dist/esm/types/components/lists/TransactionAction/FeesAction.d.ts +2 -2
- package/dist/esm/types/components/lists/TransactionItem.d.ts +35 -20
- package/dist/esm/types/components/lists/TransactionItemSkeleton.d.ts +1 -0
- package/dist/esm/types/components/lists/index.d.ts +1 -0
- package/dist/esm/types/components/views/TransactionNotFoundView.d.ts +1 -0
- package/dist/esm/types/components/views/TransactionView/BaseTransactionViewProps.d.ts +23 -3
- package/dist/esm/types/components/views/TransactionView/BridgeTransactionView.d.ts +10 -3
- package/dist/esm/types/components/views/TransactionView/BuyNFTTransactionView.d.ts +9 -11
- package/dist/esm/types/components/views/TransactionView/InteractionTransactionView.d.ts +10 -5
- package/dist/esm/types/components/views/TransactionView/SwapTransactionView.d.ts +8 -3
- package/dist/esm/types/components/views/TransactionView/TransactionView.d.ts +11 -6
- package/dist/esm/types/components/views/index.d.ts +1 -0
- package/dist/esm/types/core/utils.d.ts +1 -0
- package/dist/esm/types/stories/badges/Drip.stories.d.ts +7 -0
- package/dist/esm/types/stories/data/actions.d.ts +5 -0
- package/dist/esm/types/stories/data/network.d.ts +2 -0
- package/dist/esm/types/stories/layout/Card.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/TokenDetailsView.stories.d.ts +1 -0
- package/dist/esm/types/stories/lists/TokenGroup.stories.d.ts +2 -0
- package/dist/esm/types/stories/lists/TransactionItem.stories.d.ts +182 -12
- package/dist/esm/types/stories/lists/TransactionItemSkeleton.stories.d.ts +6 -0
- package/dist/esm/types/stories/views/TransactionNotFoundView.stories.d.ts +6 -0
- package/dist/esm/types/stories/views/TransactionView.stories.d.ts +634 -7
- package/dist/esm/types/types/components.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +153 -241
- package/package.json +3 -3
- package/dist/cjs/types/components/layout/TransactionHeader/BridgeHeader.d.ts +0 -11
- package/dist/cjs/types/components/layout/TransactionHeader/BuyNFTHeader.d.ts +0 -10
- package/dist/cjs/types/components/layout/TransactionHeader/InteractionHeader.d.ts +0 -11
- package/dist/cjs/types/components/layout/TransactionHeader/ProfileHeader.d.ts +0 -11
- package/dist/cjs/types/components/layout/TransactionHeader/SwapHeader.d.ts +0 -16
- package/dist/cjs/types/components/layout/TransactionHeader/TransactionHeader.d.ts +0 -23
- package/dist/cjs/types/components/layout/TransactionHeader/index.d.ts +0 -1
- package/dist/cjs/types/components/layout/TransactionProperties/BridgeProperties.d.ts +0 -21
- package/dist/cjs/types/components/layout/TransactionProperties/BuyNFTProperties.d.ts +0 -33
- package/dist/cjs/types/components/layout/TransactionProperties/InteractionProperties.d.ts +0 -11
- package/dist/cjs/types/components/layout/TransactionProperties/SwapProperties.d.ts +0 -28
- package/dist/cjs/types/components/layout/TransactionProperties/index.d.ts +0 -6
- package/dist/cjs/types/stories/layout/TransactionHeader.stories.d.ts +0 -10
- package/dist/cjs/types/stories/layout/TransactionProperties.stories.d.ts +0 -9
- package/dist/esm/types/components/layout/TransactionHeader/BridgeHeader.d.ts +0 -11
- package/dist/esm/types/components/layout/TransactionHeader/BuyNFTHeader.d.ts +0 -10
- package/dist/esm/types/components/layout/TransactionHeader/InteractionHeader.d.ts +0 -11
- package/dist/esm/types/components/layout/TransactionHeader/ProfileHeader.d.ts +0 -11
- package/dist/esm/types/components/layout/TransactionHeader/SwapHeader.d.ts +0 -16
- package/dist/esm/types/components/layout/TransactionHeader/TransactionHeader.d.ts +0 -23
- package/dist/esm/types/components/layout/TransactionHeader/index.d.ts +0 -1
- package/dist/esm/types/components/layout/TransactionProperties/BridgeProperties.d.ts +0 -21
- package/dist/esm/types/components/layout/TransactionProperties/BuyNFTProperties.d.ts +0 -33
- package/dist/esm/types/components/layout/TransactionProperties/InteractionProperties.d.ts +0 -11
- package/dist/esm/types/components/layout/TransactionProperties/SwapProperties.d.ts +0 -28
- package/dist/esm/types/components/layout/TransactionProperties/index.d.ts +0 -6
- package/dist/esm/types/stories/layout/TransactionHeader.stories.d.ts +0 -10
- package/dist/esm/types/stories/layout/TransactionProperties.stories.d.ts +0 -9
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface DripProps {
|
|
2
|
+
direction?: "horizontal" | "vertical";
|
|
3
|
+
to: {
|
|
4
|
+
logoURI: string;
|
|
5
|
+
bgColor: string;
|
|
6
|
+
};
|
|
7
|
+
from: {
|
|
8
|
+
logoURI: string;
|
|
9
|
+
bgColor: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const Drip: ({ direction, from, to }: DripProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -11,8 +11,9 @@ export declare function LoadingSkeleton({ className, height, isLoading: isLoadin
|
|
|
11
11
|
interface LoadingTextProps extends ComponentProps<"span"> {
|
|
12
12
|
width?: string | [string, string];
|
|
13
13
|
isLoading?: boolean;
|
|
14
|
+
showGradient?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function TextSkeleton({ className, width, children, isLoading, ...props }: LoadingTextProps): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
16
|
+
export declare function TextSkeleton({ className, width, children, isLoading, showGradient, ...props }: LoadingTextProps): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
16
17
|
interface LoadingBlockProps extends ComponentProps<"div"> {
|
|
17
18
|
isLoading?: boolean;
|
|
18
19
|
}
|
|
@@ -40,6 +40,9 @@ export declare function ArrowLeftIcon({ className, size, }: {
|
|
|
40
40
|
size?: string;
|
|
41
41
|
}): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
export declare function ArrowRightUpCircleIcon(): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function ArrowRightUpCircleFilledIcon({ className, }: {
|
|
44
|
+
className?: string;
|
|
45
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
46
|
export declare function ArrowRightDownCircleIcon(): import("react/jsx-runtime").JSX.Element;
|
|
44
47
|
export declare function ArrowOutOfBoxIcon(): import("react/jsx-runtime").JSX.Element;
|
|
45
48
|
export declare function ChevronGrabberVerticalIcon({ size, className, }: {
|
|
@@ -2,6 +2,10 @@ export declare function GhostIcon({ size, className, }: {
|
|
|
2
2
|
size?: string;
|
|
3
3
|
className?: string;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function GhostCircleIcon({ size, className, }: {
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
export declare function SettingsSliderIcon({ size, className, }: {
|
|
6
10
|
size?: string;
|
|
7
11
|
className?: string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
interface Props extends
|
|
2
|
+
import { type LottieComponentProps } from "lottie-react";
|
|
3
|
+
interface Props extends Omit<LottieComponentProps, "src"> {
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
autoplay?: boolean;
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
src: unknown;
|
|
4
8
|
}
|
|
5
|
-
export declare const AnimationWrapper: (playerProps: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AnimationWrapper: ({ src, ...playerProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
export declare function AnimationCard({ children }: {
|
|
7
11
|
children?: React.ReactNode;
|
|
8
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface CardProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
variant: "transparent";
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Card: ({ variant, className, children, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -8,5 +8,7 @@ interface CollapseProps extends ComponentProps<"div"> {
|
|
|
8
8
|
export declare function Collapse({ collapsed, collapsedHeight, children, className, duration, contentsClassName, ...props }: CollapseProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
interface SizeTransitionProps extends ComponentProps<"div"> {
|
|
10
10
|
}
|
|
11
|
-
export declare function SizeTransition({ children, className, ...props }: SizeTransitionProps
|
|
11
|
+
export declare function SizeTransition({ children, className, disableInitialAnimation, ...props }: SizeTransitionProps & {
|
|
12
|
+
disableInitialAnimation?: boolean;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { ActionStatus } from "../../../types/components";
|
|
3
|
-
interface
|
|
4
|
-
isLoading?: boolean;
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ActionStatus } from "../../../types/components";
|
|
3
|
+
interface BaseTransactionHeaderLayoutProps {
|
|
5
4
|
status?: ActionStatus;
|
|
6
5
|
title?: string;
|
|
7
|
-
|
|
6
|
+
media?: ReactNode;
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
}
|
|
10
|
-
|
|
9
|
+
type TransactionHeaderLayoutProps = (BaseTransactionHeaderLayoutProps & {
|
|
10
|
+
isLoading: true;
|
|
11
|
+
}) | (Required<BaseTransactionHeaderLayoutProps> & {
|
|
12
|
+
isLoading?: false;
|
|
13
|
+
});
|
|
14
|
+
export declare function TransactionHeaderLayout({ isLoading, status, title, media, children, }: TransactionHeaderLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import BridgeProperties from "./BridgeProperties";
|
|
3
|
-
import { BuyNFTProperties } from "./BuyNFTProperties";
|
|
4
|
-
import { InteractionProperties } from "./InteractionProperties";
|
|
5
|
-
import { SwapProperties } from "./SwapProperties";
|
|
6
2
|
declare const propertiesComponentsMap: {
|
|
7
|
-
readonly swap:
|
|
8
|
-
readonly buy_nft:
|
|
9
|
-
readonly interaction:
|
|
10
|
-
readonly bridge:
|
|
3
|
+
readonly swap: any;
|
|
4
|
+
readonly buy_nft: any;
|
|
5
|
+
readonly interaction: any;
|
|
6
|
+
readonly bridge: any;
|
|
11
7
|
};
|
|
12
8
|
type TransactionPropertiesComponents = typeof propertiesComponentsMap;
|
|
13
9
|
export type TransactionPropertiesType = keyof TransactionPropertiesComponents;
|
|
@@ -2,6 +2,7 @@ export * from "./AnimationWrapper";
|
|
|
2
2
|
export * from "./Announcement";
|
|
3
3
|
export * from "./AppContainer";
|
|
4
4
|
export * from "./Breadcrumb";
|
|
5
|
+
export * from "./Card";
|
|
5
6
|
export * from "./Collapse";
|
|
6
7
|
export * from "./CollapsibleMenu";
|
|
7
8
|
export * from "./DescriptionBlocks";
|
|
@@ -27,19 +28,8 @@ export * from "./Toast";
|
|
|
27
28
|
export * from "./TokenDetailsView";
|
|
28
29
|
export * from "./TokenPair";
|
|
29
30
|
export * from "./TransactionFilters";
|
|
30
|
-
export * from "./TransactionHeader/BridgeHeader";
|
|
31
|
-
export * from "./TransactionHeader/BuyNFTHeader";
|
|
32
|
-
export * from "./TransactionHeader/InteractionHeader";
|
|
33
|
-
export * from "./TransactionHeader/ProfileHeader";
|
|
34
|
-
export * from "./TransactionHeader/SwapHeader";
|
|
35
|
-
export * from "./TransactionHeader/TransactionHeader";
|
|
36
31
|
export * from "./TransactionHeader/TransactionHeaderLayout";
|
|
37
|
-
export * from "./TransactionProperties/BridgeProperties";
|
|
38
|
-
export * from "./TransactionProperties/BuyNFTProperties";
|
|
39
|
-
export * from "./TransactionProperties/InteractionProperties";
|
|
40
32
|
export * from "./TransactionProperties/PropertiesLayout";
|
|
41
|
-
export * from "./TransactionProperties/SwapProperties";
|
|
42
|
-
export * from "./TransactionProperties/TransactionProperties";
|
|
43
33
|
export * from "./TransactionSearch";
|
|
44
34
|
export * from "./Transfer";
|
|
45
35
|
export * from "./TxProgressViewHeader";
|
|
@@ -3,6 +3,7 @@ export type TokenGroupVariant = "compact" | "large" | "small";
|
|
|
3
3
|
export interface TokenGroupProps<T> {
|
|
4
4
|
isSelected?: boolean;
|
|
5
5
|
imageUrl: string;
|
|
6
|
+
fallbackImageUrl?: string;
|
|
6
7
|
symbol: string;
|
|
7
8
|
name: string;
|
|
8
9
|
chainImageUrl: string;
|
|
@@ -12,11 +13,10 @@ export interface TokenGroupProps<T> {
|
|
|
12
13
|
tokenItems?: T[];
|
|
13
14
|
extraSpacing?: boolean;
|
|
14
15
|
onClick?: (event: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
15
|
-
maxPreviewItems?: number;
|
|
16
16
|
variant?: TokenGroupVariant;
|
|
17
17
|
className?: string;
|
|
18
18
|
onChildClick?: (tokenProps: T) => void;
|
|
19
19
|
isAdjacentToPreviousExpanded?: boolean;
|
|
20
20
|
isAdjacentToNextExpanded?: boolean;
|
|
21
21
|
}
|
|
22
|
-
export declare function TokenGroup<T extends TokenGroupProps<T>>({ isSelected, tokenItems, priceChange, balance, balanceUsd, extraSpacing, chainImageUrl, imageUrl, symbol, name, onClick, variant, className, onChildClick, isAdjacentToPreviousExpanded, isAdjacentToNextExpanded, }: TokenGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function TokenGroup<T extends TokenGroupProps<T>>({ isSelected, tokenItems, priceChange, balance, balanceUsd, extraSpacing, chainImageUrl, imageUrl, fallbackImageUrl, symbol, name, onClick, variant, className, onChildClick, isAdjacentToPreviousExpanded, isAdjacentToNextExpanded, }: TokenGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionStatus } from "../../../types/components";
|
|
2
|
-
import { BaseActionProps } from "./BaseActionProps";
|
|
1
|
+
import { type ActionStatus } from "../../../types/components";
|
|
2
|
+
import { type BaseActionProps } from "./BaseActionProps";
|
|
3
3
|
export interface FeesActionProps extends BaseActionProps {
|
|
4
4
|
total: FeesRowProps;
|
|
5
5
|
lines?: FeesRowProps[];
|
|
@@ -1,29 +1,44 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type ActionStatus } from "../../types";
|
|
2
|
+
import { type TransactionType } from "../../types/components";
|
|
3
|
+
interface Token {
|
|
4
|
+
symbol: string;
|
|
5
|
+
bgColor: string;
|
|
6
|
+
logoURI: string;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type
|
|
14
|
-
hash
|
|
15
|
-
|
|
8
|
+
interface NFT {
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
}
|
|
11
|
+
interface BaseTransactionItemProps {
|
|
12
|
+
status: ActionStatus;
|
|
13
|
+
type: TransactionType;
|
|
14
|
+
hash: string;
|
|
15
|
+
toToken: Token;
|
|
16
|
+
fromToken: Token;
|
|
17
|
+
fromChain: {
|
|
16
18
|
logoURI: string;
|
|
17
19
|
name: string;
|
|
18
20
|
};
|
|
19
|
-
toChain
|
|
21
|
+
toChain: {
|
|
20
22
|
logoURI: string;
|
|
21
23
|
name: string;
|
|
22
24
|
};
|
|
23
|
-
fromAmount
|
|
24
|
-
toAmount
|
|
25
|
-
timestamp
|
|
26
|
-
|
|
25
|
+
fromAmount: string;
|
|
26
|
+
toAmount: string;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
}
|
|
29
|
+
interface SwapTransactionProps extends BaseTransactionItemProps {
|
|
30
|
+
type: "swap";
|
|
31
|
+
}
|
|
32
|
+
interface BuyNFTTransactionProps extends Omit<BaseTransactionItemProps, "toToken"> {
|
|
33
|
+
type: "buy_nft";
|
|
34
|
+
toToken: {
|
|
35
|
+
symbol: string;
|
|
36
|
+
};
|
|
37
|
+
nft: NFT;
|
|
38
|
+
}
|
|
39
|
+
interface BridgeTransactionProps extends BaseTransactionItemProps {
|
|
40
|
+
type: "bridge";
|
|
27
41
|
}
|
|
28
|
-
export
|
|
42
|
+
export type TransactionItemProps = SwapTransactionProps | BuyNFTTransactionProps | BridgeTransactionProps;
|
|
43
|
+
export declare const TransactionItem: (props: TransactionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
44
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TransactionItemSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TransactionNotFoundView: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
import { ActionStatus } from "../../../types/components";
|
|
2
|
-
import { FeesActionProps, TransactionActionProps } from "../../lists/TransactionAction";
|
|
1
|
+
import { type ActionStatus } from "../../../types/components";
|
|
2
|
+
import { type FeesActionProps, type TransactionActionProps } from "../../lists/TransactionAction";
|
|
3
|
+
export interface Token {
|
|
4
|
+
symbol: string;
|
|
5
|
+
bgColor: string;
|
|
6
|
+
logoURI: string;
|
|
7
|
+
}
|
|
8
|
+
export interface NFT {
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
name: string;
|
|
11
|
+
imageURI: string;
|
|
12
|
+
collection: {
|
|
13
|
+
name: string;
|
|
14
|
+
imageURI: string;
|
|
15
|
+
};
|
|
16
|
+
tokenID: string;
|
|
17
|
+
nftType: string;
|
|
18
|
+
}
|
|
19
|
+
export interface Collection {
|
|
20
|
+
image: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
3
23
|
export interface BaseTransactionViewProps {
|
|
4
24
|
title?: string;
|
|
5
25
|
hash: string;
|
|
6
26
|
status: ActionStatus;
|
|
7
27
|
url?: string;
|
|
8
|
-
actions
|
|
28
|
+
actions?: TransactionActionProps[];
|
|
9
29
|
fees: FeesActionProps;
|
|
10
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
2
|
-
interface
|
|
1
|
+
import { type BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
2
|
+
interface BaseBridgeTransactionViewProps extends BaseTransactionViewProps {
|
|
3
3
|
amount: string;
|
|
4
4
|
token: {
|
|
5
5
|
logoURI: string;
|
|
@@ -9,14 +9,21 @@ interface BridgeTransactionViewProps extends BaseTransactionViewProps {
|
|
|
9
9
|
fromChain: {
|
|
10
10
|
logoURI: string;
|
|
11
11
|
name: string;
|
|
12
|
+
bgColor: string;
|
|
12
13
|
};
|
|
13
14
|
toChain: {
|
|
14
15
|
logoURI: string;
|
|
15
16
|
name: string;
|
|
17
|
+
bgColor: string;
|
|
16
18
|
};
|
|
17
19
|
address: string;
|
|
18
20
|
boosted?: boolean;
|
|
19
21
|
timeToComplete: string;
|
|
20
22
|
}
|
|
21
|
-
|
|
23
|
+
type BridgeTransactionViewProps = (BaseBridgeTransactionViewProps & {
|
|
24
|
+
isLoading?: false;
|
|
25
|
+
}) | (Partial<BaseBridgeTransactionViewProps> & BaseTransactionViewProps & {
|
|
26
|
+
isLoading: true;
|
|
27
|
+
});
|
|
28
|
+
export declare function BridgeTransactionView({ title, hash, status, url, amount, token, fromChain, toChain, address, actions, fees, boosted, timeToComplete, isLoading, }: BridgeTransactionViewProps): import("react/jsx-runtime").JSX.Element;
|
|
22
29
|
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
2
|
-
interface
|
|
3
|
-
title: string;
|
|
4
|
-
imageURI: string;
|
|
5
|
-
collection: {
|
|
6
|
-
imageURI: string;
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
1
|
+
import { type BaseTransactionViewProps, type NFT } from "./BaseTransactionViewProps";
|
|
2
|
+
interface BaseBuyNFTTransactionViewProps extends BaseTransactionViewProps {
|
|
9
3
|
price: string;
|
|
10
4
|
token: {
|
|
11
5
|
logoURI: string;
|
|
@@ -26,9 +20,13 @@ interface BuyNFTTTransactionViewProps extends BaseTransactionViewProps {
|
|
|
26
20
|
fromAddress: string;
|
|
27
21
|
toAddress: string;
|
|
28
22
|
boosted?: boolean;
|
|
29
|
-
|
|
30
|
-
nftType: string;
|
|
23
|
+
nft: NFT;
|
|
31
24
|
timeToComplete: string;
|
|
32
25
|
}
|
|
33
|
-
|
|
26
|
+
type BuyNFTTransactionViewProps = (BaseBuyNFTTransactionViewProps & {
|
|
27
|
+
isLoading?: false;
|
|
28
|
+
}) | (Partial<BaseBuyNFTTransactionViewProps> & {
|
|
29
|
+
isLoading: true;
|
|
30
|
+
});
|
|
31
|
+
export declare function BuyNFTTransactionView({ title, hash, status, url, price, token, marketplace, fromChain, toChain, fromAddress, toAddress, boosted, timeToComplete, nft, actions, fees, isLoading, }: BuyNFTTransactionViewProps): import("react/jsx-runtime").JSX.Element;
|
|
34
32
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
3
|
-
interface
|
|
4
|
-
image
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
3
|
+
interface BaseInteractionTransactionViewProps extends BaseTransactionViewProps {
|
|
4
|
+
image: ReactNode;
|
|
5
5
|
chain: {
|
|
6
6
|
logoURI: string;
|
|
7
7
|
name: string;
|
|
@@ -10,5 +10,10 @@ interface InteractionTTransactionViewProps extends BaseTransactionViewProps {
|
|
|
10
10
|
boosted?: boolean;
|
|
11
11
|
timeToComplete: string;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
type InteractionTransactionViewProps = (BaseInteractionTransactionViewProps & {
|
|
14
|
+
isLoading?: false;
|
|
15
|
+
}) | (Partial<BaseInteractionTransactionViewProps> & BaseTransactionViewProps & {
|
|
16
|
+
isLoading: true;
|
|
17
|
+
});
|
|
18
|
+
export declare function InteractionTransactionView({ title, hash, status, url, chain, address, boosted, timeToComplete, actions, fees, isLoading, }: InteractionTransactionViewProps): import("react/jsx-runtime").JSX.Element;
|
|
14
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
2
|
-
interface
|
|
1
|
+
import type { BaseTransactionViewProps } from "./BaseTransactionViewProps";
|
|
2
|
+
interface BaseSwapTransactionViewProps extends BaseTransactionViewProps {
|
|
3
3
|
fromAmount: string;
|
|
4
4
|
fromToken: {
|
|
5
5
|
logoURI: string;
|
|
@@ -26,5 +26,10 @@ interface SwapTransactionViewProps extends BaseTransactionViewProps {
|
|
|
26
26
|
boosted?: boolean;
|
|
27
27
|
timeToComplete: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type SwapTransactionViewProps = (BaseSwapTransactionViewProps & {
|
|
30
|
+
isLoading?: false;
|
|
31
|
+
}) | (Partial<Omit<BaseSwapTransactionViewProps, keyof BaseTransactionViewProps>> & BaseTransactionViewProps & {
|
|
32
|
+
isLoading: true;
|
|
33
|
+
});
|
|
34
|
+
export declare function SwapTransactionView({ title, hash, status, url, fromAmount, fromToken, toAmount, toToken, fromChain, toChain, fromAddress, toAddress, exchangeRate, boosted, timeToComplete, actions, fees, isLoading, }: SwapTransactionViewProps): import("react/jsx-runtime").JSX.Element;
|
|
30
35
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { type TransactionType } from "../../../types/components";
|
|
2
3
|
import { BridgeTransactionView } from "./BridgeTransactionView";
|
|
3
4
|
import { BuyNFTTransactionView } from "./BuyNFTTransactionView";
|
|
4
5
|
import { InteractionTransactionView } from "./InteractionTransactionView";
|
|
@@ -10,12 +11,16 @@ declare const componentMap: {
|
|
|
10
11
|
readonly bridge: typeof BridgeTransactionView;
|
|
11
12
|
};
|
|
12
13
|
type TransactionViewComponents = typeof componentMap;
|
|
13
|
-
export type TransactionViewType = keyof TransactionViewComponents;
|
|
14
14
|
export type TransactionViewProps = {
|
|
15
|
-
[Type in
|
|
15
|
+
[Type in TransactionType]: {
|
|
16
16
|
type: Type;
|
|
17
|
-
|
|
17
|
+
isLoading?: false;
|
|
18
|
+
data: ComponentProps<TransactionViewComponents[Type]>;
|
|
19
|
+
} | {
|
|
20
|
+
type: Type;
|
|
21
|
+
isLoading: true;
|
|
22
|
+
data?: Partial<ComponentProps<TransactionViewComponents[Type]>>;
|
|
18
23
|
};
|
|
19
|
-
}[
|
|
20
|
-
export declare function TransactionView({ type,
|
|
24
|
+
}[TransactionType];
|
|
25
|
+
export declare function TransactionView({ type, isLoading, data, }: TransactionViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
26
|
export {};
|
|
@@ -88,4 +88,5 @@ export declare function hashStringToIndex(str: string, max: number): number;
|
|
|
88
88
|
export declare function formatCSSValue(value: string | number): string;
|
|
89
89
|
export declare const remToPx: (rem: string | number, baseFontSize?: number) => number;
|
|
90
90
|
export declare const pxToRem: (px: string | number, baseFontSize?: number) => number;
|
|
91
|
+
export declare const formatHash: (hash: string) => string;
|
|
91
92
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
|
+
import { Drip } from "../../components/badges/Drip";
|
|
3
|
+
declare const meta: Meta<typeof Drip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Vertical: Story;
|
|
7
|
+
export declare const Horizontal: Story;
|
|
@@ -21,6 +21,7 @@ export declare const transactionActions: {
|
|
|
21
21
|
chain: {
|
|
22
22
|
logoURI: string;
|
|
23
23
|
name: string;
|
|
24
|
+
bgColor: string;
|
|
24
25
|
};
|
|
25
26
|
wallet: {
|
|
26
27
|
imageURI: string;
|
|
@@ -43,6 +44,7 @@ export declare const transactionActions: {
|
|
|
43
44
|
chain: {
|
|
44
45
|
logoURI: string;
|
|
45
46
|
name: string;
|
|
47
|
+
bgColor: string;
|
|
46
48
|
};
|
|
47
49
|
wallet: {
|
|
48
50
|
imageURI: string;
|
|
@@ -65,6 +67,7 @@ export declare const transactionActions: {
|
|
|
65
67
|
chain: {
|
|
66
68
|
logoURI: string;
|
|
67
69
|
name: string;
|
|
70
|
+
bgColor: string;
|
|
68
71
|
};
|
|
69
72
|
wallet: {
|
|
70
73
|
imageURI: string;
|
|
@@ -89,6 +92,7 @@ export declare const transactionActions: {
|
|
|
89
92
|
chain: {
|
|
90
93
|
logoURI: string;
|
|
91
94
|
name: string;
|
|
95
|
+
bgColor: string;
|
|
92
96
|
};
|
|
93
97
|
wallet: {
|
|
94
98
|
imageURI: string;
|
|
@@ -158,6 +162,7 @@ export declare const transactionActions: {
|
|
|
158
162
|
chain: {
|
|
159
163
|
logoURI: string;
|
|
160
164
|
name: string;
|
|
165
|
+
bgColor: string;
|
|
161
166
|
};
|
|
162
167
|
provider: {
|
|
163
168
|
logoURI: string;
|
|
@@ -16,3 +16,5 @@ export declare const LargeVariantLongTokenName: Story;
|
|
|
16
16
|
export declare const CompactVariantWithItems: Story;
|
|
17
17
|
export declare const CompactVariantLongTokenName: Story;
|
|
18
18
|
export declare const MultipleCollapsibleGroups: Story;
|
|
19
|
+
export declare const FallbackImage: Story;
|
|
20
|
+
export declare const ItemsWithFallbackImage: Story;
|