@vaadin/date-picker 24.0.0-alpha6 → 24.0.0-alpha8

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": "24.0.0-alpha6",
3
+ "version": "24.0.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,14 +36,14 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.2.0",
39
- "@vaadin/button": "24.0.0-alpha6",
40
- "@vaadin/component-base": "24.0.0-alpha6",
41
- "@vaadin/field-base": "24.0.0-alpha6",
42
- "@vaadin/input-container": "24.0.0-alpha6",
43
- "@vaadin/overlay": "24.0.0-alpha6",
44
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha6",
45
- "@vaadin/vaadin-material-styles": "24.0.0-alpha6",
46
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha6"
39
+ "@vaadin/button": "24.0.0-alpha8",
40
+ "@vaadin/component-base": "24.0.0-alpha8",
41
+ "@vaadin/field-base": "24.0.0-alpha8",
42
+ "@vaadin/input-container": "24.0.0-alpha8",
43
+ "@vaadin/overlay": "24.0.0-alpha8",
44
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha8",
45
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha8",
46
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha8"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@esm-bundle/chai": "^4.3.4",
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "0004ac92b6e5f415b5fa949e0582d1d11e527b1f"
57
+ "gitHead": "476752249bb12295c500980d98a3256ad3b22b73"
58
58
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
 
