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

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-alpha8",
3
+ "version": "24.0.0-alpha9",
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-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"
39
+ "@vaadin/button": "24.0.0-alpha9",
40
+ "@vaadin/component-base": "24.0.0-alpha9",
41
+ "@vaadin/field-base": "24.0.0-alpha9",
42
+ "@vaadin/input-container": "24.0.0-alpha9",
43
+ "@vaadin/overlay": "24.0.0-alpha9",
44
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha9",
45
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha9",
46
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha9"
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": "476752249bb12295c500980d98a3256ad3b22b73"
57
+ "gitHead": "cc3f747164041566b300bde4b105d2475649e93f"
58
58
  }
@@ -8,6 +8,7 @@ import type { DelegateFocusMixinClass } from '@vaadin/component-base/src/delegat
8
8
  import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
9
9
  import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
10
10
  import type { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
11
+ import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
11
12
  import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
13
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
13
14
 
@@ -93,6 +94,7 @@ export declare function DatePickerMixin<T extends Constructor<HTMLElement>>(
93
94
  Constructor<InputConstraintsMixinClass> &
94
95
  Constructor<InputMixinClass> &
95
96
  Constructor<KeyboardMixinClass> &
97
+ Constructor<OverlayClassMixinClass> &
96
98
  T;
97
99
 
98
100
  export declare class DatePickerMixinClass {
@@ -8,6 +8,7 @@ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js'
8
8
  import { DelegateFocusMixin } from '@vaadin/component-base/src/delegate-focus-mixin.js';
9
9
  import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
10
10
  import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
11
+ import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
11
12
  import { InputConstraintsMixin } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
13
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
13
14
  import {
@@ -21,11 +22,16 @@ import {
21
22
 
22
23
  /**
23
24
  * @polymerMixin
25
+ * @mixes ControllerMixin
26
+ * @mixes DelegateFocusMixin
27
+ * @mixes InputConstraintsMixin
28
+ * @mixes KeyboardMixin
29
+ * @mixes OverlayClassMixin
24
30
  * @param {function(new:HTMLElement)} subclass
25
31
  */
26
32
  export const DatePickerMixin = (subclass) =>
27
- class VaadinDatePickerMixin extends ControllerMixin(
28
- DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass))),
33
+ class DatePickerMixinClass extends OverlayClassMixin(
34
+ ControllerMixin(DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass)))),
29
35
  ) {
30
36
  static get properties() {
31
37
  return {
@@ -424,7 +430,10 @@ export const DatePickerMixin = (subclass) =>
424
430
 
425
431
  this.addController(new VirtualKeyboardController(this));
426
432
 
427
- this.$.overlay.renderer = this._boundOverlayRenderer;
433
+ const overlay = this.$.overlay;
434
+ this._overlayElement = overlay;
435
+
436
+ overlay.renderer = this._boundOverlayRenderer;
428
437
 
429
438
  this.addEventListener('mousedown', () => this.__bringToFront());
430
439
  this.addEventListener('touchstart', () => this.__bringToFront());
@@ -8,6 +8,7 @@ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
8
  import { timeOut } from '@vaadin/component-base/src/async.js';
9
9
  import { isFirefox } from '@vaadin/component-base/src/browser-utils.js';
10
10
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
11
+ import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
11
12
 
12
13
  /**
13
14
  * @extends HTMLElement
@@ -329,8 +330,7 @@ export class InfiniteScroller extends PolymerElement {
329
330
  itemWrapper.style.height = `${this.itemHeight}px`;
330
331
  itemWrapper.instance = {};
331
332
 
332
- const contentId = (InfiniteScroller._contentIndex = InfiniteScroller._contentIndex + 1 || 0);
333
- const slotName = `vaadin-infinite-scroller-item-content-${contentId}`;
333
+ const slotName = `vaadin-infinite-scroller-item-content-${generateUniqueId()}`;
334
334
 
335
335
  const slot = document.createElement('slot');
336
336
  slot.setAttribute('name', slotName);
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-alpha8",
4
+ "version": "24.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -10,6 +10,28 @@
10
10
  "name": "vaadin-date-picker-light",
11
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/custom-theme/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
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
+ },
13
35
  {
14
36
  "name": "value",
15
37
  "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\"`",
@@ -19,6 +41,39 @@
19
41
  ]
20
42
  }
21
43
  },
44
+ {
45
+ "name": "invalid",
46
+ "description": "Set to true when the field is invalid.",
47
+ "value": {
48
+ "type": [
49
+ "boolean",
50
+ "null",
51
+ "undefined"
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "name": "required",
57
+ "description": "Specifies that the user must fill in a value.",
58
+ "value": {
59
+ "type": [
60
+ "boolean",
61
+ "null",
62
+ "undefined"
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "name": "overlay-class",
68
+ "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.",
69
+ "value": {
70
+ "type": [
71
+ "string",
72
+ "null",
73
+ "undefined"
74
+ ]
75
+ }
76
+ },
22
77
  {
23
78
  "name": "initial-position",
24
79
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
@@ -106,6 +161,28 @@
106
161
  ],
107
162
  "js": {
108
163
  "properties": [
164
+ {
165
+ "name": "disabled",
166
+ "description": "If true, the user cannot interact with this element.",
167
+ "value": {
168
+ "type": [
169
+ "boolean",
170
+ "null",
171
+ "undefined"
172
+ ]
173
+ }
174
+ },
175
+ {
176
+ "name": "autofocus",
177
+ "description": "Specify that this control should have input focus when the page loads.",
178
+ "value": {
179
+ "type": [
180
+ "boolean",
181
+ "null",
182
+ "undefined"
183
+ ]
184
+ }
185
+ },
109
186
  {
110
187
  "name": "value",
111
188
  "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\"`",
@@ -115,6 +192,39 @@
115
192
  ]
116
193
  }
117
194
  },
195
+ {
196
+ "name": "invalid",
197
+ "description": "Set to true when the field is invalid.",
198
+ "value": {
199
+ "type": [
200
+ "boolean",
201
+ "null",
202
+ "undefined"
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "name": "required",
208
+ "description": "Specifies that the user must fill in a value.",
209
+ "value": {
210
+ "type": [
211
+ "boolean",
212
+ "null",
213
+ "undefined"
214
+ ]
215
+ }
216
+ },
217
+ {
218
+ "name": "overlayClass",
219
+ "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.",
220
+ "value": {
221
+ "type": [
222
+ "string",
223
+ "null",
224
+ "undefined"
225
+ ]
226
+ }
227
+ },
118
228
  {
119
229
  "name": "initialPosition",
120
230
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
@@ -199,6 +309,10 @@
199
309
  }
200
310
  ],
201
311
  "events": [
312
+ {
313
+ "name": "validated",
314
+ "description": "Fired whenever the field is validated."
315
+ },
202
316
  {
203
317
  "name": "change",
204
318
  "description": "Fired when the user commits a value change."
@@ -210,13 +324,17 @@
210
324
  {
211
325
  "name": "value-changed",
212
326
  "description": "Fired when `value` property value changes."
327
+ },
328
+ {
329
+ "name": "invalid-changed",
330
+ "description": "Fired when the `invalid` property changes."
213
331
  }
214
332
  ]
215
333
  }
216
334
  },
217
335
  {
218
336
  "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-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.",
337
+ "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-alpha9/#/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-alpha9/#/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-alpha9/#/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-alpha9/#/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
338
  "attributes": [
221
339
  {
222
340
  "name": "disabled",
@@ -381,6 +499,17 @@
381
499
  ]
382
500
  }
383
501
  },
502
+ {
503
+ "name": "overlay-class",
504
+ "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.",
505
+ "value": {
506
+ "type": [
507
+ "string",
508
+ "null",
509
+ "undefined"
510
+ ]
511
+ }
512
+ },
384
513
  {
385
514
  "name": "initial-position",
386
515
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
@@ -622,6 +751,17 @@
622
751
  ]
623
752
  }
624
753
  },
754
+ {
755
+ "name": "overlayClass",
756
+ "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.",
757
+ "value": {
758
+ "type": [
759
+ "string",
760
+ "null",
761
+ "undefined"
762
+ ]
763
+ }
764
+ },
625
765
  {
626
766
  "name": "initialPosition",
627
767
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
@@ -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-alpha8",
4
+ "version": "24.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -19,6 +19,34 @@
19
19
  "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/custom-theme/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.",
20
20
  "extension": true,
21
21
  "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?autofocus",
31
+ "description": "Specify that this control should have input focus when the page loads.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": "?invalid",
38
+ "description": "Set to true when the field is invalid.",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": "?required",
45
+ "description": "Specifies that the user must fill in a value.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
22
50
  {
23
51
  "name": "?opened",
24
52
  "description": "Set true to open the date selector overlay.",
@@ -47,6 +75,13 @@
47
75
  "kind": "expression"
48
76
  }
49
77
  },
78
+ {
79
+ "name": ".overlayClass",
80
+ "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.",
81
+ "value": {
82
+ "kind": "expression"
83
+ }
84
+ },
50
85
  {
51
86
  "name": ".initialPosition",
52
87
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",
@@ -82,6 +117,13 @@
82
117
  "kind": "expression"
83
118
  }
84
119
  },
120
+ {
121
+ "name": "@validated",
122
+ "description": "Fired whenever the field is validated.",
123
+ "value": {
124
+ "kind": "expression"
125
+ }
126
+ },
85
127
  {
86
128
  "name": "@change",
87
129
  "description": "Fired when the user commits a value change.",
@@ -102,12 +144,19 @@
102
144
  "value": {
103
145
  "kind": "expression"
104
146
  }
147
+ },
148
+ {
149
+ "name": "@invalid-changed",
150
+ "description": "Fired when the `invalid` property changes.",
151
+ "value": {
152
+ "kind": "expression"
153
+ }
105
154
  }
106
155
  ]
107
156
  },
108
157
  {
109
158
  "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-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.",
159
+ "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-alpha9/#/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-alpha9/#/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-alpha9/#/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-alpha9/#/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
160
  "extension": true,
112
161
  "attributes": [
113
162
  {
@@ -236,6 +285,13 @@
236
285
  "kind": "expression"
237
286
  }
238
287
  },
288
+ {
289
+ "name": ".overlayClass",
290
+ "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.",
291
+ "value": {
292
+ "kind": "expression"
293
+ }
294
+ },
239
295
  {
240
296
  "name": ".initialPosition",
241
297
  "description": "Date which should be visible when there is no value selected.\n\nThe same date formats as for the `value` property are supported.",