@api-client/ui 0.5.5 → 0.5.7
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/.cursor/rules/html-and-css-best-practices.mdc +63 -0
- package/.cursor/rules/lit-best-practices.mdc +78 -0
- package/.github/instructions/html-and-css-best-practices.instructions.md +70 -0
- package/.github/instructions/lit-best-practices.instructions.md +86 -0
- package/build/src/elements/currency/currency-picker.d.ts +10 -0
- package/build/src/elements/currency/currency-picker.d.ts.map +1 -0
- package/build/src/elements/currency/currency-picker.js +27 -0
- package/build/src/elements/currency/currency-picker.js.map +1 -0
- package/build/src/elements/currency/internals/Picker.d.ts +311 -0
- package/build/src/elements/currency/internals/Picker.d.ts.map +1 -0
- package/build/src/elements/currency/internals/Picker.js +857 -0
- package/build/src/elements/currency/internals/Picker.js.map +1 -0
- package/build/src/elements/currency/internals/Picker.styles.d.ts +3 -0
- package/build/src/elements/currency/internals/Picker.styles.d.ts.map +1 -0
- package/build/src/elements/currency/internals/Picker.styles.js +58 -0
- package/build/src/elements/currency/internals/Picker.styles.js.map +1 -0
- package/build/src/elements/highlight/MarkdownStyles.d.ts.map +1 -1
- package/build/src/elements/highlight/MarkdownStyles.js +0 -13
- package/build/src/elements/highlight/MarkdownStyles.js.map +1 -1
- package/build/src/elements/http/BodyEditor.d.ts +0 -13
- package/build/src/elements/http/BodyEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyEditor.js +0 -13
- package/build/src/elements/http/BodyEditor.js.map +1 -1
- package/build/src/elements/http/BodyTextEditor.d.ts +0 -13
- package/build/src/elements/http/BodyTextEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyTextEditor.js +0 -13
- package/build/src/elements/http/BodyTextEditor.js.map +1 -1
- package/build/src/elements/http/BodyUrlEncodedEditor.d.ts +0 -13
- package/build/src/elements/http/BodyUrlEncodedEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyUrlEncodedEditor.js +0 -13
- package/build/src/elements/http/BodyUrlEncodedEditor.js.map +1 -1
- package/build/src/elements/http/UrlInput.d.ts +0 -13
- package/build/src/elements/http/UrlInput.d.ts.map +1 -1
- package/build/src/elements/http/UrlInput.js +0 -13
- package/build/src/elements/http/UrlInput.js.map +1 -1
- package/build/src/index.d.ts +2 -0
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -0
- package/build/src/index.js.map +1 -1
- package/build/src/md/button/internals/base.d.ts +1 -0
- package/build/src/md/button/internals/base.d.ts.map +1 -1
- package/build/src/md/button/internals/base.js +7 -0
- package/build/src/md/button/internals/base.js.map +1 -1
- package/build/src/md/button/internals/button.styles.js +1 -1
- package/build/src/md/button/internals/button.styles.js.map +1 -1
- package/build/src/md/date/internals/DateTime.d.ts +0 -13
- package/build/src/md/date/internals/DateTime.d.ts.map +1 -1
- package/build/src/md/date/internals/DateTime.js +0 -13
- package/build/src/md/date/internals/DateTime.js.map +1 -1
- package/build/src/md/date-picker/index.d.ts +13 -0
- package/build/src/md/date-picker/index.d.ts.map +1 -0
- package/build/src/md/date-picker/index.js +13 -0
- package/build/src/md/date-picker/index.js.map +1 -0
- package/build/src/md/date-picker/internals/DatePicker.styles.d.ts +4 -0
- package/build/src/md/date-picker/internals/DatePicker.styles.d.ts.map +1 -0
- package/build/src/md/date-picker/internals/DatePicker.styles.js +409 -0
- package/build/src/md/date-picker/internals/DatePicker.styles.js.map +1 -0
- package/build/src/md/date-picker/internals/DatePickerCalendar.d.ts +272 -0
- package/build/src/md/date-picker/internals/DatePickerCalendar.d.ts.map +1 -0
- package/build/src/md/date-picker/internals/DatePickerCalendar.js +1062 -0
- package/build/src/md/date-picker/internals/DatePickerCalendar.js.map +1 -0
- package/build/src/md/date-picker/internals/DatePickerUtils.d.ts +93 -0
- package/build/src/md/date-picker/internals/DatePickerUtils.d.ts.map +1 -0
- package/build/src/md/date-picker/internals/DatePickerUtils.js +221 -0
- package/build/src/md/date-picker/internals/DatePickerUtils.js.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-input.d.ts +160 -0
- package/build/src/md/date-picker/ui-date-picker-input.d.ts.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-input.js +464 -0
- package/build/src/md/date-picker/ui-date-picker-input.js.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-modal-input.d.ts +178 -0
- package/build/src/md/date-picker/ui-date-picker-modal-input.d.ts.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-modal-input.js +538 -0
- package/build/src/md/date-picker/ui-date-picker-modal-input.js.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-modal.d.ts +156 -0
- package/build/src/md/date-picker/ui-date-picker-modal.d.ts.map +1 -0
- package/build/src/md/date-picker/ui-date-picker-modal.js +423 -0
- package/build/src/md/date-picker/ui-date-picker-modal.js.map +1 -0
- package/build/src/md/dialog/internals/Dialog.styles.d.ts.map +1 -1
- package/build/src/md/dialog/internals/Dialog.styles.js +1 -0
- package/build/src/md/dialog/internals/Dialog.styles.js.map +1 -1
- package/demo/elements/currency/index.html +91 -0
- package/demo/elements/currency/index.ts +272 -0
- package/demo/elements/har/har2.json +1 -1
- package/demo/elements/index.html +3 -0
- package/demo/md/date-picker/date-picker.ts +336 -0
- package/demo/md/date-picker/index.html +171 -0
- package/demo/md/index.html +2 -0
- package/package.json +1 -1
- package/src/elements/currency/currency-picker.ts +14 -0
- package/src/elements/currency/internals/Picker.styles.ts +58 -0
- package/src/elements/currency/internals/Picker.ts +846 -0
- package/src/elements/highlight/MarkdownStyles.ts +0 -13
- package/src/elements/http/BodyEditor.ts +0 -13
- package/src/elements/http/BodyTextEditor.ts +0 -13
- package/src/elements/http/BodyUrlEncodedEditor.ts +0 -13
- package/src/elements/http/UrlInput.ts +0 -13
- package/src/index.ts +17 -0
- package/src/md/button/internals/base.ts +7 -0
- package/src/md/button/internals/button.styles.ts +1 -1
- package/src/md/date/internals/DateTime.ts +0 -14
- package/src/md/date-picker/README.md +184 -0
- package/src/md/date-picker/index.ts +17 -0
- package/src/md/date-picker/internals/DatePicker.styles.ts +411 -0
- package/src/md/date-picker/internals/DatePickerCalendar.ts +1031 -0
- package/src/md/date-picker/internals/DatePickerUtils.ts +288 -0
- package/src/md/date-picker/ui-date-picker-input.ts +333 -0
- package/src/md/date-picker/ui-date-picker-modal-input.ts +440 -0
- package/src/md/date-picker/ui-date-picker-modal.ts +346 -0
- package/src/md/dialog/internals/Dialog.styles.ts +1 -0
- package/test/README.md +3 -2
- package/test/elements/currency/CurrencyPicker.accessibility.test.ts +328 -0
- package/test/elements/currency/CurrencyPicker.core.test.ts +318 -0
- package/test/elements/currency/CurrencyPicker.integration.test.ts +482 -0
- package/test/elements/currency/CurrencyPicker.test.ts +486 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const calendarStyles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
font-family: 'Roboto', sans-serif;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
border-radius: 12px;
|
|
8
|
+
background: var(--md-sys-color-surface-container-high);
|
|
9
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
10
|
+
box-shadow: var(--md-sys-elevation-2);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.calendar {
|
|
15
|
+
padding: 20px 12px 12px 12px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Header */
|
|
19
|
+
.header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
margin-bottom: 30px;
|
|
24
|
+
gap: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.month-year {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
flex: 1;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.month-selector,
|
|
35
|
+
.year-selector {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.month-year-text {
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
color: var(--md-sys-color-on-surface);
|
|
44
|
+
min-width: 120px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Weekdays header */
|
|
48
|
+
.weekdays {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: repeat(7, 40px);
|
|
51
|
+
margin-bottom: 16px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.weekday {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
height: 32px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Calendar grid */
|
|
66
|
+
.days {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: repeat(7, 40px);
|
|
69
|
+
gap: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.day-cell {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
position: relative;
|
|
77
|
+
width: 40px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.day-cell.in-range.has-complete-range {
|
|
81
|
+
background: var(--md-sys-color-secondary-container);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.day-cell.range-start.has-complete-range:not(.range-end) {
|
|
85
|
+
background: linear-gradient(to right, transparent 50%, var(--md-sys-color-secondary-container) 50%);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.day-cell.range-end.has-complete-range:not(.range-start) {
|
|
89
|
+
background: linear-gradient(to left, transparent 50%, var(--md-sys-color-secondary-container) 50%);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.day-cell.range-start.range-end.has-complete-range {
|
|
93
|
+
background: transparent;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.day-button {
|
|
97
|
+
width: 40px !important;
|
|
98
|
+
height: 40px !important;
|
|
99
|
+
min-width: 40px !important;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.day-button.other-month {
|
|
104
|
+
opacity: 0.38;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.nav-button,
|
|
108
|
+
.month-button,
|
|
109
|
+
.year-button,
|
|
110
|
+
.other-month .day-button:not([color='filled']):not([disabled]) {
|
|
111
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.month-button,
|
|
115
|
+
.year-button {
|
|
116
|
+
padding: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.weekday:not([color='filled']),
|
|
120
|
+
.day-button:not([color='filled']):not([disabled]) {
|
|
121
|
+
color: var(--md-sys-color-on-surface);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.today .day-button:not([color='filled']) {
|
|
125
|
+
color: var(--md-sys-color-primary);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.today .day-button {
|
|
129
|
+
--md-button-outline-color: var(--md-sys-color-primary);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Dropdown views */
|
|
133
|
+
.dropdown-view {
|
|
134
|
+
min-height: 300px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.close-button {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
width: 32px;
|
|
142
|
+
height: 32px;
|
|
143
|
+
border: none;
|
|
144
|
+
background: transparent;
|
|
145
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
border-radius: 16px;
|
|
148
|
+
transition: background-color 0.2s ease;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.close-button:hover {
|
|
152
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.close-button:focus {
|
|
156
|
+
outline: none;
|
|
157
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Month dropdown */
|
|
161
|
+
.month-list {
|
|
162
|
+
display: grid;
|
|
163
|
+
grid-template-columns: repeat(3, 1fr);
|
|
164
|
+
gap: 8px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.year-option:not(.selected),
|
|
168
|
+
.month-option:not(.selected) {
|
|
169
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Year dropdown */
|
|
173
|
+
.year-grid {
|
|
174
|
+
display: grid;
|
|
175
|
+
grid-template-columns: repeat(4, 1fr);
|
|
176
|
+
gap: 4px;
|
|
177
|
+
max-height: 240px;
|
|
178
|
+
overflow-y: auto;
|
|
179
|
+
padding: 4px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.actions {
|
|
183
|
+
margin-top: 8px;
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: flex-end;
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
export const inputStyles = css `
|
|
189
|
+
:host {
|
|
190
|
+
display: inline-block;
|
|
191
|
+
width: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.input-container {
|
|
195
|
+
position: relative;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dropdown-container {
|
|
199
|
+
position: absolute;
|
|
200
|
+
position-anchor: --ui-date-picker-anchor;
|
|
201
|
+
top: anchor(bottom);
|
|
202
|
+
left: anchor(left);
|
|
203
|
+
z-index: 1000;
|
|
204
|
+
margin-top: 4px;
|
|
205
|
+
min-width: anchor-size(width);
|
|
206
|
+
width: max-content;
|
|
207
|
+
max-width: calc(100vw - 32px);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.backdrop {
|
|
211
|
+
position: fixed;
|
|
212
|
+
top: 0;
|
|
213
|
+
left: 0;
|
|
214
|
+
right: 0;
|
|
215
|
+
bottom: 0;
|
|
216
|
+
z-index: 999;
|
|
217
|
+
background: transparent;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.calendar-icon {
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
export const modalStyles = css `
|
|
225
|
+
.modal-header {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: space-between;
|
|
229
|
+
padding: 24px 24px 16px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.modal-title {
|
|
233
|
+
font-size: 24px;
|
|
234
|
+
font-weight: 400;
|
|
235
|
+
color: var(--md-sys-color-on-surface);
|
|
236
|
+
margin: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.modal-content {
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: column;
|
|
242
|
+
align-items: center;
|
|
243
|
+
gap: 24px;
|
|
244
|
+
max-height: 60vh;
|
|
245
|
+
overflow-y: auto;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.modal-content ui-date-picker-calendar {
|
|
249
|
+
box-shadow: none;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.date-range-display {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
gap: 16px;
|
|
256
|
+
padding: 16px;
|
|
257
|
+
background: var(--md-sys-color-surface-container-highest);
|
|
258
|
+
border-radius: 12px;
|
|
259
|
+
width: 100%;
|
|
260
|
+
max-width: 320px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.date-display {
|
|
264
|
+
flex: 1;
|
|
265
|
+
text-align: center;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.date-label {
|
|
269
|
+
font-size: 12px;
|
|
270
|
+
font-weight: 500;
|
|
271
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
272
|
+
text-transform: uppercase;
|
|
273
|
+
margin-bottom: 4px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.date-value {
|
|
277
|
+
font-size: 16px;
|
|
278
|
+
font-weight: 400;
|
|
279
|
+
color: var(--md-sys-color-on-surface);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.date-separator {
|
|
283
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
284
|
+
font-size: 18px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Input container and format help styles */
|
|
288
|
+
.input-container {
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-direction: column;
|
|
291
|
+
gap: 16px;
|
|
292
|
+
width: 100%;
|
|
293
|
+
max-width: 320px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.format-help {
|
|
297
|
+
padding: 12px 16px;
|
|
298
|
+
background: var(--md-sys-color-surface-container-highest);
|
|
299
|
+
border-radius: 8px;
|
|
300
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.help-title {
|
|
304
|
+
margin: 0 0 8px 0;
|
|
305
|
+
font-size: 14px;
|
|
306
|
+
color: var(--md-sys-color-on-surface);
|
|
307
|
+
line-height: 1.4;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.help-examples {
|
|
311
|
+
margin: 0;
|
|
312
|
+
font-size: 13px;
|
|
313
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
314
|
+
line-height: 1.4;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Accessibility utilities */
|
|
318
|
+
.visually-hidden {
|
|
319
|
+
position: absolute;
|
|
320
|
+
width: 1px;
|
|
321
|
+
height: 1px;
|
|
322
|
+
padding: 0;
|
|
323
|
+
margin: -1px;
|
|
324
|
+
overflow: hidden;
|
|
325
|
+
clip: rect(0, 0, 0, 0);
|
|
326
|
+
white-space: nowrap;
|
|
327
|
+
border: 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
fieldset {
|
|
331
|
+
border: none;
|
|
332
|
+
margin: 0;
|
|
333
|
+
padding: 0;
|
|
334
|
+
display: flex;
|
|
335
|
+
flex-direction: column;
|
|
336
|
+
gap: 16px;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/* Modal header actions and input mode styles */
|
|
340
|
+
.header-actions {
|
|
341
|
+
display: flex;
|
|
342
|
+
gap: 8px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.input-mode-placeholder {
|
|
346
|
+
padding: 24px;
|
|
347
|
+
text-align: center;
|
|
348
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.input-mode-icon {
|
|
352
|
+
font-size: 48px;
|
|
353
|
+
margin-bottom: 16px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.modal-actions {
|
|
357
|
+
display: flex;
|
|
358
|
+
justify-content: flex-end;
|
|
359
|
+
gap: 8px;
|
|
360
|
+
padding: 16px 24px;
|
|
361
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* Calendar Action Buttons */
|
|
365
|
+
.actions {
|
|
366
|
+
display: flex;
|
|
367
|
+
justify-content: flex-end;
|
|
368
|
+
gap: 8px;
|
|
369
|
+
margin-top: 16px;
|
|
370
|
+
padding-top: 16px;
|
|
371
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* Pending selection state */
|
|
375
|
+
.day.pending {
|
|
376
|
+
background: var(--md-sys-color-secondary-container);
|
|
377
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
378
|
+
border: 2px solid var(--md-sys-color-secondary);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.day.pending.selected {
|
|
382
|
+
background: var(--md-sys-color-secondary);
|
|
383
|
+
color: var(--md-sys-color-on-secondary);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.day.pending.range-start,
|
|
387
|
+
.day.pending.range-end {
|
|
388
|
+
background: var(--md-sys-color-secondary);
|
|
389
|
+
color: var(--md-sys-color-on-secondary);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.day.pending.in-range {
|
|
393
|
+
background: var(--md-sys-color-secondary-container);
|
|
394
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Responsive */
|
|
398
|
+
@media (max-width: 640px) {
|
|
399
|
+
.modal-content {
|
|
400
|
+
padding: 16px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.calendar {
|
|
404
|
+
width: 100%;
|
|
405
|
+
max-width: 320px;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
`;
|
|
409
|
+
//# sourceMappingURL=DatePicker.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.styles.js","sourceRoot":"","sources":["../../../../../src/md/date-picker/internals/DatePicker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLhC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC7B,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwL7B,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport const calendarStyles = css`\n :host {\n display: block;\n font-family: 'Roboto', sans-serif;\n font-size: 14px;\n border-radius: 12px;\n background: var(--md-sys-color-surface-container-high);\n border: 1px solid var(--md-sys-color-outline-variant);\n box-shadow: var(--md-sys-elevation-2);\n overflow: hidden;\n }\n\n .calendar {\n padding: 20px 12px 12px 12px;\n }\n\n /* Header */\n .header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 30px;\n gap: 8px;\n }\n\n .month-year {\n display: flex;\n align-items: center;\n flex: 1;\n justify-content: space-between;\n }\n\n .month-selector,\n .year-selector {\n display: flex;\n align-items: center;\n }\n\n .month-year-text {\n font-size: 16px;\n font-weight: 500;\n color: var(--md-sys-color-on-surface);\n min-width: 120px;\n }\n\n /* Weekdays header */\n .weekdays {\n display: grid;\n grid-template-columns: repeat(7, 40px);\n margin-bottom: 16px;\n }\n\n .weekday {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n font-size: 12px;\n font-weight: 500;\n color: var(--md-sys-color-on-surface-variant);\n text-transform: uppercase;\n }\n\n /* Calendar grid */\n .days {\n display: grid;\n grid-template-columns: repeat(7, 40px);\n gap: 0;\n }\n\n .day-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 40px;\n }\n\n .day-cell.in-range.has-complete-range {\n background: var(--md-sys-color-secondary-container);\n }\n\n .day-cell.range-start.has-complete-range:not(.range-end) {\n background: linear-gradient(to right, transparent 50%, var(--md-sys-color-secondary-container) 50%);\n }\n\n .day-cell.range-end.has-complete-range:not(.range-start) {\n background: linear-gradient(to left, transparent 50%, var(--md-sys-color-secondary-container) 50%);\n }\n\n .day-cell.range-start.range-end.has-complete-range {\n background: transparent;\n }\n\n .day-button {\n width: 40px !important;\n height: 40px !important;\n min-width: 40px !important;\n padding: 0;\n }\n\n .day-button.other-month {\n opacity: 0.38;\n }\n\n .nav-button,\n .month-button,\n .year-button,\n .other-month .day-button:not([color='filled']):not([disabled]) {\n color: var(--md-sys-color-on-surface-variant);\n }\n\n .month-button,\n .year-button {\n padding: 0;\n }\n\n .weekday:not([color='filled']),\n .day-button:not([color='filled']):not([disabled]) {\n color: var(--md-sys-color-on-surface);\n }\n\n .today .day-button:not([color='filled']) {\n color: var(--md-sys-color-primary);\n }\n\n .today .day-button {\n --md-button-outline-color: var(--md-sys-color-primary);\n }\n\n /* Dropdown views */\n .dropdown-view {\n min-height: 300px;\n }\n\n .close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: var(--md-sys-color-on-surface-variant);\n cursor: pointer;\n border-radius: 16px;\n transition: background-color 0.2s ease;\n }\n\n .close-button:hover {\n background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);\n }\n\n .close-button:focus {\n outline: none;\n background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);\n }\n\n /* Month dropdown */\n .month-list {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n }\n\n .year-option:not(.selected),\n .month-option:not(.selected) {\n color: var(--md-sys-color-on-surface-variant);\n }\n\n /* Year dropdown */\n .year-grid {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 4px;\n max-height: 240px;\n overflow-y: auto;\n padding: 4px;\n }\n\n .actions {\n margin-top: 8px;\n display: flex;\n justify-content: flex-end;\n }\n`\n\nexport const inputStyles = css`\n :host {\n display: inline-block;\n width: 100%;\n }\n\n .input-container {\n position: relative;\n }\n\n .dropdown-container {\n position: absolute;\n position-anchor: --ui-date-picker-anchor;\n top: anchor(bottom);\n left: anchor(left);\n z-index: 1000;\n margin-top: 4px;\n min-width: anchor-size(width);\n width: max-content;\n max-width: calc(100vw - 32px);\n }\n\n .backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n background: transparent;\n }\n\n .calendar-icon {\n cursor: pointer;\n }\n`\n\nexport const modalStyles = css`\n .modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 24px 24px 16px;\n }\n\n .modal-title {\n font-size: 24px;\n font-weight: 400;\n color: var(--md-sys-color-on-surface);\n margin: 0;\n }\n\n .modal-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n max-height: 60vh;\n overflow-y: auto;\n }\n\n .modal-content ui-date-picker-calendar {\n box-shadow: none;\n }\n\n .date-range-display {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: var(--md-sys-color-surface-container-highest);\n border-radius: 12px;\n width: 100%;\n max-width: 320px;\n }\n\n .date-display {\n flex: 1;\n text-align: center;\n }\n\n .date-label {\n font-size: 12px;\n font-weight: 500;\n color: var(--md-sys-color-on-surface-variant);\n text-transform: uppercase;\n margin-bottom: 4px;\n }\n\n .date-value {\n font-size: 16px;\n font-weight: 400;\n color: var(--md-sys-color-on-surface);\n }\n\n .date-separator {\n color: var(--md-sys-color-on-surface-variant);\n font-size: 18px;\n }\n\n /* Input container and format help styles */\n .input-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n max-width: 320px;\n }\n\n .format-help {\n padding: 12px 16px;\n background: var(--md-sys-color-surface-container-highest);\n border-radius: 8px;\n border: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .help-title {\n margin: 0 0 8px 0;\n font-size: 14px;\n color: var(--md-sys-color-on-surface);\n line-height: 1.4;\n }\n\n .help-examples {\n margin: 0;\n font-size: 13px;\n color: var(--md-sys-color-on-surface-variant);\n line-height: 1.4;\n }\n\n /* Accessibility utilities */\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n /* Modal header actions and input mode styles */\n .header-actions {\n display: flex;\n gap: 8px;\n }\n\n .input-mode-placeholder {\n padding: 24px;\n text-align: center;\n color: var(--md-sys-color-on-surface-variant);\n }\n\n .input-mode-icon {\n font-size: 48px;\n margin-bottom: 16px;\n }\n\n .modal-actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 16px 24px;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n /* Calendar Action Buttons */\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n /* Pending selection state */\n .day.pending {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n border: 2px solid var(--md-sys-color-secondary);\n }\n\n .day.pending.selected {\n background: var(--md-sys-color-secondary);\n color: var(--md-sys-color-on-secondary);\n }\n\n .day.pending.range-start,\n .day.pending.range-end {\n background: var(--md-sys-color-secondary);\n color: var(--md-sys-color-on-secondary);\n }\n\n .day.pending.in-range {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n /* Responsive */\n @media (max-width: 640px) {\n .modal-content {\n padding: 16px;\n }\n\n .calendar {\n width: 100%;\n max-width: 320px;\n }\n }\n`\n"]}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { DateRange } from './DatePickerUtils.js';
|
|
3
|
+
import '../../../md/icons/ui-icon.js';
|
|
4
|
+
import '../../../md/button/ui-button.js';
|
|
5
|
+
import '../../../md/icon-button/ui-icon-button.js';
|
|
6
|
+
/**
|
|
7
|
+
* Event dispatched when a single date is selected in immediate mode
|
|
8
|
+
* or confirmed in pending mode.
|
|
9
|
+
*/
|
|
10
|
+
export interface DateSelectEvent {
|
|
11
|
+
date: Date;
|
|
12
|
+
formattedDate: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Event dispatched when a date range is completed in immediate mode.
|
|
16
|
+
* Only fired when both start and end dates are selected.
|
|
17
|
+
*/
|
|
18
|
+
export interface DateRangeSelectEvent {
|
|
19
|
+
range: DateRange;
|
|
20
|
+
formattedRange: {
|
|
21
|
+
start: string | null;
|
|
22
|
+
end: string | null;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Event dispatched when a date range selection is confirmed
|
|
27
|
+
* via the OK button in pending mode.
|
|
28
|
+
*/
|
|
29
|
+
export interface DateRangeConfirmEvent {
|
|
30
|
+
range: DateRange | null;
|
|
31
|
+
formattedRange: {
|
|
32
|
+
start: string | null;
|
|
33
|
+
end: string | null;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Event dispatched when user cancels a pending selection
|
|
38
|
+
* via the Cancel button or Escape key.
|
|
39
|
+
*/
|
|
40
|
+
export interface DateCancelEvent {
|
|
41
|
+
reason?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A calendar grid component for date selection.
|
|
45
|
+
* Supports single date selection and date range selection with full keyboard navigation.
|
|
46
|
+
*
|
|
47
|
+
* ## Features
|
|
48
|
+
* - Single date and date range selection
|
|
49
|
+
* - Keyboard navigation support (arrow keys, home, end, page up/down)
|
|
50
|
+
* - Configurable date restrictions (min/max dates, disabled dates)
|
|
51
|
+
* - Localization support for date formatting and month/day names
|
|
52
|
+
* - Optional action buttons for pending selections
|
|
53
|
+
* - Accessible design with proper ARIA attributes
|
|
54
|
+
*
|
|
55
|
+
* ## Events
|
|
56
|
+
* - `date-select`: Fired when a single date is selected/confirmed
|
|
57
|
+
* - `date-range-select`: Fired when a date range is completed (immediate mode)
|
|
58
|
+
* - `date-range-confirm`: Fired when a date range is confirmed (pending mode)
|
|
59
|
+
* - `date-cancel`: Fired when a pending selection is cancelled
|
|
60
|
+
*
|
|
61
|
+
* ## Usage
|
|
62
|
+
*
|
|
63
|
+
* ```html
|
|
64
|
+
* <ui-date-picker-calendar></ui-date-picker-calendar>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* ### Single date selection
|
|
68
|
+
* ```html
|
|
69
|
+
* <ui-date-picker-calendar
|
|
70
|
+
* .selectedDate=${new Date()}
|
|
71
|
+
* @date-select=${this.handleDateSelect}
|
|
72
|
+
* ></ui-date-picker-calendar>
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* ### Date range selection
|
|
76
|
+
* ```html
|
|
77
|
+
* <ui-date-picker-calendar
|
|
78
|
+
* rangeSelection
|
|
79
|
+
* .rangeStart=${new Date()}
|
|
80
|
+
* .rangeEnd=${null}
|
|
81
|
+
* @date-range-select=${this.handleRangeSelect}
|
|
82
|
+
* ></ui-date-picker-calendar>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* ### With action buttons and restrictions
|
|
86
|
+
* ```html
|
|
87
|
+
* <ui-date-picker-calendar
|
|
88
|
+
* rangeSelection
|
|
89
|
+
* showActions
|
|
90
|
+
* .minDate=${new Date()}
|
|
91
|
+
* .maxDate=${new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)}
|
|
92
|
+
* @date-range-confirm=${this.handleRangeConfirm}
|
|
93
|
+
* @date-cancel=${this.handleCancel}
|
|
94
|
+
* ></ui-date-picker-calendar>
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare class UiDatePickerCalendar extends LitElement {
|
|
98
|
+
static styles: import("lit").CSSResult;
|
|
99
|
+
/**
|
|
100
|
+
* The currently displayed year
|
|
101
|
+
*/
|
|
102
|
+
accessor year: number;
|
|
103
|
+
/**
|
|
104
|
+
* The currently displayed month (0-indexed, where 0 = January)
|
|
105
|
+
*/
|
|
106
|
+
accessor month: number;
|
|
107
|
+
/**
|
|
108
|
+
* The currently selected date for single selection mode.
|
|
109
|
+
* Set to null for no selection.
|
|
110
|
+
*/
|
|
111
|
+
accessor selectedDate: Date | null;
|
|
112
|
+
/**
|
|
113
|
+
* The start date of the selected range for range selection mode.
|
|
114
|
+
* Used in combination with rangeEnd to define a date range.
|
|
115
|
+
*/
|
|
116
|
+
accessor rangeStart: Date | null;
|
|
117
|
+
/**
|
|
118
|
+
* The end date of the selected range for range selection mode.
|
|
119
|
+
* Used in combination with rangeStart to define a date range.
|
|
120
|
+
*/
|
|
121
|
+
accessor rangeEnd: Date | null;
|
|
122
|
+
/**
|
|
123
|
+
* Enable range selection mode. When true, users can select date ranges
|
|
124
|
+
* instead of single dates. Affects event dispatching and UI behavior.
|
|
125
|
+
*/
|
|
126
|
+
accessor rangeSelection: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Minimum selectable date. Dates before this will be disabled.
|
|
129
|
+
* Set to undefined for no minimum restriction.
|
|
130
|
+
*/
|
|
131
|
+
accessor minDate: Date | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Maximum selectable date. Dates after this will be disabled.
|
|
134
|
+
* Set to undefined for no maximum restriction.
|
|
135
|
+
*/
|
|
136
|
+
accessor maxDate: Date | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Array of specific dates to disable. These dates will not be selectable
|
|
139
|
+
* regardless of minDate and maxDate settings.
|
|
140
|
+
*/
|
|
141
|
+
accessor disabledDates: Date[] | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Locale for date formatting and month/day names (e.g., 'en-US', 'fr-FR').
|
|
144
|
+
* Defaults to browser locale if not specified.
|
|
145
|
+
*/
|
|
146
|
+
accessor locale: string | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Whether to show navigation controls (previous/next month and year buttons).
|
|
149
|
+
* When false, users can only navigate using keyboard or programmatically.
|
|
150
|
+
*/
|
|
151
|
+
accessor showNavigation: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Whether to show action buttons (OK/Cancel). When true, selections are pending
|
|
154
|
+
* until confirmed with the OK button. When false, selections are immediate.
|
|
155
|
+
*/
|
|
156
|
+
accessor showActions: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Text label for the OK/confirm button. Only visible when showActions is true.
|
|
159
|
+
*/
|
|
160
|
+
accessor okButtonText: string;
|
|
161
|
+
/**
|
|
162
|
+
* Text label for the Cancel button. Only visible when showActions is true.
|
|
163
|
+
*/
|
|
164
|
+
accessor cancelButtonText: string;
|
|
165
|
+
private accessor calendarData;
|
|
166
|
+
private accessor monthNames;
|
|
167
|
+
private accessor showMonthDropdown;
|
|
168
|
+
private accessor showYearDropdown;
|
|
169
|
+
private accessor pendingDate;
|
|
170
|
+
private accessor pendingRangeStart;
|
|
171
|
+
private accessor pendingRangeEnd;
|
|
172
|
+
private accessor focusedDate;
|
|
173
|
+
connectedCallback(): void;
|
|
174
|
+
firstUpdated(): void;
|
|
175
|
+
disconnectedCallback(): void;
|
|
176
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
177
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
178
|
+
private updateFocus;
|
|
179
|
+
private scrollSelectedYearIntoView;
|
|
180
|
+
private updateFocusedDateForMonthChange;
|
|
181
|
+
private updateCalendar;
|
|
182
|
+
private updateMonthNames;
|
|
183
|
+
private navigateMonth;
|
|
184
|
+
private handlePrevMonth;
|
|
185
|
+
private handleNextMonth;
|
|
186
|
+
private handlePrevYear;
|
|
187
|
+
private handleNextYear;
|
|
188
|
+
private handleMonthClick;
|
|
189
|
+
private handleYearClick;
|
|
190
|
+
private handleMonthSelect;
|
|
191
|
+
private handleYearSelect;
|
|
192
|
+
private closeDropdowns;
|
|
193
|
+
private navigateDate;
|
|
194
|
+
private findNextAvailableDate;
|
|
195
|
+
private focusFirstDayOfMonth;
|
|
196
|
+
private focusLastDayOfMonth;
|
|
197
|
+
private selectFocusedDate;
|
|
198
|
+
private handleDayClick;
|
|
199
|
+
private handleSingleSelection;
|
|
200
|
+
private handleRangeSelection;
|
|
201
|
+
/**
|
|
202
|
+
* Helper to get the current range state (either immediate or pending)
|
|
203
|
+
*/
|
|
204
|
+
private getCurrentRange;
|
|
205
|
+
/**
|
|
206
|
+
* Helper to check if we have a complete range in the current mode
|
|
207
|
+
*/
|
|
208
|
+
private hasCompleteRange;
|
|
209
|
+
private setRangeValues;
|
|
210
|
+
/**
|
|
211
|
+
* Helper to dispatch date selection events
|
|
212
|
+
*/
|
|
213
|
+
private dispatchDateEvent;
|
|
214
|
+
/**
|
|
215
|
+
* Helper to dispatch range selection events
|
|
216
|
+
*/
|
|
217
|
+
private dispatchRangeEvent;
|
|
218
|
+
/**
|
|
219
|
+
* Helper to dispatch range confirmation events
|
|
220
|
+
*/
|
|
221
|
+
private dispatchRangeConfirmEvent;
|
|
222
|
+
/**
|
|
223
|
+
* Helper to dispatch cancel events
|
|
224
|
+
*/
|
|
225
|
+
private dispatchCancelEvent;
|
|
226
|
+
private isDateDisabled;
|
|
227
|
+
private handleConfirm;
|
|
228
|
+
private handleCancel;
|
|
229
|
+
/**
|
|
230
|
+
* Helper to render navigation buttons
|
|
231
|
+
*/
|
|
232
|
+
private renderNavButton;
|
|
233
|
+
private renderNavigation;
|
|
234
|
+
private renderWeekdays;
|
|
235
|
+
/**
|
|
236
|
+
* Helper to determine day selection state for rendering
|
|
237
|
+
*/
|
|
238
|
+
private getDaySelectionState;
|
|
239
|
+
/**
|
|
240
|
+
* Helper to determine button color for a day
|
|
241
|
+
*/
|
|
242
|
+
private getDayButtonColor;
|
|
243
|
+
private renderDay;
|
|
244
|
+
private renderDays;
|
|
245
|
+
private renderActions;
|
|
246
|
+
/**
|
|
247
|
+
* Helper to render dropdown option buttons
|
|
248
|
+
*/
|
|
249
|
+
private renderDropdownOption;
|
|
250
|
+
private renderMonthDropdown;
|
|
251
|
+
private renderYearDropdown;
|
|
252
|
+
private findFirstAvailableDate;
|
|
253
|
+
private handleKeyDown;
|
|
254
|
+
/**
|
|
255
|
+
* Helper to check if a date is in the current month and not disabled
|
|
256
|
+
*/
|
|
257
|
+
private isDateAvailable;
|
|
258
|
+
private initializeFocusedDate;
|
|
259
|
+
render(): TemplateResult;
|
|
260
|
+
}
|
|
261
|
+
declare global {
|
|
262
|
+
interface HTMLElementTagNameMap {
|
|
263
|
+
'ui-date-picker-calendar': UiDatePickerCalendar;
|
|
264
|
+
}
|
|
265
|
+
interface HTMLElementEventMap {
|
|
266
|
+
'date-select': CustomEvent<DateSelectEvent>;
|
|
267
|
+
'date-range-select': CustomEvent<DateRangeSelectEvent>;
|
|
268
|
+
'date-range-confirm': CustomEvent<DateRangeConfirmEvent>;
|
|
269
|
+
'date-cancel': CustomEvent<DateCancelEvent>;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=DatePickerCalendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePickerCalendar.d.ts","sourceRoot":"","sources":["../../../../../src/md/date-picker/internals/DatePickerCalendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,cAAc,EAAW,MAAM,KAAK,CAAA;AAI/D,OAAO,EAGL,SAAS,EAOV,MAAM,sBAAsB,CAAA;AAC7B,OAAO,8BAA8B,CAAA;AACrC,OAAO,iCAAiC,CAAA;AACxC,OAAO,2CAA2C,CAAA;AAElD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,EAAE;QACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;KACnB,CAAA;CACF;AAED;;;GAGG;AAC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