import React from 'react'; import { FlintSelect as FlintSelectElement } from '@getufy/flint-ui/select/flint-select'; /** * A select component for choosing one or multiple options from a list. * * @slot icon - Optional icon shown at the start of the trigger. * @slot error-message - Optional slot for error message content (use error-message prop for simple text). */ export interface FlintSelectProps extends Omit, 'defaultValue'> { /** Label text displayed above the select. */ label?: string; /** * Array of selectable options. * Type: `SelectOption[]` */ options?: FlintSelectElement['options']; /** Current value (controlled). When set, the component reflects this value and does not manage its own state. Accepts a single string or an array of strings. */ value?: string | string[]; /** Allow multiple selections. */ multiple?: boolean; /** Placeholder text when no value is selected. */ placeholder?: string; /** Disables the select and prevents interaction. */ disabled?: boolean; /** Makes the select read-only. */ readonly?: boolean; /** Marks the select as required for form validation. */ required?: boolean; /** Whether the select is in an error state. */ error?: boolean; /** Error message displayed below the select. */ errorMessage?: string; /** Form field name used when submitting form data. */ name?: string; /** * Size variant of the select. * Allowed values: 'sm' | 'md' | 'lg' */ size?: 'sm' | 'md' | 'lg'; /** Initial value (uncontrolled). Only used on first render; ignored after mount. Single-select only. */ defaultValue?: string; /** When true, the dropdown uses `position: fixed` so it can escape */ hoist?: boolean; /** * Async options loader. When provided, called when the dropdown opens. * Type: `((searchTerm?: string) => Promise) | null` */ loadOptions?: FlintSelectElement['loadOptions']; /** When true, shows a clear button in the trigger when a value is selected. */ clearable?: boolean; /** When true, adds a text input for filtering options by label. */ searchable?: boolean; /** Maximum number of chips visible in multi-select mode. */ maxTagsVisible?: string; /** Enable virtual scrolling for large option lists. */ virtualize?: boolean; /** Fixed item height in px used for virtual scroll calculations. */ itemHeight?: number; /** Maximum visible items in the dropdown (determines dropdown height). */ visibleItems?: number; /** * Dispatched when the selection changes. detail: `{ value: string, multiple: false } | { value: string[], multiple: true }` * DOM event: `flint-select-change` */ onFlintSelectChange?: (event: CustomEvent) => void; /** * Dispatched when the clear button is clicked. * DOM event: `flint-clear` */ onFlintClear?: (event: CustomEvent) => void; } export declare const FlintSelect: React.ForwardRefExoticComponent>;