@aurodesignsystem-dev/auro-formkit 0.0.0-pr1603.4 → 0.0.0-pr1604.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +4 -102
- package/components/combobox/demo/getting-started.md +49 -0
- package/components/combobox/demo/getting-started.min.js +23 -102
- package/components/combobox/demo/index.min.js +4 -102
- package/components/combobox/dist/auro-combobox.d.ts +0 -22
- package/components/combobox/dist/index.js +4 -86
- package/components/combobox/dist/registered.js +4 -86
- package/components/counter/demo/api.md +2 -0
- package/components/counter/demo/customize.min.js +26 -2
- package/components/counter/demo/getting-started.html +3 -1
- package/components/counter/demo/getting-started.md +49 -0
- package/components/counter/demo/getting-started.min.js +8492 -0
- package/components/counter/demo/index.min.js +26 -2
- package/components/counter/dist/auro-counter-group.d.ts +6 -0
- package/components/counter/dist/auro-counter.d.ts +6 -0
- package/components/counter/dist/index.js +26 -2
- package/components/counter/dist/registered.js +26 -2
- package/components/datepicker/demo/customize.min.js +3 -3
- package/components/datepicker/demo/getting-started.html +3 -1
- package/components/datepicker/demo/getting-started.md +39 -0
- package/components/datepicker/demo/getting-started.min.js +37626 -0
- 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 +44 -113
- package/components/form/demo/getting-started.min.js +44 -113
- package/components/form/demo/index.min.js +44 -113
- package/components/form/demo/registerDemoDeps.min.js +38 -112
- package/components/form/dist/index.js +6 -1
- package/components/form/dist/registered.js +6 -1
- package/components/input/demo/customize.md +0 -37
- package/components/input/demo/customize.min.js +1 -10
- package/components/input/demo/getting-started.md +33 -0
- package/components/input/demo/getting-started.min.js +21 -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 +0 -16
- package/components/menu/dist/index.js +0 -16
- package/components/menu/dist/registered.js +0 -16
- 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 +2 -18
- package/components/select/demo/getting-started.md +49 -0
- package/components/select/demo/getting-started.min.js +24 -19
- package/components/select/demo/index.min.js +2 -18
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +1492 -1492
- package/package.json +1 -1
|
@@ -351,7 +351,6 @@ 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;
|
|
355
354
|
checkmark: boolean | undefined;
|
|
356
355
|
dvInputOnly: boolean | undefined;
|
|
357
356
|
/** @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'} */
|
|
@@ -539,27 +538,6 @@ export class AuroCombobox extends AuroElement {
|
|
|
539
538
|
* @returns {void}
|
|
540
539
|
*/
|
|
541
540
|
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;
|
|
563
541
|
/**
|
|
564
542
|
* Manages the visibility of the dropdown based on loading state changes.
|
|
565
543
|
*
|
|
@@ -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 = '202609011830';
|
|
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 = '202609011830';
|
|
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 = '202609011830';
|
|
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,11 +20494,6 @@ 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
|
-
|
|
20502
20497
|
// Defaults that effect the overall layout of the combobox
|
|
20503
20498
|
this.checkmark = false;
|
|
20504
20499
|
this.dvInputOnly = false;
|
|
@@ -21456,13 +21451,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21456
21451
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
21457
21452
|
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
21458
21453
|
|
|
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
|
-
|
|
21466
21454
|
// Pass label text to the dropdown bib for accessible dialog naming
|
|
21467
21455
|
const labelElement = this.querySelector('[slot="label"]');
|
|
21468
21456
|
if (labelElement) {
|
|
@@ -21848,52 +21836,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21848
21836
|
this.clearBtnFocused = false;
|
|
21849
21837
|
}
|
|
21850
21838
|
});
|
|
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);
|
|
21897
21839
|
}
|
|
21898
21840
|
|
|
21899
21841
|
/**
|
|
@@ -21935,17 +21877,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21935
21877
|
* @returns {void}
|
|
21936
21878
|
*/
|
|
21937
21879
|
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
|
-
|
|
21949
21880
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
21950
21881
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
21951
21882
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -21993,12 +21924,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21993
21924
|
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21994
21925
|
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21995
21926
|
// where value/input already track each other through the sync helpers.
|
|
21996
|
-
|
|
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) {
|
|
21927
|
+
if (event && event.isProgrammatic && this.value && !this.input.value) {
|
|
22002
21928
|
return;
|
|
22003
21929
|
}
|
|
22004
21930
|
|
|
@@ -22241,14 +22167,6 @@ class AuroCombobox extends AuroElement {
|
|
|
22241
22167
|
}
|
|
22242
22168
|
if (this.menu.value || this.menu.optionSelected) {
|
|
22243
22169
|
this.menu.reset();
|
|
22244
|
-
} else {
|
|
22245
|
-
// The menu's selection properties are already cleared, but option
|
|
22246
|
-
// elements can still carry a stale `selected` attribute (e.g. the menu
|
|
22247
|
-
// options were rebuilt after the value was set, orphaning the DOM from
|
|
22248
|
-
// the now-null optionSelected). reset() is skipped above in that case,
|
|
22249
|
-
// so re-sync the option DOM directly to guarantee no option renders as
|
|
22250
|
-
// selected once the field is cleared (AB#1634259).
|
|
22251
|
-
this.menu.clearSelection();
|
|
22252
22170
|
}
|
|
22253
22171
|
} finally {
|
|
22254
22172
|
this._clearing = false;
|
|
@@ -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 = '202609011830';
|
|
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 = '202609011830';
|
|
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 = '202609011830';
|
|
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,11 +20494,6 @@ 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
|
-
|
|
20502
20497
|
// Defaults that effect the overall layout of the combobox
|
|
20503
20498
|
this.checkmark = false;
|
|
20504
20499
|
this.dvInputOnly = false;
|
|
@@ -21456,13 +21451,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21456
21451
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
21457
21452
|
this.inputInBib = this.bibtemplate.querySelector(this.inputTag._$litStatic$);
|
|
21458
21453
|
|
|
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
|
-
|
|
21466
21454
|
// Pass label text to the dropdown bib for accessible dialog naming
|
|
21467
21455
|
const labelElement = this.querySelector('[slot="label"]');
|
|
21468
21456
|
if (labelElement) {
|
|
@@ -21848,52 +21836,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21848
21836
|
this.clearBtnFocused = false;
|
|
21849
21837
|
}
|
|
21850
21838
|
});
|
|
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);
|
|
21897
21839
|
}
|
|
21898
21840
|
|
|
21899
21841
|
/**
|
|
@@ -21935,17 +21877,6 @@ class AuroCombobox extends AuroElement {
|
|
|
21935
21877
|
* @returns {void}
|
|
21936
21878
|
*/
|
|
21937
21879
|
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
|
-
|
|
21949
21880
|
// When the event comes from the fullscreen bib input, sync the value to
|
|
21950
21881
|
// the trigger input. Setting trigger.value triggers Lit's updated()
|
|
21951
21882
|
// (async, microtask) which fires notifyValueChanged() → another 'input'
|
|
@@ -21993,12 +21924,7 @@ class AuroCombobox extends AuroElement {
|
|
|
21993
21924
|
// to the exact shape of that echo (isProgrammatic + non-empty combobox
|
|
21994
21925
|
// value + empty input.value) so it doesn't affect the swap/typed paths
|
|
21995
21926
|
// where value/input already track each other through the sync helpers.
|
|
21996
|
-
|
|
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) {
|
|
21927
|
+
if (event && event.isProgrammatic && this.value && !this.input.value) {
|
|
22002
21928
|
return;
|
|
22003
21929
|
}
|
|
22004
21930
|
|
|
@@ -22241,14 +22167,6 @@ class AuroCombobox extends AuroElement {
|
|
|
22241
22167
|
}
|
|
22242
22168
|
if (this.menu.value || this.menu.optionSelected) {
|
|
22243
22169
|
this.menu.reset();
|
|
22244
|
-
} else {
|
|
22245
|
-
// The menu's selection properties are already cleared, but option
|
|
22246
|
-
// elements can still carry a stale `selected` attribute (e.g. the menu
|
|
22247
|
-
// options were rebuilt after the value was set, orphaning the DOM from
|
|
22248
|
-
// the now-null optionSelected). reset() is skipped above in that case,
|
|
22249
|
-
// so re-sync the option DOM directly to guarantee no option renders as
|
|
22250
|
-
// selected once the field is cleared (AB#1634259).
|
|
22251
|
-
this.menu.clearSelection();
|
|
22252
22170
|
}
|
|
22253
22171
|
} finally {
|
|
22254
22172
|
this._clearing = false;
|
|
@@ -35,6 +35,7 @@ The `auro-counter-group` element provides a flexible interface for grouping mult
|
|
|
35
35
|
| Method | Type | Description |
|
|
36
36
|
|------------|----------------------------------------|--------------------------------------------------|
|
|
37
37
|
| `hideBib` | `(): void` | Hides the dropdown bib if its open. |
|
|
38
|
+
| `reset` | `(): void` | Resets the counter group to its initial state by resetting each child counter and clearing validity.<br />Each child reset dispatches an `input` event, which triggers `updateValue()` to recompute `value`/`total`. |
|
|
38
39
|
| `showBib` | `(): void` | Shows the dropdown bib if there are options to show. |
|
|
39
40
|
| `validate` | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
40
41
|
|
|
@@ -86,6 +87,7 @@ The `auro-counter` element provides a flexible counter interface with increment
|
|
|
86
87
|
|-------------|----------------------------------------|--------------------------------------------------|
|
|
87
88
|
| `decrement` | `(value?: number \| undefined): void` | Decrements the value of the counter by 1. If a value is provided, it decrements by that amount.<br /><br />**value**: The amount to decrement by. |
|
|
88
89
|
| `increment` | `(value?: number \| undefined): void` | Increments the counter value by 1. If a value is provided, it increments by that amount.<br /><br />**value**: The amount to increment by. |
|
|
90
|
+
| `reset` | `(): void` | Resets the counter to its default state, clearing validity/touched state and returning<br />the value to `min` — matching the clear-on-reset behavior of the other Auro form elements. |
|
|
89
91
|
| `validate` | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
90
92
|
|
|
91
93
|
## Events
|
|
@@ -1127,7 +1127,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
1129
|
|
|
1130
|
-
var formkitVersion$1 = '
|
|
1130
|
+
var formkitVersion$1 = '202609011830';
|
|
1131
1131
|
|
|
1132
1132
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1133
1133
|
// See LICENSE in the project root for license information.
|
|
@@ -1485,6 +1485,17 @@ class AuroCounter extends i$2 {
|
|
|
1485
1485
|
this.validation.validate(this, force);
|
|
1486
1486
|
}
|
|
1487
1487
|
|
|
1488
|
+
/**
|
|
1489
|
+
* Resets the counter to its default state, clearing validity/touched state and returning
|
|
1490
|
+
* the value to `min` — matching the clear-on-reset behavior of the other Auro form elements.
|
|
1491
|
+
* @returns {void}
|
|
1492
|
+
*/
|
|
1493
|
+
reset() {
|
|
1494
|
+
// validation.reset() clears validity/touched and sets value to undefined; initValue() then restores the min floor.
|
|
1495
|
+
this.validation.reset(this);
|
|
1496
|
+
this.initValue();
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1488
1499
|
firstUpdated() {
|
|
1489
1500
|
this.initValue();
|
|
1490
1501
|
this.setTagAttribute("auro-counter");
|
|
@@ -5434,7 +5445,7 @@ class AuroHelpText extends i$2 {
|
|
|
5434
5445
|
}
|
|
5435
5446
|
}
|
|
5436
5447
|
|
|
5437
|
-
var formkitVersion = '
|
|
5448
|
+
var formkitVersion = '202609011830';
|
|
5438
5449
|
|
|
5439
5450
|
/**
|
|
5440
5451
|
* AuroElement is the shared base class for layout-aware Auro form components.
|
|
@@ -8162,6 +8173,19 @@ class AuroCounterGroup extends AuroElement {
|
|
|
8162
8173
|
this.validation.validate(this, force);
|
|
8163
8174
|
}
|
|
8164
8175
|
|
|
8176
|
+
/**
|
|
8177
|
+
* Resets the counter group to its initial state by resetting each child counter and clearing validity.
|
|
8178
|
+
* Each child reset dispatches an `input` event, which triggers `updateValue()` to recompute `value`/`total`.
|
|
8179
|
+
* @returns {void}
|
|
8180
|
+
*/
|
|
8181
|
+
reset() {
|
|
8182
|
+
if (this.counters) {
|
|
8183
|
+
this.counters.forEach((counter) => counter.reset());
|
|
8184
|
+
}
|
|
8185
|
+
|
|
8186
|
+
this.validation.reset(this);
|
|
8187
|
+
}
|
|
8188
|
+
|
|
8165
8189
|
updated(changedProperties) {
|
|
8166
8190
|
if (changedProperties.has("value")) {
|
|
8167
8191
|
this.validate();
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
<script type="module">
|
|
40
40
|
import { renderPage } from './demo-support.min.js';
|
|
41
41
|
await renderPage('./getting-started.md');
|
|
42
|
+
import { initExamples } from './getting-started.min.js';
|
|
43
|
+
initExamples();
|
|
42
44
|
</script>
|
|
43
45
|
|
|
44
46
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
@@ -49,6 +51,6 @@
|
|
|
49
51
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
|
|
50
52
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
51
53
|
|
|
52
|
-
<script src="./
|
|
54
|
+
<script src="./getting-started.min.js" data-demo-script="true" type="module"></script>
|
|
53
55
|
</body>
|
|
54
56
|
</html>
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
<auro-anchorlink fluid href="#validate" class="level2 body-xs">validate()</auro-anchorlink>
|
|
28
28
|
<auro-anchorlink fluid href="#increment" class="level2 body-xs">increment()</auro-anchorlink>
|
|
29
29
|
<auro-anchorlink fluid href="#decrement" class="level2 body-xs">decrement()</auro-anchorlink>
|
|
30
|
+
<auro-anchorlink fluid href="#reset" class="level2 body-xs">reset()</auro-anchorlink>
|
|
30
31
|
</auro-nav>
|
|
31
32
|
</nav>
|
|
32
33
|
<div class="mainContent">
|
|
@@ -477,6 +478,54 @@ Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript c
|
|
|
477
478
|
<p>Increments the counter value by 1. Optionally pass a number to increment by a specific amount.</p>
|
|
478
479
|
<auro-header level="3" id="decrement">decrement()</auro-header>
|
|
479
480
|
<p>Decrements the counter value by 1. Optionally pass a number to decrement by a specific amount.</p>
|
|
481
|
+
<auro-header level="3" id="reset">reset()</auro-header>
|
|
482
|
+
<p>Resets the counter or counter group, clearing each counter to its <code>min</code> value and clearing validation state — the same clear-on-reset behavior used by the other Auro form elements. This is also what <code><auro-form></code> calls when a form is reset. Increment the counters below, then select <strong>Reset</strong>.</p>
|
|
483
|
+
<div class="exampleWrapper">
|
|
484
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset-state.html) -->
|
|
485
|
+
<!-- The below content is automatically added from ./../apiExamples/reset-state.html -->
|
|
486
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
487
|
+
<br/><br/>
|
|
488
|
+
<auro-counter-group id="resetStateGroup" name="passengers" max="9">
|
|
489
|
+
<auro-counter name="adults" min="1" max="9">
|
|
490
|
+
Adults
|
|
491
|
+
<span slot="description">Age 18+</span>
|
|
492
|
+
</auro-counter>
|
|
493
|
+
<auro-counter name="children" min="0" max="8">
|
|
494
|
+
Children
|
|
495
|
+
<span slot="description">Age 2–17</span>
|
|
496
|
+
</auro-counter>
|
|
497
|
+
</auro-counter-group>
|
|
498
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
499
|
+
</div>
|
|
500
|
+
<auro-accordion alignRight>
|
|
501
|
+
<span slot="trigger">See code</span>
|
|
502
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.html) -->
|
|
503
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.html -->
|
|
504
|
+
<pre class="language-html"><code class="language-html"><auro-button id="resetStateBtn">Reset</auro-button>
|
|
505
|
+
<br/><br/>
|
|
506
|
+
<auro-counter-group id="resetStateGroup" name="passengers" max="9">
|
|
507
|
+
<auro-counter name="adults" min="1" max="9">
|
|
508
|
+
Adults
|
|
509
|
+
<span slot="description">Age 18+</span>
|
|
510
|
+
</auro-counter>
|
|
511
|
+
<auro-counter name="children" min="0" max="8">
|
|
512
|
+
Children
|
|
513
|
+
<span slot="description">Age 2–17</span>
|
|
514
|
+
</auro-counter>
|
|
515
|
+
</auro-counter-group></code></pre>
|
|
516
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
517
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.js) -->
|
|
518
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.js -->
|
|
519
|
+
<pre class="language-js"><code class="language-js">export function resetStateExample() {
|
|
520
|
+
const group = document.querySelector('#resetStateGroup');
|
|
521
|
+
|
|
522
|
+
document.querySelector('#resetStateBtn').addEventListener('click', () => {
|
|
523
|
+
// Clears every counter in the group back to its min value.
|
|
524
|
+
group.reset();
|
|
525
|
+
});
|
|
526
|
+
}</code></pre>
|
|
527
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
528
|
+
</auro-accordion>
|
|
480
529
|
</section>
|
|
481
530
|
</div>
|
|
482
531
|
</div>
|