@aurodesignsystem-dev/auro-formkit 0.0.0-pr1604.0 → 0.0.0-pr1608.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 +31 -10
- package/components/checkbox/demo/getting-started.min.js +31 -10
- package/components/checkbox/demo/index.min.js +31 -10
- package/components/checkbox/dist/auro-checkbox-group.d.ts +4 -0
- package/components/checkbox/dist/index.js +31 -10
- package/components/checkbox/dist/registered.js +31 -10
- package/components/combobox/demo/customize.min.js +110 -4
- package/components/combobox/demo/getting-started.min.js +110 -4
- package/components/combobox/demo/index.min.js +110 -4
- package/components/combobox/dist/auro-combobox.d.ts +22 -0
- package/components/combobox/dist/index.js +94 -4
- package/components/combobox/dist/registered.js +94 -4
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/getting-started.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 +3 -3
- package/components/datepicker/demo/getting-started.min.js +3 -3
- package/components/datepicker/demo/index.min.js +3 -3
- package/components/datepicker/dist/index.js +3 -3
- package/components/datepicker/dist/registered.js +3 -3
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/getting-started.min.js +2 -2
- 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 +186 -34
- package/components/form/demo/getting-started.min.js +186 -34
- package/components/form/demo/index.min.js +186 -34
- package/components/form/demo/registerDemoDeps.min.js +186 -34
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/index.min.js +16 -0
- package/components/menu/dist/index.js +16 -0
- package/components/menu/dist/registered.js +16 -0
- package/components/radio/demo/customize.min.js +33 -8
- package/components/radio/demo/getting-started.min.js +33 -8
- package/components/radio/demo/index.min.js +33 -8
- package/components/radio/dist/auro-radio-group.d.ts +4 -0
- package/components/radio/dist/index.js +33 -8
- package/components/radio/dist/registered.js +33 -8
- package/components/select/demo/customize.min.js +18 -2
- package/components/select/demo/getting-started.min.js +18 -2
- package/components/select/demo/index.min.js +18 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1567 -1547
- package/package.json +1 -1
|
@@ -5066,7 +5066,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
5066
5066
|
}
|
|
5067
5067
|
};
|
|
5068
5068
|
|
|
5069
|
-
var formkitVersion$2 = '
|
|
5069
|
+
var formkitVersion$2 = '202609021913';
|
|
5070
5070
|
|
|
5071
5071
|
/**
|
|
5072
5072
|
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
@@ -18935,7 +18935,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18935
18935
|
}
|
|
18936
18936
|
};
|
|
18937
18937
|
|
|
18938
|
-
var formkitVersion$1 = '
|
|
18938
|
+
var formkitVersion$1 = '202609021913';
|
|
18939
18939
|
|
|
18940
18940
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18941
18941
|
// See LICENSE in the project root for license information.
|
|
@@ -20127,7 +20127,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
20127
20127
|
}
|
|
20128
20128
|
}
|
|
20129
20129
|
|
|
20130
|
-
var formkitVersion = '
|
|
20130
|
+
var formkitVersion = '202609021913';
|
|
20131
20131
|
|
|
20132
20132
|
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}`;
|
|
20133
20133
|
|
|
@@ -20568,6 +20568,11 @@ class AuroCombobox extends AuroElement {
|
|
|
20568
20568
|
this.behavior = "suggestion";
|
|
20569
20569
|
this.clearBtnFocused = false;
|
|
20570
20570
|
|
|
20571
|
+
// One-shot: set when the input's clear button is activated so the
|
|
20572
|
+
// SPA-preselect guard in handleInputValueChange doesn't swallow the
|
|
20573
|
+
// genuine clear (AB#1634257).
|
|
20574
|
+
this._clearBtnActivated = false;
|
|
20575
|
+
|
|
20571
20576
|
// Defaults that effect the overall layout of the combobox
|
|
20572
20577
|
this.checkmark = false;
|
|
20573
20578
|
this.dvInputOnly = false;
|
|
@@ -21525,6 +21530,13 @@ class AuroCombobox extends AuroElement {
|
|
|
21525
21530
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
21526
21531
|
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
21527
21532
|
|
|
21533
|
+
// Mirror the trigger's clear-button tracking onto the fullscreen bib input
|
|
21534
|
+
// so clearing there also fully resets the combobox (AB#1634257). See
|
|
21535
|
+
// trackClearBtnActivation for why this must run in the capture phase.
|
|
21536
|
+
if (this.inputInBib && this.inputInBib !== this.input) {
|
|
21537
|
+
this.trackClearBtnActivation(this.inputInBib);
|
|
21538
|
+
}
|
|
21539
|
+
|
|
21528
21540
|
// Pass label text to the dropdown bib for accessible dialog naming
|
|
21529
21541
|
const labelElement = this.querySelector('[slot="label"]');
|
|
21530
21542
|
if (labelElement) {
|
|
@@ -21910,6 +21922,52 @@ class AuroCombobox extends AuroElement {
|
|
|
21910
21922
|
this.clearBtnFocused = false;
|
|
21911
21923
|
}
|
|
21912
21924
|
});
|
|
21925
|
+
|
|
21926
|
+
this.trackClearBtnActivation(this.input);
|
|
21927
|
+
}
|
|
21928
|
+
|
|
21929
|
+
/**
|
|
21930
|
+
* Flags genuine clear-button activations on an auro-input so the SPA-preselect
|
|
21931
|
+
* guard in handleInputValueChange doesn't swallow them.
|
|
21932
|
+
*
|
|
21933
|
+
* The auro-input clear button fires an `isProgrammatic` input event (via
|
|
21934
|
+
* notifyValueChanged) that is indistinguishable in shape from the
|
|
21935
|
+
* SPA-preselect echo that guard bails on (isProgrammatic + set value + empty
|
|
21936
|
+
* input). Without this one-shot flag, clicking clear would leave
|
|
21937
|
+
* this.value/optionSelected stale (AB#1634257).
|
|
21938
|
+
*
|
|
21939
|
+
* Delegated on the shadow root so it works regardless of when .clearBtn
|
|
21940
|
+
* renders (it only exists after a value is set), and covers both real clicks
|
|
21941
|
+
* and programmatic clearBtn.click() (which no focusin precedes). Registered in
|
|
21942
|
+
* the CAPTURE phase so the flag is set BEFORE the button's own @click
|
|
21943
|
+
* (handleClickClear) fires its synchronous input event — which is when
|
|
21944
|
+
* handleInputValueChange reads the flag.
|
|
21945
|
+
* @private
|
|
21946
|
+
* @param {Element} inputEl - The auro-input whose clear button to track.
|
|
21947
|
+
* @returns {void}
|
|
21948
|
+
*/
|
|
21949
|
+
trackClearBtnActivation(inputEl) {
|
|
21950
|
+
if (!inputEl || !inputEl.shadowRoot) {
|
|
21951
|
+
return;
|
|
21952
|
+
}
|
|
21953
|
+
inputEl.shadowRoot.addEventListener('click', (event) => {
|
|
21954
|
+
if (event.target.closest('.clearBtn')) {
|
|
21955
|
+
this._clearBtnActivated = true;
|
|
21956
|
+
|
|
21957
|
+
// Bound the flag's lifetime to this synchronous clear -> input window.
|
|
21958
|
+
// auro-input's handleClickClear fires its input event synchronously
|
|
21959
|
+
// (before any macrotask runs), so handleInputValueChange consumes the
|
|
21960
|
+
// flag first and this reset is a harmless no-op. It only does real work
|
|
21961
|
+
// if that input event never arrives (e.g. auro-input throws mid-clear),
|
|
21962
|
+
// guaranteeing the flag can't survive to be misread as a genuine clear
|
|
21963
|
+
// by a later unrelated event such as an SPA-preselect echo (AB#1634257).
|
|
21964
|
+
// Scheduled via _scheduleTimer so disconnectedCallback cancels it if the
|
|
21965
|
+
// component tears down inside that window.
|
|
21966
|
+
this._scheduleTimer(() => {
|
|
21967
|
+
this._clearBtnActivated = false;
|
|
21968
|
+
}, 0);
|
|
21969
|
+
}
|
|
21970
|
+
}, true);
|
|
21913
21971
|
}
|
|
21914
21972
|
|
|
21915
21973
|
/**
|
|
@@ -21951,6 +22009,17 @@ class AuroCombobox extends AuroElement {
|
|
|
21951
22009
|
* @returns {void}
|
|
21952
22010
|
*/
|
|
21953
22011
|
handleInputValueChange(event) {
|
|
22012
|
+
// Consume the one-shot clear-button flag on EVERY entry, before any branch
|
|
22013
|
+
// below can early-return. trackClearBtnActivation sets it in the capture
|
|
22014
|
+
// phase right before auro-input's clear button fires its synchronous input
|
|
22015
|
+
// event; reading and immediately clearing it here guarantees the flag never
|
|
22016
|
+
// survives a handleInputValueChange call to leak into a later event (e.g.
|
|
22017
|
+
// the bib branch bailing at _syncingDisplayValue, or an SPA-preselect echo)
|
|
22018
|
+
// where it would defeat the guard below. Held in a local so that guard can
|
|
22019
|
+
// still tell a genuine clear from the init-render echo (AB#1634257).
|
|
22020
|
+
const clearBtnActivated = this._clearBtnActivated;
|
|
22021
|
+
this._clearBtnActivated = false;
|
|
22022
|
+
|
|
21954
22023
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
21955
22024
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
21956
22025
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -21998,7 +22067,12 @@ class AuroCombobox extends AuroElement {
|
|
|
21998
22067
|
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21999
22068
|
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
22000
22069
|
// where value/input already track each other through the sync helpers.
|
|
22001
|
-
|
|
22070
|
+
// The clear button's echo has the same shape (isProgrammatic + set value +
|
|
22071
|
+
// empty input) but is a genuine user clear that MUST reset this.value and
|
|
22072
|
+
// optionSelected below. clearBtnActivated (consumed at the top of this
|
|
22073
|
+
// method) is true only for that genuine clear, so only the real
|
|
22074
|
+
// SPA-preselect echo bails (AB#1634257).
|
|
22075
|
+
if (event && event.isProgrammatic && this.value && !this.input.value && !clearBtnActivated) {
|
|
22002
22076
|
return;
|
|
22003
22077
|
}
|
|
22004
22078
|
|
|
@@ -22143,6 +22217,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22143
22217
|
// retry would otherwise keep rescheduling itself indefinitely.
|
|
22144
22218
|
this._pendingTimers.forEach((id) => clearTimeout(id));
|
|
22145
22219
|
this._pendingTimers.clear();
|
|
22220
|
+
|
|
22221
|
+
// Cancelling the timers above drops the macrotask that would have reset
|
|
22222
|
+
// _clearBtnActivated, so reset it here too. Otherwise a disconnect inside
|
|
22223
|
+
// the clear-click -> macrotask window strands the flag `true`; instance
|
|
22224
|
+
// state survives reconnect, and the first matching input event (including
|
|
22225
|
+
// an SPA-preselect echo) would then bypass the guard in
|
|
22226
|
+
// handleInputValueChange and silently clear value/optionSelected (AB#1634257).
|
|
22227
|
+
this._clearBtnActivated = false;
|
|
22146
22228
|
}
|
|
22147
22229
|
|
|
22148
22230
|
firstUpdated() {
|
|
@@ -22241,6 +22323,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22241
22323
|
}
|
|
22242
22324
|
if (this.menu.value || this.menu.optionSelected) {
|
|
22243
22325
|
this.menu.reset();
|
|
22326
|
+
} else {
|
|
22327
|
+
// The menu's selection properties are already cleared, but option
|
|
22328
|
+
// elements can still carry a stale `selected` attribute (e.g. the menu
|
|
22329
|
+
// options were rebuilt after the value was set, orphaning the DOM from
|
|
22330
|
+
// the now-null optionSelected). reset() is skipped above in that case,
|
|
22331
|
+
// so re-sync the option DOM directly to guarantee no option renders as
|
|
22332
|
+
// selected once the field is cleared (AB#1634259).
|
|
22333
|
+
this.menu.clearSelection();
|
|
22244
22334
|
}
|
|
22245
22335
|
} finally {
|
|
22246
22336
|
this._clearing = false;
|
|
@@ -23692,6 +23782,22 @@ class AuroMenu extends AuroElement {
|
|
|
23692
23782
|
this.value = undefined;
|
|
23693
23783
|
this._selectedKey = undefined;
|
|
23694
23784
|
this._index = -1;
|
|
23785
|
+
|
|
23786
|
+
// Eagerly sync the option DOM to the now-empty selection. Nulling the
|
|
23787
|
+
// reactive properties above normally schedules updated() → updateItemsState,
|
|
23788
|
+
// but that only runs when a property actually changes. If an option still
|
|
23789
|
+
// carries a stale `selected`/`aria-selected` attribute while these
|
|
23790
|
+
// properties are already undefined (e.g. options were rebuilt after a value
|
|
23791
|
+
// was set), no re-render fires and the option keeps rendering as selected.
|
|
23792
|
+
// Strip that state now so no option looks selected after a clear (AB#1634259).
|
|
23793
|
+
// Intentionally leaves `active`/`optionActive` untouched so a highlighted
|
|
23794
|
+
// option remains keyboard-re-selectable after emptying the value (AB#1606433).
|
|
23795
|
+
this.updateItemsState(new Map([
|
|
23796
|
+
[
|
|
23797
|
+
'optionSelected',
|
|
23798
|
+
true
|
|
23799
|
+
]
|
|
23800
|
+
]));
|
|
23695
23801
|
}
|
|
23696
23802
|
|
|
23697
23803
|
/**
|
|
@@ -5081,7 +5081,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
5081
5081
|
}
|
|
5082
5082
|
};
|
|
5083
5083
|
|
|
5084
|
-
var formkitVersion$2 = '
|
|
5084
|
+
var formkitVersion$2 = '202609021913';
|
|
5085
5085
|
|
|
5086
5086
|
/**
|
|
5087
5087
|
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
@@ -18950,7 +18950,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18950
18950
|
}
|
|
18951
18951
|
};
|
|
18952
18952
|
|
|
18953
|
-
var formkitVersion$1 = '
|
|
18953
|
+
var formkitVersion$1 = '202609021913';
|
|
18954
18954
|
|
|
18955
18955
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18956
18956
|
// See LICENSE in the project root for license information.
|
|
@@ -20142,7 +20142,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
20142
20142
|
}
|
|
20143
20143
|
}
|
|
20144
20144
|
|
|
20145
|
-
var formkitVersion = '
|
|
20145
|
+
var formkitVersion = '202609021913';
|
|
20146
20146
|
|
|
20147
20147
|
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}`;
|
|
20148
20148
|
|
|
@@ -20583,6 +20583,11 @@ class AuroCombobox extends AuroElement {
|
|
|
20583
20583
|
this.behavior = "suggestion";
|
|
20584
20584
|
this.clearBtnFocused = false;
|
|
20585
20585
|
|
|
20586
|
+
// One-shot: set when the input's clear button is activated so the
|
|
20587
|
+
// SPA-preselect guard in handleInputValueChange doesn't swallow the
|
|
20588
|
+
// genuine clear (AB#1634257).
|
|
20589
|
+
this._clearBtnActivated = false;
|
|
20590
|
+
|
|
20586
20591
|
// Defaults that effect the overall layout of the combobox
|
|
20587
20592
|
this.checkmark = false;
|
|
20588
20593
|
this.dvInputOnly = false;
|
|
@@ -21540,6 +21545,13 @@ class AuroCombobox extends AuroElement {
|
|
|
21540
21545
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
21541
21546
|
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
21542
21547
|
|
|
21548
|
+
// Mirror the trigger's clear-button tracking onto the fullscreen bib input
|
|
21549
|
+
// so clearing there also fully resets the combobox (AB#1634257). See
|
|
21550
|
+
// trackClearBtnActivation for why this must run in the capture phase.
|
|
21551
|
+
if (this.inputInBib && this.inputInBib !== this.input) {
|
|
21552
|
+
this.trackClearBtnActivation(this.inputInBib);
|
|
21553
|
+
}
|
|
21554
|
+
|
|
21543
21555
|
// Pass label text to the dropdown bib for accessible dialog naming
|
|
21544
21556
|
const labelElement = this.querySelector('[slot="label"]');
|
|
21545
21557
|
if (labelElement) {
|
|
@@ -21925,6 +21937,52 @@ class AuroCombobox extends AuroElement {
|
|
|
21925
21937
|
this.clearBtnFocused = false;
|
|
21926
21938
|
}
|
|
21927
21939
|
});
|
|
21940
|
+
|
|
21941
|
+
this.trackClearBtnActivation(this.input);
|
|
21942
|
+
}
|
|
21943
|
+
|
|
21944
|
+
/**
|
|
21945
|
+
* Flags genuine clear-button activations on an auro-input so the SPA-preselect
|
|
21946
|
+
* guard in handleInputValueChange doesn't swallow them.
|
|
21947
|
+
*
|
|
21948
|
+
* The auro-input clear button fires an `isProgrammatic` input event (via
|
|
21949
|
+
* notifyValueChanged) that is indistinguishable in shape from the
|
|
21950
|
+
* SPA-preselect echo that guard bails on (isProgrammatic + set value + empty
|
|
21951
|
+
* input). Without this one-shot flag, clicking clear would leave
|
|
21952
|
+
* this.value/optionSelected stale (AB#1634257).
|
|
21953
|
+
*
|
|
21954
|
+
* Delegated on the shadow root so it works regardless of when .clearBtn
|
|
21955
|
+
* renders (it only exists after a value is set), and covers both real clicks
|
|
21956
|
+
* and programmatic clearBtn.click() (which no focusin precedes). Registered in
|
|
21957
|
+
* the CAPTURE phase so the flag is set BEFORE the button's own @click
|
|
21958
|
+
* (handleClickClear) fires its synchronous input event — which is when
|
|
21959
|
+
* handleInputValueChange reads the flag.
|
|
21960
|
+
* @private
|
|
21961
|
+
* @param {Element} inputEl - The auro-input whose clear button to track.
|
|
21962
|
+
* @returns {void}
|
|
21963
|
+
*/
|
|
21964
|
+
trackClearBtnActivation(inputEl) {
|
|
21965
|
+
if (!inputEl || !inputEl.shadowRoot) {
|
|
21966
|
+
return;
|
|
21967
|
+
}
|
|
21968
|
+
inputEl.shadowRoot.addEventListener('click', (event) => {
|
|
21969
|
+
if (event.target.closest('.clearBtn')) {
|
|
21970
|
+
this._clearBtnActivated = true;
|
|
21971
|
+
|
|
21972
|
+
// Bound the flag's lifetime to this synchronous clear -> input window.
|
|
21973
|
+
// auro-input's handleClickClear fires its input event synchronously
|
|
21974
|
+
// (before any macrotask runs), so handleInputValueChange consumes the
|
|
21975
|
+
// flag first and this reset is a harmless no-op. It only does real work
|
|
21976
|
+
// if that input event never arrives (e.g. auro-input throws mid-clear),
|
|
21977
|
+
// guaranteeing the flag can't survive to be misread as a genuine clear
|
|
21978
|
+
// by a later unrelated event such as an SPA-preselect echo (AB#1634257).
|
|
21979
|
+
// Scheduled via _scheduleTimer so disconnectedCallback cancels it if the
|
|
21980
|
+
// component tears down inside that window.
|
|
21981
|
+
this._scheduleTimer(() => {
|
|
21982
|
+
this._clearBtnActivated = false;
|
|
21983
|
+
}, 0);
|
|
21984
|
+
}
|
|
21985
|
+
}, true);
|
|
21928
21986
|
}
|
|
21929
21987
|
|
|
21930
21988
|
/**
|
|
@@ -21966,6 +22024,17 @@ class AuroCombobox extends AuroElement {
|
|
|
21966
22024
|
* @returns {void}
|
|
21967
22025
|
*/
|
|
21968
22026
|
handleInputValueChange(event) {
|
|
22027
|
+
// Consume the one-shot clear-button flag on EVERY entry, before any branch
|
|
22028
|
+
// below can early-return. trackClearBtnActivation sets it in the capture
|
|
22029
|
+
// phase right before auro-input's clear button fires its synchronous input
|
|
22030
|
+
// event; reading and immediately clearing it here guarantees the flag never
|
|
22031
|
+
// survives a handleInputValueChange call to leak into a later event (e.g.
|
|
22032
|
+
// the bib branch bailing at _syncingDisplayValue, or an SPA-preselect echo)
|
|
22033
|
+
// where it would defeat the guard below. Held in a local so that guard can
|
|
22034
|
+
// still tell a genuine clear from the init-render echo (AB#1634257).
|
|
22035
|
+
const clearBtnActivated = this._clearBtnActivated;
|
|
22036
|
+
this._clearBtnActivated = false;
|
|
22037
|
+
|
|
21969
22038
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
21970
22039
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
21971
22040
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -22013,7 +22082,12 @@ class AuroCombobox extends AuroElement {
|
|
|
22013
22082
|
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
22014
22083
|
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
22015
22084
|
// where value/input already track each other through the sync helpers.
|
|
22016
|
-
|
|
22085
|
+
// The clear button's echo has the same shape (isProgrammatic + set value +
|
|
22086
|
+
// empty input) but is a genuine user clear that MUST reset this.value and
|
|
22087
|
+
// optionSelected below. clearBtnActivated (consumed at the top of this
|
|
22088
|
+
// method) is true only for that genuine clear, so only the real
|
|
22089
|
+
// SPA-preselect echo bails (AB#1634257).
|
|
22090
|
+
if (event && event.isProgrammatic && this.value && !this.input.value && !clearBtnActivated) {
|
|
22017
22091
|
return;
|
|
22018
22092
|
}
|
|
22019
22093
|
|
|
@@ -22158,6 +22232,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22158
22232
|
// retry would otherwise keep rescheduling itself indefinitely.
|
|
22159
22233
|
this._pendingTimers.forEach((id) => clearTimeout(id));
|
|
22160
22234
|
this._pendingTimers.clear();
|
|
22235
|
+
|
|
22236
|
+
// Cancelling the timers above drops the macrotask that would have reset
|
|
22237
|
+
// _clearBtnActivated, so reset it here too. Otherwise a disconnect inside
|
|
22238
|
+
// the clear-click -> macrotask window strands the flag `true`; instance
|
|
22239
|
+
// state survives reconnect, and the first matching input event (including
|
|
22240
|
+
// an SPA-preselect echo) would then bypass the guard in
|
|
22241
|
+
// handleInputValueChange and silently clear value/optionSelected (AB#1634257).
|
|
22242
|
+
this._clearBtnActivated = false;
|
|
22161
22243
|
}
|
|
22162
22244
|
|
|
22163
22245
|
firstUpdated() {
|
|
@@ -22256,6 +22338,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22256
22338
|
}
|
|
22257
22339
|
if (this.menu.value || this.menu.optionSelected) {
|
|
22258
22340
|
this.menu.reset();
|
|
22341
|
+
} else {
|
|
22342
|
+
// The menu's selection properties are already cleared, but option
|
|
22343
|
+
// elements can still carry a stale `selected` attribute (e.g. the menu
|
|
22344
|
+
// options were rebuilt after the value was set, orphaning the DOM from
|
|
22345
|
+
// the now-null optionSelected). reset() is skipped above in that case,
|
|
22346
|
+
// so re-sync the option DOM directly to guarantee no option renders as
|
|
22347
|
+
// selected once the field is cleared (AB#1634259).
|
|
22348
|
+
this.menu.clearSelection();
|
|
22259
22349
|
}
|
|
22260
22350
|
} finally {
|
|
22261
22351
|
this._clearing = false;
|
|
@@ -23707,6 +23797,22 @@ class AuroMenu extends AuroElement {
|
|
|
23707
23797
|
this.value = undefined;
|
|
23708
23798
|
this._selectedKey = undefined;
|
|
23709
23799
|
this._index = -1;
|
|
23800
|
+
|
|
23801
|
+
// Eagerly sync the option DOM to the now-empty selection. Nulling the
|
|
23802
|
+
// reactive properties above normally schedules updated() → updateItemsState,
|
|
23803
|
+
// but that only runs when a property actually changes. If an option still
|
|
23804
|
+
// carries a stale `selected`/`aria-selected` attribute while these
|
|
23805
|
+
// properties are already undefined (e.g. options were rebuilt after a value
|
|
23806
|
+
// was set), no re-render fires and the option keeps rendering as selected.
|
|
23807
|
+
// Strip that state now so no option looks selected after a clear (AB#1634259).
|
|
23808
|
+
// Intentionally leaves `active`/`optionActive` untouched so a highlighted
|
|
23809
|
+
// option remains keyboard-re-selectable after emptying the value (AB#1606433).
|
|
23810
|
+
this.updateItemsState(new Map([
|
|
23811
|
+
[
|
|
23812
|
+
'optionSelected',
|
|
23813
|
+
true
|
|
23814
|
+
]
|
|
23815
|
+
]));
|
|
23710
23816
|
}
|
|
23711
23817
|
|
|
23712
23818
|
/**
|
|
@@ -351,6 +351,7 @@ export class AuroCombobox extends AuroElement {
|
|
|
351
351
|
/** @type {'filter' | 'suggestion'} */
|
|
352
352
|
behavior: "filter" | "suggestion" | undefined;
|
|
353
353
|
clearBtnFocused: boolean | undefined;
|
|
354
|
+
_clearBtnActivated: boolean | undefined;
|
|
354
355
|
checkmark: boolean | undefined;
|
|
355
356
|
dvInputOnly: boolean | undefined;
|
|
356
357
|
/** @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'} */
|
|
@@ -538,6 +539,27 @@ export class AuroCombobox extends AuroElement {
|
|
|
538
539
|
* @returns {void}
|
|
539
540
|
*/
|
|
540
541
|
private configureInput;
|
|
542
|
+
/**
|
|
543
|
+
* Flags genuine clear-button activations on an auro-input so the SPA-preselect
|
|
544
|
+
* guard in handleInputValueChange doesn't swallow them.
|
|
545
|
+
*
|
|
546
|
+
* The auro-input clear button fires an `isProgrammatic` input event (via
|
|
547
|
+
* notifyValueChanged) that is indistinguishable in shape from the
|
|
548
|
+
* SPA-preselect echo that guard bails on (isProgrammatic + set value + empty
|
|
549
|
+
* input). Without this one-shot flag, clicking clear would leave
|
|
550
|
+
* this.value/optionSelected stale (AB#1634257).
|
|
551
|
+
*
|
|
552
|
+
* Delegated on the shadow root so it works regardless of when .clearBtn
|
|
553
|
+
* renders (it only exists after a value is set), and covers both real clicks
|
|
554
|
+
* and programmatic clearBtn.click() (which no focusin precedes). Registered in
|
|
555
|
+
* the CAPTURE phase so the flag is set BEFORE the button's own @click
|
|
556
|
+
* (handleClickClear) fires its synchronous input event — which is when
|
|
557
|
+
* handleInputValueChange reads the flag.
|
|
558
|
+
* @private
|
|
559
|
+
* @param {Element} inputEl - The auro-input whose clear button to track.
|
|
560
|
+
* @returns {void}
|
|
561
|
+
*/
|
|
562
|
+
private trackClearBtnActivation;
|
|
541
563
|
/**
|
|
542
564
|
* Manages the visibility of the dropdown based on loading state changes.
|
|
543
565
|
*
|
|
@@ -4999,7 +4999,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
4999
4999
|
}
|
|
5000
5000
|
};
|
|
5001
5001
|
|
|
5002
|
-
var formkitVersion$2 = '
|
|
5002
|
+
var formkitVersion$2 = '202609021913';
|
|
5003
5003
|
|
|
5004
5004
|
/**
|
|
5005
5005
|
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
@@ -18861,7 +18861,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
18861
18861
|
}
|
|
18862
18862
|
};
|
|
18863
18863
|
|
|
18864
|
-
var formkitVersion$1 = '
|
|
18864
|
+
var formkitVersion$1 = '202609021913';
|
|
18865
18865
|
|
|
18866
18866
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18867
18867
|
// See LICENSE in the project root for license information.
|
|
@@ -20053,7 +20053,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
20053
20053
|
}
|
|
20054
20054
|
}
|
|
20055
20055
|
|
|
20056
|
-
var formkitVersion = '
|
|
20056
|
+
var formkitVersion = '202609021913';
|
|
20057
20057
|
|
|
20058
20058
|
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}`;
|
|
20059
20059
|
|
|
@@ -20494,6 +20494,11 @@ class AuroCombobox extends AuroElement {
|
|
|
20494
20494
|
this.behavior = "suggestion";
|
|
20495
20495
|
this.clearBtnFocused = false;
|
|
20496
20496
|
|
|
20497
|
+
// One-shot: set when the input's clear button is activated so the
|
|
20498
|
+
// SPA-preselect guard in handleInputValueChange doesn't swallow the
|
|
20499
|
+
// genuine clear (AB#1634257).
|
|
20500
|
+
this._clearBtnActivated = false;
|
|
20501
|
+
|
|
20497
20502
|
// Defaults that effect the overall layout of the combobox
|
|
20498
20503
|
this.checkmark = false;
|
|
20499
20504
|
this.dvInputOnly = false;
|
|
@@ -21451,6 +21456,13 @@ class AuroCombobox extends AuroElement {
|
|
|
21451
21456
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
21452
21457
|
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
21453
21458
|
|
|
21459
|
+
// Mirror the trigger's clear-button tracking onto the fullscreen bib input
|
|
21460
|
+
// so clearing there also fully resets the combobox (AB#1634257). See
|
|
21461
|
+
// trackClearBtnActivation for why this must run in the capture phase.
|
|
21462
|
+
if (this.inputInBib && this.inputInBib !== this.input) {
|
|
21463
|
+
this.trackClearBtnActivation(this.inputInBib);
|
|
21464
|
+
}
|
|
21465
|
+
|
|
21454
21466
|
// Pass label text to the dropdown bib for accessible dialog naming
|
|
21455
21467
|
const labelElement = this.querySelector('[slot="label"]');
|
|
21456
21468
|
if (labelElement) {
|
|
@@ -21836,6 +21848,52 @@ class AuroCombobox extends AuroElement {
|
|
|
21836
21848
|
this.clearBtnFocused = false;
|
|
21837
21849
|
}
|
|
21838
21850
|
});
|
|
21851
|
+
|
|
21852
|
+
this.trackClearBtnActivation(this.input);
|
|
21853
|
+
}
|
|
21854
|
+
|
|
21855
|
+
/**
|
|
21856
|
+
* Flags genuine clear-button activations on an auro-input so the SPA-preselect
|
|
21857
|
+
* guard in handleInputValueChange doesn't swallow them.
|
|
21858
|
+
*
|
|
21859
|
+
* The auro-input clear button fires an `isProgrammatic` input event (via
|
|
21860
|
+
* notifyValueChanged) that is indistinguishable in shape from the
|
|
21861
|
+
* SPA-preselect echo that guard bails on (isProgrammatic + set value + empty
|
|
21862
|
+
* input). Without this one-shot flag, clicking clear would leave
|
|
21863
|
+
* this.value/optionSelected stale (AB#1634257).
|
|
21864
|
+
*
|
|
21865
|
+
* Delegated on the shadow root so it works regardless of when .clearBtn
|
|
21866
|
+
* renders (it only exists after a value is set), and covers both real clicks
|
|
21867
|
+
* and programmatic clearBtn.click() (which no focusin precedes). Registered in
|
|
21868
|
+
* the CAPTURE phase so the flag is set BEFORE the button's own @click
|
|
21869
|
+
* (handleClickClear) fires its synchronous input event — which is when
|
|
21870
|
+
* handleInputValueChange reads the flag.
|
|
21871
|
+
* @private
|
|
21872
|
+
* @param {Element} inputEl - The auro-input whose clear button to track.
|
|
21873
|
+
* @returns {void}
|
|
21874
|
+
*/
|
|
21875
|
+
trackClearBtnActivation(inputEl) {
|
|
21876
|
+
if (!inputEl || !inputEl.shadowRoot) {
|
|
21877
|
+
return;
|
|
21878
|
+
}
|
|
21879
|
+
inputEl.shadowRoot.addEventListener('click', (event) => {
|
|
21880
|
+
if (event.target.closest('.clearBtn')) {
|
|
21881
|
+
this._clearBtnActivated = true;
|
|
21882
|
+
|
|
21883
|
+
// Bound the flag's lifetime to this synchronous clear -> input window.
|
|
21884
|
+
// auro-input's handleClickClear fires its input event synchronously
|
|
21885
|
+
// (before any macrotask runs), so handleInputValueChange consumes the
|
|
21886
|
+
// flag first and this reset is a harmless no-op. It only does real work
|
|
21887
|
+
// if that input event never arrives (e.g. auro-input throws mid-clear),
|
|
21888
|
+
// guaranteeing the flag can't survive to be misread as a genuine clear
|
|
21889
|
+
// by a later unrelated event such as an SPA-preselect echo (AB#1634257).
|
|
21890
|
+
// Scheduled via _scheduleTimer so disconnectedCallback cancels it if the
|
|
21891
|
+
// component tears down inside that window.
|
|
21892
|
+
this._scheduleTimer(() => {
|
|
21893
|
+
this._clearBtnActivated = false;
|
|
21894
|
+
}, 0);
|
|
21895
|
+
}
|
|
21896
|
+
}, true);
|
|
21839
21897
|
}
|
|
21840
21898
|
|
|
21841
21899
|
/**
|
|
@@ -21877,6 +21935,17 @@ class AuroCombobox extends AuroElement {
|
|
|
21877
21935
|
* @returns {void}
|
|
21878
21936
|
*/
|
|
21879
21937
|
handleInputValueChange(event) {
|
|
21938
|
+
// Consume the one-shot clear-button flag on EVERY entry, before any branch
|
|
21939
|
+
// below can early-return. trackClearBtnActivation sets it in the capture
|
|
21940
|
+
// phase right before auro-input's clear button fires its synchronous input
|
|
21941
|
+
// event; reading and immediately clearing it here guarantees the flag never
|
|
21942
|
+
// survives a handleInputValueChange call to leak into a later event (e.g.
|
|
21943
|
+
// the bib branch bailing at _syncingDisplayValue, or an SPA-preselect echo)
|
|
21944
|
+
// where it would defeat the guard below. Held in a local so that guard can
|
|
21945
|
+
// still tell a genuine clear from the init-render echo (AB#1634257).
|
|
21946
|
+
const clearBtnActivated = this._clearBtnActivated;
|
|
21947
|
+
this._clearBtnActivated = false;
|
|
21948
|
+
|
|
21880
21949
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
21881
21950
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
21882
21951
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -21924,7 +21993,12 @@ class AuroCombobox extends AuroElement {
|
|
|
21924
21993
|
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21925
21994
|
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21926
21995
|
// where value/input already track each other through the sync helpers.
|
|
21927
|
-
|
|
21996
|
+
// The clear button's echo has the same shape (isProgrammatic + set value +
|
|
21997
|
+
// empty input) but is a genuine user clear that MUST reset this.value and
|
|
21998
|
+
// optionSelected below. clearBtnActivated (consumed at the top of this
|
|
21999
|
+
// method) is true only for that genuine clear, so only the real
|
|
22000
|
+
// SPA-preselect echo bails (AB#1634257).
|
|
22001
|
+
if (event && event.isProgrammatic && this.value && !this.input.value && !clearBtnActivated) {
|
|
21928
22002
|
return;
|
|
21929
22003
|
}
|
|
21930
22004
|
|
|
@@ -22069,6 +22143,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22069
22143
|
// retry would otherwise keep rescheduling itself indefinitely.
|
|
22070
22144
|
this._pendingTimers.forEach((id) => clearTimeout(id));
|
|
22071
22145
|
this._pendingTimers.clear();
|
|
22146
|
+
|
|
22147
|
+
// Cancelling the timers above drops the macrotask that would have reset
|
|
22148
|
+
// _clearBtnActivated, so reset it here too. Otherwise a disconnect inside
|
|
22149
|
+
// the clear-click -> macrotask window strands the flag `true`; instance
|
|
22150
|
+
// state survives reconnect, and the first matching input event (including
|
|
22151
|
+
// an SPA-preselect echo) would then bypass the guard in
|
|
22152
|
+
// handleInputValueChange and silently clear value/optionSelected (AB#1634257).
|
|
22153
|
+
this._clearBtnActivated = false;
|
|
22072
22154
|
}
|
|
22073
22155
|
|
|
22074
22156
|
firstUpdated() {
|
|
@@ -22167,6 +22249,14 @@ class AuroCombobox extends AuroElement {
|
|
|
22167
22249
|
}
|
|
22168
22250
|
if (this.menu.value || this.menu.optionSelected) {
|
|
22169
22251
|
this.menu.reset();
|
|
22252
|
+
} else {
|
|
22253
|
+
// The menu's selection properties are already cleared, but option
|
|
22254
|
+
// elements can still carry a stale `selected` attribute (e.g. the menu
|
|
22255
|
+
// options were rebuilt after the value was set, orphaning the DOM from
|
|
22256
|
+
// the now-null optionSelected). reset() is skipped above in that case,
|
|
22257
|
+
// so re-sync the option DOM directly to guarantee no option renders as
|
|
22258
|
+
// selected once the field is cleared (AB#1634259).
|
|
22259
|
+
this.menu.clearSelection();
|
|
22170
22260
|
}
|
|
22171
22261
|
} finally {
|
|
22172
22262
|
this._clearing = false;
|