@aurodesignsystem-dev/auro-formkit 0.0.0-pr1518.0 → 0.0.0-pr1519.1

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 (47) hide show
  1. package/components/checkbox/demo/customize.min.js +15 -2
  2. package/components/checkbox/demo/getting-started.min.js +15 -2
  3. package/components/checkbox/demo/index.min.js +15 -2
  4. package/components/checkbox/dist/index.js +15 -2
  5. package/components/checkbox/dist/registered.js +15 -2
  6. package/components/combobox/demo/customize.min.js +105 -10
  7. package/components/combobox/demo/getting-started.min.js +105 -10
  8. package/components/combobox/demo/index.min.js +105 -10
  9. package/components/combobox/dist/index.js +105 -10
  10. package/components/combobox/dist/registered.js +105 -10
  11. package/components/counter/demo/customize.min.js +33 -3
  12. package/components/counter/demo/index.min.js +33 -3
  13. package/components/counter/dist/index.js +33 -3
  14. package/components/counter/dist/registered.js +33 -3
  15. package/components/datepicker/demo/customize.min.js +153 -13
  16. package/components/datepicker/demo/index.min.js +153 -13
  17. package/components/datepicker/dist/index.js +153 -13
  18. package/components/datepicker/dist/registered.js +153 -13
  19. package/components/dropdown/demo/customize.min.js +18 -1
  20. package/components/dropdown/demo/getting-started.min.js +18 -1
  21. package/components/dropdown/demo/index.min.js +18 -1
  22. package/components/dropdown/dist/index.js +18 -1
  23. package/components/dropdown/dist/registered.js +18 -1
  24. package/components/form/demo/customize.min.js +441 -40
  25. package/components/form/demo/getting-started.min.js +441 -40
  26. package/components/form/demo/index.min.js +441 -40
  27. package/components/form/demo/registerDemoDeps.min.js +441 -40
  28. package/components/input/demo/api.md +58 -57
  29. package/components/input/demo/customize.min.js +72 -7
  30. package/components/input/demo/getting-started.min.js +72 -7
  31. package/components/input/demo/index.min.js +72 -7
  32. package/components/input/dist/base-input.d.ts +9 -3
  33. package/components/input/dist/index.js +72 -7
  34. package/components/input/dist/registered.js +72 -7
  35. package/components/input/dist/utilities.d.ts +9 -0
  36. package/components/radio/demo/customize.min.js +15 -2
  37. package/components/radio/demo/getting-started.min.js +15 -2
  38. package/components/radio/demo/index.min.js +15 -2
  39. package/components/radio/dist/index.js +15 -2
  40. package/components/radio/dist/registered.js +15 -2
  41. package/components/select/demo/customize.min.js +48 -3
  42. package/components/select/demo/getting-started.min.js +48 -3
  43. package/components/select/demo/index.min.js +48 -3
  44. package/components/select/dist/index.js +48 -3
  45. package/components/select/dist/registered.js +48 -3
  46. package/custom-elements.json +78 -8
  47. package/package.json +1 -1
@@ -4285,8 +4285,21 @@ class AuroFormValidation {
4285
4285
  return;
4286
4286
  }
4287
4287
 
4288
- // Validate that the date passed was the correct format and is a valid date
4288
+ // Validate that the date passed was the correct format and is a valid date.
4289
+ // For partial date formats, valueObject is never populated; validate them directly.
4289
4290
  if (elem.value && !elem.valueObject) {
4291
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
4292
+
4293
+ if (isPartialDateFormat) {
4294
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
4295
+ elem.validity = 'patternMismatch';
4296
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
4297
+ }
4298
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
4299
+ return;
4300
+ }
4301
+
4302
+ // Full date format with no valueObject means the value is not a valid calendar date.
4290
4303
  elem.validity = 'patternMismatch';
4291
4304
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
4292
4305
  return;
