@vaadin/confirm-dialog 24.0.0-alpha9 → 24.0.0-beta2

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/confirm-dialog",
3
- "version": "24.0.0-alpha9",
3
+ "version": "24.0.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,22 +36,22 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "24.0.0-alpha9",
40
- "@vaadin/component-base": "24.0.0-alpha9",
41
- "@vaadin/dialog": "24.0.0-alpha9",
42
- "@vaadin/overlay": "24.0.0-alpha9",
43
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha9",
44
- "@vaadin/vaadin-material-styles": "24.0.0-alpha9",
45
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha9"
39
+ "@vaadin/button": "24.0.0-beta2",
40
+ "@vaadin/component-base": "24.0.0-beta2",
41
+ "@vaadin/dialog": "24.0.0-beta2",
42
+ "@vaadin/overlay": "24.0.0-beta2",
43
+ "@vaadin/vaadin-lumo-styles": "24.0.0-beta2",
44
+ "@vaadin/vaadin-material-styles": "24.0.0-beta2",
45
+ "@vaadin/vaadin-themable-mixin": "24.0.0-beta2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
49
- "@vaadin/testing-helpers": "^0.3.2",
49
+ "@vaadin/testing-helpers": "^0.4.0",
50
50
  "sinon": "^13.0.2"
51
51
  },
52
52
  "web-types": [
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "cc3f747164041566b300bde4b105d2475649e93f"
56
+ "gitHead": "00086f1f6d487f042f189c9b9ecd7ba736960888"
57
57
  }
@@ -4,7 +4,8 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html } from '@polymer/polymer/lib/utils/html-tag.js';
7
- import { Dialog, DialogOverlay } from '@vaadin/dialog/src/vaadin-dialog.js';
7
+ import { Dialog } from '@vaadin/dialog/src/vaadin-dialog.js';
8
+ import { DialogOverlay } from '@vaadin/dialog/src/vaadin-dialog-overlay.js';
8
9
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
10
 
