@vaadin/date-picker 25.0.0-alpha9 → 25.0.0-beta1

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.
Files changed (35) hide show
  1. package/package.json +13 -16
  2. package/src/styles/vaadin-date-picker-base-styles.js +2 -2
  3. package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +10 -9
  4. package/src/styles/vaadin-date-picker-year-base-styles.js +3 -2
  5. package/src/styles/vaadin-month-calendar-base-styles.js +12 -9
  6. package/src/vaadin-date-picker-helper.js +1 -1
  7. package/src/vaadin-date-picker-mixin.d.ts +1 -3
  8. package/src/vaadin-date-picker-mixin.js +6 -7
  9. package/src/vaadin-date-picker-overlay-content.js +7 -1
  10. package/src/vaadin-date-picker-overlay.js +2 -2
  11. package/src/vaadin-date-picker-year.js +1 -2
  12. package/src/vaadin-date-picker.d.ts +32 -23
  13. package/src/vaadin-date-picker.js +35 -25
  14. package/src/vaadin-month-calendar.js +1 -1
  15. package/vaadin-date-picker.js +1 -1
  16. package/web-types.json +3 -25
  17. package/web-types.lit.json +3 -10
  18. package/src/styles/vaadin-date-picker-core-styles.d.ts +0 -8
  19. package/src/styles/vaadin-date-picker-core-styles.js +0 -21
  20. package/src/styles/vaadin-date-picker-overlay-content-core-styles.js +0 -54
  21. package/src/styles/vaadin-date-picker-overlay-core-styles.js +0 -23
  22. package/src/styles/vaadin-date-picker-year-core-styles.js +0 -13
  23. package/src/styles/vaadin-month-calendar-core-styles.js +0 -64
  24. package/theme/lumo/vaadin-date-picker-overlay-content-styles.d.ts +0 -7
  25. package/theme/lumo/vaadin-date-picker-overlay-content-styles.js +0 -137
  26. package/theme/lumo/vaadin-date-picker-overlay-styles.d.ts +0 -2
  27. package/theme/lumo/vaadin-date-picker-overlay-styles.js +0 -54
  28. package/theme/lumo/vaadin-date-picker-styles.d.ts +0 -2
  29. package/theme/lumo/vaadin-date-picker-styles.js +0 -30
  30. package/theme/lumo/vaadin-date-picker-year-styles.d.ts +0 -1
  31. package/theme/lumo/vaadin-date-picker-year-styles.js +0 -32
  32. package/theme/lumo/vaadin-date-picker.d.ts +0 -5
  33. package/theme/lumo/vaadin-date-picker.js +0 -5
  34. package/theme/lumo/vaadin-month-calendar-styles.d.ts +0 -5
  35. package/theme/lumo/vaadin-month-calendar-styles.js +0 -158
@@ -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
- );