@vaadin/date-picker 25.2.0-alpha10 → 25.2.0-alpha11
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/custom-elements.json +1 -4
- package/package.json +13 -13
- package/src/styles/vaadin-date-picker-overlay-base-styles.js +3 -6
- package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +9 -4
- package/src/styles/vaadin-month-calendar-base-styles.js +9 -11
- package/src/vaadin-date-picker-helper.d.ts +1 -1
- package/src/vaadin-date-picker-mixin.js +5 -12
- package/src/vaadin-date-picker-overlay-content-mixin.js +0 -3
- package/src/vaadin-date-picker-overlay-mixin.js +0 -5
- package/src/vaadin-date-picker-overlay.js +0 -3
- package/src/vaadin-date-picker-year.js +0 -1
- package/src/vaadin-date-picker.js +0 -4
- package/src/vaadin-month-calendar-mixin.js +0 -4
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/custom-elements.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "25.2.0-
|
|
3
|
+
"version": "25.2.0-alpha11",
|
|
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.2.0-
|
|
39
|
-
"@vaadin/button": "25.2.0-
|
|
40
|
-
"@vaadin/component-base": "25.2.0-
|
|
41
|
-
"@vaadin/field-base": "25.2.0-
|
|
42
|
-
"@vaadin/input-container": "25.2.0-
|
|
43
|
-
"@vaadin/overlay": "25.2.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.2.0-alpha11",
|
|
39
|
+
"@vaadin/button": "25.2.0-alpha11",
|
|
40
|
+
"@vaadin/component-base": "25.2.0-alpha11",
|
|
41
|
+
"@vaadin/field-base": "25.2.0-alpha11",
|
|
42
|
+
"@vaadin/input-container": "25.2.0-alpha11",
|
|
43
|
+
"@vaadin/overlay": "25.2.0-alpha11",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha11",
|
|
45
45
|
"lit": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vaadin/aura": "25.2.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
48
|
+
"@vaadin/aura": "25.2.0-alpha11",
|
|
49
|
+
"@vaadin/chai-plugins": "25.2.0-alpha11",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha11",
|
|
51
51
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
52
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha11",
|
|
53
53
|
"sinon": "^21.0.2"
|
|
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": "
|
|
60
|
+
"gitHead": "fdc37e932709f95491a027aeb2090911cb7528c6"
|
|
61
61
|
}
|
|
@@ -13,19 +13,16 @@ export const datePickerOverlayStyles = css`
|
|
|
13
13
|
box-sizing: content-box;
|
|
14
14
|
width: var(
|
|
15
15
|
--vaadin-date-picker-overlay-width,
|
|
16
|
-
|
|
16
|
+
round(
|
|
17
17
|
var(--vaadin-date-picker-date-width, 2rem) * 7 +
|
|
18
18
|
var(--vaadin-date-picker-month-padding, var(--vaadin-padding-s)) * 2 +
|
|
19
|
-
var(--vaadin-date-picker-year-scroller-width, 3rem)
|
|
19
|
+
var(--vaadin-date-picker-year-scroller-width, 3rem),
|
|
20
|
+
1px
|
|
20
21
|
)
|
|
21
22
|
);
|
|
22
23
|
cursor: default;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
:host([fullscreen]) {
|
|
26
|
-
--vaadin-date-picker-date-width: calc(100% / 7);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
26
|
:host([fullscreen]) [part='backdrop'] {
|
|
30
27
|
display: block;
|
|
31
28
|
}
|
|
@@ -50,13 +50,18 @@ export const overlayContentStyles = css`
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
::slotted([slot='months']) {
|
|
53
|
-
--vaadin-infinite-scroller-item-height:
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
--vaadin-infinite-scroller-item-height: round(
|
|
54
|
+
var(--vaadin-date-picker-month-header-font-size, 0.9375rem) + 0.75rem +
|
|
55
|
+
var(--vaadin-date-picker-date-height, 2rem) * 7 + var(--_vaadin-date-picker-week-numbers-visible, 0) *
|
|
56
|
+
(
|
|
57
|
+
var(--vaadin-date-picker-week-number-font-size, 0.7rem) * 6.25 +
|
|
58
|
+
var(--vaadin-date-picker-month-padding, var(--vaadin-padding-s)) * 3
|
|
59
|
+
),
|
|
60
|
+
1px
|
|
56
61
|
);
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
:host([
|
|
64
|
+
:host(:not([fullscreen])) ::slotted([slot='months']) {
|
|
60
65
|
border-bottom: 1px solid var(--vaadin-border-color-secondary);
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -16,20 +16,20 @@ export const monthCalendarStyles = css`
|
|
|
16
16
|
color: var(--vaadin-date-picker-month-header-color, var(--vaadin-text-color));
|
|
17
17
|
font-size: var(--vaadin-date-picker-month-header-font-size, 0.9375rem);
|
|
18
18
|
font-weight: var(--vaadin-date-picker-month-header-font-weight, 500);
|
|
19
|
-
line-height:
|
|
19
|
+
line-height: 1;
|
|
20
20
|
margin-bottom: 0.75rem;
|
|
21
21
|
text-align: center;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
table {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
flex-direction: column;
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-columns: repeat(7, 1fr);
|
|
28
27
|
}
|
|
29
28
|
|
|
29
|
+
thead,
|
|
30
|
+
tbody,
|
|
30
31
|
tr {
|
|
31
|
-
display:
|
|
32
|
-
flex-wrap: wrap;
|
|
32
|
+
display: contents;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
[part~='weekday'] {
|
|
@@ -37,7 +37,6 @@ export const monthCalendarStyles = css`
|
|
|
37
37
|
font-size: var(--vaadin-date-picker-weekday-font-size, 0.75rem);
|
|
38
38
|
font-weight: var(--vaadin-date-picker-weekday-font-weight, 500);
|
|
39
39
|
margin-bottom: 0.375rem;
|
|
40
|
-
width: var(--vaadin-date-picker-date-width, 2rem);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
/* Week numbers are on a separate row, don't reserve space on weekday row. */
|
|
@@ -46,10 +45,10 @@ export const monthCalendarStyles = css`
|
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
[part~='week-number'] {
|
|
48
|
+
grid-column: -1 / 1;
|
|
49
49
|
color: var(--vaadin-date-picker-week-number-color, var(--vaadin-text-color-secondary));
|
|
50
50
|
font-size: var(--vaadin-date-picker-week-number-font-size, 0.7rem);
|
|
51
51
|
line-height: 1;
|
|
52
|
-
width: 100%;
|
|
53
52
|
margin-top: 0.125em;
|
|
54
53
|
margin-bottom: 0.125em;
|
|
55
54
|
gap: 0.25em;
|
|
@@ -77,7 +76,6 @@ export const monthCalendarStyles = css`
|
|
|
77
76
|
[part~='date'] {
|
|
78
77
|
border-radius: var(--vaadin-date-picker-date-border-radius, var(--vaadin-radius-m));
|
|
79
78
|
position: relative;
|
|
80
|
-
width: var(--vaadin-date-picker-date-width, 2rem);
|
|
81
79
|
height: var(--vaadin-date-picker-date-height, 2rem);
|
|
82
80
|
cursor: var(--vaadin-clickable-cursor);
|
|
83
81
|
outline: none;
|
|
@@ -88,11 +86,11 @@ export const monthCalendarStyles = css`
|
|
|
88
86
|
content: '';
|
|
89
87
|
position: absolute;
|
|
90
88
|
z-index: -1;
|
|
91
|
-
height:
|
|
89
|
+
height: min(2em, 100%);
|
|
92
90
|
aspect-ratio: 1;
|
|
93
91
|
}
|
|
94
92
|
|
|
95
|
-
:where([part~='date']:focus)::after {
|
|
93
|
+
:where([part~='date']:focus-visible)::after {
|
|
96
94
|
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
|
|
97
95
|
outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
|
|
98
96
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2016 - 2026 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { DatePickerDate } from './vaadin-date-picker-mixin.js';
|
|
@@ -78,19 +78,8 @@ export const datePickerI18nDefaults = Object.freeze({
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* @polymerMixin
|
|
83
|
-
* @mixes DelegateFocusMixin
|
|
84
|
-
* @mixes I18nMixin
|
|
85
|
-
* @mixes InputConstraintsMixin
|
|
86
|
-
* @mixes KeyboardMixin
|
|
87
|
-
* @param {function(new:HTMLElement)} subclass
|
|
88
|
-
*/
|
|
89
81
|
export const DatePickerMixin = (subclass) =>
|
|
90
|
-
class DatePickerMixinClass extends I18nMixin(
|
|
91
|
-
datePickerI18nDefaults,
|
|
92
|
-
DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass))),
|
|
93
|
-
) {
|
|
82
|
+
class DatePickerMixinClass extends I18nMixin(DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass)))) {
|
|
94
83
|
static get properties() {
|
|
95
84
|
return {
|
|
96
85
|
/**
|
|
@@ -278,6 +267,10 @@ export const DatePickerMixin = (subclass) =>
|
|
|
278
267
|
];
|
|
279
268
|
}
|
|
280
269
|
|
|
270
|
+
static get defaultI18n() {
|
|
271
|
+
return datePickerI18nDefaults;
|
|
272
|
+
}
|
|
273
|
+
|
|
281
274
|
static get constraints() {
|
|
282
275
|
return [...super.constraints, 'min', 'max'];
|
|
283
276
|
}
|
|
@@ -10,9 +10,6 @@ import { MediaQueryController } from '@vaadin/component-base/src/media-query-con
|
|
|
10
10
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
11
11
|
import { dateAfterXMonths, dateAllowed, dateEquals, getClosestDate } from './vaadin-date-picker-helper.js';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @polymerMixin
|
|
15
|
-
*/
|
|
16
13
|
export const DatePickerOverlayContentMixin = (superClass) =>
|
|
17
14
|
class DatePickerOverlayContentMixin extends superClass {
|
|
18
15
|
static get properties() {
|
|
@@ -7,11 +7,6 @@ import { isElementFocusable } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
|
7
7
|
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
8
8
|
import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @polymerMixin
|
|
12
|
-
* @mixes OverlayMixin
|
|
13
|
-
* @mixes PositionMixin
|
|
14
|
-
*/
|
|
15
10
|
export const DatePickerOverlayMixin = (superClass) =>
|
|
16
11
|
class DatePickerOverlayMixin extends PositionMixin(OverlayMixin(superClass)) {
|
|
17
12
|
/**
|
|
@@ -18,9 +18,6 @@ import { DatePickerOverlayMixin } from './vaadin-date-picker-overlay-mixin.js';
|
|
|
18
18
|
*
|
|
19
19
|
* @customElement vaadin-date-picker-overlay
|
|
20
20
|
* @extends HTMLElement
|
|
21
|
-
* @mixes DatePickerOverlayMixin
|
|
22
|
-
* @mixes DirMixin
|
|
23
|
-
* @mixes ThemableMixin
|
|
24
21
|
* @private
|
|
25
22
|
*/
|
|
26
23
|
class DatePickerOverlay extends DatePickerOverlayMixin(
|
|
@@ -15,7 +15,6 @@ import { datePickerYearStyles } from './styles/vaadin-date-picker-year-base-styl
|
|
|
15
15
|
*
|
|
16
16
|
* @customElement vaadin-date-picker-year
|
|
17
17
|
* @extends HTMLElement
|
|
18
|
-
* @mixes ThemableMixin
|
|
19
18
|
* @private
|
|
20
19
|
*/
|
|
21
20
|
export class DatePickerYear extends ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))) {
|
|
@@ -152,10 +152,6 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
|
152
152
|
*
|
|
153
153
|
* @customElement vaadin-date-picker
|
|
154
154
|
* @extends HTMLElement
|
|
155
|
-
* @mixes ElementMixin
|
|
156
|
-
* @mixes ThemableMixin
|
|
157
|
-
* @mixes InputControlMixin
|
|
158
|
-
* @mixes DatePickerMixin
|
|
159
155
|
*/
|
|
160
156
|
class DatePicker extends DatePickerMixin(
|
|
161
157
|
InputControlMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),
|
|
@@ -7,10 +7,6 @@ import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
|
7
7
|
import { addListener } from '@vaadin/component-base/src/gestures.js';
|
|
8
8
|
import { dateAllowed, dateEquals, getISOWeekNumber, normalizeDate } from './vaadin-date-picker-helper.js';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @polymerMixin
|
|
12
|
-
* @mixes FocusMixin
|
|
13
|
-
*/
|
|
14
10
|
export const MonthCalendarMixin = (superClass) =>
|
|
15
11
|
class MonthCalendarMixinClass extends FocusMixin(superClass) {
|
|
16
12
|
static get properties() {
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED