import { type ComponentType, type ReactNode } from "react"; import { type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } from "../../style/index.js"; export type AvatarSurface = ComponentType<{ style?: StyleProp; testID?: string; children?: ReactNode; }>; export type Size = "tiny" | "small" | "default" | "large"; export type Shape = "circle" | "rounded"; export interface AvatarSkin { /** Corner radius for the `rounded` (square) shape; the circle is always 9999. */ roundedRadius: number; /** Initials type per size (weight / size / line-height / tracking). */ labelType: Record; /** Android ripple config for the pressable trigger, or null on iOS/web. */ ripple: ((tokens: ColorTokens) => { color: string; borderless: boolean; }) | null; /** iOS/web press dim opacity for the pressable trigger, or null on Android. */ pressedOpacity: number | null; /** * 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 { /** * 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; /** 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?: StyleProp; } /** * Build an Avatar component from a platform skin. `GlassFallback` is an optional, * platform-supplied surface for the initials fallback: iOS passes its interactive * Liquid Glass surface, web and Android pass nothing (so their box stays solid and * their bundles never pull in the glass material). */ export declare function createAvatar(skin: AvatarSkin, GlassFallback?: AvatarSurface): (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; } /** 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