@aurodesignsystem-dev/auro-formkit 0.0.0-pr1497.0 → 0.0.0-pr1497.2

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 (132) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
  2. package/components/bibtemplate/dist/index.js +9 -1
  3. package/components/bibtemplate/dist/registered.js +9 -1
  4. package/components/checkbox/demo/css-only.html +57 -0
  5. package/components/checkbox/demo/css-only.md +146 -0
  6. package/components/checkbox/demo/customize.min.js +1 -1
  7. package/components/checkbox/demo/getting-started.min.js +1 -1
  8. package/components/checkbox/demo/index.min.js +1 -1
  9. package/components/checkbox/demo/pages.json +1 -1
  10. package/components/checkbox/demo/styles.min.css +1 -1
  11. package/components/checkbox/demo/why-checkbox.html +57 -0
  12. package/components/checkbox/demo/why-checkbox.md +86 -0
  13. package/components/checkbox/dist/index.js +1 -1
  14. package/components/checkbox/dist/registered.js +1 -1
  15. package/components/combobox/demo/css-only.html +57 -0
  16. package/components/combobox/demo/css-only.md +209 -0
  17. package/components/combobox/demo/customize.min.js +250 -16
  18. package/components/combobox/demo/getting-started.min.js +250 -16
  19. package/components/combobox/demo/index.min.js +250 -16
  20. package/components/combobox/demo/pages.json +1 -1
  21. package/components/combobox/demo/styles.min.css +1 -1
  22. package/components/combobox/demo/why-combobox.html +57 -0
  23. package/components/combobox/demo/why-combobox.md +113 -0
  24. package/components/combobox/dist/index.js +250 -16
  25. package/components/combobox/dist/registered.js +250 -16
  26. package/components/counter/demo/css-only.html +57 -0
  27. package/components/counter/demo/css-only.md +184 -0
  28. package/components/counter/demo/customize.min.js +249 -15
  29. package/components/counter/demo/index.min.js +249 -15
  30. package/components/counter/demo/keyboard-behavior.md +1 -0
  31. package/components/counter/demo/pages.json +1 -1
  32. package/components/counter/demo/styles.min.css +1 -1
  33. package/components/counter/demo/why-counter.html +57 -0
  34. package/components/counter/demo/why-counter.md +108 -0
  35. package/components/counter/dist/index.js +10 -2
  36. package/components/counter/dist/registered.js +10 -2
  37. package/components/datepicker/demo/accessibility.md +54 -3
  38. package/components/datepicker/demo/api.md +63 -53
  39. package/components/datepicker/demo/css-only.html +57 -0
  40. package/components/datepicker/demo/css-only.md +151 -0
  41. package/components/datepicker/demo/customize.html +2 -0
  42. package/components/datepicker/demo/customize.js +19 -0
  43. package/components/datepicker/demo/customize.md +56 -0
  44. package/components/datepicker/demo/customize.min.js +36147 -0
  45. package/components/datepicker/demo/design.md +3 -1
  46. package/components/datepicker/demo/index.js +5 -1
  47. package/components/datepicker/demo/index.md +104 -15
  48. package/components/datepicker/demo/index.min.js +2485 -261
  49. package/components/datepicker/demo/keyboard-behavior.md +201 -2
  50. package/components/datepicker/demo/pages.json +1 -1
  51. package/components/datepicker/demo/styles.min.css +1 -1
  52. package/components/datepicker/demo/voiceover.md +21 -12
  53. package/components/datepicker/demo/why-datepicker.html +57 -0
  54. package/components/datepicker/demo/why-datepicker.md +133 -0
  55. package/components/datepicker/dist/index.js +2348 -211
  56. package/components/datepicker/dist/registered.js +2348 -211
  57. package/components/datepicker/dist/src/auro-calendar-cell.d.ts +113 -13
  58. package/components/datepicker/dist/src/auro-calendar-month.d.ts +38 -1
  59. package/components/datepicker/dist/src/auro-calendar.d.ts +258 -0
  60. package/components/datepicker/dist/src/auro-datepicker.d.ts +141 -41
  61. package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
  62. package/components/dropdown/demo/accessibility.md +11 -0
  63. package/components/dropdown/demo/api.md +1 -0
  64. package/components/dropdown/demo/css-only.html +57 -0
  65. package/components/dropdown/demo/css-only.md +219 -0
  66. package/components/dropdown/demo/customize.md +3 -0
  67. package/components/dropdown/demo/customize.min.js +239 -13
  68. package/components/dropdown/demo/getting-started.min.js +239 -13
  69. package/components/dropdown/demo/index.min.js +239 -13
  70. package/components/dropdown/demo/keyboard-behavior.md +1 -0
  71. package/components/dropdown/demo/pages.json +1 -1
  72. package/components/dropdown/demo/styles.min.css +1 -1
  73. package/components/dropdown/demo/why-dropdown.html +57 -0
  74. package/components/dropdown/demo/why-dropdown.md +97 -0
  75. package/components/dropdown/dist/auro-dropdown.d.ts +34 -1
  76. package/components/dropdown/dist/index.js +239 -13
  77. package/components/dropdown/dist/registered.js +239 -13
  78. package/components/form/demo/css-only.html +57 -0
  79. package/components/form/demo/css-only.md +156 -0
  80. package/components/form/demo/customize.min.js +3098 -259
  81. package/components/form/demo/getting-started.min.js +3098 -259
  82. package/components/form/demo/index.min.js +3098 -259
  83. package/components/form/demo/pages.json +1 -1
  84. package/components/form/demo/registerDemoDeps.min.js +3098 -259
  85. package/components/form/demo/styles.min.css +1 -1
  86. package/components/form/demo/why-form.html +57 -0
  87. package/components/form/demo/why-form.md +101 -0
  88. package/components/input/demo/css-only.html +57 -0
  89. package/components/input/demo/css-only.md +199 -0
  90. package/components/input/demo/customize.min.js +1 -1
  91. package/components/input/demo/getting-started.min.js +1 -1
  92. package/components/input/demo/index.min.js +1 -1
  93. package/components/input/demo/pages.json +1 -1
  94. package/components/input/demo/styles.min.css +1 -1
  95. package/components/input/demo/why-input.html +57 -0
  96. package/components/input/demo/why-input.md +121 -0
  97. package/components/input/dist/index.js +1 -1
  98. package/components/input/dist/registered.js +1 -1
  99. package/components/menu/demo/css-only.html +57 -0
  100. package/components/menu/demo/css-only.md +166 -0
  101. package/components/menu/demo/pages.json +1 -1
  102. package/components/menu/demo/styles.min.css +1 -1
  103. package/components/menu/demo/why-menu.html +57 -0
  104. package/components/menu/demo/why-menu.md +104 -0
  105. package/components/radio/demo/css-only.html +57 -0
  106. package/components/radio/demo/css-only.md +151 -0
  107. package/components/radio/demo/customize.min.js +1764 -0
  108. package/components/radio/demo/demo-support.min.js +55807 -0
  109. package/components/radio/demo/getting-started.js +1 -1
  110. package/components/radio/demo/getting-started.md +1 -1
  111. package/components/radio/demo/getting-started.min.js +1783 -0
  112. package/components/radio/demo/index.min.js +1 -1
  113. package/components/radio/demo/pages.json +1 -1
  114. package/components/radio/demo/styles.min.css +1 -1
  115. package/components/radio/demo/why-radio.html +57 -0
  116. package/components/radio/demo/why-radio.md +92 -0
  117. package/components/radio/dist/index.js +1 -1
  118. package/components/radio/dist/registered.js +1 -1
  119. package/components/select/demo/css-only.html +57 -0
  120. package/components/select/demo/css-only.md +203 -0
  121. package/components/select/demo/customize.min.js +249 -15
  122. package/components/select/demo/getting-started.min.js +249 -15
  123. package/components/select/demo/index.min.js +249 -15
  124. package/components/select/demo/keyboard-behavior.md +1 -0
  125. package/components/select/demo/pages.json +1 -1
  126. package/components/select/demo/styles.min.css +1 -1
  127. package/components/select/demo/why-select.html +57 -0
  128. package/components/select/demo/why-select.md +128 -0
  129. package/components/select/dist/index.js +249 -15
  130. package/components/select/dist/registered.js +249 -15
  131. package/custom-elements.json +1171 -92
  132. package/package.json +8 -8
