@aurodesignsystem-dev/auro-formkit 0.0.0-pr1509.1 → 0.0.0-pr1510.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.
Files changed (126) hide show
  1. package/components/checkbox/demo/customize.min.js +1 -1
  2. package/components/checkbox/demo/getting-started.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/customize.min.js +3 -3
  7. package/components/combobox/demo/getting-started.min.js +3 -3
  8. package/components/combobox/demo/index.min.js +3 -3
  9. package/components/combobox/dist/index.js +3 -3
  10. package/components/combobox/dist/registered.js +3 -3
  11. package/components/counter/demo/customize.min.js +2 -2
  12. package/components/counter/demo/index.min.js +2 -2
  13. package/components/counter/dist/index.js +2 -2
  14. package/components/counter/dist/registered.js +2 -2
  15. package/components/datepicker/demo/accessibility.md +2 -1
  16. package/components/datepicker/demo/api.md +63 -62
  17. package/components/datepicker/demo/customize.md +12 -1
  18. package/components/datepicker/demo/customize.min.js +579 -202
  19. package/components/datepicker/demo/index.min.js +579 -202
  20. package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +14 -3
  21. package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +90 -6
  22. package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +78 -5
  23. package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
  24. package/components/datepicker/dist/index.js +579 -202
  25. package/components/datepicker/dist/registered.js +579 -202
  26. package/components/dropdown/demo/customize.min.js +1 -1
  27. package/components/dropdown/demo/getting-started.min.js +1 -1
  28. package/components/dropdown/demo/index.min.js +1 -1
  29. package/components/dropdown/dist/index.js +1 -1
  30. package/components/dropdown/dist/registered.js +1 -1
  31. package/components/form/demo/customize.min.js +595 -218
  32. package/components/form/demo/getting-started.min.js +595 -218
  33. package/components/form/demo/index.min.js +595 -218
  34. package/components/form/demo/registerDemoDeps.min.js +595 -218
  35. package/components/input/demo/customize.min.js +1 -1
  36. package/components/input/demo/getting-started.min.js +1 -1
  37. package/components/input/demo/index.min.js +1 -1
  38. package/components/input/dist/index.js +1 -1
  39. package/components/input/dist/registered.js +1 -1
  40. package/components/radio/demo/customize.min.js +1 -1
  41. package/components/radio/demo/getting-started.min.js +1 -1
  42. package/components/radio/demo/index.min.js +1 -1
  43. package/components/radio/dist/index.js +1 -1
  44. package/components/radio/dist/registered.js +1 -1
  45. package/components/select/demo/customize.min.js +2 -2
  46. package/components/select/demo/getting-started.min.js +2 -2
  47. package/components/select/demo/index.min.js +2 -2
  48. package/components/select/dist/index.js +2 -2
  49. package/components/select/dist/registered.js +2 -2
  50. package/custom-elements.json +1696 -1414
  51. package/package.json +6 -2
  52. package/components/checkbox/demo/customize.js +0 -22
  53. package/components/checkbox/demo/demo-support.js +0 -1
  54. package/components/checkbox/demo/getting-started.js +0 -22
  55. package/components/checkbox/demo/index.js +0 -8
  56. package/components/checkbox/demo/styles.scss +0 -1
  57. package/components/combobox/demo/customize.js +0 -24
  58. package/components/combobox/demo/demo-support.js +0 -1
  59. package/components/combobox/demo/getting-started.js +0 -21
  60. package/components/combobox/demo/index.js +0 -23
  61. package/components/combobox/demo/styles.scss +0 -1
  62. package/components/counter/demo/customize.js +0 -21
  63. package/components/counter/demo/demo-support.js +0 -1
  64. package/components/counter/demo/index.js +0 -21
  65. package/components/counter/demo/styles.scss +0 -1
  66. package/components/datepicker/demo/customize.js +0 -17
  67. package/components/datepicker/demo/demo-support.js +0 -1
  68. package/components/datepicker/demo/index.js +0 -23
  69. package/components/datepicker/demo/styles.scss +0 -1
  70. package/components/dropdown/demo/customize.js +0 -9
  71. package/components/dropdown/demo/demo-support.js +0 -1
  72. package/components/dropdown/demo/getting-started.js +0 -9
  73. package/components/dropdown/demo/index.js +0 -16
  74. package/components/dropdown/demo/styles.scss +0 -1
  75. package/components/form/demo/customize.js +0 -28
  76. package/components/form/demo/demo-support.js +0 -1
  77. package/components/form/demo/getting-started.js +0 -9
  78. package/components/form/demo/index.js +0 -5
  79. package/components/form/demo/registerDemoDeps.js +0 -23
  80. package/components/form/demo/styles.scss +0 -1
  81. package/components/input/demo/customize.js +0 -25
  82. package/components/input/demo/demo-support.js +0 -1
  83. package/components/input/demo/getting-started.js +0 -8
  84. package/components/input/demo/index.js +0 -8
  85. package/components/input/demo/styles.css +0 -974
  86. package/components/input/demo/styles.scss +0 -1
  87. package/components/menu/demo/demo-support.js +0 -1
  88. package/components/menu/demo/index.js +0 -25
  89. package/components/menu/demo/styles.scss +0 -1
  90. package/components/radio/demo/customize.js +0 -22
  91. package/components/radio/demo/demo-support.js +0 -1
  92. package/components/radio/demo/getting-started.js +0 -24
  93. package/components/radio/demo/index.js +0 -8
  94. package/components/radio/demo/styles.scss +0 -1
  95. package/components/select/demo/customize.js +0 -11
  96. package/components/select/demo/demo-support.js +0 -1
  97. package/components/select/demo/getting-started.js +0 -26
  98. package/components/select/demo/index.js +0 -11
  99. package/components/select/demo/styles.scss +0 -1
  100. /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
  101. /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
  102. /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
  103. /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
  104. /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
  105. /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
  106. /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
  107. /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
  108. /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
  109. /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
  110. /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
  111. /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
  112. /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
  113. /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
  114. /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
  115. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
  116. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
  117. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
  118. /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
  119. /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
  120. /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
  121. /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
  122. /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
  123. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
  124. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
  125. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
  126. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
