@vaadin/confirm-dialog 24.0.0-alpha6 → 24.0.0-alpha7

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-alpha6",
3
+ "version": "24.0.0-alpha7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,13 +36,13 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "24.0.0-alpha6",
40
- "@vaadin/component-base": "24.0.0-alpha6",
41
- "@vaadin/dialog": "24.0.0-alpha6",
42
- "@vaadin/overlay": "24.0.0-alpha6",
43
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha6",
44
- "@vaadin/vaadin-material-styles": "24.0.0-alpha6",
45
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha6"
39
+ "@vaadin/button": "24.0.0-alpha7",
40
+ "@vaadin/component-base": "24.0.0-alpha7",
41
+ "@vaadin/dialog": "24.0.0-alpha7",
42
+ "@vaadin/overlay": "24.0.0-alpha7",
43
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha7",
44
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha7",
45
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha7"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "0004ac92b6e5f415b5fa949e0582d1d11e527b1f"
56
+ "gitHead": "aeb4535336813636736759e0a5de148b26bfc3b6"
57
57
  }
@@ -28,7 +28,7 @@ export type ConfirmDialogEventMap = ConfirmDialogCustomEventMap & HTMLElementEve
28
28
  * `<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.
29
29
  *
30
30
  * ```
31
- * <vaadin-confirm-dialog cancel>
31
+ * <vaadin-confirm-dialog cancel-button-visible>
32
32
  * There are unsaved changes. Do you really want to leave?
33
33
  * </vaadin-confirm-dialog>
34
34
  * ```
@@ -109,9 +109,10 @@ declare class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMi
109
109
  noCloseOnEsc: boolean;
110
110
 
111
111
  /**
112
- * Whether to show cancel button or not.
112
+ * Whether to show reject button or not.
113
+ * @attr {boolean} reject-button-visible
113
114
  */
114
- reject: boolean;
115
+ rejectButtonVisible: boolean;
115
116
 
116
117
  /**
117
118
  * Text displayed on reject-button.
@@ -129,8 +130,9 @@ declare class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMi
129
130
 
130
131
  /**
131
132
  * Whether to show cancel button or not.
133
+ * @attr {boolean} cancel-button-visible
132
134
  */
133
- cancel: boolean;
135
+ cancelButtonVisible: boolean;
134
136
 
135
137
  /**
136
138
  * Text displayed on cancel-button.
@@ -14,7 +14,7 @@ import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-p
14
14
  * `<vaadin-confirm-dialog>` is a Web Component for showing alerts and asking for user confirmation.
15
15
  *
16
16
  * ```
17
- * <vaadin-confirm-dialog cancel>
17
+ * <vaadin-confirm-dialog cancel-button-visible>
18
18
  * There are unsaved changes. Do you really want to leave?
19
19
  * </vaadin-confirm-dialog>
