import React from "react"; import { PlusAvatar as PlusAvatarElement } from "../dist/components/avatar/index.js"; export type { PlusAvatarElement }; export interface PlusAvatarProps extends Pick< React.AllHTMLAttributes, | "children" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "title" | "translate" | "onClick" | "onFocus" | "onBlur" > { /** Toggles inverted color scheme */ invert?: boolean; /** URL of the avatar image */ image?: PlusAvatarElement["image"]; /** Alternative text for the avatar */ alt?: PlusAvatarElement["alt"]; /** Shape of the avatar - circle: Circular shape - square: Square shape with slight rounding */ shape?: PlusAvatarElement["shape"]; /** Size of the avatar Can be a predefined size (xs, sm, md, lg, xl) or custom value */ size?: PlusAvatarElement["size"]; /** Icon name to use when no image is available */ icon?: PlusAvatarElement["icon"]; /** Text to display as initials when no image is available */ text?: PlusAvatarElement["text"]; /** Strategy to use when image fails to load - icon: Shows an icon - text: Shows text initials - custom: Uses fallback slot content */ fallbackStrategy?: PlusAvatarElement["fallbackStrategy"]; /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */ className?: string; /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */ exportparts?: string; /** Used for labels to link them with their inputs (using input id). */ htmlFor?: string; /** Used to help React identify which items have changed, are added, or are removed within a list. */ key?: number | string; /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */ part?: string; /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */ ref?: any; /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */ tabIndex?: number; } /** * * --- * * * ### **Slots:** * - _default_ - The default slot for avatar content * - **fallback** - Optional slot for custom fallback content * * ### **CSS Properties:** * - **--text-color** - Controls the text color of the avatar _(default: undefined)_ * - **--bg-default** - Controls the default background color _(default: undefined)_ * * ### **CSS Parts:** * - **base** - The component's base wrapper */ export const PlusAvatar: React.ForwardRefExoticComponent;