import * as React from 'react'; import { AsyncChildContext } from './Async'; import { Field } from './Field'; import { FieldFeedbacksChildContext } from './FieldFeedbacks'; import { FieldFeedbackType } from './FieldFeedbackType'; import { FieldFeedbackValidation } from './FieldFeedbackValidation'; import { FormWithConstraintsChildContext } from './FormWithConstraints'; import { InputElement } from './InputElement'; import { Nullable } from './Nullable'; declare type WhenString = 'valid' | '*' | 'badInput' | 'patternMismatch' | 'rangeOverflow' | 'rangeUnderflow' | 'stepMismatch' | 'tooLong' | 'tooShort' | 'typeMismatch' | 'valueMissing'; declare type WhenFn = (value: string) => boolean; declare type When = WhenString | WhenFn; export interface FieldFeedbackClasses { classes?: { [index: string]: string | undefined; error?: string; warning?: string; info?: string; whenValid?: string; }; } export interface FieldFeedbackBaseProps { when?: When; error?: boolean; warning?: boolean; info?: boolean; } export interface FieldFeedbackProps extends FieldFeedbackBaseProps, FieldFeedbackClasses, React.HTMLAttributes { } interface FieldFeedbackState { validation: FieldFeedbackValidation; validationMessage: string; } export declare type FieldFeedbackContext = FormWithConstraintsChildContext & FieldFeedbacksChildContext & Partial>; export declare class FieldFeedback extends React.Component { static defaultProps: FieldFeedbackProps; static contextTypes: React.ValidationMap; context: FieldFeedbackContext; readonly key: string; constructor(props: Props, context: FieldFeedbackContext); componentDidMount(): void; componentWillUnmount(): void; validate: (input: InputElement) => { key: string; type: FieldFeedbackType; show: boolean | undefined; }; fieldDidReset: (field: Field) => void; render(): JSX.Element | null; } export {};