baseui
Version:
A React Component library implementing the Base design language
65 lines (64 loc) • 2.14 kB
TypeScript
import * as React from 'react';
import type { BaseInputProps, InternalState } from './types';
import type { SyntheticEvent, FocusEvent } from 'react';
declare class BaseInput<T extends HTMLInputElement | HTMLTextAreaElement> extends React.Component<BaseInputProps<T>, InternalState> {
static defaultProps: {
'aria-activedescendant': any;
'aria-autocomplete': any;
'aria-controls': any;
'aria-errormessage': any;
'aria-haspopup': any;
'aria-label': any;
'aria-labelledby': any;
'aria-describedby': any;
adjoined: "none";
autoComplete: string;
autoFocus: boolean;
disabled: boolean;
error: boolean;
positive: boolean;
name: string;
inputMode: string;
onBlur: () => void;
onChange: () => void;
onKeyDown: () => void;
onKeyPress: () => void;
onKeyUp: () => void;
onFocus: () => void;
onClear: () => void;
clearable: boolean;
clearOnEscape: boolean;
overrides: {};
pattern: any;
placeholder: string;
required: boolean;
role: any;
size: "default";
type: string;
readOnly: boolean;
};
inputRef: React.RefObject<T>;
state: {
isFocused: boolean;
isMasked: boolean;
initialType: string;
isFocusVisibleForClear: boolean;
isFocusVisibleForMaskToggle: boolean;
};
componentDidMount(): void;
componentWillUnmount(): void;
clearValue(): void;
onInputKeyDown: (e: KeyboardEvent) => void;
onClearIconClick: () => void;
onFocus: (e: FocusEvent<T>) => void;
onBlur: (e: FocusEvent<T>) => void;
getInputType(): string;
handleFocusForMaskToggle: (event: SyntheticEvent) => void;
handleBlurForMaskToggle: (event: SyntheticEvent) => void;
renderMaskToggle(): React.JSX.Element;
handleFocusForClear: (event: SyntheticEvent) => void;
handleBlurForClear: (event: SyntheticEvent) => void;
renderClear(): React.JSX.Element;
render(): React.JSX.Element;
}
export default BaseInput;