@aurodesignsystem-dev/auro-formkit 0.0.0-pr1515.0 → 0.0.0-pr1515.2
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 +119 -96
- package/components/combobox/demo/getting-started.min.js +119 -96
- package/components/combobox/demo/index.min.js +119 -96
- package/components/combobox/dist/index.js +118 -95
- package/components/combobox/dist/registered.js +118 -95
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/customize.min.js +139 -97
- package/components/datepicker/demo/index.min.js +139 -97
- package/components/datepicker/dist/index.js +139 -97
- package/components/datepicker/dist/registered.js +139 -97
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +1 -1
- 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 +381 -293
- package/components/form/demo/getting-started.min.js +381 -293
- package/components/form/demo/index.min.js +381 -293
- package/components/form/demo/registerDemoDeps.min.js +381 -293
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.md +8 -8
- package/components/input/demo/customize.min.js +116 -93
- package/components/input/demo/getting-started.min.js +116 -93
- package/components/input/demo/index.min.js +116 -93
- package/components/input/dist/base-input.d.ts +33 -44
- package/components/input/dist/index.js +129 -94
- package/components/input/dist/registered.js +116 -93
- 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/customize.md +1 -1
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1944 -1734
- package/package.json +1 -1
- package/components/select/demo/customize.min.js +0 -10170
- package/components/select/demo/demo-support.min.js +0 -55807
- package/components/select/demo/getting-started.min.js +0 -10214
|
@@ -4888,7 +4888,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4888
4888
|
}
|
|
4889
4889
|
};
|
|
4890
4890
|
|
|
4891
|
-
var formkitVersion$2 = '
|
|
4891
|
+
var formkitVersion$2 = '202606291813';
|
|
4892
4892
|
|
|
4893
4893
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4894
4894
|
static get properties() {
|
|
@@ -16614,6 +16614,13 @@ class AuroInputUtilities {
|
|
|
16614
16614
|
* @returns {string | undefined}
|
|
16615
16615
|
*/
|
|
16616
16616
|
toFormattedValue(valueObject, format) {
|
|
16617
|
+
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
16618
|
+
// `format` argument has to fail gracefully rather than throw on
|
|
16619
|
+
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
16620
|
+
// as "no format → no display value".
|
|
16621
|
+
if (!format) {
|
|
16622
|
+
return undefined;
|
|
16623
|
+
}
|
|
16617
16624
|
const normalizedFormat = format.toLowerCase();
|
|
16618
16625
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
16619
16626
|
|
|
@@ -16764,79 +16771,18 @@ class BaseInput extends AuroElement$1 {
|
|
|
16764
16771
|
constructor() {
|
|
16765
16772
|
super();
|
|
16766
16773
|
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16775
|
-
|
|
16776
|
-
|
|
16777
|
-
this.required = false;
|
|
16778
|
-
this.onDark = false;
|
|
16779
|
-
this.setCustomValidityForType = undefined;
|
|
16780
|
-
this.size = 'lg';
|
|
16781
|
-
this.shape = 'classic';
|
|
16782
|
-
this.value = undefined;
|
|
16783
|
-
this._valueObject = undefined;
|
|
16784
|
-
|
|
16785
|
-
this._initializePrivateDefaults();
|
|
16786
|
-
}
|
|
16787
|
-
|
|
16788
|
-
/**
|
|
16789
|
-
* Internal Defaults.
|
|
16790
|
-
* @private
|
|
16791
|
-
* @returns {void}
|
|
16792
|
-
*/
|
|
16793
|
-
_initializePrivateDefaults() {
|
|
16774
|
+
// Single-source initialization. Alphabetized so duplicate or stale
|
|
16775
|
+
// defaults are immediately obvious on a diff. Every field is assigned
|
|
16776
|
+
// exactly once here (previously the constructor + the old
|
|
16777
|
+
// `_initializePrivateDefaults` overlapped — both wrote ~14 of the same
|
|
16778
|
+
// fields and double-allocated `util` and `validation`, discarding the
|
|
16779
|
+
// first instance). `validation` is now allocated exactly once; `util`
|
|
16780
|
+
// is seeded here with an en-US default and then rebuilt in
|
|
16781
|
+
// `connectedCallback` once the consumer-resolved locale is available,
|
|
16782
|
+
// so a parent (datepicker/combobox) calling `validate()` synchronously
|
|
16783
|
+
// during its own update cycle sees a populated util instance.
|
|
16794
16784
|
this.activeLabel = false;
|
|
16795
|
-
|
|
16796
|
-
this.icon = false;
|
|
16797
|
-
this.disabled = false;
|
|
16798
|
-
this.dvInputOnly = false;
|
|
16799
|
-
this.hideLabelVisually = false;
|
|
16800
|
-
this.max = undefined;
|
|
16801
|
-
this.maxLength = undefined;
|
|
16802
|
-
this.min = undefined;
|
|
16803
|
-
this.minLength = undefined;
|
|
16804
|
-
this.noValidate = false;
|
|
16805
|
-
this.onDark = false;
|
|
16806
|
-
this.required = false;
|
|
16807
|
-
this.setCustomValidityForType = undefined;
|
|
16808
|
-
|
|
16809
|
-
// Used for storing raw values returned from input mask.
|
|
16810
|
-
this._rawMaskValue = undefined;
|
|
16811
|
-
|
|
16812
|
-
/**
|
|
16813
|
-
* @private
|
|
16814
|
-
*/
|
|
16815
|
-
this.layout = 'classic';
|
|
16816
|
-
|
|
16817
|
-
/**
|
|
16818
|
-
* @private
|
|
16819
|
-
*/
|
|
16820
|
-
this.shape = 'classic';
|
|
16821
|
-
|
|
16822
|
-
/**
|
|
16823
|
-
* @private
|
|
16824
|
-
*/
|
|
16825
|
-
this.size = 'lg';
|
|
16826
|
-
|
|
16827
|
-
this.touched = false;
|
|
16828
|
-
this.util = new AuroInputUtilities({
|
|
16829
|
-
locale: "en-US",
|
|
16830
|
-
format: this.format
|
|
16831
|
-
});
|
|
16832
|
-
this.validation = new AuroFormValidation();
|
|
16833
|
-
this.inputIconName = undefined;
|
|
16834
|
-
this.showPassword = false;
|
|
16835
|
-
this.validationCCLength = undefined;
|
|
16836
|
-
this.hasValue = false;
|
|
16837
|
-
this.label = 'Input label is undefined';
|
|
16838
|
-
|
|
16839
|
-
|
|
16785
|
+
/** @private */
|
|
16840
16786
|
this.allowedInputTypes = [
|
|
16841
16787
|
"text",
|
|
16842
16788
|
"number",
|
|
@@ -16845,7 +16791,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
16845
16791
|
"credit-card",
|
|
16846
16792
|
"tel"
|
|
16847
16793
|
];
|
|
16848
|
-
this.
|
|
16794
|
+
this.appearance = "default";
|
|
16795
|
+
/** @private */
|
|
16849
16796
|
this.dateFormatMap = {
|
|
16850
16797
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
16851
16798
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -16862,27 +16809,57 @@ class BaseInput extends AuroElement$1 {
|
|
|
16862
16809
|
'dd/mm': 'dateDDMM',
|
|
16863
16810
|
'mm/dd': 'dateMMDD'
|
|
16864
16811
|
};
|
|
16812
|
+
this.disabled = false;
|
|
16813
|
+
/** @private */
|
|
16865
16814
|
this.domHandler = new DomHandler();
|
|
16866
16815
|
this.dvInputOnly = false;
|
|
16867
16816
|
this.hasValue = false;
|
|
16817
|
+
this.hideLabelVisually = false;
|
|
16818
|
+
this.icon = false;
|
|
16819
|
+
/** @private */
|
|
16868
16820
|
this.inputIconName = undefined;
|
|
16821
|
+
/** @private */
|
|
16869
16822
|
this.label = 'Input label is undefined';
|
|
16823
|
+
this.layout = 'classic';
|
|
16824
|
+
this.locale = 'en-US';
|
|
16825
|
+
this.max = undefined;
|
|
16826
|
+
this._maxObject = undefined;
|
|
16827
|
+
this.maxLength = undefined;
|
|
16828
|
+
this.min = undefined;
|
|
16829
|
+
this._minObject = undefined;
|
|
16830
|
+
this.minLength = undefined;
|
|
16870
16831
|
this.noValidate = false;
|
|
16871
|
-
this.
|
|
16832
|
+
this.onDark = false;
|
|
16833
|
+
// Raw values returned from the input mask before model normalization.
|
|
16834
|
+
this._rawMaskValue = undefined;
|
|
16835
|
+
this.required = false;
|
|
16836
|
+
this.setCustomValidityForType = undefined;
|
|
16837
|
+
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
16838
|
+
// itself, and listing it here caused cursor placement issues in Safari.
|
|
16839
|
+
/** @private */
|
|
16872
16840
|
this.setSelectionInputTypes = [
|
|
16873
16841
|
"text",
|
|
16874
16842
|
"password",
|
|
16875
16843
|
"email"
|
|
16876
|
-
];
|
|
16844
|
+
];
|
|
16845
|
+
this.shape = 'classic';
|
|
16846
|
+
/** @private */
|
|
16877
16847
|
this.showPassword = false;
|
|
16848
|
+
this.size = 'lg';
|
|
16878
16849
|
this.touched = false;
|
|
16850
|
+
/** @private */
|
|
16879
16851
|
this.uniqueId = new UniqueId().create();
|
|
16852
|
+
/** @private */
|
|
16880
16853
|
this.util = new AuroInputUtilities({
|
|
16881
16854
|
locale: this.locale,
|
|
16882
16855
|
format: this.format
|
|
16883
16856
|
});
|
|
16857
|
+
/** @private */
|
|
16884
16858
|
this.validation = new AuroFormValidation();
|
|
16859
|
+
/** @private */
|
|
16885
16860
|
this.validationCCLength = undefined;
|
|
16861
|
+
this.value = undefined;
|
|
16862
|
+
this._valueObject = undefined;
|
|
16886
16863
|
}
|
|
16887
16864
|
|
|
16888
16865
|
// function to define props used within the scope of this component
|
|
@@ -17430,6 +17407,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
17430
17407
|
|
|
17431
17408
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
17432
17409
|
|
|
17410
|
+
// Normalize the format token to lowercase so case-mixed values supplied
|
|
17411
|
+
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
17412
|
+
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
17413
|
+
// format silently misses the map and leaves `setCustomValidityForType`
|
|
17414
|
+
// unset.
|
|
17415
|
+
if (this.format) {
|
|
17416
|
+
this.format = this.format.toLowerCase();
|
|
17417
|
+
}
|
|
17418
|
+
|
|
17433
17419
|
// use validity message override if declared when initializing the component
|
|
17434
17420
|
if (this.hasAttribute('setCustomValidity')) {
|
|
17435
17421
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -17863,6 +17849,38 @@ class BaseInput extends AuroElement$1 {
|
|
|
17863
17849
|
this.touched = true;
|
|
17864
17850
|
this.validation.validate(this);
|
|
17865
17851
|
}
|
|
17852
|
+
|
|
17853
|
+
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
17854
|
+
// update that can re-render the input and reset the native cursor; we
|
|
17855
|
+
// capture the caret position before that update commits and restore it
|
|
17856
|
+
// via `setSelectionRange` once the update has flushed. Gated on
|
|
17857
|
+
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
17858
|
+
// formatter manages the cursor itself) doesn't get a competing write.
|
|
17859
|
+
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
17860
|
+
// on input types that don't support text selection (number, email in
|
|
17861
|
+
// some browsers) throws InvalidStateError, which would crash all input
|
|
17862
|
+
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
17863
|
+
// the gated types currently support it, since the list is a public
|
|
17864
|
+
// property a consumer could mutate.
|
|
17865
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
17866
|
+
let selectionStart;
|
|
17867
|
+
try {
|
|
17868
|
+
selectionStart = this.inputElement.selectionStart;
|
|
17869
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17870
|
+
return;
|
|
17871
|
+
}
|
|
17872
|
+
if (typeof selectionStart !== 'number') {
|
|
17873
|
+
return;
|
|
17874
|
+
}
|
|
17875
|
+
this.updateComplete.then(() => {
|
|
17876
|
+
try {
|
|
17877
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
17878
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17879
|
+
// Some input types (number/email in certain UAs) throw on
|
|
17880
|
+
// setSelectionRange; swallow and let the native cursor stand.
|
|
17881
|
+
}
|
|
17882
|
+
});
|
|
17883
|
+
}
|
|
17866
17884
|
}
|
|
17867
17885
|
|
|
17868
17886
|
/**
|
|
@@ -18489,7 +18507,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18489
18507
|
}
|
|
18490
18508
|
};
|
|
18491
18509
|
|
|
18492
|
-
var formkitVersion$1 = '
|
|
18510
|
+
var formkitVersion$1 = '202606291813';
|
|
18493
18511
|
|
|
18494
18512
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18495
18513
|
// See LICENSE in the project root for license information.
|
|
@@ -18992,6 +19010,7 @@ class AuroInput extends BaseInput {
|
|
|
18992
19010
|
<${this.buttonTag}
|
|
18993
19011
|
@click="${this.handleClickShowPassword}"
|
|
18994
19012
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19013
|
+
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
18995
19014
|
class="notificationBtn passwordBtn"
|
|
18996
19015
|
shape="circle"
|
|
18997
19016
|
size="sm"
|
|
@@ -19065,25 +19084,29 @@ class AuroInput extends BaseInput {
|
|
|
19065
19084
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
19066
19085
|
*/
|
|
19067
19086
|
renderHtmlHelpText() {
|
|
19087
|
+
// Single `<p>` with stable identity across validity transitions —
|
|
19088
|
+
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
19089
|
+
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
19090
|
+
// re-announce because the live-region element it was watching had been
|
|
19091
|
+
// removed and a new one inserted. Keeping one node means the `role`,
|
|
19092
|
+
// `aria-live`, and text content all change in-place, which AT does
|
|
19093
|
+
// observe and announce.
|
|
19094
|
+
const isError = this.validity && this.validity !== 'valid';
|
|
19068
19095
|
return u$7`
|
|
19069
|
-
|
|
19070
|
-
?
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
</p>
|
|
19084
|
-
</${this.helpTextTag}>
|
|
19085
|
-
`
|
|
19086
|
-
}
|
|
19096
|
+
<${this.helpTextTag}
|
|
19097
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19098
|
+
?error=${isError}>
|
|
19099
|
+
<p
|
|
19100
|
+
id="${this.uniqueId}"
|
|
19101
|
+
part="helpText"
|
|
19102
|
+
role="${o(isError ? 'alert' : undefined)}"
|
|
19103
|
+
aria-live="${o(isError ? 'assertive' : undefined)}">
|
|
19104
|
+
${isError
|
|
19105
|
+
? this.errorMessage
|
|
19106
|
+
: u$7`<slot name="helpText">${this.getHelpText()}</slot>`
|
|
19107
|
+
}
|
|
19108
|
+
</p>
|
|
19109
|
+
</${this.helpTextTag}>
|
|
19087
19110
|
`;
|
|
19088
19111
|
}
|
|
19089
19112
|
|
|
@@ -19610,7 +19633,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19610
19633
|
}
|
|
19611
19634
|
}
|
|
19612
19635
|
|
|
19613
|
-
var formkitVersion = '
|
|
19636
|
+
var formkitVersion = '202606291813';
|
|
19614
19637
|
|
|
19615
19638
|
var styleCss$3 = i$6`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
19616
19639
|
|
|
@@ -4806,7 +4806,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
4806
4806
|
}
|
|
4807
4807
|
};
|
|
4808
4808
|
|
|
4809
|
-
var formkitVersion$2 = '
|
|
4809
|
+
var formkitVersion$2 = '202606291813';
|
|
4810
4810
|
|
|
4811
4811
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
4812
4812
|
static get properties() {
|
|
@@ -16525,6 +16525,13 @@ class AuroInputUtilities {
|
|
|
16525
16525
|
* @returns {string | undefined}
|
|
16526
16526
|
*/
|
|
16527
16527
|
toFormattedValue(valueObject, format) {
|
|
16528
|
+
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
16529
|
+
// `format` argument has to fail gracefully rather than throw on
|
|
16530
|
+
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
16531
|
+
// as "no format → no display value".
|
|
16532
|
+
if (!format) {
|
|
16533
|
+
return undefined;
|
|
16534
|
+
}
|
|
16528
16535
|
const normalizedFormat = format.toLowerCase();
|
|
16529
16536
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
16530
16537
|
|
|
@@ -16675,79 +16682,18 @@ class BaseInput extends AuroElement$1 {
|
|
|
16675
16682
|
constructor() {
|
|
16676
16683
|
super();
|
|
16677
16684
|
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
this.required = false;
|
|
16689
|
-
this.onDark = false;
|
|
16690
|
-
this.setCustomValidityForType = undefined;
|
|
16691
|
-
this.size = 'lg';
|
|
16692
|
-
this.shape = 'classic';
|
|
16693
|
-
this.value = undefined;
|
|
16694
|
-
this._valueObject = undefined;
|
|
16695
|
-
|
|
16696
|
-
this._initializePrivateDefaults();
|
|
16697
|
-
}
|
|
16698
|
-
|
|
16699
|
-
/**
|
|
16700
|
-
* Internal Defaults.
|
|
16701
|
-
* @private
|
|
16702
|
-
* @returns {void}
|
|
16703
|
-
*/
|
|
16704
|
-
_initializePrivateDefaults() {
|
|
16685
|
+
// Single-source initialization. Alphabetized so duplicate or stale
|
|
16686
|
+
// defaults are immediately obvious on a diff. Every field is assigned
|
|
16687
|
+
// exactly once here (previously the constructor + the old
|
|
16688
|
+
// `_initializePrivateDefaults` overlapped — both wrote ~14 of the same
|
|
16689
|
+
// fields and double-allocated `util` and `validation`, discarding the
|
|
16690
|
+
// first instance). `validation` is now allocated exactly once; `util`
|
|
16691
|
+
// is seeded here with an en-US default and then rebuilt in
|
|
16692
|
+
// `connectedCallback` once the consumer-resolved locale is available,
|
|
16693
|
+
// so a parent (datepicker/combobox) calling `validate()` synchronously
|
|
16694
|
+
// during its own update cycle sees a populated util instance.
|
|
16705
16695
|
this.activeLabel = false;
|
|
16706
|
-
|
|
16707
|
-
this.icon = false;
|
|
16708
|
-
this.disabled = false;
|
|
16709
|
-
this.dvInputOnly = false;
|
|
16710
|
-
this.hideLabelVisually = false;
|
|
16711
|
-
this.max = undefined;
|
|
16712
|
-
this.maxLength = undefined;
|
|
16713
|
-
this.min = undefined;
|
|
16714
|
-
this.minLength = undefined;
|
|
16715
|
-
this.noValidate = false;
|
|
16716
|
-
this.onDark = false;
|
|
16717
|
-
this.required = false;
|
|
16718
|
-
this.setCustomValidityForType = undefined;
|
|
16719
|
-
|
|
16720
|
-
// Used for storing raw values returned from input mask.
|
|
16721
|
-
this._rawMaskValue = undefined;
|
|
16722
|
-
|
|
16723
|
-
/**
|
|
16724
|
-
* @private
|
|
16725
|
-
*/
|
|
16726
|
-
this.layout = 'classic';
|
|
16727
|
-
|
|
16728
|
-
/**
|
|
16729
|
-
* @private
|
|
16730
|
-
*/
|
|
16731
|
-
this.shape = 'classic';
|
|
16732
|
-
|
|
16733
|
-
/**
|
|
16734
|
-
* @private
|
|
16735
|
-
*/
|
|
16736
|
-
this.size = 'lg';
|
|
16737
|
-
|
|
16738
|
-
this.touched = false;
|
|
16739
|
-
this.util = new AuroInputUtilities({
|
|
16740
|
-
locale: "en-US",
|
|
16741
|
-
format: this.format
|
|
16742
|
-
});
|
|
16743
|
-
this.validation = new AuroFormValidation();
|
|
16744
|
-
this.inputIconName = undefined;
|
|
16745
|
-
this.showPassword = false;
|
|
16746
|
-
this.validationCCLength = undefined;
|
|
16747
|
-
this.hasValue = false;
|
|
16748
|
-
this.label = 'Input label is undefined';
|
|
16749
|
-
|
|
16750
|
-
|
|
16696
|
+
/** @private */
|
|
16751
16697
|
this.allowedInputTypes = [
|
|
16752
16698
|
"text",
|
|
16753
16699
|
"number",
|
|
@@ -16756,7 +16702,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
16756
16702
|
"credit-card",
|
|
16757
16703
|
"tel"
|
|
16758
16704
|
];
|
|
16759
|
-
this.
|
|
16705
|
+
this.appearance = "default";
|
|
16706
|
+
/** @private */
|
|
16760
16707
|
this.dateFormatMap = {
|
|
16761
16708
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
16762
16709
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -16773,27 +16720,57 @@ class BaseInput extends AuroElement$1 {
|
|
|
16773
16720
|
'dd/mm': 'dateDDMM',
|
|
16774
16721
|
'mm/dd': 'dateMMDD'
|
|
16775
16722
|
};
|
|
16723
|
+
this.disabled = false;
|
|
16724
|
+
/** @private */
|
|
16776
16725
|
this.domHandler = new DomHandler();
|
|
16777
16726
|
this.dvInputOnly = false;
|
|
16778
16727
|
this.hasValue = false;
|
|
16728
|
+
this.hideLabelVisually = false;
|
|
16729
|
+
this.icon = false;
|
|
16730
|
+
/** @private */
|
|
16779
16731
|
this.inputIconName = undefined;
|
|
16732
|
+
/** @private */
|
|
16780
16733
|
this.label = 'Input label is undefined';
|
|
16734
|
+
this.layout = 'classic';
|
|
16735
|
+
this.locale = 'en-US';
|
|
16736
|
+
this.max = undefined;
|
|
16737
|
+
this._maxObject = undefined;
|
|
16738
|
+
this.maxLength = undefined;
|
|
16739
|
+
this.min = undefined;
|
|
16740
|
+
this._minObject = undefined;
|
|
16741
|
+
this.minLength = undefined;
|
|
16781
16742
|
this.noValidate = false;
|
|
16782
|
-
this.
|
|
16743
|
+
this.onDark = false;
|
|
16744
|
+
// Raw values returned from the input mask before model normalization.
|
|
16745
|
+
this._rawMaskValue = undefined;
|
|
16746
|
+
this.required = false;
|
|
16747
|
+
this.setCustomValidityForType = undefined;
|
|
16748
|
+
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
16749
|
+
// itself, and listing it here caused cursor placement issues in Safari.
|
|
16750
|
+
/** @private */
|
|
16783
16751
|
this.setSelectionInputTypes = [
|
|
16784
16752
|
"text",
|
|
16785
16753
|
"password",
|
|
16786
16754
|
"email"
|
|
16787
|
-
];
|
|
16755
|
+
];
|
|
16756
|
+
this.shape = 'classic';
|
|
16757
|
+
/** @private */
|
|
16788
16758
|
this.showPassword = false;
|
|
16759
|
+
this.size = 'lg';
|
|
16789
16760
|
this.touched = false;
|
|
16761
|
+
/** @private */
|
|
16790
16762
|
this.uniqueId = new UniqueId().create();
|
|
16763
|
+
/** @private */
|
|
16791
16764
|
this.util = new AuroInputUtilities({
|
|
16792
16765
|
locale: this.locale,
|
|
16793
16766
|
format: this.format
|
|
16794
16767
|
});
|
|
16768
|
+
/** @private */
|
|
16795
16769
|
this.validation = new AuroFormValidation();
|
|
16770
|
+
/** @private */
|
|
16796
16771
|
this.validationCCLength = undefined;
|
|
16772
|
+
this.value = undefined;
|
|
16773
|
+
this._valueObject = undefined;
|
|
16797
16774
|
}
|
|
16798
16775
|
|
|
16799
16776
|
// function to define props used within the scope of this component
|
|
@@ -17341,6 +17318,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
17341
17318
|
|
|
17342
17319
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
17343
17320
|
|
|
17321
|
+
// Normalize the format token to lowercase so case-mixed values supplied
|
|
17322
|
+
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
17323
|
+
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
17324
|
+
// format silently misses the map and leaves `setCustomValidityForType`
|
|
17325
|
+
// unset.
|
|
17326
|
+
if (this.format) {
|
|
17327
|
+
this.format = this.format.toLowerCase();
|
|
17328
|
+
}
|
|
17329
|
+
|
|
17344
17330
|
// use validity message override if declared when initializing the component
|
|
17345
17331
|
if (this.hasAttribute('setCustomValidity')) {
|
|
17346
17332
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -17774,6 +17760,38 @@ class BaseInput extends AuroElement$1 {
|
|
|
17774
17760
|
this.touched = true;
|
|
17775
17761
|
this.validation.validate(this);
|
|
17776
17762
|
}
|
|
17763
|
+
|
|
17764
|
+
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
17765
|
+
// update that can re-render the input and reset the native cursor; we
|
|
17766
|
+
// capture the caret position before that update commits and restore it
|
|
17767
|
+
// via `setSelectionRange` once the update has flushed. Gated on
|
|
17768
|
+
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
17769
|
+
// formatter manages the cursor itself) doesn't get a competing write.
|
|
17770
|
+
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
17771
|
+
// on input types that don't support text selection (number, email in
|
|
17772
|
+
// some browsers) throws InvalidStateError, which would crash all input
|
|
17773
|
+
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
17774
|
+
// the gated types currently support it, since the list is a public
|
|
17775
|
+
// property a consumer could mutate.
|
|
17776
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
17777
|
+
let selectionStart;
|
|
17778
|
+
try {
|
|
17779
|
+
selectionStart = this.inputElement.selectionStart;
|
|
17780
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17781
|
+
return;
|
|
17782
|
+
}
|
|
17783
|
+
if (typeof selectionStart !== 'number') {
|
|
17784
|
+
return;
|
|
17785
|
+
}
|
|
17786
|
+
this.updateComplete.then(() => {
|
|
17787
|
+
try {
|
|
17788
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
17789
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17790
|
+
// Some input types (number/email in certain UAs) throw on
|
|
17791
|
+
// setSelectionRange; swallow and let the native cursor stand.
|
|
17792
|
+
}
|
|
17793
|
+
});
|
|
17794
|
+
}
|
|
17777
17795
|
}
|
|
17778
17796
|
|
|
17779
17797
|
/**
|
|
@@ -18400,7 +18418,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
18400
18418
|
}
|
|
18401
18419
|
};
|
|
18402
18420
|
|
|
18403
|
-
var formkitVersion$1 = '
|
|
18421
|
+
var formkitVersion$1 = '202606291813';
|
|
18404
18422
|
|
|
18405
18423
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18406
18424
|
// See LICENSE in the project root for license information.
|
|
@@ -18903,6 +18921,7 @@ class AuroInput extends BaseInput {
|
|
|
18903
18921
|
<${this.buttonTag}
|
|
18904
18922
|
@click="${this.handleClickShowPassword}"
|
|
18905
18923
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
18924
|
+
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
18906
18925
|
class="notificationBtn passwordBtn"
|
|
18907
18926
|
shape="circle"
|
|
18908
18927
|
size="sm"
|
|
@@ -18976,25 +18995,29 @@ class AuroInput extends BaseInput {
|
|
|
18976
18995
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
18977
18996
|
*/
|
|
18978
18997
|
renderHtmlHelpText() {
|
|
18998
|
+
// Single `<p>` with stable identity across validity transitions —
|
|
18999
|
+
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
19000
|
+
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
19001
|
+
// re-announce because the live-region element it was watching had been
|
|
19002
|
+
// removed and a new one inserted. Keeping one node means the `role`,
|
|
19003
|
+
// `aria-live`, and text content all change in-place, which AT does
|
|
19004
|
+
// observe and announce.
|
|
19005
|
+
const isError = this.validity && this.validity !== 'valid';
|
|
18979
19006
|
return html`
|
|
18980
|
-
|
|
18981
|
-
?
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
18992
|
-
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
18993
|
-
${this.errorMessage}
|
|
18994
|
-
</p>
|
|
18995
|
-
</${this.helpTextTag}>
|
|
18996
|
-
`
|
|
19007
|
+
<${this.helpTextTag}
|
|
19008
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19009
|
+
?error=${isError}>
|
|
19010
|
+
<p
|
|
19011
|
+
id="${this.uniqueId}"
|
|
19012
|
+
part="helpText"
|
|
19013
|
+
role="${ifDefined(isError ? 'alert' : undefined)}"
|
|
19014
|
+
aria-live="${ifDefined(isError ? 'assertive' : undefined)}">
|
|
19015
|
+
${isError
|
|
19016
|
+
? this.errorMessage
|
|
19017
|
+
: html`<slot name="helpText">${this.getHelpText()}</slot>`
|
|
18997
19018
|
}
|
|
19019
|
+
</p>
|
|
19020
|
+
</${this.helpTextTag}>
|
|
18998
19021
|
`;
|
|
18999
19022
|
}
|
|
19000
19023
|
|
|
@@ -19521,7 +19544,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
19521
19544
|
}
|
|
19522
19545
|
}
|
|
19523
19546
|
|
|
19524
|
-
var formkitVersion = '
|
|
19547
|
+
var formkitVersion = '202606291813';
|
|
19525
19548
|
|
|
19526
19549
|
var styleCss$1 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
19527
19550
|
|