@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.1 → 0.0.0-pr1628.11
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 +4 -4
- 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 +4 -4
- package/components/checkbox/demo/index.md +17 -17
- package/components/checkbox/demo/index.min.js +4 -4
- 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 +4 -4
- package/components/checkbox/dist/registered.js +4 -4
- 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 +53 -35
- package/components/combobox/demo/getting-started.min.js +53 -35
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +53 -35
- package/components/combobox/dist/auro-combobox.d.ts +6 -4
- package/components/combobox/dist/index.js +42 -25
- package/components/combobox/dist/registered.js +42 -25
- package/components/counter/demo/accessibility.md +1 -1
- package/components/counter/demo/api.md +18 -18
- package/components/counter/demo/css-only.md +1 -1
- package/components/counter/demo/customize.md +2 -2
- package/components/counter/demo/customize.min.js +30 -30
- package/components/counter/demo/design.md +1 -1
- package/components/counter/demo/getting-started.md +29 -2
- package/components/counter/demo/getting-started.min.js +30 -30
- package/components/counter/demo/index.min.js +30 -30
- package/components/counter/demo/why-counter.md +3 -3
- package/components/counter/dist/auro-counter-group.d.ts +13 -14
- package/components/counter/dist/auro-counter.d.ts +1 -1
- package/components/counter/dist/index.js +30 -30
- package/components/counter/dist/registered.js +30 -30
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/accessibility.md +5 -5
- package/components/datepicker/demo/api.md +3 -3
- package/components/datepicker/demo/css-only.md +4 -4
- package/components/datepicker/demo/customize.md +12 -12
- package/components/datepicker/demo/customize.min.js +189 -135
- package/components/datepicker/demo/design.md +11 -11
- package/components/datepicker/demo/getting-started.md +4 -4
- package/components/datepicker/demo/getting-started.min.js +189 -135
- package/components/datepicker/demo/index.md +5 -5
- package/components/datepicker/demo/index.min.js +189 -135
- package/components/datepicker/demo/keyboard-behavior.md +1 -1
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/demo/voiceover.md +4 -4
- 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 +44 -43
- package/components/datepicker/dist/auro-datepicker.d.ts +12 -10
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -0
- package/components/datepicker/dist/index.js +189 -135
- package/components/datepicker/dist/registered.js +189 -135
- package/components/datepicker/dist/utilities.d.ts +4 -1
- package/components/datepicker/dist/utilitiesCalendar.d.ts +12 -4
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +12 -6
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +4 -4
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +7 -7
- package/components/dropdown/demo/api.md +7 -7
- package/components/dropdown/demo/css-only.md +2 -2
- package/components/dropdown/demo/customize.md +1 -1
- package/components/dropdown/demo/customize.min.js +11 -10
- package/components/dropdown/demo/design.md +4 -4
- package/components/dropdown/demo/getting-started.min.js +33 -18
- package/components/dropdown/demo/index.min.js +11 -10
- 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 +9 -8
- package/components/dropdown/dist/index.js +11 -10
- package/components/dropdown/dist/registered.js +11 -10
- package/components/form/README.md +1 -1
- package/components/form/demo/api.md +7 -7
- package/components/form/demo/css-only.md +1 -1
- package/components/form/demo/customize.md +2 -0
- package/components/form/demo/customize.min.js +329 -243
- package/components/form/demo/getting-started.md +2 -0
- package/components/form/demo/getting-started.min.js +329 -243
- package/components/form/demo/index.md +2 -2
- package/components/form/demo/index.min.js +329 -243
- package/components/form/demo/keyboard-behavior.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/demo/registerDemoDeps.min.js +327 -241
- package/components/form/demo/voiceover.md +3 -3
- package/components/form/demo/why-form.md +1 -1
- package/components/form/dist/auro-form.d.ts +2 -2
- package/components/form/dist/index.js +2 -2
- package/components/form/dist/registered.js +2 -2
- package/components/helptext/dist/auro-helptext.d.ts +1 -1
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/demo/api.md +58 -58
- package/components/input/demo/css-only.md +4 -4
- package/components/input/demo/customize.md +11 -11
- package/components/input/demo/customize.min.js +22 -8
- package/components/input/demo/design.md +2 -2
- package/components/input/demo/getting-started.md +5 -5
- package/components/input/demo/getting-started.min.js +22 -8
- package/components/input/demo/index.md +1 -1
- package/components/input/demo/index.min.js +22 -8
- package/components/input/demo/why-input.md +3 -3
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +6 -5
- package/components/input/dist/index.js +22 -8
- package/components/input/dist/registered.js +22 -8
- package/components/input/dist/utilities.d.ts +11 -0
- package/components/menu/demo/accessibility.md +1 -1
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/css-only.md +4 -4
- package/components/menu/demo/customize.md +1 -1
- package/components/menu/demo/design.md +1 -1
- package/components/menu/demo/getting-started.md +3 -3
- package/components/menu/demo/index.min.js +11 -10
- package/components/menu/demo/keyboard-behavior.md +1 -1
- package/components/menu/demo/voiceover.md +1 -1
- package/components/menu/demo/why-menu.md +3 -3
- package/components/menu/dist/auro-menu.d.ts +10 -9
- package/components/menu/dist/auro-menuoption.d.ts +1 -1
- package/components/menu/dist/index.js +11 -10
- package/components/menu/dist/registered.js +11 -10
- 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 +11 -13
- 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 +11 -13
- package/components/radio/demo/index.md +1 -1
- package/components/radio/demo/index.min.js +11 -13
- package/components/radio/demo/keyboard-behavior.md +1 -1
- package/components/radio/demo/voiceover.md +1 -1
- package/components/radio/demo/why-radio.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 +11 -13
- package/components/radio/dist/registered.js +11 -13
- package/components/select/demo/api.md +1 -1
- package/components/select/demo/css-only.md +1 -1
- package/components/select/demo/customize.md +1 -1
- package/components/select/demo/customize.min.js +29 -26
- package/components/select/demo/getting-started.min.js +29 -26
- package/components/select/demo/index.md +1 -1
- package/components/select/demo/index.min.js +29 -26
- package/components/select/demo/voiceover.md +1 -1
- package/components/select/dist/auro-select.d.ts +4 -3
- package/components/select/dist/index.js +18 -16
- package/components/select/dist/registered.js +18 -16
- package/custom-elements.json +149 -133
- package/package.json +1 -1
|
@@ -10188,6 +10188,9 @@ function cleanEscapedString(input) {
|
|
|
10188
10188
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
10189
10189
|
}
|
|
10190
10190
|
|
|
10191
|
+
/**
|
|
10192
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10193
|
+
*/
|
|
10191
10194
|
class AuroInputUtilities {
|
|
10192
10195
|
|
|
10193
10196
|
/**
|
|
@@ -10207,7 +10210,17 @@ class AuroInputUtilities {
|
|
|
10207
10210
|
} else {
|
|
10208
10211
|
this.locale = 'en-US';
|
|
10209
10212
|
}
|
|
10213
|
+
|
|
10214
|
+
/**
|
|
10215
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
10216
|
+
* @type {string|undefined}
|
|
10217
|
+
*/
|
|
10210
10218
|
this.overrideFormat = config.format;
|
|
10219
|
+
|
|
10220
|
+
/**
|
|
10221
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
10222
|
+
* @type {Intl.DateTimeFormat}
|
|
10223
|
+
*/
|
|
10211
10224
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
10212
10225
|
|
|
10213
10226
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -10638,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10638
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10639
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10640
10653
|
/**
|
|
10641
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10642
10655
|
* @internal
|
|
10643
10656
|
*/
|
|
10644
10657
|
static get shadowRootOptions() {
|
|
@@ -10798,8 +10811,9 @@ class BaseInput extends AuroElement {
|
|
|
10798
10811
|
},
|
|
10799
10812
|
|
|
10800
10813
|
/**
|
|
10801
|
-
* Sets the shape of the field's border.
|
|
10802
|
-
* and `pill
|
|
10814
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
10815
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
10816
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
10803
10817
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
10804
10818
|
* @default 'classic'
|
|
10805
10819
|
* @category ui
|
|
@@ -10811,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10811
10825
|
},
|
|
10812
10826
|
|
|
10813
10827
|
/**
|
|
10814
|
-
* Sets the field's
|
|
10815
|
-
* 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`.
|
|
10816
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10817
10831
|
* @default 'lg'
|
|
10818
10832
|
* @category ui
|
|
@@ -12555,7 +12569,7 @@ class AuroHelpText extends i$3 {
|
|
|
12555
12569
|
}
|
|
12556
12570
|
|
|
12557
12571
|
/**
|
|
12558
|
-
* Called when the slot
|
|
12572
|
+
* Called when nodes are added to or removed from the slot, and after each update. Checks whether the slot has text, so the element shows only when it does.
|
|
12559
12573
|
* @param {Event} [event] - The `slotchange` event, when called from one.
|
|
12560
12574
|
* @returns {void}
|
|
12561
12575
|
*/
|
|
@@ -12608,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12608
12622
|
}
|
|
12609
12623
|
}
|
|
12610
12624
|
|
|
12611
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611091610';
|
|
12612
12626
|
|
|
12613
12627
|
/**
|
|
12614
12628
|
* @license
|
|
@@ -13079,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13079
13093
|
|
|
13080
13094
|
/**
|
|
13081
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13082
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13083
13097
|
* @private
|
|
13084
13098
|
* @returns {string}
|
|
13085
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>
|
|
@@ -88,10 +88,10 @@ AuroInput.register('[custom]-input');</code></pre>
|
|
|
88
88
|
<auro-header level="3">Implementation</auro-header>
|
|
89
89
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/defaultRegistration.md) -->
|
|
90
90
|
<!-- The below content is automatically added from ./../docs/partials/getting-started/defaultRegistration.md -->
|
|
91
|
-
<p>
|
|
91
|
+
<p>After you install the package, import the component's registered module:</p>
|
|
92
92
|
|
|
93
93
|
<pre class="language-js"><code class="language-js">import '@aurodesignsystem/auro-formkit/auro-input';</code></pre>
|
|
94
|
-
<p>This import registers the <code><auro-input></code> custom element globally.
|
|
94
|
+
<p>This import registers the <code><auro-input></code> custom element globally. Then use it in your HTML:</p>
|
|
95
95
|
|
|
96
96
|
<pre class="language-html"><code class="language-html"><auro-input>
|
|
97
97
|
<span slot="label">Enter your name</span>
|
|
@@ -108,7 +108,7 @@ AuroInput.register('[custom]-input');</code></pre>
|
|
|
108
108
|
<p>Add the following script tag to your HTML to load the component directly from a CDN:</p>
|
|
109
109
|
|
|
110
110
|
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-input/+esm"></script></code></pre>
|
|
111
|
-
<p>This script registers the <code><auro-input></code> custom element globally.
|
|
111
|
+
<p>This script registers the <code><auro-input></code> custom element globally. Then use it in your HTML:</p>
|
|
112
112
|
|
|
113
113
|
<pre class="language-html"><code class="language-html"><auro-input>
|
|
114
114
|
<span slot="label">Enter your name</span>
|
|
@@ -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>
|
|
@@ -10188,6 +10188,9 @@ function cleanEscapedString(input) {
|
|
|
10188
10188
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
10189
10189
|
}
|
|
10190
10190
|
|
|
10191
|
+
/**
|
|
10192
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10193
|
+
*/
|
|
10191
10194
|
class AuroInputUtilities {
|
|
10192
10195
|
|
|
10193
10196
|
/**
|
|
@@ -10207,7 +10210,17 @@ class AuroInputUtilities {
|
|
|
10207
10210
|
} else {
|
|
10208
10211
|
this.locale = 'en-US';
|
|
10209
10212
|
}
|
|
10213
|
+
|
|
10214
|
+
/**
|
|
10215
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
10216
|
+
* @type {string|undefined}
|
|
10217
|
+
*/
|
|
10210
10218
|
this.overrideFormat = config.format;
|
|
10219
|
+
|
|
10220
|
+
/**
|
|
10221
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
10222
|
+
* @type {Intl.DateTimeFormat}
|
|
10223
|
+
*/
|
|
10211
10224
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
10212
10225
|
|
|
10213
10226
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -10638,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10638
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10639
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10640
10653
|
/**
|
|
10641
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10642
10655
|
* @internal
|
|
10643
10656
|
*/
|
|
10644
10657
|
static get shadowRootOptions() {
|
|
@@ -10798,8 +10811,9 @@ class BaseInput extends AuroElement {
|
|
|
10798
10811
|
},
|
|
10799
10812
|
|
|
10800
10813
|
/**
|
|
10801
|
-
* Sets the shape of the field's border.
|
|
10802
|
-
* and `pill
|
|
10814
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
10815
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
10816
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
10803
10817
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
10804
10818
|
* @default 'classic'
|
|
10805
10819
|
* @category ui
|
|
@@ -10811,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10811
10825
|
},
|
|
10812
10826
|
|
|
10813
10827
|
/**
|
|
10814
|
-
* Sets the field's
|
|
10815
|
-
* 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`.
|
|
10816
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10817
10831
|
* @default 'lg'
|
|
10818
10832
|
* @category ui
|
|
@@ -12555,7 +12569,7 @@ class AuroHelpText extends i$3 {
|
|
|
12555
12569
|
}
|
|
12556
12570
|
|
|
12557
12571
|
/**
|
|
12558
|
-
* Called when the slot
|
|
12572
|
+
* Called when nodes are added to or removed from the slot, and after each update. Checks whether the slot has text, so the element shows only when it does.
|
|
12559
12573
|
* @param {Event} [event] - The `slotchange` event, when called from one.
|
|
12560
12574
|
* @returns {void}
|
|
12561
12575
|
*/
|
|
@@ -12608,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12608
12622
|
}
|
|
12609
12623
|
}
|
|
12610
12624
|
|
|
12611
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611091610';
|
|
12612
12626
|
|
|
12613
12627
|
/**
|
|
12614
12628
|
* @license
|
|
@@ -13079,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13079
13093
|
|
|
13080
13094
|
/**
|
|
13081
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13082
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13083
13097
|
* @private
|
|
13084
13098
|
* @returns {string}
|
|
13085
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>
|
|
@@ -10188,6 +10188,9 @@ function cleanEscapedString(input) {
|
|
|
10188
10188
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
10189
10189
|
}
|
|
10190
10190
|
|
|
10191
|
+
/**
|
|
10192
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10193
|
+
*/
|
|
10191
10194
|
class AuroInputUtilities {
|
|
10192
10195
|
|
|
10193
10196
|
/**
|
|
@@ -10207,7 +10210,17 @@ class AuroInputUtilities {
|
|
|
10207
10210
|
} else {
|
|
10208
10211
|
this.locale = 'en-US';
|
|
10209
10212
|
}
|
|
10213
|
+
|
|
10214
|
+
/**
|
|
10215
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
10216
|
+
* @type {string|undefined}
|
|
10217
|
+
*/
|
|
10210
10218
|
this.overrideFormat = config.format;
|
|
10219
|
+
|
|
10220
|
+
/**
|
|
10221
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
10222
|
+
* @type {Intl.DateTimeFormat}
|
|
10223
|
+
*/
|
|
10211
10224
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
10212
10225
|
|
|
10213
10226
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -10638,7 +10651,7 @@ class BaseInput extends AuroElement {
|
|
|
10638
10651
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10639
10652
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10640
10653
|
/**
|
|
10641
|
-
*
|
|
10654
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10642
10655
|
* @internal
|
|
10643
10656
|
*/
|
|
10644
10657
|
static get shadowRootOptions() {
|
|
@@ -10798,8 +10811,9 @@ class BaseInput extends AuroElement {
|
|
|
10798
10811
|
},
|
|
10799
10812
|
|
|
10800
10813
|
/**
|
|
10801
|
-
* Sets the shape of the field's border.
|
|
10802
|
-
* and `pill
|
|
10814
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
10815
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
10816
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
10803
10817
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
10804
10818
|
* @default 'classic'
|
|
10805
10819
|
* @category ui
|
|
@@ -10811,8 +10825,8 @@ class BaseInput extends AuroElement {
|
|
|
10811
10825
|
},
|
|
10812
10826
|
|
|
10813
10827
|
/**
|
|
10814
|
-
* Sets the field's
|
|
10815
|
-
* 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`.
|
|
10816
10830
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10817
10831
|
* @default 'lg'
|
|
10818
10832
|
* @category ui
|
|
@@ -12555,7 +12569,7 @@ class AuroHelpText extends i$3 {
|
|
|
12555
12569
|
}
|
|
12556
12570
|
|
|
12557
12571
|
/**
|
|
12558
|
-
* Called when the slot
|
|
12572
|
+
* Called when nodes are added to or removed from the slot, and after each update. Checks whether the slot has text, so the element shows only when it does.
|
|
12559
12573
|
* @param {Event} [event] - The `slotchange` event, when called from one.
|
|
12560
12574
|
* @returns {void}
|
|
12561
12575
|
*/
|
|
@@ -12608,7 +12622,7 @@ class AuroHelpText extends i$3 {
|
|
|
12608
12622
|
}
|
|
12609
12623
|
}
|
|
12610
12624
|
|
|
12611
|
-
var formkitVersion = '
|
|
12625
|
+
var formkitVersion = '202611091610';
|
|
12612
12626
|
|
|
12613
12627
|
/**
|
|
12614
12628
|
* @license
|
|
@@ -13079,7 +13093,7 @@ class AuroInput extends BaseInput {
|
|
|
13079
13093
|
|
|
13080
13094
|
/**
|
|
13081
13095
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13082
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13096
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13083
13097
|
* @private
|
|
13084
13098
|
* @returns {string}
|
|
13085
13099
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<auro-header level="1" id="overview">Why auro-input?</auro-header>
|
|
2
|
-
<p>The native <code><input></code> element is the workhorse of HTML forms, but it has significant limitations in styling, validation messaging, input formatting, and accessibility. <code>auro-input</code> addresses these
|
|
2
|
+
<p>The native <code><input></code> element is the workhorse of HTML forms, but it has significant limitations in styling, validation messaging, input formatting, and accessibility. <code>auro-input</code> addresses these for common input types. To include its value in form data, place it inside <code>auro-form</code> and set <code>name</code>, because a native <code><form></code> doesn't include it.</p>
|
|
3
3
|
<auro-header level="2" id="accessibility">Accessibility</auro-header>
|
|
4
4
|
<p>Native inputs require manual <code><label></code> wiring, have no standard pattern for error announcements, and provide no built-in clear or show/hide password controls.</p>
|
|
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(): {
|
|
@@ -27,16 +27,17 @@ export default class BaseInput extends AuroElement {
|
|
|
27
27
|
*/
|
|
28
28
|
layout: "classic" | "emphasized" | "emphasized-left" | "emphasized-right" | "snowflake" | "snowflake-left" | "snowflake-right";
|
|
29
29
|
/**
|
|
30
|
-
* Sets the shape of the field's border.
|
|
31
|
-
* and `pill
|
|
30
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
31
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
32
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
32
33
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
33
34
|
* @default 'classic'
|
|
34
35
|
* @category ui
|
|
35
36
|
*/
|
|
36
37
|
shape: "box" | "classic" | "pill" | "pill-left" | "pill-right" | "rounded" | "snowflake";
|
|
37
38
|
/**
|
|
38
|
-
* Sets the field's
|
|
39
|
-
* 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`.
|
|
40
41
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
41
42
|
* @default 'lg'
|
|
42
43
|
* @category ui
|
|
@@ -10130,6 +10130,9 @@ function cleanEscapedString(input) {
|
|
|
10130
10130
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
10131
10131
|
}
|
|
10132
10132
|
|
|
10133
|
+
/**
|
|
10134
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10135
|
+
*/
|
|
10133
10136
|
class AuroInputUtilities {
|
|
10134
10137
|
|
|
10135
10138
|
/**
|
|
@@ -10149,7 +10152,17 @@ class AuroInputUtilities {
|
|
|
10149
10152
|
} else {
|
|
10150
10153
|
this.locale = 'en-US';
|
|
10151
10154
|
}
|
|
10155
|
+
|
|
10156
|
+
/**
|
|
10157
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
10158
|
+
* @type {string|undefined}
|
|
10159
|
+
*/
|
|
10152
10160
|
this.overrideFormat = config.format;
|
|
10161
|
+
|
|
10162
|
+
/**
|
|
10163
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
10164
|
+
* @type {Intl.DateTimeFormat}
|
|
10165
|
+
*/
|
|
10153
10166
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
10154
10167
|
|
|
10155
10168
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -10580,7 +10593,7 @@ class BaseInput extends AuroElement {
|
|
|
10580
10593
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10581
10594
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10582
10595
|
/**
|
|
10583
|
-
*
|
|
10596
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10584
10597
|
* @internal
|
|
10585
10598
|
*/
|
|
10586
10599
|
static get shadowRootOptions() {
|
|
@@ -10740,8 +10753,9 @@ class BaseInput extends AuroElement {
|
|
|
10740
10753
|
},
|
|
10741
10754
|
|
|
10742
10755
|
/**
|
|
10743
|
-
* Sets the shape of the field's border.
|
|
10744
|
-
* and `pill
|
|
10756
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
10757
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
10758
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
10745
10759
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
10746
10760
|
* @default 'classic'
|
|
10747
10761
|
* @category ui
|
|
@@ -10753,8 +10767,8 @@ class BaseInput extends AuroElement {
|
|
|
10753
10767
|
},
|
|
10754
10768
|
|
|
10755
10769
|
/**
|
|
10756
|
-
* Sets the field's
|
|
10757
|
-
* 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`.
|
|
10758
10772
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10759
10773
|
* @default 'lg'
|
|
10760
10774
|
* @category ui
|
|
@@ -12497,7 +12511,7 @@ class AuroHelpText extends LitElement {
|
|
|
12497
12511
|
}
|
|
12498
12512
|
|
|
12499
12513
|
/**
|
|
12500
|
-
* Called when the slot
|
|
12514
|
+
* Called when nodes are added to or removed from the slot, and after each update. Checks whether the slot has text, so the element shows only when it does.
|
|
12501
12515
|
* @param {Event} [event] - The `slotchange` event, when called from one.
|
|
12502
12516
|
* @returns {void}
|
|
12503
12517
|
*/
|
|
@@ -12550,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12550
12564
|
}
|
|
12551
12565
|
}
|
|
12552
12566
|
|
|
12553
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611091610';
|
|
12554
12568
|
|
|
12555
12569
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12556
12570
|
// See LICENSE in the project root for license information.
|
|
@@ -13009,7 +13023,7 @@ class AuroInput extends BaseInput {
|
|
|
13009
13023
|
|
|
13010
13024
|
/**
|
|
13011
13025
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13012
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13026
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13013
13027
|
* @private
|
|
13014
13028
|
* @returns {string}
|
|
13015
13029
|
*/
|
|
@@ -10130,6 +10130,9 @@ function cleanEscapedString(input) {
|
|
|
10130
10130
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
10131
10131
|
}
|
|
10132
10132
|
|
|
10133
|
+
/**
|
|
10134
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10135
|
+
*/
|
|
10133
10136
|
class AuroInputUtilities {
|
|
10134
10137
|
|
|
10135
10138
|
/**
|
|
@@ -10149,7 +10152,17 @@ class AuroInputUtilities {
|
|
|
10149
10152
|
} else {
|
|
10150
10153
|
this.locale = 'en-US';
|
|
10151
10154
|
}
|
|
10155
|
+
|
|
10156
|
+
/**
|
|
10157
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
10158
|
+
* @type {string|undefined}
|
|
10159
|
+
*/
|
|
10152
10160
|
this.overrideFormat = config.format;
|
|
10161
|
+
|
|
10162
|
+
/**
|
|
10163
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
10164
|
+
* @type {Intl.DateTimeFormat}
|
|
10165
|
+
*/
|
|
10153
10166
|
this.formatter = new Intl.DateTimeFormat(this.locale);
|
|
10154
10167
|
|
|
10155
10168
|
// Bindings - many of these are passed into IMask callbacks,
|
|
@@ -10580,7 +10593,7 @@ class BaseInput extends AuroElement {
|
|
|
10580
10593
|
// The initial-load focus theft was caused by the static `autofocus`
|
|
10581
10594
|
// attribute on the bib input (now conditional), not by delegatesFocus.
|
|
10582
10595
|
/**
|
|
10583
|
-
*
|
|
10596
|
+
* Gets the options Lit uses to create the shadow root.
|
|
10584
10597
|
* @internal
|
|
10585
10598
|
*/
|
|
10586
10599
|
static get shadowRootOptions() {
|
|
@@ -10740,8 +10753,9 @@ class BaseInput extends AuroElement {
|
|
|
10740
10753
|
},
|
|
10741
10754
|
|
|
10742
10755
|
/**
|
|
10743
|
-
* Sets the shape of the field's border.
|
|
10744
|
-
* and `pill
|
|
10756
|
+
* Sets the shape of the field's border. `classic` and `rounded` have slightly rounded corners, `box` has square corners,
|
|
10757
|
+
* and `pill` has fully rounded ends, or only the left or right end for `pill-left` and `pill-right`.
|
|
10758
|
+
* The emphasized layouts support `pill`, `pill-left`, and `pill-right`, and the snowflake layout uses `snowflake`.
|
|
10745
10759
|
* @type {'box' | 'classic' | 'pill' | 'pill-left' | 'pill-right' | 'rounded' | 'snowflake'}
|
|
10746
10760
|
* @default 'classic'
|
|
10747
10761
|
* @category ui
|
|
@@ -10753,8 +10767,8 @@ class BaseInput extends AuroElement {
|
|
|
10753
10767
|
},
|
|
10754
10768
|
|
|
10755
10769
|
/**
|
|
10756
|
-
* Sets the field's
|
|
10757
|
-
* 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`.
|
|
10758
10772
|
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl'}
|
|
10759
10773
|
* @default 'lg'
|
|
10760
10774
|
* @category ui
|
|
@@ -12497,7 +12511,7 @@ class AuroHelpText extends LitElement {
|
|
|
12497
12511
|
}
|
|
12498
12512
|
|
|
12499
12513
|
/**
|
|
12500
|
-
* Called when the slot
|
|
12514
|
+
* Called when nodes are added to or removed from the slot, and after each update. Checks whether the slot has text, so the element shows only when it does.
|
|
12501
12515
|
* @param {Event} [event] - The `slotchange` event, when called from one.
|
|
12502
12516
|
* @returns {void}
|
|
12503
12517
|
*/
|
|
@@ -12550,7 +12564,7 @@ class AuroHelpText extends LitElement {
|
|
|
12550
12564
|
}
|
|
12551
12565
|
}
|
|
12552
12566
|
|
|
12553
|
-
var formkitVersion = '
|
|
12567
|
+
var formkitVersion = '202611091610';
|
|
12554
12568
|
|
|
12555
12569
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12556
12570
|
// See LICENSE in the project root for license information.
|
|
@@ -13009,7 +13023,7 @@ class AuroInput extends BaseInput {
|
|
|
13009
13023
|
|
|
13010
13024
|
/**
|
|
13011
13025
|
* Gets the `pattern` for the inner `<input>` element. For credit card numbers,
|
|
13012
|
-
* builds a length check from `minLength` and `maxLength` instead.
|
|
13026
|
+
* builds a length check from `minLength` and `maxLength` instead, unless `noValidate` is set.
|
|
13013
13027
|
* @private
|
|
13014
13028
|
* @returns {string}
|
|
13015
13029
|
*/
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* @returns {string} The locale's date format in lowercase.
|
|
6
6
|
*/
|
|
7
7
|
export function getDateFormatFromLocale(locale: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Helpers that set up input masks and convert between the text shown in the field, `Date` objects, and ISO date strings (`YYYY-MM-DD`), for one locale and date format.
|
|
10
|
+
*/
|
|
8
11
|
export class AuroInputUtilities {
|
|
9
12
|
/**
|
|
10
13
|
* Creates a set of date and mask helpers for one locale and format.
|
|
@@ -17,7 +20,15 @@ export class AuroInputUtilities {
|
|
|
17
20
|
format?: string | undefined;
|
|
18
21
|
});
|
|
19
22
|
locale: string;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the date format to use instead of the locale's format, such as `mm/dd/yyyy`. `updateFormat()` also sets it.
|
|
25
|
+
* @type {string|undefined}
|
|
26
|
+
*/
|
|
20
27
|
overrideFormat: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The `Intl.DateTimeFormat` date formatter for the helpers' locale. The helpers don't currently use it.
|
|
30
|
+
* @type {Intl.DateTimeFormat}
|
|
31
|
+
*/
|
|
21
32
|
formatter: Intl.DateTimeFormat;
|
|
22
33
|
/**
|
|
23
34
|
* Gets the uppercase date mask for the instance's locale, such as `MM/DD/YYYY` for `en-US`.
|
|
@@ -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. |
|