@aurodesignsystem-dev/auro-formkit 0.0.0-pr1475.6 → 0.0.0-pr1477.1
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 +0 -7
- package/components/bibtemplate/dist/index.js +1 -9
- package/components/bibtemplate/dist/registered.js +1 -9
- 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/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +18 -236
- package/components/combobox/demo/getting-started.min.js +18 -236
- package/components/combobox/demo/index.min.js +18 -236
- package/components/combobox/demo/keyboard-behavior.md +68 -8
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/dist/index.js +18 -236
- package/components/combobox/dist/registered.js +18 -236
- package/components/counter/demo/customize.min.js +15 -233
- package/components/counter/demo/index.min.js +15 -233
- package/components/counter/demo/keyboard-behavior.md +0 -1
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/dist/index.js +2 -10
- package/components/counter/dist/registered.js +2 -10
- package/components/datepicker/demo/accessibility.md +3 -51
- package/components/datepicker/demo/api.md +2 -11
- package/components/datepicker/demo/customize.html +0 -2
- package/components/datepicker/demo/customize.md +8 -72
- package/components/datepicker/demo/design.md +1 -3
- package/components/datepicker/demo/index.js +1 -5
- package/components/datepicker/demo/index.md +2 -83
- package/components/datepicker/demo/index.min.js +100 -1567
- package/components/datepicker/demo/keyboard-behavior.md +2 -201
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/voiceover.md +12 -19
- package/components/datepicker/dist/index.js +98 -1489
- package/components/datepicker/dist/registered.js +98 -1489
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +1 -66
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +0 -28
- package/components/datepicker/dist/src/auro-calendar.d.ts +0 -100
- package/components/datepicker/dist/src/auro-datepicker.d.ts +0 -88
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +3 -5
- package/components/dropdown/demo/accessibility.md +0 -11
- package/components/dropdown/demo/api.md +0 -1
- package/components/dropdown/demo/customize.md +0 -3
- package/components/dropdown/demo/customize.min.js +13 -223
- package/components/dropdown/demo/getting-started.min.js +13 -223
- package/components/dropdown/demo/index.min.js +13 -223
- package/components/dropdown/demo/keyboard-behavior.md +0 -1
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -33
- package/components/dropdown/dist/index.js +13 -223
- package/components/dropdown/dist/registered.js +13 -223
- package/components/form/demo/customize.min.js +165 -2208
- package/components/form/demo/getting-started.min.js +165 -2208
- package/components/form/demo/index.min.js +165 -2208
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +165 -2208
- 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/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/pages.json +1 -1
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +33 -249
- package/components/select/demo/getting-started.min.js +33 -249
- package/components/select/demo/index.min.js +33 -249
- package/components/select/demo/keyboard-behavior.md +54 -9
- package/components/select/demo/pages.json +1 -1
- package/components/select/dist/index.js +33 -249
- package/components/select/dist/registered.js +33 -249
- package/custom-elements.json +21 -738
- package/package.json +2 -2
- package/components/checkbox/demo/why-checkbox.html +0 -57
- package/components/checkbox/demo/why-checkbox.md +0 -86
- package/components/combobox/demo/why-combobox.html +0 -57
- package/components/combobox/demo/why-combobox.md +0 -113
- package/components/counter/demo/why-counter.html +0 -57
- package/components/counter/demo/why-counter.md +0 -108
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/customize.min.js +0 -26028
- package/components/datepicker/demo/why-datepicker.html +0 -57
- package/components/datepicker/demo/why-datepicker.md +0 -133
- package/components/dropdown/demo/why-dropdown.html +0 -57
- package/components/dropdown/demo/why-dropdown.md +0 -97
- package/components/form/demo/why-form.html +0 -57
- package/components/form/demo/why-form.md +0 -101
- package/components/input/demo/why-input.html +0 -57
- package/components/input/demo/why-input.md +0 -121
- package/components/menu/demo/why-menu.html +0 -57
- package/components/menu/demo/why-menu.md +0 -104
- package/components/radio/demo/customize.min.js +0 -2186
- package/components/radio/demo/demo-support.min.js +0 -55807
- package/components/radio/demo/getting-started.min.js +0 -2205
- package/components/radio/demo/why-radio.html +0 -57
- package/components/radio/demo/why-radio.md +0 -92
- package/components/select/demo/why-select.html +0 -57
- package/components/select/demo/why-select.md +0 -128
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem-dev/auro-formkit",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-pr1477.1",
|
|
4
4
|
"description": "A collection of web components used to build forms.",
|
|
5
5
|
"homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@aurodesignsystem/auro-icon": "^9.1.1",
|
|
109
109
|
"@aurodesignsystem/auro-library": "^5.12.2",
|
|
110
110
|
"@aurodesignsystem/auro-loader": "^6.2.0",
|
|
111
|
-
"@aurodesignsystem/auro-popover": "
|
|
111
|
+
"@aurodesignsystem/auro-popover": "^6.0.0",
|
|
112
112
|
"@aurodesignsystem/build-tools": "*",
|
|
113
113
|
"@aurodesignsystem/config": "*",
|
|
114
114
|
"@aurodesignsystem/design-tokens": "^8.16.0",
|
|
@@ -1,57 +0,0 @@
|
|
|
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/why-checkbox.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-checkbox | Why auro-checkbox</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-checkbox'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('./why-checkbox.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>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<auro-header level="1" id="overview">Why auro-checkbox?</auro-header>
|
|
2
|
-
<p>The native HTML <code><input type="checkbox"></code> is functional but minimal. It cannot be styled consistently across browsers, offers no group-level validation, and provides no integration with a design system. <code>auro-checkbox</code> and <code>auro-checkbox-group</code> address these gaps.</p>
|
|
3
|
-
<auro-header level="2" id="accessibility">Accessibility</auro-header>
|
|
4
|
-
<p>Native checkboxes have basic accessibility, but managing groups of related checkboxes — with a shared legend, coordinated validation, and consistent keyboard behavior — requires significant custom work.</p>
|
|
5
|
-
<p><code>auro-checkbox</code> provides:</p>
|
|
6
|
-
<ul>
|
|
7
|
-
<li><strong>Proper ARIA semantics</strong> — Each checkbox carries <code>role="checkbox"</code>, <code>aria-checked</code>, and <code>aria-disabled</code> attributes that stay in sync with component state.</li>
|
|
8
|
-
<li><strong>Automatic label binding</strong> — Slot content is automatically associated as the accessible label, eliminating <code><label for></code> wiring.</li>
|
|
9
|
-
<li><strong>Group-level semantics</strong> — <code>auro-checkbox-group</code> wraps checkboxes with a <code>legend</code> slot, giving screen readers a clear group description.</li>
|
|
10
|
-
<li><strong>Keyboard interaction</strong> — Space toggles the checkbox, matching the expected interaction pattern.</li>
|
|
11
|
-
</ul>
|
|
12
|
-
<auro-header level="2" id="groupManagement">Group management</auro-header>
|
|
13
|
-
<p>HTML has no native concept of a checkbox group. Building one requires manual DOM wiring for legends, error messages, and validation state.</p>
|
|
14
|
-
<p><code>auro-checkbox-group</code> handles this with:</p>
|
|
15
|
-
<ul>
|
|
16
|
-
<li>A coordinated <code>value</code> array reflecting all checked items</li>
|
|
17
|
-
<li>Group-level <code>required</code> validation (at least one must be selected)</li>
|
|
18
|
-
<li>Propagation of <code>disabled</code> state to all child checkboxes</li>
|
|
19
|
-
<li>Horizontal layout option for compact groups (up to 3 items)</li>
|
|
20
|
-
<li>A single <code>reset()</code> method that clears all checkboxes and validation state</li>
|
|
21
|
-
</ul>
|
|
22
|
-
<auro-header level="2" id="validation">Validation</auro-header>
|
|
23
|
-
<p>Native checkboxes support <code>required</code> on individual inputs, but there is no way to require "at least one selected" across a group without JavaScript.</p>
|
|
24
|
-
<p><code>auro-checkbox-group</code> integrates with the Auro form validation system:</p>
|
|
25
|
-
<ul>
|
|
26
|
-
<li>Group-level <code>required</code> validation</li>
|
|
27
|
-
<li>Custom error messages via <code>setCustomValidity</code> and <code>setCustomValidityValueMissing</code></li>
|
|
28
|
-
<li><code>touched</code> tracking so errors only appear after user interaction</li>
|
|
29
|
-
<li>Dispatches <code>auroFormElement-validated</code> events for parent form coordination</li>
|
|
30
|
-
</ul>
|
|
31
|
-
<auro-header level="2" id="themingAndVisualConsistency">Theming and visual consistency</auro-header>
|
|
32
|
-
<p>Native checkboxes render differently across browsers and operating systems. Their appearance cannot be reliably controlled with CSS alone.</p>
|
|
33
|
-
<p><code>auro-checkbox</code> is built with the Auro Design System:</p>
|
|
34
|
-
<ul>
|
|
35
|
-
<li>Consistent visual language across all browsers and platforms</li>
|
|
36
|
-
<li>Light and dark theme support (<code>appearance="default"</code> or <code>appearance="inverse"</code>)</li>
|
|
37
|
-
<li>CSS <code>::part()</code> selectors for targeted styling (<code>checkbox</code>, <code>checkbox-input</code>, <code>checkbox-label</code>)</li>
|
|
38
|
-
<li>Embedded checkmark SVG that renders only when checked</li>
|
|
39
|
-
</ul>
|
|
40
|
-
<auro-header level="2" id="summary">Summary</auro-header>
|
|
41
|
-
<table>
|
|
42
|
-
<thead>
|
|
43
|
-
<tr>
|
|
44
|
-
<th>Capability</th>
|
|
45
|
-
<th><code><input type="checkbox"></code></th>
|
|
46
|
-
<th><code>auro-checkbox</code></th>
|
|
47
|
-
</tr>
|
|
48
|
-
</thead>
|
|
49
|
-
<tbody>
|
|
50
|
-
<tr>
|
|
51
|
-
<td>Consistent cross-browser styling</td>
|
|
52
|
-
<td>No</td>
|
|
53
|
-
<td>Yes</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr>
|
|
56
|
-
<td>Group validation</td>
|
|
57
|
-
<td>Not supported</td>
|
|
58
|
-
<td>Built-in with <code>auro-checkbox-group</code></td>
|
|
59
|
-
</tr>
|
|
60
|
-
<tr>
|
|
61
|
-
<td>Custom error messages</td>
|
|
62
|
-
<td>Not supported</td>
|
|
63
|
-
<td>Per-constraint custom messages</td>
|
|
64
|
-
</tr>
|
|
65
|
-
<tr>
|
|
66
|
-
<td>Accessible group labeling</td>
|
|
67
|
-
<td>Manual <code><fieldset></code>/<code><legend></code></td>
|
|
68
|
-
<td>Automatic via <code>legend</code> slot</td>
|
|
69
|
-
</tr>
|
|
70
|
-
<tr>
|
|
71
|
-
<td>Theming</td>
|
|
72
|
-
<td>Browser-dependent</td>
|
|
73
|
-
<td>Full design system integration</td>
|
|
74
|
-
</tr>
|
|
75
|
-
<tr>
|
|
76
|
-
<td>Horizontal layout</td>
|
|
77
|
-
<td>Manual CSS</td>
|
|
78
|
-
<td><code>horizontal</code> attribute</td>
|
|
79
|
-
</tr>
|
|
80
|
-
<tr>
|
|
81
|
-
<td>Reset all in group</td>
|
|
82
|
-
<td>Manual</td>
|
|
83
|
-
<td>Single <code>reset()</code> call</td>
|
|
84
|
-
</tr>
|
|
85
|
-
</tbody>
|
|
86
|
-
</table>
|
|
@@ -1,57 +0,0 @@
|
|
|
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/why-combobox.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-combobox | Why auro-combobox</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-combobox'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('./why-combobox.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>
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
<auro-header level="1" id="overview">Why auro-combobox?</auro-header>
|
|
2
|
-
<p>The native <code><input list></code> with <code><datalist></code> provides a basic autocomplete experience, but it cannot be styled, has no concept of required selection, and offers no mobile-friendly layout. <code>auro-combobox</code> is a fully featured autocomplete and selection component designed for real-world use.</p>
|
|
3
|
-
<auro-header level="2" id="accessibility">Accessibility</auro-header>
|
|
4
|
-
<p>Native <code><datalist></code> support varies between browsers. Some announce suggestion counts, others do not. Keyboard behavior is inconsistent, and there is no standard way to communicate selection state to screen readers.</p>
|
|
5
|
-
<p><code>auro-combobox</code> provides:</p>
|
|
6
|
-
<ul>
|
|
7
|
-
<li><strong>ARIA combobox pattern</strong> — The input carries <code>aria-expanded</code>, <code>aria-owns</code>, and <code>aria-haspopup</code> to properly describe the relationship between the input and the suggestions list.</li>
|
|
8
|
-
<li><strong>Active descendant tracking</strong> — <code>aria-activedescendant</code> moves with keyboard navigation so screen readers announce the highlighted option without moving DOM focus.</li>
|
|
9
|
-
<li><strong>Live region announcements</strong> — Selections are announced via <code>aria-live="polite"</code>, and validation errors use <code>aria-live="assertive"</code>.</li>
|
|
10
|
-
<li><strong>Full keyboard navigation</strong> — Arrow keys navigate options, Enter selects, Escape closes, Home/End jump to boundaries. A dedicated keyboard strategy handles all interactions.</li>
|
|
11
|
-
</ul>
|
|
12
|
-
<auro-header level="2" id="dualBehaviorModes">Dual behavior modes</auro-header>
|
|
13
|
-
<p>Native <code><datalist></code> always allows freeform input. There is no way to restrict the user to only the provided options.</p>
|
|
14
|
-
<p><code>auro-combobox</code> supports two modes:</p>
|
|
15
|
-
<ul>
|
|
16
|
-
<li><strong>Suggestion mode</strong> (default) — The user can type any value. Suggestions are offered but not required.</li>
|
|
17
|
-
<li><strong>Filter mode</strong> — The user must select from the available options. Typed text filters the list but cannot be submitted as a value. Validation enforces this constraint.</li>
|
|
18
|
-
</ul>
|
|
19
|
-
<auro-header level="2" id="realtimeFiltering">Real-time filtering</auro-header>
|
|
20
|
-
<p><code><datalist></code> filtering is browser-controlled and cannot be customized. Some browsers match from the start of the option text, others match anywhere.</p>
|
|
21
|
-
<p><code>auro-combobox</code> filters options as the user types, with full control:</p>
|
|
22
|
-
<ul>
|
|
23
|
-
<li><code>noFilter</code> disables filtering to show all options regardless of input</li>
|
|
24
|
-
<li><code>matchWord</code> highlights the matched portion of each option</li>
|
|
25
|
-
<li><code>persistInput</code> keeps the filter text visible after selection</li>
|
|
26
|
-
</ul>
|
|
27
|
-
<auro-header level="2" id="responsiveLayout">Responsive layout</auro-header>
|
|
28
|
-
<p>Native <code><datalist></code> renders a small browser-controlled popup that cannot be repositioned or resized.</p>
|
|
29
|
-
<p><code>auro-combobox</code> adapts to the viewport:</p>
|
|
30
|
-
<ul>
|
|
31
|
-
<li><strong>Desktop</strong> — Suggestions appear as a positioned dropdown using Floating UI, with configurable placement, offset, flip, and shift behavior</li>
|
|
32
|
-
<li><strong>Mobile</strong> — Suggestions open in a fullscreen dialog via <code>showModal()</code>, with a configurable breakpoint (<code>fullscreenBreakpoint</code>)</li>
|
|
33
|
-
<li><strong>Width matching</strong> — The dropdown can match the input width or size independently</li>
|
|
34
|
-
</ul>
|
|
35
|
-
<auro-header level="2" id="validation">Validation</auro-header>
|
|
36
|
-
<p>Native <code><datalist></code> has no built-in validation beyond standard <code>required</code>.</p>
|
|
37
|
-
<p><code>auro-combobox</code> integrates with the Auro form validation system:</p>
|
|
38
|
-
<ul>
|
|
39
|
-
<li>Required field validation with mode-aware messaging (separate messages for suggestion vs. filter mode)</li>
|
|
40
|
-
<li>Custom error messages per validity state (<code>setCustomValidityCustomError</code>, <code>setCustomValidityValueMissing</code>, <code>setCustomValidityValueMissingFilter</code>)</li>
|
|
41
|
-
<li>Validation on blur with <code>noValidate</code> opt-out</li>
|
|
42
|
-
<li>Error display via help text with <code>role="alert"</code></li>
|
|
43
|
-
</ul>
|
|
44
|
-
<auro-header level="2" id="inputMasking">Input masking</auro-header>
|
|
45
|
-
<p><code><datalist></code> inputs have no formatting support.</p>
|
|
46
|
-
<p><code>auro-combobox</code> supports input masks via the <code>format</code> attribute, enabling structured input (e.g., dates, phone numbers) while still offering suggestions.</p>
|
|
47
|
-
<auro-header level="2" id="designSystemIntegration">Design system integration</auro-header>
|
|
48
|
-
<p><code><datalist></code> styling is entirely browser-controlled. The popup cannot be themed, and option rendering is limited to plain text.</p>
|
|
49
|
-
<p><code>auro-combobox</code> is built with the Auro Design System:</p>
|
|
50
|
-
<ul>
|
|
51
|
-
<li>Three layout options: classic, emphasized, and snowflake</li>
|
|
52
|
-
<li>Light and dark theme support (<code>appearance</code>)</li>
|
|
53
|
-
<li>Checkmarks on selected options</li>
|
|
54
|
-
<li>Rich HTML content in options (icons, descriptions, nested structure)</li>
|
|
55
|
-
<li>CSS <code>::part()</code> selectors for styling</li>
|
|
56
|
-
</ul>
|
|
57
|
-
<auro-header level="2" id="summary">Summary</auro-header>
|
|
58
|
-
<table>
|
|
59
|
-
<thead>
|
|
60
|
-
<tr>
|
|
61
|
-
<th>Capability</th>
|
|
62
|
-
<th><code><input list></code> + <code><datalist></code></th>
|
|
63
|
-
<th><code>auro-combobox</code></th>
|
|
64
|
-
</tr>
|
|
65
|
-
</thead>
|
|
66
|
-
<tbody>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>Restrict to options only</td>
|
|
69
|
-
<td>No</td>
|
|
70
|
-
<td>Yes (filter mode)</td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr>
|
|
73
|
-
<td>Real-time filtering control</td>
|
|
74
|
-
<td>Browser-controlled</td>
|
|
75
|
-
<td>Fully configurable</td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<td>Keyboard navigation</td>
|
|
79
|
-
<td>Inconsistent</td>
|
|
80
|
-
<td>Full arrow/Enter/Escape/Home/End</td>
|
|
81
|
-
</tr>
|
|
82
|
-
<tr>
|
|
83
|
-
<td>Screen reader announcements</td>
|
|
84
|
-
<td>Inconsistent</td>
|
|
85
|
-
<td>Live regions and active descendant</td>
|
|
86
|
-
</tr>
|
|
87
|
-
<tr>
|
|
88
|
-
<td>Mobile fullscreen</td>
|
|
89
|
-
<td>No</td>
|
|
90
|
-
<td>Automatic at breakpoint</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>Input masking</td>
|
|
94
|
-
<td>No</td>
|
|
95
|
-
<td>Yes (format attribute)</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr>
|
|
98
|
-
<td>Custom validation messages</td>
|
|
99
|
-
<td>No</td>
|
|
100
|
-
<td>Per-constraint messages</td>
|
|
101
|
-
</tr>
|
|
102
|
-
<tr>
|
|
103
|
-
<td>Rich option content</td>
|
|
104
|
-
<td>Plain text only</td>
|
|
105
|
-
<td>Full HTML</td>
|
|
106
|
-
</tr>
|
|
107
|
-
<tr>
|
|
108
|
-
<td>Theming</td>
|
|
109
|
-
<td>No</td>
|
|
110
|
-
<td>Three layouts + appearance modes</td>
|
|
111
|
-
</tr>
|
|
112
|
-
</tbody>
|
|
113
|
-
</table>
|
|
@@ -1,57 +0,0 @@
|
|
|
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/why-counter.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-counter | Why auro-counter</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-counter'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('./why-counter.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>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<auro-header level="1" id="overview">Why auro-counter?</auro-header>
|
|
2
|
-
<p>The native <code><input type="number"></code> provides a basic numeric input, but it lacks the spinbutton accessibility pattern, has no concept of grouped counters with shared constraints, and renders inconsistently across browsers. <code>auro-counter</code> and <code>auro-counter-group</code> provide an accessible, feature-rich alternative.</p>
|
|
3
|
-
<auro-header level="2" id="accessibility">Accessibility</auro-header>
|
|
4
|
-
<p>Native number inputs have limited screen reader support. The browser-rendered increment/decrement buttons are often small, difficult to interact with, and announced inconsistently.</p>
|
|
5
|
-
<p><code>auro-counter</code> provides:</p>
|
|
6
|
-
<ul>
|
|
7
|
-
<li><strong>ARIA spinbutton pattern</strong> — The component uses <code>role="spinbutton"</code> with <code>aria-valuemin</code>, <code>aria-valuemax</code>, <code>aria-valuenow</code>, and <code>aria-valuetext</code> for complete screen reader semantics.</li>
|
|
8
|
-
<li><strong>Labeled controls</strong> — Increment and decrement buttons have customizable ARIA labels via <code>ariaLabel.plus</code> and <code>ariaLabel.minus</code> slots.</li>
|
|
9
|
-
<li><strong>Keyboard shortcuts</strong> — Arrow Up/Down, Ctrl+Arrow, and +/- keys all increment and decrement the value. These shortcuts go beyond what native number inputs provide.</li>
|
|
10
|
-
<li><strong>Focus delegation</strong> — <code>delegatesFocus</code> ensures focus reaches the interactive control regardless of where the user clicks.</li>
|
|
11
|
-
<li><strong>Description binding</strong> — The <code>description</code> slot content is linked via <code>aria-describedByElements</code> for additional context.</li>
|
|
12
|
-
</ul>
|
|
13
|
-
<auro-header level="2" id="smartButtonState">Smart button state</auro-header>
|
|
14
|
-
<p>Native number inputs allow the user to type or spin past the min/max bounds, then rely on validation to catch the error.</p>
|
|
15
|
-
<p><code>auro-counter</code> takes a proactive approach:</p>
|
|
16
|
-
<ul>
|
|
17
|
-
<li>The decrement button disables automatically at <code>min</code></li>
|
|
18
|
-
<li>The increment button disables automatically at <code>max</code></li>
|
|
19
|
-
<li>In a group, buttons disable based on the aggregate total, preventing any individual counter from pushing the group past its constraints</li>
|
|
20
|
-
</ul>
|
|
21
|
-
<auro-header level="2" id="counterGroups">Counter groups</auro-header>
|
|
22
|
-
<p>HTML has no concept of related numeric inputs with a shared constraint. For example, a passenger selector with "Adults", "Children", and "Infants" that must total no more than 9 requires custom JavaScript.</p>
|
|
23
|
-
<p><code>auro-counter-group</code> handles this with:</p>
|
|
24
|
-
<ul>
|
|
25
|
-
<li>An aggregate <code>total</code> computed from all child counters</li>
|
|
26
|
-
<li>Group-level <code>min</code> and <code>max</code> constraints applied across all children</li>
|
|
27
|
-
<li>A <code>value</code> object with named entries (e.g., <code>{ adults: 2, children: 1 }</code>)</li>
|
|
28
|
-
<li>Dynamic button disabling — when the group total reaches max, all increment buttons disable; when it reaches min, all decrement buttons disable</li>
|
|
29
|
-
<li>Group-level validation that aggregates individual counter errors</li>
|
|
30
|
-
<li>Optional dropdown presentation with <code>isDropdown</code> for compact UI</li>
|
|
31
|
-
</ul>
|
|
32
|
-
<auro-header level="2" id="responsiveLayout">Responsive layout</auro-header>
|
|
33
|
-
<p>Native number inputs have no concept of responsive presentation.</p>
|
|
34
|
-
<p><code>auro-counter-group</code> in dropdown mode adapts to the viewport:</p>
|
|
35
|
-
<ul>
|
|
36
|
-
<li><strong>Desktop</strong> — Counters appear in a positioned dropdown panel</li>
|
|
37
|
-
<li><strong>Mobile</strong> — Counters open in a fullscreen dialog with a configurable breakpoint</li>
|
|
38
|
-
<li>Layout options (classic, snowflake) control visual presentation</li>
|
|
39
|
-
</ul>
|
|
40
|
-
<auro-header level="2" id="validation">Validation</auro-header>
|
|
41
|
-
<p>Native number input validation is limited to <code>min</code>, <code>max</code>, <code>step</code>, and <code>required</code>.</p>
|
|
42
|
-
<p><code>auro-counter</code> integrates with the Auro form validation system:</p>
|
|
43
|
-
<ul>
|
|
44
|
-
<li>Group-level validation aggregates errors from all child counters</li>
|
|
45
|
-
<li><code>touched</code> tracking ensures errors appear only after interaction</li>
|
|
46
|
-
<li>Dispatches <code>auroFormElement-validated</code> events for parent form coordination</li>
|
|
47
|
-
</ul>
|
|
48
|
-
<auro-header level="2" id="designSystemIntegration">Design system integration</auro-header>
|
|
49
|
-
<p>Native number inputs render browser-specific controls that cannot be styled consistently.</p>
|
|
50
|
-
<p><code>auro-counter</code> is built with the Auro Design System:</p>
|
|
51
|
-
<ul>
|
|
52
|
-
<li>Consistent visual language with clearly labeled +/- buttons</li>
|
|
53
|
-
<li>Light and dark theme support (<code>appearance</code>)</li>
|
|
54
|
-
<li>CSS <code>::part()</code> selectors (<code>counterControl</code>, <code>controlPlus</code>, <code>controlMinus</code>, <code>helpText</code>)</li>
|
|
55
|
-
<li>Design token integration for sizing and spacing</li>
|
|
56
|
-
</ul>
|
|
57
|
-
<auro-header level="2" id="summary">Summary</auro-header>
|
|
58
|
-
<table>
|
|
59
|
-
<thead>
|
|
60
|
-
<tr>
|
|
61
|
-
<th>Capability</th>
|
|
62
|
-
<th><code><input type="number"></code></th>
|
|
63
|
-
<th><code>auro-counter</code></th>
|
|
64
|
-
</tr>
|
|
65
|
-
</thead>
|
|
66
|
-
<tbody>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>ARIA spinbutton semantics</td>
|
|
69
|
-
<td>No</td>
|
|
70
|
-
<td>Full implementation</td>
|
|
71
|
-
</tr>
|
|
72
|
-
<tr>
|
|
73
|
-
<td>Auto-disable at min/max</td>
|
|
74
|
-
<td>No</td>
|
|
75
|
-
<td>Yes</td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<td>Grouped counters with shared max</td>
|
|
79
|
-
<td>Not supported</td>
|
|
80
|
-
<td>Built-in with <code>auro-counter-group</code></td>
|
|
81
|
-
</tr>
|
|
82
|
-
<tr>
|
|
83
|
-
<td>Aggregate value object</td>
|
|
84
|
-
<td>Not supported</td>
|
|
85
|
-
<td><code>{ name: value }</code> pairs</td>
|
|
86
|
-
</tr>
|
|
87
|
-
<tr>
|
|
88
|
-
<td>Keyboard shortcuts</td>
|
|
89
|
-
<td>Arrow keys only</td>
|
|
90
|
-
<td>Arrows, Ctrl+Arrows, +/-</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>Mobile fullscreen (group)</td>
|
|
94
|
-
<td>No</td>
|
|
95
|
-
<td>Automatic at breakpoint</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr>
|
|
98
|
-
<td>Consistent cross-browser UI</td>
|
|
99
|
-
<td>No</td>
|
|
100
|
-
<td>Yes</td>
|
|
101
|
-
</tr>
|
|
102
|
-
<tr>
|
|
103
|
-
<td>Theming</td>
|
|
104
|
-
<td>Browser-dependent</td>
|
|
105
|
-
<td>Full design system integration</td>
|
|
106
|
-
</tr>
|
|
107
|
-
</tbody>
|
|
108
|
-
</table>
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|