@vaadin/notification 24.0.0-alpha1 → 24.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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/notification",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/component-base": "24.0.0-
|
|
42
|
-
"@vaadin/lit-renderer": "24.0.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
41
|
+
"@vaadin/component-base": "24.0.0-alpha10",
|
|
42
|
+
"@vaadin/lit-renderer": "24.0.0-alpha10",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha10",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha10",
|
|
46
46
|
"lit": "^2.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@esm-bundle/chai": "^4.3.4",
|
|
50
|
-
"@vaadin/button": "24.0.0-
|
|
51
|
-
"@vaadin/polymer-legacy-adapter": "24.0.0-
|
|
50
|
+
"@vaadin/button": "24.0.0-alpha10",
|
|
51
|
+
"@vaadin/polymer-legacy-adapter": "24.0.0-alpha10",
|
|
52
52
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
53
53
|
"sinon": "^13.0.2"
|
|
54
54
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
|
|
60
60
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2023 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 { TemplateResult } from 'lit';
|
|
@@ -19,7 +19,7 @@ export type NotificationPosition =
|
|
|
19
19
|
| 'top-start'
|
|
20
20
|
| 'top-stretch';
|
|
21
21
|
|
|
22
|
-
export type NotificationRenderer = (root: HTMLElement, notification
|
|
22
|
+
export type NotificationRenderer = (root: HTMLElement, notification: Notification) => void;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Fired when the `opened` property changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2023 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';
|
|
@@ -376,6 +376,15 @@ class Notification extends ThemePropertyMixin(ElementMixin(PolymerElement)) {
|
|
|
376
376
|
return notification;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
/** @private */
|
|
380
|
+
get _container() {
|
|
381
|
+
if (!Notification._container) {
|
|
382
|
+
Notification._container = document.createElement('vaadin-notification-container');
|
|
383
|
+
document.body.appendChild(Notification._container);
|
|
384
|
+
}
|
|
385
|
+
return Notification._container;
|
|
386
|
+
}
|
|
387
|
+
|
|
379
388
|
/** @protected */
|
|
380
389
|
ready() {
|
|
381
390
|
super.ready();
|
|
@@ -444,15 +453,6 @@ class Notification extends ThemePropertyMixin(ElementMixin(PolymerElement)) {
|
|
|
444
453
|
this.opened = false;
|
|
445
454
|
}
|
|
446
455
|
|
|
447
|
-
/** @private */
|
|
448
|
-
get _container() {
|
|
449
|
-
if (!Notification._container) {
|
|
450
|
-
Notification._container = document.createElement('vaadin-notification-container');
|
|
451
|
-
document.body.appendChild(Notification._container);
|
|
452
|
-
}
|
|
453
|
-
return Notification._container;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
456
|
/** @private */
|
|
457
457
|
_openedChanged(opened) {
|
|
458
458
|
if (opened) {
|
|
@@ -491,7 +491,7 @@ class Notification extends ThemePropertyMixin(ElementMixin(PolymerElement)) {
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
this._card.slot = this.position;
|
|
494
|
-
if (this._container.firstElementChild && /top
|
|
494
|
+
if (this._container.firstElementChild && /top/u.test(this.position)) {
|
|
495
495
|
this._container.insertBefore(this._card, this._container.firstElementChild);
|
|
496
496
|
} else {
|
|
497
497
|
this._container.appendChild(this._card);
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED