@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
@@ -35,11 +35,13 @@
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 on individual date cells. The calendar supports:</p>
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>
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>
41
42
  <li>Date range highlighting when <code>range</code> is set.</li>
42
43
  <li>Disabled dates outside the <code>minDate</code>/<code>maxDate</code> bounds.</li>
44
+ <li>Blackout dates that are focusable but not selectable.</li>
43
45
  <li>Custom cell content via the <code>date_MM_DD_YYYY</code> slot.</li>
44
46
  <li>Cell popovers via the <code>popover_MM_DD_YYYY</code> slot.</li>
45
47
  </ul>
@@ -1,4 +1,5 @@
1
1
  import { AuroDatePicker } from '../src/auro-datepicker.js';
2
+ import { blackoutLabelExample } from '../apiExamples/blackout-label.js';
2
3
 
3
4
  AuroDatePicker.register(); // registering to auro-datepicker
4
5
  AuroDatePicker.register('custom-datepicker');
@@ -7,7 +8,10 @@ export function initExamples(initCount) {
7
8
  initCount = initCount || 0;
8
9
 
9
10
  try {
10
- // example();
11
+ // Only run when the demo element exists on the current page
12
+ if (document.querySelector('#blackoutLabelExample')) {
13
+ blackoutLabelExample();
14
+ }
11
15
  } catch {
12
16
  if (initCount <= 20) {
13
17
  // setTimeout handles issue where content is sometimes loaded after the functions get called
@@ -10,6 +10,9 @@
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
+ <auro-anchorlink fluid href="#referenceDates" class="level2 body-xs">Reference Dates</auro-anchorlink>
13
16
  <auro-anchorlink fluid href="#regionalDateFormat" class="level2 body-xs">Regional Date</auro-anchorlink>
14
17
  <auro-anchorlink fluid href="#viewportSize" class="level2 body-xs">Viewport Size</auro-anchorlink>
15
18
  </auro-nav>
@@ -39,15 +42,21 @@
39
42
  Click the input or press <kbd>Enter</kbd> / <kbd>Space</kbd> to open the calendar
40
43
  <div class="note">
41
44
  <p>
42
- 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.
45
+ The calendar bib opens and displays the current month. The focused cell is determined in the following priority order:
43
46
  </p>
47
+ <ol>
48
+ <li>The currently selected date (if one exists and is within the valid min/max range).</li>
49
+ <li>Today's date (if it is enabled — within the min/max range).</li>
50
+ <li>The first future enabled date.</li>
51
+ <li>The first past enabled date.</li>
52
+ </ol>
44
53
  </div>
45
54
  </li>
46
55
  <li>
47
56
  Select a date by clicking a calendar cell or by typing a date directly into the input
48
57
  <div class="note">
49
58
  <p>
50
- 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>).
59
+ 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>).
51
60
  </p>
52
61
  </div>
53
62
  </li>
@@ -168,25 +177,105 @@
168
177
  <auro-header level="3" id="skipSelection">Skip selection</auro-header>
169
178
  <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>
170
179
  <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>
171
- <auro-header level="3" id="regionalDateFormat">Regional date format support</auro-header>
172
- <p>People around the world write dates differently. A traveler in the United States expects to see <strong>12/25/2025</strong>, while someone in Germany expects <strong>25.12.2025</strong>, and someone in Japan expects <strong>2025/12/25</strong>. Showing the wrong format causes confusion and mistakes.</p>
173
- <p>When the datepicker knows the user's region via the <code>locale</code> attribute, it automatically displays dates in the format that looks natural to them — no extra setup required.</p>
180
+ <auro-header level="3" id="popoverSlot">Popover slot</auro-header>
181
+ <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>
182
+ <div class="exampleWrapper">
183
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/popover-slot.html) -->
184
+ <!-- The below content is automatically added from ./../apiExamples/popover-slot.html -->
185
+ <auro-datepicker centralDate="2023-12-03" calendarStartDate="2023-12-01" calendarEndDate="2023-12-31" minDate="2023-12-02" maxDate="2023-12-09">
186
+ <span slot="bib.fullscreen.headline">Popover Slot Example</span>
187
+ <span slot="fromLabel">Choose a date</span>
188
+ <span slot="bib.fullscreen.fromLabel">Choose a date</span>
189
+ <span slot="popover_12_03_2023">Tickets for this day are sold out</span>
190
+ <span slot="date_12_03_2023">$560</span>
191
+ <span slot="popover_12_04_2023">34 seats available</span>
192
+ <span slot="date_12_04_2023">$245</span>
193
+ <span slot="popover_12_05_2023">18 seats available</span>
194
+ <span slot="date_12_05_2023">$312</span>
195
+ <span slot="popover_12_06_2023">Tickets for this day are sold out</span>
196
+ <span slot="date_12_06_2023">$489</span>
197
+ <span slot="popover_12_07_2023">52 seats available</span>
198
+ <span slot="date_12_07_2023">$198</span>
199
+ <span slot="popover_12_08_2023">7 seats available</span>
200
+ <span slot="date_12_08_2023">$375</span>
201
+ <span slot="popover_12_09_2023">41 seats available</span>
202
+ <span slot="date_12_09_2023">$220</span>
203
+ </auro-datepicker>
204
+ <!-- AURO-GENERATED-CONTENT:END -->
205
+ </div>
206
+ <auro-accordion alignRight>
207
+ <span slot="trigger">See code</span>
208
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/popover-slot.html) -->
209
+ <!-- The below code snippet is automatically added from ./../apiExamples/popover-slot.html -->
210
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker centralDate="2023-12-03" calendarStartDate="2023-12-01" calendarEndDate="2023-12-31" minDate="2023-12-02" maxDate="2023-12-09"&gt;
211
+ &lt;span slot="bib.fullscreen.headline"&gt;Popover Slot Example&lt;/span&gt;
212
+ &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
213
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
214
+ &lt;span slot="popover_12_03_2023"&gt;Tickets for this day are sold out&lt;/span&gt;
215
+ &lt;span slot="date_12_03_2023"&gt;$560&lt;/span&gt;
216
+ &lt;span slot="popover_12_04_2023"&gt;34 seats available&lt;/span&gt;
217
+ &lt;span slot="date_12_04_2023"&gt;$245&lt;/span&gt;
218
+ &lt;span slot="popover_12_05_2023"&gt;18 seats available&lt;/span&gt;
219
+ &lt;span slot="date_12_05_2023"&gt;$312&lt;/span&gt;
220
+ &lt;span slot="popover_12_06_2023"&gt;Tickets for this day are sold out&lt;/span&gt;
221
+ &lt;span slot="date_12_06_2023"&gt;$489&lt;/span&gt;
222
+ &lt;span slot="popover_12_07_2023"&gt;52 seats available&lt;/span&gt;
223
+ &lt;span slot="date_12_07_2023"&gt;$198&lt;/span&gt;
224
+ &lt;span slot="popover_12_08_2023"&gt;7 seats available&lt;/span&gt;
225
+ &lt;span slot="date_12_08_2023"&gt;$375&lt;/span&gt;
226
+ &lt;span slot="popover_12_09_2023"&gt;41 seats available&lt;/span&gt;
227
+ &lt;span slot="date_12_09_2023"&gt;$220&lt;/span&gt;
228
+ &lt;/auro-datepicker&gt;</code></pre>
229
+ <!-- AURO-GENERATED-CONTENT:END -->
230
+ </auro-accordion>
231
+ <auro-header level="3" id="blackoutDates">Blackout dates with custom label</auro-header>
232
+ <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>
233
+ <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>
234
+ <div class="exampleWrapper">
235
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/blackout-label.html) -->
236
+ <!-- The below content is automatically added from ./../apiExamples/blackout-label.html -->
237
+ <auro-datepicker id="blackoutLabelExample" range blackoutLabel="sold out">
238
+ <span slot="fromLabel">Choose a start date</span>
239
+ <span slot="toLabel">Choose an end date</span>
240
+ <span slot="bib.fullscreen.fromLabel">Choose a date</span>
241
+ <span slot="bib.fullscreen.toLabel">Choose an end date</span>
242
+ </auro-datepicker>
243
+ <!-- AURO-GENERATED-CONTENT:END -->
244
+ </div>
245
+ <auro-accordion alignRight>
246
+ <span slot="trigger">See code</span>
247
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/blackout-label.html) -->
248
+ <!-- The below code snippet is automatically added from ./../apiExamples/blackout-label.html -->
249
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker id="blackoutLabelExample" range blackoutLabel="sold out"&gt;
250
+ &lt;span slot="fromLabel"&gt;Choose a start date&lt;/span&gt;
251
+ &lt;span slot="toLabel"&gt;Choose an end date&lt;/span&gt;
252
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
253
+ &lt;span slot="bib.fullscreen.toLabel"&gt;Choose an end date&lt;/span&gt;
254
+ &lt;/auro-datepicker&gt;</code></pre>
255
+ <!-- AURO-GENERATED-CONTENT:END -->
256
+ </auro-accordion>
257
+ <auro-header level="3" id="referenceDates">Reference dates</auro-header>
258
+ <p>Use the <code>referenceDates</code> attribute to highlight specific dates on the calendar. Reference dates are displayed with a distinct visual treatment to draw attention to dates of interest, such as the cheapest travel dates or dates with special availability.</p>
174
259
  <div class="exampleWrapper">
