@vaadin/date-picker 24.2.3 → 24.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/date-picker",
3
- "version": "24.2.3",
3
+ "version": "24.3.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,8 +23,8 @@
23
23
  "src",
24
24
  "!src/vaadin-lit-date-picker-overlay-content.js",
25
25
  "!src/vaadin-lit-date-picker-overlay.js",
26
- "!src/vaadin-lit-month-calendar.js",
27
26
  "!src/vaadin-lit-date-picker.js",
27
+ "!src/vaadin-lit-month-calendar.js",
28
28
  "theme",
29
29
  "vaadin-*.d.ts",
30
30
  "vaadin-*.js",
@@ -40,24 +40,24 @@
40
40
  "dependencies": {
41
41
  "@open-wc/dedupe-mixin": "^1.3.0",
42
42
  "@polymer/polymer": "^3.2.0",
43
- "@vaadin/a11y-base": "~24.2.3",
44
- "@vaadin/button": "~24.2.3",
45
- "@vaadin/component-base": "~24.2.3",
46
- "@vaadin/field-base": "~24.2.3",
47
- "@vaadin/input-container": "~24.2.3",
48
- "@vaadin/overlay": "~24.2.3",
49
- "@vaadin/vaadin-lumo-styles": "~24.2.3",
50
- "@vaadin/vaadin-material-styles": "~24.2.3",
51
- "@vaadin/vaadin-themable-mixin": "~24.2.3"
43
+ "@vaadin/a11y-base": "24.3.0-alpha10",
44
+ "@vaadin/button": "24.3.0-alpha10",
45
+ "@vaadin/component-base": "24.3.0-alpha10",
46
+ "@vaadin/field-base": "24.3.0-alpha10",
47
+ "@vaadin/input-container": "24.3.0-alpha10",
48
+ "@vaadin/overlay": "24.3.0-alpha10",
49
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha10",
50
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha10",
51
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha10"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@esm-bundle/chai": "^4.3.4",
55
- "@vaadin/testing-helpers": "^0.5.0",
55
+ "@vaadin/testing-helpers": "^0.6.0",
56
56
  "sinon": "^13.0.2"
57
57
  },
58
58
  "web-types": [
59
59
  "web-types.json",
60
60
  "web-types.lit.json"
61
61
  ],
62
- "gitHead": "72e557e765e72559e9c6a525e257d185ad186dc5"
62
+ "gitHead": "0271523d93fe5df0425ff64206886614f3c6f401"
63
63
  }
@@ -427,6 +427,20 @@ export const DatePickerMixin = (subclass) =>
427
427
  return null;
428
428
  }
429
429
 
430
+ /**
431
+ * The input element's value when it cannot be parsed as a date, and an empty string otherwise.
432
+ *
433
+ * @return {string}
434
+ * @private
435
+ */
436
+ get __unparsableValue() {
437
+ if (!this._inputElementValue || this.__parseDate(this._inputElementValue)) {
438
+ return '';
439
+ }
440
+
441
+ return this._inputElementValue;
442
+ }
443
+
430
444
  /**
431
445
  * Override an event listener from `DelegateFocusMixin`
432
446
  * @protected
@@ -447,7 +461,7 @@ export const DatePickerMixin = (subclass) =>
447
461
  super._onBlur(event);
448
462
 
449
463
  if (!this.opened) {
450
- this._selectParsedOrFocusedDate();
464
+ this.__commitParsedOrFocusedDate();
451
465
 
452
466
  // Do not validate when focusout is caused by document
453
467
  // losing focus, which happens on browser tab switch.
@@ -523,19 +537,14 @@ export const DatePickerMixin = (subclass) =>
523
537
 
524
538
  // User confirmed selected date by clicking the calendar.
525
539
  content.addEventListener('date-tap', (e) => {
526
- this.__userConfirmedDate = true;
527
-
528
- this._selectDate(e.detail.date);
540
+ this.__commitDate(e.detail.date);
529
541
 
530
542
  this._close();
531
543
  });
532
544
 
533
545
  // User confirmed selected date by pressing Enter, Space, or Today.
534
546
  content.addEventListener('date-selected', (e) => {
535
- // Reset if a date is deselected.
536
- this.__userConfirmedDate = !!e.detail.date;
537
-
538
- this._selectDate(e.detail.date);
547
+ this.__commitDate(e.detail.date);
539
548
  });
540
549
 
541
550
  // Set focus-ring attribute when moving focus to the overlay
@@ -650,27 +659,52 @@ export const DatePickerMixin = (subclass) =>
650
659
  this._shouldKeepFocusRing = focused && this._keyboardActive;
651
660
  }
652
661
 
653
- /** @private */
654
- __dispatchChange() {
655
- this.validate();
656
- this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
657
- }
658
-
659
662
  /**
660
- * Select date on user interaction and set the flag
661
- * to fire change event if necessary.
663
+ * Depending on the nature of the value change that has occurred since
664
+ * the last commit attempt, triggers validation and fires an event:
662
665
  *
663
- * @param {Date} dateToSelect
664
- * @protected
666
+ * Value change | Event
667
+ * :------------------------|:------------------
668
+ * empty => parsable | change
669
+ * empty => unparsable | unparsable-change
670
+ * parsable => empty | change
671
+ * parsable => parsable | change
672
+ * parsable => unparsable | change
673
+ * unparsable => empty | unparsable-change
674
+ * unparsable => parsable | change
675
+ * unparsable => unparsable | unparsable-change
676
+ *
677
+ * @private
665
678
  */