@@ -25,6 +25,14 @@ export class AuroCalendarCell extends LitElement {
25
25
  type: BooleanConstructor;
26
26
  reflect: boolean;
27
27
  };
28
+ /**
29
+ * @deprecated Propagated from the legacy `auro-calendar.disabledDays`
30
+ * Unix-timestamp array. The cell honors it for backward compatibility
31
+ * (see the divergence-check fallback inside `isBlackout`), but
32
+ * consumers should migrate to `auro-datepicker.blackoutDates`
33
+ * (YYYY-MM-DD ISO strings). The calendar emits a one-time
34
+ * deprecation warning the first time a non-empty value is observed.
35
+ */
28
36
  disabledDays: {
29
37
  type: ArrayConstructor;
30
38
  };
@@ -211,6 +219,7 @@ export class AuroCalendarCell extends LitElement {
211
219
  */
212
220
  private handleSlotContent;
213
221
  firstUpdated(): void;
222
+ calendar: any;
214
223
  datepicker: any;
215
224
  _slotContentHandler: (() => void) | undefined;
216
225
  _cachedButton: Element | null | undefined;
@@ -226,8 +235,8 @@ export class AuroCalendarCell extends LitElement {
226
235
  auroPopover: any;
227
236
  updated(properties: any): void;
228
237
  /**
229
- * Updates ARIA attributes on the host element so that
230
- * ariaActiveDescendantElement can expose cell info to the SR.
238
+ * Sets host-level ARIA so each cell exposes its date, selection state,
239
+ * and blackout status to assistive tech browsing the month grid.
231
240
  * @private
232
241
  * @returns {void}
233
242
  */
@@ -241,7 +250,9 @@ export class AuroCalendarCell extends LitElement {
241
250
  focusButton(): void;
242
251
  /**
243
252
  * Imperatively marks this cell as active without triggering a Lit re-render.
244
- * Note: buttons stay tabindex="-1" because the grid uses aria-activedescendant.
253
+ * Buttons stay tabindex="-1" because DOM focus stays on the grid wrapper
254
+ * arrow keys move the active cell imperatively and the live region carries
255
+ * the SR announcement.
245
256
  * @returns {void}
246
257
  */
247
258
  setActive(): void;
@@ -118,6 +118,13 @@ export class AuroCalendar extends RangeDatepicker {
118
118
  type: ArrayConstructor;
119
119
  };
120
120
  };
121
+ /**
122
+ * Per-class flag that gates the `disabledDays` deprecation warning so it
123
+ * fires exactly once per page no matter how many calendars or rebuild
124
+ * cycles encounter the legacy array.
125
+ * @private
126
+ */
127
+ private static _warnedDisabledDaysDeprecation;
121
128
  /**
122
129
  * @private
123
130
  */
@@ -219,6 +226,32 @@ export class AuroCalendar extends RangeDatepicker {
219
226
  * @returns {void}
220
227
  */
221
228
  private updateActiveCellForVisibleMonth;
229
+ /**
230
+ * Schedules `callback` two animation frames out, giving the child
231
+ * `auro-formkit-calendar-month` and `auro-formkit-calendar-cell` elements
232
+ * a full render-and-paint cycle to settle before the callback reads or
233
+ * mutates DOM.
234
+ *
235
+ * Why two frames, not one:
236
+ * 1. Lit batches property updates and renders in a microtask, so frame N
237
+ * schedules the render but the new DOM may not be painted yet.
238
+ * 2. Cells re-cache `_cachedButton` inside their own `updateComplete.then`,
239
+ * which also lands a tick later. Reading buttons from frame N+1
240
+ * (after both renders + cache refresh have flushed) reliably hits the
241
+ * new month's cells.
242
+ *
243
+ * Used by every code path that calls `handleNextMonth`/`handlePrevMonth`
244
+ * and then needs to inspect the freshly-rendered cells (cross-month
245
+ * keyboard nav, boundary events, `updateActiveCellForVisibleMonth`).
246
+ * Do NOT collapse to a single rAF — it intermittently lands before
247
+ * `_cachedButton` is refreshed, which silently breaks focus restoration
248
+ * and `setActiveCell` lookups.
249
+ * @private
250
+ * @param {() => void} callback - Runs once after the month re-render and
251
+ * the cells' button caches have refreshed.
252
+ * @returns {void}
253
+ */
254
+ private _afterMonthRender;
222
255
  /**
223
256
  * Renders all of the auro-calendar-months HTML.
224
257
  * @private
@@ -244,6 +277,20 @@ export class AuroCalendar extends RangeDatepicker {
244
277
  * @returns {Array} Array of auro-formkit-calendar-month elements.
245
278
  */
246
279
  private getMonthComponents;
280
+ /**
281
+ * Picks the focusable cell whose date is closest to targetTs. Used as a
282
+ * fallback after a month-boundary nav when the exact target date isn't
283
+ * focusable — typically because the month re-render lagged or the date
284
+ * was filtered out by isOutOfRange. When two cells are equidistant, the
285
+ * navigation direction breaks the tie so the user moves the way they
286
+ * pressed (forward → later cell, backward → earlier cell).
287
+ * @private
288
+ * @param {Array} cells - Focusable cells from getAllFocusableCells.
289
+ * @param {Number} targetTs - Desired Unix timestamp (seconds).
290
+ * @param {'next'|'prev'} direction - Navigation direction.
291
+ * @returns {Object|null} The nearest cell, or null when cells is empty.
292
+ */
293
+ private pickNearestCell;
247
294
  /**
248
295
  * Gets all focusable cells across all rendered months.
249
296
  * @private
@@ -252,9 +299,9 @@ export class AuroCalendar extends RangeDatepicker {
252
299
  private getAllFocusableCells;
253
300
  /**
254
301
  * Sets the active cell across all months. Only one cell has tabindex="0" at a time.
255
- * Uses imperative DOM manipulation — no Lit re-render triggered.
256
- * Also updates ariaActiveDescendantElement on the grid wrapper so
257
- * screen readers announce the active cell without moving DOM focus.
302
+ * Uses imperative DOM manipulation — no Lit re-render triggered. DOM focus
303
+ * stays on the grid wrapper; the live region (see getOrCreateLiveRegion)
304
+ * is what announces the active cell to assistive tech.
258
305
  * @param {Number} date - Unix timestamp of the cell to activate.
259
306
  * @returns {void}
260
307
  */
@@ -278,6 +325,28 @@ export class AuroCalendar extends RangeDatepicker {
278
325
  * @returns {void}
279
326
  */
280
327
  private handleGridFocusOut;
328
+ /**
329
+ * Returns a memoized Set of blackout timestamps (seconds) drawn from both
330
+ * the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
331
+ * The cache invalidates when either source array's reference changes, which
332
+ * matches Lit's own reactive identity semantics for array properties.
333
+ * @private
334
+ * @returns {Set<Number>}
335
+ */
336
+ private _getBlackoutSet;
337
+ _blackoutSet: Set<number> | undefined;
338
+ _cachedBlackoutDisabledDays: any;
339
+ _cachedBlackoutDates: any;
340
+ /**
341
+ * One-time `console.debug` directing consumers from the legacy
342
+ * `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
343
+ * the first time `_getBlackoutSet` rebuilds from a non-empty
344
+ * `disabledDays`; subsequent calls (on this or any other AuroCalendar
345
+ * instance on the page) are silent.
346
+ * @private
347
+ * @returns {void}
348
+ */
349
+ private _warnDisabledDaysDeprecated;
281
350
  /**
282
351
  * Computes the initial active date from data properties alone — no DOM required.
283
352
  * Priority:
@@ -310,8 +379,8 @@ export class AuroCalendar extends RangeDatepicker {
310
379
  private isDateInRange;
311
380
  /**
312
381
  * Handles arrow key navigation on the calendar grid wrapper.
313
- * Focus stays on the grid wrapper; only ariaActiveDescendantElement
314
- * and the visual active-cell indicator change.
382
+ * Focus stays on the grid wrapper; only the visual active-cell indicator
383
+ * changes. The live region announces the new active cell.
315
384
  * @private
316
385
  * @param {KeyboardEvent} event - The keyboard event.
317
386
  * @returns {void}
@@ -357,7 +426,9 @@ export class AuroCalendar extends RangeDatepicker {
357
426
  */
358
427
  private getRangePositionLabel;
359
428
  /**
360
- * Checks whether a given date is a blackout date.
429
+ * Checks whether a given date is a blackout date. Delegates to the
430
+ * memoized `_getBlackoutSet` so the YYYY-MM-DD parsing and the
431
+ * legacy/ISO merge rules live in exactly one place (see `blackoutUtils.js`).
361
432
  * @private
362
433
  * @param {Number} dateTs - Unix timestamp (seconds).
363
434
  * @returns {Boolean} True if the date is blacked out.
@@ -427,6 +498,19 @@ export class AuroCalendar extends RangeDatepicker {
427
498
  * @returns {void}
428
499
  */
429
500
  private announceSelection;
501
+ /**
502
+ * Writes `dateStr` to the live region. If the dropdown's dialog hasn't
503
+ * mounted yet (so getOrCreateLiveRegion can't attach), retries on the
504
+ * next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
505
+ * dropping the announcement. The retry uses the same `_announceRafId`
506
+ * the double-rAF below uses, so a newer announceSelection call (or
507
+ * disconnectedCallback) cancels any in-flight retry.
508
+ * @private
509
+ * @param {String} dateStr - The localized date string to announce.
510
+ * @param {Number} attempts - Number of prior retry attempts.
511
+ * @returns {void}
512
+ */
513
+ private _deliverAnnouncement;
430
514
  /**
431
515
  * Debounced version of announceSelection for focus navigation.
432
516
  * Uses the assertive live region with a 150ms debounce so only the
@@ -61,6 +61,7 @@ export class AuroDatePicker extends AuroElement {
61
61
  };
62
62
  /**
63
63
  * Label announced for blackout (disabled but in-range) date cells.
64
+ * @default 'unavailable'
64
65
  */
65
66
  blackoutLabel: {
66
67
  type: StringConstructor;
@@ -75,6 +76,7 @@ export class AuroDatePicker extends AuroElement {
75
76
  };
76
77
  /**
77
78
  * Accessible label for the calendar grid containing the days of the month.
79
+ * @default 'Calendar days of the month'
78
80
  */
79
81
  calendarGridLabel: {
80
82
  type: StringConstructor;
@@ -211,6 +213,7 @@ export class AuroDatePicker extends AuroElement {
211
213
  };
212
214
  /**
213
215
  * Accessible label for the next month navigation button.
216
+ * @default 'Next month'
214
217
  */
215
218
  navLabelNextMonth: {
216
219
  type: StringConstructor;
@@ -218,6 +221,7 @@ export class AuroDatePicker extends AuroElement {
218
221
  };
219
222
  /**
220
223
  * Accessible label for the previous month navigation button.
224
+ * @default 'Previous month'
221
225
  */
222
226
  navLabelPrevMonth: {
223
227
  type: StringConstructor;
@@ -283,7 +287,11 @@ export class AuroDatePicker extends AuroElement {
283
287
  reflect: boolean;
284
288
  };
285
289
  /**
286
- * Label announced for cells after the range (or after start when no end is selected).
290
+ * Label announced for cells after a fully selected range (both
291
+ * `dateFrom` and `dateTo` are set). While a range is still being
292
+ * picked (`dateFrom` set, `dateTo` unset), focused cells past the
293
+ * start use `rangeLabelEndPreview` instead.
294
+ * @default 'after range'
287
295
  */
288
296
  rangeLabelAfterRange: {
289
297
  type: StringConstructor;
@@ -291,6 +299,7 @@ export class AuroDatePicker extends AuroElement {
291
299
  };
292
300
  /**
293
301
  * Label announced for cells before the range start.
302
+ * @default 'before range'
294
303
  */
295
304
  rangeLabelBeforeRange: {
296
305
  type: StringConstructor;
@@ -298,13 +307,25 @@ export class AuroDatePicker extends AuroElement {
298
307
  };
299
308
  /**
300
309
  * Label announced for the range end date cell.
310
+ * @default 'range end'
301
311
  */
302
312
  rangeLabelEnd: {
303
313
  type: StringConstructor;
304
314
  reflect: boolean;
305
315
  };
316
+ /**
317
+ * Label announced for the focused cell while previewing a range end
318
+ * (dateFrom set, dateTo not yet selected). Tells AT users that
319
+ * pressing Enter would commit this cell as the range end.
320
+ * @default 'previewing range end'
321
+ */
322
+ rangeLabelEndPreview: {
323
+ type: StringConstructor;
324
+ reflect: boolean;
325
+ };
306
326
  /**
307
327
  * Label announced for cells within the selected range.
328
+ * @default 'in range'
308
329
  */
309
330
  rangeLabelInRange: {
310
331
  type: StringConstructor;
@@ -312,13 +333,14 @@ export class AuroDatePicker extends AuroElement {
312
333
  };
313
334
  /**
314
335
  * Label announced for the range start date cell.
336
+ * @default 'range start'
315
337
  */
316
338
  rangeLabelStart: {
317
339
  type: StringConstructor;
318
340
  reflect: boolean;
319
341
  };
320
342
  /**
321
- * Dates that the user should have for reference as part of their decision making when selecting a date.
343
+ * Dates that the user should have for reference as part of their decision-making when selecting a date.
322
344
  * This should be a JSON string array of ISO date strings (`YYYY-MM-DD`).
323
345
  */
324
346
  referenceDates: {
@@ -416,6 +438,15 @@ export class AuroDatePicker extends AuroElement {
416
438
  *
417
439
  */
418
440
  static register(name?: string): void;
441
+ /**
442
+ * Per-class dedup set used by `_warnInvalidLocale`. Static so the dedup
443
+ * spans every datepicker instance on the page; lives on the class (not
444
+ * at module scope) so it stays an encapsulated implementation detail of
445
+ * this component and does not interfere with WCA's class-JSDoc
446
+ * attachment.
447
+ * @private
448
+ */
449
+ private static _warnedInvalidLocales;
419
450
  /**
420
451
  * @private
421
452
  */
@@ -440,6 +471,7 @@ export class AuroDatePicker extends AuroElement {
440
471
  rangeLabelBeforeRange: string;
441
472
  rangeLabelInRange: string;
442
473
  rangeLabelAfterRange: string;
474
+ rangeLabelEndPreview: string;
443
475
  blackoutDates: any[];
444
476
  blackoutLabel: string;
445
477
  navLabelPrevMonth: string;
@@ -520,6 +552,21 @@ export class AuroDatePicker extends AuroElement {
520
552
  * @returns {void}
521
553
  */
522
554
  private handleClick;
555
+ /**
556
+ * Single AbortController shared by every listener registered in the
557
+ * configure* methods. Lets disconnectedCallback tear all of them down
558
+ * with one abort() call.
559
+ *
560
+ * The genuine leak risk is the listeners attached to children that can
561
+ * outlive the host if they get reparented — `this.dropdown`,
562
+ * `this.calendar`, and the inputs inside the dropdown's slot.
563
+ * Listeners attached to `this` (e.g. focusin/focusout on the host)
564
+ * form a self-contained reference graph that the GC can collect with
565
+ * the host anyway, but they share the same signal so the cleanup
566
+ * pattern stays uniform across all configure* sites.
567
+ * @private
568
+ */
569
+ private _listenerAbortController;
523
570
  /**
524
571
  * Handles click on the clear button.
525
572
  * @private
@@ -637,10 +684,26 @@ export class AuroDatePicker extends AuroElement {
637
684
  */
638
685
  get calendarFocusDateObject(): Date | undefined;
639
686
  /**
640
- * Converts a Unix timestamp (seconds) from the vendor calendar to an ISO date string.
687
+ * Converts a Unix timestamp (seconds) from the vendored range-datepicker
688
+ * (`src/vendor/wc-range-datepicker/day.js`) to an ISO date string.
689
+ *
690
+ * Timezone contract:
691
+ * - INPUT: `time` is assumed to be the seconds-since-epoch of **local
692
+ * midnight** for the intended calendar day. The vendor's Day constructor
693
+ * builds it via `date-fns format(date, 't')` from a locally-constructed
694
+ * Date, so this assumption currently holds end-to-end.
695
+ * - OUTPUT: `dateFormatter.toISOFormatString` reads the Date's local
696
+ * getFullYear/getMonth/getDate components, so the returned YYYY-MM-DD
697
+ * string matches the local calendar day.
698
+ *
699
+ * If the vendor ever switches to emitting UTC-midnight timestamps, this
700
+ * conversion will silently shift the returned date by one day in zones
701
+ * west of UTC. Any vendor swap should re-verify this contract; the TZ
702
+ * regression suite (`npm run test:hst`, UTC-10) will catch the symptom.
703
+ *
641
704
  * @private
642
- * @param {number} time - Unix timestamp in seconds.
643
- * @returns {string} ISO date string (yyyy-mm-dd).
705
+ * @param {number} time - Unix timestamp (seconds), local midnight of the day.
706
+ * @returns {string} ISO date string (yyyy-mm-dd) reflecting the local calendar day.
644
707
  */
645
708
  private convertWcTimeToDate;
646
709
  /**
@@ -772,6 +835,16 @@ export class AuroDatePicker extends AuroElement {
772
835
  * @returns {boolean}
773
836
  */
774
837
  get hasError(): boolean;
838
+ /**
839
+ * Logs a one-time `console.debug` when an unsupported locale falls back to
840
+ * en-US. Deduped by the offending tag so noisy re-renders that resurface
841
+ * the same bad value stay quiet, but each new bad value still signals so
842
+ * consumers can spot the typo or missing tag.
843
+ * @private
844
+ * @param {string|undefined} badLocale - The locale value that failed.
845
+ * @returns {void}
846
+ */
847
+ private _warnInvalidLocale;
775
848
  /**
776
849
  * Lifecycle method to check if the locale is valid.
777
850
  * @ignore
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Single source of truth for parsing and matching blackout dates across the
3
+ * datepicker. Both `auro-calendar` (memoized Set + `isDateBlackout`) and the
4
+ * pre-`firstUpdated` fallback inside `auro-calendar-cell` route through these
5
+ * helpers so the YYYY-MM-DD → seconds conversion and the merge-with-legacy
6
+ * `disabledDays` rules are defined exactly once.
7
+ */
8
+ /**
9
+ * Converts a `YYYY-MM-DD` ISO date string to a Unix timestamp (seconds)
10
+ * representing local midnight on that calendar day. Returns `null` for
11
+ * inputs that don't parse to a finite timestamp.
12
+ *
13
+ * Uses the `new Date(year, monthIndex, day)` constructor (NOT
14
+ * `new Date(isoStr)`) so the result is local-midnight rather than UTC
15
+ * midnight — required to keep the calendar grid aligned with the user's
16
+ * local calendar day in negative-offset timezones.
17
+ *
18
+ * @param {string} isoStr - Date string in `YYYY-MM-DD` format.
19
+ * @returns {number|null} Local-midnight Unix timestamp (seconds), or null.
20
+ */
21
+ export function parseIsoToTimestamp(isoStr: string): number | null;
22
+ /**
23
+ * Builds a `Set<number>` of seconds-since-epoch timestamps covering both the
24
+ * legacy `disabledDays` (already-numeric) array and the ISO `blackoutDates`
25
+ * array. Use this for O(1) membership checks in hot paths.
26
+ *
27
+ * @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
28
+ * @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
29
+ * @returns {Set<number>}
30
+ */
31
+ export function buildBlackoutSet(disabledDays: Array<string | number> | undefined, blackoutDates: Array<string> | undefined): Set<number>;
32
+ /**
33
+ * One-shot membership test for a single timestamp against both blackout
34
+ * sources. Allocates a Set on each call; only use this in cold paths
35
+ * (e.g. the pre-`firstUpdated` cell fallback). Hot paths should hold the
36
+ * Set returned from `buildBlackoutSet` and `.has(ts)` directly.
37
+ *
38
+ * @param {number} dateTs - Unix timestamp (seconds) to test.
39
+ * @param {Array<string|number>|undefined} disabledDays - Legacy timestamp array.
40
+ * @param {Array<string>|undefined} blackoutDates - ISO `YYYY-MM-DD` array.
41
+ * @returns {boolean}
42
+ */
43
+ export function isBlackoutTimestamp(dateTs: number, disabledDays: Array<string | number> | undefined, blackoutDates: Array<string> | undefined): boolean;