import { ChakraComponent, ChakraProps, BoxProps } from '@chakra-ui/react'; import { default as React, FormHTMLAttributes } from 'react'; import { HelperErrorTextType } from '../HelperErrorText/HelperErrorText'; import { SelectProps as InitialSelectProps } from '../Select/Select'; import { InputProps as InitialInputProps } from '../TextInput/TextInput'; interface SelectOptionsProps { text: string; value: string; } export type SelectProps = Partial> & { optionsData: SelectOptionsProps[]; }; export type TextInputProps = Pick & Partial>; export interface SearchBarProps extends Pick, Omit, "color"> { /** The onClick callback function for the `Button` component. */ buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void; /** Optional string for the SearchBar's description above the component. */ descriptionText?: string; /** Optional string value used to set the text for a `Heading` component, or * a DS Heading component that can be passed in. */ headingText?: string | JSX.Element; /** The text to display below the form in a `HelperErrorText` component. */ helperText?: HelperErrorTextType; /** Optional string to populate the `HelperErrorText` for the error state * when `isInvalid` is true. */ invalidText?: HelperErrorTextType; /** Sets children form components in the disabled state. */ isDisabled?: boolean; /** Sets children form components in the error state. */ isInvalid?: boolean; /** Sets children form components in the required state. */ isRequired?: boolean; /** Populates the `aria-label` attribute on the form element. */ labelText: string; /** Sets the `Button` variant type to `noBrand` when true; * false by default which sets the type to `primary`. */ noBrandButtonType?: boolean; /** Required props to render a `Select` element. */ selectProps?: SelectProps | undefined; /** Custom input element to render instead of a `TextInput` element. */ textInputElement?: JSX.Element; /** Required props to render a `TextInput` element. */ textInputProps?: TextInputProps | undefined; } /** * `SearchBar` renders a wrapper `form` element containing an `Input`, `Button`, * and optional `Select`. */ export declare const SearchBar: ChakraComponent>, SearchBarProps>; export default SearchBar;