@aurodesignsystem-dev/auro-formkit 0.0.0-pr1480.8 → 0.0.0-pr1482.0
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/auro-bibtemplate.d.ts +0 -7
- package/components/bibtemplate/dist/index.js +1 -9
- package/components/bibtemplate/dist/registered.js +1 -9
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/pages.json +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.md +7 -3
- package/components/combobox/demo/customize.min.js +1257 -1816
- package/components/combobox/demo/getting-started.min.js +1257 -1816
- package/components/combobox/demo/index.min.js +1257 -1816
- package/components/combobox/demo/keyboard-behavior.md +68 -8
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +5 -0
- package/components/combobox/dist/index.js +335 -319
- package/components/combobox/dist/registered.js +335 -319
- package/components/counter/demo/customize.min.js +15 -233
- package/components/counter/demo/index.min.js +15 -233
- package/components/counter/demo/keyboard-behavior.md +0 -1
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/dist/index.js +5204 -208
- package/components/counter/dist/registered.js +5204 -208
- package/components/datepicker/demo/accessibility.md +3 -54
- package/components/datepicker/demo/api.md +2 -11
- package/components/datepicker/demo/customize.html +0 -2
- package/components/datepicker/demo/customize.md +8 -72
- package/components/datepicker/demo/design.md +1 -3
- package/components/datepicker/demo/index.js +1 -5
- package/components/datepicker/demo/index.md +2 -85
- package/components/datepicker/demo/index.min.js +183 -2260
- package/components/datepicker/demo/keyboard-behavior.md +2 -201
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/voiceover.md +12 -21
- package/components/datepicker/dist/index.js +156 -2146
- package/components/datepicker/dist/registered.js +156 -2146
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +11 -111
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +0 -37
- package/components/datepicker/dist/src/auro-calendar.d.ts +0 -236
- package/components/datepicker/dist/src/auro-datepicker.d.ts +0 -88
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +3 -5
- package/components/dropdown/demo/accessibility.md +0 -11
- package/components/dropdown/demo/api.md +0 -1
- package/components/dropdown/demo/customize.md +0 -3
- package/components/dropdown/demo/customize.min.js +13 -223
- package/components/dropdown/demo/getting-started.min.js +13 -223
- package/components/dropdown/demo/index.min.js +13 -223
- package/components/dropdown/demo/keyboard-behavior.md +0 -1
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -33
- package/components/dropdown/dist/index.js +13 -223
- package/components/dropdown/dist/registered.js +13 -223
- package/components/form/demo/customize.min.js +7765 -10717
- package/components/form/demo/getting-started.min.js +7765 -10717
- package/components/form/demo/index.min.js +7765 -10717
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +7764 -10716
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/demo/pages.json +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.md +41 -45
- package/components/menu/demo/customize.md +0 -28
- package/components/menu/demo/index.min.js +779 -1354
- package/components/menu/demo/pages.json +1 -1
- package/components/menu/dist/auro-menu.d.ts +95 -110
- package/components/menu/dist/auro-menuoption.d.ts +32 -138
- package/components/menu/dist/index.js +753 -1308
- package/components/menu/dist/registered.js +765 -1308
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.md +7 -3
- package/components/select/demo/customize.min.js +999 -1759
- package/components/select/demo/getting-started.min.js +999 -1759
- package/components/select/demo/index.min.js +999 -1759
- package/components/select/demo/keyboard-behavior.md +54 -9
- package/components/select/demo/pages.json +1 -1
- package/components/select/dist/index.js +76 -261
- package/components/select/dist/registered.js +76 -261
- package/components/select/dist/selectUtils.d.ts +12 -0
- package/custom-elements.json +1379 -3096
- package/package.json +4 -4
- package/components/checkbox/demo/why-checkbox.html +0 -57
- package/components/checkbox/demo/why-checkbox.md +0 -86
- package/components/combobox/demo/why-combobox.html +0 -57
- package/components/combobox/demo/why-combobox.md +0 -113
- package/components/counter/demo/why-counter.html +0 -57
- package/components/counter/demo/why-counter.md +0 -108
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/customize.min.js +0 -26627
- package/components/datepicker/demo/why-datepicker.html +0 -57
- package/components/datepicker/demo/why-datepicker.md +0 -133
- package/components/dropdown/demo/why-dropdown.html +0 -57
- package/components/dropdown/demo/why-dropdown.md +0 -97
- package/components/form/demo/why-form.html +0 -57
- package/components/form/demo/why-form.md +0 -101
- package/components/input/demo/why-input.html +0 -57
- package/components/input/demo/why-input.md +0 -121
- package/components/menu/demo/why-menu.html +0 -57
- package/components/menu/demo/why-menu.md +0 -104
- package/components/menu/dist/auro-menu.context.d.ts +0 -238
- package/components/radio/demo/customize.min.js +0 -2186
- package/components/radio/demo/demo-support.min.js +0 -55807
- package/components/radio/demo/getting-started.min.js +0 -2205
- package/components/radio/demo/why-radio.html +0 -57
- package/components/radio/demo/why-radio.md +0 -92
- package/components/select/demo/why-select.html +0 -57
- package/components/select/demo/why-select.md +0 -128
|
@@ -6,6 +6,9 @@ export class AuroCalendarCell extends LitElement {
|
|
|
6
6
|
selected: {
|
|
7
7
|
type: BooleanConstructor;
|
|
8
8
|
};
|
|
9
|
+
hovered: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
9
12
|
dateTo: {
|
|
10
13
|
type: StringConstructor;
|
|
11
14
|
};
|
|
@@ -28,6 +31,9 @@ export class AuroCalendarCell extends LitElement {
|
|
|
28
31
|
disabledDays: {
|
|
29
32
|
type: ArrayConstructor;
|
|
30
33
|
};
|
|
34
|
+
hoveredDate: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
31
37
|
isCurrentDate: {
|
|
32
38
|
type: BooleanConstructor;
|
|
33
39
|
};
|
|
@@ -40,13 +46,11 @@ export class AuroCalendarCell extends LitElement {
|
|
|
40
46
|
renderForDateSlot: {
|
|
41
47
|
type: BooleanConstructor;
|
|
42
48
|
};
|
|
43
|
-
hasPopoverContent: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
};
|
|
46
49
|
};
|
|
47
50
|
static get styles(): import("lit").CSSResult[];
|
|
48
51
|
day: any;
|
|
49
52
|
selected: boolean;
|
|
53
|
+
hovered: boolean;
|
|
50
54
|
dateTo: any;
|
|
51
55
|
dateFrom: any;
|
|
52
56
|
month: any;
|
|
@@ -54,23 +58,21 @@ export class AuroCalendarCell extends LitElement {
|
|
|
54
58
|
max: any;
|
|
55
59
|
disabled: boolean;
|
|
56
60
|
disabledDays: any[];
|
|
61
|
+
hoveredDate: any;
|
|
57
62
|
isCurrentDate: boolean;
|
|
58
63
|
_locale: any;
|
|
59
64
|
dateStr: string | null;
|
|
60
65
|
renderForDateSlot: boolean;
|
|
61
|
-
active: boolean;
|
|
62
|
-
hasPopoverContent: boolean;
|
|
63
66
|
runtimeUtils: any;
|
|
64
67
|
popoverTag: any;
|
|
65
68
|
set locale(value: any);
|
|
66
69
|
get locale(): any;
|
|
67
70
|
/**
|
|
68
|
-
* Handles selected
|
|
69
|
-
* Also clears any imperative range preview classes so classMap is the
|
|
70
|
-
* sole source of truth after a selection update.
|
|
71
|
+
* Handles selected and hovered states of the calendar cell when the date changes.
|
|
71
72
|
* @private
|
|
72
73
|
* @param {Number} dateFrom - Depart date.
|
|
73
74
|
* @param {Number} dateTo - Return date.
|
|
75
|
+
* @param {Number} hoveredDate - Hovered date.
|
|
74
76
|
* @param {Object} day - An object containing the dateFrom and day of month values.
|
|
75
77
|
* @returns {void}
|
|
76
78
|
*/
|
|
@@ -83,43 +85,12 @@ export class AuroCalendarCell extends LitElement {
|
|
|
83
85
|
private handleTap;
|
|
84
86
|
/**
|
|
85
87
|
* 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
|
-
*
|
|
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()`.
|
|
93
|
+
* Checks if the current date is a valid date depending on the min and max values.
|
|
123
94
|
* @private
|
|
124
95
|
* @param {Object} day - An object containing the dateFrom and day of month values.
|
|
125
96
|
* @param {Number} min - The minimum date value.
|
|
@@ -128,25 +99,6 @@ export class AuroCalendarCell extends LitElement {
|
|
|
128
99
|
* @returns {Boolean} - True if the date is disabled.
|
|
129
100
|
*/
|
|
130
101
|
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;
|
|
150
102
|
/**
|
|
151
103
|
* Checks if the current date is the depart date.
|
|
152
104
|
* @private
|
|
@@ -210,60 +162,8 @@ export class AuroCalendarCell extends LitElement {
|
|
|
210
162
|
private handleSlotContent;
|
|
211
163
|
firstUpdated(): void;
|
|
212
164
|
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;
|
|
224
165
|
auroPopover: any;
|
|
225
166
|
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 without triggering a Lit re-render.
|
|
242
|
-
* Note: buttons stay tabindex="-1" because the grid uses aria-activedescendant.
|
|
243
|
-
* @returns {void}
|
|
244
|
-
*/
|
|
245
|
-
setActive(): void;
|
|
246
|
-
/**
|
|
247
|
-
* Imperatively marks this cell as inactive without triggering a Lit re-render.
|
|
248
|
-
* @returns {void}
|
|
249
|
-
*/
|
|
250
|
-
clearActive(): void;
|
|
251
|
-
/**
|
|
252
|
-
* Updates range preview classes imperatively (no Lit re-render).
|
|
253
|
-
* Called by the calendar component when the hovered date changes
|
|
254
|
-
* during range selection (dateFrom set, dateTo not yet set).
|
|
255
|
-
* @param {Number} hoveredDate - Unix timestamp of the currently hovered/focused date.
|
|
256
|
-
* @param {Number} dateFrom - Unix timestamp of the selected departure date.
|
|
257
|
-
* @returns {void}
|
|
258
|
-
*/
|
|
259
|
-
updateRangePreviewClasses(hoveredDate: number, dateFrom: number): void;
|
|
260
|
-
/**
|
|
261
|
-
* Clears all imperative range preview classes from the cell button.
|
|
262
|
-
* Called when a selection occurs so classMap becomes the sole source of truth.
|
|
263
|
-
* @returns {void}
|
|
264
|
-
*/
|
|
265
|
-
clearRangePreviewClasses(): void;
|
|
266
|
-
renderCellButton(): import("lit-html").TemplateResult;
|
|
267
167
|
render(): import("lit-html").TemplateResult;
|
|
268
168
|
}
|
|
269
169
|
import { LitElement } from "lit";
|
|
@@ -16,42 +16,5 @@ 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;
|
|
56
19
|
}
|
|
57
20
|
import { RangeDatepickerCalendar } from './vendor/wc-range-datepicker/range-datepicker-calendar.js';
|
|
@@ -123,18 +123,6 @@ 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;
|
|
132
|
-
/**
|
|
133
|
-
* Whether the #calendarGrid wrapper currently has focus.
|
|
134
|
-
* Used to determine whether the visualFocus ring should be shown.
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
private _gridHasFocus;
|
|
138
126
|
/**
|
|
139
127
|
* @private
|
|
140
128
|
*/
|
|
@@ -160,39 +148,6 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
160
148
|
*/
|
|
161
149
|
private buttonTag;
|
|
162
150
|
dropdown: any;
|
|
163
|
-
/**
|
|
164
|
-
* Updates the month and year when the user navigates to the previous calendar month.
|
|
165
|
-
* @private
|
|
166
|
-
* @param {Object} [options] - Optional settings.
|
|
167
|
-
* @param {boolean} [options.skipActiveUpdate=false] - When true, skip the active cell
|
|
168
|
-
* recomputation. Used by arrow key handlers that manage the active cell themselves.
|
|
169
|
-
* @returns {void}
|
|
170
|
-
*/
|
|
171
|
-
private handlePrevMonth;
|
|
172
|
-
/**
|
|
173
|
-
* Updates the month and year when the user navigates to the next calendar month.
|
|
174
|
-
* @private
|
|
175
|
-
* @param {Object} [options] - Optional settings.
|
|
176
|
-
* @param {boolean} [options.skipActiveUpdate=false] - When true, skip the active cell
|
|
177
|
-
* recomputation. Used by arrow key handlers that manage the active cell themselves.
|
|
178
|
-
* @returns {void}
|
|
179
|
-
*/
|
|
180
|
-
private handleNextMonth;
|
|
181
|
-
/**
|
|
182
|
-
* Announces the current month and year via the live region after navigation.
|
|
183
|
-
* @private
|
|
184
|
-
* @returns {void}
|
|
185
|
-
*/
|
|
186
|
-
private announceMonthChange;
|
|
187
|
-
_focusAnnounceTimer: any;
|
|
188
|
-
/**
|
|
189
|
-
* Updates the active cell after month navigation (prev/next buttons).
|
|
190
|
-
* Always moves the active cell to the first enabled date in the newly
|
|
191
|
-
* visible months so that tabbing back to the grid lands on an enabled cell.
|
|
192
|
-
* @private
|
|
193
|
-
* @returns {void}
|
|
194
|
-
*/
|
|
195
|
-
private updateActiveCellForVisibleMonth;
|
|
196
151
|
/**
|
|
197
152
|
* Renders all of the auro-calendar-months HTML.
|
|
198
153
|
* @private
|
|
@@ -212,197 +167,6 @@ export class AuroCalendar extends RangeDatepicker {
|
|
|
212
167
|
* @returns {void}
|
|
213
168
|
*/
|
|
214
169
|
scrollMonthIntoView(date: string): void;
|
|
215
|
-
/**
|
|
216
|
-
* Gets all rendered month components.
|
|
217
|
-
* @private
|
|
218
|
-
* @returns {Array} Array of auro-formkit-calendar-month elements.
|
|
219
|
-
*/
|
|
220
|
-
private getMonthComponents;
|
|
221
|
-
/**
|
|
222
|
-
* Gets all focusable cells across all rendered months.
|
|
223
|
-
* @private
|
|
224
|
-
* @returns {Array} Array of auro-formkit-calendar-cell elements.
|
|
225
|
-
*/
|
|
226
|
-
private getAllFocusableCells;
|
|
227
|
-
/**
|
|
228
|
-
* Sets the active cell across all months. Only one cell has tabindex="0" at a time.
|
|
229
|
-
* Uses imperative DOM manipulation — no Lit re-render triggered.
|
|
230
|
-
* Also updates ariaActiveDescendantElement on the grid wrapper so
|
|
231
|
-
* screen readers announce the active cell without moving DOM focus.
|
|
232
|
-
* @param {Number} date - Unix timestamp of the cell to activate.
|
|
233
|
-
* @returns {void}
|
|
234
|
-
*/
|
|
235
|
-
setActiveCell(date: number): void;
|
|
236
|
-
/**
|
|
237
|
-
* Focuses the calendar grid wrapper and sets the active cell.
|
|
238
|
-
* DOM focus stays on the grid wrapper; the aria-live region
|
|
239
|
-
* tells the screen reader which cell is "active".
|
|
240
|
-
* @returns {void}
|
|
241
|
-
*/
|
|
242
|
-
focusActiveCell(): void;
|
|
243
|
-
/**
|
|
244
|
-
* Shows the visualFocus ring on the active cell when the grid gains focus.
|
|
245
|
-
* @private
|
|
246
|
-
* @returns {void}
|
|
247
|
-
*/
|
|
248
|
-
private handleGridFocusIn;
|
|
249
|
-
/**
|
|
250
|
-
* Hides the visualFocus ring on the active cell when the grid loses focus.
|
|
251
|
-
* @private
|
|
252
|
-
* @returns {void}
|
|
253
|
-
*/
|
|
254
|
-
private handleGridFocusOut;
|
|
255
|
-
/**
|
|
256
|
-
* Computes the initial active date from data properties alone — no DOM required.
|
|
257
|
-
* Priority:
|
|
258
|
-
* 1. Selected date (dateFrom) if within range
|
|
259
|
-
* 2. Today's date if not disabled (in-range and not blackout)
|
|
260
|
-
* 3. First future non-disabled date (scans day-by-day from today up to 1 year)
|
|
261
|
-
* 4. First previous non-disabled date (scans day-by-day from today up to 1 year)
|
|
262
|
-
* 5. First enabled date in finite [min, max] range
|
|
263
|
-
* 5b. First enabled date scanning forward from finite min (unbounded max)
|
|
264
|
-
* 5c. First enabled date scanning backward from finite max (unbounded min)
|
|
265
|
-
* 6. First in-range date (even if blackout) so focus can land somewhere
|
|
266
|
-
* 7. undefined — no valid target
|
|
267
|
-
*
|
|
268
|
-
* @private
|
|
269
|
-
* @param {Object} [options] - Optional settings.
|
|
270
|
-
* @param {boolean} [options.skipDateFrom=false] - When true, skip the selected-date
|
|
271
|
-
* shortcut (step 1). Used after month navigation so the active cell lands in the
|
|
272
|
-
* newly visible month instead of jumping back to the selected date's month.
|
|
273
|
-
* @returns {Number|undefined} Unix timestamp (seconds) of the date to activate, or undefined.
|
|
274
|
-
*/
|
|
275
|
-
private computeActiveDate;
|
|
276
|
-
/**
|
|
277
|
-
* Checks if a target date (unix seconds) is within the configured [min, max] range.
|
|
278
|
-
* Returns false if the date falls outside the range, preventing navigation
|
|
279
|
-
* to months where all dates are disabled.
|
|
280
|
-
* @private
|
|
281
|
-
* @param {Number} targetTs - Unix timestamp in seconds.
|
|
282
|
-
* @returns {Boolean} True if the date is within range.
|
|
283
|
-
*/
|
|
284
|
-
private isDateInRange;
|
|
285
|
-
/**
|
|
286
|
-
* Handles arrow key navigation on the calendar grid wrapper.
|
|
287
|
-
* Focus stays on the grid wrapper; only ariaActiveDescendantElement
|
|
288
|
-
* and the visual active-cell indicator change.
|
|
289
|
-
* @private
|
|
290
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
291
|
-
* @returns {void}
|
|
292
|
-
*/
|
|
293
|
-
private handleGridKeyDown;
|
|
294
|
-
/**
|
|
295
|
-
* Handles cross-month boundary navigation events from month components.
|
|
296
|
-
* @private
|
|
297
|
-
* @param {CustomEvent} event - The boundary event with direction and source date info.
|
|
298
|
-
* @returns {void}
|
|
299
|
-
*/
|
|
300
|
-
private handleMonthBoundary;
|
|
301
|
-
/**
|
|
302
|
-
* Handles cell activation events from month components.
|
|
303
|
-
* @private
|
|
304
|
-
* @param {CustomEvent} event - The activation event with target date.
|
|
305
|
-
* @returns {void}
|
|
306
|
-
*/
|
|
307
|
-
private handleCellActivate;
|
|
308
|
-
/**
|
|
309
|
-
* Handles focus events from calendar cells.
|
|
310
|
-
* Updates the live region with an SR announcement and triggers
|
|
311
|
-
* the imperative range preview if applicable.
|
|
312
|
-
* @private
|
|
313
|
-
* @param {CustomEvent} event - The calendar-cell-focused event.
|
|
314
|
-
* @returns {void}
|
|
315
|
-
*/
|
|
316
|
-
private handleCellFocused;
|
|
317
|
-
/**
|
|
318
|
-
* Builds a full SR announcement string for a focused cell date.
|
|
319
|
-
* Includes the localized date, range position, popover content,
|
|
320
|
-
* and blackout status.
|
|
321
|
-
* @private
|
|
322
|
-
* @param {Number} date - Unix timestamp (seconds) of the focused cell.
|
|
323
|
-
* @returns {String} The announcement string.
|
|
324
|
-
*/
|
|
325
|
-
private buildFocusAnnouncement;
|
|
326
|
-
/**
|
|
327
|
-
* Determines the range position label for a given date.
|
|
328
|
-
* @private
|
|
329
|
-
* @param {Number} date - Unix timestamp (seconds).
|
|
330
|
-
* @returns {String|null} The range position label, or null.
|
|
331
|
-
*/
|
|
332
|
-
private getRangePositionLabel;
|
|
333
|
-
/**
|
|
334
|
-
* Checks whether a given date is a blackout date.
|
|
335
|
-
* @private
|
|
336
|
-
* @param {Number} dateTs - Unix timestamp (seconds).
|
|
337
|
-
* @returns {Boolean} True if the date is blacked out.
|
|
338
|
-
*/
|
|
339
|
-
private isDateBlackout;
|
|
340
|
-
/**
|
|
341
|
-
* Updates the range preview classes imperatively across all cells.
|
|
342
|
-
* Only active when in range mode with dateFrom set and dateTo not yet set.
|
|
343
|
-
* @private
|
|
344
|
-
* @param {Number} hoveredDate - Unix timestamp of the hovered/focused date.
|
|
345
|
-
* @returns {void}
|
|
346
|
-
*/
|
|
347
|
-
private updateRangePreview;
|
|
348
|
-
/**
|
|
349
|
-
* Clears range preview classes from all cells.
|
|
350
|
-
* @private
|
|
351
|
-
* @returns {void}
|
|
352
|
-
*/
|
|
353
|
-
private clearRangePreview;
|
|
354
|
-
/**
|
|
355
|
-
* Overrides the base class handler to prevent setting `this.hoveredDate`
|
|
356
|
-
* as a reactive property. Instead, handles the range preview imperatively.
|
|
357
|
-
* @private
|
|
358
|
-
* @param {CustomEvent} event - The hovered-date-changed event from a month.
|
|
359
|
-
* @returns {void}
|
|
360
|
-
*/
|
|
361
|
-
private hoveredDateChanged;
|
|
362
|
-
/**
|
|
363
|
-
* Scrolls the calendar to ensure the month containing the active cell is visible.
|
|
364
|
-
* @private
|
|
365
|
-
* @returns {void}
|
|
366
|
-
*/
|
|
367
|
-
private scrollToActiveCell;
|
|
368
|
-
/**
|
|
369
|
-
* Returns (and lazily creates) a document-level aria-live region.
|
|
370
|
-
* Chrome does not reliably observe aria-live regions inside shadow DOM,
|
|
371
|
-
* so this element is appended to document.body where all browsers and
|
|
372
|
-
* screen readers can observe it.
|
|
373
|
-
* @private
|
|
374
|
-
* @returns {HTMLElement} The live region element.
|
|
375
|
-
*/
|
|
376
|
-
private getOrCreateLiveRegion;
|
|
377
|
-
_liveRegion: HTMLElement | HTMLDivElement | null | undefined;
|
|
378
|
-
/**
|
|
379
|
-
* Announces a date selection or focus change via the live region.
|
|
380
|
-
* Uses requestAnimationFrame to ensure the clear and set happen in
|
|
381
|
-
* separate rendering frames — Chrome may coalesce synchronous or
|
|
382
|
-
* microtask-deferred mutations into a single accessibility tree update.
|
|
383
|
-
* @private
|
|
384
|
-
* @param {String} dateStr - The localized date string to announce.
|
|
385
|
-
* @returns {void}
|
|
386
|
-
*/
|
|
387
|
-
private announceSelection;
|
|
388
|
-
_announceRafId: any;
|
|
389
|
-
/**
|
|
390
|
-
* Debounced version of announceSelection for focus navigation.
|
|
391
|
-
* Only announces the last focused date after rapid navigation pauses,
|
|
392
|
-
* preventing the screen reader from queueing up stale announcements
|
|
393
|
-
* that can't keep pace with arrow-key traversal.
|
|
394
|
-
* @private
|
|
395
|
-
* @param {String} dateStr - The localized date string to announce.
|
|
396
|
-
* @returns {void}
|
|
397
|
-
*/
|
|
398
|
-
private announceFocusDebounced;
|
|
399
|
-
/**
|
|
400
|
-
* Formats a Unix timestamp (seconds) as a localized date string for SR announcements.
|
|
401
|
-
* @private
|
|
402
|
-
* @param {String|Number} timestamp - Unix timestamp in seconds.
|
|
403
|
-
* @returns {String} Localized date string.
|
|
404
|
-
*/
|
|
405
|
-
private formatAnnouncementDate;
|
|
406
170
|
injectSlot(slotName: any, nodes: any): void;
|
|
407
171
|
render(): import("lit-html").TemplateResult;
|
|
408
172
|
}
|
|
@@ -248,69 +248,6 @@ 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
|
-
};
|
|
314
251
|
/**
|
|
315
252
|
* Dates that the user should have for reference as part of their decision making when selecting a date.
|
|
316
253
|
* This should be a JSON string array of dates in the format of `MM/DD/YYYY`.
|
|
@@ -334,7 +271,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
334
271
|
};
|
|
335
272
|
/**
|
|
336
273
|
* 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.
|
|
338
274
|
*/
|
|
339
275
|
setCustomValidityCustomError: {
|
|
340
276
|
type: StringConstructor;
|
|
@@ -419,15 +355,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
419
355
|
required: boolean;
|
|
420
356
|
onDark: boolean;
|
|
421
357
|
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;
|
|
431
358
|
stacked: boolean;
|
|
432
359
|
noValidate: boolean;
|
|
433
360
|
validity: any;
|
|
@@ -605,13 +532,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
605
532
|
* @returns {void}
|
|
606
533
|
*/
|
|
607
534
|
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;
|
|
615
535
|
/**
|
|
616
536
|
* Binds all behavior needed to the dropdown after rendering.
|
|
617
537
|
* @private
|
|
@@ -686,13 +606,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
686
606
|
* @returns {void}
|
|
687
607
|
*/
|
|
688
608
|
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;
|
|
696
609
|
/**
|
|
697
610
|
* Validates value.
|
|
698
611
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -711,7 +624,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
711
624
|
formattedFocusDate: boolean | undefined;
|
|
712
625
|
formattedEndDate: boolean | undefined;
|
|
713
626
|
formattedValue: boolean | undefined;
|
|
714
|
-
wasCellClick: boolean | undefined;
|
|
715
627
|
formattedValueEnd: boolean | undefined;
|
|
716
628
|
formattedMinDate: boolean | undefined;
|
|
717
629
|
formattedMaxDate: boolean | undefined;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
Escape(component: any, evt: any
|
|
3
|
-
|
|
4
|
-
' '(component: any, evt: any, ctx: any): void;
|
|
5
|
-
};
|
|
1
|
+
export namespace datepickerKeyboardStrategy {
|
|
2
|
+
function Escape(component: any, evt: any): void;
|
|
3
|
+
}
|
|
@@ -28,23 +28,12 @@
|
|
|
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><dialog></code> <code>showModal()</code> API provides equivalent behavior, so <code>desktopModal</code> only applies to desktop-sized viewports.</p>
|
|
39
|
-
</section>
|
|
40
|
-
<section>
|
|
41
31
|
<auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
|
|
42
32
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/tabindex.md) -->
|
|
43
33
|
<!-- The below content is automatically added from ./../docs/partials/tabindex.md -->
|
|
44
34
|
<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>
|
|
45
35
|
<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>
|
|
46
36
|
<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>
|
|
48
37
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
49
38
|
</section>
|
|
50
39
|
<section>
|
|
@@ -13,7 +13,6 @@ 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. |
|
|
17
16
|
| `disableEventShow` | `disableEventShow` | `boolean` | | If declared, the dropdown will only show by calling the API .show() public method. |
|
|
18
17
|
| `disableKeyboardHandling` | `disableKeyboardHandling` | `boolean` | | If declared, the dropdown will not handle keyboard events and will require the consumer to manage this behavior. |
|
|
19
18
|
| `disabled` | `disabled` | `boolean` | | If declared, the dropdown is not interactive. |
|
|
@@ -13,7 +13,6 @@
|
|
|
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>
|
|
17
16
|
<auro-anchorlink fluid href="#disabled" class="level2 body-xs">Disabled</auro-anchorlink>
|
|
18
17
|
<auro-anchorlink fluid href="#error" class="level2 body-xs">Error</auro-anchorlink>
|
|
19
18
|
<auro-anchorlink fluid href="#noToggle" class="level2 body-xs">No Toggle</auro-anchorlink>
|
|
@@ -570,8 +569,6 @@
|
|
|
570
569
|
</auro-dropdown></code></pre>
|
|
571
570
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
572
571
|
</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><dialog></code> <code>showModal()</code> API provides equivalent behavior automatically.</p>
|
|
575
572
|
<auro-header level="3" id="disabled">Disabled</auro-header>
|
|
576
573
|
<p>Use the <code>disabled</code> attribute to disable interaction with the dropdown.</p>
|
|
577
574
|
<div class="exampleWrapper">
|