@vaadin/notification 25.0.0-alpha1 → 25.0.0-alpha11
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 +10 -12
- package/src/styles/vaadin-notification-card-base-styles.d.ts +8 -0
- package/src/styles/vaadin-notification-card-base-styles.js +33 -0
- package/src/styles/vaadin-notification-container-base-styles.d.ts +8 -0
- package/src/styles/vaadin-notification-container-base-styles.js +121 -0
- package/src/vaadin-notification-mixin.d.ts +6 -2
- package/src/vaadin-notification-mixin.js +25 -4
- package/src/vaadin-notification.js +7 -3
- package/vaadin-notification.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-notification-styles.js +0 -71
- package/theme/lumo/vaadin-notification-styles.d.ts +0 -4
- package/theme/lumo/vaadin-notification-styles.js +0 -225
- package/theme/lumo/vaadin-notification.d.ts +0 -2
- package/theme/lumo/vaadin-notification.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/notification",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"lit.d.ts",
|
|
24
24
|
"lit.js",
|
|
25
25
|
"src",
|
|
26
|
-
"theme",
|
|
27
26
|
"vaadin-*.d.ts",
|
|
28
27
|
"vaadin-*.js",
|
|
29
28
|
"web-types.json",
|
|
@@ -37,23 +36,22 @@
|
|
|
37
36
|
],
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/component-base": "25.0.0-
|
|
41
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
42
|
-
"@vaadin/
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha11",
|
|
40
|
+
"@vaadin/lit-renderer": "25.0.0-alpha11",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
|
|
45
42
|
"lit": "^3.0.0"
|
|
46
43
|
},
|
|
47
44
|
"devDependencies": {
|
|
48
|
-
"@vaadin/button": "25.0.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
51
|
-
"@vaadin/testing-helpers": "^
|
|
45
|
+
"@vaadin/button": "25.0.0-alpha11",
|
|
46
|
+
"@vaadin/chai-plugins": "25.0.0-alpha11",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha11",
|
|
48
|
+
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
|
|
52
50
|
"sinon": "^18.0.0"
|
|
53
51
|
},
|
|
54
52
|
"web-types": [
|
|
55
53
|
"web-types.json",
|
|
56
54
|
"web-types.lit.json"
|
|
57
55
|
],
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
|
|
59
57
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
|
|
9
|
+
export const notificationCardStyles = css`
|
|
10
|
+
:host {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[part='overlay'] {
|
|
15
|
+
pointer-events: auto;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
width: var(--vaadin-notification-width, 40ch);
|
|
18
|
+
max-width: 100%;
|
|
19
|
+
padding: var(--vaadin-notification-padding, var(--vaadin-padding));
|
|
20
|
+
background: var(--vaadin-notification-background, var(--vaadin-background-container));
|
|
21
|
+
border: var(--vaadin-notification-border-width, 1px) solid
|
|
22
|
+
var(--vaadin-notification-border-color, var(--vaadin-border-color));
|
|
23
|
+
box-shadow: var(--vaadin-notification-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));
|
|
24
|
+
border-radius: var(--vaadin-notification-border-radius, var(--vaadin-radius-l));
|
|
25
|
+
cursor: default;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (forced-colors: active) {
|
|
29
|
+
[part='overlay'] {
|
|
30
|
+
border: 3px solid;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
|
|
9
|
+
export const notificationContainerStyles = css`
|
|
10
|
+
:host {
|
|
11
|
+
/* How much space to reserve for overlay box shadow, to prevent clipping it with overflow:auto */
|
|
12
|
+
--_paint-area: 2em;
|
|
13
|
+
/* Space between notifications and the viewport */
|
|
14
|
+
--_padding: var(--vaadin-notification-viewport-inset, var(--vaadin-padding));
|
|
15
|
+
/* Space between notifications */
|
|
16
|
+
--_gap: var(--vaadin-notification-gap, var(--vaadin-gap-container-block));
|
|
17
|
+
display: grid;
|
|
18
|
+
/* top-stretch, top and bottom regions, bottom-stretch */
|
|
19
|
+
grid-template-rows: auto 1fr auto;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
padding: var(--_padding);
|
|
25
|
+
border: 0;
|
|
26
|
+
background: transparent;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
interpolate-size: allow-keywords;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host > * {
|
|
32
|
+
grid-column: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[region-group] {
|
|
36
|
+
position: relative;
|
|
37
|
+
grid-row: 2 / 3;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[region] {
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
max-height: 100%;
|
|
43
|
+
pointer-events: auto;
|
|
44
|
+
scrollbar-width: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* scrollbar-width is supported since Safari 18.2, use the following for earlier */
|
|
48
|
+
[region]::-webkit-scrollbar {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[region='top-stretch'] {
|
|
53
|
+
grid-row: 1;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
--vaadin-notification-width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[region='bottom-stretch'] {
|
|
59
|
+
grid-row: 3;
|
|
60
|
+
z-index: 2;
|
|
61
|
+
--vaadin-notification-width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[region='middle'],
|
|
65
|
+
[region-group] > [region] {
|
|
66
|
+
position: absolute;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[region='middle'] {
|
|
70
|
+
position: fixed;
|
|
71
|
+
top: 50%;
|
|
72
|
+
left: 50%;
|
|
73
|
+
translate: -50% -50%;
|
|
74
|
+
max-width: calc(100% - var(--_padding) * 2);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[region]:where(:hover, :focus-within) {
|
|
78
|
+
z-index: 1;
|
|
79
|
+
overflow: auto;
|
|
80
|
+
overscroll-behavior: contain;
|
|
81
|
+
padding: var(--_paint-area);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[region]:not([region='middle'], [region$='center']):where(:hover, :focus-within) {
|
|
85
|
+
margin-inline: calc(var(--_paint-area) * -1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[region]:not([region='middle']):where(:hover, :focus-within) {
|
|
89
|
+
margin-block: calc(var(--_paint-area) * -1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[region-group='top'] > [region] {
|
|
93
|
+
top: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[region-group='bottom'] > [region] {
|
|
97
|
+
bottom: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[region-group] > [region$='start'] {
|
|
101
|
+
inset-inline-start: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[region-group] > [region$='center'] {
|
|
105
|
+
left: 50%;
|
|
106
|
+
translate: -50%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[region-group] > [region$='end'] {
|
|
110
|
+
inset-inline-end: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
::slotted(*) {
|
|
114
|
+
margin-bottom: var(--_gap);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:is([region^='bottom'], [region='middle']) ::slotted(*) {
|
|
118
|
+
margin-top: var(--_gap);
|
|
119
|
+
margin-bottom: 0;
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
1
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
2
7
|
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
3
|
-
import type { OverlayStackMixinClass } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';
|
|
4
8
|
import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
5
9
|
import type { Notification } from './vaadin-notification.js';
|
|
6
10
|
|
|
@@ -22,7 +26,7 @@ export type NotificationRenderer = (root: HTMLElement, notification: Notificatio
|
|
|
22
26
|
*/
|
|
23
27
|
export declare function NotificationContainerMixin<T extends Constructor<HTMLElement>>(
|
|
24
28
|
base: T,
|
|
25
|
-
): Constructor<NotificationContainerMixinClass> &
|
|
29
|
+
): Constructor<NotificationContainerMixinClass> & T;
|
|
26
30
|
|
|
27
31
|
export declare class NotificationContainerMixinClass {
|
|
28
32
|
/**
|
|
@@ -7,17 +7,15 @@ import { render } from 'lit';
|
|
|
7
7
|
import { isTemplateResult } from 'lit/directive-helpers.js';
|
|
8
8
|
import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
|
|
9
9
|
import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
10
|
-
import { OverlayStackMixin } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';
|
|
11
10
|
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* A mixin providing common notification container functionality.
|
|
15
14
|
*
|
|
16
15
|
* @polymerMixin
|
|
17
|
-
* @mixes OverlayStackMixin
|
|
18
16
|
*/
|
|
19
17
|
export const NotificationContainerMixin = (superClass) =>
|
|
20
|
-
class extends
|
|
18
|
+
class extends superClass {
|
|
21
19
|
static get properties() {
|
|
22
20
|
return {
|
|
23
21
|
/**
|
|
@@ -42,10 +40,28 @@ export const NotificationContainerMixin = (superClass) =>
|
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
|
|
43
|
+
/** @protected */
|
|
44
|
+
firstUpdated(props) {
|
|
45
|
+
super.firstUpdated(props);
|
|
46
|
+
|
|
47
|
+
this.popover = 'manual';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Move the notification container to the top of the stack.
|
|
52
|
+
*/
|
|
53
|
+
bringToFront() {
|
|
54
|
+
if (this.matches(':popover-open')) {
|
|
55
|
+
this.hidePopover();
|
|
56
|
+
this.showPopover();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
45
60
|
/** @private */
|
|
46
61
|
_openedChanged(opened) {
|
|
47
62
|
if (opened) {
|
|
48
63
|
document.body.appendChild(this);
|
|
64
|
+
this.showPopover();
|
|
49
65
|
document.addEventListener('vaadin-overlay-close', this._boundVaadinOverlayClose);
|
|
50
66
|
if (this._boundIosResizeListener) {
|
|
51
67
|
this._detectIosNavbar();
|
|
@@ -53,6 +69,7 @@ export const NotificationContainerMixin = (superClass) =>
|
|
|
53
69
|
}
|
|
54
70
|
} else {
|
|
55
71
|
document.body.removeChild(this);
|
|
72
|
+
this.hidePopover();
|
|
56
73
|
document.removeEventListener('vaadin-overlay-close', this._boundVaadinOverlayClose);
|
|
57
74
|
if (this._boundIosResizeListener) {
|
|
58
75
|
window.removeEventListener('resize', this._boundIosResizeListener);
|
|
@@ -358,7 +375,11 @@ export const NotificationMixin = (superClass) =>
|
|
|
358
375
|
return;
|
|
359
376
|
}
|
|
360
377
|
|
|
361
|
-
|
|
378
|
+
// Only call bringToFront if the container already has a child / was already opened.
|
|
379
|
+
// Otherwise, just setting `opened` on the container will make it the topmost overlay.
|
|
380
|
+
if (this._container.firstElementChild) {
|
|
381
|
+
this._container.bringToFront();
|
|
382
|
+
}
|
|
362
383
|
|
|
363
384
|
this._card.slot = this.position;
|
|
364
385
|
if (this._container.firstElementChild && /top/u.test(this.position)) {
|
|
@@ -8,9 +8,11 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
11
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
+
import { notificationCardStyles } from './styles/vaadin-notification-card-base-styles.js';
|
|
14
|
+
import { notificationContainerStyles } from './styles/vaadin-notification-container-base-styles.js';
|
|
12
15
|
import { NotificationContainerMixin, NotificationMixin } from './vaadin-notification-mixin.js';
|
|
13
|
-
import { notificationCardStyles, notificationContainerStyles } from './vaadin-notification-styles.js';
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* An element used internally by `<vaadin-notification>`. Not intended to be used separately.
|
|
@@ -22,7 +24,9 @@ import { notificationCardStyles, notificationContainerStyles } from './vaadin-no
|
|
|
22
24
|
* @mixes ThemableMixin
|
|
23
25
|
* @private
|
|
24
26
|
*/
|
|
25
|
-
class NotificationContainer extends NotificationContainerMixin(
|
|
27
|
+
class NotificationContainer extends NotificationContainerMixin(
|
|
28
|
+
ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
29
|
+
) {
|
|
26
30
|
static get is() {
|
|
27
31
|
return 'vaadin-notification-container';
|
|
28
32
|
}
|
|
@@ -59,7 +63,7 @@ class NotificationContainer extends NotificationContainerMixin(ThemableMixin(Ele
|
|
|
59
63
|
* @mixes ThemableMixin
|
|
60
64
|
* @private
|
|
61
65
|
*/
|
|
62
|
-
class NotificationCard extends ThemableMixin(PolylitMixin(LitElement)) {
|
|
66
|
+
class NotificationCard extends ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))) {
|
|
63
67
|
static get is() {
|
|
64
68
|
return 'vaadin-notification-card';
|
|
65
69
|
}
|
package/vaadin-notification.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-notification.js';
|
|
2
2
|
export * from './src/vaadin-notification.js';
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const notificationContainerStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
position: fixed;
|
|
11
|
-
z-index: 1000;
|
|
12
|
-
inset: 0;
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: stretch;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
[region-group] {
|
|
21
|
-
flex: 1 1 0%;
|
|
22
|
-
display: flex;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[region-group='top'] {
|
|
26
|
-
align-items: flex-start;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
[region-group='bottom'] {
|
|
30
|
-
align-items: flex-end;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[region-group] > [region] {
|
|
34
|
-
flex: 1 1 0%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media (max-width: 420px) {
|
|
38
|
-
[region-group] {
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
align-items: stretch;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[region-group='top'] {
|
|
44
|
-
justify-content: flex-start;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[region-group='bottom'] {
|
|
48
|
-
justify-content: flex-end;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[region-group] > [region] {
|
|
52
|
-
flex: initial;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
export const notificationCardStyles = css`
|
|
58
|
-
:host {
|
|
59
|
-
display: block;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[part='overlay'] {
|
|
63
|
-
pointer-events: auto;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@media (forced-colors: active) {
|
|
67
|
-
[part='overlay'] {
|
|
68
|
-
outline: 3px solid;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
3
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
4
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
5
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
6
|
-
|
|
7
|
-
registerStyles(
|
|
8
|
-
'vaadin-notification-card',
|
|
9
|
-
css`
|
|
10
|
-
:host {
|
|
11
|
-
position: relative;
|
|
12
|
-
margin: var(--lumo-space-s);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[part='overlay'] {
|
|
16
|
-
background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
|
|
17
|
-
border-radius: var(--lumo-border-radius-l);
|
|
18
|
-
box-shadow:
|
|
19
|
-
0 0 0 1px var(--lumo-contrast-10pct),
|
|
20
|
-
var(--lumo-box-shadow-l);
|
|
21
|
-
font-family: var(--lumo-font-family);
|
|
22
|
-
font-size: var(--lumo-font-size-m);
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
line-height: var(--lumo-line-height-s);
|
|
25
|
-
letter-spacing: 0;
|
|
26
|
-
text-transform: none;
|
|
27
|
-
-webkit-text-size-adjust: 100%;
|
|
28
|
-
-webkit-font-smoothing: antialiased;
|
|
29
|
-
-moz-osx-font-smoothing: grayscale;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[part='content'] {
|
|
33
|
-
padding: var(--lumo-space-wide-l);
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: space-between;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
[part='content'] ::slotted(vaadin-button) {
|
|
40
|
-
flex: none;
|
|
41
|
-
margin: 0 calc(var(--lumo-space-s) * -1) 0 var(--lumo-space-m);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([slot^='middle']) {
|
|
45
|
-
max-width: 80vw;
|
|
46
|
-
margin: var(--lumo-space-s) auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([slot$='stretch']) {
|
|
50
|
-
margin: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([slot$='stretch']) [part='overlay'] {
|
|
54
|
-
border-radius: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media (min-width: 421px) {
|
|
58
|
-
:host(:not([slot$='stretch'])) {
|
|
59
|
-
display: flex;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:host([slot$='end']) {
|
|
63
|
-
justify-content: flex-end;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([slot^='middle']),
|
|
67
|
-
:host([slot$='center']) {
|
|
68
|
-
display: flex;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@keyframes lumo-notification-exit-fade-out {
|
|
74
|
-
100% {
|
|
75
|
-
opacity: 0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@keyframes lumo-notification-enter-fade-in {
|
|
80
|
-
0% {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@keyframes lumo-notification-enter-slide-down {
|
|
86
|
-
0% {
|
|
87
|
-
transform: translateY(-200%);
|
|
88
|
-
opacity: 0;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@keyframes lumo-notification-exit-slide-up {
|
|
93
|
-
100% {
|
|
94
|
-
transform: translateY(-200%);
|
|
95
|
-
opacity: 0;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@keyframes lumo-notification-enter-slide-up {
|
|
100
|
-
0% {
|
|
101
|
-
transform: translateY(200%);
|
|
102
|
-
opacity: 0;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@keyframes lumo-notification-exit-slide-down {
|
|
107
|
-
100% {
|
|
108
|
-
transform: translateY(200%);
|
|
109
|
-
opacity: 0;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([slot='middle'][opening]) {
|
|
114
|
-
animation: lumo-notification-enter-fade-in 300ms;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
:host([slot='middle'][closing]) {
|
|
118
|
-
animation: lumo-notification-exit-fade-out 300ms;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:host([slot^='top'][opening]) {
|
|
122
|
-
animation: lumo-notification-enter-slide-down 300ms;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host([slot^='top'][closing]) {
|
|
126
|
-
animation: lumo-notification-exit-slide-up 300ms;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([slot^='bottom'][opening]) {
|
|
130
|
-
animation: lumo-notification-enter-slide-up 300ms;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
:host([slot^='bottom'][closing]) {
|
|
134
|
-
animation: lumo-notification-exit-slide-down 300ms;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
:host([theme='success']) {
|
|
138
|
-
--_focus-ring-gap-color: var(--lumo-success-color);
|
|
139
|
-
--vaadin-focus-ring-color: var(--lumo-success-contrast-color);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host([theme='warning']) {
|
|
143
|
-
--_focus-ring-gap-color: var(--lumo-warning-color);
|
|
144
|
-
--vaadin-focus-ring-color: var(--lumo-warning-contrast-color);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:host([theme='error']) {
|
|
148
|
-
--_focus-ring-gap-color: var(--lumo-error-color);
|
|
149
|
-
--vaadin-focus-ring-color: var(--lumo-error-contrast-color);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
:host([theme='primary']) {
|
|
153
|
-
--_focus-ring-gap-color: var(--lumo-primary-color);
|
|
154
|
-
--vaadin-focus-ring-color: var(--lumo-primary-contrast-color);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host([theme~='primary']) [part='overlay'] {
|
|
158
|
-
background: var(--lumo-primary-color);
|
|
159
|
-
color: var(--lumo-primary-contrast-color);
|
|
160
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:host([theme~='primary']) {
|
|
164
|
-
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
165
|
-
--vaadin-button-text-color: var(--lumo-primary-contrast-color);
|
|
166
|
-
--vaadin-button-primary-background: var(--lumo-primary-contrast-color);
|
|
167
|
-
--vaadin-button-primary-text-color: var(--lumo-primary-text-color);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:host([theme~='contrast']) [part='overlay'] {
|
|
171
|
-
background: var(--lumo-contrast);
|
|
172
|
-
color: var(--lumo-base-color);
|
|
173
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
:host([theme~='contrast']) {
|
|
177
|
-
--vaadin-button-background: var(--lumo-contrast-20pct);
|
|
178
|
-
--vaadin-button-text-color: var(--lumo-base-color);
|
|
179
|
-
--vaadin-button-primary-background: var(--lumo-base-color);
|
|
180
|
-
--vaadin-button-primary-text-color: var(--lumo-contrast);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
:host([theme~='success']) [part='overlay'] {
|
|
184
|
-
background: var(--lumo-success-color);
|
|
185
|
-
color: var(--lumo-success-contrast-color);
|
|
186
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
:host([theme~='success']) {
|
|
190
|
-
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
191
|
-
--vaadin-button-text-color: var(--lumo-success-contrast-color);
|
|
192
|
-
--vaadin-button-primary-background: var(--lumo-success-contrast-color);
|
|
193
|
-
--vaadin-button-primary-text-color: var(--lumo-success-text-color);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
:host([theme~='error']) [part='overlay'] {
|
|
197
|
-
background: var(--lumo-error-color);
|
|
198
|
-
color: var(--lumo-error-contrast-color);
|
|
199
|
-
box-shadow: var(--lumo-box-shadow-l);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
:host([theme~='error']) {
|
|
203
|
-
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
204
|
-
--vaadin-button-text-color: var(--lumo-error-contrast-color);
|
|
205
|
-
--vaadin-button-primary-background: var(--lumo-error-contrast-color);
|
|
206
|
-
--vaadin-button-primary-text-color: var(--lumo-error-text-color);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
:host([theme~='warning']) [part='overlay'] {
|
|
210
|
-
background: var(--lumo-warning-color);
|
|
211
|
-
color: var(--lumo-warning-contrast-color);
|
|
212
|
-
box-shadow:
|
|
213
|
-
inset 0 0 0 1px var(--lumo-contrast-20pct),
|
|
214
|
-
var(--lumo-box-shadow-l);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
:host([theme~='warning']) {
|
|
218
|
-
--vaadin-button-background: var(--lumo-shade-20pct);
|
|
219
|
-
--vaadin-button-text-color: var(--lumo-warning-contrast-color);
|
|
220
|
-
--vaadin-button-primary-background: var(--lumo-shade-50pct);
|
|
221
|
-
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
222
|
-
}
|
|
223
|
-
`,
|
|
224
|
-
{ moduleId: 'lumo-notification-card' },
|
|
225
|
-
);
|