@aurodesignsystem/auro-formkit 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -23
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +158 -6
- package/components/bibtemplate/dist/registered.js +158 -6
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -20
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -20
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +2 -2
- package/components/checkbox/dist/index.js +24 -20
- package/components/checkbox/dist/registered.js +24 -20
- package/components/combobox/demo/api.min.js +707 -133
- package/components/combobox/demo/index.min.js +707 -133
- package/components/combobox/dist/auro-combobox.d.ts +0 -8
- package/components/combobox/dist/index.js +627 -123
- package/components/combobox/dist/registered.js +627 -123
- package/components/counter/demo/api.min.js +583 -43
- package/components/counter/demo/index.min.js +583 -43
- package/components/counter/dist/index.js +583 -43
- package/components/counter/dist/registered.js +583 -43
- package/components/datepicker/demo/api.min.js +866 -75
- package/components/datepicker/demo/index.min.js +866 -75
- package/components/datepicker/dist/index.js +866 -75
- package/components/datepicker/dist/registered.js +866 -75
- package/components/dropdown/demo/api.min.js +153 -16
- package/components/dropdown/demo/index.min.js +153 -16
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +153 -16
- package/components/dropdown/dist/registered.js +153 -16
- package/components/input/demo/api.min.js +263 -12
- package/components/input/demo/index.min.js +263 -12
- package/components/input/dist/index.js +263 -12
- package/components/input/dist/registered.js +263 -12
- package/components/menu/demo/api.min.js +76 -6
- package/components/menu/demo/index.min.js +76 -6
- package/components/menu/dist/index.js +76 -6
- package/components/menu/dist/registered.js +76 -6
- 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.min.js +403 -49
- package/components/select/demo/index.min.js +403 -49
- package/components/select/dist/auro-select.d.ts +0 -1
- package/components/select/dist/index.js +325 -41
- package/components/select/dist/registered.js +325 -41
- package/package.json +3 -3
|
@@ -8,7 +8,7 @@ import { repeat } from 'lit/directives/repeat.js';
|
|
|
8
8
|
// See LICENSE in the project root for license information.
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
let AuroDependencyVersioning$
|
|
11
|
+
let AuroDependencyVersioning$4 = class AuroDependencyVersioning {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -51,7 +51,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
51
51
|
|
|
52
52
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
53
53
|
|
|
54
|
-
let AuroLibraryRuntimeUtils$
|
|
54
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
55
55
|
|
|
56
56
|
/* eslint-disable jsdoc/require-param */
|
|
57
57
|
|
|
@@ -170,9 +170,10 @@ let DateFormatter$1 = class DateFormatter {
|
|
|
170
170
|
/**
|
|
171
171
|
* Convert a date object to string format.
|
|
172
172
|
* @param {Object} date - Date to convert to string.
|
|
173
|
-
* @
|
|
173
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
174
|
+
* @returns {String} Returns the date as a string.
|
|
174
175
|
*/
|
|
175
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
176
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
176
177
|
year: "numeric",
|
|
177
178
|
month: "2-digit",
|
|
178
179
|
day: "2-digit",
|
|
@@ -364,7 +365,7 @@ let AuroDateUtilities$1 = class AuroDateUtilities extends AuroDateUtilitiesBase$
|
|
|
364
365
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
365
366
|
|
|
366
367
|
// Get the date string of the date object we created from the string date
|
|
367
|
-
const actualDateStr = dateFormatter$1.getDateAsString(dateObj);
|
|
368
|
+
const actualDateStr = dateFormatter$1.getDateAsString(dateObj, "en-US");
|
|
368
369
|
|
|
369
370
|
// Guard Clause: Generated date matches date string input
|
|
370
371
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -529,7 +530,7 @@ const {
|
|
|
529
530
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
530
531
|
|
|
531
532
|
constructor() {
|
|
532
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
533
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
533
534
|
}
|
|
534
535
|
|
|
535
536
|
/**
|
|
@@ -895,7 +896,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
895
896
|
|
|
896
897
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
897
898
|
|
|
898
|
-
let AuroLibraryRuntimeUtils$
|
|
899
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
899
900
|
|
|
900
901
|
/* eslint-disable jsdoc/require-param */
|
|
901
902
|
|
|
@@ -2490,8 +2491,28 @@ class AuroFloatingUI {
|
|
|
2490
2491
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2491
2492
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2492
2493
|
|
|
2494
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2495
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2496
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2497
|
+
}
|
|
2493
2498
|
const mouseEventGlobalHandler = (event) => {
|
|
2494
|
-
|
|
2499
|
+
const isPressed = event.type === 'mousedown';
|
|
2500
|
+
if (isPressed) {
|
|
2501
|
+
// Clear any pending timeout to prevent race condition
|
|
2502
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2503
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2504
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2505
|
+
}
|
|
2506
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2507
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2508
|
+
}
|
|
2509
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2510
|
+
// Schedule reset and track timeout ID
|
|
2511
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2512
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2513
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2514
|
+
}, 0);
|
|
2515
|
+
}
|
|
2495
2516
|
};
|
|
2496
2517
|
|
|
2497
2518
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2618,6 +2639,7 @@ class AuroFloatingUI {
|
|
|
2618
2639
|
|
|
2619
2640
|
// Compute the position of the bib
|
|
2620
2641
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2642
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2621
2643
|
placement: this.element.floaterConfig?.placement,
|
|
2622
2644
|
middleware: middleware || []
|
|
2623
2645
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2752,8 +2774,9 @@ class AuroFloatingUI {
|
|
|
2752
2774
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2753
2775
|
return;
|
|
2754
2776
|
}
|
|
2755
|
-
|
|
2756
|
-
if
|
|
2777
|
+
|
|
2778
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
2779
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2757
2780
|
return;
|
|
2758
2781
|
}
|
|
2759
2782
|
|
|
@@ -3054,8 +3077,6 @@ class AuroFloatingUI {
|
|
|
3054
3077
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3055
3078
|
}
|
|
3056
3079
|
|
|
3057
|
-
document.body.append(this.element.bib);
|
|
3058
|
-
|
|
3059
3080
|
this.regenerateBibId();
|
|
3060
3081
|
this.handleTriggerTabIndex();
|
|
3061
3082
|
|
|
@@ -3096,7 +3117,7 @@ class AuroFloatingUI {
|
|
|
3096
3117
|
// See LICENSE in the project root for license information.
|
|
3097
3118
|
|
|
3098
3119
|
|
|
3099
|
-
let AuroDependencyVersioning$
|
|
3120
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
3100
3121
|
|
|
3101
3122
|
/**
|
|
3102
3123
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3286,6 +3307,76 @@ var tokensCss$2$1 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3286
3307
|
|
|
3287
3308
|
var colorCss$3$1 = css`: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)}`;
|
|
3288
3309
|
|
|
3310
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3311
|
+
// See LICENSE in the project root for license information.
|
|
3312
|
+
|
|
3313
|
+
// ---------------------------------------------------------------------
|
|
3314
|
+
|
|
3315
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3316
|
+
|
|
3317
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
3318
|
+
|
|
3319
|
+
/* eslint-disable jsdoc/require-param */
|
|
3320
|
+
|
|
3321
|
+
/**
|
|
3322
|
+
* This will register a new custom element with the browser.
|
|
3323
|
+
* @param {String} name - The name of the custom element.
|
|
3324
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3325
|
+
* @returns {void}
|
|
3326
|
+
*/
|
|
3327
|
+
registerComponent(name, componentClass) {
|
|
3328
|
+
if (!customElements.get(name)) {
|
|
3329
|
+
customElements.define(name, class extends componentClass {});
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3335
|
+
* @returns {void}
|
|
3336
|
+
*/
|
|
3337
|
+
closestElement(
|
|
3338
|
+
selector, // selector like in .closest()
|
|
3339
|
+
base = this, // extra functionality to skip a parent
|
|
3340
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3341
|
+
!el || el === document || el === window
|
|
3342
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3343
|
+
: found
|
|
3344
|
+
? found // found a selector INside this element
|
|
3345
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3346
|
+
) {
|
|
3347
|
+
return __Closest(base);
|
|
3348
|
+
}
|
|
3349
|
+
/* eslint-enable jsdoc/require-param */
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* 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.
|
|
3353
|
+
* @param {Object} elem - The element to check.
|
|
3354
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3355
|
+
* @returns {void}
|
|
3356
|
+
*/
|
|
3357
|
+
handleComponentTagRename(elem, tagName) {
|
|
3358
|
+
const tag = tagName.toLowerCase();
|
|
3359
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3360
|
+
|
|
3361
|
+
if (elemTag !== tag) {
|
|
3362
|
+
elem.setAttribute(tag, true);
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
/**
|
|
3367
|
+
* Validates if an element is a specific Auro component.
|
|
3368
|
+
* @param {Object} elem - The element to validate.
|
|
3369
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3370
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3371
|
+
*/
|
|
3372
|
+
elementMatch(elem, tagName) {
|
|
3373
|
+
const tag = tagName.toLowerCase();
|
|
3374
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3375
|
+
|
|
3376
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3377
|
+
}
|
|
3378
|
+
};
|
|
3379
|
+
|
|
3289
3380
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3290
3381
|
// See LICENSE in the project root for license information.
|
|
3291
3382
|
|
|
@@ -3305,7 +3396,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3305
3396
|
*/
|
|
3306
3397
|
privateDefaults() {
|
|
3307
3398
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3308
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$
|
|
3399
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
3309
3400
|
}
|
|
3310
3401
|
|
|
3311
3402
|
// function to define props used within the scope of this component
|
|
@@ -3387,7 +3478,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3387
3478
|
*
|
|
3388
3479
|
*/
|
|
3389
3480
|
static register(name = "auro-icon") {
|
|
3390
|
-
AuroLibraryRuntimeUtils$1$
|
|
3481
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
3391
3482
|
}
|
|
3392
3483
|
|
|
3393
3484
|
connectedCallback() {
|
|
@@ -3455,7 +3546,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3455
3546
|
|
|
3456
3547
|
var iconVersion$2 = '6.1.2';
|
|
3457
3548
|
|
|
3458
|
-
var styleCss$2$2 = css`:host{position:
|
|
3549
|
+
var styleCss$2$2 = css`: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}`;
|
|
3459
3550
|
|
|
3460
3551
|
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3461
3552
|
|
|
@@ -3465,7 +3556,6 @@ var tokensCss$1$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basi
|
|
|
3465
3556
|
// See LICENSE in the project root for license information.
|
|
3466
3557
|
|
|
3467
3558
|
|
|
3468
|
-
|
|
3469
3559
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3470
3560
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3471
3561
|
'xl',
|
|
@@ -3490,7 +3580,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
3490
3580
|
*/
|
|
3491
3581
|
this._mobileBreakpointValue = undefined;
|
|
3492
3582
|
|
|
3493
|
-
AuroLibraryRuntimeUtils$
|
|
3583
|
+
AuroLibraryRuntimeUtils$2$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3494
3584
|
}
|
|
3495
3585
|
|
|
3496
3586
|
static get styles() {
|
|
@@ -3535,6 +3625,13 @@ class AuroDropdownBib extends LitElement {
|
|
|
3535
3625
|
type: Boolean,
|
|
3536
3626
|
reflect: true
|
|
3537
3627
|
},
|
|
3628
|
+
|
|
3629
|
+
/**
|
|
3630
|
+
* A reference to the associated bib template element.
|
|
3631
|
+
*/
|
|
3632
|
+
bibTemplate: {
|
|
3633
|
+
type: Object
|
|
3634
|
+
}
|
|
3538
3635
|
};
|
|
3539
3636
|
}
|
|
3540
3637
|
|
|
@@ -3567,9 +3664,50 @@ class AuroDropdownBib extends LitElement {
|
|
|
3567
3664
|
}
|
|
3568
3665
|
}
|
|
3569
3666
|
});
|
|
3667
|
+
|
|
3668
|
+
if (this.bibTemplate) {
|
|
3669
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3670
|
+
if (this.isFullscreen) {
|
|
3671
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3672
|
+
} else {
|
|
3673
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3570
3676
|
}
|
|
3571
3677
|
}
|
|
3572
3678
|
|
|
3679
|
+
connectedCallback() {
|
|
3680
|
+
super.connectedCallback();
|
|
3681
|
+
|
|
3682
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3683
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3684
|
+
const bibTemplate = event.detail.element;
|
|
3685
|
+
this.bibTemplate = bibTemplate;
|
|
3686
|
+
|
|
3687
|
+
if (bibTemplate) {
|
|
3688
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3689
|
+
if (this.isFullscreen) {
|
|
3690
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3691
|
+
} else {
|
|
3692
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
3695
|
+
});
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
firstUpdated(changedProperties) {
|
|
3699
|
+
super.firstUpdated(changedProperties);
|
|
3700
|
+
|
|
3701
|
+
// Dispatch a custom event when the component is connected
|
|
3702
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3703
|
+
bubbles: true,
|
|
3704
|
+
composed: true,
|
|
3705
|
+
detail: {
|
|
3706
|
+
element: this
|
|
3707
|
+
}
|
|
3708
|
+
}));
|
|
3709
|
+
}
|
|
3710
|
+
|
|
3573
3711
|
// function that renders the HTML and CSS into the scope of the component
|
|
3574
3712
|
render() {
|
|
3575
3713
|
return html`
|
|
@@ -3599,7 +3737,7 @@ var tokensCss$6 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3599
3737
|
|
|
3600
3738
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3601
3739
|
|
|
3602
|
-
let AuroLibraryRuntimeUtils$
|
|
3740
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
3603
3741
|
|
|
3604
3742
|
/* eslint-disable jsdoc/require-param */
|
|
3605
3743
|
|
|
@@ -3680,7 +3818,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3680
3818
|
this.onDark = false;
|
|
3681
3819
|
this.hasTextContent = false;
|
|
3682
3820
|
|
|
3683
|
-
AuroLibraryRuntimeUtils$
|
|
3821
|
+
AuroLibraryRuntimeUtils$6.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3684
3822
|
}
|
|
3685
3823
|
|
|
3686
3824
|
static get styles() {
|
|
@@ -3736,7 +3874,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
3736
3874
|
*
|
|
3737
3875
|
*/
|
|
3738
3876
|
static register(name = "auro-helptext") {
|
|
3739
|
-
AuroLibraryRuntimeUtils$
|
|
3877
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroHelpText);
|
|
3740
3878
|
}
|
|
3741
3879
|
|
|
3742
3880
|
updated() {
|
|
@@ -3879,7 +4017,7 @@ class AuroDropdown extends LitElement {
|
|
|
3879
4017
|
/**
|
|
3880
4018
|
* @private
|
|
3881
4019
|
*/
|
|
3882
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4020
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
3883
4021
|
|
|
3884
4022
|
/**
|
|
3885
4023
|
* @private
|
|
@@ -3889,7 +4027,7 @@ class AuroDropdown extends LitElement {
|
|
|
3889
4027
|
/**
|
|
3890
4028
|
* Generate unique names for dependency components.
|
|
3891
4029
|
*/
|
|
3892
|
-
const versioning = new AuroDependencyVersioning$
|
|
4030
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
3893
4031
|
|
|
3894
4032
|
/**
|
|
3895
4033
|
* @private
|
|
@@ -4208,7 +4346,7 @@ class AuroDropdown extends LitElement {
|
|
|
4208
4346
|
*
|
|
4209
4347
|
*/
|
|
4210
4348
|
static register(name = "auro-dropdown") {
|
|
4211
|
-
AuroLibraryRuntimeUtils$
|
|
4349
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroDropdown);
|
|
4212
4350
|
}
|
|
4213
4351
|
|
|
4214
4352
|
/**
|
|
@@ -4525,8 +4663,7 @@ class AuroDropdown extends LitElement {
|
|
|
4525
4663
|
* @param {Event} event - The event object representing the slot change.
|
|
4526
4664
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4527
4665
|
*/
|
|
4528
|
-
handleDefaultSlot(
|
|
4529
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4666
|
+
handleDefaultSlot() {
|
|
4530
4667
|
|
|
4531
4668
|
if (this.onSlotChange) {
|
|
4532
4669
|
this.onSlotChange();
|
|
@@ -4598,9 +4735,7 @@ class AuroDropdown extends LitElement {
|
|
|
4598
4735
|
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
4599
4736
|
<slot name="helpText"></slot>
|
|
4600
4737
|
</${this.helpTextTag}>
|
|
4601
|
-
|
|
4602
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4603
|
-
</div>
|
|
4738
|
+
|
|
4604
4739
|
<div id="bibSizer" part="size"></div>
|
|
4605
4740
|
<${this.dropdownBibTag}
|
|
4606
4741
|
id="bib"
|
|
@@ -4610,6 +4745,9 @@ class AuroDropdown extends LitElement {
|
|
|
4610
4745
|
?rounded="${this.common || this.rounded}"
|
|
4611
4746
|
?inset="${this.common || this.inset}"
|
|
4612
4747
|
>
|
|
4748
|
+
<div class="slotContent">
|
|
4749
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4750
|
+
</div>
|
|
4613
4751
|
</${this.dropdownBibTag}>
|
|
4614
4752
|
</div>
|
|
4615
4753
|
`;
|
|
@@ -8643,9 +8781,10 @@ class DateFormatter {
|
|
|
8643
8781
|
/**
|
|
8644
8782
|
* Convert a date object to string format.
|
|
8645
8783
|
* @param {Object} date - Date to convert to string.
|
|
8646
|
-
* @
|
|
8784
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
8785
|
+
* @returns {String} Returns the date as a string.
|
|
8647
8786
|
*/
|
|
8648
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
8787
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
8649
8788
|
year: "numeric",
|
|
8650
8789
|
month: "2-digit",
|
|
8651
8790
|
day: "2-digit",
|
|
@@ -8837,7 +8976,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
8837
8976
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
8838
8977
|
|
|
8839
8978
|
// Get the date string of the date object we created from the string date
|
|
8840
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
8979
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
8841
8980
|
|
|
8842
8981
|
// Guard Clause: Generated date matches date string input
|
|
8843
8982
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -9002,7 +9141,7 @@ const {
|
|
|
9002
9141
|
|
|
9003
9142
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9004
9143
|
|
|
9005
|
-
let AuroLibraryRuntimeUtils$
|
|
9144
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
9006
9145
|
|
|
9007
9146
|
/* eslint-disable jsdoc/require-param */
|
|
9008
9147
|
|
|
@@ -9072,7 +9211,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
9072
9211
|
class AuroFormValidation {
|
|
9073
9212
|
|
|
9074
9213
|
constructor() {
|
|
9075
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9214
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
9076
9215
|
}
|
|
9077
9216
|
|
|
9078
9217
|
/**
|
|
@@ -10644,6 +10783,76 @@ var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
10644
10783
|
|
|
10645
10784
|
var colorCss$3 = css`: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)}`;
|
|
10646
10785
|
|
|
10786
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
10787
|
+
// See LICENSE in the project root for license information.
|
|
10788
|
+
|
|
10789
|
+
// ---------------------------------------------------------------------
|
|
10790
|
+
|
|
10791
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
10792
|
+
|
|
10793
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
10794
|
+
|
|
10795
|
+
/* eslint-disable jsdoc/require-param */
|
|
10796
|
+
|
|
10797
|
+
/**
|
|
10798
|
+
* This will register a new custom element with the browser.
|
|
10799
|
+
* @param {String} name - The name of the custom element.
|
|
10800
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
10801
|
+
* @returns {void}
|
|
10802
|
+
*/
|
|
10803
|
+
registerComponent(name, componentClass) {
|
|
10804
|
+
if (!customElements.get(name)) {
|
|
10805
|
+
customElements.define(name, class extends componentClass {});
|
|
10806
|
+
}
|
|
10807
|
+
}
|
|
10808
|
+
|
|
10809
|
+
/**
|
|
10810
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
10811
|
+
* @returns {void}
|
|
10812
|
+
*/
|
|
10813
|
+
closestElement(
|
|
10814
|
+
selector, // selector like in .closest()
|
|
10815
|
+
base = this, // extra functionality to skip a parent
|
|
10816
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
10817
|
+
!el || el === document || el === window
|
|
10818
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
10819
|
+
: found
|
|
10820
|
+
? found // found a selector INside this element
|
|
10821
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
10822
|
+
) {
|
|
10823
|
+
return __Closest(base);
|
|
10824
|
+
}
|
|
10825
|
+
/* eslint-enable jsdoc/require-param */
|
|
10826
|
+
|
|
10827
|
+
/**
|
|
10828
|
+
* 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.
|
|
10829
|
+
* @param {Object} elem - The element to check.
|
|
10830
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
10831
|
+
* @returns {void}
|
|
10832
|
+
*/
|
|
10833
|
+
handleComponentTagRename(elem, tagName) {
|
|
10834
|
+
const tag = tagName.toLowerCase();
|
|
10835
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
10836
|
+
|
|
10837
|
+
if (elemTag !== tag) {
|
|
10838
|
+
elem.setAttribute(tag, true);
|
|
10839
|
+
}
|
|
10840
|
+
}
|
|
10841
|
+
|
|
10842
|
+
/**
|
|
10843
|
+
* Validates if an element is a specific Auro component.
|
|
10844
|
+
* @param {Object} elem - The element to validate.
|
|
10845
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
10846
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
10847
|
+
*/
|
|
10848
|
+
elementMatch(elem, tagName) {
|
|
10849
|
+
const tag = tagName.toLowerCase();
|
|
10850
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
10851
|
+
|
|
10852
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
10853
|
+
}
|
|
10854
|
+
};
|
|
10855
|
+
|
|
10647
10856
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
10648
10857
|
// See LICENSE in the project root for license information.
|
|
10649
10858
|
|
|
@@ -10663,7 +10872,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
10663
10872
|
*/
|
|
10664
10873
|
privateDefaults() {
|
|
10665
10874
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
10666
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10875
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
10667
10876
|
}
|
|
10668
10877
|
|
|
10669
10878
|
// function to define props used within the scope of this component
|
|
@@ -10745,7 +10954,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
10745
10954
|
*
|
|
10746
10955
|
*/
|
|
10747
10956
|
static register(name = "auro-icon") {
|
|
10748
|
-
AuroLibraryRuntimeUtils$
|
|
10957
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
10749
10958
|
}
|
|
10750
10959
|
|
|
10751
10960
|
connectedCallback() {
|
|
@@ -10813,48 +11022,228 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
10813
11022
|
|
|
10814
11023
|
var iconVersion$1 = '8.0.1';
|
|
10815
11024
|
|
|
10816
|
-
|
|
11025
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11026
|
+
// See LICENSE in the project root for license information.
|
|
10817
11027
|
|
|
10818
|
-
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}`;
|
|
10819
11028
|
|
|
10820
|
-
|
|
11029
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
10821
11030
|
|
|
10822
|
-
|
|
11031
|
+
/**
|
|
11032
|
+
* Generates a unique string to be used for child auro element naming.
|
|
11033
|
+
* @private
|
|
11034
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11035
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11036
|
+
* @returns {string} - Unique string to be used for naming.
|
|
11037
|
+
*/
|
|
11038
|
+
generateElementName(baseName, version) {
|
|
11039
|
+
let result = baseName;
|
|
10823
11040
|
|
|
10824
|
-
|
|
11041
|
+
result += '-';
|
|
11042
|
+
result += version.replace(/[.]/g, '_');
|
|
10825
11043
|
|
|
10826
|
-
|
|
11044
|
+
return result;
|
|
11045
|
+
}
|
|
10827
11046
|
|
|
10828
|
-
|
|
10829
|
-
|
|
11047
|
+
/**
|
|
11048
|
+
* Generates a unique string to be used for child auro element naming.
|
|
11049
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11050
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11051
|
+
* @returns {string} - Unique string to be used for naming.
|
|
11052
|
+
*/
|
|
11053
|
+
generateTag(baseName, version, tagClass) {
|
|
11054
|
+
const elementName = this.generateElementName(baseName, version);
|
|
11055
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
10830
11056
|
|
|
11057
|
+
if (!customElements.get(elementName)) {
|
|
11058
|
+
customElements.define(elementName, class extends tagClass {});
|
|
11059
|
+
}
|
|
10831
11060
|
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
11061
|
+
return tag;
|
|
11062
|
+
}
|
|
11063
|
+
};
|
|
10835
11064
|
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
*/
|
|
10839
|
-
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11065
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11066
|
+
// See LICENSE in the project root for license information.
|
|
10840
11067
|
|
|
10841
|
-
|
|
10842
|
-
* @private
|
|
10843
|
-
*/
|
|
10844
|
-
this.mdCount = 3;
|
|
11068
|
+
// ---------------------------------------------------------------------
|
|
10845
11069
|
|
|
10846
|
-
|
|
10847
|
-
* @private
|
|
10848
|
-
*/
|
|
10849
|
-
this.smCount = 2;
|
|
11070
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
10850
11071
|
|
|
10851
|
-
|
|
10852
|
-
* @private
|
|
10853
|
-
*/
|
|
10854
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
11072
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
10855
11073
|
|
|
10856
|
-
|
|
10857
|
-
|
|
11074
|
+
/* eslint-disable jsdoc/require-param */
|
|
11075
|
+
|
|
11076
|
+
/**
|
|
11077
|
+
* This will register a new custom element with the browser.
|
|
11078
|
+
* @param {String} name - The name of the custom element.
|
|
11079
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
11080
|
+
* @returns {void}
|
|
11081
|
+
*/
|
|
11082
|
+
registerComponent(name, componentClass) {
|
|
11083
|
+
if (!customElements.get(name)) {
|
|
11084
|
+
customElements.define(name, class extends componentClass {});
|
|
11085
|
+
}
|
|
11086
|
+
}
|
|
11087
|
+
|
|
11088
|
+
/**
|
|
11089
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
11090
|
+
* @returns {void}
|
|
11091
|
+
*/
|
|
11092
|
+
closestElement(
|
|
11093
|
+
selector, // selector like in .closest()
|
|
11094
|
+
base = this, // extra functionality to skip a parent
|
|
11095
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11096
|
+
!el || el === document || el === window
|
|
11097
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
11098
|
+
: found
|
|
11099
|
+
? found // found a selector INside this element
|
|
11100
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11101
|
+
) {
|
|
11102
|
+
return __Closest(base);
|
|
11103
|
+
}
|
|
11104
|
+
/* eslint-enable jsdoc/require-param */
|
|
11105
|
+
|
|
11106
|
+
/**
|
|
11107
|
+
* 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.
|
|
11108
|
+
* @param {Object} elem - The element to check.
|
|
11109
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11110
|
+
* @returns {void}
|
|
11111
|
+
*/
|
|
11112
|
+
handleComponentTagRename(elem, tagName) {
|
|
11113
|
+
const tag = tagName.toLowerCase();
|
|
11114
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11115
|
+
|
|
11116
|
+
if (elemTag !== tag) {
|
|
11117
|
+
elem.setAttribute(tag, true);
|
|
11118
|
+
}
|
|
11119
|
+
}
|
|
11120
|
+
|
|
11121
|
+
/**
|
|
11122
|
+
* Validates if an element is a specific Auro component.
|
|
11123
|
+
* @param {Object} elem - The element to validate.
|
|
11124
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
11125
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11126
|
+
*/
|
|
11127
|
+
elementMatch(elem, tagName) {
|
|
11128
|
+
const tag = tagName.toLowerCase();
|
|
11129
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11130
|
+
|
|
11131
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
11132
|
+
}
|
|
11133
|
+
};
|
|
11134
|
+
|
|
11135
|
+
var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block;height:var(--ds-size-300, 1.5rem);width:var(--ds-size-300, 1.5rem)}:host([variant=flat]) .auro-button{height:100%;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);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, Book);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible{outline:none}.auro-button:focus-visible:not([variant=flat]){outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=flat]):not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=flat]{height:unset;width:unset;min-height:unset;max-height:unset;min-width:unset;max-width:unset;border:0;border-radius:unset;gap:unset;padding:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{padding:var(--ds-size-100, 0.5rem) var(--ds-size-200, 1rem);font-size:var(--ds-basic-text-body-sm-font-size, 14px);min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:all 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after{border-radius:100px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
11136
|
+
|
|
11137
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}`;
|
|
11138
|
+
|
|
11139
|
+
var tokensCss$2 = css`:host{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}`;
|
|
11140
|
+
|
|
11141
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11142
|
+
// See LICENSE in the project root for license information.
|
|
11143
|
+
|
|
11144
|
+
// ---------------------------------------------------------------------
|
|
11145
|
+
|
|
11146
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11147
|
+
|
|
11148
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
11149
|
+
|
|
11150
|
+
/* eslint-disable jsdoc/require-param */
|
|
11151
|
+
|
|
11152
|
+
/**
|
|
11153
|
+
* This will register a new custom element with the browser.
|
|
11154
|
+
* @param {String} name - The name of the custom element.
|
|
11155
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
11156
|
+
* @returns {void}
|
|
11157
|
+
*/
|
|
11158
|
+
registerComponent(name, componentClass) {
|
|
11159
|
+
if (!customElements.get(name)) {
|
|
11160
|
+
customElements.define(name, class extends componentClass {});
|
|
11161
|
+
}
|
|
11162
|
+
}
|
|
11163
|
+
|
|
11164
|
+
/**
|
|
11165
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
11166
|
+
* @returns {void}
|
|
11167
|
+
*/
|
|
11168
|
+
closestElement(
|
|
11169
|
+
selector, // selector like in .closest()
|
|
11170
|
+
base = this, // extra functionality to skip a parent
|
|
11171
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11172
|
+
!el || el === document || el === window
|
|
11173
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
11174
|
+
: found
|
|
11175
|
+
? found // found a selector INside this element
|
|
11176
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11177
|
+
) {
|
|
11178
|
+
return __Closest(base);
|
|
11179
|
+
}
|
|
11180
|
+
/* eslint-enable jsdoc/require-param */
|
|
11181
|
+
|
|
11182
|
+
/**
|
|
11183
|
+
* 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.
|
|
11184
|
+
* @param {Object} elem - The element to check.
|
|
11185
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11186
|
+
* @returns {void}
|
|
11187
|
+
*/
|
|
11188
|
+
handleComponentTagRename(elem, tagName) {
|
|
11189
|
+
const tag = tagName.toLowerCase();
|
|
11190
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11191
|
+
|
|
11192
|
+
if (elemTag !== tag) {
|
|
11193
|
+
elem.setAttribute(tag, true);
|
|
11194
|
+
}
|
|
11195
|
+
}
|
|
11196
|
+
|
|
11197
|
+
/**
|
|
11198
|
+
* Validates if an element is a specific Auro component.
|
|
11199
|
+
* @param {Object} elem - The element to validate.
|
|
11200
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
11201
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11202
|
+
*/
|
|
11203
|
+
elementMatch(elem, tagName) {
|
|
11204
|
+
const tag = tagName.toLowerCase();
|
|
11205
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
11206
|
+
|
|
11207
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
11208
|
+
}
|
|
11209
|
+
};
|
|
11210
|
+
|
|
11211
|
+
var styleCss$1$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
11212
|
+
|
|
11213
|
+
var colorCss$1$1 = css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
11214
|
+
|
|
11215
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11216
|
+
|
|
11217
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11218
|
+
// See LICENSE in the project root for license information.
|
|
11219
|
+
|
|
11220
|
+
|
|
11221
|
+
class AuroLoader extends LitElement {
|
|
11222
|
+
constructor() {
|
|
11223
|
+
super();
|
|
11224
|
+
|
|
11225
|
+
/**
|
|
11226
|
+
* @private
|
|
11227
|
+
*/
|
|
11228
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11229
|
+
|
|
11230
|
+
/**
|
|
11231
|
+
* @private
|
|
11232
|
+
*/
|
|
11233
|
+
this.mdCount = 3;
|
|
11234
|
+
|
|
11235
|
+
/**
|
|
11236
|
+
* @private
|
|
11237
|
+
*/
|
|
11238
|
+
this.smCount = 2;
|
|
11239
|
+
|
|
11240
|
+
/**
|
|
11241
|
+
* @private
|
|
11242
|
+
*/
|
|
11243
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
11244
|
+
|
|
11245
|
+
this.orbit = false;
|
|
11246
|
+
this.ringworm = false;
|
|
10858
11247
|
this.laser = false;
|
|
10859
11248
|
this.pulse = false;
|
|
10860
11249
|
}
|
|
@@ -10914,7 +11303,7 @@ class AuroLoader extends LitElement {
|
|
|
10914
11303
|
*
|
|
10915
11304
|
*/
|
|
10916
11305
|
static register(name = "auro-loader") {
|
|
10917
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroLoader);
|
|
11306
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroLoader);
|
|
10918
11307
|
}
|
|
10919
11308
|
|
|
10920
11309
|
firstUpdated() {
|
|
@@ -11043,7 +11432,7 @@ class AuroButton extends LitElement {
|
|
|
11043
11432
|
/**
|
|
11044
11433
|
* Generate unique names for dependency components.
|
|
11045
11434
|
*/
|
|
11046
|
-
const versioning = new AuroDependencyVersioning$
|
|
11435
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
11047
11436
|
|
|
11048
11437
|
/**
|
|
11049
11438
|
* @private
|
|
@@ -11145,7 +11534,7 @@ class AuroButton extends LitElement {
|
|
|
11145
11534
|
*
|
|
11146
11535
|
*/
|
|
11147
11536
|
static register(name = "auro-button") {
|
|
11148
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroButton);
|
|
11537
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroButton);
|
|
11149
11538
|
}
|
|
11150
11539
|
|
|
11151
11540
|
/**
|
|
@@ -11267,7 +11656,7 @@ var tokensCss$5 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
11267
11656
|
|
|
11268
11657
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11269
11658
|
|
|
11270
|
-
let AuroLibraryRuntimeUtils$
|
|
11659
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
11271
11660
|
|
|
11272
11661
|
/* eslint-disable jsdoc/require-param */
|
|
11273
11662
|
|
|
@@ -11348,7 +11737,7 @@ class AuroHelpText extends LitElement {
|
|
|
11348
11737
|
this.onDark = false;
|
|
11349
11738
|
this.hasTextContent = false;
|
|
11350
11739
|
|
|
11351
|
-
AuroLibraryRuntimeUtils$
|
|
11740
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
11352
11741
|
}
|
|
11353
11742
|
|
|
11354
11743
|
static get styles() {
|
|
@@ -11404,7 +11793,7 @@ class AuroHelpText extends LitElement {
|
|
|
11404
11793
|
*
|
|
11405
11794
|
*/
|
|
11406
11795
|
static register(name = "auro-helptext") {
|
|
11407
|
-
AuroLibraryRuntimeUtils$
|
|
11796
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
11408
11797
|
}
|
|
11409
11798
|
|
|
11410
11799
|
updated() {
|
|
@@ -11502,7 +11891,7 @@ class AuroInput extends BaseInput {
|
|
|
11502
11891
|
*
|
|
11503
11892
|
*/
|
|
11504
11893
|
static register(name = "auro-input") {
|
|
11505
|
-
AuroLibraryRuntimeUtils$
|
|
11894
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroInput);
|
|
11506
11895
|
}
|
|
11507
11896
|
|
|
11508
11897
|
/**
|
|
@@ -11689,7 +12078,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
11689
12078
|
|
|
11690
12079
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11691
12080
|
|
|
11692
|
-
class AuroLibraryRuntimeUtils {
|
|
12081
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
11693
12082
|
|
|
11694
12083
|
/* eslint-disable jsdoc/require-param */
|
|
11695
12084
|
|
|
@@ -11750,7 +12139,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
11750
12139
|
|
|
11751
12140
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
11752
12141
|
}
|
|
11753
|
-
}
|
|
12142
|
+
};
|
|
11754
12143
|
|
|
11755
12144
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11756
12145
|
// See LICENSE in the project root for license information.
|
|
@@ -11946,6 +12335,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
11946
12335
|
|
|
11947
12336
|
var colorCss = css`: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)}`;
|
|
11948
12337
|
|
|
12338
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12339
|
+
// See LICENSE in the project root for license information.
|
|
12340
|
+
|
|
12341
|
+
// ---------------------------------------------------------------------
|
|
12342
|
+
|
|
12343
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12344
|
+
|
|
12345
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
12346
|
+
|
|
12347
|
+
/* eslint-disable jsdoc/require-param */
|
|
12348
|
+
|
|
12349
|
+
/**
|
|
12350
|
+
* This will register a new custom element with the browser.
|
|
12351
|
+
* @param {String} name - The name of the custom element.
|
|
12352
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
12353
|
+
* @returns {void}
|
|
12354
|
+
*/
|
|
12355
|
+
registerComponent(name, componentClass) {
|
|
12356
|
+
if (!customElements.get(name)) {
|
|
12357
|
+
customElements.define(name, class extends componentClass {});
|
|
12358
|
+
}
|
|
12359
|
+
}
|
|
12360
|
+
|
|
12361
|
+
/**
|
|
12362
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
12363
|
+
* @returns {void}
|
|
12364
|
+
*/
|
|
12365
|
+
closestElement(
|
|
12366
|
+
selector, // selector like in .closest()
|
|
12367
|
+
base = this, // extra functionality to skip a parent
|
|
12368
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12369
|
+
!el || el === document || el === window
|
|
12370
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
12371
|
+
: found
|
|
12372
|
+
? found // found a selector INside this element
|
|
12373
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12374
|
+
) {
|
|
12375
|
+
return __Closest(base);
|
|
12376
|
+
}
|
|
12377
|
+
/* eslint-enable jsdoc/require-param */
|
|
12378
|
+
|
|
12379
|
+
/**
|
|
12380
|
+
* 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.
|
|
12381
|
+
* @param {Object} elem - The element to check.
|
|
12382
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
12383
|
+
* @returns {void}
|
|
12384
|
+
*/
|
|
12385
|
+
handleComponentTagRename(elem, tagName) {
|
|
12386
|
+
const tag = tagName.toLowerCase();
|
|
12387
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12388
|
+
|
|
12389
|
+
if (elemTag !== tag) {
|
|
12390
|
+
elem.setAttribute(tag, true);
|
|
12391
|
+
}
|
|
12392
|
+
}
|
|
12393
|
+
|
|
12394
|
+
/**
|
|
12395
|
+
* Validates if an element is a specific Auro component.
|
|
12396
|
+
* @param {Object} elem - The element to validate.
|
|
12397
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
12398
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
12399
|
+
*/
|
|
12400
|
+
elementMatch(elem, tagName) {
|
|
12401
|
+
const tag = tagName.toLowerCase();
|
|
12402
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12403
|
+
|
|
12404
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
12405
|
+
}
|
|
12406
|
+
};
|
|
12407
|
+
|
|
11949
12408
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11950
12409
|
// See LICENSE in the project root for license information.
|
|
11951
12410
|
|
|
@@ -11965,7 +12424,7 @@ class AuroIcon extends BaseIcon {
|
|
|
11965
12424
|
*/
|
|
11966
12425
|
privateDefaults() {
|
|
11967
12426
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11968
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
12427
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
11969
12428
|
}
|
|
11970
12429
|
|
|
11971
12430
|
// function to define props used within the scope of this component
|
|
@@ -12047,7 +12506,7 @@ class AuroIcon extends BaseIcon {
|
|
|
12047
12506
|
*
|
|
12048
12507
|
*/
|
|
12049
12508
|
static register(name = "auro-icon") {
|
|
12050
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
12509
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
12051
12510
|
}
|
|
12052
12511
|
|
|
12053
12512
|
connectedCallback() {
|
|
@@ -12115,6 +12574,76 @@ class AuroIcon extends BaseIcon {
|
|
|
12115
12574
|
|
|
12116
12575
|
var iconVersion = '8.0.2';
|
|
12117
12576
|
|
|
12577
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12578
|
+
// See LICENSE in the project root for license information.
|
|
12579
|
+
|
|
12580
|
+
// ---------------------------------------------------------------------
|
|
12581
|
+
|
|
12582
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12583
|
+
|
|
12584
|
+
class AuroLibraryRuntimeUtils {
|
|
12585
|
+
|
|
12586
|
+
/* eslint-disable jsdoc/require-param */
|
|
12587
|
+
|
|
12588
|
+
/**
|
|
12589
|
+
* This will register a new custom element with the browser.
|
|
12590
|
+
* @param {String} name - The name of the custom element.
|
|
12591
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
12592
|
+
* @returns {void}
|
|
12593
|
+
*/
|
|
12594
|
+
registerComponent(name, componentClass) {
|
|
12595
|
+
if (!customElements.get(name)) {
|
|
12596
|
+
customElements.define(name, class extends componentClass {});
|
|
12597
|
+
}
|
|
12598
|
+
}
|
|
12599
|
+
|
|
12600
|
+
/**
|
|
12601
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
12602
|
+
* @returns {void}
|
|
12603
|
+
*/
|
|
12604
|
+
closestElement(
|
|
12605
|
+
selector, // selector like in .closest()
|
|
12606
|
+
base = this, // extra functionality to skip a parent
|
|
12607
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12608
|
+
!el || el === document || el === window
|
|
12609
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
12610
|
+
: found
|
|
12611
|
+
? found // found a selector INside this element
|
|
12612
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12613
|
+
) {
|
|
12614
|
+
return __Closest(base);
|
|
12615
|
+
}
|
|
12616
|
+
/* eslint-enable jsdoc/require-param */
|
|
12617
|
+
|
|
12618
|
+
/**
|
|
12619
|
+
* 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.
|
|
12620
|
+
* @param {Object} elem - The element to check.
|
|
12621
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
12622
|
+
* @returns {void}
|
|
12623
|
+
*/
|
|
12624
|
+
handleComponentTagRename(elem, tagName) {
|
|
12625
|
+
const tag = tagName.toLowerCase();
|
|
12626
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12627
|
+
|
|
12628
|
+
if (elemTag !== tag) {
|
|
12629
|
+
elem.setAttribute(tag, true);
|
|
12630
|
+
}
|
|
12631
|
+
}
|
|
12632
|
+
|
|
12633
|
+
/**
|
|
12634
|
+
* Validates if an element is a specific Auro component.
|
|
12635
|
+
* @param {Object} elem - The element to validate.
|
|
12636
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
12637
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
12638
|
+
*/
|
|
12639
|
+
elementMatch(elem, tagName) {
|
|
12640
|
+
const tag = tagName.toLowerCase();
|
|
12641
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12642
|
+
|
|
12643
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
12644
|
+
}
|
|
12645
|
+
}
|
|
12646
|
+
|
|
12118
12647
|
var styleCss$3 = css`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
12119
12648
|
|
|
12120
12649
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -12270,7 +12799,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
12270
12799
|
|
|
12271
12800
|
this.large = false;
|
|
12272
12801
|
|
|
12273
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
12802
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
12274
12803
|
|
|
12275
12804
|
const versioning = new AuroDependencyVersioning();
|
|
12276
12805
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
@@ -12309,7 +12838,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
12309
12838
|
*
|
|
12310
12839
|
*/
|
|
12311
12840
|
static register(name = "auro-bibtemplate") {
|
|
12312
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
12841
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
12313
12842
|
}
|
|
12314
12843
|
|
|
12315
12844
|
/**
|
|
@@ -12349,6 +12878,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
12349
12878
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
12350
12879
|
}
|
|
12351
12880
|
|
|
12881
|
+
firstUpdated(changedProperties) {
|
|
12882
|
+
super.firstUpdated(changedProperties);
|
|
12883
|
+
|
|
12884
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
12885
|
+
bubbles: true,
|
|
12886
|
+
composed: true,
|
|
12887
|
+
detail: {
|
|
12888
|
+
element: this
|
|
12889
|
+
}
|
|
12890
|
+
}));
|
|
12891
|
+
}
|
|
12892
|
+
|
|
12352
12893
|
// function that renders the HTML and CSS into the scope of the component
|
|
12353
12894
|
render() {
|
|
12354
12895
|
return html`
|
|
@@ -12435,7 +12976,7 @@ class AuroCombobox extends LitElement {
|
|
|
12435
12976
|
|
|
12436
12977
|
this.validation = new AuroFormValidation$1();
|
|
12437
12978
|
|
|
12438
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
12979
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
12439
12980
|
|
|
12440
12981
|
this.isHiddenWhileLoading = false;
|
|
12441
12982
|
|
|
@@ -12445,7 +12986,7 @@ class AuroCombobox extends LitElement {
|
|
|
12445
12986
|
this.noFlip = false;
|
|
12446
12987
|
this.autoPlacement = false;
|
|
12447
12988
|
|
|
12448
|
-
const versioning = new AuroDependencyVersioning$
|
|
12989
|
+
const versioning = new AuroDependencyVersioning$4();
|
|
12449
12990
|
|
|
12450
12991
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
12451
12992
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
@@ -12700,7 +13241,7 @@ class AuroCombobox extends LitElement {
|
|
|
12700
13241
|
*
|
|
12701
13242
|
*/
|
|
12702
13243
|
static register(name = 'auro-combobox') {
|
|
12703
|
-
AuroLibraryRuntimeUtils$
|
|
13244
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCombobox);
|
|
12704
13245
|
}
|
|
12705
13246
|
|
|
12706
13247
|
/**
|
|
@@ -12857,15 +13398,8 @@ class AuroCombobox extends LitElement {
|
|
|
12857
13398
|
this.showBib();
|
|
12858
13399
|
});
|
|
12859
13400
|
|
|
12860
|
-
// this.dropdown.addEventListener('auroDropdown-show', () => {
|
|
12861
|
-
this.menuWrapper = this.dropdown.querySelector('.menuWrapper');
|
|
12862
|
-
if (this.menu) {
|
|
12863
|
-
this.menuWrapper.append(this.menu);
|
|
12864
|
-
}
|
|
12865
|
-
|
|
12866
13401
|
// setting up bibtemplate
|
|
12867
13402
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
12868
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
12869
13403
|
|
|
12870
13404
|
// Exposes the CSS parts from the bibtemplate for styling
|
|
12871
13405
|
this.bibtemplate.exposeCssParts();
|
|
@@ -12890,10 +13424,9 @@ class AuroCombobox extends LitElement {
|
|
|
12890
13424
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
12891
13425
|
|
|
12892
13426
|
// a racing condition on custom-combobox with custom-menu
|
|
12893
|
-
if (!this.menu) {
|
|
13427
|
+
if (!this.menu || this.menuShadowRoot === null) {
|
|
12894
13428
|
setTimeout(() => {
|
|
12895
13429
|
this.configureMenu();
|
|
12896
|
-
this.menuWrapper.append(this.menu);
|
|
12897
13430
|
}, 0);
|
|
12898
13431
|
return;
|
|
12899
13432
|
}
|
|
@@ -12968,41 +13501,12 @@ class AuroCombobox extends LitElement {
|
|
|
12968
13501
|
});
|
|
12969
13502
|
}
|
|
12970
13503
|
|
|
12971
|
-
/**
|
|
12972
|
-
* @private
|
|
12973
|
-
* Dispatches input's keyboard events from host
|
|
12974
|
-
* This allows key events from the input to be handled by the parent.
|
|
12975
|
-
* @param {Event} event - The keyboard event.
|
|
12976
|
-
*/
|
|
12977
|
-
bubbleUpInputEvent(event) {
|
|
12978
|
-
// Do not need to bubble events if the input is not in bib.
|
|
12979
|
-
if (event.currentTarget.parentNode !== this.dropdown) {
|
|
12980
|
-
// prevents browsers to move cursor in input element.
|
|
12981
|
-
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
12982
|
-
event.preventDefault();
|
|
12983
|
-
}
|
|
12984
|
-
const dupEvent = new event.constructor(event.type, event);
|
|
12985
|
-
this.dispatchEvent(dupEvent);
|
|
12986
|
-
}
|
|
12987
|
-
}
|
|
12988
|
-
|
|
12989
13504
|
/**
|
|
12990
13505
|
* Binds all behavior needed to the input after rendering.
|
|
12991
13506
|
* @private
|
|
12992
13507
|
* @returns {void}
|
|
12993
13508
|
*/
|
|
12994
13509
|
configureInput() {
|
|
12995
|
-
// When input is in bibtemplate, make the event to be fired at combobox element
|
|
12996
|
-
this.bubbleUpInputEvent = this.bubbleUpInputEvent.bind(this);
|
|
12997
|
-
|
|
12998
|
-
const events = [
|
|
12999
|
-
'input',
|
|
13000
|
-
'keydown',
|
|
13001
|
-
'keyup'
|
|
13002
|
-
];
|
|
13003
|
-
events.forEach((eventType) => {
|
|
13004
|
-
this.input.addEventListener(eventType, this.bubbleUpInputEvent);
|
|
13005
|
-
});
|
|
13006
13510
|
|
|
13007
13511
|
this.addEventListener('keyup', (evt) => {
|
|
13008
13512
|
if (evt.key.length === 1 || evt.key === 'Backspace' || evt.key === 'Delete') {
|
|
@@ -13066,6 +13570,7 @@ class AuroCombobox extends LitElement {
|
|
|
13066
13570
|
const inputAlertIcon = this.input.shadowRoot.querySelector(".alertNotification");
|
|
13067
13571
|
|
|
13068
13572
|
if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
|
|
13573
|
+
|
|
13069
13574
|
if (this.input.parentNode === this.dropdown) {
|
|
13070
13575
|
// keep the trigger size the same even after input gets removed
|
|
13071
13576
|
const parentSize = window.getComputedStyle(this.dropdown.trigger);
|
|
@@ -13083,7 +13588,7 @@ class AuroCombobox extends LitElement {
|
|
|
13083
13588
|
inputAlertIcon.style.display = 'none';
|
|
13084
13589
|
}
|
|
13085
13590
|
|
|
13086
|
-
this.bibtemplate.
|
|
13591
|
+
this.bibtemplate.prepend(this.input);
|
|
13087
13592
|
this.input.focus();
|
|
13088
13593
|
}
|
|
13089
13594
|
} else if (this.input.parentNode !== this.dropdown) {
|
|
@@ -13097,7 +13602,7 @@ class AuroCombobox extends LitElement {
|
|
|
13097
13602
|
inputAlertIcon.style.display = '';
|
|
13098
13603
|
}
|
|
13099
13604
|
|
|
13100
|
-
this.dropdown.
|
|
13605
|
+
this.dropdown.prepend(this.input);
|
|
13101
13606
|
this.input.focus();
|
|
13102
13607
|
}
|
|
13103
13608
|
}
|
|
@@ -13402,9 +13907,8 @@ class AuroCombobox extends LitElement {
|
|
|
13402
13907
|
@input="${this.handleInputValueChange}">
|
|
13403
13908
|
</${this.inputTag}>
|
|
13404
13909
|
|
|
13405
|
-
<div class="menuWrapper"></div>
|
|
13406
|
-
|
|
13407
13910
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
13911
|
+
<slot></slot>
|
|
13408
13912
|
</${this.bibtemplateTag}>
|
|
13409
13913
|
|
|
13410
13914
|
<p slot="helpText">
|