@vaadin/date-picker 23.2.0-alpha6 → 23.2.0-beta3

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": "23.2.0-alpha6",
3
+ "version": "23.2.0-beta3",
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": "23.2.0-alpha6",
40
- "@vaadin/component-base": "23.2.0-alpha6",
41
- "@vaadin/field-base": "23.2.0-alpha6",
42
- "@vaadin/input-container": "23.2.0-alpha6",
43
- "@vaadin/vaadin-lumo-styles": "23.2.0-alpha6",
44
- "@vaadin/vaadin-material-styles": "23.2.0-alpha6",
45
- "@vaadin/vaadin-overlay": "23.2.0-alpha6",
46
- "@vaadin/vaadin-themable-mixin": "23.2.0-alpha6"
39
+ "@vaadin/button": "23.2.0-beta3",
40
+ "@vaadin/component-base": "23.2.0-beta3",
41
+ "@vaadin/field-base": "23.2.0-beta3",
42
+ "@vaadin/input-container": "23.2.0-beta3",
43
+ "@vaadin/vaadin-lumo-styles": "23.2.0-beta3",
44
+ "@vaadin/vaadin-material-styles": "23.2.0-beta3",
45
+ "@vaadin/vaadin-overlay": "23.2.0-beta3",
46
+ "@vaadin/vaadin-themable-mixin": "23.2.0-beta3"
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": "61f1fb56953434e97d34a8819640064301dd3d8a"
57
+ "gitHead": "3389e7d2dd4c94c6354817d4dc8c8d2db48c7137"
58
58
  }
