@aurodesignsystem-dev/auro-formkit 0.0.0-pr1509.1 → 0.0.0-pr1510.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.
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +3 -3
- package/components/combobox/demo/getting-started.min.js +3 -3
- package/components/combobox/demo/index.min.js +3 -3
- package/components/combobox/dist/index.js +3 -3
- package/components/combobox/dist/registered.js +3 -3
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/accessibility.md +2 -1
- package/components/datepicker/demo/api.md +63 -62
- package/components/datepicker/demo/customize.md +12 -1
- package/components/datepicker/demo/customize.min.js +455 -167
- package/components/datepicker/demo/index.min.js +455 -167
- package/components/datepicker/dist/index.js +455 -167
- package/components/datepicker/dist/registered.js +455 -167
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +14 -3
- package/components/datepicker/dist/src/auro-calendar.d.ts +87 -5
- package/components/datepicker/dist/src/auro-datepicker.d.ts +73 -3
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +471 -183
- package/components/form/demo/getting-started.min.js +471 -183
- package/components/form/demo/index.min.js +471 -183
- package/components/form/demo/registerDemoDeps.min.js +471 -183
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +2 -2
- package/components/select/demo/getting-started.min.js +2 -2
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1868 -1696
- package/package.json +2 -1
|
@@ -1356,7 +1356,7 @@ function normalizeDates$1(context, ...dates) {
|
|
|
1356
1356
|
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
1357
1357
|
* //=> Tue Sep 02 2014 00:00:00
|
|
1358
1358
|
*/
|
|
1359
|
-
function startOfDay$
|
|
1359
|
+
function startOfDay$1(date, options) {
|
|
1360
1360
|
const _date = toDate$1(date, options?.in);
|
|
1361
1361
|
_date.setHours(0, 0, 0, 0);
|
|
1362
1362
|
return _date;
|
|
@@ -1404,8 +1404,8 @@ function differenceInCalendarDays$1(laterDate, earlierDate, options) {
|
|
|
1404
1404
|
earlierDate,
|
|
1405
1405
|
);
|
|
1406
1406
|
|
|
1407
|
-
const laterStartOfDay = startOfDay$
|
|
1408
|
-
const earlierStartOfDay = startOfDay$
|
|
1407
|
+
const laterStartOfDay = startOfDay$1(laterDate_);
|
|
1408
|
+
const earlierStartOfDay = startOfDay$1(earlierDate_);
|
|
1409
1409
|
|
|
1410
1410
|
const laterTimestamp =
|
|
1411
1411
|
+laterStartOfDay - getTimezoneOffsetInMilliseconds$1(laterStartOfDay);
|
|
@@ -10862,8 +10862,8 @@ class RangeDatepickerCell extends LitElement {
|
|
|
10862
10862
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
10863
10863
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
10864
10864
|
if (day) {
|
|
10865
|
-
if (getTime(startOfDay$
|
|
10866
|
-
getTime(startOfDay$
|
|
10865
|
+
if (getTime(startOfDay$1(parsedDateTo * 1000)) / 1000 === day.date ||
|
|
10866
|
+
getTime(startOfDay$1(parsedDateFrom * 1000)) / 1000 === day.date) {
|
|
10867
10867
|
this.selected = true;
|
|
10868
10868
|
}
|
|
10869
10869
|
if (((hoveredDate === day.date || day.date < hoveredDate) &&
|
|
@@ -11051,7 +11051,7 @@ class RangeDatepickerCalendar extends LitElement {
|
|
|
11051
11051
|
this.dayNamesOfTheWeek = [];
|
|
11052
11052
|
this.daysOfMonth = [];
|
|
11053
11053
|
this._locale = null;
|
|
11054
|
-
this.currentDate = parseInt(format$1(startOfDay$
|
|
11054
|
+
this.currentDate = parseInt(format$1(startOfDay$1(Date.now()), 't'), 10);
|
|
11055
11055
|
this.localeChanged();
|
|
11056
11056
|
this.yearAndMonthChanged(this.year, this.month);
|
|
11057
11057
|
}
|
|
@@ -11525,7 +11525,7 @@ __decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "dayN
|
|
|
11525
11525
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
11526
11526
|
AuroLibraryRuntimeUtils$5.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
11527
11527
|
|
|
11528
|
-
var styleCss$5 = css`.body-default{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-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{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-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.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-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{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-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{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-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{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-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.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-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{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-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-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-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{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-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.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-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.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-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.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-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.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-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.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-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.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-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.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-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.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-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.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-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.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-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.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-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.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-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);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-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.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-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);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-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.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-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);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-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.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-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:48px;height:56px;padding:0;border-width:2px;border-style:solid;border-radius:10px;cursor:pointer;user-select:none}.day:focus-visible{outline:none;background-color:unset}.day.activeCell{outline-width:2px;outline-style:solid;outline-offset:-4px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:pointer}.day.reference:after{position:absolute;top:-2px;left:-2px;display:block;width:calc(100% + 2px);height:calc(100% + 2px);box-sizing:content-box;border-radius:10px;border-style:solid;border-width:1px;content:""}.day.inRange::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:""}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:10px 0 0 10px;overflow:hidden}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:0 10px 10px 0;overflow:hidden}.day.firstDayOfMonth::before{border-radius:10px 0 0 10px;overflow:hidden}.day.lastDayOfMonth::before{border-radius:0 10px 10px 0;overflow:hidden}.buttonWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.dateSlot{display:block}::slotted([slot^=date_]){width:100%;white-space:nowrap}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;height:100%}:host([renderForDateSlot]) .currentDayMarker{position:relative}`;
|
|
11528
|
+
var styleCss$5 = css`.body-default{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-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{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-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.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-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{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-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{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-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{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-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.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-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{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-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-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-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{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-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.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-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.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-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.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-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.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-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.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-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.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-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.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-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.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-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.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-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.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-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.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-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.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-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);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-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.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-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);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-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.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-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);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-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.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-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:48px;height:56px;padding:0;border-width:2px;border-style:solid;border-radius:10px;cursor:pointer;user-select:none}.day:focus-visible{outline:none;background-color:unset}.day.activeCell{outline-width:2px;outline-style:solid;outline-offset:-4px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:pointer}.day.reference:after{position:absolute;top:-2px;left:-2px;display:block;width:calc(100% + 2px);height:calc(100% + 2px);box-sizing:content-box;border-radius:10px;border-style:solid;border-width:1px;content:""}.day.inRange::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:""}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:10px 0 0 10px;overflow:hidden}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:0 10px 10px 0;overflow:hidden}.day.rangeDepartDate.lastHoveredDate::before{border-radius:10px}.day.firstDayOfMonth::before{border-radius:10px 0 0 10px;overflow:hidden}.day.lastDayOfMonth::before{border-radius:0 10px 10px 0;overflow:hidden}.buttonWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.dateSlot{display:block}::slotted([slot^=date_]){width:100%;white-space:nowrap}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;height:100%}:host([renderForDateSlot]) .currentDayMarker{position:relative}`;
|
|
11529
11529
|
|
|
11530
11530
|
var colorCss$5 = css`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar-cell-price-text-color)}:host ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success, #447a1f)}:host .day{border-color:var(--ds-auro-calendar-cell-border-color);background-color:var(--ds-auro-calendar-cell-container-color);color:var(--ds-auro-calendar-cell-text-color)}:host .day.activeCell:not(.selected){--ds-auro-calendar-cell-container-color: var(--ds-auro-calendar-cell-in-range-color);border-color:var(--ds-advanced-color-state-selected);outline-color:var(--ds-auro-calendar-cell-container-color)}:host .day.selected{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.selected ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host .day.selected:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected-hover, #00274a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.reference:after{border-color:var(--ds-basic-color-border-default, #959595);box-shadow:inset 0 0 0 2px var(--ds-basic-color-surface-default, #ffffff)}:host .day.reference:hover::after{box-shadow:inset 0 0 0 2px var(--ds-advanced-color-shared-background-muted, #f7f7f7)}:host .day:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-background-hover, #f2f2f2);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host .day.disabled{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.blackout{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.inRange:before,:host .day.rangeDepartDate:before,:host .day.rangeReturnDate:before,:host .day.lastHoveredDate:before{background-color:var(--ds-auro-calendar-cell-in-range-color)}:host .day.sameDateTrip:before{--ds-auro-calendar-cell-in-range-color: transparent}`;
|
|
11531
11531
|
|
|
@@ -11552,12 +11552,6 @@ var popoverVersion = '6.0.1';
|
|
|
11552
11552
|
|
|
11553
11553
|
/* eslint-disable curly, max-lines, no-underscore-dangle, no-magic-numbers, no-underscore-dangle, max-params, no-extra-parens, arrow-parens, max-lines, line-comment-position, no-inline-comments, lit/binding-positions, lit/no-invalid-html */
|
|
11554
11554
|
|
|
11555
|
-
const startOfDay$1 = (ms) => {
|
|
11556
|
-
const date = new Date(ms);
|
|
11557
|
-
date.setHours(0, 0, 0, 0);
|
|
11558
|
-
return date.getTime();
|
|
11559
|
-
};
|
|
11560
|
-
|
|
11561
11555
|
class AuroCalendarCell extends LitElement {
|
|
11562
11556
|
constructor() {
|
|
11563
11557
|
super();
|
|
@@ -11604,6 +11598,14 @@ class AuroCalendarCell extends LitElement {
|
|
|
11604
11598
|
type: Boolean,
|
|
11605
11599
|
reflect: true
|
|
11606
11600
|
},
|
|
11601
|
+
/**
|
|
11602
|
+
* @deprecated Propagated from the legacy `auro-calendar.disabledDays`
|
|
11603
|
+
* Unix-timestamp array. The cell honors it for backward compatibility
|
|
11604
|
+
* (see the divergence-check fallback inside `isBlackout`), but
|
|
11605
|
+
* consumers should migrate to `auro-datepicker.blackoutDates`
|
|
11606
|
+
* (YYYY-MM-DD ISO strings). The calendar emits a one-time
|
|
11607
|
+
* deprecation warning the first time a non-empty value is observed.
|
|
11608
|
+
*/
|
|
11607
11609
|
disabledDays: { type: Array },
|
|
11608
11610
|
isCurrentDate: { type: Boolean },
|
|
11609
11611
|
locale: { type: String },
|
|
@@ -11649,8 +11651,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
11649
11651
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11650
11652
|
|
|
11651
11653
|
if (day) {
|
|
11652
|
-
const departTimestamp =
|
|
11653
|
-
const returnTimestamp =
|
|
11654
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11655
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11654
11656
|
|
|
11655
11657
|
if (day.date === departTimestamp || day.date === returnTimestamp) {
|
|
11656
11658
|
this.selected = true;
|
|
@@ -11734,22 +11736,42 @@ class AuroCalendarCell extends LitElement {
|
|
|
11734
11736
|
return false;
|
|
11735
11737
|
}
|
|
11736
11738
|
|
|
11737
|
-
//
|
|
11739
|
+
// Delegate to the calendar's memoized blackout Set for O(1) lookup
|
|
11740
|
+
// (instead of rescanning disabledDays + blackoutDates per render). The
|
|
11741
|
+
// Set is rebuilt only when either source array reference changes — see
|
|
11742
|
+
// auro-calendar.js#_getBlackoutSet.
|
|
11743
|
+
if (this.calendar && typeof this.calendar._getBlackoutSet === 'function') {
|
|
11744
|
+
if (this.calendar._getBlackoutSet().has(this.day.date)) {
|
|
11745
|
+
return true;
|
|
11746
|
+
}
|
|
11747
|
+
// If the cell's local disabledDays diverged from the calendar's (a
|
|
11748
|
+
// consumer or test mutated cell.disabledDays directly), the Set does
|
|
11749
|
+
// not reflect that addition — fall through to the per-cell scan only
|
|
11750
|
+
// when the reference no longer matches. Production data flow keeps
|
|
11751
|
+
// these identical, so this branch stays cold.
|
|
11752
|
+
if (this.disabledDays && this.disabledDays !== this.calendar.disabledDays && this.disabledDays.length > 0) {
|
|
11753
|
+
if (this.disabledDays.findIndex((dd) => parseInt(dd, 10) === this.day.date) !== -1) {
|
|
11754
|
+
return true;
|
|
11755
|
+
}
|
|
11756
|
+
}
|
|
11757
|
+
return false;
|
|
11758
|
+
}
|
|
11759
|
+
|
|
11760
|
+
// Pre-firstUpdated fallback — the cell may render once before the
|
|
11761
|
+
// ancestor calendar is wired up. Uses the legacy O(N) scan so the
|
|
11762
|
+
// result stays correct, just slower for the very first render.
|
|
11738
11763
|
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0 &&
|
|
11739
11764
|
(this.disabledDays.findIndex(dd => parseInt(dd, 10) === this.day.date) !== -1)) {
|
|
11740
11765
|
return true;
|
|
11741
11766
|
}
|
|
11742
11767
|
|
|
11743
|
-
// Check against blackoutDates (ISO format YYYY-MM-DD) on the datepicker
|
|
11744
11768
|
const blackoutDates = this.datepicker?.blackoutDates;
|
|
11745
|
-
|
|
11746
11769
|
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
11747
11770
|
const date = new Date(this.day.date * 1000);
|
|
11748
11771
|
const yyyy = date.getFullYear();
|
|
11749
11772
|
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
11750
11773
|
const dd = String(date.getDate()).padStart(2, '0');
|
|
11751
|
-
|
|
11752
|
-
if (blackoutDates.includes(cellDate)) {
|
|
11774
|
+
if (blackoutDates.includes(`${yyyy}-${mm}-${dd}`)) {
|
|
11753
11775
|
return true;
|
|
11754
11776
|
}
|
|
11755
11777
|
}
|
|
@@ -11860,12 +11882,12 @@ class AuroCalendarCell extends LitElement {
|
|
|
11860
11882
|
const parsedDateFrom = Number.parseInt(this.dateFrom, 10);
|
|
11861
11883
|
if (!Number.isFinite(parsedDateFrom)) return null;
|
|
11862
11884
|
|
|
11863
|
-
const departTimestamp =
|
|
11885
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11864
11886
|
const dayDate = this.day.date;
|
|
11865
11887
|
|
|
11866
11888
|
const parsedDateTo = Number.parseInt(this.dateTo, 10);
|
|
11867
11889
|
const hasDateTo = Number.isFinite(parsedDateTo);
|
|
11868
|
-
const returnTimestamp = hasDateTo ?
|
|
11890
|
+
const returnTimestamp = hasDateTo ? new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
11869
11891
|
|
|
11870
11892
|
if (dayDate === departTimestamp) return this.datepicker.rangeLabelStart || 'range start';
|
|
11871
11893
|
|
|
@@ -11875,7 +11897,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
11875
11897
|
|
|
11876
11898
|
if (hasDateTo && dayDate > departTimestamp && dayDate < returnTimestamp) return this.datepicker.rangeLabelInRange || 'in range';
|
|
11877
11899
|
|
|
11878
|
-
|
|
11900
|
+
if (!hasDateTo && dayDate > departTimestamp) return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
11901
|
+
|
|
11902
|
+
// After end date when both dateFrom and dateTo are set.
|
|
11879
11903
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
11880
11904
|
}
|
|
11881
11905
|
|
|
@@ -11888,7 +11912,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11888
11912
|
*/
|
|
11889
11913
|
isDepartDate(day, dateFrom) {
|
|
11890
11914
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
11891
|
-
const departTimestamp =
|
|
11915
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11892
11916
|
|
|
11893
11917
|
return this.selected && day.date === departTimestamp;
|
|
11894
11918
|
}
|
|
@@ -11903,7 +11927,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11903
11927
|
*/
|
|
11904
11928
|
isReturnDate(day, dateFrom, dateTo) {
|
|
11905
11929
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11906
|
-
const returnTimestamp =
|
|
11930
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11907
11931
|
|
|
11908
11932
|
return this.selected && day.date === returnTimestamp && dateFrom;
|
|
11909
11933
|
}
|
|
@@ -12067,6 +12091,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12067
12091
|
setTimeout(() => this.firstUpdated(), 0);
|
|
12068
12092
|
return;
|
|
12069
12093
|
}
|
|
12094
|
+
this.calendar = calendar;
|
|
12070
12095
|
this.datepicker = calendar.datepicker;
|
|
12071
12096
|
this._slotContentHandler = () => {
|
|
12072
12097
|
this.handleSlotContent();
|
|
@@ -12124,12 +12149,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12124
12149
|
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
12125
12150
|
});
|
|
12126
12151
|
|
|
12127
|
-
//
|
|
12152
|
+
// Keep the host's gridcell aria attributes in sync with the day data.
|
|
12128
12153
|
this.updateHostAria();
|
|
12129
12154
|
}
|
|
12130
12155
|
|
|
12131
12156
|
// Update host aria when selection changes (aria-selected, range labels)
|
|
12132
|
-
|
|
12157
|
+
// or when isCurrentDate flips (aria-current).
|
|
12158
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('selected') || properties.has('isCurrentDate')) {
|
|
12133
12159
|
this.updateHostAria();
|
|
12134
12160
|
}
|
|
12135
12161
|
|
|
@@ -12140,8 +12166,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
12140
12166
|
}
|
|
12141
12167
|
|
|
12142
12168
|
/**
|
|
12143
|
-
*
|
|
12144
|
-
*
|
|
12169
|
+
* Sets host-level ARIA so each cell exposes its date, selection state,
|
|
12170
|
+
* and blackout status to assistive tech browsing the month grid.
|
|
12145
12171
|
* @private
|
|
12146
12172
|
* @returns {void}
|
|
12147
12173
|
*/
|
|
@@ -12152,14 +12178,20 @@ class AuroCalendarCell extends LitElement {
|
|
|
12152
12178
|
if (outOfRange) {
|
|
12153
12179
|
this.removeAttribute('role');
|
|
12154
12180
|
this.removeAttribute('aria-label');
|
|
12181
|
+
this.removeAttribute('aria-current');
|
|
12155
12182
|
return;
|
|
12156
12183
|
}
|
|
12157
12184
|
|
|
12158
|
-
// The host acts as the gridcell for ariaActiveDescendantElement.
|
|
12159
12185
|
this.setAttribute('role', 'gridcell');
|
|
12160
12186
|
this.setAttribute('aria-label', this.getAriaLabel());
|
|
12161
12187
|
this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
|
|
12162
12188
|
|
|
12189
|
+
if (this.isCurrentDate) {
|
|
12190
|
+
this.setAttribute('aria-current', 'date');
|
|
12191
|
+
} else {
|
|
12192
|
+
this.removeAttribute('aria-current');
|
|
12193
|
+
}
|
|
12194
|
+
|
|
12163
12195
|
if (this.isBlackout()) {
|
|
12164
12196
|
this.setAttribute('aria-disabled', 'true');
|
|
12165
12197
|
} else {
|
|
@@ -12174,7 +12206,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12174
12206
|
* @returns {void}
|
|
12175
12207
|
*/
|
|
12176
12208
|
focusButton() {
|
|
12177
|
-
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([
|
|
12209
|
+
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([disabled])');
|
|
12178
12210
|
if (button) {
|
|
12179
12211
|
button.focus({ focusVisible: true });
|
|
12180
12212
|
}
|
|
@@ -12182,7 +12214,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
12182
12214
|
|
|
12183
12215
|
/**
|
|
12184
12216
|
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
12185
|
-
*
|
|
12217
|
+
* Buttons stay tabindex="-1" because DOM focus stays on the grid wrapper —
|
|
12218
|
+
* arrow keys move the active cell imperatively and the live region carries
|
|
12219
|
+
* the SR announcement.
|
|
12186
12220
|
* @returns {void}
|
|
12187
12221
|
*/
|
|
12188
12222
|
setActive() {
|
|
@@ -12224,10 +12258,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12224
12258
|
if (!btn || !this.day) return;
|
|
12225
12259
|
|
|
12226
12260
|
const dayDate = this.day.date;
|
|
12227
|
-
const departTimestamp =
|
|
12261
|
+
const departTimestamp = new Date(dateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
12228
12262
|
const isInRange = dayDate > departTimestamp && dayDate < hoveredDate;
|
|
12229
|
-
|
|
12230
|
-
|
|
12263
|
+
// `>=` so hovering the depart cell itself (a same-day round-trip
|
|
12264
|
+
// preview) still surfaces a visual cue: the depart cell receives both
|
|
12265
|
+
// rangeDepartDate and lastHoveredDate.
|
|
12266
|
+
const isLastHovered = dayDate === hoveredDate && hoveredDate >= departTimestamp;
|
|
12267
|
+
const isDepartWithPreview = dayDate === departTimestamp && hoveredDate >= departTimestamp;
|
|
12231
12268
|
|
|
12232
12269
|
btn.classList.toggle('inRange', isInRange);
|
|
12233
12270
|
btn.classList.toggle('lastHoveredDate', isLastHovered);
|
|
@@ -12285,7 +12322,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
12285
12322
|
@focus="${outOfRange ? undefined : this.handleFocus}"
|
|
12286
12323
|
class="${classMap(buttonClasses)}"
|
|
12287
12324
|
?disabled="${outOfRange}"
|
|
12288
|
-
aria-hidden="${outOfRange ? 'true' : nothing}"
|
|
12289
12325
|
tabindex="-1">
|
|
12290
12326
|
<div class="buttonWrapper" aria-hidden="true">
|
|
12291
12327
|
<div class="currentDayMarker">${this.day?.title || nothing}</div>
|
|
@@ -13391,7 +13427,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13391
13427
|
}
|
|
13392
13428
|
}
|
|
13393
13429
|
|
|
13394
|
-
var formkitVersion$2 = '
|
|
13430
|
+
var formkitVersion$2 = '202606251933';
|
|
13395
13431
|
|
|
13396
13432
|
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}
|
|
13397
13433
|
`,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}}
|
|
@@ -13514,7 +13550,11 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13514
13550
|
this.calendarRangeMonths = null;
|
|
13515
13551
|
|
|
13516
13552
|
/**
|
|
13517
|
-
*
|
|
13553
|
+
* @deprecated Use `auro-datepicker.blackoutDates` (an array of
|
|
13554
|
+
* `YYYY-MM-DD` ISO strings) instead. This legacy array of Unix
|
|
13555
|
+
* timestamps is still honored for backward compatibility but emits a
|
|
13556
|
+
* one-time `console.debug` the first time a non-empty value is observed.
|
|
13557
|
+
* Support will be removed in a future major release.
|
|
13518
13558
|
* @private
|
|
13519
13559
|
*/
|
|
13520
13560
|
this.disabledDays = [];
|
|
@@ -13771,17 +13811,44 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13771
13811
|
* @returns {void}
|
|
13772
13812
|
*/
|
|
13773
13813
|
updateActiveCellForVisibleMonth() {
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
requestAnimationFrame(() => {
|
|
13777
|
-
requestAnimationFrame(() => {
|
|
13778
|
-
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13814
|
+
this._afterMonthRender(() => {
|
|
13815
|
+
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13779
13816
|
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13817
|
+
if (newDate !== null && newDate !== undefined) {
|
|
13818
|
+
this.activeCellDate = newDate;
|
|
13819
|
+
this.setActiveCell(this.activeCellDate);
|
|
13820
|
+
}
|
|
13821
|
+
});
|
|
13822
|
+
}
|
|
13823
|
+
|
|
13824
|
+
/**
|
|
13825
|
+
* Schedules `callback` two animation frames out, giving the child
|
|
13826
|
+
* `auro-formkit-calendar-month` and `auro-formkit-calendar-cell` elements
|
|
13827
|
+
* a full render-and-paint cycle to settle before the callback reads or
|
|
13828
|
+
* mutates DOM.
|
|
13829
|
+
*
|
|
13830
|
+
* Why two frames, not one:
|
|
13831
|
+
* 1. Lit batches property updates and renders in a microtask, so frame N
|
|
13832
|
+
* schedules the render but the new DOM may not be painted yet.
|
|
13833
|
+
* 2. Cells re-cache `_cachedButton` inside their own `updateComplete.then`,
|
|
13834
|
+
* which also lands a tick later. Reading buttons from frame N+1
|
|
13835
|
+
* (after both renders + cache refresh have flushed) reliably hits the
|
|
13836
|
+
* new month's cells.
|
|
13837
|
+
*
|
|
13838
|
+
* Used by every code path that calls `handleNextMonth`/`handlePrevMonth`
|
|
13839
|
+
* and then needs to inspect the freshly-rendered cells (cross-month
|
|
13840
|
+
* keyboard nav, boundary events, `updateActiveCellForVisibleMonth`).
|
|
13841
|
+
* Do NOT collapse to a single rAF — it intermittently lands before
|
|
13842
|
+
* `_cachedButton` is refreshed, which silently breaks focus restoration
|
|
13843
|
+
* and `setActiveCell` lookups.
|
|
13844
|
+
* @private
|
|
13845
|
+
* @param {() => void} callback - Runs once after the month re-render and
|
|
13846
|
+
* the cells' button caches have refreshed.
|
|
13847
|
+
* @returns {void}
|
|
13848
|
+
*/
|
|
13849
|
+
_afterMonthRender(callback) {
|
|
13850
|
+
requestAnimationFrame(() => {
|
|
13851
|
+
requestAnimationFrame(callback);
|
|
13785
13852
|
});
|
|
13786
13853
|
}
|
|
13787
13854
|
|
|
@@ -13899,6 +13966,47 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13899
13966
|
return Array.from(this.shadowRoot.querySelectorAll('auro-formkit-calendar-month'));
|
|
13900
13967
|
}
|
|
13901
13968
|
|
|
13969
|
+
/**
|
|
13970
|
+
* Picks the focusable cell whose date is closest to targetTs. Used as a
|
|
13971
|
+
* fallback after a month-boundary nav when the exact target date isn't
|
|
13972
|
+
* focusable — typically because the month re-render lagged or the date
|
|
13973
|
+
* was filtered out by isOutOfRange. When two cells are equidistant, the
|
|
13974
|
+
* navigation direction breaks the tie so the user moves the way they
|
|
13975
|
+
* pressed (forward → later cell, backward → earlier cell).
|
|
13976
|
+
* @private
|
|
13977
|
+
* @param {Array} cells - Focusable cells from getAllFocusableCells.
|
|
13978
|
+
* @param {Number} targetTs - Desired Unix timestamp (seconds).
|
|
13979
|
+
* @param {'next'|'prev'} direction - Navigation direction.
|
|
13980
|
+
* @returns {Object|null} The nearest cell, or null when cells is empty.
|
|
13981
|
+
*/
|
|
13982
|
+
pickNearestCell(cells, targetTs, direction) {
|
|
13983
|
+
if (!cells.length) {
|
|
13984
|
+
return null;
|
|
13985
|
+
}
|
|
13986
|
+
const forward = direction === 'next';
|
|
13987
|
+
let best = null;
|
|
13988
|
+
let bestDelta = Infinity;
|
|
13989
|
+
cells.forEach((cell) => {
|
|
13990
|
+
if (!cell.day) {
|
|
13991
|
+
return;
|
|
13992
|
+
}
|
|
13993
|
+
const distance = Math.abs(cell.day.date - targetTs);
|
|
13994
|
+
if (distance < bestDelta) {
|
|
13995
|
+
best = cell;
|
|
13996
|
+
bestDelta = distance;
|
|
13997
|
+
return;
|
|
13998
|
+
}
|
|
13999
|
+
if (distance === bestDelta && best) {
|
|
14000
|
+
if (forward && cell.day.date > best.day.date) {
|
|
14001
|
+
best = cell;
|
|
14002
|
+
} else if (!forward && cell.day.date < best.day.date) {
|
|
14003
|
+
best = cell;
|
|
14004
|
+
}
|
|
14005
|
+
}
|
|
14006
|
+
});
|
|
14007
|
+
return best;
|
|
14008
|
+
}
|
|
14009
|
+
|
|
13902
14010
|
/**
|
|
13903
14011
|
* Gets all focusable cells across all rendered months.
|
|
13904
14012
|
* @private
|
|
@@ -13915,9 +14023,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13915
14023
|
|
|
13916
14024
|
/**
|
|
13917
14025
|
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
13918
|
-
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
13919
|
-
*
|
|
13920
|
-
*
|
|
14026
|
+
* Uses imperative DOM manipulation — no Lit re-render triggered. DOM focus
|
|
14027
|
+
* stays on the grid wrapper; the live region (see getOrCreateLiveRegion)
|
|
14028
|
+
* is what announces the active cell to assistive tech.
|
|
13921
14029
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
13922
14030
|
* @returns {void}
|
|
13923
14031
|
*/
|
|
@@ -13998,6 +14106,72 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13998
14106
|
this.clearRangePreview();
|
|
13999
14107
|
}
|
|
14000
14108
|
|
|
14109
|
+
/**
|
|
14110
|
+
* Returns a memoized Set of blackout timestamps (seconds) drawn from both
|
|
14111
|
+
* the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
|
|
14112
|
+
* The cache invalidates when either source array's reference changes, which
|
|
14113
|
+
* matches Lit's own reactive identity semantics for array properties.
|
|
14114
|
+
* @private
|
|
14115
|
+
* @returns {Set<Number>}
|
|
14116
|
+
*/
|
|
14117
|
+
_getBlackoutSet() {
|
|
14118
|
+
const disabledDays = this.disabledDays || [];
|
|
14119
|
+
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14120
|
+
if (this._blackoutSet
|
|
14121
|
+
&& this._cachedBlackoutDisabledDays === disabledDays
|
|
14122
|
+
&& this._cachedBlackoutDates === blackoutDates) {
|
|
14123
|
+
return this._blackoutSet;
|
|
14124
|
+
}
|
|
14125
|
+
|
|
14126
|
+
if (disabledDays.length > 0) {
|
|
14127
|
+
this._warnDisabledDaysDeprecated();
|
|
14128
|
+
}
|
|
14129
|
+
|
|
14130
|
+
const set = new Set(disabledDays.map((day) => parseInt(day, 10)));
|
|
14131
|
+
|
|
14132
|
+
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
14133
|
+
if (Array.isArray(blackoutDates)) {
|
|
14134
|
+
for (const isoStr of blackoutDates) {
|
|
14135
|
+
const parts = isoStr.split('-');
|
|
14136
|
+
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
14137
|
+
if (Number.isFinite(ts)) {
|
|
14138
|
+
set.add(ts);
|
|
14139
|
+
}
|
|
14140
|
+
}
|
|
14141
|
+
}
|
|
14142
|
+
|
|
14143
|
+
this._blackoutSet = set;
|
|
14144
|
+
this._cachedBlackoutDisabledDays = disabledDays;
|
|
14145
|
+
this._cachedBlackoutDates = blackoutDates;
|
|
14146
|
+
return set;
|
|
14147
|
+
}
|
|
14148
|
+
|
|
14149
|
+
/**
|
|
14150
|
+
* Per-class flag that gates the `disabledDays` deprecation warning so it
|
|
14151
|
+
* fires exactly once per page no matter how many calendars or rebuild
|
|
14152
|
+
* cycles encounter the legacy array.
|
|
14153
|
+
* @private
|
|
14154
|
+
*/
|
|
14155
|
+
static _warnedDisabledDaysDeprecation = false;
|
|
14156
|
+
|
|
14157
|
+
/**
|
|
14158
|
+
* One-time `console.debug` directing consumers from the legacy
|
|
14159
|
+
* `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
|
|
14160
|
+
* the first time `_getBlackoutSet` rebuilds from a non-empty
|
|
14161
|
+
* `disabledDays`; subsequent calls (on this or any other AuroCalendar
|
|
14162
|
+
* instance on the page) are silent.
|
|
14163
|
+
* @private
|
|
14164
|
+
* @returns {void}
|
|
14165
|
+
*/
|
|
14166
|
+
_warnDisabledDaysDeprecated() {
|
|
14167
|
+
if (AuroCalendar._warnedDisabledDaysDeprecation) {
|
|
14168
|
+
return;
|
|
14169
|
+
}
|
|
14170
|
+
AuroCalendar._warnedDisabledDaysDeprecation = true;
|
|
14171
|
+
// eslint-disable-next-line no-console
|
|
14172
|
+
console.debug('[auro-datepicker] The `disabledDays` property (Unix timestamps) is deprecated. Migrate to the `blackoutDates` property on auro-datepicker (an array of `YYYY-MM-DD` ISO strings). `disabledDays` will be removed in a future major release.');
|
|
14173
|
+
}
|
|
14174
|
+
|
|
14001
14175
|
/**
|
|
14002
14176
|
* Computes the initial active date from data properties alone — no DOM required.
|
|
14003
14177
|
* Priority:
|
|
@@ -14042,21 +14216,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14042
14216
|
const minTs = Number.isFinite(rawMin) ? rawMin : -Infinity;
|
|
14043
14217
|
const maxTs = Number.isFinite(rawMax) ? rawMax : Infinity;
|
|
14044
14218
|
|
|
14045
|
-
// Build a Set of blackout timestamps for O(1) lookup.
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
14050
|
-
const isoBlackouts = this.datepicker?.blackoutDates;
|
|
14051
|
-
if (Array.isArray(isoBlackouts)) {
|
|
14052
|
-
for (const isoStr of isoBlackouts) {
|
|
14053
|
-
const parts = isoStr.split('-');
|
|
14054
|
-
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
14055
|
-
if (Number.isFinite(ts)) {
|
|
14056
|
-
blackoutSet.add(ts);
|
|
14057
|
-
}
|
|
14058
|
-
}
|
|
14059
|
-
}
|
|
14219
|
+
// Build a Set of blackout timestamps for O(1) lookup. Memoized by the
|
|
14220
|
+
// identity of the source arrays so rapid month nav doesn't rebuild the
|
|
14221
|
+
// Set (and re-parse every ISO string) on every keypress.
|
|
14222
|
+
const blackoutSet = this._getBlackoutSet();
|
|
14060
14223
|
|
|
14061
14224
|
/**
|
|
14062
14225
|
* A date (unix timestamp in seconds, midnight-aligned) is "enabled" when
|
|
@@ -14252,8 +14415,8 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14252
14415
|
|
|
14253
14416
|
/**
|
|
14254
14417
|
* Handles arrow key navigation on the calendar grid wrapper.
|
|
14255
|
-
* Focus stays on the grid wrapper; only
|
|
14256
|
-
*
|
|
14418
|
+
* Focus stays on the grid wrapper; only the visual active-cell indicator
|
|
14419
|
+
* changes. The live region announces the new active cell.
|
|
14257
14420
|
* @private
|
|
14258
14421
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
14259
14422
|
* @returns {void}
|
|
@@ -14318,21 +14481,21 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14318
14481
|
} else {
|
|
14319
14482
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14320
14483
|
}
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14484
|
+
this._afterMonthRender(() => {
|
|
14485
|
+
const cells = this.getAllFocusableCells();
|
|
14486
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetTs);
|
|
14487
|
+
if (target) {
|
|
14488
|
+
this.setActiveCell(target.day.date);
|
|
14489
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14490
|
+
} else {
|
|
14491
|
+
const fallback = this.pickNearestCell(cells, targetTs, navDir);
|
|
14492
|
+
if (fallback) {
|
|
14330
14493
|
this.setActiveCell(fallback.day.date);
|
|
14331
14494
|
this.handleCellFocused({ detail: { date: fallback.day.date } });
|
|
14332
14495
|
}
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14496
|
+
}
|
|
14497
|
+
// Re-focus grid wrapper after month change re-render
|
|
14498
|
+
this.focusActiveCell();
|
|
14336
14499
|
});
|
|
14337
14500
|
}
|
|
14338
14501
|
}
|
|
@@ -14358,26 +14521,20 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14358
14521
|
} else {
|
|
14359
14522
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14360
14523
|
}
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
if (navDirection === 'next') {
|
|
14372
|
-
[nearest] = cells;
|
|
14373
|
-
} else {
|
|
14374
|
-
nearest = cells[cells.length - 1];
|
|
14375
|
-
}
|
|
14524
|
+
this._afterMonthRender(() => {
|
|
14525
|
+
const cells = this.getAllFocusableCells();
|
|
14526
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14527
|
+
if (target) {
|
|
14528
|
+
this.setActiveCell(target.day.date);
|
|
14529
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14530
|
+
} else {
|
|
14531
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14532
|
+
if (nearest) {
|
|
14376
14533
|
this.setActiveCell(nearest.day.date);
|
|
14377
14534
|
this.handleCellFocused({ detail: { date: nearest.day.date } });
|
|
14378
14535
|
}
|
|
14379
|
-
|
|
14380
|
-
|
|
14536
|
+
}
|
|
14537
|
+
this.focusActiveCell();
|
|
14381
14538
|
});
|
|
14382
14539
|
}
|
|
14383
14540
|
}
|
|
@@ -14427,19 +14584,17 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14427
14584
|
}
|
|
14428
14585
|
|
|
14429
14586
|
this.handleNextMonth({ skipActiveUpdate: true });
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
}
|
|
14442
|
-
});
|
|
14587
|
+
this._afterMonthRender(() => {
|
|
14588
|
+
const cells = this.getAllFocusableCells();
|
|
14589
|
+
const target = cells.find((cell) => cell.day && cell.day.date === nextTs);
|
|
14590
|
+
if (target) {
|
|
14591
|
+
this.setActiveCell(target.day.date);
|
|
14592
|
+
this.focusActiveCell();
|
|
14593
|
+
} else if (cells.length > 0) {
|
|
14594
|
+
// Fallback: first cell of the last rendered month
|
|
14595
|
+
this.setActiveCell(cells[cells.length - 1].day.date);
|
|
14596
|
+
this.focusActiveCell();
|
|
14597
|
+
}
|
|
14443
14598
|
});
|
|
14444
14599
|
} else if (direction === 'prev' && this.showPrevMonthBtn) {
|
|
14445
14600
|
// Navigate to previous month and focus the computed previous date.
|
|
@@ -14453,19 +14608,17 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14453
14608
|
}
|
|
14454
14609
|
|
|
14455
14610
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
}
|
|
14468
|
-
});
|
|
14611
|
+
this._afterMonthRender(() => {
|
|
14612
|
+
const cells = this.getAllFocusableCells();
|
|
14613
|
+
const target = cells.find((cell) => cell.day && cell.day.date === prevTs);
|
|
14614
|
+
if (target) {
|
|
14615
|
+
this.setActiveCell(target.day.date);
|
|
14616
|
+
this.focusActiveCell();
|
|
14617
|
+
} else if (cells.length > 0) {
|
|
14618
|
+
// Fallback: last cell of the first rendered month
|
|
14619
|
+
this.setActiveCell(cells[0].day.date);
|
|
14620
|
+
this.focusActiveCell();
|
|
14621
|
+
}
|
|
14469
14622
|
});
|
|
14470
14623
|
}
|
|
14471
14624
|
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
@@ -14493,20 +14646,18 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14493
14646
|
} else {
|
|
14494
14647
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14495
14648
|
}
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
}
|
|
14509
|
-
});
|
|
14649
|
+
this._afterMonthRender(() => {
|
|
14650
|
+
const cells = this.getAllFocusableCells();
|
|
14651
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14652
|
+
if (target) {
|
|
14653
|
+
this.setActiveCell(target.day.date);
|
|
14654
|
+
this.focusActiveCell();
|
|
14655
|
+
} else if (cells.length > 0) {
|
|
14656
|
+
// Clamp to nearest focusable cell
|
|
14657
|
+
const nearest = navDirection === 'next' ? cells[0] : cells[cells.length - 1];
|
|
14658
|
+
this.setActiveCell(nearest.day.date);
|
|
14659
|
+
this.focusActiveCell();
|
|
14660
|
+
}
|
|
14510
14661
|
});
|
|
14511
14662
|
}
|
|
14512
14663
|
}
|
|
@@ -14545,8 +14696,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14545
14696
|
return;
|
|
14546
14697
|
}
|
|
14547
14698
|
|
|
14548
|
-
//
|
|
14549
|
-
// so
|
|
14699
|
+
// DOM focus stays on the grid wrapper while arrow keys move the active
|
|
14700
|
+
// cell, so cell buttons never receive native focus. The debounced live
|
|
14701
|
+
// region carries the full-context announcement instead.
|
|
14550
14702
|
const announcement = this.buildFocusAnnouncement(date);
|
|
14551
14703
|
this.announceFocusDebounced(announcement);
|
|
14552
14704
|
|
|
@@ -14616,10 +14768,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14616
14768
|
return null;
|
|
14617
14769
|
}
|
|
14618
14770
|
|
|
14619
|
-
const departTs =
|
|
14771
|
+
const departTs = new Date(parsedFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
14620
14772
|
const parsedTo = Number.parseInt(this.dateTo, 10);
|
|
14621
14773
|
const hasTo = Number.isFinite(parsedTo);
|
|
14622
|
-
const returnTs = hasTo ?
|
|
14774
|
+
const returnTs = hasTo ? new Date(parsedTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
14623
14775
|
|
|
14624
14776
|
if (date === departTs) {
|
|
14625
14777
|
return this.datepicker.rangeLabelStart || 'range start';
|
|
@@ -14633,6 +14785,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14633
14785
|
if (hasTo && date > departTs && date < returnTs) {
|
|
14634
14786
|
return this.datepicker.rangeLabelInRange || 'in range';
|
|
14635
14787
|
}
|
|
14788
|
+
if (!hasTo && date > departTs) {
|
|
14789
|
+
return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
14790
|
+
}
|
|
14636
14791
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
14637
14792
|
}
|
|
14638
14793
|
|
|
@@ -14829,9 +14984,34 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14829
14984
|
// the last one.
|
|
14830
14985
|
if (this._announceRafId) {
|
|
14831
14986
|
cancelAnimationFrame(this._announceRafId);
|
|
14987
|
+
this._announceRafId = null;
|
|
14832
14988
|
}
|
|
14989
|
+
this._deliverAnnouncement(dateStr, 0);
|
|
14990
|
+
}
|
|
14991
|
+
|
|
14992
|
+
/**
|
|
14993
|
+
* Writes `dateStr` to the live region. If the dropdown's dialog hasn't
|
|
14994
|
+
* mounted yet (so getOrCreateLiveRegion can't attach), retries on the
|
|
14995
|
+
* next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
|
|
14996
|
+
* dropping the announcement. The retry uses the same `_announceRafId`
|
|
14997
|
+
* the double-rAF below uses, so a newer announceSelection call (or
|
|
14998
|
+
* disconnectedCallback) cancels any in-flight retry.
|
|
14999
|
+
* @private
|
|
15000
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
15001
|
+
* @param {Number} attempts - Number of prior retry attempts.
|
|
15002
|
+
* @returns {void}
|
|
15003
|
+
*/
|
|
15004
|
+
_deliverAnnouncement(dateStr, attempts) {
|
|
14833
15005
|
const liveRegion = this.getOrCreateLiveRegion();
|
|
14834
15006
|
if (!liveRegion) {
|
|
15007
|
+
const MAX_LIVE_REGION_RETRIES = 10;
|
|
15008
|
+
if (attempts < MAX_LIVE_REGION_RETRIES) {
|
|
15009
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
15010
|
+
this._deliverAnnouncement(dateStr, attempts + 1);
|
|
15011
|
+
});
|
|
15012
|
+
} else {
|
|
15013
|
+
this._announceRafId = null;
|
|
15014
|
+
}
|
|
14835
15015
|
return;
|
|
14836
15016
|
}
|
|
14837
15017
|
|
|
@@ -15017,7 +15197,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
15017
15197
|
</button>
|
|
15018
15198
|
` : undefined}
|
|
15019
15199
|
</div>
|
|
15020
|
-
<div id="calendarGrid" class="calendars" role="group" tabindex="0" aria-label="${this.datepicker?.calendarGridLabel}" @keydown="${this.handleGridKeyDown}" @focusin="${this.handleGridFocusIn}" @focusout="${this.handleGridFocusOut}" @calendar-month-mouseleave="${this.clearRangePreview}">
|
|
15200
|
+
<div id="calendarGrid" class="calendars" role="group" aria-roledescription="calendar" tabindex="0" aria-label="${this.datepicker?.calendarGridLabel}" @keydown="${this.handleGridKeyDown}" @focusin="${this.handleGridFocusIn}" @focusout="${this.handleGridFocusOut}" @calendar-month-mouseleave="${this.clearRangePreview}">
|
|
15021
15201
|
${this.renderAllCalendars()}
|
|
15022
15202
|
</div>
|
|
15023
15203
|
</div>
|
|
@@ -18902,7 +19082,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
18902
19082
|
}
|
|
18903
19083
|
};
|
|
18904
19084
|
|
|
18905
|
-
var formkitVersion$1 = '
|
|
19085
|
+
var formkitVersion$1 = '202606251933';
|
|
18906
19086
|
|
|
18907
19087
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
18908
19088
|
static get properties() {
|
|
@@ -32495,7 +32675,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
32495
32675
|
}
|
|
32496
32676
|
};
|
|
32497
32677
|
|
|
32498
|
-
var formkitVersion = '
|
|
32678
|
+
var formkitVersion = '202606251933';
|
|
32499
32679
|
|
|
32500
32680
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
32501
32681
|
// See LICENSE in the project root for license information.
|
|
@@ -33972,6 +34152,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
33972
34152
|
this.rangeLabelBeforeRange = 'before range';
|
|
33973
34153
|
this.rangeLabelInRange = 'in range';
|
|
33974
34154
|
this.rangeLabelAfterRange = 'after range';
|
|
34155
|
+
this.rangeLabelEndPreview = 'previewing range end';
|
|
33975
34156
|
this.blackoutDates = [];
|
|
33976
34157
|
this.blackoutLabel = 'unavailable';
|
|
33977
34158
|
this.navLabelPrevMonth = 'Previous month';
|
|
@@ -34071,6 +34252,22 @@ class AuroDatePicker extends AuroElement {
|
|
|
34071
34252
|
*/
|
|
34072
34253
|
this.handleClick = this.handleClick.bind(this);
|
|
34073
34254
|
|
|
34255
|
+
/**
|
|
34256
|
+
* Single AbortController shared by every listener registered in the
|
|
34257
|
+
* configure* methods. Lets disconnectedCallback tear all of them down
|
|
34258
|
+
* with one abort() call.
|
|
34259
|
+
*
|
|
34260
|
+
* The genuine leak risk is the listeners attached to children that can
|
|
34261
|
+
* outlive the host if they get reparented — `this.dropdown`,
|
|
34262
|
+
* `this.calendar`, and the inputs inside the dropdown's slot.
|
|
34263
|
+
* Listeners attached to `this` (e.g. focusin/focusout on the host)
|
|
34264
|
+
* form a self-contained reference graph that the GC can collect with
|
|
34265
|
+
* the host anyway, but they share the same signal so the cleanup
|
|
34266
|
+
* pattern stays uniform across all configure* sites.
|
|
34267
|
+
* @private
|
|
34268
|
+
*/
|
|
34269
|
+
this._listenerAbortController = new AbortController();
|
|
34270
|
+
|
|
34074
34271
|
/**
|
|
34075
34272
|
* @private
|
|
34076
34273
|
*/
|
|
@@ -34119,6 +34316,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34119
34316
|
|
|
34120
34317
|
/**
|
|
34121
34318
|
* Label announced for blackout (disabled but in-range) date cells.
|
|
34319
|
+
* @default 'unavailable'
|
|
34122
34320
|
*/
|
|
34123
34321
|
blackoutLabel: {
|
|
34124
34322
|
type: String,
|
|
@@ -34135,6 +34333,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34135
34333
|
|
|
34136
34334
|
/**
|
|
34137
34335
|
* Accessible label for the calendar grid containing the days of the month.
|
|
34336
|
+
* @default 'Calendar days of the month'
|
|
34138
34337
|
*/
|
|
34139
34338
|
calendarGridLabel: {
|
|
34140
34339
|
type: String,
|
|
@@ -34297,6 +34496,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34297
34496
|
|
|
34298
34497
|
/**
|
|
34299
34498
|
* Accessible label for the next month navigation button.
|
|
34499
|
+
* @default 'Next month'
|
|
34300
34500
|
*/
|
|
34301
34501
|
navLabelNextMonth: {
|
|
34302
34502
|
type: String,
|
|
@@ -34305,6 +34505,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34305
34505
|
|
|
34306
34506
|
/**
|
|
34307
34507
|
* Accessible label for the previous month navigation button.
|
|
34508
|
+
* @default 'Previous month'
|
|
34308
34509
|
*/
|
|
34309
34510
|
navLabelPrevMonth: {
|
|
34310
34511
|
type: String,
|
|
@@ -34383,6 +34584,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34383
34584
|
|
|
34384
34585
|
/**
|
|
34385
34586
|
* Label announced for cells after the range (or after start when no end is selected).
|
|
34587
|
+
* @default 'after range'
|
|
34386
34588
|
*/
|
|
34387
34589
|
rangeLabelAfterRange: {
|
|
34388
34590
|
type: String,
|
|
@@ -34391,6 +34593,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34391
34593
|
|
|
34392
34594
|
/**
|
|
34393
34595
|
* Label announced for cells before the range start.
|
|
34596
|
+
* @default 'before range'
|
|
34394
34597
|
*/
|
|
34395
34598
|
rangeLabelBeforeRange: {
|
|
34396
34599
|
type: String,
|
|
@@ -34399,14 +34602,27 @@ class AuroDatePicker extends AuroElement {
|
|
|
34399
34602
|
|
|
34400
34603
|
/**
|
|
34401
34604
|
* Label announced for the range end date cell.
|
|
34605
|
+
* @default 'range end'
|
|
34402
34606
|
*/
|
|
34403
34607
|
rangeLabelEnd: {
|
|
34404
34608
|
type: String,
|
|
34405
34609
|
reflect: true
|
|
34406
34610
|
},
|
|
34407
34611
|
|
|
34612
|
+
/**
|
|
34613
|
+
* Label announced for the focused cell while previewing a range end
|
|
34614
|
+
* (dateFrom set, dateTo not yet selected). Tells AT users that
|
|
34615
|
+
* pressing Enter would commit this cell as the range end.
|
|
34616
|
+
* @default 'previewing range end'
|
|
34617
|
+
*/
|
|
34618
|
+
rangeLabelEndPreview: {
|
|
34619
|
+
type: String,
|
|
34620
|
+
reflect: true
|
|
34621
|
+
},
|
|
34622
|
+
|
|
34408
34623
|
/**
|
|
34409
34624
|
* Label announced for cells within the selected range.
|
|
34625
|
+
* @default 'in range'
|
|
34410
34626
|
*/
|
|
34411
34627
|
rangeLabelInRange: {
|
|
34412
34628
|
type: String,
|
|
@@ -34415,6 +34631,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34415
34631
|
|
|
34416
34632
|
/**
|
|
34417
34633
|
* Label announced for the range start date cell.
|
|
34634
|
+
* @default 'range start'
|
|
34418
34635
|
*/
|
|
34419
34636
|
rangeLabelStart: {
|
|
34420
34637
|
type: String,
|
|
@@ -34779,10 +34996,26 @@ class AuroDatePicker extends AuroElement {
|
|
|
34779
34996
|
// ─── Vendor calendar time conversions ─────────────────────────────────────
|
|
34780
34997
|
|
|
34781
34998
|
/**
|
|
34782
|
-
* Converts a Unix timestamp (seconds) from the
|
|
34999
|
+
* Converts a Unix timestamp (seconds) from the vendored range-datepicker
|
|
35000
|
+
* (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
|
|
35001
|
+
*
|
|
35002
|
+
* Timezone contract:
|
|
35003
|
+
* - INPUT: `time` is assumed to be the seconds-since-epoch of **local
|
|
35004
|
+
* midnight** for the intended calendar day. The vendor's Day constructor
|
|
35005
|
+
* builds it via `date-fns format(date, 't')` from a locally-constructed
|
|
35006
|
+
* Date, so this assumption currently holds end-to-end.
|
|
35007
|
+
* - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
|
|
35008
|
+
* getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
|
|
35009
|
+
* string matches the local calendar day.
|
|
35010
|
+
*
|
|
35011
|
+
* If the vendor ever switches to emitting UTC-midnight timestamps, this
|
|
35012
|
+
* conversion will silently shift the returned date by one day in zones
|
|
35013
|
+
* west of UTC. Any vendor swap should re-verify this contract; the TZ
|
|
35014
|
+
* regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
|
|
35015
|
+
*
|
|
34783
35016
|
* @private
|
|
34784
|
-
* @param {number} time - Unix timestamp
|
|
34785
|
-
* @returns {string} ISO date string (yyyy-mm-dd).
|
|
35017
|
+
* @param {number} time - Unix timestamp (seconds), local midnight of the day.
|
|
35018
|
+
* @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
|
|
34786
35019
|
*/
|
|
34787
35020
|
convertWcTimeToDate(time) {
|
|
34788
35021
|
return dateFormatter$1.toISOFormatString(new Date(time * 1000));
|
|
@@ -34884,8 +35117,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
34884
35117
|
}
|
|
34885
35118
|
}
|
|
34886
35119
|
|
|
34887
|
-
// Focus the calendar grid wrapper (
|
|
34888
|
-
// the SR announcement for the active cell
|
|
35120
|
+
// Focus the calendar grid wrapper. The live region (announced just
|
|
35121
|
+
// below) handles the SR announcement for the active cell.
|
|
34889
35122
|
if (activeCell) {
|
|
34890
35123
|
this.calendar.focusActiveCell();
|
|
34891
35124
|
|
|
@@ -34935,11 +35168,13 @@ class AuroDatePicker extends AuroElement {
|
|
|
34935
35168
|
this.dropdown.bibDialogLabel = labelElement.textContent.trim() || undefined;
|
|
34936
35169
|
}
|
|
34937
35170
|
|
|
35171
|
+
const { signal } = this._listenerAbortController;
|
|
35172
|
+
|
|
34938
35173
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
34939
35174
|
if (!this.isPopoverVisible) {
|
|
34940
35175
|
this.dropdown.show();
|
|
34941
35176
|
}
|
|
34942
|
-
});
|
|
35177
|
+
}, { signal });
|
|
34943
35178
|
|
|
34944
35179
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
34945
35180
|
this.notifyDatepickerToggled();
|
|
@@ -34957,7 +35192,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34957
35192
|
if (this.valueObject) {
|
|
34958
35193
|
this.centralDate = this.value;
|
|
34959
35194
|
} else if (!this.centralDate && !this.calendarStartDate && !this.minDate) {
|
|
34960
|
-
this.centralDate = new Date();
|
|
35195
|
+
this.centralDate = dateFormatter$1.toISOFormatString(new Date());
|
|
34961
35196
|
}
|
|
34962
35197
|
}
|
|
34963
35198
|
|
|
@@ -35037,7 +35272,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35037
35272
|
this.forceScrollOnNextMobileCalendarRender = false;
|
|
35038
35273
|
}, 0);
|
|
35039
35274
|
}
|
|
35040
|
-
});
|
|
35275
|
+
}, { signal });
|
|
35041
35276
|
|
|
35042
35277
|
// Handle responsive strategy changes while the dropdown is open
|
|
35043
35278
|
// (e.g. resizing from desktop → mobile or vice versa).
|
|
@@ -35084,7 +35319,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35084
35319
|
});
|
|
35085
35320
|
});
|
|
35086
35321
|
}
|
|
35087
|
-
});
|
|
35322
|
+
}, { signal });
|
|
35088
35323
|
}
|
|
35089
35324
|
|
|
35090
35325
|
/**
|
|
@@ -35097,6 +35332,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
35097
35332
|
|
|
35098
35333
|
this.inputList = [...this.dropdown.querySelectorAll(this.inputTag._$litStatic$)];
|
|
35099
35334
|
|
|
35335
|
+
const { signal } = this._listenerAbortController;
|
|
35336
|
+
|
|
35100
35337
|
this.inputList.forEach((input, index) => {
|
|
35101
35338
|
input.addEventListener('input', (event) => {
|
|
35102
35339
|
event.stopPropagation();
|
|
@@ -35108,7 +35345,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35108
35345
|
}
|
|
35109
35346
|
|
|
35110
35347
|
this.notifyValueChanged();
|
|
35111
|
-
});
|
|
35348
|
+
}, { signal });
|
|
35112
35349
|
|
|
35113
35350
|
input.addEventListener('auroFormElement-validated', (evt) => {
|
|
35114
35351
|
// not to bubble up input's validated event.
|
|
@@ -35124,7 +35361,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35124
35361
|
this.validity = evt.detail.validity;
|
|
35125
35362
|
this.errorMessage = evt.detail.message;
|
|
35126
35363
|
}
|
|
35127
|
-
});
|
|
35364
|
+
}, { signal });
|
|
35128
35365
|
});
|
|
35129
35366
|
}
|
|
35130
35367
|
|
|
@@ -35138,6 +35375,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
35138
35375
|
this.calendar.datepicker = this;
|
|
35139
35376
|
this.calendar.dropdown = this.dropdown;
|
|
35140
35377
|
|
|
35378
|
+
const { signal } = this._listenerAbortController;
|
|
35379
|
+
|
|
35141
35380
|
this.calendar.addEventListener('auroCalendar-dateSelected', () => {
|
|
35142
35381
|
if (this.inputList[0].value !== this.calendar.dateFrom && this.calendar.dateFrom !== undefined) {
|
|
35143
35382
|
this.inputList[0].value = this.convertWcTimeToDate(this.calendar.dateFrom);
|
|
@@ -35146,11 +35385,11 @@ class AuroDatePicker extends AuroElement {
|
|
|
35146
35385
|
if (this.inputList[1] && this.calendar.dateTo && this.inputList[1].value !== this.calendar.dateTo) {
|
|
35147
35386
|
this.inputList[1].value = this.convertWcTimeToDate(this.calendar.dateTo);
|
|
35148
35387
|
}
|
|
35149
|
-
});
|
|
35388
|
+
}, { signal });
|
|
35150
35389
|
|
|
35151
35390
|
this.calendar.addEventListener('auroCalendar-dismissRequest', () => {
|
|
35152
35391
|
this.dropdown.hide();
|
|
35153
|
-
});
|
|
35392
|
+
}, { signal });
|
|
35154
35393
|
|
|
35155
35394
|
this.calendar.addEventListener('auroCalendar-centralDateChanged', (event) => {
|
|
35156
35395
|
const match = this.centralDateObject && this.util.datesMatch(event.detail.date, this.centralDateObject);
|
|
@@ -35160,7 +35399,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35160
35399
|
}
|
|
35161
35400
|
|
|
35162
35401
|
this.notifyMonthChanged(event);
|
|
35163
|
-
});
|
|
35402
|
+
}, { signal });
|
|
35164
35403
|
}
|
|
35165
35404
|
|
|
35166
35405
|
/**
|
|
@@ -35169,10 +35408,17 @@ class AuroDatePicker extends AuroElement {
|
|
|
35169
35408
|
* @returns {void}
|
|
35170
35409
|
*/
|
|
35171
35410
|
configureDatepicker() {
|
|
35411
|
+
// These listeners are on `this` (the host), so they would GC with the
|
|
35412
|
+
// host even without the abort signal — see the leak rationale on
|
|
35413
|
+
// `_listenerAbortController`. The signal is still passed for uniform
|
|
35414
|
+
// cleanup semantics with the child-element listeners in the other
|
|
35415
|
+
// configure* methods.
|
|
35416
|
+
const { signal } = this._listenerAbortController;
|
|
35417
|
+
|
|
35172
35418
|
this.addEventListener('focusin', () => {
|
|
35173
35419
|
this.touched = true;
|
|
35174
35420
|
this.hasFocus = true;
|
|
35175
|
-
});
|
|
35421
|
+
}, { signal });
|
|
35176
35422
|
|
|
35177
35423
|
this.addEventListener('focusout', () => {
|
|
35178
35424
|
this.hasFocus = false;
|
|
@@ -35184,7 +35430,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35184
35430
|
if (!this.matches(':focus-within')) {
|
|
35185
35431
|
this.validate();
|
|
35186
35432
|
}
|
|
35187
|
-
});
|
|
35433
|
+
}, { signal });
|
|
35188
35434
|
|
|
35189
35435
|
if (this.valueObject) {
|
|
35190
35436
|
this.calendar.dateFrom = this.convertToWcValidTime(this.valueObject);
|
|
@@ -35382,6 +35628,36 @@ class AuroDatePicker extends AuroElement {
|
|
|
35382
35628
|
return this.validity !== undefined && this.validity !== 'valid';
|
|
35383
35629
|
}
|
|
35384
35630
|
|
|
35631
|
+
/**
|
|
35632
|
+
* Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
|
|
35633
|
+
* spans every datepicker instance on the page; lives on the class (not
|
|
35634
|
+
* at module scope) so it stays an encapsulated implementation detail of
|
|
35635
|
+
* this component and does not interfere with WCA's class-JSDoc
|
|
35636
|
+
* attachment.
|
|
35637
|
+
* @private
|
|
35638
|
+
*/
|
|
35639
|
+
static _warnedInvalidLocales = new Set();
|
|
35640
|
+
|
|
35641
|
+
/**
|
|
35642
|
+
* Logs a one-time `console.debug` when an unsupported locale falls back to
|
|
35643
|
+
* en-US. Deduped by the offending tag so noisy re-renders that resurface
|
|
35644
|
+
* the same bad value stay quiet, but each new bad value still signals so
|
|
35645
|
+
* consumers can spot the typo or missing tag.
|
|
35646
|
+
* @private
|
|
35647
|
+
* @param {string|undefined} badLocale - The locale value that failed.
|
|
35648
|
+
* @returns {void}
|
|
35649
|
+
*/
|
|
35650
|
+
_warnInvalidLocale(badLocale) {
|
|
35651
|
+
const key = String(badLocale ?? '');
|
|
35652
|
+
const seen = AuroDatePicker._warnedInvalidLocales;
|
|
35653
|
+
if (seen.has(key)) {
|
|
35654
|
+
return;
|
|
35655
|
+
}
|
|
35656
|
+
seen.add(key);
|
|
35657
|
+
// eslint-disable-next-line no-console
|
|
35658
|
+
console.debug(`[auro-datepicker] Locale "${key}" is not supported by Intl.DateTimeFormat. Falling back to "en-US". Pass a BCP 47 tag such as "en-US", "fr-FR", or "ja-JP".`);
|
|
35659
|
+
}
|
|
35660
|
+
|
|
35385
35661
|
/**
|
|
35386
35662
|
* Lifecycle method to check if the locale is valid.
|
|
35387
35663
|
* @ignore
|
|
@@ -35392,10 +35668,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35392
35668
|
if (changedProperties.has('locale')) {
|
|
35393
35669
|
try {
|
|
35394
35670
|
const supported = Intl.DateTimeFormat.supportedLocalesOf([this.locale], { localeMatcher: 'lookup' });
|
|
35395
|
-
|
|
35671
|
+
if (supported.length > 0) {
|
|
35672
|
+
this._validLocale = this.locale;
|
|
35673
|
+
} else {
|
|
35674
|
+
this._validLocale = 'en-US';
|
|
35675
|
+
this._warnInvalidLocale(this.locale);
|
|
35676
|
+
}
|
|
35396
35677
|
} catch {
|
|
35397
|
-
console.debug(`[AuroDatePicker] The locale "${this.locale}" is not valid. Falling back to "en-US".`); // eslint-disable-line no-console
|
|
35398
35678
|
this._validLocale = 'en-US';
|
|
35679
|
+
this._warnInvalidLocale(this.locale);
|
|
35399
35680
|
}
|
|
35400
35681
|
|
|
35401
35682
|
const previousLocaleFormat = getDateFormatFromLocale$1(changedProperties.get('locale'));
|
|
@@ -35477,8 +35758,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35477
35758
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35478
35759
|
// to prevent the displayed months from shifting
|
|
35479
35760
|
this.centralDate = this.value;
|
|
35480
|
-
//TODO: TEST THIS CHANGE
|
|
35481
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.value);
|
|
35482
35761
|
}
|
|
35483
35762
|
|
|
35484
35763
|
this.setHasValue();
|
|
@@ -35538,8 +35817,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35538
35817
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35539
35818
|
// to prevent the displayed months from shifting
|
|
35540
35819
|
this.centralDate = this.valueEnd;
|
|
35541
|
-
// TODO: TEST THIS CHANGE
|
|
35542
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.formattedValueEnd);
|
|
35543
35820
|
}
|
|
35544
35821
|
|
|
35545
35822
|
this.validate();
|
|
@@ -35681,7 +35958,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35681
35958
|
* @returns {void}
|
|
35682
35959
|
*/
|
|
35683
35960
|
configureClickHandler() {
|
|
35684
|
-
this.addEventListener('click', this.handleClick);
|
|
35961
|
+
this.addEventListener('click', this.handleClick, { signal: this._listenerAbortController.signal });
|
|
35685
35962
|
}
|
|
35686
35963
|
|
|
35687
35964
|
firstUpdated() {
|
|
@@ -35703,6 +35980,17 @@ class AuroDatePicker extends AuroElement {
|
|
|
35703
35980
|
this.locale = this.domHandler.getLocale(this);
|
|
35704
35981
|
}
|
|
35705
35982
|
|
|
35983
|
+
disconnectedCallback() {
|
|
35984
|
+
super.disconnectedCallback();
|
|
35985
|
+
// Defer so that re-parenting (auro-drawer slotting it into a dialog,
|
|
35986
|
+
// for example) does not abort listeners we still need after reconnect.
|
|
35987
|
+
queueMicrotask(() => {
|
|
35988
|
+
if (!this.isConnected) {
|
|
35989
|
+
this._listenerAbortController.abort();
|
|
35990
|
+
}
|
|
35991
|
+
});
|
|
35992
|
+
}
|
|
35993
|
+
|
|
35706
35994
|
// layout render methods
|
|
35707
35995
|
// ------------------------------------
|
|
35708
35996
|
|