@vaadin/dialog 24.8.4 → 25.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/README.md +0 -23
- package/package.json +14 -15
- package/src/lit/renderer-directives.d.ts +0 -1
- package/src/styles/vaadin-dialog-overlay-base-styles.d.ts +10 -0
- package/src/styles/vaadin-dialog-overlay-base-styles.js +216 -0
- package/src/{vaadin-dialog-styles.d.ts → styles/vaadin-dialog-overlay-core-styles.d.ts} +2 -2
- package/src/{vaadin-dialog-styles.js → styles/vaadin-dialog-overlay-core-styles.js} +5 -2
- package/src/vaadin-dialog-base-mixin.d.ts +1 -13
- package/src/vaadin-dialog-base-mixin.js +16 -19
- package/src/vaadin-dialog-overlay-mixin.d.ts +0 -14
- package/src/vaadin-dialog-overlay-mixin.js +27 -31
- package/src/vaadin-dialog-overlay.d.ts +1 -1
- package/src/vaadin-dialog-overlay.js +15 -11
- package/src/vaadin-dialog-resizable-mixin.js +2 -14
- package/src/vaadin-dialog-size-mixin.d.ts +24 -0
- package/src/vaadin-dialog-size-mixin.js +40 -0
- package/src/vaadin-dialog.d.ts +11 -23
- package/src/vaadin-dialog.js +60 -78
- package/web-types.json +33 -55
- package/web-types.lit.json +14 -21
- package/src/vaadin-lit-dialog-overlay.js +0 -51
- package/src/vaadin-lit-dialog.js +0 -99
- package/theme/lumo/vaadin-lit-dialog.d.ts +0 -2
- package/theme/lumo/vaadin-lit-dialog.js +0 -2
- package/theme/material/vaadin-dialog-styles.d.ts +0 -4
- package/theme/material/vaadin-dialog-styles.js +0 -64
- package/theme/material/vaadin-dialog.d.ts +0 -2
- package/theme/material/vaadin-dialog.js +0 -2
- package/theme/material/vaadin-lit-dialog.d.ts +0 -2
- package/theme/material/vaadin-lit-dialog.js +0 -2
- package/vaadin-lit-dialog.d.ts +0 -1
- package/vaadin-lit-dialog.js +0 -2
package/src/vaadin-lit-dialog.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
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-lit-dialog-overlay.js';
|
|
7
|
-
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
-
import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
12
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
13
|
-
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
14
|
-
import { DialogBaseMixin } from './vaadin-dialog-base-mixin.js';
|
|
15
|
-
import { DialogDraggableMixin } from './vaadin-dialog-draggable-mixin.js';
|
|
16
|
-
import { DialogRendererMixin } from './vaadin-dialog-renderer-mixin.js';
|
|
17
|
-
import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
|
|
18
|
-
|
|
19
|
-
export { DialogOverlay } from './vaadin-lit-dialog-overlay.js';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* LitElement based version of `<vaadin-dialog>` web component.
|
|
23
|
-
*
|
|
24
|
-
* ## Disclaimer
|
|
25
|
-
*
|
|
26
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
27
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
28
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
29
|
-
*
|
|
30
|
-
* @extends HTMLElement
|
|
31
|
-
* @mixes ElementMixin
|
|
32
|
-
* @mixes DialogBaseMixin
|
|
33
|
-
* @mixes DialogDraggableMixin
|
|
34
|
-
* @mixes DialogRendererMixin
|
|
35
|
-
* @mixes DialogResizableMixin
|
|
36
|
-
* @mixes OverlayClassMixin
|
|
37
|
-
* @mixes ThemePropertyMixin
|
|
38
|
-
*/
|
|
39
|
-
class Dialog extends DialogDraggableMixin(
|
|
40
|
-
DialogResizableMixin(
|
|
41
|
-
DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))))),
|
|
42
|
-
),
|
|
43
|
-
) {
|
|
44
|
-
static get is() {
|
|
45
|
-
return 'vaadin-dialog';
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static get styles() {
|
|
49
|
-
return css`
|
|
50
|
-
:host {
|
|
51
|
-
display: none !important;
|
|
52
|
-
}
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
static get properties() {
|
|
57
|
-
return {
|
|
58
|
-
/**
|
|
59
|
-
* Set the `aria-label` attribute for assistive technologies like
|
|
60
|
-
* screen readers. An empty string value for this property (the
|
|
61
|
-
* default) means that the `aria-label` attribute is not present.
|
|
62
|
-
*/
|
|
63
|
-
ariaLabel: {
|
|
64
|
-
type: String,
|
|
65
|
-
value: '',
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** @protected */
|
|
71
|
-
render() {
|
|
72
|
-
return html`
|
|
73
|
-
<vaadin-dialog-overlay
|
|
74
|
-
id="overlay"
|
|
75
|
-
role="${this.overlayRole}"
|
|
76
|
-
.owner="${this}"
|
|
77
|
-
.opened="${this.opened}"
|
|
78
|
-
.headerTitle="${this.headerTitle}"
|
|
79
|
-
.renderer="${this.renderer}"
|
|
80
|
-
.headerRenderer="${this.headerRenderer}"
|
|
81
|
-
.footerRenderer="${this.footerRenderer}"
|
|
82
|
-
@opened-changed="${this._onOverlayOpened}"
|
|
83
|
-
@mousedown="${this._bringOverlayToFront}"
|
|
84
|
-
@touchstart="${this._bringOverlayToFront}"
|
|
85
|
-
theme="${ifDefined(this._theme)}"
|
|
86
|
-
aria-label="${ifDefined(this.ariaLabel || this.headerTitle)}"
|
|
87
|
-
.modeless="${this.modeless}"
|
|
88
|
-
.withBackdrop="${!this.modeless}"
|
|
89
|
-
?resizable="${this.resizable}"
|
|
90
|
-
restore-focus-on-close
|
|
91
|
-
focus-trap
|
|
92
|
-
></vaadin-dialog-overlay>
|
|
93
|
-
`;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
defineCustomElement(Dialog);
|
|
98
|
-
|
|
99
|
-
export { Dialog };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/shadow.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
3
|
-
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
const dialogOverlay = css`
|
|
7
|
-
[part='overlay'] {
|
|
8
|
-
box-shadow: var(--material-shadow-elevation-24dp);
|
|
9
|
-
outline: none;
|
|
10
|
-
max-width: 560px;
|
|
11
|
-
min-width: 280px;
|
|
12
|
-
-webkit-tap-highlight-color: transparent;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[part='content'] {
|
|
16
|
-
padding: 24px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[part='header'] {
|
|
20
|
-
padding: 16px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host(:is([has-header], [has-title])) [part='header'] + [part='content'] {
|
|
24
|
-
padding-top: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
[part='header'],
|
|
28
|
-
[part='header-content'],
|
|
29
|
-
[part='footer'] {
|
|
30
|
-
gap: 8px;
|
|
31
|
-
line-height: 1.2;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[part='title'] {
|
|
35
|
-
font-size: var(--material-h5-font-size);
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
margin-inline-start: 8px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[part='footer'] {
|
|
41
|
-
padding: 8px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@media (min-height: 320px) {
|
|
45
|
-
:host([overflow~='top']) [part='header'] {
|
|
46
|
-
box-shadow: 0 1px 0 0 var(--material-divider-color);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([overflow~='bottom']) [part='footer'] {
|
|
50
|
-
box-shadow: 0 -1px 0 0 var(--material-divider-color);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* No padding */
|
|
55
|
-
:host([theme~='no-padding']) [part='content'] {
|
|
56
|
-
padding: 0 !important;
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
registerStyles('vaadin-dialog-overlay', [overlay, dialogOverlay], {
|
|
61
|
-
moduleId: 'material-dialog',
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export { dialogOverlay };
|
package/vaadin-lit-dialog.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-dialog.js';
|
package/vaadin-lit-dialog.js
DELETED