@vaadin/date-picker 24.8.0-alpha8 → 25.0.0-alpha1

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.
Files changed (44) hide show
  1. package/README.md +0 -23
  2. package/package.json +12 -14
  3. package/src/vaadin-date-picker-mixin.js +1 -14
  4. package/src/vaadin-date-picker-overlay-content-mixin.js +4 -6
  5. package/src/vaadin-date-picker-overlay-content.js +22 -21
  6. package/src/vaadin-date-picker-overlay.js +11 -9
  7. package/src/vaadin-date-picker-year.js +15 -10
  8. package/src/vaadin-date-picker.d.ts +0 -3
  9. package/src/vaadin-date-picker.js +53 -41
  10. package/src/vaadin-infinite-scroller.js +0 -13
  11. package/src/vaadin-month-calendar.js +67 -46
  12. package/web-types.json +2 -369
  13. package/web-types.lit.json +2 -156
  14. package/src/vaadin-date-picker-light.d.ts +0 -112
  15. package/src/vaadin-date-picker-light.js +0 -133
  16. package/src/vaadin-lit-date-picker-overlay-content.js +0 -70
  17. package/src/vaadin-lit-date-picker-overlay.js +0 -46
  18. package/src/vaadin-lit-date-picker-year.js +0 -41
  19. package/src/vaadin-lit-date-picker.js +0 -172
  20. package/src/vaadin-lit-month-calendar.js +0 -98
  21. package/theme/lumo/vaadin-date-picker-light.d.ts +0 -4
  22. package/theme/lumo/vaadin-date-picker-light.js +0 -4
  23. package/theme/lumo/vaadin-lit-date-picker.d.ts +0 -5
  24. package/theme/lumo/vaadin-lit-date-picker.js +0 -5
  25. package/theme/material/vaadin-date-picker-light.d.ts +0 -4
  26. package/theme/material/vaadin-date-picker-light.js +0 -4
  27. package/theme/material/vaadin-date-picker-overlay-content-styles.d.ts +0 -6
  28. package/theme/material/vaadin-date-picker-overlay-content-styles.js +0 -132
  29. package/theme/material/vaadin-date-picker-overlay-styles.d.ts +0 -1
  30. package/theme/material/vaadin-date-picker-overlay-styles.js +0 -47
  31. package/theme/material/vaadin-date-picker-styles.d.ts +0 -3
  32. package/theme/material/vaadin-date-picker-styles.js +0 -22
  33. package/theme/material/vaadin-date-picker-year-styles.d.ts +0 -1
  34. package/theme/material/vaadin-date-picker-year-styles.js +0 -28
  35. package/theme/material/vaadin-date-picker.d.ts +0 -5
  36. package/theme/material/vaadin-date-picker.js +0 -5
  37. package/theme/material/vaadin-lit-date-picker.d.ts +0 -5
  38. package/theme/material/vaadin-lit-date-picker.js +0 -5
  39. package/theme/material/vaadin-month-calendar-styles.d.ts +0 -2
  40. package/theme/material/vaadin-month-calendar-styles.js +0 -120
  41. package/vaadin-date-picker-light.d.ts +0 -1
  42. package/vaadin-date-picker-light.js +0 -2
  43. package/vaadin-lit-date-picker.d.ts +0 -1
  44. package/vaadin-lit-date-picker.js +0 -2
@@ -3,76 +3,97 @@
3
3
  * Copyright (c) 2016 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import '@polymer/polymer/lib/elements/dom-repeat.js';
7
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { html, LitElement } from 'lit';
8
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
9
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
10
  import { MonthCalendarMixin } from './vaadin-month-calendar-mixin.js';
11
11
  import { monthCalendarStyles } from './vaadin-month-calendar-styles.js';
12
12
 
13
- registerStyles('vaadin-month-calendar', monthCalendarStyles, {
14
- moduleId: 'vaadin-month-calendar-styles',
15
- });
16
-
17
13
  /**
18
14
  * @customElement
19
15
  * @extends HTMLElement
20
16
  * @private
21
17
  */
