import { type ComponentPropsWithRef, type ReactNode } from 'react'; export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away'; /** Who an avatar stands for. An agent's avatar is a rounded square, so its shape, and not only * its color, tells it from a person's. */ export type AvatarKind = 'person' | 'agent'; export type AvatarShape = 'circle' | 'square'; /** Any other span attribute and the ref reach the avatar's outer element, so it can be a Tooltip's * or a popover's direct child. */ export interface AvatarProps extends Omit, 'children' | 'className'> { /** Image URL. Until it loads, or when it fails, the initials of `name` show. */ src?: string | null | undefined; name?: string | undefined; /** A person (a circle, the default) or an agent (a rounded square). Under UIProvider's * `avatarColoring="kind"` it also picks the fill: `--avatar-person` or `--avatar-agent`. */ kind?: AvatarKind | undefined; /** Overrides the shape `kind` gives, such as a square for an organization. */ shape?: AvatarShape | undefined; /** Picks the fallback's color from the theme's categorical palette, so the same key gets the * same color everywhere. Defaults to `name`; pass a stable id when names can repeat or * change, or `null` for the accent fill whatever the name. Without either, the accent fills it. * Ignored under `avatarColoring="kind"`. */ colorKey?: string | null | undefined; /** Classes for the initials' fill and text in place of the palette's or the kind's, such as a * neutral fill for something that is neither a person nor an agent. */ colorClassName?: string | undefined; /** Defaults to the group's size inside an `AvatarGroup`, else `md`. */ size?: AvatarSize | undefined; status?: AvatarStatus | undefined; /** A small icon on a disc at the bottom corner, for what the person did, such as being * assigned or commenting. It is decoration: say what it means in the text beside the avatar. * The status dot holds the same corner, so an avatar with a `status` doesn't show it, and an * `xs` avatar is too small for one to read, so it doesn't either. */ badge?: ReactNode; /** Hides it from assistive technology, for an avatar beside the name it shows, which a * screen reader would otherwise read twice. */ decorative?: boolean | undefined; /** Names it on hover: `true` shows the name, with the presence when it has a status dot, and * anything else shows that instead, such as what the person is doing. */ tooltip?: boolean | ReactNode; /** On the avatar's shape, rounded as it is, so a ring or a shadow follows the circle or the * square: its margin, ring or hover effect. */ className?: string | undefined; } export interface AvatarInitialsOptions { /** Two letters for a one-word name ("maya" reads "MA"), splitting a handle on `_` and `-` * too and leaving out an email's domain. Default false: one letter, "M". */ twoLetters?: boolean | undefined; } /** Up to two initials: the first and last word of a name split on spaces and dots. */ export declare function avatarInitials(name: string | undefined, { twoLetters }?: AvatarInitialsOptions): string; /** A person's or an agent's picture, or their initials while it loads or when it fails. It is * one image to assistive technology, named for them, whichever shows, and their presence when * it has a status dot, unless it is `decorative`. * * Without a picture the fill follows UIProvider's `avatarColoring`: by name from the * categorical palette (the default), or by kind, where people share `--avatar-person` (with * `--avatar-person-text`) and agents `--avatar-agent` (with `--avatar-agent-text`, and the * edge `--avatar-agent-ring`). */ export declare function Avatar({ src, name, kind, shape, colorKey, colorClassName, size: sizeProp, status, badge, decorative, tooltip, className, ...rest }: AvatarProps): import("react").JSX.Element; /** Any other span attribute and the ref reach the stack's element, so the group can be a * Tooltip's or a popover's direct child. */ export interface AvatarGroupProps extends Omit, 'children' | 'className'> { /** Avatars, each possibly wrapped, such as in a hover card. Each child counts as one. */ children: ReactNode; /** Shows at most this many; the rest become a "+N" chip. */ max?: number | undefined; /** How many there are in all, when the children are already a slice of them: the chip counts * the rest. Defaults to the number of children. */ total?: number | undefined; /** Shows the "+N" chip for those left out. Default true; false for a stack whose count is * printed beside it. */ showOverflow?: boolean | undefined; /** Every avatar's size, and the chip's. Default `sm`. */ size?: AvatarSize | undefined; /** Rings each avatar in the color behind the stack, so overlapping faces read apart. Default * true. */ ring?: boolean | undefined; /** The ring's color, a CSS color: the surface the stack sits on. Defaults to the panel's. One * avatar can set its own, such as a highlight, by setting `--avatar-ring` in its `className`. */ ringColor?: string | undefined; /** The group's accessible name, such as "3 people here". */ label?: string | undefined; className?: string | undefined; } /** Overlapping avatars, such as a task's assignees or who is here, with a "+N" chip for the * rest. Each avatar inside takes the group's size and a ring in the color behind it, which * follows its shape, round or square. */ export declare function AvatarGroup({ children, max, total, showOverflow, size, ring, ringColor, label, className, style, ...spanProps }: AvatarGroupProps): import("react").JSX.Element;