@gearbox-protocol/ui-kit 3.14.0-next.1 → 3.14.0-next.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/components/smart-number-input/smart-number-input.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/esm/components/smart-number-input/smart-number-input.js +127 -100
- package/dist/esm/components/trading-view/trading-view.js +58 -58
- package/dist/globals.css +1 -1
- package/dist/types/components/smart-number-input/smart-number-input.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { TokenFullData } from '../../types/common';
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
export interface TokenOption {
|
|
5
|
+
/** Display label for this option. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional icon to display before the label. */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Called when this option is selected. */
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
}
|
|
4
12
|
/** A-matching SmartNumberInput size for layout (styles.tsx). */
|
|
5
13
|
export type SmartNumberInputSize = "sm" | "md";
|
|
6
14
|
export interface SmartNumberInputProps {
|
|
@@ -28,6 +36,10 @@ export interface SmartNumberInputProps {
|
|
|
28
36
|
size?: SmartNumberInputSize;
|
|
29
37
|
/** When true, currency dropdown is open (expand icon rotated). */
|
|
30
38
|
active?: boolean;
|
|
39
|
+
/** Override max character length for token symbol display. When omitted, computed from viewport width. */
|
|
40
|
+
symbolMaxLength?: number;
|
|
41
|
+
/** Inline token options for dropdown selection (alternative to onShowSelectDialog). */
|
|
42
|
+
tokenOptions?: TokenOption[];
|
|
31
43
|
/** Callback when amount changes. Called with (value: bigint, valueView: string). */
|
|
32
44
|
onSetAmount?: (value: bigint, valueView: string) => void;
|
|
33
45
|
/** Callback to show token select dialog. */
|