@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.0 → 0.0.0-pr624.10
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/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +88 -6
- package/components/bibtemplate/dist/registered.js +88 -6
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.md +30 -29
- package/components/combobox/demo/api.min.js +609 -532
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +607 -530
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +479 -387
- package/components/combobox/dist/registered.js +479 -387
- package/components/counter/demo/api.min.js +377 -62
- package/components/counter/demo/index.min.js +377 -62
- package/components/counter/dist/index.js +377 -62
- package/components/counter/dist/registered.js +377 -62
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +868 -438
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +868 -438
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +710 -280
- package/components/datepicker/dist/registered.js +710 -280
- package/components/dropdown/demo/api.md +2 -2
- package/components/dropdown/demo/api.min.js +199 -37
- package/components/dropdown/demo/index.md +45 -0
- package/components/dropdown/demo/index.min.js +199 -37
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +199 -37
- package/components/dropdown/dist/registered.js +199 -37
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/README.md +1 -1
- package/components/input/demo/api.md +57 -53
- package/components/input/demo/api.min.js +142 -141
- package/components/input/demo/index.md +4 -4
- package/components/input/demo/index.min.js +142 -141
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/auro-input.d.ts +22 -13
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +142 -141
- package/components/input/dist/registered.js +142 -141
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +95 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +115 -130
- package/components/menu/demo/index.min.js +115 -130
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +116 -90
- package/components/menu/dist/registered.js +115 -130
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +108 -42
- package/components/select/demo/api.min.js +1264 -352
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -351
- package/components/select/dist/auro-select.d.ts +110 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1105 -190
- package/components/select/dist/registered.js +1105 -190
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/emphasized}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{style-css.d.ts → classic/bibStyles-css.d.ts} +0 -0
|
@@ -89,11 +89,11 @@ function valueExample() {
|
|
|
89
89
|
const valueExample = document.querySelector('#valueExample');
|
|
90
90
|
|
|
91
91
|
document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
|
|
92
|
-
valueExample.value =
|
|
92
|
+
valueExample.value = 'Oranges';
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
|
|
96
|
-
valueExample.value =
|
|
96
|
+
valueExample.value = 'Dragon Fruit';
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
|
|
@@ -256,7 +256,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
256
256
|
|
|
257
257
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
258
258
|
|
|
259
|
-
let AuroLibraryRuntimeUtils$
|
|
259
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
260
260
|
|
|
261
261
|
/* eslint-disable jsdoc/require-param */
|
|
262
262
|
|
|
@@ -375,9 +375,10 @@ let DateFormatter$1 = class DateFormatter {
|
|
|
375
375
|
/**
|
|
376
376
|
* Convert a date object to string format.
|
|
377
377
|
* @param {Object} date - Date to convert to string.
|
|
378
|
-
* @
|
|
378
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
379
|
+
* @returns {String} Returns the date as a string.
|
|
379
380
|
*/
|
|
380
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
381
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
381
382
|
year: "numeric",
|
|
382
383
|
month: "2-digit",
|
|
383
384
|
day: "2-digit",
|
|
@@ -569,7 +570,7 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
569
570
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
570
571
|
|
|
571
572
|
// Get the date string of the date object we created from the string date
|
|
572
|
-
const actualDateStr = dateFormatter$1.getDateAsString(dateObj);
|
|
573
|
+
const actualDateStr = dateFormatter$1.getDateAsString(dateObj, "en-US");
|
|
573
574
|
|
|
574
575
|
// Guard Clause: Generated date matches date string input
|
|
575
576
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -734,7 +735,7 @@ const {
|
|
|
734
735
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
735
736
|
|
|
736
737
|
constructor() {
|
|
737
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
738
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
738
739
|
}
|
|
739
740
|
|
|
740
741
|
/**
|
|
@@ -1106,7 +1107,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
1106
1107
|
|
|
1107
1108
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1108
1109
|
|
|
1109
|
-
let AuroLibraryRuntimeUtils$
|
|
1110
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
1110
1111
|
|
|
1111
1112
|
/* eslint-disable jsdoc/require-param */
|
|
1112
1113
|
|
|
@@ -1689,10 +1690,11 @@ const flip$1 = function (options) {
|
|
|
1689
1690
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1690
1691
|
const nextPlacement = placements[nextIndex];
|
|
1691
1692
|
if (nextPlacement) {
|
|
1692
|
-
var _overflowsData$;
|
|
1693
1693
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1694
|
-
|
|
1695
|
-
if
|
|
1694
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1695
|
+
// We leave the current main axis only if every placement on that axis
|
|
1696
|
+
// overflows the main axis.
|
|
1697
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1696
1698
|
// Try next placement and re-run the lifecycle.
|
|
1697
1699
|
return {
|
|
1698
1700
|
data: {
|
|
@@ -2713,8 +2715,28 @@ class AuroFloatingUI {
|
|
|
2713
2715
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2714
2716
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2715
2717
|
|
|
2718
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2719
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2720
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2721
|
+
}
|
|
2716
2722
|
const mouseEventGlobalHandler = (event) => {
|
|
2717
|
-
|
|
2723
|
+
const isPressed = event.type === 'mousedown';
|
|
2724
|
+
if (isPressed) {
|
|
2725
|
+
// Clear any pending timeout to prevent race condition
|
|
2726
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2727
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2728
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2729
|
+
}
|
|
2730
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2731
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2732
|
+
}
|
|
2733
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2734
|
+
// Schedule reset and track timeout ID
|
|
2735
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2736
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2737
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2738
|
+
}, 0);
|
|
2739
|
+
}
|
|
2718
2740
|
};
|
|
2719
2741
|
|
|
2720
2742
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2841,6 +2863,7 @@ class AuroFloatingUI {
|
|
|
2841
2863
|
|
|
2842
2864
|
// Compute the position of the bib
|
|
2843
2865
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2866
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2844
2867
|
placement: this.element.floaterConfig?.placement,
|
|
2845
2868
|
middleware: middleware || []
|
|
2846
2869
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2975,8 +2998,9 @@ class AuroFloatingUI {
|
|
|
2975
2998
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2976
2999
|
return;
|
|
2977
3000
|
}
|
|
2978
|
-
|
|
2979
|
-
if
|
|
3001
|
+
|
|
3002
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
3003
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2980
3004
|
return;
|
|
2981
3005
|
}
|
|
2982
3006
|
|
|
@@ -3277,8 +3301,6 @@ class AuroFloatingUI {
|
|
|
3277
3301
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3278
3302
|
}
|
|
3279
3303
|
|
|
3280
|
-
document.body.append(this.element.bib);
|
|
3281
|
-
|
|
3282
3304
|
this.regenerateBibId();
|
|
3283
3305
|
this.handleTriggerTabIndex();
|
|
3284
3306
|
|
|
@@ -3421,7 +3443,7 @@ const cacheFetch$3 = (uri, options = {}) => {
|
|
|
3421
3443
|
return _fetchMap$3.get(uri);
|
|
3422
3444
|
};
|
|
3423
3445
|
|
|
3424
|
-
var styleCss$3
|
|
3446
|
+
var styleCss$2$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
3425
3447
|
|
|
3426
3448
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3427
3449
|
// See LICENSE in the project root for license information.
|
|
@@ -3464,7 +3486,7 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3464
3486
|
|
|
3465
3487
|
static get styles() {
|
|
3466
3488
|
return i$5`
|
|
3467
|
-
${styleCss$3
|
|
3489
|
+
${styleCss$2$3}
|
|
3468
3490
|
`;
|
|
3469
3491
|
}
|
|
3470
3492
|
|
|
@@ -3509,6 +3531,76 @@ var tokensCss$2$2 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3509
3531
|
|
|
3510
3532
|
var colorCss$3$2 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3511
3533
|
|
|
3534
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3535
|
+
// See LICENSE in the project root for license information.
|
|
3536
|
+
|
|
3537
|
+
// ---------------------------------------------------------------------
|
|
3538
|
+
|
|
3539
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3540
|
+
|
|
3541
|
+
let AuroLibraryRuntimeUtils$1$3 = class AuroLibraryRuntimeUtils {
|
|
3542
|
+
|
|
3543
|
+
/* eslint-disable jsdoc/require-param */
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* This will register a new custom element with the browser.
|
|
3547
|
+
* @param {String} name - The name of the custom element.
|
|
3548
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3549
|
+
* @returns {void}
|
|
3550
|
+
*/
|
|
3551
|
+
registerComponent(name, componentClass) {
|
|
3552
|
+
if (!customElements.get(name)) {
|
|
3553
|
+
customElements.define(name, class extends componentClass {});
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
/**
|
|
3558
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3559
|
+
* @returns {void}
|
|
3560
|
+
*/
|
|
3561
|
+
closestElement(
|
|
3562
|
+
selector, // selector like in .closest()
|
|
3563
|
+
base = this, // extra functionality to skip a parent
|
|
3564
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3565
|
+
!el || el === document || el === window
|
|
3566
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3567
|
+
: found
|
|
3568
|
+
? found // found a selector INside this element
|
|
3569
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3570
|
+
) {
|
|
3571
|
+
return __Closest(base);
|
|
3572
|
+
}
|
|
3573
|
+
/* eslint-enable jsdoc/require-param */
|
|
3574
|
+
|
|
3575
|
+
/**
|
|
3576
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3577
|
+
* @param {Object} elem - The element to check.
|
|
3578
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3579
|
+
* @returns {void}
|
|
3580
|
+
*/
|
|
3581
|
+
handleComponentTagRename(elem, tagName) {
|
|
3582
|
+
const tag = tagName.toLowerCase();
|
|
3583
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3584
|
+
|
|
3585
|
+
if (elemTag !== tag) {
|
|
3586
|
+
elem.setAttribute(tag, true);
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* Validates if an element is a specific Auro component.
|
|
3592
|
+
* @param {Object} elem - The element to validate.
|
|
3593
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3594
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3595
|
+
*/
|
|
3596
|
+
elementMatch(elem, tagName) {
|
|
3597
|
+
const tag = tagName.toLowerCase();
|
|
3598
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3599
|
+
|
|
3600
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3601
|
+
}
|
|
3602
|
+
};
|
|
3603
|
+
|
|
3512
3604
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3513
3605
|
// See LICENSE in the project root for license information.
|
|
3514
3606
|
|
|
@@ -3528,7 +3620,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3528
3620
|
*/
|
|
3529
3621
|
privateDefaults() {
|
|
3530
3622
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3531
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
3623
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$3();
|
|
3532
3624
|
}
|
|
3533
3625
|
|
|
3534
3626
|
// function to define props used within the scope of this component
|
|
@@ -3596,7 +3688,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3596
3688
|
return [
|
|
3597
3689
|
super.styles,
|
|
3598
3690
|
i$5`${tokensCss$2$2}`,
|
|
3599
|
-
i$5`${styleCss$3
|
|
3691
|
+
i$5`${styleCss$2$3}`,
|
|
3600
3692
|
i$5`${colorCss$3$2}`
|
|
3601
3693
|
];
|
|
3602
3694
|
}
|
|
@@ -3610,7 +3702,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3610
3702
|
*
|
|
3611
3703
|
*/
|
|
3612
3704
|
static register(name = "auro-icon") {
|
|
3613
|
-
AuroLibraryRuntimeUtils$1$
|
|
3705
|
+
AuroLibraryRuntimeUtils$1$3.prototype.registerComponent(name, AuroIcon);
|
|
3614
3706
|
}
|
|
3615
3707
|
|
|
3616
3708
|
connectedCallback() {
|
|
@@ -3678,7 +3770,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3678
3770
|
|
|
3679
3771
|
var iconVersion$3 = '6.1.2';
|
|
3680
3772
|
|
|
3681
|
-
var styleCss$
|
|
3773
|
+
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
3682
3774
|
|
|
3683
3775
|
var colorCss$2$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3684
3776
|
|
|
@@ -3688,7 +3780,6 @@ var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-colo
|
|
|
3688
3780
|
// See LICENSE in the project root for license information.
|
|
3689
3781
|
|
|
3690
3782
|
|
|
3691
|
-
|
|
3692
3783
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3693
3784
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3694
3785
|
'xl',
|
|
@@ -3713,12 +3804,12 @@ class AuroDropdownBib extends i$2 {
|
|
|
3713
3804
|
*/
|
|
3714
3805
|
this._mobileBreakpointValue = undefined;
|
|
3715
3806
|
|
|
3716
|
-
AuroLibraryRuntimeUtils$
|
|
3807
|
+
AuroLibraryRuntimeUtils$2$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3717
3808
|
}
|
|
3718
3809
|
|
|
3719
3810
|
static get styles() {
|
|
3720
3811
|
return [
|
|
3721
|
-
styleCss$
|
|
3812
|
+
styleCss$1$3,
|
|
3722
3813
|
colorCss$2$2,
|
|
3723
3814
|
tokensCss$1$2
|
|
3724
3815
|
];
|
|
@@ -3758,6 +3849,13 @@ class AuroDropdownBib extends i$2 {
|
|
|
3758
3849
|
type: Boolean,
|
|
3759
3850
|
reflect: true
|
|
3760
3851
|
},
|
|
3852
|
+
|
|
3853
|
+
/**
|
|
3854
|
+
* A reference to the associated bib template element.
|
|
3855
|
+
*/
|
|
3856
|
+
bibTemplate: {
|
|
3857
|
+
type: Object
|
|
3858
|
+
}
|
|
3761
3859
|
};
|
|
3762
3860
|
}
|
|
3763
3861
|
|
|
@@ -3790,9 +3888,50 @@ class AuroDropdownBib extends i$2 {
|
|
|
3790
3888
|
}
|
|
3791
3889
|
}
|
|
3792
3890
|
});
|
|
3891
|
+
|
|
3892
|
+
if (this.bibTemplate) {
|
|
3893
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3894
|
+
if (this.isFullscreen) {
|
|
3895
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3896
|
+
} else {
|
|
3897
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3898
|
+
}
|
|
3899
|
+
}
|
|
3793
3900
|
}
|
|
3794
3901
|
}
|
|
3795
3902
|
|
|
3903
|
+
connectedCallback() {
|
|
3904
|
+
super.connectedCallback();
|
|
3905
|
+
|
|
3906
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3907
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3908
|
+
const bibTemplate = event.detail.element;
|
|
3909
|
+
this.bibTemplate = bibTemplate;
|
|
3910
|
+
|
|
3911
|
+
if (bibTemplate) {
|
|
3912
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3913
|
+
if (this.isFullscreen) {
|
|
3914
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3915
|
+
} else {
|
|
3916
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3917
|
+
}
|
|
3918
|
+
}
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3922
|
+
firstUpdated(changedProperties) {
|
|
3923
|
+
super.firstUpdated(changedProperties);
|
|
3924
|
+
|
|
3925
|
+
// Dispatch a custom event when the component is connected
|
|
3926
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3927
|
+
bubbles: true,
|
|
3928
|
+
composed: true,
|
|
3929
|
+
detail: {
|
|
3930
|
+
element: this
|
|
3931
|
+
}
|
|
3932
|
+
}));
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3796
3935
|
// function that renders the HTML and CSS into the scope of the component
|
|
3797
3936
|
render() {
|
|
3798
3937
|
return u$2`
|
|
@@ -3805,15 +3944,17 @@ class AuroDropdownBib extends i$2 {
|
|
|
3805
3944
|
|
|
3806
3945
|
var dropdownVersion$1 = '3.0.0';
|
|
3807
3946
|
|
|
3808
|
-
var shapeSizeCss$1 = i$5`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:
|
|
3809
|
-
|
|
3810
|
-
var styleCss$1$3 = i$5`:host([layout*=classic]){position:relative;display:inline-block;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{position:relative;display:flex;align-items:center}:host([layout*=classic]) .trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
3947
|
+
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
3811
3948
|
|
|
3812
3949
|
var colorCss$1$3 = i$5`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
3813
3950
|
|
|
3814
|
-
var
|
|
3951
|
+
var classicColorCss$1 = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}:host([layout*=classic]) .trigger:focus-within,:host([layout*=classic]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([layout*=classic])[common],:host([layout*=classic])[bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67)}:host([layout*=classic])[common] .trigger:active,:host([layout*=classic])[common] .trigger:focus-within,:host([layout*=classic])[bordered] .trigger:active,:host([layout*=classic])[bordered] .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[error]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic])[error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[error] .trigger:focus-within,:host([layout*=classic])[error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled][common],:host([layout*=classic])[disabled][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic])[onDark]{--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([layout*=classic])[onDark]:focus-within,:host([layout*=classic])[onDark]:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([layout*=classic])[onDark][common],:host([layout*=classic])[onDark][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic])[onDark][common] .trigger:focus-within,:host([layout*=classic])[onDark][common] .trigger:active,:host([layout*=classic])[onDark][bordered] .trigger:focus-within,:host([layout*=classic])[onDark][bordered] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][error]{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic])[onDark][error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[onDark][error] .trigger:focus-within,:host([layout*=classic])[onDark][error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled][common],:host([layout*=classic])[onDark][disabled][bordered]{--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
|
|
3952
|
+
|
|
3953
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
3815
3954
|
|
|
3816
|
-
var
|
|
3955
|
+
var styleEmphasizedCss$1 = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3956
|
+
|
|
3957
|
+
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3817
3958
|
|
|
3818
3959
|
var colorCss$6 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3819
3960
|
|
|
@@ -3828,7 +3969,7 @@ var tokensCss$6 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3828
3969
|
|
|
3829
3970
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3830
3971
|
|
|
3831
|
-
let AuroLibraryRuntimeUtils$
|
|
3972
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
3832
3973
|
|
|
3833
3974
|
/* eslint-disable jsdoc/require-param */
|
|
3834
3975
|
|
|
@@ -3909,7 +4050,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3909
4050
|
this.onDark = false;
|
|
3910
4051
|
this.hasTextContent = false;
|
|
3911
4052
|
|
|
3912
|
-
AuroLibraryRuntimeUtils$
|
|
4053
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3913
4054
|
}
|
|
3914
4055
|
|
|
3915
4056
|
static get styles() {
|
|
@@ -3965,7 +4106,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3965
4106
|
*
|
|
3966
4107
|
*/
|
|
3967
4108
|
static register(name = "auro-helptext") {
|
|
3968
|
-
AuroLibraryRuntimeUtils$
|
|
4109
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
3969
4110
|
}
|
|
3970
4111
|
|
|
3971
4112
|
updated() {
|
|
@@ -4141,12 +4282,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4141
4282
|
this.matchWidth = false;
|
|
4142
4283
|
this.noHideOnThisFocusLoss = false;
|
|
4143
4284
|
|
|
4144
|
-
this.errorMessage = ''; // TODO
|
|
4285
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
4145
4286
|
|
|
4146
4287
|
// Layout Config
|
|
4147
|
-
this.layout = '
|
|
4288
|
+
this.layout = 'classic';
|
|
4148
4289
|
this.shape = 'rounded';
|
|
4149
4290
|
this.size = 'xl';
|
|
4291
|
+
this.parentBorder = false;
|
|
4150
4292
|
|
|
4151
4293
|
this.privateDefaults();
|
|
4152
4294
|
}
|
|
@@ -4162,7 +4304,8 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4162
4304
|
'trigger': true,
|
|
4163
4305
|
'wrapper': true,
|
|
4164
4306
|
'hasFocus': this.hasFocus,
|
|
4165
|
-
'simple': this.simple
|
|
4307
|
+
'simple': this.simple,
|
|
4308
|
+
'parentBorder': this.parentBorder
|
|
4166
4309
|
};
|
|
4167
4310
|
}
|
|
4168
4311
|
|
|
@@ -4214,7 +4357,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4214
4357
|
/**
|
|
4215
4358
|
* @private
|
|
4216
4359
|
*/
|
|
4217
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4360
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
4218
4361
|
|
|
4219
4362
|
/**
|
|
4220
4363
|
* @private
|
|
@@ -4429,6 +4572,15 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4429
4572
|
reflect: true
|
|
4430
4573
|
},
|
|
4431
4574
|
|
|
4575
|
+
/**
|
|
4576
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4577
|
+
* @private
|
|
4578
|
+
*/
|
|
4579
|
+
parentBorder: {
|
|
4580
|
+
type: Boolean,
|
|
4581
|
+
reflect: true
|
|
4582
|
+
},
|
|
4583
|
+
|
|
4432
4584
|
/**
|
|
4433
4585
|
* If declared, the popover and trigger will be set to the same width.
|
|
4434
4586
|
*/
|
|
@@ -4531,10 +4683,18 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4531
4683
|
static get styles() {
|
|
4532
4684
|
return [
|
|
4533
4685
|
colorCss$1$3,
|
|
4534
|
-
styleCss$1$3,
|
|
4535
4686
|
tokensCss$1$2,
|
|
4687
|
+
|
|
4688
|
+
// default layout
|
|
4689
|
+
classicColorCss$1,
|
|
4690
|
+
classicLayoutCss,
|
|
4691
|
+
|
|
4692
|
+
// emphasized layout
|
|
4536
4693
|
styleEmphasizedCss$1,
|
|
4694
|
+
|
|
4695
|
+
// snowflake layout
|
|
4537
4696
|
styleSnowflakeCss$1,
|
|
4697
|
+
|
|
4538
4698
|
shapeSizeCss$1
|
|
4539
4699
|
];
|
|
4540
4700
|
}
|
|
@@ -4548,7 +4708,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4548
4708
|
*
|
|
4549
4709
|
*/
|
|
4550
4710
|
static register(name = "auro-dropdown") {
|
|
4551
|
-
AuroLibraryRuntimeUtils$
|
|
4711
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroDropdown);
|
|
4552
4712
|
}
|
|
4553
4713
|
|
|
4554
4714
|
/**
|
|
@@ -4881,11 +5041,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4881
5041
|
*
|
|
4882
5042
|
* @private
|
|
4883
5043
|
* @method handleDefaultSlot
|
|
4884
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4885
5044
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4886
5045
|
*/
|
|
4887
|
-
handleDefaultSlot(
|
|
4888
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
5046
|
+
handleDefaultSlot() {
|
|
4889
5047
|
|
|
4890
5048
|
if (this.onSlotChange) {
|
|
4891
5049
|
this.onSlotChange();
|
|
@@ -4928,7 +5086,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4928
5086
|
id="trigger"
|
|
4929
5087
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
4930
5088
|
tabindex="${this.tabIndex}"
|
|
4931
|
-
?showBorder="${this.showTriggerBorders}"
|
|
4932
5089
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4933
5090
|
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4934
5091
|
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -4948,6 +5105,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4948
5105
|
${this.chevron || this.common ? u$2`
|
|
4949
5106
|
<div
|
|
4950
5107
|
id="showStateIcon"
|
|
5108
|
+
class="chevron"
|
|
4951
5109
|
part="chevron">
|
|
4952
5110
|
<${this.iconTag}
|
|
4953
5111
|
category="interface"
|
|
@@ -4962,9 +5120,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4962
5120
|
<div class="${e(helpTextClasses)}">
|
|
4963
5121
|
<slot name="helpText"></slot>
|
|
4964
5122
|
</div>
|
|
4965
|
-
<div class="slotContent">
|
|
4966
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4967
|
-
</div>
|
|
4968
5123
|
<div id="bibSizer" part="size"></div>
|
|
4969
5124
|
<${this.dropdownBibTag}
|
|
4970
5125
|
id="bib"
|
|
@@ -4973,6 +5128,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4973
5128
|
?common="${this.common}"
|
|
4974
5129
|
?rounded="${this.common || this.rounded}"
|
|
4975
5130
|
?inset="${this.common || this.inset}">
|
|
5131
|
+
<div class="slotContent">
|
|
5132
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5133
|
+
</div>
|
|
4976
5134
|
</${this.dropdownBibTag}>
|
|
4977
5135
|
</div>
|
|
4978
5136
|
`;
|
|
@@ -4984,6 +5142,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4984
5142
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4985
5143
|
*/
|
|
4986
5144
|
renderLayoutClassic() {
|
|
5145
|
+
|
|
4987
5146
|
return u$2`
|
|
4988
5147
|
<div>
|
|
4989
5148
|
<div
|
|
@@ -5021,9 +5180,10 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5021
5180
|
</div>
|
|
5022
5181
|
` : undefined }
|
|
5023
5182
|
</div>
|
|
5024
|
-
|
|
5025
|
-
<slot
|
|
5026
|
-
|
|
5183
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5184
|
+
<slot name="helpText"></slot>
|
|
5185
|
+
</${this.helpTextTag}>
|
|
5186
|
+
|
|
5027
5187
|
<div id="bibSizer" part="size"></div>
|
|
5028
5188
|
<${this.dropdownBibTag}
|
|
5029
5189
|
id="bib"
|
|
@@ -5033,6 +5193,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5033
5193
|
?rounded="${this.common || this.rounded}"
|
|
5034
5194
|
?inset="${this.common || this.inset}"
|
|
5035
5195
|
>
|
|
5196
|
+
<div class="slotContent">
|
|
5197
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5198
|
+
</div>
|
|
5036
5199
|
</${this.dropdownBibTag}>
|
|
5037
5200
|
</div>
|
|
5038
5201
|
`;
|
|
@@ -5115,15 +5278,19 @@ var dropdownVersion = '3.0.0';
|
|
|
5115
5278
|
*/
|
|
5116
5279
|
const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=e$1(class extends i{constructor(e){if(super(e),e.type!==t$1.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r$1,c]){const d=p(s),{values:p$1,keys:a}=this.dt(t,r$1,c);if(!Array.isArray(d))return this.ut=a,p$1;const h=this.ut??=[],v$1=[];let m$1,y,x=0,j=d.length-1,k=0,w=p$1.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v$1[k]=v(d[x],p$1[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p$1[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p$1[w]),r(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p$1[k]),r(s,d[x],d[j]),j--,k++;else if(void 0===m$1&&(m$1=u(a,k,w),y=u(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r(s,d[x]);v(e,p$1[k]),v$1[k]=e;}else v$1[k]=v(t,p$1[k]),r(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r(s,v$1[w+1]);v(e,p$1[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
|
|
5117
5280
|
|
|
5118
|
-
var shapeSizeCss = i$5`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:
|
|
5281
|
+
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
5119
5282
|
|
|
5120
5283
|
var styleCss$4$1 = i$5`.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}`;
|
|
5121
5284
|
|
|
5122
5285
|
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}.layoutDefault label,:host(:not([layout])) label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault :host(:not([bordered])) label,:host(:not([layout])) :host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}.layoutDefault :host(:not([bordered])) label.withIcon,:host(:not([layout])) :host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([class=layoutDefault][bordered]) label,:host(:not([layout])[bordered]) label{top:50%;transform:translateY(-50%)}:host([class=layoutDefault][bordered]) label.withIcon,:host(:not([layout])[bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([class=layoutDefault][bordered]) label:not(label.withIcon),:host(:not([layout])[bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}.layoutDefault .wrapper:focus-within label,:host(:not([layout])) .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault label.withValue,:host(:not([layout])) label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host([class=layoutDefault][activeLabel]) .wrapper label,:host(:not([layout])[activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault input,:host(:not([layout])) input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-200, 1rem);max-height:var(--ds-size-200, 1rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-basic-text-body-default-font-family, AS Circular);font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px);outline:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault input::-ms-reveal,.layoutDefault input::-ms-clear,:host(:not([layout])) input::-ms-reveal,:host(:not([layout])) input::-ms-clear{display:none}.layoutDefault input::-webkit-outer-spin-button,.layoutDefault input::-webkit-inner-spin-button,:host(:not([layout])) input::-webkit-outer-spin-button,:host(:not([layout])) input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.layoutDefault input[type=number],:host(:not([layout])) input[type=number]{-moz-appearance:textfield;appearance:textfield}.layoutDefault input:disabled,:host(:not([layout])) input:disabled{background:none;pointer-events:none}:host([class=layoutDefault][bordered]) input,:host(:not([layout])[bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.layoutDefault :host,:host(:not([layout])) :host{position:relative;display:block}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{display:flex;flex-direction:row}.layoutDefault .main,:host(:not([layout])) .main{display:flex;flex-direction:row;position:relative;flex:1}`;
|
|
5123
5286
|
|
|
5124
|
-
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{color:var(--ds-auro-input-
|
|
5287
|
+
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5125
5288
|
|
|
5126
|
-
var tokensCss$4 = i$5`:host(:not(ondark)){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5289
|
+
var tokensCss$4 = i$5`:host(:not([ondark])){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: transparent}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: transparent}`;
|
|
5290
|
+
|
|
5291
|
+
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;flex:1;cursor:text}.layout-classic .mainContent label{cursor:text;padding-top:4px;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);padding-bottom:8px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);height:auto}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{justify-self:flex-start;padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;line-height:0;padding-bottom:0}.layout-classic .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-classic .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-classic .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}.layout-classic .accents.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}`;
|
|
5292
|
+
|
|
5293
|
+
var classicColorCss = i$5`.layout-classic label{color:var(--ds-auro-input-label-text-color)}.layout-classic:focus-within{--ds-auro-input-outline-color: var(--ds-auro-input-border-color)}:host(:not([ondark])) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a);--ds-auro-input-outline-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-outline-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5127
5294
|
|
|
5128
5295
|
var emphasizedStyleCss = i$5`:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{background:unset;width:100%;padding:0;border:0;outline:none;overflow:hidden;text-overflow:ellipsis}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized .accents,.layout-emphasized-left .accents,.layout-emphasized-right .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
|
|
5129
5296
|
|
|
@@ -9150,9 +9317,10 @@ class DateFormatter {
|
|
|
9150
9317
|
/**
|
|
9151
9318
|
* Convert a date object to string format.
|
|
9152
9319
|
* @param {Object} date - Date to convert to string.
|
|
9153
|
-
* @
|
|
9320
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
9321
|
+
* @returns {String} Returns the date as a string.
|
|
9154
9322
|
*/
|
|
9155
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
9323
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
9156
9324
|
year: "numeric",
|
|
9157
9325
|
month: "2-digit",
|
|
9158
9326
|
day: "2-digit",
|
|
@@ -9344,7 +9512,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
9344
9512
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
9345
9513
|
|
|
9346
9514
|
// Get the date string of the date object we created from the string date
|
|
9347
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
9515
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
9348
9516
|
|
|
9349
9517
|
// Guard Clause: Generated date matches date string input
|
|
9350
9518
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -9509,7 +9677,7 @@ const {
|
|
|
9509
9677
|
|
|
9510
9678
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9511
9679
|
|
|
9512
|
-
let AuroLibraryRuntimeUtils$
|
|
9680
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
9513
9681
|
|
|
9514
9682
|
/* eslint-disable jsdoc/require-param */
|
|
9515
9683
|
|
|
@@ -9579,7 +9747,7 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
9579
9747
|
class AuroFormValidation {
|
|
9580
9748
|
|
|
9581
9749
|
constructor() {
|
|
9582
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9750
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
9583
9751
|
}
|
|
9584
9752
|
|
|
9585
9753
|
/**
|
|
@@ -10069,9 +10237,9 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10069
10237
|
this.required = false;
|
|
10070
10238
|
this.setCustomValidityForType = undefined;
|
|
10071
10239
|
|
|
10072
|
-
this.layout = '
|
|
10073
|
-
this.shape = '
|
|
10074
|
-
this.size = '
|
|
10240
|
+
this.layout = 'classic';
|
|
10241
|
+
this.shape = 'classic';
|
|
10242
|
+
this.size = 'lg';
|
|
10075
10243
|
}
|
|
10076
10244
|
|
|
10077
10245
|
/**
|
|
@@ -10459,8 +10627,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10459
10627
|
},
|
|
10460
10628
|
|
|
10461
10629
|
/**
|
|
10630
|
+
* The id for input node.
|
|
10462
10631
|
* @private
|
|
10463
|
-
* id for input node
|
|
10464
10632
|
*/
|
|
10465
10633
|
inputId: {
|
|
10466
10634
|
type: String,
|
|
@@ -11284,6 +11452,76 @@ var tokensCss$3$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
11284
11452
|
|
|
11285
11453
|
var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11286
11454
|
|
|
11455
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11456
|
+
// See LICENSE in the project root for license information.
|
|
11457
|
+
|
|
11458
|
+
// ---------------------------------------------------------------------
|
|
11459
|
+
|
|
11460
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11461
|
+
|
|
11462
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
11463
|
+
|
|
11464
|
+
/* eslint-disable jsdoc/require-param */
|
|
11465
|
+
|
|
11466
|
+
/**
|
|
11467
|
+
* This will register a new custom element with the browser.
|
|
11468
|
+
* @param {String} name - The name of the custom element.
|
|
11469
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
11470
|
+
* @returns {void}
|
|
11471
|
+
*/
|
|
11472
|
+
registerComponent(name, componentClass) {
|
|
11473
|
+
if (!customElements.get(name)) {
|
|
11474
|
+
customElements.define(name, class extends componentClass {});
|
|
11475
|
+
}
|
|
11476
|
+
}
|
|
11477
|
+
|
|
11478
|
+
/**
|
|
11479
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
11480
|
+
* @returns {void}
|
|
11481
|
+
*/
|
|
11482
|
+
closestElement(
|
|
11483
|
+
selector, // selector like in .closest()
|
|
11484
|
+
base = this, // extra functionality to skip a parent
|
|
11485
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11486
|
+
!el || el === document || el === window
|
|
11487
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
11488
|
+
: found
|
|
11489
|
+
? found // found a selector INside this element
|
|
11490
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11491
|
+
) {
|
|
11492
|
+
return __Closest(base);
|
|
11493
|
+
}
|
|
11494
|
+
/* eslint-enable jsdoc/require-param */
|
|
11495
|
+
|
|
11496
|
+
/**
|
|
11497
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
11498
|
+
* @param {Object} elem - The element to check.
|
|
11499
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11500
|
+
* @returns {void}
|
|
11501
|
+
*/
|
|
11502
|
+
handleComponentTagRename(elem, tagName) {
|
|
11503
|
+
const tag = tagName.toLowerCase();
|
|
11504
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11505
|
+
|
|
11506
|
+
if (elemTag !== tag) {
|
|
11507
|
+
elem.setAttribute(tag, true);
|
|
11508
|
+
}
|
|
11509
|
+
}
|
|
11510
|
+
|
|
11511
|
+
/**
|
|
11512
|
+
* Validates if an element is a specific Auro component.
|
|
11513
|
+
* @param {Object} elem - The element to validate.
|
|
11514
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
11515
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11516
|
+
*/
|
|
11517
|
+
elementMatch(elem, tagName) {
|
|
11518
|
+
const tag = tagName.toLowerCase();
|
|
11519
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11520
|
+
|
|
11521
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
11522
|
+
}
|
|
11523
|
+
};
|
|
11524
|
+
|
|
11287
11525
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11288
11526
|
// See LICENSE in the project root for license information.
|
|
11289
11527
|
|
|
@@ -11303,7 +11541,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11303
11541
|
*/
|
|
11304
11542
|
privateDefaults() {
|
|
11305
11543
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11306
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
11544
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
11307
11545
|
}
|
|
11308
11546
|
|
|
11309
11547
|
// function to define props used within the scope of this component
|
|
@@ -11385,7 +11623,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11385
11623
|
*
|
|
11386
11624
|
*/
|
|
11387
11625
|
static register(name = "auro-icon") {
|
|
11388
|
-
AuroLibraryRuntimeUtils$1$
|
|
11626
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
11389
11627
|
}
|
|
11390
11628
|
|
|
11391
11629
|
connectedCallback() {
|
|
@@ -11491,7 +11729,7 @@ class AuroLoader extends i$2 {
|
|
|
11491
11729
|
/**
|
|
11492
11730
|
* @private
|
|
11493
11731
|
*/
|
|
11494
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11732
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11495
11733
|
|
|
11496
11734
|
this.orbit = false;
|
|
11497
11735
|
this.ringworm = false;
|
|
@@ -11554,7 +11792,7 @@ class AuroLoader extends i$2 {
|
|
|
11554
11792
|
*
|
|
11555
11793
|
*/
|
|
11556
11794
|
static register(name = "auro-loader") {
|
|
11557
|
-
AuroLibraryRuntimeUtils$
|
|
11795
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroLoader);
|
|
11558
11796
|
}
|
|
11559
11797
|
|
|
11560
11798
|
firstUpdated() {
|
|
@@ -11858,7 +12096,7 @@ class AuroButton extends i$2 {
|
|
|
11858
12096
|
*
|
|
11859
12097
|
*/
|
|
11860
12098
|
static register(name = "auro-button") {
|
|
11861
|
-
AuroLibraryRuntimeUtils$
|
|
12099
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroButton);
|
|
11862
12100
|
}
|
|
11863
12101
|
|
|
11864
12102
|
/**
|
|
@@ -11963,7 +12201,7 @@ var tokensCss$5 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
11963
12201
|
|
|
11964
12202
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11965
12203
|
|
|
11966
|
-
let AuroLibraryRuntimeUtils$
|
|
12204
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
11967
12205
|
|
|
11968
12206
|
/* eslint-disable jsdoc/require-param */
|
|
11969
12207
|
|
|
@@ -12044,7 +12282,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
12044
12282
|
this.onDark = false;
|
|
12045
12283
|
this.hasTextContent = false;
|
|
12046
12284
|
|
|
12047
|
-
AuroLibraryRuntimeUtils$
|
|
12285
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
12048
12286
|
}
|
|
12049
12287
|
|
|
12050
12288
|
static get styles() {
|
|
@@ -12100,7 +12338,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
12100
12338
|
*
|
|
12101
12339
|
*/
|
|
12102
12340
|
static register(name = "auro-helptext") {
|
|
12103
|
-
AuroLibraryRuntimeUtils$
|
|
12341
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
12104
12342
|
}
|
|
12105
12343
|
|
|
12106
12344
|
updated() {
|
|
@@ -12196,6 +12434,8 @@ class AuroInput extends BaseInput {
|
|
|
12196
12434
|
|
|
12197
12435
|
static get styles() {
|
|
12198
12436
|
return [
|
|
12437
|
+
i$5`${classicStyleCss}`,
|
|
12438
|
+
i$5`${classicColorCss}`,
|
|
12199
12439
|
i$5`${shapeSizeCss}`,
|
|
12200
12440
|
i$5`${colorBaseCss}`,
|
|
12201
12441
|
i$5`${styleCss$4$1}`,
|
|
@@ -12222,7 +12462,7 @@ class AuroInput extends BaseInput {
|
|
|
12222
12462
|
/**
|
|
12223
12463
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
12224
12464
|
* @private
|
|
12225
|
-
* @returns {
|
|
12465
|
+
* @returns {object} - Returns classmap.
|
|
12226
12466
|
*/
|
|
12227
12467
|
get commonInputClasses() {
|
|
12228
12468
|
return {
|
|
@@ -12230,6 +12470,23 @@ class AuroInput extends BaseInput {
|
|
|
12230
12470
|
};
|
|
12231
12471
|
}
|
|
12232
12472
|
|
|
12473
|
+
/**
|
|
12474
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
12475
|
+
* @private
|
|
12476
|
+
* @returns {object} - Returns classmap.
|
|
12477
|
+
*/
|
|
12478
|
+
get legacyInputClasses() {
|
|
12479
|
+
return {
|
|
12480
|
+
...this.commonInputClasses,
|
|
12481
|
+
'util_displayHiddenVisually': !this.hasFocus && !this.value
|
|
12482
|
+
};
|
|
12483
|
+
}
|
|
12484
|
+
|
|
12485
|
+
/**
|
|
12486
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
12487
|
+
* @private
|
|
12488
|
+
* @returns {object} - Returns classmap.
|
|
12489
|
+
*/
|
|
12233
12490
|
get commonWrapperClasses() {
|
|
12234
12491
|
return {
|
|
12235
12492
|
'wrapper': true,
|
|
@@ -12238,6 +12495,11 @@ class AuroInput extends BaseInput {
|
|
|
12238
12495
|
};
|
|
12239
12496
|
}
|
|
12240
12497
|
|
|
12498
|
+
/**
|
|
12499
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
12500
|
+
* @private
|
|
12501
|
+
* @returns {object} - Returns classmap.
|
|
12502
|
+
*/
|
|
12241
12503
|
get helpTextClasses() {
|
|
12242
12504
|
return {
|
|
12243
12505
|
'helpTextWrapper': true,
|
|
@@ -12255,7 +12517,7 @@ class AuroInput extends BaseInput {
|
|
|
12255
12517
|
*
|
|
12256
12518
|
*/
|
|
12257
12519
|
static register(name = "auro-input") {
|
|
12258
|
-
AuroLibraryRuntimeUtils$
|
|
12520
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroInput);
|
|
12259
12521
|
}
|
|
12260
12522
|
|
|
12261
12523
|
/**
|
|
@@ -12311,16 +12573,22 @@ class AuroInput extends BaseInput {
|
|
|
12311
12573
|
/**
|
|
12312
12574
|
* Returns HTML for the HTML5 input element.
|
|
12313
12575
|
* @private
|
|
12576
|
+
* @param {boolean} [useLegacyHiddenState=false] - If true, the input will be visually hidden when not focused and has no value.
|
|
12314
12577
|
* @returns {html} - Returns HTML for the HTML5 input element.
|
|
12315
12578
|
*/
|
|
12316
|
-
renderHtmlInput() {
|
|
12579
|
+
renderHtmlInput(useLegacyHiddenState = false) {
|
|
12317
12580
|
const displayValueClasses = {
|
|
12318
12581
|
'displayValue': true,
|
|
12319
12582
|
'hasContent': this.hasDisplayValueContent,
|
|
12320
12583
|
'hasFocus': this.hasFocus,
|
|
12321
|
-
'withValue': this.value && this.value.length > 0
|
|
12584
|
+
'withValue': this.value && this.value.length > 0,
|
|
12322
12585
|
};
|
|
12323
12586
|
|
|
12587
|
+
// Remove this when the classic layout is sunset.
|
|
12588
|
+
const inputOverrideClasses = useLegacyHiddenState
|
|
12589
|
+
? this.legacyInputClasses
|
|
12590
|
+
: this.commonInputClasses;
|
|
12591
|
+
|
|
12324
12592
|
return u$2`
|
|
12325
12593
|
<label for=${this.id} class="${e(this.commonLabelClasses)}" part="label">
|
|
12326
12594
|
<slot name="label">
|
|
@@ -12341,6 +12609,7 @@ class AuroInput extends BaseInput {
|
|
|
12341
12609
|
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
12342
12610
|
autocomplete="${o(this.autocomplete ? this.autocomplete : undefined)}"
|
|
12343
12611
|
autocorrect="${o(this.autocorrect ? this.autocorrect : undefined)}"
|
|
12612
|
+
class="${e(inputOverrideClasses)}"
|
|
12344
12613
|
id="${this.inputId}"
|
|
12345
12614
|
inputMode="${o(this.inputMode ? this.inputMode : undefined)}"
|
|
12346
12615
|
lang="${o(this.lang)}"
|
|
@@ -12484,139 +12753,34 @@ class AuroInput extends BaseInput {
|
|
|
12484
12753
|
}
|
|
12485
12754
|
|
|
12486
12755
|
/**
|
|
12487
|
-
* Returns HTML for the
|
|
12756
|
+
* Returns HTML for the classic layout.
|
|
12488
12757
|
* @private
|
|
12489
|
-
* @returns {
|
|
12758
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
12490
12759
|
*/
|
|
12491
12760
|
renderLayoutClassic() {
|
|
12492
|
-
const wrapperClasses = {
|
|
12493
|
-
'layoutDefault': true
|
|
12494
|
-
};
|
|
12495
|
-
|
|
12496
|
-
// is-disabled class - THIS IS ONLY HERE TO MAKE A TEST PASS AS FAR AS I CAN TELL
|
|
12497
|
-
const labelClasses = {
|
|
12498
|
-
'is-disabled': this.disabled,
|
|
12499
|
-
'withIcon': this.hasTypeIcon(),
|
|
12500
|
-
'withValue': this.value && this.value.length > 0
|
|
12501
|
-
};
|
|
12502
|
-
|
|
12503
12761
|
return u$2`
|
|
12504
|
-
<div
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
This should be cleaned up when auro-icon issue #31 is resolved. -->
|
|
12511
|
-
${this.inputIconName
|
|
12512
|
-
? c([this.inputIconName], (val) => val, (name) => u$2`
|
|
12513
|
-
<${this.iconTag}
|
|
12514
|
-
class="accentIcon"
|
|
12515
|
-
category="payment"
|
|
12516
|
-
name="${name}"
|
|
12517
|
-
part="accentIcon"
|
|
12518
|
-
?onDark="${this.onDark}"
|
|
12519
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
12520
|
-
</${this.iconTag}>
|
|
12521
|
-
`) : undefined
|
|
12522
|
-
}
|
|
12523
|
-
|
|
12524
|
-
${this.type === 'date'
|
|
12525
|
-
? u$2`
|
|
12526
|
-
<${this.iconTag}
|
|
12527
|
-
class="accentIcon"
|
|
12528
|
-
category="interface"
|
|
12529
|
-
name="calendar"
|
|
12530
|
-
part="accentIcon"
|
|
12531
|
-
?onDark="${this.onDark}"
|
|
12532
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
12533
|
-
</${this.iconTag}>`
|
|
12534
|
-
: undefined
|
|
12535
|
-
}
|
|
12536
|
-
</div>
|
|
12537
|
-
<label for=${this.id} class="${e(labelClasses)}" part="label">
|
|
12538
|
-
<slot name="label">
|
|
12539
|
-
${this.label}
|
|
12540
|
-
</slot>
|
|
12541
|
-
${this.required ? '' : ` (${i18n(this.lang, 'optional')})`}
|
|
12542
|
-
</label>
|
|
12543
|
-
|
|
12544
|
-
${this.renderHtmlInput()}
|
|
12762
|
+
<div
|
|
12763
|
+
@click="${this.handleClick}"
|
|
12764
|
+
class="${e(this.commonWrapperClasses)} thin"
|
|
12765
|
+
part="wrapper">
|
|
12766
|
+
<div class="accents left">
|
|
12767
|
+
${this.renderHtmlTypeIcon()}
|
|
12545
12768
|
</div>
|
|
12546
|
-
<div
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
${this.
|
|
12551
|
-
<div class="notification alertNotification">
|
|
12552
|
-
<${this.iconTag}
|
|
12553
|
-
category="alert"
|
|
12554
|
-
customColor
|
|
12555
|
-
name="error-stroke"
|
|
12556
|
-
</${this.iconTag}>
|
|
12557
|
-
</div>
|
|
12558
|
-
` : undefined}
|
|
12769
|
+
<div class="mainContent">
|
|
12770
|
+
${this.renderHtmlInput(true)}
|
|
12771
|
+
</div>
|
|
12772
|
+
<div class="accents right">
|
|
12773
|
+
${this.renderValidationErrorIconHtml()}
|
|
12559
12774
|
${this.hasValue ? u$2`
|
|
12560
|
-
${this.type === 'password' ? u$2`
|
|
12561
|
-
<div class="notification">
|
|
12562
|
-
<${this.buttonTag}
|
|
12563
|
-
@click="${this.handleClickShowPassword}"
|
|
12564
|
-
?onDark="${this.onDark}"
|
|
12565
|
-
aria-hidden="true"
|
|
12566
|
-
class="notificationBtn passwordBtn"
|
|
12567
|
-
tabindex="-1"
|
|
12568
|
-
variant="flat">
|
|
12569
|
-
<${this.iconTag}
|
|
12570
|
-
?hidden=${!this.showPassword}
|
|
12571
|
-
category="interface"
|
|
12572
|
-
customColor
|
|
12573
|
-
name="hide-password-stroke">
|
|
12574
|
-
</${this.iconTag}>
|
|
12575
|
-
<${this.iconTag}
|
|
12576
|
-
?hidden=${this.showPassword}
|
|
12577
|
-
category="interface"
|
|
12578
|
-
customColor
|
|
12579
|
-
name="view-password-stroke">
|
|
12580
|
-
</${this.iconTag}>
|
|
12581
|
-
</${this.buttonTag}>
|
|
12582
|
-
</div>
|
|
12583
|
-
` : undefined}
|
|
12584
12775
|
${!this.disabled && !this.readonly ? u$2`
|
|
12585
|
-
|
|
12586
|
-
<${this.buttonTag}
|
|
12587
|
-
@click="${this.handleClickClear}"
|
|
12588
|
-
?onDark="${this.onDark}"
|
|
12589
|
-
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
12590
|
-
class="notificationBtn clearBtn"
|
|
12591
|
-
variant="flat">
|
|
12592
|
-
<${this.iconTag}
|
|
12593
|
-
category="interface"
|
|
12594
|
-
customColor
|
|
12595
|
-
name="x-lg">
|
|
12596
|
-
</${this.iconTag}>
|
|
12597
|
-
</${this.buttonTag}>
|
|
12598
|
-
</div>
|
|
12776
|
+
${this.renderHtmlActionClear()}
|
|
12599
12777
|
` : undefined}
|
|
12600
12778
|
` : undefined}
|
|
12601
12779
|
</div>
|
|
12602
12780
|
</div>
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
12607
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
12608
|
-
<slot name="helptext">${this.getHelpText()}</slot>
|
|
12609
|
-
</p>
|
|
12610
|
-
</${this.helpTextTag}>
|
|
12611
|
-
`
|
|
12612
|
-
: u$2`
|
|
12613
|
-
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
12614
|
-
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
12615
|
-
${this.errorMessage}
|
|
12616
|
-
</p>
|
|
12617
|
-
</${this.helpTextTag}>
|
|
12618
|
-
`
|
|
12619
|
-
}
|
|
12781
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
12782
|
+
${this.renderHtmlHelpText()}
|
|
12783
|
+
</div>
|
|
12620
12784
|
`;
|
|
12621
12785
|
}
|
|
12622
12786
|
|
|
@@ -12731,7 +12895,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
12731
12895
|
|
|
12732
12896
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12733
12897
|
|
|
12734
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
12898
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
12735
12899
|
|
|
12736
12900
|
/* eslint-disable jsdoc/require-param */
|
|
12737
12901
|
|
|
@@ -12988,6 +13152,76 @@ var tokensCss$3 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
12988
13152
|
|
|
12989
13153
|
var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
12990
13154
|
|
|
13155
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13156
|
+
// See LICENSE in the project root for license information.
|
|
13157
|
+
|
|
13158
|
+
// ---------------------------------------------------------------------
|
|
13159
|
+
|
|
13160
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13161
|
+
|
|
13162
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13163
|
+
|
|
13164
|
+
/* eslint-disable jsdoc/require-param */
|
|
13165
|
+
|
|
13166
|
+
/**
|
|
13167
|
+
* This will register a new custom element with the browser.
|
|
13168
|
+
* @param {String} name - The name of the custom element.
|
|
13169
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13170
|
+
* @returns {void}
|
|
13171
|
+
*/
|
|
13172
|
+
registerComponent(name, componentClass) {
|
|
13173
|
+
if (!customElements.get(name)) {
|
|
13174
|
+
customElements.define(name, class extends componentClass {});
|
|
13175
|
+
}
|
|
13176
|
+
}
|
|
13177
|
+
|
|
13178
|
+
/**
|
|
13179
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13180
|
+
* @returns {void}
|
|
13181
|
+
*/
|
|
13182
|
+
closestElement(
|
|
13183
|
+
selector, // selector like in .closest()
|
|
13184
|
+
base = this, // extra functionality to skip a parent
|
|
13185
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13186
|
+
!el || el === document || el === window
|
|
13187
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13188
|
+
: found
|
|
13189
|
+
? found // found a selector INside this element
|
|
13190
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13191
|
+
) {
|
|
13192
|
+
return __Closest(base);
|
|
13193
|
+
}
|
|
13194
|
+
/* eslint-enable jsdoc/require-param */
|
|
13195
|
+
|
|
13196
|
+
/**
|
|
13197
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
13198
|
+
* @param {Object} elem - The element to check.
|
|
13199
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13200
|
+
* @returns {void}
|
|
13201
|
+
*/
|
|
13202
|
+
handleComponentTagRename(elem, tagName) {
|
|
13203
|
+
const tag = tagName.toLowerCase();
|
|
13204
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13205
|
+
|
|
13206
|
+
if (elemTag !== tag) {
|
|
13207
|
+
elem.setAttribute(tag, true);
|
|
13208
|
+
}
|
|
13209
|
+
}
|
|
13210
|
+
|
|
13211
|
+
/**
|
|
13212
|
+
* Validates if an element is a specific Auro component.
|
|
13213
|
+
* @param {Object} elem - The element to validate.
|
|
13214
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13215
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13216
|
+
*/
|
|
13217
|
+
elementMatch(elem, tagName) {
|
|
13218
|
+
const tag = tagName.toLowerCase();
|
|
13219
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13220
|
+
|
|
13221
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13222
|
+
}
|
|
13223
|
+
};
|
|
13224
|
+
|
|
12991
13225
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12992
13226
|
// See LICENSE in the project root for license information.
|
|
12993
13227
|
|
|
@@ -13007,7 +13241,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13007
13241
|
*/
|
|
13008
13242
|
privateDefaults() {
|
|
13009
13243
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
13010
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13244
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
13011
13245
|
}
|
|
13012
13246
|
|
|
13013
13247
|
// function to define props used within the scope of this component
|
|
@@ -13089,7 +13323,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13089
13323
|
*
|
|
13090
13324
|
*/
|
|
13091
13325
|
static register(name = "auro-icon") {
|
|
13092
|
-
AuroLibraryRuntimeUtils$
|
|
13326
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
13093
13327
|
}
|
|
13094
13328
|
|
|
13095
13329
|
connectedCallback() {
|
|
@@ -13186,7 +13420,7 @@ class AuroHeader extends i$2 {
|
|
|
13186
13420
|
/**
|
|
13187
13421
|
* @private
|
|
13188
13422
|
*/
|
|
13189
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
13423
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
13190
13424
|
}
|
|
13191
13425
|
|
|
13192
13426
|
// function to define props used within the scope of this component
|
|
@@ -13216,7 +13450,7 @@ class AuroHeader extends i$2 {
|
|
|
13216
13450
|
*
|
|
13217
13451
|
*/
|
|
13218
13452
|
static register(name = "auro-header") {
|
|
13219
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
13453
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
13220
13454
|
}
|
|
13221
13455
|
|
|
13222
13456
|
firstUpdated() {
|
|
@@ -13312,7 +13546,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13312
13546
|
|
|
13313
13547
|
this.large = false;
|
|
13314
13548
|
|
|
13315
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13549
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13316
13550
|
|
|
13317
13551
|
const versioning = new AuroDependencyVersioning();
|
|
13318
13552
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -13351,7 +13585,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13351
13585
|
*
|
|
13352
13586
|
*/
|
|
13353
13587
|
static register(name = "auro-bibtemplate") {
|
|
13354
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13588
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13355
13589
|
}
|
|
13356
13590
|
|
|
13357
13591
|
/**
|
|
@@ -13391,6 +13625,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
13391
13625
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
13392
13626
|
}
|
|
13393
13627
|
|
|
13628
|
+
firstUpdated(changedProperties) {
|
|
13629
|
+
super.firstUpdated(changedProperties);
|
|
13630
|
+
|
|
13631
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
13632
|
+
bubbles: true,
|
|
13633
|
+
composed: true,
|
|
13634
|
+
detail: {
|
|
13635
|
+
element: this
|
|
13636
|
+
}
|
|
13637
|
+
}));
|
|
13638
|
+
}
|
|
13639
|
+
|
|
13394
13640
|
// function that renders the HTML and CSS into the scope of the component
|
|
13395
13641
|
render() {
|
|
13396
13642
|
return u$2`
|
|
@@ -13423,123 +13669,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13423
13669
|
|
|
13424
13670
|
var bibTemplateVersion = '1.0.0';
|
|
13425
13671
|
|
|
13426
|
-
i$5
|
|
13427
|
-
|
|
13428
|
-
i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
13429
|
-
|
|
13430
|
-
i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
13431
|
-
|
|
13432
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13433
|
-
// See LICENSE in the project root for license information.
|
|
13434
|
-
|
|
13435
|
-
// ---------------------------------------------------------------------
|
|
13436
|
-
|
|
13437
|
-
/**
|
|
13438
|
-
* Converts value to an array.
|
|
13439
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
13440
|
-
* If the value is already an array, it is returned.
|
|
13441
|
-
* If the value is undefined, it returns undefined.
|
|
13442
|
-
* @private
|
|
13443
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
13444
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
13445
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
13446
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
13447
|
-
*/
|
|
13448
|
-
function arrayConverter$1(value) {
|
|
13449
|
-
// Allow undefined
|
|
13450
|
-
if (value === undefined) {
|
|
13451
|
-
return undefined;
|
|
13452
|
-
}
|
|
13453
|
-
|
|
13454
|
-
// Return the value if it is already an array
|
|
13455
|
-
if (Array.isArray(value)) {
|
|
13456
|
-
return value;
|
|
13457
|
-
}
|
|
13458
|
-
|
|
13459
|
-
try {
|
|
13460
|
-
// If value is a JSON string, parse it
|
|
13461
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
13462
|
-
|
|
13463
|
-
// Check if the parsed value is an array
|
|
13464
|
-
if (Array.isArray(parsed)) {
|
|
13465
|
-
return parsed;
|
|
13466
|
-
}
|
|
13467
|
-
} catch (error) {
|
|
13468
|
-
// If JSON parsing fails, continue to throw an error below
|
|
13469
|
-
/* eslint-disable no-console */
|
|
13470
|
-
console.error('JSON parsing failed:', error);
|
|
13471
|
-
}
|
|
13472
|
-
|
|
13473
|
-
// Throw error if the input is not an array or undefined
|
|
13474
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
13475
|
-
}
|
|
13476
|
-
|
|
13477
|
-
/**
|
|
13478
|
-
* Compare two arrays for equality.
|
|
13479
|
-
* @private
|
|
13480
|
-
* @param {Array} arr1 - First array to compare.
|
|
13481
|
-
* @param {Array} arr2 - Second array to compare.
|
|
13482
|
-
* @returns {boolean} True if arrays are equal.
|
|
13483
|
-
*/
|
|
13484
|
-
function arraysAreEqual$1(arr1, arr2) {
|
|
13485
|
-
// If both arrays undefined, they are equal (true)
|
|
13486
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
13487
|
-
return arr1 === arr2;
|
|
13488
|
-
}
|
|
13489
|
-
|
|
13490
|
-
// If arrays have different lengths, they are not equal
|
|
13491
|
-
if (arr1.length !== arr2.length) {
|
|
13492
|
-
return false;
|
|
13493
|
-
}
|
|
13494
|
-
|
|
13495
|
-
// If every item at each index is the same, return true
|
|
13496
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
13497
|
-
if (arr1[index] !== arr2[index]) {
|
|
13498
|
-
return false;
|
|
13499
|
-
}
|
|
13500
|
-
}
|
|
13501
|
-
return true;
|
|
13502
|
-
}
|
|
13503
|
-
|
|
13504
|
-
/**
|
|
13505
|
-
* Compares array for changes.
|
|
13506
|
-
* @private
|
|
13507
|
-
* @param {Array|any} newVal - New value to compare.
|
|
13508
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
13509
|
-
* @returns {boolean} True if arrays have changed.
|
|
13510
|
-
*/
|
|
13511
|
-
function arrayOrUndefinedHasChanged$1(newVal, oldVal) {
|
|
13512
|
-
try {
|
|
13513
|
-
// Check if values are undefined or arrays
|
|
13514
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
13515
|
-
|
|
13516
|
-
// If non-array or non-undefined, throw error
|
|
13517
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
13518
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
13519
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
13520
|
-
}
|
|
13521
|
-
|
|
13522
|
-
// Return true if arrays have changed, false if they are the same
|
|
13523
|
-
return !arraysAreEqual$1(newVal, oldVal);
|
|
13524
|
-
} catch (error) {
|
|
13525
|
-
/* eslint-disable no-console */
|
|
13526
|
-
console.error(error);
|
|
13527
|
-
// If validation fails, it has changed
|
|
13528
|
-
return true;
|
|
13529
|
-
}
|
|
13530
|
-
}
|
|
13531
|
-
|
|
13532
|
-
i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
13533
|
-
|
|
13534
|
-
i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
13535
|
-
|
|
13536
|
-
i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
13537
|
-
|
|
13538
|
-
i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
13539
|
-
|
|
13540
|
-
i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
13541
|
-
|
|
13542
|
-
var styleCss$4 = i$5`.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}:host([layout*=classic]) [auro-input]{min-height:var(--ds-size-700, 3.5rem);max-height:var(--ds-size-700, 3.5rem)}:host([layout*=classic]) [auro-input]::part(iconContainer){top:0;display:flex;height:100%;align-items:center}:host([layout*=classic]) [auro-input]::part(accentIcon){transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) [auro-input]::part(wrapper){--ds-auro-input-border-color: transparent;--ds-auro-input-container-color: transparent}:host([layout*=classic]) [auro-input]::part(wrapper):focus-within{border-bottom-width:0 !important;box-shadow:unset !important;outline:unset !important}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13672
|
+
var styleCss$4 = i$5`.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}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13543
13673
|
|
|
13544
13674
|
var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
|
|
13545
13675
|
|
|
@@ -13650,7 +13780,7 @@ var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
13650
13780
|
|
|
13651
13781
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13652
13782
|
|
|
13653
|
-
class AuroLibraryRuntimeUtils {
|
|
13783
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
13654
13784
|
|
|
13655
13785
|
/* eslint-disable jsdoc/require-param */
|
|
13656
13786
|
|
|
@@ -13711,7 +13841,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
13711
13841
|
|
|
13712
13842
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
13713
13843
|
}
|
|
13714
|
-
}
|
|
13844
|
+
};
|
|
13715
13845
|
|
|
13716
13846
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13717
13847
|
// See LICENSE in the project root for license information.
|
|
@@ -13731,7 +13861,7 @@ class AuroHelpText extends i$2 {
|
|
|
13731
13861
|
this.onDark = false;
|
|
13732
13862
|
this.hasTextContent = false;
|
|
13733
13863
|
|
|
13734
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13864
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13735
13865
|
}
|
|
13736
13866
|
|
|
13737
13867
|
static get styles() {
|
|
@@ -13787,7 +13917,7 @@ class AuroHelpText extends i$2 {
|
|
|
13787
13917
|
*
|
|
13788
13918
|
*/
|
|
13789
13919
|
static register(name = "auro-helptext") {
|
|
13790
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
13920
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
13791
13921
|
}
|
|
13792
13922
|
|
|
13793
13923
|
updated() {
|
|
@@ -13863,6 +13993,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13863
13993
|
constructor() {
|
|
13864
13994
|
super();
|
|
13865
13995
|
|
|
13996
|
+
this.matchWidth = true;
|
|
13997
|
+
|
|
13866
13998
|
this.privateDefaults();
|
|
13867
13999
|
}
|
|
13868
14000
|
|
|
@@ -13895,7 +14027,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13895
14027
|
|
|
13896
14028
|
this.validation = new AuroFormValidation$1();
|
|
13897
14029
|
|
|
13898
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
14030
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
13899
14031
|
|
|
13900
14032
|
this.isHiddenWhileLoading = false;
|
|
13901
14033
|
|
|
@@ -13904,7 +14036,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13904
14036
|
|
|
13905
14037
|
// Layout Config
|
|
13906
14038
|
this.layout = 'classic';
|
|
13907
|
-
this.shape = '
|
|
14039
|
+
this.shape = 'classic';
|
|
13908
14040
|
this.size = 'xl';
|
|
13909
14041
|
|
|
13910
14042
|
// floaterConfig
|
|
@@ -13996,6 +14128,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13996
14128
|
reflect: true
|
|
13997
14129
|
},
|
|
13998
14130
|
|
|
14131
|
+
/**
|
|
14132
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
14133
|
+
*/
|
|
14134
|
+
matchWidth: {
|
|
14135
|
+
type: Boolean,
|
|
14136
|
+
reflect: true
|
|
14137
|
+
},
|
|
14138
|
+
|
|
13999
14139
|
/**
|
|
14000
14140
|
* If set, combobox will not filter menuoptions based in input.
|
|
14001
14141
|
*/
|
|
@@ -14041,11 +14181,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14041
14181
|
|
|
14042
14182
|
/**
|
|
14043
14183
|
* Specifies the current selected option.
|
|
14184
|
+
* @type {HTMLElement}
|
|
14044
14185
|
*/
|
|
14045
14186
|
optionSelected: {
|
|
14046
|
-
type: Object
|
|
14047
|
-
converter: arrayConverter$1,
|
|
14048
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14187
|
+
type: Object
|
|
14049
14188
|
},
|
|
14050
14189
|
|
|
14051
14190
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14127,11 +14266,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14127
14266
|
|
|
14128
14267
|
/**
|
|
14129
14268
|
* Value selected for the dropdown menu.
|
|
14130
|
-
* @type {
|
|
14269
|
+
* @type {string}
|
|
14131
14270
|
*/
|
|
14132
14271
|
value: {
|
|
14133
|
-
|
|
14134
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14272
|
+
type: Object
|
|
14135
14273
|
},
|
|
14136
14274
|
|
|
14137
14275
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14197,7 +14335,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14197
14335
|
*
|
|
14198
14336
|
*/
|
|
14199
14337
|
static register(name = 'auro-combobox') {
|
|
14200
|
-
AuroLibraryRuntimeUtils$
|
|
14338
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCombobox);
|
|
14201
14339
|
}
|
|
14202
14340
|
|
|
14203
14341
|
/**
|
|
@@ -14219,17 +14357,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14219
14357
|
|
|
14220
14358
|
if (this.menu.optionSelected) {
|
|
14221
14359
|
// Get first option since combobox is single-select
|
|
14222
|
-
const
|
|
14360
|
+
const selected = this.menu.optionSelected;
|
|
14223
14361
|
|
|
14224
|
-
if (!this.optionSelected || this.optionSelected
|
|
14225
|
-
|
|
14226
|
-
this.optionSelected = [selected];
|
|
14362
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14363
|
+
this.optionSelected = selected;
|
|
14227
14364
|
}
|
|
14228
14365
|
|
|
14229
|
-
if (!this.value || this.value
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
// Menu already expects array
|
|
14366
|
+
if (!this.value || this.value !== selected.value) {
|
|
14367
|
+
this.value = selected.value;
|
|
14368
|
+
|
|
14233
14369
|
this.menu.value = this.value;
|
|
14234
14370
|
}
|
|
14235
14371
|
|
|
@@ -14356,15 +14492,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14356
14492
|
this.showBib();
|
|
14357
14493
|
});
|
|
14358
14494
|
|
|
14359
|
-
// this.dropdown.addEventListener('auroDropdown-show', () => {
|
|
14360
|
-
this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
|
|
14361
|
-
if (this.menu) {
|
|
14362
|
-
this.menuWrapper.append(this.menu);
|
|
14363
|
-
}
|
|
14364
|
-
|
|
14365
14495
|
// setting up bibtemplate
|
|
14366
14496
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
14367
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
14368
14497
|
|
|
14369
14498
|
// Exposes the CSS parts from the bibtemplate for styling
|
|
14370
14499
|
this.bibtemplate.exposeCssParts();
|
|
@@ -14389,10 +14518,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14389
14518
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
14390
14519
|
|
|
14391
14520
|
// a racing condition on custom-combobox with custom-menu
|
|
14392
|
-
if (!this.menu) {
|
|
14521
|
+
if (!this.menu || this.menuShadowRoot === null) {
|
|
14393
14522
|
setTimeout(() => {
|
|
14394
14523
|
this.configureMenu();
|
|
14395
|
-
this.menuWrapper.append(this.menu);
|
|
14396
14524
|
}, 0);
|
|
14397
14525
|
return;
|
|
14398
14526
|
}
|
|
@@ -14409,14 +14537,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14409
14537
|
// handle the menu event for an option selection
|
|
14410
14538
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
14411
14539
|
if (this.menu.optionSelected) {
|
|
14412
|
-
const
|
|
14540
|
+
const selected = this.menu.optionSelected;
|
|
14413
14541
|
|
|
14414
|
-
if (!this.optionSelected || this.optionSelected
|
|
14415
|
-
this.optionSelected =
|
|
14542
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14543
|
+
this.optionSelected = selected;
|
|
14416
14544
|
}
|
|
14417
14545
|
|
|
14418
|
-
if (!this.value || this.value
|
|
14419
|
-
this.value =
|
|
14546
|
+
if (!this.value || this.value !== this.optionSelected.value) {
|
|
14547
|
+
this.value = this.optionSelected.value;
|
|
14420
14548
|
this.menu.value = this.value;
|
|
14421
14549
|
}
|
|
14422
14550
|
|
|
@@ -14467,41 +14595,12 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14467
14595
|
});
|
|
14468
14596
|
}
|
|
14469
14597
|
|
|
14470
|
-
/**
|
|
14471
|
-
* Dispatches input's keyboard events from host
|
|
14472
|
-
* This allows key events from the input to be handled by the parent.
|
|
14473
|
-
* @private
|
|
14474
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
14475
|
-
*/
|
|
14476
|
-
bubbleUpInputEvent(event) {
|
|
14477
|
-
// Do not need to bubble events if the input is not in bib.
|
|
14478
|
-
if (event.currentTarget.parentNode !== this.dropdown) {
|
|
14479
|
-
// prevents browsers to move cursor in input element.
|
|
14480
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
14481
|
-
event.preventDefault();
|
|
14482
|
-
}
|
|
14483
|
-
const dupEvent = new event.constructor(event.type, event);
|
|
14484
|
-
this.dispatchEvent(dupEvent);
|
|
14485
|
-
}
|
|
14486
|
-
}
|
|
14487
|
-
|
|
14488
14598
|
/**
|
|
14489
14599
|
* Binds all behavior needed to the input after rendering.
|
|
14490
14600
|
* @private
|
|
14491
14601
|
* @returns {void}
|
|
14492
14602
|
*/
|
|
14493
14603
|
configureInput() {
|
|
14494
|
-
// When input is in bibtemplate, make the event to be fired at combobox element
|
|
14495
|
-
this.bubbleUpInputEvent = this.bubbleUpInputEvent.bind(this);
|
|
14496
|
-
|
|
14497
|
-
const events = [
|
|
14498
|
-
'input',
|
|
14499
|
-
'keydown',
|
|
14500
|
-
'keyup'
|
|
14501
|
-
];
|
|
14502
|
-
events.forEach((eventType) => {
|
|
14503
|
-
this.input.addEventListener(eventType, this.bubbleUpInputEvent);
|
|
14504
|
-
});
|
|
14505
14604
|
|
|
14506
14605
|
this.addEventListener('keyup', (evt) => {
|
|
14507
14606
|
if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
|
|
@@ -14518,11 +14617,6 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14518
14617
|
if (document.activeElement !== this) {
|
|
14519
14618
|
this.validate();
|
|
14520
14619
|
}
|
|
14521
|
-
|
|
14522
|
-
// Set to undefined if empty
|
|
14523
|
-
if (this.value && this.value.length === 0) {
|
|
14524
|
-
this.value = undefined;
|
|
14525
|
-
}
|
|
14526
14620
|
});
|
|
14527
14621
|
|
|
14528
14622
|
// Handle validation messages from auroFormElement-validated event
|
|
@@ -14569,6 +14663,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14569
14663
|
const inputAlertIcon = this.input.shadowRoot.querySelector(".alertNotification");
|
|
14570
14664
|
|
|
14571
14665
|
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
14666
|
+
|
|
14572
14667
|
if (this.input.parentNode === this.dropdown) {
|
|
14573
14668
|
// keep the trigger size the same even after input gets removed
|
|
14574
14669
|
const parentSize = window.getComputedStyle(this.dropdown.trigger);
|
|
@@ -14586,7 +14681,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14586
14681
|
inputAlertIcon.style.display = 'none';
|
|
14587
14682
|
}
|
|
14588
14683
|
|
|
14589
|
-
this.bibtemplate.
|
|
14684
|
+
this.bibtemplate.prepend(this.input);
|
|
14590
14685
|
this.input.focus();
|
|
14591
14686
|
}
|
|
14592
14687
|
} else if (this.input.parentNode !== this.dropdown) {
|
|
@@ -14600,7 +14695,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14600
14695
|
inputAlertIcon.style.display = '';
|
|
14601
14696
|
}
|
|
14602
14697
|
|
|
14603
|
-
this.dropdown.
|
|
14698
|
+
this.dropdown.prepend(this.input);
|
|
14604
14699
|
this.input.focus();
|
|
14605
14700
|
}
|
|
14606
14701
|
}
|
|
@@ -14616,10 +14711,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14616
14711
|
|
|
14617
14712
|
let hasChange = false;
|
|
14618
14713
|
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
// Menu expects an array
|
|
14622
|
-
this.menu.value = this.input.value ? [this.input.value] : undefined;
|
|
14714
|
+
if (!this.value || this.value !== this.input.value) {
|
|
14715
|
+
this.menu.value = this.input.value;
|
|
14623
14716
|
this.value = this.menu.value;
|
|
14624
14717
|
hasChange = true;
|
|
14625
14718
|
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
@@ -14629,7 +14722,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14629
14722
|
}));
|
|
14630
14723
|
}
|
|
14631
14724
|
|
|
14632
|
-
if (this.optionSelected && this.
|
|
14725
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
14633
14726
|
this.optionSelected = undefined;
|
|
14634
14727
|
hasChange = true;
|
|
14635
14728
|
}
|
|
@@ -14772,15 +14865,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14772
14865
|
// After the component is ready, send direct value changes to auro-menu.
|
|
14773
14866
|
if (changedProperties.has('value')) {
|
|
14774
14867
|
if (this.value) {
|
|
14775
|
-
if (this.optionSelected && this.optionSelected
|
|
14868
|
+
if (this.optionSelected && this.optionSelected.value === this.value) {
|
|
14776
14869
|
// If value updates and the previously selected option already matches the new value
|
|
14777
14870
|
// just update the input value to use the textContent of the optionSelected
|
|
14778
|
-
this.input.value = this.optionSelected
|
|
14871
|
+
this.input.value = this.optionSelected.textContent;
|
|
14779
14872
|
} else {
|
|
14780
14873
|
// Otherwise just enter the value into the input
|
|
14781
14874
|
this.optionSelected = undefined;
|
|
14782
|
-
|
|
14783
|
-
const
|
|
14875
|
+
|
|
14876
|
+
const inputValue = this.value;
|
|
14784
14877
|
this.input.value = inputValue;
|
|
14785
14878
|
|
|
14786
14879
|
// Update the menu value and matchWord
|
|
@@ -14894,7 +14987,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14894
14987
|
fluid
|
|
14895
14988
|
for="dropdownMenu"
|
|
14896
14989
|
layout="${this.layout}"
|
|
14897
|
-
matchWidth
|
|
14990
|
+
matchWidth="${o(this.matchWidth)}"
|
|
14898
14991
|
nocheckmark
|
|
14899
14992
|
rounded
|
|
14900
14993
|
shape="${this.shape}"
|
|
@@ -14923,9 +15016,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14923
15016
|
slot="trigger">
|
|
14924
15017
|
</${this.inputTag}>
|
|
14925
15018
|
|
|
14926
|
-
<div class="menuWrapper"></div>
|
|
14927
|
-
|
|
14928
15019
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
15020
|
+
<slot></slot>
|
|
14929
15021
|
</${this.bibtemplateTag}>
|
|
14930
15022
|
|
|
14931
15023
|
<span slot="helpText">
|
|
@@ -14961,102 +15053,6 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
|
|
|
14961
15053
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14962
15054
|
// See LICENSE in the project root for license information.
|
|
14963
15055
|
|
|
14964
|
-
// ---------------------------------------------------------------------
|
|
14965
|
-
|
|
14966
|
-
/**
|
|
14967
|
-
* Converts value to an array.
|
|
14968
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
14969
|
-
* If the value is already an array, it is returned.
|
|
14970
|
-
* If the value is undefined, it returns undefined.
|
|
14971
|
-
* @private
|
|
14972
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
14973
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
14974
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
14975
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
14976
|
-
*/
|
|
14977
|
-
function arrayConverter(value) {
|
|
14978
|
-
// Allow undefined
|
|
14979
|
-
if (value === undefined) {
|
|
14980
|
-
return undefined;
|
|
14981
|
-
}
|
|
14982
|
-
|
|
14983
|
-
// Return the value if it is already an array
|
|
14984
|
-
if (Array.isArray(value)) {
|
|
14985
|
-
return value;
|
|
14986
|
-
}
|
|
14987
|
-
|
|
14988
|
-
try {
|
|
14989
|
-
// If value is a JSON string, parse it
|
|
14990
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
14991
|
-
|
|
14992
|
-
// Check if the parsed value is an array
|
|
14993
|
-
if (Array.isArray(parsed)) {
|
|
14994
|
-
return parsed;
|
|
14995
|
-
}
|
|
14996
|
-
} catch (error) {
|
|
14997
|
-
// If JSON parsing fails, continue to throw an error below
|
|
14998
|
-
/* eslint-disable no-console */
|
|
14999
|
-
console.error('JSON parsing failed:', error);
|
|
15000
|
-
}
|
|
15001
|
-
|
|
15002
|
-
// Throw error if the input is not an array or undefined
|
|
15003
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
15004
|
-
}
|
|
15005
|
-
|
|
15006
|
-
/**
|
|
15007
|
-
* Compare two arrays for equality.
|
|
15008
|
-
* @private
|
|
15009
|
-
* @param {Array} arr1 - First array to compare.
|
|
15010
|
-
* @param {Array} arr2 - Second array to compare.
|
|
15011
|
-
* @returns {boolean} True if arrays are equal.
|
|
15012
|
-
*/
|
|
15013
|
-
function arraysAreEqual(arr1, arr2) {
|
|
15014
|
-
// If both arrays undefined, they are equal (true)
|
|
15015
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
15016
|
-
return arr1 === arr2;
|
|
15017
|
-
}
|
|
15018
|
-
|
|
15019
|
-
// If arrays have different lengths, they are not equal
|
|
15020
|
-
if (arr1.length !== arr2.length) {
|
|
15021
|
-
return false;
|
|
15022
|
-
}
|
|
15023
|
-
|
|
15024
|
-
// If every item at each index is the same, return true
|
|
15025
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
15026
|
-
if (arr1[index] !== arr2[index]) {
|
|
15027
|
-
return false;
|
|
15028
|
-
}
|
|
15029
|
-
}
|
|
15030
|
-
return true;
|
|
15031
|
-
}
|
|
15032
|
-
|
|
15033
|
-
/**
|
|
15034
|
-
* Compares array for changes.
|
|
15035
|
-
* @private
|
|
15036
|
-
* @param {Array|any} newVal - New value to compare.
|
|
15037
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
15038
|
-
* @returns {boolean} True if arrays have changed.
|
|
15039
|
-
*/
|
|
15040
|
-
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
15041
|
-
try {
|
|
15042
|
-
// Check if values are undefined or arrays
|
|
15043
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
15044
|
-
|
|
15045
|
-
// If non-array or non-undefined, throw error
|
|
15046
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
15047
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
15048
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
15049
|
-
}
|
|
15050
|
-
|
|
15051
|
-
// Return true if arrays have changed, false if they are the same
|
|
15052
|
-
return !arraysAreEqual(newVal, oldVal);
|
|
15053
|
-
} catch (error) {
|
|
15054
|
-
/* eslint-disable no-console */
|
|
15055
|
-
console.error(error);
|
|
15056
|
-
// If validation fails, it has changed
|
|
15057
|
-
return true;
|
|
15058
|
-
}
|
|
15059
|
-
}
|
|
15060
15056
|
|
|
15061
15057
|
/**
|
|
15062
15058
|
* Validates if an option can be interacted with.
|
|
@@ -15090,7 +15086,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15090
15086
|
element.dispatchEvent(new CustomEvent(eventName, eventConfig));
|
|
15091
15087
|
}
|
|
15092
15088
|
|
|
15093
|
-
// Copyright (c)
|
|
15089
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15094
15090
|
// See LICENSE in the project root for license information.
|
|
15095
15091
|
|
|
15096
15092
|
|
|
@@ -15098,14 +15094,14 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15098
15094
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
15099
15095
|
/**
|
|
15100
15096
|
* The auro-menu element provides users a way to select from a list of options.
|
|
15101
|
-
* @attr {Array<HTMLElement
|
|
15097
|
+
* @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
|
|
15102
15098
|
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
15103
15099
|
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
15104
15100
|
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
15105
15101
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
15106
15102
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
15107
15103
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
15108
|
-
* @attr {Array<string
|
|
15104
|
+
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
15109
15105
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
15110
15106
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
15111
15107
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -15118,7 +15114,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15118
15114
|
* @slot - Slot for insertion of menu options.
|
|
15119
15115
|
*/
|
|
15120
15116
|
|
|
15121
|
-
/* eslint-disable no-magic-numbers, max-lines */
|
|
15117
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
15122
15118
|
|
|
15123
15119
|
class AuroMenu extends i$2 {
|
|
15124
15120
|
constructor() {
|
|
@@ -15198,9 +15194,8 @@ class AuroMenu extends i$2 {
|
|
|
15198
15194
|
reflect: true
|
|
15199
15195
|
},
|
|
15200
15196
|
optionSelected: {
|
|
15201
|
-
// Allow HTMLElement[] arrays and undefined
|
|
15202
|
-
|
|
15203
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15197
|
+
// Allow HTMLElement, HTMLElement[] arrays and undefined
|
|
15198
|
+
type: Object
|
|
15204
15199
|
},
|
|
15205
15200
|
optionActive: {
|
|
15206
15201
|
type: Object,
|
|
@@ -15216,10 +15211,8 @@ class AuroMenu extends i$2 {
|
|
|
15216
15211
|
attribute: 'multiselect'
|
|
15217
15212
|
},
|
|
15218
15213
|
value: {
|
|
15219
|
-
// Allow string[] arrays and undefined
|
|
15220
|
-
type: Object
|
|
15221
|
-
converter: arrayConverter,
|
|
15222
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15214
|
+
// Allow string, string[] arrays and undefined
|
|
15215
|
+
type: Object
|
|
15223
15216
|
}
|
|
15224
15217
|
};
|
|
15225
15218
|
}
|
|
@@ -15241,7 +15234,7 @@ class AuroMenu extends i$2 {
|
|
|
15241
15234
|
*
|
|
15242
15235
|
*/
|
|
15243
15236
|
static register(name = "auro-menu") {
|
|
15244
|
-
AuroLibraryRuntimeUtils$
|
|
15237
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
15245
15238
|
}
|
|
15246
15239
|
|
|
15247
15240
|
// Lifecycle Methods
|
|
@@ -15265,37 +15258,46 @@ class AuroMenu extends i$2 {
|
|
|
15265
15258
|
}
|
|
15266
15259
|
|
|
15267
15260
|
firstUpdated() {
|
|
15268
|
-
AuroLibraryRuntimeUtils$
|
|
15261
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
15269
15262
|
|
|
15270
15263
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
15271
15264
|
this.initializeMenu();
|
|
15272
15265
|
}
|
|
15273
15266
|
|
|
15274
15267
|
updated(changedProperties) {
|
|
15268
|
+
if (changedProperties.has('multiSelect')) {
|
|
15269
|
+
// Reset selection if multiSelect mode changes
|
|
15270
|
+
this.clearSelection();
|
|
15271
|
+
}
|
|
15272
|
+
|
|
15275
15273
|
if (changedProperties.has('value')) {
|
|
15276
15274
|
// Handle null/undefined case
|
|
15277
15275
|
if (this.value === undefined || this.value === null) {
|
|
15278
15276
|
this.optionSelected = undefined;
|
|
15279
|
-
// Reset index tracking
|
|
15280
15277
|
this.index = -1;
|
|
15281
15278
|
} else {
|
|
15282
|
-
|
|
15283
|
-
|
|
15279
|
+
if (this.multiSelect) {
|
|
15280
|
+
// In multiselect mode, this.value should be an array of strings
|
|
15281
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
15282
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
15284
15283
|
|
|
15285
|
-
|
|
15286
|
-
|
|
15284
|
+
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
15285
|
+
} else {
|
|
15286
|
+
// In single-select mode, this.value should be a string
|
|
15287
|
+
const matchingOptions = this.items.find((item) => item.value === this.value);
|
|
15287
15288
|
|
|
15288
|
-
|
|
15289
|
-
if (this.multiSelect) {
|
|
15290
|
-
// For multiselect, keep all matching options
|
|
15289
|
+
if (matchingOptions) {
|
|
15291
15290
|
this.optionSelected = matchingOptions;
|
|
15291
|
+
this.index = this.items.indexOf(matchingOptions);
|
|
15292
15292
|
} else {
|
|
15293
|
-
//
|
|
15294
|
-
this.optionSelected =
|
|
15295
|
-
this.index =
|
|
15293
|
+
// If no matching option found, reset selection
|
|
15294
|
+
this.optionSelected = undefined;
|
|
15295
|
+
this.index = -1;
|
|
15296
15296
|
}
|
|
15297
|
-
}
|
|
15298
|
-
|
|
15297
|
+
}
|
|
15298
|
+
|
|
15299
|
+
// If no matching options were found in either mode
|
|
15300
|
+
if (!this.optionSelected || (Array.isArray(this.optionSelected) && this.optionSelected.length === 0)) {
|
|
15299
15301
|
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
15300
15302
|
this.optionSelected = undefined;
|
|
15301
15303
|
this.index = -1;
|
|
@@ -15447,8 +15449,8 @@ class AuroMenu extends i$2 {
|
|
|
15447
15449
|
}
|
|
15448
15450
|
} else {
|
|
15449
15451
|
// Single select - use arrays with single values
|
|
15450
|
-
this.value =
|
|
15451
|
-
this.optionSelected =
|
|
15452
|
+
this.value = option.value;
|
|
15453
|
+
this.optionSelected = option;
|
|
15452
15454
|
}
|
|
15453
15455
|
|
|
15454
15456
|
this.index = this.items.indexOf(option);
|
|
@@ -15770,8 +15772,13 @@ class AuroMenu extends i$2 {
|
|
|
15770
15772
|
if (!this.optionSelected) {
|
|
15771
15773
|
return false;
|
|
15772
15774
|
}
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
+
|
|
15776
|
+
if (this.multiSelect) {
|
|
15777
|
+
// In multi-select mode, check if the option is in the selected array
|
|
15778
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
|
|
15779
|
+
}
|
|
15780
|
+
|
|
15781
|
+
return this.optionSelected === option;
|
|
15775
15782
|
}
|
|
15776
15783
|
|
|
15777
15784
|
/**
|
|
@@ -15960,6 +15967,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
15960
15967
|
|
|
15961
15968
|
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
15962
15969
|
|
|
15970
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
15971
|
+
// See LICENSE in the project root for license information.
|
|
15972
|
+
|
|
15973
|
+
// ---------------------------------------------------------------------
|
|
15974
|
+
|
|
15975
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15976
|
+
|
|
15977
|
+
class AuroLibraryRuntimeUtils {
|
|
15978
|
+
|
|
15979
|
+
/* eslint-disable jsdoc/require-param */
|
|
15980
|
+
|
|
15981
|
+
/**
|
|
15982
|
+
* This will register a new custom element with the browser.
|
|
15983
|
+
* @param {String} name - The name of the custom element.
|
|
15984
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
15985
|
+
* @returns {void}
|
|
15986
|
+
*/
|
|
15987
|
+
registerComponent(name, componentClass) {
|
|
15988
|
+
if (!customElements.get(name)) {
|
|
15989
|
+
customElements.define(name, class extends componentClass {});
|
|
15990
|
+
}
|
|
15991
|
+
}
|
|
15992
|
+
|
|
15993
|
+
/**
|
|
15994
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
15995
|
+
* @returns {void}
|
|
15996
|
+
*/
|
|
15997
|
+
closestElement(
|
|
15998
|
+
selector, // selector like in .closest()
|
|
15999
|
+
base = this, // extra functionality to skip a parent
|
|
16000
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
16001
|
+
!el || el === document || el === window
|
|
16002
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
16003
|
+
: found
|
|
16004
|
+
? found // found a selector INside this element
|
|
16005
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
16006
|
+
) {
|
|
16007
|
+
return __Closest(base);
|
|
16008
|
+
}
|
|
16009
|
+
/* eslint-enable jsdoc/require-param */
|
|
16010
|
+
|
|
16011
|
+
/**
|
|
16012
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
16013
|
+
* @param {Object} elem - The element to check.
|
|
16014
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
16015
|
+
* @returns {void}
|
|
16016
|
+
*/
|
|
16017
|
+
handleComponentTagRename(elem, tagName) {
|
|
16018
|
+
const tag = tagName.toLowerCase();
|
|
16019
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
16020
|
+
|
|
16021
|
+
if (elemTag !== tag) {
|
|
16022
|
+
elem.setAttribute(tag, true);
|
|
16023
|
+
}
|
|
16024
|
+
}
|
|
16025
|
+
|
|
16026
|
+
/**
|
|
16027
|
+
* Validates if an element is a specific Auro component.
|
|
16028
|
+
* @param {Object} elem - The element to validate.
|
|
16029
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
16030
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
16031
|
+
*/
|
|
16032
|
+
elementMatch(elem, tagName) {
|
|
16033
|
+
const tag = tagName.toLowerCase();
|
|
16034
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
16035
|
+
|
|
16036
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
16037
|
+
}
|
|
16038
|
+
}
|
|
16039
|
+
|
|
15963
16040
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15964
16041
|
// See LICENSE in the project root for license information.
|
|
15965
16042
|
|
|
@@ -15979,7 +16056,7 @@ class AuroIcon extends BaseIcon {
|
|
|
15979
16056
|
*/
|
|
15980
16057
|
privateDefaults() {
|
|
15981
16058
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
15982
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
16059
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
15983
16060
|
}
|
|
15984
16061
|
|
|
15985
16062
|
// function to define props used within the scope of this component
|
|
@@ -16061,7 +16138,7 @@ class AuroIcon extends BaseIcon {
|
|
|
16061
16138
|
*
|
|
16062
16139
|
*/
|
|
16063
16140
|
static register(name = "auro-icon") {
|
|
16064
|
-
AuroLibraryRuntimeUtils
|
|
16141
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
16065
16142
|
}
|
|
16066
16143
|
|
|
16067
16144
|
connectedCallback() {
|
|
@@ -16167,7 +16244,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16167
16244
|
/**
|
|
16168
16245
|
* @private
|
|
16169
16246
|
*/
|
|
16170
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
16247
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
16171
16248
|
}
|
|
16172
16249
|
|
|
16173
16250
|
static get properties() {
|
|
@@ -16211,7 +16288,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16211
16288
|
*
|
|
16212
16289
|
*/
|
|
16213
16290
|
static register(name = "auro-menuoption") {
|
|
16214
|
-
AuroLibraryRuntimeUtils$
|
|
16291
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
16215
16292
|
}
|
|
16216
16293
|
|
|
16217
16294
|
firstUpdated() {
|