175
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/locale-single.html) -->
176
- <!-- The below content is automatically added from ./../apiExamples/locale-single.html -->
177
- <auro-datepicker locale="zh-CN">
178
- <span slot="fromLabel">zh-CN Date</span>
179
- <span slot="helpText">Help Text</span>
260
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reference-dates.html) -->
261
+ <!-- The below content is automatically added from ./../apiExamples/reference-dates.html -->
262
+ <auro-datepicker referenceDates='["2025-10-05", "2025-10-15", "2025-10-20", "2025-10-22"]' minDate="2025-10-12" range>
263
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
264
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
265
+ <span slot="fromLabel">Choose a date</span>
266
+ <span slot="bib.fullscreen.fromLabel">Choose a date</span>
180
267
  </auro-datepicker>
181
268
  <!-- AURO-GENERATED-CONTENT:END -->
182
269
  </div>
183
270
  <auro-accordion alignRight>
184
271
  <span slot="trigger">See code</span>
185
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/locale-single.html) -->
186
- <!-- The below code snippet is automatically added from ./../apiExamples/locale-single.html -->
187
- <pre class="language-html"><code class="language-html">&lt;auro-datepicker locale="zh-CN"&gt;
188
- &lt;span slot="fromLabel"&gt;zh-CN Date&lt;/span&gt;
189
- &lt;span slot="helpText"&gt;Help Text&lt;/span&gt;
272
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reference-dates.html) -->
273
+ <!-- The below code snippet is automatically added from ./../apiExamples/reference-dates.html -->
274
+ <pre class="language-html"><code class="language-html">&lt;auro-datepicker referenceDates='["2025-10-05", "2025-10-15", "2025-10-20", "2025-10-22"]' minDate="2025-10-12" range&gt;
275
+ &lt;span slot="ariaLabel.bib.close"&gt;Close Calendar&lt;/span&gt;
276
+ &lt;span slot="bib.fullscreen.headline"&gt;Datepicker Headline&lt;/span&gt;
277
+ &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
278
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
190
279
  &lt;/auro-datepicker&gt;</code></pre>
191
280
  <!-- AURO-GENERATED-CONTENT:END -->
192
281
  </auro-accordion>