import { ReactElement, ReactNode, HTMLInputTypeAttribute } from 'react';
import { PopoverProps } from '../popover/popover';
import { InputProps } from '../typings';
export interface ControlTextProps extends Omit {
id: string;
onChange: (value: string, id: string) => void;
value?: string | number;
type?: HTMLInputTypeAttribute;
label?: string | ReactNode;
noAuto?: boolean;
optional?: boolean;
aside?: ReactNode;
validationError?: ReactNode;
errorStyle?: 'default' | 'inline';
popoverProps?: Partial;
themeControlInput?: string;
themeControlWrapper?: string;
themeLabel?: string;
}
declare function ControlText({ id, onChange, value, label, aside, type, optional, validationError, errorStyle, noAuto, themeLabel, themeControlInput, themeControlWrapper, ...props }: ControlTextProps): ReactElement;
declare namespace ControlText {
var propTypes: {
/** Unique id for this control. Required if you want a `label`. */
id: any;
/**
* Invoked when the control's value changes.
* Passed two arguments:
*
* - `value` the current value of the input passes as a string
* - The `id` prop.
*/
onChange: any;
/** The control's value. Can be an empty string to indicate no value. */
value: any;
/** Type attribute to override the existing default of 'text' */
type: any;
/** Label for the control. Label can be string or ReactNode. */
label: any;
/** Enable/Disable browser enabled autocorrect or spelling suggestions from the element. */
noAuto: any;
/** If provided, "(optional)" is appended to the value of the legend element. */
optional: any;
/** Additional content inserted alongside the label element. */
aside: any;
/** If provided, the value of this propery displays as an error message. */
validationError: any;
/**
* Sets the style of the error message. There are two options:
*
* - `default` the standard presentation control components display an error
* message: beneath the input.
* - `inline` An error indicator is displayed to the right of the element
* with the value of `validationError` prop displayed in a tooltip.
*/
errorStyle: any;
/**
* Props to pass directly to the [Popover](#popover) component when inline error validation is in use. See Popover's
* documentation for details.
*/
popoverProps: any;
/** Classes to apply to the input element */
themeControlInput: any;
/** Classes to apply to the control wrapper */
themeControlWrapper: any;
/** classes to apply to the label element */
themeLabel: any;
};
}
export default ControlText;