@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
|
@@ -114,7 +114,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
114
114
|
|
|
115
115
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
116
116
|
|
|
117
|
-
let AuroLibraryRuntimeUtils$
|
|
117
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
118
118
|
|
|
119
119
|
/* eslint-disable jsdoc/require-param */
|
|
120
120
|
|
|
@@ -233,9 +233,10 @@ let DateFormatter$1 = class DateFormatter {
|
|
|
233
233
|
/**
|
|
234
234
|
* Convert a date object to string format.
|
|
235
235
|
* @param {Object} date - Date to convert to string.
|
|
236
|
-
* @
|
|
236
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
237
|
+
* @returns {String} Returns the date as a string.
|
|
237
238
|
*/
|
|
238
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
239
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
239
240
|
year: "numeric",
|
|
240
241
|
month: "2-digit",
|
|
241
242
|
day: "2-digit",
|
|
@@ -427,7 +428,7 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
427
428
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
428
429
|
|
|
429
430
|
// Get the date string of the date object we created from the string date
|
|
430
|
-
const actualDateStr = dateFormatter$1.getDateAsString(dateObj);
|
|
431
|
+
const actualDateStr = dateFormatter$1.getDateAsString(dateObj, "en-US");
|
|
431
432
|
|
|
432
433
|
// Guard Clause: Generated date matches date string input
|
|
433
434
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -592,7 +593,7 @@ const {
|
|
|
592
593
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
593
594
|
|
|
594
595
|
constructor() {
|
|
595
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
596
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
/**
|
|
@@ -964,7 +965,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
964
965
|
|
|
965
966
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
966
967
|
|
|
967
|
-
let AuroLibraryRuntimeUtils$
|
|
968
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
968
969
|
|
|
969
970
|
/* eslint-disable jsdoc/require-param */
|
|
970
971
|
|
|
@@ -1547,10 +1548,11 @@ const flip$1 = function (options) {
|
|
|
1547
1548
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1548
1549
|
const nextPlacement = placements[nextIndex];
|
|
1549
1550
|
if (nextPlacement) {
|
|
1550
|
-
var _overflowsData$;
|
|
1551
1551
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1552
|
-
|
|
1553
|
-
if
|
|
1552
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1553
|
+
// We leave the current main axis only if every placement on that axis
|
|
1554
|
+
// overflows the main axis.
|
|
1555
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1554
1556
|
// Try next placement and re-run the lifecycle.
|
|
1555
1557
|
return {
|
|
1556
1558
|
data: {
|
|
@@ -2571,8 +2573,28 @@ class AuroFloatingUI {
|
|
|
2571
2573
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2572
2574
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2573
2575
|
|
|
2576
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2577
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2578
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2579
|
+
}
|
|
2574
2580
|
const mouseEventGlobalHandler = (event) => {
|
|
2575
|
-
|
|
2581
|
+
const isPressed = event.type === 'mousedown';
|
|
2582
|
+
if (isPressed) {
|
|
2583
|
+
// Clear any pending timeout to prevent race condition
|
|
2584
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2585
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2586
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2587
|
+
}
|
|
2588
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2589
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2590
|
+
}
|
|
2591
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2592
|
+
// Schedule reset and track timeout ID
|
|
2593
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2594
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2595
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2596
|
+
}, 0);
|
|
2597
|
+
}
|
|
2576
2598
|
};
|
|
2577
2599
|
|
|
2578
2600
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2699,6 +2721,7 @@ class AuroFloatingUI {
|
|
|
2699
2721
|
|
|
2700
2722
|
// Compute the position of the bib
|
|
2701
2723
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2724
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2702
2725
|
placement: this.element.floaterConfig?.placement,
|
|
2703
2726
|
middleware: middleware || []
|
|
2704
2727
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2833,8 +2856,9 @@ class AuroFloatingUI {
|
|
|
2833
2856
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2834
2857
|
return;
|
|
2835
2858
|
}
|
|
2836
|
-
|
|
2837
|
-
if
|
|
2859
|
+
|
|
2860
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
2861
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2838
2862
|
return;
|
|
2839
2863
|
}
|
|
2840
2864
|
|
|
@@ -3135,8 +3159,6 @@ class AuroFloatingUI {
|
|
|
3135
3159
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3136
3160
|
}
|
|
3137
3161
|
|
|
3138
|
-
document.body.append(this.element.bib);
|
|
3139
|
-
|
|
3140
3162
|
this.regenerateBibId();
|
|
3141
3163
|
this.handleTriggerTabIndex();
|
|
3142
3164
|
|
|
@@ -3279,7 +3301,7 @@ const cacheFetch$3 = (uri, options = {}) => {
|
|
|
3279
3301
|
return _fetchMap$3.get(uri);
|
|
3280
3302
|
};
|
|
3281
3303
|
|
|
3282
|
-
var styleCss$3
|
|
3304
|
+
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}`;
|
|
3283
3305
|
|
|
3284
3306
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3285
3307
|
// See LICENSE in the project root for license information.
|
|
@@ -3322,7 +3344,7 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3322
3344
|
|
|
3323
3345
|
static get styles() {
|
|
3324
3346
|
return i$5`
|
|
3325
|
-
${styleCss$3
|
|
3347
|
+
${styleCss$2$3}
|
|
3326
3348
|
`;
|
|
3327
3349
|
}
|
|
3328
3350
|
|
|
@@ -3367,6 +3389,76 @@ var tokensCss$2$2 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3367
3389
|
|
|
3368
3390
|
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)}`;
|
|
3369
3391
|
|
|
3392
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3393
|
+
// See LICENSE in the project root for license information.
|
|
3394
|
+
|
|
3395
|
+
// ---------------------------------------------------------------------
|
|
3396
|
+
|
|
3397
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3398
|
+
|
|
3399
|
+
let AuroLibraryRuntimeUtils$1$3 = class AuroLibraryRuntimeUtils {
|
|
3400
|
+
|
|
3401
|
+
/* eslint-disable jsdoc/require-param */
|
|
3402
|
+
|
|
3403
|
+
/**
|
|
3404
|
+
* This will register a new custom element with the browser.
|
|
3405
|
+
* @param {String} name - The name of the custom element.
|
|
3406
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3407
|
+
* @returns {void}
|
|
3408
|
+
*/
|
|
3409
|
+
registerComponent(name, componentClass) {
|
|
3410
|
+
if (!customElements.get(name)) {
|
|
3411
|
+
customElements.define(name, class extends componentClass {});
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
/**
|
|
3416
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3417
|
+
* @returns {void}
|
|
3418
|
+
*/
|
|
3419
|
+
closestElement(
|
|
3420
|
+
selector, // selector like in .closest()
|
|
3421
|
+
base = this, // extra functionality to skip a parent
|
|
3422
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3423
|
+
!el || el === document || el === window
|
|
3424
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3425
|
+
: found
|
|
3426
|
+
? found // found a selector INside this element
|
|
3427
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3428
|
+
) {
|
|
3429
|
+
return __Closest(base);
|
|
3430
|
+
}
|
|
3431
|
+
/* eslint-enable jsdoc/require-param */
|
|
3432
|
+
|
|
3433
|
+
/**
|
|
3434
|
+
* 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.
|
|
3435
|
+
* @param {Object} elem - The element to check.
|
|
3436
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3437
|
+
* @returns {void}
|
|
3438
|
+
*/
|
|
3439
|
+
handleComponentTagRename(elem, tagName) {
|
|
3440
|
+
const tag = tagName.toLowerCase();
|
|
3441
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3442
|
+
|
|
3443
|
+
if (elemTag !== tag) {
|
|
3444
|
+
elem.setAttribute(tag, true);
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Validates if an element is a specific Auro component.
|
|
3450
|
+
* @param {Object} elem - The element to validate.
|
|
3451
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3452
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3453
|
+
*/
|
|
3454
|
+
elementMatch(elem, tagName) {
|
|
3455
|
+
const tag = tagName.toLowerCase();
|
|
3456
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3457
|
+
|
|
3458
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3459
|
+
}
|
|
3460
|
+
};
|
|
3461
|
+
|
|
3370
3462
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3371
3463
|
// See LICENSE in the project root for license information.
|
|
3372
3464
|
|
|
@@ -3386,7 +3478,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3386
3478
|
*/
|
|
3387
3479
|
privateDefaults() {
|
|
3388
3480
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3389
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
3481
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$3();
|
|
3390
3482
|
}
|
|
3391
3483
|
|
|
3392
3484
|
// function to define props used within the scope of this component
|
|
@@ -3454,7 +3546,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3454
3546
|
return [
|
|
3455
3547
|
super.styles,
|
|
3456
3548
|
i$5`${tokensCss$2$2}`,
|
|
3457
|
-
i$5`${styleCss$3
|
|
3549
|
+
i$5`${styleCss$2$3}`,
|
|
3458
3550
|
i$5`${colorCss$3$2}`
|
|
3459
3551
|
];
|
|
3460
3552
|
}
|
|
@@ -3468,7 +3560,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3468
3560
|
*
|
|
3469
3561
|
*/
|
|
3470
3562
|
static register(name = "auro-icon") {
|
|
3471
|
-
AuroLibraryRuntimeUtils$1$
|
|
3563
|
+
AuroLibraryRuntimeUtils$1$3.prototype.registerComponent(name, AuroIcon);
|
|
3472
3564
|
}
|
|
3473
3565
|
|
|
3474
3566
|
connectedCallback() {
|
|
@@ -3536,7 +3628,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3536
3628
|
|
|
3537
3629
|
var iconVersion$3 = '6.1.2';
|
|
3538
3630
|
|
|
3539
|
-
var styleCss$
|
|
3631
|
+
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}`;
|
|
3540
3632
|
|
|
3541
3633
|
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)}`;
|
|
3542
3634
|
|
|
@@ -3546,7 +3638,6 @@ var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-colo
|
|
|
3546
3638
|
// See LICENSE in the project root for license information.
|
|
3547
3639
|
|
|
3548
3640
|
|
|
3549
|
-
|
|
3550
3641
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3551
3642
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3552
3643
|
'xl',
|
|
@@ -3571,12 +3662,12 @@ class AuroDropdownBib extends i$2 {
|
|
|
3571
3662
|
*/
|
|
3572
3663
|
this._mobileBreakpointValue = undefined;
|
|
3573
3664
|
|
|
3574
|
-
AuroLibraryRuntimeUtils$
|
|
3665
|
+
AuroLibraryRuntimeUtils$2$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3575
3666
|
}
|
|
3576
3667
|
|
|
3577
3668
|
static get styles() {
|
|
3578
3669
|
return [
|
|
3579
|
-
styleCss$
|
|
3670
|
+
styleCss$1$3,
|
|
3580
3671
|
colorCss$2$2,
|
|
3581
3672
|
tokensCss$1$2
|
|
3582
3673
|
];
|
|
@@ -3616,6 +3707,13 @@ class AuroDropdownBib extends i$2 {
|
|
|
3616
3707
|
type: Boolean,
|
|
3617
3708
|
reflect: true
|
|
3618
3709
|
},
|
|
3710
|
+
|
|
3711
|
+
/**
|
|
3712
|
+
* A reference to the associated bib template element.
|
|
3713
|
+
*/
|
|
3714
|
+
bibTemplate: {
|
|
3715
|
+
type: Object
|
|
3716
|
+
}
|
|
3619
3717
|
};
|
|
3620
3718
|
}
|
|
3621
3719
|
|
|
@@ -3648,9 +3746,50 @@ class AuroDropdownBib extends i$2 {
|
|
|
3648
3746
|
}
|
|
3649
3747
|
}
|
|
3650
3748
|
});
|
|
3749
|
+
|
|
3750
|
+
if (this.bibTemplate) {
|
|
3751
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3752
|
+
if (this.isFullscreen) {
|
|
3753
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3754
|
+
} else {
|
|
3755
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3756
|
+
}
|
|
3757
|
+
}
|
|
3651
3758
|
}
|
|
3652
3759
|
}
|
|
3653
3760
|
|
|
3761
|
+
connectedCallback() {
|
|
3762
|
+
super.connectedCallback();
|
|
3763
|
+
|
|
3764
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3765
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3766
|
+
const bibTemplate = event.detail.element;
|
|
3767
|
+
this.bibTemplate = bibTemplate;
|
|
3768
|
+
|
|
3769
|
+
if (bibTemplate) {
|
|
3770
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3771
|
+
if (this.isFullscreen) {
|
|
3772
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3773
|
+
} else {
|
|
3774
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
});
|
|
3778
|
+
}
|
|
3779
|
+
|
|
3780
|
+
firstUpdated(changedProperties) {
|
|
3781
|
+
super.firstUpdated(changedProperties);
|
|
3782
|
+
|
|
3783
|
+
// Dispatch a custom event when the component is connected
|
|
3784
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3785
|
+
bubbles: true,
|
|
3786
|
+
composed: true,
|
|
3787
|
+
detail: {
|
|
3788
|
+
element: this
|
|
3789
|
+
}
|
|
3790
|
+
}));
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3654
3793
|
// function that renders the HTML and CSS into the scope of the component
|
|
3655
3794
|
render() {
|
|
3656
3795
|
return u$2`
|
|
@@ -3663,15 +3802,17 @@ class AuroDropdownBib extends i$2 {
|
|
|
3663
3802
|
|
|
3664
3803
|
var dropdownVersion$1 = '3.0.0';
|
|
3665
3804
|
|
|
3666
|
-
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:
|
|
3667
|
-
|
|
3668
|
-
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)}`;
|
|
3805
|
+
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}`;
|
|
3669
3806
|
|
|
3670
3807
|
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)}`;
|
|
3671
3808
|
|
|
3672
|
-
var
|
|
3809
|
+
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))}`;
|
|
3810
|
+
|
|
3811
|
+
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)}`;
|
|
3673
3812
|
|
|
3674
|
-
var
|
|
3813
|
+
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)}`;
|
|
3814
|
+
|
|
3815
|
+
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)}`;
|
|
3675
3816
|
|
|
3676
3817
|
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)}`;
|
|
3677
3818
|
|
|
@@ -3686,7 +3827,7 @@ var tokensCss$6 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3686
3827
|
|
|
3687
3828
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3688
3829
|
|
|
3689
|
-
let AuroLibraryRuntimeUtils$
|
|
3830
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
3690
3831
|
|
|
3691
3832
|
/* eslint-disable jsdoc/require-param */
|
|
3692
3833
|
|
|
@@ -3767,7 +3908,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3767
3908
|
this.onDark = false;
|
|
3768
3909
|
this.hasTextContent = false;
|
|
3769
3910
|
|
|
3770
|
-
AuroLibraryRuntimeUtils$
|
|
3911
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3771
3912
|
}
|
|
3772
3913
|
|
|
3773
3914
|
static get styles() {
|
|
@@ -3823,7 +3964,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3823
3964
|
*
|
|
3824
3965
|
*/
|
|
3825
3966
|
static register(name = "auro-helptext") {
|
|
3826
|
-
AuroLibraryRuntimeUtils$
|
|
3967
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
3827
3968
|
}
|
|
3828
3969
|
|
|
3829
3970
|
updated() {
|
|
@@ -3999,12 +4140,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
3999
4140
|
this.matchWidth = false;
|
|
4000
4141
|
this.noHideOnThisFocusLoss = false;
|
|
4001
4142
|
|
|
4002
|
-
this.errorMessage = ''; // TODO
|
|
4143
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
4003
4144
|
|
|
4004
4145
|
// Layout Config
|
|
4005
|
-
this.layout = '
|
|
4146
|
+
this.layout = 'classic';
|
|
4006
4147
|
this.shape = 'rounded';
|
|
4007
4148
|
this.size = 'xl';
|
|
4149
|
+
this.parentBorder = false;
|
|
4008
4150
|
|
|
4009
4151
|
this.privateDefaults();
|
|
4010
4152
|
}
|
|
@@ -4020,7 +4162,8 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4020
4162
|
'trigger': true,
|
|
4021
4163
|
'wrapper': true,
|
|
4022
4164
|
'hasFocus': this.hasFocus,
|
|
4023
|
-
'simple': this.simple
|
|
4165
|
+
'simple': this.simple,
|
|
4166
|
+
'parentBorder': this.parentBorder
|
|
4024
4167
|
};
|
|
4025
4168
|
}
|
|
4026
4169
|
|
|
@@ -4072,7 +4215,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4072
4215
|
/**
|
|
4073
4216
|
* @private
|
|
4074
4217
|
*/
|
|
4075
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4218
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
4076
4219
|
|
|
4077
4220
|
/**
|
|
4078
4221
|
* @private
|
|
@@ -4287,6 +4430,15 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4287
4430
|
reflect: true
|
|
4288
4431
|
},
|
|
4289
4432
|
|
|
4433
|
+
/**
|
|
4434
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4435
|
+
* @private
|
|
4436
|
+
*/
|
|
4437
|
+
parentBorder: {
|
|
4438
|
+
type: Boolean,
|
|
4439
|
+
reflect: true
|
|
4440
|
+
},
|
|
4441
|
+
|
|
4290
4442
|
/**
|
|
4291
4443
|
* If declared, the popover and trigger will be set to the same width.
|
|
4292
4444
|
*/
|
|
@@ -4389,10 +4541,18 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4389
4541
|
static get styles() {
|
|
4390
4542
|
return [
|
|
4391
4543
|
colorCss$1$3,
|
|
4392
|
-
styleCss$1$3,
|
|
4393
4544
|
tokensCss$1$2,
|
|
4545
|
+
|
|
4546
|
+
// default layout
|
|
4547
|
+
classicColorCss$1,
|
|
4548
|
+
classicLayoutCss,
|
|
4549
|
+
|
|
4550
|
+
// emphasized layout
|
|
4394
4551
|
styleEmphasizedCss$1,
|
|
4552
|
+
|
|
4553
|
+
// snowflake layout
|
|
4395
4554
|
styleSnowflakeCss$1,
|
|
4555
|
+
|
|
4396
4556
|
shapeSizeCss$1
|
|
4397
4557
|
];
|
|
4398
4558
|
}
|
|
@@ -4406,7 +4566,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4406
4566
|
*
|
|
4407
4567
|
*/
|
|
4408
4568
|
static register(name = "auro-dropdown") {
|
|
4409
|
-
AuroLibraryRuntimeUtils$
|
|
4569
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroDropdown);
|
|
4410
4570
|
}
|
|
4411
4571
|
|
|
4412
4572
|
/**
|
|
@@ -4739,11 +4899,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4739
4899
|
*
|
|
4740
4900
|
* @private
|
|
4741
4901
|
* @method handleDefaultSlot
|
|
4742
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4743
4902
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4744
4903
|
*/
|
|
4745
|
-
handleDefaultSlot(
|
|
4746
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4904
|
+
handleDefaultSlot() {
|
|
4747
4905
|
|
|
4748
4906
|
if (this.onSlotChange) {
|
|
4749
4907
|
this.onSlotChange();
|
|
@@ -4786,7 +4944,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4786
4944
|
id="trigger"
|
|
4787
4945
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
4788
4946
|
tabindex="${this.tabIndex}"
|
|
4789
|
-
?showBorder="${this.showTriggerBorders}"
|
|
4790
4947
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4791
4948
|
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4792
4949
|
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -4806,6 +4963,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4806
4963
|
${this.chevron || this.common ? u$2`
|
|
4807
4964
|
<div
|
|
4808
4965
|
id="showStateIcon"
|
|
4966
|
+
class="chevron"
|
|
4809
4967
|
part="chevron">
|
|
4810
4968
|
<${this.iconTag}
|
|
4811
4969
|
category="interface"
|
|
@@ -4820,9 +4978,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4820
4978
|
<div class="${e(helpTextClasses)}">
|
|
4821
4979
|
<slot name="helpText"></slot>
|
|
4822
4980
|
</div>
|
|
4823
|
-
<div class="slotContent">
|
|
4824
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4825
|
-
</div>
|
|
4826
4981
|
<div id="bibSizer" part="size"></div>
|
|
4827
4982
|
<${this.dropdownBibTag}
|
|
4828
4983
|
id="bib"
|
|
@@ -4831,6 +4986,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4831
4986
|
?common="${this.common}"
|
|
4832
4987
|
?rounded="${this.common || this.rounded}"
|
|
4833
4988
|
?inset="${this.common || this.inset}">
|
|
4989
|
+
<div class="slotContent">
|
|
4990
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4991
|
+
</div>
|
|
4834
4992
|
</${this.dropdownBibTag}>
|
|
4835
4993
|
</div>
|
|
4836
4994
|
`;
|
|
@@ -4842,6 +5000,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4842
5000
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4843
5001
|
*/
|
|
4844
5002
|
renderLayoutClassic() {
|
|
5003
|
+
|
|
4845
5004
|
return u$2`
|
|
4846
5005
|
<div>
|
|
4847
5006
|
<div
|
|
@@ -4879,9 +5038,10 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4879
5038
|
</div>
|
|
4880
5039
|
` : undefined }
|
|
4881
5040
|
</div>
|
|
4882
|
-
|
|
4883
|
-
<slot
|
|
4884
|
-
|
|
5041
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5042
|
+
<slot name="helpText"></slot>
|
|
5043
|
+
</${this.helpTextTag}>
|
|
5044
|
+
|
|
4885
5045
|
<div id="bibSizer" part="size"></div>
|
|
4886
5046
|
<${this.dropdownBibTag}
|
|
4887
5047
|
id="bib"
|
|
@@ -4891,6 +5051,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4891
5051
|
?rounded="${this.common || this.rounded}"
|
|
4892
5052
|
?inset="${this.common || this.inset}"
|
|
4893
5053
|
>
|
|
5054
|
+
<div class="slotContent">
|
|
5055
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5056
|
+
</div>
|
|
4894
5057
|
</${this.dropdownBibTag}>
|
|
4895
5058
|
</div>
|
|
4896
5059
|
`;
|
|
@@ -4973,15 +5136,19 @@ var dropdownVersion = '3.0.0';
|
|
|
4973
5136
|
*/
|
|
4974
5137
|
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}});
|
|
4975
5138
|
|
|
4976
|
-
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:
|
|
5139
|
+
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}`;
|
|
4977
5140
|
|
|
4978
5141
|
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}`;
|
|
4979
5142
|
|
|
4980
5143
|
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}`;
|
|
4981
5144
|
|
|
4982
|
-
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-
|
|
5145
|
+
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)}`;
|
|
4983
5146
|
|
|
4984
|
-
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)}`;
|
|
5147
|
+
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}`;
|
|
5148
|
+
|
|
5149
|
+
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}`;
|
|
5150
|
+
|
|
5151
|
+
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)}`;
|
|
4985
5152
|
|
|
4986
5153
|
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}`;
|
|
4987
5154
|
|
|
@@ -9008,9 +9175,10 @@ class DateFormatter {
|
|
|
9008
9175
|
/**
|
|
9009
9176
|
* Convert a date object to string format.
|
|
9010
9177
|
* @param {Object} date - Date to convert to string.
|
|
9011
|
-
* @
|
|
9178
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
9179
|
+
* @returns {String} Returns the date as a string.
|
|
9012
9180
|
*/
|
|
9013
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
9181
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
9014
9182
|
year: "numeric",
|
|
9015
9183
|
month: "2-digit",
|
|
9016
9184
|
day: "2-digit",
|
|
@@ -9202,7 +9370,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
9202
9370
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
9203
9371
|
|
|
9204
9372
|
// Get the date string of the date object we created from the string date
|
|
9205
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
9373
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
9206
9374
|
|
|
9207
9375
|
// Guard Clause: Generated date matches date string input
|
|
9208
9376
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -9367,7 +9535,7 @@ const {
|
|
|
9367
9535
|
|
|
9368
9536
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9369
9537
|
|
|
9370
|
-
let AuroLibraryRuntimeUtils$
|
|
9538
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
9371
9539
|
|
|
9372
9540
|
/* eslint-disable jsdoc/require-param */
|
|
9373
9541
|
|
|
@@ -9437,7 +9605,7 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
9437
9605
|
class AuroFormValidation {
|
|
9438
9606
|
|
|
9439
9607
|
constructor() {
|
|
9440
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9608
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
9441
9609
|
}
|
|
9442
9610
|
|
|
9443
9611
|
/**
|
|
@@ -9927,9 +10095,9 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
9927
10095
|
this.required = false;
|
|
9928
10096
|
this.setCustomValidityForType = undefined;
|
|
9929
10097
|
|
|
9930
|
-
this.layout = '
|
|
9931
|
-
this.shape = '
|
|
9932
|
-
this.size = '
|
|
10098
|
+
this.layout = 'classic';
|
|
10099
|
+
this.shape = 'classic';
|
|
10100
|
+
this.size = 'lg';
|
|
9933
10101
|
}
|
|
9934
10102
|
|
|
9935
10103
|
/**
|
|
@@ -10317,8 +10485,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10317
10485
|
},
|
|
10318
10486
|
|
|
10319
10487
|
/**
|
|
10488
|
+
* The id for input node.
|
|
10320
10489
|
* @private
|
|
10321
|
-
* id for input node
|
|
10322
10490
|
*/
|
|
10323
10491
|
inputId: {
|
|
10324
10492
|
type: String,
|
|
@@ -11142,6 +11310,76 @@ var tokensCss$3$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
11142
11310
|
|
|
11143
11311
|
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)}`;
|
|
11144
11312
|
|
|
11313
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11314
|
+
// See LICENSE in the project root for license information.
|
|
11315
|
+
|
|
11316
|
+
// ---------------------------------------------------------------------
|
|
11317
|
+
|
|
11318
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11319
|
+
|
|
11320
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
11321
|
+
|
|
11322
|
+
/* eslint-disable jsdoc/require-param */
|
|
11323
|
+
|
|
11324
|
+
/**
|
|
11325
|
+
* This will register a new custom element with the browser.
|
|
11326
|
+
* @param {String} name - The name of the custom element.
|
|
11327
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
11328
|
+
* @returns {void}
|
|
11329
|
+
*/
|
|
11330
|
+
registerComponent(name, componentClass) {
|
|
11331
|
+
if (!customElements.get(name)) {
|
|
11332
|
+
customElements.define(name, class extends componentClass {});
|
|
11333
|
+
}
|
|
11334
|
+
}
|
|
11335
|
+
|
|
11336
|
+
/**
|
|
11337
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
11338
|
+
* @returns {void}
|
|
11339
|
+
*/
|
|
11340
|
+
closestElement(
|
|
11341
|
+
selector, // selector like in .closest()
|
|
11342
|
+
base = this, // extra functionality to skip a parent
|
|
11343
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11344
|
+
!el || el === document || el === window
|
|
11345
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
11346
|
+
: found
|
|
11347
|
+
? found // found a selector INside this element
|
|
11348
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11349
|
+
) {
|
|
11350
|
+
return __Closest(base);
|
|
11351
|
+
}
|
|
11352
|
+
/* eslint-enable jsdoc/require-param */
|
|
11353
|
+
|
|
11354
|
+
/**
|
|
11355
|
+
* 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.
|
|
11356
|
+
* @param {Object} elem - The element to check.
|
|
11357
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11358
|
+
* @returns {void}
|
|
11359
|
+
*/
|
|
11360
|
+
handleComponentTagRename(elem, tagName) {
|
|
11361
|
+
const tag = tagName.toLowerCase();
|
|
11362
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11363
|
+
|
|
11364
|
+
if (elemTag !== tag) {
|
|
11365
|
+
elem.setAttribute(tag, true);
|
|
11366
|
+
}
|
|
11367
|
+
}
|
|
11368
|
+
|
|
11369
|
+
/**
|
|
11370
|
+
* Validates if an element is a specific Auro component.
|
|
11371
|
+
* @param {Object} elem - The element to validate.
|
|
11372
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
11373
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11374
|
+
*/
|
|
11375
|
+
elementMatch(elem, tagName) {
|
|
11376
|
+
const tag = tagName.toLowerCase();
|
|
11377
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11378
|
+
|
|
11379
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
11380
|
+
}
|
|
11381
|
+
};
|
|
11382
|
+
|
|
11145
11383
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11146
11384
|
// See LICENSE in the project root for license information.
|
|
11147
11385
|
|
|
@@ -11161,7 +11399,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11161
11399
|
*/
|
|
11162
11400
|
privateDefaults() {
|
|
11163
11401
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11164
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
11402
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
11165
11403
|
}
|
|
11166
11404
|
|
|
11167
11405
|
// function to define props used within the scope of this component
|
|
@@ -11243,7 +11481,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11243
11481
|
*
|
|
11244
11482
|
*/
|
|
11245
11483
|
static register(name = "auro-icon") {
|
|
11246
|
-
AuroLibraryRuntimeUtils$1$
|
|
11484
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
11247
11485
|
}
|
|
11248
11486
|
|
|
11249
11487
|
connectedCallback() {
|
|
@@ -11349,7 +11587,7 @@ class AuroLoader extends i$2 {
|
|
|
11349
11587
|
/**
|
|
11350
11588
|
* @private
|
|
11351
11589
|
*/
|
|
11352
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11590
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11353
11591
|
|
|
11354
11592
|
this.orbit = false;
|
|
11355
11593
|
this.ringworm = false;
|
|
@@ -11412,7 +11650,7 @@ class AuroLoader extends i$2 {
|
|
|
11412
11650
|
*
|
|
11413
11651
|
*/
|
|
11414
11652
|
static register(name = "auro-loader") {
|
|
11415
|
-
AuroLibraryRuntimeUtils$
|
|
11653
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroLoader);
|
|
11416
11654
|
}
|
|
11417
11655
|
|
|
11418
11656
|
firstUpdated() {
|
|
@@ -11716,7 +11954,7 @@ class AuroButton extends i$2 {
|
|
|
11716
11954
|
*
|
|
11717
11955
|
*/
|
|
11718
11956
|
static register(name = "auro-button") {
|
|
11719
|
-
AuroLibraryRuntimeUtils$
|
|
11957
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroButton);
|
|
11720
11958
|
}
|
|
11721
11959
|
|
|
11722
11960
|
/**
|
|
@@ -11821,7 +12059,7 @@ var tokensCss$5 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
11821
12059
|
|
|
11822
12060
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11823
12061
|
|
|
11824
|
-
let AuroLibraryRuntimeUtils$
|
|
12062
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
11825
12063
|
|
|
11826
12064
|
/* eslint-disable jsdoc/require-param */
|
|
11827
12065
|
|
|
@@ -11902,7 +12140,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
11902
12140
|
this.onDark = false;
|
|
11903
12141
|
this.hasTextContent = false;
|
|
11904
12142
|
|
|
11905
|
-
AuroLibraryRuntimeUtils$
|
|
12143
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
11906
12144
|
}
|
|
11907
12145
|
|
|
11908
12146
|
static get styles() {
|
|
@@ -11958,7 +12196,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
11958
12196
|
*
|
|
11959
12197
|
*/
|
|
11960
12198
|
static register(name = "auro-helptext") {
|
|
11961
|
-
AuroLibraryRuntimeUtils$
|
|
12199
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
11962
12200
|
}
|
|
11963
12201
|
|
|
11964
12202
|
updated() {
|
|
@@ -12054,6 +12292,8 @@ class AuroInput extends BaseInput {
|
|
|
12054
12292
|
|
|
12055
12293
|
static get styles() {
|
|
12056
12294
|
return [
|
|
12295
|
+
i$5`${classicStyleCss}`,
|
|
12296
|
+
i$5`${classicColorCss}`,
|
|
12057
12297
|
i$5`${shapeSizeCss}`,
|
|
12058
12298
|
i$5`${colorBaseCss}`,
|
|
12059
12299
|
i$5`${styleCss$4$1}`,
|
|
@@ -12080,7 +12320,7 @@ class AuroInput extends BaseInput {
|
|
|
12080
12320
|
/**
|
|
12081
12321
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
12082
12322
|
* @private
|
|
12083
|
-
* @returns {
|
|
12323
|
+
* @returns {object} - Returns classmap.
|
|
12084
12324
|
*/
|
|
12085
12325
|
get commonInputClasses() {
|
|
12086
12326
|
return {
|
|
@@ -12088,6 +12328,23 @@ class AuroInput extends BaseInput {
|
|
|
12088
12328
|
};
|
|
12089
12329
|
}
|
|
12090
12330
|
|
|
12331
|
+
/**
|
|
12332
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
12333
|
+
* @private
|
|
12334
|
+
* @returns {object} - Returns classmap.
|
|
12335
|
+
*/
|
|
12336
|
+
get legacyInputClasses() {
|
|
12337
|
+
return {
|
|
12338
|
+
...this.commonInputClasses,
|
|
12339
|
+
'util_displayHiddenVisually': !this.hasFocus && !this.value
|
|
12340
|
+
};
|
|
12341
|
+
}
|
|
12342
|
+
|
|
12343
|
+
/**
|
|
12344
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
12345
|
+
* @private
|
|
12346
|
+
* @returns {object} - Returns classmap.
|
|
12347
|
+
*/
|
|
12091
12348
|
get commonWrapperClasses() {
|
|
12092
12349
|
return {
|
|
12093
12350
|
'wrapper': true,
|
|
@@ -12096,6 +12353,11 @@ class AuroInput extends BaseInput {
|
|
|
12096
12353
|
};
|
|
12097
12354
|
}
|
|
12098
12355
|
|
|
12356
|
+
/**
|
|
12357
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
12358
|
+
* @private
|
|
12359
|
+
* @returns {object} - Returns classmap.
|
|
12360
|
+
*/
|
|
12099
12361
|
get helpTextClasses() {
|
|
12100
12362
|
return {
|
|
12101
12363
|
'helpTextWrapper': true,
|
|
@@ -12113,7 +12375,7 @@ class AuroInput extends BaseInput {
|
|
|
12113
12375
|
*
|
|
12114
12376
|
*/
|
|
12115
12377
|
static register(name = "auro-input") {
|
|
12116
|
-
AuroLibraryRuntimeUtils$
|
|
12378
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroInput);
|
|
12117
12379
|
}
|
|
12118
12380
|
|
|
12119
12381
|
/**
|
|
@@ -12169,16 +12431,22 @@ class AuroInput extends BaseInput {
|
|
|
12169
12431
|
/**
|
|
12170
12432
|
* Returns HTML for the HTML5 input element.
|
|
12171
12433
|
* @private
|
|
12434
|
+
* @param {boolean} [useLegacyHiddenState=false] - If true, the input will be visually hidden when not focused and has no value.
|
|
12172
12435
|
* @returns {html} - Returns HTML for the HTML5 input element.
|
|
12173
12436
|
*/
|
|
12174
|
-
renderHtmlInput() {
|
|
12437
|
+
renderHtmlInput(useLegacyHiddenState = false) {
|
|
12175
12438
|
const displayValueClasses = {
|
|
12176
12439
|
'displayValue': true,
|
|
12177
12440
|
'hasContent': this.hasDisplayValueContent,
|
|
12178
12441
|
'hasFocus': this.hasFocus,
|
|
12179
|
-
'withValue': this.value && this.value.length > 0
|
|
12442
|
+
'withValue': this.value && this.value.length > 0,
|
|
12180
12443
|
};
|
|
12181
12444
|
|
|
12445
|
+
// Remove this when the classic layout is sunset.
|
|
12446
|
+
const inputOverrideClasses = useLegacyHiddenState
|
|
12447
|
+
? this.legacyInputClasses
|
|
12448
|
+
: this.commonInputClasses;
|
|
12449
|
+
|
|
12182
12450
|
return u$2`
|
|
12183
12451
|
<label for=${this.id} class="${e(this.commonLabelClasses)}" part="label">
|
|
12184
12452
|
<slot name="label">
|
|
@@ -12199,6 +12467,7 @@ class AuroInput extends BaseInput {
|
|
|
12199
12467
|
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
12200
12468
|
autocomplete="${o(this.autocomplete ? this.autocomplete : undefined)}"
|
|
12201
12469
|
autocorrect="${o(this.autocorrect ? this.autocorrect : undefined)}"
|
|
12470
|
+
class="${e(inputOverrideClasses)}"
|
|
12202
12471
|
id="${this.inputId}"
|
|
12203
12472
|
inputMode="${o(this.inputMode ? this.inputMode : undefined)}"
|
|
12204
12473
|
lang="${o(this.lang)}"
|
|
@@ -12342,139 +12611,34 @@ class AuroInput extends BaseInput {
|
|
|
12342
12611
|
}
|
|
12343
12612
|
|
|
12344
12613
|
/**
|
|
12345
|
-
* Returns HTML for the
|
|
12614
|
+
* Returns HTML for the classic layout.
|
|
12346
12615
|
* @private
|
|
12347
|
-
* @returns {
|
|
12616
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
12348
12617
|
*/
|
|
12349
12618
|
renderLayoutClassic() {
|
|
12350
|
-
const wrapperClasses = {
|
|
12351
|
-
'layoutDefault': true
|
|
12352
|
-
};
|
|
12353
|
-
|
|
12354
|
-
// is-disabled class - THIS IS ONLY HERE TO MAKE A TEST PASS AS FAR AS I CAN TELL
|
|
12355
|
-
const labelClasses = {
|
|
12356
|
-
'is-disabled': this.disabled,
|
|
12357
|
-
'withIcon': this.hasTypeIcon(),
|
|
12358
|
-
'withValue': this.value && this.value.length > 0
|
|
12359
|
-
};
|
|
12360
|
-
|
|
12361
12619
|
return u$2`
|
|
12362
|
-
<div
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
This should be cleaned up when auro-icon issue #31 is resolved. -->
|
|
12369
|
-
${this.inputIconName
|
|
12370
|
-
? c([this.inputIconName], (val) => val, (name) => u$2`
|
|
12371
|
-
<${this.iconTag}
|
|
12372
|
-
class="accentIcon"
|
|
12373
|
-
category="payment"
|
|
12374
|
-
name="${name}"
|
|
12375
|
-
part="accentIcon"
|
|
12376
|
-
?onDark="${this.onDark}"
|
|
12377
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
12378
|
-
</${this.iconTag}>
|
|
12379
|
-
`) : undefined
|
|
12380
|
-
}
|
|
12381
|
-
|
|
12382
|
-
${this.type === 'date'
|
|
12383
|
-
? u$2`
|
|
12384
|
-
<${this.iconTag}
|
|
12385
|
-
class="accentIcon"
|
|
12386
|
-
category="interface"
|
|
12387
|
-
name="calendar"
|
|
12388
|
-
part="accentIcon"
|
|
12389
|
-
?onDark="${this.onDark}"
|
|
12390
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
12391
|
-
</${this.iconTag}>`
|
|
12392
|
-
: undefined
|
|
12393
|
-
}
|
|
12394
|
-
</div>
|
|
12395
|
-
<label for=${this.id} class="${e(labelClasses)}" part="label">
|
|
12396
|
-
<slot name="label">
|
|
12397
|
-
${this.label}
|
|
12398
|
-
</slot>
|
|
12399
|
-
${this.required ? '' : ` (${i18n(this.lang, 'optional')})`}
|
|
12400
|
-
</label>
|
|
12401
|
-
|
|
12402
|
-
${this.renderHtmlInput()}
|
|
12620
|
+
<div
|
|
12621
|
+
@click="${this.handleClick}"
|
|
12622
|
+
class="${e(this.commonWrapperClasses)} thin"
|
|
12623
|
+
part="wrapper">
|
|
12624
|
+
<div class="accents left">
|
|
12625
|
+
${this.renderHtmlTypeIcon()}
|
|
12403
12626
|
</div>
|
|
12404
|
-
<div
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
${this.
|
|
12409
|
-
<div class="notification alertNotification">
|
|
12410
|
-
<${this.iconTag}
|
|
12411
|
-
category="alert"
|
|
12412
|
-
customColor
|
|
12413
|
-
name="error-stroke"
|
|
12414
|
-
</${this.iconTag}>
|
|
12415
|
-
</div>
|
|
12416
|
-
` : undefined}
|
|
12627
|
+
<div class="mainContent">
|
|
12628
|
+
${this.renderHtmlInput(true)}
|
|
12629
|
+
</div>
|
|
12630
|
+
<div class="accents right">
|
|
12631
|
+
${this.renderValidationErrorIconHtml()}
|
|
12417
12632
|
${this.hasValue ? u$2`
|
|
12418
|
-
${this.type === 'password' ? u$2`
|
|
12419
|
-
<div class="notification">
|
|
12420
|
-
<${this.buttonTag}
|
|
12421
|
-
@click="${this.handleClickShowPassword}"
|
|
12422
|
-
?onDark="${this.onDark}"
|
|
12423
|
-
aria-hidden="true"
|
|
12424
|
-
class="notificationBtn passwordBtn"
|
|
12425
|
-
tabindex="-1"
|
|
12426
|
-
variant="flat">
|
|
12427
|
-
<${this.iconTag}
|
|
12428
|
-
?hidden=${!this.showPassword}
|
|
12429
|
-
category="interface"
|
|
12430
|
-
customColor
|
|
12431
|
-
name="hide-password-stroke">
|
|
12432
|
-
</${this.iconTag}>
|
|
12433
|
-
<${this.iconTag}
|
|
12434
|
-
?hidden=${this.showPassword}
|
|
12435
|
-
category="interface"
|
|
12436
|
-
customColor
|
|
12437
|
-
name="view-password-stroke">
|
|
12438
|
-
</${this.iconTag}>
|
|
12439
|
-
</${this.buttonTag}>
|
|
12440
|
-
</div>
|
|
12441
|
-
` : undefined}
|
|
12442
12633
|
${!this.disabled && !this.readonly ? u$2`
|
|
12443
|
-
|
|
12444
|
-
<${this.buttonTag}
|
|
12445
|
-
@click="${this.handleClickClear}"
|
|
12446
|
-
?onDark="${this.onDark}"
|
|
12447
|
-
arialabel="${i18n(this.lang, 'clearInput')}"
|
|
12448
|
-
class="notificationBtn clearBtn"
|
|
12449
|
-
variant="flat">
|
|
12450
|
-
<${this.iconTag}
|
|
12451
|
-
category="interface"
|
|
12452
|
-
customColor
|
|
12453
|
-
name="x-lg">
|
|
12454
|
-
</${this.iconTag}>
|
|
12455
|
-
</${this.buttonTag}>
|
|
12456
|
-
</div>
|
|
12634
|
+
${this.renderHtmlActionClear()}
|
|
12457
12635
|
` : undefined}
|
|
12458
12636
|
` : undefined}
|
|
12459
12637
|
</div>
|
|
12460
12638
|
</div>
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
12465
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
12466
|
-
<slot name="helptext">${this.getHelpText()}</slot>
|
|
12467
|
-
</p>
|
|
12468
|
-
</${this.helpTextTag}>
|
|
12469
|
-
`
|
|
12470
|
-
: u$2`
|
|
12471
|
-
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
12472
|
-
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
12473
|
-
${this.errorMessage}
|
|
12474
|
-
</p>
|
|
12475
|
-
</${this.helpTextTag}>
|
|
12476
|
-
`
|
|
12477
|
-
}
|
|
12639
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
12640
|
+
${this.renderHtmlHelpText()}
|
|
12641
|
+
</div>
|
|
12478
12642
|
`;
|
|
12479
12643
|
}
|
|
12480
12644
|
|
|
@@ -12589,7 +12753,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
12589
12753
|
|
|
12590
12754
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12591
12755
|
|
|
12592
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
12756
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
12593
12757
|
|
|
12594
12758
|
/* eslint-disable jsdoc/require-param */
|
|
12595
12759
|
|
|
@@ -12846,6 +13010,76 @@ var tokensCss$3 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
12846
13010
|
|
|
12847
13011
|
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)}`;
|
|
12848
13012
|
|
|
13013
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13014
|
+
// See LICENSE in the project root for license information.
|
|
13015
|
+
|
|
13016
|
+
// ---------------------------------------------------------------------
|
|
13017
|
+
|
|
13018
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13019
|
+
|
|
13020
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13021
|
+
|
|
13022
|
+
/* eslint-disable jsdoc/require-param */
|
|
13023
|
+
|
|
13024
|
+
/**
|
|
13025
|
+
* This will register a new custom element with the browser.
|
|
13026
|
+
* @param {String} name - The name of the custom element.
|
|
13027
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13028
|
+
* @returns {void}
|
|
13029
|
+
*/
|
|
13030
|
+
registerComponent(name, componentClass) {
|
|
13031
|
+
if (!customElements.get(name)) {
|
|
13032
|
+
customElements.define(name, class extends componentClass {});
|
|
13033
|
+
}
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
/**
|
|
13037
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13038
|
+
* @returns {void}
|
|
13039
|
+
*/
|
|
13040
|
+
closestElement(
|
|
13041
|
+
selector, // selector like in .closest()
|
|
13042
|
+
base = this, // extra functionality to skip a parent
|
|
13043
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13044
|
+
!el || el === document || el === window
|
|
13045
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13046
|
+
: found
|
|
13047
|
+
? found // found a selector INside this element
|
|
13048
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13049
|
+
) {
|
|
13050
|
+
return __Closest(base);
|
|
13051
|
+
}
|
|
13052
|
+
/* eslint-enable jsdoc/require-param */
|
|
13053
|
+
|
|
13054
|
+
/**
|
|
13055
|
+
* 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.
|
|
13056
|
+
* @param {Object} elem - The element to check.
|
|
13057
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13058
|
+
* @returns {void}
|
|
13059
|
+
*/
|
|
13060
|
+
handleComponentTagRename(elem, tagName) {
|
|
13061
|
+
const tag = tagName.toLowerCase();
|
|
13062
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13063
|
+
|
|
13064
|
+
if (elemTag !== tag) {
|
|
13065
|
+
elem.setAttribute(tag, true);
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13068
|
+
|
|
13069
|
+
/**
|
|
13070
|
+
* Validates if an element is a specific Auro component.
|
|
13071
|
+
* @param {Object} elem - The element to validate.
|
|
13072
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13073
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13074
|
+
*/
|
|
13075
|
+
elementMatch(elem, tagName) {
|
|
13076
|
+
const tag = tagName.toLowerCase();
|
|
13077
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13078
|
+
|
|
13079
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13080
|
+
}
|
|
13081
|
+
};
|
|
13082
|
+
|
|
12849
13083
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12850
13084
|
// See LICENSE in the project root for license information.
|
|
12851
13085
|
|
|
@@ -12865,7 +13099,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
12865
13099
|
*/
|
|
12866
13100
|
privateDefaults() {
|
|
12867
13101
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
12868
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13102
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
12869
13103
|
}
|
|
12870
13104
|
|
|
12871
13105
|
// function to define props used within the scope of this component
|
|
@@ -12947,7 +13181,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
12947
13181
|
*
|
|
12948
13182
|
*/
|
|
12949
13183
|
static register(name = "auro-icon") {
|
|
12950
|
-
AuroLibraryRuntimeUtils$
|
|
13184
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
12951
13185
|
}
|
|
12952
13186
|
|
|
12953
13187
|
connectedCallback() {
|
|
@@ -13044,7 +13278,7 @@ class AuroHeader extends i$2 {
|
|
|
13044
13278
|
/**
|
|
13045
13279
|
* @private
|
|
13046
13280
|
*/
|
|
13047
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
13281
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
13048
13282
|
}
|
|
13049
13283
|
|
|
13050
13284
|
// function to define props used within the scope of this component
|
|
@@ -13074,7 +13308,7 @@ class AuroHeader extends i$2 {
|
|
|
13074
13308
|
*
|
|
13075
13309
|
*/
|
|
13076
13310
|
static register(name = "auro-header") {
|
|
13077
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
13311
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
13078
13312
|
}
|
|
13079
13313
|
|
|
13080
13314
|
firstUpdated() {
|
|
@@ -13170,7 +13404,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13170
13404
|
|
|
13171
13405
|
this.large = false;
|
|
13172
13406
|
|
|
13173
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13407
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13174
13408
|
|
|
13175
13409
|
const versioning = new AuroDependencyVersioning();
|
|
13176
13410
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -13209,7 +13443,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13209
13443
|
*
|
|
13210
13444
|
*/
|
|
13211
13445
|
static register(name = "auro-bibtemplate") {
|
|
13212
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13446
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13213
13447
|
}
|
|
13214
13448
|
|
|
13215
13449
|
/**
|
|
@@ -13249,6 +13483,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
13249
13483
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
13250
13484
|
}
|
|
13251
13485
|
|
|
13486
|
+
firstUpdated(changedProperties) {
|
|
13487
|
+
super.firstUpdated(changedProperties);
|
|
13488
|
+
|
|
13489
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
13490
|
+
bubbles: true,
|
|
13491
|
+
composed: true,
|
|
13492
|
+
detail: {
|
|
13493
|
+
element: this
|
|
13494
|
+
}
|
|
13495
|
+
}));
|
|
13496
|
+
}
|
|
13497
|
+
|
|
13252
13498
|
// function that renders the HTML and CSS into the scope of the component
|
|
13253
13499
|
render() {
|
|
13254
13500
|
return u$2`
|
|
@@ -13281,123 +13527,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13281
13527
|
|
|
13282
13528
|
var bibTemplateVersion = '1.0.0';
|
|
13283
13529
|
|
|
13284
|
-
i$5
|
|
13285
|
-
|
|
13286
|
-
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)}`;
|
|
13287
|
-
|
|
13288
|
-
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)}`;
|
|
13289
|
-
|
|
13290
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13291
|
-
// See LICENSE in the project root for license information.
|
|
13292
|
-
|
|
13293
|
-
// ---------------------------------------------------------------------
|
|
13294
|
-
|
|
13295
|
-
/**
|
|
13296
|
-
* Converts value to an array.
|
|
13297
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
13298
|
-
* If the value is already an array, it is returned.
|
|
13299
|
-
* If the value is undefined, it returns undefined.
|
|
13300
|
-
* @private
|
|
13301
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
13302
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
13303
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
13304
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
13305
|
-
*/
|
|
13306
|
-
function arrayConverter$1(value) {
|
|
13307
|
-
// Allow undefined
|
|
13308
|
-
if (value === undefined) {
|
|
13309
|
-
return undefined;
|
|
13310
|
-
}
|
|
13311
|
-
|
|
13312
|
-
// Return the value if it is already an array
|
|
13313
|
-
if (Array.isArray(value)) {
|
|
13314
|
-
return value;
|
|
13315
|
-
}
|
|
13316
|
-
|
|
13317
|
-
try {
|
|
13318
|
-
// If value is a JSON string, parse it
|
|
13319
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
13320
|
-
|
|
13321
|
-
// Check if the parsed value is an array
|
|
13322
|
-
if (Array.isArray(parsed)) {
|
|
13323
|
-
return parsed;
|
|
13324
|
-
}
|
|
13325
|
-
} catch (error) {
|
|
13326
|
-
// If JSON parsing fails, continue to throw an error below
|
|
13327
|
-
/* eslint-disable no-console */
|
|
13328
|
-
console.error('JSON parsing failed:', error);
|
|
13329
|
-
}
|
|
13330
|
-
|
|
13331
|
-
// Throw error if the input is not an array or undefined
|
|
13332
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
13333
|
-
}
|
|
13334
|
-
|
|
13335
|
-
/**
|
|
13336
|
-
* Compare two arrays for equality.
|
|
13337
|
-
* @private
|
|
13338
|
-
* @param {Array} arr1 - First array to compare.
|
|
13339
|
-
* @param {Array} arr2 - Second array to compare.
|
|
13340
|
-
* @returns {boolean} True if arrays are equal.
|
|
13341
|
-
*/
|
|
13342
|
-
function arraysAreEqual$1(arr1, arr2) {
|
|
13343
|
-
// If both arrays undefined, they are equal (true)
|
|
13344
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
13345
|
-
return arr1 === arr2;
|
|
13346
|
-
}
|
|
13347
|
-
|
|
13348
|
-
// If arrays have different lengths, they are not equal
|
|
13349
|
-
if (arr1.length !== arr2.length) {
|
|
13350
|
-
return false;
|
|
13351
|
-
}
|
|
13352
|
-
|
|
13353
|
-
// If every item at each index is the same, return true
|
|
13354
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
13355
|
-
if (arr1[index] !== arr2[index]) {
|
|
13356
|
-
return false;
|
|
13357
|
-
}
|
|
13358
|
-
}
|
|
13359
|
-
return true;
|
|
13360
|
-
}
|
|
13361
|
-
|
|
13362
|
-
/**
|
|
13363
|
-
* Compares array for changes.
|
|
13364
|
-
* @private
|
|
13365
|
-
* @param {Array|any} newVal - New value to compare.
|
|
13366
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
13367
|
-
* @returns {boolean} True if arrays have changed.
|
|
13368
|
-
*/
|
|
13369
|
-
function arrayOrUndefinedHasChanged$1(newVal, oldVal) {
|
|
13370
|
-
try {
|
|
13371
|
-
// Check if values are undefined or arrays
|
|
13372
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
13373
|
-
|
|
13374
|
-
// If non-array or non-undefined, throw error
|
|
13375
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
13376
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
13377
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
13378
|
-
}
|
|
13379
|
-
|
|
13380
|
-
// Return true if arrays have changed, false if they are the same
|
|
13381
|
-
return !arraysAreEqual$1(newVal, oldVal);
|
|
13382
|
-
} catch (error) {
|
|
13383
|
-
/* eslint-disable no-console */
|
|
13384
|
-
console.error(error);
|
|
13385
|
-
// If validation fails, it has changed
|
|
13386
|
-
return true;
|
|
13387
|
-
}
|
|
13388
|
-
}
|
|
13389
|
-
|
|
13390
|
-
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}`;
|
|
13391
|
-
|
|
13392
|
-
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)}`;
|
|
13393
|
-
|
|
13394
|
-
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}`;
|
|
13395
|
-
|
|
13396
|
-
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)}`;
|
|
13397
|
-
|
|
13398
|
-
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)}`;
|
|
13399
|
-
|
|
13400
|
-
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}`;
|
|
13530
|
+
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}`;
|
|
13401
13531
|
|
|
13402
13532
|
var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
|
|
13403
13533
|
|
|
@@ -13508,7 +13638,7 @@ var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
13508
13638
|
|
|
13509
13639
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13510
13640
|
|
|
13511
|
-
class AuroLibraryRuntimeUtils {
|
|
13641
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
13512
13642
|
|
|
13513
13643
|
/* eslint-disable jsdoc/require-param */
|
|
13514
13644
|
|
|
@@ -13569,7 +13699,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
13569
13699
|
|
|
13570
13700
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
13571
13701
|
}
|
|
13572
|
-
}
|
|
13702
|
+
};
|
|
13573
13703
|
|
|
13574
13704
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13575
13705
|
// See LICENSE in the project root for license information.
|
|
@@ -13589,7 +13719,7 @@ class AuroHelpText extends i$2 {
|
|
|
13589
13719
|
this.onDark = false;
|
|
13590
13720
|
this.hasTextContent = false;
|
|
13591
13721
|
|
|
13592
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13722
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13593
13723
|
}
|
|
13594
13724
|
|
|
13595
13725
|
static get styles() {
|
|
@@ -13645,7 +13775,7 @@ class AuroHelpText extends i$2 {
|
|
|
13645
13775
|
*
|
|
13646
13776
|
*/
|
|
13647
13777
|
static register(name = "auro-helptext") {
|
|
13648
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
13778
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
13649
13779
|
}
|
|
13650
13780
|
|
|
13651
13781
|
updated() {
|
|
@@ -13721,6 +13851,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13721
13851
|
constructor() {
|
|
13722
13852
|
super();
|
|
13723
13853
|
|
|
13854
|
+
this.matchWidth = true;
|
|
13855
|
+
|
|
13724
13856
|
this.privateDefaults();
|
|
13725
13857
|
}
|
|
13726
13858
|
|
|
@@ -13753,7 +13885,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13753
13885
|
|
|
13754
13886
|
this.validation = new AuroFormValidation$1();
|
|
13755
13887
|
|
|
13756
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13888
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
13757
13889
|
|
|
13758
13890
|
this.isHiddenWhileLoading = false;
|
|
13759
13891
|
|
|
@@ -13762,7 +13894,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13762
13894
|
|
|
13763
13895
|
// Layout Config
|
|
13764
13896
|
this.layout = 'classic';
|
|
13765
|
-
this.shape = '
|
|
13897
|
+
this.shape = 'classic';
|
|
13766
13898
|
this.size = 'xl';
|
|
13767
13899
|
|
|
13768
13900
|
// floaterConfig
|
|
@@ -13854,6 +13986,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13854
13986
|
reflect: true
|
|
13855
13987
|
},
|
|
13856
13988
|
|
|
13989
|
+
/**
|
|
13990
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
13991
|
+
*/
|
|
13992
|
+
matchWidth: {
|
|
13993
|
+
type: Boolean,
|
|
13994
|
+
reflect: true
|
|
13995
|
+
},
|
|
13996
|
+
|
|
13857
13997
|
/**
|
|
13858
13998
|
* If set, combobox will not filter menuoptions based in input.
|
|
13859
13999
|
*/
|
|
@@ -13899,11 +14039,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13899
14039
|
|
|
13900
14040
|
/**
|
|
13901
14041
|
* Specifies the current selected option.
|
|
14042
|
+
* @type {HTMLElement}
|
|
13902
14043
|
*/
|
|
13903
14044
|
optionSelected: {
|
|
13904
|
-
type: Object
|
|
13905
|
-
converter: arrayConverter$1,
|
|
13906
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14045
|
+
type: Object
|
|
13907
14046
|
},
|
|
13908
14047
|
|
|
13909
14048
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -13985,11 +14124,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13985
14124
|
|
|
13986
14125
|
/**
|
|
13987
14126
|
* Value selected for the dropdown menu.
|
|
13988
|
-
* @type {
|
|
14127
|
+
* @type {string}
|
|
13989
14128
|
*/
|
|
13990
14129
|
value: {
|
|
13991
|
-
|
|
13992
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14130
|
+
type: Object
|
|
13993
14131
|
},
|
|
13994
14132
|
|
|
13995
14133
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14055,7 +14193,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14055
14193
|
*
|
|
14056
14194
|
*/
|
|
14057
14195
|
static register(name = 'auro-combobox') {
|
|
14058
|
-
AuroLibraryRuntimeUtils$
|
|
14196
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCombobox);
|
|
14059
14197
|
}
|
|
14060
14198
|
|
|
14061
14199
|
/**
|
|
@@ -14077,17 +14215,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14077
14215
|
|
|
14078
14216
|
if (this.menu.optionSelected) {
|
|
14079
14217
|
// Get first option since combobox is single-select
|
|
14080
|
-
const
|
|
14218
|
+
const selected = this.menu.optionSelected;
|
|
14081
14219
|
|
|
14082
|
-
if (!this.optionSelected || this.optionSelected
|
|
14083
|
-
|
|
14084
|
-
this.optionSelected = [selected];
|
|
14220
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14221
|
+
this.optionSelected = selected;
|
|
14085
14222
|
}
|
|
14086
14223
|
|
|
14087
|
-
if (!this.value || this.value
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
// Menu already expects array
|
|
14224
|
+
if (!this.value || this.value !== selected.value) {
|
|
14225
|
+
this.value = selected.value;
|
|
14226
|
+
|
|
14091
14227
|
this.menu.value = this.value;
|
|
14092
14228
|
}
|
|
14093
14229
|
|
|
@@ -14214,15 +14350,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14214
14350
|
this.showBib();
|
|
14215
14351
|
});
|
|
14216
14352
|
|
|
14217
|
-
// this.dropdown.addEventListener('auroDropdown-show', () => {
|
|
14218
|
-
this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
|
|
14219
|
-
if (this.menu) {
|
|
14220
|
-
this.menuWrapper.append(this.menu);
|
|
14221
|
-
}
|
|
14222
|
-
|
|
14223
14353
|
// setting up bibtemplate
|
|
14224
14354
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
14225
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
14226
14355
|
|
|
14227
14356
|
// Exposes the CSS parts from the bibtemplate for styling
|
|
14228
14357
|
this.bibtemplate.exposeCssParts();
|
|
@@ -14247,10 +14376,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14247
14376
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
14248
14377
|
|
|
14249
14378
|
// a racing condition on custom-combobox with custom-menu
|
|
14250
|
-
if (!this.menu) {
|
|
14379
|
+
if (!this.menu || this.menuShadowRoot === null) {
|
|
14251
14380
|
setTimeout(() => {
|
|
14252
14381
|
this.configureMenu();
|
|
14253
|
-
this.menuWrapper.append(this.menu);
|
|
14254
14382
|
}, 0);
|
|
14255
14383
|
return;
|
|
14256
14384
|
}
|
|
@@ -14267,14 +14395,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14267
14395
|
// handle the menu event for an option selection
|
|
14268
14396
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
14269
14397
|
if (this.menu.optionSelected) {
|
|
14270
|
-
const
|
|
14398
|
+
const selected = this.menu.optionSelected;
|
|
14271
14399
|
|
|
14272
|
-
if (!this.optionSelected || this.optionSelected
|
|
14273
|
-
this.optionSelected =
|
|
14400
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14401
|
+
this.optionSelected = selected;
|
|
14274
14402
|
}
|
|
14275
14403
|
|
|
14276
|
-
if (!this.value || this.value
|
|
14277
|
-
this.value =
|
|
14404
|
+
if (!this.value || this.value !== this.optionSelected.value) {
|
|
14405
|
+
this.value = this.optionSelected.value;
|
|
14278
14406
|
this.menu.value = this.value;
|
|
14279
14407
|
}
|
|
14280
14408
|
|
|
@@ -14325,41 +14453,12 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14325
14453
|
});
|
|
14326
14454
|
}
|
|
14327
14455
|
|
|
14328
|
-
/**
|
|
14329
|
-
* Dispatches input's keyboard events from host
|
|
14330
|
-
* This allows key events from the input to be handled by the parent.
|
|
14331
|
-
* @private
|
|
14332
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
14333
|
-
*/
|
|
14334
|
-
bubbleUpInputEvent(event) {
|
|
14335
|
-
// Do not need to bubble events if the input is not in bib.
|
|
14336
|
-
if (event.currentTarget.parentNode !== this.dropdown) {
|
|
14337
|
-
// prevents browsers to move cursor in input element.
|
|
14338
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
14339
|
-
event.preventDefault();
|
|
14340
|
-
}
|
|
14341
|
-
const dupEvent = new event.constructor(event.type, event);
|
|
14342
|
-
this.dispatchEvent(dupEvent);
|
|
14343
|
-
}
|
|
14344
|
-
}
|
|
14345
|
-
|
|
14346
14456
|
/**
|
|
14347
14457
|
* Binds all behavior needed to the input after rendering.
|
|
14348
14458
|
* @private
|
|
14349
14459
|
* @returns {void}
|
|
14350
14460
|
*/
|
|
14351
14461
|
configureInput() {
|
|
14352
|
-
// When input is in bibtemplate, make the event to be fired at combobox element
|
|
14353
|
-
this.bubbleUpInputEvent = this.bubbleUpInputEvent.bind(this);
|
|
14354
|
-
|
|
14355
|
-
const events = [
|
|
14356
|
-
'input',
|
|
14357
|
-
'keydown',
|
|
14358
|
-
'keyup'
|
|
14359
|
-
];
|
|
14360
|
-
events.forEach((eventType) => {
|
|
14361
|
-
this.input.addEventListener(eventType, this.bubbleUpInputEvent);
|
|
14362
|
-
});
|
|
14363
14462
|
|
|
14364
14463
|
this.addEventListener('keyup', (evt) => {
|
|
14365
14464
|
if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
|
|
@@ -14376,11 +14475,6 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14376
14475
|
if (document.activeElement !== this) {
|
|
14377
14476
|
this.validate();
|
|
14378
14477
|
}
|
|
14379
|
-
|
|
14380
|
-
// Set to undefined if empty
|
|
14381
|
-
if (this.value && this.value.length === 0) {
|
|
14382
|
-
this.value = undefined;
|
|
14383
|
-
}
|
|
14384
14478
|
});
|
|
14385
14479
|
|
|
14386
14480
|
// Handle validation messages from auroFormElement-validated event
|
|
@@ -14427,6 +14521,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14427
14521
|
const inputAlertIcon = this.input.shadowRoot.querySelector(".alertNotification");
|
|
14428
14522
|
|
|
14429
14523
|
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
14524
|
+
|
|
14430
14525
|
if (this.input.parentNode === this.dropdown) {
|
|
14431
14526
|
// keep the trigger size the same even after input gets removed
|
|
14432
14527
|
const parentSize = window.getComputedStyle(this.dropdown.trigger);
|
|
@@ -14444,7 +14539,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14444
14539
|
inputAlertIcon.style.display = 'none';
|
|
14445
14540
|
}
|
|
14446
14541
|
|
|
14447
|
-
this.bibtemplate.
|
|
14542
|
+
this.bibtemplate.prepend(this.input);
|
|
14448
14543
|
this.input.focus();
|
|
14449
14544
|
}
|
|
14450
14545
|
} else if (this.input.parentNode !== this.dropdown) {
|
|
@@ -14458,7 +14553,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14458
14553
|
inputAlertIcon.style.display = '';
|
|
14459
14554
|
}
|
|
14460
14555
|
|
|
14461
|
-
this.dropdown.
|
|
14556
|
+
this.dropdown.prepend(this.input);
|
|
14462
14557
|
this.input.focus();
|
|
14463
14558
|
}
|
|
14464
14559
|
}
|
|
@@ -14474,10 +14569,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14474
14569
|
|
|
14475
14570
|
let hasChange = false;
|
|
14476
14571
|
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
// Menu expects an array
|
|
14480
|
-
this.menu.value = this.input.value ? [this.input.value] : undefined;
|
|
14572
|
+
if (!this.value || this.value !== this.input.value) {
|
|
14573
|
+
this.menu.value = this.input.value;
|
|
14481
14574
|
this.value = this.menu.value;
|
|
14482
14575
|
hasChange = true;
|
|
14483
14576
|
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
@@ -14487,7 +14580,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14487
14580
|
}));
|
|
14488
14581
|
}
|
|
14489
14582
|
|
|
14490
|
-
if (this.optionSelected && this.
|
|
14583
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
14491
14584
|
this.optionSelected = undefined;
|
|
14492
14585
|
hasChange = true;
|
|
14493
14586
|
}
|
|
@@ -14630,15 +14723,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14630
14723
|
// After the component is ready, send direct value changes to auro-menu.
|
|
14631
14724
|
if (changedProperties.has('value')) {
|
|
14632
14725
|
if (this.value) {
|
|
14633
|
-
if (this.optionSelected && this.optionSelected
|
|
14726
|
+
if (this.optionSelected && this.optionSelected.value === this.value) {
|
|
14634
14727
|
// If value updates and the previously selected option already matches the new value
|
|
14635
14728
|
// just update the input value to use the textContent of the optionSelected
|
|
14636
|
-
this.input.value = this.optionSelected
|
|
14729
|
+
this.input.value = this.optionSelected.textContent;
|
|
14637
14730
|
} else {
|
|
14638
14731
|
// Otherwise just enter the value into the input
|
|
14639
14732
|
this.optionSelected = undefined;
|
|
14640
|
-
|
|
14641
|
-
const
|
|
14733
|
+
|
|
14734
|
+
const inputValue = this.value;
|
|
14642
14735
|
this.input.value = inputValue;
|
|
14643
14736
|
|
|
14644
14737
|
// Update the menu value and matchWord
|
|
@@ -14752,7 +14845,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14752
14845
|
fluid
|
|
14753
14846
|
for="dropdownMenu"
|
|
14754
14847
|
layout="${this.layout}"
|
|
14755
|
-
matchWidth
|
|
14848
|
+
matchWidth="${o(this.matchWidth)}"
|
|
14756
14849
|
nocheckmark
|
|
14757
14850
|
rounded
|
|
14758
14851
|
shape="${this.shape}"
|
|
@@ -14781,9 +14874,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14781
14874
|
slot="trigger">
|
|
14782
14875
|
</${this.inputTag}>
|
|
14783
14876
|
|
|
14784
|
-
<div class="menuWrapper"></div>
|
|
14785
|
-
|
|
14786
14877
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
14878
|
+
<slot></slot>
|
|
14787
14879
|
</${this.bibtemplateTag}>
|
|
14788
14880
|
|
|
14789
14881
|
<span slot="helpText">
|
|
@@ -14819,102 +14911,6 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
|
|
|
14819
14911
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14820
14912
|
// See LICENSE in the project root for license information.
|
|
14821
14913
|
|
|
14822
|
-
// ---------------------------------------------------------------------
|
|
14823
|
-
|
|
14824
|
-
/**
|
|
14825
|
-
* Converts value to an array.
|
|
14826
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
14827
|
-
* If the value is already an array, it is returned.
|
|
14828
|
-
* If the value is undefined, it returns undefined.
|
|
14829
|
-
* @private
|
|
14830
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
14831
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
14832
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
14833
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
14834
|
-
*/
|
|
14835
|
-
function arrayConverter(value) {
|
|
14836
|
-
// Allow undefined
|
|
14837
|
-
if (value === undefined) {
|
|
14838
|
-
return undefined;
|
|
14839
|
-
}
|
|
14840
|
-
|
|
14841
|
-
// Return the value if it is already an array
|
|
14842
|
-
if (Array.isArray(value)) {
|
|
14843
|
-
return value;
|
|
14844
|
-
}
|
|
14845
|
-
|
|
14846
|
-
try {
|
|
14847
|
-
// If value is a JSON string, parse it
|
|
14848
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
14849
|
-
|
|
14850
|
-
// Check if the parsed value is an array
|
|
14851
|
-
if (Array.isArray(parsed)) {
|
|
14852
|
-
return parsed;
|
|
14853
|
-
}
|
|
14854
|
-
} catch (error) {
|
|
14855
|
-
// If JSON parsing fails, continue to throw an error below
|
|
14856
|
-
/* eslint-disable no-console */
|
|
14857
|
-
console.error('JSON parsing failed:', error);
|
|
14858
|
-
}
|
|
14859
|
-
|
|
14860
|
-
// Throw error if the input is not an array or undefined
|
|
14861
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
14862
|
-
}
|
|
14863
|
-
|
|
14864
|
-
/**
|
|
14865
|
-
* Compare two arrays for equality.
|
|
14866
|
-
* @private
|
|
14867
|
-
* @param {Array} arr1 - First array to compare.
|
|
14868
|
-
* @param {Array} arr2 - Second array to compare.
|
|
14869
|
-
* @returns {boolean} True if arrays are equal.
|
|
14870
|
-
*/
|
|
14871
|
-
function arraysAreEqual(arr1, arr2) {
|
|
14872
|
-
// If both arrays undefined, they are equal (true)
|
|
14873
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
14874
|
-
return arr1 === arr2;
|
|
14875
|
-
}
|
|
14876
|
-
|
|
14877
|
-
// If arrays have different lengths, they are not equal
|
|
14878
|
-
if (arr1.length !== arr2.length) {
|
|
14879
|
-
return false;
|
|
14880
|
-
}
|
|
14881
|
-
|
|
14882
|
-
// If every item at each index is the same, return true
|
|
14883
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
14884
|
-
if (arr1[index] !== arr2[index]) {
|
|
14885
|
-
return false;
|
|
14886
|
-
}
|
|
14887
|
-
}
|
|
14888
|
-
return true;
|
|
14889
|
-
}
|
|
14890
|
-
|
|
14891
|
-
/**
|
|
14892
|
-
* Compares array for changes.
|
|
14893
|
-
* @private
|
|
14894
|
-
* @param {Array|any} newVal - New value to compare.
|
|
14895
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
14896
|
-
* @returns {boolean} True if arrays have changed.
|
|
14897
|
-
*/
|
|
14898
|
-
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
14899
|
-
try {
|
|
14900
|
-
// Check if values are undefined or arrays
|
|
14901
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
14902
|
-
|
|
14903
|
-
// If non-array or non-undefined, throw error
|
|
14904
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
14905
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
14906
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
14907
|
-
}
|
|
14908
|
-
|
|
14909
|
-
// Return true if arrays have changed, false if they are the same
|
|
14910
|
-
return !arraysAreEqual(newVal, oldVal);
|
|
14911
|
-
} catch (error) {
|
|
14912
|
-
/* eslint-disable no-console */
|
|
14913
|
-
console.error(error);
|
|
14914
|
-
// If validation fails, it has changed
|
|
14915
|
-
return true;
|
|
14916
|
-
}
|
|
14917
|
-
}
|
|
14918
14914
|
|
|
14919
14915
|
/**
|
|
14920
14916
|
* Validates if an option can be interacted with.
|
|
@@ -14948,7 +14944,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
14948
14944
|
element.dispatchEvent(new CustomEvent(eventName, eventConfig));
|
|
14949
14945
|
}
|
|
14950
14946
|
|
|
14951
|
-
// Copyright (c)
|
|
14947
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14952
14948
|
// See LICENSE in the project root for license information.
|
|
14953
14949
|
|
|
14954
14950
|
|
|
@@ -14956,14 +14952,14 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
14956
14952
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
14957
14953
|
/**
|
|
14958
14954
|
* The auro-menu element provides users a way to select from a list of options.
|
|
14959
|
-
* @attr {Array<HTMLElement
|
|
14955
|
+
* @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.
|
|
14960
14956
|
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
14961
14957
|
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
14962
14958
|
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
14963
14959
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
14964
14960
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
14965
14961
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
14966
|
-
* @attr {Array<string
|
|
14962
|
+
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
14967
14963
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
14968
14964
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
14969
14965
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -14976,7 +14972,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
14976
14972
|
* @slot - Slot for insertion of menu options.
|
|
14977
14973
|
*/
|
|
14978
14974
|
|
|
14979
|
-
/* eslint-disable no-magic-numbers, max-lines */
|
|
14975
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
14980
14976
|
|
|
14981
14977
|
class AuroMenu extends i$2 {
|
|
14982
14978
|
constructor() {
|
|
@@ -15056,9 +15052,8 @@ class AuroMenu extends i$2 {
|
|
|
15056
15052
|
reflect: true
|
|
15057
15053
|
},
|
|
15058
15054
|
optionSelected: {
|
|
15059
|
-
// Allow HTMLElement[] arrays and undefined
|
|
15060
|
-
|
|
15061
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15055
|
+
// Allow HTMLElement, HTMLElement[] arrays and undefined
|
|
15056
|
+
type: Object
|
|
15062
15057
|
},
|
|
15063
15058
|
optionActive: {
|
|
15064
15059
|
type: Object,
|
|
@@ -15074,10 +15069,8 @@ class AuroMenu extends i$2 {
|
|
|
15074
15069
|
attribute: 'multiselect'
|
|
15075
15070
|
},
|
|
15076
15071
|
value: {
|
|
15077
|
-
// Allow string[] arrays and undefined
|
|
15078
|
-
type: Object
|
|
15079
|
-
converter: arrayConverter,
|
|
15080
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15072
|
+
// Allow string, string[] arrays and undefined
|
|
15073
|
+
type: Object
|
|
15081
15074
|
}
|
|
15082
15075
|
};
|
|
15083
15076
|
}
|
|
@@ -15099,7 +15092,7 @@ class AuroMenu extends i$2 {
|
|
|
15099
15092
|
*
|
|
15100
15093
|
*/
|
|
15101
15094
|
static register(name = "auro-menu") {
|
|
15102
|
-
AuroLibraryRuntimeUtils$
|
|
15095
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
15103
15096
|
}
|
|
15104
15097
|
|
|
15105
15098
|
// Lifecycle Methods
|
|
@@ -15123,37 +15116,46 @@ class AuroMenu extends i$2 {
|
|
|
15123
15116
|
}
|
|
15124
15117
|
|
|
15125
15118
|
firstUpdated() {
|
|
15126
|
-
AuroLibraryRuntimeUtils$
|
|
15119
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
15127
15120
|
|
|
15128
15121
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
15129
15122
|
this.initializeMenu();
|
|
15130
15123
|
}
|
|
15131
15124
|
|
|
15132
15125
|
updated(changedProperties) {
|
|
15126
|
+
if (changedProperties.has('multiSelect')) {
|
|
15127
|
+
// Reset selection if multiSelect mode changes
|
|
15128
|
+
this.clearSelection();
|
|
15129
|
+
}
|
|
15130
|
+
|
|
15133
15131
|
if (changedProperties.has('value')) {
|
|
15134
15132
|
// Handle null/undefined case
|
|
15135
15133
|
if (this.value === undefined || this.value === null) {
|
|
15136
15134
|
this.optionSelected = undefined;
|
|
15137
|
-
// Reset index tracking
|
|
15138
15135
|
this.index = -1;
|
|
15139
15136
|
} else {
|
|
15140
|
-
|
|
15141
|
-
|
|
15137
|
+
if (this.multiSelect) {
|
|
15138
|
+
// In multiselect mode, this.value should be an array of strings
|
|
15139
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
15140
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
15142
15141
|
|
|
15143
|
-
|
|
15144
|
-
|
|
15142
|
+
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
15143
|
+
} else {
|
|
15144
|
+
// In single-select mode, this.value should be a string
|
|
15145
|
+
const matchingOptions = this.items.find((item) => item.value === this.value);
|
|
15145
15146
|
|
|
15146
|
-
|
|
15147
|
-
if (this.multiSelect) {
|
|
15148
|
-
// For multiselect, keep all matching options
|
|
15147
|
+
if (matchingOptions) {
|
|
15149
15148
|
this.optionSelected = matchingOptions;
|
|
15149
|
+
this.index = this.items.indexOf(matchingOptions);
|
|
15150
15150
|
} else {
|
|
15151
|
-
//
|
|
15152
|
-
this.optionSelected =
|
|
15153
|
-
this.index =
|
|
15151
|
+
// If no matching option found, reset selection
|
|
15152
|
+
this.optionSelected = undefined;
|
|
15153
|
+
this.index = -1;
|
|
15154
15154
|
}
|
|
15155
|
-
}
|
|
15156
|
-
|
|
15155
|
+
}
|
|
15156
|
+
|
|
15157
|
+
// If no matching options were found in either mode
|
|
15158
|
+
if (!this.optionSelected || (Array.isArray(this.optionSelected) && this.optionSelected.length === 0)) {
|
|
15157
15159
|
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
15158
15160
|
this.optionSelected = undefined;
|
|
15159
15161
|
this.index = -1;
|
|
@@ -15305,8 +15307,8 @@ class AuroMenu extends i$2 {
|
|
|
15305
15307
|
}
|
|
15306
15308
|
} else {
|
|
15307
15309
|
// Single select - use arrays with single values
|
|
15308
|
-
this.value =
|
|
15309
|
-
this.optionSelected =
|
|
15310
|
+
this.value = option.value;
|
|
15311
|
+
this.optionSelected = option;
|
|
15310
15312
|
}
|
|
15311
15313
|
|
|
15312
15314
|
this.index = this.items.indexOf(option);
|
|
@@ -15628,8 +15630,13 @@ class AuroMenu extends i$2 {
|
|
|
15628
15630
|
if (!this.optionSelected) {
|
|
15629
15631
|
return false;
|
|
15630
15632
|
}
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
+
|
|
15634
|
+
if (this.multiSelect) {
|
|
15635
|
+
// In multi-select mode, check if the option is in the selected array
|
|
15636
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
|
|
15637
|
+
}
|
|
15638
|
+
|
|
15639
|
+
return this.optionSelected === option;
|
|
15633
15640
|
}
|
|
15634
15641
|
|
|
15635
15642
|
/**
|
|
@@ -15818,6 +15825,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
15818
15825
|
|
|
15819
15826
|
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)}`;
|
|
15820
15827
|
|
|
15828
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
15829
|
+
// See LICENSE in the project root for license information.
|
|
15830
|
+
|
|
15831
|
+
// ---------------------------------------------------------------------
|
|
15832
|
+
|
|
15833
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15834
|
+
|
|
15835
|
+
class AuroLibraryRuntimeUtils {
|
|
15836
|
+
|
|
15837
|
+
/* eslint-disable jsdoc/require-param */
|
|
15838
|
+
|
|
15839
|
+
/**
|
|
15840
|
+
* This will register a new custom element with the browser.
|
|
15841
|
+
* @param {String} name - The name of the custom element.
|
|
15842
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
15843
|
+
* @returns {void}
|
|
15844
|
+
*/
|
|
15845
|
+
registerComponent(name, componentClass) {
|
|
15846
|
+
if (!customElements.get(name)) {
|
|
15847
|
+
customElements.define(name, class extends componentClass {});
|
|
15848
|
+
}
|
|
15849
|
+
}
|
|
15850
|
+
|
|
15851
|
+
/**
|
|
15852
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
15853
|
+
* @returns {void}
|
|
15854
|
+
*/
|
|
15855
|
+
closestElement(
|
|
15856
|
+
selector, // selector like in .closest()
|
|
15857
|
+
base = this, // extra functionality to skip a parent
|
|
15858
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
15859
|
+
!el || el === document || el === window
|
|
15860
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
15861
|
+
: found
|
|
15862
|
+
? found // found a selector INside this element
|
|
15863
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
15864
|
+
) {
|
|
15865
|
+
return __Closest(base);
|
|
15866
|
+
}
|
|
15867
|
+
/* eslint-enable jsdoc/require-param */
|
|
15868
|
+
|
|
15869
|
+
/**
|
|
15870
|
+
* 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.
|
|
15871
|
+
* @param {Object} elem - The element to check.
|
|
15872
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
15873
|
+
* @returns {void}
|
|
15874
|
+
*/
|
|
15875
|
+
handleComponentTagRename(elem, tagName) {
|
|
15876
|
+
const tag = tagName.toLowerCase();
|
|
15877
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
15878
|
+
|
|
15879
|
+
if (elemTag !== tag) {
|
|
15880
|
+
elem.setAttribute(tag, true);
|
|
15881
|
+
}
|
|
15882
|
+
}
|
|
15883
|
+
|
|
15884
|
+
/**
|
|
15885
|
+
* Validates if an element is a specific Auro component.
|
|
15886
|
+
* @param {Object} elem - The element to validate.
|
|
15887
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
15888
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
15889
|
+
*/
|
|
15890
|
+
elementMatch(elem, tagName) {
|
|
15891
|
+
const tag = tagName.toLowerCase();
|
|
15892
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
15893
|
+
|
|
15894
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
15895
|
+
}
|
|
15896
|
+
}
|
|
15897
|
+
|
|
15821
15898
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15822
15899
|
// See LICENSE in the project root for license information.
|
|
15823
15900
|
|
|
@@ -15837,7 +15914,7 @@ class AuroIcon extends BaseIcon {
|
|
|
15837
15914
|
*/
|
|
15838
15915
|
privateDefaults() {
|
|
15839
15916
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
15840
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
15917
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
15841
15918
|
}
|
|
15842
15919
|
|
|
15843
15920
|
// function to define props used within the scope of this component
|
|
@@ -15919,7 +15996,7 @@ class AuroIcon extends BaseIcon {
|
|
|
15919
15996
|
*
|
|
15920
15997
|
*/
|
|
15921
15998
|
static register(name = "auro-icon") {
|
|
15922
|
-
AuroLibraryRuntimeUtils
|
|
15999
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
15923
16000
|
}
|
|
15924
16001
|
|
|
15925
16002
|
connectedCallback() {
|
|
@@ -16025,7 +16102,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16025
16102
|
/**
|
|
16026
16103
|
* @private
|
|
16027
16104
|
*/
|
|
16028
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
16105
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
16029
16106
|
}
|
|
16030
16107
|
|
|
16031
16108
|
static get properties() {
|
|
@@ -16069,7 +16146,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16069
16146
|
*
|
|
16070
16147
|
*/
|
|
16071
16148
|
static register(name = "auro-menuoption") {
|
|
16072
|
-
AuroLibraryRuntimeUtils$
|
|
16149
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
16073
16150
|
}
|
|
16074
16151
|
|
|
16075
16152
|
firstUpdated() {
|