@vaadin/date-picker 25.0.0-alpha2 → 25.0.0-alpha20
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 -14
- package/src/styles/vaadin-date-picker-base-styles.d.ts +8 -0
- package/src/{vaadin-date-picker-styles.js → styles/vaadin-date-picker-base-styles.js} +9 -0
- package/src/styles/vaadin-date-picker-overlay-base-styles.js +48 -0
- package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +108 -0
- package/src/styles/vaadin-date-picker-year-base-styles.js +27 -0
- package/src/styles/vaadin-month-calendar-base-styles.js +143 -0
- package/src/vaadin-date-picker-helper.d.ts +5 -0
- package/src/vaadin-date-picker-helper.js +1 -1
- package/src/vaadin-date-picker-mixin.d.ts +1 -3
- package/src/vaadin-date-picker-mixin.js +45 -23
- package/src/vaadin-date-picker-month-scroller.js +2 -6
- package/src/vaadin-date-picker-overlay-content-mixin.js +5 -132
- package/src/vaadin-date-picker-overlay-content.js +19 -17
- package/src/vaadin-date-picker-overlay.js +17 -3
- package/src/vaadin-date-picker-year-scroller.js +3 -4
- package/src/vaadin-date-picker-year.js +32 -10
- package/src/vaadin-date-picker.d.ts +33 -24
- package/src/vaadin-date-picker.js +45 -28
- package/src/vaadin-infinite-scroller.js +1 -19
- package/src/vaadin-month-calendar.js +3 -2
- package/vaadin-date-picker.js +1 -1
- package/web-types.json +3 -25
- package/web-types.lit.json +3 -10
- package/src/vaadin-date-picker-overlay-content-styles.js +0 -68
- package/src/vaadin-date-picker-overlay-styles.js +0 -23
- package/src/vaadin-date-picker-year-mixin.js +0 -35
- package/src/vaadin-month-calendar-styles.js +0 -64
- package/theme/lumo/vaadin-date-picker-overlay-content-styles.d.ts +0 -7
- package/theme/lumo/vaadin-date-picker-overlay-content-styles.js +0 -164
- package/theme/lumo/vaadin-date-picker-overlay-styles.d.ts +0 -2
- package/theme/lumo/vaadin-date-picker-overlay-styles.js +0 -55
- package/theme/lumo/vaadin-date-picker-styles.d.ts +0 -2
- package/theme/lumo/vaadin-date-picker-styles.js +0 -30
- package/theme/lumo/vaadin-date-picker-year-styles.d.ts +0 -1
- package/theme/lumo/vaadin-date-picker-year-styles.js +0 -32
- package/theme/lumo/vaadin-date-picker.d.ts +0 -5
- package/theme/lumo/vaadin-date-picker.js +0 -5
- package/theme/lumo/vaadin-month-calendar-styles.d.ts +0 -5
- package/theme/lumo/vaadin-month-calendar-styles.js +0 -158
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
3
|
-
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
const datePicker = css`
|
|
7
|
-
[part='toggle-button']::before {
|
|
8
|
-
content: var(--lumo-icons-calendar);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[part='clear-button']::before {
|
|
12
|
-
content: var(--lumo-icons-cross);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@media (max-width: 450px), (max-height: 450px) {
|
|
16
|
-
[part='overlay-content'] {
|
|
17
|
-
height: 70vh;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
|
22
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
26
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
registerStyles('vaadin-date-picker', [inputFieldShared, datePicker], { moduleId: 'lumo-date-picker' });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
registerStyles(
|
|
5
|
-
'vaadin-date-picker-year',
|
|
6
|
-
css`
|
|
7
|
-
:host([current]) [part='year-number'] {
|
|
8
|
-
color: var(--lumo-primary-text-color);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host(:not([current])) [part='year-number'],
|
|
12
|
-
[part='year-separator'] {
|
|
13
|
-
opacity: var(--_lumo-date-picker-year-opacity, 0.7);
|
|
14
|
-
transition: 0.2s opacity;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[part='year-number'],
|
|
18
|
-
[part='year-separator'] {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
height: 50%;
|
|
23
|
-
transform: translateY(-50%);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[part='year-separator']::after {
|
|
27
|
-
color: var(--lumo-disabled-text-color);
|
|
28
|
-
content: '\\2022';
|
|
29
|
-
}
|
|
30
|
-
`,
|
|
31
|
-
{ moduleId: 'lumo-date-picker-year' },
|
|
32
|
-
);
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
3
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
4
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
5
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
|
-
|
|
8
|
-
registerStyles(
|
|
9
|
-
'vaadin-month-calendar',
|
|
10
|
-
css`
|
|
11
|
-
:host {
|
|
12
|
-
-webkit-user-select: none;
|
|
13
|
-
-webkit-tap-highlight-color: transparent;
|
|
14
|
-
user-select: none;
|
|
15
|
-
font-size: var(--lumo-font-size-m);
|
|
16
|
-
color: var(--lumo-body-text-color);
|
|
17
|
-
text-align: center;
|
|
18
|
-
padding: 0 var(--lumo-space-xs);
|
|
19
|
-
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
20
|
-
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
21
|
-
--_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
|
|
22
|
-
--_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Month header */
|
|
26
|
-
|
|
27
|
-
[part='month-header'] {
|
|
28
|
-
color: var(--lumo-header-text-color);
|
|
29
|
-
font-size: var(--lumo-font-size-l);
|
|
30
|
-
line-height: 1;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
margin-bottom: var(--lumo-space-m);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Week days and numbers */
|
|
36
|
-
|
|
37
|
-
[part='weekdays'],
|
|
38
|
-
[part='weekday'],
|
|
39
|
-
[part='week-number'] {
|
|
40
|
-
font-size: var(--lumo-font-size-xxs);
|
|
41
|
-
line-height: 1;
|
|
42
|
-
color: var(--lumo-secondary-text-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[part='weekdays'] {
|
|
46
|
-
margin-bottom: var(--lumo-space-s);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[part='weekday']:empty,
|
|
50
|
-
[part='week-number'] {
|
|
51
|
-
width: var(--lumo-size-xs);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Date and week number cells */
|
|
55
|
-
|
|
56
|
-
[part~='date'],
|
|
57
|
-
[part='week-number'] {
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
display: inline-flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
height: var(--lumo-size-m);
|
|
63
|
-
position: relative;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
[part~='date'] {
|
|
67
|
-
transition: color 0.1s;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
[part~='date']:not(:empty) {
|
|
71
|
-
cursor: var(--lumo-clickable-cursor);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
75
|
-
:host([week-numbers]) [part~='date'] {
|
|
76
|
-
width: calc((100% - var(--lumo-size-xs)) / 7);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Today date */
|
|
80
|
-
|
|
81
|
-
[part~='date'][part~='today'] {
|
|
82
|
-
color: var(--_selection-color-text);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* Focused date */
|
|
86
|
-
|
|
87
|
-
[part~='date']::before {
|
|
88
|
-
content: '';
|
|
89
|
-
position: absolute;
|
|
90
|
-
z-index: -1;
|
|
91
|
-
top: 50%;
|
|
92
|
-
left: 50%;
|
|
93
|
-
transform: translate(-50%, -50%);
|
|
94
|
-
min-width: 2em;
|
|
95
|
-
min-height: 2em;
|
|
96
|
-
width: 80%;
|
|
97
|
-
height: 80%;
|
|
98
|
-
max-height: 100%;
|
|
99
|
-
max-width: 100%;
|
|
100
|
-
border-radius: var(--lumo-border-radius-m);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[part~='date'][part~='focused']::before {
|
|
104
|
-
box-shadow:
|
|
105
|
-
0 0 0 1px var(--lumo-base-color),
|
|
106
|
-
0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:host(:not([focused])) [part~='date'][part~='focused']::before {
|
|
110
|
-
animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
|
114
|
-
50% {
|
|
115
|
-
box-shadow:
|
|
116
|
-
0 0 0 1px var(--lumo-base-color),
|
|
117
|
-
0 0 0 calc(var(--_focus-ring-width) + 1px) transparent;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
[part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {
|
|
122
|
-
background-color: var(--lumo-primary-color-10pct);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
[part~='date'][part~='selected'] {
|
|
126
|
-
color: var(--lumo-primary-contrast-color);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
[part~='date'][part~='selected']::before {
|
|
130
|
-
background-color: var(--_selection-color);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
[part~='date'][part~='disabled'] {
|
|
134
|
-
color: var(--lumo-disabled-text-color);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@media (pointer: coarse) {
|
|
138
|
-
[part~='date']:hover:not([part~='selected'])::before,
|
|
139
|
-
:host(:not([focus-ring])) [part~='focused']:not([part~='selected'])::before {
|
|
140
|
-
display: none;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
[part~='date']:not(:empty):not([part~='disabled']):active::before {
|
|
144
|
-
display: block;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:host(:not([focus-ring])) [part~='date'][part~='selected']::before {
|
|
148
|
-
box-shadow: none;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/* Disabled */
|
|
152
|
-
|
|
153
|
-
:host([disabled]) * {
|
|
154
|
-
color: var(--lumo-disabled-text-color) !important;
|
|
155
|
-
}
|
|
156
|
-
`,
|
|
157
|
-
{ moduleId: 'lumo-month-calendar' },
|
|
158
|
-
);
|