/*! * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import { type ComponentProps } from 'react'; import { TextInput } from '../text-input'; type SearchFieldTextInputProps = Pick, 'className' | 'errorText' | 'helpText' | 'htmlAttributes' | 'isDisabled' | 'isFluid' | 'isLoading' | 'isReadOnly' | 'isSkeletonLoading' | 'onChange' | 'placeholder' | 'ref' | 'size' | 'skeletonProps' | 'style' | 'value'>; export type SearchFieldProps = SearchFieldTextInputProps & { /** * Accessible name for the search field. The label is announced by assistive * technologies but is not rendered visually. */ label: string; /** * Called with the search query after typing pauses for `debounceDelay`, and * immediately when the user presses Enter or clears the field. */ onSearch?: (query: string) => void; /** * Delay in milliseconds before calling `onSearch` after the query changes. * @default 500 */ debounceDelay?: number; }; /** * A text input for entering search queries. * * @remarks * SearchField renders a fixed search icon and uses the native `search` input * type. `onChange` is called immediately, while `onSearch` is debounced until * typing pauses. Pressing Enter or clearing the field calls `onSearch` * immediately. */ export declare const SearchField: ({ debounceDelay, htmlAttributes, label, onChange, onSearch, ...textInputProps }: SearchFieldProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=SearchField.d.ts.map