22
- class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
23
- static get template() {
18
+ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolylitMixin(LitElement))) {
19
+ static get is() {
20
+ return 'vaadin-month-calendar';
21
+ }
22
+
23
+ static get styles() {
24
+ return monthCalendarStyles;
25
+ }
26
+
27
+ /** @protected */
28
+ render() {
29
+ const weekDayNames = this.__computeWeekDayNames(this.i18n, this.showWeekNumbers);
30
+ const weeks = this._weeks;
31
+ const hideWeekSeparator = !this.__computeShowWeekSeparator(this.showWeekNumbers, this.i18n);
32
+
24
33
  return html`
25
- <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
34
+ <div part="month-header" id="month-header" aria-hidden="true">${this._getTitle(this.month, this.i18n)}</div>
26
35
  <table
27
36
  id="monthGrid"
28
37
  role="grid"
29
38
  aria-labelledby="month-header"
30
- on-touchend="_preventDefault"
31
- on-touchstart="_onMonthGridTouchStart"
39
+ @touchend="${this._preventDefault}"
40
+ @touchstart="${this._onMonthGridTouchStart}"
32
41
  >
33
42
  <thead id="weekdays-container">
34
43
  <tr role="row" part="weekdays">
35
- <th part="weekday" aria-hidden="true" hidden$="[[!__computeShowWeekSeparator(showWeekNumbers, i18n)]]"></th>
36
- <template is="dom-repeat" items="[[__computeWeekDayNames(i18n, showWeekNumbers)]]">
37
- <th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
38
- [[item.weekDayShort]]
39
- </th>
40
- </template>
44
+ <th part="weekday" aria-hidden="true" ?hidden="${hideWeekSeparator}"></th>
45
+ ${weekDayNames.map(
46
+ (item) => html`
47
+ <th role="columnheader" part="weekday" scope="col" abbr="${item.weekDay}" aria-hidden="true">
48
+ ${item.weekDayShort}
49
+ </th>
50
+ `,
51
+ )}
41
52
  </tr>
42
53
  </thead>
43
54
  <tbody id="days-container">
44
- <template is="dom-repeat" items="[[_weeks]]" as="week">
45
- <tr role="row">
46
- <td
47
- part="week-number"
48
- aria-hidden="true"
49
- hidden$="[[!__computeShowWeekSeparator(showWeekNumbers, i18n)]]"
50
- >
51
- [[__computeWeekNumber(week)]]
52
- </td>
53
- <template is="dom-repeat" items="[[week]]">
54
- <td
55
- role="gridcell"
56
- part$="[[__computeDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, __hasFocus)]]"
57
- date="[[item]]"
58
- tabindex$="[[__computeDayTabIndex(item, focusedDate)]]"
59
- disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
60
- aria-selected$="[[__computeDayAriaSelected(item, selectedDate)]]"
61
- aria-disabled$="[[__computeDayAriaDisabled(item, minDate, maxDate, isDateDisabled)]]"
62
- aria-label$="[[__computeDayAriaLabel(item)]]"
63
- >[[_getDate(item)]]</td
64
- >
65
- </template>
66
- </tr>
67
- </template>
55
+ ${weeks.map(
56
+ (week) => html`
57
+ <tr role="row">
58
+ <td part="week-number" aria-hidden="true" ?hidden="${hideWeekSeparator}">
59
+ ${this.__computeWeekNumber(week)}
60
+ </td>
61
+ ${week.map((date) => {
62
+ return html`
63
+ <td
64
+ role="gridcell"
65
+ part="${this.__computeDatePart(
66
+ date,
67
+ this.focusedDate,
68
+ this.selectedDate,
69
+ this.minDate,
70
+ this.maxDate,
71
+ this.isDateDisabled,
72
+ this.enteredDate,
73
+ this.__hasFocus,
74
+ )}"
75
+ .date="${date}"
76
+ ?disabled="${this.__isDayDisabled(date, this.minDate, this.maxDate, this.isDateDisabled)}"
77
+ tabindex="${this.__computeDayTabIndex(date, this.focusedDate)}"
78
+ aria-selected="${this.__computeDayAriaSelected(date, this.selectedDate)}"
79
+ aria-disabled="${this.__computeDayAriaDisabled(
80
+ date,
81
+ this.minDate,
82
+ this.maxDate,
83
+ this.isDateDisabled,
84
+ )}"
85
+ aria-label="${this.__computeDayAriaLabel(date)}"
86
+ >${this._getDate(date)}</td
87
+ >
88
+ `;
89
+ })}
90
+ </tr>
91
+ `,
92
+ )}
68
93
  </tbody>
69
94
  </table>
70
95
  `;
71
96
  }
72
-
73
- static get is() {
74
- return 'vaadin-month-calendar';
75
- }
76
97
  }
77
98
 
78
99
  defineCustomElement(MonthCalendar);
