UNPKG

tgui-angular

Version:

🚀 Angular UI library for Telegram Web Apps with modern components and theming support | 💼 Author is open to work opportunities | 📧 Contact: a.blagovestnov@gmail.com | 💬 Telegram: @ablagovestnov

73 lines (72 loc) • 2.92 kB
import * as i0 from "@angular/core"; export type AvatarSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl'; export type AvatarShape = 'circle' | 'rounded' | 'square'; /** * The Avatar component displays an avatar with optional initials or image. * The component supports various sizes and shapes, as well as an online status indicator. */ export declare class AvatarComponent { /** * Avatar image URL */ src: import("@angular/core").InputSignal<string | undefined>; /** * Text for initials if image is absent */ initials: import("@angular/core").InputSignal<string | undefined>; /** * Avatar size ('xxs', 'xs', 's', 'm', 'l', 'xl') */ size: import("@angular/core").InputSignal<AvatarSize>; /** * Avatar shape ('circle', 'rounded', 'square') */ shape: import("@angular/core").InputSignal<AvatarShape>; /** * Alternative text for the image */ alt: import("@angular/core").InputSignal<string | undefined>; /** * Background color for avatar with initials */ color: import("@angular/core").InputSignal<string | undefined>; /** * Online status indicator */ online: import("@angular/core").InputSignal<boolean>; /** * Computed alt text that always returns a string */ altText: import("@angular/core").Signal<string>; /** * Computed source URL that always returns a string */ srcUrl: import("@angular/core").Signal<string>; /** * Computed flag indicating if source URL is present */ hasSrc: import("@angular/core").Signal<boolean>; /** * Computed flag indicating if initials are present */ hasInitials: import("@angular/core").Signal<boolean>; /** * Computed initials text that always returns a string */ initialsText: import("@angular/core").Signal<string>; get isSizeXXS(): boolean; get isSizeXS(): boolean; get isSizeS(): boolean; get isSizeM(): boolean; get isSizeL(): boolean; get isSizeXL(): boolean; get isShapeCircle(): boolean; get isShapeRounded(): boolean; get isShapeSquare(): boolean; /** * Returns background color for avatar with initials */ getBackgroundColor(): string; static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "tgui-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "online": { "alias": "online"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>; }