@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.
Files changed (50) 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 +257 -16
  16. package/components/datepicker/demo/index.min.js +257 -16
  17. package/components/datepicker/dist/auro-calendar-cell.d.ts +17 -0
  18. package/components/datepicker/dist/auro-calendar.d.ts +43 -3
  19. package/components/datepicker/dist/index.js +257 -16
  20. package/components/datepicker/dist/registered.js +257 -16
  21. package/components/dropdown/demo/customize.min.js +18 -1
  22. package/components/dropdown/demo/getting-started.min.js +18 -1
  23. package/components/dropdown/demo/index.min.js +18 -1
  24. package/components/dropdown/dist/index.js +18 -1
  25. package/components/dropdown/dist/registered.js +18 -1
  26. package/components/form/demo/customize.min.js +530 -43
  27. package/components/form/demo/getting-started.min.js +530 -43
  28. package/components/form/demo/index.min.js +530 -43
  29. package/components/form/demo/registerDemoDeps.min.js +530 -43
  30. package/components/input/demo/api.md +58 -57
  31. package/components/input/demo/customize.min.js +72 -7
  32. package/components/input/demo/getting-started.min.js +72 -7
  33. package/components/input/demo/index.min.js +72 -7
  34. package/components/input/dist/base-input.d.ts +9 -3
  35. package/components/input/dist/index.js +72 -7
  36. package/components/input/dist/registered.js +72 -7
  37. package/components/input/dist/utilities.d.ts +9 -0
  38. package/components/radio/demo/customize.min.js +15 -2
  39. package/components/radio/demo/getting-started.min.js +15 -2
  40. package/components/radio/demo/index.min.js +15 -2
  41. package/components/radio/dist/index.js +15 -2
  42. package/components/radio/dist/registered.js +15 -2
  43. package/components/select/demo/customize.md +6 -4
  44. package/components/select/demo/customize.min.js +33 -3
  45. package/components/select/demo/getting-started.min.js +33 -3
  46. package/components/select/demo/index.min.js +33 -3
  47. package/components/select/dist/index.js +33 -3
  48. package/components/select/dist/registered.js +33 -3
  49. package/custom-elements.json +1622 -1520
  50. package/package.json +1 -1
@@ -542,8 +542,21 @@ let AuroFormValidation$1 = class AuroFormValidation {
542
542
  return;
543
543
  }
544
544
 
545
- // Validate that the date passed was the correct format and is a valid date
545
+ // Validate that the date passed was the correct format and is a valid date.
546
+ // For partial date formats, valueObject is never populated; validate them directly.
546
547
  if (elem.value && !elem.valueObject) {
548
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
549
+
550
+ if (isPartialDateFormat) {
551
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
552
+ elem.validity = 'patternMismatch';
553
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
554
+ }
555
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
556
+ return;
557
+ }
558
+
559
+ // Full date format with no valueObject means the value is not a valid calendar date.
547
560
  elem.validity = 'patternMismatch';
548
561
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
549
562
  return;
@@ -10396,10 +10409,11 @@ let AuroInputUtilities$1 = class AuroInputUtilities {
10396
10409
  const dateFormat = format || this.overrideFormat || pattern || 'mm/dd/yyyy';
10397
10410
 
10398
10411
  if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
10399
- const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 9999);
10412
+ const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
10413
+ const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
10400
10414
  return {
10401
10415
  mask: IMask$1.MaskedRange,
10402
- from: 1,
10416
+ from: fromValue,
10403
10417
  to: maxValue,
10404
10418
  lazy: true,
10405
10419
  placeholderChar: '',
@@ -10407,7 +10421,8 @@ let AuroInputUtilities$1 = class AuroInputUtilities {
10407
10421
  return value.toString().padStart(dateFormat.length, '0');
10408
10422
  },
10409
10423
  parse(str) {
10410
- return parseInt(str) || null;
10424
+ const num = parseInt(str, 10);
10425
+ return isNaN(num) ? null : num;
10411
10426
  }
10412
10427
  };
10413
10428
  }
@@ -10471,6 +10486,49 @@ let AuroInputUtilities$1 = class AuroInputUtilities {
10471
10486
  return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
10472
10487
  }
10473
10488
 