package/web-types.json CHANGED
@@ -1,381 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.8.0-alpha8",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
- {
10
- "name": "vaadin-date-picker-light",
11
- "description": "`<vaadin-date-picker-light>` is a customizable version of the `<vaadin-date-picker>` providing\nonly the scrollable month calendar view and leaving the input field definition to the user.\n\nTo create a custom input field, you need to add a child element which has a two-way\ndata-bindable property representing the input value. The property name is expected\nto be `bindValue` by default. See the example below for a simplest possible example\nusing an `<input>` element.\n\n```html\n<vaadin-date-picker-light attr-for-value=\"value\">\n <input class=\"input\">\n</vaadin-date-picker-light>\n```\n\n### Styling\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\nIn addition to `<vaadin-date-picker-light>` itself, the following\ninternal components are themable:\n\n- `<vaadin-date-picker-overlay>`\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n\nNote: the `theme` attribute value set on `<vaadin-date-picker-light>`\nis propagated to the internal themable components listed above.",
12
- "attributes": [
13
- {
14
- "name": "disabled",
15
- "description": "If true, the user cannot interact with this element.",
16
- "value": {
17
- "type": [
18
- "boolean",
19
- "null",
20
- "undefined"
21
- ]
22
- }
23
- },
24
- {
25
- "name": "autofocus",
26
- "description": "Specify that this control should have input focus when the page loads.",
27
- "value": {
28
- "type": [
29
- "boolean",
30
- "null",
31
- "undefined"
32
- ]
33
- }
34
- },
35
- {
36
- "name": "i18n",
37
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
38
- "value": {
39
- "type": [
40
- "Object"
41
- ]
42
- }
43
- },
44
- {
45
- "name": "value",
46
- "description": "Selected date.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
47
- "value": {
48
- "type": [
49
- "string"
50
- ]
51
- }
52
- },
53
- {
54
- "name": "invalid",
55
- "description": "Set to true when the field is invalid.",
56
- "value": {
57
- "type": [
58
- "boolean",
59
- "null",
60
- "undefined"
61
- ]
62
- }
63
- },
64
- {
65
- "name": "manual-validation",
66
- "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
67
- "value": {
68
- "type": [
69
- "boolean",
70
- "null",
71
- "undefined"
72
- ]
73
- }
74
- },
75
- {
76
- "name": "required",
77
- "description": "Specifies that the user must fill in a value.",
78
- "value": {
79
- "type": [
80
- "boolean",
81
- "null",
82
- "undefined"
83
- ]
84
- }
85
- },
86
- {
87
- "name": "overlay-class",
88
- "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
89
- "value": {
90
- "type": [
91
- "string",
92
- "null",
93
- "undefined"
94
- ]
95
- }
96
- },
97
- {
98
- "name": "initial-position",
99
- "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
100
- "value": {
101
- "type": [
102
- "string",
103
- "null",
104
- "undefined"
105
- ]
106
- }
107
- },
108
- {
109
- "name": "opened",
110
- "description": "Set true to open the date selector overlay.",
111
- "value": {
112
- "type": [
113
- "boolean",
114
- "null",
115
- "undefined"
116
- ]
117
- }
118
- },
119
- {
120
- "name": "auto-open-disabled",
121
- "description": "Set true to prevent the overlay from opening automatically.",
122
- "value": {
123
- "type": [
124
- "boolean",
125
- "null",
126
- "undefined"
127
- ]
128
- }
129
- },
130
- {
131
- "name": "show-week-numbers",
132
- "description": "Set true to display ISO-8601 week numbers in the calendar. Notice that\ndisplaying week numbers is only supported when `i18n.firstDayOfWeek`\nis 1 (Monday).",
133
- "value": {
134
- "type": [
135
- "boolean",
136
- "null",
137
- "undefined"
138
- ]
139
- }
140
- },
141
- {
142
- "name": "min",
143
- "description": "The earliest date that can be selected. All earlier dates will be disabled.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
144
- "value": {
145
- "type": [
146
- "string",
147
- "undefined"
148
- ]
149
- }
150
- },
151
- {
152
- "name": "max",
153
- "description": "The latest date that can be selected. All later dates will be disabled.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
154
- "value": {
155
- "type": [
156
- "string",
157
- "undefined"
158
- ]
159
- }
160
- },
161
- {
162
- "name": "attr-for-value",
163
- "description": "Name of the two-way data-bindable property representing the\nvalue of the custom input field.",
164
- "value": {
165
- "type": [
166
- "string"
167
- ]
168
- }
169
- },
170
- {
171
- "name": "theme",
172
- "description": "The theme variants to apply to the component.",
173
- "value": {
174
- "type": [
175
- "string",
176
- "null",
177
- "undefined"
178
- ]
179
- }
180
- }
181
- ],
182
- "js": {
183
- "properties": [
184
- {
185
- "name": "disabled",
186
- "description": "If true, the user cannot interact with this element.",
187
- "value": {
188
- "type": [
189
- "boolean",
190
- "null",
191
- "undefined"
192
- ]
193
- }
194
- },
195
- {
196
- "name": "autofocus",
197
- "description": "Specify that this control should have input focus when the page loads.",
198
- "value": {
199
- "type": [
200
- "boolean",
201
- "null",
202
- "undefined"
203
- ]
204
- }
205
- },
206
- {
207
- "name": "i18n",
208
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
209
- "value": {
210
- "type": [
211
- "DatePickerI18n"
212
- ]
213
- }
214
- },
215
- {
216
- "name": "value",
217
- "description": "Selected date.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
218
- "value": {
219
- "type": [
220
- "string"
221
- ]
222
- }
223
- },
224
- {
225
- "name": "invalid",
226
- "description": "Set to true when the field is invalid.",
227
- "value": {
228
- "type": [
229
- "boolean",
230
- "null",
231
- "undefined"
232
- ]
233
- }
234
- },
235
- {
236
- "name": "manualValidation",
237
- "description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
238
- "value": {
239
- "type": [
240
- "boolean",
241
- "null",
242
- "undefined"
243
- ]
244
- }
245
- },
246
- {
247
- "name": "required",
248
- "description": "Specifies that the user must fill in a value.",
249
- "value": {
250
- "type": [
251
- "boolean",
252
- "null",
253
- "undefined"
254
- ]
255
- }
256
- },
257
- {
258
- "name": "overlayClass",
259
- "description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
260
- "value": {
261
- "type": [
262
- "string",
263
- "null",
264
- "undefined"
265
- ]
266
- }
267
- },
268
- {
269
- "name": "initialPosition",
270
- "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
271
- "value": {
272
- "type": [
273
- "string",
274
- "null",
275
- "undefined"
276
- ]
277
- }
278
- },
279
- {
280
- "name": "opened",
281
- "description": "Set true to open the date selector overlay.",
282
- "value": {
283
- "type": [
284
- "boolean",
285
- "null",
286
- "undefined"
287
- ]
288
- }
289
- },
290
- {
291
- "name": "autoOpenDisabled",
292
- "description": "Set true to prevent the overlay from opening automatically.",
293
- "value": {
294
- "type": [
295
- "boolean",
296
- "null",
297
- "undefined"
298
- ]
299
- }
300
- },
301
- {
302
- "name": "showWeekNumbers",
303
- "description": "Set true to display ISO-8601 week numbers in the calendar. Notice that\ndisplaying week numbers is only supported when `i18n.firstDayOfWeek`\nis 1 (Monday).",
304
- "value": {
305
- "type": [
306
- "boolean",
307
- "null",
308
- "undefined"
309
- ]
310
- }
311
- },
312
- {
313
- "name": "min",
314
- "description": "The earliest date that can be selected. All earlier dates will be disabled.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
315
- "value": {
316
- "type": [
317
- "string",
318
- "undefined"
319
- ]
320
- }
321
- },
322
- {
323
- "name": "max",
324
- "description": "The latest date that can be selected. All later dates will be disabled.\n\nSupported date formats:\n- ISO 8601 `\"YYYY-MM-DD\"` (default)\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
325
- "value": {
326
- "type": [
327
- "string",
328
- "undefined"
329
- ]
330
- }
331
- },
332
- {
333
- "name": "isDateDisabled",
334
- "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.",
335
- "value": {
336
- "type": [
337
- "function DatePickerDate: boolean",
338
- "undefined"
339
- ]
340
- }
341
- },
342
- {
343
- "name": "attrForValue",
344
- "description": "Name of the two-way data-bindable property representing the\nvalue of the custom input field.",
345
- "value": {
346
- "type": [
347
- "string"
348
- ]
349
- }
350
- }
351
- ],
352
- "events": [
353
- {
354
- "name": "validated",
355
- "description": "Fired whenever the field is validated."
356
- },
357
- {
358
- "name": "change",
359
- "description": "Fired when the user commits a value change."
360
- },
361
- {
362
- "name": "opened-changed",
363
- "description": "Fired when `opened` property value changes."
364
- },
365
- {
366
- "name": "value-changed",
367
- "description": "Fired when `value` property value changes."
368
- },
369
- {
370
- "name": "invalid-changed",
371
- "description": "Fired when the `invalid` property changes."
372
- }
373
- ]
374
- }
375
- },
376
9
  {
377
10
  "name": "vaadin-date-picker",
378
- "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.8.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.8.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.8.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.8.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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
11
+ "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/25.0.0-alpha1/#/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\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/25.0.0-alpha1/#/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/25.0.0-alpha1/#/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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
379
12
  "attributes": [
380
13
  {
381
14
  "name": "disabled",