@vaadin/date-picker 25.0.0-alpha1 → 25.0.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.
Files changed (38) hide show
  1. package/package.json +13 -14
  2. package/src/styles/vaadin-date-picker-base-styles.d.ts +8 -0
  3. package/src/{vaadin-date-picker-styles.js → styles/vaadin-date-picker-base-styles.js} +9 -0
  4. package/src/styles/vaadin-date-picker-overlay-base-styles.js +48 -0
  5. package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +107 -0
  6. package/src/styles/vaadin-date-picker-year-base-styles.js +26 -0
  7. package/src/styles/vaadin-month-calendar-base-styles.js +140 -0
  8. package/src/vaadin-date-picker-helper.d.ts +5 -0
  9. package/src/vaadin-date-picker-mixin.js +45 -31
  10. package/src/vaadin-date-picker-month-scroller.js +2 -6
  11. package/src/vaadin-date-picker-overlay-content-mixin.js +5 -132
  12. package/src/vaadin-date-picker-overlay-content.js +13 -17
  13. package/src/vaadin-date-picker-overlay.js +17 -3
  14. package/src/vaadin-date-picker-year-scroller.js +3 -4
  15. package/src/vaadin-date-picker-year.js +32 -9
  16. package/src/vaadin-date-picker.d.ts +11 -16
  17. package/src/vaadin-date-picker.js +23 -20
  18. package/src/vaadin-infinite-scroller.js +1 -19
  19. package/src/vaadin-month-calendar.js +3 -2
  20. package/vaadin-date-picker.js +1 -1
  21. package/web-types.json +2 -2
  22. package/web-types.lit.json +2 -2
  23. package/src/vaadin-date-picker-overlay-content-styles.js +0 -68
  24. package/src/vaadin-date-picker-overlay-styles.js +0 -23
  25. package/src/vaadin-date-picker-year-mixin.js +0 -35
  26. package/src/vaadin-month-calendar-styles.js +0 -64
  27. package/theme/lumo/vaadin-date-picker-overlay-content-styles.d.ts +0 -7
  28. package/theme/lumo/vaadin-date-picker-overlay-content-styles.js +0 -164
  29. package/theme/lumo/vaadin-date-picker-overlay-styles.d.ts +0 -2
  30. package/theme/lumo/vaadin-date-picker-overlay-styles.js +0 -55
  31. package/theme/lumo/vaadin-date-picker-styles.d.ts +0 -2
  32. package/theme/lumo/vaadin-date-picker-styles.js +0 -30
  33. package/theme/lumo/vaadin-date-picker-year-styles.d.ts +0 -1
  34. package/theme/lumo/vaadin-date-picker-year-styles.js +0 -32
  35. package/theme/lumo/vaadin-date-picker.d.ts +0 -5
  36. package/theme/lumo/vaadin-date-picker.js +0 -5
  37. package/theme/lumo/vaadin-month-calendar-styles.d.ts +0 -5
  38. 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
- );