@aurodesignsystem-dev/auro-formkit 0.0.0-pr1512.0 → 0.0.0-pr1513.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 +96 -119
- package/components/combobox/demo/getting-started.min.js +96 -119
- package/components/combobox/demo/index.min.js +96 -119
- package/components/combobox/dist/index.js +95 -118
- package/components/combobox/dist/registered.js +95 -118
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/accessibility.md +2 -1
- package/components/datepicker/demo/api.md +63 -62
- package/components/datepicker/demo/customize.md +12 -1
- package/components/datepicker/demo/customize.min.js +716 -336
- package/components/datepicker/demo/index.min.js +716 -336
- 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} +91 -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 +716 -336
- package/components/datepicker/dist/registered.js +716 -336
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +918 -584
- package/components/form/demo/getting-started.min.js +918 -584
- package/components/form/demo/index.min.js +918 -584
- package/components/form/demo/registerDemoDeps.min.js +918 -584
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.md +8 -8
- package/components/input/demo/customize.min.js +93 -116
- package/components/input/demo/getting-started.min.js +93 -116
- package/components/input/demo/index.min.js +93 -116
- package/components/input/dist/base-input.d.ts +44 -33
- package/components/input/dist/index.js +94 -129
- package/components/input/dist/registered.js +93 -116
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +2 -2
- package/components/select/demo/getting-started.min.js +2 -2
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +562 -480
- 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);
|
|
@@ -10507,13 +10507,6 @@ let AuroInputUtilities$1 = class AuroInputUtilities {
|
|
|
10507
10507
|
* @returns {string | undefined}
|
|
10508
10508
|
*/
|
|
10509
10509
|
toFormattedValue(valueObject, format) {
|
|
10510
|
-
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
10511
|
-
// `format` argument has to fail gracefully rather than throw on
|
|
10512
|
-
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
10513
|
-
// as "no format → no display value".
|
|
10514
|
-
if (!format) {
|
|
10515
|
-
return undefined;
|
|
10516
|
-
}
|
|
10517
10510
|
const normalizedFormat = format.toLowerCase();
|
|
10518
10511
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
10519
10512
|
|
|
@@ -10869,8 +10862,8 @@ class RangeDatepickerCell extends LitElement {
|
|
|
10869
10862
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
10870
10863
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
10871
10864
|
if (day) {
|
|
10872
|
-
if (getTime(startOfDay$
|
|
10873
|
-
getTime(startOfDay$
|
|
10865
|
+
if (getTime(startOfDay$1(parsedDateTo * 1000)) / 1000 === day.date ||
|
|
10866
|
+
getTime(startOfDay$1(parsedDateFrom * 1000)) / 1000 === day.date) {
|
|
10874
10867
|
this.selected = true;
|
|
10875
10868
|
}
|
|
10876
10869
|
if (((hoveredDate === day.date || day.date < hoveredDate) &&
|
|
@@ -11058,7 +11051,7 @@ class RangeDatepickerCalendar extends LitElement {
|
|
|
11058
11051
|
this.dayNamesOfTheWeek = [];
|
|
11059
11052
|
this.daysOfMonth = [];
|
|
11060
11053
|
this._locale = null;
|
|
11061
|
-
this.currentDate = parseInt(format$1(startOfDay$
|
|
11054
|
+
this.currentDate = parseInt(format$1(startOfDay$1(Date.now()), 't'), 10);
|
|
11062
11055
|
this.localeChanged();
|
|
11063
11056
|
this.yearAndMonthChanged(this.year, this.month);
|
|
11064
11057
|
}
|
|
@@ -11532,7 +11525,7 @@ __decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "dayN
|
|
|
11532
11525
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
11533
11526
|
AuroLibraryRuntimeUtils$5.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
11534
11527
|
|
|
11535
|
-
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}`;
|
|
11536
11529
|
|
|
11537
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}`;
|
|
11538
11531
|
|
|
@@ -11557,13 +11550,103 @@ class s{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
|
|
|
11557
11550
|
|
|
11558
11551
|
var popoverVersion = '6.0.1';
|
|
11559
11552
|
|
|
11560
|
-
|
|
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
|
+
*/
|
|
11561
11560
|
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
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 */
|
|
11567
11650
|
|
|
11568
11651
|
class AuroCalendarCell extends LitElement {
|
|
11569
11652
|
constructor() {
|
|
@@ -11611,6 +11694,14 @@ class AuroCalendarCell extends LitElement {
|
|
|
11611
11694
|
type: Boolean,
|
|
11612
11695
|
reflect: true
|
|
11613
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
|
+
*/
|
|
11614
11705
|
disabledDays: { type: Array },
|
|
11615
11706
|
isCurrentDate: { type: Boolean },
|
|
11616
11707
|
locale: { type: String },
|
|
@@ -11656,8 +11747,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
11656
11747
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11657
11748
|
|
|
11658
11749
|
if (day) {
|
|
11659
|
-
const departTimestamp =
|
|
11660
|
-
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;
|
|
11661
11752
|
|
|
11662
11753
|
if (day.date === departTimestamp || day.date === returnTimestamp) {
|
|
11663
11754
|
this.selected = true;
|
|
@@ -11741,27 +11832,33 @@ class AuroCalendarCell extends LitElement {
|
|
|
11741
11832
|
return false;
|
|
11742
11833
|
}
|
|
11743
11834
|
|
|
11744
|
-
//
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
// Check against blackoutDates (ISO format YYYY-MM-DD) on the datepicker
|
|
11751
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
11752
|
-
|
|
11753
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
11754
|
-
const date = new Date(this.day.date * 1000);
|
|
11755
|
-
const yyyy = date.getFullYear();
|
|
11756
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
11757
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
11758
|
-
const cellDate = `${yyyy}-${mm}-${dd}`;
|
|
11759
|
-
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)) {
|
|
11760
11841
|
return true;
|
|
11761
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;
|
|
11762
11856
|
}
|
|
11763
11857
|
|
|
11764
|
-
|
|
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);
|
|
11765
11862
|
}
|
|
11766
11863
|
|
|
11767
11864
|
/**
|
|
@@ -11867,12 +11964,12 @@ class AuroCalendarCell extends LitElement {
|
|
|
11867
11964
|
const parsedDateFrom = Number.parseInt(this.dateFrom, 10);
|
|
11868
11965
|
if (!Number.isFinite(parsedDateFrom)) return null;
|
|
11869
11966
|
|
|
11870
|
-
const departTimestamp =
|
|
11967
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11871
11968
|
const dayDate = this.day.date;
|
|
11872
11969
|
|
|
11873
11970
|
const parsedDateTo = Number.parseInt(this.dateTo, 10);
|
|
11874
11971
|
const hasDateTo = Number.isFinite(parsedDateTo);
|
|
11875
|
-
const returnTimestamp = hasDateTo ?
|
|
11972
|
+
const returnTimestamp = hasDateTo ? new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
11876
11973
|
|
|
11877
11974
|
if (dayDate === departTimestamp) return this.datepicker.rangeLabelStart || 'range start';
|
|
11878
11975
|
|
|
@@ -11882,7 +11979,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
11882
11979
|
|
|
11883
11980
|
if (hasDateTo && dayDate > departTimestamp && dayDate < returnTimestamp) return this.datepicker.rangeLabelInRange || 'in range';
|
|
11884
11981
|
|
|
11885
|
-
|
|
11982
|
+
if (!hasDateTo && dayDate > departTimestamp) return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
11983
|
+
|
|
11984
|
+
// After end date when both dateFrom and dateTo are set.
|
|
11886
11985
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
11887
11986
|
}
|
|
11888
11987
|
|
|
@@ -11895,7 +11994,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11895
11994
|
*/
|
|
11896
11995
|
isDepartDate(day, dateFrom) {
|
|
11897
11996
|
const parsedDateFrom = parseInt(dateFrom, 10);
|
|
11898
|
-
const departTimestamp =
|
|
11997
|
+
const departTimestamp = new Date(parsedDateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11899
11998
|
|
|
11900
11999
|
return this.selected && day.date === departTimestamp;
|
|
11901
12000
|
}
|
|
@@ -11910,7 +12009,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
11910
12009
|
*/
|
|
11911
12010
|
isReturnDate(day, dateFrom, dateTo) {
|
|
11912
12011
|
const parsedDateTo = parseInt(dateTo, 10);
|
|
11913
|
-
const returnTimestamp =
|
|
12012
|
+
const returnTimestamp = new Date(parsedDateTo * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
11914
12013
|
|
|
11915
12014
|
return this.selected && day.date === returnTimestamp && dateFrom;
|
|
11916
12015
|
}
|
|
@@ -12074,6 +12173,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12074
12173
|
setTimeout(() => this.firstUpdated(), 0);
|
|
12075
12174
|
return;
|
|
12076
12175
|
}
|
|
12176
|
+
this.calendar = calendar;
|
|
12077
12177
|
this.datepicker = calendar.datepicker;
|
|
12078
12178
|
this._slotContentHandler = () => {
|
|
12079
12179
|
this.handleSlotContent();
|
|
@@ -12131,12 +12231,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12131
12231
|
this._cachedButton = this.shadowRoot.querySelector('button.day');
|
|
12132
12232
|
});
|
|
12133
12233
|
|
|
12134
|
-
//
|
|
12234
|
+
// Keep the host's gridcell aria attributes in sync with the day data.
|
|
12135
12235
|
this.updateHostAria();
|
|
12136
12236
|
}
|
|
12137
12237
|
|
|
12138
12238
|
// Update host aria when selection changes (aria-selected, range labels)
|
|
12139
|
-
|
|
12239
|
+
// or when isCurrentDate flips (aria-current).
|
|
12240
|
+
if (properties.has('dateFrom') || properties.has('dateTo') || properties.has('selected') || properties.has('isCurrentDate')) {
|
|
12140
12241
|
this.updateHostAria();
|
|
12141
12242
|
}
|
|
12142
12243
|
|
|
@@ -12147,8 +12248,8 @@ class AuroCalendarCell extends LitElement {
|
|
|
12147
12248
|
}
|
|
12148
12249
|
|
|
12149
12250
|
/**
|
|
12150
|
-
*
|
|
12151
|
-
*
|
|
12251
|
+
* Sets host-level ARIA so each cell exposes its date, selection state,
|
|
12252
|
+
* and blackout status to assistive tech browsing the month grid.
|
|
12152
12253
|
* @private
|
|
12153
12254
|
* @returns {void}
|
|
12154
12255
|
*/
|
|
@@ -12157,16 +12258,27 @@ class AuroCalendarCell extends LitElement {
|
|
|
12157
12258
|
|
|
12158
12259
|
const outOfRange = this.isOutOfRange(this.day, this.min, this.max);
|
|
12159
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.).
|
|
12160
12264
|
this.removeAttribute('role');
|
|
12161
12265
|
this.removeAttribute('aria-label');
|
|
12266
|
+
this.removeAttribute('aria-current');
|
|
12267
|
+
this.removeAttribute('aria-selected');
|
|
12268
|
+
this.removeAttribute('aria-disabled');
|
|
12162
12269
|
return;
|
|
12163
12270
|
}
|
|
12164
12271
|
|
|
12165
|
-
// The host acts as the gridcell for ariaActiveDescendantElement.
|
|
12166
12272
|
this.setAttribute('role', 'gridcell');
|
|
12167
12273
|
this.setAttribute('aria-label', this.getAriaLabel());
|
|
12168
12274
|
this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
|
|
12169
12275
|
|
|
12276
|
+
if (this.isCurrentDate) {
|
|
12277
|
+
this.setAttribute('aria-current', 'date');
|
|
12278
|
+
} else {
|
|
12279
|
+
this.removeAttribute('aria-current');
|
|
12280
|
+
}
|
|
12281
|
+
|
|
12170
12282
|
if (this.isBlackout()) {
|
|
12171
12283
|
this.setAttribute('aria-disabled', 'true');
|
|
12172
12284
|
} else {
|
|
@@ -12181,7 +12293,7 @@ class AuroCalendarCell extends LitElement {
|
|
|
12181
12293
|
* @returns {void}
|
|
12182
12294
|
*/
|
|
12183
12295
|
focusButton() {
|
|
12184
|
-
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([
|
|
12296
|
+
const button = this._cachedButton || this.shadowRoot.querySelector('button:not([disabled])');
|
|
12185
12297
|
if (button) {
|
|
12186
12298
|
button.focus({ focusVisible: true });
|
|
12187
12299
|
}
|
|
@@ -12189,7 +12301,9 @@ class AuroCalendarCell extends LitElement {
|
|
|
12189
12301
|
|
|
12190
12302
|
/**
|
|
12191
12303
|
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
12192
|
-
*
|
|
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.
|
|
12193
12307
|
* @returns {void}
|
|
12194
12308
|
*/
|
|
12195
12309
|
setActive() {
|
|
@@ -12231,10 +12345,13 @@ class AuroCalendarCell extends LitElement {
|
|
|
12231
12345
|
if (!btn || !this.day) return;
|
|
12232
12346
|
|
|
12233
12347
|
const dayDate = this.day.date;
|
|
12234
|
-
const departTimestamp =
|
|
12348
|
+
const departTimestamp = new Date(dateFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
12235
12349
|
const isInRange = dayDate > departTimestamp && dayDate < hoveredDate;
|
|
12236
|
-
|
|
12237
|
-
|
|
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;
|
|
12238
12355
|
|
|
12239
12356
|
btn.classList.toggle('inRange', isInRange);
|
|
12240
12357
|
btn.classList.toggle('lastHoveredDate', isLastHovered);
|
|
@@ -12292,7 +12409,6 @@ class AuroCalendarCell extends LitElement {
|
|
|
12292
12409
|
@focus="${outOfRange ? undefined : this.handleFocus}"
|
|
12293
12410
|
class="${classMap(buttonClasses)}"
|
|
12294
12411
|
?disabled="${outOfRange}"
|
|
12295
|
-
aria-hidden="${outOfRange ? 'true' : nothing}"
|
|
12296
12412
|
tabindex="-1">
|
|
12297
12413
|
<div class="buttonWrapper" aria-hidden="true">
|
|
12298
12414
|
<div class="currentDayMarker">${this.day?.title || nothing}</div>
|
|
@@ -13398,7 +13514,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13398
13514
|
}
|
|
13399
13515
|
}
|
|
13400
13516
|
|
|
13401
|
-
var formkitVersion$2 = '
|
|
13517
|
+
var formkitVersion$2 = '202606291455';
|
|
13402
13518
|
|
|
13403
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}
|
|
13404
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}}
|
|
@@ -13521,7 +13637,11 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13521
13637
|
this.calendarRangeMonths = null;
|
|
13522
13638
|
|
|
13523
13639
|
/**
|
|
13524
|
-
*
|
|
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.
|
|
13525
13645
|
* @private
|
|
13526
13646
|
*/
|
|
13527
13647
|
this.disabledDays = [];
|
|
@@ -13778,17 +13898,44 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13778
13898
|
* @returns {void}
|
|
13779
13899
|
*/
|
|
13780
13900
|
updateActiveCellForVisibleMonth() {
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
requestAnimationFrame(() => {
|
|
13784
|
-
requestAnimationFrame(() => {
|
|
13785
|
-
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13901
|
+
this._afterMonthRender(() => {
|
|
13902
|
+
const newDate = this.computeActiveDate({ skipDateFrom: true });
|
|
13786
13903
|
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
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);
|
|
13792
13939
|
});
|
|
13793
13940
|
}
|
|
13794
13941
|
|
|
@@ -13906,6 +14053,47 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13906
14053
|
return Array.from(this.shadowRoot.querySelectorAll('auro-formkit-calendar-month'));
|
|
13907
14054
|
}
|
|
13908
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
|
+
|
|
13909
14097
|
/**
|
|
13910
14098
|
* Gets all focusable cells across all rendered months.
|
|
13911
14099
|
* @private
|
|
@@ -13922,9 +14110,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13922
14110
|
|
|
13923
14111
|
/**
|
|
13924
14112
|
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
13925
|
-
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
13926
|
-
*
|
|
13927
|
-
*
|
|
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.
|
|
13928
14116
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
13929
14117
|
* @returns {void}
|
|
13930
14118
|
*/
|
|
@@ -13973,10 +14161,23 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
13973
14161
|
/**
|
|
13974
14162
|
* Shows the activeCell ring when the grid gains focus.
|
|
13975
14163
|
* @private
|
|
14164
|
+
* @param {FocusEvent} [event] - The focusin event.
|
|
13976
14165
|
* @returns {void}
|
|
13977
14166
|
*/
|
|
13978
|
-
handleGridFocusIn() {
|
|
14167
|
+
handleGridFocusIn(event) {
|
|
13979
14168
|
this._gridHasFocus = true;
|
|
14169
|
+
|
|
14170
|
+
// Only apply the activeCell ring when the grid wrapper itself receives focus
|
|
14171
|
+
// (Tab/programmatic). When focus moves into a cell button via mousedown,
|
|
14172
|
+
// event.target is the cell descendant — skip the ring here. The subsequent
|
|
14173
|
+
// click handler calls setActiveCell on the clicked cell, which applies the
|
|
14174
|
+
// ring there. Without this guard, mousedown briefly flashes the ring on the
|
|
14175
|
+
// previously-active cell (e.g. the 1st-of-month set by month navigation
|
|
14176
|
+
// when the grid was not focused).
|
|
14177
|
+
if (event && event.target !== event.currentTarget) {
|
|
14178
|
+
return;
|
|
14179
|
+
}
|
|
14180
|
+
|
|
13980
14181
|
const activeCell = this.getAllFocusableCells().find((cell) => cell.active);
|
|
13981
14182
|
if (activeCell) {
|
|
13982
14183
|
const btn = activeCell._cachedButton || activeCell.shadowRoot.querySelector('button.day');
|
|
@@ -14005,6 +14206,65 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14005
14206
|
this.clearRangePreview();
|
|
14006
14207
|
}
|
|
14007
14208
|
|
|
14209
|
+
/**
|
|
14210
|
+
* Returns a memoized Set of blackout timestamps (seconds) drawn from both
|
|
14211
|
+
* the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
|
|
14212
|
+
* The cache invalidates when either source array's reference changes, which
|
|
14213
|
+
* matches Lit's own reactive identity semantics for array properties.
|
|
14214
|
+
* @private
|
|
14215
|
+
* @returns {Set<Number>}
|
|
14216
|
+
*/
|
|
14217
|
+
_getBlackoutSet() {
|
|
14218
|
+
// Normalize non-array values to a stable `null` sentinel rather than a
|
|
14219
|
+
// fresh `[]` per call — otherwise the reference-identity cache key
|
|
14220
|
+
// (`_cachedBlackoutDisabledDays === disabledDays`) never matches on
|
|
14221
|
+
// subsequent calls and the Set rebuilds every time. `buildBlackoutSet`
|
|
14222
|
+
// already treats null/non-array as "no legacy disabledDays" via its
|
|
14223
|
+
// own Array.isArray gate.
|
|
14224
|
+
const disabledDays = Array.isArray(this.disabledDays) ? this.disabledDays : null;
|
|
14225
|
+
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14226
|
+
if (this._blackoutSet &&
|
|
14227
|
+
this._cachedBlackoutDisabledDays === disabledDays &&
|
|
14228
|
+
this._cachedBlackoutDates === blackoutDates) {
|
|
14229
|
+
return this._blackoutSet;
|
|
14230
|
+
}
|
|
14231
|
+
|
|
14232
|
+
if (disabledDays && disabledDays.length > 0) {
|
|
14233
|
+
this._warnDisabledDaysDeprecated();
|
|
14234
|
+
}
|
|
14235
|
+
|
|
14236
|
+
this._blackoutSet = buildBlackoutSet(disabledDays, blackoutDates);
|
|
14237
|
+
this._cachedBlackoutDisabledDays = disabledDays;
|
|
14238
|
+
this._cachedBlackoutDates = blackoutDates;
|
|
14239
|
+
return this._blackoutSet;
|
|
14240
|
+
}
|
|
14241
|
+
|
|
14242
|
+
/**
|
|
14243
|
+
* Per-class flag that gates the `disabledDays` deprecation warning so it
|
|
14244
|
+
* fires exactly once per page no matter how many calendars or rebuild
|
|
14245
|
+
* cycles encounter the legacy array.
|
|
14246
|
+
* @private
|
|
14247
|
+
*/
|
|
14248
|
+
static _warnedDisabledDaysDeprecation = false;
|
|
14249
|
+
|
|
14250
|
+
/**
|
|
14251
|
+
* One-time `console.debug` directing consumers from the legacy
|
|
14252
|
+
* `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
|
|
14253
|
+
* the first time `_getBlackoutSet` rebuilds from a non-empty
|
|
14254
|
+
* `disabledDays`; subsequent calls (on this or any other AuroCalendar
|
|
14255
|
+
* instance on the page) are silent.
|
|
14256
|
+
* @private
|
|
14257
|
+
* @returns {void}
|
|
14258
|
+
*/
|
|
14259
|
+
_warnDisabledDaysDeprecated() {
|
|
14260
|
+
if (AuroCalendar._warnedDisabledDaysDeprecation) {
|
|
14261
|
+
return;
|
|
14262
|
+
}
|
|
14263
|
+
AuroCalendar._warnedDisabledDaysDeprecation = true;
|
|
14264
|
+
// eslint-disable-next-line no-console
|
|
14265
|
+
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.');
|
|
14266
|
+
}
|
|
14267
|
+
|
|
14008
14268
|
/**
|
|
14009
14269
|
* Computes the initial active date from data properties alone — no DOM required.
|
|
14010
14270
|
* Priority:
|
|
@@ -14049,21 +14309,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14049
14309
|
const minTs = Number.isFinite(rawMin) ? rawMin : -Infinity;
|
|
14050
14310
|
const maxTs = Number.isFinite(rawMax) ? rawMax : Infinity;
|
|
14051
14311
|
|
|
14052
|
-
// Build a Set of blackout timestamps for O(1) lookup.
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
// Parse YYYY-MM-DD as local date to avoid UTC shift issues.
|
|
14057
|
-
const isoBlackouts = this.datepicker?.blackoutDates;
|
|
14058
|
-
if (Array.isArray(isoBlackouts)) {
|
|
14059
|
-
for (const isoStr of isoBlackouts) {
|
|
14060
|
-
const parts = isoStr.split('-');
|
|
14061
|
-
const ts = Math.floor(new Date(parseInt(parts[0], 10), parseInt(parts[1], 10) - 1, parseInt(parts[2], 10)).getTime() / 1000);
|
|
14062
|
-
if (Number.isFinite(ts)) {
|
|
14063
|
-
blackoutSet.add(ts);
|
|
14064
|
-
}
|
|
14065
|
-
}
|
|
14066
|
-
}
|
|
14312
|
+
// Build a Set of blackout timestamps for O(1) lookup. Memoized by the
|
|
14313
|
+
// identity of the source arrays so rapid month nav doesn't rebuild the
|
|
14314
|
+
// Set (and re-parse every ISO string) on every keypress.
|
|
14315
|
+
const blackoutSet = this._getBlackoutSet();
|
|
14067
14316
|
|
|
14068
14317
|
/**
|
|
14069
14318
|
* A date (unix timestamp in seconds, midnight-aligned) is "enabled" when
|
|
@@ -14259,8 +14508,8 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14259
14508
|
|
|
14260
14509
|
/**
|
|
14261
14510
|
* Handles arrow key navigation on the calendar grid wrapper.
|
|
14262
|
-
* Focus stays on the grid wrapper; only
|
|
14263
|
-
*
|
|
14511
|
+
* Focus stays on the grid wrapper; only the visual active-cell indicator
|
|
14512
|
+
* changes. The live region announces the new active cell.
|
|
14264
14513
|
* @private
|
|
14265
14514
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
14266
14515
|
* @returns {void}
|
|
@@ -14325,21 +14574,21 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14325
14574
|
} else {
|
|
14326
14575
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14327
14576
|
}
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
|
|
14577
|
+
this._afterMonthRender(() => {
|
|
14578
|
+
const cells = this.getAllFocusableCells();
|
|
14579
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetTs);
|
|
14580
|
+
if (target) {
|
|
14581
|
+
this.setActiveCell(target.day.date);
|
|
14582
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14583
|
+
} else {
|
|
14584
|
+
const fallback = this.pickNearestCell(cells, targetTs, navDir);
|
|
14585
|
+
if (fallback) {
|
|
14337
14586
|
this.setActiveCell(fallback.day.date);
|
|
14338
14587
|
this.handleCellFocused({ detail: { date: fallback.day.date } });
|
|
14339
14588
|
}
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14589
|
+
}
|
|
14590
|
+
// Re-focus grid wrapper after month change re-render
|
|
14591
|
+
this.focusActiveCell();
|
|
14343
14592
|
});
|
|
14344
14593
|
}
|
|
14345
14594
|
}
|
|
@@ -14365,26 +14614,20 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14365
14614
|
} else {
|
|
14366
14615
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14367
14616
|
}
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
14378
|
-
if (navDirection === 'next') {
|
|
14379
|
-
[nearest] = cells;
|
|
14380
|
-
} else {
|
|
14381
|
-
nearest = cells[cells.length - 1];
|
|
14382
|
-
}
|
|
14617
|
+
this._afterMonthRender(() => {
|
|
14618
|
+
const cells = this.getAllFocusableCells();
|
|
14619
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14620
|
+
if (target) {
|
|
14621
|
+
this.setActiveCell(target.day.date);
|
|
14622
|
+
this.handleCellFocused({ detail: { date: target.day.date } });
|
|
14623
|
+
} else {
|
|
14624
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14625
|
+
if (nearest) {
|
|
14383
14626
|
this.setActiveCell(nearest.day.date);
|
|
14384
14627
|
this.handleCellFocused({ detail: { date: nearest.day.date } });
|
|
14385
14628
|
}
|
|
14386
|
-
|
|
14387
|
-
|
|
14629
|
+
}
|
|
14630
|
+
this.focusActiveCell();
|
|
14388
14631
|
});
|
|
14389
14632
|
}
|
|
14390
14633
|
}
|
|
@@ -14434,19 +14677,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14434
14677
|
}
|
|
14435
14678
|
|
|
14436
14679
|
this.handleNextMonth({ skipActiveUpdate: true });
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14680
|
+
this._afterMonthRender(() => {
|
|
14681
|
+
const cells = this.getAllFocusableCells();
|
|
14682
|
+
const target = cells.find((cell) => cell.day && cell.day.date === nextTs);
|
|
14683
|
+
if (target) {
|
|
14684
|
+
this.setActiveCell(target.day.date);
|
|
14685
|
+
this.focusActiveCell();
|
|
14686
|
+
} else {
|
|
14687
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14688
|
+
// `cells[length - 1]` would land on the end of the new month,
|
|
14689
|
+
// far from the user's intended `nextTs`.
|
|
14690
|
+
const fallback = this.pickNearestCell(cells, nextTs, 'next');
|
|
14691
|
+
if (fallback) {
|
|
14692
|
+
this.setActiveCell(fallback.day.date);
|
|
14447
14693
|
this.focusActiveCell();
|
|
14448
14694
|
}
|
|
14449
|
-
}
|
|
14695
|
+
}
|
|
14450
14696
|
});
|
|
14451
14697
|
} else if (direction === 'prev' && this.showPrevMonthBtn) {
|
|
14452
14698
|
// Navigate to previous month and focus the computed previous date.
|
|
@@ -14460,19 +14706,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14460
14706
|
}
|
|
14461
14707
|
|
|
14462
14708
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14709
|
+
this._afterMonthRender(() => {
|
|
14710
|
+
const cells = this.getAllFocusableCells();
|
|
14711
|
+
const target = cells.find((cell) => cell.day && cell.day.date === prevTs);
|
|
14712
|
+
if (target) {
|
|
14713
|
+
this.setActiveCell(target.day.date);
|
|
14714
|
+
this.focusActiveCell();
|
|
14715
|
+
} else {
|
|
14716
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — direct
|
|
14717
|
+
// `cells[0]` would land on the start of the previous month, far
|
|
14718
|
+
// from the user's intended `prevTs`.
|
|
14719
|
+
const fallback = this.pickNearestCell(cells, prevTs, 'prev');
|
|
14720
|
+
if (fallback) {
|
|
14721
|
+
this.setActiveCell(fallback.day.date);
|
|
14473
14722
|
this.focusActiveCell();
|
|
14474
14723
|
}
|
|
14475
|
-
}
|
|
14724
|
+
}
|
|
14476
14725
|
});
|
|
14477
14726
|
}
|
|
14478
14727
|
} else if (key === 'ArrowDown' || key === 'ArrowUp') {
|
|
@@ -14500,20 +14749,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14500
14749
|
} else {
|
|
14501
14750
|
this.handlePrevMonth({ skipActiveUpdate: true });
|
|
14502
14751
|
}
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14752
|
+
this._afterMonthRender(() => {
|
|
14753
|
+
const cells = this.getAllFocusableCells();
|
|
14754
|
+
const target = cells.find((cell) => cell.day && cell.day.date === targetDate);
|
|
14755
|
+
if (target) {
|
|
14756
|
+
this.setActiveCell(target.day.date);
|
|
14757
|
+
this.focusActiveCell();
|
|
14758
|
+
} else {
|
|
14759
|
+
// Same nearest-by-date fallback handleGridKeyDown uses — the
|
|
14760
|
+
// old direction-based `cells[0]`/`cells[length-1]` clamp
|
|
14761
|
+
// could land 25+ days from the intended target.
|
|
14762
|
+
const nearest = this.pickNearestCell(cells, targetDate, navDirection);
|
|
14763
|
+
if (nearest) {
|
|
14513
14764
|
this.setActiveCell(nearest.day.date);
|
|
14514
14765
|
this.focusActiveCell();
|
|
14515
14766
|
}
|
|
14516
|
-
}
|
|
14767
|
+
}
|
|
14517
14768
|
});
|
|
14518
14769
|
}
|
|
14519
14770
|
}
|
|
@@ -14552,8 +14803,9 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14552
14803
|
return;
|
|
14553
14804
|
}
|
|
14554
14805
|
|
|
14555
|
-
//
|
|
14556
|
-
// so
|
|
14806
|
+
// DOM focus stays on the grid wrapper while arrow keys move the active
|
|
14807
|
+
// cell, so cell buttons never receive native focus. The debounced live
|
|
14808
|
+
// region carries the full-context announcement instead.
|
|
14557
14809
|
const announcement = this.buildFocusAnnouncement(date);
|
|
14558
14810
|
this.announceFocusDebounced(announcement);
|
|
14559
14811
|
|
|
@@ -14623,10 +14875,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14623
14875
|
return null;
|
|
14624
14876
|
}
|
|
14625
14877
|
|
|
14626
|
-
const departTs =
|
|
14878
|
+
const departTs = new Date(parsedFrom * 1000).setHours(0, 0, 0, 0) / 1000;
|
|
14627
14879
|
const parsedTo = Number.parseInt(this.dateTo, 10);
|
|
14628
14880
|
const hasTo = Number.isFinite(parsedTo);
|
|
14629
|
-
const returnTs = hasTo ?
|
|
14881
|
+
const returnTs = hasTo ? new Date(parsedTo * 1000).setHours(0, 0, 0, 0) / 1000 : null;
|
|
14630
14882
|
|
|
14631
14883
|
if (date === departTs) {
|
|
14632
14884
|
return this.datepicker.rangeLabelStart || 'range start';
|
|
@@ -14640,36 +14892,22 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14640
14892
|
if (hasTo && date > departTs && date < returnTs) {
|
|
14641
14893
|
return this.datepicker.rangeLabelInRange || 'in range';
|
|
14642
14894
|
}
|
|
14895
|
+
if (!hasTo && date > departTs) {
|
|
14896
|
+
return this.datepicker.rangeLabelEndPreview || 'previewing range end';
|
|
14897
|
+
}
|
|
14643
14898
|
return this.datepicker.rangeLabelAfterRange || 'after range';
|
|
14644
14899
|
}
|
|
14645
14900
|
|
|
14646
14901
|
/**
|
|
14647
|
-
* Checks whether a given date is a blackout date.
|
|
14902
|
+
* Checks whether a given date is a blackout date. Delegates to the
|
|
14903
|
+
* memoized `_getBlackoutSet` so the YYYY-MM-DD parsing and the
|
|
14904
|
+
* legacy/ISO merge rules live in exactly one place (see `blackoutUtils.js`).
|
|
14648
14905
|
* @private
|
|
14649
14906
|
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
14650
14907
|
* @returns {Boolean} True if the date is blacked out.
|
|
14651
14908
|
*/
|
|
14652
14909
|
isDateBlackout(dateTs) {
|
|
14653
|
-
|
|
14654
|
-
if (Array.isArray(this.disabledDays) && this.disabledDays.length > 0) {
|
|
14655
|
-
if (this.disabledDays.findIndex((day) => parseInt(day, 10) === dateTs) !== -1) {
|
|
14656
|
-
return true;
|
|
14657
|
-
}
|
|
14658
|
-
}
|
|
14659
|
-
|
|
14660
|
-
// Check ISO blackoutDates.
|
|
14661
|
-
const blackoutDates = this.datepicker?.blackoutDates;
|
|
14662
|
-
if (Array.isArray(blackoutDates) && blackoutDates.length > 0) {
|
|
14663
|
-
const date = new Date(dateTs * 1000);
|
|
14664
|
-
const yyyy = date.getFullYear();
|
|
14665
|
-
const mm = String(date.getMonth() + 1).padStart(2, '0');
|
|
14666
|
-
const dd = String(date.getDate()).padStart(2, '0');
|
|
14667
|
-
if (blackoutDates.includes(`${yyyy}-${mm}-${dd}`)) {
|
|
14668
|
-
return true;
|
|
14669
|
-
}
|
|
14670
|
-
}
|
|
14671
|
-
|
|
14672
|
-
return false;
|
|
14910
|
+
return this._getBlackoutSet().has(dateTs);
|
|
14673
14911
|
}
|
|
14674
14912
|
|
|
14675
14913
|
/**
|
|
@@ -14836,9 +15074,34 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
14836
15074
|
// the last one.
|
|
14837
15075
|
if (this._announceRafId) {
|
|
14838
15076
|
cancelAnimationFrame(this._announceRafId);
|
|
15077
|
+
this._announceRafId = null;
|
|
14839
15078
|
}
|
|
15079
|
+
this._deliverAnnouncement(dateStr, 0);
|
|
15080
|
+
}
|
|
15081
|
+
|
|
15082
|
+
/**
|
|
15083
|
+
* Writes `dateStr` to the live region. If the dropdown's dialog hasn't
|
|
15084
|
+
* mounted yet (so getOrCreateLiveRegion can't attach), retries on the
|
|
15085
|
+
* next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
|
|
15086
|
+
* dropping the announcement. The retry uses the same `_announceRafId`
|
|
15087
|
+
* the double-rAF below uses, so a newer announceSelection call (or
|
|
15088
|
+
* disconnectedCallback) cancels any in-flight retry.
|
|
15089
|
+
* @private
|
|
15090
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
15091
|
+
* @param {Number} attempts - Number of prior retry attempts.
|
|
15092
|
+
* @returns {void}
|
|
15093
|
+
*/
|
|
15094
|
+
_deliverAnnouncement(dateStr, attempts) {
|
|
14840
15095
|
const liveRegion = this.getOrCreateLiveRegion();
|
|
14841
15096
|
if (!liveRegion) {
|
|
15097
|
+
const MAX_LIVE_REGION_RETRIES = 10;
|
|
15098
|
+
if (attempts < MAX_LIVE_REGION_RETRIES) {
|
|
15099
|
+
this._announceRafId = requestAnimationFrame(() => {
|
|
15100
|
+
this._deliverAnnouncement(dateStr, attempts + 1);
|
|
15101
|
+
});
|
|
15102
|
+
} else {
|
|
15103
|
+
this._announceRafId = null;
|
|
15104
|
+
}
|
|
14842
15105
|
return;
|
|
14843
15106
|
}
|
|
14844
15107
|
|
|
@@ -15024,7 +15287,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
15024
15287
|
</button>
|
|
15025
15288
|
` : undefined}
|
|
15026
15289
|
</div>
|
|
15027
|
-
<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}">
|
|
15290
|
+
<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}">
|
|
15028
15291
|
${this.renderAllCalendars()}
|
|
15029
15292
|
</div>
|
|
15030
15293
|
</div>
|
|
@@ -18909,7 +19172,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
18909
19172
|
}
|
|
18910
19173
|
};
|
|
18911
19174
|
|
|
18912
|
-
var formkitVersion$1 = '
|
|
19175
|
+
var formkitVersion$1 = '202606291455';
|
|
18913
19176
|
|
|
18914
19177
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
18915
19178
|
static get properties() {
|
|
@@ -30627,13 +30890,6 @@ class AuroInputUtilities {
|
|
|
30627
30890
|
* @returns {string | undefined}
|
|
30628
30891
|
*/
|
|
30629
30892
|
toFormattedValue(valueObject, format) {
|
|
30630
|
-
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
30631
|
-
// `format` argument has to fail gracefully rather than throw on
|
|
30632
|
-
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
30633
|
-
// as "no format → no display value".
|
|
30634
|
-
if (!format) {
|
|
30635
|
-
return undefined;
|
|
30636
|
-
}
|
|
30637
30893
|
const normalizedFormat = format.toLowerCase();
|
|
30638
30894
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
30639
30895
|
|
|
@@ -30784,18 +31040,79 @@ class BaseInput extends AuroElement$1 {
|
|
|
30784
31040
|
constructor() {
|
|
30785
31041
|
super();
|
|
30786
31042
|
|
|
30787
|
-
|
|
30788
|
-
|
|
30789
|
-
|
|
30790
|
-
|
|
30791
|
-
|
|
30792
|
-
|
|
30793
|
-
|
|
30794
|
-
|
|
30795
|
-
|
|
30796
|
-
|
|
31043
|
+
this.appearance = "default";
|
|
31044
|
+
this.disabled = false;
|
|
31045
|
+
this.layout = 'classic';
|
|
31046
|
+
this.locale = 'en-US';
|
|
31047
|
+
this.max = undefined;
|
|
31048
|
+
this._maxObject = undefined;
|
|
31049
|
+
this.maxLength = undefined;
|
|
31050
|
+
this.min = undefined;
|
|
31051
|
+
this._minObject = undefined;
|
|
31052
|
+
this.minLength = undefined;
|
|
31053
|
+
this.required = false;
|
|
31054
|
+
this.onDark = false;
|
|
31055
|
+
this.setCustomValidityForType = undefined;
|
|
31056
|
+
this.size = 'lg';
|
|
31057
|
+
this.shape = 'classic';
|
|
31058
|
+
this.value = undefined;
|
|
31059
|
+
this._valueObject = undefined;
|
|
31060
|
+
|
|
31061
|
+
this._initializePrivateDefaults();
|
|
31062
|
+
}
|
|
31063
|
+
|
|
31064
|
+
/**
|
|
31065
|
+
* Internal Defaults.
|
|
31066
|
+
* @private
|
|
31067
|
+
* @returns {void}
|
|
31068
|
+
*/
|
|
31069
|
+
_initializePrivateDefaults() {
|
|
30797
31070
|
this.activeLabel = false;
|
|
30798
|
-
|
|
31071
|
+
this.appearance = "default";
|
|
31072
|
+
this.icon = false;
|
|
31073
|
+
this.disabled = false;
|
|
31074
|
+
this.dvInputOnly = false;
|
|
31075
|
+
this.hideLabelVisually = false;
|
|
31076
|
+
this.max = undefined;
|
|
31077
|
+
this.maxLength = undefined;
|
|
31078
|
+
this.min = undefined;
|
|
31079
|
+
this.minLength = undefined;
|
|
31080
|
+
this.noValidate = false;
|
|
31081
|
+
this.onDark = false;
|
|
31082
|
+
this.required = false;
|
|
31083
|
+
this.setCustomValidityForType = undefined;
|
|
31084
|
+
|
|
31085
|
+
// Used for storing raw values returned from input mask.
|
|
31086
|
+
this._rawMaskValue = undefined;
|
|
31087
|
+
|
|
31088
|
+
/**
|
|
31089
|
+
* @private
|
|
31090
|
+
*/
|
|
31091
|
+
this.layout = 'classic';
|
|
31092
|
+
|
|
31093
|
+
/**
|
|
31094
|
+
* @private
|
|
31095
|
+
*/
|
|
31096
|
+
this.shape = 'classic';
|
|
31097
|
+
|
|
31098
|
+
/**
|
|
31099
|
+
* @private
|
|
31100
|
+
*/
|
|
31101
|
+
this.size = 'lg';
|
|
31102
|
+
|
|
31103
|
+
this.touched = false;
|
|
31104
|
+
this.util = new AuroInputUtilities({
|
|
31105
|
+
locale: "en-US",
|
|
31106
|
+
format: this.format
|
|
31107
|
+
});
|
|
31108
|
+
this.validation = new AuroFormValidation();
|
|
31109
|
+
this.inputIconName = undefined;
|
|
31110
|
+
this.showPassword = false;
|
|
31111
|
+
this.validationCCLength = undefined;
|
|
31112
|
+
this.hasValue = false;
|
|
31113
|
+
this.label = 'Input label is undefined';
|
|
31114
|
+
|
|
31115
|
+
|
|
30799
31116
|
this.allowedInputTypes = [
|
|
30800
31117
|
"text",
|
|
30801
31118
|
"number",
|
|
@@ -30804,8 +31121,7 @@ class BaseInput extends AuroElement$1 {
|
|
|
30804
31121
|
"credit-card",
|
|
30805
31122
|
"tel"
|
|
30806
31123
|
];
|
|
30807
|
-
this.
|
|
30808
|
-
/** @private */
|
|
31124
|
+
this.icon = false;
|
|
30809
31125
|
this.dateFormatMap = {
|
|
30810
31126
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
30811
31127
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -30822,57 +31138,27 @@ class BaseInput extends AuroElement$1 {
|
|
|
30822
31138
|
'dd/mm': 'dateDDMM',
|
|
30823
31139
|
'mm/dd': 'dateMMDD'
|
|
30824
31140
|
};
|
|
30825
|
-
this.disabled = false;
|
|
30826
|
-
/** @private */
|
|
30827
31141
|
this.domHandler = new DomHandler();
|
|
30828
31142
|
this.dvInputOnly = false;
|
|
30829
31143
|
this.hasValue = false;
|
|
30830
|
-
this.hideLabelVisually = false;
|
|
30831
|
-
this.icon = false;
|
|
30832
|
-
/** @private */
|
|
30833
31144
|
this.inputIconName = undefined;
|
|
30834
|
-
/** @private */
|
|
30835
31145
|
this.label = 'Input label is undefined';
|
|
30836
|
-
this.layout = 'classic';
|
|
30837
|
-
this.locale = 'en-US';
|
|
30838
|
-
this.max = undefined;
|
|
30839
|
-
this._maxObject = undefined;
|
|
30840
|
-
this.maxLength = undefined;
|
|
30841
|
-
this.min = undefined;
|
|
30842
|
-
this._minObject = undefined;
|
|
30843
|
-
this.minLength = undefined;
|
|
30844
31146
|
this.noValidate = false;
|
|
30845
|
-
this.
|
|
30846
|
-
// Raw values returned from the input mask before model normalization.
|
|
30847
|
-
this._rawMaskValue = undefined;
|
|
30848
|
-
this.required = false;
|
|
30849
|
-
this.setCustomValidityForType = undefined;
|
|
30850
|
-
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
30851
|
-
// itself, and listing it here caused cursor placement issues in Safari.
|
|
30852
|
-
/** @private */
|
|
31147
|
+
this._rawMaskValue = undefined; // Used for storing raw values returned from input mask.
|
|
30853
31148
|
this.setSelectionInputTypes = [
|
|
30854
31149
|
"text",
|
|
30855
31150
|
"password",
|
|
30856
31151
|
"email"
|
|
30857
|
-
];
|
|
30858
|
-
this.shape = 'classic';
|
|
30859
|
-
/** @private */
|
|
31152
|
+
]; // Credit Card is not included as this caused cursor placement issues in Safari.
|
|
30860
31153
|
this.showPassword = false;
|
|
30861
|
-
this.size = 'lg';
|
|
30862
31154
|
this.touched = false;
|
|
30863
|
-
/** @private */
|
|
30864
31155
|
this.uniqueId = new UniqueId().create();
|
|
30865
|
-
/** @private */
|
|
30866
31156
|
this.util = new AuroInputUtilities({
|
|
30867
31157
|
locale: this.locale,
|
|
30868
31158
|
format: this.format
|
|
30869
31159
|
});
|
|
30870
|
-
/** @private */
|
|
30871
31160
|
this.validation = new AuroFormValidation();
|
|
30872
|
-
/** @private */
|
|
30873
31161
|
this.validationCCLength = undefined;
|
|
30874
|
-
this.value = undefined;
|
|
30875
|
-
this._valueObject = undefined;
|
|
30876
31162
|
}
|
|
30877
31163
|
|
|
30878
31164
|
// function to define props used within the scope of this component
|
|
@@ -31420,15 +31706,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
31420
31706
|
|
|
31421
31707
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
31422
31708
|
|
|
31423
|
-
// Normalize the format token to lowercase so case-mixed values supplied
|
|
31424
|
-
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
31425
|
-
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
31426
|
-
// format silently misses the map and leaves `setCustomValidityForType`
|
|
31427
|
-
// unset.
|
|
31428
|
-
if (this.format) {
|
|
31429
|
-
this.format = this.format.toLowerCase();
|
|
31430
|
-
}
|
|
31431
|
-
|
|
31432
31709
|
// use validity message override if declared when initializing the component
|
|
31433
31710
|
if (this.hasAttribute('setCustomValidity')) {
|
|
31434
31711
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -31862,38 +32139,6 @@ class BaseInput extends AuroElement$1 {
|
|
|
31862
32139
|
this.touched = true;
|
|
31863
32140
|
this.validation.validate(this);
|
|
31864
32141
|
}
|
|
31865
|
-
|
|
31866
|
-
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
31867
|
-
// update that can re-render the input and reset the native cursor; we
|
|
31868
|
-
// capture the caret position before that update commits and restore it
|
|
31869
|
-
// via `setSelectionRange` once the update has flushed. Gated on
|
|
31870
|
-
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
31871
|
-
// formatter manages the cursor itself) doesn't get a competing write.
|
|
31872
|
-
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
31873
|
-
// on input types that don't support text selection (number, email in
|
|
31874
|
-
// some browsers) throws InvalidStateError, which would crash all input
|
|
31875
|
-
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
31876
|
-
// the gated types currently support it, since the list is a public
|
|
31877
|
-
// property a consumer could mutate.
|
|
31878
|
-
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
31879
|
-
let selectionStart;
|
|
31880
|
-
try {
|
|
31881
|
-
selectionStart = this.inputElement.selectionStart;
|
|
31882
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
31883
|
-
return;
|
|
31884
|
-
}
|
|
31885
|
-
if (typeof selectionStart !== 'number') {
|
|
31886
|
-
return;
|
|
31887
|
-
}
|
|
31888
|
-
this.updateComplete.then(() => {
|
|
31889
|
-
try {
|
|
31890
|
-
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
31891
|
-
} catch (error) { // eslint-disable-line no-unused-vars
|
|
31892
|
-
// Some input types (number/email in certain UAs) throw on
|
|
31893
|
-
// setSelectionRange; swallow and let the native cursor stand.
|
|
31894
|
-
}
|
|
31895
|
-
});
|
|
31896
|
-
}
|
|
31897
32142
|
}
|
|
31898
32143
|
|
|
31899
32144
|
/**
|
|
@@ -32520,7 +32765,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
32520
32765
|
}
|
|
32521
32766
|
};
|
|
32522
32767
|
|
|
32523
|
-
var formkitVersion = '
|
|
32768
|
+
var formkitVersion = '202606291455';
|
|
32524
32769
|
|
|
32525
32770
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
32526
32771
|
// See LICENSE in the project root for license information.
|
|
@@ -33023,7 +33268,6 @@ class AuroInput extends BaseInput {
|
|
|
33023
33268
|
<${this.buttonTag}
|
|
33024
33269
|
@click="${this.handleClickShowPassword}"
|
|
33025
33270
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
33026
|
-
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
33027
33271
|
class="notificationBtn passwordBtn"
|
|
33028
33272
|
shape="circle"
|
|
33029
33273
|
size="sm"
|
|
@@ -33097,29 +33341,25 @@ class AuroInput extends BaseInput {
|
|
|
33097
33341
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
33098
33342
|
*/
|
|
33099
33343
|
renderHtmlHelpText() {
|
|
33100
|
-
// Single `<p>` with stable identity across validity transitions —
|
|
33101
|
-
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
33102
|
-
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
33103
|
-
// re-announce because the live-region element it was watching had been
|
|
33104
|
-
// removed and a new one inserted. Keeping one node means the `role`,
|
|
33105
|
-
// `aria-live`, and text content all change in-place, which AT does
|
|
33106
|
-
// observe and announce.
|
|
33107
|
-
const isError = this.validity && this.validity !== 'valid';
|
|
33108
33344
|
return html$1`
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
33116
|
-
|
|
33117
|
-
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33345
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
33346
|
+
? html$1`
|
|
33347
|
+
<${this.helpTextTag}
|
|
33348
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
33349
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
33350
|
+
<slot name="helpText">${this.getHelpText()}</slot>
|
|
33351
|
+
</p>
|
|
33352
|
+
</${this.helpTextTag}>
|
|
33353
|
+
`
|
|
33354
|
+
: html$1`
|
|
33355
|
+
<${this.helpTextTag} error
|
|
33356
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
33357
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
33358
|
+
${this.errorMessage}
|
|
33359
|
+
</p>
|
|
33360
|
+
</${this.helpTextTag}>
|
|
33361
|
+
`
|
|
33362
|
+
}
|
|
33123
33363
|
`;
|
|
33124
33364
|
}
|
|
33125
33365
|
|
|
@@ -33266,15 +33506,6 @@ function formatISODate(isoStr, format) {
|
|
|
33266
33506
|
try {
|
|
33267
33507
|
const date = dateFormatter.stringToDateInstance(isoStr);
|
|
33268
33508
|
|
|
33269
|
-
// `stringToDateInstance` returns an `Invalid Date` for malformed strings
|
|
33270
|
-
// and `null` for non-string input — it does NOT throw. Without this
|
|
33271
|
-
// guard, `getFullYear()`/`getMonth()`/`getDate()` on an Invalid Date
|
|
33272
|
-
// yield `NaN`, and `String(NaN).padStart(4, '0')` produces literals
|
|
33273
|
-
// like "0NaN/0NaN/0NaN" instead of `undefined`.
|
|
33274
|
-
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
33275
|
-
return undefined;
|
|
33276
|
-
}
|
|
33277
|
-
|
|
33278
33509
|
const year = String(date.getFullYear()).padStart(4, '0');
|
|
33279
33510
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
33280
33511
|
const day = String(date.getDate()).padStart(2, '0');
|
|
@@ -33285,10 +33516,7 @@ function formatISODate(isoStr, format) {
|
|
|
33285
33516
|
replace(/mm/iu, month).
|
|
33286
33517
|
replace(/dd/iu, day);
|
|
33287
33518
|
} catch (err) {
|
|
33288
|
-
//
|
|
33289
|
-
// (inside `stringToDateInstance`) could throw on pathological input
|
|
33290
|
-
// future-library-versions might introduce. Treat any thrown error as
|
|
33291
|
-
// "not a valid date" and return undefined.
|
|
33519
|
+
// If the input string is not a valid date, return undefined
|
|
33292
33520
|
return undefined;
|
|
33293
33521
|
}
|
|
33294
33522
|
}
|
|
@@ -34014,6 +34242,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34014
34242
|
this.rangeLabelBeforeRange = 'before range';
|
|
34015
34243
|
this.rangeLabelInRange = 'in range';
|
|
34016
34244
|
this.rangeLabelAfterRange = 'after range';
|
|
34245
|
+
this.rangeLabelEndPreview = 'previewing range end';
|
|
34017
34246
|
this.blackoutDates = [];
|
|
34018
34247
|
this.blackoutLabel = 'unavailable';
|
|
34019
34248
|
this.navLabelPrevMonth = 'Previous month';
|
|
@@ -34113,6 +34342,22 @@ class AuroDatePicker extends AuroElement {
|
|
|
34113
34342
|
*/
|
|
34114
34343
|
this.handleClick = this.handleClick.bind(this);
|
|
34115
34344
|
|
|
34345
|
+
/**
|
|
34346
|
+
* Single AbortController shared by every listener registered in the
|
|
34347
|
+
* configure* methods. Lets disconnectedCallback tear all of them down
|
|
34348
|
+
* with one abort() call.
|
|
34349
|
+
*
|
|
34350
|
+
* The genuine leak risk is the listeners attached to children that can
|
|
34351
|
+
* outlive the host if they get reparented — `this.dropdown`,
|
|
34352
|
+
* `this.calendar`, and the inputs inside the dropdown's slot.
|
|
34353
|
+
* Listeners attached to `this` (e.g. focusin/focusout on the host)
|
|
34354
|
+
* form a self-contained reference graph that the GC can collect with
|
|
34355
|
+
* the host anyway, but they share the same signal so the cleanup
|
|
34356
|
+
* pattern stays uniform across all configure* sites.
|
|
34357
|
+
* @private
|
|
34358
|
+
*/
|
|
34359
|
+
this._listenerAbortController = new AbortController();
|
|
34360
|
+
|
|
34116
34361
|
/**
|
|
34117
34362
|
* @private
|
|
34118
34363
|
*/
|
|
@@ -34161,6 +34406,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34161
34406
|
|
|
34162
34407
|
/**
|
|
34163
34408
|
* Label announced for blackout (disabled but in-range) date cells.
|
|
34409
|
+
* @default 'unavailable'
|
|
34164
34410
|
*/
|
|
34165
34411
|
blackoutLabel: {
|
|
34166
34412
|
type: String,
|
|
@@ -34177,6 +34423,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34177
34423
|
|
|
34178
34424
|
/**
|
|
34179
34425
|
* Accessible label for the calendar grid containing the days of the month.
|
|
34426
|
+
* @default 'Calendar days of the month'
|
|
34180
34427
|
*/
|
|
34181
34428
|
calendarGridLabel: {
|
|
34182
34429
|
type: String,
|
|
@@ -34339,6 +34586,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34339
34586
|
|
|
34340
34587
|
/**
|
|
34341
34588
|
* Accessible label for the next month navigation button.
|
|
34589
|
+
* @default 'Next month'
|
|
34342
34590
|
*/
|
|
34343
34591
|
navLabelNextMonth: {
|
|
34344
34592
|
type: String,
|
|
@@ -34347,6 +34595,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34347
34595
|
|
|
34348
34596
|
/**
|
|
34349
34597
|
* Accessible label for the previous month navigation button.
|
|
34598
|
+
* @default 'Previous month'
|
|
34350
34599
|
*/
|
|
34351
34600
|
navLabelPrevMonth: {
|
|
34352
34601
|
type: String,
|
|
@@ -34424,7 +34673,11 @@ class AuroDatePicker extends AuroElement {
|
|
|
34424
34673
|
},
|
|
34425
34674
|
|
|
34426
34675
|
/**
|
|
34427
|
-
* Label announced for cells after
|
|
34676
|
+
* Label announced for cells after a fully selected range (both
|
|
34677
|
+
* `dateFrom` and `dateTo` are set). While a range is still being
|
|
34678
|
+
* picked (`dateFrom` set, `dateTo` unset), focused cells past the
|
|
34679
|
+
* start use `rangeLabelEndPreview` instead.
|
|
34680
|
+
* @default 'after range'
|
|
34428
34681
|
*/
|
|
34429
34682
|
rangeLabelAfterRange: {
|
|
34430
34683
|
type: String,
|
|
@@ -34433,6 +34686,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34433
34686
|
|
|
34434
34687
|
/**
|
|
34435
34688
|
* Label announced for cells before the range start.
|
|
34689
|
+
* @default 'before range'
|
|
34436
34690
|
*/
|
|
34437
34691
|
rangeLabelBeforeRange: {
|
|
34438
34692
|
type: String,
|
|
@@ -34441,14 +34695,27 @@ class AuroDatePicker extends AuroElement {
|
|
|
34441
34695
|
|
|
34442
34696
|
/**
|
|
34443
34697
|
* Label announced for the range end date cell.
|
|
34698
|
+
* @default 'range end'
|
|
34444
34699
|
*/
|
|
34445
34700
|
rangeLabelEnd: {
|
|
34446
34701
|
type: String,
|
|
34447
34702
|
reflect: true
|
|
34448
34703
|
},
|
|
34449
34704
|
|
|
34705
|
+
/**
|
|
34706
|
+
* Label announced for the focused cell while previewing a range end
|
|
34707
|
+
* (dateFrom set, dateTo not yet selected). Tells AT users that
|
|
34708
|
+
* pressing Enter would commit this cell as the range end.
|
|
34709
|
+
* @default 'previewing range end'
|
|
34710
|
+
*/
|
|
34711
|
+
rangeLabelEndPreview: {
|
|
34712
|
+
type: String,
|
|
34713
|
+
reflect: true
|
|
34714
|
+
},
|
|
34715
|
+
|
|
34450
34716
|
/**
|
|
34451
34717
|
* Label announced for cells within the selected range.
|
|
34718
|
+
* @default 'in range'
|
|
34452
34719
|
*/
|
|
34453
34720
|
rangeLabelInRange: {
|
|
34454
34721
|
type: String,
|
|
@@ -34457,6 +34724,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34457
34724
|
|
|
34458
34725
|
/**
|
|
34459
34726
|
* Label announced for the range start date cell.
|
|
34727
|
+
* @default 'range start'
|
|
34460
34728
|
*/
|
|
34461
34729
|
rangeLabelStart: {
|
|
34462
34730
|
type: String,
|
|
@@ -34464,7 +34732,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34464
34732
|
},
|
|
34465
34733
|
|
|
34466
34734
|
/**
|
|
34467
|
-
* Dates that the user should have for reference as part of their decision
|
|
34735
|
+
* Dates that the user should have for reference as part of their decision-making when selecting a date.
|
|
34468
34736
|
* This should be a JSON string array of ISO date strings (`YYYY-MM-DD`).
|
|
34469
34737
|
*/
|
|
34470
34738
|
referenceDates: {
|
|
@@ -34821,10 +35089,26 @@ class AuroDatePicker extends AuroElement {
|
|
|
34821
35089
|
// ─── Vendor calendar time conversions ─────────────────────────────────────
|
|
34822
35090
|
|
|
34823
35091
|
/**
|
|
34824
|
-
* Converts a Unix timestamp (seconds) from the
|
|
35092
|
+
* Converts a Unix timestamp (seconds) from the vendored range-datepicker
|
|
35093
|
+
* (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
|
|
35094
|
+
*
|
|
35095
|
+
* Timezone contract:
|
|
35096
|
+
* - INPUT: `time` is assumed to be the seconds-since-epoch of **local
|
|
35097
|
+
* midnight** for the intended calendar day. The vendor's Day constructor
|
|
35098
|
+
* builds it via `date-fns format(date, 't')` from a locally-constructed
|
|
35099
|
+
* Date, so this assumption currently holds end-to-end.
|
|
35100
|
+
* - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
|
|
35101
|
+
* getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
|
|
35102
|
+
* string matches the local calendar day.
|
|
35103
|
+
*
|
|
35104
|
+
* If the vendor ever switches to emitting UTC-midnight timestamps, this
|
|
35105
|
+
* conversion will silently shift the returned date by one day in zones
|
|
35106
|
+
* west of UTC. Any vendor swap should re-verify this contract; the TZ
|
|
35107
|
+
* regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
|
|
35108
|
+
*
|
|
34825
35109
|
* @private
|
|
34826
|
-
* @param {number} time - Unix timestamp
|
|
34827
|
-
* @returns {string} ISO date string (yyyy-mm-dd).
|
|
35110
|
+
* @param {number} time - Unix timestamp (seconds), local midnight of the day.
|
|
35111
|
+
* @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
|
|
34828
35112
|
*/
|
|
34829
35113
|
convertWcTimeToDate(time) {
|
|
34830
35114
|
return dateFormatter$1.toISOFormatString(new Date(time * 1000));
|
|
@@ -34926,8 +35210,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
34926
35210
|
}
|
|
34927
35211
|
}
|
|
34928
35212
|
|
|
34929
|
-
// Focus the calendar grid wrapper (
|
|
34930
|
-
// the SR announcement for the active cell
|
|
35213
|
+
// Focus the calendar grid wrapper. The live region (announced just
|
|
35214
|
+
// below) handles the SR announcement for the active cell.
|
|
34931
35215
|
if (activeCell) {
|
|
34932
35216
|
this.calendar.focusActiveCell();
|
|
34933
35217
|
|
|
@@ -34977,11 +35261,13 @@ class AuroDatePicker extends AuroElement {
|
|
|
34977
35261
|
this.dropdown.bibDialogLabel = labelElement.textContent.trim() || undefined;
|
|
34978
35262
|
}
|
|
34979
35263
|
|
|
35264
|
+
const { signal } = this._listenerAbortController;
|
|
35265
|
+
|
|
34980
35266
|
this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
|
|
34981
35267
|
if (!this.isPopoverVisible) {
|
|
34982
35268
|
this.dropdown.show();
|
|
34983
35269
|
}
|
|
34984
|
-
});
|
|
35270
|
+
}, { signal });
|
|
34985
35271
|
|
|
34986
35272
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
34987
35273
|
this.notifyDatepickerToggled();
|
|
@@ -34999,7 +35285,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
34999
35285
|
if (this.valueObject) {
|
|
35000
35286
|
this.centralDate = this.value;
|
|
35001
35287
|
} else if (!this.centralDate && !this.calendarStartDate && !this.minDate) {
|
|
35002
|
-
this.centralDate = new Date();
|
|
35288
|
+
this.centralDate = dateFormatter$1.toISOFormatString(new Date());
|
|
35003
35289
|
}
|
|
35004
35290
|
}
|
|
35005
35291
|
|
|
@@ -35079,7 +35365,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35079
35365
|
this.forceScrollOnNextMobileCalendarRender = false;
|
|
35080
35366
|
}, 0);
|
|
35081
35367
|
}
|
|
35082
|
-
});
|
|
35368
|
+
}, { signal });
|
|
35083
35369
|
|
|
35084
35370
|
// Handle responsive strategy changes while the dropdown is open
|
|
35085
35371
|
// (e.g. resizing from desktop → mobile or vice versa).
|
|
@@ -35126,7 +35412,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35126
35412
|
});
|
|
35127
35413
|
});
|
|
35128
35414
|
}
|
|
35129
|
-
});
|
|
35415
|
+
}, { signal });
|
|
35130
35416
|
}
|
|
35131
35417
|
|
|
35132
35418
|
/**
|
|
@@ -35139,6 +35425,8 @@ class AuroDatePicker extends AuroElement {
|
|
|
35139
35425
|
|
|
35140
35426
|
this.inputList = [...this.dropdown.querySelectorAll(this.inputTag._$litStatic$)];
|
|
35141
35427
|
|
|
35428
|
+
const { signal } = this._listenerAbortController;
|
|
35429
|
+
|
|
35142
35430
|
this.inputList.forEach((input, index) => {
|
|
35143
35431
|
input.addEventListener('input', (event) => {
|
|
35144
35432
|
event.stopPropagation();
|
|
@@ -35150,7 +35438,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35150
35438
|
}
|
|
35151
35439
|
|
|
35152
35440
|
this.notifyValueChanged();
|
|
35153
|
-
});
|
|
35441
|
+
}, { signal });
|
|
35154
35442
|
|
|
35155
35443
|
input.addEventListener('auroFormElement-validated', (evt) => {
|
|
35156
35444
|
// not to bubble up input's validated event.
|
|
@@ -35166,7 +35454,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35166
35454
|
this.validity = evt.detail.validity;
|
|
35167
35455
|
this.errorMessage = evt.detail.message;
|
|
35168
35456
|
}
|
|
35169
|
-
});
|
|
35457
|
+
}, { signal });
|
|
35170
35458
|
});
|
|
35171
35459
|
}
|
|
35172
35460
|
|
|
@@ -35180,19 +35468,32 @@ class AuroDatePicker extends AuroElement {
|
|
|
35180
35468
|
this.calendar.datepicker = this;
|
|
35181
35469
|
this.calendar.dropdown = this.dropdown;
|
|
35182
35470
|
|
|
35471
|
+
const { signal } = this._listenerAbortController;
|
|
35472
|
+
|
|
35183
35473
|
this.calendar.addEventListener('auroCalendar-dateSelected', () => {
|
|
35184
|
-
|
|
35185
|
-
|
|
35474
|
+
// Compare the input's ISO value against the *converted* calendar
|
|
35475
|
+
// timestamp (the vendor's `dateFrom`/`dateTo` are Unix-seconds
|
|
35476
|
+
// strings — comparing the input ISO directly against them would
|
|
35477
|
+
// never match, so the write would fire on every event and emit
|
|
35478
|
+
// redundant input/change activity).
|
|
35479
|
+
if (this.calendar.dateFrom !== undefined) {
|
|
35480
|
+
const fromIso = this.convertWcTimeToDate(this.calendar.dateFrom);
|
|
35481
|
+
if (this.inputList[0].value !== fromIso) {
|
|
35482
|
+
this.inputList[0].value = fromIso;
|
|
35483
|
+
}
|
|
35186
35484
|
}
|
|
35187
35485
|
|
|
35188
|
-
if (this.inputList[1] && this.calendar.dateTo
|
|
35189
|
-
|
|
35486
|
+
if (this.inputList[1] && this.calendar.dateTo) {
|
|
35487
|
+
const toIso = this.convertWcTimeToDate(this.calendar.dateTo);
|
|
35488
|
+
if (this.inputList[1].value !== toIso) {
|
|
35489
|
+
this.inputList[1].value = toIso;
|
|
35490
|
+
}
|
|
35190
35491
|
}
|
|
35191
|
-
});
|
|
35492
|
+
}, { signal });
|
|
35192
35493
|
|
|
35193
35494
|
this.calendar.addEventListener('auroCalendar-dismissRequest', () => {
|
|
35194
35495
|
this.dropdown.hide();
|
|
35195
|
-
});
|
|
35496
|
+
}, { signal });
|
|
35196
35497
|
|
|
35197
35498
|
this.calendar.addEventListener('auroCalendar-centralDateChanged', (event) => {
|
|
35198
35499
|
const match = this.centralDateObject && this.util.datesMatch(event.detail.date, this.centralDateObject);
|
|
@@ -35202,7 +35503,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35202
35503
|
}
|
|
35203
35504
|
|
|
35204
35505
|
this.notifyMonthChanged(event);
|
|
35205
|
-
});
|
|
35506
|
+
}, { signal });
|
|
35206
35507
|
}
|
|
35207
35508
|
|
|
35208
35509
|
/**
|
|
@@ -35211,10 +35512,17 @@ class AuroDatePicker extends AuroElement {
|
|
|
35211
35512
|
* @returns {void}
|
|
35212
35513
|
*/
|
|
35213
35514
|
configureDatepicker() {
|
|
35515
|
+
// These listeners are on `this` (the host), so they would GC with the
|
|
35516
|
+
// host even without the abort signal — see the leak rationale on
|
|
35517
|
+
// `_listenerAbortController`. The signal is still passed for uniform
|
|
35518
|
+
// cleanup semantics with the child-element listeners in the other
|
|
35519
|
+
// configure* methods.
|
|
35520
|
+
const { signal } = this._listenerAbortController;
|
|
35521
|
+
|
|
35214
35522
|
this.addEventListener('focusin', () => {
|
|
35215
35523
|
this.touched = true;
|
|
35216
35524
|
this.hasFocus = true;
|
|
35217
|
-
});
|
|
35525
|
+
}, { signal });
|
|
35218
35526
|
|
|
35219
35527
|
this.addEventListener('focusout', () => {
|
|
35220
35528
|
this.hasFocus = false;
|
|
@@ -35226,7 +35534,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35226
35534
|
if (!this.matches(':focus-within')) {
|
|
35227
35535
|
this.validate();
|
|
35228
35536
|
}
|
|
35229
|
-
});
|
|
35537
|
+
}, { signal });
|
|
35230
35538
|
|
|
35231
35539
|
if (this.valueObject) {
|
|
35232
35540
|
this.calendar.dateFrom = this.convertToWcValidTime(this.valueObject);
|
|
@@ -35424,6 +35732,41 @@ class AuroDatePicker extends AuroElement {
|
|
|
35424
35732
|
return this.validity !== undefined && this.validity !== 'valid';
|
|
35425
35733
|
}
|
|
35426
35734
|
|
|
35735
|
+
/**
|
|
35736
|
+
* Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
|
|
35737
|
+
* spans every datepicker instance on the page; lives on the class (not
|
|
35738
|
+
* at module scope) so it stays an encapsulated implementation detail of
|
|
35739
|
+
* this component and does not interfere with WCA's class-JSDoc
|
|
35740
|
+
* attachment.
|
|
35741
|
+
* @private
|
|
35742
|
+
*/
|
|
35743
|
+
static _warnedInvalidLocales = new Set();
|
|
35744
|
+
|
|
35745
|
+
/**
|
|
35746
|
+
* Logs a one-time `console.debug` when an unsupported locale falls back to
|
|
35747
|
+
* en-US. Deduped by the offending tag so noisy re-renders that resurface
|
|
35748
|
+
* the same bad value stay quiet, but each new bad value still signals so
|
|
35749
|
+
* consumers can spot the typo or missing tag.
|
|
35750
|
+
* @private
|
|
35751
|
+
* @param {string|undefined} badLocale - The locale value that failed.
|
|
35752
|
+
* @returns {void}
|
|
35753
|
+
*/
|
|
35754
|
+
_warnInvalidLocale(badLocale) {
|
|
35755
|
+
// Stringify without coalescing — `String(undefined)` / `String(null)`
|
|
35756
|
+
// surface the actual offending value in the log, instead of the
|
|
35757
|
+
// ambiguous `Locale ""` that `String(badLocale ?? '')` would produce.
|
|
35758
|
+
// Dedup still works correctly because each unique stringification
|
|
35759
|
+
// becomes its own Set entry.
|
|
35760
|
+
const key = String(badLocale);
|
|
35761
|
+
const seen = AuroDatePicker._warnedInvalidLocales;
|
|
35762
|
+
if (seen.has(key)) {
|
|
35763
|
+
return;
|
|
35764
|
+
}
|
|
35765
|
+
seen.add(key);
|
|
35766
|
+
// eslint-disable-next-line no-console
|
|
35767
|
+
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".`);
|
|
35768
|
+
}
|
|
35769
|
+
|
|
35427
35770
|
/**
|
|
35428
35771
|
* Lifecycle method to check if the locale is valid.
|
|
35429
35772
|
* @ignore
|
|
@@ -35434,10 +35777,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35434
35777
|
if (changedProperties.has('locale')) {
|
|
35435
35778
|
try {
|
|
35436
35779
|
const supported = Intl.DateTimeFormat.supportedLocalesOf([this.locale], { localeMatcher: 'lookup' });
|
|
35437
|
-
|
|
35780
|
+
if (supported.length > 0) {
|
|
35781
|
+
this._validLocale = this.locale;
|
|
35782
|
+
} else {
|
|
35783
|
+
this._validLocale = 'en-US';
|
|
35784
|
+
this._warnInvalidLocale(this.locale);
|
|
35785
|
+
}
|
|
35438
35786
|
} catch {
|
|
35439
|
-
console.debug(`[AuroDatePicker] The locale "${this.locale}" is not valid. Falling back to "en-US".`); // eslint-disable-line no-console
|
|
35440
35787
|
this._validLocale = 'en-US';
|
|
35788
|
+
this._warnInvalidLocale(this.locale);
|
|
35441
35789
|
}
|
|
35442
35790
|
|
|
35443
35791
|
const previousLocaleFormat = getDateFormatFromLocale$1(changedProperties.get('locale'));
|
|
@@ -35519,8 +35867,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35519
35867
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35520
35868
|
// to prevent the displayed months from shifting
|
|
35521
35869
|
this.centralDate = this.value;
|
|
35522
|
-
//TODO: TEST THIS CHANGE
|
|
35523
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.value);
|
|
35524
35870
|
}
|
|
35525
35871
|
|
|
35526
35872
|
this.setHasValue();
|
|
@@ -35580,8 +35926,6 @@ class AuroDatePicker extends AuroElement {
|
|
|
35580
35926
|
// Skip centralDate update when user clicked a cell in range mode
|
|
35581
35927
|
// to prevent the displayed months from shifting
|
|
35582
35928
|
this.centralDate = this.valueEnd;
|
|
35583
|
-
// TODO: TEST THIS CHANGE
|
|
35584
|
-
// this.calendarRenderUtil.updateCentralDate(this, this.formattedValueEnd);
|
|
35585
35929
|
}
|
|
35586
35930
|
|
|
35587
35931
|
this.validate();
|
|
@@ -35723,7 +36067,7 @@ class AuroDatePicker extends AuroElement {
|
|
|
35723
36067
|
* @returns {void}
|
|
35724
36068
|
*/
|
|
35725
36069
|
configureClickHandler() {
|
|
35726
|
-
this.addEventListener('click', this.handleClick);
|
|
36070
|
+
this.addEventListener('click', this.handleClick, { signal: this._listenerAbortController.signal });
|
|
35727
36071
|
}
|
|
35728
36072
|
|
|
35729
36073
|
firstUpdated() {
|
|
@@ -35731,6 +36075,15 @@ class AuroDatePicker extends AuroElement {
|
|
|
35731
36075
|
// Add the tag name as an attribute if it is different than the component name
|
|
35732
36076
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
|
|
35733
36077
|
|
|
36078
|
+
// If the element was disconnected before this first render finished,
|
|
36079
|
+
// disconnectedCallback's microtask already aborted the controller. The
|
|
36080
|
+
// connectedCallback reinit guard skips that case because `hasUpdated`
|
|
36081
|
+
// is still false. Mint a fresh controller here so configure* registers
|
|
36082
|
+
// listeners against a live signal.
|
|
36083
|
+
if (this._listenerAbortController.signal.aborted) {
|
|
36084
|
+
this._listenerAbortController = new AbortController();
|
|
36085
|
+
}
|
|
36086
|
+
|
|
35734
36087
|
this.configureDropdown();
|
|
35735
36088
|
this.configureInput();
|
|
35736
36089
|
this.configureCalendar();
|
|
@@ -35742,9 +36095,36 @@ class AuroDatePicker extends AuroElement {
|
|
|
35742
36095
|
connectedCallback() {
|
|
35743
36096
|
super.connectedCallback();
|
|
35744
36097
|
|
|
36098
|
+
// True reconnect after `disconnectedCallback` aborted our controller:
|
|
36099
|
+
// the existing signal is dead, so listeners registered against it
|
|
36100
|
+
// would never fire. Create a fresh controller and re-run the
|
|
36101
|
+
// configure* wiring (each method is idempotent — it just re-caches
|
|
36102
|
+
// child refs and re-registers listeners against the new signal).
|
|
36103
|
+
// `hasUpdated` gates this so the *first* connect (which precedes
|
|
36104
|
+
// firstUpdated) still falls through to firstUpdated's initial wiring.
|
|
36105
|
+
if (this.hasUpdated && this._listenerAbortController.signal.aborted) {
|
|
36106
|
+
this._listenerAbortController = new AbortController();
|
|
36107
|
+
this.configureDropdown();
|
|
36108
|
+
this.configureInput();
|
|
36109
|
+
this.configureCalendar();
|
|
36110
|
+
this.configureDatepicker();
|
|
36111
|
+
this.configureClickHandler();
|
|
36112
|
+
}
|
|
36113
|
+
|
|
35745
36114
|
this.locale = this.domHandler.getLocale(this);
|
|
35746
36115
|
}
|
|
35747
36116
|
|
|
36117
|
+
disconnectedCallback() {
|
|
36118
|
+
super.disconnectedCallback();
|
|
36119
|
+
// Defer so that re-parenting (auro-drawer slotting it into a dialog,
|
|
36120
|
+
// for example) does not abort listeners we still need after reconnect.
|
|
36121
|
+
queueMicrotask(() => {
|
|
36122
|
+
if (!this.isConnected) {
|
|
36123
|
+
this._listenerAbortController.abort();
|
|
36124
|
+
}
|
|
36125
|
+
});
|
|
36126
|
+
}
|
|
36127
|
+
|
|
35748
36128
|
// layout render methods
|
|
35749
36129
|
// ------------------------------------
|
|
35750
36130
|
|