@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.7 → 0.0.0-pr1628.9
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 +1 -1
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/accessibility.md +2 -2
- package/components/checkbox/demo/api.md +17 -17
- package/components/checkbox/demo/customize.md +16 -16
- package/components/checkbox/demo/customize.min.js +3 -3
- package/components/checkbox/demo/design.md +24 -24
- package/components/checkbox/demo/getting-started.md +33 -27
- package/components/checkbox/demo/getting-started.min.js +3 -3
- package/components/checkbox/demo/index.md +17 -17
- package/components/checkbox/demo/index.min.js +3 -3
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +2 -2
- package/components/checkbox/dist/index.js +3 -3
- package/components/checkbox/dist/registered.js +3 -3
- package/components/combobox/demo/api.md +3 -3
- package/components/combobox/demo/css-only.md +3 -3
- package/components/combobox/demo/customize.md +12 -12
- package/components/combobox/demo/customize.min.js +22 -19
- package/components/combobox/demo/getting-started.min.js +22 -19
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +22 -19
- package/components/combobox/dist/auro-combobox.d.ts +6 -4
- package/components/combobox/dist/index.js +21 -18
- package/components/combobox/dist/registered.js +21 -18
- package/components/counter/demo/accessibility.md +1 -1
- package/components/counter/demo/css-only.md +1 -1
- package/components/counter/demo/customize.md +2 -2
- package/components/counter/demo/customize.min.js +12 -12
- package/components/counter/demo/getting-started.min.js +12 -12
- package/components/counter/demo/index.min.js +12 -12
- package/components/counter/demo/why-counter.md +3 -3
- package/components/counter/dist/auro-counter-group.d.ts +2 -3
- package/components/counter/dist/index.js +12 -12
- package/components/counter/dist/registered.js +12 -12
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/accessibility.md +2 -2
- package/components/datepicker/demo/css-only.md +4 -4
- package/components/datepicker/demo/customize.md +3 -3
- package/components/datepicker/demo/customize.min.js +128 -113
- package/components/datepicker/demo/design.md +2 -2
- package/components/datepicker/demo/getting-started.md +1 -1
- package/components/datepicker/demo/getting-started.min.js +128 -113
- package/components/datepicker/demo/index.md +2 -2
- package/components/datepicker/demo/index.min.js +128 -113
- package/components/datepicker/demo/keyboard-behavior.md +1 -1
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/demo/voiceover.md +3 -3
- package/components/datepicker/demo/why-datepicker.md +3 -3
- package/components/datepicker/dist/auro-calendar-cell.d.ts +32 -33
- package/components/datepicker/dist/auro-calendar-month.d.ts +8 -8
- package/components/datepicker/dist/auro-calendar.d.ts +43 -42
- package/components/datepicker/dist/auro-datepicker.d.ts +9 -7
- package/components/datepicker/dist/index.js +128 -113
- package/components/datepicker/dist/registered.js +128 -113
- package/components/datepicker/dist/utilities.d.ts +1 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts +9 -4
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +9 -6
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/customize.min.js +8 -7
- package/components/dropdown/demo/getting-started.min.js +13 -12
- package/components/dropdown/demo/index.min.js +8 -7
- package/components/dropdown/demo/voiceover.md +1 -1
- package/components/dropdown/demo/why-dropdown.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +7 -6
- package/components/dropdown/dist/index.js +8 -7
- package/components/dropdown/dist/registered.js +8 -7
- package/components/form/README.md +1 -1
- package/components/form/demo/api.md +1 -1
- package/components/form/demo/css-only.md +1 -1
- package/components/form/demo/customize.md +2 -0
- package/components/form/demo/customize.min.js +185 -168
- package/components/form/demo/getting-started.md +2 -0
- package/components/form/demo/getting-started.min.js +185 -168
- package/components/form/demo/index.min.js +185 -168
- package/components/form/demo/keyboard-behavior.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/demo/registerDemoDeps.min.js +184 -167
- package/components/form/demo/voiceover.md +2 -2
- package/components/form/dist/auro-form.d.ts +1 -1
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/input/demo/api.md +1 -1
- package/components/input/demo/css-only.md +4 -4
- package/components/input/demo/customize.md +4 -4
- package/components/input/demo/customize.min.js +5 -5
- package/components/input/demo/design.md +2 -2
- package/components/input/demo/getting-started.md +2 -2
- package/components/input/demo/getting-started.min.js +5 -5
- package/components/input/demo/index.md +1 -1
- package/components/input/demo/index.min.js +5 -5
- package/components/input/demo/why-input.md +2 -2
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +3 -3
- package/components/input/dist/index.js +5 -5
- package/components/input/dist/registered.js +5 -5
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/css-only.md +4 -4
- package/components/menu/demo/getting-started.md +2 -2
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/demo/why-menu.md +3 -3
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- package/components/radio/demo/api.md +4 -4
- package/components/radio/demo/customize.md +14 -4
- package/components/radio/demo/customize.min.js +4 -6
- package/components/radio/demo/getting-started.md +2 -2
- package/components/radio/demo/getting-started.min.js +4 -6
- package/components/radio/demo/index.min.js +4 -6
- package/components/radio/demo/why-radio.md +1 -1
- package/components/radio/dist/auro-radio-group.d.ts +3 -5
- package/components/radio/dist/index.js +4 -6
- package/components/radio/dist/registered.js +4 -6
- package/components/select/demo/css-only.md +1 -1
- package/components/select/demo/customize.md +1 -1
- package/components/select/demo/customize.min.js +11 -10
- package/components/select/demo/getting-started.min.js +11 -10
- package/components/select/demo/index.md +1 -1
- package/components/select/demo/index.min.js +11 -10
- package/components/select/demo/voiceover.md +1 -1
- package/components/select/dist/index.js +10 -9
- package/components/select/dist/registered.js +10 -9
- package/custom-elements.json +88 -84
- package/package.json +1 -1
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
<ul>
|
|
18
18
|
<li>The invalid element shows its error state.</li>
|
|
19
19
|
<li>The help text region updates to show the validation error message.</li>
|
|
20
|
-
<li>VoiceOver
|
|
20
|
+
<li>For elements that link their help text, such as <code>auro-input</code>, VoiceOver reads the error as the element's description when it receives focus. For other elements, such as <code>auro-select</code> and <code>auro-combobox</code>, VoiceOver doesn't currently read the error on focus. It announces their error only when it appears, through the help text region's <code>role="alert"</code>.</li>
|
|
21
21
|
</ul>
|
|
22
22
|
<auro-header level="2" id="voiceOverWorkflow">Submission workflow</auro-header>
|
|
23
23
|
<ol>
|
|
24
24
|
<li><strong>Navigate form elements:</strong> Tab through each form element; VoiceOver announces labels, roles, and states.</li>
|
|
25
25
|
<li><strong>Enter values:</strong> Interact with each element to provide input.</li>
|
|
26
26
|
<li><strong>Submit:</strong> Focus the submit button and activate it, or press <code>Enter</code> while focus is on a named, enabled form element.</li>
|
|
27
|
-
<li><strong>Validation feedback:</strong> If validation fails, each invalid element shows its error. <code>auro-form</code> doesn't move focus, so VoiceOver
|
|
27
|
+
<li><strong>Validation feedback:</strong> If validation fails, each invalid element shows its error. <code>auro-form</code> doesn't move focus, so VoiceOver reads the error when the user moves to an invalid element that links its help text, such as <code>auro-input</code>.</li>
|
|
28
28
|
</ol>
|
|
29
29
|
<auro-header level="2" id="voiceOverReset">Reset workflow</auro-header>
|
|
30
30
|
<ol>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - **Collects values**: The form always gathers the value of every named, enabled Auro form element inside it, such as `auro-input` or `auro-select`, into one object in `value`.
|
|
16
16
|
* - **Tracks validity and changes**: The form always reports whether its fields pass validation in `validity`, and whether any field has changed from its starting value in `isInitialState`.
|
|
17
17
|
* - **Manages submit and reset buttons**: The form always turns on a `button` or `auro-button` with `type="submit"` only while no enabled field is invalid or required but empty, and one with `type="reset"` only when the form has changed or holds a value.
|
|
18
|
-
* - **Submits on Enter**: Pressing Enter in a named, enabled form element
|
|
18
|
+
* - **Submits on Enter**: Pressing Enter in a named, enabled form element runs `submit()`, except on the clear button in `auro-input` or `auro-combobox`.
|
|
19
19
|
* - **Skips disabled fields**: The form always leaves fields with the `disabled` attribute out of `value`, validation, and the `submit` event.
|
|
20
20
|
*
|
|
21
21
|
* **Example**
|
|
@@ -107,7 +107,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
107
107
|
* - **Collects values**: The form always gathers the value of every named, enabled Auro form element inside it, such as `auro-input` or `auro-select`, into one object in `value`.
|
|
108
108
|
* - **Tracks validity and changes**: The form always reports whether its fields pass validation in `validity`, and whether any field has changed from its starting value in `isInitialState`.
|
|
109
109
|
* - **Manages submit and reset buttons**: The form always turns on a `button` or `auro-button` with `type="submit"` only while no enabled field is invalid or required but empty, and one with `type="reset"` only when the form has changed or holds a value.
|
|
110
|
-
* - **Submits on Enter**: Pressing Enter in a named, enabled form element
|
|
110
|
+
* - **Submits on Enter**: Pressing Enter in a named, enabled form element runs `submit()`, except on the clear button in `auro-input` or `auro-combobox`.
|
|
111
111
|
* - **Skips disabled fields**: The form always leaves fields with the `disabled` attribute out of `value`, validation, and the `submit` event.
|
|
112
112
|
*
|
|
113
113
|
* **Example**
|
|
@@ -107,7 +107,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
107
107
|
* - **Collects values**: The form always gathers the value of every named, enabled Auro form element inside it, such as `auro-input` or `auro-select`, into one object in `value`.
|
|
108
108
|
* - **Tracks validity and changes**: The form always reports whether its fields pass validation in `validity`, and whether any field has changed from its starting value in `isInitialState`.
|
|
109
109
|
* - **Manages submit and reset buttons**: The form always turns on a `button` or `auro-button` with `type="submit"` only while no enabled field is invalid or required but empty, and one with `type="reset"` only when the form has changed or holds a value.
|
|
110
|
-
* - **Submits on Enter**: Pressing Enter in a named, enabled form element
|
|
110
|
+
* - **Submits on Enter**: Pressing Enter in a named, enabled form element runs `submit()`, except on the clear button in `auro-input` or `auro-combobox`.
|
|
111
111
|
* - **Skips disabled fields**: The form always leaves fields with the `disabled` attribute out of `value`, validation, and the `submit` event.
|
|
112
112
|
*
|
|
113
113
|
* **Example**
|
|
@@ -36,7 +36,7 @@ A single-line text field that lets people type a value, such as a name, email ad
|
|
|
36
36
|
| placeholder | placeholder | | string | | ui | | Sets hint text shown in the empty field, such as `John Doe`.<br>When not set and `type="date"`, the input shows the date format, such as `MM/DD/YYYY`. |
|
|
37
37
|
| shape | shape | | `box` \| `classic` \| `pill` \| `pill-left` \| `pill-right` \| `rounded` \| `snowflake` | `classic` | ui | | Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,<br>and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.<br>The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`. |
|
|
38
38
|
| simple | simple | | boolean | | ui | | Removes the field's border and background, such as for an input placed inside another component. |
|
|
39
|
-
| size | size | | `xs` \| `sm` \| `md` \| `lg` \| `xl` | `lg` | ui | | Sets the field's
|
|
39
|
+
| size | size | | `xs` \| `sm` \| `md` \| `lg` \| `xl` | `lg` | ui | | Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,<br>and the emphasized layouts support only `xl`. |
|
|
40
40
|
| onDark | ondark | | boolean | `false` | ui | | Deprecated: Use `appearance="inverse"` instead.<br>Styles the input for a dark background. |
|
|
41
41
|
| autocapitalize | autocapitalize | | `off` \| `none` \| `on` \| `sentences` \| `words` \| `characters` | | behavior | | Sets whether mobile keyboards capitalize text as the user types, such as `words` for names<br>(the input's `autocapitalize`). Does not currently apply: the input clears this value on every<br>update, unless `spellcheck="false"`, which sets it to `none`. |
|
|
42
42
|
| autocomplete | autocomplete | | string | | behavior | | Sets what the browser can suggest when filling in the field, such as `off` to turn off<br>autofill suggestions (the input's `autocomplete`). Only `autocomplete="off"` is currently supported. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<auro-header level="1">CSS only with native input</auro-header>
|
|
2
2
|
<p>When you can't use the <code><auro-input></code> web component, style a native HTML <code><input></code> element with the Auro Design System tokens to approximate how <code>auro-input</code> looks. 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> doesn't provide a prebuilt <code>.input</code> or <code>.form-*</code> class, so you write the styles yourself with Auro design tokens.</p>
|
|
3
3
|
<auro-header level="2">Styling a native input</auro-header>
|
|
4
|
-
<p>Reset and restyle the native input with the Auro design tokens published by <auro-hyperlink href="https://
|
|
4
|
+
<p>Reset and restyle the native input with the Auro design tokens published by <auro-hyperlink href="https://github.com/AlaskaAirlines/AuroDesignTokens" target="_blank">@aurodesignsystem/design-tokens</auro-hyperlink>. The pattern below replicates the border, focus ring, padding, label, and helper text used by <code>auro-input</code>.</p>
|
|
5
5
|
<pre><code>/* Color tokens */
|
|
6
6
|
@import "./node_modules/@aurodesignsystem/design-tokens/dist/themes/alaska/CSSCustomProperties--alaska.css";
|
|
7
7
|
/* Size, border-radius, and typography tokens */
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<auro-header level="3">Credit-card formatting and detection</auro-header>
|
|
82
82
|
<p><code>auro-input</code> with <code>type="credit-card"</code> auto-detects Visa, Mastercard, American Express, Discover, Diners Club, JCB, China UnionPay, and Alaska Airlines cards from the first digits, applies the correct digit grouping, such as 4-4-4-4 for Visa or 4-6-5 for Amex, and shows the matching card brand icon when the <code>icon</code> attribute is set. None of this is available natively.</p>
|
|
83
83
|
<auro-header level="3">Password show/hide toggle</auro-header>
|
|
84
|
-
<p
|
|
84
|
+
<p>In the <code>classic</code> layout, <code>auro-input</code> with <code>type="password"</code> includes an accessible show/hide button, named with the <code>ariaLabel.password.show</code> and <code>ariaLabel.password.hide</code> slots. A native password input only hides the value, so you must build the toggle button, swap the <code>type</code> attribute, and manage its accessible name yourself.</p>
|
|
85
85
|
<auro-header level="3">Clear button</auro-header>
|
|
86
86
|
<p><code>auro-input</code> renders an accessible clear button when the field has a value, named with the <code>ariaLabel.clear</code> slot. Native inputs don't provide a clear control beyond the browser's built-in (and inconsistently styled) <code>type="search"</code> affordance.</p>
|
|
87
87
|
<auro-header level="3">Custom validation messages</auro-header>
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
<auro-header level="3">Format types</auro-header>
|
|
90
90
|
<p><code>auro-input</code> has dedicated <code>type</code> values for <code>credit-card</code>, <code>tel</code>, and <code>date</code>, each applying the correct mask and validation. For dates, the <code>format</code> attribute sets the order of the parts, such as <code>mm/dd/yyyy</code>, <code>yyyy/mm/dd</code>, or <code>mm/yy</code>. With native HTML, you're limited to the standard input types and must implement format-specific behavior by hand.</p>
|
|
91
91
|
<auro-header level="3">Floating and dynamic labels</auro-header>
|
|
92
|
-
<p
|
|
92
|
+
<p>In the <code>classic</code> layout, <code>auro-input</code> floats the label above the field when it has focus or a value. In every layout, it automatically associates slotted label content with the underlying input. With native HTML you must wire up <code>for</code>/<code>id</code> attributes and author the floating-label animation yourself.</p>
|
|
93
93
|
<auro-header level="3">Display value slot</auro-header>
|
|
94
|
-
<p><code>auro-input</code> supports a <code>displayValue</code> slot that renders custom HTML in place of the raw value when the input doesn't have focus. It's useful for masked account numbers or formatted currency. Native inputs always show the raw value and have no equivalent.</p>
|
|
94
|
+
<p><code>auro-input</code> supports a <code>displayValue</code> slot that renders custom HTML in place of the raw value when the input has a value and doesn't have focus. It's useful for masked account numbers or formatted currency. Native inputs always show the raw value and have no equivalent.</p>
|
|
95
95
|
<auro-header level="3">Layout and shape variants</auro-header>
|
|
96
96
|
<p><code>auro-input</code> supports the <code>classic</code>, <code>emphasized</code>, and <code>snowflake</code> layouts, as well as <code>shape</code> variants (<code>box</code>, <code>pill</code>, <code>pill-left</code>, and <code>pill-right</code>). It also has a bordered default and a borderless <code>simple</code> mode. With native HTML you must author each variant's CSS yourself.</p>
|
|
97
97
|
<auro-header level="3">Icons and accents</auro-header>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<section>
|
|
43
43
|
<auro-header level="2" id="appearance">Appearance</auro-header>
|
|
44
44
|
<auro-header level="3" id="activeLabel">Active label</auro-header>
|
|
45
|
-
<p>Use the <code>activeLabel</code> attribute to make the label stay fixed in the active position. This applies to the
|
|
45
|
+
<p>Use the <code>activeLabel</code> attribute to make the label stay fixed in the active position. This applies only to the default <code>classic</code> layout; the emphasized and snowflake layouts always render the label inside the field and are unaffected.</p>
|
|
46
46
|
<div class="exampleWrapper">
|
|
47
47
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/active-label.html) -->
|
|
48
48
|
<!-- The below content is automatically added from ../apiExamples/active-label.html -->
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
</auro-input>
|
|
146
146
|
<auro-header level="4">Display value slot content with <code>dvInputOnly</code></auro-header>
|
|
147
147
|
<auro-input dvInputOnly value="Hello World">
|
|
148
|
-
<span slot="label">With dvInputOnly</span>
|
|
148
|
+
<span slot="label">With <code>dvInputOnly</code></span>
|
|
149
149
|
<span slot="displayValue">✨ Custom display ✨</span>
|
|
150
150
|
</auro-input>
|
|
151
151
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
</auro-input>
|
|
162
162
|
<auro-header level="4">Display value slot content with <code>dvInputOnly</code></auro-header>
|
|
163
163
|
<auro-input dvInputOnly value="Hello World">
|
|
164
|
-
<span slot="label">With dvInputOnly</span>
|
|
164
|
+
<span slot="label">With <code>dvInputOnly</code></span>
|
|
165
165
|
<span slot="displayValue">✨ Custom display ✨</span>
|
|
166
166
|
</auro-input></code></pre>
|
|
167
167
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
+ <span slot="ariaLabel.password.hide">Passwort verbergen</span>
|
|
254
254
|
</auro-input></code></pre>
|
|
255
255
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
256
|
-
<p class="note"><strong>Note:</strong> The input doesn't translate the messages you set with the <code>setCustomValidity*</code> attributes either, so supply translated text when you use them. The built-in help text and
|
|
256
|
+
<p class="note"><strong>Note:</strong> The input doesn't translate the messages you set with the <code>setCustomValidity*</code> attributes either, so supply translated text when you use them. The built-in help text and the built-in messages for a value that doesn't fit the <code>type</code> follow <code>lang</code>, which has Spanish (<code>es</code>) and English text. Other built-in error messages come from the browser, except "Invalid Date Format Entered", which is always in English.</p>
|
|
257
257
|
<auro-header level="4" id="localizationDateFormatting">Date formatting</auro-header>
|
|
258
258
|
<p>When <code>type="date"</code> is set, the <code>locale</code> attribute sets the date format the input uses as the user types. Setting <code>locale</code> picks the region's format from the browser's <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" target="_blank">Intl</auro-hyperlink> API, such as <code>mm/dd/yyyy</code> for <code>en-US</code>, <code>dd.mm.yyyy</code> for <code>de-DE</code>, and <code>yyyy/mm/dd</code> for <code>ja-JP</code>, so you don't need to set <code>format</code>.</p>
|
|
259
259
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization-locale.html) -->
|
|
@@ -10651,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10651
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10652
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10653
10653
|
/**
|
|
10654
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10655
10655
|
* @internal
|
|
10656
10656
|
*/
|
|
10657
10657
|
static get shadowRootOptions() {
|
|
@@ -10825,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10825
10825
|
},
|
|
10826
10826
|
|
|
10827
10827
|
/**
|
|
10828
|
-
* Sets the field's
|
|
10829
|
-
* emphasized layouts support only `xl`.
|
|
10828
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
10829
|
+
* and the emphasized layouts support only `xl`.
|
|
10830
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10831
10831
|
* @default 'lg'
|
|
10832
10832
|
* @category ui
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090436';
|
|
12626
12626
|
|
|
12627
12627
|
/**
|
|
12628
12628
|
* @license
|
|
@@ -13093,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13093
13093
|
|
|
13094
13094
|
/**
|
|
13095
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13096
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13097
13097
|
* @private
|
|
13098
13098
|
* @returns {string}
|
|
13099
13099
|
*/
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
</auro-input>
|
|
131
131
|
<auro-input dvInputOnly id="alpha" value="lax" layout="emphasized" shape="pill" size="xl" placeholder="Departure" style="width: 249px;" appearance="inverse" required>
|
|
132
132
|
<span slot="ariaLabel.clear">Clear value</span>
|
|
133
|
-
<label slot="label">Pill
|
|
133
|
+
<label slot="label">Pill with display value</label>
|
|
134
134
|
<span slot="helpText">Example help text</span>
|
|
135
135
|
<span slot="displayValue">
|
|
136
136
|
<div>
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
</auro-input>
|
|
164
164
|
<auro-input dvInputOnly id="alpha" value="lax" layout="emphasized" shape="pill" size="xl" placeholder="Departure" style="width: 249px;" appearance="inverse" required>
|
|
165
165
|
<span slot="ariaLabel.clear">Clear value</span>
|
|
166
|
-
<label slot="label">Pill
|
|
166
|
+
<label slot="label">Pill with display value</label>
|
|
167
167
|
<span slot="helpText">Example help text</span>
|
|
168
168
|
<span slot="displayValue">
|
|
169
169
|
<div>
|
|
@@ -350,8 +350,8 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
350
350
|
<p>Converts a <code>Date</code> instance to a string in the given date format, such as <code>15/01/2024</code> for <code>dd/mm/yyyy</code>. Returns <code>undefined</code> when <code>valueObject</code> isn't a valid <code>Date</code> or <code>format</code> is empty.</p>
|
|
351
351
|
<p>Use it when an API needs the date in a specific format, whatever format the user typed it in.</p>
|
|
352
352
|
<ul>
|
|
353
|
-
<li><strong>valueObject</strong>: The <code>Date</code> to format, such as <code>input.valueObject</code>.</li>
|
|
354
|
-
<li><strong>format</strong>: The display format, such as <code>mm/dd/yyyy</code>.</li>
|
|
353
|
+
<li><strong><code>valueObject</code></strong>: The <code>Date</code> to format, such as <code>input.valueObject</code>.</li>
|
|
354
|
+
<li><strong><code>format</code></strong>: The display format, such as <code>mm/dd/yyyy</code>.</li>
|
|
355
355
|
</ul>
|
|
356
356
|
<pre class="language-js"><code class="language-js">AuroInputUtil.toFormattedValue(auroInput.valueObject, 'dd/mm/yyyy'); // returns '15/01/2024' for an ISO value of '2024-01-15'</code></pre>
|
|
357
357
|
</section>
|
|
@@ -10651,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10651
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10652
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10653
10653
|
/**
|
|
10654
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10655
10655
|
* @internal
|
|
10656
10656
|
*/
|
|
10657
10657
|
static get shadowRootOptions() {
|
|
@@ -10825,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10825
10825
|
},
|
|
10826
10826
|
|
|
10827
10827
|
/**
|
|
10828
|
-
* Sets the field's
|
|
10829
|
-
* emphasized layouts support only `xl`.
|
|
10828
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
10829
|
+
* and the emphasized layouts support only `xl`.
|
|
10830
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10831
10831
|
* @default 'lg'
|
|
10832
10832
|
* @category ui
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090436';
|
|
12626
12626
|
|
|
12627
12627
|
/**
|
|
12628
12628
|
* @license
|
|
@@ -13093,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13093
13093
|
|
|
13094
13094
|
/**
|
|
13095
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13096
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13097
13097
|
* @private
|
|
13098
13098
|
* @returns {string}
|
|
13099
13099
|
*/
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
Move focus to the <code><auro-input></code> element
|
|
32
32
|
<div class="note">
|
|
33
33
|
<p>
|
|
34
|
-
|
|
34
|
+
In the <code>classic</code> layout, the label animates from the placeholder position to the active position above the input area. If the <code>activeLabel</code> attribute is set, the label stays in the active position at all times. The emphasized and snowflake layouts always show the label inside the field.
|
|
35
35
|
</p>
|
|
36
36
|
</div>
|
|
37
37
|
</li>
|
|
@@ -10651,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10651
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10652
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10653
10653
|
/**
|
|
10654
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10655
10655
|
* @internal
|
|
10656
10656
|
*/
|
|
10657
10657
|
static get shadowRootOptions() {
|
|
@@ -10825,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10825
10825
|
},
|
|
10826
10826
|
|
|
10827
10827
|
/**
|
|
10828
|
-
* Sets the field's
|
|
10829
|
-
* emphasized layouts support only `xl`.
|
|
10828
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
10829
|
+
* and the emphasized layouts support only `xl`.
|
|
10830
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10831
10831
|
* @default 'lg'
|
|
10832
10832
|
* @category ui
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090436';
|
|
12626
12626
|
|
|
12627
12627
|
/**
|
|
12628
12628
|
* @license
|
|
@@ -13093,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13093
13093
|
|
|
13094
13094
|
/**
|
|
13095
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13096
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13097
13097
|
* @private
|
|
13098
13098
|
* @returns {string}
|
|
13099
13099
|
*/
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<p><code>auro-input</code> provides:</p>
|
|
6
6
|
<ul>
|
|
7
7
|
<li><strong>Automatic label binding</strong>: The label slot is automatically associated with the input. You don't need to wire up <code>for</code> and <code>id</code>.</li>
|
|
8
|
-
<li><strong>Dynamic label positioning</strong>:
|
|
8
|
+
<li><strong>Dynamic label positioning</strong>: In the <code>classic</code> layout, labels float above the input when focused or populated, providing context without consuming space.</li>
|
|
9
9
|
<li><strong>Clear button</strong>: An accessible clear button appears when the input has a value. Set its accessible name with the <code>ariaLabel.clear</code> slot.</li>
|
|
10
|
-
<li><strong>Password toggle</strong>:
|
|
10
|
+
<li><strong>Password toggle</strong>: In the <code>classic</code> layout, <code>type="password"</code> adds a show/hide button. Set its accessible name for each state with the <code>ariaLabel.password.show</code> and <code>ariaLabel.password.hide</code> slots.</li>
|
|
11
11
|
<li><strong>Validation announcements</strong>: Error messages display in help text with appropriate ARIA roles so screen readers announce validity changes.</li>
|
|
12
12
|
</ul>
|
|
13
13
|
<auro-header level="2" id="inputMaskingAndFormatting">Input masking and formatting</auro-header>
|
|
@@ -196,7 +196,7 @@ export class AuroInput extends BaseInput {
|
|
|
196
196
|
private handleClickShowPassword;
|
|
197
197
|
/**
|
|
198
198
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
199
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
199
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
200
200
|
* @private
|
|
201
201
|
* @returns {string}
|
|
202
202
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export default class BaseInput extends AuroElement {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
static get shadowRootOptions(): {
|
|
@@ -36,8 +36,8 @@ export default class BaseInput extends AuroElement {
|
|
|
36
36
|
*/
|
|
37
37
|
shape: "box" | "classic" | "pill" | "pill-left" | "pill-right" | "rounded" | "snowflake";
|
|
38
38
|
/**
|
|
39
|
-
* Sets the field's
|
|
40
|
-
* emphasized layouts support only `xl`.
|
|
39
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
40
|
+
* and the emphasized layouts support only `xl`.
|
|
41
41
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
42
42
|
* @default 'lg'
|
|
43
43
|
* @category ui
|
|
@@ -10593,7 +10593,7 @@ class BaseInput extends AuroElement {
|
|
|
10593
10593
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10594
10594
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10595
10595
|
/**
|
|
10596
|
-
*
|
|
10596
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10597
10597
|
* @internal
|
|
10598
10598
|
*/
|
|
10599
10599
|
static get shadowRootOptions() {
|
|
@@ -10767,8 +10767,8 @@ class BaseInput extends AuroElement {
|
|
|
10767
10767
|
},
|
|
10768
10768
|
|
|
10769
10769
|
/**
|
|
10770
|
-
* Sets the field's
|
|
10771
|
-
* emphasized layouts support only `xl`.
|
|
10770
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
10771
|
+
* and the emphasized layouts support only `xl`.
|
|
10772
10772
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10773
10773
|
* @default 'lg'
|
|
10774
10774
|
* @category ui
|
|
@@ -12564,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12564
|
}
|
|
12565
12565
|
}
|
|
12566
12566
|
|
|
12567
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611090436';
|
|
12568
12568
|
|
|
12569
12569
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12570
12570
|
// See LICENSE in the project root for license information.
|
|
@@ -13023,7 +13023,7 @@ class AuroInput extends BaseInput {
|
|
|
13023
13023
|
|
|
13024
13024
|
/**
|
|
13025
13025
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13026
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13026
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13027
13027
|
* @private
|
|
13028
13028
|
* @returns {string}
|
|
13029
13029
|
*/
|
|
@@ -10593,7 +10593,7 @@ class BaseInput extends AuroElement {
|
|
|
10593
10593
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10594
10594
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10595
10595
|
/**
|
|
10596
|
-
*
|
|
10596
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10597
10597
|
* @internal
|
|
10598
10598
|
*/
|
|
10599
10599
|
static get shadowRootOptions() {
|
|
@@ -10767,8 +10767,8 @@ class BaseInput extends AuroElement {
|
|
|
10767
10767
|
},
|
|
10768
10768
|
|
|
10769
10769
|
/**
|
|
10770
|
-
* Sets the field's
|
|
10771
|
-
* emphasized layouts support only `xl`.
|
|
10770
|
+
* Sets the field's height. The `classic` and `snowflake` shapes are the same height at every size,
|
|
10771
|
+
* and the emphasized layouts support only `xl`.
|
|
10772
10772
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10773
10773
|
* @default 'lg'
|
|
10774
10774
|
* @category ui
|
|
@@ -12564,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12564
|
}
|
|
12565
12565
|
}
|
|
12566
12566
|
|
|
12567
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611090436';
|
|
12568
12568
|
|
|
12569
12569
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12570
12570
|
// See LICENSE in the project root for license information.
|
|
@@ -13023,7 +13023,7 @@ class AuroInput extends BaseInput {
|
|
|
13023
13023
|
|
|
13024
13024
|
/**
|
|
13025
13025
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13026
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13026
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13027
13027
|
* @private
|
|
13028
13028
|
* @returns {string}
|
|
13029
13029
|
*/
|
|
@@ -56,7 +56,7 @@ A list of options that people choose from, used as the options list inside `auro
|
|
|
56
56
|
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
57
57
|
| auroMenu-activatedOption | Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`. |
|
|
58
58
|
| auroMenu-customEventFired | Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`. |
|
|
59
|
-
| auroMenu-loadingChange | Fires when `loading` changes.
|
|
59
|
+
| auroMenu-loadingChange | Fires when `loading` changes, and once when the menu first renders. |
|
|
60
60
|
| auroMenu-optionsChange | Fires when the set of options in the menu changes. |
|
|
61
61
|
| auroMenu-selectedOption | Fires when the selection changes, including when an option is deselected or the selection is cleared. In single-select mode, it also fires when someone chooses the option that's already selected. |
|
|
62
62
|
| auroMenu-selectValueFailure | Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode. |
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
<p><code>auro-menu</code> tracks the active option internally (via an <code>active</code> CSS class on the current <code>auro-menuoption</code>) rather than moving DOM focus between options. In typical integrations (<code><auro-select></code>, <code><auro-combobox></code>), focus remains on the parent trigger/input and <code>aria-activedescendant</code> points at the active option; if you make <code><auro-menu></code> focusable (for example, <code>tabindex="0"</code>), the same active-option model applies while focus is on the menu host. With plain HTML, you must pick one focus model, either roving <code>tabindex="0"</code>/<code>tabindex="-1"</code> or <code>aria-activedescendant</code> on the container, and wire up the DOM writes yourself on every key event.</p>
|
|
58
58
|
<auro-header level="3">Arrow-key navigation</auro-header>
|
|
59
59
|
<p><code>auro-menu</code> handles <code>ArrowUp</code>, <code>ArrowDown</code>, <code>Enter</code>, and <code>Tab</code> to move the highlight and commit selections. Native <code><ul></code> elements have no built-in keyboard model: you must wire up <code>keydown</code> listeners, track the highlighted index, and prevent default browser scrolling on the arrow keys yourself.</p>
|
|
60
|
-
<auro-header level="3">matchWord highlighting</auro-header>
|
|
60
|
+
<auro-header level="3"><code>matchWord</code> highlighting</auro-header>
|
|
61
61
|
<p><code>auro-menu</code> supports a <code>matchword</code> attribute (the <code>matchWord</code> property) that highlights matched substrings within option labels. <code>auro-combobox</code> uses it to visually mark the user's typed input inside each filtered option. Plain HTML provides no equivalent; you must walk each option and wrap matched substrings yourself.</p>
|
|
62
62
|
<auro-header level="3">Type-ahead navigation</auro-header>
|
|
63
|
-
<p>Type-ahead, which moves the active option to
|
|
63
|
+
<p>Type-ahead, which moves the active option to an option that starts with the letters someone types, <strong>isn't</strong> handled by <code>auro-menu</code> itself. <code>auro-select</code> provides it: it captures typed characters on its trigger and calls the menu's <code>updateActiveOption()</code> method. <code>auro-combobox</code> doesn't use type-ahead, because typing goes into its input. A plain-HTML listbox has no such wiring and would need a bespoke <code>keydown</code> handler that tracks a rolling character buffer and resolves it against the option list.</p>
|
|
64
64
|
<auro-header level="3">Nested submenu support</auro-header>
|
|
65
65
|
<p><code>auro-menu</code> detects nested <code>auro-menu</code> elements, applies the correct <code>role="group"</code>, and computes indentation per level. The root menu treats all descendant options as a single flat list, so selecting an option inside a nested menu updates the root menu's <code>value</code> and <code>optionSelected</code>. The root always owns the selection state. With plain HTML, you must apply nested ARIA roles and indentation manually.</p>
|
|
66
66
|
<auro-header level="3">Selection state coordination</auro-header>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<auro-header level="3">Select-by-value and reset</auro-header>
|
|
77
77
|
<p><code>auro-menu</code> exposes a <code>value</code> attribute that drives selection programmatically (accepting a JSON-stringified array in multi-select mode) and a single <code>reset()</code> method that clears the selection and the active option. With plain HTML, you must walk the list to find a matching option, set its state, and write your own reset routine.</p>
|
|
78
78
|
<auro-header level="3">Loading state</auro-header>
|
|
79
|
-
<p><code>auro-menu</code> renders a built-in loading placeholder via <code>loadingIcon</code> and <code>loadingText</code> slots, sets <code>aria-busy</code>, and emits <code>auroMenu-loadingChange</code> when the loading attribute toggles. With plain HTML, you must render a placeholder, manage <code>aria-busy</code>, and signal loading transitions yourself.</p>
|
|
79
|
+
<p><code>auro-menu</code> renders a built-in loading placeholder via <code>loadingIcon</code> and <code>loadingText</code> slots, sets <code>aria-busy</code>, and emits <code>auroMenu-loadingChange</code> when the <code>loading</code> attribute toggles. With plain HTML, you must render a placeholder, manage <code>aria-busy</code>, and signal loading transitions yourself.</p>
|
|
80
80
|
<auro-header level="3">Shape and size variants</auro-header>
|
|
81
81
|
<p><code>auro-menu</code> supports <code>shape</code> (<code>box</code>, <code>pill</code>, <code>snowflake</code>) and <code>size</code> (<code>xs</code>–<code>xl</code>) variants that adjust spacing and corner radii consistently across the menu and its options. A CSS-only listbox must reauthor each variant by hand.</p>
|
|
82
82
|
<auro-header level="3">Multi-brand theming</auro-header>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<tr>
|
|
115
115
|
<td>Type-ahead navigation</td>
|
|
116
116
|
<td>Not supported</td>
|
|
117
|
-
<td>Provided by parent <code>auro-select</code
|
|
117
|
+
<td>Provided by parent <code>auro-select</code></td>
|
|
118
118
|
</tr>
|
|
119
119
|
<tr>
|
|
120
120
|
<td>Nested submenus</td>
|
|
@@ -370,7 +370,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
370
370
|
</section>
|
|
371
371
|
<section>
|
|
372
372
|
<auro-header level="2" id="events">Events</auro-header>
|
|
373
|
-
<p>
|
|
373
|
+
<p>Listen for these custom events from <code><auro-menu></code> with <code>addEventListener</code>. The example below listens for the selection, active-option, options, reset, and failure events and logs each one.</p>
|
|
374
374
|
<auro-header level="3" id="eventList">Event list</auro-header>
|
|
375
375
|
<ul>
|
|
376
376
|
<li><code>auroMenu-selectedOption</code>: the selection changed, including when an option is deselected or the selection is cleared. In single-select mode, it also fires when the already-selected option is chosen again.</li>
|
|
@@ -378,7 +378,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
378
378
|
<li><code>auroMenu-optionsChange</code>: the set of available options was updated, such as after a slot change.</li>
|
|
379
379
|
<li><code>auroMenu-selectValueReset</code>: the menu's <code>value</code> was reset with <code>reset()</code>.</li>
|
|
380
380
|
<li><code>auroMenu-selectValueFailure</code>: a value selection (through <code>selectByValue()</code>, the <code>value</code> attribute, or setting the <code>value</code> property) found no matching selectable option. This includes values that match an option marked <code>disabled</code> or <code>static</code>, which are never selectable. It also fires in multi-select mode when someone chooses an option with no <code>value</code>.</li>
|
|
381
|
-
<li><code>auroMenu-loadingChange</code>: the <code>loading</code> attribute changed.</li>
|
|
381
|
+
<li><code>auroMenu-loadingChange</code>: the <code>loading</code> attribute changed. It also fires once when the menu first renders.</li>
|
|
382
382
|
<li><code>auroMenu-customEventFired</code>: the menu fired the event named in an option's <code>event</code> attribute. See <a href="#eventAttribute">Option event attribute</a>.</li>
|
|
383
383
|
</ul>
|
|
384
384
|
<div class="exampleWrapper">
|
|
@@ -487,7 +487,7 @@ let menuInstanceIdCounter = 0;
|
|
|
487
487
|
*
|
|
488
488
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
|
|
489
489
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
|
|
490
|
-
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
|
|
490
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
|
|
491
491
|
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
|
|
492
492
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
|
|
493
493
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<li><strong>Keyboard navigation:</strong> Arrow Up/Down move the active option; Enter selects it; Tab selects and moves focus out of the menu.</li>
|
|
8
8
|
<li><strong>Active option tracking:</strong> The menu tracks the highlighted option, so parent components, such as <code>auro-select</code> and <code>auro-combobox</code>, can point <code>aria-activedescendant</code> at it.</li>
|
|
9
9
|
<li><strong>Multi-select semantics:</strong> When <code>multiSelect</code> is on, the menu sets <code>aria-multiselectable</code>.</li>
|
|
10
|
-
<li><strong>Loading state:</strong> The menu sets <code>aria-busy</code> while loading, and the <code>loadingIcon</code> and <code>loadingText</code> slots
|
|
10
|
+
<li><strong>Loading state:</strong> The menu sets <code>aria-busy</code> while loading, and shows the content of the <code>loadingIcon</code> and <code>loadingText</code> slots in place of the options.</li>
|
|
11
11
|
</ul>
|
|
12
12
|
<auro-header level="2" id="richOptionContent">Rich option content</auro-header>
|
|
13
13
|
<p><code><option></code> elements accept only plain text. Native HTML has no way to add icons, descriptions, or nested structure to options.</p>
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
<p>Native selects have no loading pattern. When options load asynchronously, native HTML has no standard way to tell people they're still loading.</p>
|
|
40
40
|
<p><code>auro-menu</code> provides:</p>
|
|
41
41
|
<ul>
|
|
42
|
-
<li>A <code>loading</code> attribute that
|
|
43
|
-
<li><code>loadingIcon</code> and <code>loadingText</code> slots for
|
|
42
|
+
<li>A <code>loading</code> attribute that replaces the options with a loading placeholder</li>
|
|
43
|
+
<li><code>loadingIcon</code> and <code>loadingText</code> slots for the icon and text the placeholder shows</li>
|
|
44
44
|
<li><code>auroMenu-loadingChange</code> event when the loading state changes</li>
|
|
45
45
|
</ul>
|
|
46
46
|
<auro-header level="2" id="composability">Composability</auro-header>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
|
|
22
22
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
|
|
23
|
-
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
|
|
23
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
|
|
24
24
|
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
|
|
25
25
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
|
|
26
26
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
|
|
@@ -492,7 +492,7 @@ let menuInstanceIdCounter = 0;
|
|
|
492
492
|
*
|
|
493
493
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
|
|
494
494
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
|
|
495
|
-
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
|
|
495
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
|
|
496
496
|
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
|
|
497
497
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
|
|
498
498
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
|
|
@@ -453,7 +453,7 @@ let menuInstanceIdCounter = 0;
|
|
|
453
453
|
*
|
|
454
454
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Fires when an option becomes the active (highlighted) option, through the arrow keys, hover, or `updateActiveOption()`. The option is in `detail`.
|
|
455
455
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Fires right after the menu fires the event named in an option's `event` attribute. The option is in `detail.option`.
|
|
456
|
-
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes.
|
|
456
|
+
* @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Fires when `loading` changes, and once when the menu first renders.
|
|
457
457
|
* @event {CustomEvent<{ options: Array<HTMLElement> }>} auroMenu-optionsChange - Fires when the set of options in the menu changes.
|
|
458
458
|
* @event {CustomEvent<any>} auroMenu-selectValueFailure - Fires when a value doesn't match any option that can be selected, or when someone chooses an option with no `value` in multi-select mode.
|
|
459
459
|
* @event {CustomEvent<any>} auroMenu-selectValueReset - Fires when `reset()` clears the menu.
|
|
@@ -98,10 +98,10 @@ A group of radio buttons with a shared label that lets people choose exactly one
|
|
|
98
98
|
| error | error | | string | | behavior | | Shows the group in its error state with this message, such as "Select an option".<br>The error stays until you remove the attribute. When set, `setCustomValidityCustomError` or `setCustomValidity` replaces the message. |
|
|
99
99
|
| noValidate | novalidate | | boolean | | behavior | | Stops the group from validating automatically when focus leaves it or the selection changes.<br>To validate the group yourself, call `validate()`. The `error` attribute still applies. |
|
|
100
100
|
| optionSelected | | | HTMLElement | | behavior | | Gets the selected `auro-radio` element, or `undefined` when nothing is selected. |
|
|
101
|
-
| required | required | | boolean | | behavior |
|
|
102
|
-
| setCustomValidity | setcustomvalidity | | string | | behavior |
|
|
103
|
-
| setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior |
|
|
104
|
-
| setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior |
|
|
101
|
+
| required | required | | boolean | | behavior | | Requires a selection in the group and hides the "(optional)" text after the legend.<br>Unless `noValidate` is set, the group shows an error when focus leaves it with nothing selected. |
|
|
102
|
+
| setCustomValidity | setcustomvalidity | | string | | behavior | | Sets one error message for every kind of error, such as "Choose an option".<br>It replaces the `error` text and the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages. |
|
|
103
|
+
| setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior | `error` | Sets the error message shown while the `error` attribute is set, in place of the attribute's own text.<br>`setCustomValidity` takes priority when both are set. |
|
|
104
|
+
| setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior | `required` | Sets the error message shown when the group is `required` and nothing is selected, such as "Select an option".<br>The group has no default message, so set this or `setCustomValidity` to show one. `setCustomValidity` takes priority when both are set. |
|
|
105
105
|
| validity | validity | readonly | string | | behavior | | Gets the group's current validation state: `valid`, `valueMissing`, or `customError`.<br>It's `undefined` until the group is first validated. |
|
|
106
106
|
| value | value | | string | | behavior | | Gets the `value` of the selected radio button, such as `window`.<br>Setting it doesn't select a radio button; set `checked` on the radio button instead. |
|
|
107
107
|
|