@@ -153,7 +153,7 @@ export function getAdjustedYear(referenceDate, year, month = 0, day = 1) {
153
153
  */
154
154
  export function parseDate(str) {
155
155
  // Parsing with RegExp to ensure correct format
156
- const parts = /^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(str);
156
+ const parts = /^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(str);
157
157
  if (!parts) {
158
158
  return undefined;
159
159
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ValidateMixin } from '@vaadin/field-base/src/validate-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-date-picker-overlay.js';
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
+ import type { DelegateFocusMixinClass } from '@vaadin/component-base/src/delegate-focus-mixin.js';
7
8
  import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
8
9
  import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
9
10
  import type { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
10
- import type { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
11
11
  import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
12
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
13
13
 
@@ -18,15 +18,69 @@ export interface DatePickerDate {
18
18
  }
19
19
 
20
20
  export interface DatePickerI18n {
21
+ /**
22
+ * An array with the full names of months starting
23
+ * with January.
24
+ */
21
25
  monthNames: string[];
26
+ /**
27
+ * An array of weekday names starting with Sunday. Used
28
+ * in screen reader announcements.
29
+ */
22
30
  weekdays: string[];
31
+ /**
32
+ * An array of short weekday names starting with Sunday.
33
+ * Displayed in the calendar.
34
+ */
23
35
  weekdaysShort: string[];
36
+ /**
37
+ * An integer indicating the first day of the week
38
+ * (0 = Sunday, 1 = Monday, etc.).
39
+ */
24
40
  firstDayOfWeek: number;
41
+ /**
42
+ * Translation of the Today shortcut button text.
43
+ */
25
44
  today: string;
45
+ /**
46
+ * Translation of the Cancel button text.
47
+ */
26
48
  cancel: string;
49
+ /**
50
+ * Used for adjusting the year value when parsing dates with short years.
51
+ * The year values between 0 and 99 are evaluated and adjusted.
52
+ * Example: for a referenceDate of 1970-10-30;
53
+ * dateToBeParsed: 40-10-30, result: 1940-10-30
54
+ * dateToBeParsed: 80-10-30, result: 1980-10-30
55
+ * dateToBeParsed: 10-10-30, result: 2010-10-30
56
+ * Supported date format: ISO 8601 `"YYYY-MM-DD"` (default)
57
+ * The default value is the current date.
58
+ */
27
59
  referenceDate: string;
60
+
61
+ /**
62
+ * A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.
63
+ * Must properly parse (at least) text formatted by `formatDate`.
64
+ * Setting the property to null will disable keyboard input feature.
65
+ * Note: The argument month is 0-based. This means that January = 0 and December = 11.
66
+ * @param date
67
+ */
28
68
  parseDate(date: string): DatePickerDate | undefined;
69
+
70
+ /**
71
+ * A function to format given `Object` as
72
+ * date string. Object is in the format `{ day: ..., month: ..., year: ... }`
73
+ * Note: The argument month is 0-based. This means that January = 0 and December = 11.
74
+ * @param date
75
+ */
29
76
  formatDate(date: DatePickerDate): string;
77
+
78
+ /**
79
+ * A function to format given `monthName` and
80
+ * `fullYear` integer as calendar title string.
81
+ * @param monthName
82
+ * @param fullYear
83
+ */
30
84
  formatTitle(monthName: string, fullYear: number): string;
31
85
  }
32
86
 
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
7
7
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
8
+ import { DelegateFocusMixin } from '@vaadin/component-base/src/delegate-focus-mixin.js';
8
9
  import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
9
10
  import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
10
- import { DelegateFocusMixin } from '@vaadin/field-base/src/delegate-focus-mixin.js';
11
11
  import { InputConstraintsMixin } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
12
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
13
13
  import {
@@ -222,7 +222,7 @@ export const DatePickerMixin = (subclass) =>
222
222
  cancel: 'Cancel',
223
223
  referenceDate: '',
224
224
  formatDate(d) {
225
- const yearStr = String(d.year).replace(/\d+/, (y) => '0000'.substr(y.length) + y);
225
+ const yearStr = String(d.year).replace(/\d+/u, (y) => '0000'.substr(y.length) + y);
226
226
  return [d.month + 1, d.day, yearStr].join('/');
227
227
  },
228
228
  parseDate(text) {
@@ -791,21 +791,17 @@ export const DatePickerMixin = (subclass) =>
791
791
 
792
792
  /** @protected */
793
793
  _onOverlayOpened() {
794
- const parsedInitialPosition = parseDate(this.initialPosition);
794
+ // Detect which date to show
795
+ const initialPosition = this._getInitialPosition();
796
+ this._overlayContent.initialPosition = initialPosition;
795
797
 
796
- const initialPosition =
797
- this._selectedDate || this._overlayContent.initialPosition || parsedInitialPosition || new Date();
798
+ // Scroll the date into view
799
+ const scrollFocusDate = this._overlayContent.focusedDate || initialPosition;
800
+ this._overlayContent.scrollToDate(scrollFocusDate);
798
801
 
799
- if (parsedInitialPosition || dateAllowed(initialPosition, this._minDate, this._maxDate)) {
800
- this._overlayContent.initialPosition = initialPosition;
801
- } else {
802
- this._overlayContent.initialPosition = getClosestDate(initialPosition, [this._minDate, this._maxDate]);
803
- }
804
-
805
- this._overlayContent.scrollToDate(this._overlayContent.focusedDate || this._overlayContent.initialPosition);
806
- // Have a default focused date
802
+ // Ensure the date is focused
807
803
  this._ignoreFocusedDateChange = true;
808
- this._overlayContent.focusedDate = this._overlayContent.focusedDate || this._overlayContent.initialPosition;
804
+ this._overlayContent.focusedDate = scrollFocusDate;
809
805
  this._ignoreFocusedDateChange = false;
810
806
 
811
807
  window.addEventListener('scroll', this._boundOnScroll, true);
@@ -823,6 +819,18 @@ export const DatePickerMixin = (subclass) =>
823
819
  }
824
820
  }
825
821
 
822
+ /** @private */
823
+ _getInitialPosition() {
824
+ const parsedInitialPosition = parseDate(this.initialPosition);
825
+
826
+ const initialPosition =
827
+ this._selectedDate || this._overlayContent.initialPosition || parsedInitialPosition || new Date();
828
+
829
+ return parsedInitialPosition || dateAllowed(initialPosition, this._minDate, this._maxDate)
830
+ ? initialPosition
831
+ : getClosestDate(initialPosition, [this._minDate, this._maxDate]);
832
+ }
833
+
826
834
  /** @private */
827
835
  _selectParsedOrFocusedDate() {
828
836
  // Select the parsed input or focused date
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html } from '@polymer/polymer/lib/utils/html-tag.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/button/src/vaadin-button.js';
@@ -644,7 +644,10 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
644
644
  const initialPosition = this._monthScroller.position;
645
645
 
646
646
  const smoothScroll = (timestamp) => {
647
- start = start || timestamp;
647
+ if (!start) {
648
+ start = timestamp;
649
+ }
650
+
648
651
  const currentTime = timestamp - start;
649
652
 
650
653
  if (currentTime < this.scrollDuration) {
@@ -972,58 +975,55 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
972
975
  this.focusDate(getClosestDate(focus, [this.minDate, this.maxDate]));
973
976
  }
974
977
 
975
- _moveFocusByDays(days) {
976
- const focus = this.focusedDate;
977
- const dateToFocus = new Date(0, 0);
978
- dateToFocus.setFullYear(focus.getFullYear());
979
- dateToFocus.setMonth(focus.getMonth());
980
- dateToFocus.setDate(focus.getDate() + days);
981
-
982
- if (this._dateAllowed(dateToFocus, this.minDate, this.maxDate)) {
983
- this.focusDate(dateToFocus);
984
- } else if (this._dateAllowed(focus, this.minDate, this.maxDate)) {
978
+ _focusAllowedDate(dateToFocus, diff, keepMonth) {
979
+ if (this._dateAllowed(dateToFocus)) {
980
+ this.focusDate(dateToFocus, keepMonth);
981
+ } else if (this._dateAllowed(this.focusedDate)) {
985
982
  // Move to min or max date
986
- if (days > 0) {
987
- // Down or right
983
+ if (diff > 0) {
984
+ // Down, Right or Page Down key
988
985
  this.focusDate(this.maxDate);
989
986
  } else {
990
- // Up or left
987
+ // Up, Left or Page Up key
991
988
  this.focusDate(this.minDate);
992
989
  }
993
990
  } else {
994
991
  // Move to closest allowed date
995
- this._focusClosestDate(focus);
992
+ this._focusClosestDate(this.focusedDate);
996
993
  }
997
994
  }
998
995
 
999
- _moveFocusByMonths(months) {
1000
- const focus = this.focusedDate;
1001
- const dateToFocus = new Date(0, 0);
1002
- dateToFocus.setFullYear(focus.getFullYear());
1003
- dateToFocus.setMonth(focus.getMonth() + months);
996
+ _getDateDiff(months, days) {
997
+ const date = new Date(0, 0);
998
+ date.setFullYear(this.focusedDate.getFullYear());
999
+ date.setMonth(this.focusedDate.getMonth() + months);
1000
+ if (days) {
1001
+ date.setDate(this.focusedDate.getDate() + days);
1002
+ }
1003
+ return date;
1004
+ }
1005
+
1006
+ _moveFocusByDays(days) {
1007
+ const dateToFocus = this._getDateDiff(0, days);
1008
+
1009
+ this._focusAllowedDate(dateToFocus, days, false);
1010
+ }
1004
1011
 
1012
+ _moveFocusByMonths(months) {
1013
+ const dateToFocus = this._getDateDiff(months);
1005
1014
  const targetMonth = dateToFocus.getMonth();
1006
1015
 
1007
- dateToFocus.setDate(this._focusedMonthDate || (this._focusedMonthDate = focus.getDate()));
1016
+ if (!this._focusedMonthDate) {
1017
+ this._focusedMonthDate = this.focusedDate.getDate();
1018
+ }
1019
+
1020
+ dateToFocus.setDate(this._focusedMonthDate);
1021
+
1008
1022
  if (dateToFocus.getMonth() !== targetMonth) {
1009
1023
  dateToFocus.setDate(0);
1010
1024
  }
1011
1025
 
1012
- if (this._dateAllowed(dateToFocus, this.minDate, this.maxDate)) {
1013
- this.focusDate(dateToFocus, true);
1014
- } else if (this._dateAllowed(focus, this.minDate, this.maxDate)) {
1015
- // Move to min or max date
1016
- if (months > 0) {
1017
- // Pagedown
1018
- this.focusDate(this.maxDate);
1019
- } else {
1020
- // Pageup
1021
- this.focusDate(this.minDate);
1022
- }
1023
- } else {
1024
- // Move to closest allowed date
1025
- this._focusClosestDate(focus);
1026
- }
1026
+ this._focusAllowedDate(dateToFocus, months, true);
1027
1027
  }
1028
1028
 
1029
1029
  _moveFocusInsideMonth(focusedDate, property) {
@@ -1038,9 +1038,9 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
1038
1038
  dateToFocus.setDate(0);
1039
1039
  }
1040
1040
 
1041
- if (this._dateAllowed(dateToFocus, this.minDate, this.maxDate)) {
1041
+ if (this._dateAllowed(dateToFocus)) {
1042
1042
  this.focusDate(dateToFocus);
1043
- } else if (this._dateAllowed(focusedDate, this.minDate, this.maxDate)) {
1043
+ } else if (this._dateAllowed(focusedDate)) {
1044
1044
  // Move to minDate or maxDate
1045
1045
  this.focusDate(this[property]);
1046
1046
  } else {
@@ -1049,7 +1049,7 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
1049
1049
  }
1050
1050
  }
1051
1051
 
1052
- _dateAllowed(date, min, max) {
1052
+ _dateAllowed(date, min = this.minDate, max = this.maxDate) {
1053
1053
  return (!min || date >= min) && (!max || date <= max);
1054
1054
  }
1055
1055
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html } from '@polymer/polymer/lib/utils/html-tag.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/input-container/src/vaadin-input-container.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@polymer/polymer/lib/elements/dom-repeat.js';
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": "24.0.0-alpha6",
4
+ "version": "24.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -216,7 +216,7 @@
216
216
  },
217
217
  {
218
218
  "name": "vaadin-date-picker",
219
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
219
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
220
220
  "attributes": [
221
221
  {
222
222
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.0.0-alpha6",
4
+ "version": "24.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -107,7 +107,7 @@
107
107
  },
108
108
  {
109
109
  "name": "vaadin-date-picker",
110
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
110
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha8/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
111
111
  "extension": true,
112
112
  "attributes": [
113
113
  {