666
- _selectDate(dateToSelect) {
667
- const prevValue = this.value;
668
-
669
- this._selectedDate = dateToSelect;
679
+ __commitValueChange() {
680
+ const unparsableValue = this.__unparsableValue;
670
681
 
671
- if (prevValue !== this.value) {
672
- this.__dispatchChange();
682
+ if (this.__committedValue !== this.value) {
683
+ this.validate();
684
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
685
+ } else if (this.__committedUnparsableValue !== unparsableValue) {
686
+ this.validate();
687
+ this.dispatchEvent(new CustomEvent('unparsable-change'));
673
688
  }
689
+
690
+ this.__committedValue = this.value;
691
+ this.__committedUnparsableValue = unparsableValue;
692
+ }
693
+
694
+ /**
695
+ * Sets the given date as the value and commits it.
696
+ *
697
+ * @param {Date} date
698
+ * @private
699
+ */
700
+ __commitDate(date) {
701
+ // Prevent the value observer from treating the following value change
702
+ // as initiated programmatically by the developer, and therefore
703
+ // from automatically committing it without a change event.
704
+ this.__keepCommittedValue = true;
705
+ this._selectedDate = date;
706
+ this.__keepCommittedValue = false;
707
+ this.__commitValueChange();
674
708
  }
675
709
 
676
710
  /** @private */
@@ -806,6 +840,11 @@ export const DatePickerMixin = (subclass) =>
806
840
  this._selectedDate = null;
807
841
  }
808
842
 
843
+ if (!this.__keepCommittedValue) {
844
+ this.__committedValue = this.value;
845
+ this.__committedUnparsableValue = '';
846
+ }
847
+
809
848
  this._toggleHasValue(this._hasValue);
810
849
  }
811
850
 
@@ -896,8 +935,15 @@ export const DatePickerMixin = (subclass) =>
896
935
  : getClosestDate(initialPosition, [this._minDate, this._maxDate]);
897
936
  }
898
937
 
899
- /** @private */
900
- _selectParsedOrFocusedDate() {
938
+ /**
939
+ * Tries to parse the input element's value as a date. If the input value
940
+ * is parsable, commits the resulting date as the value. Otherwise, commits
941
+ * an empty string as the value. If no i18n parser is provided, commits
942
+ * the focused date as the value.
943
+ *
944
+ * @private
945
+ */
946
+ __commitParsedOrFocusedDate() {
901
947
  // Select the parsed input or focused date
902
948
  this._ignoreFocusedDateChange = true;
903
949
  if (this.i18n.parseDate) {
@@ -905,15 +951,14 @@ export const DatePickerMixin = (subclass) =>
905
951
  const parsedDate = this.__parseDate(inputValue);
906
952
 
907
953
  if (parsedDate) {
908
- this._selectDate(parsedDate);
954
+ this.__commitDate(parsedDate);
909
955
  } else {
910
956
  this.__keepInputValue = true;
911
- this._selectDate(null);
912
- this._selectedDate = null;
957
+ this.__commitDate(null);
913
958
  this.__keepInputValue = false;
914
959
  }
915
960
  } else if (this._focusedDate) {
916
- this._selectDate(this._focusedDate);
961
+ this.__commitDate(this._focusedDate);
917
962
  }
918
963
  this._ignoreFocusedDateChange = false;
919
964
  }
@@ -925,15 +970,9 @@ export const DatePickerMixin = (subclass) =>
925
970
  this.__showOthers();
926
971
  this.__showOthers = null;
927
972
  }
