1 | import * as React from 'react';
|
2 | import type { DirectionType } from '../config-provider';
|
3 | import type { SizeType } from '../config-provider/SizeContext';
|
4 | import type { FormItemStatusContextProps } from '../form/context';
|
5 | import type { InputStatus } from '../_util/statusUtils';
|
6 | declare const ClearableInputType: ["text", "input"];
|
7 |
|
8 | interface BasicProps {
|
9 | prefixCls: string;
|
10 | inputType: typeof ClearableInputType[number];
|
11 | value?: any;
|
12 | allowClear?: boolean;
|
13 | element: React.ReactElement;
|
14 | handleReset: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
15 | className?: string;
|
16 | style?: React.CSSProperties;
|
17 | disabled?: boolean;
|
18 | direction?: DirectionType;
|
19 | focused?: boolean;
|
20 | readOnly?: boolean;
|
21 | bordered: boolean;
|
22 | hidden?: boolean;
|
23 | }
|
24 |
|
25 | export interface ClearableInputProps extends BasicProps {
|
26 | size?: SizeType;
|
27 | suffix?: React.ReactNode;
|
28 | prefix?: React.ReactNode;
|
29 | addonBefore?: React.ReactNode;
|
30 | addonAfter?: React.ReactNode;
|
31 | triggerFocus?: () => void;
|
32 | status?: InputStatus;
|
33 | hashId?: string;
|
34 | }
|
35 | declare class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
36 | renderClearIcon(prefixCls: string): JSX.Element;
|
37 | renderTextAreaWithClearIcon(prefixCls: string, element: React.ReactElement, statusContext: FormItemStatusContextProps): JSX.Element;
|
38 | render(): JSX.Element;
|
39 | }
|
40 | export default ClearableLabeledInput;
|