10489
+ /**
10490
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
10491
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
10492
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
10493
+ * @param {string} value - The user-facing display value.
10494
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
10495
+ * @returns {boolean}
10496
+ */
10497
+ isValidPartialDate(value, format) {
10498
+ if (!value || !format) {
10499
+ return false;
10500
+ }
10501
+ const normalizedFormat = format.toLowerCase();
10502
+
10503
+ if (normalizedFormat === 'dd') {
10504
+ const num = Number(value);
10505
+ return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
10506
+ }
10507
+ if (normalizedFormat === 'yy') {
10508
+ const num = Number(value);
10509
+ return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
10510
+ }
10511
+ if (normalizedFormat === 'yyyy') {
10512
+ const num = Number(value);
10513
+ return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
10514
+ }
10515
+
10516
+ const dateFnsMask = this.toDateFnsMask(normalizedFormat);
10517
+ // Use the 1st of the current month as the reference so that formats
10518
+ // omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
10519
+ const referenceDate = new Date();
10520
+ referenceDate.setDate(1);
10521
+ const parsed = parse$1(value, dateFnsMask, referenceDate);
10522
+ if (!isValid$1(parsed) || format$1(parsed, dateFnsMask) !== value) {
10523
+ return false;
10524
+ }
10525
+ if (normalizedFormat.includes('yyyy')) {
10526
+ const year = parsed.getFullYear();
10527
+ return year >= 1900 && year <= 2100;
10528
+ }
10529
+ return true;
10530
+ }
10531
+
10474
10532
  /**
10475
10533
  * Converts a display string to its model value.
10476
10534
  * For full date formats, converts the display string to an ISO date string.
@@ -12400,6 +12458,41 @@ class AuroCalendarCell extends LitElement {
12400
12458
  btn.classList.remove('inRange', 'lastHoveredDate', 'rangeDepartDate');
12401
12459
  }
12402
12460
 
12461
+ /**
12462
+ * Re-applies the committed-range classes (inRange / rangeDepartDate /
12463
+ * rangeReturnDate) imperatively from the cell's current `day`,
12464
+ * `dateFrom`, and `dateTo`. Used after month navigation flushes:
12465
+ * classMap in `renderCellButton` tracks its own previous state, so a
12466
+ * preceding imperative `classList.remove` (from
12467
+ * `clearRangePreviewClasses`) leaves classMap thinking the class is
12468
+ * still applied. On re-render with the same class-value, classMap emits
12469
+ * no delta and the class stays missing in the DOM. Re-toggling
12470
+ * imperatively resyncs the DOM with the committed range.
12471
+ *
12472
+ * Delegates to the same `isInRange` / `isDepartDate` / `isReturnDate`
12473
+ * helpers `renderCellButton` uses, so the two code paths cannot drift
12474
+ * (including whatever timestamp normalization those helpers apply).
12475
+ * @returns {void}
12476
+ */
12477
+ applyCommittedRangeClasses() {
12478
+ if (!this.day) return;
12479
+ // Fall back to a shadowRoot query when `_cachedButton` hasn't
12480
+ // populated yet — this method's whole job is recovering from stale
12481
+ // DOM after a month re-render, so no-oping on a cache miss defeats
12482
+ // the fix (mirrors the fallback in `clearActive()`).
12483
+ const btn = this._cachedButton || this.shadowRoot?.querySelector('button.day');
12484
+ if (!btn) return;
12485
+
12486
+ const hasRange = this.datepicker?.hasAttribute('range');
12487
+ const inRange = hasRange && this.dateTo && this.isInRange(this.day, this.dateFrom, this.dateTo);
12488
+ const isDepart = hasRange && this.isDepartDate(this.day, this.dateFrom) && this.dateTo;
12489
+ const isReturn = hasRange && this.isReturnDate(this.day, this.dateFrom, this.dateTo);
12490
+
12491
+ btn.classList.toggle('inRange', Boolean(inRange));
12492
+ btn.classList.toggle('rangeDepartDate', Boolean(isDepart));
12493
+ btn.classList.toggle('rangeReturnDate', Boolean(isReturn));
12494
+ }
12495
+
12403
12496
  renderCellButton() {
12404
12497
  const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
12405
12498
  const blackout = this.isBlackout();
@@ -13544,7 +13637,7 @@ class AuroBibtemplate extends LitElement {
13544
13637
  }
13545
13638
  }
13546
13639
 
13547
- var formkitVersion$2 = '202607011843';
13640
+ var formkitVersion$2 = '202607012057';
13548
13641
 
13549
13642
  let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=literal`${unsafeStatic(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1=css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
13550
13643
  `,u$4=css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
