@vaadin/date-picker 25.0.0-alpha15 → 25.0.0-alpha17
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 +13 -13
- package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +2 -2
- package/src/vaadin-date-picker-helper.js +1 -1
- package/src/vaadin-date-picker-mixin.js +1 -1
- package/src/vaadin-date-picker-overlay-content.js +6 -0
- package/src/vaadin-date-picker-year.js +0 -1
- package/src/vaadin-date-picker.d.ts +31 -18
- package/src/vaadin-date-picker.js +28 -15
- 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": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/input-container": "25.0.0-
|
|
42
|
-
"@vaadin/overlay": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha17",
|
|
38
|
+
"@vaadin/button": "25.0.0-alpha17",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha17",
|
|
40
|
+
"@vaadin/field-base": "25.0.0-alpha17",
|
|
41
|
+
"@vaadin/input-container": "25.0.0-alpha17",
|
|
42
|
+
"@vaadin/overlay": "25.0.0-alpha17",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha17",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-alpha17",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha17",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
51
|
-
"sinon": "^
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha17",
|
|
51
|
+
"sinon": "^21.0.0"
|
|
52
52
|
},
|
|
53
53
|
"web-types": [
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "8264c71309907be99368b09414f0f8d7f591e0b9"
|
|
58
58
|
}
|
|
@@ -29,9 +29,9 @@ export const overlayContentStyles = css`
|
|
|
29
29
|
|
|
30
30
|
[part='years-toggle-button'] {
|
|
31
31
|
display: inline-flex;
|
|
32
|
-
|
|
32
|
+
align-items: center;
|
|
33
33
|
border-radius: var(--vaadin-button-border-radius, var(--vaadin-radius-m));
|
|
34
|
-
color: var(--vaadin-
|
|
34
|
+
color: var(--vaadin-color);
|
|
35
35
|
font-size: var(--vaadin-button-font-size, inherit);
|
|
36
36
|
font-weight: var(--vaadin-button-font-weight, 500);
|
|
37
37
|
height: var(--vaadin-button-height, auto);
|
|
@@ -16,7 +16,6 @@ import { datePickerYearStyles } from './styles/vaadin-date-picker-year-base-styl
|
|
|
16
16
|
* @customElement
|
|
17
17
|
* @extends HTMLElement
|
|
18
18
|
* @mixes ThemableMixin
|
|
19
|
-
* @mixes DatePickerYearMixin
|
|
20
19
|
* @private
|
|
21
20
|
*/
|
|
22
21
|
export class DatePickerYear extends ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))) {
|
|
@@ -78,24 +78,37 @@ export interface DatePickerEventMap extends HTMLElementEventMap, DatePickerCusto
|
|
|
78
78
|
* -------------------------------|----------------------------|---------
|
|
79
79
|
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* `
|
|
89
|
-
* `
|
|
90
|
-
* `
|
|
91
|
-
* `
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
81
|
+
* The following shadow DOM parts are available for styling:
|
|
82
|
+
*
|
|
83
|
+
* Part name | Description
|
|
84
|
+
* ---------------------|----------------
|
|
85
|
+
* `label` | The label element
|
|
86
|
+
* `input-field` | The element that wraps prefix, value and buttons
|
|
87
|
+
* `clear-button` | The clear button
|
|
88
|
+
* `error-message` | The error message element
|
|
89
|
+
* `helper-text` | The helper text element wrapper
|
|
90
|
+
* `required-indicator` | The `required` state indicator element
|
|
91
|
+
* `toggle-button` | The toggle button
|
|
92
|
+
* `backdrop` | Backdrop of the overlay
|
|
93
|
+
* `overlay` | The overlay container
|
|
94
|
+
* `content` | The overlay content
|
|
95
|
+
*
|
|
96
|
+
* The following state attributes are available for styling:
|
|
97
|
+
*
|
|
98
|
+
* Attribute | Description
|
|
99
|
+
* ---------------------|---------------------------------
|
|
100
|
+
* `disabled` | Set when the element is disabled
|
|
101
|
+
* `has-value` | Set when the element has a value
|
|
102
|
+
* `has-label` | Set when the element has a label
|
|
103
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
104
|
+
* `has-error-message` | Set when the element has an error message
|
|
105
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
106
|
+
* `invalid` | Set when the element is invalid
|
|
107
|
+
* `focused` | Set when the element is focused
|
|
108
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
109
|
+
* `readonly` | Set when the element is readonly
|
|
110
|
+
* `opened` | Set when the overlay is opened
|
|
111
|
+
* `week-numbers` | Set when week numbers are shown in the calendar
|
|
99
112
|
*
|
|
100
113
|
* ### Internal components
|
|
101
114
|
*
|
|
@@ -42,24 +42,37 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
|
42
42
|
* -------------------------------|----------------------------|---------
|
|
43
43
|
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.
|
|
45
|
+
* The following shadow DOM parts are available for styling:
|
|
47
46
|
*
|
|
48
|
-
*
|
|
47
|
+
* Part name | Description
|
|
48
|
+
* ---------------------|----------------
|
|
49
|
+
* `label` | The label element
|
|
50
|
+
* `input-field` | The element that wraps prefix, value and buttons
|
|
51
|
+
* `clear-button` | The clear button
|
|
52
|
+
* `error-message` | The error message element
|
|
53
|
+
* `helper-text` | The helper text element wrapper
|
|
54
|
+
* `required-indicator` | The `required` state indicator element
|
|
55
|
+
* `toggle-button` | The toggle button
|
|
56
|
+
* `backdrop` | Backdrop of the overlay
|
|
57
|
+
* `overlay` | The overlay container
|
|
58
|
+
* `content` | The overlay content
|
|
49
59
|
*
|
|
50
|
-
*
|
|
51
|
-
* -----------------|--------------------
|
|
52
|
-
* `toggle-button` | Toggle button
|
|
53
|
-
* `backdrop` | Backdrop of the overlay
|
|
54
|
-
* `overlay` | The overlay container
|
|
55
|
-
* `content` | The overlay content
|
|
60
|
+
* The following state attributes are available for styling:
|
|
56
61
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* `
|
|
62
|
-
* `
|
|
62
|
+
* Attribute | Description
|
|
63
|
+
* ---------------------|---------------------------------
|
|
64
|
+
* `disabled` | Set when the element is disabled
|
|
65
|
+
* `has-value` | Set when the element has a value
|
|
66
|
+
* `has-label` | Set when the element has a label
|
|
67
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
68
|
+
* `has-error-message` | Set when the element has an error message
|
|
69
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
70
|
+
* `invalid` | Set when the element is invalid
|
|
71
|
+
* `focused` | Set when the element is focused
|
|
72
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
73
|
+
* `readonly` | Set when the element is readonly
|
|
74
|
+
* `opened` | Set when the overlay is opened
|
|
75
|
+
* `week-numbers` | Set when week numbers are shown in the calendar
|
|
63
76
|
*
|
|
64
77
|
* ### Internal components
|
|
65
78
|
*
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/date-picker",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha17",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-date-picker",
|
|
11
|
-
"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\
|
|
11
|
+
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"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": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha17",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-date-picker",
|
|
19
|
-
"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\
|
|
19
|
+
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|