import * as React from 'react'; import type { HasDataAttribute, HasRootRef } from '../../types'; import { type IconButtonProps } from '../IconButton/IconButton'; export type RenderIconButtonFn = (icon: React.ReactNode, props?: (Partial & HasDataAttribute) | undefined) => React.ReactElement; export interface SearchProps extends Pick, 'autoComplete' | 'autoCapitalize' | 'autoCorrect' | 'disabled' | 'list' | 'maxLength' | 'minLength' | 'name' | 'pattern' | 'enterKeyHint' | 'placeholder' | 'readOnly' | 'required' | 'value' | 'form' | 'onChange' | 'onFocus' | 'onBlur'>, Omit, 'onChange' | 'onFocus' | 'onBlur'>, HasRootRef { /** * @deprecated Since 7.9.0. Вместо этого используйте `slotProps={ input: { getRootRef: ... } }`. */ getRef?: React.Ref | undefined; /** * Свойства, которые можно прокинуть внутрь компонента: * - `root`: свойства для прокидывания в корень компонента; * - `input`: свойства для прокидывания в поле ввода; * - `clearButton`: свойства для прокидывания в кнопку очистки. */ slotProps?: { root?: (React.HTMLAttributes & HasRootRef & HasDataAttribute) | undefined; input?: React.InputHTMLAttributes & HasRootRef & HasDataAttribute; clearButton?: React.HTMLAttributes & HasRootRef & HasDataAttribute; } | undefined; /** * Only iOS. Текст кнопки "отмена", которая чистит текстовое поле и убирает фокус. */ after?: React.ReactNode | undefined; /** * Контент, отображаемый перед полем ввода. */ before?: React.ReactNode | undefined; /** * Иконка поиска. Может быть React-элементом или функцией, возвращающей элемент. */ icon?: React.ReactNode | ((renderFn: RenderIconButtonFn) => React.ReactNode) | undefined; /** * Обработчик нажатия на иконку поиска. */ onIconClick?: React.PointerEventHandler | undefined; /** * Значение поля ввода по умолчанию. */ defaultValue?: string | undefined; /** * Текст для скринридеров, описывающий иконку поиска. */ iconLabel?: string | undefined; /** * Текст для скринридеров, описывающий кнопку очистки. */ clearLabel?: string | undefined; /** * @deprecated Since 8.1.0. Будет удалено в **VKUI v10**. Вместо этого используйте `slotProps={ clearButton: { 'data-testid': ... } }`. * * Передает атрибут `data-testid` для кнопки очистки. */ clearButtonTestId?: string | undefined; /** * Удаляет отступы у компонента. */ noPadding?: boolean | undefined; /** * Текст для кнопки Найти. */ findButtonText?: string | undefined; /** * Обработчик, при нажатии на кнопку "Найти". */ onFindButtonClick?: React.MouseEventHandler | undefined; /** * Передает атрибут `data-testid` для кнопки поиска. */ findButtonTestId?: string | undefined; /** * Скрывает кнопку очистки. */ hideClearButton?: boolean | undefined; } /** * @see https://vkui.io/components/search */ export declare const Search: ({ after, before, icon: iconProp, onIconClick, iconLabel, clearLabel, clearButtonTestId, noPadding, findButtonText, onFindButtonClick, findButtonTestId, hideClearButton, getRef, autoComplete, autoCapitalize, autoCorrect, disabled, list, maxLength, minLength, name, pattern, placeholder: placeholderProp, enterKeyHint, readOnly, required, value, form, id: idProp, inputMode, defaultValue, autoFocus, tabIndex, spellCheck, onChange: onChangeProp, onFocus: onFocusProp, onBlur: onBlurProp, slotProps, ...restProps }: SearchProps) => React.ReactNode; //# sourceMappingURL=Search.d.ts.map