@aurodesignsystem-dev/auro-formkit 0.0.0-pr1477.2 → 0.0.0-pr1480.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 (103) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
  2. package/components/bibtemplate/dist/index.js +9 -1
  3. package/components/bibtemplate/dist/registered.js +9 -1
  4. package/components/checkbox/demo/customize.min.js +1 -1
  5. package/components/checkbox/demo/getting-started.min.js +1 -1
  6. package/components/checkbox/demo/index.min.js +1 -1
  7. package/components/checkbox/demo/pages.json +1 -1
  8. package/components/checkbox/demo/why-checkbox.html +57 -0
  9. package/components/checkbox/demo/why-checkbox.md +86 -0
  10. package/components/checkbox/dist/index.js +1 -1
  11. package/components/checkbox/dist/registered.js +1 -1
  12. package/components/combobox/demo/customize.min.js +236 -18
  13. package/components/combobox/demo/getting-started.min.js +236 -18
  14. package/components/combobox/demo/index.min.js +236 -18
  15. package/components/combobox/demo/keyboard-behavior.md +8 -68
  16. package/components/combobox/demo/pages.json +1 -1
  17. package/components/combobox/demo/why-combobox.html +57 -0
  18. package/components/combobox/demo/why-combobox.md +113 -0
  19. package/components/combobox/dist/index.js +236 -18
  20. package/components/combobox/dist/registered.js +236 -18
  21. package/components/counter/demo/customize.min.js +233 -15
  22. package/components/counter/demo/index.min.js +233 -15
  23. package/components/counter/demo/keyboard-behavior.md +1 -0
  24. package/components/counter/demo/pages.json +1 -1
  25. package/components/counter/demo/why-counter.html +57 -0
  26. package/components/counter/demo/why-counter.md +108 -0
  27. package/components/counter/dist/index.js +10 -2
  28. package/components/counter/dist/registered.js +10 -2
  29. package/components/datepicker/demo/accessibility.md +54 -3
  30. package/components/datepicker/demo/api.md +11 -2
  31. package/components/datepicker/demo/customize.html +2 -0
  32. package/components/datepicker/demo/customize.js +19 -0
  33. package/components/datepicker/demo/customize.md +72 -8
  34. package/components/datepicker/demo/customize.min.js +26492 -0
  35. package/components/datepicker/demo/design.md +3 -1
  36. package/components/datepicker/demo/index.js +5 -1
  37. package/components/datepicker/demo/index.md +85 -2
  38. package/components/datepicker/demo/index.min.js +2115 -184
  39. package/components/datepicker/demo/keyboard-behavior.md +201 -2
  40. package/components/datepicker/demo/pages.json +1 -1
  41. package/components/datepicker/demo/voiceover.md +21 -12
  42. package/components/datepicker/demo/why-datepicker.html +57 -0
  43. package/components/datepicker/demo/why-datepicker.md +133 -0
  44. package/components/datepicker/dist/index.js +2010 -155
  45. package/components/datepicker/dist/registered.js +2010 -155
  46. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +112 -11
  47. package/components/datepicker/dist/src/auro-calendar-month.d.ts +37 -0
  48. package/components/datepicker/dist/src/auro-calendar.d.ts +177 -0
  49. package/components/datepicker/dist/src/auro-datepicker.d.ts +88 -0
  50. package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
  51. package/components/dropdown/demo/accessibility.md +11 -0
  52. package/components/dropdown/demo/api.md +1 -0
  53. package/components/dropdown/demo/customize.md +3 -0
  54. package/components/dropdown/demo/customize.min.js +223 -13
  55. package/components/dropdown/demo/getting-started.min.js +223 -13
  56. package/components/dropdown/demo/index.min.js +223 -13
  57. package/components/dropdown/demo/keyboard-behavior.md +1 -0
  58. package/components/dropdown/demo/pages.json +1 -1
  59. package/components/dropdown/demo/why-dropdown.html +57 -0
  60. package/components/dropdown/demo/why-dropdown.md +97 -0
  61. package/components/dropdown/dist/auro-dropdown.d.ts +33 -1
  62. package/components/dropdown/dist/index.js +223 -13
  63. package/components/dropdown/dist/registered.js +223 -13
  64. package/components/form/demo/customize.min.js +2726 -219
  65. package/components/form/demo/getting-started.min.js +2726 -219
  66. package/components/form/demo/index.min.js +2726 -219
  67. package/components/form/demo/pages.json +1 -1
  68. package/components/form/demo/registerDemoDeps.min.js +2726 -219
  69. package/components/form/demo/why-form.html +57 -0
  70. package/components/form/demo/why-form.md +101 -0
  71. package/components/input/demo/customize.min.js +1 -1
  72. package/components/input/demo/getting-started.min.js +1 -1
  73. package/components/input/demo/index.min.js +1 -1
  74. package/components/input/demo/pages.json +1 -1
  75. package/components/input/demo/why-input.html +57 -0
  76. package/components/input/demo/why-input.md +121 -0
  77. package/components/input/dist/index.js +1 -1
  78. package/components/input/dist/registered.js +1 -1
  79. package/components/menu/demo/pages.json +1 -1
  80. package/components/menu/demo/why-menu.html +57 -0
  81. package/components/menu/demo/why-menu.md +104 -0
  82. package/components/radio/demo/customize.min.js +2186 -0
  83. package/components/radio/demo/demo-support.min.js +55807 -0
  84. package/components/radio/demo/getting-started.js +1 -1
  85. package/components/radio/demo/getting-started.md +1 -1
  86. package/components/radio/demo/getting-started.min.js +2205 -0
  87. package/components/radio/demo/index.min.js +1 -1
  88. package/components/radio/demo/pages.json +1 -1
  89. package/components/radio/demo/why-radio.html +57 -0
  90. package/components/radio/demo/why-radio.md +92 -0
  91. package/components/radio/dist/index.js +1 -1
  92. package/components/radio/dist/registered.js +1 -1
  93. package/components/select/demo/customize.min.js +249 -33
  94. package/components/select/demo/getting-started.min.js +249 -33
  95. package/components/select/demo/index.min.js +249 -33
  96. package/components/select/demo/keyboard-behavior.md +9 -54
  97. package/components/select/demo/pages.json +1 -1
  98. package/components/select/demo/why-select.html +57 -0
  99. package/components/select/demo/why-select.md +128 -0
  100. package/components/select/dist/index.js +249 -33
  101. package/components/select/dist/registered.js +249 -33
  102. package/custom-elements.json +2446 -1502
  103. package/package.json +2 -2
