@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
|
@@ -1356,7 +1356,7 @@ function normalizeDates$1(context, ...dates) {
|
|
|
1356
1356
|
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
1357
1357
|
* //=> Tue Sep 02 2014 00:00:00
|
|
1358
1358
|
*/
|
|
1359
|
-
function startOfDay$
|
|
1359
|
+
function startOfDay$1(date, options) {
|
|
1360
1360
|
const _date = toDate$1(date, options?.in);
|
|
1361
1361
|
_date.setHours(0, 0, 0, 0);
|
|
1362
1362
|
return _date;
|
|
@@ -1404,8 +1404,8 @@ function differenceInCalendarDays$1(laterDate, earlierDate, options) {
|
|
|
1404
1404
|
earlierDate,
|
|
1405
1405
|
);
|
|
1406
1406
|
|
|
1407
|
-
const laterStartOfDay = startOfDay$
|
|
1408
|
-
const earlierStartOfDay = startOfDay$
|
|
1407
|
+
const laterStartOfDay = startOfDay$1(laterDate_);
|
|
1408
|
+
const earlierStartOfDay = startOfDay$1(earlierDate_);
|
|
1409
1409
|
|
|
1410
1410
|
const laterTimestamp =
|
|
1411
1411
|
+laterStartOfDay - getTimezoneOffsetInMilliseconds$1(laterStartOfDay);
|
|
@@ -10862,8 +10862,8 @@ class RangeDatepickerCell extends LitElement {
|
|
|
10862
10862
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
10863
10863
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
10864
10864
|
if (day) {
|
|
10865
|
-
if (getTime(startOfDay$
|
|
10866
|
-
getTime(startOfDay$
|
|
10865
|
+
if (getTime(startOfDay$1(parsedDateTo * 1000)) / 1000 === day.date ||
|
|
10866
|
+
getTime(startOfDay$1(parsedDateFrom * 1000)) / 1000 === day.date) {
|
|
10867
10867
|
this.selected = true;
|
|
10868
10868
|
}
|
|
10869
10869
|
if (((hoveredDate === day.date || day.date < hoveredDate) &&
|
|
@@ -11051,7 +11051,7 @@ class RangeDatepickerCalendar extends LitElement {
|
|
|
11051
11051
|
this.dayNamesOfTheWeek = [];
|
|
11052
11052
|
this.daysOfMonth = [];
|
|
11053
11053
|
this._locale = null;
|
|
11054
|
-
this.currentDate = parseInt(format$1(startOfDay$
|
|
11054
|
+
this.currentDate = parseInt(format$1(startOfDay$1(Date.now()), 't'), 10);
|
|
11055
11055
|
this.localeChanged();
|
|
11056
11056
|
this.yearAndMonthChanged(this.year, this.month);
|
|
11057
11057
|
}
|
|
@@ -11525,7 +11525,7 @@ __decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "dayN
|
|
|
11525
11525
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
11526
11526
|
AuroLibraryRuntimeUtils$5.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
11527
11527
|
|
|
11528
|
-
var styleCss$5 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:48px;height:56px;padding:0;border-width:2px;border-style:solid;border-radius:10px;cursor:pointer;user-select:none}.day:focus-visible{outline:none;background-color:unset}.day.activeCell{outline-width:2px;outline-style:solid;outline-offset:-4px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:pointer}.day.reference:after{position:absolute;top:-2px;left:-2px;display:block;width:calc(100% + 2px);height:calc(100% + 2px);box-sizing:content-box;border-radius:10px;border-style:solid;border-width:1px;content:""}.day.inRange::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:""}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:10px 0 0 10px;overflow:hidden}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:0 10px 10px 0;overflow:hidden}.day.firstDayOfMonth::before{border-radius:10px 0 0 10px;overflow:hidden}.day.lastDayOfMonth::before{border-radius:0 10px 10px 0;overflow:hidden}.buttonWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.dateSlot{display:block}::slotted([slot^=date_]){width:100%;white-space:nowrap}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;height:100%}:host([renderForDateSlot]) .currentDayMarker{position:relative}`;
|
|
11528
|
+
var styleCss$5 = css`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-default-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-emphasized-font-size, 1rem);line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-lg-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-sm-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-2xs-emphasized-weight, );letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));letter-spacing:var(--wcss-display-2xl-letter-spacing, 0)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));letter-spacing:var(--wcss-display-xl-letter-spacing, 0)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));letter-spacing:var(--wcss-display-lg-letter-spacing, 0)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));letter-spacing:var(--wcss-display-md-letter-spacing, 0)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));letter-spacing:var(--wcss-display-sm-letter-spacing, 0)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));letter-spacing:var(--wcss-display-xs-letter-spacing, 0)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));letter-spacing:var(--wcss-heading-xl-letter-spacing, 0)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));letter-spacing:var(--wcss-heading-lg-letter-spacing, 0)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));letter-spacing:var(--wcss-heading-md-letter-spacing, 0)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));letter-spacing:var(--wcss-heading-sm-letter-spacing, 0)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-xs-weight, 300);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));letter-spacing:var(--wcss-heading-xs-letter-spacing, 0)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-heading-2xs-weight, 300);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);text-transform:uppercase}@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:48px;height:56px;padding:0;border-width:2px;border-style:solid;border-radius:10px;cursor:pointer;user-select:none}.day:focus-visible{outline:none;background-color:unset}.day.activeCell{outline-width:2px;outline-style:solid;outline-offset:-4px}.day.disabled{cursor:default !important;pointer-events:none}.day.blackout{cursor:pointer}.day.reference:after{position:absolute;top:-2px;left:-2px;display:block;width:calc(100% + 2px);height:calc(100% + 2px);box-sizing:content-box;border-radius:10px;border-style:solid;border-width:1px;content:""}.day.inRange::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:""}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:10px 0 0 10px;overflow:hidden}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:-2px;left:-2px;display:block;width:calc(100% + 4px);height:calc(100% + 4px);box-sizing:content-box;content:"";border-radius:0 10px 10px 0;overflow:hidden}.day.rangeDepartDate.lastHoveredDate::before{border-radius:10px}.day.firstDayOfMonth::before{border-radius:10px 0 0 10px;overflow:hidden}.day.lastDayOfMonth::before{border-radius:0 10px 10px 0;overflow:hidden}.buttonWrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.dateSlot{display:block}::slotted([slot^=date_]){width:100%;white-space:nowrap}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;height:100%}:host([renderForDateSlot]) .currentDayMarker{position:relative}`;
|
|
11529
11529
|
|
|
11530
11530
|
var colorCss$5 = css`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar-cell-price-text-color)}:host ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success, #447a1f)}:host .day{border-color:var(--ds-auro-calendar-cell-border-color);background-color:var(--ds-auro-calendar-cell-container-color);color:var(--ds-auro-calendar-cell-text-color)}:host .day.activeCell:not(.selected){--ds-auro-calendar-cell-container-color: var(--ds-auro-calendar-cell-in-range-color);border-color:var(--ds-advanced-color-state-selected);outline-color:var(--ds-auro-calendar-cell-container-color)}:host .day.selected{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.selected ::slotted([slot^=date_][highlight]){--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host .day.selected:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-selected-hover, #00274a);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host .day.reference:after{border-color:var(--ds-basic-color-border-default, #959595);box-shadow:inset 0 0 0 2px var(--ds-basic-color-surface-default, #ffffff)}:host .day.reference:hover::after{box-shadow:inset 0 0 0 2px var(--ds-advanced-color-shared-background-muted, #f7f7f7)}:host .day:hover{--ds-auro-calendar-cell-container-color: var(--ds-advanced-color-state-background-hover, #f2f2f2);--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host .day.disabled{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.blackout{--ds-auro-calendar-cell-container-color: transparent;--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host .day.inRange:before,:host .day.rangeDepartDate:before,:host .day.rangeReturnDate:before,:host .day.lastHoveredDate:before{background-color:var(--ds-auro-calendar-cell-in-range-color)}:host .day.sameDateTrip:before{--ds-auro-calendar-cell-in-range-color: transparent}`;
|
|
11531
11531
|
|
|
@@ -11550,13 +11550,103 @@ class s{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
|
|
|
11550
11550
|
|
|
11551
11551
|
var popoverVersion = '6.0.1';
|
|
11552
11552
|
|
|
11553
|
-
|
|
11553
|
+
/**
|
|
11554
|
+
* Single source of truth for parsing and matching blackout dates across the
|
|
11555
|
+
* datepicker. Both `auro-calendar` (memoized Set + `isDateBlackout`) and the
|
|
11556
|
+
* pre-`firstUpdated` fallback inside `auro-calendar-cell` route through these
|
|
11557
|
+
* helpers so the YYYY-MM-DD → seconds conversion and the merge-with-legacy
|
|
11558
|
+
* `disabledDays` rules are defined exactly once.
|
|
11559
|
+
*/
|
|
11554
11560
|
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11561
|
+
/**
|
|
11562
|
+
* Converts a `YYYY-MM-DD` ISO date string to a Unix timestamp (seconds)
|
|
11563
|
+
* representing local midnight on that calendar day. Returns `null` for
|
|
11564
|
+
* inputs that don't parse to a finite timestamp.
|
|
11565
|
+
*
|
|
11566
|
+
* Uses the `new Date(year, monthIndex, day)` constructor (NOT
|
|
11567
|
+
* `new Date(isoStr)`) so the result is local-midnight rather than UTC
|
|
11568
|
+
* midnight — required to keep the calendar grid aligned with the user's
|
|
11569
|
+
* local calendar day in negative-offset timezones.
|
|
11570
|
+
*
|
|
11571
|
+
* @param {string} isoStr - Date string in `YYYY-MM-DD` format.
|
|
11572
|
+
* @returns {number|null} Local-midnight Unix timestamp (seconds), or null.
|
|
11573
|
+
*/
|
|
11574
|
+
function parseIsoToTimestamp(isoStr) {
|
|
11575
|
+
if (typeof isoStr !== 'string') {
|
|
11576
|
+
return null;
|
|
11577
|
+
}
|
|
11578
|
+
const parts = isoStr.split('-');
|
|
11579
|
+
if (parts.length !== 3) {
|
|
11580
|
+
return null;
|
|
11581
|
+
}
|
|
11582
|
+
const year = parseInt(parts[0], 10);
|
|
11583
|
+
const month = parseInt(parts[1], 10);
|
|
11584
|
+
const day = parseInt(parts[2], 10);
|
|
11585
|
+
if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) {
|
|
11586
|
+
return null;
|
|
11587
|
+
}
|
|
11588
|
+
// Reject overflow values like "2024-13-40" — JS `new Date(year, month, day)`
|
|
11589
|
+
// silently normalizes those to a different calendar day, which would
|
|
11590
|
+
// disable the wrong date if we let the result through.
|
|
11591
|
+
if (month < 1 || month > 12 || day < 1 || day > 31) {
|
|
11592
|
+
return null;
|
|
11593
|
+
}
|
|
11594
|
+
const date = new Date(year, month - 1, day);
|
|
11595
|
+
// Guard the residual case where JS still rolls a value (e.g. Feb 30 → Mar 2).
|
|
11596
|
+
// After construction, getFullYear/getMonth/getDate should match the inputs.
|
|
11597
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
|
|
11598
|
+
return null;
|
|
11599
|
+
}
|
|
11600
|
+
const ts = Math.floor(date.getTime() / 1000);
|
|
11601
|
+
return Number.isFinite(ts) ? ts : null;
|
|
11602
|
+
}
|
|
11603
|
+
|
|
11604
|
+
/**
|
|
11605
|
+
* Builds a `Set<number>` of seconds-since-epoch timestamps covering both the
|
|
11606
|
+
* legacy `disabledDays` (already-numeric) array and the ISO `blackoutDates`
|
|
11607
|
+
* array. Use this for O(1) membership checks in hot paths.
|
|
11608
|
+
*
|
|
11609
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
11610
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
11611
|
+
* @returns {Set<number>}
|
|
11612
|
+
*/
|
|
11613
|
+
function buildBlackoutSet(disabledDays, blackoutDates) {
|
|
11614
|
+
const set = new Set();
|
|
11615
|
+
if (Array.isArray(disabledDays)) {
|
|
11616
|
+
for (const day of disabledDays) {
|
|
11617
|
+
const ts = parseInt(day, 10);
|
|
11618
|
+
if (Number.isFinite(ts)) {
|
|
11619
|
+
set.add(ts);
|
|
11620
|
+
}
|
|
11621
|
+
}
|
|
11622
|
+
}
|
|
11623
|
+
if (Array.isArray(blackoutDates)) {
|
|
11624
|
+
for (const isoStr of blackoutDates) {
|
|
11625
|
+
const ts = parseIsoToTimestamp(isoStr);
|
|
11626
|
+
if (ts !== null) {
|
|
11627
|
+
set.add(ts);
|
|
11628
|
+
}
|
|
11629
|
+
}
|
|
11630
|
+
}
|
|
11631
|
+
return set;
|
|
11632
|
+
}
|
|
11633
|
+
|
|
11634
|
+
/**
|
|
11635
|
+
* One-shot membership test for a single timestamp against both blackout
|
|
11636
|
+
* sources. Allocates a Set on each call; only use this in cold paths
|
|
11637
|
+
* (e.g. the pre-`firstUpdated` cell fallback). Hot paths should hold the
|
|
11638
|
+
* Set returned from `buildBlackoutSet` and `.has(ts)` directly.
|
|
11639
|
+
*
|
|
11640
|
+
* @param {number} dateTs - Unix timestamp (seconds) to test.
|
|
11641
|
+
* @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
|
|
11642
|
+
* @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
|
|
11643
|
+
* @returns {boolean}
|
|
11644
|
+
*/
|
|
11645
|
+
function isBlackoutTimestamp(dateTs, disabledDays, blackoutDates) {
|
|
11646
|
+
return buildBlackoutSet(disabledDays, blackoutDates).has(dateTs);
|
|
11647
|
+
}
|
|
11648
|
+
|
|
11649
|
+
/* 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 */
|
|
11560
11650
|
|
|
11561
11651
|
class AuroCalendarCell extends LitElement {
|
|
11562
11652
|
constructor() {
|
|
@@ -11604,6 +11694,14 @@ class AuroCalendarCell extends LitElement {
|
|
|
11604
11694
|
type: Boolean,
|
|
11605
11695
|
reflect: true
|
|
11606
11696
|
},
|
|
11697
|
+
/**
|
|
11698
|
+
* @deprecated Propagated from the legacy `auro-calendar.disabledDays`
|
|
11699
|
+
* Unix-timestamp array. The cell honors it for backward compatibility
|
|
11700
|
+
* (see the divergence-check fallback inside `isBlackout`), but
|
|
11701
|
+
* consumers should migrate to `auro-datepicker.blackoutDates`
|
|
11702
|
+
* (YYYY-MM-DD ISO strings). The calendar emits a one-time
|
|
11703
|
+
* deprecation warning the first time a non-empty value is observed.
|
|
11704
|
+
*/
|
|
11607
11705
|
disabledDays: { type: Array },
|
|
11608
11706
|
isCurrentDate: { type: Boolean },
|
|
11609
11707
|
locale: { type: String },
|
|
@@ -11649,8 +11747,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
11649
11747
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11650
11748
|
|
|
11651
11749
|
if (day) {
|
|
11652
|
-
const departTimestamp =
|
|
11653
|
-
const returnTimestamp =
|
|
11750
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11751
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11654
11752
|
|
|
11655
11753
|
if (day.date === departTimestamp || day.date === returnTimestamp) {
|
|
11656
11754
|
this.selected = true;
|
|
@@ -11734,27 +11832,33 @@ class AuroCalendarCell extends LitElement {
|
|
|
11734
11832
|
return false;
|
|
11735
11833
|
}
|
|
11736
11834
|
|
|
11737
|
-
//
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
// Check against blackoutDates (ISO format YYYY-MM-DD) on the datepicker
|
|
11744
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
11745
|
-
|
|
11746
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
11747
|
-
const date = new Date(this.day.date * 1000);
|
|
11748
|
-
const yyyy = date.getFullYear();
|
|
11749
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
11750
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
11751
|
-
const cellDate = `${yyyy}-${mm}-${dd}`;
|
|
11752
|
-
if (blackoutDates.includes(cellDate)) {
|
|
11835
|
+
// Delegate to the calendar's memoized blackout Set for O(1) lookup
|
|
11836
|
+
// (instead of rescanning disabledDays + blackoutDates per render). The
|
|
11837
|
+
// Set is rebuilt only when either source array reference changes — see
|
|
11838
|
+
// auro-calendar.js#_getBlackoutSet.
|
|
11839
|
+
if (this.calendar && typeof this.calendar._getBlackoutSet === 'function') {
|
|
11840
|
+
if (this.calendar._getBlackoutSet().has(this.day.date)) {
|
|
11753
11841
|
return true;
|
|
11754
11842
|
}
|
|
11843
|
+
// If the cell's local disabledDays diverged from the calendar's (a
|
|
11844
|
+
// consumer or test mutated cell.disabledDays directly), the Set does
|
|
11845
|
+
// not reflect that addition — fall through to the per-cell scan only
|
|
11846
|
+
// when the reference no longer matches. Production data flow keeps
|
|
11847
|
+
// these identical, so this branch stays cold. Guarded with
|
|
11848
|
+
// Array.isArray to match `_getBlackoutSet`'s contract: non-array
|
|
11849
|
+
// values are treated as empty rather than crashing on `.findIndex`.
|
|
11850
|
+
if (Array.isArray(this.disabledDays) && this.disabledDays !== this.calendar.disabledDays && this.disabledDays.length > 0) {
|
|
11851
|
+
if (this.disabledDays.findIndex((dd) => parseInt(dd, 10) === this.day.date) !== -1) {
|
|
11852
|
+
return true;
|
|
11853
|
+
}
|
|
11854
|
+
}
|
|
11855
|
+
return false;
|
|
11755
11856
|
}
|
|
11756
11857
|
|
|
11757
|
-
|
|
11858
|
+
// Pre-firstUpdated fallback — the cell may render once before the
|
|
11859
|
+
// ancestor calendar is wired up. Routes through the shared
|
|
11860
|
+
// blackoutUtils helper so the parsing rules stay in one place.
|
|
11861
|
+
return isBlackoutTimestamp(this.day.date, this.disabledDays, this.datepicker?.blackoutDates);
|
|
11758
11862
|
}
|
|
11759
11863
|
|
|
11760
11864
|
/**
|
|
@@ -11860,12 +11964,12 @@ class AuroCalendarCell extends LitElement {
|
|
|
11860
11964
|
const parsedDateFrom = Number.parseInt(this.dateFrom, 10);
|
|
11861
11965
|
if (!Number.isFinite(parsedDateFrom)) return null;
|
|
11862
11966
|
|
|
11863
|
-
const departTimestamp =
|
|
11967
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11864
11968
|
const dayDate = this.day.date;
|
|
11865
11969
|
|
|
11866
11970
|
const parsedDateTo = Number.parseInt(this.dateTo, 10);
|
|
11867
11971
|
const hasDateTo = Number.isFinite(parsedDateTo);
|
|
11868
|
-
const returnTimestamp = hasDateTo ?
|
|
11972
|
+
const returnTimestamp = hasDateTo ? new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
11869
11973
|
|
|
11870
11974
|
if (dayDate === departTimestamp) return this.datepicker.rangeLabelStart || 'range start';
|
|
11871
11975
|
|
|
@@ -11875,7 +11979,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
11875
11979
|
|
|
11876
11980
|
if (hasDateTo && dayDate > departTimestamp && dayDate < returnTimestamp) return this.datepicker.rangeLabelInRange || 'in range';
|
|
11877
11981
|
|
|
11878
|
-
|
|
11982
|
+
if (!hasDateTo && dayDate > departTimestamp) return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
11983
|
+
|
|
11984
|
+
// After end date when both dateFrom and dateTo are set.
|
|
11879
11985
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
11880
11986
|
}
|
|
11881
11987
|
|
|
@@ -11888,7 +11994,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11888
11994
|
*/
|
|
11889
11995
|
isDepartDate(day, dateFrom) {
|
|
11890
11996
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
11891
|
-
const departTimestamp =
|
|
11997
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11892
11998
|
|
|
11893
11999
|
return this.selected && day.date === departTimestamp;
|
|
11894
12000
|
}
|
|
@@ -11903,7 +12009,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11903
12009
|
*/
|
|
11904
12010
|
isReturnDate(day, dateFrom, dateTo) {
|
|
11905
12011
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11906
|
-
const returnTimestamp =
|
|
12012
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11907
12013
|
|
|
11908
12014
|
return this.selected && day.date === returnTimestamp && dateFrom;
|
|
11909
12015
|
}
|
|
@@ -12067,6 +12173,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12067
12173
|
setTimeout(() => this.firstUpdated(), 0);
|
|
12068
12174
|
return;
|
|
12069
12175
|
}
|
|
12176
|
+
this.calendar = calendar;
|
|
12070
12177
|
this.datepicker = calendar.datepicker;
|
|
12071
12178
|
this._slotContentHandler = () => {
|
|
12072
12179
|
this.handleSlotContent();
|
|
@@ -12124,12 +12231,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12124
12231
|
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
12125
12232
|
});
|
|
12126
12233
|
|
|
12127
|
-
//
|
|
12234
|
+
// Keep the host's gridcell aria attributes in sync with the day data.
|
|
12128
12235
|
this.updateHostAria();
|
|
12129
12236
|
}
|
|
12130
12237
|
|
|
12131
12238
|
// Update host aria when selection changes (aria-selected, range labels)
|
|
12132
|
-
|
|
12239
|
+
// or when isCurrentDate flips (aria-current).
|
|
12240
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('selected') || properties.has('isCurrentDate')) {
|
|
12133
12241
|
this.updateHostAria();
|
|
12134
12242
|
}
|
|
12135
12243
|
|
|
@@ -12140,8 +12248,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
12140
12248
|
}
|
|
12141
12249
|
|
|
12142
12250
|
/**
|
|
12143
|
-
*
|
|
12144
|
-
*
|
|
12251
|
+
* Sets host-level ARIA so each cell exposes its date, selection state,
|
|
12252
|
+
* and blackout status to assistive tech browsing the month grid.
|
|
12145
12253
|
* @private
|
|
12146
12254
|
* @returns {void}
|
|
12147
12255
|
*/
|
|
@@ -12150,16 +12258,27 @@ class AuroCalendarCell extends LitElement {
|
|
|
12150
12258
|
|
|
12151
12259
|
const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
|
|
12152
12260
|
if (outOfRange) {
|
|
12261
|
+
// Strip every aria attribute the in-range branch may have set on a
|
|
12262
|
+
// previous render — if a cell flips from in-range to out-of-range
|
|
12263
|
+
// (calendar shifts months, minDate/maxDate change, etc.).
|
|
12153
12264
|
this.removeAttribute('role');
|
|
12154
12265
|
this.removeAttribute('aria-label');
|
|
12266
|
+
this.removeAttribute('aria-current');
|
|
12267
|
+
this.removeAttribute('aria-selected');
|
|
12268
|
+
this.removeAttribute('aria-disabled');
|
|
12155
12269
|
return;
|
|
12156
12270
|
}
|
|
12157
12271
|
|
|
12158
|
-
// The host acts as the gridcell for ariaActiveDescendantElement.
|
|
12159
12272
|
this.setAttribute('role', 'gridcell');
|
|
12160
12273
|
this.setAttribute('aria-label', this.getAriaLabel());
|
|
12161
12274
|
this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
|
|
12162
12275
|
|
|
12276
|
+
if (this.isCurrentDate) {
|
|
12277
|
+
this.setAttribute('aria-current', 'date');
|
|
12278
|
+
} else {
|
|
12279
|
+
this.removeAttribute('aria-current');
|
|
12280
|
+
}
|
|
12281
|
+
|
|
12163
12282
|
if (this.isBlackout()) {
|
|
12164
12283
|
this.setAttribute('aria-disabled', 'true');
|
|
12165
12284
|
} else {
|
|
@@ -12174,7 +12293,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12174
12293
|
* @returns {void}
|
|
12175
12294
|
*/
|
|
12176
12295
|
focusButton() {
|
|
12177
|
-
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([
|
|
12296
|
+
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([disabled])');
|
|
12178
12297
|
if (button) {
|
|
12179
12298
|
button.focus({ focusVisible: true });
|
|
12180
12299
|
}
|
|
@@ -12182,7 +12301,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
12182
12301
|
|
|
12183
12302
|
/**
|
|
12184
12303
|
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
12185
|
-
*
|
|
12304
|
+
* Buttons stay tabindex="-1" because DOM focus stays on the grid wrapper —
|
|
12305
|
+
* arrow keys move the active cell imperatively and the live region carries
|
|
12306
|
+
* the SR announcement.
|
|
12186
12307
|
* @returns {void}
|
|
12187
12308
|
*/
|
|
12188
12309
|
setActive() {
|
|
@@ -12224,10 +12345,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12224
12345
|
if (!btn || !this.day) return;
|
|
12225
12346
|
|
|
12226
12347
|
const dayDate = this.day.date;
|
|
12227
|
-
const departTimestamp =
|
|
12348
|
+
const departTimestamp = new Date(dateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
12228
12349
|
const isInRange = dayDate > departTimestamp && dayDate < hoveredDate;
|
|
12229
|
-
|
|
12230
|
-
|
|
12350
|
+
// `>=` so hovering the depart cell itself (a same-day round-trip
|
|
12351
|
+
// preview) still surfaces a visual cue: the depart cell receives both
|
|
12352
|
+
// rangeDepartDate and lastHoveredDate.
|
|
12353
|
+
const isLastHovered = dayDate === hoveredDate && hoveredDate >= departTimestamp;
|
|
12354
|
+
const isDepartWithPreview = dayDate === departTimestamp && hoveredDate >= departTimestamp;
|
|
12231
12355
|
|
|
12232
12356
|
btn.classList.toggle('inRange', isInRange);
|
|
12233
12357
|
btn.classList.toggle('lastHoveredDate', isLastHovered);
|
|
@@ -12285,7 +12409,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
12285
12409
|
@focus="${outOfRange ? undefined : this.handleFocus}"
|
|
12286
12410
|
class="${classMap(buttonClasses)}"
|
|
12287
12411
|
?disabled="${outOfRange}"
|
|
12288
|
-
aria-hidden="${outOfRange ? 'true' : nothing}"
|
|
12289
12412
|
tabindex="-1">
|
|
12290
12413
|
<div class="buttonWrapper" aria-hidden="true">
|
|
12291
12414
|
<div class="currentDayMarker">${this.day?.title || nothing}</div>
|
|
@@ -13391,7 +13514,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13391
13514
|
}
|
|
13392
13515
|
}
|
|
13393
13516
|
|
|
13394
|
-
var formkitVersion$2 = '
|
|
13517
|
+
var formkitVersion$2 = '202606261928';
|
|
13395
13518
|
|
|
13396
13519
|
let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=literal`${unsafeStatic(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1=css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
|
|
13397
13520
|
`,u$4=css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
|
|
@@ -13514,7 +13637,11 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13514
13637
|
this.calendarRangeMonths = null;
|
|
13515
13638
|
|
|
13516
13639
|
/**
|
|
13517
|
-
*
|
|
13640
|
+
* @deprecated Use `auro-datepicker.blackoutDates` (an array of
|
|
13641
|
+
* `YYYY-MM-DD` ISO strings) instead. This legacy array of Unix
|
|
13642
|
+
* timestamps is still honored for backward compatibility but emits a
|
|
13643
|
+
* one-time `console.debug` the first time a non-empty value is observed.
|
|
13644
|
+
* Support will be removed in a future major release.
|
|
13518
13645
|
* @private
|
|
13519
13646
|
*/
|
|
13520
13647
|
this.disabledDays = [];
|
|
@@ -13771,17 +13898,44 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13771
13898
|
* @returns {void}
|
|
13772
13899
|
*/
|
|
13773
13900
|
updateActiveCellForVisibleMonth() {
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
requestAnimationFrame(() => {
|
|
13777
|
-
requestAnimationFrame(() => {
|
|
13778
|
-
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13901
|
+
this._afterMonthRender(() => {
|
|
13902
|
+
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13779
13903
|
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13904
|
+
if (newDate !== null && newDate !== undefined) {
|
|
13905
|
+
this.activeCellDate = newDate;
|
|
13906
|
+
this.setActiveCell(this.activeCellDate);
|
|
13907
|
+
}
|
|
13908
|
+
});
|
|
13909
|
+
}
|
|
13910
|
+
|
|
13911
|
+
/**
|
|
13912
|
+
* Schedules `callback` two animation frames out, giving the child
|
|
13913
|
+
* `auro-formkit-calendar-month` and `auro-formkit-calendar-cell` elements
|
|
13914
|
+
* a full render-and-paint cycle to settle before the callback reads or
|
|
13915
|
+
* mutates DOM.
|
|
13916
|
+
*
|
|
13917
|
+
* Why two frames, not one:
|
|
13918
|
+
* 1. Lit batches property updates and renders in a microtask, so frame N
|
|
13919
|
+
* schedules the render but the new DOM may not be painted yet.
|
|
13920
|
+
* 2. Cells re-cache `_cachedButton` inside their own `updateComplete.then`,
|
|
13921
|
+
* which also lands a tick later. Reading buttons from frame N+1
|
|
13922
|
+
* (after both renders + cache refresh have flushed) reliably hits the
|
|
13923
|
+
* new month's cells.
|
|
13924
|
+
*
|
|
13925
|
+
* Used by every code path that calls `handleNextMonth`/`handlePrevMonth`
|
|
13926
|
+
* and then needs to inspect the freshly-rendered cells (cross-month
|
|
13927
|
+
* keyboard nav, boundary events, `updateActiveCellForVisibleMonth`).
|
|
13928
|
+
* Do NOT collapse to a single rAF — it intermittently lands before
|
|
13929
|
+
* `_cachedButton` is refreshed, which silently breaks focus restoration
|
|
13930
|
+
* and `setActiveCell` lookups.
|
|
13931
|
+
* @private
|
|
13932
|
+
* @param {() => void} callback - Runs once after the month re-render and
|
|
13933
|
+
* the cells' button caches have refreshed.
|
|
13934
|
+
* @returns {void}
|
|
13935
|
+
*/
|
|
13936
|
+
_afterMonthRender(callback) {
|
|
13937
|
+
requestAnimationFrame(() => {
|
|
13938
|
+
requestAnimationFrame(callback);
|
|
13785
13939
|
});
|
|
13786
13940
|
}
|
|
13787
13941
|
|
|
@@ -13899,6 +14053,47 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13899
14053
|
return Array.from(this.shadowRoot.querySelectorAll('auro-formkit-calendar-month'));
|
|
13900
14054
|
}
|
|
13901
14055
|
|
|
14056
|
+
/**
|
|
14057
|
+
* Picks the focusable cell whose date is closest to targetTs. Used as a
|
|
14058
|
+
* fallback after a month-boundary nav when the exact target date isn't
|
|
14059
|
+
* focusable — typically because the month re-render lagged or the date
|
|
14060
|
+
* was filtered out by isOutOfRange. When two cells are equidistant, the
|
|
14061
|
+
* navigation direction breaks the tie so the user moves the way they
|
|
14062
|
+
* pressed (forward → later cell, backward → earlier cell).
|
|
14063
|
+
* @private
|
|
14064
|
+
* @param {Array} cells - Focusable cells from getAllFocusableCells.
|
|
14065
|
+
* @param {Number} targetTs - Desired Unix timestamp (seconds).
|
|
14066
|
+
* @param {'next'|'prev'} direction - Navigation direction.
|
|
14067
|
+
* @returns {Object|null} The nearest cell, or null when cells is empty.
|
|
14068
|
+
*/
|
|
14069
|
+
pickNearestCell(cells, targetTs, direction) {
|
|
14070
|
+
if (!cells.length) {
|
|
14071
|
+
return null;
|
|
14072
|
+
}
|
|
14073
|
+
const forward = direction === 'next';
|
|
14074
|
+
let best = null;
|
|
14075
|
+
let bestDelta = Infinity;
|
|
14076
|
+
cells.forEach((cell) => {
|
|
14077
|
+
if (!cell.day) {
|
|
14078
|
+
return;
|
|
14079
|
+
}
|
|
14080
|
+
const distance = Math.abs(cell.day.date - targetTs);
|
|
14081
|
+
if (distance < bestDelta) {
|
|
14082
|
+
best = cell;
|
|
14083
|
+
bestDelta = distance;
|
|
14084
|
+
return;
|
|
14085
|
+
}
|
|
14086
|
+
if (distance === bestDelta && best) {
|
|
14087
|
+
if (forward && cell.day.date > best.day.date) {
|
|
14088
|
+
best = cell;
|
|
14089
|
+
} else if (!forward && cell.day.date < best.day.date) {
|
|
14090
|
+
best = cell;
|
|
14091
|
+
}
|
|
14092
|
+
}
|
|
14093
|
+
});
|
|
14094
|
+
return best;
|
|
14095
|
+
}
|
|
14096
|
+
|
|
13902
14097
|
/**
|
|
13903
14098
|
* Gets all focusable cells across all rendered months.
|
|
13904
14099
|
* @private
|
|
@@ -13915,9 +14110,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13915
14110
|
|
|
13916
14111
|
/**
|
|
13917
14112
|
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
13918
|
-
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
13919
|
-
*
|
|
13920
|
-
*
|
|
14113
|
+
* Uses imperative DOM manipulation — no Lit re-render triggered. DOM focus
|
|
14114
|
+
* stays on the grid wrapper; the live region (see getOrCreateLiveRegion)
|
|
14115
|
+
* is what announces the active cell to assistive tech.
|
|
13921
14116
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
13922
14117
|
* @returns {void}
|
|
13923
14118
|
*/
|
|
@@ -13998,6 +14193,65 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13998
14193
|
this.clearRangePreview();
|
|
13999
14194
|
}
|
|
14000
14195
|
|
|
14196
|
+
/**
|
|
14197
|
+
* Returns a memoized Set of blackout timestamps (seconds) drawn from both
|
|
14198
|
+
* the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
|
|
14199
|
+
* The cache invalidates when either source array's reference changes, which
|
|
14200
|
+
* matches Lit's own reactive identity semantics for array properties.
|
|
14201
|
+
* @private
|
|
14202
|
+
* @returns {Set<Number>}
|
|
14203
|
+
*/
|
|
14204
|
+
_getBlackoutSet() {
|
|
14205
|
+
// Normalize non-array values to a stable `null` sentinel rather than a
|
|
14206
|
+
// fresh `[]` per call — otherwise the reference-identity cache key
|
|
14207
|
+
// (`_cachedBlackoutDisabledDays === disabledDays`) never matches on
|
|
14208
|
+
// subsequent calls and the Set rebuilds every time. `buildBlackoutSet`
|
|
14209
|
+
// already treats null/non-array as "no legacy disabledDays" via its
|
|
14210
|
+
// own Array.isArray gate.
|
|
14211
|
+
const disabledDays = Array.isArray(this.disabledDays) ? this.disabledDays : null;
|
|
14212
|
+
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14213
|
+
if (this._blackoutSet &&
|
|
14214
|
+
this._cachedBlackoutDisabledDays === disabledDays &&
|
|
14215
|
+
this._cachedBlackoutDates === blackoutDates) {
|
|
14216
|
+
return this._blackoutSet;
|
|
14217
|
+
}
|
|
14218
|
+
|
|
14219
|
+
if (disabledDays && disabledDays.length > 0) {
|
|
14220
|
+
this._warnDisabledDaysDeprecated();
|
|
14221
|
+
}
|
|
14222
|
+
|
|
14223
|
+
this._blackoutSet = buildBlackoutSet(disabledDays, blackoutDates);
|
|
14224
|
+
this._cachedBlackoutDisabledDays = disabledDays;
|
|
14225
|
+
this._cachedBlackoutDates = blackoutDates;
|
|
14226
|
+
return this._blackoutSet;
|
|
14227
|
+
}
|
|
14228
|
+
|
|
14229
|
+
/**
|
|
14230
|
+
* Per-class flag that gates the `disabledDays` deprecation warning so it
|
|
14231
|
+
* fires exactly once per page no matter how many calendars or rebuild
|
|
14232
|
+
* cycles encounter the legacy array.
|
|
14233
|
+
* @private
|
|
14234
|
+
*/
|
|
14235
|
+
static _warnedDisabledDaysDeprecation = false;
|
|
14236
|
+
|
|
14237
|
+
/**
|
|
14238
|
+
* One-time `console.debug` directing consumers from the legacy
|
|
14239
|
+
* `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
|
|
14240
|
+
* the first time `_getBlackoutSet` rebuilds from a non-empty
|
|
14241
|
+
* `disabledDays`; subsequent calls (on this or any other AuroCalendar
|
|
14242
|
+
* instance on the page) are silent.
|
|
14243
|
+
* @private
|
|
14244
|
+
* @returns {void}
|
|
14245
|
+
*/
|
|
14246
|
+
_warnDisabledDaysDeprecated() {
|
|
14247
|
+
if (AuroCalendar._warnedDisabledDaysDeprecation) {
|
|
14248
|
+
return;
|
|
14249
|
+
}
|
|
14250
|
+
AuroCalendar._warnedDisabledDaysDeprecation = true;
|
|
14251
|
+
// eslint-disable-next-line no-console
|
|
14252
|
+
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.');
|
|
14253
|
+
}
|
|
14254
|
+
|
|
14001
14255
|
/**
|
|
14002
14256
|
* Computes the initial active date from data properties alone — no DOM required.
|
|
14003
14257
|
* Priority:
|
|
@@ -14042,21 +14296,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14042
14296
|
const minTs = Number.isFinite(rawMin) ? rawMin : -Infinity;
|
|
14043
14297
|
const maxTs = Number.isFinite(rawMax) ? rawMax : Infinity;
|
|
14044
14298
|
|
|
14045
|
-
// Build a Set of blackout timestamps for O(1) lookup.
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
14050
|
-
const isoBlackouts = this.datepicker?.blackoutDates;
|
|
14051
|
-
if (Array.isArray(isoBlackouts)) {
|
|
14052
|
-
for (const isoStr of isoBlackouts) {
|
|
14053
|
-
const parts = isoStr.split('-');
|
|
14054
|
-
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
14055
|
-
if (Number.isFinite(ts)) {
|
|
14056
|
-
blackoutSet.add(ts);
|
|
14057
|
-
}
|
|
14058
|
-
}
|
|
14059
|
-
}
|
|
14299
|
+
// Build a Set of blackout timestamps for O(1) lookup. Memoized by the
|
|
14300
|
+
// identity of the source arrays so rapid month nav doesn't rebuild the
|
|
14301
|
+
// Set (and re-parse every ISO string) on every keypress.
|
|
14302
|
+
const blackoutSet = this._getBlackoutSet();
|
|
14060
14303
|
|
|
14061
14304
|
/**
|
|
14062
14305
|
* A date (unix timestamp in seconds, midnight-aligned) is "enabled" when
|
|
@@ -14252,8 +14495,8 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14252
14495
|
|
|
14253
14496
|
/**
|
|
14254
14497
|
* Handles arrow key navigation on the calendar grid wrapper.
|
|
14255
|
-
* Focus stays on the grid wrapper; only
|
|
14256
|
-
*
|
|
14498
|
+
* Focus stays on the grid wrapper; only the visual active-cell indicator
|
|
14499
|
+
* changes. The live region announces the new active cell.
|
|
14257
14500
|
* @private
|
|
14258
14501
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
14259
14502
|
* @returns {void}
|
|
@@ -14318,21 +14561,21 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14318
14561
|
} else {
|
|
14319
14562
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14320
14563
|
}
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14564
|
+
this._afterMonthRender(() => {
|
|
14565
|
+
const cells = this.getAllFocusableCells();
|
|
14566
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetTs);
|
|
14567
|
+
if (target) {
|
|
14568
|
+
this.setActiveCell(target.day.date);
|
|
14569
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14570
|
+
} else {
|
|
14571
|
+
const fallback = this.pickNearestCell(cells, targetTs, navDir);
|
|
14572
|
+
if (fallback) {
|
|
14330
14573
|
this.setActiveCell(fallback.day.date);
|
|
14331
14574
|
this.handleCellFocused({ detail: { date: fallback.day.date } });
|
|
14332
14575
|
}
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14576
|
+
}
|
|
14577
|
+
// Re-focus grid wrapper after month change re-render
|
|
14578
|
+
this.focusActiveCell();
|
|
14336
14579
|
});
|
|
14337
14580
|
}
|
|
14338
14581
|
}
|
|
@@ -14358,26 +14601,20 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14358
14601
|
} else {
|
|
14359
14602
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14360
14603
|
}
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
if (navDirection === 'next') {
|
|
14372
|
-
[nearest] = cells;
|
|
14373
|
-
} else {
|
|
14374
|
-
nearest = cells[cells.length - 1];
|
|
14375
|
-
}
|
|
14604
|
+
this._afterMonthRender(() => {
|
|
14605
|
+
const cells = this.getAllFocusableCells();
|
|
14606
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14607
|
+
if (target) {
|
|
14608
|
+
this.setActiveCell(target.day.date);
|
|
14609
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14610
|
+
} else {
|
|
14611
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14612
|
+
if (nearest) {
|
|
14376
14613
|
this.setActiveCell(nearest.day.date);
|
|
14377
14614
|
this.handleCellFocused({ detail: { date: nearest.day.date } });
|
|
14378
14615
|
}
|
|
14379
|
-
|
|
14380
|
-
|
|
14616
|
+
}
|
|
14617
|
+
this.focusActiveCell();
|
|
14381
14618
|
});
|
|
14382
14619
|
}
|
|
14383
14620
|
}
|
|
@@ -14427,19 +14664,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14427
14664
|
}
|
|
14428
14665
|
|
|
14429
14666
|
this.handleNextMonth({ skipActiveUpdate: true });
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14667
|
+
this._afterMonthRender(() => {
|
|
14668
|
+
const cells = this.getAllFocusableCells();
|
|
14669
|
+
const target = cells.find((cell) => cell.day && cell.day.date === nextTs);
|
|
14670
|
+
if (target) {
|
|
14671
|
+
this.setActiveCell(target.day.date);
|
|
14672
|
+
this.focusActiveCell();
|
|
14673
|
+
} else {
|
|
14674
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14675
|
+
// `cells[length - 1]` would land on the end of the new month,
|
|
14676
|
+
// far from the user's intended `nextTs`.
|
|
14677
|
+
const fallback = this.pickNearestCell(cells, nextTs, 'next');
|
|
14678
|
+
if (fallback) {
|
|
14679
|
+
this.setActiveCell(fallback.day.date);
|
|
14440
14680
|
this.focusActiveCell();
|
|
14441
14681
|
}
|
|
14442
|
-
}
|
|
14682
|
+
}
|
|
14443
14683
|
});
|
|
14444
14684
|
} else if (direction === 'prev' && this.showPrevMonthBtn) {
|
|
14445
14685
|
// Navigate to previous month and focus the computed previous date.
|
|
@@ -14453,19 +14693,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14453
14693
|
}
|
|
14454
14694
|
|
|
14455
14695
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14696
|
+
this._afterMonthRender(() => {
|
|
14697
|
+
const cells = this.getAllFocusableCells();
|
|
14698
|
+
const target = cells.find((cell) => cell.day && cell.day.date === prevTs);
|
|
14699
|
+
if (target) {
|
|
14700
|
+
this.setActiveCell(target.day.date);
|
|
14701
|
+
this.focusActiveCell();
|
|
14702
|
+
} else {
|
|
14703
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14704
|
+
// `cells[0]` would land on the start of the previous month, far
|
|
14705
|
+
// from the user's intended `prevTs`.
|
|
14706
|
+
const fallback = this.pickNearestCell(cells, prevTs, 'prev');
|
|
14707
|
+
if (fallback) {
|
|
14708
|
+
this.setActiveCell(fallback.day.date);
|
|
14466
14709
|
this.focusActiveCell();
|
|
14467
14710
|
}
|
|
14468
|
-
}
|
|
14711
|
+
}
|
|
14469
14712
|
});
|
|
14470
14713
|
}
|
|
14471
14714
|
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
@@ -14493,20 +14736,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14493
14736
|
} else {
|
|
14494
14737
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14495
14738
|
}
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14739
|
+
this._afterMonthRender(() => {
|
|
14740
|
+
const cells = this.getAllFocusableCells();
|
|
14741
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14742
|
+
if (target) {
|
|
14743
|
+
this.setActiveCell(target.day.date);
|
|
14744
|
+
this.focusActiveCell();
|
|
14745
|
+
} else {
|
|
14746
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — the
|
|
14747
|
+
// old direction-based `cells[0]`/`cells[length-1]` clamp
|
|
14748
|
+
// could land 25+ days from the intended target.
|
|
14749
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14750
|
+
if (nearest) {
|
|
14506
14751
|
this.setActiveCell(nearest.day.date);
|
|
14507
14752
|
this.focusActiveCell();
|
|
14508
14753
|
}
|
|
14509
|
-
}
|
|
14754
|
+
}
|
|
14510
14755
|
});
|
|
14511
14756
|
}
|
|
14512
14757
|
}
|
|
@@ -14545,8 +14790,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14545
14790
|
return;
|
|
14546
14791
|
}
|
|
14547
14792
|
|
|
14548
|
-
//
|
|
14549
|
-
// so
|
|
14793
|
+
// DOM focus stays on the grid wrapper while arrow keys move the active
|
|
14794
|
+
// cell, so cell buttons never receive native focus. The debounced live
|
|
14795
|
+
// region carries the full-context announcement instead.
|
|
14550
14796
|
const announcement = this.buildFocusAnnouncement(date);
|
|
14551
14797
|
this.announceFocusDebounced(announcement);
|
|
14552
14798
|
|
|
@@ -14616,10 +14862,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14616
14862
|
return null;
|
|
14617
14863
|
}
|
|
14618
14864
|
|
|
14619
|
-
const departTs =
|
|
14865
|
+
const departTs = new Date(parsedFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
14620
14866
|
const parsedTo = Number.parseInt(this.dateTo, 10);
|
|
14621
14867
|
const hasTo = Number.isFinite(parsedTo);
|
|
14622
|
-
const returnTs = hasTo ?
|
|
14868
|
+
const returnTs = hasTo ? new Date(parsedTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
14623
14869
|
|
|
14624
14870
|
if (date === departTs) {
|
|
14625
14871
|
return this.datepicker.rangeLabelStart || 'range start';
|
|
@@ -14633,36 +14879,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14633
14879
|
if (hasTo && date > departTs && date < returnTs) {
|
|
14634
14880
|
return this.datepicker.rangeLabelInRange || 'in range';
|
|
14635
14881
|
}
|
|
14882
|
+
if (!hasTo && date > departTs) {
|
|
14883
|
+
return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
14884
|
+
}
|
|
14636
14885
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
14637
14886
|
}
|
|
14638
14887
|
|
|
14639
14888
|
/**
|
|
14640
|
-
* Checks whether a given date is a blackout date.
|
|
14889
|
+
* Checks whether a given date is a blackout date. Delegates to the
|
|
14890
|
+
* memoized `_getBlackoutSet` so the YYYY-MM-DD parsing and the
|
|
14891
|
+
* legacy/ISO merge rules live in exactly one place (see `blackoutUtils.js`).
|
|
14641
14892
|
* @private
|
|
14642
14893
|
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
14643
14894
|
* @returns {Boolean} True if the date is blacked out.
|
|
14644
14895
|
*/
|
|
14645
14896
|
isDateBlackout(dateTs) {
|
|
14646
|
-
|
|
14647
|
-
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0) {
|
|
14648
|
-
if (this.disabledDays.findIndex((day) => parseInt(day, 10) === dateTs) !== -1) {
|
|
14649
|
-
return true;
|
|
14650
|
-
}
|
|
14651
|
-
}
|
|
14652
|
-
|
|
14653
|
-
// Check ISO blackoutDates.
|
|
14654
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14655
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
14656
|
-
const date = new Date(dateTs * 1000);
|
|
14657
|
-
const yyyy = date.getFullYear();
|
|
14658
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
14659
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
14660
|
-
if (blackoutDates.includes(`${yyyy}-${mm}-${dd}`)) {
|
|
14661
|
-
return true;
|
|
14662
|
-
}
|
|
14663
|
-
}
|
|
14664
|
-
|
|
14665
|
-
return false;
|
|
14897
|
+
return this._getBlackoutSet().has(dateTs);
|
|
14666
14898
|
}
|
|
14667
14899
|
|
|
14668
14900
|
/**
|
|
@@ -14829,9 +15061,34 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14829
15061
|
// the last one.
|
|
14830
15062
|
if (this._announceRafId) {
|
|
14831
15063
|
cancelAnimationFrame(this._announceRafId);
|
|
15064
|
+
this._announceRafId = null;
|
|
14832
15065
|
}
|
|
15066
|
+
this._deliverAnnouncement(dateStr, 0);
|
|
15067
|
+
}
|
|
15068
|
+
|
|
15069
|
+
/**
|
|
15070
|
+
* Writes `dateStr` to the live region. If the dropdown's dialog hasn't
|
|
15071
|
+
* mounted yet (so getOrCreateLiveRegion can't attach), retries on the
|
|
15072
|
+
* next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
|
|
15073
|
+
* dropping the announcement. The retry uses the same `_announceRafId`
|
|
15074
|
+
* the double-rAF below uses, so a newer announceSelection call (or
|
|
15075
|
+
* disconnectedCallback) cancels any in-flight retry.
|
|
15076
|
+
* @private
|
|
15077
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
15078
|
+
* @param {Number} attempts - Number of prior retry attempts.
|
|
15079
|
+
* @returns {void}
|
|
15080
|
+
*/
|
|
15081
|
+
_deliverAnnouncement(dateStr, attempts) {
|
|
14833
15082
|
const liveRegion = this.getOrCreateLiveRegion();
|
|
14834
15083
|
if (!liveRegion) {
|
|
15084
|
+
const MAX_LIVE_REGION_RETRIES = 10;
|
|
15085
|
+
if (attempts < MAX_LIVE_REGION_RETRIES) {
|
|
15086
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
15087
|
+
this._deliverAnnouncement(dateStr, attempts + 1);
|
|
15088
|
+
});
|
|
15089
|
+
} else {
|
|
15090
|
+
this._announceRafId = null;
|
|
15091
|
+
}
|
|
14835
15092
|
return;
|
|
14836
15093
|
}
|
|
14837
15094
|
|
|
@@ -15017,7 +15274,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
15017
15274
|
</button>
|
|
15018
15275
|
` : undefined}
|
|
15019
15276
|
</div>
|
|
15020
|
-
<div id="calendarGrid" class="calendars" role="group" tabindex="0" aria-label="${this.datepicker?.calendarGridLabel}" @keydown="${this.handleGridKeyDown}" @focusin="${this.handleGridFocusIn}" @focusout="${this.handleGridFocusOut}" @calendar-month-mouseleave="${this.clearRangePreview}">
|
|
15277
|
+
<div id="calendarGrid" class="calendars" role="group" aria-roledescription="calendar" tabindex="0" aria-label="${this.datepicker?.calendarGridLabel}" @keydown="${this.handleGridKeyDown}" @focusin="${this.handleGridFocusIn}" @focusout="${this.handleGridFocusOut}" @calendar-month-mouseleave="${this.clearRangePreview}">
|
|
15021
15278
|
${this.renderAllCalendars()}
|
|
15022
15279
|
</div>
|
|
15023
15280
|
</div>
|
|
@@ -18902,7 +19159,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
18902
19159
|
}
|
|
18903
19160
|
};
|
|
18904
19161
|
|
|
18905
|
-
var formkitVersion$1 = '
|
|
19162
|
+
var formkitVersion$1 = '202606261928';
|
|
18906
19163
|
|
|
18907
19164
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
18908
19165
|
static get properties() {
|
|
@@ -20174,7 +20431,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
20174
20431
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
20175
20432
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
20176
20433
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
20177
|
-
aria-haspopup="${ifDefined(this.a11yRole === 'combobox' ? 'listbox' : undefined)}"
|
|
20434
|
+
aria-haspopup="${ifDefined(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
20178
20435
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
20179
20436
|
aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
|
|
20180
20437
|
@focusin="${this.handleFocusin}"
|
|
@@ -32496,7 +32753,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
32496
32753
|
}
|
|
32497
32754
|
};
|
|
32498
32755
|
|
|
32499
|
-
var formkitVersion = '
|
|
32756
|
+
var formkitVersion = '202606261928';
|
|
32500
32757
|
|
|
32501
32758
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
32502
32759
|
// See LICENSE in the project root for license information.
|
|
@@ -33973,6 +34230,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
33973
34230
|
this.rangeLabelBeforeRange = 'before range';
|
|
33974
34231
|
this.rangeLabelInRange = 'in range';
|
|
33975
34232
|
this.rangeLabelAfterRange = 'after range';
|
|
34233
|
+
this.rangeLabelEndPreview = 'previewing range end';
|
|
33976
34234
|
this.blackoutDates = [];
|
|
33977
34235
|
this.blackoutLabel = 'unavailable';
|
|
33978
34236
|
this.navLabelPrevMonth = 'Previous month';
|
|
@@ -34072,6 +34330,22 @@ class AuroDatePicker extends AuroElement {
|
|
|
34072
34330
|
*/
|
|
34073
34331
|
this.handleClick = this.handleClick.bind(this);
|
|
34074
34332
|
|
|
34333
|
+
/**
|
|
34334
|
+
* Single AbortController shared by every listener registered in the
|
|
34335
|
+
* configure* methods. Lets disconnectedCallback tear all of them down
|
|
34336
|
+
* with one abort() call.
|
|
34337
|
+
*
|
|
34338
|
+
* The genuine leak risk is the listeners attached to children that can
|
|
34339
|
+
* outlive the host if they get reparented — `this.dropdown`,
|
|
34340
|
+
* `this.calendar`, and the inputs inside the dropdown's slot.
|
|
34341
|
+
* Listeners attached to `this` (e.g. focusin/focusout on the host)
|
|
34342
|
+
* form a self-contained reference graph that the GC can collect with
|
|
34343
|
+
* the host anyway, but they share the same signal so the cleanup
|
|
34344
|
+
* pattern stays uniform across all configure* sites.
|
|
34345
|
+
* @private
|
|
34346
|
+
*/
|
|
34347
|
+
this._listenerAbortController = new AbortController();
|
|
34348
|
+
|
|
34075
34349
|
/**
|
|
34076
34350
|
* @private
|
|
34077
34351
|
*/
|
|
@@ -34120,6 +34394,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34120
34394
|
|
|
34121
34395
|
/**
|
|
34122
34396
|
* Label announced for blackout (disabled but in-range) date cells.
|
|
34397
|
+
* @default 'unavailable'
|
|
34123
34398
|
*/
|
|
34124
34399
|
blackoutLabel: {
|
|
34125
34400
|
type: String,
|
|
@@ -34136,6 +34411,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34136
34411
|
|
|
34137
34412
|
/**
|
|
34138
34413
|
* Accessible label for the calendar grid containing the days of the month.
|
|
34414
|
+
* @default 'Calendar days of the month'
|
|
34139
34415
|
*/
|
|
34140
34416
|
calendarGridLabel: {
|
|
34141
34417
|
type: String,
|
|
@@ -34298,6 +34574,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34298
34574
|
|
|
34299
34575
|
/**
|
|
34300
34576
|
* Accessible label for the next month navigation button.
|
|
34577
|
+
* @default 'Next month'
|
|
34301
34578
|
*/
|
|
34302
34579
|
navLabelNextMonth: {
|
|
34303
34580
|
type: String,
|
|
@@ -34306,6 +34583,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34306
34583
|
|
|
34307
34584
|
/**
|
|
34308
34585
|
* Accessible label for the previous month navigation button.
|
|
34586
|
+
* @default 'Previous month'
|
|
34309
34587
|
*/
|
|
34310
34588
|
navLabelPrevMonth: {
|
|
34311
34589
|
type: String,
|
|
@@ -34383,7 +34661,11 @@ class AuroDatePicker extends AuroElement {
|
|
|
34383
34661
|
},
|
|
34384
34662
|
|
|
34385
34663
|
/**
|
|
34386
|
-
* Label announced for cells after
|
|
34664
|
+
* Label announced for cells after a fully selected range (both
|
|
34665
|
+
* `dateFrom` and `dateTo` are set). While a range is still being
|
|
34666
|
+
* picked (`dateFrom` set, `dateTo` unset), focused cells past the
|
|
34667
|
+
* start use `rangeLabelEndPreview` instead.
|
|
34668
|
+
* @default 'after range'
|
|
34387
34669
|
*/
|
|
34388
34670
|
rangeLabelAfterRange: {
|
|
34389
34671
|
type: String,
|
|
@@ -34392,6 +34674,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34392
34674
|
|
|
34393
34675
|
/**
|
|
34394
34676
|
* Label announced for cells before the range start.
|
|
34677
|
+
* @default 'before range'
|
|
34395
34678
|
*/
|
|
34396
34679
|
rangeLabelBeforeRange: {
|
|
34397
34680
|
type: String,
|
|
@@ -34400,14 +34683,27 @@ class AuroDatePicker extends AuroElement {
|
|
|
34400
34683
|
|
|
34401
34684
|
/**
|
|
34402
34685
|
* Label announced for the range end date cell.
|
|
34686
|
+
* @default 'range end'
|
|
34403
34687
|
*/
|
|
34404
34688
|
rangeLabelEnd: {
|
|
34405
34689
|
type: String,
|
|
34406
34690
|
reflect: true
|
|
34407
34691
|
},
|
|
34408
34692
|
|
|
34693
|
+
/**
|
|
34694
|
+
* Label announced for the focused cell while previewing a range end
|
|
34695
|
+
* (dateFrom set, dateTo not yet selected). Tells AT users that
|
|
34696
|
+
* pressing Enter would commit this cell as the range end.
|
|
34697
|
+
* @default 'previewing range end'
|
|
34698
|
+
*/
|
|
34699
|
+
rangeLabelEndPreview: {
|
|
34700
|
+
type: String,
|
|
34701
|
+
reflect: true
|
|
34702
|
+
},
|
|
34703
|
+
|
|
34409
34704
|
/**
|
|
34410
34705
|
* Label announced for cells within the selected range.
|
|
34706
|
+
* @default 'in range'
|
|
34411
34707
|
*/
|
|
34412
34708
|
rangeLabelInRange: {
|
|
34413
34709
|
type: String,
|
|
@@ -34416,6 +34712,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34416
34712
|
|
|
34417
34713
|
/**
|
|
34418
34714
|
* Label announced for the range start date cell.
|
|
34715
|
+
* @default 'range start'
|
|
34419
34716
|
*/
|
|
34420
34717
|
rangeLabelStart: {
|
|
34421
34718
|
type: String,
|
|
@@ -34423,7 +34720,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34423
34720
|
},
|
|
34424
34721
|
|
|
34425
34722
|
/**
|
|
34426
|
-
* Dates that the user should have for reference as part of their decision
|
|
34723
|
+
* Dates that the user should have for reference as part of their decision-making when selecting a date.
|
|
34427
34724
|
* This should be a JSON string array of ISO date strings (`YYYY-MM-DD`).
|
|
34428
34725
|
*/
|
|
34429
34726
|
referenceDates: {
|
|
@@ -34780,10 +35077,26 @@ class AuroDatePicker extends AuroElement {
|
|
|
34780
35077
|
// ─── Vendor calendar time conversions ─────────────────────────────────────
|
|
34781
35078
|
|
|
34782
35079
|
/**
|
|
34783
|
-
* Converts a Unix timestamp (seconds) from the
|
|
35080
|
+
* Converts a Unix timestamp (seconds) from the vendored range-datepicker
|
|
35081
|
+
* (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
|
|
35082
|
+
*
|
|
35083
|
+
* Timezone contract:
|
|
35084
|
+
* - INPUT: `time` is assumed to be the seconds-since-epoch of **local
|
|
35085
|
+
* midnight** for the intended calendar day. The vendor's Day constructor
|
|
35086
|
+
* builds it via `date-fns format(date, 't')` from a locally-constructed
|
|
35087
|
+
* Date, so this assumption currently holds end-to-end.
|
|
35088
|
+
* - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
|
|
35089
|
+
* getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
|
|
35090
|
+
* string matches the local calendar day.
|
|
35091
|
+
*
|
|
35092
|
+
* If the vendor ever switches to emitting UTC-midnight timestamps, this
|
|
35093
|
+
* conversion will silently shift the returned date by one day in zones
|
|
35094
|
+
* west of UTC. Any vendor swap should re-verify this contract; the TZ
|
|
35095
|
+
* regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
|
|
35096
|
+
*
|
|
34784
35097
|
* @private
|
|
34785
|
-
* @param {number} time - Unix timestamp
|
|
34786
|
-
* @returns {string} ISO date string (yyyy-mm-dd).
|
|
35098
|
+
* @param {number} time - Unix timestamp (seconds), local midnight of the day.
|
|
35099
|
+
* @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
|
|
34787
35100
|
*/
|
|
34788
35101
|
convertWcTimeToDate(time) {
|
|
34789
35102
|
return dateFormatter$1.toISOFormatString(new Date(time * 1000));
|
|
@@ -34885,8 +35198,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
34885
35198
|
}
|
|
34886
35199
|
}
|
|
34887
35200
|
|
|
34888
|
-
// Focus the calendar grid wrapper (
|
|
34889
|
-
// the SR announcement for the active cell
|
|
35201
|
+
// Focus the calendar grid wrapper. The live region (announced just
|
|
35202
|
+
// below) handles the SR announcement for the active cell.
|
|
34890
35203
|
if (activeCell) {
|
|
34891
35204
|
this.calendar.focusActiveCell();
|
|
34892
35205
|
|
|
@@ -34936,11 +35249,13 @@ class AuroDatePicker extends AuroElement {
|
|
|
34936
35249
|
this.dropdown.bibDialogLabel = labelElement.textContent.trim() || undefined;
|
|
34937
35250
|
}
|
|
34938
35251
|
|
|
35252
|
+
const { signal } = this._listenerAbortController;
|
|
35253
|
+
|
|
34939
35254
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
34940
35255
|
if (!this.isPopoverVisible) {
|
|
34941
35256
|
this.dropdown.show();
|
|
34942
35257
|
}
|
|
34943
|
-
});
|
|
35258
|
+
}, { signal });
|
|
34944
35259
|
|
|
34945
35260
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
34946
35261
|
this.notifyDatepickerToggled();
|
|
@@ -34958,7 +35273,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34958
35273
|
if (this.valueObject) {
|
|
34959
35274
|
this.centralDate = this.value;
|
|
34960
35275
|
} else if (!this.centralDate && !this.calendarStartDate && !this.minDate) {
|
|
34961
|
-
this.centralDate = new Date();
|
|
35276
|
+
this.centralDate = dateFormatter$1.toISOFormatString(new Date());
|
|
34962
35277
|
}
|
|
34963
35278
|
}
|
|
34964
35279
|
|
|
@@ -35038,7 +35353,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35038
35353
|
this.forceScrollOnNextMobileCalendarRender = false;
|
|
35039
35354
|
}, 0);
|
|
35040
35355
|
}
|
|
35041
|
-
});
|
|
35356
|
+
}, { signal });
|
|
35042
35357
|
|
|
35043
35358
|
// Handle responsive strategy changes while the dropdown is open
|
|
35044
35359
|
// (e.g. resizing from desktop → mobile or vice versa).
|
|
@@ -35085,7 +35400,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35085
35400
|
});
|
|
35086
35401
|
});
|
|
35087
35402
|
}
|
|
35088
|
-
});
|
|
35403
|
+
}, { signal });
|
|
35089
35404
|
}
|
|
35090
35405
|
|
|
35091
35406
|
/**
|
|
@@ -35098,6 +35413,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
35098
35413
|
|
|
35099
35414
|
this.inputList = [...this.dropdown.querySelectorAll(this.inputTag._$litStatic$)];
|
|
35100
35415
|
|
|
35416
|
+
const { signal } = this._listenerAbortController;
|
|
35417
|
+
|
|
35101
35418
|
this.inputList.forEach((input, index) => {
|
|
35102
35419
|
input.addEventListener('input', (event) => {
|
|
35103
35420
|
event.stopPropagation();
|
|
@@ -35109,7 +35426,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35109
35426
|
}
|
|
35110
35427
|
|
|
35111
35428
|
this.notifyValueChanged();
|
|
35112
|
-
});
|
|
35429
|
+
}, { signal });
|
|
35113
35430
|
|
|
35114
35431
|
input.addEventListener('auroFormElement-validated', (evt) => {
|
|
35115
35432
|
// not to bubble up input's validated event.
|
|
@@ -35125,7 +35442,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35125
35442
|
this.validity = evt.detail.validity;
|
|
35126
35443
|
this.errorMessage = evt.detail.message;
|
|
35127
35444
|
}
|
|
35128
|
-
});
|
|
35445
|
+
}, { signal });
|
|
35129
35446
|
});
|
|
35130
35447
|
}
|
|
35131
35448
|
|
|
@@ -35139,19 +35456,32 @@ class AuroDatePicker extends AuroElement {
|
|
|
35139
35456
|
this.calendar.datepicker = this;
|
|
35140
35457
|
this.calendar.dropdown = this.dropdown;
|
|
35141
35458
|
|
|
35459
|
+
const { signal } = this._listenerAbortController;
|
|
35460
|
+
|
|
35142
35461
|
this.calendar.addEventListener('auroCalendar-dateSelected', () => {
|
|
35143
|
-
|
|
35144
|
-
|
|
35462
|
+
// Compare the input's ISO value against the *converted* calendar
|
|
35463
|
+
// timestamp (the vendor's `dateFrom`/`dateTo` are Unix-seconds
|
|
35464
|
+
// strings — comparing the input ISO directly against them would
|
|
35465
|
+
// never match, so the write would fire on every event and emit
|
|
35466
|
+
// redundant input/change activity).
|
|
35467
|
+
if (this.calendar.dateFrom !== undefined) {
|
|
35468
|
+
const fromIso = this.convertWcTimeToDate(this.calendar.dateFrom);
|
|
35469
|
+
if (this.inputList[0].value !== fromIso) {
|
|
35470
|
+
this.inputList[0].value = fromIso;
|
|
35471
|
+
}
|
|
35145
35472
|
}
|
|
35146
35473
|
|
|
35147
|
-
if (this.inputList[1] && this.calendar.dateTo
|
|
35148
|
-
|
|
35474
|
+
if (this.inputList[1] && this.calendar.dateTo) {
|
|
35475
|
+
const toIso = this.convertWcTimeToDate(this.calendar.dateTo);
|
|
35476
|
+
if (this.inputList[1].value !== toIso) {
|
|
35477
|
+
this.inputList[1].value = toIso;
|
|
35478
|
+
}
|
|
35149
35479
|
}
|
|
35150
|
-
});
|
|
35480
|
+
}, { signal });
|
|
35151
35481
|
|
|
35152
35482
|
this.calendar.addEventListener('auroCalendar-dismissRequest', () => {
|
|
35153
35483
|
this.dropdown.hide();
|
|
35154
|
-
});
|
|
35484
|
+
}, { signal });
|
|
35155
35485
|
|
|
35156
35486
|
this.calendar.addEventListener('auroCalendar-centralDateChanged', (event) => {
|
|
35157
35487
|
const match = this.centralDateObject && this.util.datesMatch(event.detail.date, this.centralDateObject);
|
|
@@ -35161,7 +35491,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35161
35491
|
}
|
|
35162
35492
|
|
|
35163
35493
|
this.notifyMonthChanged(event);
|
|
35164
|
-
});
|
|
35494
|
+
}, { signal });
|
|
35165
35495
|
}
|
|
35166
35496
|
|
|
35167
35497
|
/**
|
|
@@ -35170,10 +35500,17 @@ class AuroDatePicker extends AuroElement {
|
|
|
35170
35500
|
* @returns {void}
|
|
35171
35501
|
*/
|
|
35172
35502
|
configureDatepicker() {
|
|
35503
|
+
// These listeners are on `this` (the host), so they would GC with the
|
|
35504
|
+
// host even without the abort signal — see the leak rationale on
|
|
35505
|
+
// `_listenerAbortController`. The signal is still passed for uniform
|
|
35506
|
+
// cleanup semantics with the child-element listeners in the other
|
|
35507
|
+
// configure* methods.
|
|
35508
|
+
const { signal } = this._listenerAbortController;
|
|
35509
|
+
|
|
35173
35510
|
this.addEventListener('focusin', () => {
|
|
35174
35511
|
this.touched = true;
|
|
35175
35512
|
this.hasFocus = true;
|
|
35176
|
-
});
|
|
35513
|
+
}, { signal });
|
|
35177
35514
|
|
|
35178
35515
|
this.addEventListener('focusout', () => {
|
|
35179
35516
|
this.hasFocus = false;
|
|
@@ -35185,7 +35522,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35185
35522
|
if (!this.matches(':focus-within')) {
|
|
35186
35523
|
this.validate();
|
|
35187
35524
|
}
|
|
35188
|
-
});
|
|
35525
|
+
}, { signal });
|
|
35189
35526
|
|
|
35190
35527
|
if (this.valueObject) {
|
|
35191
35528
|
this.calendar.dateFrom = this.convertToWcValidTime(this.valueObject);
|
|
@@ -35383,6 +35720,41 @@ class AuroDatePicker extends AuroElement {
|
|
|
35383
35720
|
return this.validity !== undefined && this.validity !== 'valid';
|
|
35384
35721
|
}
|
|
35385
35722
|
|
|
35723
|
+
/**
|
|
35724
|
+
* Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
|
|
35725
|
+
* spans every datepicker instance on the page; lives on the class (not
|
|
35726
|
+
* at module scope) so it stays an encapsulated implementation detail of
|
|
35727
|
+
* this component and does not interfere with WCA's class-JSDoc
|
|
35728
|
+
* attachment.
|
|
35729
|
+
* @private
|
|
35730
|
+
*/
|
|
35731
|
+
static _warnedInvalidLocales = new Set();
|
|
35732
|
+
|
|
35733
|
+
/**
|
|
35734
|
+
* Logs a one-time `console.debug` when an unsupported locale falls back to
|
|
35735
|
+
* en-US. Deduped by the offending tag so noisy re-renders that resurface
|
|
35736
|
+
* the same bad value stay quiet, but each new bad value still signals so
|
|
35737
|
+
* consumers can spot the typo or missing tag.
|
|
35738
|
+
* @private
|
|
35739
|
+
* @param {string|undefined} badLocale - The locale value that failed.
|
|
35740
|
+
* @returns {void}
|
|
35741
|
+
*/
|
|
35742
|
+
_warnInvalidLocale(badLocale) {
|
|
35743
|
+
// Stringify without coalescing — `String(undefined)` / `String(null)`
|
|
35744
|
+
// surface the actual offending value in the log, instead of the
|
|
35745
|
+
// ambiguous `Locale ""` that `String(badLocale ?? '')` would produce.
|
|
35746
|
+
// Dedup still works correctly because each unique stringification
|
|
35747
|
+
// becomes its own Set entry.
|
|
35748
|
+
const key = String(badLocale);
|
|
35749
|
+
const seen = AuroDatePicker._warnedInvalidLocales;
|
|
35750
|
+
if (seen.has(key)) {
|
|
35751
|
+
return;
|
|
35752
|
+
}
|
|
35753
|
+
seen.add(key);
|
|
35754
|
+
// eslint-disable-next-line no-console
|
|
35755
|
+
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".`);
|
|
35756
|
+
}
|
|
35757
|
+
|
|
35386
35758
|
/**
|
|
35387
35759
|
* Lifecycle method to check if the locale is valid.
|
|
35388
35760
|
* @ignore
|
|
@@ -35393,10 +35765,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35393
35765
|
if (changedProperties.has('locale')) {
|
|
35394
35766
|
try {
|
|
35395
35767
|
const supported = Intl.DateTimeFormat.supportedLocalesOf([this.locale], { localeMatcher: 'lookup' });
|
|
35396
|
-
|
|
35768
|
+
if (supported.length > 0) {
|
|
35769
|
+
this._validLocale = this.locale;
|
|
35770
|
+
} else {
|
|
35771
|
+
this._validLocale = 'en-US';
|
|
35772
|
+
this._warnInvalidLocale(this.locale);
|
|
35773
|
+
}
|
|
35397
35774
|
} catch {
|
|
35398
|
-
console.debug(`[AuroDatePicker] The locale "${this.locale}" is not valid. Falling back to "en-US".`); // eslint-disable-line no-console
|
|
35399
35775
|
this._validLocale = 'en-US';
|
|
35776
|
+
this._warnInvalidLocale(this.locale);
|
|
35400
35777
|
}
|
|
35401
35778
|
|
|
35402
35779
|
const previousLocaleFormat = getDateFormatFromLocale$1(changedProperties.get('locale'));
|
|
@@ -35478,8 +35855,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35478
35855
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35479
35856
|
// to prevent the displayed months from shifting
|
|
35480
35857
|
this.centralDate = this.value;
|
|
35481
|
-
//TODO: TEST THIS CHANGE
|
|
35482
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.value);
|
|
35483
35858
|
}
|
|
35484
35859
|
|
|
35485
35860
|
this.setHasValue();
|
|
@@ -35539,8 +35914,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35539
35914
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35540
35915
|
// to prevent the displayed months from shifting
|
|
35541
35916
|
this.centralDate = this.valueEnd;
|
|
35542
|
-
// TODO: TEST THIS CHANGE
|
|
35543
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.formattedValueEnd);
|
|
35544
35917
|
}
|
|
35545
35918
|
|
|
35546
35919
|
this.validate();
|
|
@@ -35682,7 +36055,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35682
36055
|
* @returns {void}
|
|
35683
36056
|
*/
|
|
35684
36057
|
configureClickHandler() {
|
|
35685
|
-
this.addEventListener('click', this.handleClick);
|
|
36058
|
+
this.addEventListener('click', this.handleClick, { signal: this._listenerAbortController.signal });
|
|
35686
36059
|
}
|
|
35687
36060
|
|
|
35688
36061
|
firstUpdated() {
|
|
@@ -35690,6 +36063,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35690
36063
|
// Add the tag name as an attribute if it is different than the component name
|
|
35691
36064
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
|
|
35692
36065
|
|
|
36066
|
+
// If the element was disconnected before this first render finished,
|
|
36067
|
+
// disconnectedCallback's microtask already aborted the controller. The
|
|
36068
|
+
// connectedCallback reinit guard skips that case because `hasUpdated`
|
|
36069
|
+
// is still false. Mint a fresh controller here so configure* registers
|
|
36070
|
+
// listeners against a live signal.
|
|
36071
|
+
if (this._listenerAbortController.signal.aborted) {
|
|
36072
|
+
this._listenerAbortController = new AbortController();
|
|
36073
|
+
}
|
|
36074
|
+
|
|
35693
36075
|
this.configureDropdown();
|
|
35694
36076
|
this.configureInput();
|
|
35695
36077
|
this.configureCalendar();
|
|
@@ -35701,9 +36083,36 @@ class AuroDatePicker extends AuroElement {
|
|
|
35701
36083
|
connectedCallback() {
|
|
35702
36084
|
super.connectedCallback();
|
|
35703
36085
|
|
|
36086
|
+
// True reconnect after `disconnectedCallback` aborted our controller:
|
|
36087
|
+
// the existing signal is dead, so listeners registered against it
|
|
36088
|
+
// would never fire. Create a fresh controller and re-run the
|
|
36089
|
+
// configure* wiring (each method is idempotent — it just re-caches
|
|
36090
|
+
// child refs and re-registers listeners against the new signal).
|
|
36091
|
+
// `hasUpdated` gates this so the *first* connect (which precedes
|
|
36092
|
+
// firstUpdated) still falls through to firstUpdated's initial wiring.
|
|
36093
|
+
if (this.hasUpdated && this._listenerAbortController.signal.aborted) {
|
|
36094
|
+
this._listenerAbortController = new AbortController();
|
|
36095
|
+
this.configureDropdown();
|
|
36096
|
+
this.configureInput();
|
|
36097
|
+
this.configureCalendar();
|
|
36098
|
+
this.configureDatepicker();
|
|
36099
|
+
this.configureClickHandler();
|
|
36100
|
+
}
|
|
36101
|
+
|
|
35704
36102
|
this.locale = this.domHandler.getLocale(this);
|
|
35705
36103
|
}
|
|
35706
36104
|
|
|
36105
|
+
disconnectedCallback() {
|
|
36106
|
+
super.disconnectedCallback();
|
|
36107
|
+
// Defer so that re-parenting (auro-drawer slotting it into a dialog,
|
|
36108
|
+
// for example) does not abort listeners we still need after reconnect.
|
|
36109
|
+
queueMicrotask(() => {
|
|
36110
|
+
if (!this.isConnected) {
|
|
36111
|
+
this._listenerAbortController.abort();
|
|
36112
|
+
}
|
|
36113
|
+
});
|
|
36114
|
+
}
|
|
36115
|
+
|
|
35707
36116
|
// layout render methods
|
|
35708
36117
|
// ------------------------------------
|
|
35709
36118
|
|