@aurodesignsystem-dev/auro-formkit 0.0.0-pr1505.0 → 0.0.0-pr1506.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/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 +120 -139
- package/components/combobox/demo/getting-started.min.js +120 -139
- package/components/combobox/demo/index.min.js +120 -139
- package/components/combobox/dist/auro-combobox.d.ts +9 -0
- package/components/combobox/dist/index.js +120 -139
- package/components/combobox/dist/registered.js +120 -139
- 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/api.md +0 -2
- package/components/datepicker/demo/customize.md +33 -195
- package/components/datepicker/demo/customize.min.js +37 -43
- package/components/datepicker/demo/index.min.js +36 -35
- package/components/datepicker/dist/index.js +36 -35
- package/components/datepicker/dist/registered.js +36 -35
- package/components/datepicker/dist/src/auro-datepicker.d.ts +0 -2
- 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 +325 -230
- package/components/form/demo/getting-started.min.js +325 -230
- package/components/form/demo/index.min.js +325 -230
- package/components/form/demo/registerDemoDeps.min.js +325 -230
- package/components/input/demo/customize.md +55 -56
- package/components/input/demo/customize.min.js +32 -26
- package/components/input/demo/getting-started.min.js +32 -26
- package/components/input/demo/index.md +2 -2
- package/components/input/demo/index.min.js +32 -26
- package/components/input/dist/index.js +32 -26
- package/components/input/dist/registered.js +32 -26
- 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 +1 -0
- package/components/select/demo/customize.md +71 -0
- package/components/select/demo/customize.min.js +133 -26
- package/components/select/demo/getting-started.min.js +133 -26
- package/components/select/demo/index.min.js +133 -26
- package/components/select/demo/keyboard-behavior.md +18 -0
- package/components/select/dist/auro-select.d.ts +38 -2
- package/components/select/dist/index.js +133 -26
- package/components/select/dist/registered.js +133 -26
- package/components/select/dist/selectUtils.d.ts +12 -0
- package/custom-elements.json +114 -10
- package/package.json +1 -1
|
@@ -11175,6 +11175,7 @@ let AuroInputUtilities$3 = class AuroInputUtilities {
|
|
|
11175
11175
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
11176
11176
|
|
|
11177
11177
|
if (!(valueObject instanceof Date) || Number.isNaN(valueObject.getTime()) || !maskOptions || typeof maskOptions.format !== 'function') {
|
|
11178
|
+
console.debug('Invalid date object or mask options for formatting', { valueObject, maskOptions }); // eslint-disable-line no-console
|
|
11178
11179
|
return undefined;
|
|
11179
11180
|
}
|
|
11180
11181
|
|
|
@@ -11985,10 +11986,6 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
11985
11986
|
this.wrapperElement.addEventListener('click', this.handleClick);
|
|
11986
11987
|
}
|
|
11987
11988
|
|
|
11988
|
-
// add attribute for query selectors when auro-input is registered under a custom name
|
|
11989
|
-
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
11990
|
-
this.setAttribute('auro-input', '');
|
|
11991
|
-
}
|
|
11992
11989
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
11993
11990
|
|
|
11994
11991
|
// use validity message override if declared when initializing the component
|
|
@@ -12159,14 +12156,14 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
12159
12156
|
|
|
12160
12157
|
if (formattedValue !== this.inputElement.value) {
|
|
12161
12158
|
this.skipNextProgrammaticInputEvent = true;
|
|
12162
|
-
if (this.maskInstance && this.type
|
|
12159
|
+
if (this.maskInstance && this.type !== 'date') {
|
|
12163
12160
|
// Route through the mask so its _value and el.value stay in lock-step
|
|
12164
12161
|
// (set value calls updateControl which writes el.value = displayValue).
|
|
12165
12162
|
// Writing el.value directly leaves the mask thinking displayValue is
|
|
12166
|
-
// stale; _saveSelection on the next focus/click then warns.
|
|
12167
|
-
//
|
|
12168
|
-
//
|
|
12169
|
-
//
|
|
12163
|
+
// stale; _saveSelection on the next focus/click then warns. Date is
|
|
12164
|
+
// excluded because its formattedValue can be raw ISO when the calendar
|
|
12165
|
+
// is invalid, and re-masking through mm/dd/yyyy would truncate it and
|
|
12166
|
+
// flip validity from patternMismatch to tooShort.
|
|
12170
12167
|
this.maskInstance.value = formattedValue || '';
|
|
12171
12168
|
} else if (formattedValue) {
|
|
12172
12169
|
this.inputElement.value = formattedValue;
|
|
@@ -12277,31 +12274,33 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
12277
12274
|
* @returns {void}
|
|
12278
12275
|
*/
|
|
12279
12276
|
configureAutoFormatting() {
|
|
12280
|
-
//
|
|
12281
|
-
//
|
|
12282
|
-
//
|
|
12283
|
-
//
|
|
12277
|
+
// _configuringMask gates two things: external re-entry into this method
|
|
12278
|
+
// while setup is mid-flight (from property changes that call back here),
|
|
12279
|
+
// and the accept/complete listeners below — both need to ignore the mask
|
|
12280
|
+
// events fired by our own value-restore step.
|
|
12284
12281
|
if (this._configuringMask) return;
|
|
12285
12282
|
this._configuringMask = true;
|
|
12286
12283
|
try {
|
|
12284
|
+
// Destroy any prior mask so IMask can attach fresh under the new format.
|
|
12287
12285
|
if (this.maskInstance) {
|
|
12288
12286
|
this.maskInstance.destroy();
|
|
12289
12287
|
}
|
|
12290
12288
|
|
|
12291
|
-
// Pass new format to util
|
|
12292
12289
|
this.util.updateFormat(this.format);
|
|
12293
12290
|
|
|
12294
12291
|
const maskOptions = this.util.getMaskOptions(this.type, this.format);
|
|
12295
12292
|
|
|
12296
12293
|
if (this.inputElement && maskOptions.mask) {
|
|
12297
|
-
|
|
12298
|
-
//
|
|
12299
|
-
//
|
|
12300
|
-
//
|
|
12301
|
-
// When the format changes (e.g. locale switch) and we have a valid ISO
|
|
12302
|
-
// model value, compute the display string for the NEW format instead of
|
|
12303
|
-
// re-using the old display string, which may be invalid in the new mask.
|
|
12294
|
+
// Capture the current display so it can be re-applied after IMask
|
|
12295
|
+
// attaches. The restore at the bottom goes through maskInstance.value
|
|
12296
|
+
// (not inputElement.value directly) so the mask's internal state and
|
|
12297
|
+
// the input's displayed text stay in lock-step.
|
|
12304
12298
|
let existingValue = this.inputElement.value;
|
|
12299
|
+
|
|
12300
|
+
// Format-change case (e.g. locale switch): existingValue is the OLD
|
|
12301
|
+
// mask's display string and may not parse under the new mask. When
|
|
12302
|
+
// we have a valid date model, rebuild the display from valueObject
|
|
12303
|
+
// (the canonical source) using the new mask's format function.
|
|
12305
12304
|
if (
|
|
12306
12305
|
this.util.isFullDateFormat(this.type, this.format) &&
|
|
12307
12306
|
this.value &&
|
|
@@ -12313,15 +12312,18 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
12313
12312
|
existingValue = maskOptions.format(this.valueObject);
|
|
12314
12313
|
}
|
|
12315
12314
|
|
|
12315
|
+
// Clear before IMask attaches so the constructor seeds an empty
|
|
12316
|
+
// internal value. Otherwise IMask reads the stale unmasked string
|
|
12317
|
+
// and emits a spurious 'accept' before the restore below runs.
|
|
12316
12318
|
this.skipNextProgrammaticInputEvent = true;
|
|
12317
12319
|
this.inputElement.value = '';
|
|
12318
12320
|
|
|
12319
12321
|
this.maskInstance = IMask$3(this.inputElement, maskOptions);
|
|
12320
12322
|
|
|
12323
|
+
// Mask fires 'accept' on every value change, including the restore
|
|
12324
|
+
// step below. Skip events fired during configureAutoFormatting so
|
|
12325
|
+
// we don't overwrite a value the parent just pushed.
|
|
12321
12326
|
this.maskInstance.on('accept', () => {
|
|
12322
|
-
// Suppress propagation during configureAutoFormatting's own value-restoration
|
|
12323
|
-
// (line below) — the mask emits 'accept' on every value-set, including ours,
|
|
12324
|
-
// and we don't want to overwrite a value the parent just pushed.
|
|
12325
12327
|
if (this._configuringMask) return;
|
|
12326
12328
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
12327
12329
|
if (this.type === "date") {
|
|
@@ -12329,6 +12331,8 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
12329
12331
|
}
|
|
12330
12332
|
});
|
|
12331
12333
|
|
|
12334
|
+
// Mask fires 'complete' on the restore step below for any value that
|
|
12335
|
+
// happens to be a complete match. Same setup-suppression as 'accept'.
|
|
12332
12336
|
this.maskInstance.on('complete', () => {
|
|
12333
12337
|
if (this._configuringMask) return;
|
|
12334
12338
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
@@ -12337,7 +12341,9 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
|
|
|
12337
12341
|
}
|
|
12338
12342
|
});
|
|
12339
12343
|
|
|
12340
|
-
//
|
|
12344
|
+
// Write existingValue through the mask (not the input directly) so
|
|
12345
|
+
// the mask reformats it under the new rules and keeps its internal
|
|
12346
|
+
// _value aligned with the input's displayed text.
|
|
12341
12347
|
if (existingValue) {
|
|
12342
12348
|
this.maskInstance.value = existingValue;
|
|
12343
12349
|
}
|
|
@@ -13043,7 +13049,7 @@ let AuroHelpText$8 = class AuroHelpText extends i$3 {
|
|
|
13043
13049
|
}
|
|
13044
13050
|
};
|
|
13045
13051
|
|
|
13046
|
-
var formkitVersion$8 = '
|
|
13052
|
+
var formkitVersion$8 = '202606190840';
|
|
13047
13053
|
|
|
13048
13054
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13049
13055
|
// See LICENSE in the project root for license information.
|
|
@@ -24282,6 +24288,7 @@ let AuroInputUtilities$1 = class AuroInputUtilities {
|
|
|
24282
24288
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
24283
24289
|
|
|
24284
24290
|
if (!(valueObject instanceof Date) || Number.isNaN(valueObject.getTime()) || !maskOptions || typeof maskOptions.format !== 'function') {
|
|
24291
|
+
console.debug('Invalid date object or mask options for formatting', { valueObject, maskOptions }); // eslint-disable-line no-console
|
|
24285
24292
|
return undefined;
|
|
24286
24293
|
}
|
|
24287
24294
|
|
|
@@ -27162,7 +27169,7 @@ let AuroBibtemplate$3 = class AuroBibtemplate extends i$3 {
|
|
|
27162
27169
|
}
|
|
27163
27170
|
};
|
|
27164
27171
|
|
|
27165
|
-
var formkitVersion$2$1 = '
|
|
27172
|
+
var formkitVersion$2$1 = '202606190840';
|
|
27166
27173
|
|
|
27167
27174
|
let l$1$2 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=i$2`${s$3(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1$2 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1$2 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1$3=i$6`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
|
|
27168
27175
|
`,u$4$2=i$6`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
|
|
@@ -32673,7 +32680,7 @@ let AuroHelpText$2$1 = class AuroHelpText extends i$3 {
|
|
|
32673
32680
|
}
|
|
32674
32681
|
};
|
|
32675
32682
|
|
|
32676
|
-
var formkitVersion$1$3 = '
|
|
32683
|
+
var formkitVersion$1$3 = '202606190840';
|
|
32677
32684
|
|
|
32678
32685
|
let AuroElement$2$2 = class AuroElement extends i$3 {
|
|
32679
32686
|
static get properties() {
|
|
@@ -44387,6 +44394,7 @@ let AuroInputUtilities$2 = class AuroInputUtilities {
|
|
|
44387
44394
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
44388
44395
|
|
|
44389
44396
|
if (!(valueObject instanceof Date) || Number.isNaN(valueObject.getTime()) || !maskOptions || typeof maskOptions.format !== 'function') {
|
|
44397
|
+
console.debug('Invalid date object or mask options for formatting', { valueObject, maskOptions }); // eslint-disable-line no-console
|
|
44390
44398
|
return undefined;
|
|
44391
44399
|
}
|
|
44392
44400
|
|
|
@@ -45197,10 +45205,6 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45197
45205
|
this.wrapperElement.addEventListener('click', this.handleClick);
|
|
45198
45206
|
}
|
|
45199
45207
|
|
|
45200
|
-
// add attribute for query selectors when auro-input is registered under a custom name
|
|
45201
|
-
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
45202
|
-
this.setAttribute('auro-input', '');
|
|
45203
|
-
}
|
|
45204
45208
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
45205
45209
|
|
|
45206
45210
|
// use validity message override if declared when initializing the component
|
|
@@ -45371,14 +45375,14 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45371
45375
|
|
|
45372
45376
|
if (formattedValue !== this.inputElement.value) {
|
|
45373
45377
|
this.skipNextProgrammaticInputEvent = true;
|
|
45374
|
-
if (this.maskInstance && this.type
|
|
45378
|
+
if (this.maskInstance && this.type !== 'date') {
|
|
45375
45379
|
// Route through the mask so its _value and el.value stay in lock-step
|
|
45376
45380
|
// (set value calls updateControl which writes el.value = displayValue).
|
|
45377
45381
|
// Writing el.value directly leaves the mask thinking displayValue is
|
|
45378
|
-
// stale; _saveSelection on the next focus/click then warns.
|
|
45379
|
-
//
|
|
45380
|
-
//
|
|
45381
|
-
//
|
|
45382
|
+
// stale; _saveSelection on the next focus/click then warns. Date is
|
|
45383
|
+
// excluded because its formattedValue can be raw ISO when the calendar
|
|
45384
|
+
// is invalid, and re-masking through mm/dd/yyyy would truncate it and
|
|
45385
|
+
// flip validity from patternMismatch to tooShort.
|
|
45382
45386
|
this.maskInstance.value = formattedValue || '';
|
|
45383
45387
|
} else if (formattedValue) {
|
|
45384
45388
|
this.inputElement.value = formattedValue;
|
|
@@ -45489,31 +45493,33 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45489
45493
|
* @returns {void}
|
|
45490
45494
|
*/
|
|
45491
45495
|
configureAutoFormatting() {
|
|
45492
|
-
//
|
|
45493
|
-
//
|
|
45494
|
-
//
|
|
45495
|
-
//
|
|
45496
|
+
// _configuringMask gates two things: external re-entry into this method
|
|
45497
|
+
// while setup is mid-flight (from property changes that call back here),
|
|
45498
|
+
// and the accept/complete listeners below — both need to ignore the mask
|
|
45499
|
+
// events fired by our own value-restore step.
|
|
45496
45500
|
if (this._configuringMask) return;
|
|
45497
45501
|
this._configuringMask = true;
|
|
45498
45502
|
try {
|
|
45503
|
+
// Destroy any prior mask so IMask can attach fresh under the new format.
|
|
45499
45504
|
if (this.maskInstance) {
|
|
45500
45505
|
this.maskInstance.destroy();
|
|
45501
45506
|
}
|
|
45502
45507
|
|
|
45503
|
-
// Pass new format to util
|
|
45504
45508
|
this.util.updateFormat(this.format);
|
|
45505
45509
|
|
|
45506
45510
|
const maskOptions = this.util.getMaskOptions(this.type, this.format);
|
|
45507
45511
|
|
|
45508
45512
|
if (this.inputElement && maskOptions.mask) {
|
|
45509
|
-
|
|
45510
|
-
//
|
|
45511
|
-
//
|
|
45512
|
-
//
|
|
45513
|
-
// When the format changes (e.g. locale switch) and we have a valid ISO
|
|
45514
|
-
// model value, compute the display string for the NEW format instead of
|
|
45515
|
-
// re-using the old display string, which may be invalid in the new mask.
|
|
45513
|
+
// Capture the current display so it can be re-applied after IMask
|
|
45514
|
+
// attaches. The restore at the bottom goes through maskInstance.value
|
|
45515
|
+
// (not inputElement.value directly) so the mask's internal state and
|
|
45516
|
+
// the input's displayed text stay in lock-step.
|
|
45516
45517
|
let existingValue = this.inputElement.value;
|
|
45518
|
+
|
|
45519
|
+
// Format-change case (e.g. locale switch): existingValue is the OLD
|
|
45520
|
+
// mask's display string and may not parse under the new mask. When
|
|
45521
|
+
// we have a valid date model, rebuild the display from valueObject
|
|
45522
|
+
// (the canonical source) using the new mask's format function.
|
|
45517
45523
|
if (
|
|
45518
45524
|
this.util.isFullDateFormat(this.type, this.format) &&
|
|
45519
45525
|
this.value &&
|
|
@@ -45525,15 +45531,18 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45525
45531
|
existingValue = maskOptions.format(this.valueObject);
|
|
45526
45532
|
}
|
|
45527
45533
|
|
|
45534
|
+
// Clear before IMask attaches so the constructor seeds an empty
|
|
45535
|
+
// internal value. Otherwise IMask reads the stale unmasked string
|
|
45536
|
+
// and emits a spurious 'accept' before the restore below runs.
|
|
45528
45537
|
this.skipNextProgrammaticInputEvent = true;
|
|
45529
45538
|
this.inputElement.value = '';
|
|
45530
45539
|
|
|
45531
45540
|
this.maskInstance = IMask$2(this.inputElement, maskOptions);
|
|
45532
45541
|
|
|
45542
|
+
// Mask fires 'accept' on every value change, including the restore
|
|
45543
|
+
// step below. Skip events fired during configureAutoFormatting so
|
|
45544
|
+
// we don't overwrite a value the parent just pushed.
|
|
45533
45545
|
this.maskInstance.on('accept', () => {
|
|
45534
|
-
// Suppress propagation during configureAutoFormatting's own value-restoration
|
|
45535
|
-
// (line below) — the mask emits 'accept' on every value-set, including ours,
|
|
45536
|
-
// and we don't want to overwrite a value the parent just pushed.
|
|
45537
45546
|
if (this._configuringMask) return;
|
|
45538
45547
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
45539
45548
|
if (this.type === "date") {
|
|
@@ -45541,6 +45550,8 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45541
45550
|
}
|
|
45542
45551
|
});
|
|
45543
45552
|
|
|
45553
|
+
// Mask fires 'complete' on the restore step below for any value that
|
|
45554
|
+
// happens to be a complete match. Same setup-suppression as 'accept'.
|
|
45544
45555
|
this.maskInstance.on('complete', () => {
|
|
45545
45556
|
if (this._configuringMask) return;
|
|
45546
45557
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
@@ -45549,7 +45560,9 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
|
|
|
45549
45560
|
}
|
|
45550
45561
|
});
|
|
45551
45562
|
|
|
45552
|
-
//
|
|
45563
|
+
// Write existingValue through the mask (not the input directly) so
|
|
45564
|
+
// the mask reformats it under the new rules and keeps its internal
|
|
45565
|
+
// _value aligned with the input's displayed text.
|
|
45553
45566
|
if (existingValue) {
|
|
45554
45567
|
this.maskInstance.value = existingValue;
|
|
45555
45568
|
}
|
|
@@ -46255,7 +46268,7 @@ let AuroHelpText$1$3 = class AuroHelpText extends i$3 {
|
|
|
46255
46268
|
}
|
|
46256
46269
|
};
|
|
46257
46270
|
|
|
46258
|
-
var formkitVersion$7 = '
|
|
46271
|
+
var formkitVersion$7 = '202606190840';
|
|
46259
46272
|
|
|
46260
46273
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
46261
46274
|
// See LICENSE in the project root for license information.
|
|
@@ -47675,8 +47688,6 @@ const datepickerKeyboardStrategy = {
|
|
|
47675
47688
|
* @slot label - Defines the label content for the entire datepicker when `layout="snowflake"`.
|
|
47676
47689
|
* @slot toLabel - Defines the label content for the second input when the `range` attribute is used.
|
|
47677
47690
|
* @slot fromLabel - Defines the label content for the first input.
|
|
47678
|
-
* @slot optionalFromLabel - Overrides the "(optional)" text rendered next to the first input's label when the datepicker is not `required`.
|
|
47679
|
-
* @slot optionalToLabel - Overrides the "(optional)" text rendered next to the second input's label when `range` is set and the datepicker is not `required`.
|
|
47680
47691
|
* @slot date_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell for the specified date. The content text is colored using the success state token when the `highlight` attribute is applied to the slot.
|
|
47681
47692
|
* @slot popover_YYYY_MM_DD - Defines the content to display in the auro-calendar-cell popover for the specified date.
|
|
47682
47693
|
* @csspart dropdown - Use for customizing the style of the dropdown.
|
|
@@ -49272,9 +49283,7 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
49272
49283
|
// update the calendar
|
|
49273
49284
|
if (this.valueEndObject) {
|
|
49274
49285
|
this.calendar.dateTo = this.convertToWcValidTime(this.valueEndObject);
|
|
49275
|
-
|
|
49276
|
-
this.calendarRenderUtil.updateCentralDate(this, this.valueEndObject);
|
|
49277
|
-
}
|
|
49286
|
+
this.calendarRenderUtil.updateCentralDate(this, this.valueEndObject);
|
|
49278
49287
|
} else {
|
|
49279
49288
|
if (this.inputList[1].value !== this.valueEnd) {
|
|
49280
49289
|
this.inputList[1].value = this.valueEnd || '';
|
|
@@ -49669,7 +49678,6 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
49669
49678
|
}
|
|
49670
49679
|
<span slot="ariaLabel.clear">${this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || i18n$2(this.lang, 'clearInput')}</span>
|
|
49671
49680
|
<span slot="label"><slot name="fromLabel"></slot></span>
|
|
49672
|
-
<span slot="optionalLabel"><slot name="optionalFromLabel"> (optional)</slot></span>
|
|
49673
49681
|
</${this.inputTag}>
|
|
49674
49682
|
</div>
|
|
49675
49683
|
|
|
@@ -49714,7 +49722,6 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
49714
49722
|
}
|
|
49715
49723
|
<span slot="ariaLabel.clear">${this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || this.runtimeUtils.getSlotText(this, 'ariaLabel.input.clear') || i18n$2(this.lang, 'clearInput')}</span>
|
|
49716
49724
|
<span slot="label"><slot name="toLabel"></slot></span>
|
|
49717
|
-
<span slot="optionalLabel"><slot name="optionalToLabel"> (optional)</slot></span>
|
|
49718
49725
|
</${this.inputTag}>
|
|
49719
49726
|
</div>
|
|
49720
49727
|
` : undefined}
|
|
@@ -50958,7 +50965,7 @@ let AuroHelpText$1$2 = class AuroHelpText extends i$3 {
|
|
|
50958
50965
|
}
|
|
50959
50966
|
};
|
|
50960
50967
|
|
|
50961
|
-
var formkitVersion$1$2 = '
|
|
50968
|
+
var formkitVersion$1$2 = '202606190840';
|
|
50962
50969
|
|
|
50963
50970
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
50964
50971
|
// See LICENSE in the project root for license information.
|
|
@@ -55286,7 +55293,7 @@ let AuroHelpText$6 = class AuroHelpText extends i$3 {
|
|
|
55286
55293
|
}
|
|
55287
55294
|
};
|
|
55288
55295
|
|
|
55289
|
-
var formkitVersion$6 = '
|
|
55296
|
+
var formkitVersion$6 = '202606190840';
|
|
55290
55297
|
|
|
55291
55298
|
let AuroElement$1$2 = class AuroElement extends i$3 {
|
|
55292
55299
|
static get properties() {
|
|
@@ -59218,7 +59225,7 @@ let AuroHelpText$5 = class AuroHelpText extends i$3 {
|
|
|
59218
59225
|
}
|
|
59219
59226
|
};
|
|
59220
59227
|
|
|
59221
|
-
var formkitVersion$5 = '
|
|
59228
|
+
var formkitVersion$5 = '202606190840';
|
|
59222
59229
|
|
|
59223
59230
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
59224
59231
|
// See LICENSE in the project root for license information.
|
|
@@ -60968,7 +60975,7 @@ let AuroHelpText$4 = class AuroHelpText extends i$3 {
|
|
|
60968
60975
|
}
|
|
60969
60976
|
};
|
|
60970
60977
|
|
|
60971
|
-
var formkitVersion$4 = '
|
|
60978
|
+
var formkitVersion$4 = '202606190840';
|
|
60972
60979
|
|
|
60973
60980
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
60974
60981
|
// See LICENSE in the project root for license information.
|
|
@@ -62144,6 +62151,8 @@ function navigateArrow$1(component, direction, options = {}) {
|
|
|
62144
62151
|
}
|
|
62145
62152
|
}
|
|
62146
62153
|
|
|
62154
|
+
/* eslint-disable no-underscore-dangle */
|
|
62155
|
+
|
|
62147
62156
|
/**
|
|
62148
62157
|
* Returns the clear button element from the active input's shadow
|
|
62149
62158
|
* DOM, if available.
|
|
@@ -62179,11 +62188,9 @@ function isClearBtnFocused(ctx, clearBtn = getClearBtn(ctx)) {
|
|
|
62179
62188
|
* @param {Object} menu - The menu component.
|
|
62180
62189
|
*/
|
|
62181
62190
|
function reconcileMenuIndex(menu) {
|
|
62182
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
62183
62191
|
if (menu._index < 0 && menu.optionActive && menu.items) {
|
|
62184
62192
|
const idx = menu.items.indexOf(menu.optionActive);
|
|
62185
62193
|
if (idx >= 0) {
|
|
62186
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
62187
62194
|
menu._index = idx;
|
|
62188
62195
|
}
|
|
62189
62196
|
}
|
|
@@ -66183,7 +66190,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
66183
66190
|
}
|
|
66184
66191
|
};
|
|
66185
66192
|
|
|
66186
|
-
var formkitVersion$2 = '
|
|
66193
|
+
var formkitVersion$2 = '202606190840';
|
|
66187
66194
|
|
|
66188
66195
|
let AuroElement$2$1 = class AuroElement extends i$3 {
|
|
66189
66196
|
static get properties() {
|
|
@@ -77897,6 +77904,7 @@ class AuroInputUtilities {
|
|
|
77897
77904
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
77898
77905
|
|
|
77899
77906
|
if (!(valueObject instanceof Date) || Number.isNaN(valueObject.getTime()) || !maskOptions || typeof maskOptions.format !== 'function') {
|
|
77907
|
+
console.debug('Invalid date object or mask options for formatting', { valueObject, maskOptions }); // eslint-disable-line no-console
|
|
77900
77908
|
return undefined;
|
|
77901
77909
|
}
|
|
77902
77910
|
|
|
@@ -78707,10 +78715,6 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
78707
78715
|
this.wrapperElement.addEventListener('click', this.handleClick);
|
|
78708
78716
|
}
|
|
78709
78717
|
|
|
78710
|
-
// add attribute for query selectors when auro-input is registered under a custom name
|
|
78711
|
-
if (this.tagName.toLowerCase() !== 'auro-input' && !this.hasAttribute('auro-input')) {
|
|
78712
|
-
this.setAttribute('auro-input', '');
|
|
78713
|
-
}
|
|
78714
78718
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
78715
78719
|
|
|
78716
78720
|
// use validity message override if declared when initializing the component
|
|
@@ -78881,14 +78885,14 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
78881
78885
|
|
|
78882
78886
|
if (formattedValue !== this.inputElement.value) {
|
|
78883
78887
|
this.skipNextProgrammaticInputEvent = true;
|
|
78884
|
-
if (this.maskInstance && this.type
|
|
78888
|
+
if (this.maskInstance && this.type !== 'date') {
|
|
78885
78889
|
// Route through the mask so its _value and el.value stay in lock-step
|
|
78886
78890
|
// (set value calls updateControl which writes el.value = displayValue).
|
|
78887
78891
|
// Writing el.value directly leaves the mask thinking displayValue is
|
|
78888
|
-
// stale; _saveSelection on the next focus/click then warns.
|
|
78889
|
-
//
|
|
78890
|
-
//
|
|
78891
|
-
//
|
|
78892
|
+
// stale; _saveSelection on the next focus/click then warns. Date is
|
|
78893
|
+
// excluded because its formattedValue can be raw ISO when the calendar
|
|
78894
|
+
// is invalid, and re-masking through mm/dd/yyyy would truncate it and
|
|
78895
|
+
// flip validity from patternMismatch to tooShort.
|
|
78892
78896
|
this.maskInstance.value = formattedValue || '';
|
|
78893
78897
|
} else if (formattedValue) {
|
|
78894
78898
|
this.inputElement.value = formattedValue;
|
|
@@ -78999,31 +79003,33 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
78999
79003
|
* @returns {void}
|
|
79000
79004
|
*/
|
|
79001
79005
|
configureAutoFormatting() {
|
|
79002
|
-
//
|
|
79003
|
-
//
|
|
79004
|
-
//
|
|
79005
|
-
//
|
|
79006
|
+
// _configuringMask gates two things: external re-entry into this method
|
|
79007
|
+
// while setup is mid-flight (from property changes that call back here),
|
|
79008
|
+
// and the accept/complete listeners below — both need to ignore the mask
|
|
79009
|
+
// events fired by our own value-restore step.
|
|
79006
79010
|
if (this._configuringMask) return;
|
|
79007
79011
|
this._configuringMask = true;
|
|
79008
79012
|
try {
|
|
79013
|
+
// Destroy any prior mask so IMask can attach fresh under the new format.
|
|
79009
79014
|
if (this.maskInstance) {
|
|
79010
79015
|
this.maskInstance.destroy();
|
|
79011
79016
|
}
|
|
79012
79017
|
|
|
79013
|
-
// Pass new format to util
|
|
79014
79018
|
this.util.updateFormat(this.format);
|
|
79015
79019
|
|
|
79016
79020
|
const maskOptions = this.util.getMaskOptions(this.type, this.format);
|
|
79017
79021
|
|
|
79018
79022
|
if (this.inputElement && maskOptions.mask) {
|
|
79019
|
-
|
|
79020
|
-
//
|
|
79021
|
-
//
|
|
79022
|
-
//
|
|
79023
|
-
// When the format changes (e.g. locale switch) and we have a valid ISO
|
|
79024
|
-
// model value, compute the display string for the NEW format instead of
|
|
79025
|
-
// re-using the old display string, which may be invalid in the new mask.
|
|
79023
|
+
// Capture the current display so it can be re-applied after IMask
|
|
79024
|
+
// attaches. The restore at the bottom goes through maskInstance.value
|
|
79025
|
+
// (not inputElement.value directly) so the mask's internal state and
|
|
79026
|
+
// the input's displayed text stay in lock-step.
|
|
79026
79027
|
let existingValue = this.inputElement.value;
|
|
79028
|
+
|
|
79029
|
+
// Format-change case (e.g. locale switch): existingValue is the OLD
|
|
79030
|
+
// mask's display string and may not parse under the new mask. When
|
|
79031
|
+
// we have a valid date model, rebuild the display from valueObject
|
|
79032
|
+
// (the canonical source) using the new mask's format function.
|
|
79027
79033
|
if (
|
|
79028
79034
|
this.util.isFullDateFormat(this.type, this.format) &&
|
|
79029
79035
|
this.value &&
|
|
@@ -79035,15 +79041,18 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
79035
79041
|
existingValue = maskOptions.format(this.valueObject);
|
|
79036
79042
|
}
|
|
79037
79043
|
|
|
79044
|
+
// Clear before IMask attaches so the constructor seeds an empty
|
|
79045
|
+
// internal value. Otherwise IMask reads the stale unmasked string
|
|
79046
|
+
// and emits a spurious 'accept' before the restore below runs.
|
|
79038
79047
|
this.skipNextProgrammaticInputEvent = true;
|
|
79039
79048
|
this.inputElement.value = '';
|
|
79040
79049
|
|
|
79041
79050
|
this.maskInstance = IMask(this.inputElement, maskOptions);
|
|
79042
79051
|
|
|
79052
|
+
// Mask fires 'accept' on every value change, including the restore
|
|
79053
|
+
// step below. Skip events fired during configureAutoFormatting so
|
|
79054
|
+
// we don't overwrite a value the parent just pushed.
|
|
79043
79055
|
this.maskInstance.on('accept', () => {
|
|
79044
|
-
// Suppress propagation during configureAutoFormatting's own value-restoration
|
|
79045
|
-
// (line below) — the mask emits 'accept' on every value-set, including ours,
|
|
79046
|
-
// and we don't want to overwrite a value the parent just pushed.
|
|
79047
79056
|
if (this._configuringMask) return;
|
|
79048
79057
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
79049
79058
|
if (this.type === "date") {
|
|
@@ -79051,6 +79060,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
79051
79060
|
}
|
|
79052
79061
|
});
|
|
79053
79062
|
|
|
79063
|
+
// Mask fires 'complete' on the restore step below for any value that
|
|
79064
|
+
// happens to be a complete match. Same setup-suppression as 'accept'.
|
|
79054
79065
|
this.maskInstance.on('complete', () => {
|
|
79055
79066
|
if (this._configuringMask) return;
|
|
79056
79067
|
this.value = this.util.toModelValue(this.maskInstance.value, this.format);
|
|
@@ -79059,7 +79070,9 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
79059
79070
|
}
|
|
79060
79071
|
});
|
|
79061
79072
|
|
|
79062
|
-
//
|
|
79073
|
+
// Write existingValue through the mask (not the input directly) so
|
|
79074
|
+
// the mask reformats it under the new rules and keeps its internal
|
|
79075
|
+
// _value aligned with the input's displayed text.
|
|
79063
79076
|
if (existingValue) {
|
|
79064
79077
|
this.maskInstance.value = existingValue;
|
|
79065
79078
|
}
|
|
@@ -79765,7 +79778,7 @@ let AuroHelpText$1$1 = class AuroHelpText extends i$3 {
|
|
|
79765
79778
|
}
|
|
79766
79779
|
};
|
|
79767
79780
|
|
|
79768
|
-
var formkitVersion$1$1 = '
|
|
79781
|
+
var formkitVersion$1$1 = '202606190840';
|
|
79769
79782
|
|
|
79770
79783
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
79771
79784
|
// See LICENSE in the project root for license information.
|
|
@@ -80886,7 +80899,7 @@ let AuroBibtemplate$1 = class AuroBibtemplate extends i$3 {
|
|
|
80886
80899
|
}
|
|
80887
80900
|
};
|
|
80888
80901
|
|
|
80889
|
-
var formkitVersion$3 = '
|
|
80902
|
+
var formkitVersion$3 = '202606190840';
|
|
80890
80903
|
|
|
80891
80904
|
var styleCss$1$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}`;
|
|
80892
80905
|
|
|
@@ -81873,7 +81886,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
81873
81886
|
if (this.menu) {
|
|
81874
81887
|
this.menu.matchWord = normalizeFilterValue(this.input.value);
|
|
81875
81888
|
}
|
|
81876
|
-
const label = getOptionLabel(this.menu.optionSelected)
|
|
81889
|
+
const label = getOptionLabel(this.menu.optionSelected);
|
|
81877
81890
|
this.updateTriggerTextDisplay(label || this.value);
|
|
81878
81891
|
}
|
|
81879
81892
|
|
|
@@ -81887,40 +81900,9 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
81887
81900
|
// in suggestion mode, do not override input value if no selection has been made and the input currently has focus
|
|
81888
81901
|
const isInputFocusedWithNoSelection = !this.menu.value && (this.input.matches(':focus-within') || (this.inputInBib && this.inputInBib.matches(':focus-within')));
|
|
81889
81902
|
|
|
81890
|
-
|
|
81891
|
-
|
|
81892
|
-
|
|
81893
|
-
// syncValuesAndStates re-enters here during typing when both inputs
|
|
81894
|
-
// already match, and a no-op flag flip would make the bib branch's
|
|
81895
|
-
// bail eat legitimate user-input events.
|
|
81896
|
-
const triggerNeedsSync = this.input.value !== nextValue;
|
|
81897
|
-
const bibNeedsSync = Boolean(this.inputInBib && this.inputInBib !== this.input && this.inputInBib.value !== nextValue);
|
|
81898
|
-
if (triggerNeedsSync || bibNeedsSync) {
|
|
81899
|
-
this._syncingDisplayValue = true;
|
|
81900
|
-
if (triggerNeedsSync) {
|
|
81901
|
-
this.input.value = nextValue;
|
|
81902
|
-
}
|
|
81903
|
-
if (bibNeedsSync) {
|
|
81904
|
-
this.inputInBib.value = nextValue;
|
|
81905
|
-
}
|
|
81906
|
-
const pending = [];
|
|
81907
|
-
if (triggerNeedsSync) {
|
|
81908
|
-
pending.push(this.input.updateComplete);
|
|
81909
|
-
}
|
|
81910
|
-
if (bibNeedsSync) {
|
|
81911
|
-
pending.push(this.inputInBib.updateComplete);
|
|
81912
|
-
}
|
|
81913
|
-
Promise.all(pending).then(() => {
|
|
81914
|
-
// imask reasserts otherwise, and handleBlur reverts to its stale value.
|
|
81915
|
-
if (triggerNeedsSync && this.input.maskInstance && typeof this.input.maskInstance.updateValue === 'function') {
|
|
81916
|
-
this.input.maskInstance.updateValue();
|
|
81917
|
-
}
|
|
81918
|
-
if (bibNeedsSync && this.inputInBib && this.inputInBib.maskInstance && typeof this.inputInBib.maskInstance.updateValue === 'function') {
|
|
81919
|
-
this.inputInBib.maskInstance.updateValue();
|
|
81920
|
-
}
|
|
81921
|
-
this._syncingDisplayValue = false;
|
|
81922
|
-
});
|
|
81923
|
-
}
|
|
81903
|
+
const suppressed = this.persistInput || (this.behavior === 'suggestion' && isInputFocusedWithNoSelection);
|
|
81904
|
+
if (!suppressed) {
|
|
81905
|
+
this.syncInputValuesAcrossTriggerAndBib(label || this.value);
|
|
81924
81906
|
}
|
|
81925
81907
|
|
|
81926
81908
|
// update the displayValue in the trigger if displayValue slot content is present
|
|
@@ -81948,6 +81930,52 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
81948
81930
|
this.requestUpdate();
|
|
81949
81931
|
}
|
|
81950
81932
|
|
|
81933
|
+
/**
|
|
81934
|
+
* Writes nextValue to the trigger input and the bib input when their current
|
|
81935
|
+
* value differs, then re-asserts imask after Lit's update flushes.
|
|
81936
|
+
* @param {string} nextValue - The value to write to both inputs.
|
|
81937
|
+
* @returns {Promise<void> | null} Promise that resolves after the inputs flush,
|
|
81938
|
+
* or null when no sync was needed (so callers can skip post-flush work).
|
|
81939
|
+
* @private
|
|
81940
|
+
*/
|
|
81941
|
+
syncInputValuesAcrossTriggerAndBib(nextValue) {
|
|
81942
|
+
// Only set the flag when there's an actual write to suppress —
|
|
81943
|
+
// syncValuesAndStates re-enters here during typing when both inputs
|
|
81944
|
+
// already match, and a no-op flag flip would make the bib branch's
|
|
81945
|
+
// bail eat legitimate user-input events.
|
|
81946
|
+
const triggerNeedsSync = this.input.value !== nextValue;
|
|
81947
|
+
const bibNeedsSync = Boolean(this.inputInBib && this.inputInBib !== this.input && this.inputInBib.value !== nextValue);
|
|
81948
|
+
if (!triggerNeedsSync && !bibNeedsSync) {
|
|
81949
|
+
return null;
|
|
81950
|
+
}
|
|
81951
|
+
|
|
81952
|
+
this._syncingDisplayValue = true;
|
|
81953
|
+
if (triggerNeedsSync) {
|
|
81954
|
+
this.input.value = nextValue;
|
|
81955
|
+
}
|
|
81956
|
+
if (bibNeedsSync) {
|
|
81957
|
+
this.inputInBib.value = nextValue;
|
|
81958
|
+
}
|
|
81959
|
+
|
|
81960
|
+
const pending = [];
|
|
81961
|
+
if (triggerNeedsSync) {
|
|
81962
|
+
pending.push(this.input.updateComplete);
|
|
81963
|
+
}
|
|
81964
|
+
if (bibNeedsSync) {
|
|
81965
|
+
pending.push(this.inputInBib.updateComplete);
|
|
81966
|
+
}
|
|
81967
|
+
return Promise.all(pending).then(() => {
|
|
81968
|
+
// imask reasserts otherwise, and handleBlur reverts to its stale value.
|
|
81969
|
+
if (triggerNeedsSync && this.input.maskInstance && typeof this.input.maskInstance.updateValue === 'function') {
|
|
81970
|
+
this.input.maskInstance.updateValue();
|
|
81971
|
+
}
|
|
81972
|
+
if (bibNeedsSync && this.inputInBib && this.inputInBib.maskInstance && typeof this.inputInBib.maskInstance.updateValue === 'function') {
|
|
81973
|
+
this.inputInBib.maskInstance.updateValue();
|
|
81974
|
+
}
|
|
81975
|
+
this._syncingDisplayValue = false;
|
|
81976
|
+
});
|
|
81977
|
+
}
|
|
81978
|
+
|
|
81951
81979
|
/**
|
|
81952
81980
|
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
81953
81981
|
* @private
|
|
@@ -81975,9 +82003,9 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
81975
82003
|
this.syncValuesAndStates();
|
|
81976
82004
|
}
|
|
81977
82005
|
|
|
81978
|
-
// Re-activate when optionActive is
|
|
81979
|
-
// been reset (e.g. by clearSelection in an async update)
|
|
81980
|
-
// makeSelection() can find the correct option.
|
|
82006
|
+
// Re-activate when optionActive is not in the current scrollable viewport,
|
|
82007
|
+
// or when _index has been reset (e.g. by clearSelection in an async update)
|
|
82008
|
+
// so that makeSelection() can find the correct option.
|
|
81981
82009
|
if (!this.availableOptions.includes(this.menu.optionActive) || this.menu._index < 0) {
|
|
81982
82010
|
this.activateFirstEnabledAvailableOption();
|
|
81983
82011
|
}
|
|
@@ -82111,28 +82139,25 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82111
82139
|
|
|
82112
82140
|
guardTouchPassthrough$1(this.menu);
|
|
82113
82141
|
|
|
82114
|
-
//
|
|
82115
|
-
//
|
|
82116
|
-
//
|
|
82142
|
+
// showModal() takes focus away from the trigger. Early focus once
|
|
82143
|
+
// the dialog has painted; the shared doubleRaf below is the fallback
|
|
82144
|
+
// for when the dialog needs an extra frame and also clears the
|
|
82145
|
+
// validation guard.
|
|
82117
82146
|
requestAnimationFrame(() => {
|
|
82118
82147
|
this.setInputFocus();
|
|
82119
82148
|
});
|
|
82120
|
-
|
|
82121
|
-
doubleRaf$1(() => {
|
|
82122
|
-
this.setInputFocus();
|
|
82123
|
-
this._inFullscreenTransition = false;
|
|
82124
|
-
});
|
|
82125
|
-
} else {
|
|
82126
|
-
// Desktop popover-open: restore the trigger caret to end-of-text.
|
|
82127
|
-
// Clicking the trigger lands on auro-input's floating <label for="…">
|
|
82128
|
-
// overlay; Chrome resets the native input's selection to [0, 0] on
|
|
82129
|
-
// label-focus before any JS runs. setInputFocus()'s non-fullscreen
|
|
82130
|
-
// branch parks the caret at end. doubleRaf lets the dropdown layout
|
|
82131
|
-
// settle first, matching the fullscreen branch timing.
|
|
82132
|
-
doubleRaf$1(() => {
|
|
82133
|
-
this.setInputFocus();
|
|
82134
|
-
});
|
|
82135
82149
|
}
|
|
82150
|
+
// else (desktop popover-open): Chrome resets the trigger caret to
|
|
82151
|
+
// [0, 0] when its floating <label for="…"> overlay receives focus.
|
|
82152
|
+
// The shared doubleRaf below parks the caret back at end-of-text
|
|
82153
|
+
// after the dropdown layout settles.
|
|
82154
|
+
|
|
82155
|
+
doubleRaf$1(() => {
|
|
82156
|
+
this.setInputFocus();
|
|
82157
|
+
if (this._inFullscreenTransition) {
|
|
82158
|
+
this._inFullscreenTransition = false;
|
|
82159
|
+
}
|
|
82160
|
+
});
|
|
82136
82161
|
}
|
|
82137
82162
|
});
|
|
82138
82163
|
|
|
@@ -82239,9 +82264,9 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82239
82264
|
} else {
|
|
82240
82265
|
// Safety net for the strategy-change setTimeout: a viewport-crossing
|
|
82241
82266
|
// fullscreen→floating switch can close the dialog and leave focus on
|
|
82242
|
-
// body. Every other
|
|
82243
|
-
// via the focusin → this.focus() redirect
|
|
82244
|
-
// no-op in the common case.
|
|
82267
|
+
// body. Every other call into this branch already has focus on the
|
|
82268
|
+
// input via the combobox-level focusin → this.focus() redirect, so
|
|
82269
|
+
// this is a no-op in the common case.
|
|
82245
82270
|
if (!this.input.componentHasFocus) {
|
|
82246
82271
|
this.input.focus();
|
|
82247
82272
|
}
|
|
@@ -82360,7 +82385,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82360
82385
|
if (this.menu.optionSelected) {
|
|
82361
82386
|
const selected = this.menu.optionSelected;
|
|
82362
82387
|
|
|
82363
|
-
if (
|
|
82388
|
+
if (this.optionSelected !== selected) {
|
|
82364
82389
|
this.optionSelected = selected;
|
|
82365
82390
|
}
|
|
82366
82391
|
|
|
@@ -82373,7 +82398,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82373
82398
|
}
|
|
82374
82399
|
|
|
82375
82400
|
// Update display
|
|
82376
|
-
this.updateTriggerTextDisplay(getOptionLabel(this.optionSelected)
|
|
82401
|
+
this.updateTriggerTextDisplay(getOptionLabel(this.optionSelected));
|
|
82377
82402
|
|
|
82378
82403
|
// Update match word for filtering
|
|
82379
82404
|
const trimmedInput = normalizeFilterValue(this.input.value);
|
|
@@ -82755,15 +82780,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82755
82780
|
this.menu.value = undefined;
|
|
82756
82781
|
this.validation.reset(this);
|
|
82757
82782
|
this.touched = false;
|
|
82758
|
-
// Force validity back to the cleared state. validation.reset() calls
|
|
82759
|
-
// validate() at the end, and (post-credit-card-fix) the trigger input's
|
|
82760
|
-
// residual validity may still be copied into the combobox by the
|
|
82761
|
-
// auroInputElements loop. Explicitly clear here so reset() actually
|
|
82762
|
-
// leaves the component in a "no validity" state.
|
|
82763
82783
|
this.validity = undefined;
|
|
82764
|
-
this.errorMessage = '';
|
|
82765
|
-
this.input.validity = undefined;
|
|
82766
|
-
this.input.errorMessage = '';
|
|
82767
82784
|
}
|
|
82768
82785
|
|
|
82769
82786
|
/**
|
|
@@ -82816,52 +82833,23 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
82816
82833
|
this.input.value = this.value;
|
|
82817
82834
|
}
|
|
82818
82835
|
|
|
82819
|
-
// Sync menu.value only when an option actually matches
|
|
82836
|
+
// Sync menu.value only when an option actually matches, or when filter
|
|
82837
|
+
// mode needs setMenuValue to dispatch auroMenu-selectValueFailure (the
|
|
82838
|
+
// listener at line 1206 clears combobox.value, mirroring select's
|
|
82839
|
+
// pattern). Otherwise sync the input display for freeform values.
|
|
82820
82840
|
if (this.menu.options && this.menu.options.length > 0) {
|
|
82821
|
-
if (this.menu.options.some((opt) => opt.value === this.value)) {
|
|
82822
|
-
this.setMenuValue(this.value);
|
|
82823
|
-
} else if (this.behavior === 'filter') {
|
|
82824
|
-
// In filter mode, freeform values aren't allowed. Push the unmatched
|
|
82825
|
-
// value through setMenuValue so menu dispatches auroMenu-selectValueFailure
|
|
82826
|
-
// and the listener at line 1206 clears combobox.value (mirrors select's
|
|
82827
|
-
// pattern). Bypassing setMenuValue here would skip the failure cascade.
|
|
82841
|
+
if (this.menu.options.some((opt) => opt.value === this.value) || this.behavior === 'filter') {
|
|
82828
82842
|
this.setMenuValue(this.value);
|
|
82829
82843
|
} else {
|
|
82830
82844
|
if (this.menu.value) {
|
|
82831
82845
|
this.menu.value = undefined;
|
|
82832
82846
|
}
|
|
82833
|
-
//
|
|
82834
|
-
//
|
|
82835
|
-
//
|
|
82836
|
-
|
|
82837
|
-
|
|
82838
|
-
|
|
82839
|
-
const triggerNeedsSync = this.input.value !== nextValue;
|
|
82840
|
-
const bibNeedsSync = Boolean(this.inputInBib && this.inputInBib !== this.input && this.inputInBib.value !== nextValue);
|
|
82841
|
-
if (triggerNeedsSync || bibNeedsSync) {
|
|
82842
|
-
this._syncingDisplayValue = true;
|
|
82843
|
-
if (triggerNeedsSync) {
|
|
82844
|
-
this.input.value = nextValue;
|
|
82845
|
-
}
|
|
82846
|
-
if (bibNeedsSync) {
|
|
82847
|
-
this.inputInBib.value = nextValue;
|
|
82848
|
-
}
|
|
82849
|
-
const pending = [];
|
|
82850
|
-
if (triggerNeedsSync) {
|
|
82851
|
-
pending.push(this.input.updateComplete);
|
|
82852
|
-
}
|
|
82853
|
-
if (bibNeedsSync) {
|
|
82854
|
-
pending.push(this.inputInBib.updateComplete);
|
|
82855
|
-
}
|
|
82856
|
-
Promise.all(pending).then(() => {
|
|
82857
|
-
if (triggerNeedsSync && this.input.maskInstance && typeof this.input.maskInstance.updateValue === 'function') {
|
|
82858
|
-
this.input.maskInstance.updateValue();
|
|
82859
|
-
}
|
|
82860
|
-
if (bibNeedsSync && this.inputInBib && this.inputInBib.maskInstance && typeof this.inputInBib.maskInstance.updateValue === 'function') {
|
|
82861
|
-
this.inputInBib.maskInstance.updateValue();
|
|
82862
|
-
}
|
|
82863
|
-
this._syncingDisplayValue = false;
|
|
82864
|
-
// handleInputValueChange bailed on the flag — refresh the filter.
|
|
82847
|
+
// Suggestion-mode freeform value: sync the trigger + bib to show it,
|
|
82848
|
+
// then refresh the filter once the inputs flush (handleInputValueChange
|
|
82849
|
+
// bailed on _syncingDisplayValue).
|
|
82850
|
+
const syncPromise = this.syncInputValuesAcrossTriggerAndBib(this.value || '');
|
|
82851
|
+
if (syncPromise) {
|
|
82852
|
+
syncPromise.then(() => {
|
|
82865
82853
|
this._programmaticFilterRefresh = true;
|
|
82866
82854
|
this.handleMenuOptions();
|
|
82867
82855
|
setTimeout(() => {
|
|
@@ -85650,6 +85638,21 @@ function getEnabledOptions(menu) {
|
|
|
85650
85638
|
return (menu?.options || []).filter((option) => !option.disabled);
|
|
85651
85639
|
}
|
|
85652
85640
|
|
|
85641
|
+
/**
|
|
85642
|
+
* Returns the active (selectable + visible) options for type-ahead navigation.
|
|
85643
|
+
*
|
|
85644
|
+
* Uses auro-menuoption's `isActive` getter, which excludes disabled, hidden,
|
|
85645
|
+
* and static options (e.g. `static nomatch` placeholders) so the type-ahead
|
|
85646
|
+
* cursor never lands on a non-actionable item. Same empty-safe handling as
|
|
85647
|
+
* `getEnabledOptions`.
|
|
85648
|
+
*
|
|
85649
|
+
* @param {HTMLElement | null | undefined} menu - The auro-menu element.
|
|
85650
|
+
* @returns {Array<HTMLElement>} Active options, empty array when none.
|
|
85651
|
+
*/
|
|
85652
|
+
function getActiveOptions(menu) {
|
|
85653
|
+
return (menu?.options || []).filter((option) => option.isActive);
|
|
85654
|
+
}
|
|
85655
|
+
|
|
85653
85656
|
/* eslint-disable new-cap */
|
|
85654
85657
|
|
|
85655
85658
|
const selectKeyboardStrategy = {
|
|
@@ -85682,6 +85685,14 @@ const selectKeyboardStrategy = {
|
|
|
85682
85685
|
},
|
|
85683
85686
|
|
|
85684
85687
|
Escape(component, evt, ctx) {
|
|
85688
|
+
// Always clear the type-ahead buffer — Escape is a universal cancel.
|
|
85689
|
+
// Safe to call when the buffer is empty.
|
|
85690
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
85691
|
+
if (typeof component._clearTypeaheadBuffer === 'function') {
|
|
85692
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
85693
|
+
component._clearTypeaheadBuffer();
|
|
85694
|
+
}
|
|
85695
|
+
|
|
85685
85696
|
if (!ctx.isExpanded) {
|
|
85686
85697
|
return;
|
|
85687
85698
|
}
|
|
@@ -85741,16 +85752,25 @@ const selectKeyboardStrategy = {
|
|
|
85741
85752
|
},
|
|
85742
85753
|
|
|
85743
85754
|
default(component, evt, ctx) {
|
|
85744
|
-
|
|
85755
|
+
// Space resolves to either typeahead-buffer extension or bib toggle
|
|
85756
|
+
// depending on whether a type-ahead buffer is active. Mirrors native
|
|
85757
|
+
// <select> and the WAI-ARIA APG Listbox guidance: mid-typeahead space
|
|
85758
|
+
// is a search character (e.g. "San Francisco"); otherwise it toggles.
|
|
85745
85759
|
if (evt.key === ' ') {
|
|
85746
85760
|
evt.preventDefault();
|
|
85747
85761
|
evt.stopPropagation();
|
|
85762
|
+
if (component.typeaheadBuffer && component.typeaheadBuffer.length > 0) {
|
|
85763
|
+
component.updateActiveOptionBasedOnKey(evt.key);
|
|
85764
|
+
return;
|
|
85765
|
+
}
|
|
85748
85766
|
if (ctx.isExpanded) {
|
|
85749
85767
|
component.dropdown.hide();
|
|
85750
|
-
|
|
85768
|
+
} else {
|
|
85769
|
+
component.dropdown.show();
|
|
85751
85770
|
}
|
|
85752
|
-
|
|
85771
|
+
return;
|
|
85753
85772
|
}
|
|
85773
|
+
component.updateActiveOptionBasedOnKey(evt.key);
|
|
85754
85774
|
},
|
|
85755
85775
|
};
|
|
85756
85776
|
|
|
@@ -89662,7 +89682,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
89662
89682
|
}
|
|
89663
89683
|
};
|
|
89664
89684
|
|
|
89665
|
-
var formkitVersion$1 = '
|
|
89685
|
+
var formkitVersion$1 = '202606190840';
|
|
89666
89686
|
|
|
89667
89687
|
class AuroElement extends i$3 {
|
|
89668
89688
|
static get properties() {
|
|
@@ -91675,7 +91695,7 @@ class AuroHelpText extends i$3 {
|
|
|
91675
91695
|
}
|
|
91676
91696
|
}
|
|
91677
91697
|
|
|
91678
|
-
var formkitVersion = '
|
|
91698
|
+
var formkitVersion = '202606190840';
|
|
91679
91699
|
|
|
91680
91700
|
var styleCss = 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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, 0.875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, 0.75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, 0.625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
91681
91701
|
|
|
@@ -91780,6 +91800,16 @@ class AuroSelect extends AuroElement$1 {
|
|
|
91780
91800
|
* @private
|
|
91781
91801
|
*/
|
|
91782
91802
|
this.hasDisplayValueContent = false;
|
|
91803
|
+
|
|
91804
|
+
/**
|
|
91805
|
+
* @private
|
|
91806
|
+
*/
|
|
91807
|
+
this.typeaheadBuffer = '';
|
|
91808
|
+
|
|
91809
|
+
/**
|
|
91810
|
+
* @private
|
|
91811
|
+
*/
|
|
91812
|
+
this._typeaheadTimeout = null;
|
|
91783
91813
|
}
|
|
91784
91814
|
|
|
91785
91815
|
/**
|
|
@@ -91792,6 +91822,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
91792
91822
|
this.fullscreenBreakpoint = 'sm';
|
|
91793
91823
|
this.onDark = false;
|
|
91794
91824
|
this.isPopoverVisible = false;
|
|
91825
|
+
this.typeaheadTimeoutMs = 500;
|
|
91795
91826
|
|
|
91796
91827
|
// Layout Config
|
|
91797
91828
|
this.layout = 'classic';
|
|
@@ -92095,6 +92126,16 @@ class AuroSelect extends AuroElement$1 {
|
|
|
92095
92126
|
attribute: false
|
|
92096
92127
|
},
|
|
92097
92128
|
|
|
92129
|
+
/**
|
|
92130
|
+
* Milliseconds of keyboard inactivity before the type-ahead buffer resets.
|
|
92131
|
+
* Increase for users who type slowly.
|
|
92132
|
+
* @default 500
|
|
92133
|
+
*/
|
|
92134
|
+
typeaheadTimeoutMs: {
|
|
92135
|
+
type: Number,
|
|
92136
|
+
reflect: true
|
|
92137
|
+
},
|
|
92138
|
+
|
|
92098
92139
|
/**
|
|
92099
92140
|
* Specifies the `validityState` this element is in.
|
|
92100
92141
|
*/
|
|
@@ -92534,6 +92575,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
92534
92575
|
this.addEventListener('blur', () => {
|
|
92535
92576
|
this.validate();
|
|
92536
92577
|
this.hasFocus = false;
|
|
92578
|
+
this._clearTypeaheadBuffer();
|
|
92537
92579
|
});
|
|
92538
92580
|
}
|
|
92539
92581
|
|
|
@@ -92547,41 +92589,89 @@ class AuroSelect extends AuroElement$1 {
|
|
|
92547
92589
|
}
|
|
92548
92590
|
}
|
|
92549
92591
|
|
|
92592
|
+
/**
|
|
92593
|
+
* Returns the lowercase, trimmed text content of a menu option.
|
|
92594
|
+
* @private
|
|
92595
|
+
* @param {HTMLElement} option - The menu option element.
|
|
92596
|
+
* @returns {string}
|
|
92597
|
+
*/
|
|
92598
|
+
_getOptionDisplayText(option) {
|
|
92599
|
+
return (option.textContent || '').trim().toLowerCase();
|
|
92600
|
+
}
|
|
92601
|
+
|
|
92602
|
+
/**
|
|
92603
|
+
* Empties the type-ahead buffer and cancels any pending reset timeout.
|
|
92604
|
+
* Called when focus leaves the component, when Escape closes the bib, and on disconnect
|
|
92605
|
+
* so a stale buffer never bridges into a fresh interaction.
|
|
92606
|
+
* @private
|
|
92607
|
+
*/
|
|
92608
|
+
_clearTypeaheadBuffer() {
|
|
92609
|
+
if (this._typeaheadTimeout) {
|
|
92610
|
+
clearTimeout(this._typeaheadTimeout);
|
|
92611
|
+
this._typeaheadTimeout = null;
|
|
92612
|
+
}
|
|
92613
|
+
this.typeaheadBuffer = '';
|
|
92614
|
+
}
|
|
92615
|
+
|
|
92550
92616
|
/**
|
|
92551
92617
|
* Updates the active option in the menu based on keyboard input.
|
|
92618
|
+
*
|
|
92619
|
+
* Implements the WAI-ARIA APG Listbox type-ahead pattern: accumulates printable
|
|
92620
|
+
* keystrokes into a buffer that resets after `typeaheadTimeoutMs` of inactivity.
|
|
92621
|
+
* A multi-character buffer matches the first option whose displayed text starts
|
|
92622
|
+
* with the buffer; repeating a single character cycles through options that start
|
|
92623
|
+
* with that character.
|
|
92552
92624
|
* @private
|
|
92553
92625
|
* @param {string} _key - The key pressed by the user.
|
|
92554
92626
|
* @returns {void}
|
|
92555
92627
|
*/
|
|
92556
92628
|
updateActiveOptionBasedOnKey(_key) {
|
|
92629
|
+
// Ignore non-printable keys (Shift, ArrowDown, Tab, etc.)
|
|
92630
|
+
if (typeof _key !== 'string' || _key.length !== 1) {
|
|
92631
|
+
return;
|
|
92632
|
+
}
|
|
92557
92633
|
|
|
92558
|
-
//
|
|
92559
|
-
|
|
92560
|
-
|
|
92561
|
-
//
|
|
92562
|
-
|
|
92634
|
+
// No selectable options to match against — clear any stale buffer/timer so
|
|
92635
|
+
// Space stays a bib toggle and the next keystroke after fresh options load
|
|
92636
|
+
// starts cleanly. `getActiveOptions` excludes disabled, hidden, and static
|
|
92637
|
+
// options (e.g. `static nomatch` placeholders). Checked BEFORE mutating
|
|
92638
|
+
// the buffer.
|
|
92639
|
+
const options = getActiveOptions(this.menu);
|
|
92640
|
+
if (!options.length) {
|
|
92641
|
+
this._clearTypeaheadBuffer();
|
|
92642
|
+
return;
|
|
92643
|
+
}
|
|
92563
92644
|
|
|
92564
|
-
|
|
92565
|
-
this.lastLetter = key;
|
|
92645
|
+
const key = _key.toLowerCase();
|
|
92566
92646
|
|
|
92567
|
-
//
|
|
92568
|
-
|
|
92569
|
-
|
|
92570
|
-
|
|
92571
|
-
|
|
92647
|
+
// Reset the buffer after a period of inactivity
|
|
92648
|
+
if (this._typeaheadTimeout) {
|
|
92649
|
+
clearTimeout(this._typeaheadTimeout);
|
|
92650
|
+
}
|
|
92651
|
+
this._typeaheadTimeout = setTimeout(() => {
|
|
92652
|
+
this._clearTypeaheadBuffer();
|
|
92653
|
+
}, this.typeaheadTimeoutMs);
|
|
92572
92654
|
|
|
92573
|
-
|
|
92574
|
-
if (letterOptions.length) {
|
|
92655
|
+
this.typeaheadBuffer += key;
|
|
92575
92656
|
|
|
92576
|
-
|
|
92577
|
-
this.dropdown.show();
|
|
92657
|
+
const isRepeatedChar = this.typeaheadBuffer.length > 1 && new Set(this.typeaheadBuffer).size === 1;
|
|
92578
92658
|
|
|
92579
|
-
|
|
92580
|
-
|
|
92659
|
+
let match = null;
|
|
92660
|
+
if (isRepeatedChar) {
|
|
92661
|
+
const matches = options.filter((option) => this._getOptionDisplayText(option).startsWith(key));
|
|
92662
|
+
if (matches.length) {
|
|
92663
|
+
const cycleIndex = (this.typeaheadBuffer.length - 1) % matches.length;
|
|
92664
|
+
match = matches[cycleIndex];
|
|
92665
|
+
}
|
|
92666
|
+
} else {
|
|
92667
|
+
match = options.find((option) => this._getOptionDisplayText(option).startsWith(this.typeaheadBuffer));
|
|
92668
|
+
}
|
|
92581
92669
|
|
|
92582
|
-
|
|
92583
|
-
|
|
92584
|
-
|
|
92670
|
+
if (match) {
|
|
92671
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
92672
|
+
this.dropdown.show();
|
|
92673
|
+
}
|
|
92674
|
+
this.menu.updateActiveOption(match);
|
|
92585
92675
|
}
|
|
92586
92676
|
}
|
|
92587
92677
|
|
|
@@ -92695,6 +92785,11 @@ class AuroSelect extends AuroElement$1 {
|
|
|
92695
92785
|
}
|
|
92696
92786
|
}
|
|
92697
92787
|
|
|
92788
|
+
disconnectedCallback() {
|
|
92789
|
+
super.disconnectedCallback();
|
|
92790
|
+
this._clearTypeaheadBuffer();
|
|
92791
|
+
}
|
|
92792
|
+
|
|
92698
92793
|
// lifecycle runs only after the element's DOM has been updated the first time
|
|
92699
92794
|
firstUpdated() {
|
|
92700
92795
|
// Add the tag name as an attribute if it is different than the component name
|