27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
|
import React from 'react';
|
||
|
import type { InputRef, InputProps as RcInputProps } from 'rc-input';
|
||
|
import type { InputStatus } from '../_util/statusUtils';
|
||
|
import type { SizeType } from '../config-provider/SizeContext';
|
||
|
import type { Variant } from '../config-provider';
|
||
|
export interface InputFocusOptions extends FocusOptions {
|
||
|
cursor?: 'start' | 'end' | 'all';
|
||
|
}
|
||
|
export type { InputRef };
|
||
|
export declare function triggerFocus(element?: HTMLInputElement | HTMLTextAreaElement, option?: InputFocusOptions): void;
|
||
|
export interface InputProps extends Omit<RcInputProps, 'wrapperClassName' | 'groupClassName' | 'inputClassName' | 'affixWrapperClassName' | 'classes'> {
|
||
|
rootClassName?: string;
|
||
|
size?: SizeType;
|
||
|
disabled?: boolean;
|
||
|
status?: InputStatus;
|
||
|
/** @deprecated Use `variant="borderless"` instead. */
|
||
|
bordered?: boolean;
|
||
|
/**
|
||
|
* @since 5.13.0
|
||
|
* @default "outlined"
|
||
|
*/
|
||
|
variant?: Variant;
|
||
|
[key: `data-${string}`]: string | undefined;
|
||
|
}
|
||
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
|
||
|
export default Input;
|