20
20
  * ```
@@ -158,10 +158,11 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
158
158
  },
159
159
 
160
160
  /**
161
- * Whether to show cancel button or not.
161
+ * Whether to show reject button or not.
162
+ * @attr {boolean} reject-button-visible
162
163
  * @type {boolean}
163
164
  */
164
- reject: {
165
+ rejectButtonVisible: {
165
166
  type: Boolean,
166
167
  reflectToAttribute: true,
167
168
  value: false,
@@ -191,9 +192,10 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
191
192
 
192
193
  /**
193
194
  * Whether to show cancel button or not.
195
+ * @attr {boolean} cancel-button-visible
194
196
  * @type {boolean}
195
197
  */
196
- cancel: {
198
+ cancelButtonVisible: {
197
199
  type: Boolean,
198
200
  reflectToAttribute: true,
199
201
  value: false,
@@ -267,10 +269,10 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
267
269
  static get observers() {
268
270
  return [
269
271
  '__updateConfirmButton(_confirmButton, confirmText, confirmTheme)',
270
- '__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancel)',
272
+ '__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)',
271
273
  '__updateHeaderNode(_headerNode, header)',
272
274
  '__updateMessageNodes(_messageNodes, message)',
273
- '__updateRejectButton(_rejectButton, rejectText, rejectTheme, reject)',
275
+ '__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)',
274
276
  ];
275
277
  }
276
278
 
@@ -470,7 +472,7 @@ class ConfirmDialog extends ElementMixin(ThemePropertyMixin(ControllerMixin(Poly
470
472
  if (this._overlayElement) {
471
473
  this._setDimension(name, value);
472
474
  } else {
473
- this._dimensions = this._dimensions || {};
475
+ this._dimensions ||= {};
474
476
  this._dimensions[name] = value;
475
477
  }
476
478
  }
package/web-types.json CHANGED
@@ -1,271 +1,11 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/confirm-dialog",
4
- "version": "24.0.0-alpha6",
4
+ "version": "24.0.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
- "elements": [
9
- {
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>\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-alpha6/#/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
- "attributes": [
13
- {
14
- "name": "opened",
15
- "description": "True if the overlay is currently displayed.",
16
- "value": {
17
- "type": [
18
- "boolean"
19
- ]
20
- }
21
- },
22
- {
23
- "name": "header",
24
- "description": "Set the confirmation dialog title.",
25
- "value": {
26
- "type": [
27
- "string"
28
- ]
29
- }
30
- },
31
- {
32
- "name": "message",
33
- "description": "Set the message or confirmation question.",
34
- "value": {
35
- "type": [
36
- "string",
37
- "null",
38
- "undefined"
39
- ]
40
- }
41
- },
42
- {
43
- "name": "confirm-text",
44
- "description": "Text displayed on confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
45
- "value": {
46
- "type": [
47
- "string"
48
- ]
49
- }
50
- },
51
- {
52
- "name": "confirm-theme",
53
- "description": "Theme for a confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
54
- "value": {
55
- "type": [
56
- "string"
57
- ]
58
- }
59
- },
60
- {
61
- "name": "no-close-on-esc",
62
- "description": "Set to true to disable closing dialog on Escape press",
63
- "value": {
64
- "type": [
65
- "boolean"
66
- ]
67
- }
68
- },
69
- {
70
- "name": "reject",
71
- "description": "Whether to show cancel button or not.",
72
- "value": {
73
- "type": [
74
- "boolean"
75
- ]
76
- }
77
- },
78
- {
79
- "name": "reject-text",
80
- "description": "Text displayed on reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
81
- "value": {
82
- "type": [
83
- "string"
84
- ]
85
- }
86
- },
87
- {
88
- "name": "reject-theme",
89
- "description": "Theme for a reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
90
- "value": {
91
- "type": [
92
- "string"
93
- ]
94
- }
95
- },
96
- {
97
- "name": "cancel",
98
- "description": "Whether to show cancel button or not.",
99
- "value": {
100
- "type": [
101
- "boolean"
102
- ]
103
- }
104
- },
105
- {
106
- "name": "cancel-text",
107
- "description": "Text displayed on cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
108
- "value": {
109
- "type": [
110
- "string"
111
- ]
112
- }
113
- },
114
- {
115
- "name": "cancel-theme",
116
- "description": "Theme for a cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
117
- "value": {
118
- "type": [
119
- "string"
120
- ]
121
- }
122
- },
123
- {
124
- "name": "theme",
125
- "description": "The theme variants to apply to the component.",
126
- "value": {
127
- "type": [
128
- "string",
129
- "null",
130
- "undefined"
131
- ]
132
- }
133
- }
134
- ],
135
- "js": {
136
- "properties": [
137
- {
138
- "name": "opened",
139
- "description": "True if the overlay is currently displayed.",
140
- "value": {
141
- "type": [
142
- "boolean"
143
- ]
144
- }
145
- },
146
- {
147
- "name": "header",
148
- "description": "Set the confirmation dialog title.",
149
- "value": {
150
- "type": [
151
- "string"
152
- ]
153
- }
154
- },
155
- {
156
- "name": "message",
157
- "description": "Set the message or confirmation question.",
158
- "value": {
159
- "type": [
160
- "string",
161
- "null",
162
- "undefined"
163
- ]
164
- }
165
- },
166
- {
167
- "name": "confirmText",
168
- "description": "Text displayed on confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
169
- "value": {
170
- "type": [
171
- "string"
172
- ]
173
- }
174
- },
175
- {
176
- "name": "confirmTheme",
177
- "description": "Theme for a confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
178
- "value": {
179
- "type": [
180
- "string"
181
- ]
182
- }
183
- },
184
- {
185
- "name": "noCloseOnEsc",
186
- "description": "Set to true to disable closing dialog on Escape press",
187
- "value": {
188
- "type": [
189
- "boolean"
190
- ]
191
- }
192
- },
193
- {
194
- "name": "reject",
195
- "description": "Whether to show cancel button or not.",
196
- "value": {
197
- "type": [
198
- "boolean"
199
- ]
200
- }
201
- },
202
- {
203
- "name": "rejectText",
204
- "description": "Text displayed on reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
205
- "value": {
206
- "type": [
207
- "string"
208
- ]
209
- }
210
- },
211
- {
212
- "name": "rejectTheme",
213
- "description": "Theme for a reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
214
- "value": {
215
- "type": [
216
- "string"
217
- ]
218
- }
219
- },
220
- {
221
- "name": "cancel",
222
- "description": "Whether to show cancel button or not.",
223
- "value": {
224
- "type": [
225
- "boolean"
226
- ]
227
- }
228
- },
229
- {
230
- "name": "cancelText",
231
- "description": "Text displayed on cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
232
- "value": {
233
- "type": [
234
- "string"
235
- ]
236
- }
237
- },
238
- {
239
- "name": "cancelTheme",
240
- "description": "Theme for a cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
241
- "value": {
242
- "type": [
243
- "string"
244
- ]
245
- }
246
- }
247
- ],
248
- "events": [
249
- {
250
- "name": "cancel",
251
- "description": "cancel\nfired when Cancel button or Escape key was pressed."
252
- },
253
- {
254
- "name": "confirm",
255
- "description": "confirm\nfired when Confirm button was pressed."
256
- },
257
- {
258
- "name": "reject",
259
- "description": "reject\nfired when Reject button was pressed."
260
- },
261
- {
262
- "name": "opened-changed",
263
- "description": "Fired when the `opened` property changes."
264
- }
265
- ]
266
- }
267
- }
268
- ]
8
+ "elements": []
269
9
  }
270
10
  }
271
11
  }
@@ -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-alpha6",
4
+ "version": "24.0.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -13,127 +13,7 @@
13
13
  },
14
14
  "contributions": {
15
15
  "html": {
16
- "elements": [
17
- {
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>\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-alpha6/#/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
- "extension": true,
21
- "attributes": [
22
- {
23
- "name": "?opened",
24
- "description": "True if the overlay is currently displayed.",
25
- "value": {
26
- "kind": "expression"
27
- }
28
- },
29
- {
30
- "name": "?noCloseOnEsc",
31
- "description": "Set to true to disable closing dialog on Escape press",
32
- "value": {
33
- "kind": "expression"
34
- }
35
- },
36
- {
37
- "name": "?reject",
38
- "description": "Whether to show cancel button or not.",
39
- "value": {
40
- "kind": "expression"
41
- }
42
- },
43
- {
44
- "name": "?cancel",
45
- "description": "Whether to show cancel button or not.",
46
- "value": {
47
- "kind": "expression"
48
- }
49
- },
50
- {
51
- "name": ".header",
52
- "description": "Set the confirmation dialog title.",
53
- "value": {
54
- "kind": "expression"
55
- }
56
- },
57
- {
58
- "name": ".message",
59
- "description": "Set the message or confirmation question.",
60
- "value": {
61
- "kind": "expression"
62
- }
63
- },
64
- {
65
- "name": ".confirmText",
66
- "description": "Text displayed on confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
67
- "value": {
68
- "kind": "expression"
69
- }
70
- },
71
- {
72
- "name": ".confirmTheme",
73
- "description": "Theme for a confirm-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
74
- "value": {
75
- "kind": "expression"
76
- }
77
- },
78
- {
79
- "name": ".rejectText",
80
- "description": "Text displayed on reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
81
- "value": {
82
- "kind": "expression"
83
- }
84
- },
85
- {
86
- "name": ".rejectTheme",
87
- "description": "Theme for a reject-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
88
- "value": {
89
- "kind": "expression"
90
- }
91
- },
92
- {
93
- "name": ".cancelText",
94
- "description": "Text displayed on cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
95
- "value": {
96
- "kind": "expression"
97
- }
98
- },
99
- {
100
- "name": ".cancelTheme",
101
- "description": "Theme for a cancel-button.\nThis only affects the default button, custom slotted buttons will not be altered.",
102
- "value": {
103
- "kind": "expression"
104
- }
105
- },
106
- {
107
- "name": "@cancel",
108
- "description": "cancel\nfired when Cancel button or Escape key was pressed.",
109
- "value": {
110
- "kind": "expression"
111
- }
112
- },
113
- {
114
- "name": "@confirm",
115
- "description": "confirm\nfired when Confirm button was pressed.",
116
- "value": {
117
- "kind": "expression"
118
- }
119
- },
120
- {
121
- "name": "@reject",
122
- "description": "reject\nfired when Reject button was pressed.",
123
- "value": {
124
- "kind": "expression"
125
- }
126
- },
127
- {
128
- "name": "@opened-changed",
129
- "description": "Fired when the `opened` property changes.",
130
- "value": {
131
- "kind": "expression"
132
- }
133
- }
134
- ]
135
- }
136
- ]
16
+ "elements": []
137
17
  }
138
18
  }
139
19
  }