@aurodesignsystem-dev/auro-formkit 0.0.0-pr1483.3 → 0.0.0-pr1488.0

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 (59) hide show
  1. package/components/checkbox/demo/customize.min.js +436 -14
  2. package/components/checkbox/demo/getting-started.min.js +436 -14
  3. package/components/checkbox/demo/index.min.js +436 -14
  4. package/components/checkbox/dist/index.js +436 -14
  5. package/components/checkbox/dist/registered.js +436 -14
  6. package/components/combobox/demo/customize.min.js +1482 -6618
  7. package/components/combobox/demo/getting-started.min.js +1482 -6618
  8. package/components/combobox/demo/index.min.js +1482 -6618
  9. package/components/combobox/demo/keyboard-behavior.md +68 -8
  10. package/components/combobox/dist/index.js +1489 -6625
  11. package/components/combobox/dist/registered.js +1489 -6625
  12. package/components/counter/demo/customize.min.js +437 -15
  13. package/components/counter/demo/index.min.js +437 -15
  14. package/components/counter/dist/index.js +436 -14
  15. package/components/counter/dist/registered.js +436 -14
  16. package/components/datepicker/demo/api.md +3 -10
  17. package/components/datepicker/demo/customize.md +6 -6
  18. package/components/datepicker/demo/index.md +4 -4
  19. package/components/datepicker/demo/index.min.js +2194 -7510
  20. package/components/datepicker/dist/index.js +2194 -7510
  21. package/components/datepicker/dist/registered.js +2194 -7510
  22. package/components/datepicker/dist/src/auro-calendar.d.ts +0 -6
  23. package/components/datepicker/dist/src/auro-datepicker.d.ts +10 -23
  24. package/components/datepicker/dist/src/utilities.d.ts +42 -10
  25. package/components/datepicker/dist/src/utilitiesCalendar.d.ts +2 -1
  26. package/components/dropdown/demo/customize.min.js +1 -1
  27. package/components/dropdown/demo/getting-started.min.js +1 -1
  28. package/components/dropdown/demo/index.min.js +1 -1
  29. package/components/dropdown/dist/index.js +1 -1
  30. package/components/dropdown/dist/registered.js +1 -1
  31. package/components/form/demo/customize.min.js +43986 -58306
  32. package/components/form/demo/getting-started.min.js +43986 -58306
  33. package/components/form/demo/index.min.js +43986 -58306
  34. package/components/form/demo/registerDemoDeps.min.js +43986 -58306
  35. package/components/input/demo/api.md +51 -57
  36. package/components/input/demo/customize.md +0 -160
  37. package/components/input/demo/customize.min.js +1011 -6565
  38. package/components/input/demo/getting-started.md +0 -11
  39. package/components/input/demo/getting-started.min.js +1010 -6564
  40. package/components/input/demo/index.md +3 -28
  41. package/components/input/demo/index.min.js +1010 -6564
  42. package/components/input/dist/auro-input.d.ts +6 -25
  43. package/components/input/dist/base-input.d.ts +69 -82
  44. package/components/input/dist/index.d.ts +1 -2
  45. package/components/input/dist/index.js +1003 -6599
  46. package/components/input/dist/registered.js +1010 -6564
  47. package/components/input/dist/utilities.d.ts +9 -68
  48. package/components/radio/demo/index.min.js +436 -14
  49. package/components/radio/dist/index.js +436 -14
  50. package/components/radio/dist/registered.js +436 -14
  51. package/components/select/demo/customize.min.js +455 -31
  52. package/components/select/demo/getting-started.min.js +455 -31
  53. package/components/select/demo/index.min.js +455 -31
  54. package/components/select/demo/keyboard-behavior.md +54 -8
  55. package/components/select/dist/index.js +455 -31
  56. package/components/select/dist/registered.js +455 -31
  57. package/custom-elements.json +717 -1199
  58. package/package.json +4 -4
  59. package/components/input/dist/auro-input-util.d.ts +0 -17
