import { type UIEventHandler } from 'react'; import { type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components'; import { type TagGroupProps } from '../tag/tag-group.js'; import type { ApiProps, CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js'; /** Represents the state of the `TagField` component for validation purposes. */ export interface TagFieldValidationValue { /** The selected keys in the TagField. */ selectedKeys: Set | null; /** The value of the TagField input. */ inputValue: string; } export interface TagFieldProps extends CommonProps, FieldWithPlaceholderProps, CollectionProps, ApiProps, Pick, 'isRequired' | 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onInputChange' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick, 'renderEmptyState'> { /** The currently selected keys in the collection (controlled). */ selectedKeys?: Iterable; /** The initial selected keys in the collection (uncontrolled). */ defaultSelectedKeys?: Iterable; /** Handler that is called when the selection changes. */ onSelectionChange?: (keys: Set) => void; /** * Whether the list of options should be virtualized. Use this as a performance optimization for large lists. * @default false */ isVirtualized?: boolean; /** Handler that is called when the list of items is scrolled. */ onScroll?: UIEventHandler; } /** The imperative API exposed by the `TagField` component. */ export interface TagFieldApi { /** Focuses the input field and opens the list of items. */ focus: () => void; } /** * Allows users to filter a collapsible list and select multiple items from it. * * See [tag field usage guidelines](https://ui.cimpress.io/components/tag-field). */ declare const _TagField: (props: TagFieldProps & import("react").RefAttributes & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null; export { _TagField as TagField }; export interface TagFieldItemProps extends Pick, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> { /** The ID of the item. Has to be unique across all sections and items. */ id?: Key; /** The content to display as the label. */ children: StringLikeChildren; } /** Renders a single list item within `TagField`. */ export declare function TagFieldItem({ children, ...props }: TagFieldItemProps): import("react/jsx-runtime").JSX.Element; export declare namespace TagFieldItem { var displayName: string; } export interface TagFieldSectionProps extends CollectionProps { /** The ID of the section. Has to be unique across all sections and items. */ id?: Key; /** The content to display as the section title. */ title: string; } /** Groups list items within `TagField` into a section. */ export declare function TagFieldSection({ title, children, items, ...props }: TagFieldSectionProps): import("react/jsx-runtime").JSX.Element; export declare namespace TagFieldSection { var displayName: string; } //# sourceMappingURL=tag-field.d.ts.map