@@ -13889,6 +13982,11 @@ class AuroCalendar extends RangeDatepicker {
13889
13982
  if (!opts.skipActiveUpdate) {
13890
13983
  this.updateActiveCellForVisibleMonth();
13891
13984
  }
13985
+ // clearRangePreview above strips classMap-managed range classes from
13986
+ // the DOM; classMap's private state still thinks they're applied, so
13987
+ // it won't re-add them on the post-nav re-render. Re-apply imperatively
13988
+ // after both months and their cell button caches have settled.
13989
+ this.scheduleCommittedRangeClassRefresh();
13892
13990
  this.announceMonthChange();
13893
13991
  }
13894
13992
 
@@ -13907,6 +14005,11 @@ class AuroCalendar extends RangeDatepicker {
13907
14005
  if (!opts.skipActiveUpdate) {
13908
14006
  this.updateActiveCellForVisibleMonth();
13909
14007
  }
14008
+ // clearRangePreview above strips classMap-managed range classes from
14009
+ // the DOM; classMap's private state still thinks they're applied, so
14010
+ // it won't re-add them on the post-nav re-render. Re-apply imperatively
14011
+ // after both months and their cell button caches have settled.
14012
+ this.scheduleCommittedRangeClassRefresh();
13910
14013
  this.announceMonthChange();
13911
14014
  }
13912
14015
 
@@ -14985,9 +15088,14 @@ class AuroCalendar extends RangeDatepicker {
14985
15088
  * @private
14986
15089
  * @param {Object} [options] - Optional settings.
14987
15090
  * @param {boolean} [options.force=false] - When true, clears classes even
14988
- * when both dateFrom and dateTo are set. Used by month nav handlers
14989
- * since the subsequent re-render re-applies classMap-managed classes,
14990
- * while `lastHoveredDate` (not in classMap) would otherwise persist.
15091
+ * when both dateFrom and dateTo are set. Used by month nav handlers to
15092
+ * strip the imperative-only `lastHoveredDate` before the re-render.
15093
+ * The other two classes (`inRange`, `rangeDepartDate`) are classMap-
15094
+ * managed and get stripped as a side effect here; because classMap
15095
+ * remembers what it last emitted and does not diff against the actual
15096
+ * DOM, the following month re-render will NOT re-add them on its own.
15097
+ * Nav handlers must schedule `refreshCommittedRangeClasses` (via
15098
+ * `scheduleCommittedRangeClassRefresh`) to resync them.
14991
15099
  * @returns {void}
14992
15100
  */
14993
15101
  clearRangePreview(options) {
@@ -15002,6 +15110,57 @@ class AuroCalendar extends RangeDatepicker {
15002
15110
  });
15003
15111
  }
15004
15112
 