@@ -1,84 +1,25 @@
1
- /**
2
- * Derives a locale-aware date format string suitable for use in input masks. This helper exposes the internal AuroInputUtilities locale logic in a simple function form.
3
- *
4
- * @param {string} locale - BCP 47 language tag used to determine the date format (e.g. "en-US", "fr-FR").
5
- * @returns {string} A lowercase date format mask string corresponding to the provided locale.
6
- */
7
- export function getDateFormatFromLocale(locale: string): string;
8
1
  export class AuroInputUtilities {
9
- /**
10
- * Creates an instance of AuroInputUtilities.
11
- * @param {object} config - Configuration object for the utilities.
12
- * @param {string} config.locale - BCP 47 language tag (e.g. "en-US", "fr-FR", "ja-JP").
13
- * @param {string} config.format - Optional Date format override string.
14
- */
15
- constructor(config?: {
16
- locale: string;
17
- format: string;
18
- });
19
- locale: string;
20
- overrideFormat: string;
21
- formatter: Intl.DateTimeFormat;
22
- /**
23
- * Generates a date mask based on the provided locale.
24
- * @param {string} [locale] - BCP 47 language tag (e.g. "en-US", "fr-FR", "ja-JP").
25
- * @returns {string}
26
- */
27
- getDateMaskFromLocale(locale?: string): string;
28
- /**
29
- * Parses a date string using the provided mask.
30
- * @private
31
- * @param {string} dateString - The date string to parse.
32
- * @param {string} mask - The date mask to use for parsing.
33
- * @returns {string}
34
- */
35
- private parseDateByMask;
36
2
  /**
37
3
  * Configures the mask to be used on the input element based on format and/or type.
38
4
  * IMask tool documentation: https://imask.js.org/.
39
5
  * @private
40
6
  * @param {string} type - The input type.
41
7
  * @param {string} format - The format of the mask to apply.
42
- * @returns {object} - The mask options object.
43
- */
44
- private getMaskOptions;
45
- /**
46
- * Updates the date format override.
47
- * @param {string} newFormat - New date format string.
48
8
  * @returns {void}
49
9
  */
50
- updateFormat(newFormat: string): void;
51
- /**
52
- * Converts an IMask-style date mask to a date-fns compatible format string.
53
- * @param {string} mask - IMask date mask (e.g. "MM/DD/YYYY").
54
- * @returns {string} date-fns format string (e.g. "MM/dd/yyyy").
55
- */
56
- toDateFnsMask(mask: string): string;
57
- /**
58
- * Determines if the given type and format combination represents a full year/month/day date.
59
- * @private
60
- * @param {string} type - The input type.
61
- * @param {string} format - The date format string.
62
- * @returns {boolean}
63
- */
64
- private isFullDateFormat;
10
+ private getMaskOptions;
65
11
  /**
66
- * Converts a display string to its model value.
67
- * For full date formats, converts the display string to an ISO date string.
68
12
  * @private
69
- * @param {string} inputValue - String from the rendered input.
70
- * @param {string} format - The date format string.
71
- * @returns {string}
13
+ * @param {string} dateStr - Date string to format.
14
+ * @param {string} format - Date format to use.
15
+ * @returns {void}
72
16
  */
73
- private toModelValue;
17
+ private toNorthAmericanFormat;
74
18
  /**
75
- * Converts a model value to a display value for the input element.
76
- * For full date formats, converts an ISO model value to the configured display format.
77
19
  * @private
78
- * @param {string} value - The model value (ISO string for date types).
79
- * @param {Date|undefined} valueObject - Date object representation of value.
80
- * @param {string} format - The date format string.
81
- * @returns {string}
20
+ * @param {string} dateStr - Date string to parse.
21
+ * @param {string} format - Date format to parse.
22
+ * @returns {void}
82
23
  */
83
- private toFormattedValue;
24
+ private parseDate;
84
25
  }
@@ -495,6 +495,415 @@ var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75r
495
495
 
