import { Ref, ChangeEvent } from 'react'; import { InputProps as BaseInputProps, StatefulInputProps as BaseStatefulInputProps, SharedProps as BaseSharedProps, InputOverrides as BaseUIInputOverrides } from '../baseui/input'; import { SpacewebComponentProps, Intent } from '../types'; import { Override } from '../overrides'; /** * lg size is deprecated. Please use md. */ export declare type InputSize = 'xxxs' | 'xs' | 'sm' | 'md' | 'lg'; export declare type InputVariant = 'default' | 'line'; export declare type InputOverrides = { [key in keyof BaseUIInputOverrides]?: Override>; }; /** * Position of the cursor when input element is focussed * 1. 'start' - beginning of input value * 2. 'end' - end of input value * 3. number - [0, input.value.length] (specific position in input value) * 4. boolean - true (end of input value) * - false (does not focus) */ export declare type FocusPosition = 'start' | 'end' | number | boolean; declare type CommonInputProps = { variant?: InputVariant; size?: InputSize; overrides?: InputOverrides; intent?: Intent; debouncedOnChange?: (e: ChangeEvent) => void; debounceInterval?: number; autoFocus?: FocusPosition; inputRef?: Ref; onChange?: (e: ChangeEvent) => void; }; export declare type SharedProps = Omit & { $isStart: boolean; $size: InputSize; $variant: InputVariant; $intent: Intent; }; export declare type InputProps = Omit, 'positive' | 'error' | keyof CommonInputProps> & CommonInputProps; export declare type StatefulInputProps = Omit, 'positive' | 'error' | keyof CommonInputProps> & CommonInputProps; export interface MaskedInputProps extends InputProps { mask?: string; maskChar?: string; } export {};