You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@vaadin/dialog

Package Overview
Dependencies
Maintainers
13
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/dialog - npm Package Compare versions

Comparing version

to
25.0.0-alpha8

src/vaadin-dialog-size-mixin.d.ts

20

package.json
{
"name": "@vaadin/dialog",
"version": "25.0.0-alpha7",
"version": "25.0.0-alpha8",
"publishConfig": {

@@ -42,13 +42,13 @@ "access": "public"

"@open-wc/dedupe-mixin": "^1.3.0",
"@vaadin/component-base": "25.0.0-alpha7",
"@vaadin/lit-renderer": "25.0.0-alpha7",
"@vaadin/overlay": "25.0.0-alpha7",
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
"@vaadin/component-base": "25.0.0-alpha8",
"@vaadin/lit-renderer": "25.0.0-alpha8",
"@vaadin/overlay": "25.0.0-alpha8",
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
"lit": "^3.0.0"
},
"devDependencies": {
"@vaadin/a11y-base": "25.0.0-alpha7",
"@vaadin/chai-plugins": "25.0.0-alpha7",
"@vaadin/test-runner-commands": "25.0.0-alpha7",
"@vaadin/a11y-base": "25.0.0-alpha8",
"@vaadin/chai-plugins": "25.0.0-alpha8",
"@vaadin/test-runner-commands": "25.0.0-alpha8",
"@vaadin/testing-helpers": "^2.0.0",

@@ -61,3 +61,3 @@ "sinon": "^18.0.0"

],
"gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
"gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
}

@@ -11,105 +11,103 @@ /**

export const dialogOverlayBase = css`
@layer base {
/* Optical centering */
:host::before,
:host::after {
content: '';
flex-basis: 0;
flex-grow: 1;
}
/* Optical centering */
:host::before,
:host::after {
content: '';
flex-basis: 0;
flex-grow: 1;
}
:host::after {
flex-grow: 1.1;
}
:host::after {
flex-grow: 1.1;
}
:host {
cursor: default;
}
:host {
cursor: default;
}
[part='overlay']:focus-visible {
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
}
[part='overlay']:focus-visible {
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
}
[part='overlay'] {
background: var(--vaadin-dialog-background, var(--vaadin-background-color));
background-origin: border-box;
border: 0;
box-shadow:
0 0 0 var(--vaadin-dialog-border-width, 1px) var(--vaadin-dialog-border-color, rgba(0, 0, 0, 0.1)),
var(--vaadin-dialog-box-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));
border-radius: var(--vaadin-dialog-border-radius, var(--vaadin-radius-l));
width: max-content;
min-width: min(var(--vaadin-dialog-min-width, 4em), 100%);
max-width: var(--vaadin-dialog-max-width, 100%);
max-height: 100%;
}
[part='overlay'] {
background: var(--vaadin-dialog-background, var(--vaadin-background-color));
background-origin: border-box;
border: 0;
box-shadow:
0 0 0 var(--vaadin-dialog-border-width, 1px) var(--vaadin-dialog-border-color, rgba(0, 0, 0, 0.1)),
var(--vaadin-dialog-box-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3));
border-radius: var(--vaadin-dialog-border-radius, var(--vaadin-radius-l));
width: max-content;
min-width: min(var(--vaadin-dialog-min-width, 4em), 100%);
max-width: var(--vaadin-dialog-max-width, 100%);
max-height: 100%;
}
[part='header'],
[part='header-content'],
[part='footer'] {
display: flex;
align-items: center;
flex-wrap: wrap;
flex: none;
pointer-events: none;
z-index: 1;
gap: var(--vaadin-dialog-toolbar-gap, var(--vaadin-gap-container-inline));
}
[part='header'],
[part='header-content'],
[part='footer'] {
display: flex;
align-items: center;
flex-wrap: wrap;
flex: none;
pointer-events: none;
z-index: 1;
gap: var(--vaadin-dialog-toolbar-gap, var(--vaadin-gap-container-inline));
}
::slotted(*) {
pointer-events: auto;
}
::slotted(*) {
pointer-events: auto;
}
[part='header'],
[part='content'],
[part='footer'] {
padding: var(--vaadin-dialog-padding, var(--vaadin-padding));
}
[part='header'],
[part='content'],
[part='footer'] {
padding: var(--vaadin-dialog-padding, var(--vaadin-padding));
}
:host(:is([has-header], [has-title])) [part='content'] {
padding-top: 0;
}
:host(:is([has-header], [has-title])) [part='content'] {
padding-top: 0;
}
:host([has-footer]) [part='content'] {
padding-bottom: 0;
}
:host([has-footer]) [part='content'] {
padding-bottom: 0;
}
[part='header'] {
flex-wrap: nowrap;
}
[part='header'] {
flex-wrap: nowrap;
}
::slotted([slot='header-content']),
::slotted([slot='title']),
::slotted([slot='footer']) {
display: contents;
}
::slotted([slot='header-content']),
::slotted([slot='title']),
::slotted([slot='footer']) {
display: contents;
}
::slotted([slot='title']) {
font: inherit !important;
color: inherit !important;
overflow-wrap: anywhere;
}
::slotted([slot='title']) {
font: inherit !important;
color: inherit !important;
overflow-wrap: anywhere;
}
[part='title'] {
color: var(--vaadin-dialog-title-color, var(--vaadin-color));
font-weight: var(--vaadin-dialog-title-font-weight, 600);
font-size: var(--vaadin-dialog-title-font-size, 1em);
line-height: var(--vaadin-dialog-title-line-height, inherit);
}
[part='title'] {
color: var(--vaadin-dialog-title-color, var(--vaadin-color));
font-weight: var(--vaadin-dialog-title-font-weight, 600);
font-size: var(--vaadin-dialog-title-font-size, 1em);
line-height: var(--vaadin-dialog-title-line-height, inherit);
}
[part='header-content'] {
flex: 1;
}
[part='header-content'] {
flex: 1;
}
:host([has-title]) [part='header-content'],
[part='footer'] {
justify-content: flex-end;
}
:host([has-title]) [part='header-content'],
[part='footer'] {
justify-content: flex-end;
}
:host(:not([has-title]):not([has-header])) [part='header'],
:host(:not([has-header])) [part='header-content'],
:host(:not([has-title])) [part='title'],
:host(:not([has-footer])) [part='footer'] {
display: none !important;
}
:host(:not([has-title]):not([has-header])) [part='header'],
:host(:not([has-header])) [part='header-content'],
:host(:not([has-title])) [part='title'],
:host(:not([has-footer])) [part='footer'] {
display: none !important;
}

