import React from 'react'; import { StyledProps } from '@harnessio/design-system'; /** * Features: * - Search throttling (so it doesn't call "props.onChange" many times when user types so fast) * - defaultValue (e.g. remember last search text when get to the page) * - autoFocus initially */ export interface ExpandingSearchInputProps { name?: string; defaultValue?: string; placeholder?: string; onChange?: (text: string) => void; onEnter?: (text: string, reverse?: boolean) => void; onPrev?: (text: string) => void; onNext?: (text: string) => void; onKeyPress?: (event: React.KeyboardEvent) => void; autoFocus?: boolean; className?: string; throttle?: number; showPrevNextButtons?: boolean; fixedText?: string; flip?: boolean; width?: StyledProps['width']; alwaysExpanded?: boolean; theme?: 'light' | 'dark'; disabled?: boolean; } export interface ExpandingSearchInputHandle { focus(): void; clear(): void; } export declare function ExpandingSearchInput(props: ExpandingSearchInputProps, ref?: React.ForwardedRef): React.ReactElement; export declare const ExpandingSearchInputWithRef: React.ForwardRefExoticComponent>;