@aurodesignsystem-dev/auro-formkit 0.0.0-pr1395.0 → 0.0.0-pr1395.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/api.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/api.min.js +151 -40
- package/components/combobox/demo/index.min.js +151 -40
- package/components/combobox/dist/index.js +3 -3
- package/components/combobox/dist/registered.js +3 -3
- package/components/counter/demo/api.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.min.js +74 -13
- package/components/datepicker/demo/index.min.js +74 -13
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +4 -0
- package/components/datepicker/dist/index.js +74 -13
- package/components/datepicker/dist/registered.js +74 -13
- package/components/dropdown/demo/api.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/api.min.js +240 -63
- package/components/form/demo/index.min.js +240 -63
- package/components/input/demo/api.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/api.md +1 -1
- package/components/menu/demo/api.min.js +148 -37
- package/components/menu/demo/index.min.js +148 -37
- package/components/menu/dist/auro-menu.context.d.ts +15 -3
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +148 -37
- package/components/menu/dist/registered.js +148 -37
- package/components/radio/demo/api.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.min.js +158 -42
- package/components/select/demo/index.min.js +158 -42
- package/components/select/dist/index.js +10 -5
- package/components/select/dist/registered.js +10 -5
- package/custom-elements.json +1514 -1429
- package/package.json +11 -4
|
@@ -1687,7 +1687,7 @@ class AuroHelpText extends i$2 {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
|
-
var formkitVersion = '
|
|
1690
|
+
var formkitVersion = '202603241855';
|
|
1691
1691
|
|
|
1692
1692
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1693
1693
|
// See LICENSE in the project root for license information.
|
|
@@ -1679,7 +1679,7 @@ class AuroHelpText extends i$2 {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
-
var formkitVersion = '
|
|
1682
|
+
var formkitVersion = '202603241855';
|
|
1683
1683
|
|
|
1684
1684
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1685
1685
|
// See LICENSE in the project root for license information.
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202603241855';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -1632,7 +1632,7 @@ class AuroHelpText extends LitElement {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
|
|
1635
|
-
var formkitVersion = '
|
|
1635
|
+
var formkitVersion = '202603241855';
|
|
1636
1636
|
|
|
1637
1637
|
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1638
1638
|
// See LICENSE in the project root for license information.
|
|
@@ -5036,7 +5036,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5036
5036
|
}
|
|
5037
5037
|
};
|
|
5038
5038
|
|
|
5039
|
-
var formkitVersion$2 = '
|
|
5039
|
+
var formkitVersion$2 = '202603241855';
|
|
5040
5040
|
|
|
5041
5041
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5042
5042
|
static get properties() {
|
|
@@ -12791,7 +12791,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12791
12791
|
}
|
|
12792
12792
|
};
|
|
12793
12793
|
|
|
12794
|
-
var formkitVersion$1 = '
|
|
12794
|
+
var formkitVersion$1 = '202603241855';
|
|
12795
12795
|
|
|
12796
12796
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12797
12797
|
// See LICENSE in the project root for license information.
|
|
@@ -13830,7 +13830,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13830
13830
|
}
|
|
13831
13831
|
}
|
|
13832
13832
|
|
|
13833
|
-
var formkitVersion = '
|
|
13833
|
+
var formkitVersion = '202603241855';
|
|
13834
13834
|
|
|
13835
13835
|
var styleCss$3 = i$7`.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}`;
|
|
13836
13836
|
|
|
@@ -16018,10 +16018,20 @@ class AuroMenuOption extends AuroElement {
|
|
|
16018
16018
|
subscribe: true
|
|
16019
16019
|
});
|
|
16020
16020
|
|
|
16021
|
-
// Establish the key property as early as possible
|
|
16021
|
+
// Establish the key property as early as possible.
|
|
16022
|
+
// When a framework (e.g. Svelte) inserts the element into the DOM before
|
|
16023
|
+
// setting its `value` property, both `getAttribute('value')` and
|
|
16024
|
+
// `getAttribute('key')` return null here. Setting `this.key = null`
|
|
16025
|
+
// would block the fallback in `updated()` that assigns key from the
|
|
16026
|
+
// value property (the guard checked `=== undefined`). Only assign key
|
|
16027
|
+
// if at least one source attribute is actually present so that the
|
|
16028
|
+
// `updated()` fallback can run when the value property arrives later.
|
|
16022
16029
|
const valueAttr = this.getAttribute('value');
|
|
16023
16030
|
const keyAttr = this.getAttribute('key');
|
|
16024
|
-
|
|
16031
|
+
const resolvedKey = keyAttr !== null ? keyAttr : valueAttr;
|
|
16032
|
+
if (resolvedKey !== null) {
|
|
16033
|
+
this.key = resolvedKey;
|
|
16034
|
+
}
|
|
16025
16035
|
}
|
|
16026
16036
|
|
|
16027
16037
|
firstUpdated() {
|
|
@@ -16071,8 +16081,14 @@ class AuroMenuOption extends AuroElement {
|
|
|
16071
16081
|
this.updateTextHighlight();
|
|
16072
16082
|
}
|
|
16073
16083
|
|
|
16074
|
-
// Set the key to be the passed value if no key is provided
|
|
16075
|
-
|
|
16084
|
+
// Set the key to be the passed value if no key is provided.
|
|
16085
|
+
// Loose equality (== null) is intentional: it catches both null AND
|
|
16086
|
+
// undefined. When a framework (e.g. Svelte, React) inserts the element
|
|
16087
|
+
// before setting its value property, connectedCallback skips key
|
|
16088
|
+
// assignment because both attributes are null at that point. The Lit
|
|
16089
|
+
// property default for `key` is undefined (not null), so strict
|
|
16090
|
+
// === null would miss the case and the fallback would never run.
|
|
16091
|
+
if (changedProperties.has('value') && this.key == null) { // eslint-disable-line eqeqeq, no-eq-null
|
|
16076
16092
|
this.key = this.value;
|
|
16077
16093
|
}
|
|
16078
16094
|
}
|
|
@@ -16441,6 +16457,9 @@ class MenuService {
|
|
|
16441
16457
|
this._subscribers = [];
|
|
16442
16458
|
this.internalUpdateInProgress = false;
|
|
16443
16459
|
this.selectedOptions = [];
|
|
16460
|
+
this._pendingValue = null;
|
|
16461
|
+
this._pendingRetryScheduled = false;
|
|
16462
|
+
this._pendingRetryCount = 0;
|
|
16444
16463
|
}
|
|
16445
16464
|
|
|
16446
16465
|
/**
|
|
@@ -16480,6 +16499,9 @@ class MenuService {
|
|
|
16480
16499
|
hostDisconnected() {
|
|
16481
16500
|
this._subscribers = [];
|
|
16482
16501
|
this._menuOptions = [];
|
|
16502
|
+
this._pendingValue = null;
|
|
16503
|
+
this._pendingRetryScheduled = false;
|
|
16504
|
+
this._pendingRetryCount = 0;
|
|
16483
16505
|
}
|
|
16484
16506
|
|
|
16485
16507
|
/**
|
|
@@ -16682,17 +16704,22 @@ class MenuService {
|
|
|
16682
16704
|
* @param {string|number|Array<string|number>} value - The value(s) to select.
|
|
16683
16705
|
*/
|
|
16684
16706
|
selectByValue(value) {
|
|
16685
|
-
|
|
16686
|
-
if (this.internalUpdateInProgress ||
|
|
16687
|
-
this.host.internalUpdateInProgress ||
|
|
16688
|
-
value === undefined ||
|
|
16707
|
+
const isEmptyValue = value === undefined ||
|
|
16689
16708
|
value === null ||
|
|
16690
16709
|
(Array.isArray(value) && value.length === 0) ||
|
|
16691
|
-
(typeof value === 'string' && value.trim() === '')
|
|
16710
|
+
(typeof value === 'string' && value.trim() === '');
|
|
16711
|
+
|
|
16712
|
+
// Early exit for invalid/empty values
|
|
16713
|
+
if (isEmptyValue) {
|
|
16692
16714
|
return;
|
|
16693
16715
|
}
|
|
16694
16716
|
|
|
16695
|
-
|
|
16717
|
+
// If an internal update cycle is still in progress, defer value application
|
|
16718
|
+
// rather than dropping it.
|
|
16719
|
+
if (this.internalUpdateInProgress || this.host.internalUpdateInProgress) {
|
|
16720
|
+
this.queuePendingValue(value);
|
|
16721
|
+
return;
|
|
16722
|
+
}
|
|
16696
16723
|
|
|
16697
16724
|
// Normalize values to array of strings
|
|
16698
16725
|
const normalizedValues = this._getNormalizedValues(value);
|
|
@@ -16704,33 +16731,100 @@ class MenuService {
|
|
|
16704
16731
|
validatedValues = [normalizedValues[0]];
|
|
16705
16732
|
}
|
|
16706
16733
|
|
|
16734
|
+
if (this._menuOptions.length === 0) {
|
|
16735
|
+
this.queuePendingValue(value);
|
|
16736
|
+
return;
|
|
16737
|
+
}
|
|
16738
|
+
|
|
16707
16739
|
// Find matching options by comparing available options to validated values
|
|
16708
16740
|
const trackedKeys = new Set();
|
|
16709
16741
|
const optionsToSelect = this._menuOptions.filter(option => {
|
|
16710
16742
|
const passesFilter = validatedValues.includes(option.key);
|
|
16711
16743
|
const alreadyTracked = trackedKeys.has(option.key);
|
|
16744
|
+
const isActive = option.isActive;
|
|
16712
16745
|
|
|
16713
16746
|
trackedKeys.add(option.key);
|
|
16714
16747
|
|
|
16715
16748
|
// Include the option in the options to be selected if it passes the filter check and
|
|
16716
16749
|
// either hasn't been tracked yet or selectAllMatchingOptions is true
|
|
16717
|
-
return passesFilter && (!alreadyTracked || (alreadyTracked && this.selectAllMatchingOptions));
|
|
16750
|
+
return isActive && passesFilter && (!alreadyTracked || (alreadyTracked && this.selectAllMatchingOptions));
|
|
16718
16751
|
});
|
|
16719
16752
|
|
|
16720
|
-
// Handle selection
|
|
16721
|
-
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16753
|
+
// Handle no matches: clear existing selection, but do not dispatch an intermediate
|
|
16754
|
+
// undefined value that can overwrite the host value in parent components.
|
|
16755
|
+
if (!optionsToSelect.length) {
|
|
16756
|
+
const hasUnresolvedKeys = this._menuOptions.some((option) => option.isActive && option.key == null);
|
|
16757
|
+
|
|
16758
|
+
if (hasUnresolvedKeys) {
|
|
16759
|
+
this.queuePendingValue(value);
|
|
16760
|
+
return;
|
|
16761
|
+
}
|
|
16762
|
+
|
|
16763
|
+
this.clearPendingValue();
|
|
16764
|
+
|
|
16765
|
+
if (this.selectedOptions.length > 0) {
|
|
16766
|
+
this.selectedOptions = [];
|
|
16767
|
+
}
|
|
16768
|
+
|
|
16769
|
+
// Always notify so the host resets any stale invalid value, even when
|
|
16770
|
+
// selectedOptions was already empty (e.g. double-clicking set-invalid).
|
|
16771
|
+
this.stageUpdate({ reason: 'no-match' });
|
|
16772
|
+
|
|
16773
|
+
// Dispatch failure event if no matches found
|
|
16774
|
+
if (validatedValues.length) {
|
|
16775
|
+
this.dispatchChangeEvent('auroMenu-selectValueFailure', {
|
|
16776
|
+
message: 'No matching options found for the provided value(s).',
|
|
16777
|
+
values: validatedValues
|
|
16778
|
+
});
|
|
16779
|
+
}
|
|
16780
|
+
|
|
16781
|
+
return;
|
|
16725
16782
|
}
|
|
16726
16783
|
|
|
16727
|
-
|
|
16728
|
-
|
|
16729
|
-
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
|
|
16784
|
+
this.clearPendingValue();
|
|
16785
|
+
|
|
16786
|
+
if (this.optionsArraysMatch(optionsToSelect, this.selectedOptions)) {
|
|
16787
|
+
return;
|
|
16788
|
+
}
|
|
16789
|
+
|
|
16790
|
+
// Apply programmatic selection as a single transaction and emit one final state.
|
|
16791
|
+
this.selectedOptions = optionsToSelect;
|
|
16792
|
+
this.stageUpdate();
|
|
16793
|
+
}
|
|
16794
|
+
|
|
16795
|
+
/**
|
|
16796
|
+
* Queues a pending value and schedules a bounded retry.
|
|
16797
|
+
* @param {string|number|Array<string|number>} value - The value to retry.
|
|
16798
|
+
*/
|
|
16799
|
+
queuePendingValue(value) {
|
|
16800
|
+
this._pendingValue = value;
|
|
16801
|
+
|
|
16802
|
+
if (this._pendingRetryScheduled || this._pendingRetryCount >= 5) {
|
|
16803
|
+
return;
|
|
16733
16804
|
}
|
|
16805
|
+
|
|
16806
|
+
this._pendingRetryScheduled = true;
|
|
16807
|
+
this._pendingRetryCount += 1;
|
|
16808
|
+
|
|
16809
|
+
setTimeout(() => {
|
|
16810
|
+
this._pendingRetryScheduled = false;
|
|
16811
|
+
|
|
16812
|
+
if (this._pendingValue == null) {
|
|
16813
|
+
return;
|
|
16814
|
+
}
|
|
16815
|
+
|
|
16816
|
+
const pendingValue = this._pendingValue;
|
|
16817
|
+
this.selectByValue(pendingValue);
|
|
16818
|
+
}, 0);
|
|
16819
|
+
}
|
|
16820
|
+
|
|
16821
|
+
/**
|
|
16822
|
+
* Clears pending retry state.
|
|
16823
|
+
*/
|
|
16824
|
+
clearPendingValue() {
|
|
16825
|
+
this._pendingValue = null;
|
|
16826
|
+
this._pendingRetryScheduled = false;
|
|
16827
|
+
this._pendingRetryCount = 0;
|
|
16734
16828
|
}
|
|
16735
16829
|
|
|
16736
16830
|
/**
|
|
@@ -16769,9 +16863,9 @@ class MenuService {
|
|
|
16769
16863
|
/**
|
|
16770
16864
|
* Stages an update to notify subscribers of state and value changes.
|
|
16771
16865
|
*/
|
|
16772
|
-
stageUpdate() {
|
|
16773
|
-
this.notifyStateChange();
|
|
16774
|
-
this.notifyValueChange();
|
|
16866
|
+
stageUpdate(meta = {}) {
|
|
16867
|
+
this.notifyStateChange(meta);
|
|
16868
|
+
this.notifyValueChange(meta);
|
|
16775
16869
|
}
|
|
16776
16870
|
|
|
16777
16871
|
/**
|
|
@@ -16786,14 +16880,18 @@ class MenuService {
|
|
|
16786
16880
|
/**
|
|
16787
16881
|
* Notifies subscribers of a state change (selected options has changed).
|
|
16788
16882
|
*/
|
|
16789
|
-
notifyStateChange() {
|
|
16790
|
-
this.notify({
|
|
16883
|
+
notifyStateChange(meta = {}) {
|
|
16884
|
+
this.notify({
|
|
16885
|
+
type: 'stateChange',
|
|
16886
|
+
selectedOptions: this.selectedOptions,
|
|
16887
|
+
...meta
|
|
16888
|
+
});
|
|
16791
16889
|
}
|
|
16792
16890
|
|
|
16793
16891
|
/**
|
|
16794
16892
|
* Notifies subscribers of a value change (current value has changed).
|
|
16795
16893
|
*/
|
|
16796
|
-
notifyValueChange() {
|
|
16894
|
+
notifyValueChange(meta = {}) {
|
|
16797
16895
|
|
|
16798
16896
|
// Prepare details for the event
|
|
16799
16897
|
const details = {
|
|
@@ -16809,10 +16907,9 @@ class MenuService {
|
|
|
16809
16907
|
|
|
16810
16908
|
this.notify({
|
|
16811
16909
|
type: 'valueChange',
|
|
16910
|
+
...meta,
|
|
16812
16911
|
...details
|
|
16813
16912
|
});
|
|
16814
|
-
|
|
16815
|
-
this.dispatchChangeEvent('auroMenu-selectedOption', details);
|
|
16816
16913
|
}
|
|
16817
16914
|
|
|
16818
16915
|
/**
|
|
@@ -16840,6 +16937,10 @@ class MenuService {
|
|
|
16840
16937
|
addMenuOption(option) {
|
|
16841
16938
|
this._menuOptions.push(option);
|
|
16842
16939
|
this.notify({ type: 'optionsChange', options: this._menuOptions });
|
|
16940
|
+
|
|
16941
|
+
if (this._pendingValue != null) {
|
|
16942
|
+
this.queuePendingValue(this._pendingValue);
|
|
16943
|
+
}
|
|
16843
16944
|
}
|
|
16844
16945
|
|
|
16845
16946
|
/**
|
|
@@ -16849,6 +16950,10 @@ class MenuService {
|
|
|
16849
16950
|
removeMenuOption(option) {
|
|
16850
16951
|
this._menuOptions = this._menuOptions.filter(opt => opt !== option);
|
|
16851
16952
|
this.notify({ type: 'optionsChange', options: this._menuOptions });
|
|
16953
|
+
|
|
16954
|
+
if (this._menuOptions.length === 0) {
|
|
16955
|
+
this.clearPendingValue();
|
|
16956
|
+
}
|
|
16852
16957
|
}
|
|
16853
16958
|
|
|
16854
16959
|
/**
|
|
@@ -17122,7 +17227,7 @@ class AuroMenu extends AuroElement {
|
|
|
17122
17227
|
},
|
|
17123
17228
|
|
|
17124
17229
|
/**
|
|
17125
|
-
* Available menu options
|
|
17230
|
+
* Available menu options.
|
|
17126
17231
|
* @readonly
|
|
17127
17232
|
*/
|
|
17128
17233
|
options: {
|
|
@@ -17189,7 +17294,7 @@ class AuroMenu extends AuroElement {
|
|
|
17189
17294
|
/**
|
|
17190
17295
|
* @readonly
|
|
17191
17296
|
* @returns {Array<HTMLElement>} - Returns the array of available menu options.
|
|
17192
|
-
* @deprecated
|
|
17297
|
+
* @deprecated Use `options` property instead.
|
|
17193
17298
|
*/
|
|
17194
17299
|
get items() {
|
|
17195
17300
|
return this.options;
|
|
@@ -17297,7 +17402,7 @@ class AuroMenu extends AuroElement {
|
|
|
17297
17402
|
const newValue = event.stringValue;
|
|
17298
17403
|
|
|
17299
17404
|
// Check if the option or value has actually changed
|
|
17300
|
-
if (
|
|
17405
|
+
if (this.optionSelected !== newOption || this.stringValue !== newValue) {
|
|
17301
17406
|
this.optionSelected = newOption;
|
|
17302
17407
|
this.setInternalValue(newValue);
|
|
17303
17408
|
}
|
|
@@ -17371,8 +17476,13 @@ class AuroMenu extends AuroElement {
|
|
|
17371
17476
|
updated(changedProperties) {
|
|
17372
17477
|
super.updated(changedProperties);
|
|
17373
17478
|
|
|
17374
|
-
//
|
|
17375
|
-
|
|
17479
|
+
// Apply value selection synchronously so that static-HTML fixtures
|
|
17480
|
+
// resolve within a single update cycle. The refactored selectByValue
|
|
17481
|
+
// no longer calls reset() first, so the destructive intermediate-event
|
|
17482
|
+
// cascade that originally required deferral is eliminated. If option
|
|
17483
|
+
// keys are not yet resolved (framework mount-order race), selectByValue
|
|
17484
|
+
// queues a bounded retry automatically via queuePendingValue.
|
|
17485
|
+
if (changedProperties.has('value') && !this.internalUpdateInProgress) {
|
|
17376
17486
|
this.menuService.selectByValue(this.value);
|
|
17377
17487
|
}
|
|
17378
17488
|
|
|
@@ -17552,12 +17662,13 @@ class AuroMenu extends AuroElement {
|
|
|
17552
17662
|
* @param {any} source - The source that triggers this event.
|
|
17553
17663
|
* @private
|
|
17554
17664
|
*/
|
|
17555
|
-
notifySelectionChange({value, stringValue, keys, options} = {}) {
|
|
17665
|
+
notifySelectionChange({value, stringValue, keys, options, reason} = {}) {
|
|
17556
17666
|
dispatchMenuEvent(this, 'auroMenu-selectedOption', {
|
|
17557
17667
|
value,
|
|
17558
17668
|
stringValue,
|
|
17559
17669
|
keys,
|
|
17560
|
-
options
|
|
17670
|
+
options,
|
|
17671
|
+
reason
|
|
17561
17672
|
});
|
|
17562
17673
|
}
|
|
17563
17674
|
|