@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.6 → 0.0.0-pr1628.8
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/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/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/css-only.md +3 -3
- package/components/combobox/demo/customize.min.js +12 -9
- package/components/combobox/demo/getting-started.min.js +12 -9
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +12 -9
- package/components/combobox/dist/auro-combobox.d.ts +5 -3
- package/components/combobox/dist/index.js +12 -9
- package/components/combobox/dist/registered.js +12 -9
- package/components/counter/demo/accessibility.md +1 -1
- package/components/counter/demo/css-only.md +1 -1
- package/components/counter/demo/customize.min.js +6 -6
- package/components/counter/demo/getting-started.min.js +6 -6
- package/components/counter/demo/index.min.js +6 -6
- package/components/counter/demo/why-counter.md +2 -2
- package/components/counter/dist/auro-counter-group.d.ts +2 -3
- package/components/counter/dist/index.js +6 -6
- package/components/counter/dist/registered.js +6 -6
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/accessibility.md +2 -2
- package/components/datepicker/demo/css-only.md +3 -3
- package/components/datepicker/demo/customize.md +1 -1
- package/components/datepicker/demo/customize.min.js +106 -96
- 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 +106 -96
- package/components/datepicker/demo/index.md +2 -2
- package/components/datepicker/demo/index.min.js +106 -96
- 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 +2 -2
- 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 +39 -33
- package/components/datepicker/dist/auro-datepicker.d.ts +9 -7
- package/components/datepicker/dist/index.js +106 -96
- package/components/datepicker/dist/registered.js +106 -96
- package/components/datepicker/dist/utilities.d.ts +1 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts +4 -2
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +4 -4
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/customize.min.js +2 -1
- package/components/dropdown/demo/getting-started.min.js +5 -4
- package/components/dropdown/demo/index.min.js +2 -1
- package/components/dropdown/demo/voiceover.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
- package/components/dropdown/dist/index.js +2 -1
- package/components/dropdown/dist/registered.js +2 -1
- package/components/form/README.md +1 -1
- package/components/form/demo/css-only.md +1 -1
- package/components/form/demo/customize.min.js +146 -133
- package/components/form/demo/getting-started.min.js +146 -133
- package/components/form/demo/index.min.js +146 -133
- package/components/form/demo/keyboard-behavior.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/demo/registerDemoDeps.min.js +146 -133
- package/components/input/demo/css-only.md +3 -3
- package/components/input/demo/customize.md +1 -1
- package/components/input/demo/customize.min.js +3 -3
- package/components/input/demo/design.md +2 -2
- package/components/input/demo/getting-started.min.js +3 -3
- package/components/input/demo/index.md +1 -1
- package/components/input/demo/index.min.js +3 -3
- package/components/input/demo/why-input.md +1 -1
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +3 -3
- package/components/input/dist/registered.js +3 -3
- package/components/menu/demo/css-only.md +1 -1
- package/components/menu/demo/getting-started.md +1 -1
- package/components/menu/demo/why-menu.md +3 -3
- package/components/radio/demo/accessibility.md +1 -1
- package/components/radio/demo/api.md +10 -10
- package/components/radio/demo/customize.md +15 -5
- package/components/radio/demo/customize.min.js +10 -12
- package/components/radio/demo/design.md +1 -1
- package/components/radio/demo/getting-started.md +6 -6
- package/components/radio/demo/getting-started.min.js +10 -12
- package/components/radio/demo/index.md +1 -1
- package/components/radio/demo/index.min.js +10 -12
- package/components/radio/demo/keyboard-behavior.md +1 -1
- package/components/radio/demo/voiceover.md +1 -1
- package/components/radio/dist/auro-radio-group.d.ts +6 -8
- package/components/radio/dist/auro-radio.d.ts +3 -3
- package/components/radio/dist/index.js +10 -12
- package/components/radio/dist/registered.js +10 -12
- package/components/select/demo/api.md +1 -1
- package/components/select/demo/css-only.md +1 -1
- package/components/select/demo/customize.min.js +8 -6
- package/components/select/demo/getting-started.min.js +8 -6
- package/components/select/demo/index.min.js +8 -6
- package/components/select/demo/voiceover.md +1 -1
- package/components/select/dist/auro-select.d.ts +4 -3
- package/components/select/dist/index.js +8 -6
- package/components/select/dist/registered.js +8 -6
- package/custom-elements.json +77 -79
- package/package.json +1 -1
|
@@ -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 */
|
|
@@ -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>
|
|
@@ -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() {
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090134';
|
|
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>
|
|
@@ -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() {
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090134';
|
|
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() {
|
|
@@ -12622,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12622
12622
|
}
|
|
12623
12623
|
}
|
|
12624
12624
|
|
|
12625
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611090134';
|
|
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,7 +5,7 @@
|
|
|
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
10
|
<li><strong>Password toggle</strong>: For <code>type="password"</code>, a show/hide button is built in. 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>
|
|
@@ -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
|
*/
|
|
@@ -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() {
|
|
@@ -12564,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12564
|
}
|
|
12565
12565
|
}
|
|
12566
12566
|
|
|
12567
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611090134';
|
|
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() {
|
|
@@ -12564,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12564
|
}
|
|
12565
12565
|
}
|
|
12566
12566
|
|
|
12567
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611090134';
|
|
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
|
*/
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -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
|
|
|
@@ -122,12 +122,12 @@ A group of radio buttons with a shared label that lets people choose exactly one
|
|
|
122
122
|
|
|
123
123
|
### Slots
|
|
124
124
|
|
|
125
|
-
| Name | Category | Required | Relevant when | Description
|
|
126
|
-
| ------------- | -------- | -------- | ------------- |
|
|
127
|
-
| helpText | ui | | | Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it.
|
|
128
|
-
| legend | ui | Yes | | Label for the group, such as "Seat preference". Screen readers announce it as the group's name.
|
|
129
|
-
| optionalLabel | ui | | `!required` | Text shown after the legend when the group isn't `required`, such as "
|
|
130
|
-
| default | | | | The `auro-radio` elements in the group.
|
|
125
|
+
| Name | Category | Required | Relevant when | Description |
|
|
126
|
+
| ------------- | -------- | -------- | ------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
127
|
+
| helpText | ui | | | Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it. |
|
|
128
|
+
| legend | ui | Yes | | Label for the group, such as "Seat preference". Screen readers announce it as the group's name. |
|
|
129
|
+
| optionalLabel | ui | | `!required` | Text shown after the legend when the group isn't `required`, such as a translated "(optional)". Defaults to "(optional)". |
|
|
130
|
+
| default | | | | The `auro-radio` elements in the group. |
|
|
131
131
|
|
|
132
132
|
### CSS shadow parts
|
|
133
133
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<auro-header level="1" id="overview">Radio
|
|
1
|
+
<auro-header level="1" id="overview">Radio: Customize</auro-header>
|
|
2
2
|
<div class="contentWrapper">
|
|
3
3
|
<nav>
|
|
4
4
|
<auro-nav anchorNavContent=".scrollWrapper">
|
|
@@ -116,11 +116,17 @@
|
|
|
116
116
|
<!-- The below content is automatically added from ./../apiExamples/custom-tokens.html -->
|
|
117
117
|
<style>
|
|
118
118
|
#customTokenRadioGroup {
|
|
119
|
+
--ds-auro-radio-group-label-color: purple;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#customTokenRadioGroup auro-radio {
|
|
119
123
|
--ds-auro-radio-btn-border-color: purple;
|
|
124
|
+
--ds-auro-radio-label-color: purple;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#customTokenRadioGroup auro-radio[checked] {
|
|
120
128
|
--ds-auro-radio-btn-fill-color: lavender;
|
|
121
129
|
--ds-auro-radio-btn-inset-color: purple;
|
|
122
|
-
--ds-auro-radio-label-color: purple;
|
|
123
|
-
--ds-auro-radio-group-label-color: purple;
|
|
124
130
|
}
|
|
125
131
|
</style>
|
|
126
132
|
<auro-radio-group id="customTokenRadioGroup">
|
|
@@ -137,11 +143,15 @@
|
|
|
137
143
|
<!-- The below code snippet is automatically added from ./../apiExamples/custom-tokens.html -->
|
|
138
144
|
<pre class="language-html"><code class="language-html"><style>
|
|
139
145
|
#customTokenRadioGroup {
|
|
146
|
+
--ds-auro-radio-group-label-color: purple;
|
|
147
|
+
}
|
|
148
|
+
#customTokenRadioGroup auro-radio {
|
|
140
149
|
--ds-auro-radio-btn-border-color: purple;
|
|
150
|
+
--ds-auro-radio-label-color: purple;
|
|
151
|
+
}
|
|
152
|
+
#customTokenRadioGroup auro-radio[checked] {
|
|
141
153
|
--ds-auro-radio-btn-fill-color: lavender;
|
|
142
154
|
--ds-auro-radio-btn-inset-color: purple;
|
|
143
|
-
--ds-auro-radio-label-color: purple;
|
|
144
|
-
--ds-auro-radio-group-label-color: purple;
|
|
145
155
|
}
|
|
146
156
|
</style>
|
|
147
157
|
<auro-radio-group id="customTokenRadioGroup">
|
|
@@ -279,7 +279,7 @@ class AuroRadio extends i$2 {
|
|
|
279
279
|
},
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
|
-
* ID
|
|
282
|
+
* Holds the ID of the inner `<input>` element, which its `<label>` points to.
|
|
283
283
|
* @private
|
|
284
284
|
*/
|
|
285
285
|
inputId: {
|
|
@@ -325,7 +325,7 @@ class AuroRadio extends i$2 {
|
|
|
325
325
|
},
|
|
326
326
|
|
|
327
327
|
/**
|
|
328
|
-
* Kept out of the API docs, because changing it can easily break accessibility.
|
|
328
|
+
* Sets the host's ARIA role, `radio`. Kept out of the API docs, because changing it can easily break accessibility.
|
|
329
329
|
* @private
|
|
330
330
|
*/
|
|
331
331
|
role: {
|
|
@@ -334,7 +334,7 @@ class AuroRadio extends i$2 {
|
|
|
334
334
|
},
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
*
|
|
337
|
+
* Records whether someone has interacted with the radio button.
|
|
338
338
|
* @private
|
|
339
339
|
*/
|
|
340
340
|
touched: {
|
|
@@ -1338,7 +1338,7 @@ class AuroHelpText extends i$2 {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
var formkitVersion = '
|
|
1341
|
+
var formkitVersion = '202611090134';
|
|
1342
1342
|
|
|
1343
1343
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1344
1344
|
// See LICENSE in the project root for license information.
|
|
@@ -1373,7 +1373,7 @@ var formkitVersion = '202611082047';
|
|
|
1373
1373
|
* @csspart radio-group - The `<fieldset>` element, with `role="radiogroup"`, that wraps the legend and the radio buttons.
|
|
1374
1374
|
* @csspart helpText - The help text element below the group, which shows the help text or the error message.
|
|
1375
1375
|
* @slot {HTMLSlotElement} legend - Label for the group, such as "Seat preference". Screen readers announce it as the group's name. {@requiredWhen always} {@category ui}
|
|
1376
|
-
* @slot {HTMLSlotElement} optionalLabel - Text shown after the legend when the group isn't `required`, such as "
|
|
1376
|
+
* @slot {HTMLSlotElement} optionalLabel - Text shown after the legend when the group isn't `required`, such as a translated "(optional)". Defaults to "(optional)". {@relevantWhen !required} {@category ui}
|
|
1377
1377
|
* @slot {HTMLSlotElement} helpText - Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it. {@category ui}
|
|
1378
1378
|
* @slot default - The `auro-radio` elements in the group.
|
|
1379
1379
|
* @event auroFormElement-validated - Fires each time the group runs validation, with the result in `event.detail.validity` and `event.detail.message`.
|
|
@@ -1483,7 +1483,7 @@ class AuroRadioGroup extends i$2 {
|
|
|
1483
1483
|
},
|
|
1484
1484
|
|
|
1485
1485
|
/**
|
|
1486
|
-
*
|
|
1486
|
+
* Records whether the `legend` slot has content.
|
|
1487
1487
|
* @private
|
|
1488
1488
|
*/
|
|
1489
1489
|
hasLegend: {
|
|
@@ -1534,8 +1534,7 @@ class AuroRadioGroup extends i$2 {
|
|
|
1534
1534
|
|
|
1535
1535
|
/**
|
|
1536
1536
|
* Requires a selection in the group and hides the "(optional)" text after the legend.
|
|
1537
|
-
*
|
|
1538
|
-
* @relevantWhen !noValidate
|
|
1537
|
+
* Unless `noValidate` is set, the group shows an error when focus leaves it with nothing selected.
|
|
1539
1538
|
* @category behavior
|
|
1540
1539
|
*/
|
|
1541
1540
|
required: {
|
|
@@ -1546,7 +1545,6 @@ class AuroRadioGroup extends i$2 {
|
|
|
1546
1545
|
/**
|
|
1547
1546
|
* Sets one error message for every kind of error, such as "Choose an option".
|
|
1548
1547
|
* It replaces the `error` text and the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages.
|
|
1549
|
-
* @relevantWhen !noValidate
|
|
1550
1548
|
* @category behavior
|
|
1551
1549
|
*/
|
|
1552
1550
|
setCustomValidity: {
|
|
@@ -1557,7 +1555,7 @@ class AuroRadioGroup extends i$2 {
|
|
|
1557
1555
|
/**
|
|
1558
1556
|
* Sets the error message shown while the `error` attribute is set, in place of the attribute's own text.
|
|
1559
1557
|
* `setCustomValidity` takes priority when both are set.
|
|
1560
|
-
* @relevantWhen
|
|
1558
|
+
* @relevantWhen error
|
|
1561
1559
|
* @category behavior
|
|
1562
1560
|
*/
|
|
1563
1561
|
setCustomValidityCustomError: {
|
|
@@ -1568,7 +1566,7 @@ class AuroRadioGroup extends i$2 {
|
|
|
1568
1566
|
/**
|
|
1569
1567
|
* Sets the error message shown when the group is `required` and nothing is selected, such as "Select an option".
|
|
1570
1568
|
* The group has no default message, so set this or `setCustomValidity` to show one. `setCustomValidity` takes priority when both are set.
|
|
1571
|
-
* @relevantWhen
|
|
1569
|
+
* @relevantWhen required
|
|
1572
1570
|
* @category behavior
|
|
1573
1571
|
*/
|
|
1574
1572
|
setCustomValidityValueMissing: {
|
|
@@ -1577,7 +1575,7 @@ class AuroRadioGroup extends i$2 {
|
|
|
1577
1575
|
},
|
|
1578
1576
|
|
|
1579
1577
|
/**
|
|
1580
|
-
*
|
|
1578
|
+
* Records whether someone has interacted with the group.
|
|
1581
1579
|
* @private
|
|
1582
1580
|
*/
|
|
1583
1581
|
touched: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<auro-header level="1" id="overview">Radio
|
|
1
|
+
<auro-header level="1" id="overview">Radio: Getting started</auro-header>
|
|
2
2
|
<div class="contentWrapper">
|
|
3
3
|
<nav>
|
|
4
4
|
<auro-nav anchorNavContent=".scrollWrapper">
|
|
@@ -284,13 +284,13 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
284
284
|
<auro-header level="4" id="slot-helpText">helpText</auro-header>
|
|
285
285
|
<p>Help text shown below the group, such as "Choose one". While the group shows an error, the error message replaces it.</p>
|
|
286
286
|
<auro-header level="4" id="slot-optionalLabel">optionalLabel</auro-header>
|
|
287
|
-
<p>Text shown after the legend when the group isn't <code>required</code>, such as "
|
|
287
|
+
<p>Text shown after the legend when the group isn't <code>required</code>, such as a translated "(optional)". It replaces the default <em>"(optional)"</em> text.</p>
|
|
288
288
|
<div class="exampleWrapper">
|
|
289
289
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optional-label.html) -->
|
|
290
290
|
<!-- The below content is automatically added from ./../apiExamples/optional-label.html -->
|
|
291
291
|
<auro-radio-group>
|
|
292
292
|
<span slot="legend">Form label goes here</span>
|
|
293
|
-
<span slot="optionalLabel">
|
|
293
|
+
<span slot="optionalLabel"> (not required)</span>
|
|
294
294
|
<auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
295
295
|
<auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"></auro-radio>
|
|
296
296
|
<auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
|
|
@@ -303,7 +303,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
303
303
|
<!-- The below code snippet is automatically added from ./../apiExamples/optional-label.html -->
|
|
304
304
|
<pre class="language-html"><code class="language-html"><auro-radio-group>
|
|
305
305
|
<span slot="legend">Form label goes here</span>
|
|
306
|
-
<span slot="optionalLabel">
|
|
306
|
+
<span slot="optionalLabel"> (not required)</span>
|
|
307
307
|
<auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
308
308
|
<auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"></auro-radio>
|
|
309
309
|
<auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
|
|
@@ -319,7 +319,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
319
319
|
<auro-radio-group>
|
|
320
320
|
<span slot="legend">Form label goes here</span>
|
|
321
321
|
<auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"></auro-radio>
|
|
322
|
-
<auro-radio id="basicGroupRadio2"
|
|
322
|
+
<auro-radio id="basicGroupRadio2" name="radioDemo" value="option2">This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines.</auro-radio>
|
|
323
323
|
<auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"></auro-radio>
|
|
324
324
|
</auro-radio-group>
|
|
325
325
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -331,7 +331,7 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
331
331
|
<pre class="language-html"><code class="language-html"><auro-radio-group>
|
|
332
332
|
<span slot="legend">Form label goes here</span>
|
|
333
333
|
<auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"></auro-radio>
|
|
334
|
-
<auro-radio id="basicGroupRadio2"
|
|
334
|
+
<auro-radio id="basicGroupRadio2" name="radioDemo" value="option2">This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines.</auro-radio>
|
|
335
335
|
<auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"></auro-radio>
|
|
336
336
|
</auro-radio-group></code></pre>
|
|
337
337
|
<!-- AURO-GENERATED-CONTENT:END -->
|