@@ -1049,7 +1049,7 @@ class AuroHelpText extends LitElement {
1049
1049
  }
1050
1050
  }
1051
1051
 
1052
- var formkitVersion = '202606081518';
1052
+ var formkitVersion = '202606081904';
1053
1053
 
1054
1054
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1055
1055
  // See LICENSE in the project root for license information.
@@ -1787,6 +1787,14 @@ class AuroBibtemplate extends LitElement {
1787
1787
  large: {
1788
1788
  type: Boolean,
1789
1789
  reflect: true
1790
+ },
1791
+
1792
+ /**
1793
+ * If declared, the footer slot will be rendered even when not in fullscreen mode.
1794
+ */
1795
+ showFooter: {
1796
+ type: Boolean,
1797
+ reflect: true
1790
1798
  }
1791
1799
  };
1792
1800
  }
@@ -1889,7 +1897,7 @@ class AuroBibtemplate extends LitElement {
1889
1897
  <slot></slot>
1890
1898
  </div>
1891
1899
 
1892
- ${this.isFullscreen ? html`
1900
+ ${this.isFullscreen || this.showFooter ? html`
1893
1901
  <div id="footerContainer">
1894
1902
  <slot name="footer"></slot>
1895
1903
  </div>` : null}
@@ -1049,7 +1049,7 @@ class AuroHelpText extends LitElement {
1049
1049
  }
1050
1050
  }
1051
1051
 
1052
- var formkitVersion = '202606081518';
1052
+ var formkitVersion = '202606081904';
1053
1053
 
1054
1054
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1055
1055
  // See LICENSE in the project root for license information.
@@ -1787,6 +1787,14 @@ class AuroBibtemplate extends LitElement {
1787
1787
  large: {
1788
1788
  type: Boolean,
1789
1789
  reflect: true
1790
+ },
1791
+
1792
+ /**
1793
+ * If declared, the footer slot will be rendered even when not in fullscreen mode.
1794
+ */
1795
+ showFooter: {
1796
+ type: Boolean,
1797
+ reflect: true
1790
1798
  }
1791
1799
  };
1792
1800
  }
@@ -1889,7 +1897,7 @@ class AuroBibtemplate extends LitElement {
1889
1897
  <slot></slot>
1890
1898
  </div>
1891
1899
 
1892
- ${this.isFullscreen ? html`
1900
+ ${this.isFullscreen || this.showFooter ? html`
1893
1901
  <div id="footerContainer">
1894
1902
  <slot name="footer"></slot>
1895
1903
  </div>` : null}
@@ -26,29 +26,80 @@ 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. 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. The day-of-week header row is `aria-hidden="true"` (see below). |
36
+ | `role="row"` | Week row | Groups each week of date cells. |
37
+ | Day-of-week header | Day-of-week row | Rendered as visible `<abbr>` elements with the full day name in the `title` attribute, but the row is `aria-hidden="true"` since the per-cell accessible name already includes the weekday name. |
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
+
29
44
  <auro-header level="2" id="focusManagement">Focus Management</auro-header>
30
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).
31
46
 
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.
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 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
+
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.
33
61
 
34
62
  <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 has an `aria-label` on the host element 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.
35
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.
36
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.
37
68
 
38
69
  <auro-header level="2" id="accessibleLabels">Accessible Labels</auro-header>
39
- - The `fromLabel` slot content is used as the accessible name for the first date input.
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`).
40
71
  - When `range` is set, the `toLabel` slot content provides the accessible name for the second date input.
41
72
  - 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).
42
75
  - A label is required. Without it, assistive technology users will not have context for what the datepicker controls.
43
76
 
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
+
44
88
  <auro-header level="2" id="fullscreenBehavior">Fullscreen (Modal) Behavior</auro-header>
45
89
  On smaller viewports, the calendar bib opens as a fullscreen modal dialog:
46
90
 
47
91
  - The dialog is opened with `showModal()`, which provides **native focus trapping** — only elements inside the dialog are reachable via Tab.
48
92
  - Content outside the dialog is automatically made **inert** by the browser, preventing interaction with the page behind it.
49
- - A close button inside the dialog is focused when the modal opens, giving screen reader users an immediate action to dismiss it.
93
+ - The trigger input is set to `inert` while the fullscreen dialog is open, preventing VoiceOver from reaching it behind the dialog.
50
94
  - Touch scrolling on the page behind the dialog is blocked to prevent the background from scrolling into view.
51
95
 
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
+
52
103
  <auro-header level="2" id="reducedMotion">Reduced Motion</auro-header>
53
104
  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.
54
105
 
@@ -7,58 +7,68 @@ 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 | Description |
11
- |-----------------------------------|-----------------------------------|-----------|--------------------------------------------------|------------------|--------------------------------------------------|
12
- | `appearance` | `appearance` | | `string` | "'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
- | `calendarEndDate` | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
15
- | `calendarEndDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarEndDate`. Returns `undefined` when `calendarEndDate` is empty or not a valid date. |
16
- | `calendarFocusDate` | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
17
- | `calendarFocusDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarFocusDate`. Returns `undefined` when `calendarFocusDate` is empty or not a valid date. |
18
- | `calendarStartDate` | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
19
- | `calendarStartDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `calendarStartDate`. Returns `undefined` when `calendarStartDate` is empty or not a valid date. |
20
- | `centralDate` | `centralDate` | | `string` | | The date that determines the currently visible month. |
21
- | `centralDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `centralDate`. Returns `undefined` when `centralDate` is empty or not a valid date. |
22
- | `disabled` | `disabled` | | `boolean` | false | If set, disables the datepicker. |
23
- | `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. |
24
- | `error` | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
25
- | `format` | `format` | | `string` | | Specifies the date format. The default is `mm/dd/yyyy`. |
26
- | `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. |
27
- | `hasError` | | readonly | `boolean` | | Returns `true` when the datepicker has an active validation error. |
28
- | `inputmode` | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
29
- | `largeFullscreenHeadline` | `largeFullscreenHeadline` | | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
30
- | `layout` | `layout` | | `'classic' \| 'snowflake'` | "'classic'" | Sets the layout of the datepicker. |
31
- | `locale` | `locale` | | `string` | | Defines the locale of the element. Used to derive the date format when `format` is not explicitly set. |
32
- | `maxDate` | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
33
- | `maxDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `maxDate`. Returns `undefined` when `maxDate` is empty or not a valid date. |
34
- | `minDate` | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
35
- | `minDateObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `minDate`. Returns `undefined` when `minDate` is empty or not a valid date. |
36
- | `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`). |
37
- | `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`. |
38
- | `noValidate` | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
39
- | `offset` | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
40
- | `onDark` | `onDark` | | `boolean` | false | DEPRECATED - use `appearance="inverse"` instead. |
41
- | `placeholder` | `placeholder` | | `string` | | Placeholder text to display in the input(s) when no value is set. |
42
- | `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. |
43
- | `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. |
44
- | `range` | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
45
- | `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`). |
46
- | `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
47
- | `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
48
- | `setCustomValidityCustomError` | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
49
- | `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
50
- | `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
51
- | `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
52
- | `shape` | | | `string` | "classic" | |
53
- | `shift` | `shift` | | `boolean` | false | If declared, the dropdown will shift its position to avoid being cut off by the viewport. |
54
- | `size` | | | `string` | "lg" | |
55
- | `stacked` | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
56
- | `validity` | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
57
- | `value` | `value` | | `string` | "undefined" | Value selected for the datepicker. |
58
- | `valueEnd` | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
59
- | `valueEndObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `valueEnd`. Returns `undefined` when `valueEnd` is empty or not a valid date. |
60
- | `valueObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `value`. Returns `undefined` when `value` is empty or not a valid date. |
61
- | `values` | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
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). |
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 the range (or after start when no end is selected). |
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
+ | `rangeLabelInRange` | `rangeLabelInRange` | | `string` | "in range" | Label announced for cells within the selected range. |
54
+ | `rangeLabelStart` | `rangeLabelStart` | | `string` | "range start" | Label announced for the range start date cell. |
55
+ | `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`). |
56
+ | `required` | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
57
+ | `setCustomValidity` | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
58
+ | `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. |
59
+ | `setCustomValidityRangeOverflow` | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
60
+ | `setCustomValidityRangeUnderflow` | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
61
+ | `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
62
+ | `shape` | | | `string` | "classic" | |
63
+ | `shift` | `shift` | | `boolean` | false | If declared, the dropdown will shift its position to avoid being cut off by the viewport. |
64
+ | `size` | | | `string` | "lg" | |
65
+ | `stacked` | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
66
+ | `validity` | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
67
+ | `value` | `value` | | `string` | "undefined" | Value selected for the datepicker. |
68
+ | `valueEnd` | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
69
+ | `valueEndObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `valueEnd`. Returns `undefined` when `valueEnd` is empty or not a valid date. |
70
+ | `valueObject` | | readonly | `Date \| undefined` | | Read-only `Date` object derived from `value`. Returns `undefined` when `value` is empty or not a valid date. |
71
+ | `values` | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
62
72
 
63
73
  ## Methods
64
74
 
@@ -82,7 +92,7 @@ The `auro-datepicker` component provides users with a way to select a date or da
82
92
  | `auroDatePicker-monthChanged` | `CustomEvent<{ month: any; year: any; numCalendars: any; }>` | Notifies that the visible calendar month(s) have changed. |
83
93
  | `auroDatePicker-newSlotContent` | `CustomEvent<any>` | Notifies that new slot content has been added to the datepicker. |
84
94
  | `auroDatePicker-toggled` | `CustomEvent<{ expanded: any; }>` | Notifies that the calendar dropdown has been opened/closed. |
85
- | `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
95
+ | `auroFormElement-validated` | `CustomEvent<{ validity: any; message: any; }>` | Notifies that the component value(s) have been validated. |
86
96
  | `input` | `CustomEvent<any>` | |
