@vaadin/date-picker 25.0.0-beta3 → 25.0.0-beta5

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/date-picker",
3
- "version": "25.0.0-beta3",
3
+ "version": "25.0.0-beta5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,25 +34,25 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@open-wc/dedupe-mixin": "^1.3.0",
37
- "@vaadin/a11y-base": "25.0.0-beta3",
38
- "@vaadin/button": "25.0.0-beta3",
39
- "@vaadin/component-base": "25.0.0-beta3",
40
- "@vaadin/field-base": "25.0.0-beta3",
41
- "@vaadin/input-container": "25.0.0-beta3",
42
- "@vaadin/overlay": "25.0.0-beta3",
43
- "@vaadin/vaadin-themable-mixin": "25.0.0-beta3",
37
+ "@vaadin/a11y-base": "25.0.0-beta5",
38
+ "@vaadin/button": "25.0.0-beta5",
39
+ "@vaadin/component-base": "25.0.0-beta5",
40
+ "@vaadin/field-base": "25.0.0-beta5",
41
+ "@vaadin/input-container": "25.0.0-beta5",
42
+ "@vaadin/overlay": "25.0.0-beta5",
43
+ "@vaadin/vaadin-themable-mixin": "25.0.0-beta5",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/chai-plugins": "25.0.0-beta3",
48
- "@vaadin/test-runner-commands": "25.0.0-beta3",
47
+ "@vaadin/chai-plugins": "25.0.0-beta5",
48
+ "@vaadin/test-runner-commands": "25.0.0-beta5",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.0.0-beta3",
50
+ "@vaadin/vaadin-lumo-styles": "25.0.0-beta5",
51
51
  "sinon": "^21.0.0"
52
52
  },
53
53
  "web-types": [
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "4b2006b0e2f4fc131f5483223b852d34224e7b9a"
57
+ "gitHead": "ba59e1404cc4bef2dd685476247f758eb28c9922"
58
58
  }
@@ -27,4 +27,8 @@ export const datePickerStyles = css`
27
27
  [part~='toggle-button']::before {
28
28
  mask-image: var(--_vaadin-icon-calendar);
29
29
  }
30
+
31
+ :host([readonly]) [part~='toggle-button'] {
32
+ display: none;
33
+ }
30
34
  `;
@@ -36,7 +36,7 @@ export const overlayContentStyles = css`
36
36
  font-weight: var(--vaadin-button-font-weight, 500);
37
37
  height: var(--vaadin-button-height, auto);
38
38
  line-height: var(--vaadin-button-line-height, inherit);
39
- padding: var(--vaadin-button-padding, var(--vaadin-padding-container));
39
+ padding: var(--vaadin-button-padding, var(--vaadin-padding-block-container) var(--vaadin-padding-inline-container));
40
40
  cursor: var(--vaadin-clickable-cursor);
41
41
  }
42
42
 
@@ -889,11 +889,11 @@ export const DatePickerMixin = (subclass) =>
889
889
  }
890
890
 
891
891
  /** @protected */
892
- _onOverlayEscapePress() {
892
+ _onOverlayEscapePress(event) {
893
+ event.stopPropagation();
893
894
  this._focusedDate = this._selectedDate;
894
- this._closedByEscape = true;
895
+ this._applyInputValue(this._selectedDate);
895
896
  this._close();
896
- this._closedByEscape = false;
897
897
  }
898
898
 
899
899
  /** @protected */
@@ -984,9 +984,6 @@ export const DatePickerMixin = (subclass) =>
984
984
  }
985
985
  window.removeEventListener('scroll', this._boundOnScroll, true);
986
986
 
987
- if (this._closedByEscape) {
988
- this._applyInputValue(this._selectedDate);
989
- }
990
987
  this.__commitParsedOrFocusedDate();
991
988
 
992
989
  if (this.inputElement && this.inputElement.selectionStart) {
@@ -1163,8 +1160,8 @@ export const DatePickerMixin = (subclass) =>
1163
1160
  * @override
1164
1161
  */
1165
1162
  _onEscape(event) {
1166
- // Closing overlay is handled in vaadin-overlay-escape-press event listener.
1167
1163
  if (this.opened) {
1164
+ this._onOverlayEscapePress(event);
1168
1165
  return;
1169
1166
  }
1170
1167
 
@@ -216,6 +216,8 @@ class DatePicker extends DatePickerMixin(
216
216
  <div part="error-message">
217
217
  <slot name="error-message"></slot>
218
218
  </div>
219
+
220
+ <slot name="tooltip"></slot>
219
221
  </div>
220
222
 
221
223
  <vaadin-date-picker-overlay
@@ -225,7 +227,6 @@ class DatePicker extends DatePickerMixin(
225
227
  theme="${ifDefined(this._theme)}"
226
228
  .opened="${this.opened}"
227
229
  @opened-changed="${this._onOpenedChanged}"
228
- @vaadin-overlay-escape-press="${this._onOverlayEscapePress}"
229
230
  @vaadin-overlay-open="${this._onOverlayOpened}"
230
231
  @vaadin-overlay-close="${this._onVaadinOverlayClose}"
231
232
  @vaadin-overlay-closing="${this._onOverlayClosed}"
@@ -237,8 +238,6 @@ class DatePicker extends DatePickerMixin(
237
238
  >
238
239
  <slot name="overlay"></slot>
239
240
  </vaadin-date-picker-overlay>
240
-
241
- <slot name="tooltip"></slot>
242
241
  `;
243
242
  }
244
243
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "25.0.0-beta3",
4
+ "version": "25.0.0-beta5",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "25.0.0-beta3",
4
+ "version": "25.0.0-beta5",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {