@vaadin/vaadin-avatar 21.0.1 → 22.0.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,10 +1,29 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-avatar",
3
- "version": "21.0.1",
3
+ "version": "22.0.0-alpha10",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "vaadin-avatar",
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/vaadin/web-components.git",
12
+ "directory": "packages/vaadin-avatar"
13
+ },
14
+ "author": "Vaadin Ltd",
15
+ "homepage": "https://vaadin.com/components",
16
+ "bugs": {
17
+ "url": "https://github.com/vaadin/vaadin-avatar/issues"
18
+ },
5
19
  "main": "vaadin-avatar-group.js",
6
20
  "module": "vaadin-avatar-group.js",
7
- "repository": "vaadin/vaadin-avatar",
21
+ "files": [
22
+ "src",
23
+ "theme",
24
+ "vaadin-*.d.ts",
25
+ "vaadin-*.js"
26
+ ],
8
27
  "keywords": [
9
28
  "Vaadin",
10
29
  "vaadin-avatar",
@@ -12,37 +31,14 @@
12
31
  "web-component",
13
32
  "polymer"
14
33
  ],
15
- "author": "Vaadin Ltd",
16
- "license": "Apache-2.0",
17
- "bugs": {
18
- "url": "https://github.com/vaadin/vaadin-avatar/issues"
19
- },
20
- "homepage": "https://vaadin.com/components",
21
- "files": [
22
- "vaadin-*.d.ts",
23
- "vaadin-*.js",
24
- "src",
25
- "theme"
26
- ],
27
34
  "dependencies": {
28
- "@polymer/iron-a11y-announcer": "^3.0.0",
29
- "@polymer/iron-resizable-behavior": "^3.0.0",
30
- "@polymer/polymer": "^3.0.0",
31
- "@vaadin/vaadin-element-mixin": "^21.0.1",
32
- "@vaadin/vaadin-item": "^21.0.1",
33
- "@vaadin/vaadin-list-box": "^21.0.1",
34
- "@vaadin/vaadin-lumo-styles": "^21.0.1",
35
- "@vaadin/vaadin-material-styles": "^21.0.1",
36
- "@vaadin/vaadin-overlay": "^21.0.1",
37
- "@vaadin/vaadin-themable-mixin": "^21.0.1"
35
+ "@vaadin/avatar": "22.0.0-alpha10",
36
+ "@vaadin/avatar-group": "22.0.0-alpha10"
38
37
  },
39
38
  "devDependencies": {
40
- "@esm-bundle/chai": "^4.1.5",
41
- "@vaadin/testing-helpers": "^0.2.1",
39
+ "@esm-bundle/chai": "^4.3.4",
40
+ "@vaadin/testing-helpers": "^0.3.0",
42
41
  "sinon": "^9.2.1"
43
42
  },
44
- "publishConfig": {
45
- "access": "public"
46
- },
47
- "gitHead": "91e44dcfa63dc5e30e1e8d18be499b3e1e17b1c4"
43
+ "gitHead": "6d3055383b9c3c8306ea34c6f2e2087e63c49348"
48
44
  }
@@ -1,115 +1,18 @@
1
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
2
-
3
- import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
4
-
5
- import { AvatarGroupItem, AvatarGroupI18n } from './interfaces';
6
-
7
1
  /**
8
- * `<vaadin-avatar-group>` is a Web Component providing avatar group displaying functionality.
9
- *
10
- * To create the avatar group, first add the component to the page:
11
- *
12
- * ```
13
- * <vaadin-avatar-group></vaadin-avatar-group>
14
- * ```
15
- *
16
- * And then use [`items`](#/elements/vaadin-avatar-group#property-items) property to initialize the structure:
17
- *
18
- * ```
19
- * document.querySelector('vaadin-avatar-group').items = [
20
- * {name: 'John Doe'},
21
- * {abbr: 'AB'}
22
- * ];
23
- * ```
24
- *
25
- * ### Styling
26
- *
27
- * The following shadow DOM parts are exposed for styling:
28
- *
29
- * Part name | Description
30
- * ----------- | ---------------
31
- * `container` | The container element
32
- * `avatar` | Individual avatars
33
- *
34
- * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
35
- *
36
- * ### Internal components
37
- *
38
- * In addition to `<vaadin-avatar-group>` itself, the following internal
39
- * components are themable:
40
- *
41
- * - `<vaadin-avatar-group-list-box>` - has the same API as [`<vaadin-list-box>`](#/elements/vaadin-list-box).
42
- * - `<vaadin-avatar-group-overlay>` - has the same API as [`<vaadin-overlay>`](#/elements/vaadin-overlay).
2
+ * @license
3
+ * Copyright (c) 2021 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
43
5
  */
