import type { ComponentPropsWithRef, ReactElement, ReactNode } from 'react'; import { type Tone } from './tone.js'; /** A badge's tone: a status, or the theme's accent for something set apart that * isn't a status, such as "New". */ export type BadgeVariant = Tone | 'accent'; /** How loud a badge is: `soft` tints it, `solid` fills it for the one thing that * must catch the eye, and `outline` leaves only its edge and text. */ export type BadgeEmphasis = 'soft' | 'solid' | 'outline'; declare const sizeClasses: { readonly sm: 'gap-1 px-1.5 py-px text-[10px] leading-3.5'; readonly md: 'gap-1.5 px-2 py-0.5 text-[11px] leading-4'; }; export type BadgeSize = keyof typeof sizeClasses; /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's * direct child. */ export interface StatusBadgeProps extends Omit, 'children' | 'className'> { /** Badge content */ children: ReactNode; /** Visual variant */ variant?: BadgeVariant | undefined; /** `soft` (the default) tints it; `solid` fills it; `outline` draws only its edge. */ emphasis?: BadgeEmphasis | undefined; /** Uppercase, tracked letters, for a short label such as "Beta". */ caps?: boolean | undefined; /** Cuts a long label off with an ellipsis instead of growing past its cell. */ truncate?: boolean | undefined; /** Show animated pulse indicator */ pulse?: boolean | undefined; /** Show a still indicator in the variant's color */ dot?: boolean | undefined; /** Shows the dot unlit, as a hollow ring, for something off or not known. */ off?: boolean | undefined; /** Size */ size?: BadgeSize | undefined; /** Renders the badge as this element, such as a link to what it names. */ render?: ReactElement | undefined; /** Additional class */ className?: string | undefined; } /** A line of text in a variant's color, for a status that stands beside a * dot rather than inside a badge. */ export declare function statusTextClass(variant: BadgeVariant): string; /** A flag: what's notable about this one. A small soft pill right after a name, for a fixed * fact worth noticing, such as Inline, New, Your version, Preview, Ends soon or Read only: short * and rare, at most one or two on a row. It's neutral by default (`muted`, such as Inline, Your * version or Read only), `accent` for something new to you (New, Preview, Beta), `warning` when * it warns (Ends soon), and never `success` or `error`, which are statuses. * * Not for a state, which changes over time: that is a status (`StatusLabel`, or * `RunStatusLabel` for a run), never a tinted pill. Not for a label someone gave it: that is a * `Tag`. See "UI/Badges/Which one". */ export declare function StatusBadge({ children, variant, emphasis, caps, truncate, pulse, dot, off, size, render, className, ref, ...rest }: StatusBadgeProps): ReactElement>; /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's * direct child. */ export interface CountBadgeProps extends Omit, 'children' | 'className'> { count: number; /** Above it, the count reads as `max` and a plus, such as "99+". */ max?: number | undefined; /** Its tone, `accent` by default. A host with a color of its own, such as one * for work waiting on an agent, passes it in `className`. */ variant?: BadgeVariant | undefined; /** `solid` (the default) for a count that asks for attention, such as unread * messages; `soft` for one that only informs, such as a tab's total. */ emphasis?: Exclude | undefined; size?: BadgeSize | undefined; /** Read after the number by assistive technology, such as "unread", when the * text around it doesn't say what it counts. */ label?: string | undefined; /** Shows a zero; otherwise a count of zero renders nothing. */ showZero?: boolean | undefined; /** The locale the number is written in; the browser's own without it. */ locale?: string | undefined; className?: string | undefined; } /** A number beside a link or tab, such as unread messages or items waiting, * capped at `max` so a big count doesn't widen what it sits in. */ export declare function CountBadge({ count, max, variant, emphasis, size, label, showZero, locale, className, ...rest }: CountBadgeProps): import("react").JSX.Element | null; /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's * direct child. */ export interface StatusDotProps extends Omit, 'children' | 'className'> { /** The status's tone. */ variant?: BadgeVariant | undefined; /** A ping that ripples out from the lamp three times, for something under way; still for reduced * motion. */ pulse?: boolean | undefined; /** Unlit: a hollow ring, for a status that is off or not known. */ off?: boolean | undefined; /** The lamp's width and height in pixels; 10 by default, as beside a status's words. A * badge's is 7, so it keeps the badge's height. */ size?: number | undefined; /** A flat dot in the text's color, for one on a solid fill, where the tone would vanish. */ current?: boolean | undefined; className?: string | undefined; } /** A status's lamp, lit in its tone, for a status that stands beside its words without a badge, * such as "running" in a list's cell. A badge's own dot is a smaller one. Name the status in * words beside it; the lamp alone is only seen. */ export declare function StatusDot({ variant, pulse, off, size, current, className, style, ...rest }: StatusDotProps): import("react").JSX.Element; export {};