import { type ComponentPropsWithRef, type ReactNode } from 'react'; export interface TagStyle { /** Monospace text, for a value read as code, such as a key=value label. */ mono?: boolean | undefined; /** Small capitals with wider spacing, for a short code such as a region. */ caps?: boolean | undefined; } /** The one tag look: a pill with a hairline border and 11px text. Another component's chip, * such as a picker's chosen value, uses it to look the same. It has the panel's fill, so its * edge shows on a hovered or selected row too, whose fill can match the border. */ export declare function tagClasses({ mono, caps }?: TagStyle): string; /** Any other attribute and the ref reach the tag's element, its link with `href` and no `onRemove`, * so it can be a Tooltip's or a popover's direct child. */ export interface TagProps extends TagStyle, Omit, 'children' | 'className' | 'color' | 'title'> { children: ReactNode; /** A dot before the text in this color, any CSS color, such as a label's own. */ color?: string | undefined; /** Makes the tag a link, through the host's router. */ href?: string | undefined; /** Adds an × that removes the tag, named by `removeLabel` ("Remove gpu" by default). */ onRemove?: (() => void) | undefined; removeLabel?: string | undefined; /** A hint on hover, such as the full text of a long tag. */ title?: string | undefined; className?: string | undefined; } /** A tag: what someone has labelled a thing. A neutral hairline pill with an optional color * dot; people add, remove and filter by tags, so it can be a link with `href` and have an × * with `onRemove`. For marketplace tags, labels, key=value pairs, and a report's schedule or * format. * * Not for a fixed fact worth noticing, such as "Preview" (a flag: `StatusBadge`), or a state * (a status: `StatusLabel`). See "UI/Badges/Which one". */ export declare function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps, className, ref, ...rest }: TagProps): import("react").JSX.Element; /** One tag of a `TagList`: a string is its own key and label. */ export type TagItem = string | { key: string; label: ReactNode; color?: string | undefined; href?: string | undefined; }; export interface TagListProps extends TagStyle { tags: readonly TagItem[]; /** `wrap`, the default, runs onto more lines; `clip` keeps one line and ends with a "+N" * chip for the tags that don't fit, which lists them on hover or focus. */ overflow?: 'wrap' | 'clip' | undefined; /** Shows at most this many, the rest in the "+N" chip. */ max?: number | undefined; /** Adds an × to each tag; called with the tag's key. */ onRemove?: ((key: string) => void) | undefined; className?: string | undefined; } /** A thing's tags as a list: wrapped, or on one line ending in "+N" for the rest. */ export declare function TagList({ tags, overflow, max, mono, caps, onRemove, className, }: TagListProps): import("react").JSX.Element; /** Tags as the strings they hold, from an array or a comma-separated string: trimmed, empty * ones dropped, each once. Anything else is no tags. */ export declare function normalizeTags(tags: unknown): string[];