10
11
  registerStyles(
@@ -81,18 +82,6 @@ class ConfirmDialogOverlay extends DialogOverlay {
81
82
  return memoizedTemplate;
82
83
  }
83
84
 
84
- /**
85
- * Override method inherited from `Overlay` to notify when overlay is closed.
86
- * The `vaadin-overlay-close` event is not suitable, as it fires before closing.
87
- * @protected
88
- * @override
89
- */
90
- _finishClosing() {
91
- super._finishClosing();
92
-
93
- this.dispatchEvent(new CustomEvent('vaadin-confirm-dialog-close'));
94
- }
95
-
96
85
  /**
97
86
  * @protected
98
87
  * @override
@@ -148,6 +148,14 @@ declare class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMi
148
148
  */
149
149
  cancelTheme: string;
150
150
 
151
+ /**
152
+ * A space-delimited list of CSS class names
153
+ * to set on the underlying overlay element.
154
+ *
155
+ * @attr {string} overlay-class
156
+ */
157
+ overlayClass: string;
158
+
151
159
  addEventListener<K extends keyof ConfirmDialogEventMap>(
152
160
  type: K,
153
161
  listener: (this: ConfirmDialog, ev: ConfirmDialogEventMap[K]) => void,
@@ -76,6 +76,7 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
76
76
  <vaadin-confirm-dialog-dialog
77
77
  id="dialog"
78
78
  opened="{{opened}}"
79
+ overlay-class="[[overlayClass]]"
79
80
  aria-label="[[_getAriaLabel(header)]]"
80
81
  theme$="[[_theme]]"
81
82
  no-close-on-outside-click
@@ -225,6 +226,16 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
225
226
  value: 'tertiary',
226
227
  },
227
228
 
229
+ /**
230
+ * A space-delimited list of CSS class names
231
+ * to set on the underlying overlay element.
232
+ *
233
+ * @attr {string} overlay-class
234
+ */
235
+ overlayClass: {
236
+ type: String,
237
+ },
238
+
228
239
  /**
229
240
  * A reference to the "Cancel" button which will be teleported to the overlay.
230
241
  * @private
@@ -313,7 +324,7 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
313
324
  this._overlayElement = this.$.dialog.$.overlay;
314
325
  this._overlayElement.addEventListener('vaadin-overlay-escape-press', this._escPressed.bind(this));
315
326
  this._overlayElement.addEventListener('vaadin-overlay-open', () => this.__onDialogOpened());
316
- this._overlayElement.addEventListener('vaadin-confirm-dialog-close', () => this.__onDialogClosed());
327
+ this._overlayElement.addEventListener('vaadin-overlay-closed', () => this.__onDialogClosed());
317
328
 
318
329
  this._headerController = new SlotController(this, 'header', 'h3', {
319
330
  initializer: (node) => {
@@ -8,7 +8,7 @@ registerStyles(
8
8
  [part='header'] ::slotted(h3) {
9
9
  margin-top: 0 !important;
10
10
  margin-bottom: 0 !important;
11
- margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
11
+ margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m)) !important;
12
12
  }
13
13
 
14
14
  [part='message'] {
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/confirm-dialog",
4
- "version": "24.0.0-alpha9",
4
+ "version": "24.0.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-confirm-dialog",
11
- "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel-button-visible>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
11
+ "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel-button-visible>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "opened",
@@ -120,6 +120,17 @@
120
120
  ]
121
121
  }
122
122
  },
123
+ {
124
+ "name": "overlay-class",
125
+ "description": "A space-delimited list of CSS class names\nto set on the underlying overlay element.",
126
+ "value": {
127
+ "type": [
128
+ "string",
129
+ "null",
130
+ "undefined"
131
+ ]
132
+ }
133
+ },
123
134
  {
124
135
  "name": "theme",
125
136
  "description": "The theme variants to apply to the component.",
@@ -243,6 +254,17 @@
243
254
  "string"
244
255
  ]
245
256
  }
257
+ },
258
+ {
259
+ "name": "overlayClass",
260
+ "description": "A space-delimited list of CSS class names\nto set on the underlying overlay element.",
261
+ "value": {
262
+ "type": [
263
+ "string",
264
+ "null",
265
+ "undefined"
266
+ ]
267
+ }
246
268
  }
247
269
  ],
248
270
  "events": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/confirm-dialog",
4
- "version": "24.0.0-alpha9",
4
+ "version": "24.0.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-confirm-dialog",
19
- "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel-button-visible>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
19
+ "description": "`<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.\n\n```\n<vaadin-confirm-dialog cancel-button-visible>\n There are unsaved changes. Do you really want to leave?\n</vaadin-confirm-dialog>\n```\n\n### Styling\n\nThe `<vaadin-confirm-dialog>` is not themable. Apply styles to `<vaadin-confirm-dialog-overlay>`\ncomponent and use its shadow parts for styling.\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-overlay) for the overlay styling documentation.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for theming:\n\nPart name | Description\n-----------------|-------------------------------------------\n`header` | The header element wrapper\n`message` | The message element wrapper\n`footer` | The footer element that wraps the buttons\n`cancel-button` | The \"Cancel\" button wrapper\n`confirm-button` | The \"Confirm\" button wrapper\n`reject-button` | The \"Reject\" button wrapper\n\nUse `confirmTheme`, `cancelTheme` and `rejectTheme` properties to customize buttons theme.\nAlso, the `theme` attribute value set on `<vaadin-confirm-dialog>` is propagated to the\n`<vaadin-confirm-dialog-overlay>` component.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.\n\n### Custom content\n\nThe following slots are available for providing custom content:\n\nSlot name | Description\n------------------|---------------------------\n`header` | Slot for header element\n`cancel-button` | Slot for \"Cancel\" button\n`confirm-button` | Slot for \"Confirm\" button\n`reject-button` | Slot for \"Reject\" button",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -103,6 +103,13 @@
103
103
  "kind": "expression"
104
104
  }
105
105
  },
106
+ {
107
+ "name": ".overlayClass",
108
+ "description": "A space-delimited list of CSS class names\nto set on the underlying overlay element.",
109
+ "value": {
110
+ "kind": "expression"
111
+ }
112
+ },
106
113
  {
107
114
  "name": "@cancel",
108
115
  "description": "cancel\nfired when Cancel button or Escape key was pressed.",