15113
+ /**
15114
+ * Re-applies the committed-range classes across every focusable cell
15115
+ * after a month navigation. classMap in the cell tracks its own
15116
+ * previous state: once `clearRangePreview({ force: true })` strips
15117
+ * `inRange`/`rangeDepartDate` imperatively before the re-render,
15118
+ * classMap's next diff sees the same class-value it emitted before and
15119
+ * produces no delta, leaving the DOM without the classes even though a
15120
+ * full range is committed. Re-applying imperatively resyncs the two
15121
+ * months' cells with `dateFrom`/`dateTo`.
15122
+ *
15123
+ * Iterates `getAllFocusableCells()` — out-of-range cells (blocked by
15124
+ * `min`/`max`) can never carry range classes anyway, so skipping them
15125
+ * is correct and cheaper than a whole-grid walk.
15126
+ *
15127
+ * The cell's `applyCommittedRangeClasses` reuses the same
15128
+ * `isInRange`/`isDepartDate`/`isReturnDate` helpers `renderCellButton`
15129
+ * uses, so we don't parse dateFrom/dateTo here — the helpers already
15130
+ * normalize their inputs (midnight-truncation, string→int) internally.
15131
+ * @private
15132
+ * @returns {void}
15133
+ */
15134
+ refreshCommittedRangeClasses() {
15135
+ if (this.noRange || !this.dateFrom || !this.dateTo) {
15136
+ return;
15137
+ }
15138
+
15139
+ const allCells = this.getAllFocusableCells();
15140
+ allCells.forEach((cell) => {
15141
+ cell.applyCommittedRangeClasses();
15142
+ });
15143
+ }
15144
+
15145
+ /**
15146
+ * Schedules `refreshCommittedRangeClasses` to run after the month
15147
+ * re-render has flushed and the cells' button caches have refreshed.
15148
+ * Both `handlePrevMonth` and `handleNextMonth` need this exact call
15149
+ * shape; keeping it in one place prevents them from drifting apart.
15150
+ *
15151
+ * Bails synchronously when a full committed range isn't set — otherwise
15152
+ * every prev/next click in single-date mode (or before the user picks
15153
+ * both dates in range mode) pays for an unused double-rAF hop.
15154
+ * @private
15155
+ * @returns {void}
15156
+ */
15157
+ scheduleCommittedRangeClassRefresh() {
15158
+ if (this.noRange || !this.dateFrom || !this.dateTo) {
15159
+ return;
15160
+ }
15161
+ this._afterMonthRender(() => this.refreshCommittedRangeClasses());
15162
+ }
15163
+
15005
15164
  /**
15006
15165
  * Overrides the base class handler to prevent setting `this.hoveredDate`
15007
15166
  * as a reactive property. Instead, handles the range preview imperatively.
@@ -19296,7 +19455,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
19296
19455
  }
19297
19456
  };
19298
19457
 
19299
- var formkitVersion$1 = '202607011843';
19458
+ var formkitVersion$1 = '202607012057';
19300
19459
 
19301
19460
  let AuroElement$2 = class AuroElement extends LitElement {
19302
19461
  static get properties() {
@@ -20048,6 +20207,23 @@ class AuroDropdown extends AuroElement$2 {
20048
20207
  if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
20049
20208
  this.trigger.focus();
20050
20209
  }
20210
+
20211
+
20212
+ if (!this.isPopoverVisible) {
20213
+ // wait til the bib gets fully closed and rendered
20214
+ setTimeout(() => {
20215
+ // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
20216
+ // Restore focus to trigger when focus is still inside the bib (:focus-within) or fell to body.
20217
+ if (this.isPopoverVisible ||
20218
+ // eslint-disable-next-line no-extra-parens
20219
+ (!this.bibContent?.matches(':focus-within') &&
20220
+ document.activeElement !== document.body)) {
20221
+ return;
20222
+ }
20223
+ // Restore focus to the trigger.
20224
+ this.trigger.focus();
20225
+ });
20226
+ }
20051
20227
  }
20052
20228
 
20053
20229
  firstUpdated() {
@@ -24973,8 +25149,21 @@ class AuroFormValidation {
24973
25149
  return;
24974
25150
  }
24975
25151
 
24976
- // Validate that the date passed was the correct format and is a valid date
25152
+ // Validate that the date passed was the correct format and is a valid date.
25153
+ // For partial date formats, valueObject is never populated; validate them directly.
24977
25154
  if (elem.value && !elem.valueObject) {
25155
+ const isPartialDateFormat = elem.util && !elem.util.isFullDateFormat(elem.type, elem.format);
25156
+
25157
+ if (isPartialDateFormat) {
25158
+ if (!elem.util.isValidPartialDate(elem.value, elem.format)) {
25159
+ elem.validity = 'patternMismatch';
25160
+ elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
25161
+ }
25162
+ // Partial date format — validate directly and skip max/min checks since valueObject is undefined.
25163
+ return;
25164
+ }
25165
+
25166
+ // Full date format with no valueObject means the value is not a valid calendar date.
24978
25167
  elem.validity = 'patternMismatch';
24979
25168
  elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || 'Invalid Date Format Entered';
24980
25169
  return;
@@ -30904,10 +31093,11 @@ class AuroInputUtilities {
30904
31093
  const dateFormat = format$1 || this.overrideFormat || pattern || 'mm/dd/yyyy';
30905
31094
 
30906
31095
  if (dateFormat === 'dd' || dateFormat === 'yy' || dateFormat === 'yyyy') {
30907
- const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 9999);
31096
+ const fromValue = dateFormat === 'yyyy' ? 1900 : (dateFormat === 'yy' ? 0 : 1);
31097
+ const maxValue = dateFormat === 'dd' ? 31 : (dateFormat === 'yy' ? 99 : 2100);
30908
31098
  return {
30909
31099
  mask: IMask.MaskedRange,
30910
- from: 1,
31100
+ from: fromValue,
30911
31101
  to: maxValue,
30912
31102
  lazy: true,
30913
31103
  placeholderChar: '',
@@ -30915,7 +31105,8 @@ class AuroInputUtilities {
30915
31105
  return value.toString().padStart(dateFormat.length, '0');
30916
31106
  },
30917
31107
  parse(str) {
30918
- return parseInt(str) || null;
31108
+ const num = parseInt(str, 10);
31109
+ return isNaN(num) ? null : num;
30919
31110
  }
30920
31111
  };
30921
31112
  }
@@ -30979,6 +31170,49 @@ class AuroInputUtilities {
30979
31170
  return type === 'date' && normalizedFormat.includes('yy') && normalizedFormat.includes('mm') && normalizedFormat.includes('dd');
30980
31171
  }
30981
31172
 
31173
+ /**
31174
+ * Validates a value against a partial date format (one that lacks yy/mm/dd all three).
31175
+ * Day- and year-only formats (dd/yy/yyyy) are checked as integer ranges; other partial formats use
31176
+ * a date-fns parse + round-trip to confirm both validity and exact formatting.
31177
+ * @param {string} value - The user-facing display value.
31178
+ * @param {string} format - The partial date format string (e.g. "mm/yyyy", "yyyy", "dd").
31179
+ * @returns {boolean}
31180
+ */
31181
+ isValidPartialDate(value, format$1) {
31182
+ if (!value || !format$1) {
31183
+ return false;
31184
+ }
31185
+ const normalizedFormat = format$1.toLowerCase();
31186
+
31187
+ if (normalizedFormat === 'dd') {
31188
+ const num = Number(value);
31189
+ return (/^\d{2}$/u).test(value) && num >= 1 && num <= 31;
31190
+ }
31191
+ if (normalizedFormat === 'yy') {
31192
+ const num = Number(value);
31193
+ return (/^\d{2}$/u).test(value) && num >= 0 && num <= 99;
31194
+ }
31195
+ if (normalizedFormat === 'yyyy') {
31196
+ const num = Number(value);
31197
+ return (/^\d{4}$/u).test(value) && num >= 1900 && num <= 2100;
31198
+ }
31199
+
31200
+ const dateFnsMask = this.toDateFnsMask(normalizedFormat);
31201
+ // Use the 1st of the current month as the reference so that formats
31202
+ // omitting a day (e.g. MM/yyyy) never roll over on days 29–31.
31203
+ const referenceDate = new Date();
31204
+ referenceDate.setDate(1);
31205
+ const parsed = parse(value, dateFnsMask, referenceDate);
31206
+ if (!isValid(parsed) || format(parsed, dateFnsMask) !== value) {
31207
+ return false;
31208
+ }
31209
+ if (normalizedFormat.includes('yyyy')) {
31210
+ const year = parsed.getFullYear();
31211
+ return year >= 1900 && year <= 2100;
31212
+ }
31213
+ return true;
31214
+ }
31215
+
30982
31216
  /**
30983
31217
  * Converts a display string to its model value.
30984
31218
  * For full date formats, converts the display string to an ISO date string.
@@ -31598,6 +31832,13 @@ class BaseInput extends AuroElement$1 {
31598
31832
  type: String
31599
31833
  },
31600
31834
 
31835
+ /**
31836
+ * Custom help text message to display when validity = `patternMismatch`.
31837
+ */
31838
+ setCustomValidityPatternMismatch: {
31839
+ type: String
31840
+ },
31841
+
31601
31842
  /**
31602
31843
  * Custom help text message to display when validity = `rangeOverflow`.
31603
31844
  */
@@ -31668,7 +31909,7 @@ class BaseInput extends AuroElement$1 {
31668
31909
 
31669
31910
  /**
31670
31911
  * Populates the `type` attribute on the input.
31671
- * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number'}
31912
+ * @type {'text' | 'password' | 'email' | 'credit-card' | 'tel' | 'number' | 'date'}
31672
31913
  * @default 'text'
31673
31914
  */
31674
31915
  type: {
@@ -31693,7 +31934,7 @@ class BaseInput extends AuroElement$1 {
31693
31934
 
31694
31935
  /**
31695
31936
  * Populates the `value` attribute on the input. Can also be read to retrieve the current value of the input.
31696
- * The format for this property should be ISO for `date` type inputs.
31937
+ * 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.
31697
31938
  */
31698
31939
  value: {
31699
31940
  type: String
@@ -32816,7 +33057,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
32816
33057
  }
32817
33058
  };
32818
33059
 
32819
- var formkitVersion = '202607011843';
33060
+ var formkitVersion = '202607012057';
32820
33061
 
32821
33062
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
32822
33063
  // See LICENSE in the project root for license information.