import { ChangeEvent, TextareaHTMLAttributes } from 'react';
import { BaseSize } from '@befe/brick-core';
export declare const TEXTAREA_SIZES: readonly ["sm", "md"];
type TextareaSize = BaseSize;
type NativeTextareaProps = Omit, 'style' | 'defaultValue'>;
interface NodeStyleType {
boxSizing: string;
paddingSize: number;
borderSize: number;
sizingStyle: string;
}
export declare function getNodeStyle(node?: Element): NodeStyleType;
export interface TextareaProps extends NativeTextareaProps {
/**
* 自定义 class
*/
className?: string;
/**
* 输入值
*/
value?: string;
/**
* 默认值
*/
defaultValue?: string;
/**
* 尺寸
* use config context `baseSize` as default
*/
size?: TextareaSize;
/**
* 是否禁用
*/
disabled?: boolean;
/**
* 是否只读
*/
readOnly?: boolean;
/**
* 文本框状态
*/
status?: 'normal' | 'error';
/**
* 行数
*/
rows?: number;
/**
* 不提供列数
*/
/**
* 最小行数
*
* **注意** 设置了最小行数,即启用了高度自适应
*/
minRows?: number;
/**
* 最大行数
*/
maxRows?: number;
/**
* 最大输入长度,
*
* **注意** 仅做字数提示
*/
maxLength?: number;
/**
* 字数计数函数
*/
textCounter?: (value: string) => number;
/**
* @private 无提供必要性
* 是否允许溢出输入
*/
/**
* 值变化时的回调
*/
onChange?: (e: ChangeEvent) => void;
}
/**
* 对外 ref:暴露实例方法 focus / blur / select(对齐原 class 的 @public 方法)
*/
export interface TextareaHandle {
focus(): void;
blur(): void;
select(): void;
}
export declare const Textarea: import("react").ForwardRefExoticComponent>;
export {};