@vaadin/avatar-group 23.1.0-alpha1 → 23.1.0-alpha4
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": "23.1.0-
|
|
3
|
+
"version": "23.1.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/avatar": "23.1.0-
|
|
39
|
-
"@vaadin/component-base": "23.1.0-
|
|
40
|
-
"@vaadin/item": "23.1.0-
|
|
41
|
-
"@vaadin/list-box": "23.1.0-
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
43
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
44
|
-
"@vaadin/vaadin-overlay": "23.1.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
38
|
+
"@vaadin/avatar": "23.1.0-alpha4",
|
|
39
|
+
"@vaadin/component-base": "23.1.0-alpha4",
|
|
40
|
+
"@vaadin/item": "23.1.0-alpha4",
|
|
41
|
+
"@vaadin/list-box": "23.1.0-alpha4",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-alpha4",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "23.1.0-alpha4",
|
|
44
|
+
"@vaadin/vaadin-overlay": "23.1.0-alpha4",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
49
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
50
|
-
"sinon": "^
|
|
50
|
+
"sinon": "^13.0.2"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
|
|
53
53
|
}
|
|
@@ -190,7 +190,7 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
190
190
|
* @type {!Array<!AvatarGroupItem> | undefined}
|
|
191
191
|
*/
|
|
192
192
|
items: {
|
|
193
|
-
type: Array
|
|
193
|
+
type: Array,
|
|
194
194
|
},
|
|
195
195
|
|
|
196
196
|
/**
|
|
@@ -199,7 +199,7 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
199
199
|
* a dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.
|
|
200
200
|
*/
|
|
201
201
|
maxItemsVisible: {
|
|
202
|
-
type: Number
|
|
202
|
+
type: Number,
|
|
203
203
|
},
|
|
204
204
|
|
|
205
205
|
/**
|
|
@@ -238,32 +238,32 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
238
238
|
anonymous: 'anonymous',
|
|
239
239
|
activeUsers: {
|
|
240
240
|
one: 'Currently one active user',
|
|
241
|
-
many: 'Currently {count} active users'
|
|
241
|
+
many: 'Currently {count} active users',
|
|
242
242
|
},
|
|
243
243
|
joined: '{user} joined',
|
|
244
|
-
left: '{user} left'
|
|
244
|
+
left: '{user} left',
|
|
245
245
|
};
|
|
246
|
-
}
|
|
246
|
+
},
|
|
247
247
|
},
|
|
248
248
|
|
|
249
249
|
/** @private */
|
|
250
250
|
__maxReached: {
|
|
251
251
|
type: Boolean,
|
|
252
|
-
computed: '__computeMaxReached(items.length, maxItemsVisible)'
|
|
252
|
+
computed: '__computeMaxReached(items.length, maxItemsVisible)',
|
|
253
253
|
},
|
|
254
254
|
|
|
255
255
|
/** @private */
|
|
256
256
|
__itemsInView: {
|
|
257
257
|
type: Number,
|
|
258
|
-
value: null
|
|
258
|
+
value: null,
|
|
259
259
|
},
|
|
260
260
|
|
|
261
261
|
/** @private */
|
|
262
262
|
_opened: {
|
|
263
263
|
type: Boolean,
|
|
264
264
|
observer: '__openedChanged',
|
|
265
|
-
value: false
|
|
266
|
-
}
|
|
265
|
+
value: false,
|
|
266
|
+
},
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -271,7 +271,7 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
271
271
|
return [
|
|
272
272
|
'__computeMoreTitle(items.length, __itemsInView, maxItemsVisible)',
|
|
273
273
|
'__itemsChanged(items.splices, items.*)',
|
|
274
|
-
'__i18nItemsChanged(i18n.*, items.length)'
|
|
274
|
+
'__i18nItemsChanged(i18n.*, items.length)',
|
|
275
275
|
];
|
|
276
276
|
}
|
|
277
277
|
|
|
@@ -352,7 +352,7 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
352
352
|
|
|
353
353
|
/** @private */
|
|
354
354
|
_onVaadinOverlayClose(e) {
|
|
355
|
-
if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().
|
|
355
|
+
if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
|
|
356
356
|
e.preventDefault();
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -545,7 +545,7 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
545
545
|
const { marginLeft, marginRight } = getComputedStyle(avatars[1]);
|
|
546
546
|
|
|
547
547
|
const offset =
|
|
548
|
-
this.getAttribute('dir')
|
|
548
|
+
this.getAttribute('dir') === 'rtl'
|
|
549
549
|
? parseInt(marginRight, 0) - parseInt(marginLeft, 0)
|
|
550
550
|
: parseInt(marginLeft, 0) - parseInt(marginRight, 0);
|
|
551
551
|
|
|
@@ -564,19 +564,19 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
|
|
|
564
564
|
const isRtl = this.getAttribute('dir') === 'rtl';
|
|
565
565
|
|
|
566
566
|
if (isRtl) {
|
|
567
|
-
this._overlayElement.style.right = document.documentElement.clientWidth - btnRect.right
|
|
567
|
+
this._overlayElement.style.right = `${document.documentElement.clientWidth - btnRect.right}px`;
|
|
568
568
|
} else {
|
|
569
|
-
this._overlayElement.style.left = btnRect.left
|
|
569
|
+
this._overlayElement.style.left = `${btnRect.left}px`;
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
if (bottomAlign) {
|
|
573
573
|
this._overlayElement.setAttribute('bottom-aligned', '');
|
|
574
574
|
this._overlayElement.style.removeProperty('top');
|
|
575
|
-
this._overlayElement.style.bottom = viewportHeight - btnRect.top
|
|
575
|
+
this._overlayElement.style.bottom = `${viewportHeight - btnRect.top}px`;
|
|
576
576
|
} else {
|
|
577
577
|
this._overlayElement.removeAttribute('bottom-aligned');
|
|
578
578
|
this._overlayElement.style.removeProperty('bottom');
|
|
579
|
-
this._overlayElement.style.top = btnRect.bottom
|
|
579
|
+
this._overlayElement.style.top = `${btnRect.bottom}px`;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
}
|
|
@@ -44,7 +44,7 @@ registerStyles(
|
|
|
44
44
|
--vaadin-avatar-size: var(--lumo-size-xs);
|
|
45
45
|
}
|
|
46
46
|
`,
|
|
47
|
-
{ moduleId: 'lumo-avatar-group' }
|
|
47
|
+
{ moduleId: 'lumo-avatar-group' },
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
const avatarGroupOverlay = css`
|
|
@@ -59,7 +59,7 @@ const avatarGroupOverlay = css`
|
|
|
59
59
|
`;
|
|
60
60
|
|
|
61
61
|
registerStyles('vaadin-avatar-group-overlay', [overlay, menuOverlayCore, avatarGroupOverlay], {
|
|
62
|
-
moduleId: 'lumo-avatar-group-overlay'
|
|
62
|
+
moduleId: 'lumo-avatar-group-overlay',
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
registerStyles(
|
|
@@ -75,7 +75,7 @@ registerStyles(
|
|
|
75
75
|
padding-left: var(--lumo-space-m);
|
|
76
76
|
}
|
|
77
77
|
`,
|
|
78
|
-
{ moduleId: 'lumo-avatar-group-list-box' }
|
|
78
|
+
{ moduleId: 'lumo-avatar-group-list-box' },
|
|
79
79
|
);
|
|
80
80
|
|
|
81
81
|
registerStyles(
|
|
@@ -99,5 +99,5 @@ registerStyles(
|
|
|
99
99
|
margin-left: var(--lumo-space-s);
|
|
100
100
|
}
|
|
101
101
|
`,
|
|
102
|
-
{ moduleId: 'lumo-avatar-group-item' }
|
|
102
|
+
{ moduleId: 'lumo-avatar-group-item' },
|
|
103
103
|
);
|
|
@@ -9,7 +9,7 @@ const avatarGroupOverlay = css`
|
|
|
9
9
|
`;
|
|
10
10
|
|
|
11
11
|
registerStyles('vaadin-avatar-group-overlay', [menuOverlay, avatarGroupOverlay], {
|
|
12
|
-
moduleId: 'material-avatar-group-overlay'
|
|
12
|
+
moduleId: 'material-avatar-group-overlay',
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
registerStyles(
|
|
@@ -25,7 +25,7 @@ registerStyles(
|
|
|
25
25
|
padding-left: 24px;
|
|
26
26
|
}
|
|
27
27
|
`,
|
|
28
|
-
{ moduleId: 'material-avatar-group-list-box' }
|
|
28
|
+
{ moduleId: 'material-avatar-group-list-box' },
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
registerStyles(
|
|
@@ -48,5 +48,5 @@ registerStyles(
|
|
|
48
48
|
margin-left: 8px;
|
|
49
49
|
}
|
|
50
50
|
`,
|
|
51
|
-
{ moduleId: 'material-avatar-group-item' }
|
|
51
|
+
{ moduleId: 'material-avatar-group-item' },
|
|
52
52
|
);
|