@@ -10216,10 +10229,11 @@ class AuroInputUtilities {
10216
10229
  const dateFormat = format$1 || this.overrideFormat || pattern || 'mm/dd/yyyy';
10217
10230
 
10218
10231
  if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
10219
- const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 9999);
10232
+ const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
10233
+ const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
10220
10234
  return {
10221
10235
  mask: IMask.MaskedRange,
10222
- from: 1,
10236
+ from: fromValue,
10223
10237
  to: maxValue,
10224
10238
  lazy: true,
10225
10239
  placeholderChar: '',
@@ -10227,7 +10241,8 @@ class AuroInputUtilities {
10227
10241
  return value.toString().padStart(dateFormat.length, '0');
10228
10242
  },
10229
10243
  parse(str) {
10230
- return parseInt(str) || null;
10244
+ const num = parseInt(str, 10);
10245
+ return isNaN(num) ? null : num;
10231
10246
  }
10232
10247
  };
10233
10248
  }
@@ -10291,6 +10306,49 @@ class AuroInputUtilities {
10291
10306
  return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
10292
10307
  }
10293
10308
 
10309
+ /**
10310
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
10311
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
10312
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
10313
+ * @param {string} value - The user-facing display value.
10314
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
10315
+ * @returns {boolean}
10316
+ */
10317
+ isValidPartialDate(value, format$1) {
10318
+ if (!value || !format$1) {
10319
+ return false;
10320
+ }
10321
+ const normalizedFormat = format$1.toLowerCase();
10322
+
10323
+ if (normalizedFormat === 'dd') {
10324
+ const num = Number(value);
10325
+ return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
10326
+ }
10327
+ if (normalizedFormat === 'yy') {
10328
+ const num = Number(value);
10329
+ return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
10330
+ }
10331
+ if (normalizedFormat === 'yyyy') {
10332
+ const num = Number(value);
10333
+ return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
10334
+ }
10335
+
10336
+ const dateFnsMask = this.toDateFnsMask(normalizedFormat);
10337
+ // Use the 1st of the current month as the reference so that formats
10338
+ // omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
10339
+ const referenceDate = new Date();
10340
+ referenceDate.setDate(1);
10341
+ const parsed = parse(value, dateFnsMask, referenceDate);
10342
+ if (!isValid(parsed) || format(parsed, dateFnsMask) !== value) {
10343
+ return false;
10344
+ }
10345
+ if (normalizedFormat.includes('yyyy')) {
10346
+ const year = parsed.getFullYear();
10347
+ return year >= 1900 && year <= 2100;
10348
+ }
10349
+ return true;
10350
+ }
10351
+
10294
10352
  /**
10295
10353
  * Converts a display string to its model value.
10296
10354
  * For full date formats, converts the display string to an ISO date string.
@@ -10910,6 +10968,13 @@ class BaseInput extends AuroElement {
10910
10968
  type: String
10911
10969
  },
10912
10970
 
10971
+ /**
10972
+ * Custom help text message to display when validity = `patternMismatch`.
10973
+ */
10974
+ setCustomValidityPatternMismatch: {
10975
+ type: String
10976
+ },
10977
+
10913
10978
  /**
10914
10979
  * Custom help text message to display when validity = `rangeOverflow`.
10915
10980
  */
