@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.3 → 0.0.0-pr1503.5
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/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/accessibility.md +1 -1
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +23 -8
- package/components/checkbox/demo/getting-started.min.js +23 -8
- package/components/checkbox/demo/index.min.js +23 -8
- package/components/checkbox/dist/index.js +23 -8
- package/components/checkbox/dist/registered.js +23 -8
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +166 -142
- package/components/combobox/demo/customize.min.js +2515 -2316
- package/components/combobox/demo/getting-started.min.js +2515 -2312
- package/components/combobox/demo/index.md +2 -1
- package/components/combobox/demo/index.min.js +2515 -2312
- package/components/combobox/demo/keyboard-behavior.md +3 -146
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/demo/why-combobox.md +2 -2
- package/components/combobox/dist/auro-combobox.d.ts +49 -15
- package/components/combobox/dist/index.js +1462 -753
- package/components/combobox/dist/registered.js +1462 -753
- package/components/counter/demo/customize.min.js +188 -244
- package/components/counter/demo/index.min.js +188 -244
- package/components/counter/dist/auro-counter.d.ts +0 -8
- package/components/counter/dist/index.js +188 -244
- package/components/counter/dist/registered.js +188 -244
- package/components/datepicker/demo/accessibility.md +20 -10
- package/components/datepicker/demo/api.md +65 -62
- package/components/datepicker/demo/customize.md +180 -40
- package/components/datepicker/demo/customize.min.js +1690 -777
- package/components/datepicker/demo/getting-started.md +118 -2
- package/components/datepicker/demo/index.min.js +1690 -759
- package/components/datepicker/demo/keyboard-behavior.md +3 -3
- package/components/datepicker/demo/voiceover.md +4 -4
- package/components/datepicker/demo/why-datepicker.md +2 -2
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +1690 -759
- package/components/datepicker/dist/registered.js +1690 -759
- package/components/dropdown/demo/customize.html +3 -0
- package/components/dropdown/demo/customize.min.js +142 -208
- package/components/dropdown/demo/getting-started.min.js +131 -207
- package/components/dropdown/demo/index.min.js +131 -207
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
- package/components/dropdown/dist/index.js +131 -207
- package/components/dropdown/dist/registered.js +131 -207
- package/components/form/demo/api.md +3 -3
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.md +535 -135
- package/components/form/demo/customize.min.js +6307 -4378
- package/components/form/demo/getting-started.md +344 -96
- package/components/form/demo/getting-started.min.js +6255 -4378
- package/components/form/demo/index.min.js +6206 -4378
- package/components/form/demo/registerDemoDeps.min.js +5827 -4333
- package/components/form/dist/auro-form.d.ts +128 -10
- package/components/form/dist/index.js +377 -43
- package/components/form/dist/registered.js +377 -43
- package/components/input/demo/accessibility.md +1 -1
- package/components/input/demo/api.md +58 -57
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +62 -61
- package/components/input/demo/customize.min.js +396 -275
- package/components/input/demo/getting-started.min.js +396 -275
- package/components/input/demo/index.min.js +396 -275
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +60 -81
- package/components/input/dist/index.js +409 -276
- package/components/input/dist/registered.js +396 -275
- package/components/input/dist/utilities.d.ts +10 -1
- package/components/menu/demo/accessibility.md +9 -4
- package/components/menu/demo/api.md +48 -45
- package/components/menu/demo/css-only.md +26 -19
- package/components/menu/demo/customize.md +307 -75
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +144 -7
- package/components/menu/demo/index.min.js +961 -1341
- package/components/menu/demo/keyboard-behavior.md +83 -4
- package/components/menu/demo/voiceover.md +21 -14
- package/components/menu/demo/why-menu.md +8 -9
- package/components/menu/dist/auro-menu-utils.d.ts +19 -0
- package/components/menu/dist/auro-menu.d.ts +97 -116
- package/components/menu/dist/auro-menuoption.d.ts +39 -133
- package/components/menu/dist/index.js +823 -1309
- package/components/menu/dist/registered.js +835 -1309
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/customize.min.js +23 -8
- package/components/radio/demo/getting-started.min.js +23 -8
- package/components/radio/demo/index.min.js +23 -8
- package/components/radio/dist/index.js +23 -8
- package/components/radio/dist/registered.js +23 -8
- package/components/select/demo/accessibility.md +6 -1
- package/components/select/demo/api.md +3 -2
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +210 -5
- package/components/select/demo/customize.min.js +1613 -1854
- package/components/select/demo/design.md +10 -10
- package/components/select/demo/getting-started.md +1 -1
- package/components/select/demo/getting-started.min.js +1617 -1903
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +1613 -1854
- package/components/select/demo/keyboard-behavior.md +81 -54
- package/components/select/demo/voiceover.md +28 -15
- package/components/select/dist/auro-select.d.ts +70 -12
- package/components/select/dist/index.js +580 -315
- package/components/select/dist/registered.js +580 -315
- package/components/select/dist/selectUtils.d.ts +24 -0
- package/custom-elements.json +8071 -7919
- package/package.json +7 -3
- 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 -19
- 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 -9
- 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/menu/dist/auro-menu.context.d.ts +0 -238
- 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/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
- /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
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
<td>-</td>
|
|
34
34
|
<td>Collapsed</td>
|
|
35
35
|
<td>Trigger input, <strong>NOT</strong> the input clear button</td>
|
|
36
|
-
<td>Opens the calendar bib. Focus moves to the calendar grid
|
|
36
|
+
<td>Opens the calendar bib. Focus moves to the calendar grid; the active date cell is marked imperatively and announced via the <code>aria-live</code> region. The Enter key behavior overrides the inherited <code>auro-dropdown</code> key behavior outlined below.</td>
|
|
37
37
|
</tr>
|
|
38
38
|
<tr>
|
|
39
39
|
<td>Space</td>
|
|
40
40
|
<td>-</td>
|
|
41
41
|
<td>Collapsed</td>
|
|
42
42
|
<td>Trigger input, <strong>NOT</strong> the input clear button</td>
|
|
43
|
-
<td>Opens the calendar bib. Focus moves to the calendar grid
|
|
43
|
+
<td>Opens the calendar bib. Focus moves to the calendar grid; the active date cell is marked imperatively and announced via the <code>aria-live</code> region. The Space key behavior overrides the inherited <code>auro-dropdown</code> key behavior outlined below.</td>
|
|
44
44
|
</tr>
|
|
45
45
|
</tbody>
|
|
46
46
|
</table>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
</tbody>
|
|
90
90
|
</table>
|
|
91
91
|
<auro-header level="3" id="keyEvents-calendarGrid">Calendar grid</auro-header>
|
|
92
|
-
<p>When the calendar bib is open, DOM focus
|
|
92
|
+
<p>When the calendar bib is open, DOM focus stays on the <code>#calendarGrid</code> wrapper. The active cell is tracked imperatively (an <code>active</code> property on the cell host and an <code>.activeCell</code> class on its button) — no <code>aria-activedescendant</code> or proxy element is used. Arrow keys move the active cell indicator without wrapping; when a boundary is reached the calendar navigates to the adjacent month. A debounced <code>aria-live</code> region announces the full date context after navigation pauses.</p>
|
|
93
93
|
<table>
|
|
94
94
|
<thead>
|
|
95
95
|
<tr>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<auro-header level="3" id="voiceOverClearButton">Clear Button</auro-header>
|
|
38
38
|
<p>When the clear button is focused, VoiceOver announces the <code>aria-label</code> from the <code>ariaLabel.input.clear</code> slot (or the default i18n text), followed by <em>"button"</em>.</p>
|
|
39
39
|
<auro-header level="3" id="voiceOverCalendarNavigation">Calendar Navigation</auro-header>
|
|
40
|
-
<p>When the calendar bib is open, DOM focus stays on the calendar grid wrapper
|
|
40
|
+
<p>When the calendar bib is open, DOM focus stays on the calendar grid wrapper. The active cell is tracked imperatively (an <code>active</code> property on the cell host and an <code>.activeCell</code> class on its button) and its full localized label is announced through a debounced <code>aria-live</code> region (150 ms), so rapid arrow-key navigation produces one announcement per pause rather than one per keystroke.</p>
|
|
41
41
|
<p>Users can navigate calendar cells using VoiceOver gestures (swipe left/right) or arrow keys. Each cell announces:</p>
|
|
42
42
|
<ul>
|
|
43
43
|
<li>The full localized date (e.g. <em>"Thursday, May 14, 2026"</em>)</li>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<li><em>"current date"</em> for today's date (via <code>aria-current="date"</code>)</li>
|
|
48
48
|
<li>Selection state: <em>"selected"</em> or not (via <code>aria-selected</code>)</li>
|
|
49
49
|
</ul>
|
|
50
|
-
<p>Out-of-range cells (outside min/max bounds)
|
|
50
|
+
<p>Out-of-range cells (outside min/max bounds) use the native <code>disabled</code> attribute on their button and drop <code>role</code>/<code>aria-label</code> on the host, so arrow-key navigation skips them and VoiceOver does not browse into them.</p>
|
|
51
51
|
<auro-header level="3" id="voiceOverDateSelection">Date Selection</auro-header>
|
|
52
52
|
<p>When a date is selected, an <code>aria-live="assertive"</code> region announces the selected date (e.g. <em>"Thursday, May 14, 2026"</em>). For range datepickers, both the start and end selections are announced.</p>
|
|
53
53
|
<auro-header level="3" id="voiceOverDialogName">Dialog Name</auro-header>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<ol>
|
|
71
71
|
<li><strong>Focus</strong> — Tab to the datepicker input.</li>
|
|
72
72
|
<li><strong>Type a date</strong> — Enter a date value directly, or press Enter/Space to open the calendar.</li>
|
|
73
|
-
<li><strong>Calendar opens</strong> — Focus moves to the calendar grid wrapper,
|
|
73
|
+
<li><strong>Calendar opens</strong> — Focus moves to the calendar grid wrapper. The initial active cell is marked imperatively, and the <code>aria-live</code> region announces its full localized label so VoiceOver reads the active date. Navigate dates with VoiceOver gestures (swipe) or arrow keys.</li>
|
|
74
74
|
<li><strong>Select a date</strong> — Activate a calendar cell (double-tap with VoiceOver, or Enter/Space with keyboard) to select the date. The selected date is announced via a live region and populates the input. The calendar remains open; close it by pressing Escape or activating the Done button.</li>
|
|
75
75
|
</ol>
|
|
76
76
|
<auro-header level="2" id="voiceOverSmallVPAnnouncements">Small Viewport Workflow</auro-header>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
<ol>
|
|
79
79
|
<li><strong>Focus</strong> — Tab or swipe to the datepicker input.</li>
|
|
80
80
|
<li>
|
|
81
|
-
<strong>Open:</strong> The fullscreen modal dialog opens. VoiceOver announces the dialog name (e.g. <em>"Departure date, dialog"</em>). Focus is moved to the calendar grid wrapper,
|
|
81
|
+
<strong>Open:</strong> The fullscreen modal dialog opens. VoiceOver announces the dialog name (e.g. <em>"Departure date, dialog"</em>). Focus is moved to the calendar grid wrapper, and the <code>aria-live</code> region announces the initial active date.
|
|
82
82
|
</li>
|
|
83
83
|
<li><strong>Navigate dates</strong> — Swipe through calendar cells or use arrow keys.</li>
|
|
84
84
|
<li>
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<p>Native date inputs vary widely across browsers and platforms, with inconsistent screen reader announcements, keyboard behavior, and focus management.</p>
|
|
5
5
|
<p><code>auro-datepicker</code> provides:</p>
|
|
6
6
|
<ul>
|
|
7
|
-
<li><strong>Full keyboard navigation</strong> — Arrow keys move between days, months, and years. Enter and Space select a date. Escape closes the calendar.
|
|
7
|
+
<li><strong>Full keyboard navigation</strong> — Arrow keys move between days, months, and years. Enter and Space select a date. Escape closes the calendar. DOM focus stays on the calendar grid wrapper while an imperatively-tracked active cell is announced through a debounced <code>aria-live</code> region, so screen readers stay in sync without duplicate announcements during rapid navigation.</li>
|
|
8
8
|
<li><strong>Rich ARIA semantics</strong> — Every cell is labeled with its full date, day-of-week, and contextual state (e.g. "selected", "today", "unavailable", "range start", "in range"). Screen reader users hear meaningful announcements, not just numbers.</li>
|
|
9
9
|
<li><strong>Live region announcements</strong> — Month changes are announced via <code>aria-live</code> so assistive technology users know the visible month has changed.</li>
|
|
10
10
|
<li><strong>Reduced motion support</strong> — Scrolling and transitions respect <code>prefers-reduced-motion</code>.</li>
|
|
11
|
-
<li><strong>Focus management</strong> — Opening the calendar moves focus to the calendar grid wrapper
|
|
11
|
+
<li><strong>Focus management</strong> — Opening the calendar moves focus to the calendar grid wrapper; the initial active date cell is marked imperatively and announced via the <code>aria-live</code> region. Closing returns focus to the trigger input. The fullscreen dialog uses <code>showModal()</code> for native inert-background behavior, while the desktop modal traps focus within the bib.</li>
|
|
12
12
|
</ul>
|
|
13
13
|
<p>By contrast, native <code><input type="date"></code> delegates all of this to the browser, and the result differs significantly between Chrome, Safari, and Firefox — often with no keyboard navigation of the calendar grid at all on some platforms.</p>
|
|
14
14
|
<auro-header level="2" id="dateRangeSelection">Date range selection</auro-header>
|
|
@@ -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,18 @@ export class AuroCalendarCell extends LitElement {
|
|
|
211
219
|
*/
|
|
212
220
|
private handleSlotContent;
|
|
213
221
|
firstUpdated(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Wires the cell to its ancestor calendar-month and calendar (and, via
|
|
224
|
+
* the calendar, to the datepicker). Extracted from firstUpdated() so the
|
|
225
|
+
* retry loop can re-attempt without recursively invoking a Lit lifecycle
|
|
226
|
+
* method (which is outside the framework's contract).
|
|
227
|
+
* @private
|
|
228
|
+
* @returns {void}
|
|
229
|
+
*/
|
|
230
|
+
private _initFromAncestors;
|
|
231
|
+
_firstUpdatedRetries: any;
|
|
232
|
+
_firstUpdatedRetryTimer: any;
|
|
233
|
+
calendar: any;
|
|
214
234
|
datepicker: any;
|
|
215
235
|
_slotContentHandler: (() => void) | undefined;
|
|
216
236
|
_cachedButton: Element | null | undefined;
|
|
@@ -226,8 +246,8 @@ export class AuroCalendarCell extends LitElement {
|
|
|
226
246
|
auroPopover: any;
|
|
227
247
|
updated(properties: any): void;
|
|
228
248
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
249
|
+
* Sets host-level ARIA so each cell exposes its date, selection state,
|
|
250
|
+
* and blackout status to assistive tech browsing the month grid.
|
|
231
251
|
* @private
|
|
232
252
|
* @returns {void}
|
|
233
253
|
*/
|
|
@@ -241,7 +261,15 @@ export class AuroCalendarCell extends LitElement {
|
|
|
241
261
|
focusButton(): void;
|
|
242
262
|
/**
|
|
243
263
|
* Imperatively marks this cell as active without triggering a Lit re-render.
|
|
244
|
-
*
|
|
264
|
+
* Buttons stay tabindex="-1" because DOM focus stays on the grid wrapper —
|
|
265
|
+
* arrow keys move the active cell imperatively and the live region carries
|
|
266
|
+
* the SR announcement.
|
|
267
|
+
*
|
|
268
|
+
* Refuses to activate out-of-range cells: those are aria-hidden, have no
|
|
269
|
+
* click/focus handlers, and are filtered out of `getFocusableCells`. The
|
|
270
|
+
* active class showing on a disabled cell would be visually misleading,
|
|
271
|
+
* so this guard is the single source of truth across every code path
|
|
272
|
+
* that might call setActive (keyboard nav, focus restore, cell click).
|
|
245
273
|
* @returns {void}
|
|
246
274
|
*/
|
|
247
275
|
setActive(): void;
|
|
@@ -265,6 +293,23 @@ export class AuroCalendarCell extends LitElement {
|
|
|
265
293
|
* @returns {void}
|
|
266
294
|
*/
|
|
267
295
|
clearRangePreviewClasses(): void;
|
|
296
|
+
/**
|
|
297
|
+
* Re-applies the committed-range classes (inRange / rangeDepartDate /
|
|
298
|
+
* rangeReturnDate) imperatively from the cell's current `day`,
|
|
299
|
+
* `dateFrom`, and `dateTo`. Used after month navigation flushes:
|
|
300
|
+
* classMap in `renderCellButton` tracks its own previous state, so a
|
|
301
|
+
* preceding imperative `classList.remove` (from
|
|
302
|
+
* `clearRangePreviewClasses`) leaves classMap thinking the class is
|
|
303
|
+
* still applied. On re-render with the same class-value, classMap emits
|
|
304
|
+
* no delta and the class stays missing in the DOM. Re-toggling
|
|
305
|
+
* imperatively resyncs the DOM with the committed range.
|
|
306
|
+
*
|
|
307
|
+
* Delegates to the same `isInRange` / `isDepartDate` / `isReturnDate`
|
|
308
|
+
* helpers `renderCellButton` uses, so the two code paths cannot drift
|
|
309
|
+
* (including whatever timestamp normalization those helpers apply).
|
|
310
|
+
* @returns {void}
|
|
311
|
+
*/
|
|
312
|
+
applyCommittedRangeClasses(): void;
|
|
268
313
|
renderCellButton(): import("lit-html").TemplateResult;
|
|
269
314
|
render(): import("lit-html").TemplateResult;
|
|
270
315
|
}
|
|
@@ -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
|
*/
|
|
@@ -144,6 +151,14 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
144
151
|
* @private
|
|
145
152
|
*/
|
|
146
153
|
private activeCellDate;
|
|
154
|
+
/**
|
|
155
|
+
* Cached reference to the active cell host. Set by setActiveCell and
|
|
156
|
+
* refreshed by scrollToActiveCell when its cache check misses (stale
|
|
157
|
+
* or missing). Lets scrollToActiveCell skip a full cell scan on each
|
|
158
|
+
* arrow key.
|
|
159
|
+
* @private
|
|
160
|
+
*/
|
|
161
|
+
private _activeCell;
|
|
147
162
|
/**
|
|
148
163
|
* Whether the #calendarGrid wrapper currently has focus.
|
|
149
164
|
* Used to determine whether the visualFocus ring should be shown.
|
|
@@ -158,6 +173,15 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
158
173
|
* @private
|
|
159
174
|
*/
|
|
160
175
|
private calendarRangeMonths;
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated Use `auro-datepicker.blackoutDates` (an array of
|
|
178
|
+
* `YYYY-MM-DD` ISO strings) instead. This legacy array of Unix
|
|
179
|
+
* timestamps is still honored for backward compatibility but emits a
|
|
180
|
+
* one-time `console.debug` the first time a non-empty value is observed.
|
|
181
|
+
* Support will be removed in a future major release.
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
private _disabledDays;
|
|
161
185
|
/**
|
|
162
186
|
* @private
|
|
163
187
|
*/
|
|
@@ -219,6 +243,32 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
219
243
|
* @returns {void}
|
|
220
244
|
*/
|
|
221
245
|
private updateActiveCellForVisibleMonth;
|
|
246
|
+
/**
|
|
247
|
+
* Schedules `callback` two animation frames out, giving the child
|
|
248
|
+
* `auro-formkit-calendar-month` and `auro-formkit-calendar-cell` elements
|
|
249
|
+
* a full render-and-paint cycle to settle before the callback reads or
|
|
250
|
+
* mutates DOM.
|
|
251
|
+
*
|
|
252
|
+
* Why two frames, not one:
|
|
253
|
+
* 1. Lit batches property updates and renders in a microtask, so frame N
|
|
254
|
+
* schedules the render but the new DOM may not be painted yet.
|
|
255
|
+
* 2. Cells re-cache `_cachedButton` inside their own `updateComplete.then`,
|
|
256
|
+
* which also lands a tick later. Reading buttons from frame N+1
|
|
257
|
+
* (after both renders + cache refresh have flushed) reliably hits the
|
|
258
|
+
* new month's cells.
|
|
259
|
+
*
|
|
260
|
+
* Used by every code path that calls `handleNextMonth`/`handlePrevMonth`
|
|
261
|
+
* and then needs to inspect the freshly-rendered cells (cross-month
|
|
262
|
+
* keyboard nav, boundary events, `updateActiveCellForVisibleMonth`).
|
|
263
|
+
* Do NOT collapse to a single rAF — it intermittently lands before
|
|
264
|
+
* `_cachedButton` is refreshed, which silently breaks focus restoration
|
|
265
|
+
* and `setActiveCell` lookups.
|
|
266
|
+
* @private
|
|
267
|
+
* @param {() => void} callback - Runs once after the month re-render and
|
|
268
|
+
* the cells' button caches have refreshed.
|
|
269
|
+
* @returns {void}
|
|
270
|
+
*/
|
|
271
|
+
private _afterMonthRender;
|
|
222
272
|
/**
|
|
223
273
|
* Renders all of the auro-calendar-months HTML.
|
|
224
274
|
* @private
|
|
@@ -244,6 +294,20 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
244
294
|
* @returns {Array} Array of auro-formkit-calendar-month elements.
|
|
245
295
|
*/
|
|
246
296
|
private getMonthComponents;
|
|
297
|
+
/**
|
|
298
|
+
* Picks the focusable cell whose date is closest to targetTs. Used as a
|
|
299
|
+
* fallback after a month-boundary nav when the exact target date isn't
|
|
300
|
+
* focusable — typically because the month re-render lagged or the date
|
|
301
|
+
* was filtered out by isOutOfRange. When two cells are equidistant, the
|
|
302
|
+
* navigation direction breaks the tie so the user moves the way they
|
|
303
|
+
* pressed (forward → later cell, backward → earlier cell).
|
|
304
|
+
* @private
|
|
305
|
+
* @param {Array} cells - Focusable cells from getAllFocusableCells.
|
|
306
|
+
* @param {Number} targetTs - Desired Unix timestamp (seconds).
|
|
307
|
+
* @param {'next'|'prev'} direction - Navigation direction.
|
|
308
|
+
* @returns {Object|null} The nearest cell, or null when cells is empty.
|
|
309
|
+
*/
|
|
310
|
+
private pickNearestCell;
|
|
247
311
|
/**
|
|
248
312
|
* Gets all focusable cells across all rendered months.
|
|
249
313
|
* @private
|
|
@@ -252,9 +316,9 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
252
316
|
private getAllFocusableCells;
|
|
253
317
|
/**
|
|
254
318
|
* 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
|
-
*
|
|
257
|
-
*
|
|
319
|
+
* Uses imperative DOM manipulation — no Lit re-render triggered. DOM focus
|
|
320
|
+
* stays on the grid wrapper; the live region (see getOrCreateLiveRegion)
|
|
321
|
+
* is what announces the active cell to assistive tech.
|
|
258
322
|
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
259
323
|
* @returns {void}
|
|
260
324
|
*/
|
|
@@ -269,6 +333,7 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
269
333
|
/**
|
|
270
334
|
* Shows the activeCell ring when the grid gains focus.
|
|
271
335
|
* @private
|
|
336
|
+
* @param {FocusEvent} [event] - The focusin event.
|
|
272
337
|
* @returns {void}
|
|
273
338
|
*/
|
|
274
339
|
private handleGridFocusIn;
|
|
@@ -278,6 +343,39 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
278
343
|
* @returns {void}
|
|
279
344
|
*/
|
|
280
345
|
private handleGridFocusOut;
|
|
346
|
+
/**
|
|
347
|
+
* Returns a memoized Set of blackout timestamps (seconds) drawn from both
|
|
348
|
+
* the legacy `disabledDays` array and the datepicker's ISO `blackoutDates`.
|
|
349
|
+
*
|
|
350
|
+
* The cache invalidates on **reference identity** — only when the
|
|
351
|
+
* consumer reassigns the array (`el.blackoutDates = [...]`), matching
|
|
352
|
+
* Lit's own reactivity semantics for array properties. In-place mutations
|
|
353
|
+
* on the existing array (`push`, `splice`, index assignment) will NOT
|
|
354
|
+
* invalidate the cache and the new entries will be silently ignored.
|
|
355
|
+
* Consumers must reassign to update — see the JSDoc on
|
|
356
|
+
* `auro-datepicker.blackoutDates` for the recommended pattern.
|
|
357
|
+
*
|
|
358
|
+
* A shallow-equality tier was considered but rejected: it would run
|
|
359
|
+
* O(N) work on every cell render (this method is called per-cell via
|
|
360
|
+
* `isBlackout()`) and still wouldn't catch same-length value swaps,
|
|
361
|
+
* offering a false sense of safety.
|
|
362
|
+
* @private
|
|
363
|
+
* @returns {Set<Number>}
|
|
364
|
+
*/
|
|
365
|
+
private _getBlackoutSet;
|
|
366
|
+
_blackoutSet: Set<number> | undefined;
|
|
367
|
+
_cachedBlackoutDisabledDays: any;
|
|
368
|
+
_cachedBlackoutDates: any;
|
|
369
|
+
/**
|
|
370
|
+
* One-time `console.debug` directing consumers from the legacy
|
|
371
|
+
* `disabledDays` Unix-timestamp API to the ISO `blackoutDates` API. Fires
|
|
372
|
+
* the first time `_getBlackoutSet` rebuilds from a non-empty
|
|
373
|
+
* `disabledDays`; subsequent calls (on this or any other AuroCalendar
|
|
374
|
+
* instance on the page) are silent.
|
|
375
|
+
* @private
|
|
376
|
+
* @returns {void}
|
|
377
|
+
*/
|
|
378
|
+
private _warnDisabledDaysDeprecated;
|
|
281
379
|
/**
|
|
282
380
|
* Computes the initial active date from data properties alone — no DOM required.
|
|
283
381
|
* Priority:
|
|
@@ -310,8 +408,8 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
310
408
|
private isDateInRange;
|
|
311
409
|
/**
|
|
312
410
|
* Handles arrow key navigation on the calendar grid wrapper.
|
|
313
|
-
* Focus stays on the grid wrapper; only
|
|
314
|
-
*
|
|
411
|
+
* Focus stays on the grid wrapper; only the visual active-cell indicator
|
|
412
|
+
* changes. The live region announces the new active cell.
|
|
315
413
|
* @private
|
|
316
414
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
317
415
|
* @returns {void}
|
|
@@ -357,7 +455,9 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
357
455
|
*/
|
|
358
456
|
private getRangePositionLabel;
|
|
359
457
|
/**
|
|
360
|
-
* Checks whether a given date is a blackout date.
|
|
458
|
+
* Checks whether a given date is a blackout date. Delegates to the
|
|
459
|
+
* memoized `_getBlackoutSet` so the YYYY-MM-DD parsing and the
|
|
460
|
+
* legacy/ISO merge rules live in exactly one place (see `blackoutUtils.js`).
|
|
361
461
|
* @private
|
|
362
462
|
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
363
463
|
* @returns {Boolean} True if the date is blacked out.
|
|
@@ -376,12 +476,52 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
376
476
|
* @private
|
|
377
477
|
* @param {Object} [options] - Optional settings.
|
|
378
478
|
* @param {boolean} [options.force=false] - When true, clears classes even
|
|
379
|
-
* when both dateFrom and dateTo are set. Used by month nav handlers
|
|
380
|
-
*
|
|
381
|
-
*
|
|
479
|
+
* when both dateFrom and dateTo are set. Used by month nav handlers to
|
|
480
|
+
* strip the imperative-only `lastHoveredDate` before the re-render.
|
|
481
|
+
* The other two classes (`inRange`, `rangeDepartDate`) are classMap-
|
|
482
|
+
* managed and get stripped as a side effect here; because classMap
|
|
483
|
+
* remembers what it last emitted and does not diff against the actual
|
|
484
|
+
* DOM, the following month re-render will NOT re-add them on its own.
|
|
485
|
+
* Nav handlers must schedule `refreshCommittedRangeClasses` (via
|
|
486
|
+
* `scheduleCommittedRangeClassRefresh`) to resync them.
|
|
382
487
|
* @returns {void}
|
|
383
488
|
*/
|
|
384
489
|
private clearRangePreview;
|
|
490
|
+
/**
|
|
491
|
+
* Re-applies the committed-range classes across every focusable cell
|
|
492
|
+
* after a month navigation. classMap in the cell tracks its own
|
|
493
|
+
* previous state: once `clearRangePreview({ force: true })` strips
|
|
494
|
+
* `inRange`/`rangeDepartDate` imperatively before the re-render,
|
|
495
|
+
* classMap's next diff sees the same class-value it emitted before and
|
|
496
|
+
* produces no delta, leaving the DOM without the classes even though a
|
|
497
|
+
* full range is committed. Re-applying imperatively resyncs the two
|
|
498
|
+
* months' cells with `dateFrom`/`dateTo`.
|
|
499
|
+
*
|
|
500
|
+
* Iterates `getAllFocusableCells()` — out-of-range cells (blocked by
|
|
501
|
+
* `min`/`max`) can never carry range classes anyway, so skipping them
|
|
502
|
+
* is correct and cheaper than a whole-grid walk.
|
|
503
|
+
*
|
|
504
|
+
* The cell's `applyCommittedRangeClasses` reuses the same
|
|
505
|
+
* `isInRange`/`isDepartDate`/`isReturnDate` helpers `renderCellButton`
|
|
506
|
+
* uses, so we don't parse dateFrom/dateTo here — the helpers already
|
|
507
|
+
* normalize their inputs (midnight-truncation, string→int) internally.
|
|
508
|
+
* @private
|
|
509
|
+
* @returns {void}
|
|
510
|
+
*/
|
|
511
|
+
private refreshCommittedRangeClasses;
|
|
512
|
+
/**
|
|
513
|
+
* Schedules `refreshCommittedRangeClasses` to run after the month
|
|
514
|
+
* re-render has flushed and the cells' button caches have refreshed.
|
|
515
|
+
* Both `handlePrevMonth` and `handleNextMonth` need this exact call
|
|
516
|
+
* shape; keeping it in one place prevents them from drifting apart.
|
|
517
|
+
*
|
|
518
|
+
* Bails synchronously when a full committed range isn't set — otherwise
|
|
519
|
+
* every prev/next click in single-date mode (or before the user picks
|
|
520
|
+
* both dates in range mode) pays for an unused double-rAF hop.
|
|
521
|
+
* @private
|
|
522
|
+
* @returns {void}
|
|
523
|
+
*/
|
|
524
|
+
private scheduleCommittedRangeClassRefresh;
|
|
385
525
|
/**
|
|
386
526
|
* Overrides the base class handler to prevent setting `this.hoveredDate`
|
|
387
527
|
* as a reactive property. Instead, handles the range preview imperatively.
|
|
@@ -391,7 +531,28 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
391
531
|
*/
|
|
392
532
|
private hoveredDateChanged;
|
|
393
533
|
/**
|
|
394
|
-
* Scrolls the calendar
|
|
534
|
+
* Scrolls the calendar so the active cell is visible.
|
|
535
|
+
*
|
|
536
|
+
* Walks the flat tree (rendered, slot-aware) outward from the active
|
|
537
|
+
* cell's button and calls `scrollBy` on every vertically-scrollable
|
|
538
|
+
* ancestor by whatever delta still separates the cell from that
|
|
539
|
+
* ancestor's viewport. Native `scrollIntoView` is not used because the
|
|
540
|
+
* cell sits inside multiple nested scroll containers (the dropdown bib's
|
|
541
|
+
* `<dialog>`, the bibtemplate's `#bodyContainer`) and the algorithm only
|
|
542
|
+
* scrolls one of them on its own, leaving the cell short of the
|
|
543
|
+
* viewport in mobile fullscreen.
|
|
544
|
+
*
|
|
545
|
+
* Uses `behavior: 'auto'` (the spec's universally-supported non-animated
|
|
546
|
+
* value) so each `scrollBy` resolves synchronously and the next
|
|
547
|
+
* iteration's `getBoundingClientRect` reads post-scroll positions
|
|
548
|
+
* accurately. This also satisfies `prefers-reduced-motion` users — the
|
|
549
|
+
* scroll containers do not set CSS `scroll-behavior: smooth`, so `auto`
|
|
550
|
+
* is effectively instant.
|
|
551
|
+
*
|
|
552
|
+
* The active cell is looked up from the cache populated by
|
|
553
|
+
* `setActiveCell`. On a cache miss (stale or absent) the cache is
|
|
554
|
+
* refreshed from a single full scan so subsequent calls stay on the
|
|
555
|
+
* fast path.
|
|
395
556
|
* @private
|
|
396
557
|
* @returns {void}
|
|
397
558
|
*/
|
|
@@ -427,6 +588,19 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
427
588
|
* @returns {void}
|
|
428
589
|
*/
|
|
429
590
|
private announceSelection;
|
|
591
|
+
/**
|
|
592
|
+
* Writes `dateStr` to the live region. If the dropdown's dialog hasn't
|
|
593
|
+
* mounted yet (so getOrCreateLiveRegion can't attach), retries on the
|
|
594
|
+
* next animation frame up to MAX_LIVE_REGION_RETRIES instead of silently
|
|
595
|
+
* dropping the announcement. The retry uses the same `_announceRafId`
|
|
596
|
+
* the double-rAF below uses, so a newer announceSelection call (or
|
|
597
|
+
* disconnectedCallback) cancels any in-flight retry.
|
|
598
|
+
* @private
|
|
599
|
+
* @param {String} dateStr - The localized date string to announce.
|
|
600
|
+
* @param {Number} attempts - Number of prior retry attempts.
|
|
601
|
+
* @returns {void}
|
|
602
|
+
*/
|
|
603
|
+
private _deliverAnnouncement;
|
|
430
604
|
/**
|
|
431
605
|
* Debounced version of announceSelection for focus navigation.
|
|
432
606
|
* Uses the assertive live region with a 150ms debounce so only the
|
|
@@ -434,6 +608,10 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
434
608
|
* originally tried aria-live="polite" here, but VoiceOver treats
|
|
435
609
|
* polite as "wait until idle" — which never happens during active
|
|
436
610
|
* keyboard navigation — so the announcements were silently dropped.
|
|
611
|
+
*
|
|
612
|
+
* This is a documented deviation from WCAG 2.1 SC 4.1.3, which
|
|
613
|
+
* prefers `polite` for status messages. See the "Documented
|
|
614
|
+
* Deviation" section in components/datepicker/docs/pages/accessibility.md.
|
|
437
615
|
* @private
|
|
438
616
|
* @param {String} dateStr - The localized date string to announce.
|
|
439
617
|
* @returns {void}
|