@aurodesignsystem-dev/auro-formkit 0.0.0-pr1489.1 → 0.0.0-pr1489.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/components/checkbox/demo/customize.min.js +249 -125
  2. package/components/checkbox/demo/getting-started.min.js +249 -125
  3. package/components/checkbox/demo/index.min.js +249 -125
  4. package/components/checkbox/demo/styles.min.css +1 -1
  5. package/components/checkbox/dist/index.js +249 -125
  6. package/components/checkbox/dist/registered.js +249 -125
  7. package/components/combobox/demo/customize.min.js +523 -259
  8. package/components/combobox/demo/getting-started.min.js +523 -259
  9. package/components/combobox/demo/index.min.js +523 -259
  10. package/components/combobox/demo/styles.min.css +1 -1
  11. package/components/combobox/dist/index.js +523 -259
  12. package/components/combobox/dist/registered.js +523 -259
  13. package/components/counter/demo/customize.min.js +271 -131
  14. package/components/counter/demo/index.min.js +271 -131
  15. package/components/counter/demo/styles.min.css +1 -1
  16. package/components/counter/dist/index.js +488 -137
  17. package/components/counter/dist/registered.js +249 -125
  18. package/components/datepicker/demo/accessibility.md +12 -9
  19. package/components/datepicker/demo/api.md +1 -1
  20. package/components/datepicker/demo/customize.md +4 -0
  21. package/components/datepicker/demo/customize.min.js +1638 -654
  22. package/components/datepicker/demo/index.md +35 -5
  23. package/components/datepicker/demo/index.min.js +1654 -659
  24. package/components/datepicker/demo/keyboard-behavior.md +16 -16
  25. package/components/datepicker/demo/styles.min.css +1 -1
  26. package/components/datepicker/demo/voiceover.md +5 -3
  27. package/components/datepicker/demo/why-datepicker.md +2 -2
  28. package/components/datepicker/dist/index.js +1642 -658
  29. package/components/datepicker/dist/registered.js +1642 -658
  30. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +52 -17
  31. package/components/datepicker/dist/src/auro-calendar-month.d.ts +12 -4
  32. package/components/datepicker/dist/src/auro-calendar.d.ts +161 -8
  33. package/components/datepicker/dist/src/auro-datepicker.d.ts +77 -79
  34. package/components/dropdown/demo/customize.min.js +22 -6
  35. package/components/dropdown/demo/getting-started.min.js +22 -6
  36. package/components/dropdown/demo/index.min.js +22 -6
  37. package/components/dropdown/demo/styles.min.css +1 -1
  38. package/components/dropdown/dist/auro-dropdown.d.ts +3 -2
  39. package/components/dropdown/dist/index.js +22 -6
  40. package/components/dropdown/dist/registered.js +22 -6
  41. package/components/form/demo/customize.min.js +3731 -1831
  42. package/components/form/demo/getting-started.min.js +3731 -1831
  43. package/components/form/demo/index.min.js +3731 -1831
  44. package/components/form/demo/registerDemoDeps.min.js +3727 -1827
  45. package/components/form/demo/styles.min.css +1 -1
  46. package/components/input/demo/customize.min.js +249 -125
  47. package/components/input/demo/getting-started.min.js +249 -125
  48. package/components/input/demo/index.min.js +249 -125
  49. package/components/input/demo/styles.min.css +1 -1
  50. package/components/input/dist/index.js +249 -125
  51. package/components/input/dist/registered.js +249 -125
  52. package/components/menu/demo/styles.min.css +1 -1
  53. package/components/radio/demo/customize.min.js +249 -125
  54. package/components/radio/demo/getting-started.min.js +249 -125
  55. package/components/radio/demo/index.min.js +249 -125
  56. package/components/radio/demo/styles.min.css +1 -1
  57. package/components/radio/dist/index.js +249 -125
  58. package/components/radio/dist/registered.js +249 -125
  59. package/components/select/demo/customize.min.js +271 -131
  60. package/components/select/demo/getting-started.min.js +271 -131
  61. package/components/select/demo/index.min.js +271 -131
  62. package/components/select/demo/styles.min.css +1 -1
  63. package/components/select/dist/index.js +271 -131
  64. package/components/select/dist/registered.js +271 -131
  65. package/custom-elements.json +836 -514
  66. package/package.json +8 -8
