@vaadin/dialog 25.1.0-alpha2 → 25.1.0-alpha3

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/dialog",
3
- "version": "25.1.0-alpha2",
3
+ "version": "25.1.0-alpha3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,24 +36,24 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/component-base": "25.1.0-alpha2",
40
- "@vaadin/lit-renderer": "25.1.0-alpha2",
41
- "@vaadin/overlay": "25.1.0-alpha2",
42
- "@vaadin/vaadin-themable-mixin": "25.1.0-alpha2",
39
+ "@vaadin/component-base": "25.1.0-alpha3",
40
+ "@vaadin/lit-renderer": "25.1.0-alpha3",
41
+ "@vaadin/overlay": "25.1.0-alpha3",
42
+ "@vaadin/vaadin-themable-mixin": "25.1.0-alpha3",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/a11y-base": "25.1.0-alpha2",
47
- "@vaadin/aura": "25.1.0-alpha2",
48
- "@vaadin/chai-plugins": "25.1.0-alpha2",
49
- "@vaadin/test-runner-commands": "25.1.0-alpha2",
46
+ "@vaadin/a11y-base": "25.1.0-alpha3",
47
+ "@vaadin/aura": "25.1.0-alpha3",
48
+ "@vaadin/chai-plugins": "25.1.0-alpha3",
49
+ "@vaadin/test-runner-commands": "25.1.0-alpha3",
50
50
  "@vaadin/testing-helpers": "^2.0.0",
51
- "@vaadin/vaadin-lumo-styles": "25.1.0-alpha2",
51
+ "@vaadin/vaadin-lumo-styles": "25.1.0-alpha3",
52
52
  "sinon": "^21.0.0"
53
53
  },
54
54
  "web-types": [
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "dfeb6e14643ec923e5505ca645f7354c6dc170ec"
58
+ "gitHead": "b3bb340cfd5e837cda8498aee1608950362e5177"
59
59
  }
@@ -93,11 +93,15 @@ export const DialogDraggableMixin = (superClass) =>
93
93
  window.addEventListener('touchend', this._stopDrag);
94
94
  window.addEventListener('mousemove', this._drag);
95
95
  window.addEventListener('touchmove', this._drag);
96
+
97
+ const { top, left, width, height } = this._originalBounds;
96
98
  if (this.$.overlay.$.overlay.style.position !== 'absolute') {
97
- const { top, left } = this._originalBounds;
98
99
  this.top = top;
99
100
  this.left = left;
100
101
  }
102
+ this.dispatchEvent(
103
+ new CustomEvent('drag-start', { bubbles: true, composed: true, detail: { width, height, top, left } }),
104
+ );
101
105
  }
102
106
  }
103
107
  }
@@ -124,6 +128,12 @@ export const DialogDraggableMixin = (superClass) =>
124
128
  window.removeEventListener('touchmove', this._drag);
125
129
  }
126
130
 
131
+ /**
132
+ * Fired when the dialog drag is started.
133
+ *
134
+ * @event drag-start
135
+ */
136
+
127
137
  /**
128
138
  * Fired when the dialog drag is finished.
129
139
  *
@@ -74,6 +74,9 @@ export const DialogResizableMixin = (superClass) =>
74
74
  window.addEventListener('touchend', this._resizeListeners.stop[direction]);
75
75
  this.$.overlay.setBounds(this._originalBounds);
76
76
  this.$.overlay.setAttribute('has-bounds-set', '');
77
+
78
+ const { width, height, top, left } = this._originalBounds;
79
+ this.dispatchEvent(new CustomEvent('resize-start', { detail: { width, height, top, left } }));
77
80
  }
78
81
  }
79
82
 
@@ -148,6 +151,12 @@ export const DialogResizableMixin = (superClass) =>
148
151
  return { width, height, top, left };
149
152
  }
150
153
 
154
+ /**
155
+ * Fired when the dialog resize is started.
156
+ *
157
+ * @event resize-start
158
+ */
159
+
151
160
  /**
152
161
  * Fired when the dialog resize is finished.
153
162
  *
@@ -34,11 +34,21 @@ export type DialogPosition = {
34
34
  */