44
- declare class AvatarGroupElement extends ElementMixin(ThemableMixin(HTMLElement)) {
45
- readonly _avatars: HTMLElement[];
46
-
47
- /**
48
- * An array containing the items which will be stamped as avatars.
49
- *
50
- * The items objects allow to configure [`name`](#/elements/vaadin-avatar#property-name),
51
- * [`abbr`](#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)
52
- * and [`colorIndex`](#/elements/vaadin-avatar#property-colorIndex) properties on the
53
- * stamped avatars.
54
- *
55
- * #### Example
56
- *
57
- * ```js
58
- * group.items = [
59
- * {
60
- * name: 'User name',
61
- * img: 'url-to-image.png'
62
- * },
63
- * {
64
- * abbr: 'JD',
65
- * colorIndex: 1
66
- * },
67
- * ];
68
- * ```
69
- */
70
- items: AvatarGroupItem[] | undefined;
71
-
72
- /**
73
- * The maximum number of avatars to display. By default, all the avatars are displayed.
74
- * When _maxItemsVisible_ is set, the overflowing avatars are grouped into one avatar with
75
- * a dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.
76
- */
77
- maxItemsVisible: number | null | undefined;
6
+ import { AvatarGroup } from '@vaadin/avatar-group/src/vaadin-avatar-group.js';
78
7
 
79
- /**
80
- * The object used to localize this component.
81
- * To change the default localization, replace the entire
82
- * _i18n_ object or just the property you want to modify.
83
- *
84
- * The object has the following JSON structure and default values:
85
- * ```
86
- * {
87
- * // Translation of the anonymous user avatar title.
88
- * anonymous: 'anonymous',
89
- * // Translation of the avatar group accessible label.
90
- * // {count} is replaced with the actual count of users.
91
- * activeUsers: {
92
- * one: 'Currently one active user',
93
- * many: 'Currently {count} active users'
94
- * },
95
- * // Screen reader announcement when user joins group.
96
- * // {user} is replaced with the name or abbreviation.
97
- * // When neither is set, "anonymous" is used instead.
98
- * joined: '{user} joined',
99
- * // Screen reader announcement when user leaves group.
100
- * // {user} is replaced with the name or abbreviation.
101
- * // When neither is set, "anonymous" is used instead.
102
- * left: '{user} left'
103
- * }
104
- * ```
105
- */
106
- i18n: AvatarGroupI18n;
107
- }
8
+ /**
9
+ * @deprecated Import `AvatarGroup` from `@vaadin/avatar-group` instead.
10
+ */
11
+ export type AvatarGroupElement = AvatarGroup;
108
12
 
109
- declare global {
110
- interface HTMLElementTagNameMap {
111
- 'vaadin-avatar-group': AvatarGroupElement;
112
- }
113
- }
13
+ /**
14
+ * @deprecated Import `AvatarGroup` from `@vaadin/avatar-group` instead.
15
+ */
16
+ export const AvatarGroupElement: typeof AvatarGroup;
114
17
 
115
- export { AvatarGroupElement };
18
+ export * from '@vaadin/avatar-group/src/vaadin-avatar-group.js';