@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.5 → 0.0.0-pr624.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +88 -6
- package/components/bibtemplate/dist/registered.js +88 -6
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.min.js +514 -172
- package/components/combobox/demo/index.min.js +514 -172
- package/components/combobox/dist/auro-combobox.d.ts +0 -8
- package/components/combobox/dist/index.js +425 -153
- package/components/combobox/dist/registered.js +425 -153
- package/components/counter/demo/api.min.js +404 -106
- package/components/counter/demo/index.min.js +404 -106
- package/components/counter/dist/index.js +404 -106
- package/components/counter/dist/registered.js +404 -106
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +876 -383
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +876 -383
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +679 -186
- package/components/datepicker/dist/registered.js +679 -186
- package/components/datepicker/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +226 -81
- package/components/dropdown/demo/index.min.js +226 -81
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +226 -81
- package/components/dropdown/dist/registered.js +226 -81
- package/components/input/demo/api.md +46 -48
- package/components/input/demo/api.min.js +96 -15
- package/components/input/demo/index.min.js +96 -15
- package/components/input/dist/auro-input.d.ts +17 -15
- package/components/input/dist/index.js +96 -15
- package/components/input/dist/registered.js +96 -15
- 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.md +12 -4
- package/components/select/demo/api.min.js +1178 -200
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1178 -200
- package/components/select/dist/auro-select.d.ts +96 -4
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1106 -198
- package/components/select/dist/registered.js +1106 -198
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown/dist/styles/style-css.d.ts → datepicker/dist/styles/default/color-css.d.ts} +0 -0
|
@@ -34,25 +34,27 @@ export class AuroInput extends BaseInput {
|
|
|
34
34
|
/**
|
|
35
35
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
36
36
|
* @private
|
|
37
|
-
* @returns {object} - Returns classmap
|
|
37
|
+
* @returns {object} - Returns classmap.
|
|
38
38
|
*/
|
|
39
39
|
private get commonInputClasses();
|
|
40
40
|
/**
|
|
41
|
-
* Returns classmap configuration for html5 inputs in
|
|
41
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
42
42
|
* @private
|
|
43
|
-
* @return {object} - Returns classmap
|
|
43
|
+
* @return {object} - Returns classmap.
|
|
44
44
|
*/
|
|
45
45
|
private get legacyInputClasses();
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
get
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
48
|
+
* @private
|
|
49
|
+
* @return {object} - Returns classmap.
|
|
50
|
+
*/
|
|
51
|
+
private get commonWrapperClasses();
|
|
52
|
+
/**
|
|
53
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
54
|
+
* @private
|
|
55
|
+
* @return {object} - Returns classmap.
|
|
56
|
+
*/
|
|
57
|
+
private get helpTextClasses();
|
|
56
58
|
/**
|
|
57
59
|
* Function to determine if the input is meant to render an icon visualizing the input type.
|
|
58
60
|
* @private
|
|
@@ -103,9 +105,9 @@ export class AuroInput extends BaseInput {
|
|
|
103
105
|
*/
|
|
104
106
|
private renderHtmlHelpText;
|
|
105
107
|
/**
|
|
106
|
-
* Returns HTML for the
|
|
108
|
+
* Returns HTML for the classic layout.
|
|
107
109
|
* @private
|
|
108
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
110
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
109
111
|
*/
|
|
110
112
|
private renderLayoutClassic;
|
|
111
113
|
/**
|
|
@@ -4,7 +4,7 @@ import { repeat } from 'lit/directives/repeat.js';
|
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
7
|
-
var shapeSizeCss = css`.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-xl{min-height:
|
|
7
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
8
8
|
|
|
9
9
|
var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
|
|
10
10
|
|
|
@@ -4043,9 +4043,10 @@ class DateFormatter {
|
|
|
4043
4043
|
/**
|
|
4044
4044
|
* Convert a date object to string format.
|
|
4045
4045
|
* @param {Object} date - Date to convert to string.
|
|
4046
|
-
* @
|
|
4046
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
4047
|
+
* @returns {String} Returns the date as a string.
|
|
4047
4048
|
*/
|
|
4048
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
4049
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
4049
4050
|
year: "numeric",
|
|
4050
4051
|
month: "2-digit",
|
|
4051
4052
|
day: "2-digit",
|
|
@@ -4237,7 +4238,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
4237
4238
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
4238
4239
|
|
|
4239
4240
|
// Get the date string of the date object we created from the string date
|
|
4240
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
4241
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
4241
4242
|
|
|
4242
4243
|
// Guard Clause: Generated date matches date string input
|
|
4243
4244
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -4402,7 +4403,7 @@ const {
|
|
|
4402
4403
|
|
|
4403
4404
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4404
4405
|
|
|
4405
|
-
let AuroLibraryRuntimeUtils$
|
|
4406
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
4406
4407
|
|
|
4407
4408
|
/* eslint-disable jsdoc/require-param */
|
|
4408
4409
|
|
|
@@ -4472,7 +4473,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
4472
4473
|
class AuroFormValidation {
|
|
4473
4474
|
|
|
4474
4475
|
constructor() {
|
|
4475
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4476
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
4476
4477
|
}
|
|
4477
4478
|
|
|
4478
4479
|
/**
|
|
@@ -6177,6 +6178,76 @@ var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
6177
6178
|
|
|
6178
6179
|
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)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6179
6180
|
|
|
6181
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6182
|
+
// See LICENSE in the project root for license information.
|
|
6183
|
+
|
|
6184
|
+
// ---------------------------------------------------------------------
|
|
6185
|
+
|
|
6186
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6187
|
+
|
|
6188
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6189
|
+
|
|
6190
|
+
/* eslint-disable jsdoc/require-param */
|
|
6191
|
+
|
|
6192
|
+
/**
|
|
6193
|
+
* This will register a new custom element with the browser.
|
|
6194
|
+
* @param {String} name - The name of the custom element.
|
|
6195
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6196
|
+
* @returns {void}
|
|
6197
|
+
*/
|
|
6198
|
+
registerComponent(name, componentClass) {
|
|
6199
|
+
if (!customElements.get(name)) {
|
|
6200
|
+
customElements.define(name, class extends componentClass {});
|
|
6201
|
+
}
|
|
6202
|
+
}
|
|
6203
|
+
|
|
6204
|
+
/**
|
|
6205
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6206
|
+
* @returns {void}
|
|
6207
|
+
*/
|
|
6208
|
+
closestElement(
|
|
6209
|
+
selector, // selector like in .closest()
|
|
6210
|
+
base = this, // extra functionality to skip a parent
|
|
6211
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6212
|
+
!el || el === document || el === window
|
|
6213
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6214
|
+
: found
|
|
6215
|
+
? found // found a selector INside this element
|
|
6216
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6217
|
+
) {
|
|
6218
|
+
return __Closest(base);
|
|
6219
|
+
}
|
|
6220
|
+
/* eslint-enable jsdoc/require-param */
|
|
6221
|
+
|
|
6222
|
+
/**
|
|
6223
|
+
* 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.
|
|
6224
|
+
* @param {Object} elem - The element to check.
|
|
6225
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6226
|
+
* @returns {void}
|
|
6227
|
+
*/
|
|
6228
|
+
handleComponentTagRename(elem, tagName) {
|
|
6229
|
+
const tag = tagName.toLowerCase();
|
|
6230
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6231
|
+
|
|
6232
|
+
if (elemTag !== tag) {
|
|
6233
|
+
elem.setAttribute(tag, true);
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
|
|
6237
|
+
/**
|
|
6238
|
+
* Validates if an element is a specific Auro component.
|
|
6239
|
+
* @param {Object} elem - The element to validate.
|
|
6240
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6241
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6242
|
+
*/
|
|
6243
|
+
elementMatch(elem, tagName) {
|
|
6244
|
+
const tag = tagName.toLowerCase();
|
|
6245
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6246
|
+
|
|
6247
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6248
|
+
}
|
|
6249
|
+
};
|
|
6250
|
+
|
|
6180
6251
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6181
6252
|
// See LICENSE in the project root for license information.
|
|
6182
6253
|
|
|
@@ -6384,7 +6455,7 @@ class AuroLoader extends LitElement {
|
|
|
6384
6455
|
/**
|
|
6385
6456
|
* @private
|
|
6386
6457
|
*/
|
|
6387
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6458
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6388
6459
|
|
|
6389
6460
|
this.orbit = false;
|
|
6390
6461
|
this.ringworm = false;
|
|
@@ -6447,7 +6518,7 @@ class AuroLoader extends LitElement {
|
|
|
6447
6518
|
*
|
|
6448
6519
|
*/
|
|
6449
6520
|
static register(name = "auro-loader") {
|
|
6450
|
-
AuroLibraryRuntimeUtils$
|
|
6521
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6451
6522
|
}
|
|
6452
6523
|
|
|
6453
6524
|
firstUpdated() {
|
|
@@ -6751,7 +6822,7 @@ class AuroButton extends LitElement {
|
|
|
6751
6822
|
*
|
|
6752
6823
|
*/
|
|
6753
6824
|
static register(name = "auro-button") {
|
|
6754
|
-
AuroLibraryRuntimeUtils$
|
|
6825
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6755
6826
|
}
|
|
6756
6827
|
|
|
6757
6828
|
/**
|
|
@@ -7117,7 +7188,7 @@ class AuroInput extends BaseInput {
|
|
|
7117
7188
|
/**
|
|
7118
7189
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
7119
7190
|
* @private
|
|
7120
|
-
* @returns {object} - Returns classmap
|
|
7191
|
+
* @returns {object} - Returns classmap.
|
|
7121
7192
|
*/
|
|
7122
7193
|
get commonInputClasses() {
|
|
7123
7194
|
return {
|
|
@@ -7126,9 +7197,9 @@ class AuroInput extends BaseInput {
|
|
|
7126
7197
|
}
|
|
7127
7198
|
|
|
7128
7199
|
/**
|
|
7129
|
-
* Returns classmap configuration for html5 inputs in
|
|
7200
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
7130
7201
|
* @private
|
|
7131
|
-
* @return {object} - Returns classmap
|
|
7202
|
+
* @return {object} - Returns classmap.
|
|
7132
7203
|
*/
|
|
7133
7204
|
get legacyInputClasses() {
|
|
7134
7205
|
return {
|
|
@@ -7137,6 +7208,11 @@ class AuroInput extends BaseInput {
|
|
|
7137
7208
|
};
|
|
7138
7209
|
}
|
|
7139
7210
|
|
|
7211
|
+
/**
|
|
7212
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
7213
|
+
* @private
|
|
7214
|
+
* @return {object} - Returns classmap.
|
|
7215
|
+
*/
|
|
7140
7216
|
get commonWrapperClasses() {
|
|
7141
7217
|
return {
|
|
7142
7218
|
'wrapper': true,
|
|
@@ -7145,6 +7221,11 @@ class AuroInput extends BaseInput {
|
|
|
7145
7221
|
};
|
|
7146
7222
|
}
|
|
7147
7223
|
|
|
7224
|
+
/**
|
|
7225
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
7226
|
+
* @private
|
|
7227
|
+
* @return {object} - Returns classmap.
|
|
7228
|
+
*/
|
|
7148
7229
|
get helpTextClasses() {
|
|
7149
7230
|
return {
|
|
7150
7231
|
'helpTextWrapper': true,
|
|
@@ -7162,7 +7243,7 @@ class AuroInput extends BaseInput {
|
|
|
7162
7243
|
*
|
|
7163
7244
|
*/
|
|
7164
7245
|
static register(name = "auro-input") {
|
|
7165
|
-
AuroLibraryRuntimeUtils$
|
|
7246
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroInput);
|
|
7166
7247
|
}
|
|
7167
7248
|
|
|
7168
7249
|
/**
|
|
@@ -7398,9 +7479,9 @@ class AuroInput extends BaseInput {
|
|
|
7398
7479
|
}
|
|
7399
7480
|
|
|
7400
7481
|
/**
|
|
7401
|
-
* Returns HTML for the
|
|
7482
|
+
* Returns HTML for the classic layout.
|
|
7402
7483
|
* @private
|
|
7403
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
7484
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7404
7485
|
*/
|
|
7405
7486
|
renderLayoutClassic() {
|
|
7406
7487
|
return html$1`
|
|
@@ -4,7 +4,7 @@ import { repeat } from 'lit/directives/repeat.js';
|
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
|
|
7
|
-
var shapeSizeCss = css`.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-xl{min-height:
|
|
7
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
8
8
|
|
|
9
9
|
var styleCss$4 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}`;
|
|
10
10
|
|
|
@@ -4043,9 +4043,10 @@ class DateFormatter {
|
|
|
4043
4043
|
/**
|
|
4044
4044
|
* Convert a date object to string format.
|
|
4045
4045
|
* @param {Object} date - Date to convert to string.
|
|
4046
|
-
* @
|
|
4046
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
4047
|
+
* @returns {String} Returns the date as a string.
|
|
4047
4048
|
*/
|
|
4048
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
4049
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
4049
4050
|
year: "numeric",
|
|
4050
4051
|
month: "2-digit",
|
|
4051
4052
|
day: "2-digit",
|
|
@@ -4237,7 +4238,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
4237
4238
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
4238
4239
|
|
|
4239
4240
|
// Get the date string of the date object we created from the string date
|
|
4240
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
4241
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
4241
4242
|
|
|
4242
4243
|
// Guard Clause: Generated date matches date string input
|
|
4243
4244
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -4402,7 +4403,7 @@ const {
|
|
|
4402
4403
|
|
|
4403
4404
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4404
4405
|
|
|
4405
|
-
let AuroLibraryRuntimeUtils$
|
|
4406
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
4406
4407
|
|
|
4407
4408
|
/* eslint-disable jsdoc/require-param */
|
|
4408
4409
|
|
|
@@ -4472,7 +4473,7 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
4472
4473
|
class AuroFormValidation {
|
|
4473
4474
|
|
|
4474
4475
|
constructor() {
|
|
4475
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4476
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
4476
4477
|
}
|
|
4477
4478
|
|
|
4478
4479
|
/**
|
|
@@ -6177,6 +6178,76 @@ var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
6177
6178
|
|
|
6178
6179
|
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)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6179
6180
|
|
|
6181
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6182
|
+
// See LICENSE in the project root for license information.
|
|
6183
|
+
|
|
6184
|
+
// ---------------------------------------------------------------------
|
|
6185
|
+
|
|
6186
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6187
|
+
|
|
6188
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6189
|
+
|
|
6190
|
+
/* eslint-disable jsdoc/require-param */
|
|
6191
|
+
|
|
6192
|
+
/**
|
|
6193
|
+
* This will register a new custom element with the browser.
|
|
6194
|
+
* @param {String} name - The name of the custom element.
|
|
6195
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6196
|
+
* @returns {void}
|
|
6197
|
+
*/
|
|
6198
|
+
registerComponent(name, componentClass) {
|
|
6199
|
+
if (!customElements.get(name)) {
|
|
6200
|
+
customElements.define(name, class extends componentClass {});
|
|
6201
|
+
}
|
|
6202
|
+
}
|
|
6203
|
+
|
|
6204
|
+
/**
|
|
6205
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6206
|
+
* @returns {void}
|
|
6207
|
+
*/
|
|
6208
|
+
closestElement(
|
|
6209
|
+
selector, // selector like in .closest()
|
|
6210
|
+
base = this, // extra functionality to skip a parent
|
|
6211
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6212
|
+
!el || el === document || el === window
|
|
6213
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6214
|
+
: found
|
|
6215
|
+
? found // found a selector INside this element
|
|
6216
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6217
|
+
) {
|
|
6218
|
+
return __Closest(base);
|
|
6219
|
+
}
|
|
6220
|
+
/* eslint-enable jsdoc/require-param */
|
|
6221
|
+
|
|
6222
|
+
/**
|
|
6223
|
+
* 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.
|
|
6224
|
+
* @param {Object} elem - The element to check.
|
|
6225
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6226
|
+
* @returns {void}
|
|
6227
|
+
*/
|
|
6228
|
+
handleComponentTagRename(elem, tagName) {
|
|
6229
|
+
const tag = tagName.toLowerCase();
|
|
6230
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6231
|
+
|
|
6232
|
+
if (elemTag !== tag) {
|
|
6233
|
+
elem.setAttribute(tag, true);
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
|
|
6237
|
+
/**
|
|
6238
|
+
* Validates if an element is a specific Auro component.
|
|
6239
|
+
* @param {Object} elem - The element to validate.
|
|
6240
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6241
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6242
|
+
*/
|
|
6243
|
+
elementMatch(elem, tagName) {
|
|
6244
|
+
const tag = tagName.toLowerCase();
|
|
6245
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6246
|
+
|
|
6247
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6248
|
+
}
|
|
6249
|
+
};
|
|
6250
|
+
|
|
6180
6251
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6181
6252
|
// See LICENSE in the project root for license information.
|
|
6182
6253
|
|
|
@@ -6384,7 +6455,7 @@ class AuroLoader extends LitElement {
|
|
|
6384
6455
|
/**
|
|
6385
6456
|
* @private
|
|
6386
6457
|
*/
|
|
6387
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6458
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6388
6459
|
|
|
6389
6460
|
this.orbit = false;
|
|
6390
6461
|
this.ringworm = false;
|
|
@@ -6447,7 +6518,7 @@ class AuroLoader extends LitElement {
|
|
|
6447
6518
|
*
|
|
6448
6519
|
*/
|
|
6449
6520
|
static register(name = "auro-loader") {
|
|
6450
|
-
AuroLibraryRuntimeUtils$
|
|
6521
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6451
6522
|
}
|
|
6452
6523
|
|
|
6453
6524
|
firstUpdated() {
|
|
@@ -6751,7 +6822,7 @@ class AuroButton extends LitElement {
|
|
|
6751
6822
|
*
|
|
6752
6823
|
*/
|
|
6753
6824
|
static register(name = "auro-button") {
|
|
6754
|
-
AuroLibraryRuntimeUtils$
|
|
6825
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6755
6826
|
}
|
|
6756
6827
|
|
|
6757
6828
|
/**
|
|
@@ -7117,7 +7188,7 @@ class AuroInput extends BaseInput {
|
|
|
7117
7188
|
/**
|
|
7118
7189
|
* Returns classmap configuration for html5 inputs in all layouts.
|
|
7119
7190
|
* @private
|
|
7120
|
-
* @returns {object} - Returns classmap
|
|
7191
|
+
* @returns {object} - Returns classmap.
|
|
7121
7192
|
*/
|
|
7122
7193
|
get commonInputClasses() {
|
|
7123
7194
|
return {
|
|
@@ -7126,9 +7197,9 @@ class AuroInput extends BaseInput {
|
|
|
7126
7197
|
}
|
|
7127
7198
|
|
|
7128
7199
|
/**
|
|
7129
|
-
* Returns classmap configuration for html5 inputs in
|
|
7200
|
+
* Returns classmap configuration for html5 inputs in each layout.
|
|
7130
7201
|
* @private
|
|
7131
|
-
* @return {object} - Returns classmap
|
|
7202
|
+
* @return {object} - Returns classmap.
|
|
7132
7203
|
*/
|
|
7133
7204
|
get legacyInputClasses() {
|
|
7134
7205
|
return {
|
|
@@ -7137,6 +7208,11 @@ class AuroInput extends BaseInput {
|
|
|
7137
7208
|
};
|
|
7138
7209
|
}
|
|
7139
7210
|
|
|
7211
|
+
/**
|
|
7212
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
7213
|
+
* @private
|
|
7214
|
+
* @return {object} - Returns classmap.
|
|
7215
|
+
*/
|
|
7140
7216
|
get commonWrapperClasses() {
|
|
7141
7217
|
return {
|
|
7142
7218
|
'wrapper': true,
|
|
@@ -7145,6 +7221,11 @@ class AuroInput extends BaseInput {
|
|
|
7145
7221
|
};
|
|
7146
7222
|
}
|
|
7147
7223
|
|
|
7224
|
+
/**
|
|
7225
|
+
* Returns classmap configuration for helpText elements in each layout.
|
|
7226
|
+
* @private
|
|
7227
|
+
* @return {object} - Returns classmap.
|
|
7228
|
+
*/
|
|
7148
7229
|
get helpTextClasses() {
|
|
7149
7230
|
return {
|
|
7150
7231
|
'helpTextWrapper': true,
|
|
@@ -7162,7 +7243,7 @@ class AuroInput extends BaseInput {
|
|
|
7162
7243
|
*
|
|
7163
7244
|
*/
|
|
7164
7245
|
static register(name = "auro-input") {
|
|
7165
|
-
AuroLibraryRuntimeUtils$
|
|
7246
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroInput);
|
|
7166
7247
|
}
|
|
7167
7248
|
|
|
7168
7249
|
/**
|
|
@@ -7398,9 +7479,9 @@ class AuroInput extends BaseInput {
|
|
|
7398
7479
|
}
|
|
7399
7480
|
|
|
7400
7481
|
/**
|
|
7401
|
-
* Returns HTML for the
|
|
7482
|
+
* Returns HTML for the classic layout.
|
|
7402
7483
|
* @private
|
|
7403
|
-
* @returns {import("lit").TemplateResult} - Returns HTML for the
|
|
7484
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7404
7485
|
*/
|
|
7405
7486
|
renderLayoutClassic() {
|
|
7406
7487
|
return html$1`
|
|
@@ -77,7 +77,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
|
|
|
77
77
|
|
|
78
78
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
79
79
|
|
|
80
|
-
class AuroLibraryRuntimeUtils {
|
|
80
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
81
81
|
|
|
82
82
|
/* eslint-disable jsdoc/require-param */
|
|
83
83
|
|
|
@@ -138,7 +138,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
138
138
|
|
|
139
139
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
140
140
|
}
|
|
141
|
-
}
|
|
141
|
+
};
|
|
142
142
|
|
|
143
143
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
144
144
|
// See LICENSE in the project root for license information.
|
|
@@ -324,7 +324,7 @@ class AuroMenu extends i$2 {
|
|
|
324
324
|
*
|
|
325
325
|
*/
|
|
326
326
|
static register(name = "auro-menu") {
|
|
327
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
327
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
// Lifecycle Methods
|
|
@@ -348,7 +348,7 @@ class AuroMenu extends i$2 {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
firstUpdated() {
|
|
351
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
351
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
352
352
|
|
|
353
353
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
354
354
|
this.initializeMenu();
|
|
@@ -1123,6 +1123,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
1123
1123
|
|
|
1124
1124
|
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
1125
1125
|
|
|
1126
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1127
|
+
// See LICENSE in the project root for license information.
|
|
1128
|
+
|
|
1129
|
+
// ---------------------------------------------------------------------
|
|
1130
|
+
|
|
1131
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1132
|
+
|
|
1133
|
+
class AuroLibraryRuntimeUtils {
|
|
1134
|
+
|
|
1135
|
+
/* eslint-disable jsdoc/require-param */
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* This will register a new custom element with the browser.
|
|
1139
|
+
* @param {String} name - The name of the custom element.
|
|
1140
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1141
|
+
* @returns {void}
|
|
1142
|
+
*/
|
|
1143
|
+
registerComponent(name, componentClass) {
|
|
1144
|
+
if (!customElements.get(name)) {
|
|
1145
|
+
customElements.define(name, class extends componentClass {});
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1151
|
+
* @returns {void}
|
|
1152
|
+
*/
|
|
1153
|
+
closestElement(
|
|
1154
|
+
selector, // selector like in .closest()
|
|
1155
|
+
base = this, // extra functionality to skip a parent
|
|
1156
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1157
|
+
!el || el === document || el === window
|
|
1158
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1159
|
+
: found
|
|
1160
|
+
? found // found a selector INside this element
|
|
1161
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1162
|
+
) {
|
|
1163
|
+
return __Closest(base);
|
|
1164
|
+
}
|
|
1165
|
+
/* eslint-enable jsdoc/require-param */
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* 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.
|
|
1169
|
+
* @param {Object} elem - The element to check.
|
|
1170
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1171
|
+
* @returns {void}
|
|
1172
|
+
*/
|
|
1173
|
+
handleComponentTagRename(elem, tagName) {
|
|
1174
|
+
const tag = tagName.toLowerCase();
|
|
1175
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1176
|
+
|
|
1177
|
+
if (elemTag !== tag) {
|
|
1178
|
+
elem.setAttribute(tag, true);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Validates if an element is a specific Auro component.
|
|
1184
|
+
* @param {Object} elem - The element to validate.
|
|
1185
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1186
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1187
|
+
*/
|
|
1188
|
+
elementMatch(elem, tagName) {
|
|
1189
|
+
const tag = tagName.toLowerCase();
|
|
1190
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1191
|
+
|
|
1192
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1126
1196
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1127
1197
|
// See LICENSE in the project root for license information.
|
|
1128
1198
|
|
|
@@ -1330,7 +1400,7 @@ class AuroMenuOption extends i$2 {
|
|
|
1330
1400
|
/**
|
|
1331
1401
|
* @private
|
|
1332
1402
|
*/
|
|
1333
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1403
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1334
1404
|
}
|
|
1335
1405
|
|
|
1336
1406
|
static get properties() {
|
|
@@ -1374,7 +1444,7 @@ class AuroMenuOption extends i$2 {
|
|
|
1374
1444
|
*
|
|
1375
1445
|
*/
|
|
1376
1446
|
static register(name = "auro-menuoption") {
|
|
1377
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1447
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1378
1448
|
}
|
|
1379
1449
|
|
|
1380
1450
|
firstUpdated() {
|