import * as React from 'react'; import { GetClasses } from '../../typeUtils'; import { BaseFormElement } from '../_private/forms'; export declare const SearchFieldStylesKey = "ChromaSearchField"; export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"button" | "input" | "root" | "fullWidth" | "inputInverse" | "helpMessage" | "inputHeight0" | "inputHeight1" | "buttonHeight0" | "buttonHeight1" | "buttonSvg" | "buttonSvgInverse" | "buttonSvgClear" | "buttonSvgClearInverse">; export declare type SearchFieldClasses = GetClasses; export interface SearchFieldProps extends React.ComponentPropsWithRef<'input'>, Pick { buttonType?: string; color?: 'default' | 'inverse'; disableClearOnSearch?: boolean; fullWidth?: boolean; onClear?: () => any; onSearch?(textValue: string | number | string[] | undefined): any; height?: 0 | 1; } /** * An input for providing search functionality. The Search Field user experience is: * * - Input receives focus * - User begins typing and the search magnifying glass becomes an "x" to clear the * input * - If the user clicks the "x", the input will be cleared * - To submit the search, the user presses the Enter key on their keyboard * - Upon submission, the input field is cleared. The expected behavior is that the * UI will prompt the user that a search has occurred with the string of text * they have entered. This can be done with a Pill or Chip component. * * If you'd prefer overriding this UX, provide the `disableClearOnSearch` prop as * described below. * * ### Accessibility * * - The component has `type="search"`. * - The component has `aria-label` set to the provided label. * - The component uses a uniqueId to link the input to the help message via * `aria-describedby`. This allows screenreaders to read the help message. * - The icon button cannot be tabbed into - keyboard support of Escape to clear * and Enter to submit is supported instead. This mimics the default * `` behavior. * - The inner icon has `aria-hidden` and `role="img"` attributes. * * ### Links * * - [Component Source](https://github.com/lifeomic/chroma-react/blob/master/src/components/SearchField/SearchField.tsx) * - [Story Source](https://github.com/lifeomic/chroma-react/blob/master/stories/components/SearchField/SearchField.stories.tsx) */ export declare const SearchField: React.ForwardRefExoticComponent & React.RefAttributes>;