import { AriaTokenFieldProps } from 'react-aria/useTokenField'; import { ClassNameOrFunction, ContextValue, RenderProps, SlotProps, StyleRenderProps } from './utils'; import { GlobalDOMAttributes } from '@react-types/shared'; import { HoverProps } from 'react-aria/useHover'; import React from 'react'; import { TokenFieldValue, TokenSegment } from 'react-stately/useTokenFieldState'; export interface TokenFieldRenderProps { /** * Whether the token field is disabled. * * @selector [data-disabled] */ isDisabled: boolean; /** * Whether the token field is read only. * * @selector [data-readonly] */ isReadOnly: boolean; } export interface TokenFieldProps extends AriaTokenFieldProps, RenderProps, SlotProps, GlobalDOMAttributes { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-TokenField' */ className?: ClassNameOrFunction; } export interface TokenInputRenderProps { /** * Whether the token input is currently hovered with a mouse. * * @selector [data-hovered] */ isHovered: boolean; /** * Whether the token input is focused, either via a mouse or keyboard. * * @selector [data-focused] */ isFocused: boolean; /** * Whether the token input is keyboard focused. * * @selector [data-focus-visible] */ isFocusVisible: boolean; /** * Whether the token input is disabled. * * @selector [data-disabled] */ isDisabled: boolean; /** * Whether the token input is read only. * * @selector [data-readonly] */ isReadOnly: boolean; } export interface TokenInputProps extends HoverProps, StyleRenderProps, SlotProps, GlobalDOMAttributes { /** * A function that renders a token for each segment in the token field. */ children: (segment: TokenSegment ? V : never>) => React.ReactElement; /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-TokenInput' */ className?: ClassNameOrFunction; } export declare const TokenFieldContext: React.Context>, HTMLDivElement>>; /** * A token field allows users to enter text with inline tokens. Use it to build AI prompt fields, * tag inputs, structured search fields, mention inputs, and multi-select comboboxes. */ export declare const TokenField: >(props: TokenFieldProps & React.RefAttributes) => React.ReactElement | null; /** * A token input represents the editable area within a token field. */ export declare const TokenInput: >(props: TokenInputProps & React.RefAttributes) => React.ReactElement | null; export interface TokenRenderProps { /** * Whether the token is selected. * * @selector [data-selected] */ isSelected: boolean; /** * Whether the token is disabled. * * @selector [data-disabled] */ isDisabled: boolean; } export interface TokenProps extends RenderProps, GlobalDOMAttributes { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-Token' */ className?: ClassNameOrFunction; } /** * A token represents an inline segment within a token field. */ export declare const Token: React.ForwardRefExoticComponent>;