@@ -119,97 +117,95 @@ `;

const dialogResizableOverlay = css`
@layer base {
[part='overlay'] {
position: relative;
overflow: visible;
display: flex;
}
[part='overlay'] {
position: relative;
overflow: visible;
display: flex;
}
:host([has-bounds-set]) [part='overlay'] {
min-width: 0;
max-width: none;
max-height: none;
}
:host([has-bounds-set]) [part='overlay'] {
min-width: 0;
max-width: none;
max-height: none;
}
/* Content part scrolls by default */
[part='content'] {
flex: 1;
min-height: 0;
}
/* Content part scrolls by default */
[part='content'] {
flex: 1;
min-height: 0;
}
:host([overflow]) [part='content'] {
overflow: auto;
overscroll-behavior: contain;
}
:host([overflow]) [part='content'] {
overflow: auto;
overscroll-behavior: contain;
}
.resizer-container {
display: flex;
flex-direction: column;
flex-grow: 1;
border-radius: inherit;
max-width: 100%;
}
.resizer-container {
display: flex;
flex-direction: column;
flex-grow: 1;
border-radius: inherit;
max-width: 100%;
}
:host(:not([resizable])) .resizer {
display: none;
}
:host(:not([resizable])) .resizer {
display: none;
}
.resizer {
position: absolute;
height: 16px;
width: 16px;
}
.resizer {
position: absolute;
height: 16px;
width: 16px;
}
.resizer.edge {
height: 8px;
width: 8px;
inset: -4px;
}
.resizer.edge {
height: 8px;
width: 8px;
inset: -4px;
}
.resizer.edge.n {
width: auto;
bottom: auto;
cursor: ns-resize;
}
.resizer.edge.n {
width: auto;
bottom: auto;
cursor: ns-resize;
}
.resizer.ne {
top: -4px;
right: -4px;
cursor: nesw-resize;
}
.resizer.ne {
top: -4px;
right: -4px;
cursor: nesw-resize;
}
.resizer.edge.e {
height: auto;
left: auto;
cursor: ew-resize;
}
.resizer.edge.e {
height: auto;
left: auto;
cursor: ew-resize;
}
.resizer.se {
bottom: -4px;
right: -4px;
cursor: nwse-resize;
}
.resizer.se {
bottom: -4px;
right: -4px;
cursor: nwse-resize;
}
.resizer.edge.s {
width: auto;
top: auto;
cursor: ns-resize;
}
.resizer.edge.s {
width: auto;
top: auto;
cursor: ns-resize;
}
.resizer.sw {
bottom: -4px;
left: -4px;
cursor: nesw-resize;
}
.resizer.sw {
bottom: -4px;
left: -4px;
cursor: nesw-resize;
}
.resizer.edge.w {
height: auto;
right: auto;
cursor: ew-resize;
}
.resizer.edge.w {
height: auto;
right: auto;
cursor: ew-resize;
}
.resizer.nw {
top: -4px;
left: -4px;
cursor: nwse-resize;
}
.resizer.nw {
top: -4px;
left: -4px;
cursor: nwse-resize;
}

@@ -216,0 +212,0 @@ `;

@@ -61,14 +61,2 @@ /**

left: string;
/**
* Set the width of the overlay.
* If a unitless number is provided, pixels are assumed.
*/
width: string | null;
/**
* Set the height of the overlay.
* If a unitless number is provided, pixels are assumed.
*/
height: string | null;
}

@@ -79,18 +79,2 @@ /**

/**
* Set the width of the overlay.
* If a unitless number is provided, pixels are assumed.
*/
width: {
type: String,
},
/**
* Set the height of the overlay.
* If a unitless number is provided, pixels are assumed.
*/
height: {
type: String,
},
/**
* The `role` attribute value to be set on the overlay. Defaults to "dialog".

@@ -108,3 +92,3 @@ *

static get observers() {
return ['__positionChanged(top, left)', '__sizeChanged(width, height)'];
return ['__positionChanged(top, left)'];
}

@@ -111,0 +95,0 @@

@@ -26,3 +26,3 @@ /**

export class DialogOverlay extends DialogOverlayMixin(
DirMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
) {

@@ -29,0 +29,0 @@ static get is() {

@@ -13,2 +13,3 @@ /**

import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
import { DialogSizeMixin } from './vaadin-dialog-size-mixin.js';

@@ -128,5 +129,7 @@ export { DialogOverlay, DialogOverlayBounds } from './vaadin-dialog-overlay.js';

*/
declare class Dialog extends DialogDraggableMixin(
DialogResizableMixin(
DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement))))),
declare class Dialog extends DialogSizeMixin(
DialogDraggableMixin(
DialogResizableMixin(
DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(HTMLElement))))),
),
),

@@ -133,0 +136,0 @@ ) {

@@ -18,2 +18,3 @@ /**

import { DialogResizableMixin } from './vaadin-dialog-resizable-mixin.js';
import { DialogSizeMixin } from './vaadin-dialog-size-mixin.js';

@@ -93,7 +94,12 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';

* @mixes DialogResizableMixin
* @mixes DialogSizeMixin
* @mixes OverlayClassMixin
*/
class Dialog extends DialogDraggableMixin(
DialogResizableMixin(
DialogRendererMixin(DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))))),
class Dialog extends DialogSizeMixin(
DialogDraggableMixin(
DialogResizableMixin(
DialogRendererMixin(
DialogBaseMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement))))),
),
),
),

@@ -100,0 +106,0 @@ ) {

{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/dialog",
"version": "25.0.0-alpha7",
"version": "25.0.0-alpha8",
"description-markup": "markdown",

@@ -11,3 +11,3 @@ "contributions": {

"name": "vaadin-dialog",
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"attributes": [

@@ -73,4 +73,4 @@ {

{
"name": "width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"name": "overlay-role",
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
"value": {

@@ -85,9 +85,7 @@ "type": [

{
"name": "height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"name": "draggable",
"description": "Set to true to enable repositioning the dialog by clicking and dragging.\n\nBy default, only the overlay area can be used to drag the element. But,\na child element can be marked as a draggable area by adding a\n\"`draggable`\" class to it, this will by default make all of its children draggable also.\nIf you want a child element to be draggable\nbut still have its children non-draggable (by default), mark it with\n\"`draggable-leaf-only`\" class name.",
"value": {
"type": [
"string",
"null",
"undefined"
"boolean"
]

@@ -97,4 +95,4 @@ }

{
"name": "overlay-role",
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",
"name": "header-title",
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is added to the overlay element.",
"value": {

@@ -109,4 +107,4 @@ "type": [

{
"name": "draggable",
"description": "Set to true to enable repositioning the dialog by clicking and dragging.\n\nBy default, only the overlay area can be used to drag the element. But,\na child element can be marked as a draggable area by adding a\n\"`draggable`\" class to it, this will by default make all of its children draggable also.\nIf you want a child element to be draggable\nbut still have its children non-draggable (by default), mark it with\n\"`draggable-leaf-only`\" class name.",
"name": "resizable",
"description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
"value": {

@@ -119,4 +117,4 @@ "type": [

{
"name": "header-title",
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is added to the overlay element.",
"name": "width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {

@@ -131,7 +129,9 @@ "type": [

{
"name": "resizable",
"description": "Set to true to enable resizing the dialog by dragging the corners and edges.",
"name": "height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"type": [
"boolean"
"string",
"null",
"undefined"
]

@@ -235,24 +235,2 @@ }

{
"name": "width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "overlayRole",

@@ -328,2 +306,24 @@ "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",

{
"name": "width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "overlayClass",

@@ -330,0 +330,0 @@ "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",

{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/dialog",
"version": "25.0.0-alpha7",
"version": "25.0.0-alpha8",
"description-markup": "markdown",

@@ -19,3 +19,3 @@ "framework": "lit",

"name": "vaadin-dialog",
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"description": "`<vaadin-dialog>` is a Web Component for creating customized modal dialogs.\n\n### Rendering\n\nThe content of the dialog can be populated by using the renderer callback function.\n\nThe renderer function provides `root`, `dialog` arguments.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `dialog`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\n```html\n<vaadin-dialog id=\"dialog\"></vaadin-dialog>\n```\n```js\nconst dialog = document.querySelector('#dialog');\ndialog.renderer = function(root, dialog) {\n root.textContent = \"Sample dialog\";\n};\n```\n\nRenderer is called on the opening of the dialog.\nDOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n### Styling\n\n`<vaadin-dialog>` uses `<vaadin-dialog-overlay>` internal\nthemable component as the actual visible dialog overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-overlay) documentation.\nfor `<vaadin-dialog-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | Element wrapping title and header content\n`header-content` | Element wrapping the header content slot\n`title` | Element wrapping the title slot\n`footer` | Element wrapping the footer slot\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|--------------------------------------------\n`has-title` | Set when the element has a title\n`has-header` | Set when the element has header renderer\n`has-footer` | Set when the element has footer renderer\n`overflow` | Set to `top`, `bottom`, none or both\n\nNote: the `theme` attribute value set on `<vaadin-dialog>` is\npropagated to the internal `<vaadin-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"extension": true,

@@ -80,16 +80,2 @@ "attributes": [

{
"name": ".width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"kind": "expression"
}
},
{
"name": ".height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"kind": "expression"
}
},
{
"name": ".overlayRole",

@@ -130,2 +116,16 @@ "description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".",

{
"name": ".width",
"description": "Set the width of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"kind": "expression"
}
},
{
"name": ".height",
"description": "Set the height of the overlay.\nIf a unitless number is provided, pixels are assumed.",
"value": {
"kind": "expression"
}
},
{
"name": ".overlayClass",

@@ -132,0 +132,0 @@ "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",