@@ -115,109 +115,236 @@ var shapeSizeCss$1 = css`.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.
115
115
 
116
116
  var tokensCss$3 = css`:host(:not([ondark])),:host(:not([appearance=inverse])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]),:host([appearance=inverse]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: transparent}`;
117
117
 
118
- class DateFormatter {
118
+ /**
119
+ * @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.
120
+ * @param {string} dateStr - Date string to parse.
121
+ * @param {string} format - Date format to parse.
122
+ * @returns {{ month?: string, day?: string, year?: string }|undefined}
123
+ */
124
+ function getDateParts(dateStr, format) {
125
+ if (!dateStr) {
126
+ return undefined;
127
+ }
119
128
 
120
- constructor() {
129
+ const formatSeparatorMatch = format.match(/[/.-]/);
130
+ let valueParts;
131
+ let formatParts;
121
132
 
122
- /**
123
- * @description Parses a date string into its components.
124
- * @param {string} dateStr - Date string to parse.
125
- * @param {string} format - Date format to parse.
126
- * @returns {Object<key["month" | "day" | "year"]: number>|undefined}
127
- */
128
- this.parseDate = (dateStr, format = 'mm/dd/yyyy') => {
133
+ if (formatSeparatorMatch) {
134
+ const separator = formatSeparatorMatch[0];
135
+ valueParts = dateStr.split(separator);
136
+ formatParts = format.split(separator);
137
+ } else {
138
+ if (dateStr.match(/[/.-]/)) {
139
+ throw new Error(
140
+ "AuroDatepickerUtilities | parseDate: Date string has no separators",
141
+ );
142
+ }
129
143
 
130
- // Guard Clause: Date string is defined
131
- if (!dateStr) {
132
- return undefined;
133
- }
144
+ if (dateStr.length !== format.length) {
145
+ throw new Error(
146
+ "AuroDatepickerUtilities | parseDate: Date string and format length do not match",
147
+ );
148
+ }
134
149
 
135
- // Assume the separator is a "/" a defined in our code base
136
- const separator = '/';
150
+ valueParts = [dateStr];
151
+ formatParts = [format];
152
+ }
137
153
 
138
- // Get the parts of the date and format
139
- const valueParts = dateStr.split(separator);
140
- const formatParts = format.split(separator);
154
+ if (valueParts.length !== formatParts.length) {
155
+ throw new Error(
156
+ `AuroDatepickerUtilities | parseDate: Date string and format do not match : ${dateStr} vs ${format}`,
157
+ );
158
+ }
141
159
 
142
- // Check if the value and format have the correct number of parts
143
- if (valueParts.length !== formatParts.length) {
144
- throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
145
- }
160
+ const result = formatParts.reduce((acc, part, index) => {
161
+ const value = valueParts[index];
146
162
 
147
- // Holds the result to be returned
148
- const result = formatParts.reduce((acc, part, index) => {
149
- const value = valueParts[index];
163
+ if (/m/iu.test(part) && part.length === value.length) {
164
+ acc.month = value;
165
+ } else if (/d/iu.test(part) && part.length === value.length) {
166
+ acc.day = value;
167
+ } else if (/y/iu.test(part) && part.length === value.length) {
168
+ acc.year = value;
169
+ }
150
170
 
151
- if ((/m/iu).test(part)) {
152
- acc.month = value;
153
- } else if ((/d/iu).test(part)) {
154
- acc.day = value;
155
- } else if ((/y/iu).test(part)) {
156
- acc.year = value;
157
- }
171
+ return acc;
172
+ }, {});
158
173
 
159
- return acc;
160
- }, {});
174
+ if (!result.month && !result.day && !result.year) {
175
+ throw new Error(
176
+ "AuroDatepickerUtilities | parseDate: Unable to parse date string",
177
+ );
178
+ }
161
179
 
162
- // If we found all the parts, return the result
163
- if (result.month && result.year) {
164
- return result;
165
- }
180
+ return result;
181
+ }
166
182
 
167
- // Throw an error to let the dev know we were unable to parse the date string
168
- throw new Error('AuroDatepickerUtilities | parseDate: Unable to parse date string');
169
- };
183
+ function isCalendarDate(year, month, day) {
184
+ let yearNumber = Number(year);
185
+ const monthNumber = Number(month);
186
+ const dayNumber = Number(day);
170
187
 
171
- /**
172
- * Convert a date object to string format.
173
- * @param {Object} date - Date to convert to string.
174
- * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
175
- * @returns {String} Returns the date as a string.
176
- */
177
- this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
178
- year: "numeric",
179
- month: "2-digit",
180
- day: "2-digit",
181
- });
188
+ if (
189
+ !Number.isInteger(yearNumber) ||
190
+ !Number.isInteger(monthNumber) ||
191
+ !Number.isInteger(dayNumber)
192
+ ) {
193
+ return false;
194
+ }
182
195
 
183
- /**
184
- * Converts a date string to a North American date format.
185
- * @param {String} dateStr - Date to validate.
186
- * @param {String} format - Date format to validate against.
187
- * @returns {Boolean}
188
- */
189
- this.toNorthAmericanFormat = (dateStr, format) => {
196
+ // 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.
197
+ if (yearNumber < 100 && yearNumber >= 50) {
198
+ yearNumber += 1900;
199
+ } else if (yearNumber < 50) {
200
+ yearNumber += 2000;
201
+ }
190
202
 
191
- if (format === 'mm/dd/yyyy') {
192
- return dateStr;
193
- }
203
+ const stringified = `${String(yearNumber).padStart(4, "0")}-${String(monthNumber).padStart(2, "0")}-${String(dayNumber).padStart(2, "0")}`;
204
+ const date = new Date(stringified.replace(/[.-]/g, "/"));
194
205
 
195
- const parsedDate = this.parseDate(dateStr, format);
206
+ return (
207
+ !Number.isNaN(date.getTime()) && toISOFormatString(date) === stringified
208
+ );
209
+ }
196
210
 
197
- if (!parsedDate) {
198
- throw new Error('AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string');
199
- }
211
+ /**
212
+ * @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).
213
+ *
214
+ * Partial formats are supported: components absent from `format` default to `year → "0"`,
215
+ * `month → "01"`, `day → "01"` for calendar validation only. The returned object contains
216
+ * only the fields actually present in the format string — missing fields are never injected.
217
+ * @param {string} dateStr - Date string to parse.
218
+ * @param {string} format - Date format to parse.
219
+ * @returns {{ month?: string, day?: string, year?: string }|undefined}
220
+ * @throws {Error} Throws when the parsed result does not represent a valid calendar date.
221
+ */
222
+ function parseDate(dateStr, format = "mm/dd/yyyy") {
223
+ if (!dateStr || !format) {
224
+ return undefined;
225
+ }
226
+ const result = getDateParts(dateStr.trim(), format);
200
227
 
201
- const { month, day, year } = parsedDate;
228
+ if (!result) {
229
+ return undefined;
230
+ }
202
231
 
203
- const dateParts = [];
204
- if (month) {
205
- dateParts.push(month);
206
- }
232
+ const lowerFormat = format.toLowerCase();
233
+ const year = lowerFormat.includes("yy") ? result.year : "0";
234
+ const month = lowerFormat.includes("mm") ? result.month : "01";
235
+ const day = lowerFormat.includes("dd") ? result.day : "01";
207
236
 
208
- if (day) {
209
- dateParts.push(day);
210
- }
237
+ if (isCalendarDate(year, month, day)) {
238
+ return result;
239
+ }
211
240
 
212
- if (year) {
213
- dateParts.push(year);
214
- }
241
+ throw new Error(
242
+ `AuroDatepickerUtilities | parseDate: Date string is not a valid date ${JSON.stringify(result)} with format ${format}`,
243
+ );
244
+ }
215
245
 
216
- return dateParts.join('/');
217
- };
246
+ /**
247
+ * Convert a date object to string format.
248
+ * @param {Object} date - Date to convert to string.
249
+ * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
250
+ * @returns {String} Returns the date as a string.
251
+ */
252
+ function getDateAsString(date, locale = undefined) {
253
+ return date.toLocaleDateString(locale, {
254
+ year: "numeric",
255
+ month: "2-digit",
256
+ day: "2-digit",
257
+ });
258
+ }
259
+
260
+ /**
261
+ * Converts a date string to a North American date format.
262
+ * @param {String} dateStr - Date to validate.
263
+ * @param {String} format - Date format to validate against.
264
+ * @returns {String}
265
+ */
266
+ function toNorthAmericanFormat$1(dateStr, format) {
267
+ if (format === "mm/dd/yyyy") {
268
+ return dateStr;
269
+ }
270
+
271
+ const parsedDate = parseDate(dateStr, format);
272
+
273
+ if (!parsedDate) {
274
+ throw new Error(
275
+ "AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string",
276
+ );
218
277
  }
278
+
279
+ const { month, day, year } = parsedDate;
280
+
281
+ return [month, day, year].filter(Boolean).join("/");
282
+ }
283
+
284
+ /**
285
+ * Validates that a date string matches the provided format and represents a real calendar date.
286
+ *
287
+ * @param {string} dateStr - Date string to validate.
288
+ * @param {string} [format="yyyy-mm-dd"] - Format of the date string.
289
+ * @returns {boolean} True when the date string is valid for the provided format, otherwise false.
290
+ */
291
+ function isValidDate(dateStr, format = "yyyy-mm-dd") {
292
+ try {
293
+ if (typeof dateStr !== "string" || !dateStr || format?.length < 8) {
294
+ return false;
295
+ }
296
+
297
+ if (parseDate(dateStr, format)) {
298
+ return true;
299
+ }
300
+ } catch (error) {
301
+ return false;
302
+ }
303
+ return false;
219
304
  }
220
- const dateFormatter = new DateFormatter();
305
+
306
+ /**
307
+ * 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.
308
+ *
309
+ * @param {Date} date - Date instance to convert to an ISO-like string.
310
+ * @returns {string} A string in the format "yyyy-mm-dd" representing the provided date.
311
+ * @throws {Error} Throws an error when the input is not a valid Date instance.
312
+ */
313
+ function toISOFormatString(date) {
314
+ if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
315
+ throw new Error(
316
+ "AuroDatepickerUtilities | toISOFormatString: Input must be a valid Date instance",
317
+ );
318
+ }
319
+ return `${String(date.getFullYear()).padStart(4, "0")}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
320
+ }
321
+
322
+ /**
323
+ * 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.
324
+ *
325
+ * @param {String} dateStr - Date string to convert into a Date object.
326
+ * @param {String} format - Date format used to parse the string when it is not in ISO format.
327
+ * @returns {Date|null} Returns a Date instance for valid input or null for non-string input.
328
+ * @throws {Error} Throws when parsing fails for non-ISO string input.
329
+ */
330
+ function stringToDateInstance(dateStr, format = "yyyy-mm-dd") {
331
+ if (typeof dateStr !== "string") {
332
+ return null;
333
+ }
334
+
335
+ const { month, day, year } = parseDate(dateStr, format);
336
+ return new Date(`${year}/${month}/${day}`);
337
+ }
338
+
339
+ const dateFormatter = {
340
+ parseDate,
341
+ getDateParts,
342
+ getDateAsString,
343
+ toNorthAmericanFormat: toNorthAmericanFormat$1,
344
+ isValidDate,
345
+ toISOFormatString,
346
+ stringToDateInstance,
347
+ };
221
348
 
