import * as React from "react"; import type { AllowClearProp, ControlStatusProp, ControlVariantProp, MaxTagCountProp, MaxTagPlaceholderProp, SizeProp } from "../../props/vocabulary/index.js"; /** * TagInput is this library's answer to antd's `Select mode="tags"` — a free-text token field — so * it takes the same token-level props antd puts on that mode. */ export type TagInputProps = { value?: string[]; defaultValue?: string[]; onValueChange?: (tags: string[]) => void; placeholder?: string; disabled?: boolean; /** * Read-only: the tags stay visible, selectable and submitted, but nothing can be added or * removed — the draft field is read-only, the chip removers and the clear ✕ are withdrawn, and * the container reports `aria-readonly`. Mirrors Select's readOnly contract (still focusable and * still in the tab order, unlike `disabled`). */ readOnly?: boolean; name?: string; className?: string; id?: string; "aria-label"?: string; /** Control height tier (antd `size`) — the shared `--control-height` ladder. */ size?: SizeProp; /** Validation status (antd `status`). `error` also sets `aria-invalid`; `warning` recolours only. */ status?: ControlStatusProp; /** Control surface (antd `variant`). Default `outlined`. */ variant?: ControlVariantProp; /** Hard ceiling on how many tags may be held (antd `maxCount`). Further input is refused. */ maxCount?: number; /** * antd `allowClear` — a single ✕ that drops EVERY tag at once. Off by default (antd's own * default for a tags field). The object form replaces the icon and/or the accessible label. */ allowClear?: AllowClearProp; /** Fired after every tag is dropped through the ✕ (antd `onClear`). */ onClear?: () => void; /** How many chips render before the rest collapse into the overflow node (antd `maxTagCount`). */ maxTagCount?: MaxTagCountProp; /** The node standing in for what `maxTagCount` hid (antd `maxTagPlaceholder`). */ maxTagPlaceholder?: MaxTagPlaceholderProp; /** Render one chip yourself (antd `tagRender`) — receives the value and an `onClose` remover. */ tagRender?: (props: { value: string; label: React.ReactNode; onClose: () => void; index: number; disabled: boolean; }) => React.ReactNode; /** * Characters that commit the draft into a tag (antd `tokenSeparators`). Default `[","]`; Enter * always commits and is not a separator. Pasting a run containing a separator splits it into * several tags, which is antd's behaviour and the reason the prop exists. */ tokenSeparators?: string[]; }; export declare const TagInput: React.ForwardRefExoticComponent>;