import React from 'react'; import { StyleProp, ViewStyle, TextStyle } from 'react-native'; export type Ux4gSearchFilterType = 'contains' | 'startsWith' | 'startsWithPerTerm'; export type Ux4gSearchFieldVariant = 'basicSearch' | 'searchWithSubmit' | 'autocomplete'; export type Ux4gSearchFieldSize = 'small' | 'medium' | 'large' | 'xl'; export declare const Ux4gSearchFieldSizeMap: Record; export type Ux4gSearchFieldStatus = 'defaultStatus' | 'error' | 'warning' | 'success'; export type Ux4gSearchFieldButtonStyle = 'filled' | 'tonal'; export interface Ux4gSearchFieldProps { /** * Current text string inside the search field. */ value: string; /** * Callback triggered when text inside the search field changes. */ onValueChange: (value: string) => void; /** * Filtering mode when searching options (`contains`, `startsWith`, `startsWithPerTerm`). * @default 'contains' */ filterType?: Ux4gSearchFilterType; /** * Search field variant (`basicSearch`, `searchWithSubmit`, `autocomplete`). * @default 'basicSearch' */ variant?: Ux4gSearchFieldVariant; /** * Size of the search field (`small` 32px, `medium` 40px, `large` 48px, `xl` 56px). * @default 'medium' */ size?: Ux4gSearchFieldSize; /** * Validation status (`defaultStatus`, `error`, `warning`, `success`). * @default 'defaultStatus' */ status?: Ux4gSearchFieldStatus; /** * Submit button style (`filled` or `tonal`). * @default 'filled' */ buttonStyle?: Ux4gSearchFieldButtonStyle; /** * Optional label displayed above the search box. */ label?: string; /** * Placeholder hint text displayed inside the search box when empty. */ placeholder?: string; /** * Optional caption or validation message displayed below the search box. */ caption?: string; /** * List of autocomplete options available for search/filtering. * @default [] */ options?: string[]; /** * Whether to display the microphone voice search icon. * @default true */ showVoiceIcon?: boolean; /** * Whether to display the clear (`close`) icon when text is entered. * @default true */ showClearIcon?: boolean; /** * Whether the search query is currently loading (`true` displays spinner). * @default false */ isLoading?: boolean; /** * Callback triggered when the voice search (`mic`) icon is pressed. */ onVoiceClick?: () => void; /** * Alias for `onVoiceClick`. */ onVoicePress?: () => void; /** * Callback triggered when the clear (`close`) icon is pressed. */ onClearClick?: () => void; /** * Alias for `onClearClick`. */ onClearPress?: () => void; /** * Callback triggered when the submit button is pressed or search is submitted via keyboard. */ onSubmitClick?: (value: string) => void; /** * Alias for `onSubmitClick`. */ onSubmitPress?: (value: string) => void; /** * Alias for `onSubmitClick`. */ onSubmitEditing?: (value: string) => void; /** * Callback triggered when an option from the autocomplete list is selected. */ onOptionSelected?: (option: string) => void; /** * Whether the search field is interactive (`true`) or disabled (`false`). * @default true */ enabled?: boolean; /** * Whether the search field is read-only (`true`) or editable (`false`). * @default false */ readOnly?: boolean; /** * Minimum height constraint for the autocomplete dropdown list. * @default 0 */ dropdownMinHeight?: number; /** * Maximum height constraint for the autocomplete dropdown list. * @default 350 */ dropdownMaxHeight?: number; /** * Whether to render the dropdown inside a top-level Modal (`true`) or inline absolute positioned (`false`). * Inline (`false`) preserves keyboard focus seamlessly while typing. * @default false */ useModalOverlay?: boolean; /** * Custom style for search input text (`style`). */ style?: StyleProp; /** * Custom style for placeholder text (`placeholderStyle`). */ placeholderStyle?: StyleProp; /** * Custom style for top label (`labelStyle`). */ labelStyle?: StyleProp; /** * Custom style for bottom caption text (`captionStyle`). */ captionStyle?: StyleProp; /** * Custom background color override (`backgroundColor`). */ backgroundColor?: string; /** * Custom border color override (`borderColor`). */ borderColor?: string; /** * Custom outer container style. */ containerStyle?: StyleProp; /** * Optional testID for automated testing. */ testID?: string; } /** * **Ux4gSearchField** (`SearchField`) * * Direct React Native port of Flutter `search_field.dart` (`Ux4gSearchField`). * Complete feature parity across sizes (`small`, `medium`, `large`, `xl`), variants (`basicSearch`, `searchWithSubmit`, `autocomplete`), * filter types (`contains`, `startsWith`, `startsWithPerTerm`), statuses (`defaultStatus`, `error`, `warning`, `success`), * filled/tonal submit buttons, voice/clear icons, loading spinner, and autocomplete option list overlays. */ export declare const Ux4gSearchField: React.FC; //# sourceMappingURL=SearchField.d.ts.map