2023-03-01 12:52:17 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Avatar represents people using icons, labels and images.
|
|
|
|
*
|
|
|
|
* - [Live Demo](https://www.primefaces.org/primevue/avatar)
|
|
|
|
*
|
|
|
|
* @module avatar
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
2023-03-01 12:52:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Avatar component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface AvatarProps {
|
|
|
|
/**
|
|
|
|
* Defines the text to display.
|
|
|
|
*/
|
|
|
|
label?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines the icon to display.
|
|
|
|
*/
|
|
|
|
icon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines the image to display.
|
|
|
|
*/
|
|
|
|
image?: string | undefined;
|
|
|
|
/**
|
2023-03-01 12:52:17 +00:00
|
|
|
* Size of the element.
|
|
|
|
* @defaultValue normal
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 12:52:17 +00:00
|
|
|
size?: 'normal' | 'large' | 'xlarge' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
2023-03-01 12:52:17 +00:00
|
|
|
* Shape of the element.
|
|
|
|
* @defaultValue square
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-03-01 12:52:17 +00:00
|
|
|
shape?: 'square' | 'circle' | undefined;
|
2022-12-08 11:04:25 +00:00
|
|
|
/**
|
|
|
|
* Establishes a string value that labels the component.
|
|
|
|
*/
|
|
|
|
'aria-label'?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
|
|
*/
|
|
|
|
'aria-labelledby'?: string | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 12:52:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Avatar component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface AvatarSlots {
|
|
|
|
/**
|
|
|
|
* Content can easily be customized with the default slot instead of using the built-in modes.
|
|
|
|
*/
|
2023-03-01 12:52:17 +00:00
|
|
|
default(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 12:52:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in Avatar component.
|
|
|
|
*/
|
|
|
|
export interface AvatarEmits {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Triggered when an error occurs while loading an image file.
|
|
|
|
*/
|
2023-03-01 12:52:17 +00:00
|
|
|
error(): void;
|
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 12:52:17 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Avatar**
|
|
|
|
*
|
|
|
|
* _Avatar represents people using icons, labels and images._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/avatar/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class Avatar extends ClassComponent<AvatarProps, AvatarSlots, AvatarEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Avatar: GlobalComponentConstructor<Avatar>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Avatar;
|