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