@vaadin/dialog
Advanced tools
Comparing version 24.5.0-alpha1 to 24.5.0-alpha10
{ | ||
"name": "@vaadin/dialog", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"publishConfig": { | ||
@@ -42,16 +42,16 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "24.5.0-alpha1", | ||
"@vaadin/lit-renderer": "24.5.0-alpha1", | ||
"@vaadin/overlay": "24.5.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha1", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha1", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha1", | ||
"@vaadin/component-base": "24.5.0-alpha10", | ||
"@vaadin/lit-renderer": "24.5.0-alpha10", | ||
"@vaadin/overlay": "24.5.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.5.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha10", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/a11y-base": "24.5.0-alpha1", | ||
"@vaadin/testing-helpers": "^0.6.0", | ||
"@vaadin/text-area": "24.5.0-alpha1", | ||
"sinon": "^13.0.2" | ||
"@vaadin/a11y-base": "24.5.0-alpha10", | ||
"@vaadin/chai-plugins": "24.5.0-alpha10", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
"@vaadin/text-area": "24.5.0-alpha10", | ||
"sinon": "^18.0.0" | ||
}, | ||
@@ -62,3 +62,3 @@ "web-types": [ | ||
], | ||
"gitHead": "57806caac5468532a3b4e3dbdda730cd0fca193a" | ||
"gitHead": "6f9c37308031af872a98017bfab4de89aeacda51" | ||
} |
@@ -61,3 +61,3 @@ # @vaadin/dialog | ||
Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overview) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components. | ||
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components. | ||
@@ -64,0 +64,0 @@ ## License |
@@ -34,2 +34,9 @@ /** | ||
modeless: boolean; | ||
/** | ||
* The `role` attribute value to be set on the overlay. Defaults to "dialog". | ||
* | ||
* @attr {string} overlay-role | ||
*/ | ||
overlayRole: string; | ||
} |
@@ -52,2 +52,12 @@ /** | ||
}, | ||
/** | ||
* The `role` attribute value to be set on the overlay. Defaults to "dialog". | ||
* | ||
* @attr {string} overlay-role | ||
*/ | ||
overlayRole: { | ||
type: String, | ||
value: 'dialog', | ||
}, | ||
}; | ||
@@ -64,2 +74,3 @@ } | ||
overlay.addEventListener('vaadin-overlay-escape-press', this._handleEscPress.bind(this)); | ||
overlay.addEventListener('vaadin-overlay-closed', this.__handleOverlayClosed.bind(this)); | ||
@@ -69,2 +80,7 @@ this._overlayElement = overlay; | ||
/** @private */ | ||
__handleOverlayClosed() { | ||
this.dispatchEvent(new CustomEvent('closed')); | ||
} | ||
/** @protected */ | ||
@@ -126,2 +142,8 @@ connectedCallback() { | ||
} | ||
/** | ||
* Fired when the dialog is closed. | ||
* | ||
* @event closed | ||
*/ | ||
}; |
@@ -161,2 +161,8 @@ /** | ||
} | ||
/** | ||
* Fired when the dialog resize is finished. | ||
* | ||
* @event resize | ||
*/ | ||
}; |
@@ -37,5 +37,12 @@ /** | ||
/** | ||
* Fired when the dialog is closed. | ||
*/ | ||
export type DialogClosedEvent = CustomEvent; | ||
export interface DialogCustomEventMap { | ||
'opened-changed': DialogOpenedChangedEvent; | ||
closed: DialogClosedEvent; | ||
resize: DialogResizeEvent; | ||
@@ -106,2 +113,3 @@ } | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} closed - Fired when the dialog is closed. | ||
*/ | ||
@@ -108,0 +116,0 @@ declare class Dialog extends DialogDraggableMixin( |
@@ -80,2 +80,3 @@ /** | ||
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. | ||
* @fires {CustomEvent} closed - Fired when the dialog is closed. | ||
* | ||
@@ -107,3 +108,3 @@ * @customElement | ||
id="overlay" | ||
role="dialog" | ||
role$="[[overlayRole]]" | ||
header-title="[[headerTitle]]" | ||
@@ -110,0 +111,0 @@ on-opened-changed="_onOverlayOpened" |
@@ -75,3 +75,3 @@ /** | ||
id="overlay" | ||
role="dialog" | ||
role="${this.overlayRole}" | ||
.owner="${this}" | ||
@@ -78,0 +78,0 @@ .opened="${this.opened}" |
@@ -20,3 +20,5 @@ import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
border-radius: var(--lumo-border-radius-l); | ||
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-xl); | ||
box-shadow: | ||
0 0 0 1px var(--lumo-shade-5pct), | ||
var(--lumo-box-shadow-xl); | ||
background-image: none; | ||
@@ -23,0 +25,0 @@ outline: none; |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/dialog", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"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/24.5.0-alpha1/#/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/24.5.0-alpha10/#/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": [ | ||
@@ -51,2 +51,13 @@ { | ||
{ | ||
"name": "overlay-role", | ||
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".", | ||
"value": { | ||
"type": [ | ||
"string", | ||
"null", | ||
"undefined" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "draggable", | ||
@@ -153,2 +164,13 @@ "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": "overlayRole", | ||
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".", | ||
"value": { | ||
"type": [ | ||
"string", | ||
"null", | ||
"undefined" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "draggable", | ||
@@ -237,2 +259,10 @@ "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": "closed", | ||
"description": "Fired when the dialog is closed." | ||
}, | ||
{ | ||
"name": "resize", | ||
"description": "Fired when the dialog resize is finished." | ||
}, | ||
{ | ||
"name": "opened-changed", | ||
@@ -239,0 +269,0 @@ "description": "Fired when the `opened` property changes." |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/dialog", | ||
"version": "24.5.0-alpha1", | ||
"version": "24.5.0-alpha10", | ||
"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/24.5.0-alpha1/#/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/24.5.0-alpha10/#/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, | ||
@@ -66,2 +66,9 @@ "attributes": [ | ||
{ | ||
"name": ".overlayRole", | ||
"description": "The `role` attribute value to be set on the overlay. Defaults to \"dialog\".", | ||
"value": { | ||
"kind": "expression" | ||
} | ||
}, | ||
{ | ||
"name": ".renderer", | ||
@@ -109,2 +116,16 @@ "description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.", | ||
{ | ||
"name": "@closed", | ||
"description": "Fired when the dialog is closed.", | ||
"value": { | ||
"kind": "expression" | ||
} | ||
}, | ||
{ | ||
"name": "@resize", | ||
"description": "Fired when the dialog resize is finished.", | ||
"value": { | ||
"kind": "expression" | ||
} | ||
}, | ||
{ | ||
"name": "@opened-changed", | ||
@@ -111,0 +132,0 @@ "description": "Fired when the `opened` property changes.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108474
2465
+ Added@vaadin/a11y-base@24.5.0-alpha10(transitive)
+ Added@vaadin/component-base@24.5.0-alpha10(transitive)
+ Added@vaadin/icon@24.5.0-alpha10(transitive)
+ Added@vaadin/lit-renderer@24.5.0-alpha10(transitive)
+ Added@vaadin/overlay@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-material-styles@24.5.0-alpha10(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.5.0-alpha10(transitive)
- Removed@vaadin/a11y-base@24.5.0-alpha1(transitive)
- Removed@vaadin/component-base@24.5.0-alpha1(transitive)
- Removed@vaadin/icon@24.5.0-alpha1(transitive)
- Removed@vaadin/lit-renderer@24.5.0-alpha1(transitive)
- Removed@vaadin/overlay@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-material-styles@24.5.0-alpha1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.5.0-alpha1(transitive)