87
97
 
88
98
  ## Slots
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3
+ See LICENSE in the project root for license information.
4
+
5
+ HTML in this document is standardized and NOT to be edited.
6
+ All demo code should be added/edited in ./demo/css-only.md
7
+
8
+ With the exception of adding custom elements if needed for the demo.
9
+
10
+ ----------------------- DO NOT EDIT -----------------------------
11
+
12
+ -->
13
+
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
+ <title>Auro Web Component Demo | auro-datepicker | CSS only</title>
20
+
21
+ <!-- highlight.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-datepicker's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
34
+ <link rel="stylesheet" type="text/css" href="./styles.min.css" />
35
+ <style>
36
+ table {
37
+ --ds-color-container-secondary-default: transparent;
38
+ }
39
+
40
+ tr:not(:last-of-type) {
41
+ border-bottom: 1px solid var(--ds-color-border-tertiary-default);
42
+ }
43
+ </style>
44
+ </head>
45
+ <body class="auro-markdown">
46
+ <main></main>
47
+
48
+ <script type="module">
49
+ import { renderPage } from './demo-support.min.js';
50
+ await renderPage('./css-only.md');
51
+ </script>
52
+
53
+ <!-- If additional elements are needed for the demo, add them here. -->
54
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
55
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
56
+ </body>
57
+ </html>
@@ -0,0 +1,151 @@
1
+ <auro-header level="1">CSS only with native date input</auro-header>
2
+ <p>For situations where the <code>&lt;auro-datepicker&gt;</code> web component cannot be used, a native HTML <code>&lt;input type="date"&gt;</code> element can be styled with the Auro Design System tokens to approximate the visual appearance of <code>auro-datepicker</code>. Unlike <auro-hyperlink href="https://auro.alaskaair.com/components/auro/hyperlink/css-only" target="_blank">auro-hyperlink</auro-hyperlink>, <auro-hyperlink href="https://alaskaairlines.github.io/WebCoreStyleSheets/" target="_blank">Web Core Style Sheets</auro-hyperlink> does not provide a prebuilt <code>.datepicker</code> class, so the styling must be authored manually using Auro design tokens.</p>
3
+ <auro-header level="2">Styling a native date input</auro-header>
4
+ <p>The native date input can be reset and restyled with the Auro design tokens published by <auro-hyperlink href="https://alaskaairlines.github.io/WebCoreStyleSheets/" target="_blank">@aurodesignsystem/design-tokens</auro-hyperlink>. The pattern below replicates the size, border, and focus-state colors used by <code>auro-datepicker</code>. Note that the browser-controlled calendar UI rendered by <code>&lt;input type="date"&gt;</code> cannot be styled — only the input chrome (the field itself) responds to CSS.</p>
5
+ <pre><code>@import "./node_modules/@aurodesignsystem/design-tokens/dist/tokens/CSSCustomProperties.css";
6
+
7
+ .datepicker {
8
+ appearance: none;
9
+ -webkit-appearance: none;
10
+ width: 100%;
11
+ height: var(--ds-size-600, 3rem);
12
+ padding: 0 var(--ds-size-200, 1rem);
13
+ border: 1px solid var(--ds-color-border-ui-default, #6e767f);
14
+ border-radius: var(--ds-border-radius, 4px);
15
+ background-color: var(--ds-color-container-primary-default, #ffffff);
16
+ color: var(--ds-color-text-primary-default, #1d252c);
17
+ font-family: var(--ds-font-family-default, sans-serif);
18
+ font-size: var(--ds-text-body-default-size, 1rem);
19
+ line-height: var(--ds-text-body-default-height, 1.5);
20
+ cursor: pointer;
21
+ }
22
+
23
+ .datepicker:focus-visible {
24
+ outline: 2px solid var(--ds-color-border-active-default, #01426a);
25
+ outline-offset: 2px;
26
+ }
27
+
28
+ .datepicker:disabled {
29
+ cursor: not-allowed;
30
+ opacity: 0.5;
31
+ }
32
+
33
+ .datepicker:invalid {
34
+ border-color: var(--ds-color-border-error-default, #d50000);
35
+ }</code></pre>
36
+ <auro-header level="3">Basic date input</auro-header>
37
+ <p>Apply the <code>.datepicker</code> class to a native <code>&lt;input type="date"&gt;</code> element and pair it with a <code>&lt;label&gt;</code>:</p>
38
+ <pre><code>&lt;label&gt;
39
+ Departure date
40
+ &lt;input type="date" class="datepicker" name="departure" /&gt;
41
+ &lt;/label&gt;</code></pre>
42
+ <auro-header level="3">Date range using two inputs</auro-header>
43
+ <p>HTML has no native range input, so a range must be approximated with two separate <code>&lt;input type="date"&gt;</code> elements. The <code>min</code> attribute on the second input can be used to constrain the return date to be on or after the departure date, but this coordination must be wired up with JavaScript:</p>
44
+ <pre><code>&lt;fieldset&gt;
45
+ &lt;legend&gt;Travel dates&lt;/legend&gt;
46
+ &lt;label&gt;
47
+ Departure
48
+ &lt;input type="date" class="datepicker" name="departure" id="departure" /&gt;
49
+ &lt;/label&gt;
50
+ &lt;label&gt;
51
+ Return
52
+ &lt;input type="date" class="datepicker" name="return" id="return" /&gt;
53
+ &lt;/label&gt;
54
+ &lt;/fieldset&gt;</code></pre>
55
+ <auro-header level="2">What you lose without auro-datepicker</auro-header>
56
+ <p>While the CSS above replicates the <strong>visual styling</strong> of the <code>auro-datepicker</code> input chrome, the following functionality built into the <code>auro-datepicker</code> web component is <strong>not available</strong> when using plain HTML:</p>
57
+ <auro-header level="3">Accessibility</auro-header>
58
+ <p>Native date inputs vary widely across browsers and platforms, with inconsistent screen reader announcements, keyboard behavior, and focus management. <code>auro-datepicker</code> provides full arrow-key navigation of the calendar grid, rich ARIA labels on every cell (including state like "selected", "today", "unavailable", "in range"), <code>aria-live</code> announcements when the visible month changes, support for <code>prefers-reduced-motion</code>, and managed focus when the calendar opens and closes. With a native input, all of this is delegated to the browser and often differs significantly between Chrome, Safari, and Firefox — sometimes with no keyboard navigation of the calendar grid at all.</p>
59
+ <auro-header level="3">Date range selection</auro-header>
60
+ <p>HTML has no native concept of a date range picker. Building one from two <code>&lt;input type="date"&gt;</code> elements requires custom logic for coordinating values, enforcing start-before-end ordering, and providing a unified visual experience. <code>auro-datepicker</code> handles this with a single <code>range</code> attribute, providing two coordinated input fields, visual range highlighting across the calendar grid, customizable ARIA labels for range positions, and automatic value coordination between the start and end dates.</p>
61
+ <auro-header level="3">Blackout dates</auro-header>
62
+ <p>Native date inputs have no mechanism to mark specific dates as unavailable. <code>min</code> and <code>max</code> can restrict to a contiguous range, but they cannot express "these specific dates within the range are not selectable." <code>auro-datepicker</code> supports a <code>blackoutDates</code> array of ISO date strings that are visually styled as unavailable, announced to screen readers with a customizable label, focusable but not selectable, and validated on typed input to surface a <code>customError</code> validity state.</p>
63
+ <auro-header level="3">Custom validation</auro-header>
64
+ <p>Native date validation is limited to <code>required</code>, <code>min</code>, and <code>max</code>, and error messages are browser-controlled. <code>auro-datepicker</code> integrates with the Auro form validation system, exposing per-constraint setters (<code>setCustomValidityValueMissing</code>, <code>setCustomValidityRangeOverflow</code>, <code>setCustomValidityRangeUnderflow</code>, <code>setCustomValidityCustomError</code>), running validation on blur, on value change, and when constraints change, dispatching <code>auroFormElement-validated</code> events, and displaying errors inline via the help text slot.</p>
65
+ <auro-header level="3">Responsive layout</auro-header>
66
+ <p>Native date inputs render a small, browser-controlled popup that cannot be styled or repositioned. <code>auro-datepicker</code> adapts to viewport size: on desktop the calendar appears as a positioned dropdown bib, with an optional <code>desktopModal</code> mode that traps focus and makes background content inert; on mobile it opens as a fullscreen dialog via <code>showModal()</code> with a configurable <code>fullscreenBreakpoint</code>; and on desktop range mode it can display two months side-by-side.</p>
67
+ <auro-header level="3">Localization</auro-header>
68
+ <p>Native <code>&lt;input type="date"&gt;</code> follows the browser's locale for display format but offers no control over month names, navigation labels, or ARIA text. <code>auro-datepicker</code> supports custom <code>monthNames</code> arrays for any language, localizable navigation labels (<code>navLabelPrevMonth</code>, <code>navLabelNextMonth</code>), localizable range position labels for screen readers, a customizable <code>blackoutLabel</code>, and a configurable date display format.</p>
69
+ <auro-header level="3">Custom cell content</auro-header>
70
+ <p>Native date inputs render a fixed grid of numbers, with no way to add prices, icons, or supplementary information to individual dates. <code>auro-datepicker</code> supports per-date slot content via <code>date_MM_DD_YYYY</code> slots for content rendered below each date number (e.g. flight prices) and <code>popover_MM_DD_YYYY</code> slots for content that appears on hover or focus for a specific date, enabling reference data alongside dates for decision-making.</p>
71
+ <auro-header level="3">Design system integration</auro-header>
72
+ <p>A native <code>&lt;input type="date"&gt;</code> cannot be styled to match a design system — shadow DOM browser controls resist CSS customization and the calendar popup is entirely outside author control. <code>auro-datepicker</code> is built with the Auro Design System, providing consistent visual language with other Auro form components, light and dark theme support (<code>appearance="default"</code> or <code>appearance="inverse"</code>), CSS custom properties and <code>::part()</code> selectors for targeted styling, and composition from versioned Auro sub-components (dropdown, input, button, icon).</p>
73
+ <auro-header level="2">Summary</auro-header>
74
+ <table>
75
+ <thead>
76
+ <tr>
77
+ <th>Feature</th>
78
+ <th>Native <code>&lt;input type="date"&gt;</code> with Auro tokens</th>
79
+ <th><code>auro-datepicker</code></th>
80
+ </tr>
81
+ </thead>
82
+ <tbody>
83
+ <tr>
84
+ <td>Design-system-aligned styling</td>
85
+ <td>Input chrome only (author-written CSS)</td>
86
+ <td>Built-in across input and calendar</td>
87
+ </tr>
88
+ <tr>
89
+ <td>Calendar UI styling</td>
90
+ <td>Not possible (browser-controlled)</td>
91
+ <td>Full control via tokens and parts</td>
92
+ </tr>
93
+ <tr>
94
+ <td>Keyboard navigation</td>
95
+ <td>Browser-dependent</td>
96
+ <td>Full arrow-key grid navigation</td>
97
+ </tr>
98
+ <tr>
99
+ <td>Screen reader support</td>
100
+ <td>Inconsistent across browsers</td>
101
+ <td>Rich ARIA labels and live regions</td>
102
+ </tr>
103
+ <tr>
104
+ <td>Date range</td>
105
+ <td>Manual (two coordinated inputs)</td>
106
+ <td>Built-in via <code>range</code> attribute</td>
107
+ </tr>
108
+ <tr>
109
+ <td>Blackout dates</td>
110
+ <td>Not supported</td>
111
+ <td><code>blackoutDates</code> array with validation</td>
112
+ </tr>
113
+ <tr>
114
+ <td>Custom validation messages</td>
115
+ <td>Limited to <code>setCustomValidity()</code></td>
116
+ <td>Per-constraint custom messages</td>
117
+ </tr>
118
+ <tr>
119
+ <td>Responsive layout</td>
120
+ <td>Fixed browser popup</td>
121
+ <td>Desktop dropdown / mobile fullscreen</td>
122
+ </tr>
123
+ <tr>
124
+ <td>Custom cell content</td>
125
+ <td>Not supported</td>
126
+ <td>Per-date slots and popovers</td>
127
+ </tr>
128
+ <tr>
129
+ <td>Localization</td>
130
+ <td>Browser locale only</td>
131
+ <td>Fully configurable labels and names</td>
132
+ </tr>
133
+ <tr>
134
+ <td>Dark background support</td>
135
+ <td>Manual</td>
136
+ <td>Yes (<code>appearance="inverse"</code>)</td>
137
+ </tr>
138
+ <tr>
139
+ <td>Form validation events</td>
140
+ <td>Not supported</td>
141
+ <td><code>auroFormElement-validated</code></td>
142
+ </tr>
143
+ <tr>
144
+ <td>Multi-brand theming</td>
145
+ <td>Static (import-time tokens)</td>
146
+ <td>Full (design tokens + component logic)</td>
147
+ </tr>
148
+ </tbody>
149
+ </table>
150
+ <auro-header level="2">Recommendation</auro-header>
151
+ <p>Use <code>auro-datepicker</code> whenever possible. Fall back to a CSS-styled native <code>&lt;input type="date"&gt;</code> only in environments where custom elements are not supported or when integrating with third-party systems that require plain HTML — and be prepared to accept the browser's calendar UI as-is and to reimplement range coordination, blackout handling, custom validation messaging, and accessibility affordances yourself.</p>
@@ -44,6 +44,8 @@
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();
47
49
  </script>
48
50
 
49
51
  <!-- Component scripts -->
@@ -0,0 +1,19 @@
1
+ import { AuroDatePicker } from '../src/auro-datepicker.js';
2
+ import { localizationExample } from '../apiExamples/localization.js';
3
+
4
+ AuroDatePicker.register();
5
+
6
+ export function initExamples(initCount) {
7
+ initCount = initCount || 0;
8
+
9
+ try {
10
+ localizationExample();
11
+ } catch {
12
+ if (initCount <= 20) {
13
+ // setTimeout handles issue where content is sometimes loaded after the functions get called
14
+ setTimeout(() => {
15
+ initExamples(initCount + 1);
16
+ }, 100);
17
+ }
18
+ }
19
+ }