@aurodesignsystem-dev/auro-formkit 0.0.0-pr1628.12 → 0.0.0-pr1628.13
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/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/customize.min.js +4 -16
- package/components/combobox/demo/getting-started.min.js +4 -16
- package/components/combobox/demo/index.min.js +4 -16
- package/components/combobox/dist/index.js +4 -16
- package/components/combobox/dist/registered.js +4 -16
- package/components/counter/demo/api.md +28 -28
- 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 -11
- package/components/counter/demo/getting-started.md +2 -2
- package/components/counter/demo/getting-started.min.js +12 -11
- package/components/counter/demo/index.min.js +12 -11
- package/components/counter/demo/voiceover.md +2 -2
- package/components/counter/demo/why-counter.md +1 -1
- package/components/counter/dist/auro-counter-group.d.ts +7 -6
- package/components/counter/dist/auro-counter.d.ts +3 -3
- package/components/counter/dist/index.js +12 -11
- package/components/counter/dist/registered.js +12 -11
- package/components/datepicker/demo/customize.min.js +5 -17
- package/components/datepicker/demo/getting-started.min.js +5 -17
- package/components/datepicker/demo/index.min.js +5 -17
- package/components/datepicker/dist/index.js +5 -17
- package/components/datepicker/dist/registered.js +5 -17
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +3 -15
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.min.js +29 -64
- package/components/form/demo/getting-started.min.js +29 -64
- package/components/form/demo/index.min.js +29 -64
- package/components/form/demo/registerDemoDeps.min.js +29 -64
- package/components/input/demo/api.md +12 -12
- package/components/input/demo/css-only.md +4 -4
- package/components/input/demo/customize.md +4 -4
- package/components/input/demo/customize.min.js +2 -14
- package/components/input/demo/getting-started.min.js +2 -14
- package/components/input/demo/index.min.js +2 -14
- package/components/input/demo/voiceover.md +1 -1
- package/components/input/demo/why-input.md +2 -2
- package/components/input/dist/base-input.d.ts +0 -12
- package/components/input/dist/index.js +2 -14
- package/components/input/dist/registered.js +2 -14
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.md +46 -46
- package/components/select/demo/customize.md +48 -0
- package/components/select/demo/customize.min.js +4 -4
- package/components/select/demo/design.md +6 -0
- package/components/select/demo/getting-started.min.js +4 -4
- package/components/select/demo/index.md +2 -0
- package/components/select/demo/index.min.js +4 -4
- package/components/select/demo/keyboard-behavior.md +1 -1
- package/components/select/demo/voiceover.md +5 -5
- package/components/select/dist/auro-select.d.ts +2 -2
- package/components/select/dist/index.js +4 -4
- package/components/select/dist/registered.js +4 -4
- package/custom-elements.json +13 -61
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ const watchedItems = new Set();
|
|
|
31
31
|
/**
|
|
32
32
|
* Sets an element's `lang` to the page's language.
|
|
33
33
|
* @private
|
|
34
|
-
* @param {object} item -
|
|
34
|
+
* @param {object} item - The element to update.
|
|
35
35
|
* @param {string} lang - The page's current language.
|
|
36
36
|
*/
|
|
37
37
|
function setLang(item, lang) {
|
|
@@ -10882,7 +10882,6 @@ class BaseInput extends AuroElement {
|
|
|
10882
10882
|
/**
|
|
10883
10883
|
* Does not currently change any message. To set the error message for an invalid email address,
|
|
10884
10884
|
* use `setCustomValidityForType`.
|
|
10885
|
-
* @relevantWhen !noValidate
|
|
10886
10885
|
* @category behavior
|
|
10887
10886
|
*/
|
|
10888
10887
|
customValidityTypeEmail: {
|
|
@@ -11151,7 +11150,6 @@ class BaseInput extends AuroElement {
|
|
|
11151
11150
|
/**
|
|
11152
11151
|
* Makes the input invalid when it's left empty, and removes the " (optional)" text after the label.
|
|
11153
11152
|
* Use `setCustomValidityValueMissing` to set the error message.
|
|
11154
|
-
* @relevantWhen !noValidate
|
|
11155
11153
|
* @category behavior
|
|
11156
11154
|
*/
|
|
11157
11155
|
required: {
|
|
@@ -11162,7 +11160,6 @@ class BaseInput extends AuroElement {
|
|
|
11162
11160
|
/**
|
|
11163
11161
|
* Sets one error message for every kind of validation error. When set, it replaces the messages from
|
|
11164
11162
|
* `error` and every other `setCustomValidity*` property.
|
|
11165
|
-
* @relevantWhen !noValidate
|
|
11166
11163
|
* @category behavior
|
|
11167
11164
|
*/
|
|
11168
11165
|
setCustomValidity: {
|
|
@@ -11173,7 +11170,6 @@ class BaseInput extends AuroElement {
|
|
|
11173
11170
|
/**
|
|
11174
11171
|
* Sets the error message for `validity="badInput"`. Does not currently change any message,
|
|
11175
11172
|
* because the input never reports `badInput`.
|
|
11176
|
-
* @relevantWhen !noValidate
|
|
11177
11173
|
* @category behavior
|
|
11178
11174
|
*/
|
|
11179
11175
|
setCustomValidityBadInput: {
|
|
@@ -11183,7 +11179,6 @@ class BaseInput extends AuroElement {
|
|
|
11183
11179
|
|
|
11184
11180
|
/**
|
|
11185
11181
|
* Sets the error message shown while the `error` attribute is set, in place of the `error` value.
|
|
11186
|
-
* @relevantWhen !noValidate
|
|
11187
11182
|
* @category behavior
|
|
11188
11183
|
*/
|
|
11189
11184
|
setCustomValidityCustomError: {
|
|
@@ -11194,7 +11189,6 @@ class BaseInput extends AuroElement {
|
|
|
11194
11189
|
/**
|
|
11195
11190
|
* Sets the error message shown when the value doesn't fit its `type`, such as a badly formed email address,
|
|
11196
11191
|
* an incomplete card number, or an incomplete date. When not set, `email`, `credit-card`, and most `date` inputs use a built-in message.
|
|
11197
|
-
* @relevantWhen !noValidate
|
|
11198
11192
|
* @category behavior
|
|
11199
11193
|
*/
|
|
11200
11194
|
setCustomValidityForType: {
|
|
@@ -11205,7 +11199,6 @@ class BaseInput extends AuroElement {
|
|
|
11205
11199
|
/**
|
|
11206
11200
|
* Sets the error message shown when the value doesn't match `pattern`, or when a date isn't a real calendar date.
|
|
11207
11201
|
* For `pattern`, it does not currently work when set only as a property, so set the attribute instead.
|
|
11208
|
-
* @relevantWhen !noValidate
|
|
11209
11202
|
* @category behavior
|
|
11210
11203
|
*/
|
|
11211
11204
|
setCustomValidityPatternMismatch: {
|
|
@@ -11215,7 +11208,6 @@ class BaseInput extends AuroElement {
|
|
|
11215
11208
|
|
|
11216
11209
|
/**
|
|
11217
11210
|
* Sets the error message shown when the value is above `max`.
|
|
11218
|
-
* @relevantWhen !noValidate
|
|
11219
11211
|
* @category behavior
|
|
11220
11212
|
*/
|
|
11221
11213
|
setCustomValidityRangeOverflow: {
|
|
@@ -11225,7 +11217,6 @@ class BaseInput extends AuroElement {
|
|
|
11225
11217
|
|
|
11226
11218
|
/**
|
|
11227
11219
|
* Sets the error message shown when the value is below `min`.
|
|
11228
|
-
* @relevantWhen !noValidate
|
|
11229
11220
|
* @category behavior
|
|
11230
11221
|
*/
|
|
11231
11222
|
setCustomValidityRangeUnderflow: {
|
|
@@ -11236,7 +11227,6 @@ class BaseInput extends AuroElement {
|
|
|
11236
11227
|
/**
|
|
11237
11228
|
* Sets the error message shown when the value is longer than `maxlength`.
|
|
11238
11229
|
* Does not currently work when set only as a property, so set the attribute instead.
|
|
11239
|
-
* @relevantWhen !noValidate
|
|
11240
11230
|
* @category behavior
|
|
11241
11231
|
*/
|
|
11242
11232
|
setCustomValidityTooLong: {
|
|
@@ -11247,7 +11237,6 @@ class BaseInput extends AuroElement {
|
|
|
11247
11237
|
/**
|
|
11248
11238
|
* Sets the error message shown when the value is shorter than `minlength`.
|
|
11249
11239
|
* Does not currently work when set only as a property, so set the attribute instead.
|
|
11250
|
-
* @relevantWhen !noValidate
|
|
11251
11240
|
* @category behavior
|
|
11252
11241
|
*/
|
|
11253
11242
|
setCustomValidityTooShort: {
|
|
@@ -11257,7 +11246,6 @@ class BaseInput extends AuroElement {
|
|
|
11257
11246
|
|
|
11258
11247
|
/**
|
|
11259
11248
|
* Sets the error message shown when a `required` input is left empty.
|
|
11260
|
-
* @relevantWhen !noValidate
|
|
11261
11249
|
* @category behavior
|
|
11262
11250
|
*/
|
|
11263
11251
|
setCustomValidityValueMissing: {
|
|
@@ -12564,7 +12552,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12552
|
}
|
|
12565
12553
|
}
|
|
12566
12554
|
|
|
12567
|
-
var formkitVersion = '
|
|
12555
|
+
var formkitVersion = '202611091925';
|
|
12568
12556
|
|
|
12569
12557
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12570
12558
|
// See LICENSE in the project root for license information.
|
|
@@ -31,7 +31,7 @@ const watchedItems = new Set();
|
|
|
31
31
|
/**
|
|
32
32
|
* Sets an element's `lang` to the page's language.
|
|
33
33
|
* @private
|
|
34
|
-
* @param {object} item -
|
|
34
|
+
* @param {object} item - The element to update.
|
|
35
35
|
* @param {string} lang - The page's current language.
|
|
36
36
|
*/
|
|
37
37
|
function setLang(item, lang) {
|
|
@@ -10882,7 +10882,6 @@ class BaseInput extends AuroElement {
|
|
|
10882
10882
|
/**
|
|
10883
10883
|
* Does not currently change any message. To set the error message for an invalid email address,
|
|
10884
10884
|
* use `setCustomValidityForType`.
|
|
10885
|
-
* @relevantWhen !noValidate
|
|
10886
10885
|
* @category behavior
|
|
10887
10886
|
*/
|
|
10888
10887
|
customValidityTypeEmail: {
|
|
@@ -11151,7 +11150,6 @@ class BaseInput extends AuroElement {
|
|
|
11151
11150
|
/**
|
|
11152
11151
|
* Makes the input invalid when it's left empty, and removes the " (optional)" text after the label.
|
|
11153
11152
|
* Use `setCustomValidityValueMissing` to set the error message.
|
|
11154
|
-
* @relevantWhen !noValidate
|
|
11155
11153
|
* @category behavior
|
|
11156
11154
|
*/
|
|
11157
11155
|
required: {
|
|
@@ -11162,7 +11160,6 @@ class BaseInput extends AuroElement {
|
|
|
11162
11160
|
/**
|
|
11163
11161
|
* Sets one error message for every kind of validation error. When set, it replaces the messages from
|
|
11164
11162
|
* `error` and every other `setCustomValidity*` property.
|
|
11165
|
-
* @relevantWhen !noValidate
|
|
11166
11163
|
* @category behavior
|
|
11167
11164
|
*/
|
|
11168
11165
|
setCustomValidity: {
|
|
@@ -11173,7 +11170,6 @@ class BaseInput extends AuroElement {
|
|
|
11173
11170
|
/**
|
|
11174
11171
|
* Sets the error message for `validity="badInput"`. Does not currently change any message,
|
|
11175
11172
|
* because the input never reports `badInput`.
|
|
11176
|
-
* @relevantWhen !noValidate
|
|
11177
11173
|
* @category behavior
|
|
11178
11174
|
*/
|
|
11179
11175
|
setCustomValidityBadInput: {
|
|
@@ -11183,7 +11179,6 @@ class BaseInput extends AuroElement {
|
|
|
11183
11179
|
|
|
11184
11180
|
/**
|
|
11185
11181
|
* Sets the error message shown while the `error` attribute is set, in place of the `error` value.
|
|
11186
|
-
* @relevantWhen !noValidate
|
|
11187
11182
|
* @category behavior
|
|
11188
11183
|
*/
|
|
11189
11184
|
setCustomValidityCustomError: {
|
|
@@ -11194,7 +11189,6 @@ class BaseInput extends AuroElement {
|
|
|
11194
11189
|
/**
|
|
11195
11190
|
* Sets the error message shown when the value doesn't fit its `type`, such as a badly formed email address,
|
|
11196
11191
|
* an incomplete card number, or an incomplete date. When not set, `email`, `credit-card`, and most `date` inputs use a built-in message.
|
|
11197
|
-
* @relevantWhen !noValidate
|
|
11198
11192
|
* @category behavior
|
|
11199
11193
|
*/
|
|
11200
11194
|
setCustomValidityForType: {
|
|
@@ -11205,7 +11199,6 @@ class BaseInput extends AuroElement {
|
|
|
11205
11199
|
/**
|
|
11206
11200
|
* Sets the error message shown when the value doesn't match `pattern`, or when a date isn't a real calendar date.
|
|
11207
11201
|
* For `pattern`, it does not currently work when set only as a property, so set the attribute instead.
|
|
11208
|
-
* @relevantWhen !noValidate
|
|
11209
11202
|
* @category behavior
|
|
11210
11203
|
*/
|
|
11211
11204
|
setCustomValidityPatternMismatch: {
|
|
@@ -11215,7 +11208,6 @@ class BaseInput extends AuroElement {
|
|
|
11215
11208
|
|
|
11216
11209
|
/**
|
|
11217
11210
|
* Sets the error message shown when the value is above `max`.
|
|
11218
|
-
* @relevantWhen !noValidate
|
|
11219
11211
|
* @category behavior
|
|
11220
11212
|
*/
|
|
11221
11213
|
setCustomValidityRangeOverflow: {
|
|
@@ -11225,7 +11217,6 @@ class BaseInput extends AuroElement {
|
|
|
11225
11217
|
|
|
11226
11218
|
/**
|
|
11227
11219
|
* Sets the error message shown when the value is below `min`.
|
|
11228
|
-
* @relevantWhen !noValidate
|
|
11229
11220
|
* @category behavior
|
|
11230
11221
|
*/
|
|
11231
11222
|
setCustomValidityRangeUnderflow: {
|
|
@@ -11236,7 +11227,6 @@ class BaseInput extends AuroElement {
|
|
|
11236
11227
|
/**
|
|
11237
11228
|
* Sets the error message shown when the value is longer than `maxlength`.
|
|
11238
11229
|
* Does not currently work when set only as a property, so set the attribute instead.
|
|
11239
|
-
* @relevantWhen !noValidate
|
|
11240
11230
|
* @category behavior
|
|
11241
11231
|
*/
|
|
11242
11232
|
setCustomValidityTooLong: {
|
|
@@ -11247,7 +11237,6 @@ class BaseInput extends AuroElement {
|
|
|
11247
11237
|
/**
|
|
11248
11238
|
* Sets the error message shown when the value is shorter than `minlength`.
|
|
11249
11239
|
* Does not currently work when set only as a property, so set the attribute instead.
|
|
11250
|
-
* @relevantWhen !noValidate
|
|
11251
11240
|
* @category behavior
|
|
11252
11241
|
*/
|
|
11253
11242
|
setCustomValidityTooShort: {
|
|
@@ -11257,7 +11246,6 @@ class BaseInput extends AuroElement {
|
|
|
11257
11246
|
|
|
11258
11247
|
/**
|
|
11259
11248
|
* Sets the error message shown when a `required` input is left empty.
|
|
11260
|
-
* @relevantWhen !noValidate
|
|
11261
11249
|
* @category behavior
|
|
11262
11250
|
*/
|
|
11263
11251
|
setCustomValidityValueMissing: {
|
|
@@ -12564,7 +12552,7 @@ class AuroHelpText extends LitElement {
|
|
|
12564
12552
|
}
|
|
12565
12553
|
}
|
|
12566
12554
|
|
|
12567
|
-
var formkitVersion = '
|
|
12555
|
+
var formkitVersion = '202611091925';
|
|
12568
12556
|
|
|
12569
12557
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12570
12558
|
// See LICENSE in the project root for license information.
|
|
@@ -1338,7 +1338,7 @@ class AuroHelpText extends i$2 {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
var formkitVersion = '
|
|
1341
|
+
var formkitVersion = '202611091925';
|
|
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.
|
|
@@ -1338,7 +1338,7 @@ class AuroHelpText extends i$2 {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
var formkitVersion = '
|
|
1341
|
+
var formkitVersion = '202611091925';
|
|
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.
|
|
@@ -1338,7 +1338,7 @@ class AuroHelpText extends i$2 {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
var formkitVersion = '
|
|
1341
|
+
var formkitVersion = '202611091925';
|
|
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.
|
|
@@ -1277,7 +1277,7 @@ class AuroHelpText extends LitElement {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
|
|
1280
|
-
var formkitVersion = '
|
|
1280
|
+
var formkitVersion = '202611091925';
|
|
1281
1281
|
|
|
1282
1282
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1283
1283
|
// See LICENSE in the project root for license information.
|
|
@@ -1277,7 +1277,7 @@ class AuroHelpText extends LitElement {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
|
|
1280
|
-
var formkitVersion = '
|
|
1280
|
+
var formkitVersion = '202611091925';
|
|
1281
1281
|
|
|
1282
1282
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1283
1283
|
// See LICENSE in the project root for license information.
|
|
@@ -24,55 +24,55 @@ A form control that lets people choose one option, or several, from a list, such
|
|
|
24
24
|
|
|
25
25
|
### Properties and attributes
|
|
26
26
|
|
|
27
|
-
| Properties | Attributes | Modifiers | Type | Default | Category | Relevant when | Description
|
|
28
|
-
| ----------------------------- | ----------------------------- | --------- | ----------------------------------------------------------------- | -------------- | -------- | ------------------------- |
|
|
29
|
-
| appearance | appearance | | `default` \| `inverse` | `default` | ui | | Sets the colors to match the background behind the select. Use `inverse` on dark backgrounds and `default` on light ones.
|
|
30
|
-
| disabled | disabled | | boolean | | ui | | Turns the select off. A disabled select is shown in a muted style and can't be opened, but keyboard users can still tab to it.<br>`auro-form` leaves a disabled select's value out of its form data.
|
|
31
|
-
| flexMenuWidth | flexmenuwidth | | boolean | | ui | `layout === 'classic'` | Sizes the bib to fit its options instead of matching the trigger's width. Use it when option text is wider than the trigger.<br>Applies only when `layout="classic"`.
|
|
32
|
-
| fluid | fluid | | boolean | | ui | | Stretches the select to fill the full width of its container.
|
|
33
|
-
| forceDisplayValue | forcedisplayvalue | | boolean | `false` | ui | | Shows the selected option's `displayValue` content in the trigger even while the bib is open, and visually hides the label and value text.<br>Applies only when the selected option has `displayValue` content.
|
|
34
|
-
| fullscreenBreakpoint | fullscreenbreakpoint | | `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `disabled` | `sm` | ui | | Sets the largest screen size at which the bib opens as a fullscreen dialog instead of a popover, such as `sm`.<br>Use `disabled` to never open it fullscreen.
|
|
35
|
-
| largeFullscreenHeadline | largefullscreenheadline | | boolean | | ui | | Makes the headline in the fullscreen bib larger, using the display heading style.
|
|
36
|
-
| layout | layout | | `classic` \| `emphasized` \| `snowflake` | `classic` | ui | | Sets the select's overall look. Use `emphasized` for a large, prominent select on light backgrounds, and `snowflake` only on dark backgrounds with `appearance="inverse"`.
|
|
37
|
-
| matchWidth | matchwidth | | boolean | `false` | ui | `layout !== 'classic'` | Makes the bib the same width as the trigger.<br>Applies only when `layout` isn't `classic`; the classic layout always matches the trigger's width unless `flexMenuWidth` is set.
|
|
38
|
-
| noCheckmark | nocheckmark | | boolean | | ui | | Hides the checkmark next to the selected option.<br>Removing the attribute doesn't currently bring the checkmark back.
|
|
39
|
-
| noFlip | noflip | | boolean | `false` | ui | | Keeps the bib on the `placement` side even when there isn't enough room there.<br>By default, the bib flips to the opposite side.
|
|
40
|
-
| offset | offset | | number | `0` | ui | | Sets the gap between the trigger and the bib, in pixels, such as `8`.
|
|
41
|
-
| placeholder | placeholder | | string | | ui | | Sets the text shown in the trigger before an option is selected, such as `Choose a destination`.
|
|
42
|
-
| placement | placement | | string | `bottom-start` | ui | | Sets where the bib opens relative to the trigger, such as `bottom-start` (below, lined up with the trigger's start edge) or `top`.<br>The bib flips to the opposite side when there isn't enough room, unless `noFlip` is set.
|
|
43
|
-
| shape | shape | | `classic` \| `pill` \| `pill-left` \| `pill-right` \| `snowflake` | `classic` | ui | | Sets the shape of the trigger. Use `classic` with the classic layout, `pill`, `pill-left`, or `pill-right` with the emphasized layout, and `snowflake` with the snowflake layout.
|
|
44
|
-
| shift | shift | | boolean | `false` | ui | `layout === 'emphasized'` | Slides the bib along the trigger's edge to keep it on screen when it would otherwise be cut off.<br>Applies only when `layout="emphasized"`.
|
|
45
|
-
| size | size | | `lg` \| `xl` | `lg` | ui | | Sets the height of the trigger. Use `xl` only with the emphasized layout, and `lg` with the other layouts.
|
|
46
|
-
| autoPlacement | autoplacement | | boolean | `false` | ui | | Deprecated: Use `placement` instead.<br>Moves the bib to whichever side of the trigger has the most space.<br>The bib already flips to the opposite side when it doesn't fit, unless `noFlip` is set.
|
|
47
|
-
| onDark | ondark | | boolean | | ui | | Deprecated: Use `appearance="inverse"` instead.<br>Sets the colors for a dark background.
|
|
48
|
-
| autocomplete | autocomplete | | string | | behavior | `layout !== 'emphasized'` | Sets the autofill hint for the hidden native select, such as `country-name` (the native `autocomplete` attribute).<br>Doesn't currently apply when `layout="emphasized"`, which has no hidden native select.
|
|
49
|
-
| error | error | | string | | behavior | | Forces the select into the `customError` state and shows this text as the error message, such as `Choose another option`.<br>When `setCustomValidityCustomError` or `setCustomValidity` is set, that message replaces this text.<br>Remove the attribute to clear the error and validate normally.
|
|
50
|
-
| multiSelect | multiselect | | boolean | | behavior | | Lets people select more than one option, and keeps the bib open between selections. `value` becomes a JSON array string, such as `["stops","price"]`.<br>Consider checkboxes instead, which make choosing several options easier for everyone, including screen reader users.
|
|
51
|
-
| name | name | | string | | behavior | | Sets the key for the select's value in form data, such as `sortOrder` (the native `name` attribute).
|
|
52
|
-
| noValidate | novalidate | | boolean | | behavior | | Turns off automatic validation when the select loses focus or its value changes.<br>Use it when your code validates the select, such as on form submit, by calling `validate()`.
|
|
53
|
-
| optionSelected | | | HTMLElement \| Array<HTMLElement> | | behavior | | Gets the selected `<auro-menuoption>` element, or `undefined` when nothing is selected.<br>In `multiSelect` mode, it's an array of the selected options.
|
|
54
|
-
| required | required | | boolean | | behavior | | Requires a selection. A required select shows the `valueMissing` error when it's left empty, and doesn't show the "(optional)" text after the label.
|
|
55
|
-
| setCustomValidity | setcustomvalidity | | string | | behavior | | Sets one error message to show for every validation error, such as `Choose a sort order`.<br>When set, it replaces the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages and the `error` text.
|
|
56
|
-
| setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior | `error` | Sets the error message shown while the `error` attribute is set, in place of the `error` text.<br>Ignored when `setCustomValidity` is set.
|
|
57
|
-
| setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior | `required` | Sets the error message shown when a `required` select is left empty, such as `Choose a sort order`.<br>Ignored when `setCustomValidity` is set.
|
|
58
|
-
| typeaheadTimeoutMs | typeaheadtimeoutms | | number | `500` | behavior | | Sets how long, in milliseconds, typed characters keep adding to the type-ahead search before it starts over.<br>Increase it, for example to `1000`, for people who type slowly.
|
|
59
|
-
| validity | validity | | string | | behavior | | Reports the select's current validity state, such as `valid`, `valueMissing`, or `customError`.<br>Validation sets it, and it stays `undefined` until the select first validates.
|
|
60
|
-
| value | value | | string | | behavior | | Sets the selected option by its value, such as `price`. In `multiSelect` mode, it's a JSON array string, such as `["stops","price"]`.<br>A value that matches no option, or matches
|
|
27
|
+
| Properties | Attributes | Modifiers | Type | Default | Category | Relevant when | Description |
|
|
28
|
+
| ----------------------------- | ----------------------------- | --------- | ----------------------------------------------------------------- | -------------- | -------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| appearance | appearance | | `default` \| `inverse` | `default` | ui | | Sets the colors to match the background behind the select. Use `inverse` on dark backgrounds and `default` on light ones. |
|
|
30
|
+
| disabled | disabled | | boolean | | ui | | Turns the select off. A disabled select is shown in a muted style and can't be opened, but keyboard users can still tab to it.<br>`auro-form` leaves a disabled select's value out of its form data. |
|
|
31
|
+
| flexMenuWidth | flexmenuwidth | | boolean | | ui | `layout === 'classic'` | Sizes the bib to fit its options instead of matching the trigger's width. Use it when option text is wider than the trigger.<br>Applies only when `layout="classic"`. |
|
|
32
|
+
| fluid | fluid | | boolean | | ui | | Stretches the select to fill the full width of its container. |
|
|
33
|
+
| forceDisplayValue | forcedisplayvalue | | boolean | `false` | ui | | Shows the selected option's `displayValue` content in the trigger even while the bib is open, and visually hides the label and value text.<br>Applies only when the selected option has `displayValue` content. |
|
|
34
|
+
| fullscreenBreakpoint | fullscreenbreakpoint | | `xs` \| `sm` \| `md` \| `lg` \| `xl` \| `disabled` | `sm` | ui | | Sets the largest screen size at which the bib opens as a fullscreen dialog instead of a popover, such as `sm`.<br>Use `disabled` to never open it fullscreen. |
|
|
35
|
+
| largeFullscreenHeadline | largefullscreenheadline | | boolean | | ui | | Makes the headline in the fullscreen bib larger, using the display heading style. |
|
|
36
|
+
| layout | layout | | `classic` \| `emphasized` \| `snowflake` | `classic` | ui | | Sets the select's overall look. Use `emphasized` for a large, prominent select on light backgrounds, and `snowflake` only on dark backgrounds with `appearance="inverse"`. |
|
|
37
|
+
| matchWidth | matchwidth | | boolean | `false` | ui | `layout !== 'classic'` | Makes the bib the same width as the trigger.<br>Applies only when `layout` isn't `classic`; the classic layout always matches the trigger's width unless `flexMenuWidth` is set. |
|
|
38
|
+
| noCheckmark | nocheckmark | | boolean | | ui | | Hides the checkmark next to the selected option.<br>Removing the attribute doesn't currently bring the checkmark back. |
|
|
39
|
+
| noFlip | noflip | | boolean | `false` | ui | | Keeps the bib on the `placement` side even when there isn't enough room there.<br>By default, the bib flips to the opposite side. |
|
|
40
|
+
| offset | offset | | number | `0` | ui | | Sets the gap between the trigger and the bib, in pixels, such as `8`. |
|
|
41
|
+
| placeholder | placeholder | | string | | ui | | Sets the text shown in the trigger before an option is selected, such as `Choose a destination`. |
|
|
42
|
+
| placement | placement | | string | `bottom-start` | ui | | Sets where the bib opens relative to the trigger, such as `bottom-start` (below, lined up with the trigger's start edge) or `top`.<br>The bib flips to the opposite side when there isn't enough room, unless `noFlip` is set. |
|
|
43
|
+
| shape | shape | | `classic` \| `pill` \| `pill-left` \| `pill-right` \| `snowflake` | `classic` | ui | | Sets the shape of the trigger. Use `classic` with the classic layout, `pill`, `pill-left`, or `pill-right` with the emphasized layout, and `snowflake` with the snowflake layout. |
|
|
44
|
+
| shift | shift | | boolean | `false` | ui | `layout === 'emphasized'` | Slides the bib along the trigger's edge to keep it on screen when it would otherwise be cut off.<br>Applies only when `layout="emphasized"`. |
|
|
45
|
+
| size | size | | `lg` \| `xl` | `lg` | ui | | Sets the height of the trigger. Use `xl` only with the emphasized layout, and `lg` with the other layouts. |
|
|
46
|
+
| autoPlacement | autoplacement | | boolean | `false` | ui | | Deprecated: Use `placement` instead.<br>Moves the bib to whichever side of the trigger has the most space.<br>The bib already flips to the opposite side when it doesn't fit, unless `noFlip` is set. |
|
|
47
|
+
| onDark | ondark | | boolean | | ui | | Deprecated: Use `appearance="inverse"` instead.<br>Sets the colors for a dark background. |
|
|
48
|
+
| autocomplete | autocomplete | | string | | behavior | `layout !== 'emphasized'` | Sets the autofill hint for the hidden native select, such as `country-name` (the native `autocomplete` attribute).<br>Doesn't currently apply when `layout="emphasized"`, which has no hidden native select. |
|
|
49
|
+
| error | error | | string | | behavior | | Forces the select into the `customError` state and shows this text as the error message, such as `Choose another option`.<br>When `setCustomValidityCustomError` or `setCustomValidity` is set, that message replaces this text.<br>Remove the attribute to clear the error and validate normally. |
|
|
50
|
+
| multiSelect | multiselect | | boolean | | behavior | | Lets people select more than one option, and keeps the bib open between selections. `value` becomes a JSON array string, such as `["stops","price"]`.<br>Consider checkboxes instead, which make choosing several options easier for everyone, including screen reader users. |
|
|
51
|
+
| name | name | | string | | behavior | | Sets the key for the select's value in form data, such as `sortOrder` (the native `name` attribute). |
|
|
52
|
+
| noValidate | novalidate | | boolean | | behavior | | Turns off automatic validation when the select loses focus or its value changes.<br>Use it when your code validates the select, such as on form submit, by calling `validate()`. |
|
|
53
|
+
| optionSelected | | | HTMLElement \| Array<HTMLElement> | | behavior | | Gets the selected `<auro-menuoption>` element, or `undefined` when nothing is selected.<br>In `multiSelect` mode, it's an array of the selected options. |
|
|
54
|
+
| required | required | | boolean | | behavior | | Requires a selection. A required select shows the `valueMissing` error when it's left empty, and doesn't show the "(optional)" text after the label. |
|
|
55
|
+
| setCustomValidity | setcustomvalidity | | string | | behavior | | Sets one error message to show for every validation error, such as `Choose a sort order`.<br>When set, it replaces the `setCustomValidityValueMissing` and `setCustomValidityCustomError` messages and the `error` text. |
|
|
56
|
+
| setCustomValidityCustomError | setcustomvaliditycustomerror | | string | | behavior | `error` | Sets the error message shown while the `error` attribute is set, in place of the `error` text.<br>Ignored when `setCustomValidity` is set. |
|
|
57
|
+
| setCustomValidityValueMissing | setcustomvalidityvaluemissing | | string | | behavior | `required` | Sets the error message shown when a `required` select is left empty, such as `Choose a sort order`.<br>Ignored when `setCustomValidity` is set. |
|
|
58
|
+
| typeaheadTimeoutMs | typeaheadtimeoutms | | number | `500` | behavior | | Sets how long, in milliseconds, typed characters keep adding to the type-ahead search before it starts over.<br>Increase it, for example to `1000`, for people who type slowly. |
|
|
59
|
+
| validity | validity | | string | | behavior | | Reports the select's current validity state, such as `valid`, `valueMissing`, or `customError`.<br>Validation sets it, and it stays `undefined` until the select first validates. |
|
|
60
|
+
| value | value | | string | | behavior | | Sets the selected option by its value, such as `price`. In `multiSelect` mode, it's a JSON array string, such as `["stops","price"]`.<br>A value that matches no option, or matches only `disabled` or `static` options, clears both `value` and `optionSelected`; `hidden` options can still be selected by value. |
|
|
61
61
|
|
|
62
62
|
### Methods
|
|
63
63
|
|
|
64
|
-
| Name | Parameters | Return | Description
|
|
65
|
-
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |
|
|
66
|
-
| hideBib | None | void | Closes the bib if it's open.
|
|
67
|
-
| register | `name` (string) - The tag name to register the element under. | | Registers the element with the browser under a tag name, such as `custom-select`.
|
|
68
|
-
| reset | None | void | Clears the selection and the validation state, and marks the select as not yet touched.
|
|
69
|
-
| resetLayoutClasses | None | void | Sets the `layout-*` class on the `.wrapper` element to match the current `layout`, such as `layout-classic`. Does nothing when `layout` isn't set or there's no `.wrapper` element.
|
|
70
|
-
| resetShapeClasses | None | void | Sets the `shape-*` class on the `.wrapper` element to match the current `shape` and `size`, such as `shape-rounded-lg`, or to `shape-none` when either isn't set. Does nothing when there's no `.wrapper` element.
|
|
71
|
-
| setMenuValue | `value` (string) - The option value to select, such as `price`. | | Selects the menu option whose value matches, as setting `value` does.<br>A value that matches no option, or matches
|
|
72
|
-
| showBib | None | void | Opens the bib if it's closed. Does nothing while the select is disabled.
|
|
73
|
-
| updateActiveOption | `index` (number) - The zero-based index of the option to make active. | | Sets the active option, the one keyboard users are on, by its position in the menu.
|
|
74
|
-
| updateComponentArchitecture | None | void | Updates the `layout-*` and `shape-*` classes on the `.wrapper` element. Called whenever `layout`, `shape`, or `size` changes, unless a subclass overrides `updated()` without calling `super.updated()`.
|
|
75
|
-
| validate | `force` (boolean) - If true, validates right away, even before the user has interacted with the select. If false, validates only when focus is outside the select and the user has interacted with it or a value is set. | | Checks the selection and updates `validity` and the error message. Runs even when `noValidate` is set.
|
|
64
|
+
| Name | Parameters | Return | Description |
|
|
65
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| hideBib | None | void | Closes the bib if it's open. |
|
|
67
|
+
| register | `name` (string) - The tag name to register the element under. | | Registers the element with the browser under a tag name, such as `custom-select`. |
|
|
68
|
+
| reset | None | void | Clears the selection and the validation state, and marks the select as not yet touched. |
|
|
69
|
+
| resetLayoutClasses | None | void | Sets the `layout-*` class on the `.wrapper` element to match the current `layout`, such as `layout-classic`. Does nothing when `layout` isn't set or there's no `.wrapper` element. |
|
|
70
|
+
| resetShapeClasses | None | void | Sets the `shape-*` class on the `.wrapper` element to match the current `shape` and `size`, such as `shape-rounded-lg`, or to `shape-none` when either isn't set. Does nothing when there's no `.wrapper` element. |
|
|
71
|
+
| setMenuValue | `value` (string) - The option value to select, such as `price`. | | Selects the menu option whose value matches, as setting `value` does.<br>A value that matches no option, or matches only `disabled` or `static` options, clears `value` and `optionSelected`; `hidden` options can still be selected. |
|
|
72
|
+
| showBib | None | void | Opens the bib if it's closed. Does nothing while the select is disabled. |
|
|
73
|
+
| updateActiveOption | `index` (number) - The zero-based index of the option to make active. | | Sets the active option, the one keyboard users are on, by its position in the menu. |
|
|
74
|
+
| updateComponentArchitecture | None | void | Updates the `layout-*` and `shape-*` classes on the `.wrapper` element. Called whenever `layout`, `shape`, or `size` changes, unless a subclass overrides `updated()` without calling `super.updated()`. |
|
|
75
|
+
| validate | `force` (boolean) - If true, validates right away, even before the user has interacted with the select. If false, validates only when focus is outside the select and the user has interacted with it or a value is set. | | Checks the selection and updates `validity` and the error message. Runs even when `noValidate` is set. |
|
|
76
76
|
|
|
77
77
|
### Events
|
|
78
78
|
|