import React from 'react'; import PropTypes from 'prop-types'; import { StandardProps, Overwrite } from '../../util/component-types'; import { ITextFieldProps } from '../TextField/TextField'; import { ITextFieldState } from '../TextField/TextField'; interface ISearchFieldIcon extends StandardProps { } interface ISearchFieldTextField extends ITextFieldProps { } export interface ISearchFieldState extends ITextFieldState { } export interface ISearchFieldProps extends StandardProps { /** Fires an event every time the user types text into the TextField. */ onChange?: (value: string, { event, props }: { event: React.FormEvent; props: ITextFieldProps; }) => void; /** Fires an event, debounced by \`debounceLevel\`, when the user types text into the TextField. */ onChangeDebounced?: (value: string, { event, props }: { event: React.FormEvent; props: ITextFieldProps; }) => void; /** Number of milliseconds to debounce the \`onChangeDebounced\` callback. Only useful if you provide an \`onChangeDebounced\` handler. */ debounceLevel?: number; /** Fires an event when the user hits "enter" from the SearchField. */ onSubmit?: (value: string, { event, props }: { event: React.FormEvent; props: ITextFieldProps; }) => void; /** Set the value of the input. */ value?: string | number; /** Controls the highlighting of the search icon. Should be passed \`true\` when the search text is valid, e.g. contains enough characters to perform a search. */ isValid?: boolean; /** Disables the SearchField by greying it out. */ isDisabled?: boolean; /**n placeholder value */ placeholder?: string; } declare type ISearchFieldPropsWithPassThroughs = Overwrite, HTMLInputElement>, ISearchFieldProps>; declare class SearchField extends React.Component { static displayName: string; static TextField: { (_props: ISearchFieldTextField): null; peek: { description: string; }; displayName: string; propName: string; }; static Icon: { (_props: ISearchFieldIcon): null; peek: { description: string; }; displayName: string; propName: string; }; static peek: { description: string; categories: string[]; madeFrom: string[]; }; static reducers: { onChange: typeof import("../TextField/TextField.reducers").onChange; }; static propTypes: { /** Fires an event every time the user types text into the TextField. Signature: \`(value, { event, props }) => {}\` */ onChange: PropTypes.Requireable<(...args: any[]) => any>; /** Fires an event, debounced by \`debounceLevel\`, when the user types text into the TextField. Signature: \`(value, { event, props }) => {}\` */ onChangeDebounced: PropTypes.Requireable<(...args: any[]) => any>; /** Number of milliseconds to debounce the \`onChangeDebounced\` callback. Only useful if you provide an \`onChangeDebounced\` handler. */ debounceLevel: PropTypes.Requireable; /** Fires an event when the user hits "enter" from the SearchField. Signature: \`(value, { event, props }) => {}\` */ onSubmit: PropTypes.Requireable<(...args: any[]) => any>; /** Set the value of the input. */ value: PropTypes.Requireable; /** Controls the highlighting of the search icon. Should be passed \`true\` when the search text is valid, e.g. contains enough characters to perform a search. */ isValid: PropTypes.Requireable; /** Disables the SearchField by greying it out. */ isDisabled: PropTypes.Requireable; /** placeholder value */ placeholder: PropTypes.Requireable; /** Appended to the component-specific class names set on the root element. */ className: PropTypes.Requireable; Icon: PropTypes.Requireable; /** Icon this is displayed on the right side of the SearchField. Any of the lucid \`*Icon\` components should work. */ /** The TextField that Searchfield is composed of. */ TextField: PropTypes.Requireable; }; static defaultProps: { isDisabled: boolean; onChange: (...args: any[]) => void; onChangeDebounced: (...args: any[]) => void; debounceLevel: number; onSubmit: (...args: any[]) => void; value: string; }; private textFieldElement; focus: (options?: FocusOptions | undefined) => void; render(): React.ReactNode; } declare const _default: typeof SearchField & import("../../util/state-management").IHybridComponent; export default _default; export { SearchField as SearchFieldDumb }; //# sourceMappingURL=SearchField.d.ts.map