@aurodesignsystem-dev/auro-formkit 0.0.0-pr1480.9 → 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.
Files changed (115) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +0 -7
  2. package/components/bibtemplate/dist/index.js +1 -9
  3. package/components/bibtemplate/dist/registered.js +1 -9
  4. package/components/checkbox/demo/customize.min.js +1 -1
  5. package/components/checkbox/demo/getting-started.min.js +1 -1
  6. package/components/checkbox/demo/index.min.js +1 -1
  7. package/components/checkbox/demo/pages.json +1 -1
  8. package/components/checkbox/dist/index.js +1 -1
  9. package/components/checkbox/dist/registered.js +1 -1
  10. package/components/combobox/demo/customize.md +7 -3
  11. package/components/combobox/demo/customize.min.js +1257 -1816
  12. package/components/combobox/demo/getting-started.min.js +1257 -1816
  13. package/components/combobox/demo/index.min.js +1257 -1816
  14. package/components/combobox/demo/keyboard-behavior.md +68 -8
  15. package/components/combobox/demo/pages.json +1 -1
  16. package/components/combobox/dist/auro-combobox.d.ts +5 -0
  17. package/components/combobox/dist/index.js +335 -319
  18. package/components/combobox/dist/registered.js +335 -319
  19. package/components/counter/demo/customize.min.js +15 -233
  20. package/components/counter/demo/index.min.js +15 -233
  21. package/components/counter/demo/keyboard-behavior.md +0 -1
  22. package/components/counter/demo/pages.json +1 -1
  23. package/components/counter/dist/index.js +5204 -208
  24. package/components/counter/dist/registered.js +5204 -208
  25. package/components/datepicker/demo/accessibility.md +3 -54
  26. package/components/datepicker/demo/api.md +2 -11
  27. package/components/datepicker/demo/customize.html +0 -2
  28. package/components/datepicker/demo/customize.md +8 -72
  29. package/components/datepicker/demo/design.md +1 -3
  30. package/components/datepicker/demo/index.js +1 -5
  31. package/components/datepicker/demo/index.md +2 -85
  32. package/components/datepicker/demo/index.min.js +183 -2288
  33. package/components/datepicker/demo/keyboard-behavior.md +2 -201
  34. package/components/datepicker/demo/pages.json +1 -1
  35. package/components/datepicker/demo/voiceover.md +12 -21
  36. package/components/datepicker/dist/index.js +156 -2174
  37. package/components/datepicker/dist/registered.js +156 -2174
  38. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +11 -111
  39. package/components/datepicker/dist/src/auro-calendar-month.d.ts +0 -37
  40. package/components/datepicker/dist/src/auro-calendar.d.ts +0 -246
  41. package/components/datepicker/dist/src/auro-datepicker.d.ts +0 -88
  42. package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +3 -5
  43. package/components/dropdown/demo/accessibility.md +0 -11
  44. package/components/dropdown/demo/api.md +0 -1
  45. package/components/dropdown/demo/customize.md +0 -3
  46. package/components/dropdown/demo/customize.min.js +13 -223
  47. package/components/dropdown/demo/getting-started.min.js +13 -223
  48. package/components/dropdown/demo/index.min.js +13 -223
  49. package/components/dropdown/demo/keyboard-behavior.md +0 -1
  50. package/components/dropdown/demo/pages.json +1 -1
  51. package/components/dropdown/dist/auro-dropdown.d.ts +1 -33
  52. package/components/dropdown/dist/index.js +13 -223
  53. package/components/dropdown/dist/registered.js +13 -223
  54. package/components/form/demo/customize.min.js +7765 -10745
  55. package/components/form/demo/getting-started.min.js +7765 -10745
  56. package/components/form/demo/index.min.js +7765 -10745
  57. package/components/form/demo/pages.json +1 -1
  58. package/components/form/demo/registerDemoDeps.min.js +7764 -10744
  59. package/components/input/demo/customize.min.js +1 -1
  60. package/components/input/demo/getting-started.min.js +1 -1
  61. package/components/input/demo/index.min.js +1 -1
  62. package/components/input/demo/pages.json +1 -1
  63. package/components/input/dist/index.js +1 -1
  64. package/components/input/dist/registered.js +1 -1
  65. package/components/menu/demo/api.md +41 -45
  66. package/components/menu/demo/customize.md +0 -28
  67. package/components/menu/demo/index.min.js +779 -1354
  68. package/components/menu/demo/pages.json +1 -1
  69. package/components/menu/dist/auro-menu.d.ts +95 -110
  70. package/components/menu/dist/auro-menuoption.d.ts +32 -138
  71. package/components/menu/dist/index.js +753 -1308
  72. package/components/menu/dist/registered.js +765 -1308
  73. package/components/radio/demo/getting-started.js +1 -1
  74. package/components/radio/demo/getting-started.md +1 -1
  75. package/components/radio/demo/index.min.js +1 -1
  76. package/components/radio/demo/pages.json +1 -1
  77. package/components/radio/dist/index.js +1 -1
  78. package/components/radio/dist/registered.js +1 -1
  79. package/components/select/demo/customize.md +7 -3
  80. package/components/select/demo/customize.min.js +999 -1759
  81. package/components/select/demo/getting-started.min.js +999 -1759
  82. package/components/select/demo/index.min.js +999 -1759
  83. package/components/select/demo/keyboard-behavior.md +54 -9
  84. package/components/select/demo/pages.json +1 -1
  85. package/components/select/dist/index.js +76 -261
  86. package/components/select/dist/registered.js +76 -261
  87. package/components/select/dist/selectUtils.d.ts +12 -0
  88. package/custom-elements.json +2406 -4134
  89. package/package.json +4 -4
  90. package/components/checkbox/demo/why-checkbox.html +0 -57
  91. package/components/checkbox/demo/why-checkbox.md +0 -86
  92. package/components/combobox/demo/why-combobox.html +0 -57
  93. package/components/combobox/demo/why-combobox.md +0 -113
  94. package/components/counter/demo/why-counter.html +0 -57
  95. package/components/counter/demo/why-counter.md +0 -108
  96. package/components/datepicker/demo/customize.js +0 -19
  97. package/components/datepicker/demo/customize.min.js +0 -26655
  98. package/components/datepicker/demo/why-datepicker.html +0 -57
  99. package/components/datepicker/demo/why-datepicker.md +0 -133
  100. package/components/dropdown/demo/why-dropdown.html +0 -57
  101. package/components/dropdown/demo/why-dropdown.md +0 -97
  102. package/components/form/demo/why-form.html +0 -57
  103. package/components/form/demo/why-form.md +0 -101
  104. package/components/input/demo/why-input.html +0 -57
  105. package/components/input/demo/why-input.md +0 -121
  106. package/components/menu/demo/why-menu.html +0 -57
  107. package/components/menu/demo/why-menu.md +0 -104
  108. package/components/menu/dist/auro-menu.context.d.ts +0 -238
  109. package/components/radio/demo/customize.min.js +0 -2186
  110. package/components/radio/demo/demo-support.min.js +0 -55807
  111. package/components/radio/demo/getting-started.min.js +0 -2205
  112. package/components/radio/demo/why-radio.html +0 -57
  113. package/components/radio/demo/why-radio.md +0 -92
  114. package/components/select/demo/why-select.html +0 -57
  115. package/components/select/demo/why-select.md +0 -128
