@aurodesignsystem-dev/auro-formkit 0.0.0-pr1510.3 → 0.0.0-pr1512.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.js +22 -0
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/demo-support.js +1 -0
- package/components/checkbox/demo/getting-started.js +22 -0
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/styles.scss +1 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.js +24 -0
- package/components/combobox/demo/customize.min.js +119 -96
- package/components/combobox/demo/demo-support.js +1 -0
- package/components/combobox/demo/getting-started.js +21 -0
- package/components/combobox/demo/getting-started.min.js +119 -96
- package/components/combobox/demo/index.js +23 -0
- package/components/combobox/demo/index.min.js +119 -96
- package/components/combobox/demo/styles.scss +1 -0
- package/components/combobox/dist/index.js +118 -95
- package/components/combobox/dist/registered.js +118 -95
- package/components/counter/demo/customize.js +21 -0
- package/components/counter/demo/customize.min.js +2 -2
- package/components/counter/demo/demo-support.js +1 -0
- package/components/counter/demo/index.js +21 -0
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/styles.scss +1 -0
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/accessibility.md +1 -2
- package/components/datepicker/demo/api.md +62 -63
- package/components/datepicker/demo/customize.js +17 -0
- package/components/datepicker/demo/customize.md +1 -12
- package/components/datepicker/demo/customize.min.js +335 -702
- package/components/datepicker/demo/demo-support.js +1 -0
- package/components/datepicker/demo/index.js +23 -0
- package/components/datepicker/demo/index.min.js +335 -702
- package/components/datepicker/demo/styles.scss +1 -0
- package/components/datepicker/dist/index.js +335 -702
- package/components/datepicker/dist/registered.js +335 -702
- package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +3 -14
- package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +6 -90
- package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +5 -78
- package/components/dropdown/demo/customize.js +9 -0
- package/components/dropdown/demo/customize.min.js +1 -1
- package/components/dropdown/demo/demo-support.js +1 -0
- package/components/dropdown/demo/getting-started.js +9 -0
- package/components/dropdown/demo/getting-started.min.js +1 -1
- package/components/dropdown/demo/index.js +16 -0
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/styles.scss +1 -0
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/customize.js +28 -0
- package/components/form/demo/customize.min.js +583 -904
- package/components/form/demo/demo-support.js +1 -0
- package/components/form/demo/getting-started.js +9 -0
- package/components/form/demo/getting-started.min.js +583 -904
- package/components/form/demo/index.js +5 -0
- package/components/form/demo/index.min.js +583 -904
- package/components/form/demo/registerDemoDeps.js +23 -0
- package/components/form/demo/registerDemoDeps.min.js +583 -904
- package/components/form/demo/styles.scss +1 -0
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.js +25 -0
- package/components/input/demo/customize.md +8 -8
- package/components/input/demo/customize.min.js +116 -93
- package/components/input/demo/demo-support.js +1 -0
- package/components/input/demo/getting-started.js +8 -0
- package/components/input/demo/getting-started.min.js +116 -93
- package/components/input/demo/index.js +8 -0
- package/components/input/demo/index.min.js +116 -93
- package/components/input/demo/styles.css +974 -0
- package/components/input/demo/styles.scss +1 -0
- package/components/input/dist/base-input.d.ts +33 -44
- package/components/input/dist/index.js +129 -94
- package/components/input/dist/registered.js +116 -93
- package/components/menu/demo/demo-support.js +1 -0
- package/components/menu/demo/index.js +25 -0
- package/components/menu/demo/styles.scss +1 -0
- package/components/radio/demo/customize.js +22 -0
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/demo-support.js +1 -0
- package/components/radio/demo/getting-started.js +24 -0
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/styles.scss +1 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.js +11 -0
- package/components/select/demo/customize.min.js +2 -2
- package/components/select/demo/demo-support.js +1 -0
- package/components/select/demo/getting-started.js +26 -0
- package/components/select/demo/getting-started.min.js +2 -2
- package/components/select/demo/index.js +11 -0
- package/components/select/demo/index.min.js +2 -2
- package/components/select/demo/styles.scss +1 -0
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +2146 -2218
- package/package.json +2 -6
- package/components/datepicker/dist/blackoutUtils.d.ts +0 -43
- /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{iconVersion.d.ts → src/iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -4873,7 +4873,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4873
4873
|
}
|
|
4874
4874
|
};
|
|
4875
4875
|
|
|
4876
|
-
var formkitVersion$2 = '
|
|
4876
|
+
var formkitVersion$2 = '202606252337';
|
|
4877
4877
|
|
|
4878
4878
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4879
4879
|
static get properties() {
|
|
@@ -16598,6 +16598,13 @@ class AuroInputUtilities {
|
|
|
16598
16598
|
* @returns {string | undefined}
|
|
16599
16599
|
*/
|
|
16600
16600
|
toFormattedValue(valueObject, format) {
|
|
16601
|
+
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
16602
|
+
// `format` argument has to fail gracefully rather than throw on
|
|
16603
|
+
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
16604
|
+
// as "no format → no display value".
|
|
16605
|
+
if (!format) {
|
|
16606
|
+
return undefined;
|
|
16607
|
+
}
|
|
16601
16608
|
const normalizedFormat = format.toLowerCase();
|
|
16602
16609
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
16603
16610
|
|
|
@@ -16748,79 +16755,18 @@ class BaseInput extends AuroElement$1 {
|
|
|
16748
16755
|
constructor() {
|
|
16749
16756
|
super();
|
|
16750
16757
|
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
this.required = false;
|
|
16762
|
-
this.onDark = false;
|
|
16763
|
-
this.setCustomValidityForType = undefined;
|
|
16764
|
-
this.size = 'lg';
|
|
16765
|
-
this.shape = 'classic';
|
|
16766
|
-
this.value = undefined;
|
|
16767
|
-
this._valueObject = undefined;
|
|
16768
|
-
|
|
16769
|
-
this._initializePrivateDefaults();
|
|
16770
|
-
}
|
|
16771
|
-
|
|
16772
|
-
/**
|
|
16773
|
-
* Internal Defaults.
|
|
16774
|
-
* @private
|
|
16775
|
-
* @returns {void}
|
|
16776
|
-
*/
|
|
16777
|
-
_initializePrivateDefaults() {
|
|
16758
|
+
// Single-source initialization. Alphabetized so duplicate or stale
|
|
16759
|
+
// defaults are immediately obvious on a diff. Every field is assigned
|
|
16760
|
+
// exactly once here (previously the constructor + the old
|
|
16761
|
+
// `_initializePrivateDefaults` overlapped — both wrote ~14 of the same
|
|
16762
|
+
// fields and double-allocated `util` and `validation`, discarding the
|
|
16763
|
+
// first instance). `validation` is now allocated exactly once; `util`
|
|
16764
|
+
// is seeded here with an en-US default and then rebuilt in
|
|
16765
|
+
// `connectedCallback` once the consumer-resolved locale is available,
|
|
16766
|
+
// so a parent (datepicker/combobox) calling `validate()` synchronously
|
|
16767
|
+
// during its own update cycle sees a populated util instance.
|
|
16778
16768
|
this.activeLabel = false;
|
|
16779
|
-
|
|
16780
|
-
this.icon = false;
|
|
16781
|
-
this.disabled = false;
|
|
16782
|
-
this.dvInputOnly = false;
|
|
16783
|
-
this.hideLabelVisually = false;
|
|
16784
|
-
this.max = undefined;
|
|
16785
|
-
this.maxLength = undefined;
|
|
16786
|
-
this.min = undefined;
|
|
16787
|
-
this.minLength = undefined;
|
|
16788
|
-
this.noValidate = false;
|
|
16789
|
-
this.onDark = false;
|
|
16790
|
-
this.required = false;
|
|
16791
|
-
this.setCustomValidityForType = undefined;
|
|
16792
|
-
|
|
16793
|
-
// Used for storing raw values returned from input mask.
|
|
16794
|
-
this._rawMaskValue = undefined;
|
|
16795
|
-
|
|
16796
|
-
/**
|
|
16797
|
-
* @private
|
|
16798
|
-
*/
|
|
16799
|
-
this.layout = 'classic';
|
|
16800
|
-
|
|
16801
|
-
/**
|
|
16802
|
-
* @private
|
|
16803
|
-
*/
|
|
16804
|
-
this.shape = 'classic';
|
|
16805
|
-
|
|
16806
|
-
/**
|
|
16807
|
-
* @private
|
|
16808
|
-
*/
|
|
16809
|
-
this.size = 'lg';
|
|
16810
|
-
|
|
16811
|
-
this.touched = false;
|
|
16812
|
-
this.util = new AuroInputUtilities({
|
|
16813
|
-
locale: "en-US",
|
|
16814
|
-
format: this.format
|
|
16815
|
-
});
|
|
16816
|
-
this.validation = new AuroFormValidation();
|
|
16817
|
-
this.inputIconName = undefined;
|
|
16818
|
-
this.showPassword = false;
|
|
16819
|
-
this.validationCCLength = undefined;
|
|
16820
|
-
this.hasValue = false;
|
|
16821
|
-
this.label = 'Input label is undefined';
|
|
16822
|
-
|
|
16823
|
-
|
|
16769
|
+
/** @private */
|
|
16824
16770
|
this.allowedInputTypes = [
|
|
16825
16771
|
"text",
|
|
16826
16772
|
"number",
|
|
@@ -16829,7 +16775,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
16829
16775
|
"credit-card",
|
|
16830
16776
|
"tel"
|
|
16831
16777
|
];
|
|
16832
|
-
this.
|
|
16778
|
+
this.appearance = "default";
|
|
16779
|
+
/** @private */
|
|
16833
16780
|
this.dateFormatMap = {
|
|
16834
16781
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
16835
16782
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -16846,27 +16793,57 @@ class BaseInput extends AuroElement$1 {
|
|
|
16846
16793
|
'dd/mm': 'dateDDMM',
|
|
16847
16794
|
'mm/dd': 'dateMMDD'
|
|
16848
16795
|
};
|
|
16796
|
+
this.disabled = false;
|
|
16797
|
+
/** @private */
|
|
16849
16798
|
this.domHandler = new DomHandler();
|
|
16850
16799
|
this.dvInputOnly = false;
|
|
16851
16800
|
this.hasValue = false;
|
|
16801
|
+
this.hideLabelVisually = false;
|
|
16802
|
+
this.icon = false;
|
|
16803
|
+
/** @private */
|
|
16852
16804
|
this.inputIconName = undefined;
|
|
16805
|
+
/** @private */
|
|
16853
16806
|
this.label = 'Input label is undefined';
|
|
16807
|
+
this.layout = 'classic';
|
|
16808
|
+
this.locale = 'en-US';
|
|
16809
|
+
this.max = undefined;
|
|
16810
|
+
this._maxObject = undefined;
|
|
16811
|
+
this.maxLength = undefined;
|
|
16812
|
+
this.min = undefined;
|
|
16813
|
+
this._minObject = undefined;
|
|
16814
|
+
this.minLength = undefined;
|
|
16854
16815
|
this.noValidate = false;
|
|
16855
|
-
this.
|
|
16816
|
+
this.onDark = false;
|
|
16817
|
+
// Raw values returned from the input mask before model normalization.
|
|
16818
|
+
this._rawMaskValue = undefined;
|
|
16819
|
+
this.required = false;
|
|
16820
|
+
this.setCustomValidityForType = undefined;
|
|
16821
|
+
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
16822
|
+
// itself, and listing it here caused cursor placement issues in Safari.
|
|
16823
|
+
/** @private */
|
|
16856
16824
|
this.setSelectionInputTypes = [
|
|
16857
16825
|
"text",
|
|
16858
16826
|
"password",
|
|
16859
16827
|
"email"
|
|
16860
|
-
];
|
|
16828
|
+
];
|
|
16829
|
+
this.shape = 'classic';
|
|
16830
|
+
/** @private */
|
|
16861
16831
|
this.showPassword = false;
|
|
16832
|
+
this.size = 'lg';
|
|
16862
16833
|
this.touched = false;
|
|
16834
|
+
/** @private */
|
|
16863
16835
|
this.uniqueId = new UniqueId().create();
|
|
16836
|
+
/** @private */
|
|
16864
16837
|
this.util = new AuroInputUtilities({
|
|
16865
16838
|
locale: this.locale,
|
|
16866
16839
|
format: this.format
|
|
16867
16840
|
});
|
|
16841
|
+
/** @private */
|
|
16868
16842
|
this.validation = new AuroFormValidation();
|
|
16843
|
+
/** @private */
|
|
16869
16844
|
this.validationCCLength = undefined;
|
|
16845
|
+
this.value = undefined;
|
|
16846
|
+
this._valueObject = undefined;
|
|
16870
16847
|
}
|
|
16871
16848
|
|
|
16872
16849
|
// function to define props used within the scope of this component
|
|
@@ -17414,6 +17391,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
17414
17391
|
|
|
17415
17392
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
17416
17393
|
|
|
17394
|
+
// Normalize the format token to lowercase so case-mixed values supplied
|
|
17395
|
+
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
17396
|
+
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
17397
|
+
// format silently misses the map and leaves `setCustomValidityForType`
|
|
17398
|
+
// unset.
|
|
17399
|
+
if (this.format) {
|
|
17400
|
+
this.format = this.format.toLowerCase();
|
|
17401
|
+
}
|
|
17402
|
+
|
|
17417
17403
|
// use validity message override if declared when initializing the component
|
|
17418
17404
|
if (this.hasAttribute('setCustomValidity')) {
|
|
17419
17405
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -17847,6 +17833,38 @@ class BaseInput extends AuroElement$1 {
|
|
|
17847
17833
|
this.touched = true;
|
|
17848
17834
|
this.validation.validate(this);
|
|
17849
17835
|
}
|
|
17836
|
+
|
|
17837
|
+
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
17838
|
+
// update that can re-render the input and reset the native cursor; we
|
|
17839
|
+
// capture the caret position before that update commits and restore it
|
|
17840
|
+
// via `setSelectionRange` once the update has flushed. Gated on
|
|
17841
|
+
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
17842
|
+
// formatter manages the cursor itself) doesn't get a competing write.
|
|
17843
|
+
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
17844
|
+
// on input types that don't support text selection (number, email in
|
|
17845
|
+
// some browsers) throws InvalidStateError, which would crash all input
|
|
17846
|
+
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
17847
|
+
// the gated types currently support it, since the list is a public
|
|
17848
|
+
// property a consumer could mutate.
|
|
17849
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
17850
|
+
let selectionStart;
|
|
17851
|
+
try {
|
|
17852
|
+
selectionStart = this.inputElement.selectionStart;
|
|
17853
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17854
|
+
return;
|
|
17855
|
+
}
|
|
17856
|
+
if (typeof selectionStart !== 'number') {
|
|
17857
|
+
return;
|
|
17858
|
+
}
|
|
17859
|
+
this.updateComplete.then(() => {
|
|
17860
|
+
try {
|
|
17861
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
17862
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17863
|
+
// Some input types (number/email in certain UAs) throw on
|
|
17864
|
+
// setSelectionRange; swallow and let the native cursor stand.
|
|
17865
|
+
}
|
|
17866
|
+
});
|
|
17867
|
+
}
|
|
17850
17868
|
}
|
|
17851
17869
|
|
|
17852
17870
|
/**
|
|
@@ -18473,7 +18491,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18473
18491
|
}
|
|
18474
18492
|
};
|
|
18475
18493
|
|
|
18476
|
-
var formkitVersion$1 = '
|
|
18494
|
+
var formkitVersion$1 = '202606252337';
|
|
18477
18495
|
|
|
18478
18496
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18479
18497
|
// See LICENSE in the project root for license information.
|
|
@@ -18976,6 +18994,7 @@ class AuroInput extends BaseInput {
|
|
|
18976
18994
|
<${this.buttonTag}
|
|
18977
18995
|
@click="${this.handleClickShowPassword}"
|
|
18978
18996
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
18997
|
+
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
18979
18998
|
class="notificationBtn passwordBtn"
|
|
18980
18999
|
shape="circle"
|
|
18981
19000
|
size="sm"
|
|
@@ -19049,25 +19068,29 @@ class AuroInput extends BaseInput {
|
|
|
19049
19068
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
19050
19069
|
*/
|
|
19051
19070
|
renderHtmlHelpText() {
|
|
19071
|
+
// Single `<p>` with stable identity across validity transitions —
|
|
19072
|
+
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
19073
|
+
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
19074
|
+
// re-announce because the live-region element it was watching had been
|
|
19075
|
+
// removed and a new one inserted. Keeping one node means the `role`,
|
|
19076
|
+
// `aria-live`, and text content all change in-place, which AT does
|
|
19077
|
+
// observe and announce.
|
|
19078
|
+
const isError = this.validity && this.validity !== 'valid';
|
|
19052
19079
|
return u$7`
|
|
19053
|
-
|
|
19054
|
-
?
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
|
|
19066
|
-
|
|
19067
|
-
</p>
|
|
19068
|
-
</${this.helpTextTag}>
|
|
19069
|
-
`
|
|
19070
|
-
}
|
|
19080
|
+
<${this.helpTextTag}
|
|
19081
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19082
|
+
?error=${isError}>
|
|
19083
|
+
<p
|
|
19084
|
+
id="${this.uniqueId}"
|
|
19085
|
+
part="helpText"
|
|
19086
|
+
role="${o(isError ? 'alert' : undefined)}"
|
|
19087
|
+
aria-live="${o(isError ? 'assertive' : undefined)}">
|
|
19088
|
+
${isError
|
|
19089
|
+
? this.errorMessage
|
|
19090
|
+
: u$7`<slot name="helpText">${this.getHelpText()}</slot>`
|
|
19091
|
+
}
|
|
19092
|
+
</p>
|
|
19093
|
+
</${this.helpTextTag}>
|
|
19071
19094
|
`;
|
|
19072
19095
|
}
|
|
19073
19096
|
|
|
@@ -19594,7 +19617,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19594
19617
|
}
|
|
19595
19618
|
}
|
|
19596
19619
|
|
|
19597
|
-
var formkitVersion = '
|
|
19620
|
+
var formkitVersion = '202606252337';
|
|
19598
19621
|
|
|
19599
19622
|
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}`;
|
|
19600
19623
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
|
|
2
|
+
|
|
3
|
+
import { swapValueExample } from '../apiExamples/swap-value';
|
|
4
|
+
|
|
5
|
+
import { AuroCombobox } from '../src/auro-combobox.js';
|
|
6
|
+
import '../../menu/src/registered.js';
|
|
7
|
+
|
|
8
|
+
AuroCombobox.register();
|
|
9
|
+
|
|
10
|
+
export function initExamples(initCount) {
|
|
11
|
+
initCount = initCount || 0;
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
swapValueExample();
|
|
15
|
+
} catch {
|
|
16
|
+
if (initCount <= 20) {
|
|
17
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
initExamples(initCount + 1);
|
|
20
|
+
}, 100);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -4888,7 +4888,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
|
|
|
4888
4888
|
}
|
|
4889
4889
|
};
|
|
4890
4890
|
|
|
4891
|
-
var formkitVersion$2 = '
|
|
4891
|
+
var formkitVersion$2 = '202606252337';
|
|
4892
4892
|
|
|
4893
4893
|
let AuroElement$2 = class AuroElement extends i$3 {
|
|
4894
4894
|
static get properties() {
|
|
@@ -16613,6 +16613,13 @@ class AuroInputUtilities {
|
|
|
16613
16613
|
* @returns {string | undefined}
|
|
16614
16614
|
*/
|
|
16615
16615
|
toFormattedValue(valueObject, format) {
|
|
16616
|
+
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
16617
|
+
// `format` argument has to fail gracefully rather than throw on
|
|
16618
|
+
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
16619
|
+
// as "no format → no display value".
|
|
16620
|
+
if (!format) {
|
|
16621
|
+
return undefined;
|
|
16622
|
+
}
|
|
16616
16623
|
const normalizedFormat = format.toLowerCase();
|
|
16617
16624
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
16618
16625
|
|
|
@@ -16763,79 +16770,18 @@ class BaseInput extends AuroElement$1 {
|
|
|
16763
16770
|
constructor() {
|
|
16764
16771
|
super();
|
|
16765
16772
|
|
|
16766
|
-
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16775
|
-
|
|
16776
|
-
this.required = false;
|
|
16777
|
-
this.onDark = false;
|
|
16778
|
-
this.setCustomValidityForType = undefined;
|
|
16779
|
-
this.size = 'lg';
|
|
16780
|
-
this.shape = 'classic';
|
|
16781
|
-
this.value = undefined;
|
|
16782
|
-
this._valueObject = undefined;
|
|
16783
|
-
|
|
16784
|
-
this._initializePrivateDefaults();
|
|
16785
|
-
}
|
|
16786
|
-
|
|
16787
|
-
/**
|
|
16788
|
-
* Internal Defaults.
|
|
16789
|
-
* @private
|
|
16790
|
-
* @returns {void}
|
|
16791
|
-
*/
|
|
16792
|
-
_initializePrivateDefaults() {
|
|
16773
|
+
// Single-source initialization. Alphabetized so duplicate or stale
|
|
16774
|
+
// defaults are immediately obvious on a diff. Every field is assigned
|
|
16775
|
+
// exactly once here (previously the constructor + the old
|
|
16776
|
+
// `_initializePrivateDefaults` overlapped — both wrote ~14 of the same
|
|
16777
|
+
// fields and double-allocated `util` and `validation`, discarding the
|
|
16778
|
+
// first instance). `validation` is now allocated exactly once; `util`
|
|
16779
|
+
// is seeded here with an en-US default and then rebuilt in
|
|
16780
|
+
// `connectedCallback` once the consumer-resolved locale is available,
|
|
16781
|
+
// so a parent (datepicker/combobox) calling `validate()` synchronously
|
|
16782
|
+
// during its own update cycle sees a populated util instance.
|
|
16793
16783
|
this.activeLabel = false;
|
|
16794
|
-
|
|
16795
|
-
this.icon = false;
|
|
16796
|
-
this.disabled = false;
|
|
16797
|
-
this.dvInputOnly = false;
|
|
16798
|
-
this.hideLabelVisually = false;
|
|
16799
|
-
this.max = undefined;
|
|
16800
|
-
this.maxLength = undefined;
|
|
16801
|
-
this.min = undefined;
|
|
16802
|
-
this.minLength = undefined;
|
|
16803
|
-
this.noValidate = false;
|
|
16804
|
-
this.onDark = false;
|
|
16805
|
-
this.required = false;
|
|
16806
|
-
this.setCustomValidityForType = undefined;
|
|
16807
|
-
|
|
16808
|
-
// Used for storing raw values returned from input mask.
|
|
16809
|
-
this._rawMaskValue = undefined;
|
|
16810
|
-
|
|
16811
|
-
/**
|
|
16812
|
-
* @private
|
|
16813
|
-
*/
|
|
16814
|
-
this.layout = 'classic';
|
|
16815
|
-
|
|
16816
|
-
/**
|
|
16817
|
-
* @private
|
|
16818
|
-
*/
|
|
16819
|
-
this.shape = 'classic';
|
|
16820
|
-
|
|
16821
|
-
/**
|
|
16822
|
-
* @private
|
|
16823
|
-
*/
|
|
16824
|
-
this.size = 'lg';
|
|
16825
|
-
|
|
16826
|
-
this.touched = false;
|
|
16827
|
-
this.util = new AuroInputUtilities({
|
|
16828
|
-
locale: "en-US",
|
|
16829
|
-
format: this.format
|
|
16830
|
-
});
|
|
16831
|
-
this.validation = new AuroFormValidation();
|
|
16832
|
-
this.inputIconName = undefined;
|
|
16833
|
-
this.showPassword = false;
|
|
16834
|
-
this.validationCCLength = undefined;
|
|
16835
|
-
this.hasValue = false;
|
|
16836
|
-
this.label = 'Input label is undefined';
|
|
16837
|
-
|
|
16838
|
-
|
|
16784
|
+
/** @private */
|
|
16839
16785
|
this.allowedInputTypes = [
|
|
16840
16786
|
"text",
|
|
16841
16787
|
"number",
|
|
@@ -16844,7 +16790,8 @@ class BaseInput extends AuroElement$1 {
|
|
|
16844
16790
|
"credit-card",
|
|
16845
16791
|
"tel"
|
|
16846
16792
|
];
|
|
16847
|
-
this.
|
|
16793
|
+
this.appearance = "default";
|
|
16794
|
+
/** @private */
|
|
16848
16795
|
this.dateFormatMap = {
|
|
16849
16796
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
16850
16797
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -16861,27 +16808,57 @@ class BaseInput extends AuroElement$1 {
|
|
|
16861
16808
|
'dd/mm': 'dateDDMM',
|
|
16862
16809
|
'mm/dd': 'dateMMDD'
|
|
16863
16810
|
};
|
|
16811
|
+
this.disabled = false;
|
|
16812
|
+
/** @private */
|
|
16864
16813
|
this.domHandler = new DomHandler();
|
|
16865
16814
|
this.dvInputOnly = false;
|
|
16866
16815
|
this.hasValue = false;
|
|
16816
|
+
this.hideLabelVisually = false;
|
|
16817
|
+
this.icon = false;
|
|
16818
|
+
/** @private */
|
|
16867
16819
|
this.inputIconName = undefined;
|
|
16820
|
+
/** @private */
|
|
16868
16821
|
this.label = 'Input label is undefined';
|
|
16822
|
+
this.layout = 'classic';
|
|
16823
|
+
this.locale = 'en-US';
|
|
16824
|
+
this.max = undefined;
|
|
16825
|
+
this._maxObject = undefined;
|
|
16826
|
+
this.maxLength = undefined;
|
|
16827
|
+
this.min = undefined;
|
|
16828
|
+
this._minObject = undefined;
|
|
16829
|
+
this.minLength = undefined;
|
|
16869
16830
|
this.noValidate = false;
|
|
16870
|
-
this.
|
|
16831
|
+
this.onDark = false;
|
|
16832
|
+
// Raw values returned from the input mask before model normalization.
|
|
16833
|
+
this._rawMaskValue = undefined;
|
|
16834
|
+
this.required = false;
|
|
16835
|
+
this.setCustomValidityForType = undefined;
|
|
16836
|
+
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
16837
|
+
// itself, and listing it here caused cursor placement issues in Safari.
|
|
16838
|
+
/** @private */
|
|
16871
16839
|
this.setSelectionInputTypes = [
|
|
16872
16840
|
"text",
|
|
16873
16841
|
"password",
|
|
16874
16842
|
"email"
|
|
16875
|
-
];
|
|
16843
|
+
];
|
|
16844
|
+
this.shape = 'classic';
|
|
16845
|
+
/** @private */
|
|
16876
16846
|
this.showPassword = false;
|
|
16847
|
+
this.size = 'lg';
|
|
16877
16848
|
this.touched = false;
|
|
16849
|
+
/** @private */
|
|
16878
16850
|
this.uniqueId = new UniqueId().create();
|
|
16851
|
+
/** @private */
|
|
16879
16852
|
this.util = new AuroInputUtilities({
|
|
16880
16853
|
locale: this.locale,
|
|
16881
16854
|
format: this.format
|
|
16882
16855
|
});
|
|
16856
|
+
/** @private */
|
|
16883
16857
|
this.validation = new AuroFormValidation();
|
|
16858
|
+
/** @private */
|
|
16884
16859
|
this.validationCCLength = undefined;
|
|
16860
|
+
this.value = undefined;
|
|
16861
|
+
this._valueObject = undefined;
|
|
16885
16862
|
}
|
|
16886
16863
|
|
|
16887
16864
|
// function to define props used within the scope of this component
|
|
@@ -17429,6 +17406,15 @@ class BaseInput extends AuroElement$1 {
|
|
|
17429
17406
|
|
|
17430
17407
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
17431
17408
|
|
|
17409
|
+
// Normalize the format token to lowercase so case-mixed values supplied
|
|
17410
|
+
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
17411
|
+
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
17412
|
+
// format silently misses the map and leaves `setCustomValidityForType`
|
|
17413
|
+
// unset.
|
|
17414
|
+
if (this.format) {
|
|
17415
|
+
this.format = this.format.toLowerCase();
|
|
17416
|
+
}
|
|
17417
|
+
|
|
17432
17418
|
// use validity message override if declared when initializing the component
|
|
17433
17419
|
if (this.hasAttribute('setCustomValidity')) {
|
|
17434
17420
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -17862,6 +17848,38 @@ class BaseInput extends AuroElement$1 {
|
|
|
17862
17848
|
this.touched = true;
|
|
17863
17849
|
this.validation.validate(this);
|
|
17864
17850
|
}
|
|
17851
|
+
|
|
17852
|
+
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
17853
|
+
// update that can re-render the input and reset the native cursor; we
|
|
17854
|
+
// capture the caret position before that update commits and restore it
|
|
17855
|
+
// via `setSelectionRange` once the update has flushed. Gated on
|
|
17856
|
+
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
17857
|
+
// formatter manages the cursor itself) doesn't get a competing write.
|
|
17858
|
+
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
17859
|
+
// on input types that don't support text selection (number, email in
|
|
17860
|
+
// some browsers) throws InvalidStateError, which would crash all input
|
|
17861
|
+
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
17862
|
+
// the gated types currently support it, since the list is a public
|
|
17863
|
+
// property a consumer could mutate.
|
|
17864
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
17865
|
+
let selectionStart;
|
|
17866
|
+
try {
|
|
17867
|
+
selectionStart = this.inputElement.selectionStart;
|
|
17868
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17869
|
+
return;
|
|
17870
|
+
}
|
|
17871
|
+
if (typeof selectionStart !== 'number') {
|
|
17872
|
+
return;
|
|
17873
|
+
}
|
|
17874
|
+
this.updateComplete.then(() => {
|
|
17875
|
+
try {
|
|
17876
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
17877
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
17878
|
+
// Some input types (number/email in certain UAs) throw on
|
|
17879
|
+
// setSelectionRange; swallow and let the native cursor stand.
|
|
17880
|
+
}
|
|
17881
|
+
});
|
|
17882
|
+
}
|
|
17865
17883
|
}
|
|
17866
17884
|
|
|
17867
17885
|
/**
|
|
@@ -18488,7 +18506,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
|
|
|
18488
18506
|
}
|
|
18489
18507
|
};
|
|
18490
18508
|
|
|
18491
|
-
var formkitVersion$1 = '
|
|
18509
|
+
var formkitVersion$1 = '202606252337';
|
|
18492
18510
|
|
|
18493
18511
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
18494
18512
|
// See LICENSE in the project root for license information.
|
|
@@ -18991,6 +19009,7 @@ class AuroInput extends BaseInput {
|
|
|
18991
19009
|
<${this.buttonTag}
|
|
18992
19010
|
@click="${this.handleClickShowPassword}"
|
|
18993
19011
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19012
|
+
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
18994
19013
|
class="notificationBtn passwordBtn"
|
|
18995
19014
|
shape="circle"
|
|
18996
19015
|
size="sm"
|
|
@@ -19064,25 +19083,29 @@ class AuroInput extends BaseInput {
|
|
|
19064
19083
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
19065
19084
|
*/
|
|
19066
19085
|
renderHtmlHelpText() {
|
|
19086
|
+
// Single `<p>` with stable identity across validity transitions —
|
|
19087
|
+
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
19088
|
+
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
19089
|
+
// re-announce because the live-region element it was watching had been
|
|
19090
|
+
// removed and a new one inserted. Keeping one node means the `role`,
|
|
19091
|
+
// `aria-live`, and text content all change in-place, which AT does
|
|
19092
|
+
// observe and announce.
|
|
19093
|
+
const isError = this.validity && this.validity !== 'valid';
|
|
19067
19094
|
return u$7`
|
|
19068
|
-
|
|
19069
|
-
?
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
</p>
|
|
19083
|
-
</${this.helpTextTag}>
|
|
19084
|
-
`
|
|
19085
|
-
}
|
|
19095
|
+
<${this.helpTextTag}
|
|
19096
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
19097
|
+
?error=${isError}>
|
|
19098
|
+
<p
|
|
19099
|
+
id="${this.uniqueId}"
|
|
19100
|
+
part="helpText"
|
|
19101
|
+
role="${o(isError ? 'alert' : undefined)}"
|
|
19102
|
+
aria-live="${o(isError ? 'assertive' : undefined)}">
|
|
19103
|
+
${isError
|
|
19104
|
+
? this.errorMessage
|
|
19105
|
+
: u$7`<slot name="helpText">${this.getHelpText()}</slot>`
|
|
19106
|
+
}
|
|
19107
|
+
</p>
|
|
19108
|
+
</${this.helpTextTag}>
|
|
19086
19109
|
`;
|
|
19087
19110
|
}
|
|
19088
19111
|
|
|
@@ -19609,7 +19632,7 @@ class AuroBibtemplate extends i$3 {
|
|
|
19609
19632
|
}
|
|
19610
19633
|
}
|
|
19611
19634
|
|
|
19612
|
-
var formkitVersion = '
|
|
19635
|
+
var formkitVersion = '202606252337';
|
|
19613
19636
|
|
|
19614
19637
|
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}`;
|
|
19615
19638
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@aurodesignsystem/config/demo-styles';
|