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

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-beta1",
3
+ "version": "25.0.0-beta3",
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-beta1",
38
- "@vaadin/button": "25.0.0-beta1",
39
- "@vaadin/component-base": "25.0.0-beta1",
40
- "@vaadin/field-base": "25.0.0-beta1",
41
- "@vaadin/input-container": "25.0.0-beta1",
42
- "@vaadin/overlay": "25.0.0-beta1",
43
- "@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
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",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/chai-plugins": "25.0.0-beta1",
48
- "@vaadin/test-runner-commands": "25.0.0-beta1",
47
+ "@vaadin/chai-plugins": "25.0.0-beta3",
48
+ "@vaadin/test-runner-commands": "25.0.0-beta3",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
50
+ "@vaadin/vaadin-lumo-styles": "25.0.0-beta3",
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": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
57
+ "gitHead": "4b2006b0e2f4fc131f5483223b852d34224e7b9a"
58
58
  }
@@ -616,6 +616,23 @@ export const DatePickerMixin = (subclass) =>
616
616
  return !this._shouldKeepFocusRing;
617
617
  }
618
618
 
619
+ /**
620
+ * Override method inherited from `ClearButtonMixin`
621
+ * to not blur on clear button mousedown when opened
622
+ * so that focus remains in the input field.
623
+ *
624
+ * @return {boolean}
625
+ * @protected
626
+ * @override
627
+ */
628
+ _shouldKeepFocusOnClearMousedown() {
629
+ if (this.opened) {
630
+ return true;
631
+ }
632
+
633
+ return super._shouldKeepFocusOnClearMousedown();
634
+ }
635
+
619
636
  /**
620
637
  * Override method inherited from `FocusMixin`
621
638
  * to prevent removing the `focused` attribute:
@@ -1077,10 +1094,8 @@ export const DatePickerMixin = (subclass) =>
1077
1094
  // The input element cannot be readonly as it would conflict with
1078
1095
  // the required attribute. Both are not allowed on an input element.
1079
1096
  // Therefore we prevent default on most keydown events.
1080
- const allowedKeys = [
1081
- 9, // Tab
1082
- ];
1083
- if (allowedKeys.indexOf(e.keyCode) === -1) {
1097
+ const allowedKeys = ['Tab', 'Escape'];
1098
+ if (allowedKeys.indexOf(e.key) === -1) {
1084
1099
  e.preventDefault();
1085
1100
  }
1086
1101
  }
@@ -34,9 +34,7 @@ class DatePickerOverlayContent extends DatePickerOverlayContentMixin(
34
34
  }
35
35
 
36
36
  static get lumoInjector() {
37
- return {
38
- includeBaseStyles: true,
39
- };
37
+ return { ...super.lumoInjector, includeBaseStyles: true };
40
38
  }
41
39
 
42
40
  /** @protected */
@@ -308,7 +308,7 @@ export class InfiniteScroller extends HTMLElement {
308
308
 
309
309
  /** @private */
310
310
  _createPool() {
311
- const container = this.getBoundingClientRect();
311
+ const viewportHeight = this.innerHeight;
312
312
  this._buffers.forEach((buffer) => {
313
313
  for (let i = 0; i < this.bufferSize; i++) {
314
314
  const itemWrapper = document.createElement('div');
@@ -326,7 +326,7 @@ export class InfiniteScroller extends HTMLElement {
326
326
  this.appendChild(itemWrapper);
327
327
 
328
328
  // Only stamp the visible instances first
329
- if (this._isVisible(itemWrapper, container)) {
329
+ if (this.itemHeight * i <= viewportHeight) {
330
330
  this._ensureStampedInstance(itemWrapper);
331
331
  }
332
332
  }
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-beta1",
4
+ "version": "25.0.0-beta3",
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-beta1",
4
+ "version": "25.0.0-beta3",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {