import type { FunctionComponent, ReactNode } from 'react'; import type { BaseProps, ForwardProps } from '../../types'; import type { AdditionalInfoProps } from '../AdditionalInfo'; export interface FormControlProps extends BaseProps { /** * Sets DOM id for the control and associates label element via 'for' attribute. * If an id is not pass, a random id will be generated for any render. */ id?: string; /** Set visual state based on a validation state. */ status?: 'success' | 'warning' | 'error' | 'pending'; /** Pass a string or a fragment with an Icon and string. */ label?: ReactNode; /** Visually hides the label region. */ labelHidden?: boolean; /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */ info?: ReactNode; /** Indicate if the field is required. The browser defaults to false. */ required?: boolean; /** Placeholder text. The browser defaults to an empty string. */ placeholder?: string; /** Button when clicked will show additional information on a field */ additionalInfo?: { heading?: AdditionalInfoProps['heading']; content: AdditionalInfoProps['children']; }; /** * Creates a controlled input and sets the value. Requires an onChange handler to update value. * value + onChange is the recommended method per React team. */ value?: string; /** * If you wish to use an [uncontrolled input](https://reactjs.org/docs/uncontrolled-components.html), * pass a defaultValue prop and a ref to access the input's native value prop or by other DOM ref means. */ defaultValue?: string; /** Disable the control. The browser defaults to false. */ disabled?: boolean; /** Makes the input non editable and non clickable. The browser defaults to false. */ readOnly?: boolean; /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */ name?: string; /** Callback fired when AI suggestion is accepted/rejected */ onResolveSuggestion?: (accepted: boolean) => void; } export interface HandleValue { /** Used to clear component inputs with imperative handle */ clear: () => void; } export declare const StyledFormControl: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute, HTMLDivElement>, Pick & Required> & { hasSuggestion?: boolean; }>> & string; declare const FormControl: FunctionComponent; export default FormControl; //# sourceMappingURL=FormControl.d.ts.map