@@ -26,80 +26,29 @@ The clear button (shown when the input has a value) exposes:
26
26
  - Help text is associated with the component so screen readers can announce contextual guidance.
27
27
  - When validation fails, the error message is rendered with `role="alert"` and `aria-live="assertive"` to ensure it is announced immediately.
28
28
 
29
- <auro-header level="3" id="calendarGrid">Calendar Grid</auro-header>
30
- The calendar uses the WAI-ARIA grid pattern for screen reader navigation:
31
-
32
- | Attribute | Applied to | Description |
33
- |---|---|---|
34
- | `role="grid"` | Calendar table | Identifies the calendar as a grid. `aria-labelledby` points to the month heading. |
35
- | `role="rowgroup"` | Header / body groups | Groups the day-of-week header row and the week rows. |
36
- | `role="row"` | Week row | Groups each week of date cells. |
37
- | `role="columnheader"` | Day-of-week header | Each day-of-week abbreviation. Rendered as an `<abbr>` element with the full day name in the `title` attribute so screen readers can announce the expanded form. |
38
- | `role="gridcell"` | In-range date cell, active-descendant proxy | Each selectable date cell. Includes `aria-selected`, `aria-current="date"` (for today), and a visually-hidden text label. A proxy `<span>` inside the calendar grid wrapper mirrors the active cell's ARIA attributes for `aria-activedescendant`. |
39
- | `role="presentation"` | Out-of-range date cell | Cells outside the valid min/max range. Also receive `aria-hidden="true"` and `tabindex="-1"` to remove them from both the accessibility tree and the tab order. |
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
- | `aria-selected` | Date cell button | `"true"` for the selected date(s), `"false"` for all other in-range cells. |
42
- | Accessible name | Date cell button | Provided via visually-hidden text content (not an `aria-label` attribute). 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
-
44
29
  <auro-header level="2" id="focusManagement">Focus Management</auro-header>
