@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.4 → 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="scrollWrapper">
|
|
5
5
|
The `auro-datepicker` component is built on top of `auro-dropdown` and `auro-input`, combining their accessibility features with a calendar interface. This page documents the ARIA semantics, screen reader announcements, and other accessibility behaviors built into the component.
|
|
6
6
|
|
|
7
|
-
For keyboard interaction details, see the <
|
|
7
|
+
For keyboard interaction details, see the <auro-hyperlink href="keyboard-behavior">Keyboard Behavior</auro-hyperlink> page.
|
|
8
8
|
|
|
9
9
|
<auro-header level="2" id="ariaRolesAndAttributes">ARIA Roles and Attributes</auro-header>
|
|
10
10
|
<auro-header level="3" id="trigger">Trigger Input</auro-header>
|
|
@@ -32,20 +32,20 @@ The calendar uses the WAI-ARIA grid pattern for screen reader navigation:
|
|
|
32
32
|
| Attribute | Applied to | Description |
|
|
33
33
|
|---|---|---|
|
|
34
34
|
| `role="grid"` | Calendar table | Identifies the calendar as a grid. The month heading is rendered as visible text adjacent to the grid but is excluded from the accessibility tree (announcements are handled via the live region described below). |
|
|
35
|
-
| `role="rowgroup"` | Body group | Groups the week rows.
|
|
35
|
+
| `role="rowgroup"` | Body group | Groups the week rows. |
|
|
36
36
|
| `role="row"` | Week row | Groups each week of date cells. |
|
|
37
|
-
| Day-of-week header |
|
|
38
|
-
| `role="gridcell"` | In-range date cell
|
|
39
|
-
|
|
|
37
|
+
| `role="columnheader"` | Day-of-week header | Each weekday cell in the header row exposes the abbreviated day name as visible text and the full localized day name via `aria-label` (e.g. `aria-label="Sunday"`). |
|
|
38
|
+
| `role="gridcell"` | In-range date cell | Each selectable date cell. Includes `aria-selected`, `aria-current="date"` (for today), and an `aria-label` on the host with the full localized date string. |
|
|
39
|
+
| Out-of-range date cell | Cells outside the valid min/max range | The button uses the native `disabled` attribute (spec-compliant way to express "not actionable" on a `<button>`) and is filtered out of keyboard navigation. The host cell drops its `role` and `aria-label` so assistive tech does not browse into it — no `aria-hidden` or `role="presentation"` is applied. |
|
|
40
40
|
| `aria-disabled="true"` | Blackout date cell | Cells matching the `blackout` dates list. Unlike out-of-range cells, blackout cells **remain focusable** via arrow-key navigation so screen reader users can discover them. The cell's label includes ", unavailable" to communicate that the date cannot be selected. |
|
|
41
41
|
| `aria-selected` | Date cell button | `"true"` for the selected date(s), `"false"` for all other in-range cells. |
|
|
42
|
-
| Accessible name | Date cell
|
|
42
|
+
| Accessible name | Date cell host | Provided via `aria-label` on the cell host element (set by `updateHostAria()` on each render), with the button's inner content marked `aria-hidden="true"` so screen readers don't double-announce. Localized label built from `Intl.DateTimeFormat` (weekday, month, day, year), plus any date slot content (e.g. prices), the range position label (e.g., "range start"), and availability status (", unavailable" for blackout dates). |
|
|
43
43
|
|
|
44
44
|
<auro-header level="2" id="focusManagement">Focus Management</auro-header>
|
|
45
45
|
The component uses `delegatesFocus: true` on its shadow root, meaning focus is automatically delegated to the first focusable element inside the component (the date input).
|
|
46
46
|
|
|
47
|
-
<auro-header level="3" id="
|
|
48
|
-
The calendar
|
|
47
|
+
<auro-header level="3" id="activeCellTracking">Active Cell Tracking</auro-header>
|
|
48
|
+
The calendar tracks a single active cell across the rendered month(s). DOM focus stays on the `#calendarGrid` wrapper the entire time — arrow keys never move focus onto individual cell buttons. `setActiveCell()` imperatively marks the chosen cell (adds the `active` property on the cell host and an `.activeCell` class on its button) without a Lit re-render. Screen-reader awareness of the active cell is provided by an `aria-live` region rather than by `aria-activedescendant`, so the reader is never asked to shift its point of regard on every arrow keypress — a debounce coalesces bursts (see [Screen Reader Announcements](#screenReaderAnnouncements)).
|
|
49
49
|
|
|
50
50
|
The active cell receives an `.activeCell` CSS class to display a visible focus ring, since the native `:focus-visible` pseudo-class applies to the grid wrapper (which holds actual DOM focus), not to individual cells.
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@ The initial active cell is determined in priority order:
|
|
|
57
57
|
4. The first past enabled date.
|
|
58
58
|
|
|
59
59
|
<auro-header level="3" id="focusOnOpen">Focus on Open</auro-header>
|
|
60
|
-
When the calendar bib opens, focus moves to the calendar grid wrapper (`#calendarGrid`). The
|
|
60
|
+
When the calendar bib opens, focus moves to the calendar grid wrapper (`#calendarGrid`). The initial active cell is marked via `setActiveCell()`, and the `aria-live` region announces its full localized label so screen readers describe the starting position. This applies to both desktop and fullscreen modes.
|
|
61
61
|
|
|
62
62
|
<auro-header level="2" id="screenReaderAnnouncements">Screen Reader Announcements</auro-header>
|
|
63
63
|
- **Date selection** — When a date is selected, the calendar's live region (`aria-live="assertive"`) announces the formatted date (e.g., "Wednesday, January 15, 2025"). For range datepickers, both the start and end date selections are announced.
|
|
@@ -66,6 +66,15 @@ When the calendar bib opens, focus moves to the calendar grid wrapper (`#calenda
|
|
|
66
66
|
- **Validation errors** — When a validation error occurs, the error message is rendered with `role="alert"` and `aria-live="assertive"`, causing it to be announced immediately without requiring focus.
|
|
67
67
|
- **Help text** — The help text content is associated with the input so that screen readers announce it as part of the element description when focused.
|
|
68
68
|
|
|
69
|
+
<auro-header level="3" id="ariaLiveDeviation">Documented Deviation: `aria-live="assertive"` for Arrow-Key Navigation</auro-header>
|
|
70
|
+
WCAG 2.1 SC 4.1.3 (Status Messages) generally recommends `aria-live="polite"` for non-critical status updates so screen readers don't interrupt the user. The calendar's navigation live region intentionally uses `aria-live="assertive"` instead. This is a knowing deviation, made for the following reasons:
|
|
71
|
+
|
|
72
|
+
- **VoiceOver behavior** — VoiceOver treats `polite` announcements as "wait until idle," and during active arrow-key traversal the screen reader is never idle. Polite announcements are silently dropped, leaving keyboard users with no feedback about which cell is now active. `assertive` is the only reliable way to communicate the newly focused date on macOS/iOS VoiceOver during navigation.
|
|
73
|
+
- **Interruption mitigation** — A 150 ms debounce is applied in [`announceFocusDebounced`](../../src/auro-calendar.js) so only the final cell after a burst of arrow keys is announced. Rapid navigation produces one announcement per pause, not one per keystroke, which minimizes the interruption cost of `assertive`.
|
|
74
|
+
- **Scope** — The same live region is reused for date selection and month-change announcements, all of which are user-initiated and expected. It is never used for background/system-generated updates.
|
|
75
|
+
|
|
76
|
+
Consumers auditing against APG or WCAG 4.1.3 should treat this as an intentional, documented trade-off between spec-preferred politeness and reliable VoiceOver support.
|
|
77
|
+
|
|
69
78
|
<auro-header level="2" id="accessibleLabels">Accessible Labels</auro-header>
|
|
70
79
|
- The `fromLabel` slot content is used as the accessible name for the first date input. It is also forwarded to the dropdown bib as the dialog's accessible name (`aria-labelledby`).
|
|
71
80
|
- When `range` is set, the `toLabel` slot content provides the accessible name for the second date input.
|
|
@@ -83,7 +92,8 @@ When `range` is set, each date cell's label includes its position relative to th
|
|
|
83
92
|
| `rangeLabelEnd` | "range end" | Announced for the range end date. |
|
|
84
93
|
| `rangeLabelBeforeRange` | "before range" | Announced for dates before the range start. |
|
|
85
94
|
| `rangeLabelInRange` | "in range" | Announced for dates within the selected range. |
|
|
86
|
-
| `rangeLabelAfterRange` | "after range" | Announced for dates after
|
|
95
|
+
| `rangeLabelAfterRange` | "after range" | Announced for dates after a fully selected range. |
|
|
96
|
+
| `rangeLabelEndPreview` | "previewing range end" | Announced for the focused cell while picking the range end (`dateFrom` set, `dateTo` not yet selected) so AT users know that pressing Enter would commit this cell as the range end. |
|
|
87
97
|
|
|
88
98
|
<auro-header level="2" id="fullscreenBehavior">Fullscreen (Modal) Behavior</auro-header>
|
|
89
99
|
On smaller viewports, the calendar bib opens as a fullscreen modal dialog:
|
|
@@ -7,68 +7,69 @@ The `auro-datepicker` component provides users with a way to select a date or da
|
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
| Property | Attribute | Modifiers | Type | Default
|
|
11
|
-
|
|
12
|
-
| `appearance` | `appearance` | | `'default' \| 'inverse'` | "'default'"
|
|
13
|
-
| `autoPlacement` | `autoPlacement` | | `boolean` | "false"
|
|
14
|
-
| `blackoutDates` | `blackoutDates` | | `array` | []
|
|
15
|
-
| `blackoutLabel` | `blackoutLabel` | | `string` | "unavailable" | Label announced for blackout (disabled but in-range) date cells. |
|
|
16
|
-
| `calendarEndDate` | `calendarEndDate` | | `string` | "undefined"
|
|
17
|
-
| `calendarEndDateObject` | | readonly | `Date \| undefined` |
|
|
18
|
-
| `calendarFocusDate` | `calendarFocusDate` | | `string` | "value"
|
|
19
|
-
| `calendarFocusDateObject` | | readonly | `Date \| undefined` |
|
|
20
|
-
| `calendarGridLabel` | `calendarGridLabel` | | `string` | "Calendar days of the month" | Accessible label for the calendar grid containing the days of the month. |
|
|
21
|
-
| `calendarStartDate` | `calendarStartDate` | | `string` | "undefined"
|
|
22
|
-
| `calendarStartDateObject` | | readonly | `Date \| undefined` |
|
|
23
|
-
| `centralDate` | `centralDate` | | `string` |
|
|
24
|
-
| `centralDateObject` | | readonly | `Date \| undefined` |
|
|
25
|
-
| `disabled` | `disabled` | | `boolean` | false
|
|
26
|
-
| `dvInputOnly` | `dvInputOnly` | | `boolean` | false
|
|
27
|
-
| `error` | `error` | | `string` |
|
|
28
|
-
| `format` | `format` | | `string` |
|
|
29
|
-
| `fullscreenBreakpoint` | `fullscreenBreakpoint` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'disabled'` | "'sm'"
|
|
30
|
-
| `hasError` | | readonly | `boolean` |
|
|
31
|
-
| `inputmode` | `inputmode` | | `string` |
|
|
32
|
-
| `largeFullscreenHeadline` | `largeFullscreenHeadline` | | `boolean` | false
|
|
33
|
-
| `layout` | `layout` | | `'classic' \| 'snowflake'` | "'classic'"
|
|
34
|
-
| `locale` | `locale` | | `string` |
|
|
35
|
-
| `maxDate` | `maxDate` | | `string` |
|
|
36
|
-
| `maxDateObject` | | readonly | `Date \| undefined` |
|
|
37
|
-
| `minDate` | `minDate` | | `string` |
|
|
38
|
-
| `minDateObject` | | readonly | `Date \| undefined` |
|
|
39
|
-
| `monthNames` | `monthNames` | | `array` |
|
|
40
|
-
| `navLabelNextMonth` | `navLabelNextMonth` | | `string` | "Next month" | Accessible label for the next month navigation button. |
|
|
41
|
-
| `navLabelPrevMonth` | `navLabelPrevMonth` | | `string` | "Previous month" | Accessible label for the previous month navigation button. |
|
|
42
|
-
| `noFlip` | `noFlip` | | `boolean` | false
|
|
43
|
-
| `noValidate` | `noValidate` | | `boolean` | false
|
|
44
|
-
| `offset` | `offset` | | `number` | "0"
|
|
45
|
-
| `onDark` | `onDark` | | `boolean` | false
|
|
46
|
-
| `placeholder` | `placeholder` | | `string` |
|
|
47
|
-
| `placeholderEndDate` | `placeholderEndDate` | | `string` |
|
|
48
|
-
| `placement` | `placement` | | `'top' \| 'right' \| 'bottom' \| 'left' \| 'bottom-start' \| 'top-start' \| 'top-end' \| 'right-start' \| 'right-end' \| 'bottom-end' \| 'left-start' \| 'left-end'` | "'bottom-start'"
|
|
49
|
-
| `range` | `range` | | `boolean` | false
|
|
50
|
-
| `rangeLabelAfterRange` | `rangeLabelAfterRange` | | `string` | "after range" | Label announced for cells after
|
|
51
|
-
| `rangeLabelBeforeRange` | `rangeLabelBeforeRange` | | `string` | "before range" | Label announced for cells before the range start. |
|
|
52
|
-
| `rangeLabelEnd` | `rangeLabelEnd` | | `string` | "range end" | Label announced for the range end date cell. |
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
10
|
+
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
11
|
+
|-----------------------------------|-----------------------------------|-----------|--------------------------------------------------|--------------------------------|--------------------------------------------------|
|
|
12
|
+
| `appearance` | `appearance` | | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
13
|
+
| `autoPlacement` | `autoPlacement` | | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
14
|
+
| `blackoutDates` | `blackoutDates` | | `array` | [] | Array of dates that cannot be selected. Dates should be in ISO format (YYYY-MM-DD).<br /><br />**Immutable update required.** The datepicker treats this array as<br />immutable and memoizes a lookup Set keyed on the array's reference<br />identity — matching Lit's own reactivity semantics for array<br />properties. In-place mutations (`blackoutDates.push(...)`,<br />`blackoutDates[i] = ...`, `blackoutDates.splice(...)`) will not<br />invalidate the cache and the new entries will be silently ignored.<br />To update, reassign the property: `el.blackoutDates = [...el.blackoutDates, '2024-12-25']`. |
|
|
15
|
+
| `blackoutLabel` | `blackoutLabel` | | `string` | "'unavailable'" | Label announced for blackout (disabled but in-range) date cells. |
|
|
16
|
+
| `calendarEndDate` | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
|
|
17
|
+
| `calendarEndDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarEndDate`. Returns `undefined` when `calendarEndDate` is empty or not a valid date. |
|
|
18
|
+
| `calendarFocusDate` | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
|
|
19
|
+
| `calendarFocusDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarFocusDate`. Returns `undefined` when `calendarFocusDate` is empty or not a valid date. |
|
|
20
|
+
| `calendarGridLabel` | `calendarGridLabel` | | `string` | "'Calendar days of the month'" | Accessible label for the calendar grid containing the days of the month. |
|
|
21
|
+
| `calendarStartDate` | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
|
|
22
|
+
| `calendarStartDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarStartDate`. Returns `undefined` when `calendarStartDate` is empty or not a valid date. |
|
|
23
|
+
| `centralDate` | `centralDate` | | `string` | | The date that determines the currently visible month. |
|
|
24
|
+
| `centralDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `centralDate`. Returns `undefined` when `centralDate` is empty or not a valid date. |
|
|
25
|
+
| `disabled` | `disabled` | | `boolean` | false | If set, disables the datepicker. |
|
|
26
|
+
| `dvInputOnly` | `dvInputOnly` | | `boolean` | false | If defined, the display value slot content will only mask the HTML5 input element. The input's label will not be masked. |
|
|
27
|
+
| `error` | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
28
|
+
| `format` | `format` | | `string` | | Specifies the date format. The default is `mm/dd/yyyy`. |
|
|
29
|
+
| `fullscreenBreakpoint` | `fullscreenBreakpoint` | | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'disabled'` | "'sm'" | Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
30
|
+
| `hasError` | | readonly | `boolean` | | Returns `true` when the datepicker has an active validation error. |
|
|
31
|
+
| `inputmode` | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
|
|
32
|
+
| `largeFullscreenHeadline` | `largeFullscreenHeadline` | | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
|
|
33
|
+
| `layout` | `layout` | | `'classic' \| 'snowflake'` | "'classic'" | Sets the layout of the datepicker. |
|
|
34
|
+
| `locale` | `locale` | | `string` | | Defines the locale of the element. Used to derive the date format when `format` is not explicitly set. |
|
|
35
|
+
| `maxDate` | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
|
|
36
|
+
| `maxDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `maxDate`. Returns `undefined` when `maxDate` is empty or not a valid date. |
|
|
37
|
+
| `minDate` | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
|
|
38
|
+
| `minDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `minDate`. Returns `undefined` when `minDate` is empty or not a valid date. |
|
|
39
|
+
| `monthNames` | `monthNames` | | `array` | | Names of all 12 months to render in the calendar.<br />When omitted, month names will be automatically populated from the active `locale` (falling back to `en-US`). |
|
|
40
|
+
| `navLabelNextMonth` | `navLabelNextMonth` | | `string` | "'Next month'" | Accessible label for the next month navigation button. |
|
|
41
|
+
| `navLabelPrevMonth` | `navLabelPrevMonth` | | `string` | "'Previous month'" | Accessible label for the previous month navigation button. |
|
|
42
|
+
| `noFlip` | `noFlip` | | `boolean` | false | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
43
|
+
| `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
|
|
44
|
+
| `offset` | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
|
|
45
|
+
| `onDark` | `onDark` | | `boolean` | false | DEPRECATED - use `appearance="inverse"` instead. |
|
|
46
|
+
| `placeholder` | `placeholder` | | `string` | | Placeholder text to display in the input(s) when no value is set. |
|
|
47
|
+
| `placeholderEndDate` | `placeholderEndDate` | | `string` | | Optional placeholder text to display in the second input when using date range.<br />By default, datepicker will use `placeholder` for both inputs if placeholder is<br />specified, but placeholderEndDate is not. |
|
|
48
|
+
| `placement` | `placement` | | `'top' \| 'right' \| 'bottom' \| 'left' \| 'bottom-start' \| 'top-start' \| 'top-end' \| 'right-start' \| 'right-end' \| 'bottom-end' \| 'left-start' \| 'left-end'` | "'bottom-start'" | Position where the bib should appear relative to the trigger. |
|
|
49
|
+
| `range` | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
|
|
50
|
+
| `rangeLabelAfterRange` | `rangeLabelAfterRange` | | `string` | "'after range'" | Label announced for cells after a fully selected range (both<br />`dateFrom` and `dateTo` are set). While a range is still being<br />picked (`dateFrom` set, `dateTo` unset), focused cells past the<br />start use `rangeLabelEndPreview` instead. |
|
|
51
|
+
| `rangeLabelBeforeRange` | `rangeLabelBeforeRange` | | `string` | "'before range'" | Label announced for cells before the range start. |
|
|
52
|
+
| `rangeLabelEnd` | `rangeLabelEnd` | | `string` | "'range end'" | Label announced for the range end date cell. |
|
|
53
|
+
| `rangeLabelEndPreview` | `rangeLabelEndPreview` | | `string` | "'previewing range end'" | Label announced for the focused cell while previewing a range end<br />(dateFrom set, dateTo not yet selected). Tells AT users that<br />pressing Enter would commit this cell as the range end. |
|
|
54
|
+
| `rangeLabelInRange` | `rangeLabelInRange` | | `string` | "'in range'" | Label announced for cells within the selected range. |
|
|
55
|
+
| `rangeLabelStart` | `rangeLabelStart` | | `string` | "'range start'" | Label announced for the range start date cell. |
|
|
56
|
+
| `referenceDates` | `referenceDates` | | `array` | | Dates that the user should have for reference as part of their decision-making when selecting a date.<br />This should be a JSON string array of ISO date strings (`YYYY-MM-DD`). |
|
|
57
|
+
| `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
58
|
+
| `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
59
|
+
| `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`.<br />Also used as the validation message when a blackout date is typed into the input. |
|
|
60
|
+
| `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
|
|
61
|
+
| `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
|
|
62
|
+
| `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
63
|
+
| `shape` | | | `string` | "classic" | |
|
|
64
|
+
| `shift` | `shift` | | `boolean` | false | If declared, the dropdown will shift its position to avoid being cut off by the viewport. |
|
|
65
|
+
| `size` | | | `string` | "lg" | |
|
|
66
|
+
| `stacked` | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
|
|
67
|
+
| `validity` | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
|
|
68
|
+
| `value` | `value` | | `string` | "undefined" | Value selected for the datepicker. |
|
|
69
|
+
| `valueEnd` | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
|
|
70
|
+
| `valueEndObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `valueEnd`. Returns `undefined` when `valueEnd` is empty or not a valid date. |
|
|
71
|
+
| `valueObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `value`. Returns `undefined` when `value` is empty or not a valid date. |
|
|
72
|
+
| `values` | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
|
|
72
73
|
|
|
73
74
|
## Methods
|
|
74
75
|
|
|
@@ -109,6 +110,8 @@ The `auro-datepicker` component provides users with a way to select a date or da
|
|
|
109
110
|
| `fromLabel` | Defines the label content for the first input. |
|
|
110
111
|
| `helpText` | Defines the content of the helpText. |
|
|
111
112
|
| `label` | Defines the label content for the entire datepicker when `layout="snowflake"`. |
|
|
113
|
+
| `optionalFromLabel` | Overrides the "(optional)" text rendered next to the first input's label when the datepicker is not `required`. |
|
|
114
|
+
| `optionalToLabel` | Overrides the "(optional)" text rendered next to the second input's label when `range` is set and the datepicker is not `required`. |
|
|
112
115
|
| `popover_YYYY_MM_DD` | Defines the content to display in the auro-calendar-cell popover for the specified date. |
|
|
113
116
|
| `toLabel` | Defines the label content for the second input when the `range` attribute is used. |
|
|
114
117
|
|