@vaadin/date-picker 23.3.0-rc1 → 23.3.1
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 +10 -10
- package/src/vaadin-date-picker-mixin.d.ts +61 -0
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.1",
|
|
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.3.
|
|
40
|
-
"@vaadin/component-base": "23.3.
|
|
41
|
-
"@vaadin/field-base": "23.3.
|
|
42
|
-
"@vaadin/input-container": "23.3.
|
|
43
|
-
"@vaadin/overlay": "23.3.
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "23.3.
|
|
45
|
-
"@vaadin/vaadin-material-styles": "23.3.
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "23.3.
|
|
39
|
+
"@vaadin/button": "~23.3.1",
|
|
40
|
+
"@vaadin/component-base": "~23.3.1",
|
|
41
|
+
"@vaadin/field-base": "~23.3.1",
|
|
42
|
+
"@vaadin/input-container": "~23.3.1",
|
|
43
|
+
"@vaadin/overlay": "~23.3.1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "~23.3.1",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "~23.3.1",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "~23.3.1"
|
|
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": "
|
|
57
|
+
"gitHead": "73e47f04d1e1d581ed4f312acee0518932d45be3"
|
|
58
58
|
}
|
|
@@ -18,17 +18,78 @@ export interface DatePickerDate {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface DatePickerI18n {
|
|
21
|
+
/**
|
|
22
|
+
* An array with the full names of months starting
|
|
23
|
+
* with January.
|
|
24
|
+
*/
|
|
21
25
|
monthNames: string[];
|
|
26
|
+
/**
|
|
27
|
+
* An array of weekday names starting with Sunday. Used
|
|
28
|
+
* in screen reader announcements.
|
|
29
|
+
*/
|
|
22
30
|
weekdays: string[];
|
|
31
|
+
/**
|
|
32
|
+
* An array of short weekday names starting with Sunday.
|
|
33
|
+
* Displayed in the calendar.
|
|
34
|
+
*/
|
|
23
35
|
weekdaysShort: string[];
|
|
36
|
+
/**
|
|
37
|
+
* An integer indicating the first day of the week
|
|
38
|
+
* (0 = Sunday, 1 = Monday, etc.).
|
|
39
|
+
*/
|
|
24
40
|
firstDayOfWeek: number;
|
|
41
|
+
/**
|
|
42
|
+
* Used in screen reader announcements along with week
|
|
43
|
+
* numbers, if they are displayed.
|
|
44
|
+
*/
|
|
25
45
|
week: string;
|
|
46
|
+
/**
|
|
47
|
+
* Translation of the Calendar icon button title.
|
|
48
|
+
*/
|
|
26
49
|
calendar: string;
|
|
50
|
+
/**
|
|
51
|
+
* Translation of the Today shortcut button text.
|
|
52
|
+
*/
|
|
27
53
|
today: string;
|
|
54
|
+
/**
|
|
55
|
+
* Translation of the Cancel button text.
|
|
56
|
+
*/
|
|
28
57
|
cancel: string;
|
|
58
|
+
/**
|
|
59
|
+
* Used for adjusting the year value when parsing dates with short years.
|
|
60
|
+
* The year values between 0 and 99 are evaluated and adjusted.
|
|
61
|
+
* Example: for a referenceDate of 1970-10-30;
|
|
62
|
+
* dateToBeParsed: 40-10-30, result: 1940-10-30
|
|
63
|
+
* dateToBeParsed: 80-10-30, result: 1980-10-30
|
|
64
|
+
* dateToBeParsed: 10-10-30, result: 2010-10-30
|
|
65
|
+
* Supported date format: ISO 8601 `"YYYY-MM-DD"` (default)
|
|
66
|
+
* The default value is the current date.
|
|
67
|
+
*/
|
|
29
68
|
referenceDate: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.
|
|
72
|
+
* Must properly parse (at least) text formatted by `formatDate`.
|
|
73
|
+
* Setting the property to null will disable keyboard input feature.
|
|
74
|
+
* Note: The argument month is 0-based. This means that January = 0 and December = 11.
|
|
75
|
+
* @param date
|
|
76
|
+
*/
|
|
30
77
|
parseDate(date: string): DatePickerDate | undefined;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A function to format given `Object` as
|
|
81
|
+
* date string. Object is in the format `{ day: ..., month: ..., year: ... }`
|
|
82
|
+
* Note: The argument month is 0-based. This means that January = 0 and December = 11.
|
|
83
|
+
* @param date
|
|
84
|
+
*/
|
|
31
85
|
formatDate(date: DatePickerDate): string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A function to format given `monthName` and
|
|
89
|
+
* `fullYear` integer as calendar title string.
|
|
90
|
+
* @param monthName
|
|
91
|
+
* @param fullYear
|
|
92
|
+
*/
|
|
32
93
|
formatTitle(monthName: string, fullYear: number): string;
|
|
33
94
|
}
|
|
34
95
|
|
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.3.
|
|
4
|
+
"version": "23.3.1",
|
|
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.3.
|
|
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.3.1/#/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.3.1/#/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.3.1/#/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.3.1/#/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/styling/custom-theme/styling-components) documentation.",
|
|
220
220
|
"attributes": [
|
|
221
221
|
{
|
|
222
222
|
"name": "disabled",
|
package/web-types.lit.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.3.
|
|
4
|
+
"version": "23.3.1",
|
|
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.3.
|
|
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.3.1/#/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.3.1/#/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.3.1/#/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.3.1/#/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/styling/custom-theme/styling-components) documentation.",
|
|
111
111
|
"extension": true,
|
|
112
112
|
"attributes": [
|
|
113
113
|
{
|