@aurodesignsystem-dev/auro-formkit 0.0.0-pr1522.1 → 0.0.0-pr1522.2
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 +15 -2
- package/components/checkbox/demo/getting-started.min.js +15 -2
- package/components/checkbox/demo/index.min.js +15 -2
- package/components/checkbox/dist/index.js +15 -2
- package/components/checkbox/dist/registered.js +15 -2
- package/components/combobox/demo/customize.min.js +105 -10
- package/components/combobox/demo/getting-started.min.js +105 -10
- package/components/combobox/demo/index.min.js +105 -10
- package/components/combobox/dist/index.js +105 -10
- package/components/combobox/dist/registered.js +105 -10
- package/components/counter/demo/customize.min.js +33 -3
- package/components/counter/demo/index.min.js +33 -3
- package/components/counter/dist/index.js +33 -3
- package/components/counter/dist/registered.js +33 -3
- package/components/datepicker/demo/customize.min.js +257 -16
- package/components/datepicker/demo/index.min.js +257 -16
- package/components/datepicker/dist/auro-calendar-cell.d.ts +17 -0
- package/components/datepicker/dist/auro-calendar.d.ts +43 -3
- package/components/datepicker/dist/index.js +257 -16
- package/components/datepicker/dist/registered.js +257 -16
- package/components/dropdown/demo/customize.min.js +18 -1
- package/components/dropdown/demo/getting-started.min.js +18 -1
- package/components/dropdown/demo/index.min.js +18 -1
- package/components/dropdown/dist/index.js +18 -1
- package/components/dropdown/dist/registered.js +18 -1
- package/components/form/demo/customize.min.js +530 -43
- package/components/form/demo/getting-started.min.js +530 -43
- package/components/form/demo/index.min.js +530 -43
- package/components/form/demo/registerDemoDeps.min.js +530 -43
- package/components/input/demo/api.md +58 -57
- package/components/input/demo/customize.min.js +72 -7
- package/components/input/demo/getting-started.min.js +72 -7
- package/components/input/demo/index.min.js +72 -7
- package/components/input/dist/base-input.d.ts +9 -3
- package/components/input/dist/index.js +72 -7
- package/components/input/dist/registered.js +72 -7
- package/components/input/dist/utilities.d.ts +9 -0
- package/components/radio/demo/customize.min.js +15 -2
- package/components/radio/demo/getting-started.min.js +15 -2
- package/components/radio/demo/index.min.js +15 -2
- package/components/radio/dist/index.js +15 -2
- package/components/radio/dist/registered.js +15 -2
- package/components/select/demo/customize.md +6 -4
- package/components/select/demo/customize.min.js +33 -3
- package/components/select/demo/getting-started.min.js +33 -3
- package/components/select/demo/index.min.js +33 -3
- package/components/select/dist/index.js +33 -3
- package/components/select/dist/registered.js +33 -3
- package/custom-elements.json +1622 -1520
- package/package.json +1 -1
|
@@ -759,8 +759,21 @@ class AuroFormValidation {
|
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
|
|
762
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
762
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
763
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
763
764
|
if (elem.value && !elem.valueObject) {
|
|
765
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
766
|
+
|
|
767
|
+
if (isPartialDateFormat) {
|
|
768
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
769
|
+
elem.validity = 'patternMismatch';
|
|
770
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
771
|
+
}
|
|
772
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
764
777
|
elem.validity = 'patternMismatch';
|
|
765
778
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
766
779
|
return;
|
|
@@ -1262,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1262
1275
|
}
|
|
1263
1276
|
}
|
|
1264
1277
|
|
|
1265
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607012057';
|
|
1266
1279
|
|
|
1267
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1268
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -759,8 +759,21 @@ class AuroFormValidation {
|
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
|
|
762
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
762
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
763
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
763
764
|
if (elem.value && !elem.valueObject) {
|
|
765
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
766
|
+
|
|
767
|
+
if (isPartialDateFormat) {
|
|
768
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
769
|
+
elem.validity = 'patternMismatch';
|
|
770
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
771
|
+
}
|
|
772
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
764
777
|
elem.validity = 'patternMismatch';
|
|
765
778
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
766
779
|
return;
|
|
@@ -1262,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1262
1275
|
}
|
|
1263
1276
|
}
|
|
1264
1277
|
|
|
1265
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607012057';
|
|
1266
1279
|
|
|
1267
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1268
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -759,8 +759,21 @@ class AuroFormValidation {
|
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
|
|
762
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
762
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
763
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
763
764
|
if (elem.value && !elem.valueObject) {
|
|
765
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
766
|
+
|
|
767
|
+
if (isPartialDateFormat) {
|
|
768
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
769
|
+
elem.validity = 'patternMismatch';
|
|
770
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
771
|
+
}
|
|
772
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
764
777
|
elem.validity = 'patternMismatch';
|
|
765
778
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
766
779
|
return;
|
|
@@ -1262,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1262
1275
|
}
|
|
1263
1276
|
}
|
|
1264
1277
|
|
|
1265
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607012057';
|
|
1266
1279
|
|
|
1267
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1268
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -712,8 +712,21 @@ class AuroFormValidation {
|
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
715
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
716
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
716
717
|
if (elem.value && !elem.valueObject) {
|
|
718
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
719
|
+
|
|
720
|
+
if (isPartialDateFormat) {
|
|
721
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
722
|
+
elem.validity = 'patternMismatch';
|
|
723
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
724
|
+
}
|
|
725
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
717
730
|
elem.validity = 'patternMismatch';
|
|
718
731
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
719
732
|
return;
|
|
@@ -1215,7 +1228,7 @@ class AuroHelpText extends LitElement {
|
|
|
1215
1228
|
}
|
|
1216
1229
|
}
|
|
1217
1230
|
|
|
1218
|
-
var formkitVersion = '
|
|
1231
|
+
var formkitVersion = '202607012057';
|
|
1219
1232
|
|
|
1220
1233
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1221
1234
|
// See LICENSE in the project root for license information.
|
|
@@ -712,8 +712,21 @@ class AuroFormValidation {
|
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
714
|
|
|
715
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
715
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
716
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
716
717
|
if (elem.value && !elem.valueObject) {
|
|
718
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
719
|
+
|
|
720
|
+
if (isPartialDateFormat) {
|
|
721
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
722
|
+
elem.validity = 'patternMismatch';
|
|
723
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
724
|
+
}
|
|
725
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
717
730
|
elem.validity = 'patternMismatch';
|
|
718
731
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
719
732
|
return;
|
|
@@ -1215,7 +1228,7 @@ class AuroHelpText extends LitElement {
|
|
|
1215
1228
|
}
|
|
1216
1229
|
}
|
|
1217
1230
|
|
|
1218
|
-
var formkitVersion = '
|
|
1231
|
+
var formkitVersion = '202607012057';
|
|
1219
1232
|
|
|
1220
1233
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1221
1234
|
// See LICENSE in the project root for license information.
|
|
@@ -387,8 +387,21 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
390
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
391
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
391
392
|
if (elem.value && !elem.valueObject) {
|
|
393
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
394
|
+
|
|
395
|
+
if (isPartialDateFormat) {
|
|
396
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
397
|
+
elem.validity = 'patternMismatch';
|
|
398
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
399
|
+
}
|
|
400
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
392
405
|
elem.validity = 'patternMismatch';
|
|
393
406
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
394
407
|
return;
|
|
@@ -4866,7 +4879,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4866
4879
|
}
|
|
4867
4880
|
};
|
|
4868
4881
|
|
|
4869
|
-
var formkitVersion$2 = '
|
|
4882
|
+
var formkitVersion$2 = '202607012057';
|
|
4870
4883
|
|
|
4871
4884
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4872
4885
|
static get properties() {
|
|
@@ -5618,6 +5631,23 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5618
5631
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5619
5632
|
this.trigger.focus();
|
|
5620
5633
|
}
|
|
5634
|
+
|
|
5635
|
+
|
|
5636
|
+
if (!this.isPopoverVisible) {
|
|
5637
|
+
// wait til the bib gets fully closed and rendered
|
|
5638
|
+
setTimeout(() => {
|
|
5639
|
+
// Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
|
|
5640
|
+
// Restore focus to trigger when focus is still inside the bib (:focus-within) or fell to body.
|
|
5641
|
+
if (this.isPopoverVisible ||
|
|
5642
|
+
// eslint-disable-next-line no-extra-parens
|
|
5643
|
+
(!this.bibContent?.matches(':focus-within') &&
|
|
5644
|
+
document.activeElement !== document.body)) {
|
|
5645
|
+
return;
|
|
5646
|
+
}
|
|
5647
|
+
// Restore focus to the trigger.
|
|
5648
|
+
this.trigger.focus();
|
|
5649
|
+
});
|
|
5650
|
+
}
|
|
5621
5651
|
}
|
|
5622
5652
|
|
|
5623
5653
|
firstUpdated() {
|
|
@@ -10550,8 +10580,21 @@ class AuroFormValidation {
|
|
|
10550
10580
|
return;
|
|
10551
10581
|
}
|
|
10552
10582
|
|
|
10553
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
10583
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
10584
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
10554
10585
|
if (elem.value && !elem.valueObject) {
|
|
10586
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
10587
|
+
|
|
10588
|
+
if (isPartialDateFormat) {
|
|
10589
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
10590
|
+
elem.validity = 'patternMismatch';
|
|
10591
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
10592
|
+
}
|
|
10593
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
10594
|
+
return;
|
|
10595
|
+
}
|
|
10596
|
+
|
|
10597
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
10555
10598
|
elem.validity = 'patternMismatch';
|
|
10556
10599
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
10557
10600
|
return;
|
|
@@ -16481,10 +16524,11 @@ class AuroInputUtilities {
|
|
|
16481
16524
|
const dateFormat = format$1 || this.overrideFormat || pattern || 'mm/dd/yyyy';
|
|
16482
16525
|
|
|
16483
16526
|
if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
|
|
16484
|
-
const
|
|
16527
|
+
const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
|
|
16528
|
+
const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
|
|
16485
16529
|
return {
|
|
16486
16530
|
mask: IMask.MaskedRange,
|
|
16487
|
-
from:
|
|
16531
|
+
from: fromValue,
|
|
16488
16532
|
to: maxValue,
|
|
16489
16533
|
lazy: true,
|
|
16490
16534
|
placeholderChar: '',
|
|
@@ -16492,7 +16536,8 @@ class AuroInputUtilities {
|
|
|
16492
16536
|
return value.toString().padStart(dateFormat.length, '0');
|
|
16493
16537
|
},
|
|
16494
16538
|
parse(str) {
|
|
16495
|
-
|
|
16539
|
+
const num = parseInt(str, 10);
|
|
16540
|
+
return isNaN(num) ? null : num;
|
|
16496
16541
|
}
|
|
16497
16542
|
};
|
|
16498
16543
|
}
|
|
@@ -16556,6 +16601,49 @@ class AuroInputUtilities {
|
|
|
16556
16601
|
return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
|
|
16557
16602
|
}
|
|
16558
16603
|
|
|
16604
|
+
/**
|
|
16605
|
+
* Validates a value against a partial date format (one that lacks yy/mm/dd all three).
|
|
16606
|
+
* Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
|
|
16607
|
+
* a date-fns parse + round-trip to confirm both validity and exact formatting.
|
|
16608
|
+
* @param {string} value - The user-facing display value.
|
|
16609
|
+
* @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
|
|
16610
|
+
* @returns {boolean}
|
|
16611
|
+
*/
|
|
16612
|
+
isValidPartialDate(value, format$1) {
|
|
16613
|
+
if (!value || !format$1) {
|
|
16614
|
+
return false;
|
|
16615
|
+
}
|
|
16616
|
+
const normalizedFormat = format$1.toLowerCase();
|
|
16617
|
+
|
|
16618
|
+
if (normalizedFormat === 'dd') {
|
|
16619
|
+
const num = Number(value);
|
|
16620
|
+
return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
|
|
16621
|
+
}
|
|
16622
|
+
if (normalizedFormat === 'yy') {
|
|
16623
|
+
const num = Number(value);
|
|
16624
|
+
return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
|
|
16625
|
+
}
|
|
16626
|
+
if (normalizedFormat === 'yyyy') {
|
|
16627
|
+
const num = Number(value);
|
|
16628
|
+
return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
|
|
16629
|
+
}
|
|
16630
|
+
|
|
16631
|
+
const dateFnsMask = this.toDateFnsMask(normalizedFormat);
|
|
16632
|
+
// Use the 1st of the current month as the reference so that formats
|
|
16633
|
+
// omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
|
|
16634
|
+
const referenceDate = new Date();
|
|
16635
|
+
referenceDate.setDate(1);
|
|
16636
|
+
const parsed = parse(value, dateFnsMask, referenceDate);
|
|
16637
|
+
if (!isValid(parsed) || format(parsed, dateFnsMask) !== value) {
|
|
16638
|
+
return false;
|
|
16639
|
+
}
|
|
16640
|
+
if (normalizedFormat.includes('yyyy')) {
|
|
16641
|
+
const year = parsed.getFullYear();
|
|
16642
|
+
return year >= 1900 && year <= 2100;
|
|
16643
|
+
}
|
|
16644
|
+
return true;
|
|
16645
|
+
}
|
|
16646
|
+
|
|
16559
16647
|
/**
|
|
16560
16648
|
* Converts a display string to its model value.
|
|
16561
16649
|
* For full date formats, converts the display string to an ISO date string.
|
|
@@ -17175,6 +17263,13 @@ class BaseInput extends AuroElement$1 {
|
|
|
17175
17263
|
type: String
|
|
17176
17264
|
},
|
|
17177
17265
|
|
|
17266
|
+
/**
|
|
17267
|
+
* Custom help text message to display when validity = `patternMismatch`.
|
|
17268
|
+
*/
|
|
17269
|
+
setCustomValidityPatternMismatch: {
|
|
17270
|
+
type: String
|
|
17271
|
+
},
|
|
17272
|
+
|
|
17178
17273
|
/**
|
|
17179
17274
|
* Custom help text message to display when validity = `rangeOverflow`.
|
|
17180
17275
|
*/
|
|
@@ -17245,7 +17340,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17245
17340
|
|
|
17246
17341
|
/**
|
|
17247
17342
|
* Populates the `type` attribute on the input.
|
|
17248
|
-
* @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number'}
|
|
17343
|
+
* @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
|
|
17249
17344
|
* @default 'text'
|
|
17250
17345
|
*/
|
|
17251
17346
|
type: {
|
|
@@ -17270,7 +17365,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17270
17365
|
|
|
17271
17366
|
/**
|
|
17272
17367
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
17273
|
-
*
|
|
17368
|
+
* 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.
|
|
17274
17369
|
*/
|
|
17275
17370
|
value: {
|
|
17276
17371
|
type: String
|
|
@@ -18393,7 +18488,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18393
18488
|
}
|
|
18394
18489
|
};
|
|
18395
18490
|
|
|
18396
|
-
var formkitVersion$1 = '
|
|
18491
|
+
var formkitVersion$1 = '202607012057';
|
|
18397
18492
|
|
|
18398
18493
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18399
18494
|
// See LICENSE in the project root for license information.
|
|
@@ -19519,7 +19614,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19519
19614
|
}
|
|
19520
19615
|
}
|
|
19521
19616
|
|
|
19522
|
-
var formkitVersion = '
|
|
19617
|
+
var formkitVersion = '202607012057';
|
|
19523
19618
|
|
|
19524
19619
|
var styleCss$3 = i$6`.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}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
19525
19620
|
|
|
@@ -387,8 +387,21 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
390
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
391
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
391
392
|
if (elem.value && !elem.valueObject) {
|
|
393
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
394
|
+
|
|
395
|
+
if (isPartialDateFormat) {
|
|
396
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
397
|
+
elem.validity = 'patternMismatch';
|
|
398
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
399
|
+
}
|
|
400
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
392
405
|
elem.validity = 'patternMismatch';
|
|
393
406
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
394
407
|
return;
|
|
@@ -4866,7 +4879,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4866
4879
|
}
|
|
4867
4880
|
};
|
|
4868
4881
|
|
|
4869
|
-
var formkitVersion$2 = '
|
|
4882
|
+
var formkitVersion$2 = '202607012057';
|
|
4870
4883
|
|
|
4871
4884
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4872
4885
|
static get properties() {
|
|
@@ -5618,6 +5631,23 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5618
5631
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5619
5632
|
this.trigger.focus();
|
|
5620
5633
|
}
|
|
5634
|
+
|
|
5635
|
+
|
|
5636
|
+
if (!this.isPopoverVisible) {
|
|
5637
|
+
// wait til the bib gets fully closed and rendered
|
|
5638
|
+
setTimeout(() => {
|
|
5639
|
+
// Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
|
|
5640
|
+
// Restore focus to trigger when focus is still inside the bib (:focus-within) or fell to body.
|
|
5641
|
+
if (this.isPopoverVisible ||
|
|
5642
|
+
// eslint-disable-next-line no-extra-parens
|
|
5643
|
+
(!this.bibContent?.matches(':focus-within') &&
|
|
5644
|
+
document.activeElement !== document.body)) {
|
|
5645
|
+
return;
|
|
5646
|
+
}
|
|
5647
|
+
// Restore focus to the trigger.
|
|
5648
|
+
this.trigger.focus();
|
|
5649
|
+
});
|
|
5650
|
+
}
|
|
5621
5651
|
}
|
|
5622
5652
|
|
|
5623
5653
|
firstUpdated() {
|
|
@@ -10550,8 +10580,21 @@ class AuroFormValidation {
|
|
|
10550
10580
|
return;
|
|
10551
10581
|
}
|
|
10552
10582
|
|
|
10553
|
-
// Validate that the date passed was the correct format and is a valid date
|
|
10583
|
+
// Validate that the date passed was the correct format and is a valid date.
|
|
10584
|
+
// For partial date formats, valueObject is never populated; validate them directly.
|
|
10554
10585
|
if (elem.value && !elem.valueObject) {
|
|
10586
|
+
const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
|
|
10587
|
+
|
|
10588
|
+
if (isPartialDateFormat) {
|
|
10589
|
+
if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
|
|
10590
|
+
elem.validity = 'patternMismatch';
|
|
10591
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
10592
|
+
}
|
|
10593
|
+
// Partial date format — validate directly and skip max/min checks since valueObject is undefined.
|
|
10594
|
+
return;
|
|
10595
|
+
}
|
|
10596
|
+
|
|
10597
|
+
// Full date format with no valueObject means the value is not a valid calendar date.
|
|
10555
10598
|
elem.validity = 'patternMismatch';
|
|
10556
10599
|
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
|
|
10557
10600
|
return;
|
|
@@ -16481,10 +16524,11 @@ class AuroInputUtilities {
|
|
|
16481
16524
|
const dateFormat = format$1 || this.overrideFormat || pattern || 'mm/dd/yyyy';
|
|
16482
16525
|
|
|
16483
16526
|
if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
|
|
16484
|
-
const
|
|
16527
|
+
const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
|
|
16528
|
+
const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
|
|
16485
16529
|
return {
|
|
16486
16530
|
mask: IMask.MaskedRange,
|
|
16487
|
-
from:
|
|
16531
|
+
from: fromValue,
|
|
16488
16532
|
to: maxValue,
|
|
16489
16533
|
lazy: true,
|
|
16490
16534
|
placeholderChar: '',
|
|
@@ -16492,7 +16536,8 @@ class AuroInputUtilities {
|
|
|
16492
16536
|
return value.toString().padStart(dateFormat.length, '0');
|
|
16493
16537
|
},
|
|
16494
16538
|
parse(str) {
|
|
16495
|
-
|
|
16539
|
+
const num = parseInt(str, 10);
|
|
16540
|
+
return isNaN(num) ? null : num;
|
|
16496
16541
|
}
|
|
16497
16542
|
};
|
|
16498
16543
|
}
|
|
@@ -16556,6 +16601,49 @@ class AuroInputUtilities {
|
|
|
16556
16601
|
return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
|
|
16557
16602
|
}
|
|
16558
16603
|
|
|
16604
|
+
/**
|
|
16605
|
+
* Validates a value against a partial date format (one that lacks yy/mm/dd all three).
|
|
16606
|
+
* Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
|
|
16607
|
+
* a date-fns parse + round-trip to confirm both validity and exact formatting.
|
|
16608
|
+
* @param {string} value - The user-facing display value.
|
|
16609
|
+
* @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
|
|
16610
|
+
* @returns {boolean}
|
|
16611
|
+
*/
|
|
16612
|
+
isValidPartialDate(value, format$1) {
|
|
16613
|
+
if (!value || !format$1) {
|
|
16614
|
+
return false;
|
|
16615
|
+
}
|
|
16616
|
+
const normalizedFormat = format$1.toLowerCase();
|
|
16617
|
+
|
|
16618
|
+
if (normalizedFormat === 'dd') {
|
|
16619
|
+
const num = Number(value);
|
|
16620
|
+
return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
|
|
16621
|
+
}
|
|
16622
|
+
if (normalizedFormat === 'yy') {
|
|
16623
|
+
const num = Number(value);
|
|
16624
|
+
return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
|
|
16625
|
+
}
|
|
16626
|
+
if (normalizedFormat === 'yyyy') {
|
|
16627
|
+
const num = Number(value);
|
|
16628
|
+
return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
|
|
16629
|
+
}
|
|
16630
|
+
|
|
16631
|
+
const dateFnsMask = this.toDateFnsMask(normalizedFormat);
|
|
16632
|
+
// Use the 1st of the current month as the reference so that formats
|
|
16633
|
+
// omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
|
|
16634
|
+
const referenceDate = new Date();
|
|
16635
|
+
referenceDate.setDate(1);
|
|
16636
|
+
const parsed = parse(value, dateFnsMask, referenceDate);
|
|
16637
|
+
if (!isValid(parsed) || format(parsed, dateFnsMask) !== value) {
|
|
16638
|
+
return false;
|
|
16639
|
+
}
|
|
16640
|
+
if (normalizedFormat.includes('yyyy')) {
|
|
16641
|
+
const year = parsed.getFullYear();
|
|
16642
|
+
return year >= 1900 && year <= 2100;
|
|
16643
|
+
}
|
|
16644
|
+
return true;
|
|
16645
|
+
}
|
|
16646
|
+
|
|
16559
16647
|
/**
|
|
16560
16648
|
* Converts a display string to its model value.
|
|
16561
16649
|
* For full date formats, converts the display string to an ISO date string.
|
|
@@ -17175,6 +17263,13 @@ class BaseInput extends AuroElement$1 {
|
|
|
17175
17263
|
type: String
|
|
17176
17264
|
},
|
|
17177
17265
|
|
|
17266
|
+
/**
|
|
17267
|
+
* Custom help text message to display when validity = `patternMismatch`.
|
|
17268
|
+
*/
|
|
17269
|
+
setCustomValidityPatternMismatch: {
|
|
17270
|
+
type: String
|
|
17271
|
+
},
|
|
17272
|
+
|
|
17178
17273
|
/**
|
|
17179
17274
|
* Custom help text message to display when validity = `rangeOverflow`.
|
|
17180
17275
|
*/
|
|
@@ -17245,7 +17340,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17245
17340
|
|
|
17246
17341
|
/**
|
|
17247
17342
|
* Populates the `type` attribute on the input.
|
|
17248
|
-
* @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number'}
|
|
17343
|
+
* @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
|
|
17249
17344
|
* @default 'text'
|
|
17250
17345
|
*/
|
|
17251
17346
|
type: {
|
|
@@ -17270,7 +17365,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
17270
17365
|
|
|
17271
17366
|
/**
|
|
17272
17367
|
* Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
|
|
17273
|
-
*
|
|
17368
|
+
* 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.
|
|
17274
17369
|
*/
|
|
17275
17370
|
value: {
|
|
17276
17371
|
type: String
|
|
@@ -18393,7 +18488,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18393
18488
|
}
|
|
18394
18489
|
};
|
|
18395
18490
|
|
|
18396
|
-
var formkitVersion$1 = '
|
|
18491
|
+
var formkitVersion$1 = '202607012057';
|
|
18397
18492
|
|
|
18398
18493
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18399
18494
|
// See LICENSE in the project root for license information.
|
|
@@ -19519,7 +19614,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19519
19614
|
}
|
|
19520
19615
|
}
|
|
19521
19616
|
|
|
19522
|
-
var formkitVersion = '
|
|
19617
|
+
var formkitVersion = '202607012057';
|
|
19523
19618
|
|
|
19524
19619
|
var styleCss$3 = i$6`.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}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
19525
19620
|
|