@@ -10980,7 +11045,7 @@ class BaseInput extends AuroElement {
10980
11045
 
10981
11046
  /**
10982
11047
  * Populates the `type` attribute on the input.
10983
- * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number'}
11048
+ * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
10984
11049
  * @default 'text'
10985
11050
  */
10986
11051
  type: {
@@ -11005,7 +11070,7 @@ class BaseInput extends AuroElement {
11005
11070
 
11006
11071
  /**
11007
11072
  * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
11008
- * The format for this property should be ISO for `date` type inputs.
11073
+ * For `date` type inputs using a full date format (year/month/day), the `value` should be ISO (YYYY-MM-DD). Partial date formats use the display format.
11009
11074
  */
11010
11075
  value: {
11011
11076
  type: String
@@ -12128,7 +12193,7 @@ class AuroHelpText extends LitElement {
12128
12193
  }
12129
12194
  }
12130
12195
 
12131
- var formkitVersion = '202607011652';
12196
+ var formkitVersion = '202607011914';
12132
12197
 
12133
12198
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
12134
12199
  // See LICENSE in the project root for license information.
@@ -4285,8 +4285,21 @@ class AuroFormValidation {
4285
4285
  return;
4286
4286
  }
4287
4287
 
4288
- // Validate that the date passed was the correct format and is a valid date
4288
+ // Validate that the date passed was the correct format and is a valid date.
4289
+ // For partial date formats, valueObject is never populated; validate them directly.
4289
4290
  if (elem.value && !elem.valueObject) {
4291
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
4292
+
4293
+ if (isPartialDateFormat) {
4294
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
4295
+ elem.validity = 'patternMismatch';
4296
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
4297
+ }
4298
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
4299
+ return;
4300
+ }
4301
+
4302
+ // Full date format with no valueObject means the value is not a valid calendar date.
4290
4303
  elem.validity = 'patternMismatch';
4291
4304
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
4292
4305
  return;
@@ -10216,10 +10229,11 @@ class AuroInputUtilities {
10216
10229
  const dateFormat = format$1 || this.overrideFormat || pattern || 'mm/dd/yyyy';
10217
10230
 
10218
10231
  if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
10219
- const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 9999);
10232
+ const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
10233
+ const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
10220
10234
  return {
10221
10235
  mask: IMask.MaskedRange,
10222
- from: 1,
10236
+ from: fromValue,
10223
10237
  to: maxValue,
10224
10238
  lazy: true,
10225
10239
  placeholderChar: '',
@@ -10227,7 +10241,8 @@ class AuroInputUtilities {
10227
10241
  return value.toString().padStart(dateFormat.length, '0');
10228
10242
  },
10229
10243
  parse(str) {
10230
- return parseInt(str) || null;
10244
+ const num = parseInt(str, 10);
10245
+ return isNaN(num) ? null : num;
10231
10246
  }
10232
10247
  };
10233
10248
  }
@@ -10291,6 +10306,49 @@ class AuroInputUtilities {
10291
10306
  return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
10292
10307
  }
10293
10308
 
10309
+ /**
10310
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
10311
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
10312
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
10313
+ * @param {string} value - The user-facing display value.
10314
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
10315
+ * @returns {boolean}
10316
+ */
10317
+ isValidPartialDate(value, format$1) {
10318
+ if (!value || !format$1) {
10319
+ return false;
10320
+ }
10321
+ const normalizedFormat = format$1.toLowerCase();
10322
+
10323
+ if (normalizedFormat === 'dd') {
10324
+ const num = Number(value);
10325
+ return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
10326
+ }
10327
+ if (normalizedFormat === 'yy') {
10328
+ const num = Number(value);
10329
+ return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
10330
+ }
10331
+ if (normalizedFormat === 'yyyy') {
10332
+ const num = Number(value);
10333
+ return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
10334
+ }
10335
+
10336
+ const dateFnsMask = this.toDateFnsMask(normalizedFormat);
10337
+ // Use the 1st of the current month as the reference so that formats
10338
+ // omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
10339
+ const referenceDate = new Date();
10340
+ referenceDate.setDate(1);
10341
+ const parsed = parse(value, dateFnsMask, referenceDate);
10342
+ if (!isValid(parsed) || format(parsed, dateFnsMask) !== value) {
10343
+ return false;
10344
+ }
10345
+ if (normalizedFormat.includes('yyyy')) {
10346
+ const year = parsed.getFullYear();
10347
+ return year >= 1900 && year <= 2100;
10348
+ }
10349
+ return true;
10350
+ }
10351
+
10294
10352
  /**
10295
10353
  * Converts a display string to its model value.
10296
10354
  * For full date formats, converts the display string to an ISO date string.
@@ -10910,6 +10968,13 @@ class BaseInput extends AuroElement {
10910
10968
  type: String
10911
10969
  },
10912
10970
 
10971
+ /**
10972
+ * Custom help text message to display when validity = `patternMismatch`.
10973
+ */
10974
+ setCustomValidityPatternMismatch: {
10975
+ type: String
10976
+ },
10977
+
10913
10978
  /**
10914
10979
  * Custom help text message to display when validity = `rangeOverflow`.
10915
10980
  */
@@ -10980,7 +11045,7 @@ class BaseInput extends AuroElement {
10980
11045
 
10981
11046
  /**
10982
11047
  * Populates the `type` attribute on the input.
10983
- * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number'}
11048
+ * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
10984
11049
  * @default 'text'
10985
11050
  */
10986
11051
  type: {
@@ -11005,7 +11070,7 @@ class BaseInput extends AuroElement {
11005
11070
 
11006
11071
  /**
11007
11072
  * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
11008
- * The format for this property should be ISO for `date` type inputs.
11073
+ * For `date` type inputs using a full date format (year/month/day), the `value` should be ISO (YYYY-MM-DD). Partial date formats use the display format.
11009
11074
  */
11010
11075
  value: {
11011
11076
  type: String
@@ -12128,7 +12193,7 @@ class AuroHelpText extends LitElement {
12128
12193
  }
12129
12194
  }
12130
12195
 
12131
- var formkitVersion = '202607011652';
12196
+ var formkitVersion = '202607011914';
12132
12197
 
12133
12198
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
12134
12199
  // See LICENSE in the project root for license information.
@@ -62,6 +62,15 @@ export class AuroInputUtilities {
62
62
  * @returns {boolean}
63
63
  */
64
64
  private isFullDateFormat;
65
+ /**
66
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
67
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
68
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
69
+ * @param {string} value - The user-facing display value.
70
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
71
+ * @returns {boolean}
72
+ */
73
+ isValidPartialDate(value: string, format: string): boolean;
65
74
  /**
66
75
  * Converts a display string to its model value.
67
76
  * For full date formats, converts the display string to an ISO date string.
@@ -715,8 +715,21 @@ class AuroFormValidation {
715
715
  return;
716
716
  }
717
717
 
718
- // Validate that the date passed was the correct format and is a valid date
718
+ // Validate that the date passed was the correct format and is a valid date.
719
+ // For partial date formats, valueObject is never populated; validate them directly.
719
720
  if (elem.value && !elem.valueObject) {
721
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
722
+
723
+ if (isPartialDateFormat) {
724
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
725
+ elem.validity = 'patternMismatch';
726
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
727
+ }
728
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
729
+ return;
730
+ }
731
+
732
+ // Full date format with no valueObject means the value is not a valid calendar date.
720
733
  elem.validity = 'patternMismatch';
721
734
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
722
735
  return;
@@ -1214,7 +1227,7 @@ class AuroHelpText extends i$2 {
1214
1227
  }
1215
1228
  }
1216
1229
 
1217
- var formkitVersion = '202607011652';
1230
+ var formkitVersion = '202607011914';
1218
1231
 
1219
1232
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1220
1233
  // See LICENSE in the project root for license information.
@@ -715,8 +715,21 @@ class AuroFormValidation {
715
715
  return;
716
716
  }
717
717
 
718
- // Validate that the date passed was the correct format and is a valid date
718
+ // Validate that the date passed was the correct format and is a valid date.
719
+ // For partial date formats, valueObject is never populated; validate them directly.
719
720
  if (elem.value && !elem.valueObject) {
721
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
722
+
723
+ if (isPartialDateFormat) {
724
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
725
+ elem.validity = 'patternMismatch';
726
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
727
+ }
728
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
729
+ return;
730
+ }
731
+
732
+ // Full date format with no valueObject means the value is not a valid calendar date.
720
733
  elem.validity = 'patternMismatch';
721
734
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
722
735
  return;
@@ -1214,7 +1227,7 @@ class AuroHelpText extends i$2 {
1214
1227
  }
1215
1228
  }
1216
1229
 
1217
- var formkitVersion = '202607011652';
1230
+ var formkitVersion = '202607011914';
1218
1231
 
1219
1232
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1220
1233
  // See LICENSE in the project root for license information.
@@ -715,8 +715,21 @@ class AuroFormValidation {
715
715
  return;
716
716
  }
717
717
 
718
- // Validate that the date passed was the correct format and is a valid date
718
+ // Validate that the date passed was the correct format and is a valid date.
719
+ // For partial date formats, valueObject is never populated; validate them directly.
719
720
  if (elem.value && !elem.valueObject) {
721
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
722
+
723
+ if (isPartialDateFormat) {
724
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
725
+ elem.validity = 'patternMismatch';
726
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
727
+ }
728
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
729
+ return;
730
+ }
731
+
732
+ // Full date format with no valueObject means the value is not a valid calendar date.
720
733
  elem.validity = 'patternMismatch';
721
734
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
722
735
  return;
@@ -1214,7 +1227,7 @@ class AuroHelpText extends i$2 {
1214
1227
  }
1215
1228
  }
1216
1229
 
1217
- var formkitVersion = '202607011652';
1230
+ var formkitVersion = '202607011914';
1218
1231
 
1219
1232
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1220
1233
  // See LICENSE in the project root for license information.
@@ -654,8 +654,21 @@ class AuroFormValidation {
654
654
  return;
655
655
  }
656
656
 
657
- // Validate that the date passed was the correct format and is a valid date
657
+ // Validate that the date passed was the correct format and is a valid date.
658
+ // For partial date formats, valueObject is never populated; validate them directly.
658
659
  if (elem.value && !elem.valueObject) {
660
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
661
+
662
+ if (isPartialDateFormat) {
663
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
664
+ elem.validity = 'patternMismatch';
665
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
666
+ }
667
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
668
+ return;
669
+ }
670
+
671
+ // Full date format with no valueObject means the value is not a valid calendar date.
659
672
  elem.validity = 'patternMismatch';
660
673
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
661
674
  return;
@@ -1153,7 +1166,7 @@ class AuroHelpText extends LitElement {
1153
1166
  }
1154
1167
  }
1155
1168
 
1156
- var formkitVersion = '202607011652';
1169
+ var formkitVersion = '202607011914';
1157
1170
 
1158
1171
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1159
1172
  // See LICENSE in the project root for license information.
@@ -654,8 +654,21 @@ class AuroFormValidation {
654
654
  return;
655
655
  }
656
656
 
657
- // Validate that the date passed was the correct format and is a valid date
657
+ // Validate that the date passed was the correct format and is a valid date.
658
+ // For partial date formats, valueObject is never populated; validate them directly.
658
659
  if (elem.value && !elem.valueObject) {
660
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
661
+
662
+ if (isPartialDateFormat) {
663
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
664
+ elem.validity = 'patternMismatch';
665
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
666
+ }
667
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
668
+ return;
669
+ }
670
+
671
+ // Full date format with no valueObject means the value is not a valid calendar date.
659
672
  elem.validity = 'patternMismatch';
660
673
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
661
674
  return;
@@ -1153,7 +1166,7 @@ class AuroHelpText extends LitElement {
1153
1166
  }
1154
1167
  }
1155
1168
 
1156
- var formkitVersion = '202607011652';
1169
+ var formkitVersion = '202607011914';
1157
1170
 
1158
1171
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1159
1172
  // See LICENSE in the project root for license information.
@@ -455,8 +455,21 @@ class AuroFormValidation {
455
455
  return;
456
456
  }
457
457
 
458
- // Validate that the date passed was the correct format and is a valid date
458
+ // Validate that the date passed was the correct format and is a valid date.
459
+ // For partial date formats, valueObject is never populated; validate them directly.
459
460
  if (elem.value && !elem.valueObject) {
461
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
462
+
463
+ if (isPartialDateFormat) {
464
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
465
+ elem.validity = 'patternMismatch';
466
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
467
+ }
468
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
469
+ return;
470
+ }
471
+
472
+ // Full date format with no valueObject means the value is not a valid calendar date.
460
473
  elem.validity = 'patternMismatch';
461
474
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
462
475
  return;
@@ -4974,7 +4987,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
4974
4987
  }
4975
4988
  };
4976
4989
 
4977
- var formkitVersion$1 = '202607011652';
4990
+ var formkitVersion$1 = '202607011914';
4978
4991
 
4979
4992
  class AuroElement extends i$2 {
4980
4993
  static get properties() {
@@ -5726,6 +5739,23 @@ class AuroDropdown extends AuroElement {
5726
5739
  if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
5727
5740
  this.trigger.focus();
5728
5741
  }
5742
+
5743
+
5744
+ if (!this.isPopoverVisible) {
5745
+ // wait til the bib gets fully closed and rendered
5746
+ setTimeout(() => {
5747
+ // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
5748
+ // Restore focus to trigger when focus is still inside the bib (:focus-within) or fell to body.
5749
+ if (this.isPopoverVisible ||
5750
+ // eslint-disable-next-line no-extra-parens
5751
+ (!this.bibContent?.matches(':focus-within') &&
5752
+ document.activeElement !== document.body)) {
5753
+ return;
5754
+ }
5755
+ // Restore focus to the trigger.
5756
+ this.trigger.focus();
5757
+ });
5758
+ }
5729
5759
  }
5730
5760
 
5731
5761
  firstUpdated() {
@@ -6996,7 +7026,7 @@ class AuroHelpText extends i$2 {
6996
7026
  }
6997
7027
  }
6998
7028
 
6999
- var formkitVersion = '202607011652';
7029
+ var formkitVersion = '202607011914';
7000
7030
 
7001
7031
  var styleCss$2 = i$5`.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}`;
7002
7032
 
@@ -7857,6 +7887,14 @@ class AuroSelect extends AuroElement$1 {
7857
7887
  this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
7858
7888
 
7859
7889
  this.menu.addEventListener("auroMenu-selectValueFailure", () => {
7890
+ // Menu dispatches this from two paths: a programmatic value mismatch
7891
+ // (menu pre-clears its own optionSelected to undefined before firing)
7892
+ // and a click on an unselected valueless option (menu leaves state
7893
+ // untouched). Only mirror the clear in the first case — otherwise a
7894
+ // valueless click in multiSelect would wipe every prior pick.
7895
+ if (this.menu.optionSelected !== undefined) {
7896
+ return;
7897
+ }
7860
7898
  this.value = undefined;
7861
7899
  this.optionSelected = this.multiSelect ? [] : undefined;
7862
7900
  // The trigger label is rendered imperatively into #value, so a property
@@ -8057,6 +8095,13 @@ class AuroSelect extends AuroElement$1 {
8057
8095
  const cycleIndex = (this.typeaheadBuffer.length - 1) % matches.length;
8058
8096
  match = matches[cycleIndex];
8059
8097
  }
8098
+ } else if (!match && this.typeaheadBuffer.length > 1) {
8099
+ // Buffer has no prefix match and isn't a repeat-char cycle (e.g. "a" then
8100
+ // "b" against [Apple, Banana]). Reset to just the new key and retry —
8101
+ // mirrors native <select>, which falls back to a single-char search when
8102
+ // accumulated input matches nothing, rather than swallowing the keystroke.
8103
+ this.typeaheadBuffer = key;
8104
+ match = options.find((option) => this._getOptionDisplayText(option).startsWith(key));
8060
8105
  }
8061
8106
 
8062
8107
  // Intentional: no-match leaves the bib closed (deviates from APG / some native <select>).