222
349
  // filepath: dateConstraints.mjs
223
350
  const DATE_UTIL_CONSTRAINTS = {
@@ -289,12 +416,11 @@ class AuroDateUtilitiesBase {
289
416
  /* eslint-disable no-magic-numbers */
290
417
 
291
418
  class AuroDateUtilities extends AuroDateUtilitiesBase {
292
-
293
419
  /**
294
420
  * Returns the current century.
295
421
  * @returns {String} The current century.
296
422
  */
297
- getCentury () {
423
+ getCentury() {
298
424
  return String(new Date().getFullYear()).slice(0, 2);
299
425
  }
300
426
 
@@ -303,14 +429,12 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
303
429
  * @param {String} year - The year to convert to four digits.
304
430
  * @returns {String} The four digit year.
305
431
  */
306
- getFourDigitYear (year) {
307
-
432
+ getFourDigitYear(year) {
308
433
  const strYear = String(year).trim();
309
434
  return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
310
435
  }
311
436
 
312
437
  constructor() {
313
-
314
438
  super();
315
439
 
316
440
  /**
@@ -319,7 +443,8 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
319
443
  * @param {Object} date2 - Second date to compare.
320
444
  * @returns {Boolean} Returns true if the dates match.
321
445
  */
322
- this.datesMatch = (date1, date2) => new Date(date1).getTime() === new Date(date2).getTime();
446
+ this.datesMatch = (date1, date2) =>
447
+ new Date(date1).getTime() === new Date(date2).getTime();
323
448
 
324
449
  /**
325
450
  * Returns true if value passed in is a valid date.
@@ -328,53 +453,41 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
328
453
  * @returns {Boolean}
329
454
  */
330
455
  this.validDateStr = (date, format) => {
331
-
332
456
  // The length we expect the date string to be
333
- const dateStrLength = format.length;
457
+ const dateStrLength = format?.length || 0;
334
458
 
335
459
  // Guard Clause: Date and format are defined
336
460
  if (typeof date === "undefined" || typeof format === "undefined") {
337
- throw new Error('AuroDatepickerUtilities | validateDateStr: Date and format are required');
461
+ throw new Error(
462
+ "AuroDatepickerUtilities | validateDateStr: Date and format are required",
463
+ );
338
464
  }
339
465
 
340
466
  // Guard Clause: Date should be of type string
341
467
  if (typeof date !== "string") {
342
- throw new Error('AuroDatepickerUtilities | validateDateStr: Date must be a string');
468
+ throw new Error(
469
+ "AuroDatepickerUtilities | validateDateStr: Date must be a string",
470
+ );
343
471
  }
344
472
 
345
473
  // Guard Clause: Format should be of type string
346
474
  if (typeof format !== "string") {
347
- throw new Error('AuroDatepickerUtilities | validateDateStr: Format must be a string');
475
+ throw new Error(
476
+ "AuroDatepickerUtilities | validateDateStr: Format must be a string",
477
+ );
348
478
  }
349
479
 
350
480
  // Guard Clause: Length is what we expect it to be
351
481
  if (date.length !== dateStrLength) {
352
482
  return false;
353
483
  }
354
- // Get a formatted date string and parse it
355
- const dateParts = dateFormatter.parseDate(date, format);
356
-
357
- // Guard Clause: Date parse succeeded
358
- if (!dateParts) {
359
- return false;
360
- }
361
-
362
- // Create the expected date string based on the date parts
363
- const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
364
-
365
- // Generate a date object that we will extract a string date from to compare to the passed in date string
366
- const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
367
-
368
- // Get the date string of the date object we created from the string date
369
- const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
370
484
 
371
- // Guard Clause: Generated date matches date string input
372
- if (expectedDateStr !== actualDateStr) {
485
+ // Get a formatted date string and parse and validate it
486
+ try {
487
+ return Boolean(dateFormatter.parseDate(date, format));
488
+ } catch (error) {
373
489
  return false;
374
490
  }
375
-
376
- // If we passed all other checks, we can assume the date is valid
377
- return true;
378
491
  };
379
492
 
380
493
  /**
@@ -384,10 +497,11 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
384
497
  * @returns {boolean}
385
498
  */
386
499
  this.dateAndFormatMatch = (value, format) => {
387
-
388
500
  // Ensure we have both values we need to do the comparison
389
501
  if (!value || !format) {
390
- throw new Error('AuroFormValidation | dateFormatMatch: value and format are required');
502
+ throw new Error(
503
+ "AuroFormValidation | dateFormatMatch: value and format are required",
504
+ );
391
505
  }
392
506
 
393
507
  // If the lengths are different, they cannot match
@@ -396,11 +510,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
396
510
  }
397
511
 
398
512
  // Get the parts of the date
399
- const dateParts = dateFormatter.parseDate(value, format);
513
+ const dateParts = dateFormatter.getDateParts(value, format);
400
514
 
401
515
  // Validator for day
402
516
  const dayValueIsValid = (day) => {
403
-
404
517
  // Guard clause: if there is no day in the dateParts, we can ignore this check.
405
518
  if (!dateParts.day) {
406
519
  return true;
@@ -416,7 +529,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
416
529
 
417
530
  // Guard clause: ensure day is a valid integer
418
531
  if (Number.isNaN(numDay)) {
419
- throw new Error('AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer');
532
+ throw new Error(
533
+ "AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer",
534
+ );
420
535
  }
421
536
 
422
537
  // Guard clause: ensure day is within the valid range
@@ -430,6 +545,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
430
545
 
431
546
  // Validator for month
432
547
  const monthValueIsValid = (month) => {
548
+ // Guard clause: if there is no month in the dateParts, we can ignore this check.
549
+ if (!dateParts.month) {
550
+ return true;
551
+ }
433
552
 
434
553
  // Guard clause: ensure month exists.
435
554
  if (!month) {
@@ -441,7 +560,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
441
560
 
442
561
  // Guard clause: ensure month is a valid integer
443
562
  if (Number.isNaN(numMonth)) {
444
- throw new Error('AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer');
563
+ throw new Error(
564
+ "AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer",
565
+ );
445
566
  }
446
567
 
447
568
  // Guard clause: ensure month is within the valid range
@@ -455,6 +576,10 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
455
576
 
456
577
  // Validator for year
457
578
  const yearIsValid = (_year) => {
579
+ // Guard clause: if there is no year in the dateParts, we can ignore this check.
580
+ if (!dateParts.year) {
581
+ return true;
582
+ }
458
583
 
459
584
  // Guard clause: ensure year exists.
460
585
  if (!_year) {
@@ -469,7 +594,9 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
469
594
 
470
595
  // Guard clause: ensure year is a valid integer
471
596
  if (Number.isNaN(numYear)) {
472
- throw new Error('AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer');
597
+ throw new Error(
598
+ "AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer",
599
+ );
473
600
  }
474
601
 
475
602
  // Guard clause: ensure year is within the valid range
@@ -485,7 +612,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
485
612
  const checks = [
486
613
  monthValueIsValid(dateParts.month),
487
614
  dayValueIsValid(dateParts.day),
488
- yearIsValid(dateParts.year)
615
+ yearIsValid(dateParts.year),
489
616
  ];
490
617
 
491
618
  // If any of the checks failed, the date format does not match and the result is invalid
@@ -519,10 +646,7 @@ const {
519
646
  } = dateUtilities;
520
647
 
521
648
  const {
522
- toNorthAmericanFormat,
523
- parseDate,
524
- getDateAsString
525
- } = dateFormatter;
649
+ toNorthAmericanFormat} = dateFormatter;
526
650
 
527
651
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
528
652
  // See LICENSE in the project root for license information.
@@ -5268,7 +5392,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
5268
5392
  }
5269
5393
  };
5270
5394
 
5271
- var formkitVersion$1 = '202606011911';
5395
+ var formkitVersion$1 = '202606031320';
5272
5396
 
5273
5397
  class AuroElement extends LitElement {
5274
5398
  static get properties() {
@@ -6261,13 +6385,20 @@ class AuroDropdown extends AuroElement {
6261
6385
 
6262
6386
  // Walk up the ancestor chain, inerting siblings at each level
6263
6387
  // to ensure the entire page outside the host subtree is inert.
6388
+ // Uses a reference counter (data-auro-inert-count) so multiple
6389
+ // simultaneous modal dropdowns share inert state safely.
6264
6390
  let current = host;
6265
6391
  while (current.parentElement) {
6266
6392
  const parent = current.parentElement;
6267
6393
  for (const sibling of parent.children) {
6268
6394
  if (sibling !== current) {
6269
- this._inertSiblings.push({ element: sibling, wasInert: sibling.inert });
6395
+ const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
6396
+ if (count === 0) {
6397
+ sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
6398
+ }
6399
+ sibling.dataset.auroInertCount = String(count + 1);
6270
6400
  sibling.inert = true;
6401
+ this._inertSiblings.push(sibling);
6271
6402
  }
6272
6403
  }
6273
6404
  current = parent;
@@ -6276,14 +6407,23 @@ class AuroDropdown extends AuroElement {
6276
6407
 
6277
6408
  /**
6278
6409
  * Restores `inert` state on siblings that were tracked by `_setPageInert`.
6279
- * Preserves the previous inert state so externally-inerted elements are
6280
- * not inadvertently re-enabled.
6410
+ * Uses reference counting so inert is only cleared when the last modal
6411
+ * dropdown releases a given element. Preserves the original inert state
6412
+ * so externally-inerted elements are not inadvertently re-enabled.
6281
6413
  * @private
6282
6414
  */
6283
6415
  _clearPageInert() {
6284
6416
  if (this._inertSiblings) {
6285
- for (const entry of this._inertSiblings) {
6286
- entry.element.inert = entry.wasInert;
6417
+ for (const sibling of this._inertSiblings) {
6418
+ const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
6419
+ if (count <= 0) {
6420
+ const wasInert = sibling.dataset.auroInertWas === 'true';
6421
+ delete sibling.dataset.auroInertCount;
6422
+ delete sibling.dataset.auroInertWas;
6423
+ sibling.inert = wasInert;
6424
+ } else {
6425
+ sibling.dataset.auroInertCount = String(count);
6426
+ }
6287
6427
  }
6288
6428
  this._inertSiblings = undefined;
6289
6429
  }
@@ -7239,7 +7379,7 @@ class AuroHelpText extends LitElement {
7239
7379
  }
7240
7380
  }
7241
7381
 
7242
- var formkitVersion = '202606011911';
7382
+ var formkitVersion = '202606031320';
7243
7383
 
7244
7384
  var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );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-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, 300);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, 300);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, 0.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, 0.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, 0.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, 0.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, 0.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, 0.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(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
7245
7385