@vaadin/date-picker 25.0.0-beta1 → 25.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 +12 -12
- package/src/vaadin-date-picker-mixin.js +19 -4
- package/src/vaadin-infinite-scroller.js +2 -2
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta2",
|
|
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-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/input-container": "25.0.0-
|
|
42
|
-
"@vaadin/overlay": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-beta2",
|
|
38
|
+
"@vaadin/button": "25.0.0-beta2",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-beta2",
|
|
40
|
+
"@vaadin/field-base": "25.0.0-beta2",
|
|
41
|
+
"@vaadin/input-container": "25.0.0-beta2",
|
|
42
|
+
"@vaadin/overlay": "25.0.0-beta2",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta2",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-beta2",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-beta2",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta2",
|
|
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": "
|
|
57
|
+
"gitHead": "e078f8371ae266f05c7ca1ec25686cc489c83f24"
|
|
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
|
-
|
|
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
|
}
|
|
@@ -308,7 +308,7 @@ export class InfiniteScroller extends HTMLElement {
|
|
|
308
308
|
|
|
309
309
|
/** @private */
|
|
310
310
|
_createPool() {
|
|
311
|
-
const
|
|
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.
|
|
329
|
+
if (this.itemHeight * i <= viewportHeight) {
|
|
330
330
|
this._ensureStampedInstance(itemWrapper);
|
|
331
331
|
}
|
|
332
332
|
}
|
package/web-types.json
CHANGED