496
496
  var colorCss$1 = i$5`:host legend{color:var(--ds-auro-radio-group-label-color)}:host([disabled]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]),:host([appearance=inverse]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-radio-group-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
497
497
 
498
+ class DateFormatter {
499
+
500
+ constructor() {
501
+
502
+ /**
503
+ * @description Parses a date string into its components.
504
+ * @param {string} dateStr - Date string to parse.
505
+ * @param {string} format - Date format to parse.
506
+ * @returns {Object<key["month" | "day" | "year"]: number>|undefined}
507
+ */
508
+ this.parseDate = (dateStr, format = 'mm/dd/yyyy') => {
509
+
510
+ // Guard Clause: Date string is defined
511
+ if (!dateStr) {
512
+ return undefined;
513
+ }
514
+
515
+ // Assume the separator is a "/" a defined in our code base
516
+ const separator = '/';
517
+
518
+ // Get the parts of the date and format
519
+ const valueParts = dateStr.split(separator);
520
+ const formatParts = format.split(separator);
521
+
522
+ // Check if the value and format have the correct number of parts
523
+ if (valueParts.length !== formatParts.length) {
524
+ throw new Error('AuroDatepickerUtilities | parseDate: Date string and format length do not match');
525
+ }
526
+
527
+ // Holds the result to be returned
528
+ const result = formatParts.reduce((acc, part, index) => {
529
+ const value = valueParts[index];
530
+
531
+ if ((/m/iu).test(part)) {
532
+ acc.month = value;
533
+ } else if ((/d/iu).test(part)) {
534
+ acc.day = value;
535
+ } else if ((/y/iu).test(part)) {
536
+ acc.year = value;
537
+ }
538
+
539
+ return acc;
540
+ }, {});
541
+
542
+ // If we found all the parts, return the result
543
+ if (result.month && result.year) {
544
+ return result;
545
+ }
546
+
547
+ // Throw an error to let the dev know we were unable to parse the date string
548
+ throw new Error('AuroDatepickerUtilities | parseDate: Unable to parse date string');
549
+ };
550
+
551
+ /**
552
+ * Convert a date object to string format.
553
+ * @param {Object} date - Date to convert to string.
554
+ * @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
555
+ * @returns {String} Returns the date as a string.
556
+ */
557
+ this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
558
+ year: "numeric",
559
+ month: "2-digit",
560
+ day: "2-digit",
561
+ });
562
+
563
+ /**
564
+ * Converts a date string to a North American date format.
565
+ * @param {String} dateStr - Date to validate.
566
+ * @param {String} format - Date format to validate against.
567
+ * @returns {Boolean}
568
+ */
569
+ this.toNorthAmericanFormat = (dateStr, format) => {
570
+
571
+ if (format === 'mm/dd/yyyy') {
572
+ return dateStr;
573
+ }
574
+
575
+ const parsedDate = this.parseDate(dateStr, format);
576
+
577
+ if (!parsedDate) {
578
+ throw new Error('AuroDatepickerUtilities | toNorthAmericanFormat: Unable to parse date string');
579
+ }
580
+
581
+ const { month, day, year } = parsedDate;
582
+
583
+ const dateParts = [];
584
+ if (month) {
585
+ dateParts.push(month);
586
+ }
587
+
588
+ if (day) {
589
+ dateParts.push(day);
590
+ }
591
+
592
+ if (year) {
593
+ dateParts.push(year);
594
+ }
595
+
596
+ return dateParts.join('/');
597
+ };
598
+ }
599
+ }
600
+ const dateFormatter = new DateFormatter();
601
+
602
+ // filepath: dateConstraints.mjs
603
+ const DATE_UTIL_CONSTRAINTS = {
604
+ maxDay: 31,
605
+ maxMonth: 12,
606
+ maxYear: 2400,
607
+ minDay: 1,
608
+ minMonth: 1,
609
+ minYear: 1900,
610
+ };
611
+
612
+ class AuroDateUtilitiesBase {
613
+
614
+ /**
615
+ * @description The maximum day value allowed by the various utilities in this class.
616
+ * @readonly
617
+ * @type {Number}
618
+ */
619
+ get maxDay() {
620
+ return DATE_UTIL_CONSTRAINTS.maxDay;
621
+ }
622
+
623
+ /**
624
+ * @description The maximum month value allowed by the various utilities in this class.
625
+ * @readonly
626
+ * @type {Number}
627
+ */
628
+ get maxMonth() {
629
+ return DATE_UTIL_CONSTRAINTS.maxMonth;
630
+ }
631
+
632
+ /**
633
+ * @description The maximum year value allowed by the various utilities in this class.
634
+ * @readonly
635
+ * @type {Number}
636
+ */
637
+ get maxYear() {
638
+ return DATE_UTIL_CONSTRAINTS.maxYear;
639
+ }
640
+
641
+ /**
642
+ * @description The minimum day value allowed by the various utilities in this class.
643
+ * @readonly
644
+ * @type {Number}
645
+ */
646
+ get minDay() {
647
+ return DATE_UTIL_CONSTRAINTS.minDay;
648
+ }
649
+
650
+ /**
651
+ * @description The minimum month value allowed by the various utilities in this class.
652
+ * @readonly
653
+ * @type {Number}
654
+ */
655
+ get minMonth() {
656
+ return DATE_UTIL_CONSTRAINTS.minMonth;
657
+ }
658
+
659
+ /**
660
+ * @description The minimum year value allowed by the various utilities in this class.
661
+ * @readonly
662
+ * @type {Number}
663
+ */
664
+ get minYear() {
665
+ return DATE_UTIL_CONSTRAINTS.minYear;
666
+ }
667
+ }
668
+
669
+ /* eslint-disable no-magic-numbers */
670
+
671
+ class AuroDateUtilities extends AuroDateUtilitiesBase {
672
+
673
+ /**
674
+ * Returns the current century.
675
+ * @returns {String} The current century.
676
+ */
677
+ getCentury () {
678
+ return String(new Date().getFullYear()).slice(0, 2);
679
+ }
680
+
681
+ /**
682
+ * Returns a four digit year.
683
+ * @param {String} year - The year to convert to four digits.
684
+ * @returns {String} The four digit year.
685
+ */
686
+ getFourDigitYear (year) {
687
+
688
+ const strYear = String(year).trim();
689
+ return strYear.length <= 2 ? this.getCentury() + strYear : strYear;
690
+ }
691
+
692
+ constructor() {
693
+
694
+ super();
695
+
696
+ /**
697
+ * Compares two dates to see if they match.
698
+ * @param {Object} date1 - First date to compare.
699
+ * @param {Object} date2 - Second date to compare.
700
+ * @returns {Boolean} Returns true if the dates match.
701
+ */
702
+ this.datesMatch = (date1, date2) => new Date(date1).getTime() === new Date(date2).getTime();
703
+
704
+ /**
705
+ * Returns true if value passed in is a valid date.
706
+ * @param {String} date - Date to validate.
707
+ * @param {String} format - Date format to validate against.
708
+ * @returns {Boolean}
709
+ */
710
+ this.validDateStr = (date, format) => {
711
+
712
+ // The length we expect the date string to be
713
+ const dateStrLength = format.length;
714
+
715
+ // Guard Clause: Date and format are defined
716
+ if (typeof date === "undefined" || typeof format === "undefined") {
717
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Date and format are required');
718
+ }
719
+
720
+ // Guard Clause: Date should be of type string
721
+ if (typeof date !== "string") {
722
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Date must be a string');
723
+ }
724
+
725
+ // Guard Clause: Format should be of type string
726
+ if (typeof format !== "string") {
727
+ throw new Error('AuroDatepickerUtilities | validateDateStr: Format must be a string');
728
+ }
729
+
730
+ // Guard Clause: Length is what we expect it to be
731
+ if (date.length !== dateStrLength) {
732
+ return false;
733
+ }
734
+ // Get a formatted date string and parse it
735
+ const dateParts = dateFormatter.parseDate(date, format);
736
+
737
+ // Guard Clause: Date parse succeeded
738
+ if (!dateParts) {
739
+ return false;
740
+ }
741
+
742
+ // Create the expected date string based on the date parts
743
+ const expectedDateStr = `${dateParts.month}/${dateParts.day || "01"}/${this.getFourDigitYear(dateParts.year)}`;
744
+
745
+ // Generate a date object that we will extract a string date from to compare to the passed in date string
746
+ const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
747
+
748
+ // Get the date string of the date object we created from the string date
749
+ const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
750
+
751
+ // Guard Clause: Generated date matches date string input
752
+ if (expectedDateStr !== actualDateStr) {
753
+ return false;
754
+ }
755
+
756
+ // If we passed all other checks, we can assume the date is valid
757
+ return true;
758
+ };
759
+
760
+ /**
761
+ * Determines if a string date value matches the format provided.
762
+ * @param {string} value = The date string value.
763
+ * @param { string} format = The date format to match against.
764
+ * @returns {boolean}
765
+ */
766
+ this.dateAndFormatMatch = (value, format) => {
767
+
768
+ // Ensure we have both values we need to do the comparison
769
+ if (!value || !format) {
770
+ throw new Error('AuroFormValidation | dateFormatMatch: value and format are required');
771
+ }
772
+
773
+ // If the lengths are different, they cannot match
774
+ if (value.length !== format.length) {
775
+ return false;
776
+ }
777
+
778
+ // Get the parts of the date
779
+ const dateParts = dateFormatter.parseDate(value, format);
780
+
781
+ // Validator for day
782
+ const dayValueIsValid = (day) => {
783
+
784
+ // Guard clause: if there is no day in the dateParts, we can ignore this check.
785
+ if (!dateParts.day) {
786
+ return true;
787
+ }
788
+
789
+ // Guard clause: ensure day exists.
790
+ if (!day) {
791
+ return false;
792
+ }
793
+
794
+ // Convert day to number
795
+ const numDay = Number.parseInt(day, 10);
796
+
797
+ // Guard clause: ensure day is a valid integer
798
+ if (Number.isNaN(numDay)) {
799
+ throw new Error('AuroDatepickerUtilities | dayValueIsValid: Unable to parse day value integer');
800
+ }
801
+
802
+ // Guard clause: ensure day is within the valid range
803
+ if (numDay < this.minDay || numDay > this.maxDay) {
804
+ return false;
805
+ }
806
+
807
+ // Default return
808
+ return true;
809
+ };
810
+
811
+ // Validator for month
812
+ const monthValueIsValid = (month) => {
813
+
814
+ // Guard clause: ensure month exists.
815
+ if (!month) {
816
+ return false;
817
+ }
818
+
819
+ // Convert month to number
820
+ const numMonth = Number.parseInt(month, 10);
821
+
822
+ // Guard clause: ensure month is a valid integer
823
+ if (Number.isNaN(numMonth)) {
824
+ throw new Error('AuroDatepickerUtilities | monthValueIsValid: Unable to parse month value integer');
825
+ }
826
+
827
+ // Guard clause: ensure month is within the valid range
828
+ if (numMonth < this.minMonth || numMonth > this.maxMonth) {
829
+ return false;
830
+ }
831
+
832
+ // Default return
833
+ return true;
834
+ };
835
+
836
+ // Validator for year
837
+ const yearIsValid = (_year) => {
838
+
839
+ // Guard clause: ensure year exists.
840
+ if (!_year) {
841
+ return false;
842
+ }
843
+
844
+ // Get the full year
845
+ const year = this.getFourDigitYear(_year);
846
+
847
+ // Convert year to number
848
+ const numYear = Number.parseInt(year, 10);
849
+
850
+ // Guard clause: ensure year is a valid integer
851
+ if (Number.isNaN(numYear)) {
852
+ throw new Error('AuroDatepickerUtilities | yearValueIsValid: Unable to parse year value integer');
853
+ }
854
+
855
+ // Guard clause: ensure year is within the valid range
856
+ if (numYear < this.minYear || numYear > this.maxYear) {
857
+ return false;
858
+ }
859
+
860
+ // Default return
861
+ return true;
862
+ };
863
+
864
+ // Self-contained checks for month, day, and year
865
+ const checks = [
866
+ monthValueIsValid(dateParts.month),
867
+ dayValueIsValid(dateParts.day),
868
+ yearIsValid(dateParts.year)
869
+ ];
870
+
871
+ // If any of the checks failed, the date format does not match and the result is invalid
872
+ const isValid = checks.every((check) => check === true);
873
+
874
+ // If the check is invalid, return false
875
+ if (!isValid) {
876
+ return false;
877
+ }
878
+
879
+ // Default case
880
+ return true;
881
+ };
882
+ }
883
+ }
884
+
885
+ // Export a class instance
886
+ const dateUtilities = new AuroDateUtilities();
887
+
888
+ // Export the class instance methods individually
889
+ const {
890
+ datesMatch,
891
+ validDateStr,
892
+ dateAndFormatMatch,
893
+ minDay,
894
+ minMonth,
895
+ minYear,
896
+ maxDay,
897
+ maxMonth,
898
+ maxYear
899
+ } = dateUtilities;
900
+
901
+ const {
902
+ toNorthAmericanFormat,
903
+ parseDate,
904
+ getDateAsString
905
+ } = dateFormatter;
906
+
498
907
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
499
908
  // See LICENSE in the project root for license information.
500
909
 
@@ -636,7 +1045,7 @@ class AuroFormValidation {
636
1045
  validity: 'valueMissing',
637
1046
  message: e => e.getAttribute('setCustomValidityValueMissingFilter') || e.setCustomValidity || ''
638
1047
  }
639
- ]
1048
+ ]
640
1049
  }
641
1050
  };
642
1051
 
@@ -701,12 +1110,12 @@ class AuroFormValidation {
701
1110
 
702
1111
  // Guard Clause: if the value is too short
703
1112
  if (elem.value?.length < elem.lengthForType) {
704
-
1113
+
705
1114
  elem.validity = 'tooShort';
706
1115
  elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
707
1116
  return;
708
- }
709
-
1117
+ }
1118
+
710
1119
  // Guard Clause: If the value is too long for the type
711
1120
  if (elem.value?.length > elem.lengthForType) {
712
1121
 
@@ -714,20 +1123,31 @@ class AuroFormValidation {
714
1123
  elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
715
1124
  return;
716
1125
  }
717
-
718
- // Validate that the date passed was the correct format and is a valid date
719
- if (elem.value && !elem.valueObject) {
1126
+
1127
+ // Validate that the date passed was the correct format
1128
+ if (!dateAndFormatMatch(elem.value, elem.format)) {
720
1129
  elem.validity = 'patternMismatch';
721
- elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
1130
+ elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || 'Invalid Date Format Entered';
1131
+ return;
1132
+ }
1133
+
1134
+ // Validate that the date passed was a valid date
1135
+ if (!validDateStr(elem.value, elem.format)) {
1136
+ elem.validity = 'invalidDate';
1137
+ elem.errorMessage = elem.setCustomValidityInvalidDate || elem.setCustomValidity || 'Invalid Date Entered';
722
1138
  return;
723
1139
  }
724
1140
 
725
1141
  // Perform the rest of the validation
1142
+ const formattedValue = toNorthAmericanFormat(elem.value, elem.format);
1143
+ const valueDate = new Date(formattedValue);
726
1144
 
727
1145
  // // Validate max date
728
1146
  if (elem.max?.length === elem.lengthForType) {
729
1147
 
730
- if (elem.valueObject > elem.maxObject) {
1148
+ const maxDate = new Date(toNorthAmericanFormat(elem.max, elem.format));
1149
+
1150
+ if (valueDate > maxDate) {
731
1151
  elem.validity = 'rangeOverflow';
732
1152
  elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
733
1153
  return;
@@ -736,7 +1156,9 @@ class AuroFormValidation {
736
1156
 
737
1157
  // Validate min date
738
1158
  if (elem.min?.length === elem.lengthForType) {
739
- if (elem.valueObject < elem.minObject) {
1159
+ const minDate = new Date(toNorthAmericanFormat(elem.min, elem.format));
1160
+
1161
+ if (valueDate < minDate) {
740
1162
  elem.validity = 'rangeUnderflow';
741
1163
  elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
742
1164
  return;
@@ -796,7 +1218,7 @@ class AuroFormValidation {
796
1218
  if (typeof elem.value === "string") {
797
1219
  hasValue = elem.value && elem.value.length > 0;
798
1220
  }
799
-
1221
+
800
1222
  if (typeof elem.value === "boolean") {
801
1223
  hasValue = elem.value || elem.value === false;
802
1224
  }
@@ -821,7 +1243,7 @@ class AuroFormValidation {
821
1243
  }
822
1244
 
823
1245
  const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
824
-
1246
+
825
1247
  if (isCombobox) {
826
1248
 
827
1249
  if (!elem.persistInput || elem.behavior === "filter") {
@@ -861,7 +1283,7 @@ class AuroFormValidation {
861
1283
  }
862
1284
 
863
1285
  // multiple input in one components (datepicker)
864
- // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
1286
+ // combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
865
1287
  if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !isCombobox) {
866
1288
  elem.validity = this.auroInputElements[1].validity;
867
1289
  elem.errorMessage = this.auroInputElements[1].errorMessage;
@@ -1212,7 +1634,7 @@ class AuroHelpText extends i$2 {
1212
1634
  }
1213
1635
  }
1214
1636
 
1215
- var formkitVersion = '202605271944';
1637
+ var formkitVersion = '202605292307';
1216
1638
 
1217
1639
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1218
1640
  // See LICENSE in the project root for license information.