UNPKG

@scoped-vaadin/avatar-group

Version:
63 lines (58 loc) 2.31 kB
/** * @license * Copyright (c) 2020 - 2024 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */ import { AvatarI18n } from '@scoped-vaadin/avatar/src/vaadin-avatar.js'; import { ControllerMixin } from '@scoped-vaadin/component-base/src/controller-mixin.js'; import { ElementMixin } from '@scoped-vaadin/component-base/src/element-mixin.js'; import { ThemableMixin } from '@scoped-vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; import { AvatarGroupI18n, AvatarGroupItem, AvatarGroupMixin } from './vaadin-avatar-group-mixin.js'; export { AvatarGroupI18n, AvatarGroupItem, AvatarI18n }; /** * `<vaadin24-avatar-group>` is a Web Component providing avatar group displaying functionality. * * To create the avatar group, first add the component to the page: * * ``` * <vaadin24-avatar-group></vaadin24-avatar-group> * ``` * * And then use [`items`](#/elements/vaadin-avatar-group#property-items) property to initialize the structure: * * ``` * document.querySelector('vaadin24-avatar-group').items = [ * {name: 'John Doe'}, * {abbr: 'AB'} * ]; * ``` * * ### Styling * * The following shadow DOM parts are exposed for styling: * * Part name | Description * ----------- | --------------- * `container` | The container element * * See the [`<vaadin24-avatar>`](#/elements/vaadin-avatar) documentation for the available * state attributes and stylable shadow parts of avatar elements. * * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation. * * ### Internal components * * In addition to `<vaadin24-avatar-group>` itself, the following internal * components are themable: * * - `<vaadin24-avatar-group-overlay>` - has the same API as [`<vaadin24-overlay>`](#/elements/vaadin-overlay). * - `<vaadin24-avatar-group-menu>` - has the same API as [`<vaadin24-list-box>`](#/elements/vaadin-list-box). * - `<vaadin24-avatar-group-menu-item>` - has the same API as [`<vaadin24-item>`](#/elements/vaadin-item). */ declare class AvatarGroup extends AvatarGroupMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {} declare global { interface HTMLElementTagNameMap { 'vaadin24-avatar-group': AvatarGroup; } } export { AvatarGroup };