@aurodesignsystem-dev/auro-formkit 0.0.0-pr1488.2 → 0.0.0-pr1489.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
- package/components/bibtemplate/dist/index.js +9 -1
- package/components/bibtemplate/dist/registered.js +9 -1
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/pages.json +1 -1
- package/components/checkbox/demo/why-checkbox.html +57 -0
- package/components/checkbox/demo/why-checkbox.md +86 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +234 -16
- package/components/combobox/demo/getting-started.min.js +234 -16
- package/components/combobox/demo/index.min.js +234 -16
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/demo/why-combobox.html +57 -0
- package/components/combobox/demo/why-combobox.md +113 -0
- package/components/combobox/dist/index.js +234 -16
- package/components/combobox/dist/registered.js +234 -16
- package/components/counter/demo/customize.min.js +233 -15
- package/components/counter/demo/index.min.js +233 -15
- package/components/counter/demo/keyboard-behavior.md +1 -0
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/demo/why-counter.html +57 -0
- package/components/counter/demo/why-counter.md +108 -0
- package/components/counter/dist/index.js +10 -2
- package/components/counter/dist/registered.js +10 -2
- package/components/datepicker/demo/accessibility.md +51 -3
- package/components/datepicker/demo/api.md +11 -2
- package/components/datepicker/demo/customize.html +2 -0
- package/components/datepicker/demo/customize.js +19 -0
- package/components/datepicker/demo/customize.md +72 -8
- package/components/datepicker/demo/customize.min.js +26029 -0
- package/components/datepicker/demo/design.md +3 -1
- package/components/datepicker/demo/index.js +5 -1
- package/components/datepicker/demo/index.md +83 -2
- package/components/datepicker/demo/index.min.js +1564 -96
- package/components/datepicker/demo/keyboard-behavior.md +201 -2
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/voiceover.md +19 -12
- package/components/datepicker/demo/why-datepicker.html +57 -0
- package/components/datepicker/demo/why-datepicker.md +133 -0
- package/components/datepicker/dist/index.js +1489 -97
- package/components/datepicker/dist/registered.js +1489 -97
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +66 -1
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +28 -0
- package/components/datepicker/dist/src/auro-calendar.d.ts +100 -0
- package/components/datepicker/dist/src/auro-datepicker.d.ts +88 -0
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
- package/components/dropdown/demo/accessibility.md +11 -0
- package/components/dropdown/demo/api.md +1 -0
- package/components/dropdown/demo/customize.md +3 -0
- package/components/dropdown/demo/customize.min.js +223 -13
- package/components/dropdown/demo/getting-started.min.js +223 -13
- package/components/dropdown/demo/index.min.js +223 -13
- package/components/dropdown/demo/keyboard-behavior.md +1 -0
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/demo/why-dropdown.html +57 -0
- package/components/dropdown/demo/why-dropdown.md +97 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +33 -1
- package/components/dropdown/dist/index.js +223 -13
- package/components/dropdown/dist/registered.js +223 -13
- package/components/form/demo/customize.min.js +2191 -145
- package/components/form/demo/getting-started.min.js +2191 -145
- package/components/form/demo/index.min.js +2191 -145
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +2191 -145
- package/components/form/demo/why-form.html +57 -0
- package/components/form/demo/why-form.md +101 -0
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/demo/pages.json +1 -1
- package/components/input/demo/why-input.html +57 -0
- package/components/input/demo/why-input.md +121 -0
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/pages.json +1 -1
- package/components/menu/demo/why-menu.html +57 -0
- package/components/menu/demo/why-menu.md +104 -0
- package/components/radio/demo/customize.min.js +2186 -0
- package/components/radio/demo/demo-support.min.js +55807 -0
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/getting-started.min.js +2205 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/demo/why-radio.html +57 -0
- package/components/radio/demo/why-radio.md +92 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +233 -15
- package/components/select/demo/getting-started.min.js +233 -15
- package/components/select/demo/index.min.js +233 -15
- package/components/select/demo/keyboard-behavior.md +1 -0
- package/components/select/demo/pages.json +1 -1
- package/components/select/demo/why-select.html +57 -0
- package/components/select/demo/why-select.md +128 -0
- package/components/select/dist/index.js +233 -15
- package/components/select/dist/registered.js +233 -15
- package/custom-elements.json +745 -28
- package/package.json +2 -2
|
@@ -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
|
|
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
|
-
//
|
|
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,8 @@
|
|
|
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>
|
|
13
15
|
<auro-anchorlink fluid href="#viewportSize" class="level2 body-xs">Viewport Size</auro-anchorlink>
|
|
14
16
|
</auro-nav>
|
|
15
17
|
</nav>
|
|
@@ -38,15 +40,21 @@
|
|
|
38
40
|
Click the input or press <kbd>Enter</kbd> / <kbd>Space</kbd> to open the calendar
|
|
39
41
|
<div class="note">
|
|
40
42
|
<p>
|
|
41
|
-
The calendar bib opens and displays the current month.
|
|
43
|
+
The calendar bib opens and displays the current month. The focused cell is determined in the following priority order:
|
|
42
44
|
</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>
|
|
43
51
|
</div>
|
|
44
52
|
</li>
|
|
45
53
|
<li>
|
|
46
54
|
Select a date by clicking a calendar cell or by typing a date directly into the input
|
|
47
55
|
<div class="note">
|
|
48
56
|
<p>
|
|
49
|
-
When a valid date is selected, the <code>value</code> property is updated
|
|
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>).
|
|
50
58
|
</p>
|
|
51
59
|
</div>
|
|
52
60
|
</li>
|
|
@@ -167,6 +175,79 @@
|
|
|
167
175
|
<auro-header level="3" id="skipSelection">Skip selection</auro-header>
|
|
168
176
|
<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>
|
|
169
177
|
<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"><auro-datepicker centralDate="12/03/2023" calendarStartDate="12/01/2023" calendarEndDate="12/31/2023" minDate="12/04/2023" maxDate="12/09/2023">
|
|
209
|
+
<span slot="bib.fullscreen.headline">Popover Slot Example</span>
|
|
210
|
+
<span slot="fromLabel">Choose a date</span>
|
|
211
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
212
|
+
<span slot="popover_12_03_2023">Tickets for this day are sold out</span>
|
|
213
|
+
<span slot="date_12_03_2023">$560</span>
|
|
214
|
+
<span slot="popover_12_04_2023">34 seats available</span>
|
|
215
|
+
<span slot="date_12_04_2023">$245</span>
|
|
216
|
+
<span slot="popover_12_05_2023">18 seats available</span>
|
|
217
|
+
<span slot="date_12_05_2023">$312</span>
|
|
218
|
+
<span slot="popover_12_06_2023">Tickets for this day are sold out</span>
|
|
219
|
+
<span slot="date_12_06_2023">$489</span>
|
|
220
|
+
<span slot="popover_12_07_2023">52 seats available</span>
|
|
221
|
+
<span slot="date_12_07_2023">$198</span>
|
|
222
|
+
<span slot="popover_12_08_2023">7 seats available</span>
|
|
223
|
+
<span slot="date_12_08_2023">$375</span>
|
|
224
|
+
<span slot="popover_12_09_2023">41 seats available</span>
|
|
225
|
+
<span slot="date_12_09_2023">$220</span>
|
|
226
|
+
</auro-datepicker></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" blackoutLabel="sold out">
|
|
236
|
+
<span slot="fromLabel">Choose a date</span>
|
|
237
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
238
|
+
</auro-datepicker>
|
|
239
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
240
|
+
</div>
|
|
241
|
+
<auro-accordion alignRight>
|
|
242
|
+
<span slot="trigger">See code</span>
|
|
243
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/blackout-label.html) -->
|
|
244
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/blackout-label.html -->
|
|
245
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker id="blackoutLabelExample" blackoutLabel="sold out">
|
|
246
|
+
<span slot="fromLabel">Choose a date</span>
|
|
247
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
248
|
+
</auro-datepicker></code></pre>
|
|
249
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
250
|
+
</auro-accordion>
|
|
170
251
|
<auro-header level="3" id="viewportSize">Viewport size</auro-header>
|
|
171
252
|
<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>
|
|
172
253
|
<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>
|