@vaadin/date-picker 25.3.0-alpha6 → 25.3.0-alpha8

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.
@@ -2447,6 +2447,13 @@
2447
2447
  "module": "src/vaadin-date-picker-mixin.js"
2448
2448
  }
2449
2449
  },
2450
+ {
2451
+ "type": {
2452
+ "text": "string"
2453
+ },
2454
+ "description": "The theme variants to apply to the component.",
2455
+ "name": "theme"
2456
+ },
2450
2457
  {
2451
2458
  "name": "title",
2452
2459
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/date-picker",
3
- "version": "25.3.0-alpha6",
3
+ "version": "25.3.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,21 +35,21 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.3.0-alpha6",
39
- "@vaadin/button": "25.3.0-alpha6",
40
- "@vaadin/component-base": "25.3.0-alpha6",
41
- "@vaadin/field-base": "25.3.0-alpha6",
42
- "@vaadin/input-container": "25.3.0-alpha6",
43
- "@vaadin/overlay": "25.3.0-alpha6",
44
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha6",
38
+ "@vaadin/a11y-base": "25.3.0-alpha8",
39
+ "@vaadin/button": "25.3.0-alpha8",
40
+ "@vaadin/component-base": "25.3.0-alpha8",
41
+ "@vaadin/field-base": "25.3.0-alpha8",
42
+ "@vaadin/input-container": "25.3.0-alpha8",
43
+ "@vaadin/overlay": "25.3.0-alpha8",
44
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha8",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/aura": "25.3.0-alpha6",
49
- "@vaadin/chai-plugins": "25.3.0-alpha6",
50
- "@vaadin/test-runner-commands": "25.3.0-alpha6",
48
+ "@vaadin/aura": "25.3.0-alpha8",
49
+ "@vaadin/chai-plugins": "25.3.0-alpha8",
50
+ "@vaadin/test-runner-commands": "25.3.0-alpha8",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha6",
52
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha8",
53
53
  "sinon": "^22.0.0"
54
54
  },
55
55
  "customElements": "custom-elements.json",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "92c124fb9cff367bc07e734d8e65707facd0bd43"
60
+ "gitHead": "ccbb4aaffb63c745c6da0426b532d4d05e47af29"
61
61
  }
@@ -138,7 +138,8 @@ export const DatePickerOverlayContentMixin = (superClass) =>
138
138
 
139
139
  static get observers() {
140
140
  return [
141
- '__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled, enteredDate)',
141
+ '__updateCalendarsConfig(calendars, i18n, minDate, maxDate, showWeekNumbers, isDateDisabled, _theme)',
142
+ '__updateCalendarsState(calendars, selectedDate, focusedDate, enteredDate, _ignoreTaps)',
142
143
  '__updateCancelButton(_cancelButton, i18n)',
143
144
  '__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)',
144
145
  '__updateYears(years, selectedDate, _theme)',
@@ -299,31 +300,21 @@ export const DatePickerOverlayContentMixin = (superClass) =>
299
300
  }
300
301
  }
301
302
 
303
+ /**
304
+ * Config that changes rarely (locale, allowed range, week numbers, theme).
305
+ * Split from the interaction state below so a keyboard/selection update
306
+ * does not re-assign every config property on every calendar.
307
+ * @private
308
+ */
302
309
  // eslint-disable-next-line @typescript-eslint/max-params
303
- __updateCalendars(
304
- calendars,
305
- i18n,
306
- minDate,
307
- maxDate,
308
- selectedDate,
309
- focusedDate,
310
- showWeekNumbers,
311
- ignoreTaps,
312
- theme,
313
- isDateDisabled,
314
- enteredDate,
315
- ) {
310
+ __updateCalendarsConfig(calendars, i18n, minDate, maxDate, showWeekNumbers, isDateDisabled, theme) {
316
311
  if (calendars?.length) {
317
312
  calendars.forEach((calendar) => {
318
313
  calendar.i18n = i18n;
319
314
  calendar.minDate = minDate;
320
315
  calendar.maxDate = maxDate;
321
316
  calendar.isDateDisabled = isDateDisabled;
322
- calendar.focusedDate = focusedDate;
323
- calendar.selectedDate = selectedDate;
324
317
  calendar.showWeekNumbers = showWeekNumbers;
325
- calendar.ignoreTaps = ignoreTaps;
326
- calendar.enteredDate = enteredDate;
327
318
 
328
319
  if (theme) {
329
320
  calendar.setAttribute('theme', theme);
@@ -334,6 +325,21 @@ export const DatePickerOverlayContentMixin = (superClass) =>
334
325
  }
335
326
  }
336
327
 
328
+ /**
329
+ * Interaction state that changes often (focus, selection, entered date, taps).
330
+ * @private
331
+ */
332
+ __updateCalendarsState(calendars, selectedDate, focusedDate, enteredDate, ignoreTaps) {
333
+ if (calendars?.length) {
334
+ calendars.forEach((calendar) => {
335
+ calendar.focusedDate = focusedDate;
336
+ calendar.selectedDate = selectedDate;
337
+ calendar.enteredDate = enteredDate;
338
+ calendar.ignoreTaps = ignoreTaps;
339
+ });
340
+ }
341
+ }
342
+
337
343
  /** @private */
338
344
  __updateYears(years, selectedDate, theme) {
339
345
  if (years?.length) {
@@ -18,6 +18,7 @@ import { overlayContentStyles } from './styles/vaadin-date-picker-overlay-conten
18
18
  import { DatePickerOverlayContentMixin } from './vaadin-date-picker-overlay-content-mixin.js';
19
19
 
20
20
  /**
21
+ * @attr {string} theme - The theme variants to apply to the component.
21
22
  * @customElement vaadin-date-picker-overlay-content
22
23
  * @extends HTMLElement
23
24
  * @private
@@ -16,6 +16,7 @@ import { DatePickerOverlayMixin } from './vaadin-date-picker-overlay-mixin.js';
16
16
  /**
17
17
  * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.
18
18
  *
19
+ * @attr {string} theme - The theme variants to apply to the component.
19
20
  * @customElement vaadin-date-picker-overlay
20
21
  * @extends HTMLElement
21
22
  * @private
@@ -13,6 +13,7 @@ import { datePickerYearStyles } from './styles/vaadin-date-picker-year-base-styl
13
13
  /**
14
14
  * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.
15
15
  *
16
+ * @attr {string} theme - The theme variants to apply to the component.
16
17
  * @customElement vaadin-date-picker-year
17
18
  * @extends HTMLElement
18
19
  * @private
@@ -150,6 +150,7 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
150
150
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
151
151
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
152
152
  *
153
+ * @attr {string} theme - The theme variants to apply to the component.
153
154
  * @customElement vaadin-date-picker
154
155
  * @extends HTMLElement
155
156
  */
@@ -12,6 +12,7 @@ import { monthCalendarStyles } from './styles/vaadin-month-calendar-base-styles.
12
12
  import { MonthCalendarMixin } from './vaadin-month-calendar-mixin.js';
13
13
 
14
14
  /**
15
+ * @attr {string} theme - The theme variants to apply to the component.
15
16
  * @customElement vaadin-month-calendar
16
17
  * @extends HTMLElement
17
18
  * @private
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": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -213,9 +213,7 @@
213
213
  "description": "The theme variants to apply to the component.",
214
214
  "value": {
215
215
  "type": [
216
- "string",
217
- "null",
218
- "undefined"
216
+ "string"
219
217
  ]
220
218
  }
221
219
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "25.3.0-alpha6",
4
+ "version": "25.3.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {