@aurodesignsystem/auro-formkit 5.10.0 → 5.11.0
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/CHANGELOG.md +55 -15
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +6 -0
- package/components/bibtemplate/dist/index.js +12 -0
- package/components/bibtemplate/dist/registered.js +12 -0
- package/components/checkbox/demo/api.min.js +3 -3
- package/components/checkbox/demo/index.min.js +3 -3
- package/components/checkbox/dist/index.js +3 -3
- package/components/checkbox/dist/registered.js +3 -3
- package/components/combobox/demo/api.min.js +1140 -305
- package/components/combobox/demo/index.min.js +1140 -305
- package/components/combobox/dist/auro-combobox.d.ts +24 -1
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +6 -0
- package/components/combobox/dist/index.js +1082 -264
- package/components/combobox/dist/registered.js +1082 -264
- package/components/counter/demo/api.min.js +583 -172
- package/components/counter/demo/index.min.js +583 -172
- package/components/counter/dist/auro-counter.d.ts +8 -0
- package/components/counter/dist/buttonVersion.d.ts +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +583 -172
- package/components/counter/dist/registered.js +583 -172
- package/components/datepicker/demo/api.md +108 -85
- package/components/datepicker/demo/api.min.js +872 -257
- package/components/datepicker/demo/index.md +18 -12
- package/components/datepicker/demo/index.min.js +872 -257
- package/components/datepicker/dist/auro-calendar.d.ts +6 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +11 -1
- package/components/datepicker/dist/index.js +819 -208
- package/components/datepicker/dist/registered.js +819 -208
- package/components/dropdown/demo/api.md +15 -17
- package/components/dropdown/demo/api.min.js +537 -183
- package/components/dropdown/demo/index.min.js +537 -183
- package/components/dropdown/dist/auro-dropdown.d.ts +27 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +87 -0
- package/components/dropdown/dist/index.js +514 -160
- package/components/dropdown/dist/keyboardUtils.d.ts +18 -0
- package/components/dropdown/dist/registered.js +514 -160
- package/components/form/README.md +47 -2
- package/components/form/demo/api.js +2 -0
- package/components/form/demo/api.md +303 -30
- package/components/form/demo/api.min.js +69256 -62
- package/components/form/demo/index.html +0 -1
- package/components/form/demo/index.js +1 -0
- package/components/form/demo/index.md +1 -275
- package/components/form/demo/index.min.js +69255 -62
- package/components/form/demo/readme.md +47 -2
- package/components/form/demo/working.html +123 -32
- package/components/form/dist/auro-form.d.ts +98 -61
- package/components/form/dist/index.js +135 -51
- package/components/form/dist/registered.js +135 -51
- package/components/input/demo/api.md +1 -0
- package/components/input/demo/api.min.js +78 -24
- package/components/input/demo/index.min.js +78 -24
- package/components/input/dist/base-input.d.ts +34 -0
- package/components/input/dist/index.js +78 -24
- package/components/input/dist/registered.js +78 -24
- package/components/menu/demo/api.md +4 -10
- package/components/menu/demo/api.min.js +18 -5
- package/components/menu/demo/index.min.js +18 -5
- package/components/menu/dist/auro-menuoption.d.ts +0 -8
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +18 -5
- package/components/menu/dist/registered.js +18 -5
- package/components/radio/demo/api.min.js +3 -3
- package/components/radio/demo/index.min.js +3 -3
- package/components/radio/dist/index.js +3 -3
- package/components/radio/dist/registered.js +3 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +333 -78
- package/components/select/demo/api.min.js +945 -282
- package/components/select/demo/index.min.js +933 -282
- package/components/select/dist/auro-select.d.ts +26 -0
- package/components/select/dist/index.js +881 -247
- package/components/select/dist/registered.js +881 -247
- package/components/select/dist/selectKeyboardStrategy.d.ts +8 -0
- package/custom-elements.json +596 -89
- package/package.json +7 -5
|
@@ -4889,7 +4889,7 @@ class AuroFormValidation {
|
|
|
4889
4889
|
}
|
|
4890
4890
|
}
|
|
4891
4891
|
|
|
4892
|
-
if (!hasValue && elem.required && elem.touched) {
|
|
4892
|
+
if (!hasValue && elem.required && (force || elem.touched)) {
|
|
4893
4893
|
elem.validity = 'valueMissing';
|
|
4894
4894
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
4895
4895
|
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -4913,7 +4913,7 @@ class AuroFormValidation {
|
|
|
4913
4913
|
if (!isCombobox || isCombobox && !elem.persistInput) {
|
|
4914
4914
|
|
|
4915
4915
|
// run validation on all inputs since we're going to use them to set the validity of this component
|
|
4916
|
-
this.auroInputElements.forEach(input => input.validate());
|
|
4916
|
+
this.auroInputElements.forEach(input => input.validate(force));
|
|
4917
4917
|
|
|
4918
4918
|
// Reset element validity to the validity of the input
|
|
4919
4919
|
elem.validity = this.auroInputElements[0].validity;
|
|
@@ -5119,6 +5119,17 @@ class AuroElement extends i$3 {
|
|
|
5119
5119
|
*/
|
|
5120
5120
|
class BaseInput extends AuroElement {
|
|
5121
5121
|
|
|
5122
|
+
// Delegate focus to the native <input> inside the shadow root so that
|
|
5123
|
+
// showModal()'s dialog focusing steps reach the input element.
|
|
5124
|
+
// This keeps the mobile virtual keyboard open when the fullscreen dialog
|
|
5125
|
+
// opens, because the browser sees an input-to-input focus transfer.
|
|
5126
|
+
static get shadowRootOptions() {
|
|
5127
|
+
return {
|
|
5128
|
+
...AuroElement.shadowRootOptions,
|
|
5129
|
+
delegatesFocus: true,
|
|
5130
|
+
};
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5122
5133
|
constructor() {
|
|
5123
5134
|
super();
|
|
5124
5135
|
|
|
@@ -5136,6 +5147,7 @@ class BaseInput extends AuroElement {
|
|
|
5136
5147
|
this.icon = false;
|
|
5137
5148
|
this.disabled = false;
|
|
5138
5149
|
this.dvInputOnly = false;
|
|
5150
|
+
this.hideLabelVisually = false;
|
|
5139
5151
|
this.max = undefined;
|
|
5140
5152
|
this.maxLength = undefined;
|
|
5141
5153
|
this.min = undefined;
|
|
@@ -5243,6 +5255,15 @@ class BaseInput extends AuroElement {
|
|
|
5243
5255
|
reflect: true
|
|
5244
5256
|
},
|
|
5245
5257
|
|
|
5258
|
+
/**
|
|
5259
|
+
* The value for the aria-activedescendant attribute.
|
|
5260
|
+
* Points to the ID of the currently active/highlighted option in a listbox.
|
|
5261
|
+
*/
|
|
5262
|
+
a11yActivedescendant: {
|
|
5263
|
+
type: String,
|
|
5264
|
+
reflect: true
|
|
5265
|
+
},
|
|
5266
|
+
|
|
5246
5267
|
/**
|
|
5247
5268
|
* If set, the label will remain fixed in the active position.
|
|
5248
5269
|
*/
|
|
@@ -5349,6 +5370,16 @@ class BaseInput extends AuroElement {
|
|
|
5349
5370
|
attribute: false
|
|
5350
5371
|
},
|
|
5351
5372
|
|
|
5373
|
+
/**
|
|
5374
|
+
* If set, the label will be hidden visually but still accessible to assistive technologies.
|
|
5375
|
+
* @private
|
|
5376
|
+
*/
|
|
5377
|
+
hideLabelVisually: {
|
|
5378
|
+
type: Boolean,
|
|
5379
|
+
reflect: true
|
|
5380
|
+
},
|
|
5381
|
+
|
|
5382
|
+
|
|
5352
5383
|
/**
|
|
5353
5384
|
* If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
5354
5385
|
*/
|
|
@@ -5926,31 +5957,34 @@ class BaseInput extends AuroElement {
|
|
|
5926
5957
|
// Process credit card type detection and formatting during input
|
|
5927
5958
|
if (this.type === 'credit-card') {
|
|
5928
5959
|
this.processCreditCard();
|
|
5929
|
-
|
|
5960
|
+
this.touched = true;
|
|
5961
|
+
this.validation.validate(this);
|
|
5962
|
+
} else {
|
|
5930
5963
|
|
|
5931
|
-
|
|
5932
|
-
|
|
5964
|
+
// Sets value property to value of element value (el.value).
|
|
5965
|
+
this.value = this.inputElement.value;
|
|
5933
5966
|
|
|
5934
|
-
|
|
5935
|
-
|
|
5967
|
+
// Determine if the value change was programmatic, including autofill.
|
|
5968
|
+
const inputWasProgrammatic = !this.matches(":focus") || event.isProgrammatic;
|
|
5936
5969
|
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5970
|
+
// Validation on input or programmatic value change (including autofill).
|
|
5971
|
+
if (this.validateOnInput || inputWasProgrammatic) {
|
|
5972
|
+
this.touched = true;
|
|
5973
|
+
this.validation.validate(this);
|
|
5974
|
+
}
|
|
5942
5975
|
|
|
5943
|
-
|
|
5944
|
-
|
|
5976
|
+
// Prevents cursor jumping in Safari.
|
|
5977
|
+
const { selectionStart } = this.inputElement;
|
|
5945
5978
|
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5979
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
5980
|
+
this.updateComplete.then(() => {
|
|
5981
|
+
try {
|
|
5982
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
5983
|
+
} catch (error) { // eslint-disable-line
|
|
5984
|
+
// do nothing
|
|
5985
|
+
}
|
|
5986
|
+
});
|
|
5987
|
+
}
|
|
5954
5988
|
}
|
|
5955
5989
|
}
|
|
5956
5990
|
|
|
@@ -5983,6 +6017,11 @@ class BaseInput extends AuroElement {
|
|
|
5983
6017
|
this.inputElement.scrollLeft = 100;
|
|
5984
6018
|
|
|
5985
6019
|
if (!this.noValidate) {
|
|
6020
|
+
// For credit card inputs with mask, ensure value is synced from mask instance
|
|
6021
|
+
if (this.type === 'credit-card' && this.maskInstance) {
|
|
6022
|
+
this.value = this.maskInstance.value;
|
|
6023
|
+
}
|
|
6024
|
+
|
|
5986
6025
|
this.validation.validate(this);
|
|
5987
6026
|
}
|
|
5988
6027
|
}
|
|
@@ -6007,6 +6046,20 @@ class BaseInput extends AuroElement {
|
|
|
6007
6046
|
return activeEl;
|
|
6008
6047
|
}
|
|
6009
6048
|
|
|
6049
|
+
/**
|
|
6050
|
+
* Sets the active descendant element for accessibility.
|
|
6051
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
6052
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
6053
|
+
* @private
|
|
6054
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
6055
|
+
* @returns {void}
|
|
6056
|
+
*/
|
|
6057
|
+
setActiveDescendant(element) {
|
|
6058
|
+
if (this.inputElement) {
|
|
6059
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
6060
|
+
}
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6010
6063
|
/**
|
|
6011
6064
|
* Validates value.
|
|
6012
6065
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -6631,7 +6684,7 @@ class AuroHelpText extends i$3 {
|
|
|
6631
6684
|
}
|
|
6632
6685
|
}
|
|
6633
6686
|
|
|
6634
|
-
var formkitVersion = '
|
|
6687
|
+
var formkitVersion = '202603102257';
|
|
6635
6688
|
|
|
6636
6689
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6637
6690
|
// See LICENSE in the project root for license information.
|
|
@@ -6813,7 +6866,7 @@ class AuroInput extends BaseInput {
|
|
|
6813
6866
|
return {
|
|
6814
6867
|
'is-disabled': this.disabled,
|
|
6815
6868
|
'withValue': this.hasValue,
|
|
6816
|
-
'util_displayHiddenVisually': this.labelHidden,
|
|
6869
|
+
'util_displayHiddenVisually': this.labelHidden || this.hideLabelVisually,
|
|
6817
6870
|
[this.labelFontClass]: true,
|
|
6818
6871
|
};
|
|
6819
6872
|
}
|
|
@@ -6985,6 +7038,7 @@ class AuroInput extends BaseInput {
|
|
|
6985
7038
|
?activeLabel="${this.activeLabel}"
|
|
6986
7039
|
?disabled="${this.disabled}"
|
|
6987
7040
|
?required="${this.required}"
|
|
7041
|
+
aria-activedescendant=${o(this.a11yActivedescendant)}
|
|
6988
7042
|
aria-controls=${o(this.a11yControls)}
|
|
6989
7043
|
aria-describedby="${this.uniqueId}"
|
|
6990
7044
|
aria-expanded=${o(this.a11yExpanded)}
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
5
5
|
*/
|
|
6
6
|
export default class BaseInput extends AuroElement {
|
|
7
|
+
static get shadowRootOptions(): {
|
|
8
|
+
delegatesFocus: boolean;
|
|
9
|
+
clonable?: boolean;
|
|
10
|
+
customElementRegistry?: CustomElementRegistry;
|
|
11
|
+
mode: ShadowRootMode;
|
|
12
|
+
serializable?: boolean;
|
|
13
|
+
slotAssignment?: SlotAssignmentMode;
|
|
14
|
+
};
|
|
7
15
|
static get properties(): {
|
|
8
16
|
/**
|
|
9
17
|
* The value for the role attribute.
|
|
@@ -26,6 +34,14 @@ export default class BaseInput extends AuroElement {
|
|
|
26
34
|
type: BooleanConstructor;
|
|
27
35
|
reflect: boolean;
|
|
28
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* The value for the aria-activedescendant attribute.
|
|
39
|
+
* Points to the ID of the currently active/highlighted option in a listbox.
|
|
40
|
+
*/
|
|
41
|
+
a11yActivedescendant: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
reflect: boolean;
|
|
44
|
+
};
|
|
29
45
|
/**
|
|
30
46
|
* If set, the label will remain fixed in the active position.
|
|
31
47
|
*/
|
|
@@ -116,6 +132,14 @@ export default class BaseInput extends AuroElement {
|
|
|
116
132
|
reflect: boolean;
|
|
117
133
|
attribute: boolean;
|
|
118
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* If set, the label will be hidden visually but still accessible to assistive technologies.
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
hideLabelVisually: {
|
|
140
|
+
type: BooleanConstructor;
|
|
141
|
+
reflect: boolean;
|
|
142
|
+
};
|
|
119
143
|
/**
|
|
120
144
|
* If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
121
145
|
*/
|
|
@@ -359,6 +383,7 @@ export default class BaseInput extends AuroElement {
|
|
|
359
383
|
icon: boolean;
|
|
360
384
|
disabled: boolean;
|
|
361
385
|
dvInputOnly: boolean;
|
|
386
|
+
hideLabelVisually: boolean;
|
|
362
387
|
max: any;
|
|
363
388
|
maxLength: any;
|
|
364
389
|
min: any;
|
|
@@ -516,6 +541,15 @@ export default class BaseInput extends AuroElement {
|
|
|
516
541
|
* @returns {Object}
|
|
517
542
|
*/
|
|
518
543
|
private getActiveElement;
|
|
544
|
+
/**
|
|
545
|
+
* Sets the active descendant element for accessibility.
|
|
546
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
547
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
548
|
+
* @private
|
|
549
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
550
|
+
* @returns {void}
|
|
551
|
+
*/
|
|
552
|
+
private setActiveDescendant;
|
|
519
553
|
/**
|
|
520
554
|
* Validates value.
|
|
521
555
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -4830,7 +4830,7 @@ class AuroFormValidation {
|
|
|
4830
4830
|
}
|
|
4831
4831
|
}
|
|
4832
4832
|
|
|
4833
|
-
if (!hasValue && elem.required && elem.touched) {
|
|
4833
|
+
if (!hasValue && elem.required && (force || elem.touched)) {
|
|
4834
4834
|
elem.validity = 'valueMissing';
|
|
4835
4835
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
4836
4836
|
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -4854,7 +4854,7 @@ class AuroFormValidation {
|
|
|
4854
4854
|
if (!isCombobox || isCombobox && !elem.persistInput) {
|
|
4855
4855
|
|
|
4856
4856
|
// run validation on all inputs since we're going to use them to set the validity of this component
|
|
4857
|
-
this.auroInputElements.forEach(input => input.validate());
|
|
4857
|
+
this.auroInputElements.forEach(input => input.validate(force));
|
|
4858
4858
|
|
|
4859
4859
|
// Reset element validity to the validity of the input
|
|
4860
4860
|
elem.validity = this.auroInputElements[0].validity;
|
|
@@ -5060,6 +5060,17 @@ class AuroElement extends LitElement {
|
|
|
5060
5060
|
*/
|
|
5061
5061
|
class BaseInput extends AuroElement {
|
|
5062
5062
|
|
|
5063
|
+
// Delegate focus to the native <input> inside the shadow root so that
|
|
5064
|
+
// showModal()'s dialog focusing steps reach the input element.
|
|
5065
|
+
// This keeps the mobile virtual keyboard open when the fullscreen dialog
|
|
5066
|
+
// opens, because the browser sees an input-to-input focus transfer.
|
|
5067
|
+
static get shadowRootOptions() {
|
|
5068
|
+
return {
|
|
5069
|
+
...AuroElement.shadowRootOptions,
|
|
5070
|
+
delegatesFocus: true,
|
|
5071
|
+
};
|
|
5072
|
+
}
|
|
5073
|
+
|
|
5063
5074
|
constructor() {
|
|
5064
5075
|
super();
|
|
5065
5076
|
|
|
@@ -5077,6 +5088,7 @@ class BaseInput extends AuroElement {
|
|
|
5077
5088
|
this.icon = false;
|
|
5078
5089
|
this.disabled = false;
|
|
5079
5090
|
this.dvInputOnly = false;
|
|
5091
|
+
this.hideLabelVisually = false;
|
|
5080
5092
|
this.max = undefined;
|
|
5081
5093
|
this.maxLength = undefined;
|
|
5082
5094
|
this.min = undefined;
|
|
@@ -5184,6 +5196,15 @@ class BaseInput extends AuroElement {
|
|
|
5184
5196
|
reflect: true
|
|
5185
5197
|
},
|
|
5186
5198
|
|
|
5199
|
+
/**
|
|
5200
|
+
* The value for the aria-activedescendant attribute.
|
|
5201
|
+
* Points to the ID of the currently active/highlighted option in a listbox.
|
|
5202
|
+
*/
|
|
5203
|
+
a11yActivedescendant: {
|
|
5204
|
+
type: String,
|
|
5205
|
+
reflect: true
|
|
5206
|
+
},
|
|
5207
|
+
|
|
5187
5208
|
/**
|
|
5188
5209
|
* If set, the label will remain fixed in the active position.
|
|
5189
5210
|
*/
|
|
@@ -5290,6 +5311,16 @@ class BaseInput extends AuroElement {
|
|
|
5290
5311
|
attribute: false
|
|
5291
5312
|
},
|
|
5292
5313
|
|
|
5314
|
+
/**
|
|
5315
|
+
* If set, the label will be hidden visually but still accessible to assistive technologies.
|
|
5316
|
+
* @private
|
|
5317
|
+
*/
|
|
5318
|
+
hideLabelVisually: {
|
|
5319
|
+
type: Boolean,
|
|
5320
|
+
reflect: true
|
|
5321
|
+
},
|
|
5322
|
+
|
|
5323
|
+
|
|
5293
5324
|
/**
|
|
5294
5325
|
* If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
5295
5326
|
*/
|
|
@@ -5867,31 +5898,34 @@ class BaseInput extends AuroElement {
|
|
|
5867
5898
|
// Process credit card type detection and formatting during input
|
|
5868
5899
|
if (this.type === 'credit-card') {
|
|
5869
5900
|
this.processCreditCard();
|
|
5870
|
-
|
|
5901
|
+
this.touched = true;
|
|
5902
|
+
this.validation.validate(this);
|
|
5903
|
+
} else {
|
|
5871
5904
|
|
|
5872
|
-
|
|
5873
|
-
|
|
5905
|
+
// Sets value property to value of element value (el.value).
|
|
5906
|
+
this.value = this.inputElement.value;
|
|
5874
5907
|
|
|
5875
|
-
|
|
5876
|
-
|
|
5908
|
+
// Determine if the value change was programmatic, including autofill.
|
|
5909
|
+
const inputWasProgrammatic = !this.matches(":focus") || event.isProgrammatic;
|
|
5877
5910
|
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5911
|
+
// Validation on input or programmatic value change (including autofill).
|
|
5912
|
+
if (this.validateOnInput || inputWasProgrammatic) {
|
|
5913
|
+
this.touched = true;
|
|
5914
|
+
this.validation.validate(this);
|
|
5915
|
+
}
|
|
5883
5916
|
|
|
5884
|
-
|
|
5885
|
-
|
|
5917
|
+
// Prevents cursor jumping in Safari.
|
|
5918
|
+
const { selectionStart } = this.inputElement;
|
|
5886
5919
|
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5920
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
5921
|
+
this.updateComplete.then(() => {
|
|
5922
|
+
try {
|
|
5923
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
5924
|
+
} catch (error) { // eslint-disable-line
|
|
5925
|
+
// do nothing
|
|
5926
|
+
}
|
|
5927
|
+
});
|
|
5928
|
+
}
|
|
5895
5929
|
}
|
|
5896
5930
|
}
|
|
5897
5931
|
|
|
@@ -5924,6 +5958,11 @@ class BaseInput extends AuroElement {
|
|
|
5924
5958
|
this.inputElement.scrollLeft = 100;
|
|
5925
5959
|
|
|
5926
5960
|
if (!this.noValidate) {
|
|
5961
|
+
// For credit card inputs with mask, ensure value is synced from mask instance
|
|
5962
|
+
if (this.type === 'credit-card' && this.maskInstance) {
|
|
5963
|
+
this.value = this.maskInstance.value;
|
|
5964
|
+
}
|
|
5965
|
+
|
|
5927
5966
|
this.validation.validate(this);
|
|
5928
5967
|
}
|
|
5929
5968
|
}
|
|
@@ -5948,6 +5987,20 @@ class BaseInput extends AuroElement {
|
|
|
5948
5987
|
return activeEl;
|
|
5949
5988
|
}
|
|
5950
5989
|
|
|
5990
|
+
/**
|
|
5991
|
+
* Sets the active descendant element for accessibility.
|
|
5992
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
5993
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
5994
|
+
* @private
|
|
5995
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
5996
|
+
* @returns {void}
|
|
5997
|
+
*/
|
|
5998
|
+
setActiveDescendant(element) {
|
|
5999
|
+
if (this.inputElement) {
|
|
6000
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
|
|
5951
6004
|
/**
|
|
5952
6005
|
* Validates value.
|
|
5953
6006
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -6572,7 +6625,7 @@ class AuroHelpText extends LitElement {
|
|
|
6572
6625
|
}
|
|
6573
6626
|
}
|
|
6574
6627
|
|
|
6575
|
-
var formkitVersion = '
|
|
6628
|
+
var formkitVersion = '202603102257';
|
|
6576
6629
|
|
|
6577
6630
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6578
6631
|
// See LICENSE in the project root for license information.
|
|
@@ -6754,7 +6807,7 @@ class AuroInput extends BaseInput {
|
|
|
6754
6807
|
return {
|
|
6755
6808
|
'is-disabled': this.disabled,
|
|
6756
6809
|
'withValue': this.hasValue,
|
|
6757
|
-
'util_displayHiddenVisually': this.labelHidden,
|
|
6810
|
+
'util_displayHiddenVisually': this.labelHidden || this.hideLabelVisually,
|
|
6758
6811
|
[this.labelFontClass]: true,
|
|
6759
6812
|
};
|
|
6760
6813
|
}
|
|
@@ -6926,6 +6979,7 @@ class AuroInput extends BaseInput {
|
|
|
6926
6979
|
?activeLabel="${this.activeLabel}"
|
|
6927
6980
|
?disabled="${this.disabled}"
|
|
6928
6981
|
?required="${this.required}"
|
|
6982
|
+
aria-activedescendant=${ifDefined(this.a11yActivedescendant)}
|
|
6929
6983
|
aria-controls=${ifDefined(this.a11yControls)}
|
|
6930
6984
|
aria-describedby="${this.uniqueId}"
|
|
6931
6985
|
aria-expanded=${ifDefined(this.a11yExpanded)}
|
|
@@ -4830,7 +4830,7 @@ class AuroFormValidation {
|
|
|
4830
4830
|
}
|
|
4831
4831
|
}
|
|
4832
4832
|
|
|
4833
|
-
if (!hasValue && elem.required && elem.touched) {
|
|
4833
|
+
if (!hasValue && elem.required && (force || elem.touched)) {
|
|
4834
4834
|
elem.validity = 'valueMissing';
|
|
4835
4835
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
4836
4836
|
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
@@ -4854,7 +4854,7 @@ class AuroFormValidation {
|
|
|
4854
4854
|
if (!isCombobox || isCombobox && !elem.persistInput) {
|
|
4855
4855
|
|
|
4856
4856
|
// run validation on all inputs since we're going to use them to set the validity of this component
|
|
4857
|
-
this.auroInputElements.forEach(input => input.validate());
|
|
4857
|
+
this.auroInputElements.forEach(input => input.validate(force));
|
|
4858
4858
|
|
|
4859
4859
|
// Reset element validity to the validity of the input
|
|
4860
4860
|
elem.validity = this.auroInputElements[0].validity;
|
|
@@ -5060,6 +5060,17 @@ class AuroElement extends LitElement {
|
|
|
5060
5060
|
*/
|
|
5061
5061
|
class BaseInput extends AuroElement {
|
|
5062
5062
|
|
|
5063
|
+
// Delegate focus to the native <input> inside the shadow root so that
|
|
5064
|
+
// showModal()'s dialog focusing steps reach the input element.
|
|
5065
|
+
// This keeps the mobile virtual keyboard open when the fullscreen dialog
|
|
5066
|
+
// opens, because the browser sees an input-to-input focus transfer.
|
|
5067
|
+
static get shadowRootOptions() {
|
|
5068
|
+
return {
|
|
5069
|
+
...AuroElement.shadowRootOptions,
|
|
5070
|
+
delegatesFocus: true,
|
|
5071
|
+
};
|
|
5072
|
+
}
|
|
5073
|
+
|
|
5063
5074
|
constructor() {
|
|
5064
5075
|
super();
|
|
5065
5076
|
|
|
@@ -5077,6 +5088,7 @@ class BaseInput extends AuroElement {
|
|
|
5077
5088
|
this.icon = false;
|
|
5078
5089
|
this.disabled = false;
|
|
5079
5090
|
this.dvInputOnly = false;
|
|
5091
|
+
this.hideLabelVisually = false;
|
|
5080
5092
|
this.max = undefined;
|
|
5081
5093
|
this.maxLength = undefined;
|
|
5082
5094
|
this.min = undefined;
|
|
@@ -5184,6 +5196,15 @@ class BaseInput extends AuroElement {
|
|
|
5184
5196
|
reflect: true
|
|
5185
5197
|
},
|
|
5186
5198
|
|
|
5199
|
+
/**
|
|
5200
|
+
* The value for the aria-activedescendant attribute.
|
|
5201
|
+
* Points to the ID of the currently active/highlighted option in a listbox.
|
|
5202
|
+
*/
|
|
5203
|
+
a11yActivedescendant: {
|
|
5204
|
+
type: String,
|
|
5205
|
+
reflect: true
|
|
5206
|
+
},
|
|
5207
|
+
|
|
5187
5208
|
/**
|
|
5188
5209
|
* If set, the label will remain fixed in the active position.
|
|
5189
5210
|
*/
|
|
@@ -5290,6 +5311,16 @@ class BaseInput extends AuroElement {
|
|
|
5290
5311
|
attribute: false
|
|
5291
5312
|
},
|
|
5292
5313
|
|
|
5314
|
+
/**
|
|
5315
|
+
* If set, the label will be hidden visually but still accessible to assistive technologies.
|
|
5316
|
+
* @private
|
|
5317
|
+
*/
|
|
5318
|
+
hideLabelVisually: {
|
|
5319
|
+
type: Boolean,
|
|
5320
|
+
reflect: true
|
|
5321
|
+
},
|
|
5322
|
+
|
|
5323
|
+
|
|
5293
5324
|
/**
|
|
5294
5325
|
* If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
5295
5326
|
*/
|
|
@@ -5867,31 +5898,34 @@ class BaseInput extends AuroElement {
|
|
|
5867
5898
|
// Process credit card type detection and formatting during input
|
|
5868
5899
|
if (this.type === 'credit-card') {
|
|
5869
5900
|
this.processCreditCard();
|
|
5870
|
-
|
|
5901
|
+
this.touched = true;
|
|
5902
|
+
this.validation.validate(this);
|
|
5903
|
+
} else {
|
|
5871
5904
|
|
|
5872
|
-
|
|
5873
|
-
|
|
5905
|
+
// Sets value property to value of element value (el.value).
|
|
5906
|
+
this.value = this.inputElement.value;
|
|
5874
5907
|
|
|
5875
|
-
|
|
5876
|
-
|
|
5908
|
+
// Determine if the value change was programmatic, including autofill.
|
|
5909
|
+
const inputWasProgrammatic = !this.matches(":focus") || event.isProgrammatic;
|
|
5877
5910
|
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5911
|
+
// Validation on input or programmatic value change (including autofill).
|
|
5912
|
+
if (this.validateOnInput || inputWasProgrammatic) {
|
|
5913
|
+
this.touched = true;
|
|
5914
|
+
this.validation.validate(this);
|
|
5915
|
+
}
|
|
5883
5916
|
|
|
5884
|
-
|
|
5885
|
-
|
|
5917
|
+
// Prevents cursor jumping in Safari.
|
|
5918
|
+
const { selectionStart } = this.inputElement;
|
|
5886
5919
|
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5920
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
5921
|
+
this.updateComplete.then(() => {
|
|
5922
|
+
try {
|
|
5923
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
5924
|
+
} catch (error) { // eslint-disable-line
|
|
5925
|
+
// do nothing
|
|
5926
|
+
}
|
|
5927
|
+
});
|
|
5928
|
+
}
|
|
5895
5929
|
}
|
|
5896
5930
|
}
|
|
5897
5931
|
|
|
@@ -5924,6 +5958,11 @@ class BaseInput extends AuroElement {
|
|
|
5924
5958
|
this.inputElement.scrollLeft = 100;
|
|
5925
5959
|
|
|
5926
5960
|
if (!this.noValidate) {
|
|
5961
|
+
// For credit card inputs with mask, ensure value is synced from mask instance
|
|
5962
|
+
if (this.type === 'credit-card' && this.maskInstance) {
|
|
5963
|
+
this.value = this.maskInstance.value;
|
|
5964
|
+
}
|
|
5965
|
+
|
|
5927
5966
|
this.validation.validate(this);
|
|
5928
5967
|
}
|
|
5929
5968
|
}
|
|
@@ -5948,6 +5987,20 @@ class BaseInput extends AuroElement {
|
|
|
5948
5987
|
return activeEl;
|
|
5949
5988
|
}
|
|
5950
5989
|
|
|
5990
|
+
/**
|
|
5991
|
+
* Sets the active descendant element for accessibility.
|
|
5992
|
+
* Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
|
|
5993
|
+
* This function is used in components that contain `auro-input` to set the active descendant.
|
|
5994
|
+
* @private
|
|
5995
|
+
* @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
|
|
5996
|
+
* @returns {void}
|
|
5997
|
+
*/
|
|
5998
|
+
setActiveDescendant(element) {
|
|
5999
|
+
if (this.inputElement) {
|
|
6000
|
+
this.inputElement.ariaActiveDescendantElement = element;
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
|
|
5951
6004
|
/**
|
|
5952
6005
|
* Validates value.
|
|
5953
6006
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -6572,7 +6625,7 @@ class AuroHelpText extends LitElement {
|
|
|
6572
6625
|
}
|
|
6573
6626
|
}
|
|
6574
6627
|
|
|
6575
|
-
var formkitVersion = '
|
|
6628
|
+
var formkitVersion = '202603102257';
|
|
6576
6629
|
|
|
6577
6630
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6578
6631
|
// See LICENSE in the project root for license information.
|
|
@@ -6754,7 +6807,7 @@ class AuroInput extends BaseInput {
|
|
|
6754
6807
|
return {
|
|
6755
6808
|
'is-disabled': this.disabled,
|
|
6756
6809
|
'withValue': this.hasValue,
|
|
6757
|
-
'util_displayHiddenVisually': this.labelHidden,
|
|
6810
|
+
'util_displayHiddenVisually': this.labelHidden || this.hideLabelVisually,
|
|
6758
6811
|
[this.labelFontClass]: true,
|
|
6759
6812
|
};
|
|
6760
6813
|
}
|
|
@@ -6926,6 +6979,7 @@ class AuroInput extends BaseInput {
|
|
|
6926
6979
|
?activeLabel="${this.activeLabel}"
|
|
6927
6980
|
?disabled="${this.disabled}"
|
|
6928
6981
|
?required="${this.required}"
|
|
6982
|
+
aria-activedescendant=${ifDefined(this.a11yActivedescendant)}
|
|
6929
6983
|
aria-controls=${ifDefined(this.a11yControls)}
|
|
6930
6984
|
aria-describedby="${this.uniqueId}"
|
|
6931
6985
|
aria-expanded=${ifDefined(this.a11yExpanded)}
|
|
@@ -84,16 +84,10 @@ The `auro-menuoption` element provides users a way to define a menu option.
|
|
|
84
84
|
|
|
85
85
|
## Events
|
|
86
86
|
|
|
87
|
-
| Event | Type |
|
|
88
|
-
|
|
89
|
-
| `auroMenuOption-click` | `CustomEvent<this>` |
|
|
90
|
-
| `auroMenuOption-mouseover` | `CustomEvent<this>` |
|
|
91
|
-
|
|
92
|
-
## Slots
|
|
93
|
-
|
|
94
|
-
| Name | Description |
|
|
95
|
-
|-----------|--------------------------------------------|
|
|
96
|
-
| [default](#default) | The default slot for the menu option text. |
|
|
87
|
+
| Event | Type |
|
|
88
|
+
|----------------------------|---------------------|
|
|
89
|
+
| `auroMenuOption-click` | `CustomEvent<this>` |
|
|
90
|
+
| `auroMenuOption-mouseover` | `CustomEvent<this>` |
|
|
97
91
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
98
92
|
|
|
99
93
|
## Basic
|