@@ -6,9 +6,6 @@ export class AuroCalendarCell extends LitElement {
6
6
  selected: {
7
7
  type: BooleanConstructor;
8
8
  };
9
- hovered: {
10
- type: BooleanConstructor;
11
- };
12
9
  dateTo: {
13
10
  type: StringConstructor;
14
11
  };
@@ -31,9 +28,6 @@ export class AuroCalendarCell extends LitElement {
31
28
  disabledDays: {
32
29
  type: ArrayConstructor;
33
30
  };
34
- hoveredDate: {
35
- type: StringConstructor;
36
- };
37
31
  isCurrentDate: {
38
32
  type: BooleanConstructor;
39
33
  };
@@ -46,11 +40,13 @@ export class AuroCalendarCell extends LitElement {
46
40
  renderForDateSlot: {
47
41
  type: BooleanConstructor;
48
42
  };
43
+ hasPopoverContent: {
44
+ type: BooleanConstructor;
45
+ };
49
46
  };
50
47
  static get styles(): import("lit").CSSResult[];
51
48
  day: any;
52
49
  selected: boolean;
53
- hovered: boolean;
54
50
  dateTo: any;
55
51
  dateFrom: any;
56
52
  month: any;
@@ -58,21 +54,23 @@ export class AuroCalendarCell extends LitElement {
58
54
  max: any;
59
55
  disabled: boolean;
60
56
  disabledDays: any[];
61
- hoveredDate: any;
62
57
  isCurrentDate: boolean;
63
58
  _locale: any;
64
59
  dateStr: string | null;
65
60
  renderForDateSlot: boolean;
61
+ active: boolean;
62
+ hasPopoverContent: boolean;
66
63
  runtimeUtils: any;
67
64
  popoverTag: any;
68
65
  set locale(value: any);
69
66
  get locale(): any;
70
67
  /**
71
- * Handles selected and hovered states of the calendar cell when the date changes.
68
+ * Handles selected state of the calendar cell when the selection changes.
69
+ * Also clears any imperative range preview classes so classMap is the
70
+ * sole source of truth after a selection update.
72
71
  * @private
73
72
  * @param {Number} dateFrom - Depart date.
74
73
  * @param {Number} dateTo - Return date.
75
- * @param {Number} hoveredDate - Hovered date.
76
74
  * @param {Object} day - An object containing the dateFrom and day of month values.
77
75
  * @returns {void}
78
76
  */
@@ -85,12 +83,43 @@ export class AuroCalendarCell extends LitElement {
85
83
  private handleTap;
86
84
  /**
87
85
  * Handles user hover events and dispatches a custom event.
86
+ * Does NOT set any reactive properties — the range preview is handled
87
+ * imperatively by the calendar component to avoid O(N) re-renders.
88
88
  * @private
89
89
  * @returns {void}
90
90
  */
91
91
  private handleHover;
92
92
  /**
93
- * Checks if the current date is a valid date depending on the min and max values.
93
+ * Handles focus events on the cell button.
94
+ * Dispatches a lightweight event for the calendar to handle SR
95
+ * announcements and range preview updates without triggering
96
+ * any Lit lifecycle updates.
97
+ * @private
98
+ * @returns {void}
99
+ */
100
+ private handleFocus;
101
+ /**
102
+ * Checks if the current date is outside the valid min/max range.
103
+ * Out-of-range cells are not focusable and are hidden from screen readers.
104
+ * @private
105
+ * @param {Object} day - An object containing the dateFrom and day of month values.
106
+ * @param {Number} min - The minimum date value.
107
+ * @param {Number} max - The maximum date value.
108
+ * @returns {Boolean} - True if the date is out of range.
109
+ */
110
+ private isOutOfRange;
111
+ /**
112
+ * Checks if the current date is a blackout date (in disabledDays but within range).
113
+ * Blackout cells are focusable but not selectable.
114
+ * @private
115
+ * @returns {Boolean} - True if the date is a blackout date.
116
+ */
117
+ private isBlackout;
118
+ /**
119
+ * Checks if the current date is disabled based on min/max range or the
120
+ * legacy disabledDays timestamp list. Sets the `disabled` attribute on the
121
+ * host when the date falls outside the allowed range or appears in
122
+ * disabledDays. Note: blackout dates are handled separately by `isBlackout()`.
94
123
  * @private
95
124
  * @param {Object} day - An object containing the dateFrom and day of month values.
96
125
  * @param {Number} min - The minimum date value.
@@ -99,6 +128,25 @@ export class AuroCalendarCell extends LitElement {
99
128
  * @returns {Boolean} - True if the date is disabled.
100
129
  */
101
130
  private isEnabled;
131
+ /**
132
+ * Generates a unique cell ID in the format cell-YYYY-MM-DD.
133
+ * @private
134
+ * @returns {String} The unique cell ID.
135
+ */
136
+ private getCellId;
137
+ /**
138
+ * Generates a localized aria-label for the cell button using Intl.DateTimeFormat.
139
+ * Includes range position and blackout status.
140
+ * @private
141
+ * @returns {String} The aria-label string.
142
+ */
143
+ private getAriaLabel;
144
+ /**
145
+ * Determines the range position of this cell relative to the current selection.
146
+ * @private
147
+ * @returns {String|null} Range position label or null if not in range mode.
148
+ */
149
+ private getRangePosition;
102
150
  /**
103
151
  * Checks if the current date is the depart date.
104
152
  * @private
@@ -162,8 +210,61 @@ export class AuroCalendarCell extends LitElement {
162
210
  private handleSlotContent;
163
211
  firstUpdated(): void;
164
212
  datepicker: any;
213
+ _slotContentHandler: (() => void) | undefined;
214
+ _cachedButton: Element | null | undefined;
215
+ calendarMonth: any;
216
+ /**
217
+ * Configures the popover instance with the calendar month boundary.
218
+ * Called from firstUpdated and updated because the popover element is only
219
+ * rendered after hasPopoverContent becomes true (set by handleSlotContent).
220
+ * @private
221
+ * @returns {void}
222
+ */
223
+ private configurePopover;
165
224
  auroPopover: any;
166
225
  updated(properties: any): void;
226
+ /**
227
+ * Updates ARIA attributes on the host element so that
228
+ * ariaActiveDescendantElement can expose cell info to the SR.
229
+ * @private
230
+ * @returns {void}
231
+ */
232
+ private updateHostAria;
233
+ /**
234
+ * Programmatically focuses the cell's interactive button element.
235
+ * Uses focusVisible: true so the :focus-visible ring appears even when
236
+ * the bib was opened via mouse click (which sets mouse input modality).
237
+ * @returns {void}
238
+ */
239
+ focusButton(): void;
240
+ /**
241
+ * Imperatively marks this cell as active (tabindex="0") without
242
+ * triggering a Lit re-render.
243
+ * @returns {void}
244
+ */
245
+ setActive(): void;
246
+ /**
247
+ * Imperatively marks this cell as inactive (tabindex="-1") without
248
+ * triggering a Lit re-render.
249
+ * @returns {void}
250
+ */
251
+ clearActive(): void;
252
+ /**
253
+ * Updates range preview classes imperatively (no Lit re-render).
254
+ * Called by the calendar component when the hovered date changes
255
+ * during range selection (dateFrom set, dateTo not yet set).
256
+ * @param {Number} hoveredDate - Unix timestamp of the currently hovered/focused date.
257
+ * @param {Number} dateFrom - Unix timestamp of the selected departure date.
258
+ * @returns {void}
259
+ */
260
+ updateRangePreviewClasses(hoveredDate: number, dateFrom: number): void;
261
+ /**
262
+ * Clears all imperative range preview classes from the cell button.
263
+ * Called when a selection occurs so classMap becomes the sole source of truth.
264
+ * @returns {void}
265
+ */
266
+ clearRangePreviewClasses(): void;
267
+ renderCellButton(): import("lit-html").TemplateResult;
167
268
  render(): import("lit-html").TemplateResult;
168
269
  }
169
270
  import { LitElement } from "lit";
@@ -16,5 +16,42 @@ export class AuroCalendarMonth extends RangeDatepickerCalendar {
16
16
  * @returns {String} The name of the month.
17
17
  */
18
18
  private computeCurrentMonthName;
19
+ /**
20
+ * Returns the unique heading ID for this month, used by aria-labelledby.
21
+ * @private
22
+ * @returns {String} The heading ID.
23
+ */
24
+ private getHeadingId;
25
+ dayFullNames: any[] | undefined;
26
+ /**
27
+ * Renders a day-of-week header with abbr attribute for the full day name.
28
+ * @private
29
+ * @param {String} dayOfWeek - The short day name.
30
+ * @param {Number} index - The index in the dayNamesOfTheWeek array.
31
+ * @returns {Object} The header HTML.
32
+ */
33
+ private renderDayOfWeek;
34
+ /**
35
+ * Returns all focusable cell elements (enabled + blackout, not out-of-range) in this month.
36
+ * @returns {Array} Array of auro-formkit-calendar-cell elements.
37
+ */
38
+ getFocusableCells(): any[];
39
+ /**
40
+ * Overrides the base class handler to prevent setting `this.hoveredDate`
41
+ * as a reactive property. Instead, just dispatches the event upward so
42
+ * the calendar can handle range preview imperatively.
43
+ * @private
44
+ * @param {CustomEvent} event - The date-is-hovered event from a cell.
45
+ * @returns {void}
46
+ */
47
+ private handleDateHovered;
48
+ /**
49
+ * Handles arrow key navigation within the month grid.
50
+ * Dispatches a cross-month navigation event when the boundary is reached.
51
+ * @private
52
+ * @param {KeyboardEvent} event - The keyboard event.
53
+ * @returns {void}
54
+ */
55
+ private handleGridKeyDown;
19
56
  }
20
57
  import { RangeDatepickerCalendar } from './vendor/wc-range-datepicker/range-datepicker-calendar.js';
@@ -123,6 +123,12 @@ export class AuroCalendar extends RangeDatepicker {
123
123
  visible: boolean;
124
124
  largeFullscreenHeadline: boolean;
125
125
  isFullscreen: boolean;
126
+ /**
127
+ * The date of the currently active cell (Unix timestamp).
128
+ * Only one cell across the entire calendar has tabindex="0" at a time.
129
+ * @private
130
+ */
131
+ private activeCellDate;
126
132
  /**
127
133
  * @private
128
134
  */
@@ -148,6 +154,20 @@ export class AuroCalendar extends RangeDatepicker {
148
154
  */
149
155
  private buttonTag;
150
156
  dropdown: any;
157
+ /**
158
+ * Announces the current month and year via the live region after navigation.
159
+ * @private
160
+ * @returns {void}
161
+ */
162
+ private announceMonthChange;
163
+ /**
164
+ * Recomputes and sets the active cell for the newly visible month after
165
+ * month navigation. Without this, activeCellDate can point at a date in
166
+ * the old month, leaving no tabindex="0" cell in the grid.
167
+ * @private
168
+ * @returns {void}
169
+ */
170
+ private updateActiveCellForVisibleMonth;
151
171
  /**
152
172
  * Renders all of the auro-calendar-months HTML.
153
173
  * @private
@@ -167,6 +187,163 @@ export class AuroCalendar extends RangeDatepicker {
167
187
  * @returns {void}
168
188
  */
169
189
  scrollMonthIntoView(date: string): void;
190
+ /**
191
+ * Gets all rendered month components.
192
+ * @private
193
+ * @returns {Array} Array of auro-formkit-calendar-month elements.
194
+ */
195
+ private getMonthComponents;
196
+ /**
197
+ * Gets all focusable cells across all rendered months.
198
+ * @private
199
+ * @returns {Array} Array of auro-formkit-calendar-cell elements.
200
+ */
201
+ private getAllFocusableCells;
202
+ /**
203
+ * Sets the active cell across all months. Only one cell has tabindex="0" at a time.
204
+ * Uses imperative DOM manipulation — no Lit re-render triggered.
205
+ * Also updates ariaActiveDescendantElement on the grid wrapper so
206
+ * screen readers announce the active cell without moving DOM focus.
207
+ * @param {Number} date - Unix timestamp of the cell to activate.
208
+ * @returns {void}
209
+ */
210
+ setActiveCell(date: number): void;
211
+ /**
212
+ * Focuses the calendar grid wrapper and sets the active cell.
213
+ * DOM focus stays on the grid wrapper; ariaActiveDescendantElement
214
+ * tells the screen reader which cell is "active".
215
+ * @returns {void}
216
+ */
217
+ focusActiveCell(): void;
218
+ /**
219
+ * Computes the initial active date from data properties alone — no DOM required.
220
+ * Priority:
221
+ * 1. Selected date (dateFrom) if within range
222
+ * 2. Today's date if not disabled (in-range and not blackout)
223
+ * 3. First future non-disabled date (scans day-by-day from today up to 1 year)
224
+ * 4. First previous non-disabled date (scans day-by-day from today up to 1 year)
225
+ * 5. First enabled date in finite [min, max] range
226
+ * 5b. First enabled date scanning forward from finite min (unbounded max)
227
+ * 5c. First enabled date scanning backward from finite max (unbounded min)
228
+ * 6. First in-range date (even if blackout) so focus can land somewhere
229
+ * 7. undefined — no valid target
230
+ *
231
+ * @private
232
+ * @param {Object} [options] - Optional settings.
233
+ * @param {boolean} [options.skipDateFrom=false] - When true, skip the selected-date
234
+ * shortcut (step 1). Used after month navigation so the active cell lands in the
235
+ * newly visible month instead of jumping back to the selected date's month.
236
+ * @returns {Number|undefined} Unix timestamp (seconds) of the date to activate, or undefined.
237
+ */
238
+ private computeActiveDate;
239
+ /**
240
+ * Handles arrow key navigation on the calendar grid wrapper.
241
+ * Focus stays on the grid wrapper; only ariaActiveDescendantElement
242
+ * and the visual active-cell indicator change.
243
+ * @private
244
+ * @param {KeyboardEvent} event - The keyboard event.
245
+ * @returns {void}
246
+ */
247
+ private handleGridKeyDown;
248
+ /**
249
+ * Handles cross-month boundary navigation events from month components.
250
+ * @private
251
+ * @param {CustomEvent} event - The boundary event with direction and source date info.
252
+ * @returns {void}
253
+ */
254
+ private handleMonthBoundary;
255
+ /**
256
+ * Handles cell activation events from month components.
257
+ * @private
258
+ * @param {CustomEvent} event - The activation event with target date.
259
+ * @returns {void}
260
+ */
261
+ private handleCellActivate;
262
+ /**
263
+ * Handles focus events from calendar cells.
264
+ * Updates the live region with an SR announcement and triggers
265
+ * the imperative range preview if applicable.
266
+ * @private
267
+ * @param {CustomEvent} event - The calendar-cell-focused event.
268
+ * @returns {void}
269
+ */
270
+ private handleCellFocused;
271
+ /**
272
+ * Builds a full SR announcement string for a focused cell date.
273
+ * Includes the localized date, range position, popover content,
274
+ * and blackout status.
275
+ * @private
276
+ * @param {Number} date - Unix timestamp (seconds) of the focused cell.
277
+ * @returns {String} The announcement string.
278
+ */
279
+ private buildFocusAnnouncement;
280
+ /**
281
+ * Determines the range position label for a given date.
282
+ * @private
283
+ * @param {Number} date - Unix timestamp (seconds).
284
+ * @returns {String|null} The range position label, or null.
285
+ */
286
+ private getRangePositionLabel;
287
+ /**
288
+ * Checks whether a given date is a blackout date.
289
+ * @private
290
+ * @param {Number} dateTs - Unix timestamp (seconds).
291
+ * @returns {Boolean} True if the date is blacked out.
292
+ */
293
+ private isDateBlackout;
294
+ /**
295
+ * Updates the range preview classes imperatively across all cells.
296
+ * Only active when in range mode with dateFrom set and dateTo not yet set.
297
+ * @private
298
+ * @param {Number} hoveredDate - Unix timestamp of the hovered/focused date.
299
+ * @returns {void}
300
+ */
301
+ private updateRangePreview;
302
+ /**
303
+ * Clears range preview classes from all cells.
304
+ * @private
305
+ * @returns {void}
306
+ */
307
+ private clearRangePreview;
308
+ /**
309
+ * Overrides the base class handler to prevent setting `this.hoveredDate`
310
+ * as a reactive property. Instead, handles the range preview imperatively.
311
+ * @private
312
+ * @param {CustomEvent} event - The hovered-date-changed event from a month.
313
+ * @returns {void}
314
+ */
315
+ private hoveredDateChanged;
316
+ /**
317
+ * Scrolls the calendar to ensure the month containing the active cell is visible.
318
+ * @private
319
+ * @returns {void}
320
+ */
321
+ private scrollToActiveCell;
322
+ /**
323
+ * Announces a date selection or focus change via the live region.
324
+ * @private
325
+ * @param {String} dateStr - The localized date string to announce.
326
+ * @returns {void}
327
+ */
328
+ private announceSelection;
329
+ /**
330
+ * Debounced version of announceSelection for focus navigation.
331
+ * Only announces the last focused date after rapid navigation pauses,
332
+ * preventing the screen reader from queueing up stale announcements
333
+ * that can't keep pace with arrow-key traversal.
334
+ * @private
335
+ * @param {String} dateStr - The localized date string to announce.
336
+ * @returns {void}
337
+ */
338
+ private announceFocusDebounced;
339
+ _focusAnnounceTimer: any;
340
+ /**
341
+ * Formats a Unix timestamp (seconds) as a localized date string for SR announcements.
342
+ * @private
343
+ * @param {String|Number} timestamp - Unix timestamp in seconds.
344
+ * @returns {String} Localized date string.
345
+ */
346
+ private formatAnnouncementDate;
170
347
  injectSlot(slotName: any, nodes: any): void;
171
348
  render(): import("lit-html").TemplateResult;
172
349
  }
@@ -248,6 +248,69 @@ export class AuroDatePicker extends AuroElement {
248
248
  type: BooleanConstructor;
249
249
  reflect: boolean;
250
250
  };
251
+ /**
252
+ * Label announced for the range start date cell.
253
+ */
254
+ rangeLabelStart: {
255
+ type: StringConstructor;
256
+ reflect: boolean;
257
+ };
258
+ /**
259
+ * Label announced for the range end date cell.
260
+ */
261
+ rangeLabelEnd: {
262
+ type: StringConstructor;
263
+ reflect: boolean;
264
+ };
265
+ /**
266
+ * Label announced for cells before the range start.
267
+ */
268
+ rangeLabelBeforeRange: {
269
+ type: StringConstructor;
270
+ reflect: boolean;
271
+ };
272
+ /**
273
+ * Label announced for cells within the selected range.
274
+ */
275
+ rangeLabelInRange: {
276
+ type: StringConstructor;
277
+ reflect: boolean;
278
+ };
279
+ /**
280
+ * Label announced for cells after the range (or after start when no end is selected).
281
+ */
282
+ rangeLabelAfterRange: {
283
+ type: StringConstructor;
284
+ reflect: boolean;
285
+ };
286
+ /**
287
+ * Array of dates that cannot be selected. Dates should be in ISO format (YYYY-MM-DD).
288
+ */
289
+ blackoutDates: {
290
+ type: ArrayConstructor;
291
+ reflect: boolean;
292
+ };
293
+ /**
294
+ * Label announced for blackout (disabled but in-range) date cells.
295
+ */
296
+ blackoutLabel: {
297
+ type: StringConstructor;
298
+ reflect: boolean;
299
+ };
300
+ /**
301
+ * Accessible label for the previous month navigation button.
302
+ */
303
+ navLabelPrevMonth: {
304
+ type: StringConstructor;
305
+ reflect: boolean;
306
+ };
307
+ /**
308
+ * Accessible label for the next month navigation button.
309
+ */
310
+ navLabelNextMonth: {
311
+ type: StringConstructor;
312
+ reflect: boolean;
313
+ };
251
314
  /**
252
315
  * Dates that the user should have for reference as part of their decision making when selecting a date.
253
316
  * This should be a JSON string array of dates in the format of `MM/DD/YYYY`.
@@ -271,6 +334,7 @@ export class AuroDatePicker extends AuroElement {
271
334
  };
272
335
  /**
273
336
  * Custom help text message to display when validity = `customError`.
337
+ * Also used as the validation message when a blackout date is typed into the input.
274
338
  */
275
339
  setCustomValidityCustomError: {
276
340
  type: StringConstructor;
@@ -355,6 +419,15 @@ export class AuroDatePicker extends AuroElement {
355
419
  required: boolean;
356
420
  onDark: boolean;
357
421
  range: boolean;
422
+ rangeLabelStart: string;
423
+ rangeLabelEnd: string;
424
+ rangeLabelBeforeRange: string;
425
+ rangeLabelInRange: string;
426
+ rangeLabelAfterRange: string;
427
+ blackoutDates: any[];
428
+ blackoutLabel: string;
429
+ navLabelPrevMonth: string;
430
+ navLabelNextMonth: string;
358
431
  stacked: boolean;
359
432
  noValidate: boolean;
360
433
  validity: any;
@@ -532,6 +605,13 @@ export class AuroDatePicker extends AuroElement {
532
605
  * @returns {void}
533
606
  */
534
607
  private notifyMonthChanged;
608
+ /**
609
+ * Attempts to focus the active calendar cell using a rAF retry loop.
610
+ * Shared by both fullscreen and desktop open paths.
611
+ * @private
612
+ * @returns {void}
613
+ */
614
+ private focusActiveCellWhenReady;
535
615
  /**
536
616
  * Binds all behavior needed to the dropdown after rendering.
537
617
  * @private
@@ -606,6 +686,13 @@ export class AuroDatePicker extends AuroElement {
606
686
  * @returns {void}
607
687
  */
608
688
  clear(): void;
689
+ /**
690
+ * Checks whether a formatted date string matches a blackout date.
691
+ * @private
692
+ * @param {string} dateStr - A date string in the component's configured format.
693
+ * @returns {boolean} True if the date is in the blackoutDates list.
694
+ */
695
+ private isBlackoutDate;
609
696
  /**
610
697
  * Validates value.
611
698
  * @param {boolean} [force=false] - Whether to force validation.
@@ -624,6 +711,7 @@ export class AuroDatePicker extends AuroElement {
624
711
  formattedFocusDate: boolean | undefined;
625
712
  formattedEndDate: boolean | undefined;
626
713
  formattedValue: boolean | undefined;
714
+ wasCellClick: boolean | undefined;
627
715
  formattedValueEnd: boolean | undefined;
628
716
  formattedMinDate: boolean | undefined;
629
717
  formattedMaxDate: boolean | undefined;
@@ -1,3 +1,5 @@
1
- export namespace datepickerKeyboardStrategy {
2
- function Escape(component: any, evt: any): void;
3
- }
1
+ export const datepickerKeyboardStrategy: {
2
+ Escape(component: any, evt: any, ctx: any): void;
3
+ Enter(component: any, evt: any, ctx: any): void;
4
+ ' '(component: any, evt: any, ctx: any): void;
5
+ };
@@ -28,12 +28,23 @@
28
28
  </ol>
29
29
  </section>
30
30
  <section>
31
+ <auro-header level="2" id="desktopModal">Desktop Modal</auro-header>
32
+ <p>When the <code>desktopModal</code> attribute is set, the dropdown behaves as a modal dialog on desktop viewports:</p>
33
+ <ul>
34
+ <li>All sibling elements on the page are marked <code>inert</code>, preventing interaction with content outside the dropdown.</li>
35
+ <li>Focus is trapped within the bib content using a Tab-key handler.</li>
36
+ <li>The <code>inert</code> state and focus trap are automatically cleaned up when the bib is closed or the component is disconnected.</li>
37
+ </ul>
38
+ <p>In fullscreen mode, the native <code>&lt;dialog&gt;</code> <code>showModal()</code> API provides equivalent behavior, so <code>desktopModal</code> only applies to desktop-sized viewports.</p>
39
+ </section>
40
+ <section>
31
41
  <auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
32
42
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/tabindex.md) -->
33
43
  <!-- The below content is automatically added from ./../docs/partials/tabindex.md -->
34
44
  <p>The trigger is a focusable element and participates in the standard tab order, responding to <code>Tab</code> and <code>Shift+Tab</code> key events per <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex">native browser behavior</auro-hyperlink>, i.e., these keys step through the browser tabindex sequence.</p>
35
45
  <p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence. VoiceOver's virtual cursor <em>(swipe navigation)</em> can still encounter the component, but standard keyboard <code>Tab</code> navigation skips it.</p>
36
46
  <p>When the bib is collapsed, the bib content is excluded from the tab sequence. When <strong>expanded</strong>, focusable elements within the bib content are included in the natural tab order. In fullscreen mode, focus is trapped within the bib, and the tab sequence cycles through the bib content focusable elements until the bib is closed or the viewport no longer meets the fullscreen condition and is rendered as a popover.</p>
47
+ <p>When the <code>desktopModal</code> attribute is set, focus is also trapped within the bib on desktop viewports. All sibling elements on the page are marked <code>inert</code>, preventing interaction with content outside the dropdown until it is closed.</p>
37
48
  <!-- AURO-GENERATED-CONTENT:END -->
38
49
  </section>
39
50
  <section>
@@ -13,6 +13,7 @@ The `auro-dropdown` element provides a way to place content in a bib that can be
13
13
  | `appearance` | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
14
14
  | `autoPlacement` | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
15
15
  | `chevron` | `chevron` | `boolean` | | If declared, the dropdown displays a chevron on the right. |
16
+ | `desktopModal` | `desktopModal` | `boolean` | | If declared, the dropdown will behave as a modal dialog when in a desktop viewport size. |
16
17
  | `disableEventShow` | `disableEventShow` | `boolean` | | If declared, the dropdown will only show by calling the API .show() public method. |
17
18
  | `disableKeyboardHandling` | `disableKeyboardHandling` | `boolean` | | If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior. |
18
19
  | `disabled` | `disabled` | `boolean` | | If declared, the dropdown is not interactive. |
@@ -13,6 +13,7 @@
13
13
  <auro-anchorlink fluid href="#matchWidth" class="level2 body-xs">Match Width</auro-anchorlink>
14
14
  <auro-anchorlink fluid href="#customBehavior">Behavior</auro-anchorlink>
15
15
  <auro-anchorlink fluid href="#chevron" class="level2 body-xs">Chevron</auro-anchorlink>
16
+ <auro-anchorlink fluid href="#desktopModal" class="level2 body-xs">Desktop Modal</auro-anchorlink>
16
17
  <auro-anchorlink fluid href="#disabled" class="level2 body-xs">Disabled</auro-anchorlink>
17
18
  <auro-anchorlink fluid href="#error" class="level2 body-xs">Error</auro-anchorlink>
18
19
  <auro-anchorlink fluid href="#noToggle" class="level2 body-xs">No Toggle</auro-anchorlink>
@@ -569,6 +570,8 @@
569
570
  &lt;/auro-dropdown&gt;</code></pre>
570
571
  <!-- AURO-GENERATED-CONTENT:END -->
571
572
  </auro-accordion>
573
+ <auro-header level="3" id="desktopModal">Desktop Modal</auro-header>
574
+ <p>Use the <code>desktopModal</code> attribute to make the dropdown behave as a modal dialog on desktop viewports. When set, all sibling elements on the page are marked <code>inert</code> and focus is trapped within the bib content. In fullscreen mode, the native <code>&lt;dialog&gt;</code> <code>showModal()</code> API provides equivalent behavior automatically.</p>
572
575
  <auro-header level="3" id="disabled">Disabled</auro-header>
573
576
  <p>Use the <code>disabled</code> attribute to disable interaction with the dropdown.</p>
574
577
  <div class="exampleWrapper">