45
30
  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
31
 
47
- <auro-header level="3" id="ariaActivedescendant">aria-activedescendant</auro-header>
48
- The calendar grid uses an **`aria-activedescendant`** pattern for keyboard navigation. DOM focus remains on a wrapper element (`#calendarGrid`) while `aria-activedescendant` points to a proxy `<span>` that mirrors the active cell's ARIA attributes (`aria-label`, `aria-selected`, `aria-current`, `aria-disabled`). This approach keeps the screen reader in sync with the visually active cell without moving DOM focus on every keystroke, which prevents duplicate announcements during rapid arrow-key navigation.
49
-
50
- The active cell receives a `.visualFocus` 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
-
52
- The initial active cell is determined in priority order:
53
-
54
- 1. The currently selected date (if within the valid range).
55
- 2. Today's date (if enabled).
56
- 3. The first future enabled date.
57
- 4. The first past enabled date.
58
-
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 `aria-activedescendant` attribute points to a proxy element that carries the active date cell's label, so screen readers announce the active date. This applies to both desktop and fullscreen modes.
32
+ When the calendar bib opens on small viewports as a fullscreen modal dialog, focus is moved to the dialog's close button, giving screen reader users an immediate action to dismiss it.
61
33
 
62
34
  <auro-header level="2" id="screenReaderAnnouncements">Screen Reader Announcements</auro-header>
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.
64
- - **Debounced navigation announcement** — During arrow-key navigation, a debounced live region (150 ms) announces the full date context (date, slot content, range position, availability) after the user pauses. This prevents overlapping announcements during rapid navigation.
65
- - **Date cell labels** — Each date cell contains a visually-hidden `<span class="srOnly">` with the full localized label, including any date slot content (e.g. prices). VoiceOver reads this content instead of `aria-label`, which iOS VoiceOver does not reliably announce on buttons.
66
35
  - **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
36
  - **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
37
 
69
38
  <auro-header level="2" id="accessibleLabels">Accessible Labels</auro-header>
