@aurodesignsystem-dev/auro-formkit 0.0.0-pr1511.0 → 0.0.0-pr1511.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +4 -4
- package/components/combobox/demo/getting-started.min.js +4 -4
- package/components/combobox/demo/index.min.js +4 -4
- package/components/combobox/dist/index.js +4 -4
- package/components/combobox/dist/registered.js +4 -4
- package/components/counter/demo/customize.min.js +10 -3
- package/components/counter/demo/index.min.js +10 -3
- package/components/counter/dist/index.js +10 -3
- package/components/counter/dist/registered.js +10 -3
- 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 +609 -200
- package/components/datepicker/demo/index.min.js +609 -200
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +14 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +90 -6
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +78 -5
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +609 -200
- package/components/datepicker/dist/registered.js +609 -200
- package/components/dropdown/demo/customize.min.js +2 -2
- package/components/dropdown/demo/getting-started.min.js +2 -2
- package/components/dropdown/demo/index.min.js +2 -2
- package/components/dropdown/dist/index.js +2 -2
- package/components/dropdown/dist/registered.js +2 -2
- package/components/form/demo/customize.min.js +695 -232
- package/components/form/demo/getting-started.min.js +695 -232
- package/components/form/demo/index.min.js +695 -232
- package/components/form/demo/registerDemoDeps.min.js +695 -232
- 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 +63 -16
- package/components/select/demo/getting-started.min.js +63 -16
- package/components/select/demo/index.min.js +63 -16
- package/components/select/dist/index.js +63 -16
- package/components/select/dist/registered.js +63 -16
- package/custom-elements.json +1750 -1468
- package/package.json +6 -2
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -17
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -28
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -1373,7 +1373,7 @@ function normalizeDates$1(context, ...dates) {
|
|
|
1373
1373
|
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
1374
1374
|
* //=> Tue Sep 02 2014 00:00:00
|
|
1375
1375
|
*/
|
|
1376
|
-
function startOfDay$
|
|
1376
|
+
function startOfDay$1(date, options) {
|
|
1377
1377
|
const _date = toDate$1(date, options?.in);
|
|
1378
1378
|
_date.setHours(0, 0, 0, 0);
|
|
1379
1379
|
return _date;
|
|
@@ -1421,8 +1421,8 @@ function differenceInCalendarDays$1(laterDate, earlierDate, options) {
|
|
|
1421
1421
|
earlierDate,
|
|
1422
1422
|
);
|
|
1423
1423
|
|
|
1424
|
-
const laterStartOfDay = startOfDay$
|
|
1425
|
-
const earlierStartOfDay = startOfDay$
|
|
1424
|
+
const laterStartOfDay = startOfDay$1(laterDate_);
|
|
1425
|
+
const earlierStartOfDay = startOfDay$1(earlierDate_);
|
|
1426
1426
|
|
|
1427
1427
|
const laterTimestamp =
|
|
1428
1428
|
+laterStartOfDay - getTimezoneOffsetInMilliseconds$1(laterStartOfDay);
|
|
@@ -10904,8 +10904,8 @@ class RangeDatepickerCell extends i$1 {
|
|
|
10904
10904
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
10905
10905
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
10906
10906
|
if (day) {
|
|
10907
|
-
if (getTime(startOfDay$
|
|
10908
|
-
getTime(startOfDay$
|
|
10907
|
+
if (getTime(startOfDay$1(parsedDateTo * 1000)) / 1000 === day.date ||
|
|
10908
|
+
getTime(startOfDay$1(parsedDateFrom * 1000)) / 1000 === day.date) {
|
|
10909
10909
|
this.selected = true;
|
|
10910
10910
|
}
|
|
10911
10911
|
if (((hoveredDate === day.date || day.date < hoveredDate) &&
|
|
@@ -11093,7 +11093,7 @@ class RangeDatepickerCalendar extends i$1 {
|
|
|
11093
11093
|
this.dayNamesOfTheWeek = [];
|
|
11094
11094
|
this.daysOfMonth = [];
|
|
11095
11095
|
this._locale = null;
|
|
11096
|
-
this.currentDate = parseInt(format$1(startOfDay$
|
|
11096
|
+
this.currentDate = parseInt(format$1(startOfDay$1(Date.now()), 't'), 10);
|
|
11097
11097
|
this.localeChanged();
|
|
11098
11098
|
this.yearAndMonthChanged(this.year, this.month);
|
|
11099
11099
|
}
|
|
@@ -11567,7 +11567,7 @@ __decorate([n$4({ type: Array })], RangeDatepickerCalendar.prototype, "dayNamesO
|
|
|
11567
11567
|
__decorate([n$4({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
11568
11568
|
AuroLibraryRuntimeUtils$5.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
11569
11569
|
|
|
11570
|
-
var styleCss$5 = i$3`.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}`;
|
|
11570
|
+
var styleCss$5 = i$3`.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}`;
|
|
11571
11571
|
|
|
11572
11572
|
var colorCss$5 = i$3`: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}`;
|
|
11573
11573
|
|
|
@@ -11592,13 +11592,103 @@ let s$2 = class s{registerComponent(e,t){customElements.get(e)||customElements.d
|
|
|
11592
11592
|
|
|
11593
11593
|
var popoverVersion = '6.0.1';
|
|
11594
11594
|
|
|
11595
|
-
|
|
11595
|
+
/**
|
|
11596
|
+
* Single source of truth for parsing and matching blackout dates across the
|
|
11597
|
+
* datepicker. Both `auro-calendar` (memoized Set + `isDateBlackout`) and the
|
|
11598
|
+
* pre-`firstUpdated` fallback inside `auro-calendar-cell` route through these
|
|
11599
|
+
* helpers so the YYYY-MM-DD → seconds conversion and the merge-with-legacy
|
|
11600
|
+
* `disabledDays` rules are defined exactly once.
|
|
11601
|
+
*/
|
|
11596
11602
|
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11603
|
+
/**
|
|
11604
|
+
* Converts a `YYYY-MM-DD` ISO date string to a Unix timestamp (seconds)
|
|
11605
|
+
* representing local midnight on that calendar day. Returns `null` for
|
|
11606
|
+
* inputs that don't parse to a finite timestamp.
|
|
11607
|
+
*
|
|
11608
|
+
* Uses the `new Date(year, monthIndex, day)` constructor (NOT
|
|
11609
|
+
* `new Date(isoStr)`) so the result is local-midnight rather than UTC
|
|
11610
|
+
* midnight — required to keep the calendar grid aligned with the user's
|
|
11611
|
+
* local calendar day in negative-offset timezones.
|
|
11612
|
+
*
|
|
11613
|
+
* @param {string} isoStr - Date string in `YYYY-MM-DD` format.
|
|
11614
|
+
* @returns {number|null} Local-midnight Unix timestamp (seconds), or null.
|
|
11615
|
+
*/
|
|
11616
|
+
function parseIsoToTimestamp(isoStr) {
|
|
11617
|
+
if (typeof isoStr !== 'string') {
|
|
11618
|
+
return null;
|
|
11619
|
+
}
|
|
11620
|
+
const parts = isoStr.split('-');
|
|
11621
|
+
if (parts.length !== 3) {
|
|
11622
|
+
return null;
|
|
11623
|
+
}
|
|
11624
|
+
const year = parseInt(parts[0], 10);
|
|
11625
|
+
const month = parseInt(parts[1], 10);
|
|
11626
|
+
const day = parseInt(parts[2], 10);
|
|
11627
|
+
if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) {
|
|
11628
|
+
return null;
|
|
11629
|
+
}
|
|
11630
|
+
// Reject overflow values like "2024-13-40" — JS `new Date(year, month, day)`
|
|
11631
|
+
// silently normalizes those to a different calendar day, which would
|
|
11632
|
+
// disable the wrong date if we let the result through.
|
|
11633
|
+
if (month < 1 || month > 12 || day < 1 || day > 31) {
|
|
11634
|
+
return null;
|
|
11635
|
+
}
|
|
11636
|
+
const date = new Date(year, month - 1, day);
|
|
11637
|
+
// Guard the residual case where JS still rolls a value (e.g. Feb 30 → Mar 2).
|
|
11638
|
+
// After construction, getFullYear/getMonth/getDate should match the inputs.
|
|
11639
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
|
|
11640
|
+
return null;
|
|
11641
|
+
}
|
|
11642
|
+
const ts = Math.floor(date.getTime() / 1000);
|
|
11643
|
+
return Number.isFinite(ts) ? ts : null;
|
|
11644
|
+
}
|
|
11645
|
+
|
|
11646
|
+
/**
|
|
11647
|
+
* Builds a `Set<number>` of seconds-since-epoch timestamps covering both the
|
|
11648
|
+
* legacy `disabledDays` (already-numeric) array and the ISO `blackoutDates`
|
|
11649
|
+
* array. Use this for O(1) membership checks in hot paths.
|
|
11650
|
+
*
|
|
11651
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
11652
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
11653
|
+
* @returns {Set<number>}
|
|
11654
|
+
*/
|
|
11655
|
+
function buildBlackoutSet(disabledDays, blackoutDates) {
|
|
11656
|
+
const set = new Set();
|
|
11657
|
+
if (Array.isArray(disabledDays)) {
|
|
11658
|
+
for (const day of disabledDays) {
|
|
11659
|
+
const ts = parseInt(day, 10);
|
|
11660
|
+
if (Number.isFinite(ts)) {
|
|
11661
|
+
set.add(ts);
|
|
11662
|
+
}
|
|
11663
|
+
}
|
|
11664
|
+
}
|
|
11665
|
+
if (Array.isArray(blackoutDates)) {
|
|
11666
|
+
for (const isoStr of blackoutDates) {
|
|
11667
|
+
const ts = parseIsoToTimestamp(isoStr);
|
|
11668
|
+
if (ts !== null) {
|
|
11669
|
+
set.add(ts);
|
|
11670
|
+
}
|
|
11671
|
+
}
|
|
11672
|
+
}
|
|
11673
|
+
return set;
|
|
11674
|
+
}
|
|
11675
|
+
|
|
11676
|
+
/**
|
|
11677
|
+
* One-shot membership test for a single timestamp against both blackout
|
|
11678
|
+
* sources. Allocates a Set on each call; only use this in cold paths
|
|
11679
|
+
* (e.g. the pre-`firstUpdated` cell fallback). Hot paths should hold the
|
|
11680
|
+
* Set returned from `buildBlackoutSet` and `.has(ts)` directly.
|
|
11681
|
+
*
|
|
11682
|
+
* @param {number} dateTs - Unix timestamp (seconds) to test.
|
|
11683
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
11684
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
11685
|
+
* @returns {boolean}
|
|
11686
|
+
*/
|
|
11687
|
+
function isBlackoutTimestamp(dateTs, disabledDays, blackoutDates) {
|
|
11688
|
+
return buildBlackoutSet(disabledDays, blackoutDates).has(dateTs);
|
|
11689
|
+
}
|
|
11690
|
+
|
|
11691
|
+
/* 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 */
|
|
11602
11692
|
|
|
11603
11693
|
class AuroCalendarCell extends i$1 {
|
|
11604
11694
|
constructor() {
|
|
@@ -11646,6 +11736,14 @@ class AuroCalendarCell extends i$1 {
|
|
|
11646
11736
|
type: Boolean,
|
|
11647
11737
|
reflect: true
|
|
11648
11738
|
},
|
|
11739
|
+
/**
|
|
11740
|
+
* @deprecated Propagated from the legacy `auro-calendar.disabledDays`
|
|
11741
|
+
* Unix-timestamp array. The cell honors it for backward compatibility
|
|
11742
|
+
* (see the divergence-check fallback inside `isBlackout`), but
|
|
11743
|
+
* consumers should migrate to `auro-datepicker.blackoutDates`
|
|
11744
|
+
* (YYYY-MM-DD ISO strings). The calendar emits a one-time
|
|
11745
|
+
* deprecation warning the first time a non-empty value is observed.
|
|
11746
|
+
*/
|
|
11649
11747
|
disabledDays: { type: Array },
|
|
11650
11748
|
isCurrentDate: { type: Boolean },
|
|
11651
11749
|
locale: { type: String },
|
|
@@ -11691,8 +11789,8 @@ class AuroCalendarCell extends i$1 {
|
|
|
11691
11789
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11692
11790
|
|
|
11693
11791
|
if (day) {
|
|
11694
|
-
const departTimestamp =
|
|
11695
|
-
const returnTimestamp =
|
|
11792
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11793
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11696
11794
|
|
|
11697
11795
|
if (day.date === departTimestamp || day.date === returnTimestamp) {
|
|
11698
11796
|
this.selected = true;
|
|
@@ -11776,27 +11874,33 @@ class AuroCalendarCell extends i$1 {
|
|
|
11776
11874
|
return false;
|
|
11777
11875
|
}
|
|
11778
11876
|
|
|
11779
|
-
//
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
// Check against blackoutDates (ISO format YYYY-MM-DD) on the datepicker
|
|
11786
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
11787
|
-
|
|
11788
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
11789
|
-
const date = new Date(this.day.date * 1000);
|
|
11790
|
-
const yyyy = date.getFullYear();
|
|
11791
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
11792
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
11793
|
-
const cellDate = `${yyyy}-${mm}-${dd}`;
|
|
11794
|
-
if (blackoutDates.includes(cellDate)) {
|
|
11877
|
+
// Delegate to the calendar's memoized blackout Set for O(1) lookup
|
|
11878
|
+
// (instead of rescanning disabledDays + blackoutDates per render). The
|
|
11879
|
+
// Set is rebuilt only when either source array reference changes — see
|
|
11880
|
+
// auro-calendar.js#_getBlackoutSet.
|
|
11881
|
+
if (this.calendar && typeof this.calendar._getBlackoutSet === 'function') {
|
|
11882
|
+
if (this.calendar._getBlackoutSet().has(this.day.date)) {
|
|
11795
11883
|
return true;
|
|
11796
11884
|
}
|
|
11885
|
+
// If the cell's local disabledDays diverged from the calendar's (a
|
|
11886
|
+
// consumer or test mutated cell.disabledDays directly), the Set does
|
|
11887
|
+
// not reflect that addition — fall through to the per-cell scan only
|
|
11888
|
+
// when the reference no longer matches. Production data flow keeps
|
|
11889
|
+
// these identical, so this branch stays cold. Guarded with
|
|
11890
|
+
// Array.isArray to match `_getBlackoutSet`'s contract: non-array
|
|
11891
|
+
// values are treated as empty rather than crashing on `.findIndex`.
|
|
11892
|
+
if (Array.isArray(this.disabledDays) && this.disabledDays !== this.calendar.disabledDays && this.disabledDays.length > 0) {
|
|
11893
|
+
if (this.disabledDays.findIndex((dd) => parseInt(dd, 10) === this.day.date) !== -1) {
|
|
11894
|
+
return true;
|
|
11895
|
+
}
|
|
11896
|
+
}
|
|
11897
|
+
return false;
|
|
11797
11898
|
}
|
|
11798
11899
|
|
|
11799
|
-
|
|
11900
|
+
// Pre-firstUpdated fallback — the cell may render once before the
|
|
11901
|
+
// ancestor calendar is wired up. Routes through the shared
|
|
11902
|
+
// blackoutUtils helper so the parsing rules stay in one place.
|
|
11903
|
+
return isBlackoutTimestamp(this.day.date, this.disabledDays, this.datepicker?.blackoutDates);
|
|
11800
11904
|
}
|
|
11801
11905
|
|
|
11802
11906
|
/**
|
|
@@ -11902,12 +12006,12 @@ class AuroCalendarCell extends i$1 {
|
|
|
11902
12006
|
const parsedDateFrom = Number.parseInt(this.dateFrom, 10);
|
|
11903
12007
|
if (!Number.isFinite(parsedDateFrom)) return null;
|
|
11904
12008
|
|
|
11905
|
-
const departTimestamp =
|
|
12009
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11906
12010
|
const dayDate = this.day.date;
|
|
11907
12011
|
|
|
11908
12012
|
const parsedDateTo = Number.parseInt(this.dateTo, 10);
|
|
11909
12013
|
const hasDateTo = Number.isFinite(parsedDateTo);
|
|
11910
|
-
const returnTimestamp = hasDateTo ?
|
|
12014
|
+
const returnTimestamp = hasDateTo ? new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
11911
12015
|
|
|
11912
12016
|
if (dayDate === departTimestamp) return this.datepicker.rangeLabelStart || 'range start';
|
|
11913
12017
|
|
|
@@ -11917,7 +12021,9 @@ class AuroCalendarCell extends i$1 {
|
|
|
11917
12021
|
|
|
11918
12022
|
if (hasDateTo && dayDate > departTimestamp && dayDate < returnTimestamp) return this.datepicker.rangeLabelInRange || 'in range';
|
|
11919
12023
|
|
|
11920
|
-
|
|
12024
|
+
if (!hasDateTo && dayDate > departTimestamp) return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
12025
|
+
|
|
12026
|
+
// After end date when both dateFrom and dateTo are set.
|
|
11921
12027
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
11922
12028
|
}
|
|
11923
12029
|
|
|
@@ -11930,7 +12036,7 @@ class AuroCalendarCell extends i$1 {
|
|
|
11930
12036
|
*/
|
|
11931
12037
|
isDepartDate(day, dateFrom) {
|
|
11932
12038
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
11933
|
-
const departTimestamp =
|
|
12039
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11934
12040
|
|
|
11935
12041
|
return this.selected && day.date === departTimestamp;
|
|
11936
12042
|
}
|
|
@@ -11945,7 +12051,7 @@ class AuroCalendarCell extends i$1 {
|
|
|
11945
12051
|
*/
|
|
11946
12052
|
isReturnDate(day, dateFrom, dateTo) {
|
|
11947
12053
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11948
|
-
const returnTimestamp =
|
|
12054
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11949
12055
|
|
|
11950
12056
|
return this.selected && day.date === returnTimestamp && dateFrom;
|
|
11951
12057
|
}
|
|
@@ -12109,6 +12215,7 @@ class AuroCalendarCell extends i$1 {
|
|
|
12109
12215
|
setTimeout(() => this.firstUpdated(), 0);
|
|
12110
12216
|
return;
|
|
12111
12217
|
}
|
|
12218
|
+
this.calendar = calendar;
|
|
12112
12219
|
this.datepicker = calendar.datepicker;
|
|
12113
12220
|
this._slotContentHandler = () => {
|
|
12114
12221
|
this.handleSlotContent();
|
|
@@ -12166,12 +12273,13 @@ class AuroCalendarCell extends i$1 {
|
|
|
12166
12273
|
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
12167
12274
|
});
|
|
12168
12275
|
|
|
12169
|
-
//
|
|
12276
|
+
// Keep the host's gridcell aria attributes in sync with the day data.
|
|
12170
12277
|
this.updateHostAria();
|
|
12171
12278
|
}
|
|
12172
12279
|
|
|
12173
12280
|
// Update host aria when selection changes (aria-selected, range labels)
|
|
12174
|
-
|
|
12281
|
+
// or when isCurrentDate flips (aria-current).
|
|
12282
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('selected') || properties.has('isCurrentDate')) {
|
|
12175
12283
|
this.updateHostAria();
|
|
12176
12284
|
}
|
|
12177
12285
|
|
|
@@ -12182,8 +12290,8 @@ class AuroCalendarCell extends i$1 {
|
|
|
12182
12290
|
}
|
|
12183
12291
|
|
|
12184
12292
|
/**
|
|
12185
|
-
*
|
|
12186
|
-
*
|
|
12293
|
+
* Sets host-level ARIA so each cell exposes its date, selection state,
|
|
12294
|
+
* and blackout status to assistive tech browsing the month grid.
|
|
12187
12295
|
* @private
|
|
12188
12296
|
* @returns {void}
|
|
12189
12297
|
*/
|
|
@@ -12192,16 +12300,27 @@ class AuroCalendarCell extends i$1 {
|
|
|
12192
12300
|
|
|
12193
12301
|
const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
|
|
12194
12302
|
if (outOfRange) {
|
|
12303
|
+
// Strip every aria attribute the in-range branch may have set on a
|
|
12304
|
+
// previous render — if a cell flips from in-range to out-of-range
|
|
12305
|
+
// (calendar shifts months, minDate/maxDate change, etc.).
|
|
12195
12306
|
this.removeAttribute('role');
|
|
12196
12307
|
this.removeAttribute('aria-label');
|
|
12308
|
+
this.removeAttribute('aria-current');
|
|
12309
|
+
this.removeAttribute('aria-selected');
|
|
12310
|
+
this.removeAttribute('aria-disabled');
|
|
12197
12311
|
return;
|
|
12198
12312
|
}
|
|
12199
12313
|
|
|
12200
|
-
// The host acts as the gridcell for ariaActiveDescendantElement.
|
|
12201
12314
|
this.setAttribute('role', 'gridcell');
|
|
12202
12315
|
this.setAttribute('aria-label', this.getAriaLabel());
|
|
12203
12316
|
this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
|
|
12204
12317
|
|
|
12318
|
+
if (this.isCurrentDate) {
|
|
12319
|
+
this.setAttribute('aria-current', 'date');
|
|
12320
|
+
} else {
|
|
12321
|
+
this.removeAttribute('aria-current');
|
|
12322
|
+
}
|
|
12323
|
+
|
|
12205
12324
|
if (this.isBlackout()) {
|
|
12206
12325
|
this.setAttribute('aria-disabled', 'true');
|
|
12207
12326
|
} else {
|
|
@@ -12216,7 +12335,7 @@ class AuroCalendarCell extends i$1 {
|
|
|
12216
12335
|
* @returns {void}
|
|
12217
12336
|
*/
|
|
12218
12337
|
focusButton() {
|
|
12219
|
-
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([
|
|
12338
|
+
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([disabled])');
|
|
12220
12339
|
if (button) {
|
|
12221
12340
|
button.focus({ focusVisible: true });
|
|
12222
12341
|
}
|
|
@@ -12224,7 +12343,9 @@ class AuroCalendarCell extends i$1 {
|
|
|
12224
12343
|
|
|
12225
12344
|
/**
|
|
12226
12345
|
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
12227
|
-
*
|
|
12346
|
+
* Buttons stay tabindex="-1" because DOM focus stays on the grid wrapper —
|
|
12347
|
+
* arrow keys move the active cell imperatively and the live region carries
|
|
12348
|
+
* the SR announcement.
|
|
12228
12349
|
* @returns {void}
|
|
12229
12350
|
*/
|
|
12230
12351
|
setActive() {
|
|
@@ -12266,10 +12387,13 @@ class AuroCalendarCell extends i$1 {
|
|
|
12266
12387
|
if (!btn || !this.day) return;
|
|
12267
12388
|
|
|
12268
12389
|
const dayDate = this.day.date;
|
|
12269
|
-
const departTimestamp =
|
|
12390
|
+
const departTimestamp = new Date(dateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
12270
12391
|
const isInRange = dayDate > departTimestamp && dayDate < hoveredDate;
|
|
12271
|
-
|
|
12272
|
-
|
|
12392
|
+
// `>=` so hovering the depart cell itself (a same-day round-trip
|
|
12393
|
+
// preview) still surfaces a visual cue: the depart cell receives both
|
|
12394
|
+
// rangeDepartDate and lastHoveredDate.
|
|
12395
|
+
const isLastHovered = dayDate === hoveredDate && hoveredDate >= departTimestamp;
|
|
12396
|
+
const isDepartWithPreview = dayDate === departTimestamp && hoveredDate >= departTimestamp;
|
|
12273
12397
|
|
|
12274
12398
|
btn.classList.toggle('inRange', isInRange);
|
|
12275
12399
|
btn.classList.toggle('lastHoveredDate', isLastHovered);
|
|
@@ -12327,7 +12451,6 @@ class AuroCalendarCell extends i$1 {
|
|
|
12327
12451
|
@focus="${outOfRange ? undefined : this.handleFocus}"
|
|
12328
12452
|
class="${e$4(buttonClasses)}"
|
|
12329
12453
|
?disabled="${outOfRange}"
|
|
12330
|
-
aria-hidden="${outOfRange ? 'true' : A$4}"
|
|
12331
12454
|
tabindex="-1">
|
|
12332
12455
|
<div class="buttonWrapper" aria-hidden="true">
|
|
12333
12456
|
<div class="currentDayMarker">${this.day?.title || A$4}</div>
|
|
@@ -13439,7 +13562,7 @@ class AuroBibtemplate extends i$1 {
|
|
|
13439
13562
|
}
|
|
13440
13563
|
}
|
|
13441
13564
|
|
|
13442
|
-
var formkitVersion$2 = '
|
|
13565
|
+
var formkitVersion$2 = '202606261928';
|
|
13443
13566
|
|
|
13444
13567
|
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=i$5`${s$5(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$4 = 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$3=i$3`: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}
|
|
13445
13568
|
`,u$6=i$3`.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}}
|
|
@@ -13562,7 +13685,11 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13562
13685
|
this.calendarRangeMonths = null;
|
|
13563
13686
|
|
|
13564
13687
|
/**
|
|
13565
|
-
*
|
|
13688
|
+
* @deprecated Use `auro-datepicker.blackoutDates` (an array of
|
|
13689
|
+
* `YYYY-MM-DD` ISO strings) instead. This legacy array of Unix
|
|
13690
|
+
* timestamps is still honored for backward compatibility but emits a
|
|
13691
|
+
* one-time `console.debug` the first time a non-empty value is observed.
|
|
13692
|
+
* Support will be removed in a future major release.
|
|
13566
13693
|
* @private
|
|
13567
13694
|
*/
|
|
13568
13695
|
this.disabledDays = [];
|
|
@@ -13819,17 +13946,44 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13819
13946
|
* @returns {void}
|
|
13820
13947
|
*/
|
|
13821
13948
|
updateActiveCellForVisibleMonth() {
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
requestAnimationFrame(() => {
|
|
13825
|
-
requestAnimationFrame(() => {
|
|
13826
|
-
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13949
|
+
this._afterMonthRender(() => {
|
|
13950
|
+
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13827
13951
|
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13952
|
+
if (newDate !== null && newDate !== undefined) {
|
|
13953
|
+
this.activeCellDate = newDate;
|
|
13954
|
+
this.setActiveCell(this.activeCellDate);
|
|
13955
|
+
}
|
|
13956
|
+
});
|
|
13957
|
+
}
|
|
13958
|
+
|
|
13959
|
+
/**
|
|
13960
|
+
* Schedules `callback` two animation frames out, giving the child
|
|
13961
|
+
* `auro-formkit-calendar-month` and `auro-formkit-calendar-cell` elements
|
|
13962
|
+
* a full render-and-paint cycle to settle before the callback reads or
|
|
13963
|
+
* mutates DOM.
|
|
13964
|
+
*
|
|
13965
|
+
* Why two frames, not one:
|
|
13966
|
+
* 1. Lit batches property updates and renders in a microtask, so frame N
|
|
13967
|
+
* schedules the render but the new DOM may not be painted yet.
|
|
13968
|
+
* 2. Cells re-cache `_cachedButton` inside their own `updateComplete.then`,
|
|
13969
|
+
* which also lands a tick later. Reading buttons from frame N+1
|
|
13970
|
+
* (after both renders + cache refresh have flushed) reliably hits the
|
|
13971
|
+
* new month's cells.
|
|
13972
|
+
*
|
|
13973
|
+
* Used by every code path that calls `handleNextMonth`/`handlePrevMonth`
|
|
13974
|
+
* and then needs to inspect the freshly-rendered cells (cross-month
|
|
13975
|
+
* keyboard nav, boundary events, `updateActiveCellForVisibleMonth`).
|
|
13976
|
+
* Do NOT collapse to a single rAF — it intermittently lands before
|
|
13977
|
+
* `_cachedButton` is refreshed, which silently breaks focus restoration
|
|
13978
|
+
* and `setActiveCell` lookups.
|
|
13979
|
+
* @private
|
|
13980
|
+
* @param {() => void} callback - Runs once after the month re-render and
|
|
13981
|
+
* the cells' button caches have refreshed.
|
|
13982
|
+
* @returns {void}
|
|
13983
|
+
*/
|
|
13984
|
+
_afterMonthRender(callback) {
|
|
13985
|
+
requestAnimationFrame(() => {
|
|
13986
|
+
requestAnimationFrame(callback);
|
|
13833
13987
|
});
|
|
13834
13988
|
}
|
|
13835
13989
|
|
|
@@ -13947,6 +14101,47 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13947
14101
|
return Array.from(this.shadowRoot.querySelectorAll('auro-formkit-calendar-month'));
|
|
13948
14102
|
}
|
|
13949
14103
|
|
|
14104
|
+
/**
|
|
14105
|
+
* Picks the focusable cell whose date is closest to targetTs. Used as a
|
|
14106
|
+
* fallback after a month-boundary nav when the exact target date isn't
|
|
14107
|
+
* focusable — typically because the month re-render lagged or the date
|
|
14108
|
+
* was filtered out by isOutOfRange. When two cells are equidistant, the
|
|
14109
|
+
* navigation direction breaks the tie so the user moves the way they
|
|
14110
|
+
* pressed (forward → later cell, backward → earlier cell).
|
|
14111
|
+
* @private
|
|
14112
|
+
* @param {Array} cells - Focusable cells from getAllFocusableCells.
|
|
14113
|
+
* @param {Number} targetTs - Desired Unix timestamp (seconds).
|
|
14114
|
+
* @param {'next'|'prev'} direction - Navigation direction.
|
|
14115
|
+
* @returns {Object|null} The nearest cell, or null when cells is empty.
|
|
14116
|
+
*/
|
|
14117
|
+
pickNearestCell(cells, targetTs, direction) {
|
|
14118
|
+
if (!cells.length) {
|
|
14119
|
+
return null;
|
|
14120
|
+
}
|
|
14121
|
+
const forward = direction === 'next';
|
|
14122
|
+
let best = null;
|
|
14123
|
+
let bestDelta = Infinity;
|
|
14124
|
+
cells.forEach((cell) => {
|
|
14125
|
+
if (!cell.day) {
|
|
14126
|
+
return;
|
|
14127
|
+
}
|
|
14128
|
+
const distance = Math.abs(cell.day.date - targetTs);
|
|
14129
|
+
if (distance < bestDelta) {
|
|
14130
|
+
best = cell;
|
|
14131
|
+
bestDelta = distance;
|
|
14132
|
+
return;
|
|
14133
|
+
}
|
|
14134
|
+
if (distance === bestDelta && best) {
|
|
14135
|
+
if (forward && cell.day.date > best.day.date) {
|
|
14136
|
+
best = cell;
|
|
14137
|
+
} else if (!forward && cell.day.date < best.day.date) {
|
|
14138
|
+
best = cell;
|
|
14139
|
+
}
|
|
14140
|
+
}
|
|
14141
|
+
});
|
|
14142
|
+
return best;
|
|
14143
|
+
}
|
|
14144
|
+
|
|
13950
14145
|
/**
|
|
13951
14146
|
* Gets all focusable cells across all rendered months.
|
|
13952
14147
|
* @private
|
|
@@ -13963,9 +14158,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13963
14158
|
|
|
13964
14159
|
/**
|
|
13965
14160
|
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
13966
|
-
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
13967
|
-
*
|
|
13968
|
-
*
|
|
14161
|
+
* Uses imperative DOM manipulation — no Lit re-render triggered. DOM focus
|
|
14162
|
+
* stays on the grid wrapper; the live region (see getOrCreateLiveRegion)
|
|
14163
|
+
* is what announces the active cell to assistive tech.
|
|
13969
14164
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
13970
14165
|
* @returns {void}
|
|
13971
14166
|
*/
|
|
@@ -14046,6 +14241,65 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14046
14241
|
this.clearRangePreview();
|
|
14047
14242
|
}
|
|
14048
14243
|
|
|
14244
|
+
/**
|
|
14245
|
+
* Returns a memoized Set of blackout timestamps (seconds) drawn from both
|
|
14246
|
+
* the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
|
|
14247
|
+
* The cache invalidates when either source array's reference changes, which
|
|
14248
|
+
* matches Lit's own reactive identity semantics for array properties.
|
|
14249
|
+
* @private
|
|
14250
|
+
* @returns {Set<Number>}
|
|
14251
|
+
*/
|
|
14252
|
+
_getBlackoutSet() {
|
|
14253
|
+
// Normalize non-array values to a stable `null` sentinel rather than a
|
|
14254
|
+
// fresh `[]` per call — otherwise the reference-identity cache key
|
|
14255
|
+
// (`_cachedBlackoutDisabledDays === disabledDays`) never matches on
|
|
14256
|
+
// subsequent calls and the Set rebuilds every time. `buildBlackoutSet`
|
|
14257
|
+
// already treats null/non-array as "no legacy disabledDays" via its
|
|
14258
|
+
// own Array.isArray gate.
|
|
14259
|
+
const disabledDays = Array.isArray(this.disabledDays) ? this.disabledDays : null;
|
|
14260
|
+
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14261
|
+
if (this._blackoutSet &&
|
|
14262
|
+
this._cachedBlackoutDisabledDays === disabledDays &&
|
|
14263
|
+
this._cachedBlackoutDates === blackoutDates) {
|
|
14264
|
+
return this._blackoutSet;
|
|
14265
|
+
}
|
|
14266
|
+
|
|
14267
|
+
if (disabledDays && disabledDays.length > 0) {
|
|
14268
|
+
this._warnDisabledDaysDeprecated();
|
|
14269
|
+
}
|
|
14270
|
+
|
|
14271
|
+
this._blackoutSet = buildBlackoutSet(disabledDays, blackoutDates);
|
|
14272
|
+
this._cachedBlackoutDisabledDays = disabledDays;
|
|
14273
|
+
this._cachedBlackoutDates = blackoutDates;
|
|
14274
|
+
return this._blackoutSet;
|
|
14275
|
+
}
|
|
14276
|
+
|
|
14277
|
+
/**
|
|
14278
|
+
* Per-class flag that gates the `disabledDays` deprecation warning so it
|
|
14279
|
+
* fires exactly once per page no matter how many calendars or rebuild
|
|
14280
|
+
* cycles encounter the legacy array.
|
|
14281
|
+
* @private
|
|
14282
|
+
*/
|
|
14283
|
+
static _warnedDisabledDaysDeprecation = false;
|
|
14284
|
+
|
|
14285
|
+
/**
|
|
14286
|
+
* One-time `console.debug` directing consumers from the legacy
|
|
14287
|
+
* `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
|
|
14288
|
+
* the first time `_getBlackoutSet` rebuilds from a non-empty
|
|
14289
|
+
* `disabledDays`; subsequent calls (on this or any other AuroCalendar
|
|
14290
|
+
* instance on the page) are silent.
|
|
14291
|
+
* @private
|
|
14292
|
+
* @returns {void}
|
|
14293
|
+
*/
|
|
14294
|
+
_warnDisabledDaysDeprecated() {
|
|
14295
|
+
if (AuroCalendar._warnedDisabledDaysDeprecation) {
|
|
14296
|
+
return;
|
|
14297
|
+
}
|
|
14298
|
+
AuroCalendar._warnedDisabledDaysDeprecation = true;
|
|
14299
|
+
// eslint-disable-next-line no-console
|
|
14300
|
+
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.');
|
|
14301
|
+
}
|
|
14302
|
+
|
|
14049
14303
|
/**
|
|
14050
14304
|
* Computes the initial active date from data properties alone — no DOM required.
|
|
14051
14305
|
* Priority:
|
|
@@ -14090,21 +14344,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14090
14344
|
const minTs = Number.isFinite(rawMin) ? rawMin : -Infinity;
|
|
14091
14345
|
const maxTs = Number.isFinite(rawMax) ? rawMax : Infinity;
|
|
14092
14346
|
|
|
14093
|
-
// Build a Set of blackout timestamps for O(1) lookup.
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
14098
|
-
const isoBlackouts = this.datepicker?.blackoutDates;
|
|
14099
|
-
if (Array.isArray(isoBlackouts)) {
|
|
14100
|
-
for (const isoStr of isoBlackouts) {
|
|
14101
|
-
const parts = isoStr.split('-');
|
|
14102
|
-
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
14103
|
-
if (Number.isFinite(ts)) {
|
|
14104
|
-
blackoutSet.add(ts);
|
|
14105
|
-
}
|
|
14106
|
-
}
|
|
14107
|
-
}
|
|
14347
|
+
// Build a Set of blackout timestamps for O(1) lookup. Memoized by the
|
|
14348
|
+
// identity of the source arrays so rapid month nav doesn't rebuild the
|
|
14349
|
+
// Set (and re-parse every ISO string) on every keypress.
|
|
14350
|
+
const blackoutSet = this._getBlackoutSet();
|
|
14108
14351
|
|
|
14109
14352
|
/**
|
|
14110
14353
|
* A date (unix timestamp in seconds, midnight-aligned) is "enabled" when
|
|
@@ -14300,8 +14543,8 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14300
14543
|
|
|
14301
14544
|
/**
|
|
14302
14545
|
* Handles arrow key navigation on the calendar grid wrapper.
|
|
14303
|
-
* Focus stays on the grid wrapper; only
|
|
14304
|
-
*
|
|
14546
|
+
* Focus stays on the grid wrapper; only the visual active-cell indicator
|
|
14547
|
+
* changes. The live region announces the new active cell.
|
|
14305
14548
|
* @private
|
|
14306
14549
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
14307
14550
|
* @returns {void}
|
|
@@ -14366,21 +14609,21 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14366
14609
|
} else {
|
|
14367
14610
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14368
14611
|
}
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
14612
|
+
this._afterMonthRender(() => {
|
|
14613
|
+
const cells = this.getAllFocusableCells();
|
|
14614
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetTs);
|
|
14615
|
+
if (target) {
|
|
14616
|
+
this.setActiveCell(target.day.date);
|
|
14617
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14618
|
+
} else {
|
|
14619
|
+
const fallback = this.pickNearestCell(cells, targetTs, navDir);
|
|
14620
|
+
if (fallback) {
|
|
14378
14621
|
this.setActiveCell(fallback.day.date);
|
|
14379
14622
|
this.handleCellFocused({ detail: { date: fallback.day.date } });
|
|
14380
14623
|
}
|
|
14381
|
-
|
|
14382
|
-
|
|
14383
|
-
|
|
14624
|
+
}
|
|
14625
|
+
// Re-focus grid wrapper after month change re-render
|
|
14626
|
+
this.focusActiveCell();
|
|
14384
14627
|
});
|
|
14385
14628
|
}
|
|
14386
14629
|
}
|
|
@@ -14406,26 +14649,20 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14406
14649
|
} else {
|
|
14407
14650
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14408
14651
|
}
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
if (navDirection === 'next') {
|
|
14420
|
-
[nearest] = cells;
|
|
14421
|
-
} else {
|
|
14422
|
-
nearest = cells[cells.length - 1];
|
|
14423
|
-
}
|
|
14652
|
+
this._afterMonthRender(() => {
|
|
14653
|
+
const cells = this.getAllFocusableCells();
|
|
14654
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14655
|
+
if (target) {
|
|
14656
|
+
this.setActiveCell(target.day.date);
|
|
14657
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14658
|
+
} else {
|
|
14659
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14660
|
+
if (nearest) {
|
|
14424
14661
|
this.setActiveCell(nearest.day.date);
|
|
14425
14662
|
this.handleCellFocused({ detail: { date: nearest.day.date } });
|
|
14426
14663
|
}
|
|
14427
|
-
|
|
14428
|
-
|
|
14664
|
+
}
|
|
14665
|
+
this.focusActiveCell();
|
|
14429
14666
|
});
|
|
14430
14667
|
}
|
|
14431
14668
|
}
|
|
@@ -14475,19 +14712,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14475
14712
|
}
|
|
14476
14713
|
|
|
14477
14714
|
this.handleNextMonth({ skipActiveUpdate: true });
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14715
|
+
this._afterMonthRender(() => {
|
|
14716
|
+
const cells = this.getAllFocusableCells();
|
|
14717
|
+
const target = cells.find((cell) => cell.day && cell.day.date === nextTs);
|
|
14718
|
+
if (target) {
|
|
14719
|
+
this.setActiveCell(target.day.date);
|
|
14720
|
+
this.focusActiveCell();
|
|
14721
|
+
} else {
|
|
14722
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14723
|
+
// `cells[length - 1]` would land on the end of the new month,
|
|
14724
|
+
// far from the user's intended `nextTs`.
|
|
14725
|
+
const fallback = this.pickNearestCell(cells, nextTs, 'next');
|
|
14726
|
+
if (fallback) {
|
|
14727
|
+
this.setActiveCell(fallback.day.date);
|
|
14488
14728
|
this.focusActiveCell();
|
|
14489
14729
|
}
|
|
14490
|
-
}
|
|
14730
|
+
}
|
|
14491
14731
|
});
|
|
14492
14732
|
} else if (direction === 'prev' && this.showPrevMonthBtn) {
|
|
14493
14733
|
// Navigate to previous month and focus the computed previous date.
|
|
@@ -14501,19 +14741,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14501
14741
|
}
|
|
14502
14742
|
|
|
14503
14743
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14744
|
+
this._afterMonthRender(() => {
|
|
14745
|
+
const cells = this.getAllFocusableCells();
|
|
14746
|
+
const target = cells.find((cell) => cell.day && cell.day.date === prevTs);
|
|
14747
|
+
if (target) {
|
|
14748
|
+
this.setActiveCell(target.day.date);
|
|
14749
|
+
this.focusActiveCell();
|
|
14750
|
+
} else {
|
|
14751
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14752
|
+
// `cells[0]` would land on the start of the previous month, far
|
|
14753
|
+
// from the user's intended `prevTs`.
|
|
14754
|
+
const fallback = this.pickNearestCell(cells, prevTs, 'prev');
|
|
14755
|
+
if (fallback) {
|
|
14756
|
+
this.setActiveCell(fallback.day.date);
|
|
14514
14757
|
this.focusActiveCell();
|
|
14515
14758
|
}
|
|
14516
|
-
}
|
|
14759
|
+
}
|
|
14517
14760
|
});
|
|
14518
14761
|
}
|
|
14519
14762
|
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
@@ -14541,20 +14784,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14541
14784
|
} else {
|
|
14542
14785
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14543
14786
|
}
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14787
|
+
this._afterMonthRender(() => {
|
|
14788
|
+
const cells = this.getAllFocusableCells();
|
|
14789
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14790
|
+
if (target) {
|
|
14791
|
+
this.setActiveCell(target.day.date);
|
|
14792
|
+
this.focusActiveCell();
|
|
14793
|
+
} else {
|
|
14794
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — the
|
|
14795
|
+
// old direction-based `cells[0]`/`cells[length-1]` clamp
|
|
14796
|
+
// could land 25+ days from the intended target.
|
|
14797
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14798
|
+
if (nearest) {
|
|
14554
14799
|
this.setActiveCell(nearest.day.date);
|
|
14555
14800
|
this.focusActiveCell();
|
|
14556
14801
|
}
|
|
14557
|
-
}
|
|
14802
|
+
}
|
|
14558
14803
|
});
|
|
14559
14804
|
}
|
|
14560
14805
|
}
|
|
@@ -14593,8 +14838,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14593
14838
|
return;
|
|
14594
14839
|
}
|
|
14595
14840
|
|
|
14596
|
-
//
|
|
14597
|
-
// so
|
|
14841
|
+
// DOM focus stays on the grid wrapper while arrow keys move the active
|
|
14842
|
+
// cell, so cell buttons never receive native focus. The debounced live
|
|
14843
|
+
// region carries the full-context announcement instead.
|
|
14598
14844
|
const announcement = this.buildFocusAnnouncement(date);
|
|
14599
14845
|
this.announceFocusDebounced(announcement);
|
|
14600
14846
|
|
|
@@ -14664,10 +14910,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14664
14910
|
return null;
|
|
14665
14911
|
}
|
|
14666
14912
|
|
|
14667
|
-
const departTs =
|
|
14913
|
+
const departTs = new Date(parsedFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
14668
14914
|
const parsedTo = Number.parseInt(this.dateTo, 10);
|
|
14669
14915
|
const hasTo = Number.isFinite(parsedTo);
|
|
14670
|
-
const returnTs = hasTo ?
|
|
14916
|
+
const returnTs = hasTo ? new Date(parsedTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
14671
14917
|
|
|
14672
14918
|
if (date === departTs) {
|
|
14673
14919
|
return this.datepicker.rangeLabelStart || 'range start';
|
|
@@ -14681,36 +14927,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14681
14927
|
if (hasTo && date > departTs && date < returnTs) {
|
|
14682
14928
|
return this.datepicker.rangeLabelInRange || 'in range';
|
|
14683
14929
|
}
|
|
14930
|
+
if (!hasTo && date > departTs) {
|
|
14931
|
+
return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
14932
|
+
}
|
|
14684
14933
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
14685
14934
|
}
|
|
14686
14935
|
|
|
14687
14936
|
/**
|
|
14688
|
-
* Checks whether a given date is a blackout date.
|
|
14937
|
+
* Checks whether a given date is a blackout date. Delegates to the
|
|
14938
|
+
* memoized `_getBlackoutSet` so the YYYY-MM-DD parsing and the
|
|
14939
|
+
* legacy/ISO merge rules live in exactly one place (see `blackoutUtils.js`).
|
|
14689
14940
|
* @private
|
|
14690
14941
|
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
14691
14942
|
* @returns {Boolean} True if the date is blacked out.
|
|
14692
14943
|
*/
|
|
14693
14944
|
isDateBlackout(dateTs) {
|
|
14694
|
-
|
|
14695
|
-
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0) {
|
|
14696
|
-
if (this.disabledDays.findIndex((day) => parseInt(day, 10) === dateTs) !== -1) {
|
|
14697
|
-
return true;
|
|
14698
|
-
}
|
|
14699
|
-
}
|
|
14700
|
-
|
|
14701
|
-
// Check ISO blackoutDates.
|
|
14702
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14703
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
14704
|
-
const date = new Date(dateTs * 1000);
|
|
14705
|
-
const yyyy = date.getFullYear();
|
|
14706
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
14707
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
14708
|
-
if (blackoutDates.includes(`${yyyy}-${mm}-${dd}`)) {
|
|
14709
|
-
return true;
|
|
14710
|
-
}
|
|
14711
|
-
}
|
|
14712
|
-
|
|
14713
|
-
return false;
|
|
14945
|
+
return this._getBlackoutSet().has(dateTs);
|
|
14714
14946
|
}
|
|
14715
14947
|
|
|
14716
14948
|
/**
|
|
@@ -14877,9 +15109,34 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14877
15109
|
// the last one.
|
|
14878
15110
|
if (this._announceRafId) {
|
|
14879
15111
|
cancelAnimationFrame(this._announceRafId);
|
|
15112
|
+
this._announceRafId = null;
|
|
14880
15113
|
}
|
|
15114
|
+
this._deliverAnnouncement(dateStr, 0);
|
|
15115
|
+
}
|
|
15116
|
+
|
|
15117
|
+
/**
|
|
15118
|
+
* Writes `dateStr` to the live region. If the dropdown's dialog hasn't
|
|
15119
|
+
* mounted yet (so getOrCreateLiveRegion can't attach), retries on the
|
|
15120
|
+
* next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
|
|
15121
|
+
* dropping the announcement. The retry uses the same `_announceRafId`
|
|
15122
|
+
* the double-rAF below uses, so a newer announceSelection call (or
|
|
15123
|
+
* disconnectedCallback) cancels any in-flight retry.
|
|
15124
|
+
* @private
|
|
15125
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
15126
|
+
* @param {Number} attempts - Number of prior retry attempts.
|
|
15127
|
+
* @returns {void}
|
|
15128
|
+
*/
|
|
15129
|
+
_deliverAnnouncement(dateStr, attempts) {
|
|
14881
15130
|
const liveRegion = this.getOrCreateLiveRegion();
|
|
14882
15131
|
if (!liveRegion) {
|
|
15132
|
+
const MAX_LIVE_REGION_RETRIES = 10;
|
|
15133
|
+
if (attempts < MAX_LIVE_REGION_RETRIES) {
|
|
15134
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
15135
|
+
this._deliverAnnouncement(dateStr, attempts + 1);
|
|
15136
|
+
});
|
|
15137
|
+
} else {
|
|
15138
|
+
this._announceRafId = null;
|
|
15139
|
+
}
|
|
14883
15140
|
return;
|
|
14884
15141
|
}
|
|
14885
15142
|
|
|
@@ -15065,7 +15322,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
15065
15322
|
</button>
|
|
15066
15323
|
` : undefined}
|
|
15067
15324
|
</div>
|
|
15068
|
-
<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}">
|
|
15325
|
+
<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}">
|
|
15069
15326
|
${this.renderAllCalendars()}
|
|
15070
15327
|
</div>
|
|
15071
15328
|
</div>
|
|
@@ -18974,7 +19231,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$1 {
|
|
|
18974
19231
|
}
|
|
18975
19232
|
};
|
|
18976
19233
|
|
|
18977
|
-
var formkitVersion$1 = '
|
|
19234
|
+
var formkitVersion$1 = '202606261928';
|
|
18978
19235
|
|
|
18979
19236
|
let AuroElement$2 = class AuroElement extends i$1 {
|
|
18980
19237
|
static get properties() {
|
|
@@ -20246,7 +20503,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
20246
20503
|
role="${o$2(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
20247
20504
|
aria-expanded="${o$2(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
20248
20505
|
aria-controls="${o$2(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
20249
|
-
aria-haspopup="${o$2(this.a11yRole === 'combobox' ? 'listbox' : undefined)}"
|
|
20506
|
+
aria-haspopup="${o$2(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
20250
20507
|
aria-labelledby="${o$2(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
20251
20508
|
aria-disabled="${o$2(this.disabled ? 'true' : undefined)}"
|
|
20252
20509
|
@focusin="${this.handleFocusin}"
|
|
@@ -32575,7 +32832,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$1 {
|
|
|
32575
32832
|
}
|
|
32576
32833
|
};
|
|
32577
32834
|
|
|
32578
|
-
var formkitVersion = '
|
|
32835
|
+
var formkitVersion = '202606261928';
|
|
32579
32836
|
|
|
32580
32837
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
32581
32838
|
// See LICENSE in the project root for license information.
|
|
@@ -34052,6 +34309,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34052
34309
|
this.rangeLabelBeforeRange = 'before range';
|
|
34053
34310
|
this.rangeLabelInRange = 'in range';
|
|
34054
34311
|
this.rangeLabelAfterRange = 'after range';
|
|
34312
|
+
this.rangeLabelEndPreview = 'previewing range end';
|
|
34055
34313
|
this.blackoutDates = [];
|
|
34056
34314
|
this.blackoutLabel = 'unavailable';
|
|
34057
34315
|
this.navLabelPrevMonth = 'Previous month';
|
|
@@ -34151,6 +34409,22 @@ class AuroDatePicker extends AuroElement {
|
|
|
34151
34409
|
*/
|
|
34152
34410
|
this.handleClick = this.handleClick.bind(this);
|
|
34153
34411
|
|
|
34412
|
+
/**
|
|
34413
|
+
* Single AbortController shared by every listener registered in the
|
|
34414
|
+
* configure* methods. Lets disconnectedCallback tear all of them down
|
|
34415
|
+
* with one abort() call.
|
|
34416
|
+
*
|
|
34417
|
+
* The genuine leak risk is the listeners attached to children that can
|
|
34418
|
+
* outlive the host if they get reparented — `this.dropdown`,
|
|
34419
|
+
* `this.calendar`, and the inputs inside the dropdown's slot.
|
|
34420
|
+
* Listeners attached to `this` (e.g. focusin/focusout on the host)
|
|
34421
|
+
* form a self-contained reference graph that the GC can collect with
|
|
34422
|
+
* the host anyway, but they share the same signal so the cleanup
|
|
34423
|
+
* pattern stays uniform across all configure* sites.
|
|
34424
|
+
* @private
|
|
34425
|
+
*/
|
|
34426
|
+
this._listenerAbortController = new AbortController();
|
|
34427
|
+
|
|
34154
34428
|
/**
|
|
34155
34429
|
* @private
|
|
34156
34430
|
*/
|
|
@@ -34199,6 +34473,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34199
34473
|
|
|
34200
34474
|
/**
|
|
34201
34475
|
* Label announced for blackout (disabled but in-range) date cells.
|
|
34476
|
+
* @default 'unavailable'
|
|
34202
34477
|
*/
|
|
34203
34478
|
blackoutLabel: {
|
|
34204
34479
|
type: String,
|
|
@@ -34215,6 +34490,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34215
34490
|
|
|
34216
34491
|
/**
|
|
34217
34492
|
* Accessible label for the calendar grid containing the days of the month.
|
|
34493
|
+
* @default 'Calendar days of the month'
|
|
34218
34494
|
*/
|
|
34219
34495
|
calendarGridLabel: {
|
|
34220
34496
|
type: String,
|
|
@@ -34377,6 +34653,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34377
34653
|
|
|
34378
34654
|
/**
|
|
34379
34655
|
* Accessible label for the next month navigation button.
|
|
34656
|
+
* @default 'Next month'
|
|
34380
34657
|
*/
|
|
34381
34658
|
navLabelNextMonth: {
|
|
34382
34659
|
type: String,
|
|
@@ -34385,6 +34662,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34385
34662
|
|
|
34386
34663
|
/**
|
|
34387
34664
|
* Accessible label for the previous month navigation button.
|
|
34665
|
+
* @default 'Previous month'
|
|
34388
34666
|
*/
|
|
34389
34667
|
navLabelPrevMonth: {
|
|
34390
34668
|
type: String,
|
|
@@ -34462,7 +34740,11 @@ class AuroDatePicker extends AuroElement {
|
|
|
34462
34740
|
},
|
|
34463
34741
|
|
|
34464
34742
|
/**
|
|
34465
|
-
* Label announced for cells after
|
|
34743
|
+
* Label announced for cells after a fully selected range (both
|
|
34744
|
+
* `dateFrom` and `dateTo` are set). While a range is still being
|
|
34745
|
+
* picked (`dateFrom` set, `dateTo` unset), focused cells past the
|
|
34746
|
+
* start use `rangeLabelEndPreview` instead.
|
|
34747
|
+
* @default 'after range'
|
|
34466
34748
|
*/
|
|
34467
34749
|
rangeLabelAfterRange: {
|
|
34468
34750
|
type: String,
|
|
@@ -34471,6 +34753,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34471
34753
|
|
|
34472
34754
|
/**
|
|
34473
34755
|
* Label announced for cells before the range start.
|
|
34756
|
+
* @default 'before range'
|
|
34474
34757
|
*/
|
|
34475
34758
|
rangeLabelBeforeRange: {
|
|
34476
34759
|
type: String,
|
|
@@ -34479,14 +34762,27 @@ class AuroDatePicker extends AuroElement {
|
|
|
34479
34762
|
|
|
34480
34763
|
/**
|
|
34481
34764
|
* Label announced for the range end date cell.
|
|
34765
|
+
* @default 'range end'
|
|
34482
34766
|
*/
|
|
34483
34767
|
rangeLabelEnd: {
|
|
34484
34768
|
type: String,
|
|
34485
34769
|
reflect: true
|
|
34486
34770
|
},
|
|
34487
34771
|
|
|
34772
|
+
/**
|
|
34773
|
+
* Label announced for the focused cell while previewing a range end
|
|
34774
|
+
* (dateFrom set, dateTo not yet selected). Tells AT users that
|
|
34775
|
+
* pressing Enter would commit this cell as the range end.
|
|
34776
|
+
* @default 'previewing range end'
|
|
34777
|
+
*/
|
|
34778
|
+
rangeLabelEndPreview: {
|
|
34779
|
+
type: String,
|
|
34780
|
+
reflect: true
|
|
34781
|
+
},
|
|
34782
|
+
|
|
34488
34783
|
/**
|
|
34489
34784
|
* Label announced for cells within the selected range.
|
|
34785
|
+
* @default 'in range'
|
|
34490
34786
|
*/
|
|
34491
34787
|
rangeLabelInRange: {
|
|
34492
34788
|
type: String,
|
|
@@ -34495,6 +34791,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34495
34791
|
|
|
34496
34792
|
/**
|
|
34497
34793
|
* Label announced for the range start date cell.
|
|
34794
|
+
* @default 'range start'
|
|
34498
34795
|
*/
|
|
34499
34796
|
rangeLabelStart: {
|
|
34500
34797
|
type: String,
|
|
@@ -34502,7 +34799,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34502
34799
|
},
|
|
34503
34800
|
|
|
34504
34801
|
/**
|
|
34505
|
-
* Dates that the user should have for reference as part of their decision
|
|
34802
|
+
* Dates that the user should have for reference as part of their decision-making when selecting a date.
|
|
34506
34803
|
* This should be a JSON string array of ISO date strings (`YYYY-MM-DD`).
|
|
34507
34804
|
*/
|
|
34508
34805
|
referenceDates: {
|
|
@@ -34859,10 +35156,26 @@ class AuroDatePicker extends AuroElement {
|
|
|
34859
35156
|
// ─── Vendor calendar time conversions ─────────────────────────────────────
|
|
34860
35157
|
|
|
34861
35158
|
/**
|
|
34862
|
-
* Converts a Unix timestamp (seconds) from the
|
|
35159
|
+
* Converts a Unix timestamp (seconds) from the vendored range-datepicker
|
|
35160
|
+
* (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
|
|
35161
|
+
*
|
|
35162
|
+
* Timezone contract:
|
|
35163
|
+
* - INPUT: `time` is assumed to be the seconds-since-epoch of **local
|
|
35164
|
+
* midnight** for the intended calendar day. The vendor's Day constructor
|
|
35165
|
+
* builds it via `date-fns format(date, 't')` from a locally-constructed
|
|
35166
|
+
* Date, so this assumption currently holds end-to-end.
|
|
35167
|
+
* - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
|
|
35168
|
+
* getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
|
|
35169
|
+
* string matches the local calendar day.
|
|
35170
|
+
*
|
|
35171
|
+
* If the vendor ever switches to emitting UTC-midnight timestamps, this
|
|
35172
|
+
* conversion will silently shift the returned date by one day in zones
|
|
35173
|
+
* west of UTC. Any vendor swap should re-verify this contract; the TZ
|
|
35174
|
+
* regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
|
|
35175
|
+
*
|
|
34863
35176
|
* @private
|
|
34864
|
-
* @param {number} time - Unix timestamp
|
|
34865
|
-
* @returns {string} ISO date string (yyyy-mm-dd).
|
|
35177
|
+
* @param {number} time - Unix timestamp (seconds), local midnight of the day.
|
|
35178
|
+
* @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
|
|
34866
35179
|
*/
|
|
34867
35180
|
convertWcTimeToDate(time) {
|
|
34868
35181
|
return dateFormatter$1.toISOFormatString(new Date(time * 1000));
|
|
@@ -34964,8 +35277,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
34964
35277
|
}
|
|
34965
35278
|
}
|
|
34966
35279
|
|
|
34967
|
-
// Focus the calendar grid wrapper (
|
|
34968
|
-
// the SR announcement for the active cell
|
|
35280
|
+
// Focus the calendar grid wrapper. The live region (announced just
|
|
35281
|
+
// below) handles the SR announcement for the active cell.
|
|
34969
35282
|
if (activeCell) {
|
|
34970
35283
|
this.calendar.focusActiveCell();
|
|
34971
35284
|
|
|
@@ -35015,11 +35328,13 @@ class AuroDatePicker extends AuroElement {
|
|
|
35015
35328
|
this.dropdown.bibDialogLabel = labelElement.textContent.trim() || undefined;
|
|
35016
35329
|
}
|
|
35017
35330
|
|
|
35331
|
+
const { signal } = this._listenerAbortController;
|
|
35332
|
+
|
|
35018
35333
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
35019
35334
|
if (!this.isPopoverVisible) {
|
|
35020
35335
|
this.dropdown.show();
|
|
35021
35336
|
}
|
|
35022
|
-
});
|
|
35337
|
+
}, { signal });
|
|
35023
35338
|
|
|
35024
35339
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
35025
35340
|
this.notifyDatepickerToggled();
|
|
@@ -35037,7 +35352,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35037
35352
|
if (this.valueObject) {
|
|
35038
35353
|
this.centralDate = this.value;
|
|
35039
35354
|
} else if (!this.centralDate && !this.calendarStartDate && !this.minDate) {
|
|
35040
|
-
this.centralDate = new Date();
|
|
35355
|
+
this.centralDate = dateFormatter$1.toISOFormatString(new Date());
|
|
35041
35356
|
}
|
|
35042
35357
|
}
|
|
35043
35358
|
|
|
@@ -35117,7 +35432,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35117
35432
|
this.forceScrollOnNextMobileCalendarRender = false;
|
|
35118
35433
|
}, 0);
|
|
35119
35434
|
}
|
|
35120
|
-
});
|
|
35435
|
+
}, { signal });
|
|
35121
35436
|
|
|
35122
35437
|
// Handle responsive strategy changes while the dropdown is open
|
|
35123
35438
|
// (e.g. resizing from desktop → mobile or vice versa).
|
|
@@ -35164,7 +35479,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35164
35479
|
});
|
|
35165
35480
|
});
|
|
35166
35481
|
}
|
|
35167
|
-
});
|
|
35482
|
+
}, { signal });
|
|
35168
35483
|
}
|
|
35169
35484
|
|
|
35170
35485
|
/**
|
|
@@ -35177,6 +35492,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
35177
35492
|
|
|
35178
35493
|
this.inputList = [...this.dropdown.querySelectorAll(this.inputTag._$litStatic$)];
|
|
35179
35494
|
|
|
35495
|
+
const { signal } = this._listenerAbortController;
|
|
35496
|
+
|
|
35180
35497
|
this.inputList.forEach((input, index) => {
|
|
35181
35498
|
input.addEventListener('input', (event) => {
|
|
35182
35499
|
event.stopPropagation();
|
|
@@ -35188,7 +35505,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35188
35505
|
}
|
|
35189
35506
|
|
|
35190
35507
|
this.notifyValueChanged();
|
|
35191
|
-
});
|
|
35508
|
+
}, { signal });
|
|
35192
35509
|
|
|
35193
35510
|
input.addEventListener('auroFormElement-validated', (evt) => {
|
|
35194
35511
|
// not to bubble up input's validated event.
|
|
@@ -35204,7 +35521,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35204
35521
|
this.validity = evt.detail.validity;
|
|
35205
35522
|
this.errorMessage = evt.detail.message;
|
|
35206
35523
|
}
|
|
35207
|
-
});
|
|
35524
|
+
}, { signal });
|
|
35208
35525
|
});
|
|
35209
35526
|
}
|
|
35210
35527
|
|
|
@@ -35218,19 +35535,32 @@ class AuroDatePicker extends AuroElement {
|
|
|
35218
35535
|
this.calendar.datepicker = this;
|
|
35219
35536
|
this.calendar.dropdown = this.dropdown;
|
|
35220
35537
|
|
|
35538
|
+
const { signal } = this._listenerAbortController;
|
|
35539
|
+
|
|
35221
35540
|
this.calendar.addEventListener('auroCalendar-dateSelected', () => {
|
|
35222
|
-
|
|
35223
|
-
|
|
35541
|
+
// Compare the input's ISO value against the *converted* calendar
|
|
35542
|
+
// timestamp (the vendor's `dateFrom`/`dateTo` are Unix-seconds
|
|
35543
|
+
// strings — comparing the input ISO directly against them would
|
|
35544
|
+
// never match, so the write would fire on every event and emit
|
|
35545
|
+
// redundant input/change activity).
|
|
35546
|
+
if (this.calendar.dateFrom !== undefined) {
|
|
35547
|
+
const fromIso = this.convertWcTimeToDate(this.calendar.dateFrom);
|
|
35548
|
+
if (this.inputList[0].value !== fromIso) {
|
|
35549
|
+
this.inputList[0].value = fromIso;
|
|
35550
|
+
}
|
|
35224
35551
|
}
|
|
35225
35552
|
|
|
35226
|
-
if (this.inputList[1] && this.calendar.dateTo
|
|
35227
|
-
|
|
35553
|
+
if (this.inputList[1] && this.calendar.dateTo) {
|
|
35554
|
+
const toIso = this.convertWcTimeToDate(this.calendar.dateTo);
|
|
35555
|
+
if (this.inputList[1].value !== toIso) {
|
|
35556
|
+
this.inputList[1].value = toIso;
|
|
35557
|
+
}
|
|
35228
35558
|
}
|
|
35229
|
-
});
|
|
35559
|
+
}, { signal });
|
|
35230
35560
|
|
|
35231
35561
|
this.calendar.addEventListener('auroCalendar-dismissRequest', () => {
|
|
35232
35562
|
this.dropdown.hide();
|
|
35233
|
-
});
|
|
35563
|
+
}, { signal });
|
|
35234
35564
|
|
|
35235
35565
|
this.calendar.addEventListener('auroCalendar-centralDateChanged', (event) => {
|
|
35236
35566
|
const match = this.centralDateObject && this.util.datesMatch(event.detail.date, this.centralDateObject);
|
|
@@ -35240,7 +35570,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35240
35570
|
}
|
|
35241
35571
|
|
|
35242
35572
|
this.notifyMonthChanged(event);
|
|
35243
|
-
});
|
|
35573
|
+
}, { signal });
|
|
35244
35574
|
}
|
|
35245
35575
|
|
|
35246
35576
|
/**
|
|
@@ -35249,10 +35579,17 @@ class AuroDatePicker extends AuroElement {
|
|
|
35249
35579
|
* @returns {void}
|
|
35250
35580
|
*/
|
|
35251
35581
|
configureDatepicker() {
|
|
35582
|
+
// These listeners are on `this` (the host), so they would GC with the
|
|
35583
|
+
// host even without the abort signal — see the leak rationale on
|
|
35584
|
+
// `_listenerAbortController`. The signal is still passed for uniform
|
|
35585
|
+
// cleanup semantics with the child-element listeners in the other
|
|
35586
|
+
// configure* methods.
|
|
35587
|
+
const { signal } = this._listenerAbortController;
|
|
35588
|
+
|
|
35252
35589
|
this.addEventListener('focusin', () => {
|
|
35253
35590
|
this.touched = true;
|
|
35254
35591
|
this.hasFocus = true;
|
|
35255
|
-
});
|
|
35592
|
+
}, { signal });
|
|
35256
35593
|
|
|
35257
35594
|
this.addEventListener('focusout', () => {
|
|
35258
35595
|
this.hasFocus = false;
|
|
@@ -35264,7 +35601,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35264
35601
|
if (!this.matches(':focus-within')) {
|
|
35265
35602
|
this.validate();
|
|
35266
35603
|
}
|
|
35267
|
-
});
|
|
35604
|
+
}, { signal });
|
|
35268
35605
|
|
|
35269
35606
|
if (this.valueObject) {
|
|
35270
35607
|
this.calendar.dateFrom = this.convertToWcValidTime(this.valueObject);
|
|
@@ -35462,6 +35799,41 @@ class AuroDatePicker extends AuroElement {
|
|
|
35462
35799
|
return this.validity !== undefined && this.validity !== 'valid';
|
|
35463
35800
|
}
|
|
35464
35801
|
|
|
35802
|
+
/**
|
|
35803
|
+
* Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
|
|
35804
|
+
* spans every datepicker instance on the page; lives on the class (not
|
|
35805
|
+
* at module scope) so it stays an encapsulated implementation detail of
|
|
35806
|
+
* this component and does not interfere with WCA's class-JSDoc
|
|
35807
|
+
* attachment.
|
|
35808
|
+
* @private
|
|
35809
|
+
*/
|
|
35810
|
+
static _warnedInvalidLocales = new Set();
|
|
35811
|
+
|
|
35812
|
+
/**
|
|
35813
|
+
* Logs a one-time `console.debug` when an unsupported locale falls back to
|
|
35814
|
+
* en-US. Deduped by the offending tag so noisy re-renders that resurface
|
|
35815
|
+
* the same bad value stay quiet, but each new bad value still signals so
|
|
35816
|
+
* consumers can spot the typo or missing tag.
|
|
35817
|
+
* @private
|
|
35818
|
+
* @param {string|undefined} badLocale - The locale value that failed.
|
|
35819
|
+
* @returns {void}
|
|
35820
|
+
*/
|
|
35821
|
+
_warnInvalidLocale(badLocale) {
|
|
35822
|
+
// Stringify without coalescing — `String(undefined)` / `String(null)`
|
|
35823
|
+
// surface the actual offending value in the log, instead of the
|
|
35824
|
+
// ambiguous `Locale ""` that `String(badLocale ?? '')` would produce.
|
|
35825
|
+
// Dedup still works correctly because each unique stringification
|
|
35826
|
+
// becomes its own Set entry.
|
|
35827
|
+
const key = String(badLocale);
|
|
35828
|
+
const seen = AuroDatePicker._warnedInvalidLocales;
|
|
35829
|
+
if (seen.has(key)) {
|
|
35830
|
+
return;
|
|
35831
|
+
}
|
|
35832
|
+
seen.add(key);
|
|
35833
|
+
// eslint-disable-next-line no-console
|
|
35834
|
+
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".`);
|
|
35835
|
+
}
|
|
35836
|
+
|
|
35465
35837
|
/**
|
|
35466
35838
|
* Lifecycle method to check if the locale is valid.
|
|
35467
35839
|
* @ignore
|
|
@@ -35472,10 +35844,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35472
35844
|
if (changedProperties.has('locale')) {
|
|
35473
35845
|
try {
|
|
35474
35846
|
const supported = Intl.DateTimeFormat.supportedLocalesOf([this.locale], { localeMatcher: 'lookup' });
|
|
35475
|
-
|
|
35847
|
+
if (supported.length > 0) {
|
|
35848
|
+
this._validLocale = this.locale;
|
|
35849
|
+
} else {
|
|
35850
|
+
this._validLocale = 'en-US';
|
|
35851
|
+
this._warnInvalidLocale(this.locale);
|
|
35852
|
+
}
|
|
35476
35853
|
} catch {
|
|
35477
|
-
console.debug(`[AuroDatePicker] The locale "${this.locale}" is not valid. Falling back to "en-US".`); // eslint-disable-line no-console
|
|
35478
35854
|
this._validLocale = 'en-US';
|
|
35855
|
+
this._warnInvalidLocale(this.locale);
|
|
35479
35856
|
}
|
|
35480
35857
|
|
|
35481
35858
|
const previousLocaleFormat = getDateFormatFromLocale$1(changedProperties.get('locale'));
|
|
@@ -35557,8 +35934,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35557
35934
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35558
35935
|
// to prevent the displayed months from shifting
|
|
35559
35936
|
this.centralDate = this.value;
|
|
35560
|
-
//TODO: TEST THIS CHANGE
|
|
35561
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.value);
|
|
35562
35937
|
}
|
|
35563
35938
|
|
|
35564
35939
|
this.setHasValue();
|
|
@@ -35618,8 +35993,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35618
35993
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35619
35994
|
// to prevent the displayed months from shifting
|
|
35620
35995
|
this.centralDate = this.valueEnd;
|
|
35621
|
-
// TODO: TEST THIS CHANGE
|
|
35622
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.formattedValueEnd);
|
|
35623
35996
|
}
|
|
35624
35997
|
|
|
35625
35998
|
this.validate();
|
|
@@ -35761,7 +36134,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35761
36134
|
* @returns {void}
|
|
35762
36135
|
*/
|
|
35763
36136
|
configureClickHandler() {
|
|
35764
|
-
this.addEventListener('click', this.handleClick);
|
|
36137
|
+
this.addEventListener('click', this.handleClick, { signal: this._listenerAbortController.signal });
|
|
35765
36138
|
}
|
|
35766
36139
|
|
|
35767
36140
|
firstUpdated() {
|
|
@@ -35769,6 +36142,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35769
36142
|
// Add the tag name as an attribute if it is different than the component name
|
|
35770
36143
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
|
|
35771
36144
|
|
|
36145
|
+
// If the element was disconnected before this first render finished,
|
|
36146
|
+
// disconnectedCallback's microtask already aborted the controller. The
|
|
36147
|
+
// connectedCallback reinit guard skips that case because `hasUpdated`
|
|
36148
|
+
// is still false. Mint a fresh controller here so configure* registers
|
|
36149
|
+
// listeners against a live signal.
|
|
36150
|
+
if (this._listenerAbortController.signal.aborted) {
|
|
36151
|
+
this._listenerAbortController = new AbortController();
|
|
36152
|
+
}
|
|
36153
|
+
|
|
35772
36154
|
this.configureDropdown();
|
|
35773
36155
|
this.configureInput();
|
|
35774
36156
|
this.configureCalendar();
|
|
@@ -35780,9 +36162,36 @@ class AuroDatePicker extends AuroElement {
|
|
|
35780
36162
|
connectedCallback() {
|
|
35781
36163
|
super.connectedCallback();
|
|
35782
36164
|
|
|
36165
|
+
// True reconnect after `disconnectedCallback` aborted our controller:
|
|
36166
|
+
// the existing signal is dead, so listeners registered against it
|
|
36167
|
+
// would never fire. Create a fresh controller and re-run the
|
|
36168
|
+
// configure* wiring (each method is idempotent — it just re-caches
|
|
36169
|
+
// child refs and re-registers listeners against the new signal).
|
|
36170
|
+
// `hasUpdated` gates this so the *first* connect (which precedes
|
|
36171
|
+
// firstUpdated) still falls through to firstUpdated's initial wiring.
|
|
36172
|
+
if (this.hasUpdated && this._listenerAbortController.signal.aborted) {
|
|
36173
|
+
this._listenerAbortController = new AbortController();
|
|
36174
|
+
this.configureDropdown();
|
|
36175
|
+
this.configureInput();
|
|
36176
|
+
this.configureCalendar();
|
|
36177
|
+
this.configureDatepicker();
|
|
36178
|
+
this.configureClickHandler();
|
|
36179
|
+
}
|
|
36180
|
+
|
|
35783
36181
|
this.locale = this.domHandler.getLocale(this);
|
|
35784
36182
|
}
|
|
35785
36183
|
|
|
36184
|
+
disconnectedCallback() {
|
|
36185
|
+
super.disconnectedCallback();
|
|
36186
|
+
// Defer so that re-parenting (auro-drawer slotting it into a dialog,
|
|
36187
|
+
// for example) does not abort listeners we still need after reconnect.
|
|
36188
|
+
queueMicrotask(() => {
|
|
36189
|
+
if (!this.isConnected) {
|
|
36190
|
+
this._listenerAbortController.abort();
|
|
36191
|
+
}
|
|
36192
|
+
});
|
|
36193
|
+
}
|
|
36194
|
+
|
|
35786
36195
|
// layout render methods
|
|
35787
36196
|
// ------------------------------------
|
|
35788
36197
|
|