35
35
  export type DialogOpenedChangedEvent = CustomEvent<{ value: boolean }>;
36
36
 
37
+ /**
38
+ * Fired when the dialog resize is started.
39
+ */
40
+ export type DialogResizeStartEvent = CustomEvent<DialogResizeDimensions>;
41
+
37
42
  /**
38
43
  * Fired when the dialog resize is finished.
39
44
  */
40
45
  export type DialogResizeEvent = CustomEvent<DialogResizeDimensions>;
41
46
 
47
+ /**
48
+ * Fired when the dialog drag is started.
49
+ */
50
+ export type DialogDragStartEvent = CustomEvent<DialogResizeDimensions>;
51
+
42
52
  /**
43
53
  * Fired when the dialog drag is finished.
44
54
  */
@@ -54,8 +64,12 @@ export interface DialogCustomEventMap {
54
64
 
55
65
  closed: DialogClosedEvent;
56
66
 
67
+ 'resize-start': DialogResizeStartEvent;
68
+
57
69
  resize: DialogResizeEvent;
58
70
 
71
+ 'drag-start': DialogDragStartEvent;
72
+
59
73
  dragged: DialogDraggedEvent;
60
74
  }
61
75
 
@@ -131,7 +145,9 @@ export type DialogEventMap = DialogCustomEventMap & HTMLElementEventMap;
131
145
  *
132
146
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
133
147
  *
148
+ * @fires {CustomEvent} resize-start - Fired when the dialog resize is started.
134
149
  * @fires {CustomEvent} resize - Fired when the dialog resize is finished.
150
+ * @fires {CustomEvent} drag-start - Fired when the dialog drag is started.
135
151
  * @fires {CustomEvent} dragged - Fired when the dialog drag is finished.
136
152
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
137
153
  * @fires {CustomEvent} closed - Fired when the dialog is closed.
@@ -88,7 +88,9 @@ export { DialogOverlay } from './vaadin-dialog-overlay.js';
88
88
  *
89
89
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
90
90
  *
91
+ * @fires {CustomEvent} resize-start - Fired when the dialog resize is started.
91
92
  * @fires {CustomEvent} resize - Fired when the dialog resize is finished.
93
+ * @fires {CustomEvent} drag-start - Fired when the dialog drag is started.
92
94
  * @fires {CustomEvent} dragged - Fired when the dialog drag is finished.
93
95
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
94
96
  * @fires {CustomEvent} closed - Fired when the dialog is closed.
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.1.0-alpha2",
4
+ "version": "25.1.0-alpha3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -300,6 +300,10 @@
300
300
  "name": "closed",
301
301
  "description": "Fired when the dialog is closed."
302
302
  },
303
+ {
304
+ "name": "drag-start",
305
+ "description": "Fired when the dialog drag is started."
306
+ },
303
307
  {
304
308
  "name": "dragged",
305
309
  "description": "Fired when the dialog drag is finished."
@@ -308,6 +312,10 @@
308
312
  "name": "resize",
309
313
  "description": "Fired when the dialog resize is finished."
310
314
  },
315
+ {
316
+ "name": "resize-start",
317
+ "description": "Fired when the dialog resize is started."
318
+ },
311
319
  {
312
320
  "name": "opened-changed",
313
321
  "description": "Fired when the `opened` property changes."
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.1.0-alpha2",
4
+ "version": "25.1.0-alpha3",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -131,6 +131,13 @@
131
131
  "kind": "expression"
132
132
  }
133
133
  },
134
+ {
135
+ "name": "@drag-start",
136
+ "description": "Fired when the dialog drag is started.",
137
+ "value": {
138
+ "kind": "expression"
139
+ }
140
+ },
134
141
  {
135
142
  "name": "@dragged",
136
143
  "description": "Fired when the dialog drag is finished.",
@@ -145,6 +152,13 @@
145
152
  "kind": "expression"
146
153
  }
147
154
  },
155
+ {
156
+ "name": "@resize-start",
157
+ "description": "Fired when the dialog resize is started.",
158
+ "value": {
159
+ "kind": "expression"
160
+ }
161
+ },
148
162
  {
149
163
  "name": "@opened-changed",
150
164
  "description": "Fired when the `opened` property changes.",