70
- - 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`).
39
+ - The `fromLabel` slot content is used as the accessible name for the first date input.
71
40
  - When `range` is set, the `toLabel` slot content provides the accessible name for the second date input.
72
41
  - The `label` slot is used as the main label when `layout="snowflake"`.
73
- - The `ariaLabel.bib.close` slot customizes the close button label in fullscreen mode (defaults to "Close").
74
- - The `ariaLabel.input.clear` slot customizes the clear button label (falls back to a localized default).
75
42
  - A label is required. Without it, assistive technology users will not have context for what the datepicker controls.
76
43
 
77
- <auro-header level="3" id="rangeLabels">Configurable Range Labels</auro-header>
78
- When `range` is set, each date cell's label includes its position relative to the selected range. These labels are configurable via attributes for localization:
79
-
80
- | Attribute | Default | Description |
81
- |---|---|---|
82
- | `rangeLabelStart` | "range start" | Announced for the range start date. |
83
- | `rangeLabelEnd` | "range end" | Announced for the range end date. |
84
- | `rangeLabelBeforeRange` | "before range" | Announced for dates before the range start. |
85
- | `rangeLabelInRange` | "in range" | Announced for dates within the selected range. |
86
- | `rangeLabelAfterRange` | "after range" | Announced for dates after the range (or after start when no end is selected). |
87
-
88
44
  <auro-header level="2" id="fullscreenBehavior">Fullscreen (Modal) Behavior</auro-header>
89
45
  On smaller viewports, the calendar bib opens as a fullscreen modal dialog:
90
46
 
91
47
  - The dialog is opened with `showModal()`, which provides **native focus trapping** — only elements inside the dialog are reachable via Tab.
92
48
  - Content outside the dialog is automatically made **inert** by the browser, preventing interaction with the page behind it.
93
- - The trigger input is set to `inert` while the fullscreen dialog is open, preventing VoiceOver from reaching it behind the dialog.
49
+ - A close button inside the dialog is focused when the modal opens, giving screen reader users an immediate action to dismiss it.
94
50
  - Touch scrolling on the page behind the dialog is blocked to prevent the background from scrolling into view.
95
51
 
96
- <auro-header level="2" id="desktopModalBehavior">Desktop Modal Behavior</auro-header>
97
- On larger viewports, the datepicker opens as a popover with modal-like focus management:
98
-
99
- - Sibling elements of the dropdown host are set to `inert`, preventing interaction with the rest of the page while the calendar is open.
100
- - Tab and Shift+Tab are trapped within the bib content, wrapping focus between the first and last focusable elements.
101
- - Inertness and focus trapping are cleaned up when the bib closes or the component is disconnected.
102
-
103
52
  <auro-header level="2" id="reducedMotion">Reduced Motion</auro-header>
104
53
  The component respects the `prefers-reduced-motion` media query. When the user has requested reduced motion, scroll animations use instant scrolling instead of smooth scrolling.
105
54
 
@@ -11,8 +11,6 @@ The `auro-datepicker` component provides users with a way to select a date or da
11
11
  |-----------------------------------|-----------------------------------|-----------|--------------------------------------------------|--------------------------------------------------|--------------------------------------------------|
12
12
  | `appearance` | `appearance` | | `string` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
13
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). |
15
- | `blackoutLabel` | `blackoutLabel` | | `string` | "unavailable" | Label announced for blackout (disabled but in-range) date cells. |
16
14
  | `calendarEndDate` | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
17
15
  | `calendarFocusDate` | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
18
16
  | `calendarStartDate` | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
@@ -29,8 +27,6 @@ The `auro-datepicker` component provides users with a way to select a date or da
29
27
  | `maxDate` | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
30
28
  | `minDate` | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
31
29
  | `monthNames` | `monthNames` | | `array` | ["January","February","March","April","May","June","July","August","September","October","November","December"] | Names of all 12 months to render in the calendar, used for localization of date string in mobile layout. |
32
- | `navLabelNextMonth` | `navLabelNextMonth` | | `string` | "Next month" | Accessible label for the next month navigation button. |
33
- | `navLabelPrevMonth` | `navLabelPrevMonth` | | `string` | "Previous month" | Accessible label for the previous month navigation button. |
34
30
  | `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`. |
35
31
  | `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
36
32
  | `offset` | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
@@ -39,15 +35,10 @@ The `auro-datepicker` component provides users with a way to select a date or da
39
35
  | `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. |
40
36
  | `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. |
41
37
  | `range` | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
42
- | `rangeLabelAfterRange` | `rangeLabelAfterRange` | | `string` | "after range" | Label announced for cells after the range (or after start when no end is selected). |
43
- | `rangeLabelBeforeRange` | `rangeLabelBeforeRange` | | `string` | "before range" | Label announced for cells before the range start. |
44
- | `rangeLabelEnd` | `rangeLabelEnd` | | `string` | "range end" | Label announced for the range end date cell. |
45
- | `rangeLabelInRange` | `rangeLabelInRange` | | `string` | "in range" | Label announced for cells within the selected range. |
46
- | `rangeLabelStart` | `rangeLabelStart` | | `string` | "range start" | Label announced for the range start date cell. |
47
38
  | `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 dates in the format of `MM/DD/YYYY`. |
48
39
  | `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
49
40
  | `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
50
- | `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. |
41
+ | `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
51
42
  | `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
52
43
  | `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
53
44
  | `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
@@ -83,7 +74,7 @@ The `auro-datepicker` component provides users with a way to select a date or da
83
74
  | `auroDatePicker-newSlotContent` | `CustomEvent<any>` | Notifies that new slot content has been added to the datepicker. |
