@aurodesignsystem-dev/auro-formkit 0.0.0-pr1318.0 → 0.0.0-pr1318.10
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/api.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.min.js +63 -7
- package/components/combobox/demo/index.min.js +63 -7
- package/components/combobox/dist/auro-combobox.d.ts +1 -1
- package/components/combobox/dist/index.js +63 -7
- package/components/combobox/dist/registered.js +63 -7
- package/components/counter/demo/api.min.js +17 -3
- package/components/counter/demo/index.min.js +17 -3
- package/components/counter/dist/index.js +17 -3
- package/components/counter/dist/registered.js +17 -3
- package/components/datepicker/demo/api.min.js +43 -5
- package/components/datepicker/demo/index.min.js +43 -5
- package/components/datepicker/dist/index.js +43 -5
- package/components/datepicker/dist/registered.js +43 -5
- package/components/dropdown/demo/api.min.js +16 -2
- package/components/dropdown/demo/index.min.js +16 -2
- package/components/dropdown/dist/auro-dropdown.d.ts +9 -0
- package/components/dropdown/dist/index.js +16 -2
- package/components/dropdown/dist/registered.js +16 -2
- package/components/input/demo/api.md +5 -3
- package/components/input/demo/api.min.js +26 -2
- package/components/input/demo/index.min.js +26 -2
- package/components/input/dist/auro-input.d.ts +1 -0
- package/components/input/dist/base-input.d.ts +10 -0
- package/components/input/dist/index.js +26 -2
- package/components/input/dist/registered.js +26 -2
- package/components/radio/demo/api.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.min.js +56 -11
- package/components/select/demo/index.min.js +56 -11
- package/components/select/dist/auro-select.d.ts +7 -0
- package/components/select/dist/index.js +56 -11
- package/components/select/dist/registered.js +56 -11
- package/custom-elements.json +92 -5
- package/package.json +9 -3
|
@@ -3254,7 +3254,7 @@ class AuroHelpText extends LitElement {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
}
|
|
3256
3256
|
|
|
3257
|
-
var formkitVersion = '
|
|
3257
|
+
var formkitVersion = '202602112105';
|
|
3258
3258
|
|
|
3259
3259
|
class AuroElement extends LitElement {
|
|
3260
3260
|
static get properties() {
|
|
@@ -3541,6 +3541,20 @@ class AuroDropdown extends AuroElement {
|
|
|
3541
3541
|
}
|
|
3542
3542
|
}
|
|
3543
3543
|
|
|
3544
|
+
/**
|
|
3545
|
+
* Sets the active descendant element for accessibility.
|
|
3546
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
3547
|
+
* This function is used in components that contain `auro-dropdown` to set the active descendant.
|
|
3548
|
+
* @private
|
|
3549
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
3550
|
+
* @returns {void}
|
|
3551
|
+
*/
|
|
3552
|
+
setActiveDescendant(element) {
|
|
3553
|
+
if (this.trigger) {
|
|
3554
|
+
this.trigger.ariaActiveDescendantElement = element;
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3544
3558
|
// function to define props used within the scope of this component
|
|
3545
3559
|
static get properties() {
|
|
3546
3560
|
return {
|
|
@@ -4184,7 +4198,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4184
4198
|
tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
4185
4199
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4186
4200
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4187
|
-
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4201
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : `${this.dropdownId}-floater-bib`)}"
|
|
4188
4202
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4189
4203
|
@focusin="${this.handleFocusin}"
|
|
4190
4204
|
@blur="${this.handleFocusOut}">
|
|
@@ -31,7 +31,7 @@ The `auro-input` element provides users a way to enter data into a text field.
|
|
|
31
31
|
| [lang](#lang) | `lang` | `string` | | Defines the language of an element. |
|
|
32
32
|
| [layout](#layout) | | `string` | | |
|
|
33
33
|
| [max](#max) | `max` | `string` | | The maximum value allowed. This only applies for inputs with a type of `number` and all date formats. |
|
|
34
|
-
| [maxLength](#maxLength) | `maxLength` | `number` | | The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher. |
|
|
34
|
+
| [maxLength](#maxLength) | `maxLength` | `number` | | The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.<br />**Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers. |
|
|
35
35
|
| [min](#min) | `min` | `string` | | The minimum value allowed. This only applies for inputs with a type of `number` and all date formats. |
|
|
36
36
|
| [minLength](#minLength) | `minLength` | `number` | | The minimum number of characters the user can enter into the text input. This must be a non-negative integer value smaller than or equal to the value specified by `maxlength`. |
|
|
37
37
|
| [name](#name) | `name` | `string` | | Populates the `name` attribute on the input. |
|
|
@@ -456,6 +456,8 @@ Use the `maxlength` attribute to control the length of the input entered.
|
|
|
456
456
|
|
|
457
457
|
The `setCustomValidityTooLong` attribute may optionally be used in combination with the `maxLength` attribute to define custom help text used when the length of the input is too long.
|
|
458
458
|
|
|
459
|
+
**Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
460
|
+
|
|
459
461
|
<div class="exampleWrapper">
|
|
460
462
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/max-length.html) -->
|
|
461
463
|
<!-- The below content is automatically added from ../apiExamples/max-length.html -->
|
|
@@ -963,7 +965,7 @@ Use the `format` attribute to set a custom phone number format.
|
|
|
963
965
|
<div class="exampleWrapper">
|
|
964
966
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/tel-format.html) -->
|
|
965
967
|
<!-- The below content is automatically added from ../apiExamples/tel-format.html -->
|
|
966
|
-
<auro-input type="tel" format="+
|
|
968
|
+
<auro-input type="tel" format="+00 000 00 0000">
|
|
967
969
|
<span slot="label">Telephone</span>
|
|
968
970
|
<span slot="helpText">Help Text</span>
|
|
969
971
|
</auro-input>
|
|
@@ -975,7 +977,7 @@ Use the `format` attribute to set a custom phone number format.
|
|
|
975
977
|
<!-- The below code snippet is automatically added from ../apiExamples/tel-format.html -->
|
|
976
978
|
|
|
977
979
|
```html
|
|
978
|
-
<auro-input type="tel" format="+
|
|
980
|
+
<auro-input type="tel" format="+00 000 00 0000">
|
|
979
981
|
<span slot="label">Telephone</span>
|
|
980
982
|
<span slot="helpText">Help Text</span>
|
|
981
983
|
</auro-input>
|
|
@@ -5472,6 +5472,7 @@ class BaseInput extends AuroElement {
|
|
|
5472
5472
|
|
|
5473
5473
|
/**
|
|
5474
5474
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5475
|
+
* **Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
5475
5476
|
*/
|
|
5476
5477
|
maxLength: {
|
|
5477
5478
|
type: Number,
|
|
@@ -5997,6 +5998,11 @@ class BaseInput extends AuroElement {
|
|
|
5997
5998
|
* @returns {void}
|
|
5998
5999
|
*/
|
|
5999
6000
|
handleInput(event) {
|
|
6001
|
+
// Process credit card type detection and formatting during input
|
|
6002
|
+
if (this.type === 'credit-card') {
|
|
6003
|
+
this.processCreditCard();
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6000
6006
|
// Sets value property to value of element value (el.value).
|
|
6001
6007
|
this.value = this.inputElement.value;
|
|
6002
6008
|
|
|
@@ -6076,6 +6082,20 @@ class BaseInput extends AuroElement {
|
|
|
6076
6082
|
return activeEl;
|
|
6077
6083
|
}
|
|
6078
6084
|
|
|
6085
|
+
/**
|
|
6086
|
+
* Sets the active descendant element for accessibility.
|
|
6087
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
6088
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
6089
|
+
* @private
|
|
6090
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
6091
|
+
* @returns {void}
|
|
6092
|
+
*/
|
|
6093
|
+
setActiveDescendant(element) {
|
|
6094
|
+
if (this.inputElement) {
|
|
6095
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
|
|
6079
6099
|
/**
|
|
6080
6100
|
* Validates value.
|
|
6081
6101
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -6114,6 +6134,7 @@ class BaseInput extends AuroElement {
|
|
|
6114
6134
|
|
|
6115
6135
|
if (this.type in defaultLengths) {
|
|
6116
6136
|
this.lengthForType = this.format ? this.format.length : defaultLengths[this.type];
|
|
6137
|
+
this.maxLength = this.lengthForType;
|
|
6117
6138
|
this.inputmode = this.inputmode || 'numeric';
|
|
6118
6139
|
} else if (this.type === 'number') {
|
|
6119
6140
|
this.inputmode = this.inputmode || 'numeric';
|
|
@@ -6224,6 +6245,7 @@ class BaseInput extends AuroElement {
|
|
|
6224
6245
|
*/
|
|
6225
6246
|
processCreditCard() {
|
|
6226
6247
|
const creditCard = this.matchInputValueToCreditCard();
|
|
6248
|
+
const previousFormat = this.format;
|
|
6227
6249
|
|
|
6228
6250
|
this.format = creditCard.maskFormat;
|
|
6229
6251
|
|
|
@@ -6236,7 +6258,8 @@ class BaseInput extends AuroElement {
|
|
|
6236
6258
|
this.inputIconName = creditCard.cardIcon;
|
|
6237
6259
|
}
|
|
6238
6260
|
|
|
6239
|
-
if
|
|
6261
|
+
// Only reconfigure the mask if the format has changed
|
|
6262
|
+
if (this.inputElement && previousFormat !== this.format) {
|
|
6240
6263
|
this.configureAutoFormatting();
|
|
6241
6264
|
}
|
|
6242
6265
|
}
|
|
@@ -6697,7 +6720,7 @@ class AuroHelpText extends i$3 {
|
|
|
6697
6720
|
}
|
|
6698
6721
|
}
|
|
6699
6722
|
|
|
6700
|
-
var formkitVersion = '
|
|
6723
|
+
var formkitVersion = '202602112105';
|
|
6701
6724
|
|
|
6702
6725
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6703
6726
|
// See LICENSE in the project root for license information.
|
|
@@ -6899,6 +6922,7 @@ class AuroInput extends BaseInput {
|
|
|
6899
6922
|
/**
|
|
6900
6923
|
* Common display value wrapper classes.
|
|
6901
6924
|
* @private
|
|
6925
|
+
* @returns {Record<string, boolean>}
|
|
6902
6926
|
*/
|
|
6903
6927
|
get commonDisplayValueWrapperClasses() {
|
|
6904
6928
|
return {
|
|
@@ -5397,6 +5397,7 @@ class BaseInput extends AuroElement {
|
|
|
5397
5397
|
|
|
5398
5398
|
/**
|
|
5399
5399
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5400
|
+
* **Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
5400
5401
|
*/
|
|
5401
5402
|
maxLength: {
|
|
5402
5403
|
type: Number,
|
|
@@ -5922,6 +5923,11 @@ class BaseInput extends AuroElement {
|
|
|
5922
5923
|
* @returns {void}
|
|
5923
5924
|
*/
|
|
5924
5925
|
handleInput(event) {
|
|
5926
|
+
// Process credit card type detection and formatting during input
|
|
5927
|
+
if (this.type === 'credit-card') {
|
|
5928
|
+
this.processCreditCard();
|
|
5929
|
+
}
|
|
5930
|
+
|
|
5925
5931
|
// Sets value property to value of element value (el.value).
|
|
5926
5932
|
this.value = this.inputElement.value;
|
|
5927
5933
|
|
|
@@ -6001,6 +6007,20 @@ class BaseInput extends AuroElement {
|
|
|
6001
6007
|
return activeEl;
|
|
6002
6008
|
}
|
|
6003
6009
|
|
|
6010
|
+
/**
|
|
6011
|
+
* Sets the active descendant element for accessibility.
|
|
6012
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
6013
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
6014
|
+
* @private
|
|
6015
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
6016
|
+
* @returns {void}
|
|
6017
|
+
*/
|
|
6018
|
+
setActiveDescendant(element) {
|
|
6019
|
+
if (this.inputElement) {
|
|
6020
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
6021
|
+
}
|
|
6022
|
+
}
|
|
6023
|
+
|
|
6004
6024
|
/**
|
|
6005
6025
|
* Validates value.
|
|
6006
6026
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -6039,6 +6059,7 @@ class BaseInput extends AuroElement {
|
|
|
6039
6059
|
|
|
6040
6060
|
if (this.type in defaultLengths) {
|
|
6041
6061
|
this.lengthForType = this.format ? this.format.length : defaultLengths[this.type];
|
|
6062
|
+
this.maxLength = this.lengthForType;
|
|
6042
6063
|
this.inputmode = this.inputmode || 'numeric';
|
|
6043
6064
|
} else if (this.type === 'number') {
|
|
6044
6065
|
this.inputmode = this.inputmode || 'numeric';
|
|
@@ -6149,6 +6170,7 @@ class BaseInput extends AuroElement {
|
|
|
6149
6170
|
*/
|
|
6150
6171
|
processCreditCard() {
|
|
6151
6172
|
const creditCard = this.matchInputValueToCreditCard();
|
|
6173
|
+
const previousFormat = this.format;
|
|
6152
6174
|
|
|
6153
6175
|
this.format = creditCard.maskFormat;
|
|
6154
6176
|
|
|
@@ -6161,7 +6183,8 @@ class BaseInput extends AuroElement {
|
|
|
6161
6183
|
this.inputIconName = creditCard.cardIcon;
|
|
6162
6184
|
}
|
|
6163
6185
|
|
|
6164
|
-
if
|
|
6186
|
+
// Only reconfigure the mask if the format has changed
|
|
6187
|
+
if (this.inputElement && previousFormat !== this.format) {
|
|
6165
6188
|
this.configureAutoFormatting();
|
|
6166
6189
|
}
|
|
6167
6190
|
}
|
|
@@ -6622,7 +6645,7 @@ class AuroHelpText extends i$3 {
|
|
|
6622
6645
|
}
|
|
6623
6646
|
}
|
|
6624
6647
|
|
|
6625
|
-
var formkitVersion = '
|
|
6648
|
+
var formkitVersion = '202602112105';
|
|
6626
6649
|
|
|
6627
6650
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6628
6651
|
// See LICENSE in the project root for license information.
|
|
@@ -6824,6 +6847,7 @@ class AuroInput extends BaseInput {
|
|
|
6824
6847
|
/**
|
|
6825
6848
|
* Common display value wrapper classes.
|
|
6826
6849
|
* @private
|
|
6850
|
+
* @returns {Record<string, boolean>}
|
|
6827
6851
|
*/
|
|
6828
6852
|
get commonDisplayValueWrapperClasses() {
|
|
6829
6853
|
return {
|
|
@@ -158,6 +158,7 @@ export default class BaseInput extends AuroElement {
|
|
|
158
158
|
};
|
|
159
159
|
/**
|
|
160
160
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
161
|
+
* **Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
161
162
|
*/
|
|
162
163
|
maxLength: {
|
|
163
164
|
type: NumberConstructor;
|
|
@@ -515,6 +516,15 @@ export default class BaseInput extends AuroElement {
|
|
|
515
516
|
* @returns {Object}
|
|
516
517
|
*/
|
|
517
518
|
private getActiveElement;
|
|
519
|
+
/**
|
|
520
|
+
* Sets the active descendant element for accessibility.
|
|
521
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
522
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
523
|
+
* @private
|
|
524
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
525
|
+
* @returns {void}
|
|
526
|
+
*/
|
|
527
|
+
private setActiveDescendant;
|
|
518
528
|
/**
|
|
519
529
|
* Validates value.
|
|
520
530
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -5338,6 +5338,7 @@ class BaseInput extends AuroElement {
|
|
|
5338
5338
|
|
|
5339
5339
|
/**
|
|
5340
5340
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5341
|
+
* **Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
5341
5342
|
*/
|
|
5342
5343
|
maxLength: {
|
|
5343
5344
|
type: Number,
|
|
@@ -5863,6 +5864,11 @@ class BaseInput extends AuroElement {
|
|
|
5863
5864
|
* @returns {void}
|
|
5864
5865
|
*/
|
|
5865
5866
|
handleInput(event) {
|
|
5867
|
+
// Process credit card type detection and formatting during input
|
|
5868
|
+
if (this.type === 'credit-card') {
|
|
5869
|
+
this.processCreditCard();
|
|
5870
|
+
}
|
|
5871
|
+
|
|
5866
5872
|
// Sets value property to value of element value (el.value).
|
|
5867
5873
|
this.value = this.inputElement.value;
|
|
5868
5874
|
|
|
@@ -5942,6 +5948,20 @@ class BaseInput extends AuroElement {
|
|
|
5942
5948
|
return activeEl;
|
|
5943
5949
|
}
|
|
5944
5950
|
|
|
5951
|
+
/**
|
|
5952
|
+
* Sets the active descendant element for accessibility.
|
|
5953
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
5954
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
5955
|
+
* @private
|
|
5956
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
5957
|
+
* @returns {void}
|
|
5958
|
+
*/
|
|
5959
|
+
setActiveDescendant(element) {
|
|
5960
|
+
if (this.inputElement) {
|
|
5961
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
|
|
5945
5965
|
/**
|
|
5946
5966
|
* Validates value.
|
|
5947
5967
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -5980,6 +6000,7 @@ class BaseInput extends AuroElement {
|
|
|
5980
6000
|
|
|
5981
6001
|
if (this.type in defaultLengths) {
|
|
5982
6002
|
this.lengthForType = this.format ? this.format.length : defaultLengths[this.type];
|
|
6003
|
+
this.maxLength = this.lengthForType;
|
|
5983
6004
|
this.inputmode = this.inputmode || 'numeric';
|
|
5984
6005
|
} else if (this.type === 'number') {
|
|
5985
6006
|
this.inputmode = this.inputmode || 'numeric';
|
|
@@ -6090,6 +6111,7 @@ class BaseInput extends AuroElement {
|
|
|
6090
6111
|
*/
|
|
6091
6112
|
processCreditCard() {
|
|
6092
6113
|
const creditCard = this.matchInputValueToCreditCard();
|
|
6114
|
+
const previousFormat = this.format;
|
|
6093
6115
|
|
|
6094
6116
|
this.format = creditCard.maskFormat;
|
|
6095
6117
|
|
|
@@ -6102,7 +6124,8 @@ class BaseInput extends AuroElement {
|
|
|
6102
6124
|
this.inputIconName = creditCard.cardIcon;
|
|
6103
6125
|
}
|
|
6104
6126
|
|
|
6105
|
-
if
|
|
6127
|
+
// Only reconfigure the mask if the format has changed
|
|
6128
|
+
if (this.inputElement && previousFormat !== this.format) {
|
|
6106
6129
|
this.configureAutoFormatting();
|
|
6107
6130
|
}
|
|
6108
6131
|
}
|
|
@@ -6563,7 +6586,7 @@ class AuroHelpText extends LitElement {
|
|
|
6563
6586
|
}
|
|
6564
6587
|
}
|
|
6565
6588
|
|
|
6566
|
-
var formkitVersion = '
|
|
6589
|
+
var formkitVersion = '202602112105';
|
|
6567
6590
|
|
|
6568
6591
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6569
6592
|
// See LICENSE in the project root for license information.
|
|
@@ -6765,6 +6788,7 @@ class AuroInput extends BaseInput {
|
|
|
6765
6788
|
/**
|
|
6766
6789
|
* Common display value wrapper classes.
|
|
6767
6790
|
* @private
|
|
6791
|
+
* @returns {Record<string, boolean>}
|
|
6768
6792
|
*/
|
|
6769
6793
|
get commonDisplayValueWrapperClasses() {
|
|
6770
6794
|
return {
|
|
@@ -5338,6 +5338,7 @@ class BaseInput extends AuroElement {
|
|
|
5338
5338
|
|
|
5339
5339
|
/**
|
|
5340
5340
|
* The maximum number of characters the user can enter into the text input. This must be an integer value `0` or higher.
|
|
5341
|
+
* **Note**: This attribute is not intended to be used with a `type` or `format` that already has a defined length, such as credit-cards, dates or phone numbers.
|
|
5341
5342
|
*/
|
|
5342
5343
|
maxLength: {
|
|
5343
5344
|
type: Number,
|
|
@@ -5863,6 +5864,11 @@ class BaseInput extends AuroElement {
|
|
|
5863
5864
|
* @returns {void}
|
|
5864
5865
|
*/
|
|
5865
5866
|
handleInput(event) {
|
|
5867
|
+
// Process credit card type detection and formatting during input
|
|
5868
|
+
if (this.type === 'credit-card') {
|
|
5869
|
+
this.processCreditCard();
|
|
5870
|
+
}
|
|
5871
|
+
|
|
5866
5872
|
// Sets value property to value of element value (el.value).
|
|
5867
5873
|
this.value = this.inputElement.value;
|
|
5868
5874
|
|
|
@@ -5942,6 +5948,20 @@ class BaseInput extends AuroElement {
|
|
|
5942
5948
|
return activeEl;
|
|
5943
5949
|
}
|
|
5944
5950
|
|
|
5951
|
+
/**
|
|
5952
|
+
* Sets the active descendant element for accessibility.
|
|
5953
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
5954
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
5955
|
+
* @private
|
|
5956
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
5957
|
+
* @returns {void}
|
|
5958
|
+
*/
|
|
5959
|
+
setActiveDescendant(element) {
|
|
5960
|
+
if (this.inputElement) {
|
|
5961
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
|
|
5945
5965
|
/**
|
|
5946
5966
|
* Validates value.
|
|
5947
5967
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -5980,6 +6000,7 @@ class BaseInput extends AuroElement {
|
|
|
5980
6000
|
|
|
5981
6001
|
if (this.type in defaultLengths) {
|
|
5982
6002
|
this.lengthForType = this.format ? this.format.length : defaultLengths[this.type];
|
|
6003
|
+
this.maxLength = this.lengthForType;
|
|
5983
6004
|
this.inputmode = this.inputmode || 'numeric';
|
|
5984
6005
|
} else if (this.type === 'number') {
|
|
5985
6006
|
this.inputmode = this.inputmode || 'numeric';
|
|
@@ -6090,6 +6111,7 @@ class BaseInput extends AuroElement {
|
|
|
6090
6111
|
*/
|
|
6091
6112
|
processCreditCard() {
|
|
6092
6113
|
const creditCard = this.matchInputValueToCreditCard();
|
|
6114
|
+
const previousFormat = this.format;
|
|
6093
6115
|
|
|
6094
6116
|
this.format = creditCard.maskFormat;
|
|
6095
6117
|
|
|
@@ -6102,7 +6124,8 @@ class BaseInput extends AuroElement {
|
|
|
6102
6124
|
this.inputIconName = creditCard.cardIcon;
|
|
6103
6125
|
}
|
|
6104
6126
|
|
|
6105
|
-
if
|
|
6127
|
+
// Only reconfigure the mask if the format has changed
|
|
6128
|
+
if (this.inputElement && previousFormat !== this.format) {
|
|
6106
6129
|
this.configureAutoFormatting();
|
|
6107
6130
|
}
|
|
6108
6131
|
}
|
|
@@ -6563,7 +6586,7 @@ class AuroHelpText extends LitElement {
|
|
|
6563
6586
|
}
|
|
6564
6587
|
}
|
|
6565
6588
|
|
|
6566
|
-
var formkitVersion = '
|
|
6589
|
+
var formkitVersion = '202602112105';
|
|
6567
6590
|
|
|
6568
6591
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6569
6592
|
// See LICENSE in the project root for license information.
|
|
@@ -6765,6 +6788,7 @@ class AuroInput extends BaseInput {
|
|
|
6765
6788
|
/**
|
|
6766
6789
|
* Common display value wrapper classes.
|
|
6767
6790
|
* @private
|
|
6791
|
+
* @returns {Record<string, boolean>}
|
|
6768
6792
|
*/
|
|
6769
6793
|
get commonDisplayValueWrapperClasses() {
|
|
6770
6794
|
return {
|
|
@@ -1645,7 +1645,7 @@ class AuroHelpText extends i$2 {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
1648
|
-
var formkitVersion = '
|
|
1648
|
+
var formkitVersion = '202602112105';
|
|
1649
1649
|
|
|
1650
1650
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1651
1651
|
// See LICENSE in the project root for license information.
|
|
@@ -1620,7 +1620,7 @@ class AuroHelpText extends i$2 {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
|
|
1623
|
-
var formkitVersion = '
|
|
1623
|
+
var formkitVersion = '202602112105';
|
|
1624
1624
|
|
|
1625
1625
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1626
1626
|
// See LICENSE in the project root for license information.
|
|
@@ -1573,7 +1573,7 @@ class AuroHelpText extends LitElement {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
var formkitVersion = '
|
|
1576
|
+
var formkitVersion = '202602112105';
|
|
1577
1577
|
|
|
1578
1578
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1579
1579
|
// See LICENSE in the project root for license information.
|
|
@@ -1573,7 +1573,7 @@ class AuroHelpText extends LitElement {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
var formkitVersion = '
|
|
1576
|
+
var formkitVersion = '202602112105';
|
|
1577
1577
|
|
|
1578
1578
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1579
1579
|
// See LICENSE in the project root for license information.
|