928
-
929
973
  window.removeEventListener('scroll', this._boundOnScroll, true);
930
974
 
931
- // No need to select date on close if it was confirmed by the user.
932
- if (this.__userConfirmedDate) {
933
- this.__userConfirmedDate = false;
934
- } else {
935
- this._selectParsedOrFocusedDate();
936
- }
975
+ this.__commitParsedOrFocusedDate();
937
976
 
938
977
  if (this._nativeInput && this._nativeInput.selectionStart) {
939
978
  this._nativeInput.selectionStart = this._nativeInput.selectionEnd;
@@ -1019,9 +1058,7 @@ export const DatePickerMixin = (subclass) =>
1019
1058
  */
1020
1059
  _onClearButtonClick(event) {
1021
1060
  event.preventDefault();
1022
- this._inputElementValue = '';
1023
- this.value = '';
1024
- this.__dispatchChange();
1061
+ this.__commitDate(null);
1025
1062
  }
1026
1063
 
1027
1064
  /**
@@ -1085,15 +1122,11 @@ export const DatePickerMixin = (subclass) =>
1085
1122
  * @override
1086
1123
  */
1087
1124
  _onEnter(_event) {
1088
- const oldValue = this.value;
1089
1125
  if (this.opened) {
1090
1126
  // Closing will implicitly select parsed or focused date
1091
1127
  this.close();
1092
1128
  } else {
1093
- this._selectParsedOrFocusedDate();
1094
- }
1095
- if (oldValue === this.value) {
1096
- this.validate();
1129
+ this.__commitParsedOrFocusedDate();
1097
1130
  }
1098
1131
  }
1099
1132
 
@@ -1120,15 +1153,11 @@ export const DatePickerMixin = (subclass) =>
1120
1153
  return;
1121
1154
  }
1122
1155
 
1123
- if (this.autoOpenDisabled) {
1156
+ if (this.inputElement.value === '') {
1124
1157
  // Do not restore selected date if Esc was pressed after clearing input field
1125
- if (this.inputElement.value === '') {
1126
- this._selectDate(null);
1127
- }
1128
- this._applyInputValue(this._selectedDate);
1158
+ this.__commitDate(null);
1129
1159
  } else {
1130
- this._focusedDate = this._selectedDate;
1131
- this._selectParsedOrFocusedDate();
1160
+ this._applyInputValue(this._selectedDate);
1132
1161
  }
1133
1162
  }
1134
1163
 
@@ -16,6 +16,11 @@ export type DatePickerChangeEvent = Event & {
16
16
  target: DatePicker;
17
17
  };
18
18
 
19
+ /**
20
+ * Fired when the user commits an unparsable value change and there is no change event.
21
+ */
22
+ export type DatePickerUnparsableChangeEvent = CustomEvent;
23
+
19
24
  /**
20
25
  * Fired when the `opened` property changes.
21
26
  */
@@ -43,6 +48,8 @@ export interface DatePickerCustomEventMap {
43
48
 
44
49
  'value-changed': DatePickerValueChangedEvent;
45
50
 
51
+ 'unparsable-change': DatePickerUnparsableChangeEvent;
52
+
46
53
  validated: DatePickerValidatedEvent;
47
54
  }
48
55
 
@@ -148,7 +155,24 @@ export interface DatePickerEventMap extends HTMLElementEventMap, DatePickerCusto
148
155
  *
149
156
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
150
157
  *
158
+ * ### Change events
159
+ *
160
+ * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
161
+ * the component can fire either a `change` event or an `unparsable-change` event:
162
+ *
163
+ * Value change | Event
164
+ * :------------------------|:------------------
165
+ * empty => parsable | change
166
+ * empty => unparsable | unparsable-change
167
+ * parsable => empty | change
168
+ * parsable => parsable | change
169
+ * parsable => unparsable | change
170
+ * unparsable => empty | unparsable-change
171
+ * unparsable => parsable | change
172
+ * unparsable => unparsable | unparsable-change
173
+ *
151
174
  * @fires {Event} change - Fired when the user commits a value change.
175
+ * @fires {Event} unparsable-change Fired when the user commits an unparsable value change and there is no change event.
152
176
  * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
