@0xsquid/ui 0.18.1 → 0.18.3
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 +10979 -224
- package/dist/cjs/types/components/badges/LoadingSkeleton.d.ts +10 -1
- package/dist/cjs/types/components/controls/NumericInput.d.ts +2 -5
- package/dist/cjs/types/components/controls/Tooltip.d.ts +2 -1
- package/dist/cjs/types/components/layout/AppContainer.d.ts +529 -5
- package/dist/cjs/types/components/layout/Menu.d.ts +2 -1
- package/dist/cjs/types/components/{icons/Separator.d.ts → layout/PipeSeparator.d.ts} +0 -1
- package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +2 -1
- package/dist/cjs/types/components/layout/TokenPair.d.ts +2 -2
- package/dist/cjs/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +2 -2
- package/dist/cjs/types/components/layout/TransactionSearch.d.ts +3 -1
- package/dist/cjs/types/components/layout/index.d.ts +2 -1
- package/dist/cjs/types/components/layout/useOnClickOutside.d.ts +4 -0
- package/dist/cjs/types/components/lists/PropertyListItem.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionAction/ApproveAction.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionAction/BridgeAction.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionAction/StartAction.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionAction/WrapAction.d.ts +3 -3
- package/dist/cjs/types/components/lists/TransactionItem.d.ts +3 -2
- package/dist/cjs/types/components/views/SwapDetailsView.d.ts +2 -1
- package/dist/cjs/types/components/views/TransactionView/TransactionViewLayout.d.ts +6 -5
- package/dist/cjs/types/core/utils.d.ts +2 -0
- package/dist/cjs/types/hooks/useVersion.d.ts +1 -0
- package/dist/cjs/types/stores/container.d.ts +6 -0
- package/dist/cjs/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
- package/dist/esm/index.js +10977 -224
- package/dist/esm/types/components/badges/LoadingSkeleton.d.ts +10 -1
- package/dist/esm/types/components/controls/NumericInput.d.ts +2 -5
- package/dist/esm/types/components/controls/Tooltip.d.ts +2 -1
- package/dist/esm/types/components/layout/AppContainer.d.ts +529 -5
- package/dist/esm/types/components/layout/Menu.d.ts +2 -1
- package/dist/esm/types/components/{icons/Separator.d.ts → layout/PipeSeparator.d.ts} +0 -1
- package/dist/esm/types/components/layout/SwapConfiguration.d.ts +2 -1
- package/dist/esm/types/components/layout/TokenPair.d.ts +2 -2
- package/dist/esm/types/components/layout/TransactionHeader/TransactionHeaderLayout.d.ts +2 -2
- package/dist/esm/types/components/layout/TransactionSearch.d.ts +3 -1
- package/dist/esm/types/components/layout/index.d.ts +2 -1
- package/dist/esm/types/components/layout/useOnClickOutside.d.ts +4 -0
- package/dist/esm/types/components/lists/PropertyListItem.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionAction/ApproveAction.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionAction/BridgeAction.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionAction/StartAction.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionAction/WrapAction.d.ts +3 -3
- package/dist/esm/types/components/lists/TransactionItem.d.ts +3 -2
- package/dist/esm/types/components/views/SwapDetailsView.d.ts +2 -1
- package/dist/esm/types/components/views/TransactionView/TransactionViewLayout.d.ts +6 -5
- package/dist/esm/types/core/utils.d.ts +2 -0
- package/dist/esm/types/hooks/useVersion.d.ts +1 -0
- package/dist/esm/types/stores/container.d.ts +6 -0
- package/dist/esm/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +584 -40
- package/package.json +3 -2
- package/dist/cjs/types/components/layout/ExploreLayout.d.ts +0 -3
- package/dist/cjs/types/stories/layout/ExploreLayout.stories.d.ts +0 -6
- package/dist/esm/types/components/layout/ExploreLayout.d.ts +0 -3
- package/dist/esm/types/stories/layout/ExploreLayout.stories.d.ts +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TokenPairSize, TokenPairVariant } from '../../types/components';
|
|
2
2
|
interface TokenPairProps {
|
|
3
|
-
firstToken
|
|
3
|
+
firstToken?: {
|
|
4
4
|
logoURI: string;
|
|
5
5
|
bgColor: string;
|
|
6
6
|
};
|
|
7
|
-
secondToken
|
|
7
|
+
secondToken?: {
|
|
8
8
|
logoURI: string;
|
|
9
9
|
bgColor: string;
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ActionStatus } from '../../../types/components';
|
|
3
3
|
interface TransactionHeaderLayoutProps {
|
|
4
|
+
isLoading?: boolean;
|
|
4
5
|
status?: ActionStatus;
|
|
5
6
|
title?: string;
|
|
6
7
|
image?: ReactNode;
|
|
7
8
|
children?: ReactNode;
|
|
8
|
-
isLoading?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function TransactionHeaderLayout({ status, title, image, children,
|
|
10
|
+
export declare function TransactionHeaderLayout({ isLoading, status, title, image, children, }: TransactionHeaderLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -4,6 +4,8 @@ interface TransactionSearchProps {
|
|
|
4
4
|
setQuery: (query: string) => void;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
onFocus?: () => void;
|
|
8
|
+
onBlur?: () => void;
|
|
7
9
|
}
|
|
8
|
-
export declare function TransactionSearch({ query, setQuery, children, className, }: TransactionSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TransactionSearch({ query, setQuery, children, className, onFocus, onBlur, }: TransactionSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './AnimationWrapper';
|
|
2
|
+
export * from './AppContainer';
|
|
2
3
|
export * from './Boost';
|
|
3
4
|
export * from './Breadcrumb';
|
|
4
5
|
export * from './Collapse';
|
|
@@ -6,7 +7,6 @@ export * from './DescriptionBlocks';
|
|
|
6
7
|
export * from './DetailsToolbar';
|
|
7
8
|
export * from './DropdownMenu';
|
|
8
9
|
export * from './ErrorMessage';
|
|
9
|
-
export * from './ExploreLayout';
|
|
10
10
|
export * from './HashLink';
|
|
11
11
|
export * from './InfoBox';
|
|
12
12
|
export * from './Join';
|
|
@@ -14,6 +14,7 @@ export * from './Menu';
|
|
|
14
14
|
export * from './Modal';
|
|
15
15
|
export * from './ModalContent';
|
|
16
16
|
export * from './NavigationBar';
|
|
17
|
+
export * from './PipeSeparator';
|
|
17
18
|
export * from './ProductCard';
|
|
18
19
|
export * from './ProfileHeaderBackground';
|
|
19
20
|
export * from './SwapConfiguration';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { PropertyListItemSize } from '../../types/components';
|
|
3
3
|
export interface PropertyListItemProps extends ComponentProps<'li'> {
|
|
4
|
-
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
label?: React.ReactNode;
|
|
5
6
|
icon?: React.ReactNode;
|
|
6
7
|
detail?: React.ReactNode;
|
|
7
|
-
isLoading?: boolean;
|
|
8
8
|
variant?: PropertyListItemSize;
|
|
9
9
|
}
|
|
10
|
-
export declare function PropertyListItem({ label, detail, icon,
|
|
10
|
+
export declare function PropertyListItem({ isLoading, label, detail, icon, className, variant, ...props }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,9 +13,9 @@ interface ApproveActionProps extends BaseActionProps {
|
|
|
13
13
|
address: string;
|
|
14
14
|
url: string;
|
|
15
15
|
};
|
|
16
|
-
timestamp
|
|
17
|
-
hash
|
|
18
|
-
url
|
|
16
|
+
timestamp?: number;
|
|
17
|
+
hash?: string;
|
|
18
|
+
url?: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }: ApproveActionProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -12,9 +12,9 @@ interface BridgeActionProps 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 BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }: BridgeActionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseActionProps } from './BaseActionProps';
|
|
2
2
|
interface StartActionProps extends BaseActionProps {
|
|
3
|
-
timestamp
|
|
4
|
-
hash
|
|
5
|
-
url
|
|
3
|
+
timestamp?: number;
|
|
4
|
+
hash?: string;
|
|
5
|
+
url?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function StartAction({ status, nextStatus, showTimeline, showBody, timestamp, hash, url, }: StartActionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -12,9 +12,9 @@ interface WrapActionProps 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 WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }: WrapActionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ActionStatus } from '../../types/components';
|
|
3
3
|
interface TransactionItemProps {
|
|
4
|
+
className?: string;
|
|
4
5
|
isLoading?: boolean;
|
|
5
6
|
status?: ActionStatus;
|
|
6
7
|
image?: ReactNode;
|
|
@@ -19,7 +20,7 @@ interface TransactionItemProps {
|
|
|
19
20
|
};
|
|
20
21
|
fromAmount?: string;
|
|
21
22
|
toAmount?: string;
|
|
22
|
-
timestamp?:
|
|
23
|
+
timestamp?: number;
|
|
23
24
|
}
|
|
24
|
-
export declare function TransactionItem({ isLoading, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, }: TransactionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function TransactionItem({ className, isLoading, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, }: TransactionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { FeesActionProps, TransactionActionProps } from '../../lists/TransactionAction';
|
|
3
3
|
interface TransactionViewLayoutProps extends ComponentProps<'div'> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
properties?: ReactNode;
|
|
7
|
+
actions?: TransactionActionProps[];
|
|
8
|
+
fees?: FeesActionProps;
|
|
8
9
|
}
|
|
9
|
-
export declare function TransactionViewLayout({ header, properties, actions, fees, ...props }: TransactionViewLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TransactionViewLayout({ isLoading, header, properties, actions, fees, ...props }: TransactionViewLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -17,6 +17,7 @@ interface DebouncedFunction<F extends AnyFunction> {
|
|
|
17
17
|
export declare function debounce<F extends AnyFunction>(func: F, delay: number): DebouncedFunction<F>;
|
|
18
18
|
export declare const formatDuration: (elapsedTime: number) => string;
|
|
19
19
|
export declare const formatTime: (timestampSeconds: number) => string;
|
|
20
|
+
export declare const formatRelativeTime: (timestampSeconds: number) => string;
|
|
20
21
|
export declare const formatRelativeDate: (timestampSeconds: number) => string;
|
|
21
22
|
export declare function capitalize(text: string): string;
|
|
22
23
|
type Falsy = false | null | undefined | 0 | '';
|
|
@@ -24,4 +25,5 @@ export declare function truthy<T>(value: T): value is Exclude<T, Falsy>;
|
|
|
24
25
|
export declare function truncateHash(hash: string): string;
|
|
25
26
|
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
27
|
export declare const mergeProps: <Tag extends keyof JSX.IntrinsicElements = any>(a: ComponentProps<Tag>, b: ComponentProps<Tag>) => ComponentProps<Tag>;
|
|
28
|
+
export declare const calcLerp: (a: string, b: string, t: string | number) => string;
|
|
27
29
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useVersion<T>(value: T, equal?: (a: T, b: T) => boolean): number;
|