@aurodesignsystem-dev/auro-formkit 0.0.0-pr1522.3 → 0.0.0-pr1524.1
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 +79 -24
- package/components/combobox/demo/getting-started.min.js +79 -24
- package/components/combobox/demo/index.min.js +79 -24
- package/components/combobox/dist/auro-combobox.d.ts +10 -0
- package/components/combobox/dist/index.js +79 -24
- package/components/combobox/dist/registered.js +79 -24
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/customize.min.js +19 -21
- package/components/datepicker/demo/index.min.js +19 -21
- package/components/datepicker/dist/index.js +19 -21
- package/components/datepicker/dist/registered.js +19 -21
- 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 +179 -82
- package/components/form/demo/getting-started.min.js +179 -82
- package/components/form/demo/index.min.js +179 -82
- package/components/form/demo/registerDemoDeps.min.js +179 -82
- package/components/input/demo/customize.min.js +17 -19
- package/components/input/demo/getting-started.min.js +17 -19
- package/components/input/demo/index.min.js +17 -19
- package/components/input/dist/index.js +17 -19
- package/components/input/dist/registered.js +17 -19
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +62 -16
- package/components/select/demo/getting-started.min.js +62 -16
- package/components/select/demo/index.min.js +62 -16
- package/components/select/dist/auro-select.d.ts +6 -0
- package/components/select/dist/index.js +62 -16
- package/components/select/dist/registered.js +62 -16
- package/custom-elements.json +16 -2
- package/package.json +1 -1
|
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607022214';
|
|
1279
1279
|
|
|
1280
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1281
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607022214';
|
|
1279
1279
|
|
|
1280
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1281
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
-
var formkitVersion = '
|
|
1278
|
+
var formkitVersion = '202607022214';
|
|
1279
1279
|
|
|
1280
1280
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1281
1281
|
// See LICENSE in the project root for license information.
|
|
@@ -1228,7 +1228,7 @@ class AuroHelpText extends LitElement {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
|
-
var formkitVersion = '
|
|
1231
|
+
var formkitVersion = '202607022214';
|
|
1232
1232
|
|
|
1233
1233
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1234
1234
|
// See LICENSE in the project root for license information.
|
|
@@ -1228,7 +1228,7 @@ class AuroHelpText extends LitElement {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
|
-
var formkitVersion = '
|
|
1231
|
+
var formkitVersion = '202607022214';
|
|
1232
1232
|
|
|
1233
1233
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1234
1234
|
// See LICENSE in the project root for license information.
|
|
@@ -4879,7 +4879,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4879
4879
|
}
|
|
4880
4880
|
};
|
|
4881
4881
|
|
|
4882
|
-
var formkitVersion$2 = '
|
|
4882
|
+
var formkitVersion$2 = '202607022214';
|
|
4883
4883
|
|
|
4884
4884
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4885
4885
|
static get properties() {
|
|
@@ -17768,14 +17768,17 @@ class BaseInput extends AuroElement$1 {
|
|
|
17768
17768
|
* @returns {void}
|
|
17769
17769
|
*/
|
|
17770
17770
|
notifyValueChanged() {
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17771
|
+
// This echoes Lit's reactive value update (and handleClickClear's
|
|
17772
|
+
// programmatic clear) — it is NOT a fresh user-input event. Mark it
|
|
17773
|
+
// `isProgrammatic` so consumers (e.g. auro-combobox) can distinguish
|
|
17774
|
+
// it from genuine user typing and skip clobbering their own
|
|
17775
|
+
// programmatic state during init-time renders.
|
|
17776
|
+
const inputEvent = new Event('input', {
|
|
17774
17777
|
bubbles: true,
|
|
17775
17778
|
composed: true,
|
|
17776
17779
|
});
|
|
17780
|
+
inputEvent.isProgrammatic = true;
|
|
17777
17781
|
|
|
17778
|
-
// Dispatched event to alert outside shadow DOM context of event firing.
|
|
17779
17782
|
this.dispatchEvent(inputEvent);
|
|
17780
17783
|
}
|
|
17781
17784
|
|
|
@@ -18488,7 +18491,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18488
18491
|
}
|
|
18489
18492
|
};
|
|
18490
18493
|
|
|
18491
|
-
var formkitVersion$1 = '
|
|
18494
|
+
var formkitVersion$1 = '202607022214';
|
|
18492
18495
|
|
|
18493
18496
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18494
18497
|
// See LICENSE in the project root for license information.
|
|
@@ -18774,20 +18777,15 @@ class AuroInput extends BaseInput {
|
|
|
18774
18777
|
* @returns {void}
|
|
18775
18778
|
*/
|
|
18776
18779
|
checkDisplayValueSlotChange() {
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
//
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
let hasContent = false;
|
|
18785
|
-
|
|
18786
|
-
if (nodes.length > 0) {
|
|
18787
|
-
hasContent = true;
|
|
18788
|
-
}
|
|
18780
|
+
// flatten:true resolves through auro-combobox's forwarding slot
|
|
18781
|
+
// (<slot name="displayValue" slot="displayValue">) so a clone appended
|
|
18782
|
+
// directly to auro-input's light DOM alongside the forwarder still
|
|
18783
|
+
// counts as content. The prior nodes[0].tagName === 'SLOT' recursion
|
|
18784
|
+
// discarded any siblings past the forwarder.
|
|
18785
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
18786
|
+
const nodes = slot.assignedNodes({ flatten: true });
|
|
18789
18787
|
|
|
18790
|
-
this.hasDisplayValueContent =
|
|
18788
|
+
this.hasDisplayValueContent = nodes.length > 0;
|
|
18791
18789
|
}
|
|
18792
18790
|
|
|
18793
18791
|
firstUpdated() {
|
|
@@ -19614,7 +19612,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19614
19612
|
}
|
|
19615
19613
|
}
|
|
19616
19614
|
|
|
19617
|
-
var formkitVersion = '
|
|
19615
|
+
var formkitVersion = '202607022214';
|
|
19618
19616
|
|
|
19619
19617
|
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}`;
|
|
19620
19618
|
|
|
@@ -20713,9 +20711,19 @@ class AuroCombobox extends AuroElement {
|
|
|
20713
20711
|
/**
|
|
20714
20712
|
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
20715
20713
|
* @private
|
|
20714
|
+
* @param {object} [options={}] - Optional flag bag.
|
|
20715
|
+
* @param {boolean} [options.preferComboboxValue=false] - When true,
|
|
20716
|
+
* handleMenuOptions matches the selected option against `this.value`
|
|
20717
|
+
* first instead of `this.input.value`. Needed on mount and re-mount
|
|
20718
|
+
* because under `persistInput` the consumer's typedValue prop can drift
|
|
20719
|
+
* from the framework value (Svelte `{#key}` re-mount after a swap, or
|
|
20720
|
+
* SPA preselect after route change) and the old input-first match would
|
|
20721
|
+
* then pick the stale text. Only handleSlotChange passes this; typing
|
|
20722
|
+
* and clearing paths keep the input-first match so user clears aren't
|
|
20723
|
+
* undone.
|
|
20716
20724
|
* @returns {void}
|
|
20717
20725
|
*/
|
|
20718
|
-
handleMenuOptions() {
|
|
20726
|
+
handleMenuOptions({ preferComboboxValue = false } = {}) {
|
|
20719
20727
|
this.generateOptionsArray();
|
|
20720
20728
|
this.availableOptions = [];
|
|
20721
20729
|
// Single source of truth for the menu's filter/highlight token per call.
|
|
@@ -20736,7 +20744,20 @@ class AuroCombobox extends AuroElement {
|
|
|
20736
20744
|
option.setAttribute('aria-posinset', index + 1);
|
|
20737
20745
|
});
|
|
20738
20746
|
|
|
20739
|
-
|
|
20747
|
+
// On mount/re-mount (via handleSlotChange), prefer the framework-set
|
|
20748
|
+
// `this.value` when it matches a menu option. Covers SPA preselect and
|
|
20749
|
+
// consumer swap patterns (e.g. Svelte `{#key}` re-mount) where
|
|
20750
|
+
// `this.value` is authoritative but `this.input.value` may be empty or
|
|
20751
|
+
// carry stale typed text from another field. Event-driven callers do
|
|
20752
|
+
// not pass the flag, otherwise user clears would be undone by
|
|
20753
|
+
// re-syncing to the previous combobox.value.
|
|
20754
|
+
if (preferComboboxValue &&
|
|
20755
|
+
this.value &&
|
|
20756
|
+
this.menu.options?.some((opt) => opt.value === this.value)) {
|
|
20757
|
+
this.setMenuValue(this.value);
|
|
20758
|
+
this.syncValuesAndStates();
|
|
20759
|
+
} else if (this.input.value &&
|
|
20760
|
+
this.menu.options?.some((opt) => opt.value === this.input.value)) {
|
|
20740
20761
|
this.setMenuValue(this.input.value);
|
|
20741
20762
|
this.syncValuesAndStates();
|
|
20742
20763
|
}
|
|
@@ -21173,7 +21194,25 @@ class AuroCombobox extends AuroElement {
|
|
|
21173
21194
|
this.optionActive = evt.detail;
|
|
21174
21195
|
|
|
21175
21196
|
if (this.input) {
|
|
21176
|
-
|
|
21197
|
+
// setActiveDescendant runs after Lit's update finishes because the
|
|
21198
|
+
// template's `.a11yActivedescendant` binding calls setAttribute on
|
|
21199
|
+
// the internal <input> in auro-input.updated(), which clears the
|
|
21200
|
+
// reflected ariaActiveDescendantElement property. Setting the ref
|
|
21201
|
+
// synchronously here would get overwritten by that attribute write.
|
|
21202
|
+
// Awaiting updateComplete lets the attribute write finish first,
|
|
21203
|
+
// then the ref sticks and screen readers can cross the shadow-DOM
|
|
21204
|
+
// boundary to the auro-menuoption in light DOM.
|
|
21205
|
+
//
|
|
21206
|
+
// The equality check covers the async gap: this.optionActive can
|
|
21207
|
+
// change before the callback runs (user arrowed elsewhere, or the
|
|
21208
|
+
// menu closed and cleared it to null), so we bail if the target
|
|
21209
|
+
// no longer matches to avoid reinstating a stale ref.
|
|
21210
|
+
const targetOption = this.optionActive;
|
|
21211
|
+
this.updateComplete.then(() => {
|
|
21212
|
+
if (this.input && this.optionActive === targetOption) {
|
|
21213
|
+
this.input.setActiveDescendant(targetOption);
|
|
21214
|
+
}
|
|
21215
|
+
});
|
|
21177
21216
|
}
|
|
21178
21217
|
|
|
21179
21218
|
// In fullscreen mode the menu sits inside a nested <dialog> shadow root,
|
|
@@ -21310,6 +21349,18 @@ class AuroCombobox extends AuroElement {
|
|
|
21310
21349
|
}
|
|
21311
21350
|
}
|
|
21312
21351
|
|
|
21352
|
+
// SPA preselect guard: on init render, auro-input's notifyValueChanged
|
|
21353
|
+
// echoes an empty value through as an isProgrammatic input event before
|
|
21354
|
+
// the framework-set combobox.value has propagated down to the input.
|
|
21355
|
+
// Without this bail, the `this.value = this.input.value` below clobbers
|
|
21356
|
+
// the framework value with '' and clear() wipes optionSelected. Scoped
|
|
21357
|
+
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21358
|
+
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21359
|
+
// where value/input already track each other through the sync helpers.
|
|
21360
|
+
if (event && event.isProgrammatic && this.value && !this.input.value) {
|
|
21361
|
+
return;
|
|
21362
|
+
}
|
|
21363
|
+
|
|
21313
21364
|
this.value = this.input.value;
|
|
21314
21365
|
|
|
21315
21366
|
// Ignore re-entrant input events caused by programmatic value sets.
|
|
@@ -21742,7 +21793,11 @@ class AuroCombobox extends AuroElement {
|
|
|
21742
21793
|
}
|
|
21743
21794
|
});
|
|
21744
21795
|
|
|
21745
|
-
|
|
21796
|
+
// Slot change (mount/re-mount): pass `preferComboboxValue` so that a
|
|
21797
|
+
// framework-set `this.value` wins over any stale `input.value` when
|
|
21798
|
+
// matching against the newly-available options. Fixes the display
|
|
21799
|
+
// for SPA preselect and Svelte `{#key}` re-mount swap patterns.
|
|
21800
|
+
this.handleMenuOptions({ preferComboboxValue: true });
|
|
21746
21801
|
|
|
21747
21802
|
break;
|
|
21748
21803
|
|
|
@@ -4879,7 +4879,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4879
4879
|
}
|
|
4880
4880
|
};
|
|
4881
4881
|
|
|
4882
|
-
var formkitVersion$2 = '
|
|
4882
|
+
var formkitVersion$2 = '202607022214';
|
|
4883
4883
|
|
|
4884
4884
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4885
4885
|
static get properties() {
|
|
@@ -17768,14 +17768,17 @@ class BaseInput extends AuroElement$1 {
|
|
|
17768
17768
|
* @returns {void}
|
|
17769
17769
|
*/
|
|
17770
17770
|
notifyValueChanged() {
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17771
|
+
// This echoes Lit's reactive value update (and handleClickClear's
|
|
17772
|
+
// programmatic clear) — it is NOT a fresh user-input event. Mark it
|
|
17773
|
+
// `isProgrammatic` so consumers (e.g. auro-combobox) can distinguish
|
|
17774
|
+
// it from genuine user typing and skip clobbering their own
|
|
17775
|
+
// programmatic state during init-time renders.
|
|
17776
|
+
const inputEvent = new Event('input', {
|
|
17774
17777
|
bubbles: true,
|
|
17775
17778
|
composed: true,
|
|
17776
17779
|
});
|
|
17780
|
+
inputEvent.isProgrammatic = true;
|
|
17777
17781
|
|
|
17778
|
-
// Dispatched event to alert outside shadow DOM context of event firing.
|
|
17779
17782
|
this.dispatchEvent(inputEvent);
|
|
17780
17783
|
}
|
|
17781
17784
|
|
|
@@ -18488,7 +18491,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18488
18491
|
}
|
|
18489
18492
|
};
|
|
18490
18493
|
|
|
18491
|
-
var formkitVersion$1 = '
|
|
18494
|
+
var formkitVersion$1 = '202607022214';
|
|
18492
18495
|
|
|
18493
18496
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18494
18497
|
// See LICENSE in the project root for license information.
|
|
@@ -18774,20 +18777,15 @@ class AuroInput extends BaseInput {
|
|
|
18774
18777
|
* @returns {void}
|
|
18775
18778
|
*/
|
|
18776
18779
|
checkDisplayValueSlotChange() {
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
//
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
let hasContent = false;
|
|
18785
|
-
|
|
18786
|
-
if (nodes.length > 0) {
|
|
18787
|
-
hasContent = true;
|
|
18788
|
-
}
|
|
18780
|
+
// flatten:true resolves through auro-combobox's forwarding slot
|
|
18781
|
+
// (<slot name="displayValue" slot="displayValue">) so a clone appended
|
|
18782
|
+
// directly to auro-input's light DOM alongside the forwarder still
|
|
18783
|
+
// counts as content. The prior nodes[0].tagName === 'SLOT' recursion
|
|
18784
|
+
// discarded any siblings past the forwarder.
|
|
18785
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
18786
|
+
const nodes = slot.assignedNodes({ flatten: true });
|
|
18789
18787
|
|
|
18790
|
-
this.hasDisplayValueContent =
|
|
18788
|
+
this.hasDisplayValueContent = nodes.length > 0;
|
|
18791
18789
|
}
|
|
18792
18790
|
|
|
18793
18791
|
firstUpdated() {
|
|
@@ -19614,7 +19612,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19614
19612
|
}
|
|
19615
19613
|
}
|
|
19616
19614
|
|
|
19617
|
-
var formkitVersion = '
|
|
19615
|
+
var formkitVersion = '202607022214';
|
|
19618
19616
|
|
|
19619
19617
|
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}`;
|
|
19620
19618
|
|
|
@@ -20713,9 +20711,19 @@ class AuroCombobox extends AuroElement {
|
|
|
20713
20711
|
/**
|
|
20714
20712
|
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
20715
20713
|
* @private
|
|
20714
|
+
* @param {object} [options={}] - Optional flag bag.
|
|
20715
|
+
* @param {boolean} [options.preferComboboxValue=false] - When true,
|
|
20716
|
+
* handleMenuOptions matches the selected option against `this.value`
|
|
20717
|
+
* first instead of `this.input.value`. Needed on mount and re-mount
|
|
20718
|
+
* because under `persistInput` the consumer's typedValue prop can drift
|
|
20719
|
+
* from the framework value (Svelte `{#key}` re-mount after a swap, or
|
|
20720
|
+
* SPA preselect after route change) and the old input-first match would
|
|
20721
|
+
* then pick the stale text. Only handleSlotChange passes this; typing
|
|
20722
|
+
* and clearing paths keep the input-first match so user clears aren't
|
|
20723
|
+
* undone.
|
|
20716
20724
|
* @returns {void}
|
|
20717
20725
|
*/
|
|
20718
|
-
handleMenuOptions() {
|
|
20726
|
+
handleMenuOptions({ preferComboboxValue = false } = {}) {
|
|
20719
20727
|
this.generateOptionsArray();
|
|
20720
20728
|
this.availableOptions = [];
|
|
20721
20729
|
// Single source of truth for the menu's filter/highlight token per call.
|
|
@@ -20736,7 +20744,20 @@ class AuroCombobox extends AuroElement {
|
|
|
20736
20744
|
option.setAttribute('aria-posinset', index + 1);
|
|
20737
20745
|
});
|
|
20738
20746
|
|
|
20739
|
-
|
|
20747
|
+
// On mount/re-mount (via handleSlotChange), prefer the framework-set
|
|
20748
|
+
// `this.value` when it matches a menu option. Covers SPA preselect and
|
|
20749
|
+
// consumer swap patterns (e.g. Svelte `{#key}` re-mount) where
|
|
20750
|
+
// `this.value` is authoritative but `this.input.value` may be empty or
|
|
20751
|
+
// carry stale typed text from another field. Event-driven callers do
|
|
20752
|
+
// not pass the flag, otherwise user clears would be undone by
|
|
20753
|
+
// re-syncing to the previous combobox.value.
|
|
20754
|
+
if (preferComboboxValue &&
|
|
20755
|
+
this.value &&
|
|
20756
|
+
this.menu.options?.some((opt) => opt.value === this.value)) {
|
|
20757
|
+
this.setMenuValue(this.value);
|
|
20758
|
+
this.syncValuesAndStates();
|
|
20759
|
+
} else if (this.input.value &&
|
|
20760
|
+
this.menu.options?.some((opt) => opt.value === this.input.value)) {
|
|
20740
20761
|
this.setMenuValue(this.input.value);
|
|
20741
20762
|
this.syncValuesAndStates();
|
|
20742
20763
|
}
|
|
@@ -21173,7 +21194,25 @@ class AuroCombobox extends AuroElement {
|
|
|
21173
21194
|
this.optionActive = evt.detail;
|
|
21174
21195
|
|
|
21175
21196
|
if (this.input) {
|
|
21176
|
-
|
|
21197
|
+
// setActiveDescendant runs after Lit's update finishes because the
|
|
21198
|
+
// template's `.a11yActivedescendant` binding calls setAttribute on
|
|
21199
|
+
// the internal <input> in auro-input.updated(), which clears the
|
|
21200
|
+
// reflected ariaActiveDescendantElement property. Setting the ref
|
|
21201
|
+
// synchronously here would get overwritten by that attribute write.
|
|
21202
|
+
// Awaiting updateComplete lets the attribute write finish first,
|
|
21203
|
+
// then the ref sticks and screen readers can cross the shadow-DOM
|
|
21204
|
+
// boundary to the auro-menuoption in light DOM.
|
|
21205
|
+
//
|
|
21206
|
+
// The equality check covers the async gap: this.optionActive can
|
|
21207
|
+
// change before the callback runs (user arrowed elsewhere, or the
|
|
21208
|
+
// menu closed and cleared it to null), so we bail if the target
|
|
21209
|
+
// no longer matches to avoid reinstating a stale ref.
|
|
21210
|
+
const targetOption = this.optionActive;
|
|
21211
|
+
this.updateComplete.then(() => {
|
|
21212
|
+
if (this.input && this.optionActive === targetOption) {
|
|
21213
|
+
this.input.setActiveDescendant(targetOption);
|
|
21214
|
+
}
|
|
21215
|
+
});
|
|
21177
21216
|
}
|
|
21178
21217
|
|
|
21179
21218
|
// In fullscreen mode the menu sits inside a nested <dialog> shadow root,
|
|
@@ -21310,6 +21349,18 @@ class AuroCombobox extends AuroElement {
|
|
|
21310
21349
|
}
|
|
21311
21350
|
}
|
|
21312
21351
|
|
|
21352
|
+
// SPA preselect guard: on init render, auro-input's notifyValueChanged
|
|
21353
|
+
// echoes an empty value through as an isProgrammatic input event before
|
|
21354
|
+
// the framework-set combobox.value has propagated down to the input.
|
|
21355
|
+
// Without this bail, the `this.value = this.input.value` below clobbers
|
|
21356
|
+
// the framework value with '' and clear() wipes optionSelected. Scoped
|
|
21357
|
+
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21358
|
+
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21359
|
+
// where value/input already track each other through the sync helpers.
|
|
21360
|
+
if (event && event.isProgrammatic && this.value && !this.input.value) {
|
|
21361
|
+
return;
|
|
21362
|
+
}
|
|
21363
|
+
|
|
21313
21364
|
this.value = this.input.value;
|
|
21314
21365
|
|
|
21315
21366
|
// Ignore re-entrant input events caused by programmatic value sets.
|
|
@@ -21742,7 +21793,11 @@ class AuroCombobox extends AuroElement {
|
|
|
21742
21793
|
}
|
|
21743
21794
|
});
|
|
21744
21795
|
|
|
21745
|
-
|
|
21796
|
+
// Slot change (mount/re-mount): pass `preferComboboxValue` so that a
|
|
21797
|
+
// framework-set `this.value` wins over any stale `input.value` when
|
|
21798
|
+
// matching against the newly-available options. Fixes the display
|
|
21799
|
+
// for SPA preselect and Svelte `{#key}` re-mount swap patterns.
|
|
21800
|
+
this.handleMenuOptions({ preferComboboxValue: true });
|
|
21746
21801
|
|
|
21747
21802
|
break;
|
|
21748
21803
|
|
|
@@ -4894,7 +4894,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4894
4894
|
}
|
|
4895
4895
|
};
|
|
4896
4896
|
|
|
4897
|
-
var formkitVersion$2 = '
|
|
4897
|
+
var formkitVersion$2 = '202607022214';
|
|
4898
4898
|
|
|
4899
4899
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4900
4900
|
static get properties() {
|
|
@@ -17783,14 +17783,17 @@ class BaseInput extends AuroElement$1 {
|
|
|
17783
17783
|
* @returns {void}
|
|
17784
17784
|
*/
|
|
17785
17785
|
notifyValueChanged() {
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17786
|
+
// This echoes Lit's reactive value update (and handleClickClear's
|
|
17787
|
+
// programmatic clear) — it is NOT a fresh user-input event. Mark it
|
|
17788
|
+
// `isProgrammatic` so consumers (e.g. auro-combobox) can distinguish
|
|
17789
|
+
// it from genuine user typing and skip clobbering their own
|
|
17790
|
+
// programmatic state during init-time renders.
|
|
17791
|
+
const inputEvent = new Event('input', {
|
|
17789
17792
|
bubbles: true,
|
|
17790
17793
|
composed: true,
|
|
17791
17794
|
});
|
|
17795
|
+
inputEvent.isProgrammatic = true;
|
|
17792
17796
|
|
|
17793
|
-
// Dispatched event to alert outside shadow DOM context of event firing.
|
|
17794
17797
|
this.dispatchEvent(inputEvent);
|
|
17795
17798
|
}
|
|
17796
17799
|
|
|
@@ -18503,7 +18506,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18503
18506
|
}
|
|
18504
18507
|
};
|
|
18505
18508
|
|
|
18506
|
-
var formkitVersion$1 = '
|
|
18509
|
+
var formkitVersion$1 = '202607022214';
|
|
18507
18510
|
|
|
18508
18511
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18509
18512
|
// See LICENSE in the project root for license information.
|
|
@@ -18789,20 +18792,15 @@ class AuroInput extends BaseInput {
|
|
|
18789
18792
|
* @returns {void}
|
|
18790
18793
|
*/
|
|
18791
18794
|
checkDisplayValueSlotChange() {
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
//
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
let hasContent = false;
|
|
18800
|
-
|
|
18801
|
-
if (nodes.length > 0) {
|
|
18802
|
-
hasContent = true;
|
|
18803
|
-
}
|
|
18795
|
+
// flatten:true resolves through auro-combobox's forwarding slot
|
|
18796
|
+
// (<slot name="displayValue" slot="displayValue">) so a clone appended
|
|
18797
|
+
// directly to auro-input's light DOM alongside the forwarder still
|
|
18798
|
+
// counts as content. The prior nodes[0].tagName === 'SLOT' recursion
|
|
18799
|
+
// discarded any siblings past the forwarder.
|
|
18800
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
18801
|
+
const nodes = slot.assignedNodes({ flatten: true });
|
|
18804
18802
|
|
|
18805
|
-
this.hasDisplayValueContent =
|
|
18803
|
+
this.hasDisplayValueContent = nodes.length > 0;
|
|
18806
18804
|
}
|
|
18807
18805
|
|
|
18808
18806
|
firstUpdated() {
|
|
@@ -19629,7 +19627,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19629
19627
|
}
|
|
19630
19628
|
}
|
|
19631
19629
|
|
|
19632
|
-
var formkitVersion = '
|
|
19630
|
+
var formkitVersion = '202607022214';
|
|
19633
19631
|
|
|
19634
19632
|
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}`;
|
|
19635
19633
|
|
|
@@ -20728,9 +20726,19 @@ class AuroCombobox extends AuroElement {
|
|
|
20728
20726
|
/**
|
|
20729
20727
|
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
20730
20728
|
* @private
|
|
20729
|
+
* @param {object} [options={}] - Optional flag bag.
|
|
20730
|
+
* @param {boolean} [options.preferComboboxValue=false] - When true,
|
|
20731
|
+
* handleMenuOptions matches the selected option against `this.value`
|
|
20732
|
+
* first instead of `this.input.value`. Needed on mount and re-mount
|
|
20733
|
+
* because under `persistInput` the consumer's typedValue prop can drift
|
|
20734
|
+
* from the framework value (Svelte `{#key}` re-mount after a swap, or
|
|
20735
|
+
* SPA preselect after route change) and the old input-first match would
|
|
20736
|
+
* then pick the stale text. Only handleSlotChange passes this; typing
|
|
20737
|
+
* and clearing paths keep the input-first match so user clears aren't
|
|
20738
|
+
* undone.
|
|
20731
20739
|
* @returns {void}
|
|
20732
20740
|
*/
|
|
20733
|
-
handleMenuOptions() {
|
|
20741
|
+
handleMenuOptions({ preferComboboxValue = false } = {}) {
|
|
20734
20742
|
this.generateOptionsArray();
|
|
20735
20743
|
this.availableOptions = [];
|
|
20736
20744
|
// Single source of truth for the menu's filter/highlight token per call.
|
|
@@ -20751,7 +20759,20 @@ class AuroCombobox extends AuroElement {
|
|
|
20751
20759
|
option.setAttribute('aria-posinset', index + 1);
|
|
20752
20760
|
});
|
|
20753
20761
|
|
|
20754
|
-
|
|
20762
|
+
// On mount/re-mount (via handleSlotChange), prefer the framework-set
|
|
20763
|
+
// `this.value` when it matches a menu option. Covers SPA preselect and
|
|
20764
|
+
// consumer swap patterns (e.g. Svelte `{#key}` re-mount) where
|
|
20765
|
+
// `this.value` is authoritative but `this.input.value` may be empty or
|
|
20766
|
+
// carry stale typed text from another field. Event-driven callers do
|
|
20767
|
+
// not pass the flag, otherwise user clears would be undone by
|
|
20768
|
+
// re-syncing to the previous combobox.value.
|
|
20769
|
+
if (preferComboboxValue &&
|
|
20770
|
+
this.value &&
|
|
20771
|
+
this.menu.options?.some((opt) => opt.value === this.value)) {
|
|
20772
|
+
this.setMenuValue(this.value);
|
|
20773
|
+
this.syncValuesAndStates();
|
|
20774
|
+
} else if (this.input.value &&
|
|
20775
|
+
this.menu.options?.some((opt) => opt.value === this.input.value)) {
|
|
20755
20776
|
this.setMenuValue(this.input.value);
|
|
20756
20777
|
this.syncValuesAndStates();
|
|
20757
20778
|
}
|
|
@@ -21188,7 +21209,25 @@ class AuroCombobox extends AuroElement {
|
|
|
21188
21209
|
this.optionActive = evt.detail;
|
|
21189
21210
|
|
|
21190
21211
|
if (this.input) {
|
|
21191
|
-
|
|
21212
|
+
// setActiveDescendant runs after Lit's update finishes because the
|
|
21213
|
+
// template's `.a11yActivedescendant` binding calls setAttribute on
|
|
21214
|
+
// the internal <input> in auro-input.updated(), which clears the
|
|
21215
|
+
// reflected ariaActiveDescendantElement property. Setting the ref
|
|
21216
|
+
// synchronously here would get overwritten by that attribute write.
|
|
21217
|
+
// Awaiting updateComplete lets the attribute write finish first,
|
|
21218
|
+
// then the ref sticks and screen readers can cross the shadow-DOM
|
|
21219
|
+
// boundary to the auro-menuoption in light DOM.
|
|
21220
|
+
//
|
|
21221
|
+
// The equality check covers the async gap: this.optionActive can
|
|
21222
|
+
// change before the callback runs (user arrowed elsewhere, or the
|
|
21223
|
+
// menu closed and cleared it to null), so we bail if the target
|
|
21224
|
+
// no longer matches to avoid reinstating a stale ref.
|
|
21225
|
+
const targetOption = this.optionActive;
|
|
21226
|
+
this.updateComplete.then(() => {
|
|
21227
|
+
if (this.input && this.optionActive === targetOption) {
|
|
21228
|
+
this.input.setActiveDescendant(targetOption);
|
|
21229
|
+
}
|
|
21230
|
+
});
|
|
21192
21231
|
}
|
|
21193
21232
|
|
|
21194
21233
|
// In fullscreen mode the menu sits inside a nested <dialog> shadow root,
|
|
@@ -21325,6 +21364,18 @@ class AuroCombobox extends AuroElement {
|
|
|
21325
21364
|
}
|
|
21326
21365
|
}
|
|
21327
21366
|
|
|
21367
|
+
// SPA preselect guard: on init render, auro-input's notifyValueChanged
|
|
21368
|
+
// echoes an empty value through as an isProgrammatic input event before
|
|
21369
|
+
// the framework-set combobox.value has propagated down to the input.
|
|
21370
|
+
// Without this bail, the `this.value = this.input.value` below clobbers
|
|
21371
|
+
// the framework value with '' and clear() wipes optionSelected. Scoped
|
|
21372
|
+
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21373
|
+
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21374
|
+
// where value/input already track each other through the sync helpers.
|
|
21375
|
+
if (event && event.isProgrammatic && this.value && !this.input.value) {
|
|
21376
|
+
return;
|
|
21377
|
+
}
|
|
21378
|
+
|
|
21328
21379
|
this.value = this.input.value;
|
|
21329
21380
|
|
|
21330
21381
|
// Ignore re-entrant input events caused by programmatic value sets.
|
|
@@ -21757,7 +21808,11 @@ class AuroCombobox extends AuroElement {
|
|
|
21757
21808
|
}
|
|
21758
21809
|
});
|
|
21759
21810
|
|
|
21760
|
-
|
|
21811
|
+
// Slot change (mount/re-mount): pass `preferComboboxValue` so that a
|
|
21812
|
+
// framework-set `this.value` wins over any stale `input.value` when
|
|
21813
|
+
// matching against the newly-available options. Fixes the display
|
|
21814
|
+
// for SPA preselect and Svelte `{#key}` re-mount swap patterns.
|
|
21815
|
+
this.handleMenuOptions({ preferComboboxValue: true });
|
|
21761
21816
|
|
|
21762
21817
|
break;
|
|
21763
21818
|
|
|
@@ -424,6 +424,16 @@ export class AuroCombobox extends AuroElement {
|
|
|
424
424
|
/**
|
|
425
425
|
* Processes hidden state of all menu options and determines if there are any available options not hidden.
|
|
426
426
|
* @private
|
|
427
|
+
* @param {object} [options={}] - Optional flag bag.
|
|
428
|
+
* @param {boolean} [options.preferComboboxValue=false] - When true,
|
|
429
|
+
* handleMenuOptions matches the selected option against `this.value`
|
|
430
|
+
* first instead of `this.input.value`. Needed on mount and re-mount
|
|
431
|
+
* because under `persistInput` the consumer's typedValue prop can drift
|
|
432
|
+
* from the framework value (Svelte `{#key}` re-mount after a swap, or
|
|
433
|
+
* SPA preselect after route change) and the old input-first match would
|
|
434
|
+
* then pick the stale text. Only handleSlotChange passes this; typing
|
|
435
|
+
* and clearing paths keep the input-first match so user clears aren't
|
|
436
|
+
* undone.
|
|
427
437
|
* @returns {void}
|
|
428
438
|
*/
|
|
429
439
|
private handleMenuOptions;
|