import type { CSSProperties, VNodeChild } from "vue"; import type { XySemanticClassNames, XySemanticStyles } from "../core"; import type { XyPopoverProps } from "../popover/types"; export type XyAvatarShape = "circle" | "square"; export type XyAvatarSize = "lg" | "md" | "sm" | number | string; export type XyAvatarSemanticDom = "content" | "icon" | "image" | "root"; export interface XyAvatarSemanticProps { hasIcon: boolean; hasImage: boolean; imageError: boolean; shape: XyAvatarShape; size: XyAvatarSize; } export interface XyAvatarProps { alt?: string; classNames?: XyAvatarClassNames; crossOrigin?: "" | "anonymous" | "use-credentials"; draggable?: boolean | "false" | "true"; gap?: number; icon?: VNodeChild; onError?: (event: Event) => boolean | void; shape?: XyAvatarShape; size?: XyAvatarSize; src?: string; srcSet?: string; styles?: XyAvatarStyles; text?: string; } export type XyAvatarClassNames = XySemanticClassNames; export type XyAvatarStyles = XySemanticStyles; export interface XyAvatarSlots { default?: () => VNodeChild; } export type XyAvatarGroupSemanticDom = "overflow" | "root"; export interface XyAvatarGroupSemanticProps { hiddenCount: number; maxCount?: number; shape?: XyAvatarShape; size?: XyAvatarSize; } export interface XyAvatarGroupMaxConfig { count?: number; popover?: XyPopoverProps; style?: CSSProperties; } export interface XyAvatarGroupProps { classNames?: XyAvatarGroupClassNames; /** @deprecated 请使用 max={{ count: number }} */ maxCount?: number; max?: XyAvatarGroupMaxConfig; shape?: XyAvatarShape; size?: XyAvatarSize; styles?: XyAvatarGroupStyles; } export type XyAvatarGroupClassNames = XySemanticClassNames; export type XyAvatarGroupStyles = XySemanticStyles; export interface XyAvatarGroupSlots { default?: () => VNodeChild; }