import { type ReactNode } from "react"; import { type ColorTokens, type ViewStyle, type TextStyle, type LayoutStyle } from "../../style/index.js"; export type Size = "tiny" | "small" | "default" | "large"; export type Shape = "circle" | "rounded"; export interface AvatarSkin { /** Internal compound-control geometry; standalone Avatar keeps its public size scale. */ diameter?: Partial>; /** A compound control's exact identity paint, before the default readable wash. */ initialsPaint?: (hue: number) => { ink: string; wash: string; }; /** Corner radius for the `rounded` (square) shape per size; the circle is always 9999. */ roundedRadius: Record; /** Initials type per size (weight / size / line-height / tracking). */ labelType: Record; /** The AvatarGroup "+N" label per size (the hand-off's 600 13px at the 40px disc). */ overflowType: Record; /** The `online` presence dot per size: its diameter and its ring of the card. */ presence: (tokens: ColorTokens, size: number) => ViewStyle; /** Android ripple config for the pressable trigger (null where there is no ripple). */ ripple: ((tokens: ColorTokens) => { color: string; borderless: boolean; }) | null; /** The press dim for the pressable trigger (the shell skips it on Android, where the ripple carries the press; see pressDim). */ pressedOpacity: number; /** * Minimum effective touch target for the pressable trigger (HIG 44pt on iOS, * Material 48dp on Android). The shell pads a smaller visual box out to this * with hitSlop, so the tap area meets the platform minimum without changing * the rendered size. Inert for pointer input on web. */ minTarget: number; } export interface AvatarProps { /** Original 30px rounded brand mark with its action-to-selection gradient. */ logo?: boolean; /** Reference identity geometry, smallest first in precedence. */ annotation?: boolean; compact?: boolean; account?: boolean; row?: boolean; person?: boolean; profile?: boolean; detail?: boolean; hero?: boolean; featured?: boolean; spotlight?: boolean; /** Stage identity hue, independent of the display name. */ hue?: number; whiteInk?: boolean; bold?: boolean; inverse?: boolean; orchid?: boolean; glow?: boolean; sheen?: boolean; mediumSheen?: boolean; strongSheen?: boolean; /** * The photo. A remote/URI string, or a bundled image module from `require(...)` / * `import`. When set (and it loads), the image fills the circle and the initials * fallback is hidden; if the image fails to load, it falls back to the initials. */ src?: string | number; /** Alias for `src`, for callers that think in terms of a native image uri. */ uri?: string | number; /** Full name. Drives the initials fallback AND the accessible label/alt text. */ name?: string; /** Ready-made initials, used verbatim as the glyph (overrides `name`/`children`). */ initials?: string; /** Same as `name`; the rendered initials when no photo is supplied. */ children?: ReactNode; /** * Accessible name for the avatar (the photo's alt text and, when pressable, the * button's label). Falls back to `name`, then string `children`. Set it for a * photo-only or pressable avatar that has no `name`. */ accessibilityLabel?: string; tiny?: boolean; small?: boolean; large?: boolean; circle?: boolean; rounded?: boolean; /** Separator outline, for avatars that overlap in a stack. */ ring?: boolean; /** * A presence dot: the `success` disc in a 2px ring of the card, at the bottom right, * one pixel past the disc's edge. It is decoration (hidden from assistive tech), so * name the presence in the label where it matters. */ online?: boolean; /** When set, the avatar becomes pressable (e.g. a topbar account trigger). */ onPress?: () => void; /** E2E hook forwarded to the root element. */ testID?: string; /** For layout composition only; overlap/stacking is owned by AvatarGroup, not this prop. */ style?: LayoutStyle; } export declare const AVATAR_DIAMETER: Record; export declare function sizeOf(p: AvatarProps): Size; export declare function shapeOf(p: AvatarProps): Shape; export declare function initialsDisc(hue: number, page: string, dark: boolean): { wash: string; ink: string; }; /** Build an Avatar component from a platform skin. */ export declare function createAvatar(skin: AvatarSkin): (props: AvatarProps) => import("react").JSX.Element; export type Overlap = "tight" | "snug" | "loose"; export interface AvatarGroupProps { /** Avatar elements to stack. */ children?: ReactNode; /** Cap the visible avatars; the remainder collapses into a "+N" chip. */ max?: number; /** Override the total behind the "+N" chip (e.g. a server-known member count). */ total?: number; tiny?: boolean; small?: boolean; large?: boolean; tight?: boolean; snug?: boolean; loose?: boolean; /** Accessible name for the whole group (e.g. "8 members"). */ accessibilityLabel?: string; /** E2E hook forwarded to the root element. */ testID?: string; } export declare function overlapOf(p: AvatarGroupProps): Overlap; /** Build an AvatarGroup from the same platform skin as Avatar. */ export declare function createAvatarGroup(skin: AvatarSkin): (props: AvatarGroupProps) => import("react").JSX.Element; //# sourceMappingURL=avatar.shared.d.ts.map