1 | import * as React from 'react';
|
2 | import { OUIAProps } from '../../helpers';
|
3 | export declare enum TextInputTypes {
|
4 | text = "text",
|
5 | date = "date",
|
6 | datetimeLocal = "datetime-local",
|
7 | email = "email",
|
8 | month = "month",
|
9 | number = "number",
|
10 | password = "password",
|
11 | search = "search",
|
12 | tel = "tel",
|
13 | time = "time",
|
14 | url = "url"
|
15 | }
|
16 | export interface TextInputProps extends Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'disabled' | 'ref'>, OUIAProps {
|
17 |
|
18 | className?: string;
|
19 |
|
20 | isDisabled?: boolean;
|
21 |
|
22 | isReadOnly?: boolean;
|
23 |
|
24 | isRequired?: boolean;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | validated?: 'success' | 'warning' | 'error' | 'default';
|
30 |
|
31 | onChange?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
|
32 |
|
33 | type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url';
|
34 |
|
35 | value?: string | number;
|
36 |
|
37 | 'aria-label'?: string;
|
38 |
|
39 | innerRef?: React.RefObject<any>;
|
40 |
|
41 | isLeftTruncated?: boolean;
|
42 |
|
43 | onFocus?: (event?: any) => void;
|
44 |
|
45 | onBlur?: (event?: any) => void;
|
46 |
|
47 | iconVariant?: 'calendar' | 'clock' | 'search';
|
48 |
|
49 | isIconSprite?: boolean;
|
50 |
|
51 | customIconUrl?: string;
|
52 |
|
53 | customIconDimensions?: string;
|
54 | }
|
55 | interface TextInputState {
|
56 | ouiaStateId: string;
|
57 | }
|
58 | export declare class TextInputBase extends React.Component<TextInputProps, TextInputState> {
|
59 | static displayName: string;
|
60 | static defaultProps: TextInputProps;
|
61 | inputRef: React.RefObject<HTMLInputElement>;
|
62 | observer: any;
|
63 | constructor(props: TextInputProps);
|
64 | handleChange: (event: React.FormEvent<HTMLInputElement>) => void;
|
65 | componentDidMount(): void;
|
66 | componentWillUnmount(): void;
|
67 | handleResize: () => void;
|
68 | restoreText: () => void;
|
69 | onFocus: (event?: any) => void;
|
70 | onBlur: (event?: any) => void;
|
71 | render(): JSX.Element;
|
72 | private sanitizeInputValue;
|
73 | }
|
74 | export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
75 | export {};
|
76 |
|
\ | No newline at end of file |