1 | import * as React from 'react';
|
2 | import { InputProps } from './Input';
|
3 | import { DirectionType } from '../config-provider';
|
4 | import { SizeType } from '../config-provider/SizeContext';
|
5 | declare const ClearableInputType: ["text", "input"];
|
6 | export declare function hasPrefixSuffix(props: InputProps | ClearableInputProps): boolean;
|
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 | }
|
23 |
|
24 | interface ClearableInputProps extends BasicProps {
|
25 | size?: SizeType;
|
26 | suffix?: React.ReactNode;
|
27 | prefix?: React.ReactNode;
|
28 | addonBefore?: React.ReactNode;
|
29 | addonAfter?: React.ReactNode;
|
30 | triggerFocus?: () => void;
|
31 | }
|
32 | declare class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
33 |
|
34 | private containerRef;
|
35 | onInputMouseUp: React.MouseEventHandler;
|
36 | renderClearIcon(prefixCls: string): JSX.Element | null;
|
37 | renderSuffix(prefixCls: string): JSX.Element | null;
|
38 | renderLabeledIcon(prefixCls: string, element: React.ReactElement): JSX.Element;
|
39 | renderInputWithLabel(prefixCls: string, labeledElement: React.ReactElement): JSX.Element;
|
40 | renderTextAreaWithClearIcon(prefixCls: string, element: React.ReactElement): JSX.Element;
|
41 | render(): JSX.Element;
|
42 | }
|
43 | export default ClearableLabeledInput;
|