@wix/design-system
Version:
@wix/design-system
55 lines • 2.04 kB
TypeScript
import React from 'react';
import { dataAttr } from './constants';
import { StatusContextProps } from '../FormField/StatusContext';
import { InputAreaProps } from './InputArea.types';
interface InputAreaState {
focus: boolean;
counter: number;
computedRows: number | undefined;
}
/**
* General inputArea container
*/
declare class InputArea extends React.PureComponent<InputAreaProps, InputAreaState> {
textArea: HTMLTextAreaElement | null;
_computedStyle: CSSStyleDeclaration | null;
private _defaultLineHeight?;
state: {
focus: boolean;
counter: number;
computedRows: number | undefined;
};
static MIN_ROWS: number;
static MAX_ROWS: number;
static displayName: string;
static defaultProps: InputAreaProps;
_getDataAttr: ({ statusContext }: {
statusContext: StatusContextProps;
}) => Partial<{
[dataAttr.SIZE]: import("./InputArea.types").InputAreaSize | undefined;
[dataAttr.STATUS]: import("..").StatusType | null | undefined;
[dataAttr.DISABLED]: boolean;
[dataAttr.RESIZABLE]: boolean;
[dataAttr.HOVER]: boolean;
[dataAttr.FOCUS]: boolean;
}>;
componentDidMount(): void;
componentDidUpdate(prevProps: InputAreaProps): void;
componentWillUnmount(): void;
render(): React.JSX.Element;
focus: () => void;
blur: () => void;
select: () => void;
calculateComputedRows: () => void;
_onFocus: (e?: React.FocusEvent<HTMLTextAreaElement>) => void;
_onBlur: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
_onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
_onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
_onInput: () => void;
_updateComputedStyle: import("lodash").DebouncedFuncLeading<() => void>;
_getComputedStyle: () => CSSStyleDeclaration | null;
_getRowsCount: () => number;
_getDefaultLineHeight: () => number | undefined;
}
export default InputArea;
//# sourceMappingURL=InputArea.d.ts.map