@@ -74,7 +74,7 @@ class DatePickerLight extends ThemableMixin(DatePickerMixin(ValidateMixin(Polyme
74
74
  fullscreen$="[[_fullscreen]]"
75
75
  opened="{{opened}}"
76
76
  on-vaadin-overlay-open="_onOverlayOpened"
77
- on-vaadin-overlay-close="_onOverlayClosed"
77
+ on-vaadin-overlay-closing="_onOverlayClosed"
78
78
  restore-focus-on-close
79
79
  restore-focus-node="[[inputElement]]"
80
80
  theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
@@ -8,6 +8,7 @@ import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mix
8
8
  import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
9
9
  import type { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
10
10
  import type { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
11
+ import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
11
12
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
12
13
 
13
14
  export interface DatePickerDate {
@@ -37,6 +38,7 @@ export declare function DatePickerMixin<T extends Constructor<HTMLElement>>(
37
38
  Constructor<DelegateFocusMixinClass> &
38
39
  Constructor<DisabledMixinClass> &
39
40
  Constructor<FocusMixinClass> &
41
+ Constructor<InputConstraintsMixinClass> &
40
42
  Constructor<InputMixinClass> &
41
43
  Constructor<KeyboardMixinClass> &
42
44
  T;
@@ -8,7 +8,7 @@ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js'
8
8
  import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
9
9
  import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
10
10
  import { DelegateFocusMixin } from '@vaadin/field-base/src/delegate-focus-mixin.js';
11
- import { InputMixin } from '@vaadin/field-base/src/input-mixin.js';
11
+ import { InputConstraintsMixin } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
12
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
13
13
  import { dateAllowed, dateEquals, extractDateParts, getClosestDate } from './vaadin-date-picker-helper.js';
14
14
 
@@ -17,7 +17,9 @@ import { dateAllowed, dateEquals, extractDateParts, getClosestDate } from './vaa
17
17
  * @param {function(new:HTMLElement)} subclass
18
18
  */
19
19
  export const DatePickerMixin = (subclass) =>
20
- class VaadinDatePickerMixin extends ControllerMixin(DelegateFocusMixin(InputMixin(KeyboardMixin(subclass)))) {
20
+ class VaadinDatePickerMixin extends ControllerMixin(
21
+ DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass))),
22
+ ) {
21
23
  static get properties() {
22
24
  return {
23
25
  /**
@@ -278,7 +280,6 @@ export const DatePickerMixin = (subclass) =>
278
280
  */
279
281
  _minDate: {
280
282
  type: Date,
281
- observer: '__minDateChanged',
282
283
  computed: '__computeMinOrMaxDate(min)',
283
284
  },
284
285
 
@@ -289,7 +290,6 @@ export const DatePickerMixin = (subclass) =>
289
290
  */
290
291
  _maxDate: {
291
292
  type: Date,
292
- observer: '__maxDateChanged',
293
293
  computed: '__computeMinOrMaxDate(max)',
294
294
  },
295
295
 
@@ -320,6 +320,10 @@ export const DatePickerMixin = (subclass) =>
320
320
  ];
321
321
  }
322
322
 
323
+ static get constraints() {
324
+ return [...super.constraints, 'min', 'max'];
325
+ }
326
+
323
327
  /**
324
328
  * Override a getter from `InputControlMixin` to make it optional
325
329
  * and to prevent warning when a clear button is missing,
@@ -386,12 +390,10 @@ export const DatePickerMixin = (subclass) =>
386
390
  }
387
391
  }
388
392
 
389
- if (this.inputElement.value === '' && this.__dispatchChange) {
390
- this.validate();
393
+ this.validate();
394
+
395
+ if (this._inputValue === '' && this.value !== '') {
391
396
  this.value = '';
392
- this.__dispatchChange = false;
393
- } else {
394
- this.validate();
395
397
  }
396
398
  }
397
399
  }
@@ -469,7 +471,10 @@ export const DatePickerMixin = (subclass) =>
469
471
  this._close();
470
472
  });
471
473
 
472
- this._overlayContent.addEventListener('close', this._close.bind(this));
474
+ this._overlayContent.addEventListener('close', () => {
475
+ this._close();
476
+ });
477
+
473
478
  this._overlayContent.addEventListener('focus-input', this._focusAndSelect.bind(this));
474
479
 
475
480
  // User confirmed selected date by clicking the calendar.
@@ -478,7 +483,7 @@ export const DatePickerMixin = (subclass) =>
478
483
 
479
484
  this._selectDate(e.detail.date);
480
485
 
481
- this._close(e);
486
+ this._close();
482
487
  });
483
488
 
484
489
  // User confirmed selected date by pressing Enter or Today.
@@ -488,9 +493,12 @@ export const DatePickerMixin = (subclass) =>
488
493
  this._selectDate(e.detail.date);
489
494
  });
490
495
 
491
- // Keep focus attribute in focusElement for styling
496
+ // Set focus-ring attribute when moving focus to the overlay
497
+ // by pressing Tab or arrow key, after opening it on click.
492
498
  this._overlayContent.addEventListener('focusin', () => {
493
- this._setFocused(true);
499
+ if (this._keyboardActive) {
500
+ this._setFocused(true);
501
+ }
494
502
  });
495
503
 
496
504
  this.addEventListener('mousedown', () => this.__bringToFront());
@@ -523,6 +531,51 @@ export const DatePickerMixin = (subclass) =>
523
531
  return inputValid && minMaxValid && inputValidity;
524
532
  }
525
533
 
534
+ /**
535
+ * Override method inherited from `FocusMixin`
536
+ * to not call `_setFocused(true)` when focus
537
+ * is restored after closing overlay on click,
538
+ * and to avoid removing `focus-ring` attribute.
539
+ *
540
+ * @param {!FocusEvent} _event
541
+ * @return {boolean}
542
+ * @protected
543
+ * @override
544
+ */
545
+ _shouldSetFocus(_event) {
546
+ return !this._shouldKeepFocusRing;
547
+ }
548
+
549
+ /**
550
+ * Override method inherited from `FocusMixin`
551
+ * to prevent removing the `focused` attribute:
552
+ * - when moving focus to the overlay content,
553
+ * - when closing on date click / outside click.
554
+ *
555
+ * @param {!FocusEvent} _event
556
+ * @return {boolean}
557
+ * @protected
558
+ * @override
559
+ */
560
+ _shouldRemoveFocus(_event) {
561
+ return !this.opened;
562
+ }
563
+
564
+ /**
565
+ * Override method inherited from `FocusMixin`
566
+ * to store the `focus-ring` state to restore
567
+ * it later when closing on outside click.
568
+ *
569
+ * @param {boolean} focused
570
+ * @protected
571
+ * @override
572
+ */
573
+ _setFocused(focused) {
574
+ super._setFocused(focused);
575
+
576
+ this._shouldKeepFocusRing = focused && this._keyboardActive;
577
+ }
578
+
526
579
  /**
527
580
  * Select date on user interaction and set the flag
528
581
  * to fire change event if necessary.
@@ -542,10 +595,7 @@ export const DatePickerMixin = (subclass) =>
542
595
  }
543
596
 
544
597
  /** @private */
545
- _close(e) {
546
- if (e) {
547
- e.stopPropagation();
548
- }
598
+ _close() {
549
599
  this._focus();
550
600
  this.close();
551
601
  }
@@ -709,27 +759,11 @@ export const DatePickerMixin = (subclass) =>
709
759
  this._selectedDate = null;
710
760
  }
711
761
 
712
- this._toggleHasValue(!!value);
713
- }
714
-
715
- /** @private */
716
- __minDateChanged() {
717
- if (this.value) {
718
- this.validate();
719
- }
720
- }
721
-
722
- /** @private */
723
- __maxDateChanged() {
724
- if (this.value) {
725
- this.validate();
726
- }
762
+ this._toggleHasValue(this._hasValue);
727
763
  }
728
764
 
729
765
  /** @protected */
730
766
  _onOverlayOpened() {
731
- this._openedWithFocusRing = this.hasAttribute('focus-ring');
732
-
733
767
  const parsedInitialPosition = this._parseDate(this.initialPosition);
734
768
 
735
769
  const initialPosition =
@@ -803,11 +837,6 @@ export const DatePickerMixin = (subclass) =>
803
837
  if (!this.value) {
804
838
  this.validate();
805
839
  }
806
-
807
- // If the input isn't focused when overlay closes (fullscreen mode), clear focused state
808
- if (this.getRootNode().activeElement !== this.inputElement) {
809
- this._setFocused(false);
810
- }
811
840
  }
812
841
 
813
842
  /** @private */
@@ -860,10 +889,7 @@ export const DatePickerMixin = (subclass) =>
860
889
  _onChange(event) {
861
890
  // For change event on the native <input> blur, after the input is cleared,
862
891
  // we schedule change event to be dispatched on date-picker blur.
863
- if (
864
- this.inputElement.value === '' &&
865
- !(event.detail && event.detail.sourceEvent && event.detail.sourceEvent.__fromClearButton)
866
- ) {
892
+ if (this._inputValue === '') {
867
893
  this.__dispatchChange = true;
868
894
  }
869
895
 
@@ -48,18 +48,14 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
48
48
  flex-grow: 1;
49
49
  }
50
50
 
51
- [part='clear-button']:not([showclear]) {
52
- display: none;
51
+ [hidden] {
52
+ display: none !important;
53
53
  }
54
54
 
55
55
  [part='years-toggle-button'] {
56
56
  display: flex;
57
57
  }
58
58
 
59
- [part='years-toggle-button'][desktop] {
60
- display: none;
61
- }
62
-
63
59
  :host(:not([years-visible])) [part='years-toggle-button']::before {
64
60
  transform: rotate(180deg);
65
61
  }
@@ -154,10 +150,10 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
154
150
 
155
151
  <div part="overlay-header" on-touchend="_preventDefault" desktop$="[[_desktopMode]]" aria-hidden="true">
156
152
  <div part="label">[[_formatDisplayed(selectedDate, i18n.formatDate, label)]]</div>
157
- <div part="clear-button" showclear$="[[_showClear(selectedDate)]]"></div>
153
+ <div part="clear-button" hidden$="[[!selectedDate]]"></div>
158
154
  <div part="toggle-button"></div>
159
155
 
160
- <div part="years-toggle-button" desktop$="[[_desktopMode]]" aria-hidden="true">
156
+ <div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
161
157
  [[_yearAfterXMonths(_visibleMonthIndex)]]
162
158
  </div>
163
159
  </div>
@@ -243,6 +239,7 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
243
239
  */
244
240
  selectedDate: {
245
241
  type: Date,
242
+ value: null,
246
243
  },
247
244
 
248
245
  /**
@@ -331,7 +328,6 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
331
328
 
332
329
  this.setAttribute('role', 'dialog');
333
330
 
334
- addListener(this, 'tap', this._stopPropagation);
335
331
  addListener(this.$.scrollers, 'track', this._track.bind(this));
336
332
  addListener(this.shadowRoot.querySelector('[part="clear-button"]'), 'tap', this._clear.bind(this));
337
333
  addListener(this.shadowRoot.querySelector('[part="today-button"]'), 'tap', this._onTodayTap.bind(this));
@@ -499,10 +495,6 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
499
495
  this.scrollToDate(new Date(), true);
500
496
  }
501
497
 
502
- _showClear(selectedDate) {
503
- return !!selectedDate;
504
- }
505
-
506
498
  _onYearTap(e) {
507
499
  if (!this._ignoreTaps && !this._notTapping) {
508
500
  const scrollDelta =
@@ -977,10 +969,6 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
977
969
  todayMidnight.setDate(today.getDate());
978
970
  return this._dateAllowed(todayMidnight, min, max);
979
971
  }
980
-
981
- _stopPropagation(e) {
982
- e.stopPropagation();
983
- }
984
972
  }
985
973
 
986
974
  customElements.define(DatePickerOverlayContent.is, DatePickerOverlayContent);
@@ -162,7 +162,7 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
162
162
  fullscreen$="[[_fullscreen]]"
163
163
  theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
164
164
  on-vaadin-overlay-open="_onOverlayOpened"
165
- on-vaadin-overlay-close="_onOverlayClosed"
165
+ on-vaadin-overlay-closing="_onOverlayClosed"
166
166
  restore-focus-on-close
167
167
  restore-focus-node="[[inputElement]]"
168
168
  disable-upgrade
@@ -222,11 +222,6 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
222
222
 
223
223
  /** @private */
224
224
  _onVaadinOverlayClose(e) {
225
- if (this._openedWithFocusRing && this.hasAttribute('focused')) {
226
- this.setAttribute('focus-ring', '');
227
- } else if (!this.hasAttribute('focused')) {
228
- this.blur();
229
- }
230
225
  if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
231
226
  e.preventDefault();
232
227
  }
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": "23.2.0-alpha6",
4
+ "version": "23.2.0-beta3",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -216,7 +216,7 @@
216
216
  },
217
217
  {
218
218
  "name": "vaadin-date-picker",
219
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.0-alpha6/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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/ds/customization/styling-components) documentation.",
219
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-beta3/#/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`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.0-beta3/#/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/23.2.0-beta3/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-beta3/#/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`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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/ds/customization/styling-components) documentation.",
220
220
  "attributes": [
221
221
  {
222
222
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "23.2.0-alpha6",
4
+ "version": "23.2.0-beta3",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -107,7 +107,7 @@
107
107
  },
108
108
  {
109
109
  "name": "vaadin-date-picker",
110
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.0-alpha6/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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/ds/customization/styling-components) documentation.",
110
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-beta3/#/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`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.0-beta3/#/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/23.2.0-beta3/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.0-beta3/#/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`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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/ds/customization/styling-components) documentation.",
111
111
  "extension": true,
112
112
  "attributes": [
113
113
  {