@aurodesignsystem-dev/auro-formkit 0.0.0-pr1508.0 → 0.0.0-pr1508.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/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/customize.min.js +8 -6
- package/components/checkbox/demo/getting-started.min.js +8 -6
- package/components/checkbox/demo/index.min.js +8 -6
- package/components/checkbox/dist/index.js +8 -6
- package/components/checkbox/dist/registered.js +8 -6
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/customize.md +2 -10
- package/components/combobox/demo/customize.min.js +386 -305
- package/components/combobox/demo/getting-started.min.js +386 -301
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +386 -301
- package/components/combobox/demo/keyboard-behavior.md +2 -142
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/demo/why-combobox.md +2 -2
- package/components/combobox/dist/auro-combobox.d.ts +23 -16
- package/components/combobox/dist/index.js +385 -300
- package/components/combobox/dist/registered.js +385 -300
- package/components/counter/demo/customize.min.js +18 -8
- package/components/counter/demo/index.min.js +18 -8
- package/components/counter/dist/index.js +18 -8
- package/components/counter/dist/registered.js +18 -8
- package/components/datepicker/demo/accessibility.md +2 -1
- package/components/datepicker/demo/api.md +63 -62
- package/components/datepicker/demo/customize.md +12 -1
- package/components/datepicker/demo/customize.min.js +932 -335
- package/components/datepicker/demo/index.min.js +932 -335
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +20 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +121 -7
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +78 -5
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +932 -335
- package/components/datepicker/dist/registered.js +932 -335
- package/components/dropdown/demo/customize.min.js +2 -1
- package/components/dropdown/demo/getting-started.min.js +2 -1
- package/components/dropdown/demo/index.min.js +2 -1
- package/components/dropdown/dist/index.js +2 -1
- package/components/dropdown/dist/registered.js +2 -1
- package/components/form/demo/customize.min.js +1690 -826
- package/components/form/demo/getting-started.min.js +1690 -826
- package/components/form/demo/index.min.js +1690 -826
- package/components/form/demo/registerDemoDeps.min.js +1690 -826
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.md +8 -8
- package/components/input/demo/customize.min.js +137 -95
- package/components/input/demo/getting-started.min.js +137 -95
- package/components/input/demo/index.min.js +137 -95
- package/components/input/dist/base-input.d.ts +33 -44
- package/components/input/dist/index.js +150 -96
- package/components/input/dist/registered.js +137 -95
- package/components/radio/demo/customize.min.js +8 -6
- package/components/radio/demo/getting-started.min.js +8 -6
- package/components/radio/demo/index.min.js +8 -6
- package/components/radio/dist/index.js +8 -6
- package/components/radio/dist/registered.js +8 -6
- package/components/select/demo/customize.md +86 -0
- package/components/select/demo/customize.min.js +194 -68
- package/components/select/demo/getting-started.min.js +196 -115
- package/components/select/demo/index.min.js +194 -68
- package/components/select/demo/keyboard-behavior.md +18 -4
- package/components/select/dist/auro-select.d.ts +20 -8
- package/components/select/dist/index.js +194 -68
- package/components/select/dist/registered.js +194 -68
- package/custom-elements.json +2365 -1819
- package/package.json +6 -2
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -17
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -28
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -4383,15 +4383,17 @@ class AuroFormValidation {
|
|
|
4383
4383
|
);
|
|
4384
4384
|
}
|
|
4385
4385
|
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4386
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
4387
|
+
|
|
4388
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
4389
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
4390
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
4391
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
4392
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
4389
4393
|
hasValue = false;
|
|
4390
4394
|
}
|
|
4391
4395
|
}
|
|
4392
4396
|
|
|
4393
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
4394
|
-
|
|
4395
4397
|
if (isCombobox) {
|
|
4396
4398
|
|
|
4397
4399
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -10327,6 +10329,13 @@ class AuroInputUtilities {
|
|
|
10327
10329
|
* @returns {string | undefined}
|
|
10328
10330
|
*/
|
|
10329
10331
|
toFormattedValue(valueObject, format) {
|
|
10332
|
+
// Exposed publicly via `AuroInputUtil.toFormattedValue`, so a missing
|
|
10333
|
+
// `format` argument has to fail gracefully rather than throw on
|
|
10334
|
+
// `format.toLowerCase()`. Treat any falsy value (undefined, null, '')
|
|
10335
|
+
// as "no format → no display value".
|
|
10336
|
+
if (!format) {
|
|
10337
|
+
return undefined;
|
|
10338
|
+
}
|
|
10330
10339
|
const normalizedFormat = format.toLowerCase();
|
|
10331
10340
|
const maskOptions = this.getMaskOptions('date', normalizedFormat);
|
|
10332
10341
|
|
|
@@ -10478,76 +10487,19 @@ class BaseInput extends AuroElement {
|
|
|
10478
10487
|
constructor() {
|
|
10479
10488
|
super();
|
|
10480
10489
|
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
this.setCustomValidityForType = undefined;
|
|
10492
|
-
this.size = 'lg';
|
|
10493
|
-
this.shape = 'classic';
|
|
10494
|
-
this.value = undefined;
|
|
10495
|
-
|
|
10496
|
-
this._initializePrivateDefaults();
|
|
10497
|
-
}
|
|
10498
|
-
|
|
10499
|
-
/**
|
|
10500
|
-
* Internal Defaults.
|
|
10501
|
-
* @private
|
|
10502
|
-
* @returns {void}
|
|
10503
|
-
*/
|
|
10504
|
-
_initializePrivateDefaults() {
|
|
10490
|
+
// Single-source initialization. Alphabetized so duplicate or stale
|
|
10491
|
+
// defaults are immediately obvious on a diff. Every field is assigned
|
|
10492
|
+
// exactly once here (previously the constructor + the old
|
|
10493
|
+
// `_initializePrivateDefaults` overlapped — both wrote ~14 of the same
|
|
10494
|
+
// fields and double-allocated `util` and `validation`, discarding the
|
|
10495
|
+
// first instance). `validation` is now allocated exactly once; `util`
|
|
10496
|
+
// is seeded here with an en-US default and then rebuilt in
|
|
10497
|
+
// `connectedCallback` once the consumer-resolved locale is available,
|
|
10498
|
+
// so a parent (datepicker/combobox) calling `validate()` synchronously
|
|
10499
|
+
// during its own update cycle sees a populated util instance.
|
|
10505
10500
|
this.activeLabel = false;
|
|
10506
|
-
this.appearance = "default";
|
|
10507
|
-
this.icon = false;
|
|
10508
|
-
this.disabled = false;
|
|
10509
|
-
this.dvInputOnly = false;
|
|
10510
|
-
this.hideLabelVisually = false;
|
|
10511
|
-
this.max = undefined;
|
|
10512
|
-
this.maxLength = undefined;
|
|
10513
|
-
this.min = undefined;
|
|
10514
|
-
this.minLength = undefined;
|
|
10515
|
-
this.noValidate = false;
|
|
10516
|
-
this.onDark = false;
|
|
10517
|
-
this.required = false;
|
|
10518
|
-
this.setCustomValidityForType = undefined;
|
|
10519
|
-
|
|
10520
|
-
// Used for storing raw values returned from input mask.
|
|
10521
|
-
this._rawMaskValue = undefined;
|
|
10522
|
-
|
|
10523
|
-
/**
|
|
10524
|
-
* @private
|
|
10525
|
-
*/
|
|
10526
|
-
this.layout = 'classic';
|
|
10527
|
-
|
|
10528
|
-
/**
|
|
10529
|
-
* @private
|
|
10530
|
-
*/
|
|
10531
|
-
this.shape = 'classic';
|
|
10532
|
-
|
|
10533
|
-
/**
|
|
10534
|
-
* @private
|
|
10535
|
-
*/
|
|
10536
|
-
this.size = 'lg';
|
|
10537
|
-
|
|
10538
|
-
this.touched = false;
|
|
10539
|
-
this.util = new AuroInputUtilities({
|
|
10540
|
-
locale: "en-US",
|
|
10541
|
-
format: this.format
|
|
10542
|
-
});
|
|
10543
|
-
this.validation = new AuroFormValidation();
|
|
10544
|
-
this.inputIconName = undefined;
|
|
10545
|
-
this.showPassword = false;
|
|
10546
|
-
this.validationCCLength = undefined;
|
|
10547
|
-
this.hasValue = false;
|
|
10548
|
-
this.label = 'Input label is undefined';
|
|
10549
|
-
|
|
10550
10501
|
|
|
10502
|
+
/** @private */
|
|
10551
10503
|
this.allowedInputTypes = [
|
|
10552
10504
|
"text",
|
|
10553
10505
|
"number",
|
|
@@ -10556,7 +10508,9 @@ class BaseInput extends AuroElement {
|
|
|
10556
10508
|
"credit-card",
|
|
10557
10509
|
"tel"
|
|
10558
10510
|
];
|
|
10559
|
-
this.
|
|
10511
|
+
this.appearance = "default";
|
|
10512
|
+
|
|
10513
|
+
/** @private */
|
|
10560
10514
|
this.dateFormatMap = {
|
|
10561
10515
|
'mm/dd/yyyy': 'dateMMDDYYYY',
|
|
10562
10516
|
'dd/mm/yyyy': 'dateDDMMYYYY',
|
|
@@ -10573,27 +10527,62 @@ class BaseInput extends AuroElement {
|
|
|
10573
10527
|
'dd/mm': 'dateDDMM',
|
|
10574
10528
|
'mm/dd': 'dateMMDD'
|
|
10575
10529
|
};
|
|
10530
|
+
this.disabled = false;
|
|
10531
|
+
|
|
10532
|
+
/** @private */
|
|
10576
10533
|
this.domHandler = new DomHandler();
|
|
10577
10534
|
this.dvInputOnly = false;
|
|
10578
10535
|
this.hasValue = false;
|
|
10536
|
+
this.hideLabelVisually = false;
|
|
10537
|
+
this.icon = false;
|
|
10538
|
+
|
|
10539
|
+
/** @private */
|
|
10579
10540
|
this.inputIconName = undefined;
|
|
10541
|
+
|
|
10542
|
+
/** @private */
|
|
10580
10543
|
this.label = 'Input label is undefined';
|
|
10544
|
+
this.layout = 'classic';
|
|
10545
|
+
this.locale = 'en-US';
|
|
10546
|
+
this.max = undefined;
|
|
10547
|
+
this.maxLength = undefined;
|
|
10548
|
+
this.min = undefined;
|
|
10549
|
+
this.minLength = undefined;
|
|
10581
10550
|
this.noValidate = false;
|
|
10582
|
-
this.
|
|
10551
|
+
this.onDark = false;
|
|
10552
|
+
// Raw values returned from the input mask before model normalization.
|
|
10553
|
+
this._rawMaskValue = undefined;
|
|
10554
|
+
this.required = false;
|
|
10555
|
+
this.setCustomValidityForType = undefined;
|
|
10556
|
+
// Credit Card is intentionally excluded — its mask manages the cursor
|
|
10557
|
+
// itself, and listing it here caused cursor placement issues in Safari.
|
|
10558
|
+
/** @private */
|
|
10583
10559
|
this.setSelectionInputTypes = [
|
|
10584
10560
|
"text",
|
|
10585
10561
|
"password",
|
|
10586
10562
|
"email"
|
|
10587
|
-
];
|
|
10563
|
+
];
|
|
10564
|
+
this.shape = 'classic';
|
|
10565
|
+
|
|
10566
|
+
/** @private */
|
|
10588
10567
|
this.showPassword = false;
|
|
10568
|
+
this.size = 'lg';
|
|
10589
10569
|
this.touched = false;
|
|
10570
|
+
|
|
10571
|
+
/** @private */
|
|
10590
10572
|
this.uniqueId = new UniqueId().create();
|
|
10573
|
+
|
|
10574
|
+
/** @private */
|
|
10591
10575
|
this.util = new AuroInputUtilities({
|
|
10592
10576
|
locale: this.locale,
|
|
10593
10577
|
format: this.format
|
|
10594
10578
|
});
|
|
10579
|
+
|
|
10580
|
+
/** @private */
|
|
10595
10581
|
this.validation = new AuroFormValidation();
|
|
10582
|
+
|
|
10583
|
+
/** @private */
|
|
10596
10584
|
this.validationCCLength = undefined;
|
|
10585
|
+
this.value = undefined;
|
|
10597
10586
|
}
|
|
10598
10587
|
|
|
10599
10588
|
// function to define props used within the scope of this component
|
|
@@ -11097,6 +11086,15 @@ class BaseInput extends AuroElement {
|
|
|
11097
11086
|
|
|
11098
11087
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
11099
11088
|
|
|
11089
|
+
// Normalize the format token to lowercase so case-mixed values supplied
|
|
11090
|
+
// via attribute (e.g. `format="MM/DD/YYYY"`) hit the `dateFormatMap`
|
|
11091
|
+
// lookup inside `setCustomHelpTextMessage`. Without this, an uppercase
|
|
11092
|
+
// format silently misses the map and leaves `setCustomValidityForType`
|
|
11093
|
+
// unset.
|
|
11094
|
+
if (this.format) {
|
|
11095
|
+
this.format = this.format.toLowerCase();
|
|
11096
|
+
}
|
|
11097
|
+
|
|
11100
11098
|
// use validity message override if declared when initializing the component
|
|
11101
11099
|
if (this.hasAttribute('setCustomValidity')) {
|
|
11102
11100
|
this.ValidityMessageOverride = this.setCustomValidity;
|
|
@@ -11180,6 +11178,13 @@ class BaseInput extends AuroElement {
|
|
|
11180
11178
|
|
|
11181
11179
|
if (typeToI18n.includes(this.type)) {
|
|
11182
11180
|
this.setCustomValidityForType = i18n(this.lang, this.type);
|
|
11181
|
+
// COVERAGE: this `else if` branch is unreachable in WTR. connectedCallback
|
|
11182
|
+
// (L682) calls configureDataForType, which at L1266-1268 assigns
|
|
11183
|
+
// `this.format = this.util.getDateMaskFromLocale().toLowerCase()` for any
|
|
11184
|
+
// type=date input whose `format` attribute is unset. That runs before
|
|
11185
|
+
// firstUpdated invokes setCustomHelpTextMessage, so `!this.format` is
|
|
11186
|
+
// always false here. Retained as a defensive fallback; the whole function
|
|
11187
|
+
// is @deprecated per AB#1557296 and slated for removal.
|
|
11183
11188
|
} else if (!this.format && this.type === 'date') {
|
|
11184
11189
|
this.setCustomValidityForType = i18n(this.lang, 'dateMMDDYYYY');
|
|
11185
11190
|
} else if (this.dateFormatMap[this.format]) {
|
|
@@ -11469,6 +11474,38 @@ class BaseInput extends AuroElement {
|
|
|
11469
11474
|
this.touched = true;
|
|
11470
11475
|
this.validation.validate(this);
|
|
11471
11476
|
}
|
|
11477
|
+
|
|
11478
|
+
// Prevents cursor jumping in Safari. Setting `this.value` triggers a Lit
|
|
11479
|
+
// update that can re-render the input and reset the native cursor; we
|
|
11480
|
+
// capture the caret position before that update commits and restore it
|
|
11481
|
+
// via `setSelectionRange` once the update has flushed. Gated on
|
|
11482
|
+
// `setSelectionInputTypes` so credit-card (and other masked types whose
|
|
11483
|
+
// formatter manages the cursor itself) doesn't get a competing write.
|
|
11484
|
+
// Capture the caret position INSIDE the gate — reading `selectionStart`
|
|
11485
|
+
// on input types that don't support text selection (number, email in
|
|
11486
|
+
// some browsers) throws InvalidStateError, which would crash all input
|
|
11487
|
+
// handling. Wrap the read in try/catch belt-and-suspenders even though
|
|
11488
|
+
// the gated types currently support it, since the list is a public
|
|
11489
|
+
// property a consumer could mutate.
|
|
11490
|
+
if (this.setSelectionInputTypes.includes(this.type)) {
|
|
11491
|
+
let selectionStart = null;
|
|
11492
|
+
try {
|
|
11493
|
+
({ selectionStart } = this.inputElement);
|
|
11494
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11495
|
+
return;
|
|
11496
|
+
}
|
|
11497
|
+
if (typeof selectionStart !== 'number') {
|
|
11498
|
+
return;
|
|
11499
|
+
}
|
|
11500
|
+
this.updateComplete.then(() => {
|
|
11501
|
+
try {
|
|
11502
|
+
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
11503
|
+
} catch (error) { // eslint-disable-line no-unused-vars
|
|
11504
|
+
// Some input types (number/email in certain UAs) throw on
|
|
11505
|
+
// setSelectionRange; swallow and let the native cursor stand.
|
|
11506
|
+
}
|
|
11507
|
+
});
|
|
11508
|
+
}
|
|
11472
11509
|
}
|
|
11473
11510
|
|
|
11474
11511
|
/**
|
|
@@ -11602,7 +11639,7 @@ class BaseInput extends AuroElement {
|
|
|
11602
11639
|
*/
|
|
11603
11640
|
get placeholderStr() {
|
|
11604
11641
|
if (!this.placeholder && this.type === 'date') {
|
|
11605
|
-
return this.format
|
|
11642
|
+
return this.format.toUpperCase();
|
|
11606
11643
|
}
|
|
11607
11644
|
return this.placeholder || "";
|
|
11608
11645
|
}
|
|
@@ -12093,7 +12130,7 @@ class AuroHelpText extends LitElement {
|
|
|
12093
12130
|
}
|
|
12094
12131
|
}
|
|
12095
12132
|
|
|
12096
|
-
var formkitVersion = '
|
|
12133
|
+
var formkitVersion = '202607010104';
|
|
12097
12134
|
|
|
12098
12135
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12099
12136
|
// See LICENSE in the project root for license information.
|
|
@@ -12596,6 +12633,7 @@ class AuroInput extends BaseInput {
|
|
|
12596
12633
|
<${this.buttonTag}
|
|
12597
12634
|
@click="${this.handleClickShowPassword}"
|
|
12598
12635
|
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
12636
|
+
aria-pressed="${this.showPassword ? 'true' : 'false'}"
|
|
12599
12637
|
class="notificationBtn passwordBtn"
|
|
12600
12638
|
shape="circle"
|
|
12601
12639
|
size="sm"
|
|
@@ -12669,25 +12707,29 @@ class AuroInput extends BaseInput {
|
|
|
12669
12707
|
* @returns {html} - Returns HTML for the help text and error message.
|
|
12670
12708
|
*/
|
|
12671
12709
|
renderHtmlHelpText() {
|
|
12710
|
+
// Single `<p>` with stable identity across validity transitions —
|
|
12711
|
+
// previously two distinct templates (valid vs invalid) caused Lit to
|
|
12712
|
+
// replace the node entirely on a flip, and VoiceOver wouldn't
|
|
12713
|
+
// re-announce because the live-region element it was watching had been
|
|
12714
|
+
// removed and a new one inserted. Keeping one node means the `role`,
|
|
12715
|
+
// `aria-live`, and text content all change in-place, which AT does
|
|
12716
|
+
// observe and announce.
|
|
12717
|
+
const isError = this.validity && this.validity !== 'valid';
|
|
12672
12718
|
return html$1`
|
|
12673
|
-
|
|
12674
|
-
?
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
appearance="${this.onDark ? 'inverse' : this.appearance}">
|
|
12685
|
-
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
12686
|
-
${this.errorMessage}
|
|
12687
|
-
</p>
|
|
12688
|
-
</${this.helpTextTag}>
|
|
12689
|
-
`
|
|
12719
|
+
<${this.helpTextTag}
|
|
12720
|
+
appearance="${this.onDark ? 'inverse' : this.appearance}"
|
|
12721
|
+
?error=${isError}>
|
|
12722
|
+
<p
|
|
12723
|
+
id="${this.uniqueId}"
|
|
12724
|
+
part="helpText"
|
|
12725
|
+
role="${ifDefined(isError ? 'alert' : undefined)}"
|
|
12726
|
+
aria-live="${ifDefined(isError ? 'assertive' : undefined)}">
|
|
12727
|
+
${isError
|
|
12728
|
+
? this.errorMessage
|
|
12729
|
+
: html$1`<slot name="helpText">${this.getHelpText()}</slot>`
|
|
12690
12730
|
}
|
|
12731
|
+
</p>
|
|
12732
|
+
</${this.helpTextTag}>
|
|
12691
12733
|
`;
|
|
12692
12734
|
}
|
|
12693
12735
|
|
|
@@ -813,15 +813,17 @@ class AuroFormValidation {
|
|
|
813
813
|
);
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
817
|
+
|
|
818
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
819
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
820
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
821
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
822
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
819
823
|
hasValue = false;
|
|
820
824
|
}
|
|
821
825
|
}
|
|
822
826
|
|
|
823
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
824
|
-
|
|
825
827
|
if (isCombobox) {
|
|
826
828
|
|
|
827
829
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -1212,7 +1214,7 @@ class AuroHelpText extends i$2 {
|
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1214
1216
|
|
|
1215
|
-
var formkitVersion = '
|
|
1217
|
+
var formkitVersion = '202607010104';
|
|
1216
1218
|
|
|
1217
1219
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1218
1220
|
// See LICENSE in the project root for license information.
|
|
@@ -813,15 +813,17 @@ class AuroFormValidation {
|
|
|
813
813
|
);
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
817
|
+
|
|
818
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
819
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
820
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
821
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
822
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
819
823
|
hasValue = false;
|
|
820
824
|
}
|
|
821
825
|
}
|
|
822
826
|
|
|
823
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
824
|
-
|
|
825
827
|
if (isCombobox) {
|
|
826
828
|
|
|
827
829
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -1212,7 +1214,7 @@ class AuroHelpText extends i$2 {
|
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1214
1216
|
|
|
1215
|
-
var formkitVersion = '
|
|
1217
|
+
var formkitVersion = '202607010104';
|
|
1216
1218
|
|
|
1217
1219
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1218
1220
|
// See LICENSE in the project root for license information.
|
|
@@ -813,15 +813,17 @@ class AuroFormValidation {
|
|
|
813
813
|
);
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
817
|
+
|
|
818
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
819
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
820
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
821
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
822
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
819
823
|
hasValue = false;
|
|
820
824
|
}
|
|
821
825
|
}
|
|
822
826
|
|
|
823
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
824
|
-
|
|
825
827
|
if (isCombobox) {
|
|
826
828
|
|
|
827
829
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -1212,7 +1214,7 @@ class AuroHelpText extends i$2 {
|
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1214
1216
|
|
|
1215
|
-
var formkitVersion = '
|
|
1217
|
+
var formkitVersion = '202607010104';
|
|
1216
1218
|
|
|
1217
1219
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1218
1220
|
// See LICENSE in the project root for license information.
|
|
@@ -752,15 +752,17 @@ class AuroFormValidation {
|
|
|
752
752
|
);
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
755
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
756
|
+
|
|
757
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
758
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
759
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
760
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
761
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
758
762
|
hasValue = false;
|
|
759
763
|
}
|
|
760
764
|
}
|
|
761
765
|
|
|
762
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
763
|
-
|
|
764
766
|
if (isCombobox) {
|
|
765
767
|
|
|
766
768
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -1151,7 +1153,7 @@ class AuroHelpText extends LitElement {
|
|
|
1151
1153
|
}
|
|
1152
1154
|
}
|
|
1153
1155
|
|
|
1154
|
-
var formkitVersion = '
|
|
1156
|
+
var formkitVersion = '202607010104';
|
|
1155
1157
|
|
|
1156
1158
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1157
1159
|
// See LICENSE in the project root for license information.
|
|
@@ -752,15 +752,17 @@ class AuroFormValidation {
|
|
|
752
752
|
);
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
755
|
+
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
756
|
+
|
|
757
|
+
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false.
|
|
758
|
+
// Skip for combobox: its second auro-input is the fullscreen-bib mirror of the same value, not an independent
|
|
759
|
+
// field (datepicker is the intended consumer — start/end are independently required).
|
|
760
|
+
if (this.auroInputElements?.length === 2 && !isCombobox) {
|
|
761
|
+
if (!this.auroInputElements[1].value || this.auroInputElements[1].value.length === 0) {
|
|
758
762
|
hasValue = false;
|
|
759
763
|
}
|
|
760
764
|
}
|
|
761
765
|
|
|
762
|
-
const isCombobox = this.runtimeUtils.elementMatch(elem, 'auro-combobox');
|
|
763
|
-
|
|
764
766
|
if (isCombobox) {
|
|
765
767
|
|
|
766
768
|
if (!elem.persistInput || elem.behavior === "filter") {
|
|
@@ -1151,7 +1153,7 @@ class AuroHelpText extends LitElement {
|
|
|
1151
1153
|
}
|
|
1152
1154
|
}
|
|
1153
1155
|
|
|
1154
|
-
var formkitVersion = '
|
|
1156
|
+
var formkitVersion = '202607010104';
|
|
1155
1157
|
|
|
1156
1158
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1157
1159
|
// See LICENSE in the project root for license information.
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
<auro-anchorlink fluid href="#typeAhead" class="level2 body-xs">Type-Ahead</auro-anchorlink>
|
|
26
26
|
<auro-anchorlink fluid href="#disableComponent" class="level2 body-xs">Disable Component</auro-anchorlink>
|
|
27
27
|
<auro-anchorlink fluid href="#disableOptions" class="level2 body-xs">Disable Option(s)</auro-anchorlink>
|
|
28
|
+
<auro-anchorlink fluid href="#submenus" class="level2 body-xs">Submenus</auro-anchorlink>
|
|
28
29
|
<auro-anchorlink fluid href="#requireSelection" class="level2 body-xs">Require Selection</auro-anchorlink>
|
|
29
30
|
<auro-anchorlink fluid href="#forceError" class="level2 body-xs">Force Error State</auro-anchorlink>
|
|
30
31
|
<auro-anchorlink fluid href="#customValidation" class="level2 body-xs">Custom Validation</auro-anchorlink>
|
|
@@ -905,6 +906,91 @@
|
|
|
905
906
|
</auro-select></code></pre>
|
|
906
907
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
907
908
|
</auro-accordion>
|
|
909
|
+
<auro-header level="3" id="submenus">Submenus</auro-header>
|
|
910
|
+
<p>Options may be organized into nested groups by placing additional <code><auro-menu></code> elements inside the top-level <code><auro-menu></code>. Use <code><hr></code> elements to add visual dividers between groups. Nested groups receive an indent and an <code>aria-label="submenu"</code> so that assistive technologies can announce the grouping.</p>
|
|
911
|
+
<div class="exampleWrapper">
|
|
912
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/with-submenus.html) -->
|
|
913
|
+
<!-- The below content is automatically added from ./../apiExamples/with-submenus.html -->
|
|
914
|
+
<auro-select placeholder="Placeholder Text">
|
|
915
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
916
|
+
<span slot="label">Label</span>
|
|
917
|
+
<auro-menu>
|
|
918
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
919
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
920
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
921
|
+
<hr>
|
|
922
|
+
<auro-menu>
|
|
923
|
+
<auro-menuoption value="apples">Apples</auro-menuoption>
|
|
924
|
+
<auro-menuoption value="oranges">Oranges</auro-menuoption>
|
|
925
|
+
<auro-menuoption value="pears">Pears</auro-menuoption>
|
|
926
|
+
<auro-menuoption value="grapes">Grapes</auro-menuoption>
|
|
927
|
+
<auro-menuoption value="kiwi">Kiwi</auro-menuoption>
|
|
928
|
+
<hr>
|
|
929
|
+
<auro-menu>
|
|
930
|
+
<auro-menuoption value="person">Person</auro-menuoption>
|
|
931
|
+
<auro-menuoption value="woman">Woman</auro-menuoption>
|
|
932
|
+
<auro-menuoption value="man">Man</auro-menuoption>
|
|
933
|
+
<auro-menuoption value="camera">Camera</auro-menuoption>
|
|
934
|
+
<auro-menuoption value="tv">TV</auro-menuoption>
|
|
935
|
+
</auro-menu>
|
|
936
|
+
</auro-menu>
|
|
937
|
+
<hr>
|
|
938
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
939
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
940
|
+
<hr>
|
|
941
|
+
<auro-menu>
|
|
942
|
+
<auro-menuoption value="cars">Cars</auro-menuoption>
|
|
943
|
+
<auro-menuoption value="trucks">Trucks</auro-menuoption>
|
|
944
|
+
<auro-menuoption value="boats">Boats</auro-menuoption>
|
|
945
|
+
<auro-menuoption value="planes">Planes</auro-menuoption>
|
|
946
|
+
<auro-menuoption value="motorcycles">Motorcycles</auro-menuoption>
|
|
947
|
+
</auro-menu>
|
|
948
|
+
</auro-menu>
|
|
949
|
+
</auro-select>
|
|
950
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
951
|
+
</div>
|
|
952
|
+
<auro-accordion alignRight>
|
|
953
|
+
<span slot="trigger">See code</span>
|
|
954
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/with-submenus.html) -->
|
|
955
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/with-submenus.html -->
|
|
956
|
+
<pre class="language-html"><code class="language-html"><auro-select placeholder="Placeholder Text">
|
|
957
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
958
|
+
<span slot="label">Label</span>
|
|
959
|
+
<auro-menu>
|
|
960
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
961
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
962
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
963
|
+
<hr>
|
|
964
|
+
<auro-menu>
|
|
965
|
+
<auro-menuoption value="apples">Apples</auro-menuoption>
|
|
966
|
+
<auro-menuoption value="oranges">Oranges</auro-menuoption>
|
|
967
|
+
<auro-menuoption value="pears">Pears</auro-menuoption>
|
|
968
|
+
<auro-menuoption value="grapes">Grapes</auro-menuoption>
|
|
969
|
+
<auro-menuoption value="kiwi">Kiwi</auro-menuoption>
|
|
970
|
+
<hr>
|
|
971
|
+
<auro-menu>
|
|
972
|
+
<auro-menuoption value="person">Person</auro-menuoption>
|
|
973
|
+
<auro-menuoption value="woman">Woman</auro-menuoption>
|
|
974
|
+
<auro-menuoption value="man">Man</auro-menuoption>
|
|
975
|
+
<auro-menuoption value="camera">Camera</auro-menuoption>
|
|
976
|
+
<auro-menuoption value="tv">TV</auro-menuoption>
|
|
977
|
+
</auro-menu>
|
|
978
|
+
</auro-menu>
|
|
979
|
+
<hr>
|
|
980
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
981
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
982
|
+
<hr>
|
|
983
|
+
<auro-menu>
|
|
984
|
+
<auro-menuoption value="cars">Cars</auro-menuoption>
|
|
985
|
+
<auro-menuoption value="trucks">Trucks</auro-menuoption>
|
|
986
|
+
<auro-menuoption value="boats">Boats</auro-menuoption>
|
|
987
|
+
<auro-menuoption value="planes">Planes</auro-menuoption>
|
|
988
|
+
<auro-menuoption value="motorcycles">Motorcycles</auro-menuoption>
|
|
989
|
+
</auro-menu>
|
|
990
|
+
</auro-menu>
|
|
991
|
+
</auro-select></code></pre>
|
|
992
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
993
|
+
</auro-accordion>
|
|
908
994
|
<auro-header level="3" id="requireSelection">Require selection of an option</auro-header>
|
|
909
995
|
<p>Certain use cases may require the guest to make a selection from the component in order to continue the intended work flow (e.g. form submission).</p>
|
|
910
996
|
<p>When the component is marked required:</p>
|