153
177
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
154
178
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
@@ -118,7 +118,24 @@ registerStyles('vaadin-date-picker', [inputFieldShared, datePickerStyles], { mod
118
118
  *
119
119
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
120
120
  *
121
+ * ### Change events
122
+ *
123
+ * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
124
+ * the component can fire either a `change` event or an `unparsable-change` event:
125
+ *
126
+ * Value change | Event
127
+ * :------------------------|:------------------
128
+ * empty => parsable | change
129
+ * empty => unparsable | unparsable-change
130
+ * parsable => empty | change
131
+ * parsable => parsable | change
132
+ * parsable => unparsable | change
133
+ * unparsable => empty | unparsable-change
134
+ * unparsable => parsable | change
135
+ * unparsable => unparsable | unparsable-change
136
+ *
121
137
  * @fires {Event} change - Fired when the user commits a value change.
138
+ * @fires {Event} unparsable-change Fired when the user commits an unparsable value change and there is no change event.
122
139
  * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
123
140
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
124
141
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
@@ -1,3 +1,4 @@
1
+ import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
1
2
  import '@vaadin/vaadin-lumo-styles/font-icons.js';
2
3
  import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
3
4
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -1,4 +1,3 @@
1
- import '@vaadin/input-container/theme/lumo/vaadin-input-container.js';
2
1
  import './vaadin-date-picker-overlay-styles.js';
3
2
  import './vaadin-date-picker-overlay-content-styles.js';
4
3
  import './vaadin-month-calendar-styles.js';
@@ -17,6 +17,10 @@ registerStyles(
17
17
  color: var(--lumo-body-text-color);
18
18
  text-align: center;
19
19
  padding: 0 var(--lumo-space-xs);
20
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
21
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
22
+ --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
23
+ --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
20
24
  }
21
25
 
22
26
  /* Month header */
@@ -76,7 +80,7 @@ registerStyles(
76
80
  /* Today date */
77
81
 
78
82
  [part~='date'][part~='today'] {
79
- color: var(--lumo-primary-text-color);
83
+ color: var(--_selection-color-text);
80
84
  }
81
85
 
82
86
  /* Focused date */
@@ -98,7 +102,7 @@ registerStyles(
98
102
  }
99
103
 
100
104
  [part~='date'][part~='focused']::before {
101
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
105
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color);
102
106
  }
103
107
 
104
108
  :host(:not([focused])) [part~='date'][part~='focused']::before {
@@ -107,7 +111,7 @@ registerStyles(
107
111
 
108
112
  @keyframes vaadin-date-picker-month-calendar-focus-date {
109
113
  50% {
110
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
114
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 calc(var(--_focus-ring-width) + 1px) transparent;
111
115
  }
112
116
  }
113
117
 
@@ -120,7 +124,7 @@ registerStyles(
120
124
  }
121
125
 
122
126
  [part~='date'][part~='selected']::before {
123
- background-color: var(--lumo-primary-color);
127
+ background-color: var(--_selection-color);
124
128
  }
125
129
 
126
130
  [part~='date'][part~='disabled'] {
@@ -157,7 +161,7 @@ template.innerHTML = `
157
161
  <style>
158
162
  @keyframes vaadin-date-picker-month-calendar-focus-date {
159
163
  50% {
160
- box-shadow: 0 0 0 2px transparent;
164
+ box-shadow: 0 0 0 var(--_focus-ring-width) transparent;
161
165
  }
162
166
  }
163
167
  </style>
@@ -1,3 +1,4 @@
1
+ import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js';
1
2
  import '@vaadin/vaadin-material-styles/color.js';
2
3
  import '@vaadin/vaadin-material-styles/font-icons.js';
3
4
  import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
@@ -1,4 +1,3 @@
1
- import '@vaadin/input-container/theme/material/vaadin-input-container.js';
2
1
  import './vaadin-date-picker-overlay-styles.js';
3
2
  import './vaadin-date-picker-overlay-content-styles.js';
4
3
  import './vaadin-month-calendar-styles.js';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.2.3",
4
+ "version": "24.3.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -334,7 +334,7 @@
334
334
  },
335
335
  {
336
336
  "name": "vaadin-date-picker",
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.2.3/#/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.2.3/#/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.2.3/#/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.2.3/#/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/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.3.0-alpha10/#/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.3.0-alpha10/#/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.3.0-alpha10/#/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.3.0-alpha10/#/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/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",
338
338
  "attributes": [
339
339
  {
340
340
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.2.3",
4
+ "version": "24.3.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -156,7 +156,7 @@
156
156
  },
157
157
  {
158
158
  "name": "vaadin-date-picker",
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.2.3/#/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.2.3/#/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.2.3/#/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.2.3/#/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/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.3.0-alpha10/#/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.3.0-alpha10/#/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.3.0-alpha10/#/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.3.0-alpha10/#/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/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",
160
160
  "extension": true,
161
161
  "attributes": [
162
162
  {