@vaadin/avatar-group
Advanced tools
Comparing version 24.7.0-alpha8 to 24.7.0-alpha9
{ | ||
"name": "@vaadin/avatar-group", | ||
"version": "24.7.0-alpha8", | ||
"version": "24.7.0-alpha9", | ||
"publishConfig": { | ||
@@ -41,16 +41,16 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.7.0-alpha8", | ||
"@vaadin/avatar": "24.7.0-alpha8", | ||
"@vaadin/component-base": "24.7.0-alpha8", | ||
"@vaadin/item": "24.7.0-alpha8", | ||
"@vaadin/list-box": "24.7.0-alpha8", | ||
"@vaadin/overlay": "24.7.0-alpha8", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha8", | ||
"@vaadin/vaadin-material-styles": "24.7.0-alpha8", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha8", | ||
"@vaadin/a11y-base": "24.7.0-alpha9", | ||
"@vaadin/avatar": "24.7.0-alpha9", | ||
"@vaadin/component-base": "24.7.0-alpha9", | ||
"@vaadin/item": "24.7.0-alpha9", | ||
"@vaadin/list-box": "24.7.0-alpha9", | ||
"@vaadin/overlay": "24.7.0-alpha9", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha9", | ||
"@vaadin/vaadin-material-styles": "24.7.0-alpha9", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha9", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.7.0-alpha8", | ||
"@vaadin/test-runner-commands": "24.7.0-alpha8", | ||
"@vaadin/chai-plugins": "24.7.0-alpha9", | ||
"@vaadin/test-runner-commands": "24.7.0-alpha9", | ||
"@vaadin/testing-helpers": "^1.1.0", | ||
@@ -63,3 +63,3 @@ "sinon": "^18.0.0" | ||
], | ||
"gitHead": "d015035192480fcc8cc9df5d00a950f177b83c32" | ||
"gitHead": "b0a16c6ed7fc50a22a42dcab0649d74f4c300485" | ||
} |
@@ -8,13 +8,16 @@ /** | ||
import type { AvatarI18n } from '@vaadin/avatar/src/vaadin-avatar.js'; | ||
import type { I18nMixinClass, PartialI18n } from '@vaadin/component-base/src/i18n-mixin.js'; | ||
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js'; | ||
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js'; | ||
export interface AvatarGroupI18n extends AvatarI18n { | ||
activeUsers: { | ||
one: string; | ||
many: string; | ||
}; | ||
joined: string; | ||
left: string; | ||
} | ||
export type AvatarGroupI18n = PartialI18n< | ||
{ | ||
activeUsers: { | ||
one: string; | ||
many: string; | ||
}; | ||
joined: string; | ||
left: string; | ||
} & AvatarI18n | ||
>; | ||
@@ -34,3 +37,7 @@ export interface AvatarGroupItem { | ||
base: T, | ||
): Constructor<AvatarGroupMixinClass> & Constructor<OverlayClassMixinClass> & Constructor<ResizeMixinClass> & T; | ||
): Constructor<AvatarGroupMixinClass> & | ||
Constructor<I18nMixinClass<AvatarGroupI18n>> & | ||
Constructor<OverlayClassMixinClass> & | ||
Constructor<ResizeMixinClass> & | ||
T; | ||
@@ -74,5 +81,5 @@ export declare class AvatarGroupMixinClass { | ||
/** | ||
* The object used to localize this component. | ||
* To change the default localization, replace the entire | ||
* _i18n_ object or just the property you want to modify. | ||
* The object used to localize this component. To change the default | ||
* localization, replace this with an object that provides all properties, or | ||
* just the individual properties you want to change. | ||
* | ||
@@ -79,0 +86,0 @@ * The object has the following JSON structure and default values: |
@@ -10,2 +10,3 @@ /** | ||
import { announce } from '@vaadin/a11y-base/src/announce.js'; | ||
import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js'; | ||
import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js'; | ||
@@ -17,2 +18,12 @@ import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js'; | ||
const DEFAULT_I18N = { | ||
anonymous: 'anonymous', | ||
activeUsers: { | ||
one: 'Currently one active user', | ||
many: 'Currently {count} active users', | ||
}, | ||
joined: '{user} joined', | ||
left: '{user} left', | ||
}; | ||
/** | ||
@@ -22,2 +33,3 @@ * A mixin providing common avatar group functionality. | ||
* @polymerMixin | ||
* @mixes I18nMixin | ||
* @mixes ResizeMixin | ||
@@ -27,3 +39,3 @@ * @mixes OverlayClassMixin | ||
export const AvatarGroupMixin = (superClass) => | ||
class AvatarGroupMixinClass extends ResizeMixin(OverlayClassMixin(superClass)) { | ||
class AvatarGroupMixinClass extends I18nMixin(DEFAULT_I18N, ResizeMixin(OverlayClassMixin(superClass))) { | ||
static get properties() { | ||
@@ -75,47 +87,2 @@ return { | ||
/** | ||
* The object used to localize this component. | ||
* To change the default localization, replace the entire | ||
* _i18n_ object or just the property you want to modify. | ||
* | ||
* The object has the following JSON structure and default values: | ||
* ``` | ||
* { | ||
* // Translation of the anonymous user avatar tooltip. | ||
* anonymous: 'anonymous', | ||
* // Translation of the avatar group accessible label. | ||
* // {count} is replaced with the actual count of users. | ||
* activeUsers: { | ||
* one: 'Currently one active user', | ||
* many: 'Currently {count} active users' | ||
* }, | ||
* // Screen reader announcement when user joins group. | ||
* // {user} is replaced with the name or abbreviation. | ||
* // When neither is set, "anonymous" is used instead. | ||
* joined: '{user} joined', | ||
* // Screen reader announcement when user leaves group. | ||
* // {user} is replaced with the name or abbreviation. | ||
* // When neither is set, "anonymous" is used instead. | ||
* left: '{user} left' | ||
* } | ||
* ``` | ||
* @type {!AvatarGroupI18n} | ||
* @default {English/US} | ||
*/ | ||
i18n: { | ||
type: Object, | ||
sync: true, | ||
value: () => { | ||
return { | ||
anonymous: 'anonymous', | ||
activeUsers: { | ||
one: 'Currently one active user', | ||
many: 'Currently {count} active users', | ||
}, | ||
joined: '{user} joined', | ||
left: '{user} left', | ||
}; | ||
}, | ||
}, | ||
/** @private */ | ||
@@ -164,6 +131,6 @@ _avatars: { | ||
return [ | ||
'__i18nItemsChanged(i18n, items)', | ||
'__i18nItemsChanged(__effectiveI18n, items)', | ||
'__openedChanged(_opened, _overflow)', | ||
'__updateAvatarsTheme(_overflow, _avatars, _theme)', | ||
'__updateAvatars(items, __itemsInView, maxItemsVisible, _overflow, i18n)', | ||
'__updateAvatars(items, __itemsInView, maxItemsVisible, _overflow, __effectiveI18n)', | ||
'__updateOverflowAvatar(_overflow, items, __itemsInView, maxItemsVisible)', | ||
@@ -174,2 +141,38 @@ '__updateOverflowTooltip(_overflowTooltip, items, __itemsInView, maxItemsVisible)', | ||
/** | ||
* The object used to localize this component. To change the default | ||
* localization, replace this with an object that provides all properties, or | ||
* just the individual properties you want to change. | ||
* | ||
* The object has the following JSON structure and default values: | ||
* ``` | ||
* { | ||
* // Translation of the anonymous user avatar tooltip. | ||
* anonymous: 'anonymous', | ||
* // Translation of the avatar group accessible label. | ||
* // {count} is replaced with the actual count of users. | ||
* activeUsers: { | ||
* one: 'Currently one active user', | ||
* many: 'Currently {count} active users' | ||
* }, | ||
* // Screen reader announcement when user joins group. | ||
* // {user} is replaced with the name or abbreviation. | ||
* // When neither is set, "anonymous" is used instead. | ||
* joined: '{user} joined', | ||
* // Screen reader announcement when user leaves group. | ||
* // {user} is replaced with the name or abbreviation. | ||
* // When neither is set, "anonymous" is used instead. | ||
* left: '{user} left' | ||
* } | ||
* ``` | ||
* @return {!AvatarGroupI18n} | ||
*/ | ||
get i18n() { | ||
return super.i18n; | ||
} | ||
set i18n(value) { | ||
super.i18n = value; | ||
} | ||
/** @protected */ | ||
@@ -215,3 +218,3 @@ ready() { | ||
__getMessage(user, action) { | ||
return action.replace('{user}', user.name || user.abbr || this.i18n.anonymous); | ||
return action.replace('{user}', user.name || user.abbr || this.__effectiveI18n.anonymous); | ||
} | ||
@@ -253,3 +256,3 @@ | ||
avatar.setAttribute('tabindex', '-1'); | ||
avatar.i18n = this.i18n; | ||
avatar.i18n = this.__effectiveI18n; | ||
@@ -336,3 +339,3 @@ if (this._theme) { | ||
.colorIndex="${item.colorIndex}" | ||
.i18n="${this.i18n}" | ||
.i18n="${this.__effectiveI18n}" | ||
class="${ifDefined(item.className)}" | ||
@@ -460,7 +463,7 @@ with-tooltip | ||
if (added) { | ||
addedMsg = added.map((user) => this.__getMessage(user, this.i18n.joined || '{user} joined')); | ||
addedMsg = added.map((user) => this.__getMessage(user, this.__effectiveI18n.joined || '{user} joined')); | ||
} | ||
if (removed) { | ||
removedMsg = removed.map((user) => this.__getMessage(user, this.i18n.left || '{user} left')); | ||
removedMsg = removed.map((user) => this.__getMessage(user, this.__effectiveI18n.left || '{user} left')); | ||
} | ||
@@ -475,12 +478,12 @@ | ||
/** @private */ | ||
__i18nItemsChanged(i18n, items) { | ||
if (i18n && i18n.activeUsers) { | ||
__i18nItemsChanged(effectiveI18n, items) { | ||
if (effectiveI18n && effectiveI18n.activeUsers) { | ||
const count = Array.isArray(items) ? items.length : 0; | ||
const field = count === 1 ? 'one' : 'many'; | ||
if (i18n.activeUsers[field]) { | ||
this.setAttribute('aria-label', i18n.activeUsers[field].replace('{count}', count || 0)); | ||
if (effectiveI18n.activeUsers[field]) { | ||
this.setAttribute('aria-label', effectiveI18n.activeUsers[field].replace('{count}', count || 0)); | ||
} | ||
this._avatars.forEach((avatar) => { | ||
avatar.i18n = i18n; | ||
avatar.i18n = effectiveI18n; | ||
}); | ||
@@ -487,0 +490,0 @@ } |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/avatar-group", | ||
"version": "24.7.0-alpha8", | ||
"version": "24.7.0-alpha9", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-avatar-group", | ||
"description": "`<vaadin-avatar-group>` is a Web Component providing avatar group displaying functionality.\n\nTo create the avatar group, first add the component to the page:\n\n```\n<vaadin-avatar-group></vaadin-avatar-group>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar-group#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-avatar-group').items = [\n {name: 'John Doe'},\n {abbr: 'AB'}\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------- | ---------------\n`container` | The container element\n\nSee the [`<vaadin-avatar>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar) documentation for the available\nstate attributes and stylable shadow parts of avatar elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-avatar-group>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-avatar-group-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-avatar-group-menu>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-list-box).\n- `<vaadin-avatar-group-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-item).", | ||
"description": "`<vaadin-avatar-group>` is a Web Component providing avatar group displaying functionality.\n\nTo create the avatar group, first add the component to the page:\n\n```\n<vaadin-avatar-group></vaadin-avatar-group>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar-group#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-avatar-group').items = [\n {name: 'John Doe'},\n {abbr: 'AB'}\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------- | ---------------\n`container` | The container element\n\nSee the [`<vaadin-avatar>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar) documentation for the available\nstate attributes and stylable shadow parts of avatar elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-avatar-group>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-avatar-group-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-avatar-group-menu>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-avatar-group-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-item).", | ||
"attributes": [ | ||
@@ -51,2 +51,11 @@ { | ||
{ | ||
"name": "i18n", | ||
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous',\n // Translation of the avatar group accessible label.\n // {count} is replaced with the actual count of users.\n activeUsers: {\n one: 'Currently one active user',\n many: 'Currently {count} active users'\n },\n // Screen reader announcement when user joins group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n joined: '{user} joined',\n // Screen reader announcement when user leaves group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n left: '{user} left'\n}\n```", | ||
"value": { | ||
"type": [ | ||
"AvatarGroupI18n" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "overlayClass", | ||
@@ -64,3 +73,3 @@ "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.", | ||
"name": "items", | ||
"description": "An array containing the items which will be stamped as avatars.\n\nThe items objects allow to configure [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-colorIndex) properties on the\nstamped avatars, and set `className` to provide CSS class names.\n\n#### Example\n\n```js\ngroup.items = [\n {\n name: 'User name',\n img: 'url-to-image.png',\n className: 'even'\n },\n {\n abbr: 'JD',\n colorIndex: 1,\n className: 'odd'\n },\n];\n```", | ||
"description": "An array containing the items which will be stamped as avatars.\n\nThe items objects allow to configure [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-colorIndex) properties on the\nstamped avatars, and set `className` to provide CSS class names.\n\n#### Example\n\n```js\ngroup.items = [\n {\n name: 'User name',\n img: 'url-to-image.png',\n className: 'even'\n },\n {\n abbr: 'JD',\n colorIndex: 1,\n className: 'odd'\n },\n];\n```", | ||
"value": { | ||
@@ -83,11 +92,2 @@ "type": [ | ||
} | ||
}, | ||
{ | ||
"name": "i18n", | ||
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous',\n // Translation of the avatar group accessible label.\n // {count} is replaced with the actual count of users.\n activeUsers: {\n one: 'Currently one active user',\n many: 'Currently {count} active users'\n },\n // Screen reader announcement when user joins group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n joined: '{user} joined',\n // Screen reader announcement when user leaves group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n left: '{user} left'\n}\n```", | ||
"value": { | ||
"type": [ | ||
"AvatarGroupI18n" | ||
] | ||
} | ||
} | ||
@@ -94,0 +94,0 @@ ], |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/avatar-group", | ||
"version": "24.7.0-alpha8", | ||
"version": "24.7.0-alpha9", | ||
"description-markup": "markdown", | ||
@@ -19,6 +19,13 @@ "framework": "lit", | ||
"name": "vaadin-avatar-group", | ||
"description": "`<vaadin-avatar-group>` is a Web Component providing avatar group displaying functionality.\n\nTo create the avatar group, first add the component to the page:\n\n```\n<vaadin-avatar-group></vaadin-avatar-group>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar-group#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-avatar-group').items = [\n {name: 'John Doe'},\n {abbr: 'AB'}\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------- | ---------------\n`container` | The container element\n\nSee the [`<vaadin-avatar>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar) documentation for the available\nstate attributes and stylable shadow parts of avatar elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-avatar-group>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-avatar-group-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-avatar-group-menu>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-list-box).\n- `<vaadin-avatar-group-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-item).", | ||
"description": "`<vaadin-avatar-group>` is a Web Component providing avatar group displaying functionality.\n\nTo create the avatar group, first add the component to the page:\n\n```\n<vaadin-avatar-group></vaadin-avatar-group>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar-group#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-avatar-group').items = [\n {name: 'John Doe'},\n {abbr: 'AB'}\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------- | ---------------\n`container` | The container element\n\nSee the [`<vaadin-avatar>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar) documentation for the available\nstate attributes and stylable shadow parts of avatar elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-avatar-group>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-avatar-group-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-avatar-group-menu>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-avatar-group-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-item).", | ||
"extension": true, | ||
"attributes": [ | ||
{ | ||
"name": ".i18n", | ||
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous',\n // Translation of the avatar group accessible label.\n // {count} is replaced with the actual count of users.\n activeUsers: {\n one: 'Currently one active user',\n many: 'Currently {count} active users'\n },\n // Screen reader announcement when user joins group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n joined: '{user} joined',\n // Screen reader announcement when user leaves group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n left: '{user} left'\n}\n```", | ||
"value": { | ||
"kind": "expression" | ||
} | ||
}, | ||
{ | ||
"name": ".overlayClass", | ||
@@ -32,3 +39,3 @@ "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.", | ||
"name": ".items", | ||
"description": "An array containing the items which will be stamped as avatars.\n\nThe items objects allow to configure [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha8/#/elements/vaadin-avatar#property-colorIndex) properties on the\nstamped avatars, and set `className` to provide CSS class names.\n\n#### Example\n\n```js\ngroup.items = [\n {\n name: 'User name',\n img: 'url-to-image.png',\n className: 'even'\n },\n {\n abbr: 'JD',\n colorIndex: 1,\n className: 'odd'\n },\n];\n```", | ||
"description": "An array containing the items which will be stamped as avatars.\n\nThe items objects allow to configure [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha9/#/elements/vaadin-avatar#property-colorIndex) properties on the\nstamped avatars, and set `className` to provide CSS class names.\n\n#### Example\n\n```js\ngroup.items = [\n {\n name: 'User name',\n img: 'url-to-image.png',\n className: 'even'\n },\n {\n abbr: 'JD',\n colorIndex: 1,\n className: 'odd'\n },\n];\n```", | ||
"value": { | ||
@@ -44,9 +51,2 @@ "kind": "expression" | ||
} | ||
}, | ||
{ | ||
"name": ".i18n", | ||
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous',\n // Translation of the avatar group accessible label.\n // {count} is replaced with the actual count of users.\n activeUsers: {\n one: 'Currently one active user',\n many: 'Currently {count} active users'\n },\n // Screen reader announcement when user joins group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n joined: '{user} joined',\n // Screen reader announcement when user leaves group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n left: '{user} left'\n}\n```", | ||
"value": { | ||
"kind": "expression" | ||
} | ||
} | ||
@@ -53,0 +53,0 @@ ] |
74736
1550
+ Added@vaadin/a11y-base@24.7.0-alpha9(transitive)
+ Added@vaadin/avatar@24.7.0-alpha9(transitive)
+ Added@vaadin/component-base@24.7.0-alpha9(transitive)
+ Added@vaadin/icon@24.7.0-alpha9(transitive)
+ Added@vaadin/item@24.7.0-alpha9(transitive)
+ Added@vaadin/list-box@24.7.0-alpha9(transitive)
+ Added@vaadin/lit-renderer@24.7.0-alpha9(transitive)
+ Added@vaadin/overlay@24.7.0-alpha9(transitive)
+ Added@vaadin/popover@24.7.0-alpha9(transitive)
+ Added@vaadin/tooltip@24.7.0-alpha9(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.7.0-alpha9(transitive)
+ Added@vaadin/vaadin-material-styles@24.7.0-alpha9(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.7.0-alpha9(transitive)
- Removed@vaadin/a11y-base@24.7.0-alpha8(transitive)
- Removed@vaadin/avatar@24.7.0-alpha8(transitive)
- Removed@vaadin/component-base@24.7.0-alpha8(transitive)
- Removed@vaadin/icon@24.7.0-alpha8(transitive)
- Removed@vaadin/item@24.7.0-alpha8(transitive)
- Removed@vaadin/list-box@24.7.0-alpha8(transitive)
- Removed@vaadin/lit-renderer@24.7.0-alpha8(transitive)
- Removed@vaadin/overlay@24.7.0-alpha8(transitive)
- Removed@vaadin/popover@24.7.0-alpha8(transitive)
- Removed@vaadin/tooltip@24.7.0-alpha8(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.7.0-alpha8(transitive)
- Removed@vaadin/vaadin-material-styles@24.7.0-alpha8(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.7.0-alpha8(transitive)
Updated@vaadin/avatar@24.7.0-alpha9
Updated@vaadin/item@24.7.0-alpha9