@vaadin/avatar-group 24.7.0-alpha1 → 24.7.0-alpha10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/avatar-group",
3
- "version": "24.7.0-alpha1",
3
+ "version": "24.7.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,25 +38,26 @@
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.7.0-alpha1",
42
- "@vaadin/avatar": "24.7.0-alpha1",
43
- "@vaadin/component-base": "24.7.0-alpha1",
44
- "@vaadin/item": "24.7.0-alpha1",
45
- "@vaadin/list-box": "24.7.0-alpha1",
46
- "@vaadin/overlay": "24.7.0-alpha1",
47
- "@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
48
- "@vaadin/vaadin-material-styles": "24.7.0-alpha1",
49
- "@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
41
+ "@vaadin/a11y-base": "24.7.0-alpha10",
42
+ "@vaadin/avatar": "24.7.0-alpha10",
43
+ "@vaadin/component-base": "24.7.0-alpha10",
44
+ "@vaadin/item": "24.7.0-alpha10",
45
+ "@vaadin/list-box": "24.7.0-alpha10",
46
+ "@vaadin/overlay": "24.7.0-alpha10",
47
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha10",
48
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha10",
49
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha10",
50
50
  "lit": "^3.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@vaadin/chai-plugins": "24.7.0-alpha1",
54
- "@vaadin/testing-helpers": "^1.0.0",
53
+ "@vaadin/chai-plugins": "24.7.0-alpha10",
54
+ "@vaadin/test-runner-commands": "24.7.0-alpha10",
55
+ "@vaadin/testing-helpers": "^1.1.0",
55
56
  "sinon": "^18.0.0"
56
57
  },
57
58
  "web-types": [
58
59
  "web-types.json",
59
60
  "web-types.lit.json"
60
61
  ],
61
- "gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
62
+ "gitHead": "c0f8933df2a6a40648d3fb9cfbae6bbf86a8aa90"
62
63
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,21 +1,24 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { AvatarI18n } from '@vaadin/avatar/src/vaadin-avatar.js';
8
+ import type { I18nMixinClass, PartialI18n } from '@vaadin/component-base/src/i18n-mixin.js';
8
9
  import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
9
10
  import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
10
11
 
11
- export interface AvatarGroupI18n extends AvatarI18n {
12
- activeUsers: {
13
- one: string;
14
- many: string;
15
- };
16
- joined: string;
17
- left: string;
18
- }
12
+ export type AvatarGroupI18n = PartialI18n<
13
+ {
14
+ activeUsers: {
15
+ one: string;
16
+ many: string;
17
+ };
18
+ joined: string;
19
+ left: string;
20
+ } & AvatarI18n
21
+ >;
19
22
 
