@0xsquid/ui 0.19.5 → 0.20.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 +365 -286
- package/dist/cjs/types/components/buttons/AssetsButton.d.ts +3 -1
- package/dist/cjs/types/components/buttons/BoostButton.d.ts +1 -3
- package/dist/cjs/types/components/buttons/FeeButton.d.ts +3 -1
- package/dist/cjs/types/components/controls/NumericInput.d.ts +10 -2
- package/dist/cjs/types/components/controls/Tooltip.d.ts +1 -1
- package/dist/cjs/types/components/layout/Boost.d.ts +3 -3
- package/dist/cjs/types/components/layout/DetailsToolbar.d.ts +18 -14
- package/dist/cjs/types/components/layout/NavigationBar.d.ts +2 -0
- package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +21 -7
- package/dist/cjs/types/stories/buttons/AssetsButton.stories.d.ts +1 -0
- package/dist/cjs/types/stories/buttons/FeeButton.stories.d.ts +1 -0
- package/dist/cjs/types/stories/layout/Boost.stories.d.ts +1 -0
- package/dist/cjs/types/stories/layout/DetailsToolbar.stories.d.ts +4 -1
- package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
- package/dist/esm/index.js +365 -286
- package/dist/esm/types/components/buttons/AssetsButton.d.ts +3 -1
- package/dist/esm/types/components/buttons/BoostButton.d.ts +1 -3
- package/dist/esm/types/components/buttons/FeeButton.d.ts +3 -1
- package/dist/esm/types/components/controls/NumericInput.d.ts +10 -2
- package/dist/esm/types/components/controls/Tooltip.d.ts +1 -1
- package/dist/esm/types/components/layout/Boost.d.ts +3 -3
- package/dist/esm/types/components/layout/DetailsToolbar.d.ts +18 -14
- package/dist/esm/types/components/layout/NavigationBar.d.ts +2 -0
- package/dist/esm/types/components/layout/SwapConfiguration.d.ts +21 -7
- package/dist/esm/types/stories/buttons/AssetsButton.stories.d.ts +1 -0
- package/dist/esm/types/stories/buttons/FeeButton.stories.d.ts +1 -0
- package/dist/esm/types/stories/layout/Boost.stories.d.ts +1 -0
- package/dist/esm/types/stories/layout/DetailsToolbar.stories.d.ts +4 -1
- package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
- package/dist/index.d.ts +125 -102
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetsButtonVariant } from '../../types/components';
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
interface AssetsButtonProps {
|
|
3
4
|
token?: {
|
|
4
5
|
iconUrl: string;
|
|
@@ -13,6 +14,7 @@ interface AssetsButtonProps {
|
|
|
13
14
|
onClick?: () => void;
|
|
14
15
|
variant?: AssetsButtonVariant;
|
|
15
16
|
isLoading?: boolean;
|
|
17
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
16
18
|
}
|
|
17
|
-
export declare function AssetsButton({ chain, token, onClick, variant, isLoading, }: AssetsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function AssetsButton({ chain, token, onClick, variant, isLoading, tooltip, }: AssetsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -3,9 +3,7 @@ import { BoostMode } from '../../types/components';
|
|
|
3
3
|
interface BoostButtonProps {
|
|
4
4
|
boostMode: BoostMode;
|
|
5
5
|
canToggleBoostMode?: boolean;
|
|
6
|
-
boostDisabledMessage?: string;
|
|
7
|
-
tooltipDisplayDelayMs?: number;
|
|
8
6
|
boostIndicatorRef: React.RefObject<HTMLDivElement>;
|
|
9
7
|
}
|
|
10
|
-
export declare function BoostButton({ boostMode, canToggleBoostMode,
|
|
8
|
+
export declare function BoostButton({ boostMode, canToggleBoostMode, boostIndicatorRef, }: BoostButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
interface FeeButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
4
|
feeInUsd?: string;
|
|
4
5
|
chipLabel?: string;
|
|
6
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
5
7
|
}
|
|
6
|
-
export declare function FeeButton({ feeInUsd, chipLabel, className, ...props }: FeeButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function FeeButton({ feeInUsd, chipLabel, className, tooltip, ...props }: FeeButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SwapDirection } from '../../types/components';
|
|
2
|
+
import { TooltipProps } from './Tooltip';
|
|
2
3
|
interface Token {
|
|
3
4
|
price: number;
|
|
4
5
|
symbol: string;
|
|
@@ -21,9 +22,16 @@ interface NumericInputProps {
|
|
|
21
22
|
priceImpactPercentage?: string;
|
|
22
23
|
criticalPriceImpactPercentage?: number;
|
|
23
24
|
direction?: SwapDirection;
|
|
24
|
-
|
|
25
|
+
inputModeButton?: {
|
|
26
|
+
usdModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
27
|
+
tokenModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
28
|
+
amountUsd?: string;
|
|
29
|
+
};
|
|
25
30
|
maxUsdDecimals?: number;
|
|
26
31
|
isInteractive?: boolean;
|
|
32
|
+
balanceButton?: {
|
|
33
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
34
|
+
};
|
|
27
35
|
}
|
|
28
|
-
export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction,
|
|
36
|
+
export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
29
37
|
export {};
|
|
@@ -3,7 +3,7 @@ export type TooltipWidth = 'max' | 'container';
|
|
|
3
3
|
export type TooltipThreshold = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
4
4
|
export interface TooltipProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
tooltipContent
|
|
6
|
+
tooltipContent?: React.ReactNode;
|
|
7
7
|
threshold?: TooltipThreshold;
|
|
8
8
|
tooltipWidth?: TooltipWidth;
|
|
9
9
|
containerClassName?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BoostMode } from '../../types/components';
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
interface BoostProps {
|
|
3
4
|
boostMode: BoostMode;
|
|
4
5
|
onToggleBoostMode?: ({ boostMode }: {
|
|
5
6
|
boostMode: BoostMode;
|
|
6
7
|
}) => void;
|
|
7
8
|
estimatedTime: string;
|
|
8
|
-
boostDisabledMessage?: string;
|
|
9
9
|
canToggleBoostMode?: boolean;
|
|
10
|
-
|
|
10
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
11
11
|
}
|
|
12
|
-
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime,
|
|
12
|
+
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, canToggleBoostMode, tooltip, }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { BoostMode } from '../../types/components';
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
interface DetailsToolbarProps {
|
|
3
4
|
errorMessage?: string;
|
|
4
|
-
boostMode?: BoostMode;
|
|
5
|
-
onToggleBoostMode?: ({ boostMode }: {
|
|
6
|
-
boostMode: BoostMode;
|
|
7
|
-
}) => void;
|
|
8
|
-
onInvertSwapButtonClick?: () => void;
|
|
9
|
-
onFeeButtonClick?: () => void;
|
|
10
5
|
flipButton?: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
feeButton?: {
|
|
11
|
+
feeInUsd: string;
|
|
12
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
13
|
+
onClick: () => void;
|
|
14
14
|
};
|
|
15
|
-
feeInUsd?: string;
|
|
16
15
|
estimatedTime?: string;
|
|
17
|
-
canToggleBoostMode?: boolean;
|
|
18
|
-
boostDisabledMessage?: string;
|
|
19
16
|
isLoading?: boolean;
|
|
20
17
|
isEmpty?: boolean;
|
|
21
18
|
helpButton?: {
|
|
22
19
|
label: string;
|
|
23
20
|
onClick: () => void;
|
|
24
21
|
};
|
|
25
|
-
|
|
22
|
+
boostButton?: {
|
|
23
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
24
|
+
onClick?: ({ boostMode }: {
|
|
25
|
+
boostMode: BoostMode;
|
|
26
|
+
}) => void;
|
|
27
|
+
canToggleBoostMode?: boolean;
|
|
28
|
+
boostMode?: BoostMode;
|
|
29
|
+
};
|
|
26
30
|
}
|
|
27
|
-
export declare function DetailsToolbar({ errorMessage,
|
|
31
|
+
export declare function DetailsToolbar({ errorMessage, estimatedTime, helpButton, isLoading, isEmpty, flipButton, feeButton, boostButton, }: DetailsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
28
32
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
type ActionButton = {
|
|
3
4
|
labelOrIcon: string | React.ReactNode;
|
|
4
5
|
onClick?: () => void;
|
|
5
6
|
id: React.Key;
|
|
7
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
6
8
|
};
|
|
7
9
|
interface NavigationBarProps {
|
|
8
10
|
title?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AssetsButtonVariant, SwapDirection } from '../../types/components';
|
|
2
|
+
import { TooltipProps } from '../controls';
|
|
2
3
|
interface SwapConfigurationProps {
|
|
3
4
|
direction: SwapDirection;
|
|
4
5
|
priceImpactPercentage?: string;
|
|
5
6
|
amount?: string;
|
|
6
7
|
forcedAmount?: string;
|
|
7
|
-
amountUsd?: string;
|
|
8
8
|
tokenPrice?: number;
|
|
9
9
|
balance?: string;
|
|
10
10
|
isFetching?: boolean;
|
|
@@ -19,19 +19,33 @@ interface SwapConfigurationProps {
|
|
|
19
19
|
textColor: string;
|
|
20
20
|
decimals: number;
|
|
21
21
|
};
|
|
22
|
-
address?: string;
|
|
23
22
|
onAmountChange?: (amount: string) => void;
|
|
24
|
-
onWalletButtonClick?: () => void;
|
|
25
|
-
onAssetsButtonClick?: () => void;
|
|
26
23
|
error?: {
|
|
27
24
|
message: string;
|
|
28
25
|
};
|
|
29
26
|
criticalPriceImpactPercentage?: number;
|
|
30
|
-
emptyAddressLabel?: string;
|
|
31
|
-
assetsButtonVariant?: AssetsButtonVariant;
|
|
32
27
|
maxUsdDecimals?: number;
|
|
33
28
|
isInputInteractive?: boolean;
|
|
34
29
|
isLoading?: boolean;
|
|
30
|
+
inputModeButton?: {
|
|
31
|
+
usdModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
32
|
+
tokenModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
33
|
+
amountUsd?: string;
|
|
34
|
+
};
|
|
35
|
+
balanceButton?: {
|
|
36
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
37
|
+
};
|
|
38
|
+
assetsButton?: {
|
|
39
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
40
|
+
onClick?: () => void;
|
|
41
|
+
variant?: AssetsButtonVariant;
|
|
42
|
+
};
|
|
43
|
+
walletButton?: {
|
|
44
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
45
|
+
onClick?: () => void;
|
|
46
|
+
address?: string;
|
|
47
|
+
emptyAddressLabel?: string;
|
|
48
|
+
};
|
|
35
49
|
}
|
|
36
|
-
export declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange,
|
|
50
|
+
export declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive, isLoading, inputModeButton, balanceButton, assetsButton, walletButton, }: SwapConfigurationProps): import("react/jsx-runtime").JSX.Element;
|
|
37
51
|
export {};
|
|
@@ -5,6 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Normal: Story;
|
|
7
7
|
export declare const Boosted: Story;
|
|
8
|
+
export declare const Tooltip: Story;
|
|
8
9
|
export declare const NormalDisabled: Story;
|
|
9
10
|
export declare const BoostedDisabled: Story;
|
|
10
11
|
export declare const DisabledWithDelayedTooltip: Story;
|
|
@@ -9,6 +9,9 @@ export declare const Empty: Story;
|
|
|
9
9
|
export declare const EmptyLoading: Story;
|
|
10
10
|
export declare const Error: Story;
|
|
11
11
|
export declare const ErrorHelpButton: Story;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const BoostButtonWithTooltip: Story;
|
|
13
|
+
export declare const BoostDisabledWithTooltip: Story;
|
|
13
14
|
export declare const BoostDisabledWithDelayedTooltip: Story;
|
|
15
|
+
export declare const FlipButtonWithTooltip: Story;
|
|
14
16
|
export declare const FlipButtonDisabled: Story;
|
|
17
|
+
export declare const FeeButtonTooltip: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -130,69 +130,6 @@ interface ArrowButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
130
130
|
}
|
|
131
131
|
declare function ArrowButton({ label, disabled, ...props }: ArrowButtonProps): react_jsx_runtime.JSX.Element;
|
|
132
132
|
|
|
133
|
-
interface AssetsButtonProps {
|
|
134
|
-
token?: {
|
|
135
|
-
iconUrl: string;
|
|
136
|
-
symbol: string;
|
|
137
|
-
bgColor: string;
|
|
138
|
-
textColor: string;
|
|
139
|
-
};
|
|
140
|
-
chain?: {
|
|
141
|
-
iconUrl: string;
|
|
142
|
-
bgColor: string;
|
|
143
|
-
};
|
|
144
|
-
onClick?: () => void;
|
|
145
|
-
variant?: AssetsButtonVariant;
|
|
146
|
-
isLoading?: boolean;
|
|
147
|
-
}
|
|
148
|
-
declare function AssetsButton({ chain, token, onClick, variant, isLoading, }: AssetsButtonProps): react_jsx_runtime.JSX.Element;
|
|
149
|
-
|
|
150
|
-
interface BoostButtonProps {
|
|
151
|
-
boostMode: BoostMode;
|
|
152
|
-
canToggleBoostMode?: boolean;
|
|
153
|
-
boostDisabledMessage?: string;
|
|
154
|
-
tooltipDisplayDelayMs?: number;
|
|
155
|
-
boostIndicatorRef: React.RefObject<HTMLDivElement>;
|
|
156
|
-
}
|
|
157
|
-
declare function BoostButton({ boostMode, canToggleBoostMode, boostDisabledMessage, tooltipDisplayDelayMs, boostIndicatorRef, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
|
|
158
|
-
|
|
159
|
-
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
160
|
-
label?: string;
|
|
161
|
-
icon?: React.ReactNode;
|
|
162
|
-
variant: ButtonVariant;
|
|
163
|
-
size: ButtonSize;
|
|
164
|
-
disabled?: boolean;
|
|
165
|
-
link?: string;
|
|
166
|
-
isLoading?: boolean;
|
|
167
|
-
}
|
|
168
|
-
declare function Button({ label, disabled, size, variant, icon, link, isLoading, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
169
|
-
|
|
170
|
-
interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
171
|
-
label?: string;
|
|
172
|
-
icon?: React.ReactNode;
|
|
173
|
-
}
|
|
174
|
-
declare function Chip({ label, icon, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
175
|
-
|
|
176
|
-
interface FeeButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
177
|
-
feeInUsd?: string;
|
|
178
|
-
chipLabel?: string;
|
|
179
|
-
}
|
|
180
|
-
declare function FeeButton({ feeInUsd, chipLabel, className, ...props }: FeeButtonProps): react_jsx_runtime.JSX.Element;
|
|
181
|
-
|
|
182
|
-
interface FilterButtonProps {
|
|
183
|
-
selected: boolean;
|
|
184
|
-
numApplied?: number;
|
|
185
|
-
onClick?: () => void;
|
|
186
|
-
}
|
|
187
|
-
declare function FilterButton({ selected, numApplied, onClick, }: FilterButtonProps): react_jsx_runtime.JSX.Element;
|
|
188
|
-
|
|
189
|
-
interface SettingsButtonProps {
|
|
190
|
-
label: string;
|
|
191
|
-
isSelected?: boolean;
|
|
192
|
-
onClick?: () => void;
|
|
193
|
-
}
|
|
194
|
-
declare function SettingsButton({ label, isSelected, onClick, }: SettingsButtonProps): react_jsx_runtime.JSX.Element;
|
|
195
|
-
|
|
196
133
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
197
134
|
placeholder?: string;
|
|
198
135
|
showIcon?: boolean;
|
|
@@ -209,6 +146,21 @@ type InputActionButtonProps = {
|
|
|
209
146
|
label?: string;
|
|
210
147
|
};
|
|
211
148
|
|
|
149
|
+
type TooltipWidth = 'max' | 'container';
|
|
150
|
+
type TooltipThreshold = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
151
|
+
interface TooltipProps {
|
|
152
|
+
children: react__default.ReactNode;
|
|
153
|
+
tooltipContent?: react__default.ReactNode;
|
|
154
|
+
threshold?: TooltipThreshold;
|
|
155
|
+
tooltipWidth?: TooltipWidth;
|
|
156
|
+
containerClassName?: string;
|
|
157
|
+
childrenClassName?: string;
|
|
158
|
+
tooltipClassName?: string;
|
|
159
|
+
displayDelayMs?: number;
|
|
160
|
+
containerRef?: react__default.RefObject<HTMLElement>;
|
|
161
|
+
}
|
|
162
|
+
declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, displayDelayMs, containerRef: containerRefProp, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
|
|
212
164
|
interface Token$1 {
|
|
213
165
|
price: number;
|
|
214
166
|
symbol: string;
|
|
@@ -231,11 +183,18 @@ interface NumericInputProps {
|
|
|
231
183
|
priceImpactPercentage?: string;
|
|
232
184
|
criticalPriceImpactPercentage?: number;
|
|
233
185
|
direction?: SwapDirection;
|
|
234
|
-
|
|
186
|
+
inputModeButton?: {
|
|
187
|
+
usdModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
188
|
+
tokenModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
189
|
+
amountUsd?: string;
|
|
190
|
+
};
|
|
235
191
|
maxUsdDecimals?: number;
|
|
236
192
|
isInteractive?: boolean;
|
|
193
|
+
balanceButton?: {
|
|
194
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
195
|
+
};
|
|
237
196
|
}
|
|
238
|
-
declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction,
|
|
197
|
+
declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, }: NumericInputProps): react_jsx_runtime.JSX.Element;
|
|
239
198
|
|
|
240
199
|
interface SettingsSliderProps {
|
|
241
200
|
value: number | undefined;
|
|
@@ -256,20 +215,68 @@ interface SwitchProps {
|
|
|
256
215
|
}
|
|
257
216
|
declare function Switch({ checked, onChange, size, disabled, }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
258
217
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
218
|
+
interface AssetsButtonProps {
|
|
219
|
+
token?: {
|
|
220
|
+
iconUrl: string;
|
|
221
|
+
symbol: string;
|
|
222
|
+
bgColor: string;
|
|
223
|
+
textColor: string;
|
|
224
|
+
};
|
|
225
|
+
chain?: {
|
|
226
|
+
iconUrl: string;
|
|
227
|
+
bgColor: string;
|
|
228
|
+
};
|
|
229
|
+
onClick?: () => void;
|
|
230
|
+
variant?: AssetsButtonVariant;
|
|
231
|
+
isLoading?: boolean;
|
|
232
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
271
233
|
}
|
|
272
|
-
declare function
|
|
234
|
+
declare function AssetsButton({ chain, token, onClick, variant, isLoading, tooltip, }: AssetsButtonProps): react_jsx_runtime.JSX.Element;
|
|
235
|
+
|
|
236
|
+
interface BoostButtonProps {
|
|
237
|
+
boostMode: BoostMode;
|
|
238
|
+
canToggleBoostMode?: boolean;
|
|
239
|
+
boostIndicatorRef: React.RefObject<HTMLDivElement>;
|
|
240
|
+
}
|
|
241
|
+
declare function BoostButton({ boostMode, canToggleBoostMode, boostIndicatorRef, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
|
|
242
|
+
|
|
243
|
+
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
244
|
+
label?: string;
|
|
245
|
+
icon?: React.ReactNode;
|
|
246
|
+
variant: ButtonVariant;
|
|
247
|
+
size: ButtonSize;
|
|
248
|
+
disabled?: boolean;
|
|
249
|
+
link?: string;
|
|
250
|
+
isLoading?: boolean;
|
|
251
|
+
}
|
|
252
|
+
declare function Button({ label, disabled, size, variant, icon, link, isLoading, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
253
|
+
|
|
254
|
+
interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
255
|
+
label?: string;
|
|
256
|
+
icon?: React.ReactNode;
|
|
257
|
+
}
|
|
258
|
+
declare function Chip({ label, icon, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
259
|
+
|
|
260
|
+
interface FeeButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
261
|
+
feeInUsd?: string;
|
|
262
|
+
chipLabel?: string;
|
|
263
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
264
|
+
}
|
|
265
|
+
declare function FeeButton({ feeInUsd, chipLabel, className, tooltip, ...props }: FeeButtonProps): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
interface FilterButtonProps {
|
|
268
|
+
selected: boolean;
|
|
269
|
+
numApplied?: number;
|
|
270
|
+
onClick?: () => void;
|
|
271
|
+
}
|
|
272
|
+
declare function FilterButton({ selected, numApplied, onClick, }: FilterButtonProps): react_jsx_runtime.JSX.Element;
|
|
273
|
+
|
|
274
|
+
interface SettingsButtonProps {
|
|
275
|
+
label: string;
|
|
276
|
+
isSelected?: boolean;
|
|
277
|
+
onClick?: () => void;
|
|
278
|
+
}
|
|
279
|
+
declare function SettingsButton({ label, isSelected, onClick, }: SettingsButtonProps): react_jsx_runtime.JSX.Element;
|
|
273
280
|
|
|
274
281
|
interface Props {
|
|
275
282
|
lottieJsonFile: object;
|
|
@@ -813,11 +820,10 @@ interface BoostProps {
|
|
|
813
820
|
boostMode: BoostMode;
|
|
814
821
|
}) => void;
|
|
815
822
|
estimatedTime: string;
|
|
816
|
-
boostDisabledMessage?: string;
|
|
817
823
|
canToggleBoostMode?: boolean;
|
|
818
|
-
|
|
824
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
819
825
|
}
|
|
820
|
-
declare function Boost({ boostMode, onToggleBoostMode, estimatedTime,
|
|
826
|
+
declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, canToggleBoostMode, tooltip, }: BoostProps): react_jsx_runtime.JSX.Element;
|
|
821
827
|
|
|
822
828
|
declare function Breadcrumb({ children, className, }: {
|
|
823
829
|
children: ReactNode;
|
|
@@ -842,30 +848,33 @@ declare function Inline({ className, children, ...props }: ComponentProps<'div'>
|
|
|
842
848
|
|
|
843
849
|
interface DetailsToolbarProps {
|
|
844
850
|
errorMessage?: string;
|
|
845
|
-
boostMode?: BoostMode;
|
|
846
|
-
onToggleBoostMode?: ({ boostMode }: {
|
|
847
|
-
boostMode: BoostMode;
|
|
848
|
-
}) => void;
|
|
849
|
-
onInvertSwapButtonClick?: () => void;
|
|
850
|
-
onFeeButtonClick?: () => void;
|
|
851
851
|
flipButton?: {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
852
|
+
onClick?: () => void;
|
|
853
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
854
|
+
isDisabled?: boolean;
|
|
855
|
+
};
|
|
856
|
+
feeButton?: {
|
|
857
|
+
feeInUsd: string;
|
|
858
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
859
|
+
onClick: () => void;
|
|
855
860
|
};
|
|
856
|
-
feeInUsd?: string;
|
|
857
861
|
estimatedTime?: string;
|
|
858
|
-
canToggleBoostMode?: boolean;
|
|
859
|
-
boostDisabledMessage?: string;
|
|
860
862
|
isLoading?: boolean;
|
|
861
863
|
isEmpty?: boolean;
|
|
862
864
|
helpButton?: {
|
|
863
865
|
label: string;
|
|
864
866
|
onClick: () => void;
|
|
865
867
|
};
|
|
866
|
-
|
|
868
|
+
boostButton?: {
|
|
869
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
870
|
+
onClick?: ({ boostMode }: {
|
|
871
|
+
boostMode: BoostMode;
|
|
872
|
+
}) => void;
|
|
873
|
+
canToggleBoostMode?: boolean;
|
|
874
|
+
boostMode?: BoostMode;
|
|
875
|
+
};
|
|
867
876
|
}
|
|
868
|
-
declare function DetailsToolbar({ errorMessage,
|
|
877
|
+
declare function DetailsToolbar({ errorMessage, estimatedTime, helpButton, isLoading, isEmpty, flipButton, feeButton, boostButton, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
|
|
869
878
|
|
|
870
879
|
interface DropdownMenuItemProps {
|
|
871
880
|
label: string;
|
|
@@ -1364,6 +1373,7 @@ type ActionButton = {
|
|
|
1364
1373
|
labelOrIcon: string | React.ReactNode;
|
|
1365
1374
|
onClick?: () => void;
|
|
1366
1375
|
id: React.Key;
|
|
1376
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1367
1377
|
};
|
|
1368
1378
|
interface NavigationBarProps {
|
|
1369
1379
|
title?: string;
|
|
@@ -1392,7 +1402,6 @@ interface SwapConfigurationProps {
|
|
|
1392
1402
|
priceImpactPercentage?: string;
|
|
1393
1403
|
amount?: string;
|
|
1394
1404
|
forcedAmount?: string;
|
|
1395
|
-
amountUsd?: string;
|
|
1396
1405
|
tokenPrice?: number;
|
|
1397
1406
|
balance?: string;
|
|
1398
1407
|
isFetching?: boolean;
|
|
@@ -1407,21 +1416,35 @@ interface SwapConfigurationProps {
|
|
|
1407
1416
|
textColor: string;
|
|
1408
1417
|
decimals: number;
|
|
1409
1418
|
};
|
|
1410
|
-
address?: string;
|
|
1411
1419
|
onAmountChange?: (amount: string) => void;
|
|
1412
|
-
onWalletButtonClick?: () => void;
|
|
1413
|
-
onAssetsButtonClick?: () => void;
|
|
1414
1420
|
error?: {
|
|
1415
1421
|
message: string;
|
|
1416
1422
|
};
|
|
1417
1423
|
criticalPriceImpactPercentage?: number;
|
|
1418
|
-
emptyAddressLabel?: string;
|
|
1419
|
-
assetsButtonVariant?: AssetsButtonVariant;
|
|
1420
1424
|
maxUsdDecimals?: number;
|
|
1421
1425
|
isInputInteractive?: boolean;
|
|
1422
1426
|
isLoading?: boolean;
|
|
1427
|
+
inputModeButton?: {
|
|
1428
|
+
usdModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
1429
|
+
tokenModeTooltip?: Omit<TooltipProps, 'children'>;
|
|
1430
|
+
amountUsd?: string;
|
|
1431
|
+
};
|
|
1432
|
+
balanceButton?: {
|
|
1433
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1434
|
+
};
|
|
1435
|
+
assetsButton?: {
|
|
1436
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1437
|
+
onClick?: () => void;
|
|
1438
|
+
variant?: AssetsButtonVariant;
|
|
1439
|
+
};
|
|
1440
|
+
walletButton?: {
|
|
1441
|
+
tooltip?: Omit<TooltipProps, 'children'>;
|
|
1442
|
+
onClick?: () => void;
|
|
1443
|
+
address?: string;
|
|
1444
|
+
emptyAddressLabel?: string;
|
|
1445
|
+
};
|
|
1423
1446
|
}
|
|
1424
|
-
declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange,
|
|
1447
|
+
declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive, isLoading, inputModeButton, balanceButton, assetsButton, walletButton, }: SwapConfigurationProps): react_jsx_runtime.JSX.Element;
|
|
1425
1448
|
|
|
1426
1449
|
interface SwapProgressViewHeaderProps {
|
|
1427
1450
|
title: string;
|