@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.1 → 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 +598 -428
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +596 -426
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +458 -273
- package/components/combobox/dist/registered.js +458 -273
- 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 +847 -324
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +847 -324
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +677 -154
- package/components/datepicker/dist/registered.js +677 -154
- 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/demo/api.md +53 -49
- package/components/input/demo/api.min.js +121 -27
- package/components/input/demo/index.min.js +121 -27
- package/components/input/dist/auro-input.d.ts +22 -14
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +121 -27
- package/components/input/dist/registered.js +121 -27
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +95 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +115 -130
- package/components/menu/demo/index.min.js +115 -130
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +116 -90
- package/components/menu/dist/registered.js +115 -130
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +108 -42
- package/components/select/demo/api.min.js +1264 -352
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -351
- package/components/select/dist/auro-select.d.ts +110 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1105 -190
- package/components/select/dist/registered.js +1105 -190
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/emphasized}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{style-css.d.ts → classic/bibStyles-css.d.ts} +0 -0
|
@@ -89,11 +89,11 @@ function valueExample() {
|
|
|
89
89
|
const valueExample = document.querySelector('#valueExample');
|
|
90
90
|
|
|
91
91
|
document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
|
|
92
|
-
valueExample.value =
|
|
92
|
+
valueExample.value = 'Oranges';
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
|
|
96
|
-
valueExample.value =
|
|
96
|
+
valueExample.value = 'Dragon Fruit';
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
|
|
@@ -256,7 +256,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
256
256
|
|
|
257
257
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
258
258
|
|
|
259
|
-
let AuroLibraryRuntimeUtils$
|
|
259
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
260
260
|
|
|
261
261
|
/* eslint-disable jsdoc/require-param */
|
|
262
262
|
|
|
@@ -375,9 +375,10 @@ let DateFormatter$1 = class DateFormatter {
|
|
|
375
375
|
/**
|
|
376
376
|
* Convert a date object to string format.
|
|
377
377
|
* @param {Object} date - Date to convert to string.
|
|
378
|
-
* @
|
|
378
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
379
|
+
* @returns {String} Returns the date as a string.
|
|
379
380
|
*/
|
|
380
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
381
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
381
382
|
year: "numeric",
|
|
382
383
|
month: "2-digit",
|
|
383
384
|
day: "2-digit",
|
|
@@ -569,7 +570,7 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
569
570
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
570
571
|
|
|
571
572
|
// Get the date string of the date object we created from the string date
|
|
572
|
-
const actualDateStr = dateFormatter$1.getDateAsString(dateObj);
|
|
573
|
+
const actualDateStr = dateFormatter$1.getDateAsString(dateObj, "en-US");
|
|
573
574
|
|
|
574
575
|
// Guard Clause: Generated date matches date string input
|
|
575
576
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -734,7 +735,7 @@ const {
|
|
|
734
735
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
735
736
|
|
|
736
737
|
constructor() {
|
|
737
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
738
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
738
739
|
}
|
|
739
740
|
|
|
740
741
|
/**
|
|
@@ -1106,7 +1107,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
1106
1107
|
|
|
1107
1108
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1108
1109
|
|
|
1109
|
-
let AuroLibraryRuntimeUtils$
|
|
1110
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
1110
1111
|
|
|
1111
1112
|
/* eslint-disable jsdoc/require-param */
|
|
1112
1113
|
|
|
@@ -1689,10 +1690,11 @@ const flip$1 = function (options) {
|
|
|
1689
1690
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1690
1691
|
const nextPlacement = placements[nextIndex];
|
|
1691
1692
|
if (nextPlacement) {
|
|
1692
|
-
var _overflowsData$;
|
|
1693
1693
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1694
|
-
|
|
1695
|
-
if
|
|
1694
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1695
|
+
// We leave the current main axis only if every placement on that axis
|
|
1696
|
+
// overflows the main axis.
|
|
1697
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1696
1698
|
// Try next placement and re-run the lifecycle.
|
|
1697
1699
|
return {
|
|
1698
1700
|
data: {
|
|
@@ -2713,8 +2715,28 @@ class AuroFloatingUI {
|
|
|
2713
2715
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2714
2716
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2715
2717
|
|
|
2718
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2719
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2720
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2721
|
+
}
|
|
2716
2722
|
const mouseEventGlobalHandler = (event) => {
|
|
2717
|
-
|
|
2723
|
+
const isPressed = event.type === 'mousedown';
|
|
2724
|
+
if (isPressed) {
|
|
2725
|
+
// Clear any pending timeout to prevent race condition
|
|
2726
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2727
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2728
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2729
|
+
}
|
|
2730
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2731
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2732
|
+
}
|
|
2733
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2734
|
+
// Schedule reset and track timeout ID
|
|
2735
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2736
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2737
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2738
|
+
}, 0);
|
|
2739
|
+
}
|
|
2718
2740
|
};
|
|
2719
2741
|
|
|
2720
2742
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2841,6 +2863,7 @@ class AuroFloatingUI {
|
|
|
2841
2863
|
|
|
2842
2864
|
// Compute the position of the bib
|
|
2843
2865
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2866
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2844
2867
|
placement: this.element.floaterConfig?.placement,
|
|
2845
2868
|
middleware: middleware || []
|
|
2846
2869
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2975,8 +2998,9 @@ class AuroFloatingUI {
|
|
|
2975
2998
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2976
2999
|
return;
|
|
2977
3000
|
}
|
|
2978
|
-
|
|
2979
|
-
if
|
|
3001
|
+
|
|
3002
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
3003
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2980
3004
|
return;
|
|
2981
3005
|
}
|
|
2982
3006
|
|
|
@@ -3277,8 +3301,6 @@ class AuroFloatingUI {
|
|
|
3277
3301
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3278
3302
|
}
|
|
3279
3303
|
|
|
3280
|
-
document.body.append(this.element.bib);
|
|
3281
|
-
|
|
3282
3304
|
this.regenerateBibId();
|
|
3283
3305
|
this.handleTriggerTabIndex();
|
|
3284
3306
|
|
|
@@ -3421,7 +3443,7 @@ const cacheFetch$3 = (uri, options = {}) => {
|
|
|
3421
3443
|
return _fetchMap$3.get(uri);
|
|
3422
3444
|
};
|
|
3423
3445
|
|
|
3424
|
-
var styleCss$3
|
|
3446
|
+
var styleCss$2$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
3425
3447
|
|
|
3426
3448
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3427
3449
|
// See LICENSE in the project root for license information.
|
|
@@ -3464,7 +3486,7 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3464
3486
|
|
|
3465
3487
|
static get styles() {
|
|
3466
3488
|
return i$5`
|
|
3467
|
-
${styleCss$3
|
|
3489
|
+
${styleCss$2$3}
|
|
3468
3490
|
`;
|
|
3469
3491
|
}
|
|
3470
3492
|
|
|
@@ -3509,6 +3531,76 @@ var tokensCss$2$2 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3509
3531
|
|
|
3510
3532
|
var colorCss$3$2 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3511
3533
|
|
|
3534
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3535
|
+
// See LICENSE in the project root for license information.
|
|
3536
|
+
|
|
3537
|
+
// ---------------------------------------------------------------------
|
|
3538
|
+
|
|
3539
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3540
|
+
|
|
3541
|
+
let AuroLibraryRuntimeUtils$1$3 = class AuroLibraryRuntimeUtils {
|
|
3542
|
+
|
|
3543
|
+
/* eslint-disable jsdoc/require-param */
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* This will register a new custom element with the browser.
|
|
3547
|
+
* @param {String} name - The name of the custom element.
|
|
3548
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3549
|
+
* @returns {void}
|
|
3550
|
+
*/
|
|
3551
|
+
registerComponent(name, componentClass) {
|
|
3552
|
+
if (!customElements.get(name)) {
|
|
3553
|
+
customElements.define(name, class extends componentClass {});
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
/**
|
|
3558
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3559
|
+
* @returns {void}
|
|
3560
|
+
*/
|
|
3561
|
+
closestElement(
|
|
3562
|
+
selector, // selector like in .closest()
|
|
3563
|
+
base = this, // extra functionality to skip a parent
|
|
3564
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3565
|
+
!el || el === document || el === window
|
|
3566
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3567
|
+
: found
|
|
3568
|
+
? found // found a selector INside this element
|
|
3569
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3570
|
+
) {
|
|
3571
|
+
return __Closest(base);
|
|
3572
|
+
}
|
|
3573
|
+
/* eslint-enable jsdoc/require-param */
|
|
3574
|
+
|
|
3575
|
+
/**
|
|
3576
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3577
|
+
* @param {Object} elem - The element to check.
|
|
3578
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3579
|
+
* @returns {void}
|
|
3580
|
+
*/
|
|
3581
|
+
handleComponentTagRename(elem, tagName) {
|
|
3582
|
+
const tag = tagName.toLowerCase();
|
|
3583
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3584
|
+
|
|
3585
|
+
if (elemTag !== tag) {
|
|
3586
|
+
elem.setAttribute(tag, true);
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
/**
|
|
3591
|
+
* Validates if an element is a specific Auro component.
|
|
3592
|
+
* @param {Object} elem - The element to validate.
|
|
3593
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3594
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3595
|
+
*/
|
|
3596
|
+
elementMatch(elem, tagName) {
|
|
3597
|
+
const tag = tagName.toLowerCase();
|
|
3598
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3599
|
+
|
|
3600
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3601
|
+
}
|
|
3602
|
+
};
|
|
3603
|
+
|
|
3512
3604
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3513
3605
|
// See LICENSE in the project root for license information.
|
|
3514
3606
|
|
|
@@ -3528,7 +3620,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3528
3620
|
*/
|
|
3529
3621
|
privateDefaults() {
|
|
3530
3622
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3531
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
3623
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$3();
|
|
3532
3624
|
}
|
|
3533
3625
|
|
|
3534
3626
|
// function to define props used within the scope of this component
|
|
@@ -3596,7 +3688,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3596
3688
|
return [
|
|
3597
3689
|
super.styles,
|
|
3598
3690
|
i$5`${tokensCss$2$2}`,
|
|
3599
|
-
i$5`${styleCss$3
|
|
3691
|
+
i$5`${styleCss$2$3}`,
|
|
3600
3692
|
i$5`${colorCss$3$2}`
|
|
3601
3693
|
];
|
|
3602
3694
|
}
|
|
@@ -3610,7 +3702,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3610
3702
|
*
|
|
3611
3703
|
*/
|
|
3612
3704
|
static register(name = "auro-icon") {
|
|
3613
|
-
AuroLibraryRuntimeUtils$1$
|
|
3705
|
+
AuroLibraryRuntimeUtils$1$3.prototype.registerComponent(name, AuroIcon);
|
|
3614
3706
|
}
|
|
3615
3707
|
|
|
3616
3708
|
connectedCallback() {
|
|
@@ -3678,7 +3770,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3678
3770
|
|
|
3679
3771
|
var iconVersion$3 = '6.1.2';
|
|
3680
3772
|
|
|
3681
|
-
var styleCss$
|
|
3773
|
+
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
3682
3774
|
|
|
3683
3775
|
var colorCss$2$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3684
3776
|
|
|
@@ -3688,7 +3780,6 @@ var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-colo
|
|
|
3688
3780
|
// See LICENSE in the project root for license information.
|
|
3689
3781
|
|
|
3690
3782
|
|
|
3691
|
-
|
|
3692
3783
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3693
3784
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3694
3785
|
'xl',
|
|
@@ -3713,12 +3804,12 @@ class AuroDropdownBib extends i$2 {
|
|
|
3713
3804
|
*/
|
|
3714
3805
|
this._mobileBreakpointValue = undefined;
|
|
3715
3806
|
|
|
3716
|
-
AuroLibraryRuntimeUtils$
|
|
3807
|
+
AuroLibraryRuntimeUtils$2$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3717
3808
|
}
|
|
3718
3809
|
|
|
3719
3810
|
static get styles() {
|
|
3720
3811
|
return [
|
|
3721
|
-
styleCss$
|
|
3812
|
+
styleCss$1$3,
|
|
3722
3813
|
colorCss$2$2,
|
|
3723
3814
|
tokensCss$1$2
|
|
3724
3815
|
];
|
|
@@ -3758,6 +3849,13 @@ class AuroDropdownBib extends i$2 {
|
|
|
3758
3849
|
type: Boolean,
|
|
3759
3850
|
reflect: true
|
|
3760
3851
|
},
|
|
3852
|
+
|
|
3853
|
+
/**
|
|
3854
|
+
* A reference to the associated bib template element.
|
|
3855
|
+
*/
|
|
3856
|
+
bibTemplate: {
|
|
3857
|
+
type: Object
|
|
3858
|
+
}
|
|
3761
3859
|
};
|
|
3762
3860
|
}
|
|
3763
3861
|
|
|
@@ -3790,9 +3888,50 @@ class AuroDropdownBib extends i$2 {
|
|
|
3790
3888
|
}
|
|
3791
3889
|
}
|
|
3792
3890
|
});
|
|
3891
|
+
|
|
3892
|
+
if (this.bibTemplate) {
|
|
3893
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3894
|
+
if (this.isFullscreen) {
|
|
3895
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3896
|
+
} else {
|
|
3897
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3898
|
+
}
|
|
3899
|
+
}
|
|
3793
3900
|
}
|
|
3794
3901
|
}
|
|
3795
3902
|
|
|
3903
|
+
connectedCallback() {
|
|
3904
|
+
super.connectedCallback();
|
|
3905
|
+
|
|
3906
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3907
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3908
|
+
const bibTemplate = event.detail.element;
|
|
3909
|
+
this.bibTemplate = bibTemplate;
|
|
3910
|
+
|
|
3911
|
+
if (bibTemplate) {
|
|
3912
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3913
|
+
if (this.isFullscreen) {
|
|
3914
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3915
|
+
} else {
|
|
3916
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3917
|
+
}
|
|
3918
|
+
}
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3922
|
+
firstUpdated(changedProperties) {
|
|
3923
|
+
super.firstUpdated(changedProperties);
|
|
3924
|
+
|
|
3925
|
+
// Dispatch a custom event when the component is connected
|
|
3926
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3927
|
+
bubbles: true,
|
|
3928
|
+
composed: true,
|
|
3929
|
+
detail: {
|
|
3930
|
+
element: this
|
|
3931
|
+
}
|
|
3932
|
+
}));
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3796
3935
|
// function that renders the HTML and CSS into the scope of the component
|
|
3797
3936
|
render() {
|
|
3798
3937
|
return u$2`
|
|
@@ -3805,15 +3944,17 @@ class AuroDropdownBib extends i$2 {
|
|
|
3805
3944
|
|
|
3806
3945
|
var dropdownVersion$1 = '3.0.0';
|
|
3807
3946
|
|
|
3808
|
-
var shapeSizeCss$1 = i$5`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:
|
|
3809
|
-
|
|
3810
|
-
var styleCss$1$3 = i$5`:host([layout*=classic]){position:relative;display:inline-block;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{position:relative;display:flex;align-items:center}:host([layout*=classic]) .trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
3947
|
+
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
3811
3948
|
|
|
3812
3949
|
var colorCss$1$3 = i$5`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
3813
3950
|
|
|
3814
|
-
var
|
|
3951
|
+
var classicColorCss$1 = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}:host([layout*=classic]) .trigger:focus-within,:host([layout*=classic]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([layout*=classic])[common],:host([layout*=classic])[bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67)}:host([layout*=classic])[common] .trigger:active,:host([layout*=classic])[common] .trigger:focus-within,:host([layout*=classic])[bordered] .trigger:active,:host([layout*=classic])[bordered] .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[error]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic])[error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[error] .trigger:focus-within,:host([layout*=classic])[error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled][common],:host([layout*=classic])[disabled][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic])[onDark]{--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([layout*=classic])[onDark]:focus-within,:host([layout*=classic])[onDark]:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([layout*=classic])[onDark][common],:host([layout*=classic])[onDark][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic])[onDark][common] .trigger:focus-within,:host([layout*=classic])[onDark][common] .trigger:active,:host([layout*=classic])[onDark][bordered] .trigger:focus-within,:host([layout*=classic])[onDark][bordered] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][error]{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic])[onDark][error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[onDark][error] .trigger:focus-within,:host([layout*=classic])[onDark][error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled][common],:host([layout*=classic])[onDark][disabled][bordered]{--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
|
|
3952
|
+
|
|
3953
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
3815
3954
|
|
|
3816
|
-
var
|
|
3955
|
+
var styleEmphasizedCss$1 = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3956
|
+
|
|
3957
|
+
var styleSnowflakeCss$1 = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3817
3958
|
|
|
3818
3959
|
var colorCss$6 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3819
3960
|
|
|
@@ -3828,7 +3969,7 @@ var tokensCss$6 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3828
3969
|
|
|
3829
3970
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3830
3971
|
|
|
3831
|
-
let AuroLibraryRuntimeUtils$
|
|
3972
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
3832
3973
|
|
|
3833
3974
|
/* eslint-disable jsdoc/require-param */
|
|
3834
3975
|
|
|
@@ -3909,7 +4050,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3909
4050
|
this.onDark = false;
|
|
3910
4051
|
this.hasTextContent = false;
|
|
3911
4052
|
|
|
3912
|
-
AuroLibraryRuntimeUtils$
|
|
4053
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3913
4054
|
}
|
|
3914
4055
|
|
|
3915
4056
|
static get styles() {
|
|
@@ -3965,7 +4106,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$2 {
|
|
|
3965
4106
|
*
|
|
3966
4107
|
*/
|
|
3967
4108
|
static register(name = "auro-helptext") {
|
|
3968
|
-
AuroLibraryRuntimeUtils$
|
|
4109
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
3969
4110
|
}
|
|
3970
4111
|
|
|
3971
4112
|
updated() {
|
|
@@ -4141,12 +4282,13 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4141
4282
|
this.matchWidth = false;
|
|
4142
4283
|
this.noHideOnThisFocusLoss = false;
|
|
4143
4284
|
|
|
4144
|
-
this.errorMessage = ''; // TODO
|
|
4285
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
4145
4286
|
|
|
4146
4287
|
// Layout Config
|
|
4147
|
-
this.layout = '
|
|
4288
|
+
this.layout = 'classic';
|
|
4148
4289
|
this.shape = 'rounded';
|
|
4149
4290
|
this.size = 'xl';
|
|
4291
|
+
this.parentBorder = false;
|
|
4150
4292
|
|
|
4151
4293
|
this.privateDefaults();
|
|
4152
4294
|
}
|
|
@@ -4162,7 +4304,8 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4162
4304
|
'trigger': true,
|
|
4163
4305
|
'wrapper': true,
|
|
4164
4306
|
'hasFocus': this.hasFocus,
|
|
4165
|
-
'simple': this.simple
|
|
4307
|
+
'simple': this.simple,
|
|
4308
|
+
'parentBorder': this.parentBorder
|
|
4166
4309
|
};
|
|
4167
4310
|
}
|
|
4168
4311
|
|
|
@@ -4214,7 +4357,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4214
4357
|
/**
|
|
4215
4358
|
* @private
|
|
4216
4359
|
*/
|
|
4217
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4360
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
4218
4361
|
|
|
4219
4362
|
/**
|
|
4220
4363
|
* @private
|
|
@@ -4429,6 +4572,15 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4429
4572
|
reflect: true
|
|
4430
4573
|
},
|
|
4431
4574
|
|
|
4575
|
+
/**
|
|
4576
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4577
|
+
* @private
|
|
4578
|
+
*/
|
|
4579
|
+
parentBorder: {
|
|
4580
|
+
type: Boolean,
|
|
4581
|
+
reflect: true
|
|
4582
|
+
},
|
|
4583
|
+
|
|
4432
4584
|
/**
|
|
4433
4585
|
* If declared, the popover and trigger will be set to the same width.
|
|
4434
4586
|
*/
|
|
@@ -4531,10 +4683,18 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4531
4683
|
static get styles() {
|
|
4532
4684
|
return [
|
|
4533
4685
|
colorCss$1$3,
|
|
4534
|
-
styleCss$1$3,
|
|
4535
4686
|
tokensCss$1$2,
|
|
4687
|
+
|
|
4688
|
+
// default layout
|
|
4689
|
+
classicColorCss$1,
|
|
4690
|
+
classicLayoutCss,
|
|
4691
|
+
|
|
4692
|
+
// emphasized layout
|
|
4536
4693
|
styleEmphasizedCss$1,
|
|
4694
|
+
|
|
4695
|
+
// snowflake layout
|
|
4537
4696
|
styleSnowflakeCss$1,
|
|
4697
|
+
|
|
4538
4698
|
shapeSizeCss$1
|
|
4539
4699
|
];
|
|
4540
4700
|
}
|
|
@@ -4548,7 +4708,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4548
4708
|
*
|
|
4549
4709
|
*/
|
|
4550
4710
|
static register(name = "auro-dropdown") {
|
|
4551
|
-
AuroLibraryRuntimeUtils$
|
|
4711
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroDropdown);
|
|
4552
4712
|
}
|
|
4553
4713
|
|
|
4554
4714
|
/**
|
|
@@ -4881,11 +5041,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4881
5041
|
*
|
|
4882
5042
|
* @private
|
|
4883
5043
|
* @method handleDefaultSlot
|
|
4884
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4885
5044
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4886
5045
|
*/
|
|
4887
|
-
handleDefaultSlot(
|
|
4888
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
5046
|
+
handleDefaultSlot() {
|
|
4889
5047
|
|
|
4890
5048
|
if (this.onSlotChange) {
|
|
4891
5049
|
this.onSlotChange();
|
|
@@ -4928,7 +5086,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4928
5086
|
id="trigger"
|
|
4929
5087
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
4930
5088
|
tabindex="${this.tabIndex}"
|
|
4931
|
-
?showBorder="${this.showTriggerBorders}"
|
|
4932
5089
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4933
5090
|
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4934
5091
|
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -4948,6 +5105,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4948
5105
|
${this.chevron || this.common ? u$2`
|
|
4949
5106
|
<div
|
|
4950
5107
|
id="showStateIcon"
|
|
5108
|
+
class="chevron"
|
|
4951
5109
|
part="chevron">
|
|
4952
5110
|
<${this.iconTag}
|
|
4953
5111
|
category="interface"
|
|
@@ -4962,9 +5120,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4962
5120
|
<div class="${e(helpTextClasses)}">
|
|
4963
5121
|
<slot name="helpText"></slot>
|
|
4964
5122
|
</div>
|
|
4965
|
-
<div class="slotContent">
|
|
4966
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4967
|
-
</div>
|
|
4968
5123
|
<div id="bibSizer" part="size"></div>
|
|
4969
5124
|
<${this.dropdownBibTag}
|
|
4970
5125
|
id="bib"
|
|
@@ -4973,6 +5128,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4973
5128
|
?common="${this.common}"
|
|
4974
5129
|
?rounded="${this.common || this.rounded}"
|
|
4975
5130
|
?inset="${this.common || this.inset}">
|
|
5131
|
+
<div class="slotContent">
|
|
5132
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5133
|
+
</div>
|
|
4976
5134
|
</${this.dropdownBibTag}>
|
|
4977
5135
|
</div>
|
|
4978
5136
|
`;
|
|
@@ -4984,6 +5142,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4984
5142
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4985
5143
|
*/
|
|
4986
5144
|
renderLayoutClassic() {
|
|
5145
|
+
|
|
4987
5146
|
return u$2`
|
|
4988
5147
|
<div>
|
|
4989
5148
|
<div
|
|
@@ -5021,9 +5180,10 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5021
5180
|
</div>
|
|
5022
5181
|
` : undefined }
|
|
5023
5182
|
</div>
|
|
5024
|
-
|
|
5025
|
-
<slot
|
|
5026
|
-
|
|
5183
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5184
|
+
<slot name="helpText"></slot>
|
|
5185
|
+
</${this.helpTextTag}>
|
|
5186
|
+
|
|
5027
5187
|
<div id="bibSizer" part="size"></div>
|
|
5028
5188
|
<${this.dropdownBibTag}
|
|
5029
5189
|
id="bib"
|
|
@@ -5033,6 +5193,9 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
5033
5193
|
?rounded="${this.common || this.rounded}"
|
|
5034
5194
|
?inset="${this.common || this.inset}"
|
|
5035
5195
|
>
|
|
5196
|
+
<div class="slotContent">
|
|
5197
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5198
|
+
</div>
|
|
5036
5199
|
</${this.dropdownBibTag}>
|
|
5037
5200
|
</div>
|
|
5038
5201
|
`;
|
|
@@ -5115,19 +5278,19 @@ var dropdownVersion = '3.0.0';
|
|
|
5115
5278
|
*/
|
|
5116
5279
|
const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=e$1(class extends i{constructor(e){if(super(e),e.type!==t$1.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return {values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r$1,c]){const d=p(s),{values:p$1,keys:a}=this.dt(t,r$1,c);if(!Array.isArray(d))return this.ut=a,p$1;const h=this.ut??=[],v$1=[];let m$1,y,x=0,j=d.length-1,k=0,w=p$1.length-1;for(;x<=j&&k<=w;)if(null===d[x])x++;else if(null===d[j])j--;else if(h[x]===a[k])v$1[k]=v(d[x],p$1[k]),x++,k++;else if(h[j]===a[w])v$1[w]=v(d[j],p$1[w]),j--,w--;else if(h[x]===a[w])v$1[w]=v(d[x],p$1[w]),r(s,v$1[w+1],d[x]),x++,w--;else if(h[j]===a[k])v$1[k]=v(d[j],p$1[k]),r(s,d[x],d[j]),j--,k++;else if(void 0===m$1&&(m$1=u(a,k,w),y=u(h,x,j)),m$1.has(h[x]))if(m$1.has(h[j])){const e=y.get(a[k]),t=void 0!==e?d[e]:null;if(null===t){const e=r(s,d[x]);v(e,p$1[k]),v$1[k]=e;}else v$1[k]=v(t,p$1[k]),r(s,d[x],t),d[e]=null;k++;}else M(d[j]),j--;else M(d[x]),x++;for(;k<=w;){const e=r(s,v$1[w+1]);v(e,p$1[k]),v$1[k++]=e;}for(;x<=j;){const e=d[x++];null!==e&&M(e);}return this.ut=a,m(s,v$1),T}});
|
|
5117
5280
|
|
|
5118
|
-
var shapeSizeCss = i$5`.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width: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-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-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-pill-xl{min-height:
|
|
5281
|
+
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
5119
5282
|
|
|
5120
5283
|
var styleCss$4$1 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
|
|
5121
5284
|
|
|
5122
5285
|
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}.layoutDefault label,:host(:not([layout])) label{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:absolute;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault :host(:not([bordered])) label,:host(:not([layout])) :host(:not([bordered])) label{top:calc(100% - var(--ds-size-25, 0.125rem));transform:translateY(-100%)}.layoutDefault :host(:not([bordered])) label.withIcon,:host(:not([layout])) :host(:not([bordered])) label.withIcon{left:var(--ds-size-400, 2rem)}:host([class=layoutDefault][bordered]) label,:host(:not([layout])[bordered]) label{top:50%;transform:translateY(-50%)}:host([class=layoutDefault][bordered]) label.withIcon,:host(:not([layout])[bordered]) label.withIcon{left:var(--ds-size-500, 2.5rem)}:host([class=layoutDefault][bordered]) label:not(label.withIcon),:host(:not([layout])[bordered]) label:not(label.withIcon){left:var(--ds-size-100, 0.5rem)}.layoutDefault .wrapper:focus-within label,:host(:not([layout])) .wrapper:focus-within label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault label.withValue,:host(:not([layout])) label.withValue{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}:host([class=layoutDefault][activeLabel]) .wrapper label,:host(:not([layout])[activeLabel]) .wrapper label{top:var(--ds-size-100, 0.5rem);font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px);transform:unset}.layoutDefault input,:host(:not([layout])) input{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);position:relative;overflow:hidden;min-height:var(--ds-size-200, 1rem);max-height:var(--ds-size-200, 1rem);flex:1;padding:var(--ds-size-400, 2rem) 0 var(--ds-size-50, 0.25rem);margin:0;font-family:var(--ds-basic-text-body-default-font-family, AS Circular);font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-line-height, 24px);outline:none;text-overflow:ellipsis;white-space:nowrap}.layoutDefault input::-ms-reveal,.layoutDefault input::-ms-clear,:host(:not([layout])) input::-ms-reveal,:host(:not([layout])) input::-ms-clear{display:none}.layoutDefault input::-webkit-outer-spin-button,.layoutDefault input::-webkit-inner-spin-button,:host(:not([layout])) input::-webkit-outer-spin-button,:host(:not([layout])) input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.layoutDefault input[type=number],:host(:not([layout])) input[type=number]{-moz-appearance:textfield;appearance:textfield}.layoutDefault input:disabled,:host(:not([layout])) input:disabled{background:none;pointer-events:none}:host([class=layoutDefault][bordered]) input,:host(:not([layout])[bordered]) input{padding:var(--ds-size-400, 2rem) 0 var(--ds-size-100, 0.5rem)}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.layoutDefault :host,:host(:not([layout])) :host{position:relative;display:block}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{display:flex;flex-direction:row}.layoutDefault .main,:host(:not([layout])) .main{display:flex;flex-direction:row;position:relative;flex:1}`;
|
|
5123
5286
|
|
|
5124
|
-
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{color:var(--ds-auro-input-
|
|
5287
|
+
var colorBaseCss = i$5`.wrapper{border-color:var(--ds-auro-input-border-color);background-color:var(--ds-auro-input-background-color);color:var(--ds-auro-input-text-color)}.wrapper label{color:var(--ds-auro-input-label-text-color)}.wrapper input{caret-color:var(--ds-auro-input-caret-color);color:var(--ds-auro-input-text-color)}.wrapper input::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper input:focus::placeholder{color:var(--ds-auro-input-placeholder-text-color)}.wrapper .displayValue{background-color:var(--ds-auro-input-background-color)}:host(:not([ondark])) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host(:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]:is([validity]:not([validity=valid]))) .wrapper{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5125
5288
|
|
|
5126
|
-
var tokensCss$4 = i$5`:host(:not(ondark)){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5289
|
+
var tokensCss$4 = i$5`:host(:not([ondark])){--ds-auro-input-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-input-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-input-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: transparent}:host([ondark]){--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-input-caret-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-input-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-input-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: transparent}`;
|
|
5127
5290
|
|
|
5128
|
-
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row}.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{
|
|
5291
|
+
var classicStyleCss = i$5`.layout-classic{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-input-outline-color)}.layout-classic .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;flex:1;cursor:text}.layout-classic .mainContent label{cursor:text;padding-top:4px;font-size:var(--ds-text-body-size-xs);line-height:20px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}.layout-classic .mainContent input{font-size:var(--ds-basic-text-body-default-font-size, 16px);line-height:var(--ds-basic-text-body-default-line-height, 24px);padding-bottom:8px;transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);height:auto}.layout-classic .mainContent:has(input.util_displayHiddenVisually) label{justify-self:flex-start;padding-top:0;font-size:var(--ds-text-body-size-default, 1rem);line-height:var(--ds-text-body-size-default)}.layout-classic .mainContent:has(input.util_displayHiddenVisually) input{height:0;line-height:0;padding-bottom:0}.layout-classic .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-classic .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-classic .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-classic.withValue{justify-content:flex-start}.layout-classic:focus-within{justify-content:flex-start}.layout-classic:focus-within .alertNotification{display:none}.layout-classic .accents.left{padding-left:8px}.layout-classic .accents.right{padding-right:8px}`;
|
|
5129
5292
|
|
|
5130
|
-
var classicColorCss = i$5`.layout-
|
|
5293
|
+
var classicColorCss = i$5`.layout-classic label{color:var(--ds-auro-input-label-text-color)}.layout-classic:focus-within{--ds-auro-input-outline-color: var(--ds-auro-input-border-color)}:host(:not([ondark])) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-brand, #00274a);--ds-auro-input-outline-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-input-outline-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic]:not([ondark]):is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-input-outline-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][ondark]:is([validity]:not([validity=valid]))) .layout-classic:focus-within{--ds-auro-input-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-input-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5131
5294
|
|
|
5132
5295
|
var emphasizedStyleCss = i$5`:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{background:unset;width:100%;padding:0;border:0;outline:none;overflow:hidden;text-overflow:ellipsis}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}.layout-emphasized,.layout-emphasized-left,.layout-emphasized-right{display:flex;flex-direction:row;align-items:center;justify-content:center}.layout-emphasized label,.layout-emphasized-left label,.layout-emphasized-right label{text-transform:uppercase;font-size:32px;line-height:38px}.layout-emphasized input,.layout-emphasized-left input,.layout-emphasized-right input{text-align:center;font-size:14px;line-height:20px}.layout-emphasized .mainContent,.layout-emphasized-left .mainContent,.layout-emphasized-right .mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.layout-emphasized .displayValue,.layout-emphasized-left .displayValue,.layout-emphasized-right .displayValue{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.layout-emphasized .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-left .displayValue.hasContent:is(.withValue):not(.hasFocus),.layout-emphasized-right .displayValue.hasContent:is(.withValue):not(.hasFocus){display:block}.layout-emphasized .displayValueWrapper,.layout-emphasized-left .displayValueWrapper,.layout-emphasized-right .displayValueWrapper{transform:translateY(-50%)}.layout-emphasized .accents,.layout-emphasized-left .accents,.layout-emphasized-right .accents{display:flex;flex-direction:row;justify-content:center;align-items:center}.layout-emphasized.withValue,.layout-emphasized-left.withValue,.layout-emphasized-right.withValue{justify-content:flex-start}.layout-emphasized.withValue label,.layout-emphasized-left.withValue label,.layout-emphasized-right.withValue label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized.withValue input,.layout-emphasized-left.withValue input,.layout-emphasized-right.withValue input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-left:not(:focus-within):not(:is([validity]:not([validity=valid]))),.layout-emphasized-right:not(:focus-within):not(:is([validity]:not([validity=valid]))){--ds-auro-input-border-color: transparent}.layout-emphasized:focus-within,.layout-emphasized-left:focus-within,.layout-emphasized-right:focus-within{justify-content:flex-start}.layout-emphasized:focus-within label,.layout-emphasized-left:focus-within label,.layout-emphasized-right:focus-within label{display:block;text-transform:unset;font-size:10px;line-height:14px;width:100%;text-align:left}.layout-emphasized:focus-within input,.layout-emphasized-left:focus-within input,.layout-emphasized-right:focus-within input{text-transform:uppercase;font-size:32px;line-height:38px;text-align:left;width:100%}.layout-emphasized:focus-within .alertNotification,.layout-emphasized-left:focus-within .alertNotification,.layout-emphasized-right:focus-within .alertNotification{display:none}.layout-emphasized .accents.left,.layout-emphasized-left .accents.left,.layout-emphasized-right .accents.left{padding-left:24px}.layout-emphasized .accents.right,.layout-emphasized-left .accents.right,.layout-emphasized-right .accents.right{padding-right:24px}.layout-emphasized-left .alertNotification{margin-right:8px}.layout-emphasized-left .clear{margin-left:8px}.layout-emphasized-right .alertNotification{margin-left:8px}.layout-emphasized-right .clear{margin-right:8px}`;
|
|
5133
5296
|
|
|
@@ -9154,9 +9317,10 @@ class DateFormatter {
|
|
|
9154
9317
|
/**
|
|
9155
9318
|
* Convert a date object to string format.
|
|
9156
9319
|
* @param {Object} date - Date to convert to string.
|
|
9157
|
-
* @
|
|
9320
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
9321
|
+
* @returns {String} Returns the date as a string.
|
|
9158
9322
|
*/
|
|
9159
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
9323
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
9160
9324
|
year: "numeric",
|
|
9161
9325
|
month: "2-digit",
|
|
9162
9326
|
day: "2-digit",
|
|
@@ -9348,7 +9512,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
9348
9512
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
9349
9513
|
|
|
9350
9514
|
// Get the date string of the date object we created from the string date
|
|
9351
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
9515
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
9352
9516
|
|
|
9353
9517
|
// Guard Clause: Generated date matches date string input
|
|
9354
9518
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -9513,7 +9677,7 @@ const {
|
|
|
9513
9677
|
|
|
9514
9678
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9515
9679
|
|
|
9516
|
-
let AuroLibraryRuntimeUtils$
|
|
9680
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
9517
9681
|
|
|
9518
9682
|
/* eslint-disable jsdoc/require-param */
|
|
9519
9683
|
|
|
@@ -9583,7 +9747,7 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
9583
9747
|
class AuroFormValidation {
|
|
9584
9748
|
|
|
9585
9749
|
constructor() {
|
|
9586
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9750
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
9587
9751
|
}
|
|
9588
9752
|
|
|
9589
9753
|
/**
|
|
@@ -10074,7 +10238,7 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10074
10238
|
this.setCustomValidityForType = undefined;
|
|
10075
10239
|
|
|
10076
10240
|
this.layout = 'classic';
|
|
10077
|
-
this.shape = '
|
|
10241
|
+
this.shape = 'classic';
|
|
10078
10242
|
this.size = 'lg';
|
|
10079
10243
|
}
|
|
10080
10244
|
|
|
@@ -10463,8 +10627,8 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
10463
10627
|
},
|
|
10464
10628
|
|
|
10465
10629
|
/**
|
|
10630
|
+
* The id for input node.
|
|
10466
10631
|
* @private
|
|
10467
|
-
* id for input node
|
|
10468
10632
|
*/
|
|
10469
10633
|
inputId: {
|
|
10470
10634
|
type: String,
|
|
@@ -11288,6 +11452,76 @@ var tokensCss$3$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
11288
11452
|
|
|
11289
11453
|
var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11290
11454
|
|
|
11455
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11456
|
+
// See LICENSE in the project root for license information.
|
|
11457
|
+
|
|
11458
|
+
// ---------------------------------------------------------------------
|
|
11459
|
+
|
|
11460
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11461
|
+
|
|
11462
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
11463
|
+
|
|
11464
|
+
/* eslint-disable jsdoc/require-param */
|
|
11465
|
+
|
|
11466
|
+
/**
|
|
11467
|
+
* This will register a new custom element with the browser.
|
|
11468
|
+
* @param {String} name - The name of the custom element.
|
|
11469
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
11470
|
+
* @returns {void}
|
|
11471
|
+
*/
|
|
11472
|
+
registerComponent(name, componentClass) {
|
|
11473
|
+
if (!customElements.get(name)) {
|
|
11474
|
+
customElements.define(name, class extends componentClass {});
|
|
11475
|
+
}
|
|
11476
|
+
}
|
|
11477
|
+
|
|
11478
|
+
/**
|
|
11479
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
11480
|
+
* @returns {void}
|
|
11481
|
+
*/
|
|
11482
|
+
closestElement(
|
|
11483
|
+
selector, // selector like in .closest()
|
|
11484
|
+
base = this, // extra functionality to skip a parent
|
|
11485
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11486
|
+
!el || el === document || el === window
|
|
11487
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
11488
|
+
: found
|
|
11489
|
+
? found // found a selector INside this element
|
|
11490
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11491
|
+
) {
|
|
11492
|
+
return __Closest(base);
|
|
11493
|
+
}
|
|
11494
|
+
/* eslint-enable jsdoc/require-param */
|
|
11495
|
+
|
|
11496
|
+
/**
|
|
11497
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
11498
|
+
* @param {Object} elem - The element to check.
|
|
11499
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11500
|
+
* @returns {void}
|
|
11501
|
+
*/
|
|
11502
|
+
handleComponentTagRename(elem, tagName) {
|
|
11503
|
+
const tag = tagName.toLowerCase();
|
|
11504
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11505
|
+
|
|
11506
|
+
if (elemTag !== tag) {
|
|
11507
|
+
elem.setAttribute(tag, true);
|
|
11508
|
+
}
|
|
11509
|
+
}
|
|
11510
|
+
|
|
11511
|
+
/**
|
|
11512
|
+
* Validates if an element is a specific Auro component.
|
|
11513
|
+
* @param {Object} elem - The element to validate.
|
|
11514
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
11515
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11516
|
+
*/
|
|
11517
|
+
elementMatch(elem, tagName) {
|
|
11518
|
+
const tag = tagName.toLowerCase();
|
|
11519
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11520
|
+
|
|
11521
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
11522
|
+
}
|
|
11523
|
+
};
|
|
11524
|
+
|
|
11291
11525
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11292
11526
|
// See LICENSE in the project root for license information.
|
|
11293
11527
|
|
|
@@ -11307,7 +11541,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11307
11541
|
*/
|
|
11308
11542
|
privateDefaults() {
|
|
11309
11543
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11310
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
11544
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
11311
11545
|
}
|
|
11312
11546
|
|
|
11313
11547
|
// function to define props used within the scope of this component
|
|
@@ -11389,7 +11623,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11389
11623
|
*
|
|
11390
11624
|
*/
|
|
11391
11625
|
static register(name = "auro-icon") {
|
|
11392
|
-
AuroLibraryRuntimeUtils$1$
|
|
11626
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
11393
11627
|
}
|
|
11394
11628
|
|
|
11395
11629
|
connectedCallback() {
|
|
@@ -11495,7 +11729,7 @@ class AuroLoader extends i$2 {
|
|
|
11495
11729
|
/**
|
|
11496
11730
|
* @private
|
|
11497
11731
|
*/
|
|
11498
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11732
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11499
11733
|
|
|
11500
11734
|
this.orbit = false;
|
|
11501
11735
|
this.ringworm = false;
|
|
@@ -11558,7 +11792,7 @@ class AuroLoader extends i$2 {
|
|
|
11558
11792
|
*
|
|
11559
11793
|
*/
|
|
11560
11794
|
static register(name = "auro-loader") {
|
|
11561
|
-
AuroLibraryRuntimeUtils$
|
|
11795
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroLoader);
|
|
11562
11796
|
}
|
|
11563
11797
|
|
|
11564
11798
|
firstUpdated() {
|
|
@@ -11862,7 +12096,7 @@ class AuroButton extends i$2 {
|
|
|
11862
12096
|
*
|
|
11863
12097
|
*/
|
|
11864
12098
|
static register(name = "auro-button") {
|
|
11865
|
-
AuroLibraryRuntimeUtils$
|
|
12099
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroButton);
|
|
11866
12100
|
}
|
|
11867
12101
|
|
|
11868
12102
|
/**
|
|
@@ -11967,7 +12201,7 @@ var tokensCss$5 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
11967
12201
|
|
|
11968
12202
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11969
12203
|
|
|
11970
|
-
let AuroLibraryRuntimeUtils$
|
|
12204
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
11971
12205
|
|
|
11972
12206
|
/* eslint-disable jsdoc/require-param */
|
|
11973
12207
|
|
|
@@ -12048,7 +12282,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
12048
12282
|
this.onDark = false;
|
|
12049
12283
|
this.hasTextContent = false;
|
|
12050
12284
|
|
|
12051
|
-
AuroLibraryRuntimeUtils$
|
|
12285
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
12052
12286
|
}
|
|
12053
12287
|
|
|
12054
12288
|
static get styles() {
|
|
@@ -12104,7 +12338,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
12104
12338
|
*
|
|
12105
12339
|
*/
|
|
12106
12340
|
static register(name = "auro-helptext") {
|
|
12107
|
-
AuroLibraryRuntimeUtils$
|
|
12341
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
12108
12342
|
}
|
|
12109
12343
|
|
|
12110
12344
|
updated() {
|
|
@@ -12200,13 +12434,13 @@ class AuroInput extends BaseInput {
|
|
|
12200
12434
|
|
|
12201
12435
|
static get styles() {
|
|
12202
12436
|
return [
|
|
12437
|
+
i$5`${classicStyleCss}`,
|
|
12438
|
+
i$5`${classicColorCss}`,
|
|
12203
12439
|
i$5`${shapeSizeCss}`,
|
|
12204
12440
|
i$5`${colorBaseCss}`,
|
|
12205
12441
|
i$5`${styleCss$4$1}`,
|
|
12206
12442
|
i$5`${styleDefaultCss}`,
|
|
12207
12443
|
i$5`${tokensCss$4}`,
|
|
12208
|
-
i$5`${classicStyleCss}`,
|
|
12209
|
-
i$5`${classicColorCss}`,
|
|
12210
12444
|
i$5`${emphasizedStyleCss}`,
|
|
12211
12445
|
i$5`${emphasizedColorCss}`,
|
|
12212
12446
|
i$5`${snowflakeStyleCss}`
|
|
@@ -12228,7 +12462,7 @@ class AuroInput extends BaseInput {
|
|
|
12228
12462
|
/**
|
|
12229
12463
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
12230
12464
|
* @private
|
|
12231
|
-
* @returns {
|
|
12465
|
+
* @returns {object} - Returns classmap.
|
|
12232
12466
|
*/
|
|
12233
12467
|
get commonInputClasses() {
|
|
12234
12468
|
return {
|
|
@@ -12236,6 +12470,23 @@ class AuroInput extends BaseInput {
|
|
|
12236
12470
|
};
|
|
12237
12471
|
}
|
|
12238
12472
|
|
|
12473
|
+
/**
|
|
12474
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
12475
|
+
* @private
|
|
12476
|
+
* @returns {object} - Returns classmap.
|
|
12477
|
+
*/
|
|
12478
|
+
get legacyInputClasses() {
|
|
12479
|
+
return {
|
|
12480
|
+
...this.commonInputClasses,
|
|
12481
|
+
'util_displayHiddenVisually': !this.hasFocus && !this.value
|
|
12482
|
+
};
|
|
12483
|
+
}
|
|
12484
|
+
|
|
12485
|
+
/**
|
|
12486
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
12487
|
+
* @private
|
|
12488
|
+
* @returns {object} - Returns classmap.
|
|
12489
|
+
*/
|
|
12239
12490
|
get commonWrapperClasses() {
|
|
12240
12491
|
return {
|
|
12241
12492
|
'wrapper': true,
|
|
@@ -12244,6 +12495,11 @@ class AuroInput extends BaseInput {
|
|
|
12244
12495
|
};
|
|
12245
12496
|
}
|
|
12246
12497
|
|
|
12498
|
+
/**
|
|
12499
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
12500
|
+
* @private
|
|
12501
|
+
* @returns {object} - Returns classmap.
|
|
12502
|
+
*/
|
|
12247
12503
|
get helpTextClasses() {
|
|
12248
12504
|
return {
|
|
12249
12505
|
'helpTextWrapper': true,
|
|
@@ -12261,7 +12517,7 @@ class AuroInput extends BaseInput {
|
|
|
12261
12517
|
*
|
|
12262
12518
|
*/
|
|
12263
12519
|
static register(name = "auro-input") {
|
|
12264
|
-
AuroLibraryRuntimeUtils$
|
|
12520
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroInput);
|
|
12265
12521
|
}
|
|
12266
12522
|
|
|
12267
12523
|
/**
|
|
@@ -12317,10 +12573,10 @@ class AuroInput extends BaseInput {
|
|
|
12317
12573
|
/**
|
|
12318
12574
|
* Returns HTML for the HTML5 input element.
|
|
12319
12575
|
* @private
|
|
12320
|
-
* @param {boolean} [
|
|
12576
|
+
* @param {boolean} [useLegacyHiddenState=false] - If true, the input will be visually hidden when not focused and has no value.
|
|
12321
12577
|
* @returns {html} - Returns HTML for the HTML5 input element.
|
|
12322
12578
|
*/
|
|
12323
|
-
renderHtmlInput(
|
|
12579
|
+
renderHtmlInput(useLegacyHiddenState = false) {
|
|
12324
12580
|
const displayValueClasses = {
|
|
12325
12581
|
'displayValue': true,
|
|
12326
12582
|
'hasContent': this.hasDisplayValueContent,
|
|
@@ -12328,9 +12584,10 @@ class AuroInput extends BaseInput {
|
|
|
12328
12584
|
'withValue': this.value && this.value.length > 0,
|
|
12329
12585
|
};
|
|
12330
12586
|
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12587
|
+
// Remove this when the classic layout is sunset.
|
|
12588
|
+
const inputOverrideClasses = useLegacyHiddenState
|
|
12589
|
+
? this.legacyInputClasses
|
|
12590
|
+
: this.commonInputClasses;
|
|
12334
12591
|
|
|
12335
12592
|
return u$2`
|
|
12336
12593
|
<label for=${this.id} class="${e(this.commonLabelClasses)}" part="label">
|
|
@@ -12352,7 +12609,7 @@ class AuroInput extends BaseInput {
|
|
|
12352
12609
|
autocapitalize="${o(this.autocapitalize ? this.autocapitalize : undefined)}"
|
|
12353
12610
|
autocomplete="${o(this.autocomplete ? this.autocomplete : undefined)}"
|
|
12354
12611
|
autocorrect="${o(this.autocorrect ? this.autocorrect : undefined)}"
|
|
12355
|
-
class="${e(
|
|
12612
|
+
class="${e(inputOverrideClasses)}"
|
|
12356
12613
|
id="${this.inputId}"
|
|
12357
12614
|
inputMode="${o(this.inputMode ? this.inputMode : undefined)}"
|
|
12358
12615
|
lang="${o(this.lang)}"
|
|
@@ -12496,9 +12753,9 @@ class AuroInput extends BaseInput {
|
|
|
12496
12753
|
}
|
|
12497
12754
|
|
|
12498
12755
|
/**
|
|
12499
|
-
* Returns HTML for the
|
|
12756
|
+
* Returns HTML for the classic layout.
|
|
12500
12757
|
* @private
|
|
12501
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
12758
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
12502
12759
|
*/
|
|
12503
12760
|
renderLayoutClassic() {
|
|
12504
12761
|
return u$2`
|
|
@@ -12638,7 +12895,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
12638
12895
|
|
|
12639
12896
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12640
12897
|
|
|
12641
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
12898
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
12642
12899
|
|
|
12643
12900
|
/* eslint-disable jsdoc/require-param */
|
|
12644
12901
|
|
|
@@ -12895,26 +13152,96 @@ var tokensCss$3 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
12895
13152
|
|
|
12896
13153
|
var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
12897
13154
|
|
|
12898
|
-
// Copyright (c)
|
|
13155
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12899
13156
|
// See LICENSE in the project root for license information.
|
|
12900
13157
|
|
|
13158
|
+
// ---------------------------------------------------------------------
|
|
13159
|
+
|
|
13160
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12901
13161
|
|
|
12902
|
-
let
|
|
12903
|
-
constructor() {
|
|
12904
|
-
super();
|
|
13162
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
12905
13163
|
|
|
12906
|
-
|
|
12907
|
-
this.privateDefaults();
|
|
12908
|
-
}
|
|
13164
|
+
/* eslint-disable jsdoc/require-param */
|
|
12909
13165
|
|
|
12910
13166
|
/**
|
|
12911
|
-
*
|
|
12912
|
-
* @
|
|
13167
|
+
* This will register a new custom element with the browser.
|
|
13168
|
+
* @param {String} name - The name of the custom element.
|
|
13169
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
12913
13170
|
* @returns {void}
|
|
12914
13171
|
*/
|
|
12915
|
-
|
|
13172
|
+
registerComponent(name, componentClass) {
|
|
13173
|
+
if (!customElements.get(name)) {
|
|
13174
|
+
customElements.define(name, class extends componentClass {});
|
|
13175
|
+
}
|
|
13176
|
+
}
|
|
13177
|
+
|
|
13178
|
+
/**
|
|
13179
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13180
|
+
* @returns {void}
|
|
13181
|
+
*/
|
|
13182
|
+
closestElement(
|
|
13183
|
+
selector, // selector like in .closest()
|
|
13184
|
+
base = this, // extra functionality to skip a parent
|
|
13185
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13186
|
+
!el || el === document || el === window
|
|
13187
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13188
|
+
: found
|
|
13189
|
+
? found // found a selector INside this element
|
|
13190
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13191
|
+
) {
|
|
13192
|
+
return __Closest(base);
|
|
13193
|
+
}
|
|
13194
|
+
/* eslint-enable jsdoc/require-param */
|
|
13195
|
+
|
|
13196
|
+
/**
|
|
13197
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
13198
|
+
* @param {Object} elem - The element to check.
|
|
13199
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13200
|
+
* @returns {void}
|
|
13201
|
+
*/
|
|
13202
|
+
handleComponentTagRename(elem, tagName) {
|
|
13203
|
+
const tag = tagName.toLowerCase();
|
|
13204
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13205
|
+
|
|
13206
|
+
if (elemTag !== tag) {
|
|
13207
|
+
elem.setAttribute(tag, true);
|
|
13208
|
+
}
|
|
13209
|
+
}
|
|
13210
|
+
|
|
13211
|
+
/**
|
|
13212
|
+
* Validates if an element is a specific Auro component.
|
|
13213
|
+
* @param {Object} elem - The element to validate.
|
|
13214
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13215
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13216
|
+
*/
|
|
13217
|
+
elementMatch(elem, tagName) {
|
|
13218
|
+
const tag = tagName.toLowerCase();
|
|
13219
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13220
|
+
|
|
13221
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13222
|
+
}
|
|
13223
|
+
};
|
|
13224
|
+
|
|
13225
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13226
|
+
// See LICENSE in the project root for license information.
|
|
13227
|
+
|
|
13228
|
+
|
|
13229
|
+
let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
13230
|
+
constructor() {
|
|
13231
|
+
super();
|
|
13232
|
+
|
|
13233
|
+
this.variant = undefined;
|
|
13234
|
+
this.privateDefaults();
|
|
13235
|
+
}
|
|
13236
|
+
|
|
13237
|
+
/**
|
|
13238
|
+
* Internal Defaults.
|
|
13239
|
+
* @private
|
|
13240
|
+
* @returns {void}
|
|
13241
|
+
*/
|
|
13242
|
+
privateDefaults() {
|
|
12916
13243
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
12917
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13244
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
12918
13245
|
}
|
|
12919
13246
|
|
|
12920
13247
|
// function to define props used within the scope of this component
|
|
@@ -12996,7 +13323,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
12996
13323
|
*
|
|
12997
13324
|
*/
|
|
12998
13325
|
static register(name = "auro-icon") {
|
|
12999
|
-
AuroLibraryRuntimeUtils$
|
|
13326
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
13000
13327
|
}
|
|
13001
13328
|
|
|
13002
13329
|
connectedCallback() {
|
|
@@ -13093,7 +13420,7 @@ class AuroHeader extends i$2 {
|
|
|
13093
13420
|
/**
|
|
13094
13421
|
* @private
|
|
13095
13422
|
*/
|
|
13096
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
13423
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
13097
13424
|
}
|
|
13098
13425
|
|
|
13099
13426
|
// function to define props used within the scope of this component
|
|
@@ -13123,7 +13450,7 @@ class AuroHeader extends i$2 {
|
|
|
13123
13450
|
*
|
|
13124
13451
|
*/
|
|
13125
13452
|
static register(name = "auro-header") {
|
|
13126
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
13453
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
13127
13454
|
}
|
|
13128
13455
|
|
|
13129
13456
|
firstUpdated() {
|
|
@@ -13219,7 +13546,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13219
13546
|
|
|
13220
13547
|
this.large = false;
|
|
13221
13548
|
|
|
13222
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13549
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13223
13550
|
|
|
13224
13551
|
const versioning = new AuroDependencyVersioning();
|
|
13225
13552
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -13258,7 +13585,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13258
13585
|
*
|
|
13259
13586
|
*/
|
|
13260
13587
|
static register(name = "auro-bibtemplate") {
|
|
13261
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13588
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
13262
13589
|
}
|
|
13263
13590
|
|
|
13264
13591
|
/**
|
|
@@ -13298,6 +13625,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
13298
13625
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
13299
13626
|
}
|
|
13300
13627
|
|
|
13628
|
+
firstUpdated(changedProperties) {
|
|
13629
|
+
super.firstUpdated(changedProperties);
|
|
13630
|
+
|
|
13631
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
13632
|
+
bubbles: true,
|
|
13633
|
+
composed: true,
|
|
13634
|
+
detail: {
|
|
13635
|
+
element: this
|
|
13636
|
+
}
|
|
13637
|
+
}));
|
|
13638
|
+
}
|
|
13639
|
+
|
|
13301
13640
|
// function that renders the HTML and CSS into the scope of the component
|
|
13302
13641
|
render() {
|
|
13303
13642
|
return u$2`
|
|
@@ -13330,123 +13669,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13330
13669
|
|
|
13331
13670
|
var bibTemplateVersion = '1.0.0';
|
|
13332
13671
|
|
|
13333
|
-
i$5
|
|
13334
|
-
|
|
13335
|
-
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)}`;
|
|
13336
|
-
|
|
13337
|
-
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)}`;
|
|
13338
|
-
|
|
13339
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13340
|
-
// See LICENSE in the project root for license information.
|
|
13341
|
-
|
|
13342
|
-
// ---------------------------------------------------------------------
|
|
13343
|
-
|
|
13344
|
-
/**
|
|
13345
|
-
* Converts value to an array.
|
|
13346
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
13347
|
-
* If the value is already an array, it is returned.
|
|
13348
|
-
* If the value is undefined, it returns undefined.
|
|
13349
|
-
* @private
|
|
13350
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
13351
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
13352
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
13353
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
13354
|
-
*/
|
|
13355
|
-
function arrayConverter$1(value) {
|
|
13356
|
-
// Allow undefined
|
|
13357
|
-
if (value === undefined) {
|
|
13358
|
-
return undefined;
|
|
13359
|
-
}
|
|
13360
|
-
|
|
13361
|
-
// Return the value if it is already an array
|
|
13362
|
-
if (Array.isArray(value)) {
|
|
13363
|
-
return value;
|
|
13364
|
-
}
|
|
13365
|
-
|
|
13366
|
-
try {
|
|
13367
|
-
// If value is a JSON string, parse it
|
|
13368
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
13369
|
-
|
|
13370
|
-
// Check if the parsed value is an array
|
|
13371
|
-
if (Array.isArray(parsed)) {
|
|
13372
|
-
return parsed;
|
|
13373
|
-
}
|
|
13374
|
-
} catch (error) {
|
|
13375
|
-
// If JSON parsing fails, continue to throw an error below
|
|
13376
|
-
/* eslint-disable no-console */
|
|
13377
|
-
console.error('JSON parsing failed:', error);
|
|
13378
|
-
}
|
|
13379
|
-
|
|
13380
|
-
// Throw error if the input is not an array or undefined
|
|
13381
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
13382
|
-
}
|
|
13383
|
-
|
|
13384
|
-
/**
|
|
13385
|
-
* Compare two arrays for equality.
|
|
13386
|
-
* @private
|
|
13387
|
-
* @param {Array} arr1 - First array to compare.
|
|
13388
|
-
* @param {Array} arr2 - Second array to compare.
|
|
13389
|
-
* @returns {boolean} True if arrays are equal.
|
|
13390
|
-
*/
|
|
13391
|
-
function arraysAreEqual$1(arr1, arr2) {
|
|
13392
|
-
// If both arrays undefined, they are equal (true)
|
|
13393
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
13394
|
-
return arr1 === arr2;
|
|
13395
|
-
}
|
|
13396
|
-
|
|
13397
|
-
// If arrays have different lengths, they are not equal
|
|
13398
|
-
if (arr1.length !== arr2.length) {
|
|
13399
|
-
return false;
|
|
13400
|
-
}
|
|
13401
|
-
|
|
13402
|
-
// If every item at each index is the same, return true
|
|
13403
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
13404
|
-
if (arr1[index] !== arr2[index]) {
|
|
13405
|
-
return false;
|
|
13406
|
-
}
|
|
13407
|
-
}
|
|
13408
|
-
return true;
|
|
13409
|
-
}
|
|
13410
|
-
|
|
13411
|
-
/**
|
|
13412
|
-
* Compares array for changes.
|
|
13413
|
-
* @private
|
|
13414
|
-
* @param {Array|any} newVal - New value to compare.
|
|
13415
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
13416
|
-
* @returns {boolean} True if arrays have changed.
|
|
13417
|
-
*/
|
|
13418
|
-
function arrayOrUndefinedHasChanged$1(newVal, oldVal) {
|
|
13419
|
-
try {
|
|
13420
|
-
// Check if values are undefined or arrays
|
|
13421
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
13422
|
-
|
|
13423
|
-
// If non-array or non-undefined, throw error
|
|
13424
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
13425
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
13426
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
13427
|
-
}
|
|
13428
|
-
|
|
13429
|
-
// Return true if arrays have changed, false if they are the same
|
|
13430
|
-
return !arraysAreEqual$1(newVal, oldVal);
|
|
13431
|
-
} catch (error) {
|
|
13432
|
-
/* eslint-disable no-console */
|
|
13433
|
-
console.error(error);
|
|
13434
|
-
// If validation fails, it has changed
|
|
13435
|
-
return true;
|
|
13436
|
-
}
|
|
13437
|
-
}
|
|
13438
|
-
|
|
13439
|
-
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}`;
|
|
13440
|
-
|
|
13441
|
-
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)}`;
|
|
13442
|
-
|
|
13443
|
-
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}`;
|
|
13444
|
-
|
|
13445
|
-
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)}`;
|
|
13446
|
-
|
|
13447
|
-
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)}`;
|
|
13448
|
-
|
|
13449
|
-
var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block}:host([layout*=classic]) [auro-input]{min-height:var(--ds-size-700, 3.5rem);max-height:var(--ds-size-700, 3.5rem)}:host([layout*=classic]) [auro-input]::part(iconContainer){top:0;display:flex;height:100%;align-items:center}:host([layout*=classic]) [auro-input]::part(accentIcon){transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1)}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) [auro-input]::part(wrapper){--ds-auro-input-border-color: transparent;--ds-auro-input-container-color: transparent}:host([layout*=classic]) [auro-input]::part(wrapper):focus-within{border-bottom-width:0 !important;box-shadow:unset !important;outline:unset !important}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13672
|
+
var styleCss$4 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13450
13673
|
|
|
13451
13674
|
var styleEmphasizedCss = i$5`:host([layout*=emphasized][shape*=pill]) [auro-input]{width:100%}:host([layout*=emphasized][shape*=pill]) [auro-input]::part(inputHelpText){display:none}`;
|
|
13452
13675
|
|
|
@@ -13557,7 +13780,7 @@ var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
13557
13780
|
|
|
13558
13781
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13559
13782
|
|
|
13560
|
-
class AuroLibraryRuntimeUtils {
|
|
13783
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
13561
13784
|
|
|
13562
13785
|
/* eslint-disable jsdoc/require-param */
|
|
13563
13786
|
|
|
@@ -13618,7 +13841,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
13618
13841
|
|
|
13619
13842
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
13620
13843
|
}
|
|
13621
|
-
}
|
|
13844
|
+
};
|
|
13622
13845
|
|
|
13623
13846
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13624
13847
|
// See LICENSE in the project root for license information.
|
|
@@ -13638,7 +13861,7 @@ class AuroHelpText extends i$2 {
|
|
|
13638
13861
|
this.onDark = false;
|
|
13639
13862
|
this.hasTextContent = false;
|
|
13640
13863
|
|
|
13641
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13864
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
13642
13865
|
}
|
|
13643
13866
|
|
|
13644
13867
|
static get styles() {
|
|
@@ -13694,7 +13917,7 @@ class AuroHelpText extends i$2 {
|
|
|
13694
13917
|
*
|
|
13695
13918
|
*/
|
|
13696
13919
|
static register(name = "auro-helptext") {
|
|
13697
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
13920
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
13698
13921
|
}
|
|
13699
13922
|
|
|
13700
13923
|
updated() {
|
|
@@ -13770,6 +13993,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13770
13993
|
constructor() {
|
|
13771
13994
|
super();
|
|
13772
13995
|
|
|
13996
|
+
this.matchWidth = true;
|
|
13997
|
+
|
|
13773
13998
|
this.privateDefaults();
|
|
13774
13999
|
}
|
|
13775
14000
|
|
|
@@ -13802,7 +14027,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13802
14027
|
|
|
13803
14028
|
this.validation = new AuroFormValidation$1();
|
|
13804
14029
|
|
|
13805
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
14030
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
13806
14031
|
|
|
13807
14032
|
this.isHiddenWhileLoading = false;
|
|
13808
14033
|
|
|
@@ -13811,7 +14036,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13811
14036
|
|
|
13812
14037
|
// Layout Config
|
|
13813
14038
|
this.layout = 'classic';
|
|
13814
|
-
this.shape = '
|
|
14039
|
+
this.shape = 'classic';
|
|
13815
14040
|
this.size = 'xl';
|
|
13816
14041
|
|
|
13817
14042
|
// floaterConfig
|
|
@@ -13903,6 +14128,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13903
14128
|
reflect: true
|
|
13904
14129
|
},
|
|
13905
14130
|
|
|
14131
|
+
/**
|
|
14132
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
14133
|
+
*/
|
|
14134
|
+
matchWidth: {
|
|
14135
|
+
type: Boolean,
|
|
14136
|
+
reflect: true
|
|
14137
|
+
},
|
|
14138
|
+
|
|
13906
14139
|
/**
|
|
13907
14140
|
* If set, combobox will not filter menuoptions based in input.
|
|
13908
14141
|
*/
|
|
@@ -13948,11 +14181,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
13948
14181
|
|
|
13949
14182
|
/**
|
|
13950
14183
|
* Specifies the current selected option.
|
|
14184
|
+
* @type {HTMLElement}
|
|
13951
14185
|
*/
|
|
13952
14186
|
optionSelected: {
|
|
13953
|
-
type: Object
|
|
13954
|
-
converter: arrayConverter$1,
|
|
13955
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14187
|
+
type: Object
|
|
13956
14188
|
},
|
|
13957
14189
|
|
|
13958
14190
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14034,11 +14266,10 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14034
14266
|
|
|
14035
14267
|
/**
|
|
14036
14268
|
* Value selected for the dropdown menu.
|
|
14037
|
-
* @type {
|
|
14269
|
+
* @type {string}
|
|
14038
14270
|
*/
|
|
14039
14271
|
value: {
|
|
14040
|
-
|
|
14041
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
14272
|
+
type: Object
|
|
14042
14273
|
},
|
|
14043
14274
|
|
|
14044
14275
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
|
@@ -14104,7 +14335,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14104
14335
|
*
|
|
14105
14336
|
*/
|
|
14106
14337
|
static register(name = 'auro-combobox') {
|
|
14107
|
-
AuroLibraryRuntimeUtils$
|
|
14338
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCombobox);
|
|
14108
14339
|
}
|
|
14109
14340
|
|
|
14110
14341
|
/**
|
|
@@ -14126,17 +14357,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14126
14357
|
|
|
14127
14358
|
if (this.menu.optionSelected) {
|
|
14128
14359
|
// Get first option since combobox is single-select
|
|
14129
|
-
const
|
|
14360
|
+
const selected = this.menu.optionSelected;
|
|
14130
14361
|
|
|
14131
|
-
if (!this.optionSelected || this.optionSelected
|
|
14132
|
-
|
|
14133
|
-
this.optionSelected = [selected];
|
|
14362
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14363
|
+
this.optionSelected = selected;
|
|
14134
14364
|
}
|
|
14135
14365
|
|
|
14136
|
-
if (!this.value || this.value
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
// Menu already expects array
|
|
14366
|
+
if (!this.value || this.value !== selected.value) {
|
|
14367
|
+
this.value = selected.value;
|
|
14368
|
+
|
|
14140
14369
|
this.menu.value = this.value;
|
|
14141
14370
|
}
|
|
14142
14371
|
|
|
@@ -14263,15 +14492,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14263
14492
|
this.showBib();
|
|
14264
14493
|
});
|
|
14265
14494
|
|
|
14266
|
-
// this.dropdown.addEventListener('auroDropdown-show', () => {
|
|
14267
|
-
this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
|
|
14268
|
-
if (this.menu) {
|
|
14269
|
-
this.menuWrapper.append(this.menu);
|
|
14270
|
-
}
|
|
14271
|
-
|
|
14272
14495
|
// setting up bibtemplate
|
|
14273
14496
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
14274
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
14275
14497
|
|
|
14276
14498
|
// Exposes the CSS parts from the bibtemplate for styling
|
|
14277
14499
|
this.bibtemplate.exposeCssParts();
|
|
@@ -14296,10 +14518,9 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14296
14518
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
14297
14519
|
|
|
14298
14520
|
// a racing condition on custom-combobox with custom-menu
|
|
14299
|
-
if (!this.menu) {
|
|
14521
|
+
if (!this.menu || this.menuShadowRoot === null) {
|
|
14300
14522
|
setTimeout(() => {
|
|
14301
14523
|
this.configureMenu();
|
|
14302
|
-
this.menuWrapper.append(this.menu);
|
|
14303
14524
|
}, 0);
|
|
14304
14525
|
return;
|
|
14305
14526
|
}
|
|
@@ -14316,14 +14537,14 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14316
14537
|
// handle the menu event for an option selection
|
|
14317
14538
|
this.menu.addEventListener('auroMenu-selectedOption', () => {
|
|
14318
14539
|
if (this.menu.optionSelected) {
|
|
14319
|
-
const
|
|
14540
|
+
const selected = this.menu.optionSelected;
|
|
14320
14541
|
|
|
14321
|
-
if (!this.optionSelected || this.optionSelected
|
|
14322
|
-
this.optionSelected =
|
|
14542
|
+
if (!this.optionSelected || this.optionSelected !== selected) {
|
|
14543
|
+
this.optionSelected = selected;
|
|
14323
14544
|
}
|
|
14324
14545
|
|
|
14325
|
-
if (!this.value || this.value
|
|
14326
|
-
this.value =
|
|
14546
|
+
if (!this.value || this.value !== this.optionSelected.value) {
|
|
14547
|
+
this.value = this.optionSelected.value;
|
|
14327
14548
|
this.menu.value = this.value;
|
|
14328
14549
|
}
|
|
14329
14550
|
|
|
@@ -14374,41 +14595,12 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14374
14595
|
});
|
|
14375
14596
|
}
|
|
14376
14597
|
|
|
14377
|
-
/**
|
|
14378
|
-
* Dispatches input's keyboard events from host
|
|
14379
|
-
* This allows key events from the input to be handled by the parent.
|
|
14380
|
-
* @private
|
|
14381
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
14382
|
-
*/
|
|
14383
|
-
bubbleUpInputEvent(event) {
|
|
14384
|
-
// Do not need to bubble events if the input is not in bib.
|
|
14385
|
-
if (event.currentTarget.parentNode !== this.dropdown) {
|
|
14386
|
-
// prevents browsers to move cursor in input element.
|
|
14387
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
14388
|
-
event.preventDefault();
|
|
14389
|
-
}
|
|
14390
|
-
const dupEvent = new event.constructor(event.type, event);
|
|
14391
|
-
this.dispatchEvent(dupEvent);
|
|
14392
|
-
}
|
|
14393
|
-
}
|
|
14394
|
-
|
|
14395
14598
|
/**
|
|
14396
14599
|
* Binds all behavior needed to the input after rendering.
|
|
14397
14600
|
* @private
|
|
14398
14601
|
* @returns {void}
|
|
14399
14602
|
*/
|
|
14400
14603
|
configureInput() {
|
|
14401
|
-
// When input is in bibtemplate, make the event to be fired at combobox element
|
|
14402
|
-
this.bubbleUpInputEvent = this.bubbleUpInputEvent.bind(this);
|
|
14403
|
-
|
|
14404
|
-
const events = [
|
|
14405
|
-
'input',
|
|
14406
|
-
'keydown',
|
|
14407
|
-
'keyup'
|
|
14408
|
-
];
|
|
14409
|
-
events.forEach((eventType) => {
|
|
14410
|
-
this.input.addEventListener(eventType, this.bubbleUpInputEvent);
|
|
14411
|
-
});
|
|
14412
14604
|
|
|
14413
14605
|
this.addEventListener('keyup', (evt) => {
|
|
14414
14606
|
if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
|
|
@@ -14425,11 +14617,6 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14425
14617
|
if (document.activeElement !== this) {
|
|
14426
14618
|
this.validate();
|
|
14427
14619
|
}
|
|
14428
|
-
|
|
14429
|
-
// Set to undefined if empty
|
|
14430
|
-
if (this.value && this.value.length === 0) {
|
|
14431
|
-
this.value = undefined;
|
|
14432
|
-
}
|
|
14433
14620
|
});
|
|
14434
14621
|
|
|
14435
14622
|
// Handle validation messages from auroFormElement-validated event
|
|
@@ -14476,6 +14663,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14476
14663
|
const inputAlertIcon = this.input.shadowRoot.querySelector(".alertNotification");
|
|
14477
14664
|
|
|
14478
14665
|
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
14666
|
+
|
|
14479
14667
|
if (this.input.parentNode === this.dropdown) {
|
|
14480
14668
|
// keep the trigger size the same even after input gets removed
|
|
14481
14669
|
const parentSize = window.getComputedStyle(this.dropdown.trigger);
|
|
@@ -14493,7 +14681,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14493
14681
|
inputAlertIcon.style.display = 'none';
|
|
14494
14682
|
}
|
|
14495
14683
|
|
|
14496
|
-
this.bibtemplate.
|
|
14684
|
+
this.bibtemplate.prepend(this.input);
|
|
14497
14685
|
this.input.focus();
|
|
14498
14686
|
}
|
|
14499
14687
|
} else if (this.input.parentNode !== this.dropdown) {
|
|
@@ -14507,7 +14695,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14507
14695
|
inputAlertIcon.style.display = '';
|
|
14508
14696
|
}
|
|
14509
14697
|
|
|
14510
|
-
this.dropdown.
|
|
14698
|
+
this.dropdown.prepend(this.input);
|
|
14511
14699
|
this.input.focus();
|
|
14512
14700
|
}
|
|
14513
14701
|
}
|
|
@@ -14523,10 +14711,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14523
14711
|
|
|
14524
14712
|
let hasChange = false;
|
|
14525
14713
|
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
// Menu expects an array
|
|
14529
|
-
this.menu.value = this.input.value ? [this.input.value] : undefined;
|
|
14714
|
+
if (!this.value || this.value !== this.input.value) {
|
|
14715
|
+
this.menu.value = this.input.value;
|
|
14530
14716
|
this.value = this.menu.value;
|
|
14531
14717
|
hasChange = true;
|
|
14532
14718
|
this.dispatchEvent(new CustomEvent('auroCombobox-valueSet', {
|
|
@@ -14536,7 +14722,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14536
14722
|
}));
|
|
14537
14723
|
}
|
|
14538
14724
|
|
|
14539
|
-
if (this.optionSelected && this.
|
|
14725
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
14540
14726
|
this.optionSelected = undefined;
|
|
14541
14727
|
hasChange = true;
|
|
14542
14728
|
}
|
|
@@ -14679,15 +14865,15 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14679
14865
|
// After the component is ready, send direct value changes to auro-menu.
|
|
14680
14866
|
if (changedProperties.has('value')) {
|
|
14681
14867
|
if (this.value) {
|
|
14682
|
-
if (this.optionSelected && this.optionSelected
|
|
14868
|
+
if (this.optionSelected && this.optionSelected.value === this.value) {
|
|
14683
14869
|
// If value updates and the previously selected option already matches the new value
|
|
14684
14870
|
// just update the input value to use the textContent of the optionSelected
|
|
14685
|
-
this.input.value = this.optionSelected
|
|
14871
|
+
this.input.value = this.optionSelected.textContent;
|
|
14686
14872
|
} else {
|
|
14687
14873
|
// Otherwise just enter the value into the input
|
|
14688
14874
|
this.optionSelected = undefined;
|
|
14689
|
-
|
|
14690
|
-
const
|
|
14875
|
+
|
|
14876
|
+
const inputValue = this.value;
|
|
14691
14877
|
this.input.value = inputValue;
|
|
14692
14878
|
|
|
14693
14879
|
// Update the menu value and matchWord
|
|
@@ -14801,7 +14987,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14801
14987
|
fluid
|
|
14802
14988
|
for="dropdownMenu"
|
|
14803
14989
|
layout="${this.layout}"
|
|
14804
|
-
matchWidth
|
|
14990
|
+
matchWidth="${o(this.matchWidth)}"
|
|
14805
14991
|
nocheckmark
|
|
14806
14992
|
rounded
|
|
14807
14993
|
shape="${this.shape}"
|
|
@@ -14830,9 +15016,8 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14830
15016
|
slot="trigger">
|
|
14831
15017
|
</${this.inputTag}>
|
|
14832
15018
|
|
|
14833
|
-
<div class="menuWrapper"></div>
|
|
14834
|
-
|
|
14835
15019
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
15020
|
+
<slot></slot>
|
|
14836
15021
|
</${this.bibtemplateTag}>
|
|
14837
15022
|
|
|
14838
15023
|
<span slot="helpText">
|
|
@@ -14868,102 +15053,6 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
|
|
|
14868
15053
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14869
15054
|
// See LICENSE in the project root for license information.
|
|
14870
15055
|
|
|
14871
|
-
// ---------------------------------------------------------------------
|
|
14872
|
-
|
|
14873
|
-
/**
|
|
14874
|
-
* Converts value to an array.
|
|
14875
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
14876
|
-
* If the value is already an array, it is returned.
|
|
14877
|
-
* If the value is undefined, it returns undefined.
|
|
14878
|
-
* @private
|
|
14879
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
14880
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
14881
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
14882
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
14883
|
-
*/
|
|
14884
|
-
function arrayConverter(value) {
|
|
14885
|
-
// Allow undefined
|
|
14886
|
-
if (value === undefined) {
|
|
14887
|
-
return undefined;
|
|
14888
|
-
}
|
|
14889
|
-
|
|
14890
|
-
// Return the value if it is already an array
|
|
14891
|
-
if (Array.isArray(value)) {
|
|
14892
|
-
return value;
|
|
14893
|
-
}
|
|
14894
|
-
|
|
14895
|
-
try {
|
|
14896
|
-
// If value is a JSON string, parse it
|
|
14897
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
14898
|
-
|
|
14899
|
-
// Check if the parsed value is an array
|
|
14900
|
-
if (Array.isArray(parsed)) {
|
|
14901
|
-
return parsed;
|
|
14902
|
-
}
|
|
14903
|
-
} catch (error) {
|
|
14904
|
-
// If JSON parsing fails, continue to throw an error below
|
|
14905
|
-
/* eslint-disable no-console */
|
|
14906
|
-
console.error('JSON parsing failed:', error);
|
|
14907
|
-
}
|
|
14908
|
-
|
|
14909
|
-
// Throw error if the input is not an array or undefined
|
|
14910
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
14911
|
-
}
|
|
14912
|
-
|
|
14913
|
-
/**
|
|
14914
|
-
* Compare two arrays for equality.
|
|
14915
|
-
* @private
|
|
14916
|
-
* @param {Array} arr1 - First array to compare.
|
|
14917
|
-
* @param {Array} arr2 - Second array to compare.
|
|
14918
|
-
* @returns {boolean} True if arrays are equal.
|
|
14919
|
-
*/
|
|
14920
|
-
function arraysAreEqual(arr1, arr2) {
|
|
14921
|
-
// If both arrays undefined, they are equal (true)
|
|
14922
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
14923
|
-
return arr1 === arr2;
|
|
14924
|
-
}
|
|
14925
|
-
|
|
14926
|
-
// If arrays have different lengths, they are not equal
|
|
14927
|
-
if (arr1.length !== arr2.length) {
|
|
14928
|
-
return false;
|
|
14929
|
-
}
|
|
14930
|
-
|
|
14931
|
-
// If every item at each index is the same, return true
|
|
14932
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
14933
|
-
if (arr1[index] !== arr2[index]) {
|
|
14934
|
-
return false;
|
|
14935
|
-
}
|
|
14936
|
-
}
|
|
14937
|
-
return true;
|
|
14938
|
-
}
|
|
14939
|
-
|
|
14940
|
-
/**
|
|
14941
|
-
* Compares array for changes.
|
|
14942
|
-
* @private
|
|
14943
|
-
* @param {Array|any} newVal - New value to compare.
|
|
14944
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
14945
|
-
* @returns {boolean} True if arrays have changed.
|
|
14946
|
-
*/
|
|
14947
|
-
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
14948
|
-
try {
|
|
14949
|
-
// Check if values are undefined or arrays
|
|
14950
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
14951
|
-
|
|
14952
|
-
// If non-array or non-undefined, throw error
|
|
14953
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
14954
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
14955
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
14956
|
-
}
|
|
14957
|
-
|
|
14958
|
-
// Return true if arrays have changed, false if they are the same
|
|
14959
|
-
return !arraysAreEqual(newVal, oldVal);
|
|
14960
|
-
} catch (error) {
|
|
14961
|
-
/* eslint-disable no-console */
|
|
14962
|
-
console.error(error);
|
|
14963
|
-
// If validation fails, it has changed
|
|
14964
|
-
return true;
|
|
14965
|
-
}
|
|
14966
|
-
}
|
|
14967
15056
|
|
|
14968
15057
|
/**
|
|
14969
15058
|
* Validates if an option can be interacted with.
|
|
@@ -14997,7 +15086,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
14997
15086
|
element.dispatchEvent(new CustomEvent(eventName, eventConfig));
|
|
14998
15087
|
}
|
|
14999
15088
|
|
|
15000
|
-
// Copyright (c)
|
|
15089
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15001
15090
|
// See LICENSE in the project root for license information.
|
|
15002
15091
|
|
|
15003
15092
|
|
|
@@ -15005,14 +15094,14 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15005
15094
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
15006
15095
|
/**
|
|
15007
15096
|
* The auro-menu element provides users a way to select from a list of options.
|
|
15008
|
-
* @attr {Array<HTMLElement
|
|
15097
|
+
* @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
|
|
15009
15098
|
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
15010
15099
|
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
15011
15100
|
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
15012
15101
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
15013
15102
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
15014
15103
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
15015
|
-
* @attr {Array<string
|
|
15104
|
+
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
15016
15105
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
15017
15106
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
15018
15107
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -15025,7 +15114,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
15025
15114
|
* @slot - Slot for insertion of menu options.
|
|
15026
15115
|
*/
|
|
15027
15116
|
|
|
15028
|
-
/* eslint-disable no-magic-numbers, max-lines */
|
|
15117
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
15029
15118
|
|
|
15030
15119
|
class AuroMenu extends i$2 {
|
|
15031
15120
|
constructor() {
|
|
@@ -15105,9 +15194,8 @@ class AuroMenu extends i$2 {
|
|
|
15105
15194
|
reflect: true
|
|
15106
15195
|
},
|
|
15107
15196
|
optionSelected: {
|
|
15108
|
-
// Allow HTMLElement[] arrays and undefined
|
|
15109
|
-
|
|
15110
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15197
|
+
// Allow HTMLElement, HTMLElement[] arrays and undefined
|
|
15198
|
+
type: Object
|
|
15111
15199
|
},
|
|
15112
15200
|
optionActive: {
|
|
15113
15201
|
type: Object,
|
|
@@ -15123,10 +15211,8 @@ class AuroMenu extends i$2 {
|
|
|
15123
15211
|
attribute: 'multiselect'
|
|
15124
15212
|
},
|
|
15125
15213
|
value: {
|
|
15126
|
-
// Allow string[] arrays and undefined
|
|
15127
|
-
type: Object
|
|
15128
|
-
converter: arrayConverter,
|
|
15129
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
15214
|
+
// Allow string, string[] arrays and undefined
|
|
15215
|
+
type: Object
|
|
15130
15216
|
}
|
|
15131
15217
|
};
|
|
15132
15218
|
}
|
|
@@ -15148,7 +15234,7 @@ class AuroMenu extends i$2 {
|
|
|
15148
15234
|
*
|
|
15149
15235
|
*/
|
|
15150
15236
|
static register(name = "auro-menu") {
|
|
15151
|
-
AuroLibraryRuntimeUtils$
|
|
15237
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
15152
15238
|
}
|
|
15153
15239
|
|
|
15154
15240
|
// Lifecycle Methods
|
|
@@ -15172,37 +15258,46 @@ class AuroMenu extends i$2 {
|
|
|
15172
15258
|
}
|
|
15173
15259
|
|
|
15174
15260
|
firstUpdated() {
|
|
15175
|
-
AuroLibraryRuntimeUtils$
|
|
15261
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
15176
15262
|
|
|
15177
15263
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
15178
15264
|
this.initializeMenu();
|
|
15179
15265
|
}
|
|
15180
15266
|
|
|
15181
15267
|
updated(changedProperties) {
|
|
15268
|
+
if (changedProperties.has('multiSelect')) {
|
|
15269
|
+
// Reset selection if multiSelect mode changes
|
|
15270
|
+
this.clearSelection();
|
|
15271
|
+
}
|
|
15272
|
+
|
|
15182
15273
|
if (changedProperties.has('value')) {
|
|
15183
15274
|
// Handle null/undefined case
|
|
15184
15275
|
if (this.value === undefined || this.value === null) {
|
|
15185
15276
|
this.optionSelected = undefined;
|
|
15186
|
-
// Reset index tracking
|
|
15187
15277
|
this.index = -1;
|
|
15188
15278
|
} else {
|
|
15189
|
-
|
|
15190
|
-
|
|
15279
|
+
if (this.multiSelect) {
|
|
15280
|
+
// In multiselect mode, this.value should be an array of strings
|
|
15281
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
15282
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
15191
15283
|
|
|
15192
|
-
|
|
15193
|
-
|
|
15284
|
+
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
15285
|
+
} else {
|
|
15286
|
+
// In single-select mode, this.value should be a string
|
|
15287
|
+
const matchingOptions = this.items.find((item) => item.value === this.value);
|
|
15194
15288
|
|
|
15195
|
-
|
|
15196
|
-
if (this.multiSelect) {
|
|
15197
|
-
// For multiselect, keep all matching options
|
|
15289
|
+
if (matchingOptions) {
|
|
15198
15290
|
this.optionSelected = matchingOptions;
|
|
15291
|
+
this.index = this.items.indexOf(matchingOptions);
|
|
15199
15292
|
} else {
|
|
15200
|
-
//
|
|
15201
|
-
this.optionSelected =
|
|
15202
|
-
this.index =
|
|
15293
|
+
// If no matching option found, reset selection
|
|
15294
|
+
this.optionSelected = undefined;
|
|
15295
|
+
this.index = -1;
|
|
15203
15296
|
}
|
|
15204
|
-
}
|
|
15205
|
-
|
|
15297
|
+
}
|
|
15298
|
+
|
|
15299
|
+
// If no matching options were found in either mode
|
|
15300
|
+
if (!this.optionSelected || (Array.isArray(this.optionSelected) && this.optionSelected.length === 0)) {
|
|
15206
15301
|
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
15207
15302
|
this.optionSelected = undefined;
|
|
15208
15303
|
this.index = -1;
|
|
@@ -15354,8 +15449,8 @@ class AuroMenu extends i$2 {
|
|
|
15354
15449
|
}
|
|
15355
15450
|
} else {
|
|
15356
15451
|
// Single select - use arrays with single values
|
|
15357
|
-
this.value =
|
|
15358
|
-
this.optionSelected =
|
|
15452
|
+
this.value = option.value;
|
|
15453
|
+
this.optionSelected = option;
|
|
15359
15454
|
}
|
|
15360
15455
|
|
|
15361
15456
|
this.index = this.items.indexOf(option);
|
|
@@ -15677,8 +15772,13 @@ class AuroMenu extends i$2 {
|
|
|
15677
15772
|
if (!this.optionSelected) {
|
|
15678
15773
|
return false;
|
|
15679
15774
|
}
|
|
15680
|
-
|
|
15681
|
-
|
|
15775
|
+
|
|
15776
|
+
if (this.multiSelect) {
|
|
15777
|
+
// In multi-select mode, check if the option is in the selected array
|
|
15778
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
|
|
15779
|
+
}
|
|
15780
|
+
|
|
15781
|
+
return this.optionSelected === option;
|
|
15682
15782
|
}
|
|
15683
15783
|
|
|
15684
15784
|
/**
|
|
@@ -15867,6 +15967,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
15867
15967
|
|
|
15868
15968
|
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
15869
15969
|
|
|
15970
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
15971
|
+
// See LICENSE in the project root for license information.
|
|
15972
|
+
|
|
15973
|
+
// ---------------------------------------------------------------------
|
|
15974
|
+
|
|
15975
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15976
|
+
|
|
15977
|
+
class AuroLibraryRuntimeUtils {
|
|
15978
|
+
|
|
15979
|
+
/* eslint-disable jsdoc/require-param */
|
|
15980
|
+
|
|
15981
|
+
/**
|
|
15982
|
+
* This will register a new custom element with the browser.
|
|
15983
|
+
* @param {String} name - The name of the custom element.
|
|
15984
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
15985
|
+
* @returns {void}
|
|
15986
|
+
*/
|
|
15987
|
+
registerComponent(name, componentClass) {
|
|
15988
|
+
if (!customElements.get(name)) {
|
|
15989
|
+
customElements.define(name, class extends componentClass {});
|
|
15990
|
+
}
|
|
15991
|
+
}
|
|
15992
|
+
|
|
15993
|
+
/**
|
|
15994
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
15995
|
+
* @returns {void}
|
|
15996
|
+
*/
|
|
15997
|
+
closestElement(
|
|
15998
|
+
selector, // selector like in .closest()
|
|
15999
|
+
base = this, // extra functionality to skip a parent
|
|
16000
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
16001
|
+
!el || el === document || el === window
|
|
16002
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
16003
|
+
: found
|
|
16004
|
+
? found // found a selector INside this element
|
|
16005
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
16006
|
+
) {
|
|
16007
|
+
return __Closest(base);
|
|
16008
|
+
}
|
|
16009
|
+
/* eslint-enable jsdoc/require-param */
|
|
16010
|
+
|
|
16011
|
+
/**
|
|
16012
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
16013
|
+
* @param {Object} elem - The element to check.
|
|
16014
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
16015
|
+
* @returns {void}
|
|
16016
|
+
*/
|
|
16017
|
+
handleComponentTagRename(elem, tagName) {
|
|
16018
|
+
const tag = tagName.toLowerCase();
|
|
16019
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
16020
|
+
|
|
16021
|
+
if (elemTag !== tag) {
|
|
16022
|
+
elem.setAttribute(tag, true);
|
|
16023
|
+
}
|
|
16024
|
+
}
|
|
16025
|
+
|
|
16026
|
+
/**
|
|
16027
|
+
* Validates if an element is a specific Auro component.
|
|
16028
|
+
* @param {Object} elem - The element to validate.
|
|
16029
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
16030
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
16031
|
+
*/
|
|
16032
|
+
elementMatch(elem, tagName) {
|
|
16033
|
+
const tag = tagName.toLowerCase();
|
|
16034
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
16035
|
+
|
|
16036
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
16037
|
+
}
|
|
16038
|
+
}
|
|
16039
|
+
|
|
15870
16040
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
15871
16041
|
// See LICENSE in the project root for license information.
|
|
15872
16042
|
|
|
@@ -15886,7 +16056,7 @@ class AuroIcon extends BaseIcon {
|
|
|
15886
16056
|
*/
|
|
15887
16057
|
privateDefaults() {
|
|
15888
16058
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
15889
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
16059
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
15890
16060
|
}
|
|
15891
16061
|
|
|
15892
16062
|
// function to define props used within the scope of this component
|
|
@@ -15968,7 +16138,7 @@ class AuroIcon extends BaseIcon {
|
|
|
15968
16138
|
*
|
|
15969
16139
|
*/
|
|
15970
16140
|
static register(name = "auro-icon") {
|
|
15971
|
-
AuroLibraryRuntimeUtils
|
|
16141
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
15972
16142
|
}
|
|
15973
16143
|
|
|
15974
16144
|
connectedCallback() {
|
|
@@ -16074,7 +16244,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16074
16244
|
/**
|
|
16075
16245
|
* @private
|
|
16076
16246
|
*/
|
|
16077
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
16247
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
16078
16248
|
}
|
|
16079
16249
|
|
|
16080
16250
|
static get properties() {
|
|
@@ -16118,7 +16288,7 @@ class AuroMenuOption extends i$2 {
|
|
|
16118
16288
|
*
|
|
16119
16289
|
*/
|
|
16120
16290
|
static register(name = "auro-menuoption") {
|
|
16121
|
-
AuroLibraryRuntimeUtils$
|
|
16291
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
16122
16292
|
}
|
|
16123
16293
|
|
|
16124
16294
|
firstUpdated() {
|