84
75
  | `auroDatePicker-toggled` | `CustomEvent<{ expanded: any; }>` | Notifies that the calendar dropdown has been opened/closed. |
85
76
  | `auroDatePicker-valueSet` | | Notifies that the component has a new value set. |
86
- | `auroFormElement-validated` | `CustomEvent<{ validity: any; message: any; }>` | Notifies that the component value(s) have been validated. |
77
+ | `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
87
78
  | `input` | | |
88
79
 
89
80
  ## Slots
@@ -44,8 +44,6 @@
44
44
  <script type="module">
45
45
  import { renderPage } from './demo-support.min.js';
46
46
  await renderPage('./customize.md');
47
- import { initExamples } from "./customize.min.js";
48
- initExamples();
49
47
  </script>
50
48
 
51
49
  <!-- Component scripts -->
@@ -695,70 +695,13 @@
695
695
  </auro-accordion>
696
696
  <auro-header level="3" id="localization">Localization</auro-header>
697
697
  <p>Use the <code>centralDate</code>, locale, and related attributes to configure the datepicker for different regions and languages.</p>
698
- <auro-header level="4" id="rangeLabels">Screen Reader Labels</auro-header>
699
- <p>The following attributes customize the labels announced by screen readers when navigating the calendar. Range labels apply when the <code>range</code> attribute is set; navigation labels apply to all configurations.</p>
700
- <auro-table>
701
- <table>
702
- <thead>
703
- <tr>
704
- <th>Attribute</th>
705
- <th>Default</th>
706
- <th>Description</th>
707
- </tr>
708
- </thead>
709
- <tbody>
710
- <tr>
711
- <td><code>rangeLabelStart</code></td>
712
- <td>"range start"</td>
713
- <td>Announced on the departure/start date cell.</td>
714
- </tr>
715
- <tr>
716
- <td><code>rangeLabelEnd</code></td>
717
- <td>"range end"</td>
718
- <td>Announced on the return/end date cell.</td>
719
- </tr>
720
- <tr>
721
- <td><code>rangeLabelBeforeRange</code></td>
722
- <td>"before range"</td>
723
- <td>Announced on cells before the start date.</td>
724
- </tr>
725
- <tr>
726
- <td><code>rangeLabelInRange</code></td>
727
- <td>"in range"</td>
728
- <td>Announced on cells between the start and end dates.</td>
729
- </tr>
730
- <tr>
731
- <td><code>rangeLabelAfterRange</code></td>
732
- <td>"after range"</td>
733
- <td>Announced on cells after the end date (or after start when no end is selected).</td>
734
- </tr>
735
- <tr>
736
- <td><code>navLabelPrevMonth</code></td>
737
- <td>"Previous month"</td>
738
- <td>Accessible label for the previous month navigation button.</td>
739
- </tr>
740
- <tr>
741
- <td><code>navLabelNextMonth</code></td>
742
- <td>"Next month"</td>
743
- <td>Accessible label for the next month navigation button.</td>
744
- </tr>
745
- </tbody>
746
- </table>
747
- </auro-table>
748
698
  <div class="exampleWrapper">
749
699
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization.html) -->
750
700
  <!-- The below content is automatically added from ./../apiExamples/localization.html -->
751
- <auro-datepicker range
752
- rangeLabelStart="fecha de salida"
753
- rangeLabelEnd="fecha de regreso"
754
- rangeLabelBeforeRange="antes de la salida"
755
- rangeLabelInRange="entre vuelos"
756
- rangeLabelAfterRange="después del regreso"
757
- navLabelPrevMonth="Ir al mes anterior"
758
- navLabelNextMonth="Ir al mes siguiente"
759
- id="localizationExample">
760
- <span slot="fromLabel">Salida</span>
761
- <span slot="toLabel">Regreso</span>
701
+ <auro-datepicker format="yyyy/mm/dd" id="localizationExample">
702
+ <span slot="bib.fullscreen.headline">Localization Headline</span>
703
+ <span slot="fromLabel">Choose a date</span>
704
+ <span slot="bib.fullscreen.fromLabel">Choose a date</span>
762
705
  </auro-datepicker>
763
706
  <!-- AURO-GENERATED-CONTENT:END -->
764
707
  </div>
@@ -767,17 +710,10 @@
767
710
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.html) -->
768
711
  <!-- The below code snippet is automatically added from ./../apiExamples/localization.html -->
769
712
 
770
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker range
771
- rangeLabelStart="fecha de salida"
772
- rangeLabelEnd="fecha de regreso"
773
- rangeLabelBeforeRange="antes de la salida"
774
- rangeLabelInRange="entre vuelos"
775
- rangeLabelAfterRange="después del regreso"
776
- navLabelPrevMonth="Ir al mes anterior"
777
- navLabelNextMonth="Ir al mes siguiente"
778
- id="localizationExample"&gt;
779
- &lt;span slot="fromLabel"&gt;Salida&lt;/span&gt;
780
- &lt;span slot="toLabel"&gt;Regreso&lt;/span&gt;
713
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker format="yyyy/mm/dd" id="localizationExample"&gt;
714
+ &lt;span slot="bib.fullscreen.headline"&gt;Localization Headline&lt;/span&gt;
715
+ &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
716
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
781
717
  &lt;/auro-datepicker&gt;</code></pre>
782
718
  <!-- AURO-GENERATED-CONTENT:END -->
783
719
  </auro-accordion>
@@ -35,13 +35,11 @@
35
35
  </li>
36
36
  </ul>
37
37
  <auro-header level="4" id="calendar">Calendar</auro-header>
38
- <p>The calendar displays one or more months in a grid layout. Users interact with the calendar by clicking, tapping, or using arrow keys to navigate date cells and Enter/Space to select. The calendar supports:</p>
38
+ <p>The calendar displays one or more months in a grid layout. Users interact with the calendar by clicking on individual date cells. The calendar supports:</p>
39
39
  <ul>
40
40
  <li>Navigating between months using previous/next arrows.</li>
41
- <li>Arrow-key navigation between date cells with automatic cross-month boundary handling.</li>
42
41
  <li>Date range highlighting when <code>range</code> is set.</li>
43
42
  <li>Disabled dates outside the <code>minDate</code>/<code>maxDate</code> bounds.</li>
44
- <li>Blackout dates that are focusable but not selectable.</li>
45
43
  <li>Custom cell content via the <code>date_MM_DD_YYYY</code> slot.</li>
46
44
  <li>Cell popovers via the <code>popover_MM_DD_YYYY</code> slot.</li>
47
45
  </ul>
@@ -1,5 +1,4 @@
1
1
  import { AuroDatePicker } from '../src/auro-datepicker.js';
2
- import { blackoutLabelExample } from '../apiExamples/blackout-label.js';
3
2
 
4
3
  AuroDatePicker.register(); // registering to auro-datepicker
5
4
  AuroDatePicker.register('custom-datepicker');
@@ -8,10 +7,7 @@ export function initExamples(initCount) {
8
7
  initCount = initCount || 0;
9
8
 
10
9
  try {
11
- // Only run when the demo element exists on the current page
12
- if (document.querySelector('#blackoutLabelExample')) {
13
- blackoutLabelExample();
14
- }
10
+ // example();
15
11
  } catch {
16
12
  if (initCount <= 20) {
17
13
  // setTimeout handles issue where content is sometimes loaded after the functions get called
@@ -10,8 +10,6 @@
10
10
  <auro-anchorlink fluid href="#selectRange" class="level2 body-xs">Select a Range</auro-anchorlink>
11
11
  <auro-anchorlink fluid href="#presetValue" class="level2 body-xs">Preset Value</auro-anchorlink>
12
12
  <auro-anchorlink fluid href="#skipSelection" class="level2 body-xs">Skip Selection</auro-anchorlink>
13
- <auro-anchorlink fluid href="#popoverSlot" class="level2 body-xs">Date Popover</auro-anchorlink>
14
- <auro-anchorlink fluid href="#blackoutDates" class="level2 body-xs">Blackout Dates</auro-anchorlink>
15
13
  <auro-anchorlink fluid href="#viewportSize" class="level2 body-xs">Viewport Size</auro-anchorlink>
16
14
  </auro-nav>
17
15
  </nav>
@@ -40,21 +38,15 @@
40
38
  Click the input or press <kbd>Enter</kbd> / <kbd>Space</kbd> to open the calendar
41
39
  <div class="note">
42
40
  <p>
43
- The calendar bib opens and displays the current month. The focused cell is determined in the following priority order:
41
+ The calendar bib opens and displays the current month. Focus moves into the calendar on the current date or, if a <code>calendarFocusDate</code> is set, on that date.
44
42
  </p>
45
- <ol>
46
- <li>The currently selected date (if one exists and is within the valid min/max range).</li>
47
- <li>Today's date (if it is enabled — within the min/max range).</li>
48
- <li>The first future enabled date.</li>
49
- <li>The first past enabled date.</li>
50
- </ol>
51
43
  </div>
52
44
  </li>
53
45
  <li>
54
46
  Select a date by clicking a calendar cell or by typing a date directly into the input
55
47
  <div class="note">
56
48
  <p>
57
- When a valid date is selected, the <code>value</code> property is updated. The calendar remains open so additional dates can be reviewed. Close the calendar by pressing Escape or activating the Done button. If the user types a date, it must match the configured <code>format</code> (default <code>mm/dd/yyyy</code>).
49
+ When a valid date is selected, the <code>value</code> property is updated and the calendar closes (on desktop). If the user types a date, it must match the configured <code>format</code> (default <code>mm/dd/yyyy</code>).
58
50
  </p>
59
51
  </div>
60
52
  </li>
@@ -175,81 +167,6 @@
175
167
  <auro-header level="3" id="skipSelection">Skip selection</auro-header>
176
168
  <p>The datepicker does not force the user to select a date. If no selection is made and the field is not <code>required</code>, the user can move past the datepicker without entering a value.</p>
177
169
  <p>If the field is <code>required</code>, moving focus away without selecting a date triggers validation and renders the <code>valueMissing</code> error state.</p>
178
- <auro-header level="3" id="popoverSlot">Popover slot</auro-header>
179
- <p>Use the <code>popover_MM_DD_YYYY</code> slot to display additional information when the user hovers over a calendar cell. This is useful for showing pricing, availability, or other contextual details for specific dates.</p>
180
- <div class="exampleWrapper">
181
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/popover-slot.html) -->
182
- <!-- The below content is automatically added from ./../apiExamples/popover-slot.html -->
183
- <auro-datepicker centralDate="12/03/2023" calendarStartDate="12/01/2023" calendarEndDate="12/31/2023" minDate="12/04/2023" maxDate="12/09/2023">
184
- <span slot="bib.fullscreen.headline">Popover Slot Example</span>
185
- <span slot="fromLabel">Choose a date</span>
186
- <span slot="bib.fullscreen.fromLabel">Choose a date</span>
187
- <span slot="popover_12_03_2023">Tickets for this day are sold out</span>
188
- <span slot="date_12_03_2023">$560</span>
189
- <span slot="popover_12_04_2023">34 seats available</span>
190
- <span slot="date_12_04_2023">$245</span>
191
- <span slot="popover_12_05_2023">18 seats available</span>
192
- <span slot="date_12_05_2023">$312</span>
193
- <span slot="popover_12_06_2023">Tickets for this day are sold out</span>
194
- <span slot="date_12_06_2023">$489</span>
195
- <span slot="popover_12_07_2023">52 seats available</span>
196
- <span slot="date_12_07_2023">$198</span>
197
- <span slot="popover_12_08_2023">7 seats available</span>
198
- <span slot="date_12_08_2023">$375</span>
199
- <span slot="popover_12_09_2023">41 seats available</span>
200
- <span slot="date_12_09_2023">$220</span>
201
- </auro-datepicker>
202
- <!-- AURO-GENERATED-CONTENT:END -->
203
- </div>
204
- <auro-accordion alignRight>
205
- <span slot="trigger">See code</span>
206
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/popover-slot.html) -->
207
- <!-- The below code snippet is automatically added from ./../apiExamples/popover-slot.html -->
208
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker centralDate="12/03/2023" calendarStartDate="12/01/2023" calendarEndDate="12/31/2023" minDate="12/04/2023" maxDate="12/09/2023"&gt;
209
- &lt;span slot="bib.fullscreen.headline"&gt;Popover Slot Example&lt;/span&gt;
210
- &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
211
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
212
- &lt;span slot="popover_12_03_2023"&gt;Tickets for this day are sold out&lt;/span&gt;
213
- &lt;span slot="date_12_03_2023"&gt;$560&lt;/span&gt;
214
- &lt;span slot="popover_12_04_2023"&gt;34 seats available&lt;/span&gt;
215
- &lt;span slot="date_12_04_2023"&gt;$245&lt;/span&gt;
216
- &lt;span slot="popover_12_05_2023"&gt;18 seats available&lt;/span&gt;
217
- &lt;span slot="date_12_05_2023"&gt;$312&lt;/span&gt;
218
- &lt;span slot="popover_12_06_2023"&gt;Tickets for this day are sold out&lt;/span&gt;
219
- &lt;span slot="date_12_06_2023"&gt;$489&lt;/span&gt;
220
- &lt;span slot="popover_12_07_2023"&gt;52 seats available&lt;/span&gt;
221
- &lt;span slot="date_12_07_2023"&gt;$198&lt;/span&gt;
222
- &lt;span slot="popover_12_08_2023"&gt;7 seats available&lt;/span&gt;
223
- &lt;span slot="date_12_08_2023"&gt;$375&lt;/span&gt;
224
- &lt;span slot="popover_12_09_2023"&gt;41 seats available&lt;/span&gt;
225
- &lt;span slot="date_12_09_2023"&gt;$220&lt;/span&gt;
226
- &lt;/auro-datepicker&gt;</code></pre>
227
- <!-- AURO-GENERATED-CONTENT:END -->
228
- </auro-accordion>
229
- <auro-header level="3" id="blackoutDates">Blackout dates with custom label</auro-header>
230
- <p>Use the <code>blackoutLabel</code> attribute to customize the screen reader announcement for blackout (disabled but in-range) dates. The default label is <code>"unavailable"</code>. This is useful when you want to provide more context about why a date cannot be selected, such as <code>"sold out"</code>.</p>
231
- <p>When a user types a blackout date into the input, the datepicker validates the entry and displays a <code>customError</code> message. The default message is <code>"Selected date is unavailable"</code>. Use the <code>setCustomValidityCustomError</code> attribute to provide a custom error message, for example <code>setCustomValidityCustomError="That date is sold out"</code>.</p>
232
- <div class="exampleWrapper">
233
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/blackout-label.html) -->
234
- <!-- The below content is automatically added from ./../apiExamples/blackout-label.html -->
235
- <auro-datepicker id="blackoutLabelExample" range blackoutLabel="sold out">
236
- <span slot="fromLabel">Choose a start date</span>
237
- <span slot="toLabel">Choose an end date</span>
238
- <span slot="bib.fullscreen.fromLabel">Choose a date</span>
239
- </auro-datepicker>
240
- <!-- AURO-GENERATED-CONTENT:END -->
241
- </div>
242
- <auro-accordion alignRight>
243
- <span slot="trigger">See code</span>
244
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/blackout-label.html) -->
245
- <!-- The below code snippet is automatically added from ./../apiExamples/blackout-label.html -->
246
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker id="blackoutLabelExample" range blackoutLabel="sold out"&gt;
247
- &lt;span slot="fromLabel"&gt;Choose a start date&lt;/span&gt;
248
- &lt;span slot="toLabel"&gt;Choose an end date&lt;/span&gt;
249
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
250
- &lt;/auro-datepicker&gt;</code></pre>
251
- <!-- AURO-GENERATED-CONTENT:END -->
252
- </auro-accordion>
253
170
  <auro-header level="3" id="viewportSize">Viewport size</auro-header>
254
171
  <p>The datepicker automatically adapts its presentation based on viewport size. On larger screens, the calendar opens in a floating popover anchored to the trigger. On smaller screens, the calendar opens in a fullscreen dialog.</p>
255
172
  <p>The breakpoint at which the fullscreen behavior activates is controlled by the <code>fullscreenBreakpoint</code> attribute. The default value is <code>sm</code>. Supported values are <code>xs</code>, <code>sm</code>, <code>md</code>, <code>lg</code>, <code>xl</code>, and <code>disabled</code>.</p>