@dhedge/trading-widget 0.0.1
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/components/common/badge/token-badge/token-badge.d.ts +13 -0
- package/components/common/balance/balance.d.ts +7 -0
- package/components/common/button/action-button/action-button.d.ts +10 -0
- package/components/common/button/disabled-button-with-prompt/disabled-button-with-prompt.d.ts +6 -0
- package/components/common/button/icon-button/icon-button.d.ts +9 -0
- package/components/common/button/max-balance-button/max-balance-button.d.ts +6 -0
- package/components/common/icon/token-icon/token-icon.d.ts +14 -0
- package/components/common/index.d.ts +18 -0
- package/components/common/layout/balance/balance.d.ts +2 -0
- package/components/common/layout/index.d.ts +16 -0
- package/components/common/layout/input-group/input-group.d.ts +2 -0
- package/components/common/layout/meta/meta.d.ts +2 -0
- package/components/common/layout/overlay/overlay.d.ts +2 -0
- package/components/common/layout/panel/panel.d.ts +2 -0
- package/components/common/layout/settings/settings-popover/settings-popover.d.ts +8 -0
- package/components/common/layout/settings/settings.d.ts +2 -0
- package/components/common/meta/transaction-disclosure/transaction-disclosure-item/transaction-disclosure-item.d.ts +12 -0
- package/components/common/meta/transaction-disclosure/transaction-disclosure.d.ts +11 -0
- package/components/common/overlay/pending-overlay/pending-overlay.d.ts +7 -0
- package/components/common/settings/settings-option/settings-option.d.ts +7 -0
- package/components/common/skeleton/skeleton.d.ts +8 -0
- package/components/common/spinner/spinner.d.ts +8 -0
- package/components/common/switch/switch.d.ts +10 -0
- package/components/common/tab/tab-button/tab-button.d.ts +7 -0
- package/components/common/tooltip/info-tooltip/info-tooltip.d.ts +6 -0
- package/components/common/tooltip/tooltip-icon/tooltip-icon.d.ts +7 -0
- package/components/common/tooltip/tooltip-wrapper/tooltip-wrapper.d.ts +7 -0
- package/components/default-examples/image/image.d.ts +3 -0
- package/components/deposit/balance/balance.d.ts +2 -0
- package/components/deposit/balance/balance.hooks.d.ts +4 -0
- package/components/deposit/button/trade-button/trade-button.d.ts +2 -0
- package/components/deposit/button/valid-deposit-button/valid-deposit-button.d.ts +2 -0
- package/components/deposit/button/valid-deposit-button/valid-deposit-button.hooks.d.ts +15 -0
- package/components/deposit/index.d.ts +2 -0
- package/components/deposit/input-group/input-group.d.ts +1 -0
- package/components/deposit/input-group/input-group.hooks.d.ts +25 -0
- package/components/deposit/meta/meta.d.ts +2 -0
- package/components/deposit/meta/transaction-disclosure/transaction-disclosure.d.ts +1 -0
- package/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +15 -0
- package/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.d.ts +1 -0
- package/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.hooks.d.ts +5 -0
- package/components/deposit/settings/deposit-settings/deposit-settings.d.ts +2 -0
- package/components/deposit/settings/deposit-settings/deposit-settings.hooks.d.ts +5 -0
- package/components/deposit/tab-panel/tab-panel.d.ts +3 -0
- package/components/deposit/tab-panel/tab-panel.hooks.d.ts +1 -0
- package/components/index.d.ts +3 -0
- package/components/widget/widget-buttons/approve-button/approve-button.d.ts +3 -0
- package/components/widget/widget-buttons/approve-button/approve-button.hooks.d.ts +8 -0
- package/components/widget/widget-buttons/connect-wallet-button/connect-wallet-button.d.ts +2 -0
- package/components/widget/widget-buttons/index.d.ts +3 -0
- package/components/widget/widget-buttons/switch-network-button/switch-network-button.d.ts +1 -0
- package/components/widget/widget-buttons/valid-network-button/valid-network-button.d.ts +2 -0
- package/components/widget/widget-buttons/valid-network-button/valid-network-button.hooks.d.ts +4 -0
- package/components/widget/widget-input/asset-composition-table/asset-composition-table.d.ts +2 -0
- package/components/widget/widget-input/asset-composition-table/asset-composition-table.hooks.d.ts +9 -0
- package/components/widget/widget-input/index.d.ts +1 -0
- package/components/widget/widget-input/token-selector/token-selector.d.ts +3 -0
- package/components/widget/widget-input/token-selector/token-selector.hooks.d.ts +7 -0
- package/components/widget/widget-input/widget-input.d.ts +3 -0
- package/components/widget/widget-input/widget-input.hooks.d.ts +27 -0
- package/components/widget/widget-input/widget-input.utils.d.ts +3 -0
- package/components/widget/widget-meta/exchange-rate/exchange-rate.d.ts +6 -0
- package/components/widget/widget-meta/index.d.ts +1 -0
- package/components/widget/widget-overlay/index.d.ts +1 -0
- package/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.d.ts +2 -0
- package/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.hooks.d.ts +3 -0
- package/components/widget/widget-settings/index.d.ts +2 -0
- package/components/widget/widget-settings/slippage-selector/slippage-selector.d.ts +2 -0
- package/components/widget/widget-settings/slippage-selector/slippage-selector.hooks.d.ts +15 -0
- package/components/widget/widget-settings/token-allowance-switch/token-allowance-switch.d.ts +1 -0
- package/components/widget/widget-settings/widget-settings.d.ts +7 -0
- package/components/widget/widget-tabs/widget-tabs.d.ts +2 -0
- package/components/widget/widget.d.ts +2 -0
- package/components/widget/widget.hooks.d.ts +5 -0
- package/components/withdraw/balance/balance.d.ts +2 -0
- package/components/withdraw/balance/balance.hooks.d.ts +4 -0
- package/components/withdraw/button/trade-button/trade-button.d.ts +2 -0
- package/components/withdraw/button/valid-withdraw-button/valid-withdraw-button.d.ts +2 -0
- package/components/withdraw/button/valid-withdraw-button/valid-withdraw-button.hooks.d.ts +14 -0
- package/components/withdraw/index.d.ts +2 -0
- package/components/withdraw/input-group/input-group.d.ts +1 -0
- package/components/withdraw/input-group/input-group.hooks.d.ts +23 -0
- package/components/withdraw/meta/meta.d.ts +2 -0
- package/components/withdraw/meta/transaction-disclosure/transaction-disclosure.d.ts +1 -0
- package/components/withdraw/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +14 -0
- package/components/withdraw/settings/withdraw-settings/withdraw-settings.d.ts +2 -0
- package/components/withdraw/tab-panel/tab-panel.d.ts +2 -0
- package/components/withdraw/tab-panel/tab-panel.hooks.d.ts +1 -0
- package/constants/synthetix-v3.d.ts +2 -0
- package/constants/tab.d.ts +1 -0
- package/hooks/index.d.ts +7 -0
- package/hooks/use-crypto-icon.d.ts +3 -0
- package/hooks/use-get-slippage-placeholder.d.ts +2 -0
- package/hooks/use-get-theme-type-by-slippage.d.ts +2 -0
- package/hooks/use-high-slippage-check.d.ts +5 -0
- package/hooks/use-synthetix-withdrawal-window.d.ts +4 -0
- package/hooks/use-trading-type-name.d.ts +2 -0
- package/hooks/use-user-staked-pools.d.ts +5 -0
- package/hooks/use-user-vault-balance.d.ts +3 -0
- package/hooks/use-user-vaults-balances.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +337 -0
- package/index.mjs +54443 -0
- package/native-15074a2a.mjs +15 -0
- package/native-243c3d4c.js +1 -0
- package/package.json +22 -0
- package/providers/component-provider/component-provider.d.ts +11 -0
- package/providers/component-provider/component-provider.hooks.d.ts +9 -0
- package/providers/component-provider/component-provider.types.d.ts +19 -0
- package/providers/component-provider/index.d.ts +3 -0
- package/providers/config-provider/config-provider.d.ts +4 -0
- package/providers/config-provider/config-provider.defaults.d.ts +3 -0
- package/providers/config-provider/config-provider.hooks.d.ts +3 -0
- package/providers/config-provider/config-provider.types.d.ts +27 -0
- package/providers/config-provider/index.d.ts +4 -0
- package/providers/index.d.ts +12 -0
- package/providers/theme-provider/index.d.ts +2 -0
- package/providers/theme-provider/theme-provider.d.ts +3 -0
- package/providers/theme-provider/theme-provider.types.d.ts +51 -0
- package/providers/translation-provider/index.d.ts +3 -0
- package/providers/translation-provider/translation-provider.d.ts +4 -0
- package/providers/translation-provider/translation-provider.defaults.d.ts +2 -0
- package/providers/translation-provider/translation-provider.hooks.d.ts +1 -0
- package/providers/translation-provider/translation-provider.types.d.ts +57 -0
- package/style.css +1 -0
- package/theme/colors.d.ts +49 -0
- package/types/balance.types.d.ts +9 -0
- package/types/index.d.ts +4 -0
- package/types/staking.types.d.ts +6 -0
- package/types/synthetix-v3.types.d.ts +24 -0
- package/types/theme.types.d.ts +9 -0
- package/utils/format.d.ts +6 -0
- package/utils/icon.d.ts +2 -0
- package/utils/synthetix-v3.d.ts +39 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
import type { TokenIconSize } from 'types';
|
|
3
|
+
interface TokenBadgeProps {
|
|
4
|
+
symbol: string;
|
|
5
|
+
iconSymbols: string[];
|
|
6
|
+
size?: TokenIconSize;
|
|
7
|
+
symbolClasses?: HTMLAttributes<HTMLDivElement>['className'];
|
|
8
|
+
CustomIcon?: ReactElement;
|
|
9
|
+
customTitle?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const TokenBadge: FC<TokenBadgeProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
interface ActionButtonProps {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
highlighted?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
type?: 'submit' | 'button';
|
|
8
|
+
}
|
|
9
|
+
export declare const ActionButton: FC<PropsWithChildren<ActionButtonProps>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps, FC, FunctionComponent } from 'react';
|
|
2
|
+
interface IconButtonProps {
|
|
3
|
+
Icon: FunctionComponent<Omit<ComponentProps<'svg'>, 'ref'>>;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const IconButton: FC<IconButtonProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { TokenIconSize } from 'types';
|
|
3
|
+
export interface TokenIconProps {
|
|
4
|
+
symbols: string[];
|
|
5
|
+
size?: TokenIconSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const getRowClasses: (index: number, length: number) => string;
|
|
9
|
+
export declare const getSizeClasses: (size: TokenIconSize) => {
|
|
10
|
+
height: string;
|
|
11
|
+
width: string;
|
|
12
|
+
diameter: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const TokenIcon: FC<TokenIconProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { SettingsOption } from './settings/settings-option/settings-option';
|
|
2
|
+
export { TabButton } from './tab/tab-button/tab-button';
|
|
3
|
+
export { TooltipIcon } from './tooltip/tooltip-icon/tooltip-icon';
|
|
4
|
+
export { InfoTooltip } from './tooltip/info-tooltip/info-tooltip';
|
|
5
|
+
export { TransactionOverviewDisclosure } from './meta/transaction-disclosure/transaction-disclosure';
|
|
6
|
+
export type { TransactionDisclosureItemProps } from './meta/transaction-disclosure/transaction-disclosure-item/transaction-disclosure-item';
|
|
7
|
+
export { Spinner } from './spinner/spinner';
|
|
8
|
+
export { Layout } from './layout';
|
|
9
|
+
export { ActionButton } from './button/action-button/action-button';
|
|
10
|
+
export { DisabledButtonWithPrompt } from './button/disabled-button-with-prompt/disabled-button-with-prompt';
|
|
11
|
+
export { IconButton } from './button/icon-button/icon-button';
|
|
12
|
+
export { Switch } from './switch/switch';
|
|
13
|
+
export { Balance } from './balance/balance';
|
|
14
|
+
export { MaxBalanceButton } from './button/max-balance-button/max-balance-button';
|
|
15
|
+
export { Skeleton } from './skeleton/skeleton';
|
|
16
|
+
export { TokenIcon } from './icon/token-icon/token-icon';
|
|
17
|
+
export { TokenBadge } from './badge/token-badge/token-badge';
|
|
18
|
+
export { PendingOverlay } from './overlay/pending-overlay/pending-overlay';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Balance } from './balance/balance';
|
|
2
|
+
import { InputGroup } from './input-group/input-group';
|
|
3
|
+
import { Meta } from './meta/meta';
|
|
4
|
+
import { Overlay } from './overlay/overlay';
|
|
5
|
+
import { Panel } from './panel/panel';
|
|
6
|
+
import { Settings } from './settings/settings';
|
|
7
|
+
type LayoutCompoundedComponent = {
|
|
8
|
+
Balance: typeof Balance;
|
|
9
|
+
InputGroup: typeof InputGroup;
|
|
10
|
+
Meta: typeof Meta;
|
|
11
|
+
Settings: typeof Settings;
|
|
12
|
+
Panel: typeof Panel;
|
|
13
|
+
Overlay: typeof Overlay;
|
|
14
|
+
};
|
|
15
|
+
export declare const Layout: LayoutCompoundedComponent;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ThemeType } from 'types';
|
|
3
|
+
export interface TransactionDisclosureItemProps {
|
|
4
|
+
tooltipText: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value?: ReactNode;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
type?: ThemeType;
|
|
9
|
+
className?: string;
|
|
10
|
+
emphasised?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const TransactionDisclosureItem: ({ tooltipText, value, label, children, type, className, emphasised, }: TransactionDisclosureItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { ThemeType } from 'types';
|
|
3
|
+
import type { TransactionDisclosureItemProps } from './transaction-disclosure-item/transaction-disclosure-item';
|
|
4
|
+
interface TransactionOverviewDisclosureProps {
|
|
5
|
+
buttonItemChildren?: TransactionDisclosureItemProps['children'];
|
|
6
|
+
staticItems?: TransactionDisclosureItemProps[];
|
|
7
|
+
collapseItems?: TransactionDisclosureItemProps[];
|
|
8
|
+
themeType?: ThemeType;
|
|
9
|
+
}
|
|
10
|
+
export declare const TransactionOverviewDisclosure: FC<PropsWithChildren<TransactionOverviewDisclosureProps>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface SwitchProps {
|
|
2
|
+
defaultEnabled?: boolean;
|
|
3
|
+
onChange?: (enabled: boolean) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
vertical?: boolean;
|
|
7
|
+
size?: 'xs' | 'sm';
|
|
8
|
+
}
|
|
9
|
+
export declare const Switch: ({ defaultEnabled, onChange, disabled, label, vertical, }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { TooltipWrapperProps } from '../tooltip-wrapper/tooltip-wrapper';
|
|
3
|
+
export type InfoTooltipProps = Omit<TooltipWrapperProps, 'tooltipContent'> & {
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const InfoTooltip: FC<InfoTooltipProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentType, FC, HTMLAttributes, SVGProps } from 'react';
|
|
2
|
+
import type { InfoTooltipProps } from '../info-tooltip/info-tooltip';
|
|
3
|
+
export interface TooltipIconProps extends InfoTooltipProps {
|
|
4
|
+
iconClassName?: HTMLAttributes<SVGElement>['className'];
|
|
5
|
+
Icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TooltipIcon: FC<TooltipIconProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { Config } from 'react-popper-tooltip';
|
|
3
|
+
export interface TooltipWrapperProps extends Pick<Config, 'placement' | 'trigger' | 'interactive' | 'delayHide'> {
|
|
4
|
+
tooltipContent: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const TooltipWrapper: FC<TooltipWrapperProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const useValidDepositButton: () => {
|
|
2
|
+
requiresMinDeposit: boolean;
|
|
3
|
+
requiresWhitelist: boolean | undefined;
|
|
4
|
+
requiresApprove: boolean;
|
|
5
|
+
requiresUpdate: boolean;
|
|
6
|
+
requiresHighSlippageConfirm: boolean;
|
|
7
|
+
sendTokenSymbol: string;
|
|
8
|
+
poolSymbol: string;
|
|
9
|
+
minDepositUSD: number;
|
|
10
|
+
deprecated: boolean | undefined;
|
|
11
|
+
approve: () => Promise<void>;
|
|
12
|
+
confirmHighSlippage: () => void;
|
|
13
|
+
updateOracles: () => Promise<void>;
|
|
14
|
+
slippageToBeUsed: number;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DepositInputGroup: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const useDepositInputGroup: () => {
|
|
2
|
+
autoFocus: boolean;
|
|
3
|
+
sendToken: {
|
|
4
|
+
price: string;
|
|
5
|
+
balance: string;
|
|
6
|
+
updater: (payload: Partial<import("../../../../../core-ui-kit/dist/trading-panel.types-hhd3i-Wf").D>) => void;
|
|
7
|
+
isLoading?: boolean | undefined;
|
|
8
|
+
address: `0x${string}`;
|
|
9
|
+
symbol: string;
|
|
10
|
+
value: string;
|
|
11
|
+
decimals: number;
|
|
12
|
+
};
|
|
13
|
+
receiveToken: {
|
|
14
|
+
price: string;
|
|
15
|
+
isLoading?: boolean | undefined;
|
|
16
|
+
address: `0x${string}`;
|
|
17
|
+
symbol: string;
|
|
18
|
+
value: string;
|
|
19
|
+
decimals: number;
|
|
20
|
+
};
|
|
21
|
+
tradingPriceDiff: number;
|
|
22
|
+
minSlippage: number | undefined;
|
|
23
|
+
onInputFocus: () => void;
|
|
24
|
+
onInputChange: (value: string) => void;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DepositTransactionOverviewDisclosure: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const useDepositTransactionDisclosure: () => {
|
|
2
|
+
projectedEarnings: import("../../../../../../core-ui-kit/dist/trading-panel.types-hhd3i-Wf").g;
|
|
3
|
+
themeType: import("types").ThemeType;
|
|
4
|
+
slippageTooltipText: string;
|
|
5
|
+
isMaxSlippageLoading: boolean;
|
|
6
|
+
slippagePlaceholder: string;
|
|
7
|
+
minReceive: string;
|
|
8
|
+
allowanceRequired: boolean;
|
|
9
|
+
tokenAllowance: string;
|
|
10
|
+
sendTokenSymbol: string;
|
|
11
|
+
entryFee: string;
|
|
12
|
+
entryFeeTooltipText: string;
|
|
13
|
+
minDeposit: string;
|
|
14
|
+
lockTime: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DepositFeeSwitch: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDepositTabPanel: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SwitchNetworkButton: () => import("react/jsx-runtime").JSX.Element;
|
package/components/widget/widget-input/asset-composition-table/asset-composition-table.hooks.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TokenIconSize } from 'types';
|
|
2
|
+
export interface AssetCompositionTableProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
showFraction?: boolean;
|
|
5
|
+
iconSize?: TokenIconSize;
|
|
6
|
+
}
|
|
7
|
+
export declare const useAssetCompositionTable: () => {
|
|
8
|
+
poolComposition: import("../../../../../../core-ui-kit/dist/pool.types-Ekba6o9H").a[];
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidgetInput } from './widget-input';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChangeEvent } from 'react';
|
|
2
|
+
import { ThemeType } from 'types';
|
|
3
|
+
export interface WidgetInputProps {
|
|
4
|
+
label: string;
|
|
5
|
+
assetSymbol: string;
|
|
6
|
+
assetPrice: string;
|
|
7
|
+
assetInput: string;
|
|
8
|
+
onInputChange?: (value: string) => void;
|
|
9
|
+
onInputFocus?: () => void;
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
displayMax?: boolean;
|
|
13
|
+
maxBalance?: string;
|
|
14
|
+
displayCalculatedValue?: boolean;
|
|
15
|
+
tradingPriceDiff?: number;
|
|
16
|
+
type?: ThemeType;
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const useWidgetInput: ({ displayCalculatedValue, assetInput, assetPrice, tradingPriceDiff, type, onInputChange, maxBalance, autoFocus, disabled, }: WidgetInputProps) => {
|
|
20
|
+
inputRef: import("react").RefObject<HTMLInputElement>;
|
|
21
|
+
usdAmount: string;
|
|
22
|
+
value: string;
|
|
23
|
+
autoFocus: boolean;
|
|
24
|
+
onContainerClick: () => void;
|
|
25
|
+
onMaxBalanceClick: () => void;
|
|
26
|
+
onInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExchangeRate } from './exchange-rate/exchange-rate';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PendingApprovalOverlay } from './pending-approval-overlay/pending-approval-overlay';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChangeEvent } from 'react';
|
|
2
|
+
export declare const useSlippageSelector: () => {
|
|
3
|
+
settings: {
|
|
4
|
+
slippage: number | "auto";
|
|
5
|
+
minSlippage?: number | undefined;
|
|
6
|
+
isInfiniteAllowance: boolean;
|
|
7
|
+
isMultiAssetWithdrawalEnabled: boolean;
|
|
8
|
+
isMaxSlippageLoading: boolean;
|
|
9
|
+
};
|
|
10
|
+
tradingType: import("../../../../../../core-ui-kit/dist/trading-panel.types-hhd3i-Wf").b;
|
|
11
|
+
isCustomSlippage: boolean;
|
|
12
|
+
invalidSlippage: boolean;
|
|
13
|
+
onDefaultSlippageSelect: () => void;
|
|
14
|
+
onCustomSlippageSelect: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TokenAllowanceSwitch: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const useValidWithdrawButton: () => {
|
|
2
|
+
requiresWithdrawalWindow: boolean;
|
|
3
|
+
requiresEndOfCooldown: boolean;
|
|
4
|
+
requiresApprove: boolean;
|
|
5
|
+
requiresHighSlippageConfirm: boolean;
|
|
6
|
+
requiresUpdate: boolean;
|
|
7
|
+
sendTokenSymbol: string;
|
|
8
|
+
slippageToBeUsed: number;
|
|
9
|
+
cooldownEndsInTime: string;
|
|
10
|
+
withdrawalWindowStartTime: string;
|
|
11
|
+
approve: () => Promise<void>;
|
|
12
|
+
updateOracles: () => Promise<void>;
|
|
13
|
+
confirmHighSlippage: () => void;
|
|
14
|
+
};
|