@aurodesignsystem-dev/auro-formkit 0.0.0-pr1489.5 → 0.0.0-pr1489.6
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/components/checkbox/demo/customize.min.js +249 -125
- package/components/checkbox/demo/getting-started.min.js +249 -125
- package/components/checkbox/demo/index.min.js +249 -125
- package/components/checkbox/demo/styles.min.css +1 -1
- package/components/checkbox/dist/index.js +249 -125
- package/components/checkbox/dist/registered.js +249 -125
- package/components/combobox/demo/customize.min.js +502 -254
- package/components/combobox/demo/getting-started.min.js +502 -254
- package/components/combobox/demo/index.min.js +502 -254
- package/components/combobox/demo/styles.min.css +1 -1
- package/components/combobox/dist/index.js +502 -254
- package/components/combobox/dist/registered.js +502 -254
- package/components/counter/demo/customize.min.js +250 -126
- package/components/counter/demo/index.min.js +250 -126
- package/components/counter/demo/styles.min.css +1 -1
- package/components/counter/dist/index.js +249 -125
- package/components/counter/dist/registered.js +249 -125
- package/components/datepicker/demo/accessibility.md +9 -6
- package/components/datepicker/demo/api.md +1 -1
- package/components/datepicker/demo/customize.min.js +1544 -527
- package/components/datepicker/demo/index.md +6 -4
- package/components/datepicker/demo/index.min.js +1560 -532
- package/components/datepicker/demo/keyboard-behavior.md +15 -15
- package/components/datepicker/demo/styles.min.css +1 -1
- package/components/datepicker/demo/voiceover.md +5 -3
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/index.js +1536 -519
- package/components/datepicker/dist/registered.js +1536 -519
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +50 -15
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +9 -0
- package/components/datepicker/dist/src/auro-calendar.d.ts +161 -8
- package/components/datepicker/dist/src/auro-datepicker.d.ts +5 -7
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/styles.min.css +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +3263 -1378
- package/components/form/demo/getting-started.min.js +3263 -1378
- package/components/form/demo/index.min.js +3263 -1378
- package/components/form/demo/registerDemoDeps.min.js +3263 -1378
- package/components/form/demo/styles.min.css +1 -1
- package/components/input/demo/customize.min.js +249 -125
- package/components/input/demo/getting-started.min.js +249 -125
- package/components/input/demo/index.min.js +249 -125
- package/components/input/demo/styles.min.css +1 -1
- package/components/input/dist/index.js +249 -125
- package/components/input/dist/registered.js +249 -125
- package/components/menu/demo/styles.min.css +1 -1
- package/components/radio/demo/customize.min.js +249 -125
- package/components/radio/demo/getting-started.min.js +249 -125
- package/components/radio/demo/index.min.js +249 -125
- package/components/radio/demo/styles.min.css +1 -1
- package/components/radio/dist/index.js +249 -125
- package/components/radio/dist/registered.js +249 -125
- package/components/select/demo/customize.min.js +250 -126
- package/components/select/demo/getting-started.min.js +250 -126
- package/components/select/demo/index.min.js +250 -126
- package/components/select/demo/styles.min.css +1 -1
- package/components/select/dist/index.js +250 -126
- package/components/select/dist/registered.js +250 -126
- package/custom-elements.json +1818 -1491
- package/package.json +8 -8
|
@@ -8,109 +8,236 @@ import 'lit-html';
|
|
|
8
8
|
import 'lit-html/directives/unsafe-html.js';
|
|
9
9
|
import { repeat } from 'lit/directives/repeat.js';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description Splits a date string into its parts according to the provided format. Does NOT validate that the result is a real calendar date — use `parseDate` when validation is required.
|
|
13
|
+
* @param {string} dateStr - Date string to parse.
|
|
14
|
+
* @param {string} format - Date format to parse.
|
|
15
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
16
|
+
*/
|
|
17
|
+
function getDateParts$1(dateStr, format) {
|
|
18
|
+
if (!dateStr) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
const formatSeparatorMatch = format.match(/[/.-]/);
|
|
23
|
+
let valueParts;
|
|
24
|
+
let formatParts;
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
if (formatSeparatorMatch) {
|
|
27
|
+
const separator = formatSeparatorMatch[0];
|
|
28
|
+
valueParts = dateStr.split(separator);
|
|
29
|
+
formatParts = format.split(separator);
|
|
30
|
+
} else {
|
|
31
|
+
if (dateStr.match(/[/.-]/)) {
|
|
32
|
+
throw new Error(
|
|
33
|
+
"AuroDatepickerUtilities | parseDate: Date string has no separators",
|
|
34
|
+
);
|
|
35
|
+
}
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
if (dateStr.length !== format.length) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
"AuroDatepickerUtilities | parseDate: Date string and format length do not match",
|
|
40
|
+
);
|
|
41
|
+
}
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
valueParts = [dateStr];
|
|
44
|
+
formatParts = [format];
|
|
45
|
+
}
|
|
30
46
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
if (valueParts.length !== formatParts.length) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`AuroDatepickerUtilities | parseDate: Date string and format do not match : ${dateStr} vs ${format}`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
|
|
38
|
-
}
|
|
53
|
+
const result = formatParts.reduce((acc, part, index) => {
|
|
54
|
+
const value = valueParts[index];
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
if (/m/iu.test(part) && part.length === value.length) {
|
|
57
|
+
acc.month = value;
|
|
58
|
+
} else if (/d/iu.test(part) && part.length === value.length) {
|
|
59
|
+
acc.day = value;
|
|
60
|
+
} else if (/y/iu.test(part) && part.length === value.length) {
|
|
61
|
+
acc.year = value;
|
|
62
|
+
}
|
|
43
63
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} else if ((/d/iu).test(part)) {
|
|
47
|
-
acc.day = value;
|
|
48
|
-
} else if ((/y/iu).test(part)) {
|
|
49
|
-
acc.year = value;
|
|
50
|
-
}
|
|
64
|
+
return acc;
|
|
65
|
+
}, {});
|
|
51
66
|
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
if (!result.month && !result.day && !result.year) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
"AuroDatepickerUtilities | parseDate: Unable to parse date string",
|
|
70
|
+
);
|
|
71
|
+
}
|
|
54
72
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
59
75
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
function isCalendarDate$1(year, month, day) {
|
|
77
|
+
let yearNumber = Number(year);
|
|
78
|
+
const monthNumber = Number(month);
|
|
79
|
+
const dayNumber = Number(day);
|
|
63
80
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
year: "numeric",
|
|
72
|
-
month: "2-digit",
|
|
73
|
-
day: "2-digit",
|
|
74
|
-
});
|
|
81
|
+
if (
|
|
82
|
+
!Number.isInteger(yearNumber) ||
|
|
83
|
+
!Number.isInteger(monthNumber) ||
|
|
84
|
+
!Number.isInteger(dayNumber)
|
|
85
|
+
) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
75
88
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
this.toNorthAmericanFormat = (dateStr, format) => {
|
|
89
|
+
// Handle 2-digit years by converting them to 4-digit years based on a cutoff. This allows for parsing of 2-digit year formats while still validating the resulting date.
|
|
90
|
+
if (yearNumber < 100 && yearNumber >= 50) {
|
|
91
|
+
yearNumber += 1900;
|
|
92
|
+
} else if (yearNumber < 50) {
|
|
93
|
+
yearNumber += 2000;
|
|
94
|
+
}
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
96
|
+
const stringified = `${String(yearNumber).padStart(4, "0")}-${String(monthNumber).padStart(2, "0")}-${String(dayNumber).padStart(2, "0")}`;
|
|
97
|
+
const date = new Date(stringified.replace(/[.-]/g, "/"));
|
|
87
98
|
|
|
88
|
-
|
|
99
|
+
return (
|
|
100
|
+
!Number.isNaN(date.getTime()) && toISOFormatString$1(date) === stringified
|
|
101
|
+
);
|
|
102
|
+
}
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
/**
|
|
105
|
+
* @description Parses a date string into its components and validates that the result is a real calendar date. Use `getDateParts` instead when raw splitting without validation is needed (e.g. for in-progress input).
|
|
106
|
+
*
|
|
107
|
+
* Partial formats are supported: components absent from `format` default to `year → "0"`,
|
|
108
|
+
* `month → "01"`, `day → "01"` for calendar validation only. The returned object contains
|
|
109
|
+
* only the fields actually present in the format string — missing fields are never injected.
|
|
110
|
+
* @param {string} dateStr - Date string to parse.
|
|
111
|
+
* @param {string} format - Date format to parse.
|
|
112
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
113
|
+
* @throws {Error} Throws when the parsed result does not represent a valid calendar date.
|
|
114
|
+
*/
|
|
115
|
+
function parseDate$1(dateStr, format = "mm/dd/yyyy") {
|
|
116
|
+
if (!dateStr || !format) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const result = getDateParts$1(dateStr.trim(), format);
|
|
93
120
|
|
|
94
|
-
|
|
121
|
+
if (!result) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
95
124
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
125
|
+
const lowerFormat = format.toLowerCase();
|
|
126
|
+
const year = lowerFormat.includes("yy") ? result.year : "0";
|
|
127
|
+
const month = lowerFormat.includes("mm") ? result.month : "01";
|
|
128
|
+
const day = lowerFormat.includes("dd") ? result.day : "01";
|
|
100
129
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
130
|
+
if (isCalendarDate$1(year, month, day)) {
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
104
133
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
134
|
+
throw new Error(
|
|
135
|
+
`AuroDatepickerUtilities | parseDate: Date string is not a valid date ${JSON.stringify(result)} with format ${format}`,
|
|
136
|
+
);
|
|
137
|
+
}
|
|
108
138
|
|
|
109
|
-
|
|
110
|
-
|
|
139
|
+
/**
|
|
140
|
+
* Convert a date object to string format.
|
|
141
|
+
* @param {Object} date - Date to convert to string.
|
|
142
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
143
|
+
* @returns {String} Returns the date as a string.
|
|
144
|
+
*/
|
|
145
|
+
function getDateAsString$1(date, locale = undefined) {
|
|
146
|
+
return date.toLocaleDateString(locale, {
|
|
147
|
+
year: "numeric",
|
|
148
|
+
month: "2-digit",
|
|
149
|
+
day: "2-digit",
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Converts a date string to a North American date format.
|
|
155
|
+
* @param {String} dateStr - Date to validate.
|
|
156
|
+
* @param {String} format - Date format to validate against.
|
|
157
|
+
* @returns {String}
|
|
158
|
+
*/
|
|
159
|
+
function toNorthAmericanFormat$3(dateStr, format) {
|
|
160
|
+
if (format === "mm/dd/yyyy") {
|
|
161
|
+
return dateStr;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const parsedDate = parseDate$1(dateStr, format);
|
|
165
|
+
|
|
166
|
+
if (!parsedDate) {
|
|
167
|
+
throw new Error(
|
|
168
|
+
"AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string",
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const { month, day, year } = parsedDate;
|
|
173
|
+
|
|
174
|
+
return [month, day, year].filter(Boolean).join("/");
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Validates that a date string matches the provided format and represents a real calendar date.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} dateStr - Date string to validate.
|
|
181
|
+
* @param {string} [format="yyyy-mm-dd"] - Format of the date string.
|
|
182
|
+
* @returns {boolean} True when the date string is valid for the provided format, otherwise false.
|
|
183
|
+
*/
|
|
184
|
+
function isValidDate$1(dateStr, format = "yyyy-mm-dd") {
|
|
185
|
+
try {
|
|
186
|
+
if (typeof dateStr !== "string" || !dateStr || format?.length < 8) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (parseDate$1(dateStr, format)) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
} catch (error) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Converts a JavaScript Date instance to a simple ISO-like date string. This returns only the calendar date portion without any time or timezone information.
|
|
201
|
+
*
|
|
202
|
+
* @param {Date} date - Date instance to convert to an ISO-like string.
|
|
203
|
+
* @returns {string} A string in the format "yyyy-mm-dd" representing the provided date.
|
|
204
|
+
* @throws {Error} Throws an error when the input is not a valid Date instance.
|
|
205
|
+
*/
|
|
206
|
+
function toISOFormatString$1(date) {
|
|
207
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
208
|
+
throw new Error(
|
|
209
|
+
"AuroDatepickerUtilities | toISOFormatString: Input must be a valid Date instance",
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
return `${String(date.getFullYear()).padStart(4, "0")}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Converts a date string into a JavaScript Date instance. This method supports ISO formatted strings and other formats that can be parsed by the formatter.
|
|
217
|
+
*
|
|
218
|
+
* @param {String} dateStr - Date string to convert into a Date object.
|
|
219
|
+
* @param {String} format - Date format used to parse the string when it is not in ISO format.
|
|
220
|
+
* @returns {Date|null} Returns a Date instance for valid input or null for non-string input.
|
|
221
|
+
* @throws {Error} Throws when parsing fails for non-ISO string input.
|
|
222
|
+
*/
|
|
223
|
+
function stringToDateInstance$1(dateStr, format = "yyyy-mm-dd") {
|
|
224
|
+
if (typeof dateStr !== "string") {
|
|
225
|
+
return null;
|
|
111
226
|
}
|
|
227
|
+
|
|
228
|
+
const { month, day, year } = parseDate$1(dateStr, format);
|
|
229
|
+
return new Date(`${year}/${month}/${day}`);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const dateFormatter$1 = {
|
|
233
|
+
parseDate: parseDate$1,
|
|
234
|
+
getDateParts: getDateParts$1,
|
|
235
|
+
getDateAsString: getDateAsString$1,
|
|
236
|
+
toNorthAmericanFormat: toNorthAmericanFormat$3,
|
|
237
|
+
isValidDate: isValidDate$1,
|
|
238
|
+
toISOFormatString: toISOFormatString$1,
|
|
239
|
+
stringToDateInstance: stringToDateInstance$1,
|
|
112
240
|
};
|
|
113
|
-
const dateFormatter$1 = new DateFormatter$1();
|
|
114
241
|
|
|
115
242
|
// filepath: dateConstraints.mjs
|
|
116
243
|
const DATE_UTIL_CONSTRAINTS$1 = {
|
|
@@ -182,12 +309,11 @@ let AuroDateUtilitiesBase$1 = class AuroDateUtilitiesBase {
|
|
|
182
309
|
/* eslint-disable no-magic-numbers */
|
|
183
310
|
|
|
184
311
|
let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$1 {
|
|
185
|
-
|
|
186
312
|
/**
|
|
187
313
|
* Returns the current century.
|
|
188
314
|
* @returns {String} The current century.
|
|
189
315
|
*/
|
|
190
|
-
getCentury
|
|
316
|
+
getCentury() {
|
|
191
317
|
return String(new Date().getFullYear()).slice(0, 2);
|
|
192
318
|
}
|
|
193
319
|
|
|
@@ -196,14 +322,12 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
196
322
|
* @param {String} year - The year to convert to four digits.
|
|
197
323
|
* @returns {String} The four digit year.
|
|
198
324
|
*/
|
|
199
|
-
getFourDigitYear
|
|
200
|
-
|
|
325
|
+
getFourDigitYear(year) {
|
|
201
326
|
const strYear = String(year).trim();
|
|
202
327
|
return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
|
|
203
328
|
}
|
|
204
329
|
|
|
205
330
|
constructor() {
|
|
206
|
-
|
|
207
331
|
super();
|
|
208
332
|
|
|
209
333
|
/**
|
|
@@ -212,7 +336,8 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
212
336
|
* @param {Object} date2 - Second date to compare.
|
|
213
337
|
* @returns {Boolean} Returns true if the dates match.
|
|
214
338
|
*/
|
|
215
|
-
this.datesMatch = (date1, date2) =>
|
|
339
|
+
this.datesMatch = (date1, date2) =>
|
|
340
|
+
new Date(date1).getTime() === new Date(date2).getTime();
|
|
216
341
|
|
|
217
342
|
/**
|
|
218
343
|
* Returns true if value passed in is a valid date.
|
|
@@ -221,53 +346,41 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
221
346
|
* @returns {Boolean}
|
|
222
347
|
*/
|
|
223
348
|
this.validDateStr = (date, format) => {
|
|
224
|
-
|
|
225
349
|
// The length we expect the date string to be
|
|
226
|
-
const dateStrLength = format
|
|
350
|
+
const dateStrLength = format?.length || 0;
|
|
227
351
|
|
|
228
352
|
// Guard Clause: Date and format are defined
|
|
229
353
|
if (typeof date === "undefined" || typeof format === "undefined") {
|
|
230
|
-
throw new Error(
|
|
354
|
+
throw new Error(
|
|
355
|
+
"AuroDatepickerUtilities | validateDateStr: Date and format are required",
|
|
356
|
+
);
|
|
231
357
|
}
|
|
232
358
|
|
|
233
359
|
// Guard Clause: Date should be of type string
|
|
234
360
|
if (typeof date !== "string") {
|
|
235
|
-
throw new Error(
|
|
361
|
+
throw new Error(
|
|
362
|
+
"AuroDatepickerUtilities | validateDateStr: Date must be a string",
|
|
363
|
+
);
|
|
236
364
|
}
|
|
237
365
|
|
|
238
366
|
// Guard Clause: Format should be of type string
|
|
239
367
|
if (typeof format !== "string") {
|
|
240
|
-
throw new Error(
|
|
368
|
+
throw new Error(
|
|
369
|
+
"AuroDatepickerUtilities | validateDateStr: Format must be a string",
|
|
370
|
+
);
|
|
241
371
|
}
|
|
242
372
|
|
|
243
373
|
// Guard Clause: Length is what we expect it to be
|
|
244
374
|
if (date.length !== dateStrLength) {
|
|
245
375
|
return false;
|
|
246
376
|
}
|
|
247
|
-
// Get a formatted date string and parse it
|
|
248
|
-
const dateParts = dateFormatter$1.parseDate(date, format);
|
|
249
|
-
|
|
250
|
-
// Guard Clause: Date parse succeeded
|
|
251
|
-
if (!dateParts) {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// Create the expected date string based on the date parts
|
|
256
|
-
const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
|
|
257
|
-
|
|
258
|
-
// Generate a date object that we will extract a string date from to compare to the passed in date string
|
|
259
|
-
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
260
|
-
|
|
261
|
-
// Get the date string of the date object we created from the string date
|
|
262
|
-
const actualDateStr = dateFormatter$1.getDateAsString(dateObj, "en-US");
|
|
263
377
|
|
|
264
|
-
//
|
|
265
|
-
|
|
378
|
+
// Get a formatted date string and parse and validate it
|
|
379
|
+
try {
|
|
380
|
+
return Boolean(dateFormatter$1.parseDate(date, format));
|
|
381
|
+
} catch (error) {
|
|
266
382
|
return false;
|
|
267
383
|
}
|
|
268
|
-
|
|
269
|
-
// If we passed all other checks, we can assume the date is valid
|
|
270
|
-
return true;
|
|
271
384
|
};
|
|
272
385
|
|
|
273
386
|
/**
|
|
@@ -277,10 +390,11 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
277
390
|
* @returns {boolean}
|
|
278
391
|
*/
|
|
279
392
|
this.dateAndFormatMatch = (value, format) => {
|
|
280
|
-
|
|
281
393
|
// Ensure we have both values we need to do the comparison
|
|
282
394
|
if (!value || !format) {
|
|
283
|
-
throw new Error(
|
|
395
|
+
throw new Error(
|
|
396
|
+
"AuroFormValidation | dateFormatMatch: value and format are required",
|
|
397
|
+
);
|
|
284
398
|
}
|
|
285
399
|
|
|
286
400
|
// If the lengths are different, they cannot match
|
|
@@ -289,11 +403,10 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
289
403
|
}
|
|
290
404
|
|
|
291
405
|
// Get the parts of the date
|
|
292
|
-
const dateParts = dateFormatter$1.
|
|
406
|
+
const dateParts = dateFormatter$1.getDateParts(value, format);
|
|
293
407
|
|
|
294
408
|
// Validator for day
|
|
295
409
|
const dayValueIsValid = (day) => {
|
|
296
|
-
|
|
297
410
|
// Guard clause: if there is no day in the dateParts, we can ignore this check.
|
|
298
411
|
if (!dateParts.day) {
|
|
299
412
|
return true;
|
|
@@ -309,7 +422,9 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
309
422
|
|
|
310
423
|
// Guard clause: ensure day is a valid integer
|
|
311
424
|
if (Number.isNaN(numDay)) {
|
|
312
|
-
throw new Error(
|
|
425
|
+
throw new Error(
|
|
426
|
+
"AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer",
|
|
427
|
+
);
|
|
313
428
|
}
|
|
314
429
|
|
|
315
430
|
// Guard clause: ensure day is within the valid range
|
|
@@ -323,6 +438,10 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
323
438
|
|
|
324
439
|
// Validator for month
|
|
325
440
|
const monthValueIsValid = (month) => {
|
|
441
|
+
// Guard clause: if there is no month in the dateParts, we can ignore this check.
|
|
442
|
+
if (!dateParts.month) {
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
326
445
|
|
|
327
446
|
// Guard clause: ensure month exists.
|
|
328
447
|
if (!month) {
|
|
@@ -334,7 +453,9 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
334
453
|
|
|
335
454
|
// Guard clause: ensure month is a valid integer
|
|
336
455
|
if (Number.isNaN(numMonth)) {
|
|
337
|
-
throw new Error(
|
|
456
|
+
throw new Error(
|
|
457
|
+
"AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer",
|
|
458
|
+
);
|
|
338
459
|
}
|
|
339
460
|
|
|
340
461
|
// Guard clause: ensure month is within the valid range
|
|
@@ -348,6 +469,10 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
348
469
|
|
|
349
470
|
// Validator for year
|
|
350
471
|
const yearIsValid = (_year) => {
|
|
472
|
+
// Guard clause: if there is no year in the dateParts, we can ignore this check.
|
|
473
|
+
if (!dateParts.year) {
|
|
474
|
+
return true;
|
|
475
|
+
}
|
|
351
476
|
|
|
352
477
|
// Guard clause: ensure year exists.
|
|
353
478
|
if (!_year) {
|
|
@@ -362,7 +487,9 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
362
487
|
|
|
363
488
|
// Guard clause: ensure year is a valid integer
|
|
364
489
|
if (Number.isNaN(numYear)) {
|
|
365
|
-
throw new Error(
|
|
490
|
+
throw new Error(
|
|
491
|
+
"AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer",
|
|
492
|
+
);
|
|
366
493
|
}
|
|
367
494
|
|
|
368
495
|
// Guard clause: ensure year is within the valid range
|
|
@@ -378,7 +505,7 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
378
505
|
const checks = [
|
|
379
506
|
monthValueIsValid(dateParts.month),
|
|
380
507
|
dayValueIsValid(dateParts.day),
|
|
381
|
-
yearIsValid(dateParts.year)
|
|
508
|
+
yearIsValid(dateParts.year),
|
|
382
509
|
];
|
|
383
510
|
|
|
384
511
|
// If any of the checks failed, the date format does not match and the result is invalid
|
|
@@ -412,10 +539,7 @@ const {
|
|
|
412
539
|
} = dateUtilities$1;
|
|
413
540
|
|
|
414
541
|
const {
|
|
415
|
-
toNorthAmericanFormat: toNorthAmericanFormat$1
|
|
416
|
-
parseDate: parseDate$1,
|
|
417
|
-
getDateAsString: getDateAsString$1
|
|
418
|
-
} = dateFormatter$1;
|
|
542
|
+
toNorthAmericanFormat: toNorthAmericanFormat$2} = dateFormatter$1;
|
|
419
543
|
|
|
420
544
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
421
545
|
// See LICENSE in the project root for license information.
|
|
@@ -735,13 +859,13 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
735
859
|
}
|
|
736
860
|
|
|
737
861
|
// Perform the rest of the validation
|
|
738
|
-
const formattedValue = toNorthAmericanFormat$
|
|
862
|
+
const formattedValue = toNorthAmericanFormat$2(elem.value, elem.format);
|
|
739
863
|
const valueDate = new Date(formattedValue);
|
|
740
864
|
|
|
741
865
|
// // Validate max date
|
|
742
866
|
if (elem.max?.length === elem.lengthForType) {
|
|
743
867
|
|
|
744
|
-
const maxDate = new Date(toNorthAmericanFormat$
|
|
868
|
+
const maxDate = new Date(toNorthAmericanFormat$2(elem.max, elem.format));
|
|
745
869
|
|
|
746
870
|
if (valueDate > maxDate) {
|
|
747
871
|
elem.validity = 'rangeOverflow';
|
|
@@ -752,7 +876,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
752
876
|
|
|
753
877
|
// Validate min date
|
|
754
878
|
if (elem.min?.length === elem.lengthForType) {
|
|
755
|
-
const minDate = new Date(toNorthAmericanFormat$
|
|
879
|
+
const minDate = new Date(toNorthAmericanFormat$2(elem.min, elem.format));
|
|
756
880
|
|
|
757
881
|
if (valueDate < minDate) {
|
|
758
882
|
elem.validity = 'rangeUnderflow';
|
|
@@ -1343,7 +1467,6 @@ class UtilitiesCalendarRender {
|
|
|
1343
1467
|
.max="${elem.max}"
|
|
1344
1468
|
?noRange="${elem.noRange}"
|
|
1345
1469
|
.monthFirst="${elem.monthFirst}"
|
|
1346
|
-
.hoveredDate="${elem.hoveredDate}"
|
|
1347
1470
|
.dateTo="${elem.dateTo}"
|
|
1348
1471
|
.dateFrom="${elem.dateFrom}"
|
|
1349
1472
|
.locale="${elem.locale}"
|
|
@@ -1375,43 +1498,6 @@ var snowflakeStyle = css`:host([layout*=snowflake]) [auro-input]{flex:1;text-ali
|
|
|
1375
1498
|
|
|
1376
1499
|
var snowflakeColors = css`:host([layout=snowflake]) [auro-dropdown]:not(:is([error],.hasFocus)){--ds-auro-dropdown-trigger-border-color: transparent}`;
|
|
1377
1500
|
|
|
1378
|
-
var styleCss$7 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}:host{--calendar-width: 336px;--mobile-footer-height: 150px;--mobile-header-height: 68px;--desktop-footer-height: 80px;height:100vh;height:100dvh}.calendars{display:flex;flex-direction:row}.calendarNavButtons{position:absolute;z-index:1;top:var(--ds-size-200, 1rem);right:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem)}.calendarNavBtn{display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.prevMonth,.nextMonth{position:absolute;top:0}.prevMonth{left:0}.nextMonth{right:0}.headerActions{padding:0 var(--ds-size-200, 1rem)}.mobileHeader{width:100%;height:var(--mobile-header-height);z-index:1;align-items:center;flex-direction:row}.headerDateFrom,.headerDateTo{display:flex;height:var(--mobile-header-height);flex:1;flex-direction:column;justify-content:center;padding:0 var(--ds-size-150, 0.75rem) 0 var(--ds-size-200, 1rem)}.mobileDateLabel{padding:var(--ds-size-25, 0.125rem) 0}.mobileFooter{display:none;width:100%;align-items:flex-end;flex-direction:column;justify-content:flex-end}.mobileFooterActions{position:relative;bottom:0;left:50%;display:none;width:calc(100% - var(--ds-size-200, 1rem)*2);align-items:flex-end;flex-direction:column;justify-content:flex-end;padding:var(--ds-size-150) calc(var(--ds-size-200, 1rem));transform:translateX(-50%)}.mobileFooterActions auro-button{width:100%}.calendarWrapper.hasFooter{padding-bottom:var(--desktop-footer-height)}:host([isfullscreen]){width:100%;max-height:100dvh;overflow:hidden}:host([isfullscreen]) .prevMonth,:host([isfullscreen]) .nextMonth{display:none}:host([isfullscreen]) .mobileHeader,:host([isfullscreen]) .mobileFooter,:host([isfullscreen]) .mobileFooterActions{display:flex}:host([isfullscreen]) .calendarWrapper{display:flex;flex-direction:column}:host([isfullscreen]) .calendars{display:flex;flex-direction:column;flex:1;align-items:center;width:100%;overscroll-behavior:contain}:host([isfullscreen]) .calendars:after{display:block;width:100%;height:var(--mobile-footer-height);content:""}.sr-only{position:absolute;overflow:hidden;clip:rect(0, 0, 0, 0);width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap}`;
|
|
1379
|
-
|
|
1380
|
-
var colorCss$7 = css`.calendarNavBtn{border-color:var(--ds-auro-calendar-nav-btn-border-color);background-color:var(--ds-auro-calendar-nav-btn-container-color);color:var(--ds-auro-calendar-nav-btn-chevron-color)}.calendarNavBtn:hover{--ds-auro-calendar-nav-btn-container-color: var(--ds-advanced-color-state-background-hover, #f2f2f2);--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}.calendarNavBtn:focus{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}.calendarNavBtn:active{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a);box-shadow:inset 0 0 0 1px var(--ds-auro-calendar-nav-btn-border-color)}.mobileHeader{background-color:var(--ds-auro-calendar-mobile-header-container-color)}.mobileDateLabel{color:var(--ds-auro-calendar-mobile-header-text-color)}:host(:not([noRange])) .headerDateTo:after{background-color:var(--ds-auro-calendar-mobile-header-divider-color)}::slotted([slot="bib.fullscreen.fromStr"]),::slotted([slot=mobileDateToStr]){color:var(--ds-auro-datepicker-placeholder-color)}@media screen and (max-width: 576px){.calendarNavBtn{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}}`;
|
|
1381
|
-
|
|
1382
|
-
var styleCss$6 = css`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}:host{position:relative;display:block;width:calc(100% - var(--ds-size-200, 1rem) - var(--ds-size-200, 1rem));margin:0 var(--ds-size-200, 1rem)}@media screen and (min-width: 576px){:host{width:336px;padding:var(--ds-size-200, 1rem)}}@media screen and (min-width: 576px){:host(:not(:last-of-type)):after{position:absolute;top:var(--ds-size-200, 1rem);right:calc(-1*var(--ds-size-200, 1rem));height:calc(100% - var(--ds-size-200, 1rem) - var(--ds-size-200, 1rem));display:block;width:1px;content:""}}.header{display:flex;height:var(--ds-size-500, 2.5rem);margin-bottom:var(--ds-size-150, 0.75rem);align-items:center;flex-direction:row;text-align:center}.headerTitle{display:flex;align-items:center;flex:1;flex-direction:row;justify-content:center}.headerTitle div:first-child{margin-right:var(--ds-size-100, 0.5rem)}.calendarNavBtn{position:relative;display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.table{width:100%;border-collapse:collapse}.thead{margin-bottom:var(--ds-size-100, 0.5rem)}.th{display:flex;flex:1;align-items:center;justify-content:center}.th abbr{text-decoration:none}.tbody{width:100%;transition:all 0ms;transform:translateX(0)}@media screen and (min-width: 576px){.tbody{height:384px}}.td{flex:1;margin:0;padding:0}.tr{display:flex;flex-direction:row;width:100%}`;
|
|
1383
|
-
|
|
1384
|
-
var colorCss$6 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host{background-color:var(--ds-auro-calendar-month-container-color)}@media screen and (min-width: 576px){:host(:not(:last-of-type)):after{background-color:var(--ds-auro-calendar-month-divider-color)}}.header{color:var(--ds-auro-calendar-month-header-color)}`;
|
|
1385
|
-
|
|
1386
|
-
/******************************************************************************
|
|
1387
|
-
Copyright (c) Microsoft Corporation.
|
|
1388
|
-
|
|
1389
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1390
|
-
purpose with or without fee is hereby granted.
|
|
1391
|
-
|
|
1392
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1393
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1394
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1395
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1396
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1397
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1398
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1399
|
-
***************************************************************************** */
|
|
1400
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
function __decorate(decorators, target, key, desc) {
|
|
1404
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1405
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1406
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1407
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1411
|
-
var e = new Error(message);
|
|
1412
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1413
|
-
};
|
|
1414
|
-
|
|
1415
1501
|
/**
|
|
1416
1502
|
* @module constants
|
|
1417
1503
|
* @summary Useful constants
|
|
@@ -7166,6 +7252,43 @@ function subYears(date, amount, options) {
|
|
|
7166
7252
|
return addYears(date, -1, options);
|
|
7167
7253
|
}
|
|
7168
7254
|
|
|
7255
|
+
var styleCss$7 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}:host{--calendar-width: 336px;--mobile-footer-height: 150px;--mobile-header-height: 68px;--desktop-footer-height: 80px;height:100vh;height:100dvh}.calendars{display:flex;flex-direction:row}.calendars:focus{outline:none}.calendarNavButtons{position:absolute;z-index:1;top:var(--ds-size-200, 1rem);right:var(--ds-size-50, 0.25rem);left:var(--ds-size-50, 0.25rem)}.calendarNavBtn{display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.prevMonth,.nextMonth{position:absolute;top:0}.prevMonth{left:0}.nextMonth{right:0}.headerActions{padding:0 var(--ds-size-200, 1rem)}.mobileHeader{width:100%;height:var(--mobile-header-height);z-index:1;align-items:center;flex-direction:row}.headerDateFrom,.headerDateTo{display:flex;height:var(--mobile-header-height);flex:1;flex-direction:column;justify-content:center;padding:0 var(--ds-size-150, 0.75rem) 0 var(--ds-size-200, 1rem)}.mobileDateLabel{padding:var(--ds-size-25, 0.125rem) 0}.mobileFooter{display:none;width:100%;align-items:flex-end;flex-direction:column;justify-content:flex-end}.mobileFooterActions{position:relative;bottom:0;left:50%;display:none;width:calc(100% - var(--ds-size-200, 1rem)*2);align-items:flex-end;flex-direction:column;justify-content:flex-end;padding:var(--ds-size-150) calc(var(--ds-size-200, 1rem));transform:translateX(-50%)}.mobileFooterActions auro-button{width:100%}.calendarWrapper.hasFooter{padding-bottom:var(--desktop-footer-height)}:host([isfullscreen]){width:100%;max-height:100dvh;overflow:hidden}:host([isfullscreen]) .prevMonth,:host([isfullscreen]) .nextMonth{display:none}:host([isfullscreen]) .mobileHeader,:host([isfullscreen]) .mobileFooter,:host([isfullscreen]) .mobileFooterActions{display:flex}:host([isfullscreen]) .calendarWrapper{display:flex;flex-direction:column}:host([isfullscreen]) .calendars{display:flex;flex-direction:column;flex:1;align-items:center;width:100%;overscroll-behavior:contain}:host([isfullscreen]) .calendars:after{display:block;width:100%;height:var(--mobile-footer-height);content:""}.sr-only{position:absolute;overflow:hidden;clip:rect(0, 0, 0, 0);width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap}`;
|
|
7256
|
+
|
|
7257
|
+
var colorCss$7 = css`.calendarNavBtn{border-color:var(--ds-auro-calendar-nav-btn-border-color);background-color:var(--ds-auro-calendar-nav-btn-container-color);color:var(--ds-auro-calendar-nav-btn-chevron-color)}.calendarNavBtn:hover{--ds-auro-calendar-nav-btn-container-color: var(--ds-advanced-color-state-background-hover, #f2f2f2);--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}.calendarNavBtn:focus{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}.calendarNavBtn:active{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a);box-shadow:inset 0 0 0 1px var(--ds-auro-calendar-nav-btn-border-color)}.mobileHeader{background-color:var(--ds-auro-calendar-mobile-header-container-color)}.mobileDateLabel{color:var(--ds-auro-calendar-mobile-header-text-color)}:host(:not([noRange])) .headerDateTo:after{background-color:var(--ds-auro-calendar-mobile-header-divider-color)}::slotted([slot="bib.fullscreen.fromStr"]),::slotted([slot=mobileDateToStr]){color:var(--ds-auro-datepicker-placeholder-color)}@media screen and (max-width: 576px){.calendarNavBtn{--ds-auro-calendar-nav-btn-border-color: var(--ds-basic-color-brand-primary, #01426a)}}`;
|
|
7258
|
+
|
|
7259
|
+
var styleCss$6 = css`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}:host{position:relative;display:block;width:calc(100% - var(--ds-size-200, 1rem) - var(--ds-size-200, 1rem));margin:0 var(--ds-size-200, 1rem)}@media screen and (min-width: 576px){:host{width:336px;padding:var(--ds-size-200, 1rem) var(--ds-size-200, 1rem) 0}}@media screen and (min-width: 576px){:host(:not(:last-of-type)):after{position:absolute;top:var(--ds-size-200, 1rem);right:calc(-1*var(--ds-size-200, 1rem));height:calc(100% - var(--ds-size-200, 1rem) - var(--ds-size-200, 1rem));display:block;width:1px;content:""}}.header{display:flex;height:var(--ds-size-500, 2.5rem);margin-bottom:var(--ds-size-150, 0.75rem);align-items:center;flex-direction:row;text-align:center}.headerTitle{display:flex;align-items:center;flex:1;flex-direction:row;justify-content:center}.headerTitle div:first-child{margin-right:var(--ds-size-100, 0.5rem)}.calendarNavBtn{position:relative;display:flex;width:var(--ds-size-500, 2.5rem);height:var(--ds-size-500, 2.5rem);align-items:center;justify-content:center;border-width:1px;border-style:solid;border-radius:50%;cursor:pointer}.table{width:100%;border-collapse:collapse}.thead{margin-bottom:var(--ds-size-100, 0.5rem)}.th{display:flex;flex:1;align-items:center;justify-content:center}.th abbr{text-decoration:none}.tbody{width:100%;transition:all 0ms;transform:translateX(0)}@media screen and (min-width: 576px){.tbody{height:336px}}.td{flex:1;margin:0;padding:0}.tr{display:flex;flex-direction:row;width:100%}`;
|
|
7260
|
+
|
|
7261
|
+
var colorCss$6 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host{background-color:var(--ds-auro-calendar-month-container-color)}@media screen and (min-width: 576px){:host(:not(:last-of-type)):after{background-color:var(--ds-auro-calendar-month-divider-color)}}.header{color:var(--ds-auro-calendar-month-header-color)}`;
|
|
7262
|
+
|
|
7263
|
+
/******************************************************************************
|
|
7264
|
+
Copyright (c) Microsoft Corporation.
|
|
7265
|
+
|
|
7266
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7267
|
+
purpose with or without fee is hereby granted.
|
|
7268
|
+
|
|
7269
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7270
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7271
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7272
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7273
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7274
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7275
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7276
|
+
***************************************************************************** */
|
|
7277
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
7278
|
+
|
|
7279
|
+
|
|
7280
|
+
function __decorate(decorators, target, key, desc) {
|
|
7281
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7282
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7283
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7284
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7285
|
+
}
|
|
7286
|
+
|
|
7287
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
7288
|
+
var e = new Error(message);
|
|
7289
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
7290
|
+
};
|
|
7291
|
+
|
|
7169
7292
|
class RangeDatepickerCell extends LitElement {
|
|
7170
7293
|
constructor() {
|
|
7171
7294
|
super(...arguments);
|
|
@@ -7888,9 +8011,9 @@ __decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "dayN
|
|
|
7888
8011
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
7889
8012
|
AuroLibraryRuntimeUtils$5.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
7890
8013
|
|
|
7891
|
-
var styleCss$5 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:var(--ds-size-500, 2.5rem);height:calc(var(--ds-size-700, 3.5rem) - 2px);padding:0;border-width:1px;border-style:solid;border-radius:var(--ds-size-300, 1.5rem);cursor:pointer;user-select:none}.day:focus-visible{outline:2px solid var(--ds-basic-color-border-default, #959595);outline-offset:2px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:default}.day.reference{box-shadow:inset 0 0 0 2px var(--ds-advanced-color-shared-background, #ffffff)}.day.inRange::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%)}@media screen and (min-width: 576px){.day.inRange::before{width:var(--ds-size-600, 3rem)}}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(0%, -50%)}@media screen and (min-width: 576px){.day.rangeDepartDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(-100%, -50%)}@media screen and (min-width: 576px){.day.rangeReturnDate::before,.day.lastHoveredDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.dateSlot{display:flex;flex-direction:column}.srOnly{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(0, 0, 0, 0);white-space:nowrap}::slotted([slot^=date_]){position:absolute;top:80%;left:50%;width:100%;white-space:nowrap;transform:translate(-50%, -50%)}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;top:5px}:host([renderForDateSlot]) .currentDayMarker{position:relative;padding-bottom:5px;top:-8px}@media screen and (min-width: 576px){.day{width:var(--ds-size-600, 3rem);height:var(--ds-size-800, 4rem)}.day:hover{cursor:pointer}}`;
|
|
8014
|
+
var styleCss$5 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:48px;height:56px;padding:0;border-width:2px;border-style:solid;border-radius:10px;cursor:pointer;user-select:none}.day:focus-visible{outline:none;background-color:unset}.day.activeCell{outline-width:2px;outline-style:solid;outline-offset:-4px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:default}.day.reference{box-shadow:inset 0 0 0 2px var(--ds-advanced-color-shared-background, #ffffff)}.day.inRange::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%)}@media screen and (min-width: 576px){.day.inRange::before{width:var(--ds-size-600, 3rem)}}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(0%, -50%)}@media screen and (min-width: 576px){.day.rangeDepartDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(-100%, -50%)}@media screen and (min-width: 576px){.day.rangeReturnDate::before,.day.lastHoveredDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.buttonWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.dateSlot{display:block}.srOnly{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(0, 0, 0, 0);white-space:nowrap}.srOnly{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;clip:rect(0, 0, 0, 0);white-space:nowrap}::slotted([slot^=date_]){width:100%;white-space:nowrap}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;height:100%}:host([renderForDateSlot]) .currentDayMarker{position:relative}`;
|
|
7892
8015
|
|
|
7893
|
-
var colorCss$5 = css`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar-cell-price-text-color)}:host ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success, #447a1f)}:host .day{border-color:var(--ds-auro-calendar-cell-border-color);background-color:var(--ds-auro-calendar-cell-container-color);color:var(--ds-auro-calendar-cell-text-color)}:host .day:
|
|
8016
|
+
var colorCss$5 = css`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar-cell-price-text-color)}:host ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success, #447a1f)}:host .day{border-color:var(--ds-auro-calendar-cell-border-color);background-color:var(--ds-auro-calendar-cell-container-color);color:var(--ds-auro-calendar-cell-text-color)}:host .day.activeCell:not(.selected){--ds-auro-calendar-cell-container-color: var(--ds-auro-calendar-cell-in-range-color);border-color:var(--ds-advanced-color-state-selected);outline-color:var(--ds-auro-calendar-cell-container-color)}:host .day.selected{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.selected ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host .day.selected:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected-hover, #00274a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.reference{--ds-auro-calendar-cell-border-color: var(--ds-basic-color-border-default, #959595)}:host .day.reference:not(.selected):not(.disabled){--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-muted, #676767)}:host .day.reference.selected{--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-background-hover, #f2f2f2);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host .day.disabled{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.blackout{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.inRange:before,:host .day.rangeDepartDate:before,:host .day.rangeReturnDate:before,:host .day.lastHoveredDate:before{background-color:var(--ds-auro-calendar-cell-in-range-color)}:host .day.sameDateTrip:before{--ds-auro-calendar-cell-in-range-color: transparent}`;
|
|
7894
8017
|
|
|
7895
8018
|
class s{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{});}closestElement(e,t=this,i=(t,s=t&&t.closest(e))=>t&&t!==document&&t!==window?s||i(t.getRootNode().host):null){return i(t)}handleComponentTagRename(e,t){const i=t.toLowerCase();e.tagName.toLowerCase()!==i&&e.setAttribute(i,true);}elementMatch(e,t){const i=t.toLowerCase();return e.tagName.toLowerCase()===i||e.hasAttribute(i)}getSlotText(e,t){const i=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return (i?.assignedNodes({flatten:true})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}var r$1="top",o="bottom",n$1="right",a="left",l$3="auto",c$3=[r$1,o,n$1,a],p$6="start",d$3="end",f$6="viewport",h$3="popper",u$6=c$3.reduce(function(e,t){return e.concat([t+"-"+p$6,t+"-"+d$3])},[]),m$6=[].concat(c$3,[l$3]).reduce(function(e,t){return e.concat([t,t+"-"+p$6,t+"-"+d$3])},[]),g$6=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function v$3(e){return e?(e.nodeName||"").toLowerCase():null}function y$6(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function w$6(e){return e instanceof y$6(e).Element||e instanceof Element}function b$3(e){return e instanceof y$6(e).HTMLElement||e instanceof HTMLElement}function x$3(e){return "undefined"!=typeof ShadowRoot&&(e instanceof y$6(e).ShadowRoot||e instanceof ShadowRoot)}var S$3={name:"applyStyles",enabled:true,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},r=t.elements[e];b$3(r)&&v$3(r)&&(Object.assign(r.style,i),Object.keys(s).forEach(function(e){var t=s[e];false===t?r.removeAttribute(e):r.setAttribute(e,true===t?"":t);}));});},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var s=t.elements[e],r=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});b$3(s)&&v$3(s)&&(Object.assign(s.style,o),Object.keys(r).forEach(function(e){s.removeAttribute(e);}));});}},requires:["computeStyles"]};function _$4(e){return e.split("-")[0]}var A$3=Math.max,O=Math.min,k$6=Math.round;function T$3(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function z$6(){return !/^((?!chrome|android).)*safari/i.test(T$3())}function E(e,t,i){ void 0===t&&(t=false),void 0===i&&(i=false);var s=e.getBoundingClientRect(),r=1,o=1;t&&b$3(e)&&(r=e.offsetWidth>0&&k$6(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&k$6(s.height)/e.offsetHeight||1);var n=(w$6(e)?y$6(e):window).visualViewport,a=!z$6()&&i,l=(s.left+(a&&n?n.offsetLeft:0))/r,c=(s.top+(a&&n?n.offsetTop:0))/o,p=s.width/r,d=s.height/o;return {width:p,height:d,top:c,right:l+p,bottom:c+d,left:l,x:l,y:c}}function M$6(e){var t=E(e),i=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:s}}function B$3(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return true;if(i&&x$3(i)){var s=t;do{if(s&&e.isSameNode(s))return true;s=s.parentNode||s.host;}while(s)}return false}function L(e){return y$6(e).getComputedStyle(e)}function R$3(e){return ["table","td","th"].indexOf(v$3(e))>=0}function H$3(e){return ((w$6(e)?e.ownerDocument:e.document)||window.document).documentElement}function C$3(e){return "html"===v$3(e)?e:e.assignedSlot||e.parentNode||(x$3(e)?e.host:null)||H$3(e)}function D(e){return b$3(e)&&"fixed"!==L(e).position?e.offsetParent:null}function N$3(e){for(var t=y$6(e),i=D(e);i&&R$3(i)&&"static"===L(i).position;)i=D(i);return i&&("html"===v$3(i)||"body"===v$3(i)&&"static"===L(i).position)?t:i||function(e){var t=/firefox/i.test(T$3());if(/Trident/i.test(T$3())&&b$3(e)&&"fixed"===L(e).position)return null;var i=C$3(e);for(x$3(i)&&(i=i.host);b$3(i)&&["html","body"].indexOf(v$3(i))<0;){var s=L(i);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||t&&"filter"===s.willChange||t&&s.filter&&"none"!==s.filter)return i;i=i.parentNode;}return null}(e)||t}function P(e){return ["top","bottom"].indexOf(e)>=0?"x":"y"}function j(e,t,i){return A$3(e,O(t,i))}function I(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function q$3(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}var F={name:"arrow",enabled:true,phase:"main",fn:function(e){var t,i=e.state,s=e.name,l=e.options,p=i.elements.arrow,d=i.modifiersData.popperOffsets,f=_$4(i.placement),h=P(f),u=[a,n$1].indexOf(f)>=0?"height":"width";if(p&&d){var m=function(e,t){return I("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:q$3(e,c$3))}(l.padding,i),g=M$6(p),v="y"===h?r$1:a,y="y"===h?o:n$1,w=i.rects.reference[u]+i.rects.reference[h]-d[h]-i.rects.popper[u],b=d[h]-i.rects.reference[h],x=N$3(p),S=x?"y"===h?x.clientHeight||0:x.clientWidth||0:0,A=w/2-b/2,O=m[v],k=S-g[u]-m[y],T=S/2-g[u]/2+A,z=j(O,T,k),E=h;i.modifiersData[s]=((t={})[E]=z,t.centerOffset=z-T,t);}},effect:function(e){var t=e.state,i=e.options.element,s=void 0===i?"[data-popper-arrow]":i;null!=s&&("string"!=typeof s||(s=t.elements.popper.querySelector(s)))&&B$3(t.elements.popper,s)&&(t.elements.arrow=s);},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function U$3(e){return e.split("-")[1]}var V={top:"auto",right:"auto",bottom:"auto",left:"auto"};function W(e){var t,i=e.popper,s=e.popperRect,l=e.placement,c=e.variation,p=e.offsets,f=e.position,h=e.gpuAcceleration,u=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=p.x,w=void 0===v?0:v,b=p.y,x=void 0===b?0:b,S="function"==typeof m?m({x:w,y:x}):{x:w,y:x};w=S.x,x=S.y;var _=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),O=a,T=r$1,z=window;if(u){var E=N$3(i),M="clientHeight",B="clientWidth";if(E===y$6(i)&&"static"!==L(E=H$3(i)).position&&"absolute"===f&&(M="scrollHeight",B="scrollWidth"),l===r$1||(l===a||l===n$1)&&c===d$3)T=o,x-=(g&&E===z&&z.visualViewport?z.visualViewport.height:E[M])-s.height,x*=h?1:-1;if(l===a||(l===r$1||l===o)&&c===d$3)O=n$1,w-=(g&&E===z&&z.visualViewport?z.visualViewport.width:E[B])-s.width,w*=h?1:-1;}var R,C=Object.assign({position:f},u&&V),D=true===m?function(e,t){var i=e.x,s=e.y,r=t.devicePixelRatio||1;return {x:k$6(i*r)/r||0,y:k$6(s*r)/r||0}}({x:w,y:x},y$6(i)):{x:w,y:x};return w=D.x,x=D.y,h?Object.assign({},C,((R={})[T]=A?"0":"",R[O]=_?"0":"",R.transform=(z.devicePixelRatio||1)<=1?"translate("+w+"px, "+x+"px)":"translate3d("+w+"px, "+x+"px, 0)",R)):Object.assign({},C,((t={})[T]=A?x+"px":"",t[O]=_?w+"px":"",t.transform="",t))}var X={passive:true};var $={left:"right",right:"left",bottom:"top",top:"bottom"};function G(e){return e.replace(/left|right|bottom|top/g,function(e){return $[e]})}var K={start:"end",end:"start"};function Y(e){return e.replace(/start|end/g,function(e){return K[e]})}function J(e){var t=y$6(e);return {scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Q(e){return E(H$3(e)).left+J(e).scrollLeft}function Z(e){var t=L(e),i=t.overflow,s=t.overflowX,r=t.overflowY;return /auto|scroll|overlay|hidden/.test(i+r+s)}function ee(e){return ["html","body","#document"].indexOf(v$3(e))>=0?e.ownerDocument.body:b$3(e)&&Z(e)?e:ee(C$3(e))}function te(e,t){var i;void 0===t&&(t=[]);var s=ee(e),r=s===(null==(i=e.ownerDocument)?void 0:i.body),o=y$6(s),n=r?[o].concat(o.visualViewport||[],Z(s)?s:[]):s,a=t.concat(n);return r?a:a.concat(te(C$3(n)))}function ie(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function se(e,t,i){return t===f$6?ie(function(e,t){var i=y$6(e),s=H$3(e),r=i.visualViewport,o=s.clientWidth,n=s.clientHeight,a=0,l=0;if(r){o=r.width,n=r.height;var c=z$6();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop);}return {width:o,height:n,x:a+Q(e),y:l}}(e,i)):w$6(t)?function(e,t){var i=E(e,false,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):ie(function(e){var t,i=H$3(e),s=J(e),r=null==(t=e.ownerDocument)?void 0:t.body,o=A$3(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),n=A$3(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-s.scrollLeft+Q(e),l=-s.scrollTop;return "rtl"===L(r||i).direction&&(a+=A$3(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:n,x:a,y:l}}(H$3(e)))}function re(e,t,i,s){var r="clippingParents"===t?function(e){var t=te(C$3(e)),i=["absolute","fixed"].indexOf(L(e).position)>=0&&b$3(e)?N$3(e):e;return w$6(i)?t.filter(function(e){return w$6(e)&&B$3(e,i)&&"body"!==v$3(e)}):[]}(e):[].concat(t),o=[].concat(r,[i]),n=o[0],a=o.reduce(function(t,i){var r=se(e,i,s);return t.top=A$3(r.top,t.top),t.right=O(r.right,t.right),t.bottom=O(r.bottom,t.bottom),t.left=A$3(r.left,t.left),t},se(e,n,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function oe(e){var t,i=e.reference,s=e.element,l=e.placement,c=l?_$4(l):null,f=l?U$3(l):null,h=i.x+i.width/2-s.width/2,u=i.y+i.height/2-s.height/2;switch(c){case r$1:t={x:h,y:i.y-s.height};break;case o:t={x:h,y:i.y+i.height};break;case n$1:t={x:i.x+i.width,y:u};break;case a:t={x:i.x-s.width,y:u};break;default:t={x:i.x,y:i.y};}var m=c?P(c):null;if(null!=m){var g="y"===m?"height":"width";switch(f){case p$6:t[m]=t[m]-(i[g]/2-s[g]/2);break;case d$3:t[m]=t[m]+(i[g]/2-s[g]/2);}}return t}function ne(e,t){ void 0===t&&(t={});var i=t,s=i.placement,a=void 0===s?e.placement:s,l=i.strategy,p=void 0===l?e.strategy:l,d=i.boundary,u=void 0===d?"clippingParents":d,m=i.rootBoundary,g=void 0===m?f$6:m,v=i.elementContext,y=void 0===v?h$3:v,b=i.altBoundary,x=void 0!==b&&b,S=i.padding,_=void 0===S?0:S,A=I("number"!=typeof _?_:q$3(_,c$3)),O=y===h$3?"reference":h$3,k=e.rects.popper,T=e.elements[x?O:y],z=re(w$6(T)?T:T.contextElement||H$3(e.elements.popper),u,g,p),M=E(e.elements.reference),B=oe({reference:M,element:k,placement:a}),L=ie(Object.assign({},k,B)),R=y===h$3?L:M,C={top:z.top-R.top+A.top,bottom:R.bottom-z.bottom+A.bottom,left:z.left-R.left+A.left,right:R.right-z.right+A.right},D=e.modifiersData.offset;if(y===h$3&&D){var N=D[a];Object.keys(C).forEach(function(e){var t=[n$1,o].indexOf(e)>=0?1:-1,i=[r$1,o].indexOf(e)>=0?"y":"x";C[e]+=N[i]*t;});}return C}function ae(e,t){ void 0===t&&(t={});var i=t,s=i.placement,r=i.boundary,o=i.rootBoundary,n=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,p=void 0===l?m$6:l,d=U$3(s),f=d?a?u$6:u$6.filter(function(e){return U$3(e)===d}):c$3,h=f.filter(function(e){return p.indexOf(e)>=0});0===h.length&&(h=f);var g=h.reduce(function(t,i){return t[i]=ne(e,{placement:i,boundary:r,rootBoundary:o,padding:n})[_$4(i)],t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}var le={name:"flip",enabled:true,phase:"main",fn:function(e){var t=e.state,i=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var c=i.mainAxis,d=void 0===c||c,f=i.altAxis,h=void 0===f||f,u=i.fallbackPlacements,m=i.padding,g=i.boundary,v=i.rootBoundary,y=i.altBoundary,w=i.flipVariations,b=void 0===w||w,x=i.allowedAutoPlacements,S=t.options.placement,A=_$4(S),O=u||(A===S||!b?[G(S)]:function(e){if(_$4(e)===l$3)return [];var t=G(e);return [Y(e),t,Y(t)]}(S)),k=[S].concat(O).reduce(function(e,i){return e.concat(_$4(i)===l$3?ae(t,{placement:i,boundary:g,rootBoundary:v,padding:m,flipVariations:b,allowedAutoPlacements:x}):i)},[]),T=t.rects.reference,z=t.rects.popper,E=new Map,M=true,B=k[0],L=0;L<k.length;L++){var R=k[L],H=_$4(R),C=U$3(R)===p$6,D=[r$1,o].indexOf(H)>=0,N=D?"width":"height",P=ne(t,{placement:R,boundary:g,rootBoundary:v,altBoundary:y,padding:m}),j=D?C?n$1:a:C?o:r$1;T[N]>z[N]&&(j=G(j));var I=G(j),q=[];if(d&&q.push(P[H]<=0),h&&q.push(P[j]<=0,P[I]<=0),q.every(function(e){return e})){B=R,M=false;break}E.set(R,q);}if(M)for(var F=function(e){var t=k.find(function(t){var i=E.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return B=t,"break"},V=b?3:1;V>0;V--){if("break"===F(V))break}t.placement!==B&&(t.modifiersData[s]._skip=true,t.placement=B,t.reset=true);}},requiresIfExists:["offset"],data:{_skip:false}};function ce(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function pe(e){return [r$1,n$1,o,a].some(function(t){return e[t]>=0})}var de={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,s=e.name,o=i.offset,l=void 0===o?[0,0]:o,c=m$6.reduce(function(e,i){return e[i]=function(e,t,i){var s=_$4(e),o=[a,r$1].indexOf(s)>=0?-1:1,l="function"==typeof i?i(Object.assign({},t,{placement:e})):i,c=l[0],p=l[1];return c=c||0,p=(p||0)*o,[a,n$1].indexOf(s)>=0?{x:p,y:c}:{x:c,y:p}}(i,t.rects,l),e},{}),p=c[t.placement],d=p.x,f=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=f),t.modifiersData[s]=c;}};var fe={name:"preventOverflow",enabled:true,phase:"main",fn:function(e){var t=e.state,i=e.options,s=e.name,l=i.mainAxis,c=void 0===l||l,d=i.altAxis,f=void 0!==d&&d,h=i.boundary,u=i.rootBoundary,m=i.altBoundary,g=i.padding,v=i.tether,y=void 0===v||v,w=i.tetherOffset,b=void 0===w?0:w,x=ne(t,{boundary:h,rootBoundary:u,padding:g,altBoundary:m}),S=_$4(t.placement),k=U$3(t.placement),T=!k,z=P(S),E="x"===z?"y":"x",B=t.modifiersData.popperOffsets,L=t.rects.reference,R=t.rects.popper,H="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,C="number"==typeof H?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(B){if(c){var q,F="y"===z?r$1:a,V="y"===z?o:n$1,W="y"===z?"height":"width",X=B[z],$=X+x[F],G=X-x[V],K=y?-R[W]/2:0,Y=k===p$6?L[W]:R[W],J=k===p$6?-R[W]:-L[W],Q=t.elements.arrow,Z=y&&Q?M$6(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[F],ie=ee[V],se=j(0,L[W],Z[W]),re=T?L[W]/2-K-se-te-C.mainAxis:Y-se-te-C.mainAxis,oe=T?-L[W]/2+K+se+ie+C.mainAxis:J+se+ie+C.mainAxis,ae=t.elements.arrow&&N$3(t.elements.arrow),le=ae?"y"===z?ae.clientTop||0:ae.clientLeft||0:0,ce=null!=(q=null==D?void 0:D[z])?q:0,pe=X+oe-ce,de=j(y?O($,X+re-ce-le):$,X,y?A$3(G,pe):G);B[z]=de,I[z]=de-X;}if(f){var fe,he="x"===z?r$1:a,ue="x"===z?o:n$1,me=B[E],ge="y"===E?"height":"width",ve=me+x[he],ye=me-x[ue],we=-1!==[r$1,a].indexOf(S),be=null!=(fe=null==D?void 0:D[E])?fe:0,xe=we?ve:me-L[ge]-R[ge]-be+C.altAxis,Se=we?me+L[ge]+R[ge]-be-C.altAxis:ye,_e=y&&we?function(e,t,i){var s=j(e,t,i);return s>i?i:s}(xe,me,Se):j(y?xe:ve,me,y?Se:ye);B[E]=_e,I[E]=_e-me;}t.modifiersData[s]=I;}},requiresIfExists:["offset"]};function he(e,t,i){ void 0===i&&(i=false);var s,r,o=b$3(t),n=b$3(t)&&function(e){var t=e.getBoundingClientRect(),i=k$6(t.width)/e.offsetWidth||1,s=k$6(t.height)/e.offsetHeight||1;return 1!==i||1!==s}(t),a=H$3(t),l=E(e,n,i),c={scrollLeft:0,scrollTop:0},p={x:0,y:0};return (o||!o&&!i)&&(("body"!==v$3(t)||Z(a))&&(c=(s=t)!==y$6(s)&&b$3(s)?{scrollLeft:(r=s).scrollLeft,scrollTop:r.scrollTop}:J(s)),b$3(t)?((p=E(t,true)).x+=t.clientLeft,p.y+=t.clientTop):a&&(p.x=Q(a))),{x:l.left+c.scrollLeft-p.x,y:l.top+c.scrollTop-p.y,width:l.width,height:l.height}}function ue(e){var t=new Map,i=new Set,s=[];function r(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var s=t.get(e);s&&r(s);}}),s.push(e);}return e.forEach(function(e){t.set(e.name,e);}),e.forEach(function(e){i.has(e.name)||r(e);}),s}var me={placement:"bottom",modifiers:[],strategy:"absolute"};function ge(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return !t.some(function(e){return !(e&&"function"==typeof e.getBoundingClientRect)})}function ve(e){ void 0===e&&(e={});var t=e,i=t.defaultModifiers,s=void 0===i?[]:i,r=t.defaultOptions,o=void 0===r?me:r;return function(e,t,i){ void 0===i&&(i=o);var r,n,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},me,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=false,p={state:a,setOptions:function(i){var r="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:w$6(e)?te(e):e.contextElement?te(e.contextElement):[],popper:te(t)};var n,c,f=function(e){var t=ue(e);return g$6.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}((n=[].concat(s,a.options.modifiers),c=n.reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return a.orderedModifiers=f.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,s=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var o=r({state:a,name:t,instance:p,options:s}),n=function(){};l.push(o||n);}}),p.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,i=e.popper;if(ge(t,i)){a.rects={reference:he(t,N$3(i),"fixed"===a.options.strategy),popper:M$6(i)},a.reset=false,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var s=0;s<a.orderedModifiers.length;s++)if(true!==a.reset){var r=a.orderedModifiers[s],o=r.fn,n=r.options,l=void 0===n?{}:n,d=r.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:p})||a);}else a.reset=false,s=-1;}}},update:(r=function(){return new Promise(function(e){p.forceUpdate(),e(a);})},function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(r());});})),n}),destroy:function(){d(),c=true;}};if(!ge(e,t))return p;function d(){l.forEach(function(e){return e()}),l=[];}return p.setOptions(i).then(function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e);}),p}}var ye=ve({defaultModifiers:[{name:"eventListeners",enabled:true,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,s=e.options,r=s.scroll,o=void 0===r||r,n=s.resize,a=void 0===n||n,l=y$6(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",i.update,X);}),a&&l.addEventListener("resize",i.update,X),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",i.update,X);}),a&&l.removeEventListener("resize",i.update,X);}},data:{}},{name:"popperOffsets",enabled:true,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=oe({reference:t.rects.reference,element:t.rects.popper,placement:t.placement});},data:{}},{name:"computeStyles",enabled:true,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,s=i.gpuAcceleration,r=void 0===s||s,o=i.adaptive,n=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:_$4(t.placement),variation:U$3(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,W(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,W(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement});},data:{}},S$3,de,le,fe,F,{name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,s=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,n=ne(t,{elementContext:"reference"}),a=ne(t,{altBoundary:true}),l=ce(n,s),c=ce(a,r,o),p=pe(l),d=pe(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d});}}]});class we{constructor(e,t,i,s){this.anchor=e,this.popover=t,this.boundaryElement=this.setBoundary(s),this.options={placement:i,visibleClass:"data-show"},this.popover.classList.remove(this.options.visibleClass);}setBoundary(e){return "string"==typeof e?document.querySelector(e)||document.body:e||document.body}show(){this.popper&&this.popper.destroy(),this.popper=ye(this.anchor,this.popover,{tooltip:this.anchor,placement:this.options.placement,modifiers:[{name:"offset",options:{offset:[0,18]}},{name:"preventOverflow",options:{mainAxis:true,boundary:this.boundaryElement,rootBoundary:"document",padding:16}}]});}triggerUpdate(){this.popper.update();}hide(){this.popover.classList.remove(this.options.visibleClass);}}var be=css`::slotted(*):not([onDark]),::slotted(*):not([appearance=inverse]){color:var(--ds-auro-popover-text-color)}.popover{background-color:var(--ds-auro-popover-container-color);box-shadow:var(--ds-auro-popover-boxshadow-color)}.arrow:before{background-color:var(--ds-auro-popover-container-color);box-shadow:2px 2px 1px 0 var(--ds-auro-popover-boxshadow-color)}
|
|
7896
8019
|
`,xe=css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host(:not([data-show])) .popover,:host([disabled]) .popover,:host([addSpace]) :host(:not([data-show])) .popover{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}::slotted(*){white-space:normal}::slotted(*:hover){cursor:pointer}[data-trigger-placement]::slotted(*:hover){position:relative}[data-trigger-placement]::slotted(*:hover):before{position:absolute;left:0;display:block;width:100%;height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem));content:""}[data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}[data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * (var(--ds-size-200, 1rem) + var(--ds-size-50, .25rem)))}:host([data-show]) .popover{z-index:var(--ds-depth-tooltip, 400)}:host([removeSpace]) .popover{margin:calc(-1 * (var(--ds-size-50, .25rem) + 1px)) 0!important}:host([addSpace]) .popover{margin:var(--ds-size-200, 1rem) 0!important}:host([addSpace]) [data-trigger-placement]::slotted(*:hover):before{height:var(--ds-size-500, 2.5rem)}:host([addSpace]) [data-trigger-placement^=top]::slotted(*:hover):before{top:calc(-1 * var(--ds-size-500, 2.5rem))}:host([addSpace]) [data-trigger-placement^=bottom]::slotted(*:hover):before{bottom:calc(-1 * var(--ds-size-500, 2.5rem))}.popover{display:inline-block;max-width:calc(100% - var(--ds-size-400, 2rem));border-radius:var(--ds-border-radius, .375rem)}@media screen and (min-width:576px){.popover{max-width:50%}}@media screen and (min-width:768px){.popover{max-width:40%}}@media screen and (min-width:1024px){.popover{max-width:27rem}}[data-popper-placement^=top]>.arrow{bottom:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=top]>.arrow:before{top:calc(-1 * var(--ds-size-200, 1rem));left:calc(-1 * var(--ds-size-75, .375rem));transform:rotate(45deg)}[data-popper-placement^=bottom]>.arrow{top:calc(-1 * (var(--ds-size-100, .5rem) + var(--ds-size-25, .125rem)))}[data-popper-placement^=bottom]>.arrow:before{top:var(--ds-size-50, .25rem);right:calc(-1 * var(--ds-size-200, 1rem));transform:rotate(-135deg)}.arrow{position:relative;margin-top:-var(--ds-size-100,.5rem)}.arrow:before{position:absolute;width:var(--ds-size-150, .75rem);height:var(--ds-size-150, .75rem);content:""}
|
|
@@ -7913,7 +8036,7 @@ class s{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
|
|
|
7913
8036
|
|
|
7914
8037
|
var popoverVersion = '6.0.1';
|
|
7915
8038
|
|
|
7916
|
-
/* eslint-disable curly, max-lines, no-underscore-dangle, no-magic-numbers, no-underscore-dangle, max-params, no-
|
|
8039
|
+
/* eslint-disable curly, max-lines, no-underscore-dangle, no-magic-numbers, no-underscore-dangle, max-params, no-extra-parens, arrow-parens, max-lines, line-comment-position, no-inline-comments, lit/binding-positions, lit/no-invalid-html */
|
|
7917
8040
|
|
|
7918
8041
|
class AuroCalendarCell extends LitElement {
|
|
7919
8042
|
constructor() {
|
|
@@ -7921,7 +8044,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
7921
8044
|
|
|
7922
8045
|
this.day = null;
|
|
7923
8046
|
this.selected = false;
|
|
7924
|
-
this.hovered = false;
|
|
7925
8047
|
this.dateTo = null;
|
|
7926
8048
|
this.dateFrom = null;
|
|
7927
8049
|
this.month = null;
|
|
@@ -7929,7 +8051,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
7929
8051
|
this.max = null;
|
|
7930
8052
|
this.disabled = false;
|
|
7931
8053
|
this.disabledDays = [];
|
|
7932
|
-
this.hoveredDate = null;
|
|
7933
8054
|
this.isCurrentDate = false;
|
|
7934
8055
|
this._locale = null;
|
|
7935
8056
|
this.dateStr = null;
|
|
@@ -7954,7 +8075,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
7954
8075
|
// ...super.properties,
|
|
7955
8076
|
day: { type: Object },
|
|
7956
8077
|
selected: { type: Boolean },
|
|
7957
|
-
hovered: { type: Boolean },
|
|
7958
8078
|
dateTo: { type: String },
|
|
7959
8079
|
dateFrom: { type: String },
|
|
7960
8080
|
month: { type: String },
|
|
@@ -7965,15 +8085,10 @@ class AuroCalendarCell extends LitElement {
|
|
|
7965
8085
|
reflect: true
|
|
7966
8086
|
},
|
|
7967
8087
|
disabledDays: { type: Array },
|
|
7968
|
-
hoveredDate: { type: String },
|
|
7969
8088
|
isCurrentDate: { type: Boolean },
|
|
7970
8089
|
locale: { type: Object },
|
|
7971
8090
|
dateStr: { type: String },
|
|
7972
8091
|
renderForDateSlot: { type: Boolean },
|
|
7973
|
-
active: {
|
|
7974
|
-
type: Boolean,
|
|
7975
|
-
reflect: true
|
|
7976
|
-
},
|
|
7977
8092
|
hasPopoverContent: { type: Boolean }
|
|
7978
8093
|
};
|
|
7979
8094
|
}
|
|
@@ -7998,17 +8113,17 @@ class AuroCalendarCell extends LitElement {
|
|
|
7998
8113
|
}
|
|
7999
8114
|
|
|
8000
8115
|
/**
|
|
8001
|
-
* Handles selected
|
|
8116
|
+
* Handles selected state of the calendar cell when the selection changes.
|
|
8117
|
+
* Also clears any imperative range preview classes so classMap is the
|
|
8118
|
+
* sole source of truth after a selection update.
|
|
8002
8119
|
* @private
|
|
8003
8120
|
* @param {Number} dateFrom - Depart date.
|
|
8004
8121
|
* @param {Number} dateTo - Return date.
|
|
8005
|
-
* @param {Number} hoveredDate - Hovered date.
|
|
8006
8122
|
* @param {Object} day - An object containing the dateFrom and day of month values.
|
|
8007
8123
|
* @returns {void}
|
|
8008
8124
|
*/
|
|
8009
|
-
dateChanged(dateFrom, dateTo,
|
|
8125
|
+
dateChanged(dateFrom, dateTo, day) {
|
|
8010
8126
|
this.selected = false;
|
|
8011
|
-
this.hovered = false;
|
|
8012
8127
|
|
|
8013
8128
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
8014
8129
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
@@ -8020,10 +8135,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
8020
8135
|
if (day.date === departTimestamp || day.date === returnTimestamp) {
|
|
8021
8136
|
this.selected = true;
|
|
8022
8137
|
}
|
|
8023
|
-
|
|
8024
|
-
if (((hoveredDate === day.date || day.date < hoveredDate) && day.date > parsedDateFrom && !parsedDateTo && !Number.isNaN(parsedDateFrom) && parsedDateFrom !== undefined && !this.selected) || (day.date > parsedDateFrom && day.date < parsedDateTo)) {
|
|
8025
|
-
this.hovered = true;
|
|
8026
|
-
}
|
|
8027
8138
|
}
|
|
8028
8139
|
}
|
|
8029
8140
|
|
|
@@ -8049,16 +8160,30 @@ class AuroCalendarCell extends LitElement {
|
|
|
8049
8160
|
|
|
8050
8161
|
/**
|
|
8051
8162
|
* Handles user hover events and dispatches a custom event.
|
|
8052
|
-
*
|
|
8163
|
+
* Does NOT set any reactive properties — the range preview is handled
|
|
8164
|
+
* imperatively by the calendar component to avoid O(N) re-renders.
|
|
8053
8165
|
* @private
|
|
8054
8166
|
* @returns {void}
|
|
8055
8167
|
*/
|
|
8056
8168
|
handleHover() {
|
|
8057
|
-
this.hovered = true;
|
|
8058
|
-
|
|
8059
|
-
let _a;
|
|
8060
8169
|
this.dispatchEvent(new CustomEvent('date-is-hovered', {
|
|
8061
|
-
detail: { date:
|
|
8170
|
+
detail: { date: this.day?.date },
|
|
8171
|
+
}));
|
|
8172
|
+
}
|
|
8173
|
+
|
|
8174
|
+
/**
|
|
8175
|
+
* Handles focus events on the cell button.
|
|
8176
|
+
* Dispatches a lightweight event for the calendar to handle SR
|
|
8177
|
+
* announcements and range preview updates without triggering
|
|
8178
|
+
* any Lit lifecycle updates.
|
|
8179
|
+
* @private
|
|
8180
|
+
* @returns {void}
|
|
8181
|
+
*/
|
|
8182
|
+
handleFocus() {
|
|
8183
|
+
this.dispatchEvent(new CustomEvent('calendar-cell-focused', {
|
|
8184
|
+
bubbles: true,
|
|
8185
|
+
composed: true,
|
|
8186
|
+
detail: { date: this.day?.date },
|
|
8062
8187
|
}));
|
|
8063
8188
|
}
|
|
8064
8189
|
|
|
@@ -8072,7 +8197,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
8072
8197
|
* @returns {Boolean} - True if the date is out of range.
|
|
8073
8198
|
*/
|
|
8074
8199
|
isOutOfRange(day, min, max) {
|
|
8075
|
-
if (day && day.date
|
|
8200
|
+
if (day && day.date !== null && day.date !== undefined) {
|
|
8076
8201
|
return day.date < min || day.date > max;
|
|
8077
8202
|
}
|
|
8078
8203
|
return false;
|
|
@@ -8085,13 +8210,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
8085
8210
|
* @returns {Boolean} - True if the date is a blackout date.
|
|
8086
8211
|
*/
|
|
8087
8212
|
isBlackout() {
|
|
8088
|
-
if (!this.day || this.day.date
|
|
8213
|
+
if (!this.day || this.day.date === null || this.day.date === undefined || this.isOutOfRange(this.day, this.min, this.max)) {
|
|
8089
8214
|
return false;
|
|
8090
8215
|
}
|
|
8091
8216
|
|
|
8092
8217
|
// Check against disabledDays timestamps (legacy path)
|
|
8093
8218
|
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0) {
|
|
8094
|
-
if (this.disabledDays.findIndex(
|
|
8219
|
+
if (this.disabledDays.findIndex(dd => parseInt(dd, 10) === this.day.date) !== -1) {
|
|
8095
8220
|
return true;
|
|
8096
8221
|
}
|
|
8097
8222
|
}
|
|
@@ -8173,12 +8298,26 @@ class AuroCalendarCell extends LitElement {
|
|
|
8173
8298
|
|
|
8174
8299
|
let label = dateFormatter.format(date);
|
|
8175
8300
|
|
|
8301
|
+
// Append date slot content (e.g. prices) so it is announced with the date.
|
|
8302
|
+
if (this.renderForDateSlot) {
|
|
8303
|
+
const dateSlotEl = this.querySelector(`[slot="date_${this.dateStr}"]`);
|
|
8304
|
+
if (dateSlotEl) {
|
|
8305
|
+
const text = dateSlotEl.innerText?.trim();
|
|
8306
|
+
if (text) {
|
|
8307
|
+
label += `, ${text}`;
|
|
8308
|
+
}
|
|
8309
|
+
}
|
|
8310
|
+
}
|
|
8311
|
+
|
|
8176
8312
|
// appending popover content here so that it gets read in a logical order with the other date content.
|
|
8177
8313
|
if (this.hasPopoverContent) {
|
|
8178
|
-
|
|
8314
|
+
const popoverEl = this.querySelector(`[slot="popover_${this.dateStr}"]`);
|
|
8315
|
+
if (popoverEl) {
|
|
8316
|
+
label += `, ${popoverEl.innerText.trim()}`;
|
|
8317
|
+
}
|
|
8179
8318
|
}
|
|
8180
8319
|
|
|
8181
|
-
// Append range position
|
|
8320
|
+
// Append range position label for range datepickers
|
|
8182
8321
|
const rangePosition = this.getRangePosition();
|
|
8183
8322
|
if (rangePosition) {
|
|
8184
8323
|
label += `, ${rangePosition}`;
|
|
@@ -8408,6 +8547,11 @@ class AuroCalendarCell extends LitElement {
|
|
|
8408
8547
|
};
|
|
8409
8548
|
this.datepicker.addEventListener('auroDatePicker-newSlotContent', this._slotContentHandler);
|
|
8410
8549
|
|
|
8550
|
+
// Cache button reference for imperative class manipulation.
|
|
8551
|
+
this.updateComplete.then(() => {
|
|
8552
|
+
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
8553
|
+
});
|
|
8554
|
+
|
|
8411
8555
|
// Trigger an initial update now that `this.datepicker` is assigned so
|
|
8412
8556
|
// cells reflect blackout/slot state that was configured before first render.
|
|
8413
8557
|
this.requestUpdate();
|
|
@@ -8439,13 +8583,26 @@ class AuroCalendarCell extends LitElement {
|
|
|
8439
8583
|
}
|
|
8440
8584
|
|
|
8441
8585
|
updated(properties) {
|
|
8442
|
-
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('
|
|
8443
|
-
this.dateChanged(this.dateFrom, this.dateTo, this.
|
|
8586
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('day')) {
|
|
8587
|
+
this.dateChanged(this.dateFrom, this.dateTo, this.day);
|
|
8444
8588
|
}
|
|
8445
8589
|
|
|
8446
|
-
if (this.day) {
|
|
8590
|
+
if (properties.has('day') && this.day) {
|
|
8447
8591
|
this.setDateSlotName();
|
|
8448
8592
|
this.handleSlotContent();
|
|
8593
|
+
|
|
8594
|
+
// Re-cache button reference when the day changes (cell may have re-rendered).
|
|
8595
|
+
this.updateComplete.then(() => {
|
|
8596
|
+
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
8597
|
+
});
|
|
8598
|
+
|
|
8599
|
+
// Update host-level aria attributes for ariaActiveDescendantElement.
|
|
8600
|
+
this.updateHostAria();
|
|
8601
|
+
}
|
|
8602
|
+
|
|
8603
|
+
// Update host aria when selection changes (aria-selected, range labels)
|
|
8604
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('selected')) {
|
|
8605
|
+
this.updateHostAria();
|
|
8449
8606
|
}
|
|
8450
8607
|
|
|
8451
8608
|
// Configure popover when it first becomes rendered
|
|
@@ -8454,32 +8611,130 @@ class AuroCalendarCell extends LitElement {
|
|
|
8454
8611
|
}
|
|
8455
8612
|
}
|
|
8456
8613
|
|
|
8614
|
+
/**
|
|
8615
|
+
* Updates ARIA attributes on the host element so that
|
|
8616
|
+
* ariaActiveDescendantElement can expose cell info to the SR.
|
|
8617
|
+
* @private
|
|
8618
|
+
* @returns {void}
|
|
8619
|
+
*/
|
|
8620
|
+
updateHostAria() {
|
|
8621
|
+
if (!this.day || this.day.date === undefined) return;
|
|
8622
|
+
|
|
8623
|
+
const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
|
|
8624
|
+
if (outOfRange) {
|
|
8625
|
+
this.removeAttribute('role');
|
|
8626
|
+
this.removeAttribute('aria-label');
|
|
8627
|
+
return;
|
|
8628
|
+
}
|
|
8629
|
+
|
|
8630
|
+
// The host acts as the gridcell for ariaActiveDescendantElement.
|
|
8631
|
+
this.setAttribute('role', 'gridcell');
|
|
8632
|
+
this.setAttribute('aria-label', this.getAriaLabel());
|
|
8633
|
+
this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
|
|
8634
|
+
|
|
8635
|
+
if (this.isBlackout()) {
|
|
8636
|
+
this.setAttribute('aria-disabled', 'true');
|
|
8637
|
+
} else {
|
|
8638
|
+
this.removeAttribute('aria-disabled');
|
|
8639
|
+
}
|
|
8640
|
+
}
|
|
8641
|
+
|
|
8457
8642
|
/**
|
|
8458
8643
|
* Programmatically focuses the cell's interactive button element.
|
|
8644
|
+
* Uses focusVisible: true so the :focus-visible ring appears even when
|
|
8645
|
+
* the bib was opened via mouse click (which sets mouse input modality).
|
|
8459
8646
|
* @returns {void}
|
|
8460
8647
|
*/
|
|
8461
8648
|
focusButton() {
|
|
8462
|
-
const button = this.shadowRoot.querySelector('button:not([aria-hidden])');
|
|
8649
|
+
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([aria-hidden])');
|
|
8463
8650
|
if (button) {
|
|
8464
|
-
button.focus();
|
|
8651
|
+
button.focus({ focusVisible: true });
|
|
8465
8652
|
}
|
|
8466
8653
|
}
|
|
8467
8654
|
|
|
8468
|
-
|
|
8655
|
+
/**
|
|
8656
|
+
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
8657
|
+
* Note: buttons stay tabindex="-1" because the grid uses aria-activedescendant.
|
|
8658
|
+
* @returns {void}
|
|
8659
|
+
*/
|
|
8660
|
+
setActive() {
|
|
8661
|
+
this.active = true;
|
|
8662
|
+
|
|
8663
|
+
// Show the popover when this cell becomes active via keyboard navigation.
|
|
8664
|
+
if (this.auroPopover) {
|
|
8665
|
+
this.auroPopover.toggleShow();
|
|
8666
|
+
}
|
|
8667
|
+
}
|
|
8668
|
+
|
|
8669
|
+
/**
|
|
8670
|
+
* Imperatively marks this cell as inactive without triggering a Lit re-render.
|
|
8671
|
+
* @returns {void}
|
|
8672
|
+
*/
|
|
8673
|
+
clearActive() {
|
|
8674
|
+
this.active = false;
|
|
8675
|
+
const btn = this._cachedButton || this.shadowRoot.querySelector('button.day');
|
|
8676
|
+
if (btn) {
|
|
8677
|
+
btn.classList.remove('activeCell');
|
|
8678
|
+
}
|
|
8679
|
+
|
|
8680
|
+
// Hide the popover when this cell loses active state.
|
|
8681
|
+
if (this.auroPopover) {
|
|
8682
|
+
this.auroPopover.toggleHide();
|
|
8683
|
+
}
|
|
8684
|
+
}
|
|
8685
|
+
|
|
8686
|
+
/**
|
|
8687
|
+
* Updates range preview classes imperatively (no Lit re-render).
|
|
8688
|
+
* Called by the calendar component when the hovered date changes
|
|
8689
|
+
* during range selection (dateFrom set, dateTo not yet set).
|
|
8690
|
+
* @param {Number} hoveredDate - Unix timestamp of the currently hovered/focused date.
|
|
8691
|
+
* @param {Number} dateFrom - Unix timestamp of the selected departure date.
|
|
8692
|
+
* @returns {void}
|
|
8693
|
+
*/
|
|
8694
|
+
updateRangePreviewClasses(hoveredDate, dateFrom) {
|
|
8695
|
+
const btn = this._cachedButton;
|
|
8696
|
+
if (!btn || !this.day) return;
|
|
8697
|
+
|
|
8698
|
+
const dayDate = this.day.date;
|
|
8699
|
+
const departTimestamp = startOfDay(dateFrom * 1000) / 1000;
|
|
8700
|
+
const isInRange = dayDate > departTimestamp && dayDate < hoveredDate;
|
|
8701
|
+
const isLastHovered = dayDate === hoveredDate && hoveredDate > departTimestamp;
|
|
8702
|
+
const isDepartWithPreview = dayDate === departTimestamp && hoveredDate > departTimestamp;
|
|
8703
|
+
|
|
8704
|
+
btn.classList.toggle('inRange', isInRange);
|
|
8705
|
+
btn.classList.toggle('lastHoveredDate', isLastHovered);
|
|
8706
|
+
btn.classList.toggle('rangeDepartDate', isDepartWithPreview);
|
|
8707
|
+
}
|
|
8708
|
+
|
|
8709
|
+
/**
|
|
8710
|
+
* Clears all imperative range preview classes from the cell button.
|
|
8711
|
+
* Called when a selection occurs so classMap becomes the sole source of truth.
|
|
8712
|
+
* @returns {void}
|
|
8713
|
+
*/
|
|
8714
|
+
clearRangePreviewClasses() {
|
|
8715
|
+
const btn = this._cachedButton;
|
|
8716
|
+
if (!btn) return;
|
|
8717
|
+
|
|
8718
|
+
btn.classList.remove('inRange', 'lastHoveredDate', 'rangeDepartDate');
|
|
8719
|
+
}
|
|
8720
|
+
|
|
8721
|
+
renderCellButton() {
|
|
8469
8722
|
const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
|
|
8470
|
-
const role = outOfRange ? 'presentation' : 'gridcell';
|
|
8471
8723
|
const blackout = this.isBlackout();
|
|
8472
8724
|
|
|
8725
|
+
// Static and selection-driven classes only. Hover-driven classes
|
|
8726
|
+
// (inRange, lastHoveredDate, rangeDepartDate during preview) are
|
|
8727
|
+
// managed imperatively via updateRangePreviewClasses() to avoid
|
|
8728
|
+
// O(N) Lit re-renders on every focus/hover event.
|
|
8473
8729
|
const buttonClasses = {
|
|
8474
8730
|
'day': true,
|
|
8475
|
-
'body-
|
|
8731
|
+
'body-default': true,
|
|
8476
8732
|
'currentDate': this.isCurrentDate,
|
|
8477
8733
|
'selected': this.selected,
|
|
8478
|
-
'inRange': this.datepicker?.hasAttribute('range') && this.
|
|
8479
|
-
'lastHoveredDate': this.isLastHoveredDate(this.day, this.dateFrom, this.dateTo, this.hoveredDate) && this.datepicker && this.datepicker.hasAttribute('range'),
|
|
8734
|
+
'inRange': this.datepicker?.hasAttribute('range') && this.dateTo && this.isInRange(this.day, this.dateFrom, this.dateTo),
|
|
8480
8735
|
'disabled': outOfRange,
|
|
8481
|
-
|
|
8482
|
-
'rangeDepartDate': this.datepicker?.hasAttribute('range') && this.isDepartDate(this.day, this.dateFrom) &&
|
|
8736
|
+
blackout,
|
|
8737
|
+
'rangeDepartDate': this.datepicker?.hasAttribute('range') && this.isDepartDate(this.day, this.dateFrom) && this.dateTo,
|
|
8483
8738
|
'rangeReturnDate': this.datepicker?.hasAttribute('range') && this.isReturnDate(this.day, this.dateFrom, this.dateTo),
|
|
8484
8739
|
'reference': this.isReferenceDate(this.dateStr),
|
|
8485
8740
|
'sameDateTrip': this.datepicker?.hasAttribute('range') && this.dateFrom === this.dateTo
|
|
@@ -8489,30 +8744,25 @@ class AuroCalendarCell extends LitElement {
|
|
|
8489
8744
|
<button
|
|
8490
8745
|
slot="trigger"
|
|
8491
8746
|
id="${this.getCellId()}"
|
|
8492
|
-
role="${role}"
|
|
8493
8747
|
@click="${outOfRange ? undefined : this.handleTap}"
|
|
8494
8748
|
@mouseover="${outOfRange ? undefined : this.handleHover}"
|
|
8495
|
-
@focus="${outOfRange ? undefined : this.
|
|
8749
|
+
@focus="${outOfRange ? undefined : this.handleFocus}"
|
|
8496
8750
|
class="${classMap(buttonClasses)}"
|
|
8497
8751
|
?disabled="${outOfRange}"
|
|
8498
|
-
aria-disabled="${blackout ? 'true' : nothing}"
|
|
8499
8752
|
aria-hidden="${outOfRange ? 'true' : nothing}"
|
|
8500
|
-
|
|
8501
|
-
aria-current="${this.isCurrentDate ? 'date' : nothing}"
|
|
8502
|
-
tabindex="${this.active ? '0' : '-1'}">
|
|
8503
|
-
<span class="srOnly">${this.getAriaLabel()}</span>
|
|
8753
|
+
tabindex="-1">
|
|
8504
8754
|
<div class="buttonWrapper" aria-hidden="true">
|
|
8505
8755
|
<div class="currentDayMarker">${this.day?.title || nothing}</div>
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8756
|
+
<div class="dateSlot body-2xs" part="dateSlot" aria-hidden="true" ?hidden="${!this.renderForDateSlot}">
|
|
8757
|
+
<slot name="date_${this.dateStr}"></slot>
|
|
8758
|
+
</div>
|
|
8509
8759
|
</div>
|
|
8510
8760
|
</button>
|
|
8511
8761
|
`;
|
|
8512
8762
|
}
|
|
8513
8763
|
|
|
8514
8764
|
render() {
|
|
8515
|
-
const hasPopoverContent = this
|
|
8765
|
+
const { hasPopoverContent } = this;
|
|
8516
8766
|
|
|
8517
8767
|
if (hasPopoverContent) {
|
|
8518
8768
|
return html$1`
|
|
@@ -8642,7 +8892,7 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8642
8892
|
*/
|
|
8643
8893
|
renderDayOfWeek(dayOfWeek, index) {
|
|
8644
8894
|
const fullName = this.dayFullNames ? this.dayFullNames[index] : dayOfWeek;
|
|
8645
|
-
return html`<div class="th body-default"
|
|
8895
|
+
return html`<div class="th body-default"><abbr title="${fullName}">${dayOfWeek}</abbr></div>`;
|
|
8646
8896
|
}
|
|
8647
8897
|
|
|
8648
8898
|
/**
|
|
@@ -8651,12 +8901,28 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8651
8901
|
*/
|
|
8652
8902
|
getFocusableCells() {
|
|
8653
8903
|
const cells = Array.from(this.shadowRoot.querySelectorAll('auro-formkit-calendar-cell'));
|
|
8654
|
-
return cells.filter(cell => {
|
|
8655
|
-
if (!cell.day)
|
|
8904
|
+
return cells.filter((cell) => {
|
|
8905
|
+
if (!cell.day) {
|
|
8906
|
+
return false;
|
|
8907
|
+
}
|
|
8656
8908
|
return !cell.isOutOfRange(cell.day, cell.min, cell.max);
|
|
8657
8909
|
});
|
|
8658
8910
|
}
|
|
8659
8911
|
|
|
8912
|
+
/**
|
|
8913
|
+
* Overrides the base class handler to prevent setting `this.hoveredDate`
|
|
8914
|
+
* as a reactive property. Instead, just dispatches the event upward so
|
|
8915
|
+
* the calendar can handle range preview imperatively.
|
|
8916
|
+
* @private
|
|
8917
|
+
* @param {CustomEvent} event - The date-is-hovered event from a cell.
|
|
8918
|
+
* @returns {void}
|
|
8919
|
+
*/
|
|
8920
|
+
handleDateHovered(event) {
|
|
8921
|
+
this.dispatchEvent(new CustomEvent('hovered-date-changed', {
|
|
8922
|
+
detail: { value: event.detail.date },
|
|
8923
|
+
}));
|
|
8924
|
+
}
|
|
8925
|
+
|
|
8660
8926
|
/**
|
|
8661
8927
|
* Handles arrow key navigation within the month grid.
|
|
8662
8928
|
* Dispatches a cross-month navigation event when the boundary is reached.
|
|
@@ -8666,18 +8932,29 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8666
8932
|
*/
|
|
8667
8933
|
handleGridKeyDown(event) {
|
|
8668
8934
|
const { key } = event;
|
|
8669
|
-
const arrowKeys = [
|
|
8935
|
+
const arrowKeys = [
|
|
8936
|
+
'ArrowRight',
|
|
8937
|
+
'ArrowLeft',
|
|
8938
|
+
'ArrowDown',
|
|
8939
|
+
'ArrowUp'
|
|
8940
|
+
];
|
|
8670
8941
|
|
|
8671
|
-
if (!arrowKeys.includes(key))
|
|
8942
|
+
if (!arrowKeys.includes(key)) {
|
|
8943
|
+
return;
|
|
8944
|
+
}
|
|
8672
8945
|
|
|
8673
8946
|
event.preventDefault();
|
|
8674
8947
|
|
|
8675
8948
|
const focusableCells = this.getFocusableCells();
|
|
8676
|
-
if (focusableCells.length === 0)
|
|
8949
|
+
if (focusableCells.length === 0) {
|
|
8950
|
+
return;
|
|
8951
|
+
}
|
|
8677
8952
|
|
|
8678
8953
|
// Find the currently active cell within this month
|
|
8679
|
-
const activeCell = focusableCells.find(cell => cell.active);
|
|
8680
|
-
if (!activeCell)
|
|
8954
|
+
const activeCell = focusableCells.find((cell) => cell.active);
|
|
8955
|
+
if (!activeCell) {
|
|
8956
|
+
return;
|
|
8957
|
+
}
|
|
8681
8958
|
|
|
8682
8959
|
const activeIndex = focusableCells.indexOf(activeCell);
|
|
8683
8960
|
let targetCell = null;
|
|
@@ -8690,7 +8967,9 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8690
8967
|
this.dispatchEvent(new CustomEvent('calendar-month-boundary', {
|
|
8691
8968
|
bubbles: true,
|
|
8692
8969
|
composed: true,
|
|
8693
|
-
detail: { direction: 'next',
|
|
8970
|
+
detail: { direction: 'next',
|
|
8971
|
+
fromDate: activeCell.day.date,
|
|
8972
|
+
key }
|
|
8694
8973
|
}));
|
|
8695
8974
|
return;
|
|
8696
8975
|
}
|
|
@@ -8702,7 +8981,9 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8702
8981
|
this.dispatchEvent(new CustomEvent('calendar-month-boundary', {
|
|
8703
8982
|
bubbles: true,
|
|
8704
8983
|
composed: true,
|
|
8705
|
-
detail: { direction: 'prev',
|
|
8984
|
+
detail: { direction: 'prev',
|
|
8985
|
+
fromDate: activeCell.day.date,
|
|
8986
|
+
key }
|
|
8706
8987
|
}));
|
|
8707
8988
|
return;
|
|
8708
8989
|
}
|
|
@@ -8716,7 +8997,7 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8716
8997
|
const targetDate = Math.floor(currentDate.getTime() / 1000);
|
|
8717
8998
|
|
|
8718
8999
|
// Look for the target date in this month's focusable cells
|
|
8719
|
-
targetCell = focusableCells.find(cell => cell.day.date === targetDate);
|
|
9000
|
+
targetCell = focusableCells.find((cell) => cell.day.date === targetDate);
|
|
8720
9001
|
|
|
8721
9002
|
if (!targetCell) {
|
|
8722
9003
|
// Target is in another month or all cells in that direction are disabled
|
|
@@ -8724,7 +9005,9 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8724
9005
|
this.dispatchEvent(new CustomEvent('calendar-month-boundary', {
|
|
8725
9006
|
bubbles: true,
|
|
8726
9007
|
composed: true,
|
|
8727
|
-
detail: { direction,
|
|
9008
|
+
detail: { direction,
|
|
9009
|
+
fromDate: activeCell.day.date,
|
|
9010
|
+
key }
|
|
8728
9011
|
}));
|
|
8729
9012
|
return;
|
|
8730
9013
|
}
|
|
@@ -8755,7 +9038,6 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8755
9038
|
.min="${this.min}"
|
|
8756
9039
|
.max="${this.max}"
|
|
8757
9040
|
.month="${this.month}"
|
|
8758
|
-
.hoveredDate="${this.hoveredDate}"
|
|
8759
9041
|
.dateTo="${this.dateTo}"
|
|
8760
9042
|
.dateFrom="${this.dateFrom}"
|
|
8761
9043
|
.locale="${this.locale}"
|
|
@@ -8780,7 +9062,7 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8780
9062
|
<div aria-labelledby="${this.getHeadingId()}">
|
|
8781
9063
|
<div class="header">
|
|
8782
9064
|
${this.renderPrevButton()}
|
|
8783
|
-
<div class="headerTitle heading-xs" id="${this.getHeadingId()}" aria-
|
|
9065
|
+
<div class="headerTitle heading-xs" id="${this.getHeadingId()}" aria-hidden="true">
|
|
8784
9066
|
${this.monthFirst ? html`
|
|
8785
9067
|
<div>${this.computeCurrentMonthName(this.month)}</div>
|
|
8786
9068
|
<div>${this.renderYear()}</div>
|
|
@@ -8792,9 +9074,9 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
8792
9074
|
${this.renderNextButton()}
|
|
8793
9075
|
</div>
|
|
8794
9076
|
|
|
8795
|
-
<div class="table" role="grid" aria-labelledby="${this.getHeadingId()}"
|
|
8796
|
-
<div class="thead"
|
|
8797
|
-
<div class="tr"
|
|
9077
|
+
<div class="table" role="grid" aria-labelledby="${this.getHeadingId()}">
|
|
9078
|
+
<div class="thead" aria-hidden="true">
|
|
9079
|
+
<div class="tr">
|
|
8798
9080
|
${(_a = this.dayNamesOfTheWeek) === null || _a === void 0 ? void 0 : _a.map((dayNameOfWeek, index) => this.renderDayOfWeek(dayNameOfWeek, index))}
|
|
8799
9081
|
</div>
|
|
8800
9082
|
</div>
|
|
@@ -9610,7 +9892,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
9610
9892
|
}
|
|
9611
9893
|
}
|
|
9612
9894
|
|
|
9613
|
-
var formkitVersion$2 = '
|
|
9895
|
+
var formkitVersion$2 = '202606012139';
|
|
9614
9896
|
|
|
9615
9897
|
let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=literal`${unsafeStatic(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1=css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
|
|
9616
9898
|
`,u$4=css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
|
|
@@ -9671,7 +9953,7 @@ let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[
|
|
|
9671
9953
|
|
|
9672
9954
|
var buttonVersion$1 = '12.3.2';
|
|
9673
9955
|
|
|
9674
|
-
/* eslint-disable no-magic-numbers, no-undef-init, max-lines, lit/binding-positions, lit/no-invalid-html */
|
|
9956
|
+
/* eslint-disable no-magic-numbers, complexity, line-comment-position, no-undef-init, max-lines, line-comment-position, no-underscore-dangle, lit/binding-positions, lit/no-invalid-html, no-inline-comments */
|
|
9675
9957
|
|
|
9676
9958
|
|
|
9677
9959
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
@@ -9715,6 +9997,13 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
9715
9997
|
*/
|
|
9716
9998
|
this.activeCellDate = null;
|
|
9717
9999
|
|
|
10000
|
+
/**
|
|
10001
|
+
* Whether the #calendarGrid wrapper currently has focus.
|
|
10002
|
+
* Used to determine whether the visualFocus ring should be shown.
|
|
10003
|
+
* @private
|
|
10004
|
+
*/
|
|
10005
|
+
this._gridHasFocus = false;
|
|
10006
|
+
|
|
9718
10007
|
/**
|
|
9719
10008
|
* @private
|
|
9720
10009
|
*/
|
|
@@ -9748,6 +10037,12 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
9748
10037
|
this.buttonTag = versioning.generateTag('auro-formkit-datepicker-button', buttonVersion$1, T$1);
|
|
9749
10038
|
|
|
9750
10039
|
this.dropdown = undefined;
|
|
10040
|
+
|
|
10041
|
+
/**
|
|
10042
|
+
* Unique instance ID for the live region element.
|
|
10043
|
+
* @private
|
|
10044
|
+
*/
|
|
10045
|
+
this._calendarInstanceId = Date.now().toString(36);
|
|
9751
10046
|
}
|
|
9752
10047
|
|
|
9753
10048
|
static get styles() {
|
|
@@ -9760,6 +10055,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
9760
10055
|
|
|
9761
10056
|
static get properties() {
|
|
9762
10057
|
return {
|
|
10058
|
+
|
|
9763
10059
|
/**
|
|
9764
10060
|
* The last month that may be displayed in the calendar.
|
|
9765
10061
|
*/
|
|
@@ -9876,22 +10172,36 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
9876
10172
|
/**
|
|
9877
10173
|
* Updates the month and year when the user navigates to the previous calendar month.
|
|
9878
10174
|
* @private
|
|
10175
|
+
* @param {Object} [options] - Optional settings.
|
|
10176
|
+
* @param {boolean} [options.skipActiveUpdate=false] - When true, skip the active cell
|
|
10177
|
+
* recomputation. Used by arrow key handlers that manage the active cell themselves.
|
|
9879
10178
|
* @returns {void}
|
|
9880
10179
|
*/
|
|
9881
|
-
handlePrevMonth() {
|
|
10180
|
+
handlePrevMonth(options) {
|
|
10181
|
+
const opts = options instanceof Event ? {} : options || {};
|
|
10182
|
+
this.clearRangePreview();
|
|
9882
10183
|
this.utilCal.handleMonthChange(this, 'prev');
|
|
9883
|
-
|
|
10184
|
+
if (!opts.skipActiveUpdate) {
|
|
10185
|
+
this.updateActiveCellForVisibleMonth();
|
|
10186
|
+
}
|
|
9884
10187
|
this.announceMonthChange();
|
|
9885
10188
|
}
|
|
9886
10189
|
|
|
9887
10190
|
/**
|
|
9888
10191
|
* Updates the month and year when the user navigates to the next calendar month.
|
|
9889
10192
|
* @private
|
|
10193
|
+
* @param {Object} [options] - Optional settings.
|
|
10194
|
+
* @param {boolean} [options.skipActiveUpdate=false] - When true, skip the active cell
|
|
10195
|
+
* recomputation. Used by arrow key handlers that manage the active cell themselves.
|
|
9890
10196
|
* @returns {void}
|
|
9891
10197
|
*/
|
|
9892
|
-
handleNextMonth() {
|
|
10198
|
+
handleNextMonth(options) {
|
|
10199
|
+
const opts = options instanceof Event ? {} : options || {};
|
|
10200
|
+
this.clearRangePreview();
|
|
9893
10201
|
this.utilCal.handleMonthChange(this, 'next');
|
|
9894
|
-
|
|
10202
|
+
if (!opts.skipActiveUpdate) {
|
|
10203
|
+
this.updateActiveCellForVisibleMonth();
|
|
10204
|
+
}
|
|
9895
10205
|
this.announceMonthChange();
|
|
9896
10206
|
}
|
|
9897
10207
|
|
|
@@ -9901,27 +10211,39 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
9901
10211
|
* @returns {void}
|
|
9902
10212
|
*/
|
|
9903
10213
|
announceMonthChange() {
|
|
10214
|
+
// Cancel any pending debounced cell announcement so it does not
|
|
10215
|
+
// overwrite this month navigation announcement.
|
|
10216
|
+
if (this._focusAnnounceTimer) {
|
|
10217
|
+
clearTimeout(this._focusAnnounceTimer);
|
|
10218
|
+
this._focusAnnounceTimer = null;
|
|
10219
|
+
}
|
|
10220
|
+
|
|
9904
10221
|
const date = new Date(this.centralDate);
|
|
9905
10222
|
const localeCode = this.locale?.code || undefined;
|
|
9906
|
-
const formatter = new Intl.DateTimeFormat(localeCode, { month: 'long',
|
|
10223
|
+
const formatter = new Intl.DateTimeFormat(localeCode, { month: 'long',
|
|
10224
|
+
year: 'numeric' });
|
|
9907
10225
|
this.announceSelection(formatter.format(date));
|
|
9908
10226
|
}
|
|
9909
10227
|
|
|
9910
10228
|
/**
|
|
9911
|
-
*
|
|
9912
|
-
*
|
|
9913
|
-
*
|
|
10229
|
+
* Updates the active cell after month navigation (prev/next buttons).
|
|
10230
|
+
* Always moves the active cell to the first enabled date in the newly
|
|
10231
|
+
* visible months so that tabbing back to the grid lands on an enabled cell.
|
|
9914
10232
|
* @private
|
|
9915
10233
|
* @returns {void}
|
|
9916
10234
|
*/
|
|
9917
10235
|
updateActiveCellForVisibleMonth() {
|
|
9918
|
-
//
|
|
9919
|
-
//
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
10236
|
+
// Use double-rAF to ensure child month/cell components have fully
|
|
10237
|
+
// rendered and cached their button references before we set tabindex.
|
|
10238
|
+
requestAnimationFrame(() => {
|
|
10239
|
+
requestAnimationFrame(() => {
|
|
10240
|
+
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
10241
|
+
|
|
10242
|
+
if (newDate !== null && newDate !== undefined) {
|
|
10243
|
+
this.activeCellDate = newDate;
|
|
10244
|
+
this.setActiveCell(this.activeCellDate);
|
|
10245
|
+
}
|
|
10246
|
+
});
|
|
9925
10247
|
});
|
|
9926
10248
|
}
|
|
9927
10249
|
|
|
@@ -10018,7 +10340,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10018
10340
|
*/
|
|
10019
10341
|
focusCloseButton() {
|
|
10020
10342
|
const bibtemplate = this.shadowRoot.querySelector(this.bibtemplateTag._$litStatic$);
|
|
10021
|
-
if (bibtemplate)
|
|
10343
|
+
if (bibtemplate) {
|
|
10344
|
+
bibtemplate.focusCloseButton();
|
|
10345
|
+
}
|
|
10022
10346
|
}
|
|
10023
10347
|
|
|
10024
10348
|
/**
|
|
@@ -10047,7 +10371,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10047
10371
|
getAllFocusableCells() {
|
|
10048
10372
|
const months = this.getMonthComponents();
|
|
10049
10373
|
let cells = [];
|
|
10050
|
-
months.forEach(month => {
|
|
10374
|
+
months.forEach((month) => {
|
|
10051
10375
|
cells = cells.concat(month.getFocusableCells());
|
|
10052
10376
|
});
|
|
10053
10377
|
return cells;
|
|
@@ -10055,36 +10379,84 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10055
10379
|
|
|
10056
10380
|
/**
|
|
10057
10381
|
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
10382
|
+
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
10383
|
+
* Also updates ariaActiveDescendantElement on the grid wrapper so
|
|
10384
|
+
* screen readers announce the active cell without moving DOM focus.
|
|
10058
10385
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
10059
10386
|
* @returns {void}
|
|
10060
10387
|
*/
|
|
10061
10388
|
setActiveCell(date) {
|
|
10062
10389
|
const allCells = this.getAllFocusableCells();
|
|
10063
10390
|
|
|
10064
|
-
|
|
10065
|
-
|
|
10391
|
+
let newActiveCell = null;
|
|
10392
|
+
allCells.forEach((cell) => {
|
|
10393
|
+
if (cell.day && cell.day.date === date) {
|
|
10394
|
+
cell.setActive();
|
|
10395
|
+
newActiveCell = cell;
|
|
10396
|
+
} else if (cell.active) {
|
|
10397
|
+
cell.clearActive();
|
|
10398
|
+
}
|
|
10066
10399
|
});
|
|
10067
10400
|
|
|
10068
10401
|
this.activeCellDate = date;
|
|
10402
|
+
|
|
10403
|
+
// Apply activeCell ring only when the grid currently has focus.
|
|
10404
|
+
if (newActiveCell && this._gridHasFocus) {
|
|
10405
|
+
const btn = newActiveCell._cachedButton || newActiveCell.shadowRoot.querySelector('button.day');
|
|
10406
|
+
if (btn) {
|
|
10407
|
+
btn.classList.add('activeCell');
|
|
10408
|
+
}
|
|
10409
|
+
}
|
|
10069
10410
|
}
|
|
10070
10411
|
|
|
10071
10412
|
/**
|
|
10072
|
-
* Focuses the
|
|
10073
|
-
*
|
|
10074
|
-
*
|
|
10413
|
+
* Focuses the calendar grid wrapper and sets the active cell.
|
|
10414
|
+
* DOM focus stays on the grid wrapper; the aria-live region
|
|
10415
|
+
* tells the screen reader which cell is "active".
|
|
10075
10416
|
* @returns {void}
|
|
10076
10417
|
*/
|
|
10077
10418
|
focusActiveCell() {
|
|
10078
|
-
if (this.activeCellDate
|
|
10419
|
+
if (this.activeCellDate !== null && this.activeCellDate !== undefined) {
|
|
10079
10420
|
this.setActiveCell(this.activeCellDate);
|
|
10080
10421
|
}
|
|
10081
10422
|
|
|
10082
|
-
const
|
|
10083
|
-
|
|
10423
|
+
const gridWrapper = this.shadowRoot.querySelector('#calendarGrid');
|
|
10424
|
+
if (gridWrapper) {
|
|
10425
|
+
gridWrapper.focus({ preventScroll: true,
|
|
10426
|
+
focusVisible: true });
|
|
10427
|
+
}
|
|
10428
|
+
}
|
|
10429
|
+
|
|
10430
|
+
/**
|
|
10431
|
+
* Shows the activeCell ring when the grid gains focus.
|
|
10432
|
+
* @private
|
|
10433
|
+
* @returns {void}
|
|
10434
|
+
*/
|
|
10435
|
+
handleGridFocusIn() {
|
|
10436
|
+
this._gridHasFocus = true;
|
|
10437
|
+
const activeCell = this.getAllFocusableCells().find((cell) => cell.active);
|
|
10084
10438
|
if (activeCell) {
|
|
10085
|
-
activeCell.
|
|
10086
|
-
|
|
10087
|
-
|
|
10439
|
+
const btn = activeCell._cachedButton || activeCell.shadowRoot.querySelector('button.day');
|
|
10440
|
+
if (btn) {
|
|
10441
|
+
btn.classList.add('activeCell');
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10445
|
+
|
|
10446
|
+
/**
|
|
10447
|
+
* Hides the activeCell ring when the grid loses focus.
|
|
10448
|
+
* @private
|
|
10449
|
+
* @returns {void}
|
|
10450
|
+
*/
|
|
10451
|
+
handleGridFocusOut() {
|
|
10452
|
+
this._gridHasFocus = false;
|
|
10453
|
+
// Remove activeCell from ALL cells to prevent stale rings.
|
|
10454
|
+
const allCells = this.getAllFocusableCells();
|
|
10455
|
+
for (const cell of allCells) {
|
|
10456
|
+
const btn = cell._cachedButton || cell.shadowRoot.querySelector('button.day');
|
|
10457
|
+
if (btn) {
|
|
10458
|
+
btn.classList.remove('activeCell');
|
|
10459
|
+
}
|
|
10088
10460
|
}
|
|
10089
10461
|
}
|
|
10090
10462
|
|
|
@@ -10099,7 +10471,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10099
10471
|
* 5b. First enabled date scanning forward from finite min (unbounded max)
|
|
10100
10472
|
* 5c. First enabled date scanning backward from finite max (unbounded min)
|
|
10101
10473
|
* 6. First in-range date (even if blackout) so focus can land somewhere
|
|
10102
|
-
* 7.
|
|
10474
|
+
* 7. Undefined — no valid target.
|
|
10103
10475
|
*
|
|
10104
10476
|
* @private
|
|
10105
10477
|
* @param {Object} [options] - Optional settings.
|
|
@@ -10114,12 +10486,15 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10114
10486
|
/**
|
|
10115
10487
|
* Adds days to a timestamp using Date arithmetic to handle DST correctly.
|
|
10116
10488
|
* Returns a local-midnight-aligned timestamp in seconds.
|
|
10489
|
+
* @param {Number} ts - Unix timestamp in seconds.
|
|
10490
|
+
* @param {Number} days - Number of days to add.
|
|
10491
|
+
* @returns {Number} The adjusted timestamp in seconds.
|
|
10117
10492
|
*/
|
|
10118
10493
|
const addDays = (ts, days) => {
|
|
10119
|
-
const
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
return Math.floor(
|
|
10494
|
+
const date = new Date(ts * 1000);
|
|
10495
|
+
date.setDate(date.getDate() + days);
|
|
10496
|
+
date.setHours(0, 0, 0, 0);
|
|
10497
|
+
return Math.floor(date.getTime() / 1000);
|
|
10123
10498
|
};
|
|
10124
10499
|
|
|
10125
10500
|
const rawMin = Number(this.min);
|
|
@@ -10130,9 +10505,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10130
10505
|
const maxTs = Number.isFinite(rawMax) ? rawMax : Infinity;
|
|
10131
10506
|
|
|
10132
10507
|
// Build a Set of blackout timestamps for O(1) lookup.
|
|
10133
|
-
const blackoutSet = new Set(
|
|
10134
|
-
(this.disabledDays || []).map(d => parseInt(d, 10))
|
|
10135
|
-
);
|
|
10508
|
+
const blackoutSet = new Set((this.disabledDays || []).map((day) => parseInt(day, 10)));
|
|
10136
10509
|
|
|
10137
10510
|
// Also include ISO-format blackoutDates from the datepicker if available.
|
|
10138
10511
|
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
@@ -10141,19 +10514,25 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10141
10514
|
for (const isoStr of isoBlackouts) {
|
|
10142
10515
|
const parts = isoStr.split('-');
|
|
10143
10516
|
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
10144
|
-
if (Number.isFinite(ts))
|
|
10517
|
+
if (Number.isFinite(ts)) {
|
|
10518
|
+
blackoutSet.add(ts);
|
|
10519
|
+
}
|
|
10145
10520
|
}
|
|
10146
10521
|
}
|
|
10147
10522
|
|
|
10148
10523
|
/**
|
|
10149
10524
|
* A date (unix timestamp in seconds, midnight-aligned) is "enabled" when
|
|
10150
10525
|
* it is within [min, max] AND not a blackout day.
|
|
10526
|
+
* @param {Number} ts - Unix timestamp in seconds.
|
|
10527
|
+
* @returns {boolean} True if the date is enabled.
|
|
10151
10528
|
*/
|
|
10152
10529
|
const isEnabled = (ts) => ts >= minTs && ts <= maxTs && !blackoutSet.has(ts);
|
|
10153
10530
|
|
|
10154
10531
|
/**
|
|
10155
10532
|
* A date is "in range" (focusable in the grid) when it is within [min, max].
|
|
10156
10533
|
* Blackout dates are focusable but not selectable.
|
|
10534
|
+
* @param {Number} ts - Unix timestamp in seconds.
|
|
10535
|
+
* @returns {boolean} True if the date is in range.
|
|
10157
10536
|
*/
|
|
10158
10537
|
const isInRange = (ts) => ts >= minTs && ts <= maxTs;
|
|
10159
10538
|
|
|
@@ -10162,7 +10541,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10162
10541
|
// the newly visible month rather than the (possibly off-screen) selection.
|
|
10163
10542
|
if (!options.skipDateFrom && this.dateFrom) {
|
|
10164
10543
|
const parsedFrom = parseInt(this.dateFrom, 10);
|
|
10165
|
-
if (Number.isFinite(parsedFrom) && isInRange(parsedFrom))
|
|
10544
|
+
if (Number.isFinite(parsedFrom) && isInRange(parsedFrom)) {
|
|
10545
|
+
return parsedFrom;
|
|
10546
|
+
}
|
|
10166
10547
|
}
|
|
10167
10548
|
|
|
10168
10549
|
// 2. Today's date (midnight-aligned) if enabled.
|
|
@@ -10192,23 +10573,33 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10192
10573
|
const endTs = Math.floor(visibleEnd.getTime() / 1000);
|
|
10193
10574
|
const daysInMonth = visibleEnd.getDate();
|
|
10194
10575
|
|
|
10195
|
-
for (let idx = 0; idx < daysInMonth; idx
|
|
10576
|
+
for (let idx = 0; idx < daysInMonth; idx += 1) {
|
|
10196
10577
|
const ts = addDays(startTs, idx);
|
|
10197
|
-
if (ts > endTs)
|
|
10198
|
-
|
|
10578
|
+
if (ts > endTs) {
|
|
10579
|
+
break;
|
|
10580
|
+
}
|
|
10581
|
+
if (isEnabled(ts)) {
|
|
10582
|
+
return ts;
|
|
10583
|
+
}
|
|
10199
10584
|
}
|
|
10200
10585
|
|
|
10201
10586
|
// No enabled date in the visible month — fall back to first in-range
|
|
10202
10587
|
// date in the month so focus still lands on a focusable cell.
|
|
10203
|
-
for (let idx = 0; idx < daysInMonth; idx
|
|
10588
|
+
for (let idx = 0; idx < daysInMonth; idx += 1) {
|
|
10204
10589
|
const ts = addDays(startTs, idx);
|
|
10205
|
-
if (ts > endTs)
|
|
10206
|
-
|
|
10590
|
+
if (ts > endTs) {
|
|
10591
|
+
break;
|
|
10592
|
+
}
|
|
10593
|
+
if (isInRange(ts)) {
|
|
10594
|
+
return ts;
|
|
10595
|
+
}
|
|
10207
10596
|
}
|
|
10208
10597
|
}
|
|
10209
10598
|
}
|
|
10210
10599
|
|
|
10211
|
-
if (isEnabled(now))
|
|
10600
|
+
if (isEnabled(now)) {
|
|
10601
|
+
return now;
|
|
10602
|
+
}
|
|
10212
10603
|
|
|
10213
10604
|
// When a centralDate is configured (or inferred), constrain the scan to the
|
|
10214
10605
|
// rendered month(s) first so a single-month calendar does not pick a date
|
|
@@ -10227,40 +10618,58 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10227
10618
|
const visDays = Math.round((visEndTs - visStartTs) / 86400) + 1;
|
|
10228
10619
|
|
|
10229
10620
|
// Scan visible months for an enabled date.
|
|
10230
|
-
for (let idx = 0; idx < visDays; idx
|
|
10621
|
+
for (let idx = 0; idx < visDays; idx += 1) {
|
|
10231
10622
|
const ts = addDays(visStartTs, idx);
|
|
10232
|
-
if (ts > visEndTs)
|
|
10233
|
-
|
|
10623
|
+
if (ts > visEndTs) {
|
|
10624
|
+
break;
|
|
10625
|
+
}
|
|
10626
|
+
if (isEnabled(ts)) {
|
|
10627
|
+
return ts;
|
|
10628
|
+
}
|
|
10234
10629
|
}
|
|
10235
10630
|
|
|
10236
10631
|
// No enabled date in visible months — try an in-range (focusable) date so
|
|
10237
10632
|
// keyboard focus still has a tabindex="0" target.
|
|
10238
|
-
for (let idx = 0; idx < visDays; idx
|
|
10633
|
+
for (let idx = 0; idx < visDays; idx += 1) {
|
|
10239
10634
|
const ts = addDays(visStartTs, idx);
|
|
10240
|
-
if (ts > visEndTs)
|
|
10241
|
-
|
|
10635
|
+
if (ts > visEndTs) {
|
|
10636
|
+
break;
|
|
10637
|
+
}
|
|
10638
|
+
if (isInRange(ts)) {
|
|
10639
|
+
return ts;
|
|
10640
|
+
}
|
|
10242
10641
|
}
|
|
10243
10642
|
|
|
10244
10643
|
// 3. First future enabled date (scan forward from tomorrow, capped by max and MAX_SCAN_DAYS).
|
|
10245
|
-
for (let idx = 1; idx <= MAX_SCAN_DAYS; idx
|
|
10644
|
+
for (let idx = 1; idx <= MAX_SCAN_DAYS; idx += 1) {
|
|
10246
10645
|
const ts = addDays(now, idx);
|
|
10247
|
-
if (Number.isFinite(maxTs) && ts > maxTs)
|
|
10248
|
-
|
|
10646
|
+
if (Number.isFinite(maxTs) && ts > maxTs) {
|
|
10647
|
+
break;
|
|
10648
|
+
}
|
|
10649
|
+
if (isEnabled(ts)) {
|
|
10650
|
+
return ts;
|
|
10651
|
+
}
|
|
10249
10652
|
}
|
|
10250
10653
|
|
|
10251
10654
|
// 4. First previous enabled date (scan backward from yesterday, capped by min and MAX_SCAN_DAYS).
|
|
10252
|
-
for (let idx = 1; idx <= MAX_SCAN_DAYS; idx
|
|
10655
|
+
for (let idx = 1; idx <= MAX_SCAN_DAYS; idx += 1) {
|
|
10253
10656
|
const ts = addDays(now, -idx);
|
|
10254
|
-
if (Number.isFinite(minTs) && ts < minTs)
|
|
10255
|
-
|
|
10657
|
+
if (Number.isFinite(minTs) && ts < minTs) {
|
|
10658
|
+
break;
|
|
10659
|
+
}
|
|
10660
|
+
if (isEnabled(ts)) {
|
|
10661
|
+
return ts;
|
|
10662
|
+
}
|
|
10256
10663
|
}
|
|
10257
10664
|
|
|
10258
10665
|
// 5. If scans missed (e.g. min/max range is far from today), fall back to
|
|
10259
10666
|
// the first enabled date in the [min, max] range.
|
|
10260
10667
|
if (Number.isFinite(minTs) && Number.isFinite(maxTs)) {
|
|
10261
10668
|
let ts = minTs;
|
|
10262
|
-
for (let idx = 0; ts <= maxTs; idx
|
|
10263
|
-
if (isEnabled(ts))
|
|
10669
|
+
for (let idx = 0; ts <= maxTs; idx += 1) {
|
|
10670
|
+
if (isEnabled(ts)) {
|
|
10671
|
+
return ts;
|
|
10672
|
+
}
|
|
10264
10673
|
ts = addDays(minTs, idx + 1);
|
|
10265
10674
|
}
|
|
10266
10675
|
}
|
|
@@ -10268,29 +10677,185 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10268
10677
|
// 5b. Finite min with unbounded max (e.g. minDate far in the future):
|
|
10269
10678
|
// scan forward from min for up to MAX_SCAN_DAYS.
|
|
10270
10679
|
if (Number.isFinite(minTs) && !Number.isFinite(maxTs)) {
|
|
10271
|
-
for (let idx = 0; idx <= MAX_SCAN_DAYS; idx
|
|
10680
|
+
for (let idx = 0; idx <= MAX_SCAN_DAYS; idx += 1) {
|
|
10272
10681
|
const ts = addDays(minTs, idx);
|
|
10273
|
-
if (isEnabled(ts))
|
|
10682
|
+
if (isEnabled(ts)) {
|
|
10683
|
+
return ts;
|
|
10684
|
+
}
|
|
10274
10685
|
}
|
|
10275
10686
|
}
|
|
10276
10687
|
|
|
10277
10688
|
// 5c. Unbounded min with a finite max far in the past (e.g. birth-date picker):
|
|
10278
10689
|
// scan backward from max for up to MAX_SCAN_DAYS.
|
|
10279
10690
|
if (!Number.isFinite(minTs) && Number.isFinite(maxTs)) {
|
|
10280
|
-
for (let idx = 0; idx <= MAX_SCAN_DAYS; idx
|
|
10691
|
+
for (let idx = 0; idx <= MAX_SCAN_DAYS; idx += 1) {
|
|
10281
10692
|
const ts = addDays(maxTs, -idx);
|
|
10282
|
-
if (isEnabled(ts))
|
|
10693
|
+
if (isEnabled(ts)) {
|
|
10694
|
+
return ts;
|
|
10695
|
+
}
|
|
10283
10696
|
}
|
|
10284
10697
|
}
|
|
10285
10698
|
|
|
10286
10699
|
// 6. All dates are blackout — fall back to the first in-range date so focus
|
|
10287
10700
|
// still lands on a focusable (but not selectable) cell.
|
|
10288
|
-
if (Number.isFinite(minTs) && isInRange(minTs))
|
|
10289
|
-
|
|
10701
|
+
if (Number.isFinite(minTs) && isInRange(minTs)) {
|
|
10702
|
+
return minTs;
|
|
10703
|
+
}
|
|
10704
|
+
if (isInRange(now)) {
|
|
10705
|
+
return now;
|
|
10706
|
+
}
|
|
10290
10707
|
|
|
10291
10708
|
return undefined;
|
|
10292
10709
|
}
|
|
10293
10710
|
|
|
10711
|
+
/**
|
|
10712
|
+
* Checks if a target date (unix seconds) is within the configured [min, max] range.
|
|
10713
|
+
* Returns false if the date falls outside the range, preventing navigation
|
|
10714
|
+
* to months where all dates are disabled.
|
|
10715
|
+
* @private
|
|
10716
|
+
* @param {Number} targetTs - Unix timestamp in seconds.
|
|
10717
|
+
* @returns {Boolean} True if the date is within range.
|
|
10718
|
+
*/
|
|
10719
|
+
isDateInRange(targetTs) {
|
|
10720
|
+
const rawMin = Number(this.min);
|
|
10721
|
+
const rawMax = Number(this.max);
|
|
10722
|
+
if (Number.isFinite(rawMin) && targetTs < rawMin) {
|
|
10723
|
+
return false;
|
|
10724
|
+
}
|
|
10725
|
+
if (Number.isFinite(rawMax) && targetTs > rawMax) {
|
|
10726
|
+
return false;
|
|
10727
|
+
}
|
|
10728
|
+
return true;
|
|
10729
|
+
}
|
|
10730
|
+
|
|
10731
|
+
/**
|
|
10732
|
+
* Handles arrow key navigation on the calendar grid wrapper.
|
|
10733
|
+
* Focus stays on the grid wrapper; only ariaActiveDescendantElement
|
|
10734
|
+
* and the visual active-cell indicator change.
|
|
10735
|
+
* @private
|
|
10736
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
10737
|
+
* @returns {void}
|
|
10738
|
+
*/
|
|
10739
|
+
handleGridKeyDown(event) {
|
|
10740
|
+
const { key } = event;
|
|
10741
|
+
const actionKeys = [
|
|
10742
|
+
'ArrowRight',
|
|
10743
|
+
'ArrowLeft',
|
|
10744
|
+
'ArrowDown',
|
|
10745
|
+
'ArrowUp',
|
|
10746
|
+
'Enter',
|
|
10747
|
+
' '
|
|
10748
|
+
];
|
|
10749
|
+
|
|
10750
|
+
if (!actionKeys.includes(key)) {
|
|
10751
|
+
return;
|
|
10752
|
+
}
|
|
10753
|
+
|
|
10754
|
+
event.preventDefault();
|
|
10755
|
+
|
|
10756
|
+
const allCells = this.getAllFocusableCells();
|
|
10757
|
+
if (allCells.length === 0) {
|
|
10758
|
+
return;
|
|
10759
|
+
}
|
|
10760
|
+
|
|
10761
|
+
const activeCell = allCells.find((cell) => cell.active);
|
|
10762
|
+
if (!activeCell) {
|
|
10763
|
+
return;
|
|
10764
|
+
}
|
|
10765
|
+
|
|
10766
|
+
// Handle Enter/Space to select the active cell
|
|
10767
|
+
if (key === 'Enter' || key === ' ') {
|
|
10768
|
+
activeCell.handleTap();
|
|
10769
|
+
return;
|
|
10770
|
+
}
|
|
10771
|
+
|
|
10772
|
+
const activeIndex = allCells.indexOf(activeCell);
|
|
10773
|
+
|
|
10774
|
+
if (key === 'ArrowRight' || key === 'ArrowLeft') {
|
|
10775
|
+
const direction = key === 'ArrowRight' ? 1 : -1;
|
|
10776
|
+
const targetIndex = activeIndex + direction;
|
|
10777
|
+
|
|
10778
|
+
if (targetIndex >= 0 && targetIndex < allCells.length) {
|
|
10779
|
+
// Target cell exists in rendered months
|
|
10780
|
+
this.setActiveCell(allCells[targetIndex].day.date);
|
|
10781
|
+
this.scrollToActiveCell();
|
|
10782
|
+
// Dispatch focus event for the cell so live region + range preview update
|
|
10783
|
+
this.handleCellFocused({ detail: { date: allCells[targetIndex].day.date } });
|
|
10784
|
+
} else {
|
|
10785
|
+
// At boundary — need to navigate to next/prev month
|
|
10786
|
+
const navDir = direction === 1 ? 'next' : 'prev';
|
|
10787
|
+
const targetDate = new Date(activeCell.day.date * 1000);
|
|
10788
|
+
targetDate.setDate(targetDate.getDate() + direction);
|
|
10789
|
+
targetDate.setHours(0, 0, 0, 0);
|
|
10790
|
+
const targetTs = Math.floor(targetDate.getTime() / 1000);
|
|
10791
|
+
|
|
10792
|
+
if (this.isDateInRange(targetTs) && ((navDir === 'next' && this.showNextMonthBtn) || (navDir === 'prev' && this.showPrevMonthBtn))) { // eslint-disable-line no-extra-parens
|
|
10793
|
+
|
|
10794
|
+
if (navDir === 'next') {
|
|
10795
|
+
this.handleNextMonth({ skipActiveUpdate: true });
|
|
10796
|
+
} else {
|
|
10797
|
+
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
10798
|
+
}
|
|
10799
|
+
requestAnimationFrame(() => {
|
|
10800
|
+
requestAnimationFrame(() => {
|
|
10801
|
+
const cells = this.getAllFocusableCells();
|
|
10802
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetTs);
|
|
10803
|
+
if (target) {
|
|
10804
|
+
this.setActiveCell(target.day.date);
|
|
10805
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
10806
|
+
} else if (cells.length > 0) {
|
|
10807
|
+
const fallback = navDir === 'next' ? cells[cells.length - 1] : cells[0];
|
|
10808
|
+
this.setActiveCell(fallback.day.date);
|
|
10809
|
+
this.handleCellFocused({ detail: { date: fallback.day.date } });
|
|
10810
|
+
}
|
|
10811
|
+
// Re-focus grid wrapper after month change re-render
|
|
10812
|
+
this.focusActiveCell();
|
|
10813
|
+
});
|
|
10814
|
+
});
|
|
10815
|
+
}
|
|
10816
|
+
}
|
|
10817
|
+
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
10818
|
+
const increment = key === 'ArrowDown' ? 7 : -7;
|
|
10819
|
+
const currentDate = new Date(activeCell.day.date * 1000);
|
|
10820
|
+
currentDate.setDate(currentDate.getDate() + increment);
|
|
10821
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
10822
|
+
const targetDate = Math.floor(currentDate.getTime() / 1000);
|
|
10823
|
+
|
|
10824
|
+
const targetCell = allCells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
10825
|
+
|
|
10826
|
+
if (targetCell) {
|
|
10827
|
+
this.setActiveCell(targetCell.day.date);
|
|
10828
|
+
this.scrollToActiveCell();
|
|
10829
|
+
this.handleCellFocused({ detail: { date: targetCell.day.date } });
|
|
10830
|
+
} else if (this.isDateInRange(targetDate)) {
|
|
10831
|
+
// Target might be in an unrendered month
|
|
10832
|
+
const navDirection = key === 'ArrowDown' ? 'next' : 'prev';
|
|
10833
|
+
if ((navDirection === 'next' && this.showNextMonthBtn) || (navDirection === 'prev' && this.showPrevMonthBtn)) { // eslint-disable-line no-extra-parens
|
|
10834
|
+
if (navDirection === 'next') {
|
|
10835
|
+
this.handleNextMonth({ skipActiveUpdate: true });
|
|
10836
|
+
} else {
|
|
10837
|
+
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
10838
|
+
}
|
|
10839
|
+
requestAnimationFrame(() => {
|
|
10840
|
+
requestAnimationFrame(() => {
|
|
10841
|
+
const cells = this.getAllFocusableCells();
|
|
10842
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
10843
|
+
if (target) {
|
|
10844
|
+
this.setActiveCell(target.day.date);
|
|
10845
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
10846
|
+
} else if (cells.length > 0) {
|
|
10847
|
+
const nearest = navDirection === 'next' ? cells[0] : cells[cells.length - 1];
|
|
10848
|
+
this.setActiveCell(nearest.day.date);
|
|
10849
|
+
this.handleCellFocused({ detail: { date: nearest.day.date } });
|
|
10850
|
+
}
|
|
10851
|
+
this.focusActiveCell();
|
|
10852
|
+
});
|
|
10853
|
+
});
|
|
10854
|
+
}
|
|
10855
|
+
}
|
|
10856
|
+
}
|
|
10857
|
+
}
|
|
10858
|
+
|
|
10294
10859
|
/**
|
|
10295
10860
|
* Handles cross-month boundary navigation events from month components.
|
|
10296
10861
|
* @private
|
|
@@ -10303,15 +10868,15 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10303
10868
|
if (key === 'ArrowRight' || key === 'ArrowLeft') {
|
|
10304
10869
|
// Linear navigation: find adjacent focusable cell across months
|
|
10305
10870
|
const allCells = this.getAllFocusableCells();
|
|
10306
|
-
const currentIndex = allCells.findIndex(cell => cell.day && cell.day.date === fromDate);
|
|
10871
|
+
const currentIndex = allCells.findIndex((cell) => cell.day && cell.day.date === fromDate);
|
|
10307
10872
|
|
|
10308
|
-
if (currentIndex === -1)
|
|
10873
|
+
if (currentIndex === -1) {
|
|
10874
|
+
return;
|
|
10875
|
+
}
|
|
10309
10876
|
|
|
10310
|
-
let targetIndex;
|
|
10877
|
+
let targetIndex = -1;
|
|
10311
10878
|
if (direction === 'next') {
|
|
10312
10879
|
targetIndex = currentIndex + 1;
|
|
10313
|
-
} else {
|
|
10314
|
-
targetIndex = currentIndex - 1;
|
|
10315
10880
|
}
|
|
10316
10881
|
|
|
10317
10882
|
if (targetIndex >= 0 && targetIndex < allCells.length) {
|
|
@@ -10329,11 +10894,15 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10329
10894
|
nextDate.setHours(0, 0, 0, 0);
|
|
10330
10895
|
const nextTs = Math.floor(nextDate.getTime() / 1000);
|
|
10331
10896
|
|
|
10332
|
-
this.
|
|
10897
|
+
if (!this.isDateInRange(nextTs)) {
|
|
10898
|
+
return;
|
|
10899
|
+
}
|
|
10900
|
+
|
|
10901
|
+
this.handleNextMonth({ skipActiveUpdate: true });
|
|
10333
10902
|
requestAnimationFrame(() => {
|
|
10334
10903
|
requestAnimationFrame(() => {
|
|
10335
10904
|
const cells = this.getAllFocusableCells();
|
|
10336
|
-
const target = cells.find(cell => cell.day && cell.day.date === nextTs);
|
|
10905
|
+
const target = cells.find((cell) => cell.day && cell.day.date === nextTs);
|
|
10337
10906
|
if (target) {
|
|
10338
10907
|
this.setActiveCell(target.day.date);
|
|
10339
10908
|
this.focusActiveCell();
|
|
@@ -10351,11 +10920,15 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10351
10920
|
prevDate.setHours(0, 0, 0, 0);
|
|
10352
10921
|
const prevTs = Math.floor(prevDate.getTime() / 1000);
|
|
10353
10922
|
|
|
10354
|
-
this.
|
|
10923
|
+
if (!this.isDateInRange(prevTs)) {
|
|
10924
|
+
return;
|
|
10925
|
+
}
|
|
10926
|
+
|
|
10927
|
+
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
10355
10928
|
requestAnimationFrame(() => {
|
|
10356
10929
|
requestAnimationFrame(() => {
|
|
10357
10930
|
const cells = this.getAllFocusableCells();
|
|
10358
|
-
const target = cells.find(cell => cell.day && cell.day.date === prevTs);
|
|
10931
|
+
const target = cells.find((cell) => cell.day && cell.day.date === prevTs);
|
|
10359
10932
|
if (target) {
|
|
10360
10933
|
this.setActiveCell(target.day.date);
|
|
10361
10934
|
this.focusActiveCell();
|
|
@@ -10367,61 +10940,245 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10367
10940
|
});
|
|
10368
10941
|
});
|
|
10369
10942
|
}
|
|
10370
|
-
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
10371
|
-
// Vertical navigation: find same day-of-week +/- 7 days
|
|
10372
|
-
// Use Date arithmetic instead of fixed seconds to handle DST correctly
|
|
10373
|
-
const increment = key === 'ArrowDown' ? 7 : -7;
|
|
10374
|
-
const currentDate = new Date(fromDate * 1000);
|
|
10375
|
-
currentDate.setDate(currentDate.getDate() + increment);
|
|
10376
|
-
currentDate.setHours(0, 0, 0, 0);
|
|
10377
|
-
const targetDate = Math.floor(currentDate.getTime() / 1000);
|
|
10943
|
+
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
10944
|
+
// Vertical navigation: find same day-of-week +/- 7 days
|
|
10945
|
+
// Use Date arithmetic instead of fixed seconds to handle DST correctly
|
|
10946
|
+
const increment = key === 'ArrowDown' ? 7 : -7;
|
|
10947
|
+
const currentDate = new Date(fromDate * 1000);
|
|
10948
|
+
currentDate.setDate(currentDate.getDate() + increment);
|
|
10949
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
10950
|
+
const targetDate = Math.floor(currentDate.getTime() / 1000);
|
|
10951
|
+
|
|
10952
|
+
const allCells = this.getAllFocusableCells();
|
|
10953
|
+
const targetCell = allCells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
10954
|
+
|
|
10955
|
+
if (targetCell) {
|
|
10956
|
+
this.setActiveCell(targetCell.day.date);
|
|
10957
|
+
this.scrollToActiveCell();
|
|
10958
|
+
this.focusActiveCell();
|
|
10959
|
+
} else if (this.isDateInRange(targetDate)) {
|
|
10960
|
+
// Target might be in an unrendered month, navigate there
|
|
10961
|
+
const navDirection = key === 'ArrowDown' ? 'next' : 'prev';
|
|
10962
|
+
if ((navDirection === 'next' && this.showNextMonthBtn) || (navDirection === 'prev' && this.showPrevMonthBtn)) { // eslint-disable-line no-extra-parens
|
|
10963
|
+
if (navDirection === 'next') {
|
|
10964
|
+
this.handleNextMonth({ skipActiveUpdate: true });
|
|
10965
|
+
} else {
|
|
10966
|
+
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
10967
|
+
}
|
|
10968
|
+
requestAnimationFrame(() => {
|
|
10969
|
+
requestAnimationFrame(() => {
|
|
10970
|
+
const cells = this.getAllFocusableCells();
|
|
10971
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
10972
|
+
if (target) {
|
|
10973
|
+
this.setActiveCell(target.day.date);
|
|
10974
|
+
this.focusActiveCell();
|
|
10975
|
+
} else if (cells.length > 0) {
|
|
10976
|
+
// Clamp to nearest focusable cell
|
|
10977
|
+
const nearest = navDirection === 'next' ? cells[0] : cells[cells.length - 1];
|
|
10978
|
+
this.setActiveCell(nearest.day.date);
|
|
10979
|
+
this.focusActiveCell();
|
|
10980
|
+
}
|
|
10981
|
+
});
|
|
10982
|
+
});
|
|
10983
|
+
}
|
|
10984
|
+
}
|
|
10985
|
+
}
|
|
10986
|
+
}
|
|
10987
|
+
|
|
10988
|
+
/**
|
|
10989
|
+
* Handles cell activation events from month components.
|
|
10990
|
+
* @private
|
|
10991
|
+
* @param {CustomEvent} event - The activation event with target date.
|
|
10992
|
+
* @returns {void}
|
|
10993
|
+
*/
|
|
10994
|
+
handleCellActivate(event) {
|
|
10995
|
+
const { date } = event.detail;
|
|
10996
|
+
this.setActiveCell(date);
|
|
10997
|
+
|
|
10998
|
+
// Don't call focusActiveCell() here. The tap/click already placed
|
|
10999
|
+
// focus on the cell button, and moving it to #calendarGrid would
|
|
11000
|
+
// trigger focusout on the button, closing any open popover on the
|
|
11001
|
+
// cell. Keyboard events are composed and still bubble through
|
|
11002
|
+
// shadow DOM boundaries to the grid's @keydown handler, so
|
|
11003
|
+
// subsequent keyboard navigation continues to work.
|
|
11004
|
+
}
|
|
11005
|
+
|
|
11006
|
+
/**
|
|
11007
|
+
* Handles focus events from calendar cells.
|
|
11008
|
+
* Updates the live region with an SR announcement and triggers
|
|
11009
|
+
* the imperative range preview if applicable.
|
|
11010
|
+
* @private
|
|
11011
|
+
* @param {CustomEvent} event - The calendar-cell-focused event.
|
|
11012
|
+
* @returns {void}
|
|
11013
|
+
*/
|
|
11014
|
+
handleCellFocused(event) {
|
|
11015
|
+
const { date } = event.detail;
|
|
11016
|
+
if (date === null) {
|
|
11017
|
+
return;
|
|
11018
|
+
}
|
|
11019
|
+
|
|
11020
|
+
// With aria-activedescendant, the button no longer receives native focus,
|
|
11021
|
+
// so we use the debounced live region for the full context announcement.
|
|
11022
|
+
const announcement = this.buildFocusAnnouncement(date);
|
|
11023
|
+
this.announceFocusDebounced(announcement);
|
|
11024
|
+
|
|
11025
|
+
// Update the range preview imperatively if in range-preview mode.
|
|
11026
|
+
this.updateRangePreview(date);
|
|
11027
|
+
}
|
|
11028
|
+
|
|
11029
|
+
/**
|
|
11030
|
+
* Builds a full SR announcement string for a focused cell date.
|
|
11031
|
+
* Includes the localized date, range position, popover content,
|
|
11032
|
+
* and blackout status.
|
|
11033
|
+
* @private
|
|
11034
|
+
* @param {Number} date - Unix timestamp (seconds) of the focused cell.
|
|
11035
|
+
* @returns {String} The announcement string.
|
|
11036
|
+
*/
|
|
11037
|
+
buildFocusAnnouncement(date) {
|
|
11038
|
+
let label = this.formatAnnouncementDate(date);
|
|
11039
|
+
|
|
11040
|
+
// Append date slot content (e.g. prices) if present.
|
|
11041
|
+
const dateObj = new Date(date * 1000);
|
|
11042
|
+
const mm = String(dateObj.getMonth() + 1).padStart(2, '0');
|
|
11043
|
+
const dd = String(dateObj.getDate()).padStart(2, '0');
|
|
11044
|
+
const yyyy = dateObj.getFullYear();
|
|
11045
|
+
const dateStr = `${mm}_${dd}_${yyyy}`;
|
|
11046
|
+
const dateSlotEl = this.datepicker?.querySelector(`[slot="date_${dateStr}"]`);
|
|
11047
|
+
if (dateSlotEl) {
|
|
11048
|
+
const text = dateSlotEl.innerText?.trim();
|
|
11049
|
+
if (text) {
|
|
11050
|
+
label += `, ${text}`;
|
|
11051
|
+
}
|
|
11052
|
+
}
|
|
11053
|
+
|
|
11054
|
+
// Append popover content if present.
|
|
11055
|
+
const popoverEl = this.datepicker?.querySelector(`[slot="popover_${dateStr}"]`);
|
|
11056
|
+
if (popoverEl) {
|
|
11057
|
+
const text = popoverEl.innerText?.trim();
|
|
11058
|
+
if (text) {
|
|
11059
|
+
label += `, ${text}`;
|
|
11060
|
+
}
|
|
11061
|
+
}
|
|
11062
|
+
|
|
11063
|
+
// Append range position context.
|
|
11064
|
+
if (this.datepicker?.hasAttribute('range')) {
|
|
11065
|
+
const rangeLabel = this.getRangePositionLabel(date);
|
|
11066
|
+
if (rangeLabel) {
|
|
11067
|
+
label += `, ${rangeLabel}`;
|
|
11068
|
+
}
|
|
11069
|
+
}
|
|
11070
|
+
|
|
11071
|
+
// Append blackout label.
|
|
11072
|
+
if (this.isDateBlackout(date)) {
|
|
11073
|
+
label += `, ${this.datepicker?.blackoutLabel || 'unavailable'}`;
|
|
11074
|
+
}
|
|
11075
|
+
|
|
11076
|
+
return label;
|
|
11077
|
+
}
|
|
11078
|
+
|
|
11079
|
+
/**
|
|
11080
|
+
* Determines the range position label for a given date.
|
|
11081
|
+
* @private
|
|
11082
|
+
* @param {Number} date - Unix timestamp (seconds).
|
|
11083
|
+
* @returns {String|null} The range position label, or null.
|
|
11084
|
+
*/
|
|
11085
|
+
getRangePositionLabel(date) {
|
|
11086
|
+
const parsedFrom = Number.parseInt(this.dateFrom, 10);
|
|
11087
|
+
if (!Number.isFinite(parsedFrom)) {
|
|
11088
|
+
return null;
|
|
11089
|
+
}
|
|
11090
|
+
|
|
11091
|
+
const departTs = startOfDay(parsedFrom * 1000) / 1000;
|
|
11092
|
+
const parsedTo = Number.parseInt(this.dateTo, 10);
|
|
11093
|
+
const hasTo = Number.isFinite(parsedTo);
|
|
11094
|
+
const returnTs = hasTo ? startOfDay(parsedTo * 1000) / 1000 : null;
|
|
11095
|
+
|
|
11096
|
+
if (date === departTs) {
|
|
11097
|
+
return this.datepicker.rangeLabelStart || 'range start';
|
|
11098
|
+
}
|
|
11099
|
+
if (hasTo && date === returnTs) {
|
|
11100
|
+
return this.datepicker.rangeLabelEnd || 'range end';
|
|
11101
|
+
}
|
|
11102
|
+
if (date < departTs) {
|
|
11103
|
+
return this.datepicker.rangeLabelBeforeRange || 'before range';
|
|
11104
|
+
}
|
|
11105
|
+
if (hasTo && date > departTs && date < returnTs) {
|
|
11106
|
+
return this.datepicker.rangeLabelInRange || 'in range';
|
|
11107
|
+
}
|
|
11108
|
+
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
11109
|
+
}
|
|
11110
|
+
|
|
11111
|
+
/**
|
|
11112
|
+
* Checks whether a given date is a blackout date.
|
|
11113
|
+
* @private
|
|
11114
|
+
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
11115
|
+
* @returns {Boolean} True if the date is blacked out.
|
|
11116
|
+
*/
|
|
11117
|
+
isDateBlackout(dateTs) {
|
|
11118
|
+
// Check legacy disabledDays.
|
|
11119
|
+
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0) {
|
|
11120
|
+
if (this.disabledDays.findIndex((day) => parseInt(day, 10) === dateTs) !== -1) {
|
|
11121
|
+
return true;
|
|
11122
|
+
}
|
|
11123
|
+
}
|
|
11124
|
+
|
|
11125
|
+
// Check ISO blackoutDates.
|
|
11126
|
+
const blackoutDates = this.datepicker?.blackoutDates;
|
|
11127
|
+
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
11128
|
+
const date = new Date(dateTs * 1000);
|
|
11129
|
+
const yyyy = date.getFullYear();
|
|
11130
|
+
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
11131
|
+
const dd = String(date.getDate()).padStart(2, '0');
|
|
11132
|
+
if (blackoutDates.includes(`${yyyy}-${mm}-${dd}`)) {
|
|
11133
|
+
return true;
|
|
11134
|
+
}
|
|
11135
|
+
}
|
|
10378
11136
|
|
|
10379
|
-
|
|
10380
|
-
|
|
11137
|
+
return false;
|
|
11138
|
+
}
|
|
10381
11139
|
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
} else {
|
|
10393
|
-
this.handlePrevMonth();
|
|
10394
|
-
}
|
|
10395
|
-
requestAnimationFrame(() => {
|
|
10396
|
-
requestAnimationFrame(() => {
|
|
10397
|
-
const cells = this.getAllFocusableCells();
|
|
10398
|
-
const target = cells.find(cell => cell.day && cell.day.date === targetDate);
|
|
10399
|
-
if (target) {
|
|
10400
|
-
this.setActiveCell(target.day.date);
|
|
10401
|
-
this.focusActiveCell();
|
|
10402
|
-
} else if (cells.length > 0) {
|
|
10403
|
-
// Clamp to nearest focusable cell
|
|
10404
|
-
const nearest = navDirection === 'next' ? cells[0] : cells[cells.length - 1];
|
|
10405
|
-
this.setActiveCell(nearest.day.date);
|
|
10406
|
-
this.focusActiveCell();
|
|
10407
|
-
}
|
|
10408
|
-
});
|
|
10409
|
-
});
|
|
10410
|
-
}
|
|
10411
|
-
}
|
|
11140
|
+
/**
|
|
11141
|
+
* Updates the range preview classes imperatively across all cells.
|
|
11142
|
+
* Only active when in range mode with dateFrom set and dateTo not yet set.
|
|
11143
|
+
* @private
|
|
11144
|
+
* @param {Number} hoveredDate - Unix timestamp of the hovered/focused date.
|
|
11145
|
+
* @returns {void}
|
|
11146
|
+
*/
|
|
11147
|
+
updateRangePreview(hoveredDate) {
|
|
11148
|
+
if (this.noRange || !this.dateFrom || this.dateTo) {
|
|
11149
|
+
return;
|
|
10412
11150
|
}
|
|
11151
|
+
|
|
11152
|
+
const parsedDateFrom = parseInt(this.dateFrom, 10);
|
|
11153
|
+
const allCells = this.getAllFocusableCells();
|
|
11154
|
+
|
|
11155
|
+
allCells.forEach((cell) => {
|
|
11156
|
+
cell.updateRangePreviewClasses(hoveredDate, parsedDateFrom);
|
|
11157
|
+
});
|
|
10413
11158
|
}
|
|
10414
11159
|
|
|
10415
11160
|
/**
|
|
10416
|
-
*
|
|
11161
|
+
* Clears range preview classes from all cells.
|
|
10417
11162
|
* @private
|
|
10418
|
-
* @param {CustomEvent} event - The activation event with target date.
|
|
10419
11163
|
* @returns {void}
|
|
10420
11164
|
*/
|
|
10421
|
-
|
|
10422
|
-
const
|
|
10423
|
-
|
|
10424
|
-
|
|
11165
|
+
clearRangePreview() {
|
|
11166
|
+
const allCells = this.getAllFocusableCells();
|
|
11167
|
+
allCells.forEach((cell) => {
|
|
11168
|
+
cell.clearRangePreviewClasses();
|
|
11169
|
+
});
|
|
11170
|
+
}
|
|
11171
|
+
|
|
11172
|
+
/**
|
|
11173
|
+
* Overrides the base class handler to prevent setting `this.hoveredDate`
|
|
11174
|
+
* as a reactive property. Instead, handles the range preview imperatively.
|
|
11175
|
+
* @private
|
|
11176
|
+
* @param {CustomEvent} event - The hovered-date-changed event from a month.
|
|
11177
|
+
* @returns {void}
|
|
11178
|
+
*/
|
|
11179
|
+
hoveredDateChanged(event) {
|
|
11180
|
+
const hoveredDate = event.detail.value;
|
|
11181
|
+
this.updateRangePreview(hoveredDate);
|
|
10425
11182
|
}
|
|
10426
11183
|
|
|
10427
11184
|
/**
|
|
@@ -10430,7 +11187,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10430
11187
|
* @returns {void}
|
|
10431
11188
|
*/
|
|
10432
11189
|
scrollToActiveCell() {
|
|
10433
|
-
if (this.activeCellDate
|
|
11190
|
+
if (this.activeCellDate === null || this.activeCellDate === undefined) {
|
|
11191
|
+
return;
|
|
11192
|
+
}
|
|
10434
11193
|
|
|
10435
11194
|
const date = new Date(this.activeCellDate * 1000);
|
|
10436
11195
|
const month = date.getMonth() + 1;
|
|
@@ -10440,25 +11199,138 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10440
11199
|
|
|
10441
11200
|
if (monthElem) {
|
|
10442
11201
|
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
10443
|
-
monthElem.scrollIntoView({ block: 'nearest',
|
|
11202
|
+
monthElem.scrollIntoView({ block: 'nearest',
|
|
11203
|
+
behavior: prefersReducedMotion ? 'instant' : 'smooth' });
|
|
11204
|
+
}
|
|
11205
|
+
}
|
|
11206
|
+
|
|
11207
|
+
/**
|
|
11208
|
+
* Returns (and lazily creates) an aria-live region inside the dropdown's
|
|
11209
|
+
* <dialog> element. This placement is critical for two reasons:
|
|
11210
|
+
*
|
|
11211
|
+
* 1. Inside the dialog's accessible scope — dialog.showModal() makes
|
|
11212
|
+
* everything outside the top-layer dialog inert, and desktop modal
|
|
11213
|
+
* mode uses _setPageInert() on document.body siblings. A live region
|
|
11214
|
+
* on document.body would be invisible to screen readers in both cases.
|
|
11215
|
+
*
|
|
11216
|
+
* 2. Not nested in shadow DOM — Chrome inconsistently observes aria-live
|
|
11217
|
+
* mutations inside shadow DOM across machines and versions. The dialog
|
|
11218
|
+
* element is only one shadow root deep (the dropdown bib's shadow DOM),
|
|
11219
|
+
* which Chrome handles reliably. The calendar's own shadow DOM (nested
|
|
11220
|
+
* inside the bib via slotting) is two+ levels deep and unreliable.
|
|
11221
|
+
*
|
|
11222
|
+
* @private
|
|
11223
|
+
* @returns {HTMLElement} The live region element.
|
|
11224
|
+
*/
|
|
11225
|
+
getOrCreateLiveRegion() {
|
|
11226
|
+
if (this._liveRegion && this._liveRegion.isConnected) {
|
|
11227
|
+
return this._liveRegion;
|
|
11228
|
+
}
|
|
11229
|
+
|
|
11230
|
+
// Access the dialog element inside the dropdown bib's shadow DOM.
|
|
11231
|
+
const dialog = this.dropdown?.bibContent?.shadowRoot?.querySelector('dialog');
|
|
11232
|
+
if (!dialog) {
|
|
11233
|
+
return null;
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11236
|
+
// Check if we already created one for this calendar instance.
|
|
11237
|
+
const regionId = `auro-calendar-live-${this._calendarInstanceId}`;
|
|
11238
|
+
const existing = dialog.querySelector(`#${regionId}`);
|
|
11239
|
+
if (existing) {
|
|
11240
|
+
this._liveRegion = existing;
|
|
11241
|
+
return existing;
|
|
11242
|
+
}
|
|
11243
|
+
|
|
11244
|
+
const el = document.createElement('div');
|
|
11245
|
+
el.id = regionId;
|
|
11246
|
+
el.setAttribute('aria-live', 'assertive');
|
|
11247
|
+
el.setAttribute('aria-atomic', 'true');
|
|
11248
|
+
el.style.cssText = 'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;';
|
|
11249
|
+
dialog.appendChild(el);
|
|
11250
|
+
|
|
11251
|
+
this._liveRegion = el;
|
|
11252
|
+
return el;
|
|
11253
|
+
}
|
|
11254
|
+
|
|
11255
|
+
/**
|
|
11256
|
+
* Removes the live region when this calendar is disconnected.
|
|
11257
|
+
* @private
|
|
11258
|
+
* @returns {void}
|
|
11259
|
+
*/
|
|
11260
|
+
disconnectedCallback() {
|
|
11261
|
+
super.disconnectedCallback();
|
|
11262
|
+
|
|
11263
|
+
// Cancel any pending announcements so they don't fire after teardown.
|
|
11264
|
+
if (this._announceRafId) {
|
|
11265
|
+
cancelAnimationFrame(this._announceRafId);
|
|
11266
|
+
this._announceRafId = null;
|
|
11267
|
+
}
|
|
11268
|
+
if (this._focusAnnounceTimer) {
|
|
11269
|
+
clearTimeout(this._focusAnnounceTimer);
|
|
11270
|
+
this._focusAnnounceTimer = null;
|
|
10444
11271
|
}
|
|
11272
|
+
|
|
11273
|
+
if (this._liveRegion && this._liveRegion.isConnected) {
|
|
11274
|
+
this._liveRegion.remove();
|
|
11275
|
+
}
|
|
11276
|
+
this._liveRegion = null;
|
|
10445
11277
|
}
|
|
10446
11278
|
|
|
10447
11279
|
/**
|
|
10448
|
-
* Announces a date selection via the live region.
|
|
11280
|
+
* Announces a date selection or focus change via the live region.
|
|
11281
|
+
* Uses requestAnimationFrame to ensure the clear and set happen in
|
|
11282
|
+
* separate rendering frames — Chrome may coalesce synchronous or
|
|
11283
|
+
* microtask-deferred mutations into a single accessibility tree update.
|
|
10449
11284
|
* @private
|
|
10450
11285
|
* @param {String} dateStr - The localized date string to announce.
|
|
10451
11286
|
* @returns {void}
|
|
10452
11287
|
*/
|
|
10453
11288
|
announceSelection(dateStr) {
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
11289
|
+
// Cancel any previously queued rAF announcement so a rapid
|
|
11290
|
+
// sequence of calls (e.g. bib open → month nav) only announces
|
|
11291
|
+
// the last one.
|
|
11292
|
+
if (this._announceRafId) {
|
|
11293
|
+
cancelAnimationFrame(this._announceRafId);
|
|
11294
|
+
}
|
|
11295
|
+
const liveRegion = this.getOrCreateLiveRegion();
|
|
11296
|
+
if (!liveRegion) {
|
|
11297
|
+
return;
|
|
11298
|
+
}
|
|
11299
|
+
|
|
11300
|
+
// Double-rAF: clear in frame N, set in frame N+1. Chrome batches
|
|
11301
|
+
// accessibility tree mutations within a single animation frame, so
|
|
11302
|
+
// a same-frame clear+set can be coalesced into a no-op if the new
|
|
11303
|
+
// value matches a recently announced string. Splitting across two
|
|
11304
|
+
// frames guarantees Chrome sees two distinct tree states and fires
|
|
11305
|
+
// a new accessibility event for the content change.
|
|
11306
|
+
liveRegion.textContent = '';
|
|
11307
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
11308
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
10459
11309
|
liveRegion.textContent = dateStr;
|
|
11310
|
+
this._announceRafId = null;
|
|
10460
11311
|
});
|
|
11312
|
+
});
|
|
11313
|
+
}
|
|
11314
|
+
|
|
11315
|
+
/**
|
|
11316
|
+
* Debounced version of announceSelection for focus navigation.
|
|
11317
|
+
* Uses the assertive live region with a 150ms debounce so only the
|
|
11318
|
+
* final cell after rapid arrow-key traversal is announced. We
|
|
11319
|
+
* originally tried aria-live="polite" here, but VoiceOver treats
|
|
11320
|
+
* polite as "wait until idle" — which never happens during active
|
|
11321
|
+
* keyboard navigation — so the announcements were silently dropped.
|
|
11322
|
+
* @private
|
|
11323
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
11324
|
+
* @returns {void}
|
|
11325
|
+
*/
|
|
11326
|
+
announceFocusDebounced(dateStr) {
|
|
11327
|
+
if (this._focusAnnounceTimer) {
|
|
11328
|
+
clearTimeout(this._focusAnnounceTimer);
|
|
10461
11329
|
}
|
|
11330
|
+
this._focusAnnounceTimer = setTimeout(() => {
|
|
11331
|
+
this.announceSelection(dateStr);
|
|
11332
|
+
this._focusAnnounceTimer = null;
|
|
11333
|
+
}, 150);
|
|
10462
11334
|
}
|
|
10463
11335
|
|
|
10464
11336
|
/**
|
|
@@ -10471,12 +11343,16 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10471
11343
|
const date = new Date(parseInt(timestamp, 10) * 1000);
|
|
10472
11344
|
const localeCode = this.locale?.code || undefined;
|
|
10473
11345
|
const formatter = new Intl.DateTimeFormat(localeCode, {
|
|
10474
|
-
weekday: 'long',
|
|
11346
|
+
weekday: 'long',
|
|
11347
|
+
year: 'numeric',
|
|
11348
|
+
month: 'long',
|
|
11349
|
+
day: 'numeric'
|
|
10475
11350
|
});
|
|
10476
11351
|
return formatter.format(date);
|
|
10477
11352
|
}
|
|
10478
11353
|
|
|
10479
11354
|
firstUpdated() {
|
|
11355
|
+
|
|
10480
11356
|
this.addEventListener('date-from-changed', () => {
|
|
10481
11357
|
this.dispatchEvent(new CustomEvent('auroCalendar-dateSelected', {
|
|
10482
11358
|
bubbles: true,
|
|
@@ -10505,6 +11381,11 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10505
11381
|
this.addEventListener('calendar-cell-activate', (event) => {
|
|
10506
11382
|
this.handleCellActivate(event);
|
|
10507
11383
|
});
|
|
11384
|
+
|
|
11385
|
+
// Listen for cell focus events (SR announcements + range preview)
|
|
11386
|
+
this.addEventListener('calendar-cell-focused', (event) => {
|
|
11387
|
+
this.handleCellFocused(event);
|
|
11388
|
+
});
|
|
10508
11389
|
}
|
|
10509
11390
|
|
|
10510
11391
|
injectSlot(slotName, nodes) {
|
|
@@ -10531,7 +11412,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10531
11412
|
if (changedProperties.has('visible')) {
|
|
10532
11413
|
if (this.visible) {
|
|
10533
11414
|
// Compute the active date eagerly from data — no DOM needed.
|
|
10534
|
-
if (this.activeCellDate
|
|
11415
|
+
if (this.activeCellDate === null || this.activeCellDate === undefined) {
|
|
10535
11416
|
this.activeCellDate = this.computeActiveDate();
|
|
10536
11417
|
}
|
|
10537
11418
|
|
|
@@ -10599,7 +11480,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
10599
11480
|
</button>
|
|
10600
11481
|
` : undefined}
|
|
10601
11482
|
</div>
|
|
10602
|
-
<div class="calendars">
|
|
11483
|
+
<div id="calendarGrid" class="calendars" role="group" tabindex="0" @keydown="${this.handleGridKeyDown}" @focusin="${this.handleGridFocusIn}" @focusout="${this.handleGridFocusOut}">
|
|
10603
11484
|
${this.renderAllCalendars()}
|
|
10604
11485
|
</div>
|
|
10605
11486
|
</div>
|
|
@@ -14484,7 +15365,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
14484
15365
|
}
|
|
14485
15366
|
};
|
|
14486
15367
|
|
|
14487
|
-
var formkitVersion$1 = '
|
|
15368
|
+
var formkitVersion$1 = '202606012139';
|
|
14488
15369
|
|
|
14489
15370
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
14490
15371
|
static get properties() {
|
|
@@ -19820,109 +20701,236 @@ class AuroInputUtilities {
|
|
|
19820
20701
|
}
|
|
19821
20702
|
}
|
|
19822
20703
|
|
|
19823
|
-
|
|
20704
|
+
/**
|
|
20705
|
+
* @description Splits a date string into its parts according to the provided format. Does NOT validate that the result is a real calendar date — use `parseDate` when validation is required.
|
|
20706
|
+
* @param {string} dateStr - Date string to parse.
|
|
20707
|
+
* @param {string} format - Date format to parse.
|
|
20708
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
20709
|
+
*/
|
|
20710
|
+
function getDateParts(dateStr, format) {
|
|
20711
|
+
if (!dateStr) {
|
|
20712
|
+
return undefined;
|
|
20713
|
+
}
|
|
19824
20714
|
|
|
19825
|
-
|
|
20715
|
+
const formatSeparatorMatch = format.match(/[/.-]/);
|
|
20716
|
+
let valueParts;
|
|
20717
|
+
let formatParts;
|
|
19826
20718
|
|
|
19827
|
-
|
|
19828
|
-
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
20719
|
+
if (formatSeparatorMatch) {
|
|
20720
|
+
const separator = formatSeparatorMatch[0];
|
|
20721
|
+
valueParts = dateStr.split(separator);
|
|
20722
|
+
formatParts = format.split(separator);
|
|
20723
|
+
} else {
|
|
20724
|
+
if (dateStr.match(/[/.-]/)) {
|
|
20725
|
+
throw new Error(
|
|
20726
|
+
"AuroDatepickerUtilities | parseDate: Date string has no separators",
|
|
20727
|
+
);
|
|
20728
|
+
}
|
|
19834
20729
|
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
20730
|
+
if (dateStr.length !== format.length) {
|
|
20731
|
+
throw new Error(
|
|
20732
|
+
"AuroDatepickerUtilities | parseDate: Date string and format length do not match",
|
|
20733
|
+
);
|
|
20734
|
+
}
|
|
20735
|
+
|
|
20736
|
+
valueParts = [dateStr];
|
|
20737
|
+
formatParts = [format];
|
|
20738
|
+
}
|
|
20739
|
+
|
|
20740
|
+
if (valueParts.length !== formatParts.length) {
|
|
20741
|
+
throw new Error(
|
|
20742
|
+
`AuroDatepickerUtilities | parseDate: Date string and format do not match : ${dateStr} vs ${format}`,
|
|
20743
|
+
);
|
|
20744
|
+
}
|
|
19839
20745
|
|
|
19840
|
-
|
|
19841
|
-
|
|
20746
|
+
const result = formatParts.reduce((acc, part, index) => {
|
|
20747
|
+
const value = valueParts[index];
|
|
19842
20748
|
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
|
|
20749
|
+
if (/m/iu.test(part) && part.length === value.length) {
|
|
20750
|
+
acc.month = value;
|
|
20751
|
+
} else if (/d/iu.test(part) && part.length === value.length) {
|
|
20752
|
+
acc.day = value;
|
|
20753
|
+
} else if (/y/iu.test(part) && part.length === value.length) {
|
|
20754
|
+
acc.year = value;
|
|
20755
|
+
}
|
|
19846
20756
|
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
|
|
19850
|
-
}
|
|
20757
|
+
return acc;
|
|
20758
|
+
}, {});
|
|
19851
20759
|
|
|
19852
|
-
|
|
19853
|
-
|
|
19854
|
-
|
|
20760
|
+
if (!result.month && !result.day && !result.year) {
|
|
20761
|
+
throw new Error(
|
|
20762
|
+
"AuroDatepickerUtilities | parseDate: Unable to parse date string",
|
|
20763
|
+
);
|
|
20764
|
+
}
|
|
19855
20765
|
|
|
19856
|
-
|
|
19857
|
-
|
|
19858
|
-
} else if ((/d/iu).test(part)) {
|
|
19859
|
-
acc.day = value;
|
|
19860
|
-
} else if ((/y/iu).test(part)) {
|
|
19861
|
-
acc.year = value;
|
|
19862
|
-
}
|
|
20766
|
+
return result;
|
|
20767
|
+
}
|
|
19863
20768
|
|
|
19864
|
-
|
|
19865
|
-
|
|
20769
|
+
function isCalendarDate(year, month, day) {
|
|
20770
|
+
let yearNumber = Number(year);
|
|
20771
|
+
const monthNumber = Number(month);
|
|
20772
|
+
const dayNumber = Number(day);
|
|
19866
20773
|
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
20774
|
+
if (
|
|
20775
|
+
!Number.isInteger(yearNumber) ||
|
|
20776
|
+
!Number.isInteger(monthNumber) ||
|
|
20777
|
+
!Number.isInteger(dayNumber)
|
|
20778
|
+
) {
|
|
20779
|
+
return false;
|
|
20780
|
+
}
|
|
19871
20781
|
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
20782
|
+
// Handle 2-digit years by converting them to 4-digit years based on a cutoff. This allows for parsing of 2-digit year formats while still validating the resulting date.
|
|
20783
|
+
if (yearNumber < 100 && yearNumber >= 50) {
|
|
20784
|
+
yearNumber += 1900;
|
|
20785
|
+
} else if (yearNumber < 50) {
|
|
20786
|
+
yearNumber += 2000;
|
|
20787
|
+
}
|
|
19875
20788
|
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
* @param {Object} date - Date to convert to string.
|
|
19879
|
-
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
19880
|
-
* @returns {String} Returns the date as a string.
|
|
19881
|
-
*/
|
|
19882
|
-
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
19883
|
-
year: "numeric",
|
|
19884
|
-
month: "2-digit",
|
|
19885
|
-
day: "2-digit",
|
|
19886
|
-
});
|
|
20789
|
+
const stringified = `${String(yearNumber).padStart(4, "0")}-${String(monthNumber).padStart(2, "0")}-${String(dayNumber).padStart(2, "0")}`;
|
|
20790
|
+
const date = new Date(stringified.replace(/[.-]/g, "/"));
|
|
19887
20791
|
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
* @returns {Boolean}
|
|
19893
|
-
*/
|
|
19894
|
-
this.toNorthAmericanFormat = (dateStr, format) => {
|
|
20792
|
+
return (
|
|
20793
|
+
!Number.isNaN(date.getTime()) && toISOFormatString(date) === stringified
|
|
20794
|
+
);
|
|
20795
|
+
}
|
|
19895
20796
|
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
20797
|
+
/**
|
|
20798
|
+
* @description Parses a date string into its components and validates that the result is a real calendar date. Use `getDateParts` instead when raw splitting without validation is needed (e.g. for in-progress input).
|
|
20799
|
+
*
|
|
20800
|
+
* Partial formats are supported: components absent from `format` default to `year → "0"`,
|
|
20801
|
+
* `month → "01"`, `day → "01"` for calendar validation only. The returned object contains
|
|
20802
|
+
* only the fields actually present in the format string — missing fields are never injected.
|
|
20803
|
+
* @param {string} dateStr - Date string to parse.
|
|
20804
|
+
* @param {string} format - Date format to parse.
|
|
20805
|
+
* @returns {{ month?: string, day?: string, year?: string }|undefined}
|
|
20806
|
+
* @throws {Error} Throws when the parsed result does not represent a valid calendar date.
|
|
20807
|
+
*/
|
|
20808
|
+
function parseDate(dateStr, format = "mm/dd/yyyy") {
|
|
20809
|
+
if (!dateStr || !format) {
|
|
20810
|
+
return undefined;
|
|
20811
|
+
}
|
|
20812
|
+
const result = getDateParts(dateStr.trim(), format);
|
|
19899
20813
|
|
|
19900
|
-
|
|
20814
|
+
if (!result) {
|
|
20815
|
+
return undefined;
|
|
20816
|
+
}
|
|
19901
20817
|
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
20818
|
+
const lowerFormat = format.toLowerCase();
|
|
20819
|
+
const year = lowerFormat.includes("yy") ? result.year : "0";
|
|
20820
|
+
const month = lowerFormat.includes("mm") ? result.month : "01";
|
|
20821
|
+
const day = lowerFormat.includes("dd") ? result.day : "01";
|
|
19905
20822
|
|
|
19906
|
-
|
|
20823
|
+
if (isCalendarDate(year, month, day)) {
|
|
20824
|
+
return result;
|
|
20825
|
+
}
|
|
19907
20826
|
|
|
19908
|
-
|
|
19909
|
-
|
|
19910
|
-
|
|
19911
|
-
|
|
20827
|
+
throw new Error(
|
|
20828
|
+
`AuroDatepickerUtilities | parseDate: Date string is not a valid date ${JSON.stringify(result)} with format ${format}`,
|
|
20829
|
+
);
|
|
20830
|
+
}
|
|
19912
20831
|
|
|
19913
|
-
|
|
19914
|
-
|
|
19915
|
-
|
|
20832
|
+
/**
|
|
20833
|
+
* Convert a date object to string format.
|
|
20834
|
+
* @param {Object} date - Date to convert to string.
|
|
20835
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
20836
|
+
* @returns {String} Returns the date as a string.
|
|
20837
|
+
*/
|
|
20838
|
+
function getDateAsString(date, locale = undefined) {
|
|
20839
|
+
return date.toLocaleDateString(locale, {
|
|
20840
|
+
year: "numeric",
|
|
20841
|
+
month: "2-digit",
|
|
20842
|
+
day: "2-digit",
|
|
20843
|
+
});
|
|
20844
|
+
}
|
|
19916
20845
|
|
|
19917
|
-
|
|
19918
|
-
|
|
19919
|
-
|
|
20846
|
+
/**
|
|
20847
|
+
* Converts a date string to a North American date format.
|
|
20848
|
+
* @param {String} dateStr - Date to validate.
|
|
20849
|
+
* @param {String} format - Date format to validate against.
|
|
20850
|
+
* @returns {String}
|
|
20851
|
+
*/
|
|
20852
|
+
function toNorthAmericanFormat$1(dateStr, format) {
|
|
20853
|
+
if (format === "mm/dd/yyyy") {
|
|
20854
|
+
return dateStr;
|
|
20855
|
+
}
|
|
19920
20856
|
|
|
19921
|
-
|
|
19922
|
-
|
|
20857
|
+
const parsedDate = parseDate(dateStr, format);
|
|
20858
|
+
|
|
20859
|
+
if (!parsedDate) {
|
|
20860
|
+
throw new Error(
|
|
20861
|
+
"AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string",
|
|
20862
|
+
);
|
|
20863
|
+
}
|
|
20864
|
+
|
|
20865
|
+
const { month, day, year } = parsedDate;
|
|
20866
|
+
|
|
20867
|
+
return [month, day, year].filter(Boolean).join("/");
|
|
20868
|
+
}
|
|
20869
|
+
|
|
20870
|
+
/**
|
|
20871
|
+
* Validates that a date string matches the provided format and represents a real calendar date.
|
|
20872
|
+
*
|
|
20873
|
+
* @param {string} dateStr - Date string to validate.
|
|
20874
|
+
* @param {string} [format="yyyy-mm-dd"] - Format of the date string.
|
|
20875
|
+
* @returns {boolean} True when the date string is valid for the provided format, otherwise false.
|
|
20876
|
+
*/
|
|
20877
|
+
function isValidDate(dateStr, format = "yyyy-mm-dd") {
|
|
20878
|
+
try {
|
|
20879
|
+
if (typeof dateStr !== "string" || !dateStr || format?.length < 8) {
|
|
20880
|
+
return false;
|
|
20881
|
+
}
|
|
20882
|
+
|
|
20883
|
+
if (parseDate(dateStr, format)) {
|
|
20884
|
+
return true;
|
|
20885
|
+
}
|
|
20886
|
+
} catch (error) {
|
|
20887
|
+
return false;
|
|
20888
|
+
}
|
|
20889
|
+
return false;
|
|
20890
|
+
}
|
|
20891
|
+
|
|
20892
|
+
/**
|
|
20893
|
+
* Converts a JavaScript Date instance to a simple ISO-like date string. This returns only the calendar date portion without any time or timezone information.
|
|
20894
|
+
*
|
|
20895
|
+
* @param {Date} date - Date instance to convert to an ISO-like string.
|
|
20896
|
+
* @returns {string} A string in the format "yyyy-mm-dd" representing the provided date.
|
|
20897
|
+
* @throws {Error} Throws an error when the input is not a valid Date instance.
|
|
20898
|
+
*/
|
|
20899
|
+
function toISOFormatString(date) {
|
|
20900
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
20901
|
+
throw new Error(
|
|
20902
|
+
"AuroDatepickerUtilities | toISOFormatString: Input must be a valid Date instance",
|
|
20903
|
+
);
|
|
20904
|
+
}
|
|
20905
|
+
return `${String(date.getFullYear()).padStart(4, "0")}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
20906
|
+
}
|
|
20907
|
+
|
|
20908
|
+
/**
|
|
20909
|
+
* Converts a date string into a JavaScript Date instance. This method supports ISO formatted strings and other formats that can be parsed by the formatter.
|
|
20910
|
+
*
|
|
20911
|
+
* @param {String} dateStr - Date string to convert into a Date object.
|
|
20912
|
+
* @param {String} format - Date format used to parse the string when it is not in ISO format.
|
|
20913
|
+
* @returns {Date|null} Returns a Date instance for valid input or null for non-string input.
|
|
20914
|
+
* @throws {Error} Throws when parsing fails for non-ISO string input.
|
|
20915
|
+
*/
|
|
20916
|
+
function stringToDateInstance(dateStr, format = "yyyy-mm-dd") {
|
|
20917
|
+
if (typeof dateStr !== "string") {
|
|
20918
|
+
return null;
|
|
19923
20919
|
}
|
|
20920
|
+
|
|
20921
|
+
const { month, day, year } = parseDate(dateStr, format);
|
|
20922
|
+
return new Date(`${year}/${month}/${day}`);
|
|
19924
20923
|
}
|
|
19925
|
-
|
|
20924
|
+
|
|
20925
|
+
const dateFormatter = {
|
|
20926
|
+
parseDate,
|
|
20927
|
+
getDateParts,
|
|
20928
|
+
getDateAsString,
|
|
20929
|
+
toNorthAmericanFormat: toNorthAmericanFormat$1,
|
|
20930
|
+
isValidDate,
|
|
20931
|
+
toISOFormatString,
|
|
20932
|
+
stringToDateInstance,
|
|
20933
|
+
};
|
|
19926
20934
|
|
|
19927
20935
|
// filepath: dateConstraints.mjs
|
|
19928
20936
|
const DATE_UTIL_CONSTRAINTS = {
|
|
@@ -19994,12 +21002,11 @@ class AuroDateUtilitiesBase {
|
|
|
19994
21002
|
/* eslint-disable no-magic-numbers */
|
|
19995
21003
|
|
|
19996
21004
|
class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
19997
|
-
|
|
19998
21005
|
/**
|
|
19999
21006
|
* Returns the current century.
|
|
20000
21007
|
* @returns {String} The current century.
|
|
20001
21008
|
*/
|
|
20002
|
-
getCentury
|
|
21009
|
+
getCentury() {
|
|
20003
21010
|
return String(new Date().getFullYear()).slice(0, 2);
|
|
20004
21011
|
}
|
|
20005
21012
|
|
|
@@ -20008,14 +21015,12 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20008
21015
|
* @param {String} year - The year to convert to four digits.
|
|
20009
21016
|
* @returns {String} The four digit year.
|
|
20010
21017
|
*/
|
|
20011
|
-
getFourDigitYear
|
|
20012
|
-
|
|
21018
|
+
getFourDigitYear(year) {
|
|
20013
21019
|
const strYear = String(year).trim();
|
|
20014
21020
|
return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
|
|
20015
21021
|
}
|
|
20016
21022
|
|
|
20017
21023
|
constructor() {
|
|
20018
|
-
|
|
20019
21024
|
super();
|
|
20020
21025
|
|
|
20021
21026
|
/**
|
|
@@ -20024,7 +21029,8 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20024
21029
|
* @param {Object} date2 - Second date to compare.
|
|
20025
21030
|
* @returns {Boolean} Returns true if the dates match.
|
|
20026
21031
|
*/
|
|
20027
|
-
this.datesMatch = (date1, date2) =>
|
|
21032
|
+
this.datesMatch = (date1, date2) =>
|
|
21033
|
+
new Date(date1).getTime() === new Date(date2).getTime();
|
|
20028
21034
|
|
|
20029
21035
|
/**
|
|
20030
21036
|
* Returns true if value passed in is a valid date.
|
|
@@ -20033,53 +21039,41 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20033
21039
|
* @returns {Boolean}
|
|
20034
21040
|
*/
|
|
20035
21041
|
this.validDateStr = (date, format) => {
|
|
20036
|
-
|
|
20037
21042
|
// The length we expect the date string to be
|
|
20038
|
-
const dateStrLength = format
|
|
21043
|
+
const dateStrLength = format?.length || 0;
|
|
20039
21044
|
|
|
20040
21045
|
// Guard Clause: Date and format are defined
|
|
20041
21046
|
if (typeof date === "undefined" || typeof format === "undefined") {
|
|
20042
|
-
throw new Error(
|
|
21047
|
+
throw new Error(
|
|
21048
|
+
"AuroDatepickerUtilities | validateDateStr: Date and format are required",
|
|
21049
|
+
);
|
|
20043
21050
|
}
|
|
20044
21051
|
|
|
20045
21052
|
// Guard Clause: Date should be of type string
|
|
20046
21053
|
if (typeof date !== "string") {
|
|
20047
|
-
throw new Error(
|
|
21054
|
+
throw new Error(
|
|
21055
|
+
"AuroDatepickerUtilities | validateDateStr: Date must be a string",
|
|
21056
|
+
);
|
|
20048
21057
|
}
|
|
20049
21058
|
|
|
20050
21059
|
// Guard Clause: Format should be of type string
|
|
20051
21060
|
if (typeof format !== "string") {
|
|
20052
|
-
throw new Error(
|
|
21061
|
+
throw new Error(
|
|
21062
|
+
"AuroDatepickerUtilities | validateDateStr: Format must be a string",
|
|
21063
|
+
);
|
|
20053
21064
|
}
|
|
20054
21065
|
|
|
20055
21066
|
// Guard Clause: Length is what we expect it to be
|
|
20056
21067
|
if (date.length !== dateStrLength) {
|
|
20057
21068
|
return false;
|
|
20058
21069
|
}
|
|
20059
|
-
// Get a formatted date string and parse it
|
|
20060
|
-
const dateParts = dateFormatter.parseDate(date, format);
|
|
20061
|
-
|
|
20062
|
-
// Guard Clause: Date parse succeeded
|
|
20063
|
-
if (!dateParts) {
|
|
20064
|
-
return false;
|
|
20065
|
-
}
|
|
20066
|
-
|
|
20067
|
-
// Create the expected date string based on the date parts
|
|
20068
|
-
const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
|
|
20069
|
-
|
|
20070
|
-
// Generate a date object that we will extract a string date from to compare to the passed in date string
|
|
20071
|
-
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
20072
21070
|
|
|
20073
|
-
// Get
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
if (expectedDateStr !== actualDateStr) {
|
|
21071
|
+
// Get a formatted date string and parse and validate it
|
|
21072
|
+
try {
|
|
21073
|
+
return Boolean(dateFormatter.parseDate(date, format));
|
|
21074
|
+
} catch (error) {
|
|
20078
21075
|
return false;
|
|
20079
21076
|
}
|
|
20080
|
-
|
|
20081
|
-
// If we passed all other checks, we can assume the date is valid
|
|
20082
|
-
return true;
|
|
20083
21077
|
};
|
|
20084
21078
|
|
|
20085
21079
|
/**
|
|
@@ -20089,10 +21083,11 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20089
21083
|
* @returns {boolean}
|
|
20090
21084
|
*/
|
|
20091
21085
|
this.dateAndFormatMatch = (value, format) => {
|
|
20092
|
-
|
|
20093
21086
|
// Ensure we have both values we need to do the comparison
|
|
20094
21087
|
if (!value || !format) {
|
|
20095
|
-
throw new Error(
|
|
21088
|
+
throw new Error(
|
|
21089
|
+
"AuroFormValidation | dateFormatMatch: value and format are required",
|
|
21090
|
+
);
|
|
20096
21091
|
}
|
|
20097
21092
|
|
|
20098
21093
|
// If the lengths are different, they cannot match
|
|
@@ -20101,11 +21096,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20101
21096
|
}
|
|
20102
21097
|
|
|
20103
21098
|
// Get the parts of the date
|
|
20104
|
-
const dateParts = dateFormatter.
|
|
21099
|
+
const dateParts = dateFormatter.getDateParts(value, format);
|
|
20105
21100
|
|
|
20106
21101
|
// Validator for day
|
|
20107
21102
|
const dayValueIsValid = (day) => {
|
|
20108
|
-
|
|
20109
21103
|
// Guard clause: if there is no day in the dateParts, we can ignore this check.
|
|
20110
21104
|
if (!dateParts.day) {
|
|
20111
21105
|
return true;
|
|
@@ -20121,7 +21115,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20121
21115
|
|
|
20122
21116
|
// Guard clause: ensure day is a valid integer
|
|
20123
21117
|
if (Number.isNaN(numDay)) {
|
|
20124
|
-
throw new Error(
|
|
21118
|
+
throw new Error(
|
|
21119
|
+
"AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer",
|
|
21120
|
+
);
|
|
20125
21121
|
}
|
|
20126
21122
|
|
|
20127
21123
|
// Guard clause: ensure day is within the valid range
|
|
@@ -20135,6 +21131,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20135
21131
|
|
|
20136
21132
|
// Validator for month
|
|
20137
21133
|
const monthValueIsValid = (month) => {
|
|
21134
|
+
// Guard clause: if there is no month in the dateParts, we can ignore this check.
|
|
21135
|
+
if (!dateParts.month) {
|
|
21136
|
+
return true;
|
|
21137
|
+
}
|
|
20138
21138
|
|
|
20139
21139
|
// Guard clause: ensure month exists.
|
|
20140
21140
|
if (!month) {
|
|
@@ -20146,7 +21146,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20146
21146
|
|
|
20147
21147
|
// Guard clause: ensure month is a valid integer
|
|
20148
21148
|
if (Number.isNaN(numMonth)) {
|
|
20149
|
-
throw new Error(
|
|
21149
|
+
throw new Error(
|
|
21150
|
+
"AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer",
|
|
21151
|
+
);
|
|
20150
21152
|
}
|
|
20151
21153
|
|
|
20152
21154
|
// Guard clause: ensure month is within the valid range
|
|
@@ -20160,6 +21162,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20160
21162
|
|
|
20161
21163
|
// Validator for year
|
|
20162
21164
|
const yearIsValid = (_year) => {
|
|
21165
|
+
// Guard clause: if there is no year in the dateParts, we can ignore this check.
|
|
21166
|
+
if (!dateParts.year) {
|
|
21167
|
+
return true;
|
|
21168
|
+
}
|
|
20163
21169
|
|
|
20164
21170
|
// Guard clause: ensure year exists.
|
|
20165
21171
|
if (!_year) {
|
|
@@ -20174,7 +21180,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20174
21180
|
|
|
20175
21181
|
// Guard clause: ensure year is a valid integer
|
|
20176
21182
|
if (Number.isNaN(numYear)) {
|
|
20177
|
-
throw new Error(
|
|
21183
|
+
throw new Error(
|
|
21184
|
+
"AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer",
|
|
21185
|
+
);
|
|
20178
21186
|
}
|
|
20179
21187
|
|
|
20180
21188
|
// Guard clause: ensure year is within the valid range
|
|
@@ -20190,7 +21198,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
20190
21198
|
const checks = [
|
|
20191
21199
|
monthValueIsValid(dateParts.month),
|
|
20192
21200
|
dayValueIsValid(dateParts.day),
|
|
20193
|
-
yearIsValid(dateParts.year)
|
|
21201
|
+
yearIsValid(dateParts.year),
|
|
20194
21202
|
];
|
|
20195
21203
|
|
|
20196
21204
|
// If any of the checks failed, the date format does not match and the result is invalid
|
|
@@ -20224,10 +21232,7 @@ const {
|
|
|
20224
21232
|
} = dateUtilities;
|
|
20225
21233
|
|
|
20226
21234
|
const {
|
|
20227
|
-
toNorthAmericanFormat
|
|
20228
|
-
parseDate,
|
|
20229
|
-
getDateAsString
|
|
20230
|
-
} = dateFormatter;
|
|
21235
|
+
toNorthAmericanFormat} = dateFormatter;
|
|
20231
21236
|
|
|
20232
21237
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
20233
21238
|
// See LICENSE in the project root for license information.
|
|
@@ -22442,7 +23447,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
22442
23447
|
}
|
|
22443
23448
|
};
|
|
22444
23449
|
|
|
22445
|
-
var formkitVersion = '
|
|
23450
|
+
var formkitVersion = '202606012139';
|
|
22446
23451
|
|
|
22447
23452
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
22448
23453
|
// See LICENSE in the project root for license information.
|
|
@@ -23798,6 +24803,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
23798
24803
|
delegatesFocus: true,
|
|
23799
24804
|
};
|
|
23800
24805
|
}
|
|
24806
|
+
|
|
23801
24807
|
constructor() {
|
|
23802
24808
|
super();
|
|
23803
24809
|
|
|
@@ -23965,7 +24971,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
23965
24971
|
|
|
23966
24972
|
/**
|
|
23967
24973
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
23968
|
-
* @
|
|
24974
|
+
* @type {'default' | 'inverse'}
|
|
23969
24975
|
* @default 'default'
|
|
23970
24976
|
*/
|
|
23971
24977
|
appearance: {
|
|
@@ -24484,8 +25490,9 @@ class AuroDatePicker extends AuroElement {
|
|
|
24484
25490
|
}
|
|
24485
25491
|
|
|
24486
25492
|
/**
|
|
24487
|
-
* @private
|
|
24488
25493
|
* Common display value wrapper classes.
|
|
25494
|
+
* @private
|
|
25495
|
+
* @returns {Object} Class map for Lit's classMap directive.
|
|
24489
25496
|
*/
|
|
24490
25497
|
get commonDisplayValueWrapperClasses() {
|
|
24491
25498
|
return {
|
|
@@ -24653,7 +25660,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
24653
25660
|
}
|
|
24654
25661
|
|
|
24655
25662
|
// Compute and mark the active cell
|
|
24656
|
-
if (this.calendar.activeCellDate
|
|
25663
|
+
if (this.calendar.activeCellDate === null || this.calendar.activeCellDate === undefined) {
|
|
24657
25664
|
this.calendar.activeCellDate = this.calendar.computeActiveDate();
|
|
24658
25665
|
}
|
|
24659
25666
|
if (this.calendar.activeCellDate !== undefined) {
|
|
@@ -24662,29 +25669,37 @@ class AuroDatePicker extends AuroElement {
|
|
|
24662
25669
|
|
|
24663
25670
|
// If no cell matched (e.g. centralDate month differs from the rendered
|
|
24664
25671
|
// range on mobile), fall back to the first rendered enabled cell.
|
|
24665
|
-
let activeCell = allCells.find(cell => cell.active);
|
|
25672
|
+
let activeCell = allCells.find((cell) => cell.active);
|
|
24666
25673
|
if (!activeCell && allCells.length) {
|
|
24667
|
-
const fallback = allCells
|
|
25674
|
+
const [fallback] = allCells;
|
|
24668
25675
|
if (fallback.day) {
|
|
24669
25676
|
this.calendar.activeCellDate = fallback.day.date;
|
|
24670
25677
|
this.calendar.setActiveCell(this.calendar.activeCellDate);
|
|
24671
|
-
activeCell = allCells.find(cell => cell.active);
|
|
25678
|
+
activeCell = allCells.find((cell) => cell.active);
|
|
24672
25679
|
}
|
|
24673
25680
|
}
|
|
24674
25681
|
|
|
24675
|
-
//
|
|
24676
|
-
//
|
|
25682
|
+
// Focus the calendar grid wrapper (aria-activedescendant handles
|
|
25683
|
+
// the SR announcement for the active cell).
|
|
24677
25684
|
if (activeCell) {
|
|
24678
|
-
|
|
24679
|
-
|
|
24680
|
-
|
|
24681
|
-
|
|
24682
|
-
|
|
24683
|
-
|
|
24684
|
-
|
|
24685
|
-
|
|
24686
|
-
|
|
24687
|
-
|
|
25685
|
+
this.calendar.focusActiveCell();
|
|
25686
|
+
|
|
25687
|
+
// Announce the initial active cell via the live region.
|
|
25688
|
+
// Delay the announcement so it arrives after VoiceOver finishes
|
|
25689
|
+
// speaking the focus-change announcement for the grid wrapper.
|
|
25690
|
+
// Without this delay, VoiceOver drops the live region update
|
|
25691
|
+
// because it's already mid-announcement from the focus move.
|
|
25692
|
+
const announcement = this.calendar.buildFocusAnnouncement(activeCell.day.date);
|
|
25693
|
+
setTimeout(() => {
|
|
25694
|
+
this.calendar.announceSelection(announcement);
|
|
25695
|
+
}, 500);
|
|
25696
|
+
|
|
25697
|
+
// On mobile fullscreen, scroll the month list so the active cell's
|
|
25698
|
+
// month is visible. Without this, the list stays scrolled to the
|
|
25699
|
+
// calendarStartDate month which may be far from the active cell.
|
|
25700
|
+
if (this.dropdown.isBibFullscreen) {
|
|
25701
|
+
this.calendar.scrollToActiveCell();
|
|
25702
|
+
}
|
|
24688
25703
|
} else if (attempts < MAX_ATTEMPTS) {
|
|
24689
25704
|
requestAnimationFrame(tryFocus);
|
|
24690
25705
|
}
|
|
@@ -25083,12 +26098,14 @@ class AuroDatePicker extends AuroElement {
|
|
|
25083
26098
|
}
|
|
25084
26099
|
|
|
25085
26100
|
const formatted = this.util.toNorthAmericanFormat(dateStr, this.format);
|
|
25086
|
-
if (!this.util.validDateStr(dateStr, this.format))
|
|
26101
|
+
if (!this.util.validDateStr(dateStr, this.format)) {
|
|
26102
|
+
return false;
|
|
26103
|
+
}
|
|
25087
26104
|
|
|
25088
|
-
const
|
|
25089
|
-
const yyyy =
|
|
25090
|
-
const mm = String(
|
|
25091
|
-
const dd = String(
|
|
26105
|
+
const dt = new Date(formatted);
|
|
26106
|
+
const yyyy = dt.getFullYear();
|
|
26107
|
+
const mm = String(dt.getMonth() + 1).padStart(2, '0');
|
|
26108
|
+
const dd = String(dt.getDate()).padStart(2, '0');
|
|
25092
26109
|
return this.blackoutDates.includes(`${yyyy}-${mm}-${dd}`);
|
|
25093
26110
|
}
|
|
25094
26111
|
|
|
@@ -25106,7 +26123,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
25106
26123
|
|
|
25107
26124
|
// After standard validation, check blackout dates for typed input
|
|
25108
26125
|
if (this.validity !== 'customError') {
|
|
25109
|
-
if (this.isBlackoutDate(this.value) || (this.range && this.isBlackoutDate(this.valueEnd))) {
|
|
26126
|
+
if (this.isBlackoutDate(this.value) || (this.range && this.isBlackoutDate(this.valueEnd))) { // eslint-disable-line no-extra-parens
|
|
25110
26127
|
const msg = this.setCustomValidityCustomError || 'Selected date is unavailable';
|
|
25111
26128
|
this.validity = 'customError';
|
|
25112
26129
|
this.errorMessage = msg;
|
|
@@ -25152,7 +26169,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
25152
26169
|
// backward compatibility for old format of referenceDates which is a stringified array with - instead of / as separator, e.g. ["10-22-2025","10-23-2025"]
|
|
25153
26170
|
const stringfiedDates = JSON.stringify(this.referenceDates);
|
|
25154
26171
|
if (stringfiedDates.includes('-')) {
|
|
25155
|
-
this.referenceDates = this.referenceDates.map(date => date.replace(/-/gu, '/'
|
|
26172
|
+
this.referenceDates = this.referenceDates.map((date) => date.replace(/-/gu, '/'));
|
|
25156
26173
|
}
|
|
25157
26174
|
}
|
|
25158
26175
|
|
|
@@ -25741,7 +26758,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
25741
26758
|
/**
|
|
25742
26759
|
* Handles click on the clear button.
|
|
25743
26760
|
* @private
|
|
25744
|
-
* @param {MouseEvent} event
|
|
26761
|
+
* @param {MouseEvent} event - The mouse event from the clear button click.
|
|
25745
26762
|
* @returns {void}
|
|
25746
26763
|
*/
|
|
25747
26764
|
handleClearClick(event) {
|