@vaadin/date-picker 25.2.7 → 25.3.0-alpha10

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.
@@ -17,10 +17,316 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/vaadin-date-metadata-controller.js",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "A reactive controller that resolves the metadata (currently the disabled state)\nfor the dates shown by the date-picker's `dateMetadataProvider`.\n\nThe provider is called for a range of months and may return an array\nsynchronously or a `Promise`, so results from a server (Flow) or a remote\navailability service can be awaited. Each returned entry is a `DatePickerDate`\nextended with metadata fields, e.g. `{ year, month, day, disabled: true }`.\n\n`ARCHITECTURE.md` in this package records the reasoning behind the request,\ncaching, notification and failure behavior.",
27
+ "name": "DateMetadataController",
28
+ "members": [
29
+ {
30
+ "kind": "method",
31
+ "name": "clearCache",
32
+ "description": "Clears the cache and invalidates any in-flight requests."
33
+ },
34
+ {
35
+ "kind": "method",
36
+ "name": "ensureRangeLoaded",
37
+ "parameters": [
38
+ {
39
+ "name": "startDate",
40
+ "type": {
41
+ "text": "Date | null | undefined"
42
+ }
43
+ },
44
+ {
45
+ "name": "endDate",
46
+ "type": {
47
+ "text": "Date | null | undefined"
48
+ }
49
+ }
50
+ ],
51
+ "description": "Ensures the provider has been consulted for the inclusive range between the\ngiven dates, rounded out to whole blocks of months. Months already loaded or in\nflight are skipped, and the ones left over are requested with a single call.\n\nEach call that finds a missing month issues its own request, so a caller that\nloads on scroll should debounce."
52
+ },
53
+ {
54
+ "kind": "method",
55
+ "name": "getMetadata",
56
+ "parameters": [
57
+ {
58
+ "name": "date",
59
+ "type": {
60
+ "text": "Date | null | undefined"
61
+ }
62
+ }
63
+ ],
64
+ "description": "The metadata resolved for the given date, or `undefined` when the date has\nno metadata or its month has not been resolved yet. Returns the entry the\nprovider supplied, which the caller must not modify.",
65
+ "return": {
66
+ "type": {
67
+ "text": "object | undefined"
68
+ }
69
+ }
70
+ },
71
+ {
72
+ "kind": "field",
73
+ "name": "host",
74
+ "description": "The controller host element.",
75
+ "type": {
76
+ "text": "ReactiveControllerHost & HTMLElement"
77
+ },
78
+ "default": "host"
79
+ },
80
+ {
81
+ "kind": "method",
82
+ "name": "hostConnected"
83
+ },
84
+ {
85
+ "kind": "method",
86
+ "name": "isDateDisabled",
87
+ "parameters": [
88
+ {
89
+ "name": "date",
90
+ "type": {
91
+ "text": "Date | null | undefined"
92
+ }
93
+ }
94
+ ],
95
+ "description": "Whether the given date is disabled by its metadata.",
96
+ "return": {
97
+ "type": {
98
+ "text": "boolean"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "kind": "method",
104
+ "name": "isLoading",
105
+ "description": "Whether any month range is currently being fetched.",
106
+ "return": {
107
+ "type": {
108
+ "text": "boolean"
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "kind": "method",
114
+ "name": "isMonthLoaded",
115
+ "parameters": [
116
+ {
117
+ "name": "date",
118
+ "type": {
119
+ "text": "Date | null | undefined"
120
+ }
121
+ }
122
+ ],
123
+ "description": "Whether the provider has answered for the month containing the given date.\nA month whose request failed is not loaded and will be requested again.",
124
+ "return": {
125
+ "type": {
126
+ "text": "boolean"
127
+ }
128
+ }
129
+ },
130
+ {
131
+ "kind": "method",
132
+ "name": "isMonthPending",
133
+ "parameters": [
134
+ {
135
+ "name": "date",
136
+ "type": {
137
+ "text": "Date | null | undefined"
138
+ }
139
+ }
140
+ ],
141
+ "description": "Whether the month containing the given date is currently being fetched. A month\nthat has not been asked about is not pending, so this reports the same state as\n`isLoading()` does for the whole cache.",
142
+ "return": {
143
+ "type": {
144
+ "text": "boolean"
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "kind": "field",
150
+ "name": "provider",
151
+ "type": {
152
+ "text": "Function | null"
153
+ },
154
+ "default": "null",
155
+ "description": "The provider function, or `null` when none is set."
156
+ },
157
+ {
158
+ "kind": "method",
159
+ "name": "setProvider",
160
+ "parameters": [
161
+ {
162
+ "name": "provider",
163
+ "type": {
164
+ "text": "Function | null | undefined"
165
+ }
166
+ }
167
+ ],
168
+ "description": "Sets the provider function and clears the cache. Passing the same provider again\nis a no-op, so callers should keep a stable reference."
169
+ },
170
+ {
171
+ "kind": "method",
172
+ "name": "subscribe",
173
+ "parameters": [
174
+ {
175
+ "name": "element",
176
+ "type": {
177
+ "text": "ReactiveElement"
178
+ }
179
+ }
180
+ ],
181
+ "description": "Registers an element to be re-rendered whenever the resolved metadata or the\nloading state changes. The element must render from its bindings, and must not be\nthe one whose own observer triggers a load. It stays registered for the\ncontroller's lifetime."
182
+ }
183
+ ]
184
+ }
185
+ ],
186
+ "exports": [
187
+ {
188
+ "kind": "js",
189
+ "name": "DateMetadataController",
190
+ "declaration": {
191
+ "name": "DateMetadataController",
192
+ "module": "src/vaadin-date-metadata-controller.js"
193
+ }
194
+ }
195
+ ]
196
+ },
20
197
  {
21
198
  "kind": "javascript-module",
22
199
  "path": "src/vaadin-date-picker-helper.js",
23
200
  "declarations": [
201
+ {
202
+ "kind": "function",
203
+ "name": "createDate",
204
+ "parameters": [
205
+ {
206
+ "name": "year",
207
+ "type": {
208
+ "text": "number"
209
+ }
210
+ },
211
+ {
212
+ "name": "month",
213
+ "description": "Zero-based month, may be out of range to shift the year",
214
+ "type": {
215
+ "text": "number"
216
+ }
217
+ },
218
+ {
219
+ "name": "day",
220
+ "description": "May be `0` to select the last day of the previous month",
221
+ "type": {
222
+ "text": "number"
223
+ }
224
+ }
225
+ ],
226
+ "description": "Create a date at midnight in local time. Unlike `new Date(year, month, day)`,\nthis supports years below 100, which the constructor maps into the 20th\ncentury. The month is assigned before the day so that the initial day of month\n(1) always exists in the target month.",
227
+ "return": {
228
+ "type": {
229
+ "text": "Date"
230
+ }
231
+ }
232
+ },
233
+ {
234
+ "kind": "function",
235
+ "name": "firstOfMonth",
236
+ "parameters": [
237
+ {
238
+ "name": "date",
239
+ "type": {
240
+ "text": "!Date"
241
+ }
242
+ }
243
+ ],
244
+ "description": "Get the first day of the month the given date is in.",
245
+ "return": {
246
+ "type": {
247
+ "text": "Date"
248
+ }
249
+ }
250
+ },
251
+ {
252
+ "kind": "function",
253
+ "name": "lastOfMonth",
254
+ "parameters": [
255
+ {
256
+ "name": "date",
257
+ "type": {
258
+ "text": "!Date"
259
+ }
260
+ }
261
+ ],
262
+ "description": "Get the last day of the month the given date is in.",
263
+ "return": {
264
+ "type": {
265
+ "text": "Date"
266
+ }
267
+ }
268
+ },
269
+ {
270
+ "kind": "function",
271
+ "name": "monthIndexOf",
272
+ "parameters": [
273
+ {
274
+ "name": "year",
275
+ "type": {
276
+ "text": "number"
277
+ }
278
+ },
279
+ {
280
+ "name": "month",
281
+ "description": "Zero-based month",
282
+ "type": {
283
+ "text": "number"
284
+ }
285
+ }
286
+ ],
287
+ "description": "Get the index of a month, counted from January of year 0. Reduces a month to a single\ninteger, so a lookup builds no key and two months are adjacent when their indexes are.",
288
+ "return": {
289
+ "type": {
290
+ "text": "number"
291
+ }
292
+ }
293
+ },
294
+ {
295
+ "kind": "function",
296
+ "name": "monthIndex",
297
+ "parameters": [
298
+ {
299
+ "name": "date",
300
+ "type": {
301
+ "text": "!Date"
302
+ }
303
+ }
304
+ ],
305
+ "description": "Get the index of the month the given date is in.",
306
+ "return": {
307
+ "type": {
308
+ "text": "number"
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "kind": "function",
314
+ "name": "monthDate",
315
+ "parameters": [
316
+ {
317
+ "name": "index",
318
+ "type": {
319
+ "text": "number"
320
+ }
321
+ }
322
+ ],
323
+ "description": "Get the first day of the month with the given index, inverting `monthIndexOf`. Counting from\nJanuary of year 0 also inverts negative indexes, since `createDate` normalizes a month outside\n0-11 into the year.",
324
+ "return": {
325
+ "type": {
326
+ "text": "Date"
327
+ }
328
+ }
329
+ },
24
330
  {
25
331
  "kind": "function",
26
332
  "name": "getISOWeekNumber",
@@ -166,6 +472,54 @@
166
472
  }
167
473
  }
168
474
  },
475
+ {
476
+ "kind": "function",
477
+ "name": "dateSelectable",
478
+ "parameters": [
479
+ {
480
+ "name": "date",
481
+ "description": "The date to check",
482
+ "type": {
483
+ "text": "!Date"
484
+ }
485
+ },
486
+ {
487
+ "name": "min",
488
+ "description": "Range start",
489
+ "type": {
490
+ "text": "Date | null"
491
+ }
492
+ },
493
+ {
494
+ "name": "max",
495
+ "description": "Range end",
496
+ "type": {
497
+ "text": "Date | null"
498
+ }
499
+ },
500
+ {
501
+ "name": "isDateDisabled",
502
+ "description": "Callback to check if the date is disabled",
503
+ "type": {
504
+ "text": "function(!DatePickerDate): boolean"
505
+ }
506
+ },
507
+ {
508
+ "name": "controller",
509
+ "description": "The date metadata controller",
510
+ "optional": true,
511
+ "type": {
512
+ "text": "DateMetadataController | null"
513
+ }
514
+ }
515
+ ],
516
+ "description": "Check if the given date can be selected: allowed by `dateAllowed` and not reported as disabled\nby the date metadata controller. This is narrower than `dateAllowed`, which decides what can be\nfocused: a disabled date is still focusable, it just cannot be selected.",
517
+ "return": {
518
+ "type": {
519
+ "text": "boolean"
520
+ }
521
+ }
522
+ },
169
523
  {
170
524
  "kind": "function",
171
525
  "name": "getClosestDate",
@@ -328,6 +682,54 @@
328
682
  }
329
683
  ],
330
684
  "exports": [
685
+ {
686
+ "kind": "js",
687
+ "name": "createDate",
688
+ "declaration": {
689
+ "name": "createDate",
690
+ "module": "src/vaadin-date-picker-helper.js"
691
+ }
692
+ },
693
+ {
694
+ "kind": "js",
695
+ "name": "firstOfMonth",
696
+ "declaration": {
697
+ "name": "firstOfMonth",
698
+ "module": "src/vaadin-date-picker-helper.js"
699
+ }
700
+ },
701
+ {
702
+ "kind": "js",
703
+ "name": "lastOfMonth",
704
+ "declaration": {
705
+ "name": "lastOfMonth",
706
+ "module": "src/vaadin-date-picker-helper.js"
707
+ }
708
+ },
709
+ {
710
+ "kind": "js",
711
+ "name": "monthIndexOf",
712
+ "declaration": {
713
+ "name": "monthIndexOf",
714
+ "module": "src/vaadin-date-picker-helper.js"
715
+ }
716
+ },
717
+ {
718
+ "kind": "js",
719
+ "name": "monthIndex",
720
+ "declaration": {
721
+ "name": "monthIndex",
722
+ "module": "src/vaadin-date-picker-helper.js"
723
+ }
724
+ },
725
+ {
726
+ "kind": "js",
727
+ "name": "monthDate",
728
+ "declaration": {
729
+ "name": "monthDate",
730
+ "module": "src/vaadin-date-picker-helper.js"
731
+ }
732
+ },
331
733
  {
332
734
  "kind": "js",
333
735
  "name": "getISOWeekNumber",
@@ -376,6 +778,14 @@
376
778
  "module": "src/vaadin-date-picker-helper.js"
377
779
  }
378
780
  },
781
+ {
782
+ "kind": "js",
783
+ "name": "dateSelectable",
784
+ "declaration": {
785
+ "name": "dateSelectable",
786
+ "module": "src/vaadin-date-picker-helper.js"
787
+ }
788
+ },
379
789
  {
380
790
  "kind": "js",
381
791
  "name": "getClosestDate",
@@ -494,11 +904,26 @@
494
904
  "package": "@vaadin/field-base/src/input-mixin.js"
495
905
  }
496
906
  },
907
+ {
908
+ "kind": "method",
909
+ "name": "clearCache",
910
+ "description": "Clears the `dateMetadataProvider` cache and reloads the date metadata."
911
+ },
497
912
  {
498
913
  "kind": "method",
499
914
  "name": "close",
500
915
  "description": "Closes the dropdown."
501
916
  },
917
+ {
918
+ "kind": "field",
919
+ "name": "dateMetadataProvider",
920
+ "privacy": "public",
921
+ "type": {
922
+ "text": "DatePickerDateMetadataProvider | null | undefined"
923
+ },
924
+ "description": "A batch function that fetches metadata for a range of dates the calendar is about to\nrender. It receives a `DatePickerDateRange` and returns, or resolves with, an array of\n`DatePickerDateMetadata` objects — a `DatePickerDate` extended with metadata such as\n`disabled`, e.g. `{ year, month, day, disabled: true }` — for the dates that have metadata\nwithin that range. Dates it does not mention have no metadata. `month` is 0-based: 0 is\nJanuary and 11 is December.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of the\nrange is decided by the calendar and may span several months, and may include months it\nalready has metadata for, whose entries are then ignored.\n\nIt may return a `Promise`, so the answer can come from a server. Until it resolves, the\naffected dates render with the `loading` part but stay selectable, and a loading spinner\nis shown. Nothing is disabled before the provider has actually reported it, so a slow\nprovider does not make the calendar unusable. If it throws or rejects, the error is logged\nand the affected months are requested again the next time the user navigates.\n\n`disabled` from the metadata is combined with `min`, `max` and `isDateDisabled`: a date is\ndisabled if it is out of the min/max range, or `isDateDisabled` returns `true`, or its\nmetadata marks it disabled. That decides what the calendar renders as disabled, what can be\nselected, and whether the field is valid.\n\nThe date focused when the overlay opens is not moved if the provider reports it disabled.\nUse `initialPosition` to open on a date that can be selected.\n\nA value is checked against the provider even if the overlay is never opened, which loads the\nmonth holding it. Until that month answers the value is valid, and it is re-validated once\nthe answer arrives, so `checkValidity()` can report a value as valid and then invalid.\n\n`part` from the metadata adds part names to the date, so a theme can style specific dates\nwith `::part()` — e.g. `{ year, month, day, part: 'busy' }`. Give a single name or several\nseparated by spaces. Do not use built-in names like `disabled` and `selected`.\n\nKeep a stable reference to the function. Assigning a new function clears the cache and\nre-fetches every visible range. To re-fetch while keeping the same function, because the\ndata behind it changed, call `clearCache()`.",
925
+ "attribute": "date-metadata-provider"
926
+ },
502
927
  {
503
928
  "kind": "field",
504
929
  "name": "disabled",
@@ -520,7 +945,7 @@
520
945
  "type": {
521
946
  "text": "Object"
522
947
  },
523
- "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```js\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```",
948
+ "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```js\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 // Accessible name of the overlay content, announced by screen readers\n // when the overlay opens.\n dialogAccessibleName: 'Calendar',\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```",
524
949
  "attribute": "i18n",
525
950
  "inheritedFrom": {
526
951
  "name": "I18nMixin",
@@ -712,6 +1137,14 @@
712
1137
  "package": "@vaadin/a11y-base/src/delegate-focus-mixin.js"
713
1138
  }
714
1139
  },
1140
+ {
1141
+ "name": "date-metadata-provider",
1142
+ "type": {
1143
+ "text": "DatePickerDateMetadataProvider | null | undefined"
1144
+ },
1145
+ "description": "A batch function that fetches metadata for a range of dates the calendar is about to\nrender. It receives a `DatePickerDateRange` and returns, or resolves with, an array of\n`DatePickerDateMetadata` objects — a `DatePickerDate` extended with metadata such as\n`disabled`, e.g. `{ year, month, day, disabled: true }` — for the dates that have metadata\nwithin that range. Dates it does not mention have no metadata. `month` is 0-based: 0 is\nJanuary and 11 is December.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of the\nrange is decided by the calendar and may span several months, and may include months it\nalready has metadata for, whose entries are then ignored.\n\nIt may return a `Promise`, so the answer can come from a server. Until it resolves, the\naffected dates render with the `loading` part but stay selectable, and a loading spinner\nis shown. Nothing is disabled before the provider has actually reported it, so a slow\nprovider does not make the calendar unusable. If it throws or rejects, the error is logged\nand the affected months are requested again the next time the user navigates.\n\n`disabled` from the metadata is combined with `min`, `max` and `isDateDisabled`: a date is\ndisabled if it is out of the min/max range, or `isDateDisabled` returns `true`, or its\nmetadata marks it disabled. That decides what the calendar renders as disabled, what can be\nselected, and whether the field is valid.\n\nThe date focused when the overlay opens is not moved if the provider reports it disabled.\nUse `initialPosition` to open on a date that can be selected.\n\nA value is checked against the provider even if the overlay is never opened, which loads the\nmonth holding it. Until that month answers the value is valid, and it is re-validated once\nthe answer arrives, so `checkValidity()` can report a value as valid and then invalid.\n\n`part` from the metadata adds part names to the date, so a theme can style specific dates\nwith `::part()` — e.g. `{ year, month, day, part: 'busy' }`. Give a single name or several\nseparated by spaces. Do not use built-in names like `disabled` and `selected`.\n\nKeep a stable reference to the function. Assigning a new function clears the cache and\nre-fetches every visible range. To re-fetch while keeping the same function, because the\ndata behind it changed, call `clearCache()`.",
1146
+ "fieldName": "dateMetadataProvider"
1147
+ },
715
1148
  {
716
1149
  "name": "disabled",
717
1150
  "type": {
@@ -895,6 +1328,11 @@
895
1328
  },
896
1329
  "attribute": "calendars"
897
1330
  },
1331
+ {
1332
+ "kind": "method",
1333
+ "name": "cancelLoadVisibleDateMetadata",
1334
+ "description": "Drops a date metadata load that navigating has scheduled but that has not run yet."
1335
+ },
898
1336
  {
899
1337
  "kind": "field",
900
1338
  "name": "enteredDate",
@@ -982,6 +1420,11 @@
982
1420
  "description": "Input label",
983
1421
  "attribute": "label"
984
1422
  },
1423
+ {
1424
+ "kind": "method",
1425
+ "name": "loadVisibleDateMetadata",
1426
+ "description": "Requests the date metadata for the months currently rendered. Months already loaded or in flight\nare skipped."
1427
+ },
985
1428
  {
986
1429
  "kind": "field",
987
1430
  "name": "maxDate",
@@ -1061,6 +1504,11 @@
1061
1504
  },
1062
1505
  "attribute": "show-week-numbers"
1063
1506
  },
1507
+ {
1508
+ "kind": "method",
1509
+ "name": "updateTodayButton",
1510
+ "description": "Applies the today button's label and whether today can be selected."
1511
+ },
1064
1512
  {
1065
1513
  "kind": "field",
1066
1514
  "name": "years",
@@ -1174,6 +1622,20 @@
1174
1622
  "description": "",
1175
1623
  "name": "DatePickerOverlayMixin",
1176
1624
  "members": [
1625
+ {
1626
+ "kind": "field",
1627
+ "name": "autofocus",
1628
+ "privacy": "public",
1629
+ "type": {
1630
+ "text": "boolean"
1631
+ },
1632
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1633
+ "attribute": "autofocus",
1634
+ "inheritedFrom": {
1635
+ "name": "OverlayFocusMixin",
1636
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
1637
+ }
1638
+ },
1177
1639
  {
1178
1640
  "kind": "method",
1179
1641
  "name": "bringToFront",
@@ -1206,7 +1668,7 @@
1206
1668
  "type": {
1207
1669
  "text": "boolean"
1208
1670
  },
1209
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
1671
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1210
1672
  "attribute": "focus-trap",
1211
1673
  "inheritedFrom": {
1212
1674
  "name": "OverlayFocusMixin",
@@ -1473,12 +1935,24 @@
1473
1935
  }
1474
1936
  ],
1475
1937
  "attributes": [
1938
+ {
1939
+ "name": "autofocus",
1940
+ "type": {
1941
+ "text": "boolean"
1942
+ },
1943
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1944
+ "fieldName": "autofocus",
1945
+ "inheritedFrom": {
1946
+ "name": "OverlayFocusMixin",
1947
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
1948
+ }
1949
+ },
1476
1950
  {
1477
1951
  "name": "focus-trap",
1478
1952
  "type": {
1479
1953
  "text": "boolean"
1480
1954
  },
1481
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
1955
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1482
1956
  "fieldName": "focusTrap",
1483
1957
  "inheritedFrom": {
1484
1958
  "name": "OverlayFocusMixin",
@@ -1683,9 +2157,23 @@
1683
2157
  "declarations": [
1684
2158
  {
1685
2159
  "kind": "class",
1686
- "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\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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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\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",
2160
+ "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\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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar with slotted buttons\n`loader` | Loading spinner shown while the date metadata provider is resolving\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`loading` | Set while the date metadata provider is resolving\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`loading` | Date element in a month whose metadata is currently being fetched\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\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",
1687
2161
  "name": "DatePicker",
1688
2162
  "members": [
2163
+ {
2164
+ "kind": "field",
2165
+ "name": "accessibleDescriptionRef",
2166
+ "privacy": "public",
2167
+ "type": {
2168
+ "text": "string"
2169
+ },
2170
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
2171
+ "attribute": "accessible-description-ref",
2172
+ "inheritedFrom": {
2173
+ "name": "FieldMixin",
2174
+ "package": "@vaadin/field-base/src/field-mixin.js"
2175
+ }
2176
+ },
1689
2177
  {
1690
2178
  "kind": "field",
1691
2179
  "name": "accessibleName",
@@ -1693,7 +2181,7 @@
1693
2181
  "type": {
1694
2182
  "text": "string"
1695
2183
  },
1696
- "description": "String used to label the component to screen reader users.",
2184
+ "description": "String used to label the component for screen reader users.",
1697
2185
  "attribute": "accessible-name",
1698
2186
  "inheritedFrom": {
1699
2187
  "name": "FieldMixin",
@@ -1707,7 +2195,7 @@
1707
2195
  "type": {
1708
2196
  "text": "string"
1709
2197
  },
1710
- "description": "Id of the element used as label of the component to screen reader users.",
2198
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
1711
2199
  "attribute": "accessible-name-ref",
1712
2200
  "inheritedFrom": {
1713
2201
  "name": "FieldMixin",
@@ -1807,6 +2295,15 @@
1807
2295
  "package": "@vaadin/field-base/src/clear-button-mixin.js"
1808
2296
  }
1809
2297
  },
2298
+ {
2299
+ "kind": "method",
2300
+ "name": "clearCache",
2301
+ "description": "Clears the `dateMetadataProvider` cache and reloads the date metadata.",
2302
+ "inheritedFrom": {
2303
+ "name": "DatePickerMixin",
2304
+ "module": "src/vaadin-date-picker-mixin.js"
2305
+ }
2306
+ },
1810
2307
  {
1811
2308
  "kind": "method",
1812
2309
  "name": "close",
@@ -1816,6 +2313,20 @@
1816
2313
  "module": "src/vaadin-date-picker-mixin.js"
1817
2314
  }
1818
2315
  },
2316
+ {
2317
+ "kind": "field",
2318
+ "name": "dateMetadataProvider",
2319
+ "privacy": "public",
2320
+ "type": {
2321
+ "text": "DatePickerDateMetadataProvider | null | undefined"
2322
+ },
2323
+ "description": "A batch function that fetches metadata for a range of dates the calendar is about to\nrender. It receives a `DatePickerDateRange` and returns, or resolves with, an array of\n`DatePickerDateMetadata` objects — a `DatePickerDate` extended with metadata such as\n`disabled`, e.g. `{ year, month, day, disabled: true }` — for the dates that have metadata\nwithin that range. Dates it does not mention have no metadata. `month` is 0-based: 0 is\nJanuary and 11 is December.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of the\nrange is decided by the calendar and may span several months, and may include months it\nalready has metadata for, whose entries are then ignored.\n\nIt may return a `Promise`, so the answer can come from a server. Until it resolves, the\naffected dates render with the `loading` part but stay selectable, and a loading spinner\nis shown. Nothing is disabled before the provider has actually reported it, so a slow\nprovider does not make the calendar unusable. If it throws or rejects, the error is logged\nand the affected months are requested again the next time the user navigates.\n\n`disabled` from the metadata is combined with `min`, `max` and `isDateDisabled`: a date is\ndisabled if it is out of the min/max range, or `isDateDisabled` returns `true`, or its\nmetadata marks it disabled. That decides what the calendar renders as disabled, what can be\nselected, and whether the field is valid.\n\nThe date focused when the overlay opens is not moved if the provider reports it disabled.\nUse `initialPosition` to open on a date that can be selected.\n\nA value is checked against the provider even if the overlay is never opened, which loads the\nmonth holding it. Until that month answers the value is valid, and it is re-validated once\nthe answer arrives, so `checkValidity()` can report a value as valid and then invalid.\n\n`part` from the metadata adds part names to the date, so a theme can style specific dates\nwith `::part()` — e.g. `{ year, month, day, part: 'busy' }`. Give a single name or several\nseparated by spaces. Do not use built-in names like `disabled` and `selected`.\n\nKeep a stable reference to the function. Assigning a new function clears the cache and\nre-fetches every visible range. To re-fetch while keeping the same function, because the\ndata behind it changed, call `clearCache()`.",
2324
+ "attribute": "date-metadata-provider",
2325
+ "inheritedFrom": {
2326
+ "name": "DatePickerMixin",
2327
+ "module": "src/vaadin-date-picker-mixin.js"
2328
+ }
2329
+ },
1819
2330
  {
1820
2331
  "kind": "field",
1821
2332
  "name": "disabled",
@@ -1865,7 +2376,7 @@
1865
2376
  "type": {
1866
2377
  "text": "Object"
1867
2378
  },
1868
- "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```js\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```",
2379
+ "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```js\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 // Accessible name of the overlay content, announced by screen readers\n // when the overlay opens.\n dialogAccessibleName: 'Calendar',\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```",
1869
2380
  "attribute": "i18n",
1870
2381
  "inheritedFrom": {
1871
2382
  "name": "I18nMixin",
@@ -2159,12 +2670,24 @@
2159
2670
  }
2160
2671
  ],
2161
2672
  "attributes": [
2673
+ {
2674
+ "name": "accessible-description-ref",
2675
+ "type": {
2676
+ "text": "string"
2677
+ },
2678
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
2679
+ "fieldName": "accessibleDescriptionRef",
2680
+ "inheritedFrom": {
2681
+ "name": "FieldMixin",
2682
+ "package": "@vaadin/field-base/src/field-mixin.js"
2683
+ }
2684
+ },
2162
2685
  {
2163
2686
  "name": "accessible-name",
2164
2687
  "type": {
2165
2688
  "text": "string"
2166
2689
  },
2167
- "description": "String used to label the component to screen reader users.",
2690
+ "description": "String used to label the component for screen reader users.",
2168
2691
  "fieldName": "accessibleName",
2169
2692
  "inheritedFrom": {
2170
2693
  "name": "FieldMixin",
@@ -2176,7 +2699,7 @@
2176
2699
  "type": {
2177
2700
  "text": "string"
2178
2701
  },
2179
- "description": "Id of the element used as label of the component to screen reader users.",
2702
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
2180
2703
  "fieldName": "accessibleNameRef",
2181
2704
  "inheritedFrom": {
2182
2705
  "name": "FieldMixin",
@@ -2243,6 +2766,18 @@
2243
2766
  "package": "@vaadin/field-base/src/clear-button-mixin.js"
2244
2767
  }
2245
2768
  },
2769
+ {
2770
+ "name": "date-metadata-provider",
2771
+ "type": {
2772
+ "text": "DatePickerDateMetadataProvider | null | undefined"
2773
+ },
2774
+ "description": "A batch function that fetches metadata for a range of dates the calendar is about to\nrender. It receives a `DatePickerDateRange` and returns, or resolves with, an array of\n`DatePickerDateMetadata` objects — a `DatePickerDate` extended with metadata such as\n`disabled`, e.g. `{ year, month, day, disabled: true }` — for the dates that have metadata\nwithin that range. Dates it does not mention have no metadata. `month` is 0-based: 0 is\nJanuary and 11 is December.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of the\nrange is decided by the calendar and may span several months, and may include months it\nalready has metadata for, whose entries are then ignored.\n\nIt may return a `Promise`, so the answer can come from a server. Until it resolves, the\naffected dates render with the `loading` part but stay selectable, and a loading spinner\nis shown. Nothing is disabled before the provider has actually reported it, so a slow\nprovider does not make the calendar unusable. If it throws or rejects, the error is logged\nand the affected months are requested again the next time the user navigates.\n\n`disabled` from the metadata is combined with `min`, `max` and `isDateDisabled`: a date is\ndisabled if it is out of the min/max range, or `isDateDisabled` returns `true`, or its\nmetadata marks it disabled. That decides what the calendar renders as disabled, what can be\nselected, and whether the field is valid.\n\nThe date focused when the overlay opens is not moved if the provider reports it disabled.\nUse `initialPosition` to open on a date that can be selected.\n\nA value is checked against the provider even if the overlay is never opened, which loads the\nmonth holding it. Until that month answers the value is valid, and it is re-validated once\nthe answer arrives, so `checkValidity()` can report a value as valid and then invalid.\n\n`part` from the metadata adds part names to the date, so a theme can style specific dates\nwith `::part()` — e.g. `{ year, month, day, part: 'busy' }`. Give a single name or several\nseparated by spaces. Do not use built-in names like `disabled` and `selected`.\n\nKeep a stable reference to the function. Assigning a new function clears the cache and\nre-fetches every visible range. To re-fetch while keeping the same function, because the\ndata behind it changed, call `clearCache()`.",
2775
+ "fieldName": "dateMetadataProvider",
2776
+ "inheritedFrom": {
2777
+ "name": "DatePickerMixin",
2778
+ "module": "src/vaadin-date-picker-mixin.js"
2779
+ }
2780
+ },
2246
2781
  {
2247
2782
  "name": "disabled",
2248
2783
  "type": {
@@ -2447,6 +2982,13 @@
2447
2982
  "module": "src/vaadin-date-picker-mixin.js"
2448
2983
  }
2449
2984
  },
2985
+ {
2986
+ "type": {
2987
+ "text": "string"
2988
+ },
2989
+ "description": "The theme variants to apply to the component.",
2990
+ "name": "theme"
2991
+ },
2450
2992
  {
2451
2993
  "name": "title",
2452
2994
  "type": {