20
23
  export interface AvatarGroupItem {
21
24
  name?: string;
@@ -30,7 +33,11 @@ export interface AvatarGroupItem {
30
33
  */
31
34
  export declare function AvatarGroupMixin<T extends Constructor<HTMLElement>>(
32
35
  base: T,
33
- ): Constructor<AvatarGroupMixinClass> & Constructor<OverlayClassMixinClass> & Constructor<ResizeMixinClass> & T;
36
+ ): Constructor<AvatarGroupMixinClass> &
37
+ Constructor<I18nMixinClass<AvatarGroupI18n>> &
38
+ Constructor<OverlayClassMixinClass> &
39
+ Constructor<ResizeMixinClass> &
40
+ T;
34
41
 
35
42
  export declare class AvatarGroupMixinClass {
36
43
  /**
@@ -69,9 +76,9 @@ export declare class AvatarGroupMixinClass {
69
76
  maxItemsVisible: number | null | undefined;
70
77
 
71
78
  /**
72
- * The object used to localize this component.
73
- * To change the default localization, replace the entire
74
- * _i18n_ object or just the property you want to modify.
79
+ * The object used to localize this component. To change the default
80
+ * localization, replace this with an object that provides all properties, or
81
+ * just the individual properties you want to change.
75
82
  *
76
83
  * The object has the following JSON structure and default values:
77
84
  * ```
@@ -1,27 +1,39 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
7
7
  import { html, render } from 'lit';
8
8
  import { ifDefined } from 'lit/directives/if-defined.js';
9
9
  import { announce } from '@vaadin/a11y-base/src/announce.js';
10
+ import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
10
11
  import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
11
12
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
12
13
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
13
14
 
14
15
  const MINIMUM_DISPLAYED_AVATARS = 2;
15
16
 
17
+ const DEFAULT_I18N = {
18
+ anonymous: 'anonymous',
19
+ activeUsers: {
20
+ one: 'Currently one active user',
21
+ many: 'Currently {count} active users',
22
+ },
23
+ joined: '{user} joined',
24
+ left: '{user} left',
25
+ };
26
+
16
27
  /**
17
28
  * A mixin providing common avatar group functionality.
18
29
  *
19
30
  * @polymerMixin
31
+ * @mixes I18nMixin
20
32
  * @mixes ResizeMixin
21
33
  * @mixes OverlayClassMixin
22
34
  */
23
35
  export const AvatarGroupMixin = (superClass) =>
24
- class AvatarGroupMixinClass extends ResizeMixin(OverlayClassMixin(superClass)) {
36
+ class AvatarGroupMixinClass extends I18nMixin(DEFAULT_I18N, ResizeMixin(OverlayClassMixin(superClass))) {
25
37
  static get properties() {
26
38
  return {
27
39
  /**
@@ -68,51 +80,6 @@ export const AvatarGroupMixin = (superClass) =>
68
80
  sync: true,
69
81
  },
70
82
 
71
- /**
72
- * The object used to localize this component.
73
- * To change the default localization, replace the entire
74
- * _i18n_ object or just the property you want to modify.
75
- *
76
- * The object has the following JSON structure and default values:
77
- * ```
78
- * {
79
- * // Translation of the anonymous user avatar tooltip.
80
- * anonymous: 'anonymous',
81
- * // Translation of the avatar group accessible label.
82
- * // {count} is replaced with the actual count of users.
83
- * activeUsers: {
84
- * one: 'Currently one active user',
85
- * many: 'Currently {count} active users'
86
- * },
87
- * // Screen reader announcement when user joins group.
88
- * // {user} is replaced with the name or abbreviation.
89
- * // When neither is set, "anonymous" is used instead.
90
- * joined: '{user} joined',
91
- * // Screen reader announcement when user leaves group.
92
- * // {user} is replaced with the name or abbreviation.
93
- * // When neither is set, "anonymous" is used instead.
94
- * left: '{user} left'
95
- * }
96
- * ```
97
- * @type {!AvatarGroupI18n}
98
- * @default {English/US}
99
- */
100
- i18n: {
101
- type: Object,
102
- sync: true,
103
- value: () => {
104
- return {
105
- anonymous: 'anonymous',
106
- activeUsers: {
107
- one: 'Currently one active user',
108
- many: 'Currently {count} active users',
109
- },
110
- joined: '{user} joined',
111
- left: '{user} left',
112
- };
113
- },
114
- },
115
-
116
83
  /** @private */
117
84
  _avatars: {
118
85
  type: Array,
@@ -138,7 +105,6 @@ export const AvatarGroupMixin = (superClass) =>
138
105
  type: Array,
139
106
  observer: '__overflowItemsChanged',
140
107
  computed: '__computeOverflowItems(items, __itemsInView, maxItemsVisible)',
141
- sync: true,
142
108
  },
143
109
 
144
110
  /** @private */
@@ -157,21 +123,58 @@ export const AvatarGroupMixin = (superClass) =>
157
123
 
158
124
  static get observers() {
159
125
  return [
160
- '__i18nItemsChanged(i18n, items)',
126
+ '__i18nItemsChanged(__effectiveI18n, items)',
161
127
  '__openedChanged(_opened, _overflow)',
162
128
  '__updateAvatarsTheme(_overflow, _avatars, _theme)',
163
- '__updateAvatars(items, __itemsInView, maxItemsVisible, _overflow, i18n)',
129
+ '__updateAvatars(items, __itemsInView, maxItemsVisible, _overflow, __effectiveI18n)',
164
130
  '__updateOverflowAvatar(_overflow, items, __itemsInView, maxItemsVisible)',
165
131
  '__updateOverflowTooltip(_overflowTooltip, items, __itemsInView, maxItemsVisible)',
166
132
  ];
167
133
  }
168
134
 
135
+ /**
136
+ * The object used to localize this component. To change the default
137
+ * localization, replace this with an object that provides all properties, or
138
+ * just the individual properties you want to change.
139
+ *
140
+ * The object has the following JSON structure and default values:
141
+ * ```
142
+ * {
143
+ * // Translation of the anonymous user avatar tooltip.
144
+ * anonymous: 'anonymous',
145
+ * // Translation of the avatar group accessible label.
146
+ * // {count} is replaced with the actual count of users.
147
+ * activeUsers: {
148
+ * one: 'Currently one active user',
149
+ * many: 'Currently {count} active users'
150
+ * },
151
+ * // Screen reader announcement when user joins group.
152
+ * // {user} is replaced with the name or abbreviation.
153
+ * // When neither is set, "anonymous" is used instead.
154
+ * joined: '{user} joined',
155
+ * // Screen reader announcement when user leaves group.
156
+ * // {user} is replaced with the name or abbreviation.
157
+ * // When neither is set, "anonymous" is used instead.
158
+ * left: '{user} left'
159
+ * }
160
+ * ```
161
+ * @return {!AvatarGroupI18n}
162
+ */
163
+ get i18n() {
164
+ return super.i18n;
165
+ }
166
+
167
+ set i18n(value) {
168
+ super.i18n = value;
169
+ }
170
+
169
171
  /** @protected */
170
172
  ready() {
171
173
  super.ready();
172
174
 
173
175
  this._overflowController = new SlotController(this, 'overflow', 'vaadin-avatar', {
174
176
  initializer: (overflow) => {
177
+ overflow.setAttribute('role', 'button');
175
178
  overflow.setAttribute('aria-haspopup', 'menu');
176
179
  overflow.setAttribute('aria-expanded', 'false');
177
180
  overflow.addEventListener('click', (e) => this._onOverflowClick(e));
@@ -205,7 +208,7 @@ export const AvatarGroupMixin = (superClass) =>
205
208
 
206
209
  /** @private */
207
210
  __getMessage(user, action) {
208
- return action.replace('{user}', user.name || user.abbr || this.i18n.anonymous);
211
+ return action.replace('{user}', user.name || user.abbr || this.__effectiveI18n.anonymous);
209
212
  }
210
213
 
211
214
  /**
@@ -242,7 +245,7 @@ export const AvatarGroupMixin = (superClass) =>
242
245
 
243
246
  avatar.setAttribute('aria-hidden', 'true');
244
247
  avatar.setAttribute('tabindex', '-1');
245
- avatar.i18n = this.i18n;
248
+ avatar.i18n = this.__effectiveI18n;
246
249
 
247
250
  if (this._theme) {
248
251
  avatar.setAttribute('theme', this._theme);
@@ -324,7 +327,7 @@ export const AvatarGroupMixin = (superClass) =>
324
327
  .abbr="${item.abbr}"
325
328
  .img="${item.img}"
326
329
  .colorIndex="${item.colorIndex}"
327
- .i18n="${this.i18n}"
330
+ .i18n="${this.__effectiveI18n}"
328
331
  class="${ifDefined(item.className)}"
329
332
  with-tooltip
330
333
  ></vaadin-avatar>
@@ -447,11 +450,11 @@ export const AvatarGroupMixin = (superClass) =>
447
450
  let addedMsg = [];
448
451
  let removedMsg = [];
449
452
  if (added) {
450
- addedMsg = added.map((user) => this.__getMessage(user, this.i18n.joined || '{user} joined'));
453
+ addedMsg = added.map((user) => this.__getMessage(user, this.__effectiveI18n.joined || '{user} joined'));
451
454
  }
452
455
 
453
456
  if (removed) {
454
- removedMsg = removed.map((user) => this.__getMessage(user, this.i18n.left || '{user} left'));
457
+ removedMsg = removed.map((user) => this.__getMessage(user, this.__effectiveI18n.left || '{user} left'));
455
458
  }
456
459
 
457
460
  const messages = removedMsg.concat(addedMsg);
@@ -461,16 +464,16 @@ export const AvatarGroupMixin = (superClass) =>
461
464
  }
462
465
 
463
466
  /** @private */
464
- __i18nItemsChanged(i18n, items) {
465
- if (i18n && i18n.activeUsers) {
467
+ __i18nItemsChanged(effectiveI18n, items) {
468
+ if (effectiveI18n && effectiveI18n.activeUsers) {
466
469
  const count = Array.isArray(items) ? items.length : 0;
467
470
  const field = count === 1 ? 'one' : 'many';
468
- if (i18n.activeUsers[field]) {
469
- this.setAttribute('aria-label', i18n.activeUsers[field].replace('{count}', count || 0));
471
+ if (effectiveI18n.activeUsers[field]) {
472
+ this.setAttribute('aria-label', effectiveI18n.activeUsers[field].replace('{count}', count || 0));
470
473
  }
471
474
 
472
475
  this._avatars.forEach((avatar) => {
473
- avatar.i18n = i18n;
476
+ avatar.i18n = effectiveI18n;
474
477
  });
475
478
  }
476
479
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { CSSResult } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { AvatarI18n } from '@vaadin/avatar/src/vaadin-avatar.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/avatar/src/vaadin-avatar.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { css, html, LitElement } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { css, html, LitElement } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, LitElement } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2020 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2020 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/avatar/src/vaadin-lit-avatar.js';
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar-group",
4
- "version": "24.7.0-alpha1",
4
+ "version": "24.7.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-avatar-group",
11
- "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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/elements/vaadin-item).",
11
+ "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-alpha10/#/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-alpha10/#/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-alpha10/#/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-alpha10/#/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-alpha10/#/elements/vaadin-item).",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "overlay-class",
@@ -46,6 +46,15 @@
46
46
  ],
47
47
  "js": {
48
48
  "properties": [
49
+ {
50
+ "name": "i18n",
51
+ "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```",
52
+ "value": {
53
+ "type": [
54
+ "AvatarGroupI18n"
55
+ ]
56
+ }
57
+ },
49
58
  {
50
59
  "name": "overlayClass",
51
60
  "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.",
@@ -59,7 +68,7 @@
59
68
  },
60
69
  {
61
70
  "name": "items",
62
- "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-alpha1/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/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```",
71
+ "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-alpha10/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/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```",
63
72
  "value": {
64
73
  "type": [
65
74
  "Array.<AvatarGroupItem>",
@@ -77,15 +86,6 @@
77
86
  "undefined"
78
87
  ]
79
88
  }
80
- },
81
- {
82
- "name": "i18n",
83
- "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```",
84
- "value": {
85
- "type": [
86
- "AvatarGroupI18n"
87
- ]
88
- }
89
89
  }
90
90
  ],
91
91
  "events": []
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar-group",
4
- "version": "24.7.0-alpha1",
4
+ "version": "24.7.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,33 +16,33 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-avatar-group",
19
- "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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/elements/vaadin-item).",
19
+ "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-alpha10/#/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-alpha10/#/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-alpha10/#/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-alpha10/#/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-alpha10/#/elements/vaadin-item).",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
23
- "name": ".overlayClass",
24
- "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.",
23
+ "name": ".i18n",
24
+ "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```",
25
25
  "value": {
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
29
  {
30
- "name": ".items",
31
- "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-alpha1/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha1/#/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```",
30
+ "name": ".overlayClass",
31
+ "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.",
32
32
  "value": {
33
33
  "kind": "expression"
34
34
  }
35
35
  },
36
36
  {
37
- "name": ".maxItemsVisible",
38
- "description": "The maximum number of avatars to display. By default, all the avatars are displayed.\nWhen _maxItemsVisible_ is set, the overflowing avatars are grouped into one avatar with\na dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.",
37
+ "name": ".items",
38
+ "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-alpha10/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/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```",
39
39
  "value": {
40
40
  "kind": "expression"
41
41
  }
42
42
  },
43
43
  {
44
- "name": ".i18n",
45
- "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```",
44
+ "name": ".maxItemsVisible",
45
+ "description": "The maximum number of avatars to display. By default, all the avatars are displayed.\nWhen _maxItemsVisible_ is set, the overflowing avatars are grouped into one avatar with\na dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.",
46
46
  "value": {
47
47
  "kind": "expression"
48
48
  }