@vaadin/date-picker 25.4.0-alpha2 → 25.4.0-alpha4

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": "25.4.0-alpha2",
3
+ "version": "25.4.0-alpha4",
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.4.0-alpha2",
39
- "@vaadin/button": "25.4.0-alpha2",
40
- "@vaadin/component-base": "25.4.0-alpha2",
41
- "@vaadin/field-base": "25.4.0-alpha2",
42
- "@vaadin/input-container": "25.4.0-alpha2",
43
- "@vaadin/overlay": "25.4.0-alpha2",
44
- "@vaadin/vaadin-themable-mixin": "25.4.0-alpha2",
38
+ "@vaadin/a11y-base": "25.4.0-alpha4",
39
+ "@vaadin/button": "25.4.0-alpha4",
40
+ "@vaadin/component-base": "25.4.0-alpha4",
41
+ "@vaadin/field-base": "25.4.0-alpha4",
42
+ "@vaadin/input-container": "25.4.0-alpha4",
43
+ "@vaadin/overlay": "25.4.0-alpha4",
44
+ "@vaadin/vaadin-themable-mixin": "25.4.0-alpha4",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/aura": "25.4.0-alpha2",
49
- "@vaadin/chai-plugins": "25.4.0-alpha2",
50
- "@vaadin/test-runner-commands": "25.4.0-alpha2",
48
+ "@vaadin/aura": "25.4.0-alpha4",
49
+ "@vaadin/chai-plugins": "25.4.0-alpha4",
50
+ "@vaadin/test-runner-commands": "25.4.0-alpha4",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.4.0-alpha2",
52
+ "@vaadin/vaadin-lumo-styles": "25.4.0-alpha4",
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": "213f8b55112558d2f976d8730fe44370ca868333"
60
+ "gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
61
61
  }
@@ -8,9 +8,16 @@ import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-foc
8
8
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
9
  import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
10
10
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
11
+ import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
11
12
  import type { I18nMixinClass } from '@vaadin/component-base/src/i18n-mixin.js';
13
+ import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
14
+ import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
15
+ import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
12
16
  import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
17
+ import type { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
13
18
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
19
+ import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
20
+ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
14
21
 
15
22
  export interface DatePickerDate {
16
23
  day: number;
@@ -135,14 +142,21 @@ export interface DatePickerI18n {
135
142
 
136
143
  export declare function DatePickerMixin<T extends Constructor<HTMLElement>>(
137
144
  base: T,
138
- ): Constructor<DatePickerMixinClass> &
145
+ ): Constructor<ClearButtonMixinClass> &
146
+ Constructor<DatePickerMixinClass> &
139
147
  Constructor<DelegateFocusMixinClass> &
148
+ Constructor<DelegateStateMixinClass> &
140
149
  Constructor<DisabledMixinClass> &
150
+ Constructor<FieldMixinClass> &
141
151
  Constructor<FocusMixinClass> &
142
152
  Constructor<I18nMixinClass<DatePickerI18n>> &
143
153
  Constructor<InputConstraintsMixinClass> &
154
+ Constructor<InputControlMixinClass> &
144
155
  Constructor<InputMixinClass> &
145
156
  Constructor<KeyboardMixinClass> &
157
+ Constructor<LabelMixinClass> &
158
+ Constructor<SlotStylesMixinClass> &
159
+ Constructor<ValidateMixinClass> &
146
160
  T;
147
161
 
148
162
  export declare class DatePickerMixinClass {
@@ -4,14 +4,12 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { hideOthers } from '@vaadin/a11y-base/src/aria-hidden.js';
7
- import { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
8
7
  import { isElementFocused, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
9
- import { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';
10
8
  import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
11
9
  import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
12
10
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
13
11
  import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
14
- import { InputConstraintsMixin } from '@vaadin/field-base/src/input-constraints-mixin.js';
12
+ import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
15
13
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
16
14
  import { DateMetadataController } from './vaadin-date-metadata-controller.js';
17
15
  import {
@@ -83,7 +81,7 @@ export const datePickerI18nDefaults = Object.freeze({
83
81
  });
84
82
 
85
83
  export const DatePickerMixin = (subclass) =>
86
- class DatePickerMixinClass extends I18nMixin(DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass)))) {
84
+ class DatePickerMixinClass extends I18nMixin(InputControlMixin(subclass)) {
87
85
  static get properties() {
88
86
  return {
89
87
  /**
@@ -4,7 +4,6 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
- import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
8
7
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
8
  import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
10
9
  export {
@@ -256,7 +255,7 @@ export interface DatePickerEventMap extends HTMLElementEventMap, DatePickerCusto
256
255
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
257
256
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
258
257
  */
259
- declare class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(ElementMixin(HTMLElement)))) {
258
+ declare class DatePicker extends DatePickerMixin(ThemableMixin(ElementMixin(HTMLElement))) {
260
259
  addEventListener<K extends keyof DatePickerEventMap>(
261
260
  type: K,
262
261
  listener: (this: DatePicker, ev: DatePickerEventMap[K]) => void,
@@ -12,7 +12,6 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
12
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
13
13
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
14
14
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
15
- import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
16
15
  import { InputController } from '@vaadin/field-base/src/input-controller.js';
17
16
  import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
18
17
  import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
@@ -218,9 +217,7 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
218
217
  * @customElement vaadin-date-picker
219
218
  * @extends HTMLElement
220
219
  */
221
- class DatePicker extends DatePickerMixin(
222
- InputControlMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),
223
- ) {
220
+ class DatePicker extends DatePickerMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
224
221
  static get is() {
225
222
  return 'vaadin-date-picker';
226
223
  }
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.4.0-alpha2",
4
+ "version": "25.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -284,8 +284,8 @@
284
284
  }
285
285
  },
286
286
  {
287
- "name": "autofocus",
288
- "description": "Specify that this control should have input focus when the page loads.",
287
+ "name": "autoOpenDisabled",
288
+ "description": "Set true to prevent the overlay from opening automatically.",
289
289
  "value": {
290
290
  "type": [
291
291
  "boolean"
@@ -293,8 +293,8 @@
293
293
  }
294
294
  },
295
295
  {
296
- "name": "autoOpenDisabled",
297
- "description": "Set true to prevent the overlay from opening automatically.",
296
+ "name": "autofocus",
297
+ "description": "Specify that this control should have input focus when the page loads.",
298
298
  "value": {
299
299
  "type": [
300
300
  "boolean"
@@ -362,7 +362,7 @@
362
362
  "description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Accessible name of the overlay content, announced by screen readers\n // when the overlay opens.\n dialogAccessibleName: 'Calendar',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
363
363
  "value": {
364
364
  "type": [
365
- "Object",
365
+ "DatePickerI18n",
366
366
  "undefined"
367
367
  ]
368
368
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "25.4.0-alpha2",
4
+ "version": "25.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -48,15 +48,15 @@
48
48
  }
49
49
  },
50
50
  {
51
- "name": "?autofocus",
52
- "description": "Specify that this control should have input focus when the page loads.",
51
+ "name": "?autoOpenDisabled",
52
+ "description": "Set true to prevent the overlay from opening automatically.",
53
53
  "value": {
54
54
  "kind": "expression"
55
55
  }
56
56
  },
57
57
  {
58
- "name": "?autoOpenDisabled",
59
- "description": "Set true to prevent the overlay from opening automatically.",
58
+ "name": "?autofocus",
59
+ "description": "Specify that this control should have input focus when the page loads.",
60
60
  "value": {
61
61
  "kind": "expression"
62
62
  }