@aurodesignsystem-dev/auro-formkit 0.0.0-pr681.1 → 0.0.0-pr684.1
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 +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1026 -12
- package/components/bibtemplate/dist/registered.js +1026 -12
- package/components/combobox/demo/api.min.js +1830 -478
- package/components/combobox/demo/index.min.js +1830 -478
- package/components/combobox/dist/index.js +1703 -355
- package/components/combobox/dist/registered.js +1703 -355
- package/components/counter/demo/api.min.js +1813 -466
- package/components/counter/demo/index.min.js +1813 -466
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +1813 -466
- package/components/counter/dist/registered.js +1813 -466
- package/components/datepicker/demo/api.min.js +2319 -643
- package/components/datepicker/demo/index.min.js +2319 -643
- package/components/datepicker/dist/index.js +2319 -643
- package/components/datepicker/dist/registered.js +2319 -643
- package/components/dropdown/demo/api.min.js +6 -2
- package/components/dropdown/demo/index.min.js +6 -2
- package/components/dropdown/dist/index.js +6 -2
- package/components/dropdown/dist/registered.js +6 -2
- package/components/input/demo/api.min.js +565 -235
- package/components/input/demo/index.min.js +565 -235
- package/components/input/dist/index.js +565 -235
- package/components/input/dist/registered.js +565 -235
- package/components/menu/demo/api.min.js +7 -3
- package/components/menu/demo/index.min.js +7 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +7 -3
- package/components/menu/dist/registered.js +7 -3
- package/components/select/demo/api.min.js +1166 -144
- package/components/select/demo/index.min.js +1166 -144
- package/components/select/dist/index.js +1159 -141
- package/components/select/dist/registered.js +1159 -141
- package/package.json +1 -1
|
@@ -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$3 = class AuroDependencyVersioning {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3132,7 +3132,7 @@ class AuroFloatingUI {
|
|
|
3132
3132
|
// See LICENSE in the project root for license information.
|
|
3133
3133
|
|
|
3134
3134
|
|
|
3135
|
-
let AuroDependencyVersioning$
|
|
3135
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
3136
3136
|
|
|
3137
3137
|
/**
|
|
3138
3138
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3318,9 +3318,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3318
3318
|
}
|
|
3319
3319
|
};
|
|
3320
3320
|
|
|
3321
|
-
var tokensCss$2$
|
|
3321
|
+
var tokensCss$2$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3322
3322
|
|
|
3323
|
-
var colorCss$3$
|
|
3323
|
+
var colorCss$3$2 = 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)}`;
|
|
3324
3324
|
|
|
3325
3325
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3326
3326
|
// See LICENSE in the project root for license information.
|
|
@@ -3478,9 +3478,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3478
3478
|
static get styles() {
|
|
3479
3479
|
return [
|
|
3480
3480
|
super.styles,
|
|
3481
|
-
css`${tokensCss$2$
|
|
3481
|
+
css`${tokensCss$2$2}`,
|
|
3482
3482
|
css`${styleCss$2$2}`,
|
|
3483
|
-
css`${colorCss$3$
|
|
3483
|
+
css`${colorCss$3$2}`
|
|
3484
3484
|
];
|
|
3485
3485
|
}
|
|
3486
3486
|
|
|
@@ -3514,8 +3514,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3514
3514
|
async firstUpdated() {
|
|
3515
3515
|
await super.firstUpdated();
|
|
3516
3516
|
|
|
3517
|
-
|
|
3518
|
-
|
|
3517
|
+
/**
|
|
3518
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3519
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3520
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3521
|
+
*/
|
|
3522
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3519
3523
|
const svgDesc = this.svg.querySelector('desc');
|
|
3520
3524
|
|
|
3521
3525
|
if (svgDesc) {
|
|
@@ -3772,9 +3776,9 @@ var styleEmphasizedCss$1 = css`:host{display:block}.layout-emphasized .chevron,.
|
|
|
3772
3776
|
|
|
3773
3777
|
var styleSnowflakeCss$1 = css`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3774
3778
|
|
|
3775
|
-
var colorCss$
|
|
3779
|
+
var colorCss$6 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3776
3780
|
|
|
3777
|
-
var styleCss$
|
|
3781
|
+
var styleCss$7 = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3778
3782
|
|
|
3779
3783
|
var tokensCss$6 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3780
3784
|
|
|
@@ -3871,8 +3875,8 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
3871
3875
|
|
|
3872
3876
|
static get styles() {
|
|
3873
3877
|
return [
|
|
3874
|
-
colorCss$
|
|
3875
|
-
styleCss$
|
|
3878
|
+
colorCss$6,
|
|
3879
|
+
styleCss$7,
|
|
3876
3880
|
tokensCss$6
|
|
3877
3881
|
];
|
|
3878
3882
|
}
|
|
@@ -3980,7 +3984,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
3980
3984
|
|
|
3981
3985
|
var helpTextVersion$1 = '1.0.0';
|
|
3982
3986
|
|
|
3983
|
-
let AuroElement$
|
|
3987
|
+
let AuroElement$4 = class AuroElement extends LitElement {
|
|
3984
3988
|
static get properties() {
|
|
3985
3989
|
return {
|
|
3986
3990
|
|
|
@@ -4092,7 +4096,7 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
4092
4096
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4093
4097
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4094
4098
|
*/
|
|
4095
|
-
class AuroDropdown extends AuroElement$
|
|
4099
|
+
class AuroDropdown extends AuroElement$4 {
|
|
4096
4100
|
constructor() {
|
|
4097
4101
|
super();
|
|
4098
4102
|
|
|
@@ -4181,7 +4185,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
4181
4185
|
/**
|
|
4182
4186
|
* Generate unique names for dependency components.
|
|
4183
4187
|
*/
|
|
4184
|
-
const versioning = new AuroDependencyVersioning$
|
|
4188
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
4185
4189
|
|
|
4186
4190
|
/**
|
|
4187
4191
|
* @private
|
|
@@ -5004,7 +5008,7 @@ var dropdownVersion = '3.0.0';
|
|
|
5004
5008
|
|
|
5005
5009
|
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;box-shadow:none}.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;box-shadow:unset;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;box-shadow:none}.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;box-shadow:unset;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;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;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;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;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;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;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;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;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;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;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;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;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;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;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;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
5006
5010
|
|
|
5007
|
-
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}:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{overflow:hidden;width:100%;padding:0;border:0;background:unset;outline:none;text-overflow:ellipsis}.accents:not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center}`;
|
|
5011
|
+
var styleCss$4$1 = 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}:host{display:block}.wrapper{cursor:text}.helpTextClasses{cursor:default}input{overflow:hidden;width:100%;padding:0;border:0;background:unset;outline:none;text-overflow:ellipsis}.accents:not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center}`;
|
|
5008
5012
|
|
|
5009
5013
|
var styleDefaultCss = css`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.layoutDefault :host,:host(:not([layout])) :host{position:relative;display:block}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{display:flex;flex-direction:row}.layoutDefault .main,:host(:not([layout])) .main{display:flex;flex-direction:row;position:relative;flex:1}`;
|
|
5010
5014
|
|
|
@@ -5083,6 +5087,8 @@ const stringsES = {
|
|
|
5083
5087
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
5084
5088
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
5085
5089
|
'clearInput': 'Borrar campo de entrada',
|
|
5090
|
+
'showPassword': 'Mostrar contraseña',
|
|
5091
|
+
'hidePassword': 'Ocultar contraseña'
|
|
5086
5092
|
};
|
|
5087
5093
|
|
|
5088
5094
|
const stringsEN = {
|
|
@@ -5107,6 +5113,8 @@ const stringsEN = {
|
|
|
5107
5113
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
5108
5114
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
5109
5115
|
'clearInput': 'Clear input field',
|
|
5116
|
+
'showPassword': 'Show password',
|
|
5117
|
+
'hidePassword': 'Hide password'
|
|
5110
5118
|
};
|
|
5111
5119
|
|
|
5112
5120
|
/**
|
|
@@ -9401,7 +9409,7 @@ const {
|
|
|
9401
9409
|
|
|
9402
9410
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9403
9411
|
|
|
9404
|
-
let AuroLibraryRuntimeUtils$
|
|
9412
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
9405
9413
|
|
|
9406
9414
|
/* eslint-disable jsdoc/require-param */
|
|
9407
9415
|
|
|
@@ -9471,7 +9479,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
9471
9479
|
class AuroFormValidation {
|
|
9472
9480
|
|
|
9473
9481
|
constructor() {
|
|
9474
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9482
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3$1();
|
|
9475
9483
|
}
|
|
9476
9484
|
|
|
9477
9485
|
/**
|
|
@@ -9832,7 +9840,7 @@ class AuroFormValidation {
|
|
|
9832
9840
|
}
|
|
9833
9841
|
}
|
|
9834
9842
|
|
|
9835
|
-
let AuroElement$
|
|
9843
|
+
let AuroElement$2$1 = class AuroElement extends LitElement {
|
|
9836
9844
|
static get properties() {
|
|
9837
9845
|
return {
|
|
9838
9846
|
|
|
@@ -9952,7 +9960,7 @@ let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
|
9952
9960
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
9953
9961
|
*/
|
|
9954
9962
|
|
|
9955
|
-
class BaseInput extends AuroElement$
|
|
9963
|
+
class BaseInput extends AuroElement$2$1 {
|
|
9956
9964
|
|
|
9957
9965
|
constructor() {
|
|
9958
9966
|
super();
|
|
@@ -11061,7 +11069,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
11061
11069
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
11062
11070
|
*/
|
|
11063
11071
|
|
|
11064
|
-
let AuroElement$
|
|
11072
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
11065
11073
|
|
|
11066
11074
|
// function to define props used within the scope of this component
|
|
11067
11075
|
static get properties() {
|
|
@@ -11129,7 +11137,7 @@ var styleCss$3$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
11129
11137
|
*/
|
|
11130
11138
|
|
|
11131
11139
|
// build the component class
|
|
11132
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
11140
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
11133
11141
|
constructor() {
|
|
11134
11142
|
super();
|
|
11135
11143
|
this.onDark = false;
|
|
@@ -11201,9 +11209,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
|
11201
11209
|
}
|
|
11202
11210
|
};
|
|
11203
11211
|
|
|
11204
|
-
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
11212
|
+
var tokensCss$3$1 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
11205
11213
|
|
|
11206
|
-
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)}`;
|
|
11214
|
+
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)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11207
11215
|
|
|
11208
11216
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11209
11217
|
// See LICENSE in the project root for license information.
|
|
@@ -11212,7 +11220,7 @@ var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
11212
11220
|
|
|
11213
11221
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11214
11222
|
|
|
11215
|
-
let AuroLibraryRuntimeUtils$
|
|
11223
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
11216
11224
|
|
|
11217
11225
|
/* eslint-disable jsdoc/require-param */
|
|
11218
11226
|
|
|
@@ -11294,7 +11302,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
11294
11302
|
*/
|
|
11295
11303
|
privateDefaults() {
|
|
11296
11304
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11297
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11305
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11298
11306
|
}
|
|
11299
11307
|
|
|
11300
11308
|
// function to define props used within the scope of this component
|
|
@@ -11361,9 +11369,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
11361
11369
|
static get styles() {
|
|
11362
11370
|
return [
|
|
11363
11371
|
super.styles,
|
|
11364
|
-
css`${tokensCss$3}`,
|
|
11372
|
+
css`${tokensCss$3$1}`,
|
|
11365
11373
|
css`${styleCss$3$1}`,
|
|
11366
|
-
css`${colorCss$3}`
|
|
11374
|
+
css`${colorCss$3$1}`
|
|
11367
11375
|
];
|
|
11368
11376
|
}
|
|
11369
11377
|
|
|
@@ -11376,7 +11384,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
11376
11384
|
*
|
|
11377
11385
|
*/
|
|
11378
11386
|
static register(name = "auro-icon") {
|
|
11379
|
-
AuroLibraryRuntimeUtils$
|
|
11387
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroIcon);
|
|
11380
11388
|
}
|
|
11381
11389
|
|
|
11382
11390
|
connectedCallback() {
|
|
@@ -11397,8 +11405,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
11397
11405
|
async firstUpdated() {
|
|
11398
11406
|
await super.firstUpdated();
|
|
11399
11407
|
|
|
11400
|
-
|
|
11401
|
-
|
|
11408
|
+
/**
|
|
11409
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
11410
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
11411
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
11412
|
+
*/
|
|
11413
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11402
11414
|
const svgDesc = this.svg.querySelector('desc');
|
|
11403
11415
|
|
|
11404
11416
|
if (svgDesc) {
|
|
@@ -11444,46 +11456,480 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
11444
11456
|
|
|
11445
11457
|
var iconVersion$1 = '8.0.1';
|
|
11446
11458
|
|
|
11447
|
-
|
|
11448
|
-
|
|
11459
|
+
/**
|
|
11460
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
11461
|
+
*/
|
|
11462
|
+
const _observers$1 = new WeakMap();
|
|
11449
11463
|
|
|
11464
|
+
/**
|
|
11465
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
11466
|
+
* Structure: {
|
|
11467
|
+
* host: {
|
|
11468
|
+
* matchers: Set<Function>,
|
|
11469
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
11470
|
+
* }
|
|
11471
|
+
* }
|
|
11472
|
+
*/
|
|
11473
|
+
const _transportConfig$1 = new WeakMap();
|
|
11450
11474
|
|
|
11451
|
-
|
|
11475
|
+
/**
|
|
11476
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
11477
|
+
*
|
|
11478
|
+
* @param {Object} params - The parameters for the function.
|
|
11479
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
11480
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11481
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
11482
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
11483
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
11484
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
11485
|
+
*/
|
|
11486
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
11487
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
11488
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
11489
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
11490
|
+
}
|
|
11491
|
+
|
|
11492
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
11493
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
11494
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
11495
|
+
}
|
|
11496
|
+
|
|
11497
|
+
// Guard Clause: Ensure match is a function
|
|
11498
|
+
if (typeof match !== 'function') {
|
|
11499
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
11500
|
+
}
|
|
11501
|
+
|
|
11502
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
11503
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11504
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
11505
|
+
}
|
|
11506
|
+
|
|
11507
|
+
// Register this transport and get cleanup function
|
|
11508
|
+
return _registerTransport$1({
|
|
11509
|
+
host,
|
|
11510
|
+
target,
|
|
11511
|
+
matcher: match,
|
|
11512
|
+
removeOriginal
|
|
11513
|
+
});
|
|
11514
|
+
};
|
|
11515
|
+
|
|
11516
|
+
/**
|
|
11517
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11518
|
+
*
|
|
11519
|
+
* @param {Object} params - The parameters object.
|
|
11520
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11521
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11522
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11523
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11524
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11525
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11526
|
+
* @private
|
|
11527
|
+
*/
|
|
11528
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11529
|
+
// Initialize config for this host if it doesn't exist
|
|
11530
|
+
if (!_transportConfig$1.has(host)) {
|
|
11531
|
+
_transportConfig$1.set(host, {
|
|
11532
|
+
matchers: new Set(),
|
|
11533
|
+
targets: new Map()
|
|
11534
|
+
});
|
|
11535
|
+
}
|
|
11536
|
+
|
|
11537
|
+
const config = _transportConfig$1.get(host);
|
|
11538
|
+
|
|
11539
|
+
// Add the matcher to the set of matchers for this host
|
|
11540
|
+
config.matchers.add(matcher);
|
|
11541
|
+
|
|
11542
|
+
// Initialize target entry if it doesn't exist
|
|
11543
|
+
if (!config.targets.has(target)) {
|
|
11544
|
+
config.targets.set(target, new Map());
|
|
11545
|
+
}
|
|
11546
|
+
|
|
11547
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11548
|
+
config.targets.get(target).set(matcher, {
|
|
11549
|
+
removeOriginal,
|
|
11550
|
+
currentAttributes: new Map()
|
|
11551
|
+
});
|
|
11552
|
+
|
|
11553
|
+
// Perform initial attribute transport
|
|
11554
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
11555
|
+
|
|
11556
|
+
// Attach observer
|
|
11557
|
+
_attachObserver$1(host);
|
|
11558
|
+
|
|
11559
|
+
// Return cleanup function and utility functions
|
|
11560
|
+
return {
|
|
11561
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
11562
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
11563
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
11564
|
+
}
|
|
11565
|
+
};
|
|
11566
|
+
|
|
11567
|
+
/**
|
|
11568
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11569
|
+
*
|
|
11570
|
+
* @param {HTMLElement} host - The host element
|
|
11571
|
+
* @param {HTMLElement} target - The target element
|
|
11572
|
+
* @param {Function} matcher - The matcher function
|
|
11573
|
+
* @private
|
|
11574
|
+
*/
|
|
11575
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
11576
|
+
const config = _transportConfig$1.get(host);
|
|
11577
|
+
if (!config) return;
|
|
11578
|
+
|
|
11579
|
+
// Remove this matcher from this target
|
|
11580
|
+
const targetMatchers = config.targets.get(target);
|
|
11581
|
+
if (targetMatchers) {
|
|
11582
|
+
targetMatchers.delete(matcher);
|
|
11583
|
+
|
|
11584
|
+
// If this target has no more matchers, remove it
|
|
11585
|
+
if (targetMatchers.size === 0) {
|
|
11586
|
+
config.targets.delete(target);
|
|
11587
|
+
}
|
|
11588
|
+
}
|
|
11589
|
+
|
|
11590
|
+
// Check if this matcher is still used by any target
|
|
11591
|
+
let matcherStillUsed = false;
|
|
11592
|
+
for (const matcherMap of config.targets.values()) {
|
|
11593
|
+
if (matcherMap.has(matcher)) {
|
|
11594
|
+
matcherStillUsed = true;
|
|
11595
|
+
break;
|
|
11596
|
+
}
|
|
11597
|
+
}
|
|
11598
|
+
|
|
11599
|
+
// If not used anymore, remove from matchers set
|
|
11600
|
+
if (!matcherStillUsed) {
|
|
11601
|
+
config.matchers.delete(matcher);
|
|
11602
|
+
}
|
|
11603
|
+
|
|
11604
|
+
// If no more targets or matchers, detach observer
|
|
11605
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11606
|
+
_detachObserver$1(host);
|
|
11607
|
+
}
|
|
11608
|
+
};
|
|
11609
|
+
|
|
11610
|
+
/**
|
|
11611
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11612
|
+
*
|
|
11613
|
+
* @param {Object} params - The parameters object.
|
|
11614
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11615
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11616
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11617
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11618
|
+
* @returns {void}
|
|
11619
|
+
* @private
|
|
11620
|
+
*/
|
|
11621
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11622
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11623
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11624
|
+
.filter(attr => matcher(attr))
|
|
11625
|
+
.reduce((acc, attr) => {
|
|
11626
|
+
acc[attr] = host.getAttribute(attr);
|
|
11627
|
+
return acc;
|
|
11628
|
+
}, {});
|
|
11629
|
+
|
|
11630
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11631
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11632
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
11633
|
+
target.setAttribute(key, value);
|
|
11634
|
+
if (removeOriginal) {
|
|
11635
|
+
host.removeAttribute(key);
|
|
11636
|
+
}
|
|
11637
|
+
});
|
|
11638
|
+
};
|
|
11639
|
+
|
|
11640
|
+
/**
|
|
11641
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11642
|
+
*
|
|
11643
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11644
|
+
* @returns {MutationObserver} The observer instance.
|
|
11645
|
+
* @private
|
|
11646
|
+
*/
|
|
11647
|
+
const _attachObserver$1 = (host) => {
|
|
11648
|
+
// If an observer for this host already exists, return it
|
|
11649
|
+
if (_observers$1.has(host)) {
|
|
11650
|
+
return _observers$1.get(host);
|
|
11651
|
+
}
|
|
11652
|
+
|
|
11653
|
+
// Create a new MutationObserver
|
|
11654
|
+
const observer = new MutationObserver((mutations) => {
|
|
11655
|
+
const config = _transportConfig$1.get(host);
|
|
11656
|
+
if (!config) return;
|
|
11657
|
+
|
|
11658
|
+
// For each mutation affecting attributes
|
|
11659
|
+
mutations
|
|
11660
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11661
|
+
.forEach(mutation => {
|
|
11662
|
+
const attributeName = mutation.attributeName;
|
|
11663
|
+
|
|
11664
|
+
// Find matchers that care about this attribute
|
|
11665
|
+
for (const matcher of config.matchers) {
|
|
11666
|
+
if (matcher(attributeName)) {
|
|
11667
|
+
// For each target that uses this matcher
|
|
11668
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11669
|
+
if (matcherConfigs.has(matcher)) {
|
|
11670
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11671
|
+
_transportAttributes$1({
|
|
11672
|
+
host,
|
|
11673
|
+
target,
|
|
11674
|
+
matcher,
|
|
11675
|
+
removeOriginal
|
|
11676
|
+
});
|
|
11677
|
+
}
|
|
11678
|
+
}
|
|
11679
|
+
}
|
|
11680
|
+
}
|
|
11681
|
+
});
|
|
11682
|
+
});
|
|
11683
|
+
|
|
11684
|
+
// Start observing attribute changes
|
|
11685
|
+
observer.observe(host, { attributes: true });
|
|
11686
|
+
|
|
11687
|
+
// Store the observer
|
|
11688
|
+
_observers$1.set(host, observer);
|
|
11689
|
+
|
|
11690
|
+
return observer;
|
|
11691
|
+
};
|
|
11692
|
+
|
|
11693
|
+
/**
|
|
11694
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11695
|
+
*
|
|
11696
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11697
|
+
* @private
|
|
11698
|
+
*/
|
|
11699
|
+
const _detachObserver$1 = (host) => {
|
|
11700
|
+
if (_observers$1.has(host)) {
|
|
11701
|
+
const observer = _observers$1.get(host);
|
|
11702
|
+
observer.disconnect();
|
|
11703
|
+
_observers$1.delete(host);
|
|
11704
|
+
}
|
|
11705
|
+
|
|
11706
|
+
// Clean up the transport config as well
|
|
11707
|
+
if (_transportConfig$1.has(host)) {
|
|
11708
|
+
_transportConfig$1.delete(host);
|
|
11709
|
+
}
|
|
11710
|
+
};
|
|
11711
|
+
|
|
11712
|
+
/**
|
|
11713
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11714
|
+
* @param {HTMLElement} host - The host element
|
|
11715
|
+
* @param {HTMLElement} target - The target element
|
|
11716
|
+
* @param {Function} matcher - The matcher function
|
|
11717
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11718
|
+
* @private
|
|
11719
|
+
*/
|
|
11720
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
11721
|
+
const config = _transportConfig$1.get(host);
|
|
11722
|
+
if (!config) return undefined;
|
|
11723
|
+
|
|
11724
|
+
const targetMatchers = config.targets.get(target);
|
|
11725
|
+
if (!targetMatchers) return undefined;
|
|
11726
|
+
|
|
11727
|
+
return targetMatchers.get(matcher);
|
|
11728
|
+
};
|
|
11729
|
+
|
|
11730
|
+
/**
|
|
11731
|
+
* Sets an observed attribute value
|
|
11732
|
+
* @param {HTMLElement} host - The host element
|
|
11733
|
+
* @param {HTMLElement} target - The target element
|
|
11734
|
+
* @param {Function} matcher - The matcher function
|
|
11735
|
+
* @param {string} key - The attribute name
|
|
11736
|
+
* @param {string} value - The attribute value
|
|
11737
|
+
* @private
|
|
11738
|
+
*/
|
|
11739
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
11740
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11741
|
+
if (matcherConfig) {
|
|
11742
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11743
|
+
}
|
|
11744
|
+
};
|
|
11745
|
+
|
|
11746
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
11747
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11748
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11749
|
+
return undefined;
|
|
11750
|
+
};
|
|
11751
|
+
|
|
11752
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
11753
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11754
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11755
|
+
return [];
|
|
11756
|
+
};
|
|
11757
|
+
|
|
11758
|
+
const _matchers$1 = {
|
|
11759
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11760
|
+
'role': attr => attr.match(/^role$/)
|
|
11761
|
+
};
|
|
11762
|
+
|
|
11763
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
11764
|
+
return transportAttributes$1({
|
|
11765
|
+
host,
|
|
11766
|
+
target,
|
|
11767
|
+
match: attr => {
|
|
11768
|
+
for (const key in _matchers$1) {
|
|
11769
|
+
if (_matchers$1[key](attr)) return true;
|
|
11770
|
+
}
|
|
11771
|
+
return false;
|
|
11772
|
+
},
|
|
11773
|
+
removeOriginal
|
|
11774
|
+
});
|
|
11775
|
+
};
|
|
11776
|
+
|
|
11777
|
+
let AuroElement$3 = class AuroElement extends LitElement {
|
|
11452
11778
|
|
|
11453
11779
|
/**
|
|
11454
|
-
*
|
|
11780
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
11781
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
11782
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
11783
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11455
11784
|
* @private
|
|
11456
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11457
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11458
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11459
11785
|
*/
|
|
11460
|
-
|
|
11461
|
-
let result = baseName;
|
|
11786
|
+
attributeWatcher;
|
|
11462
11787
|
|
|
11463
|
-
|
|
11464
|
-
|
|
11788
|
+
static get properties() {
|
|
11789
|
+
return {
|
|
11465
11790
|
|
|
11466
|
-
|
|
11791
|
+
/**
|
|
11792
|
+
* Defines the layout of an element.
|
|
11793
|
+
* @default {'default'}
|
|
11794
|
+
*/
|
|
11795
|
+
layout: {
|
|
11796
|
+
type: String,
|
|
11797
|
+
attribute: "layout",
|
|
11798
|
+
reflect: true
|
|
11799
|
+
},
|
|
11800
|
+
|
|
11801
|
+
/**
|
|
11802
|
+
* Defines the shape of an element.
|
|
11803
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
11804
|
+
* @default {'default'}
|
|
11805
|
+
*/
|
|
11806
|
+
shape: {
|
|
11807
|
+
type: String,
|
|
11808
|
+
attribute: "shape",
|
|
11809
|
+
reflect: true
|
|
11810
|
+
},
|
|
11811
|
+
|
|
11812
|
+
/**
|
|
11813
|
+
* Defines the size of an element.
|
|
11814
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
11815
|
+
* @default {'md'}
|
|
11816
|
+
*/
|
|
11817
|
+
size: {
|
|
11818
|
+
type: String,
|
|
11819
|
+
attribute: "size",
|
|
11820
|
+
reflect: true
|
|
11821
|
+
},
|
|
11822
|
+
|
|
11823
|
+
/**
|
|
11824
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
11825
|
+
* @default {false}
|
|
11826
|
+
*/
|
|
11827
|
+
onDark: {
|
|
11828
|
+
type: Boolean,
|
|
11829
|
+
attribute: "ondark",
|
|
11830
|
+
reflect: true
|
|
11831
|
+
},
|
|
11832
|
+
|
|
11833
|
+
/**
|
|
11834
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
11835
|
+
* This is used to apply layout and shape classes dynamically.
|
|
11836
|
+
* @type {HTMLElement|null}
|
|
11837
|
+
* @default {null}
|
|
11838
|
+
* @private
|
|
11839
|
+
*/
|
|
11840
|
+
wrapper: {
|
|
11841
|
+
type: HTMLElement,
|
|
11842
|
+
attribute: false,
|
|
11843
|
+
reflect: false
|
|
11844
|
+
}
|
|
11845
|
+
};
|
|
11467
11846
|
}
|
|
11468
11847
|
|
|
11469
|
-
|
|
11470
|
-
* Generates a unique string to be used for child auro element naming.
|
|
11471
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11472
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11473
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11474
|
-
*/
|
|
11475
|
-
generateTag(baseName, version, tagClass) {
|
|
11476
|
-
const elementName = this.generateElementName(baseName, version);
|
|
11477
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
11848
|
+
|
|
11478
11849
|
|
|
11479
|
-
|
|
11480
|
-
|
|
11850
|
+
resetShapeClasses() {
|
|
11851
|
+
if (this.shape && this.size) {
|
|
11852
|
+
|
|
11853
|
+
if (this.wrapper) {
|
|
11854
|
+
this.wrapper.classList.forEach((className) => {
|
|
11855
|
+
if (className.startsWith('shape-')) {
|
|
11856
|
+
this.wrapper.classList.remove(className);
|
|
11857
|
+
}
|
|
11858
|
+
});
|
|
11859
|
+
|
|
11860
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
11861
|
+
}
|
|
11481
11862
|
}
|
|
11863
|
+
}
|
|
11482
11864
|
|
|
11483
|
-
|
|
11865
|
+
resetLayoutClasses() {
|
|
11866
|
+
if (this.layout) {
|
|
11867
|
+
if (this.wrapper) {
|
|
11868
|
+
this.wrapper.classList.forEach((className) => {
|
|
11869
|
+
if (className.startsWith('layout-')) {
|
|
11870
|
+
this.wrapper.classList.remove(className);
|
|
11871
|
+
}
|
|
11872
|
+
});
|
|
11873
|
+
|
|
11874
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
11875
|
+
}
|
|
11876
|
+
}
|
|
11877
|
+
}
|
|
11878
|
+
|
|
11879
|
+
updateComponentArchitecture() {
|
|
11880
|
+
this.resetLayoutClasses();
|
|
11881
|
+
this.resetShapeClasses();
|
|
11882
|
+
}
|
|
11883
|
+
|
|
11884
|
+
updated(changedProperties) {
|
|
11885
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
11886
|
+
this.updateComponentArchitecture();
|
|
11887
|
+
}
|
|
11888
|
+
}
|
|
11889
|
+
|
|
11890
|
+
firstUpdated() {
|
|
11891
|
+
super.firstUpdated();
|
|
11892
|
+
|
|
11893
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
11894
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
11895
|
+
|
|
11896
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
11897
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
11898
|
+
}
|
|
11899
|
+
|
|
11900
|
+
disconnectedCallback() {
|
|
11901
|
+
super.disconnectedCallback();
|
|
11902
|
+
|
|
11903
|
+
// Cleanup the ARIA observer if it exists
|
|
11904
|
+
if (this.attributeWatcher) {
|
|
11905
|
+
this.attributeWatcher.cleanup();
|
|
11906
|
+
this.attributeWatcher = null;
|
|
11907
|
+
}
|
|
11908
|
+
}
|
|
11909
|
+
|
|
11910
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
11911
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
11912
|
+
render() {
|
|
11913
|
+
try {
|
|
11914
|
+
return this.renderLayout();
|
|
11915
|
+
} catch (error) {
|
|
11916
|
+
// failed to get the defined layout
|
|
11917
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
11918
|
+
|
|
11919
|
+
// fallback to the default layout
|
|
11920
|
+
return this.getLayout('default');
|
|
11921
|
+
}
|
|
11484
11922
|
}
|
|
11485
11923
|
};
|
|
11486
11924
|
|
|
11925
|
+
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}::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);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;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;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=secondary]):not([variant=tertiary]),.auro-button:focus: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=ghost]:disabled{cursor:not-allowed;transform: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{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]),.auro-button--iconOnly:not(.auro-button--rounded):focus: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:padding 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,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}: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}`;
|
|
11926
|
+
|
|
11927
|
+
var colorCss$2$1 = 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=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]: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=ghost]: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:not([ondark])[variant=flat]: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[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=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]: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=ghost]: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}.auro-button[ondark][variant=flat]: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)}`;
|
|
11928
|
+
|
|
11929
|
+
var tokensCss$2$1 = css`:host(:not([onDark])){--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}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--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-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
11930
|
+
|
|
11931
|
+
var shapeSize$1 = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
11932
|
+
|
|
11487
11933
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11488
11934
|
// See LICENSE in the project root for license information.
|
|
11489
11935
|
|
|
@@ -11491,7 +11937,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
11491
11937
|
|
|
11492
11938
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11493
11939
|
|
|
11494
|
-
let AuroLibraryRuntimeUtils$
|
|
11940
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
11495
11941
|
|
|
11496
11942
|
/* eslint-disable jsdoc/require-param */
|
|
11497
11943
|
|
|
@@ -11554,95 +12000,19 @@ let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
|
11554
12000
|
}
|
|
11555
12001
|
};
|
|
11556
12002
|
|
|
11557
|
-
var styleCss$2
|
|
12003
|
+
var styleCss$1$2 = 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}}`;
|
|
11558
12004
|
|
|
11559
|
-
var colorCss$
|
|
12005
|
+
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}`;
|
|
11560
12006
|
|
|
11561
|
-
var tokensCss$
|
|
12007
|
+
var tokensCss$1$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11562
12008
|
|
|
11563
|
-
// Copyright (c) Alaska
|
|
12009
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11564
12010
|
// See LICENSE in the project root for license information.
|
|
11565
12011
|
|
|
11566
|
-
// ---------------------------------------------------------------------
|
|
11567
12012
|
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
/* eslint-disable jsdoc/require-param */
|
|
11573
|
-
|
|
11574
|
-
/**
|
|
11575
|
-
* This will register a new custom element with the browser.
|
|
11576
|
-
* @param {String} name - The name of the custom element.
|
|
11577
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
11578
|
-
* @returns {void}
|
|
11579
|
-
*/
|
|
11580
|
-
registerComponent(name, componentClass) {
|
|
11581
|
-
if (!customElements.get(name)) {
|
|
11582
|
-
customElements.define(name, class extends componentClass {});
|
|
11583
|
-
}
|
|
11584
|
-
}
|
|
11585
|
-
|
|
11586
|
-
/**
|
|
11587
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
11588
|
-
* @returns {void}
|
|
11589
|
-
*/
|
|
11590
|
-
closestElement(
|
|
11591
|
-
selector, // selector like in .closest()
|
|
11592
|
-
base = this, // extra functionality to skip a parent
|
|
11593
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11594
|
-
!el || el === document || el === window
|
|
11595
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
11596
|
-
: found
|
|
11597
|
-
? found // found a selector INside this element
|
|
11598
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11599
|
-
) {
|
|
11600
|
-
return __Closest(base);
|
|
11601
|
-
}
|
|
11602
|
-
/* eslint-enable jsdoc/require-param */
|
|
11603
|
-
|
|
11604
|
-
/**
|
|
11605
|
-
* 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.
|
|
11606
|
-
* @param {Object} elem - The element to check.
|
|
11607
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11608
|
-
* @returns {void}
|
|
11609
|
-
*/
|
|
11610
|
-
handleComponentTagRename(elem, tagName) {
|
|
11611
|
-
const tag = tagName.toLowerCase();
|
|
11612
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11613
|
-
|
|
11614
|
-
if (elemTag !== tag) {
|
|
11615
|
-
elem.setAttribute(tag, true);
|
|
11616
|
-
}
|
|
11617
|
-
}
|
|
11618
|
-
|
|
11619
|
-
/**
|
|
11620
|
-
* Validates if an element is a specific Auro component.
|
|
11621
|
-
* @param {Object} elem - The element to validate.
|
|
11622
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
11623
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11624
|
-
*/
|
|
11625
|
-
elementMatch(elem, tagName) {
|
|
11626
|
-
const tag = tagName.toLowerCase();
|
|
11627
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11628
|
-
|
|
11629
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
11630
|
-
}
|
|
11631
|
-
};
|
|
11632
|
-
|
|
11633
|
-
var styleCss$1$2 = 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}}`;
|
|
11634
|
-
|
|
11635
|
-
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}`;
|
|
11636
|
-
|
|
11637
|
-
var tokensCss$1$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11638
|
-
|
|
11639
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11640
|
-
// See LICENSE in the project root for license information.
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
class AuroLoader extends LitElement {
|
|
11644
|
-
constructor() {
|
|
11645
|
-
super();
|
|
12013
|
+
let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
12014
|
+
constructor() {
|
|
12015
|
+
super();
|
|
11646
12016
|
|
|
11647
12017
|
/**
|
|
11648
12018
|
* @private
|
|
@@ -11773,11 +12143,11 @@ class AuroLoader extends LitElement {
|
|
|
11773
12143
|
}
|
|
11774
12144
|
`;
|
|
11775
12145
|
}
|
|
11776
|
-
}
|
|
12146
|
+
};
|
|
11777
12147
|
|
|
11778
|
-
var loaderVersion = '5.0.0';
|
|
12148
|
+
var loaderVersion$1 = '5.0.0';
|
|
11779
12149
|
|
|
11780
|
-
/* eslint-disable max-lines */
|
|
12150
|
+
/* eslint-disable max-lines, curly */
|
|
11781
12151
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11782
12152
|
// See LICENSE in the project root for license information.
|
|
11783
12153
|
|
|
@@ -11793,7 +12163,18 @@ var loaderVersion = '5.0.0';
|
|
|
11793
12163
|
|
|
11794
12164
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
11795
12165
|
|
|
11796
|
-
|
|
12166
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
12167
|
+
|
|
12168
|
+
/**
|
|
12169
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
12170
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
12171
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
12172
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
12173
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
12174
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
12175
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
12176
|
+
*/
|
|
12177
|
+
let AuroButton$1 = class AuroButton extends AuroElement$3 {
|
|
11797
12178
|
|
|
11798
12179
|
/**
|
|
11799
12180
|
* Enables form association for this element.
|
|
@@ -11808,13 +12189,10 @@ class AuroButton extends LitElement {
|
|
|
11808
12189
|
super();
|
|
11809
12190
|
this.autofocus = false;
|
|
11810
12191
|
this.disabled = false;
|
|
11811
|
-
this.iconOnly = false;
|
|
11812
12192
|
this.loading = false;
|
|
12193
|
+
this.size = "md";
|
|
12194
|
+
this.shape = "rounded";
|
|
11813
12195
|
this.onDark = false;
|
|
11814
|
-
this.secondary = false;
|
|
11815
|
-
this.tertiary = false;
|
|
11816
|
-
this.rounded = false;
|
|
11817
|
-
this.slim = false;
|
|
11818
12196
|
this.fluid = false;
|
|
11819
12197
|
this.loadingText = this.loadingText || 'Loading...';
|
|
11820
12198
|
|
|
@@ -11831,55 +12209,50 @@ class AuroButton extends LitElement {
|
|
|
11831
12209
|
/**
|
|
11832
12210
|
* Generate unique names for dependency components.
|
|
11833
12211
|
*/
|
|
11834
|
-
const versioning = new AuroDependencyVersioning$
|
|
12212
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
11835
12213
|
|
|
11836
12214
|
/**
|
|
11837
12215
|
* @private
|
|
11838
12216
|
*/
|
|
11839
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
12217
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
11840
12218
|
}
|
|
11841
12219
|
|
|
11842
12220
|
static get styles() {
|
|
11843
12221
|
return [
|
|
11844
|
-
tokensCss$2,
|
|
12222
|
+
tokensCss$2$1,
|
|
11845
12223
|
styleCss$2$1,
|
|
11846
|
-
colorCss$2$1
|
|
12224
|
+
colorCss$2$1,
|
|
12225
|
+
shapeSize$1
|
|
11847
12226
|
];
|
|
11848
12227
|
}
|
|
11849
12228
|
|
|
11850
12229
|
static get properties() {
|
|
11851
12230
|
return {
|
|
11852
12231
|
|
|
11853
|
-
|
|
11854
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11855
|
-
*/
|
|
11856
|
-
autofocus: {
|
|
11857
|
-
type: Boolean,
|
|
11858
|
-
reflect: true
|
|
11859
|
-
},
|
|
12232
|
+
...super.properties,
|
|
11860
12233
|
|
|
11861
12234
|
/**
|
|
11862
|
-
*
|
|
12235
|
+
* Override layout since it isn't used in this component.
|
|
12236
|
+
* @private
|
|
11863
12237
|
*/
|
|
11864
|
-
|
|
12238
|
+
layout: {
|
|
11865
12239
|
type: Boolean,
|
|
11866
|
-
|
|
12240
|
+
attribute: false,
|
|
12241
|
+
reflect: false
|
|
11867
12242
|
},
|
|
11868
12243
|
|
|
11869
12244
|
/**
|
|
11870
|
-
*
|
|
11871
|
-
* @deprecated
|
|
12245
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11872
12246
|
*/
|
|
11873
|
-
|
|
12247
|
+
autofocus: {
|
|
11874
12248
|
type: Boolean,
|
|
11875
12249
|
reflect: true
|
|
11876
12250
|
},
|
|
11877
12251
|
|
|
11878
12252
|
/**
|
|
11879
|
-
*
|
|
11880
|
-
* @deprecated
|
|
12253
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
11881
12254
|
*/
|
|
11882
|
-
|
|
12255
|
+
disabled: {
|
|
11883
12256
|
type: Boolean,
|
|
11884
12257
|
reflect: true
|
|
11885
12258
|
},
|
|
@@ -11887,15 +12260,7 @@ class AuroButton extends LitElement {
|
|
|
11887
12260
|
/**
|
|
11888
12261
|
* Alters the shape of the button to be full width of its parent container.
|
|
11889
12262
|
*/
|
|
11890
|
-
fluid:
|
|
11891
|
-
type: Boolean,
|
|
11892
|
-
reflect: true
|
|
11893
|
-
},
|
|
11894
|
-
|
|
11895
|
-
/**
|
|
11896
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
11897
|
-
*/
|
|
11898
|
-
iconOnly: {
|
|
12263
|
+
fluid: {
|
|
11899
12264
|
type: Boolean,
|
|
11900
12265
|
reflect: true
|
|
11901
12266
|
},
|
|
@@ -11903,7 +12268,7 @@ class AuroButton extends LitElement {
|
|
|
11903
12268
|
/**
|
|
11904
12269
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
11905
12270
|
*/
|
|
11906
|
-
loading:
|
|
12271
|
+
loading: {
|
|
11907
12272
|
type: Boolean,
|
|
11908
12273
|
reflect: true
|
|
11909
12274
|
},
|
|
@@ -11911,34 +12276,10 @@ class AuroButton extends LitElement {
|
|
|
11911
12276
|
/**
|
|
11912
12277
|
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
11913
12278
|
*/
|
|
11914
|
-
loadingText:
|
|
12279
|
+
loadingText: {
|
|
11915
12280
|
type: String
|
|
11916
12281
|
},
|
|
11917
12282
|
|
|
11918
|
-
/**
|
|
11919
|
-
* Set value for on-dark version of auro-button.
|
|
11920
|
-
*/
|
|
11921
|
-
onDark: {
|
|
11922
|
-
type: Boolean,
|
|
11923
|
-
reflect: true
|
|
11924
|
-
},
|
|
11925
|
-
|
|
11926
|
-
/**
|
|
11927
|
-
* If set to true, the button will have a rounded shape.
|
|
11928
|
-
*/
|
|
11929
|
-
rounded: {
|
|
11930
|
-
type: Boolean,
|
|
11931
|
-
reflect: true
|
|
11932
|
-
},
|
|
11933
|
-
|
|
11934
|
-
/**
|
|
11935
|
-
* Set value for slim version of auro-button.
|
|
11936
|
-
*/
|
|
11937
|
-
slim: {
|
|
11938
|
-
type: Boolean,
|
|
11939
|
-
reflect: true
|
|
11940
|
-
},
|
|
11941
|
-
|
|
11942
12283
|
/**
|
|
11943
12284
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
11944
12285
|
*/
|
|
@@ -11947,48 +12288,10 @@ class AuroButton extends LitElement {
|
|
|
11947
12288
|
reflect: true
|
|
11948
12289
|
},
|
|
11949
12290
|
|
|
11950
|
-
/**
|
|
11951
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
11952
|
-
*/
|
|
11953
|
-
ariahidden: {
|
|
11954
|
-
type: String,
|
|
11955
|
-
reflect: true,
|
|
11956
|
-
},
|
|
11957
|
-
|
|
11958
|
-
/**
|
|
11959
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
11960
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
11961
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
11962
|
-
*/
|
|
11963
|
-
arialabel: {
|
|
11964
|
-
type: String,
|
|
11965
|
-
reflect: true
|
|
11966
|
-
},
|
|
11967
|
-
|
|
11968
|
-
/**
|
|
11969
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
11970
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
11971
|
-
* List multiple element IDs in a space delimited fashion.
|
|
11972
|
-
*/
|
|
11973
|
-
arialabelledby: {
|
|
11974
|
-
type: String,
|
|
11975
|
-
reflect: true
|
|
11976
|
-
},
|
|
11977
|
-
|
|
11978
|
-
/**
|
|
11979
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
11980
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
11981
|
-
* This is an optional attribute for buttons.
|
|
11982
|
-
*/
|
|
11983
|
-
ariaexpanded: {
|
|
11984
|
-
type: Boolean,
|
|
11985
|
-
reflect: true
|
|
11986
|
-
},
|
|
11987
|
-
|
|
11988
12291
|
/**
|
|
11989
12292
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
11990
12293
|
*/
|
|
11991
|
-
title:
|
|
12294
|
+
title: {
|
|
11992
12295
|
type: String,
|
|
11993
12296
|
reflect: true
|
|
11994
12297
|
},
|
|
@@ -11996,7 +12299,7 @@ class AuroButton extends LitElement {
|
|
|
11996
12299
|
/**
|
|
11997
12300
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
11998
12301
|
*/
|
|
11999
|
-
type:
|
|
12302
|
+
type: {
|
|
12000
12303
|
type: String,
|
|
12001
12304
|
reflect: true
|
|
12002
12305
|
},
|
|
@@ -12004,19 +12307,19 @@ class AuroButton extends LitElement {
|
|
|
12004
12307
|
/**
|
|
12005
12308
|
* Defines the value associated with the button which is submitted with the form data.
|
|
12006
12309
|
*/
|
|
12007
|
-
value:
|
|
12310
|
+
value: {
|
|
12008
12311
|
type: String,
|
|
12009
12312
|
reflect: true
|
|
12010
12313
|
},
|
|
12011
12314
|
|
|
12012
12315
|
/**
|
|
12013
|
-
* Sets button variant option.
|
|
12316
|
+
* Sets button variant option.
|
|
12317
|
+
* @default primary
|
|
12014
12318
|
*/
|
|
12015
|
-
variant:
|
|
12319
|
+
variant: {
|
|
12016
12320
|
type: String,
|
|
12017
12321
|
reflect: true
|
|
12018
12322
|
},
|
|
12019
|
-
ready: { type: Boolean },
|
|
12020
12323
|
};
|
|
12021
12324
|
}
|
|
12022
12325
|
|
|
@@ -12029,7 +12332,7 @@ class AuroButton extends LitElement {
|
|
|
12029
12332
|
*
|
|
12030
12333
|
*/
|
|
12031
12334
|
static register(name = "auro-button") {
|
|
12032
|
-
AuroLibraryRuntimeUtils$
|
|
12335
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
12033
12336
|
}
|
|
12034
12337
|
|
|
12035
12338
|
/**
|
|
@@ -12041,17 +12344,6 @@ class AuroButton extends LitElement {
|
|
|
12041
12344
|
this.renderRoot.querySelector('button').focus();
|
|
12042
12345
|
}
|
|
12043
12346
|
|
|
12044
|
-
updated() {
|
|
12045
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12046
|
-
if (this.secondary) {
|
|
12047
|
-
this.setAttribute('variant', 'secondary');
|
|
12048
|
-
}
|
|
12049
|
-
|
|
12050
|
-
if (this.tertiary) {
|
|
12051
|
-
this.setAttribute('variant', 'tertiary');
|
|
12052
|
-
}
|
|
12053
|
-
}
|
|
12054
|
-
|
|
12055
12347
|
/**
|
|
12056
12348
|
* Submits the form that this button is associated with.
|
|
12057
12349
|
* @private
|
|
@@ -12072,25 +12364,56 @@ class AuroButton extends LitElement {
|
|
|
12072
12364
|
return this.internals ? this.internals.form : null;
|
|
12073
12365
|
}
|
|
12074
12366
|
|
|
12075
|
-
|
|
12367
|
+
/**
|
|
12368
|
+
* @private
|
|
12369
|
+
* @returns {Boolean}
|
|
12370
|
+
*/
|
|
12371
|
+
get hideText() {
|
|
12372
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
12373
|
+
}
|
|
12374
|
+
|
|
12375
|
+
/**
|
|
12376
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
12377
|
+
* @returns {string | undefined}
|
|
12378
|
+
* @private
|
|
12379
|
+
*/
|
|
12380
|
+
get currentAriaLabel() {
|
|
12381
|
+
if (!this.attributeWatcher) return undefined;
|
|
12382
|
+
|
|
12383
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
12384
|
+
return ariaLabel || undefined;
|
|
12385
|
+
}
|
|
12386
|
+
|
|
12387
|
+
/**
|
|
12388
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
12389
|
+
* @returns {string | undefined}
|
|
12390
|
+
* @private
|
|
12391
|
+
*/
|
|
12392
|
+
get currentAriaLabelledBy() {
|
|
12393
|
+
if (!this.attributeWatcher) return undefined;
|
|
12394
|
+
|
|
12395
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
12396
|
+
return ariaLabelledBy || undefined;
|
|
12397
|
+
}
|
|
12398
|
+
|
|
12399
|
+
/**
|
|
12400
|
+
* Renders the default layout for the button.
|
|
12401
|
+
* @returns {TemplateResult}
|
|
12402
|
+
* @private
|
|
12403
|
+
*/
|
|
12404
|
+
renderLayoutDefault() {
|
|
12076
12405
|
const classes = {
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
'auro-button--slim': this.slim,
|
|
12082
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12083
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12084
|
-
'loading': this.loading
|
|
12406
|
+
"util_insetLg--squish": true,
|
|
12407
|
+
"auro-button": true,
|
|
12408
|
+
wrapper: true,
|
|
12409
|
+
loading: this.loading,
|
|
12085
12410
|
};
|
|
12086
12411
|
|
|
12087
12412
|
return html`
|
|
12088
12413
|
<button
|
|
12089
12414
|
part="button"
|
|
12090
|
-
aria-
|
|
12091
|
-
aria-
|
|
12092
|
-
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12093
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
12415
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
12416
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12094
12417
|
tabIndex="${ifDefined(this.tIndex)}"
|
|
12095
12418
|
?autofocus="${this.autofocus}"
|
|
12096
12419
|
class="${classMap(classes)}"
|
|
@@ -12107,7 +12430,7 @@ class AuroButton extends LitElement {
|
|
|
12107
12430
|
|
|
12108
12431
|
<span class="contentWrapper">
|
|
12109
12432
|
<span class="textSlot" part="text">
|
|
12110
|
-
${this.
|
|
12433
|
+
${this.hideText ? undefined : html`<slot></slot>`}
|
|
12111
12434
|
</span>
|
|
12112
12435
|
|
|
12113
12436
|
<span part="icon">
|
|
@@ -12117,13 +12440,22 @@ class AuroButton extends LitElement {
|
|
|
12117
12440
|
</button>
|
|
12118
12441
|
`;
|
|
12119
12442
|
}
|
|
12120
|
-
}
|
|
12121
12443
|
|
|
12122
|
-
|
|
12444
|
+
/**
|
|
12445
|
+
* Renders the layout of the button
|
|
12446
|
+
* @returns {TemplateResult}
|
|
12447
|
+
* @private
|
|
12448
|
+
*/
|
|
12449
|
+
renderLayout() {
|
|
12450
|
+
return this.renderLayoutDefault();
|
|
12451
|
+
}
|
|
12452
|
+
};
|
|
12453
|
+
|
|
12454
|
+
var buttonVersion$1 = '9.3.0';
|
|
12123
12455
|
|
|
12124
|
-
var colorCss$
|
|
12456
|
+
var colorCss$5 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
12125
12457
|
|
|
12126
|
-
var styleCss$
|
|
12458
|
+
var styleCss$6 = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
12127
12459
|
|
|
12128
12460
|
var tokensCss$5 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
12129
12461
|
|
|
@@ -12220,8 +12552,8 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
12220
12552
|
|
|
12221
12553
|
static get styles() {
|
|
12222
12554
|
return [
|
|
12223
|
-
colorCss$
|
|
12224
|
-
styleCss$
|
|
12555
|
+
colorCss$5,
|
|
12556
|
+
styleCss$6,
|
|
12225
12557
|
tokensCss$5
|
|
12226
12558
|
];
|
|
12227
12559
|
}
|
|
@@ -12347,7 +12679,7 @@ class AuroInput extends BaseInput {
|
|
|
12347
12679
|
/**
|
|
12348
12680
|
* @private
|
|
12349
12681
|
*/
|
|
12350
|
-
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
12682
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$1, AuroButton$1);
|
|
12351
12683
|
|
|
12352
12684
|
/**
|
|
12353
12685
|
* @private
|
|
@@ -12371,7 +12703,7 @@ class AuroInput extends BaseInput {
|
|
|
12371
12703
|
css`${classicColorCss}`,
|
|
12372
12704
|
css`${shapeSizeCss}`,
|
|
12373
12705
|
css`${colorBaseCss}`,
|
|
12374
|
-
css`${styleCss$4}`,
|
|
12706
|
+
css`${styleCss$4$1}`,
|
|
12375
12707
|
css`${styleDefaultCss}`,
|
|
12376
12708
|
css`${tokensCss$4}`,
|
|
12377
12709
|
css`${emphasizedStyleCss}`,
|
|
@@ -12463,7 +12795,7 @@ class AuroInput extends BaseInput {
|
|
|
12463
12795
|
*
|
|
12464
12796
|
*/
|
|
12465
12797
|
static register(name = "auro-input") {
|
|
12466
|
-
AuroLibraryRuntimeUtils$
|
|
12798
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroInput);
|
|
12467
12799
|
}
|
|
12468
12800
|
|
|
12469
12801
|
/**
|
|
@@ -12593,11 +12925,12 @@ class AuroInput extends BaseInput {
|
|
|
12593
12925
|
?onDark="${this.onDark}"
|
|
12594
12926
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
12595
12927
|
class="notificationBtn clearBtn"
|
|
12596
|
-
|
|
12597
|
-
|
|
12928
|
+
shape="circle"
|
|
12929
|
+
size="sm"
|
|
12930
|
+
variant="ghost">
|
|
12598
12931
|
<${this.iconTag}
|
|
12932
|
+
customColor="${this.onDark}"
|
|
12599
12933
|
category="interface"
|
|
12600
|
-
customColor
|
|
12601
12934
|
name="x-lg"
|
|
12602
12935
|
>
|
|
12603
12936
|
</${this.iconTag}>
|
|
@@ -12617,20 +12950,21 @@ class AuroInput extends BaseInput {
|
|
|
12617
12950
|
<${this.buttonTag}
|
|
12618
12951
|
@click="${this.handleClickShowPassword}"
|
|
12619
12952
|
?onDark="${this.onDark}"
|
|
12620
|
-
aria-hidden="true"
|
|
12621
12953
|
class="notificationBtn passwordBtn"
|
|
12622
|
-
|
|
12623
|
-
|
|
12954
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
12955
|
+
shape="circle"
|
|
12956
|
+
size="sm"
|
|
12957
|
+
variant="ghost">
|
|
12624
12958
|
<${this.iconTag}
|
|
12959
|
+
customColor="${this.onDark}"
|
|
12625
12960
|
?hidden=${!this.showPassword}
|
|
12626
12961
|
category="interface"
|
|
12627
|
-
customColor
|
|
12628
12962
|
name="hide-password-stroke">
|
|
12629
12963
|
</${this.iconTag}>
|
|
12630
12964
|
<${this.iconTag}
|
|
12965
|
+
customColor="${this.onDark}"
|
|
12631
12966
|
?hidden=${this.showPassword}
|
|
12632
12967
|
category="interface"
|
|
12633
|
-
customColor
|
|
12634
12968
|
name="view-password-stroke">
|
|
12635
12969
|
</${this.iconTag}>
|
|
12636
12970
|
</${this.buttonTag}>
|
|
@@ -12840,9 +13174,9 @@ class AuroInput extends BaseInput {
|
|
|
12840
13174
|
|
|
12841
13175
|
var inputVersion = '4.2.0';
|
|
12842
13176
|
|
|
12843
|
-
var colorCss$
|
|
13177
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
12844
13178
|
|
|
12845
|
-
var styleCss$
|
|
13179
|
+
var styleCss$4 = css`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){box-sizing:border-box;padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
12846
13180
|
|
|
12847
13181
|
var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
12848
13182
|
|
|
@@ -12853,7 +13187,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
12853
13187
|
|
|
12854
13188
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12855
13189
|
|
|
12856
|
-
let AuroLibraryRuntimeUtils$
|
|
13190
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
12857
13191
|
|
|
12858
13192
|
/* eslint-disable jsdoc/require-param */
|
|
12859
13193
|
|
|
@@ -12956,63 +13290,1060 @@ class AuroDependencyVersioning {
|
|
|
12956
13290
|
}
|
|
12957
13291
|
}
|
|
12958
13292
|
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
13293
|
+
/**
|
|
13294
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
13295
|
+
*/
|
|
13296
|
+
const _observers = new WeakMap();
|
|
12962
13297
|
|
|
12963
13298
|
/**
|
|
12964
|
-
*
|
|
12965
|
-
*
|
|
12966
|
-
*
|
|
13299
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
13300
|
+
* Structure: {
|
|
13301
|
+
* host: {
|
|
13302
|
+
* matchers: Set<Function>,
|
|
13303
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
13304
|
+
* }
|
|
13305
|
+
* }
|
|
12967
13306
|
*/
|
|
13307
|
+
const _transportConfig = new WeakMap();
|
|
12968
13308
|
|
|
12969
|
-
|
|
13309
|
+
/**
|
|
13310
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
13311
|
+
*
|
|
13312
|
+
* @param {Object} params - The parameters for the function.
|
|
13313
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
13314
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13315
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
13316
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
13317
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
13318
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
13319
|
+
*/
|
|
13320
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
13321
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
13322
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
13323
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
13324
|
+
}
|
|
12970
13325
|
|
|
12971
|
-
//
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
hidden: { type: Boolean,
|
|
12975
|
-
reflect: true },
|
|
12976
|
-
hiddenVisually: { type: Boolean,
|
|
12977
|
-
reflect: true },
|
|
12978
|
-
hiddenAudible: { type: Boolean,
|
|
12979
|
-
reflect: true },
|
|
12980
|
-
};
|
|
13326
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
13327
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
13328
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
12981
13329
|
}
|
|
12982
13330
|
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
if (value) {
|
|
12988
|
-
return 'true'
|
|
12989
|
-
}
|
|
13331
|
+
// Guard Clause: Ensure match is a function
|
|
13332
|
+
if (typeof match !== 'function') {
|
|
13333
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
13334
|
+
}
|
|
12990
13335
|
|
|
12991
|
-
|
|
13336
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
13337
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
13338
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
12992
13339
|
}
|
|
13340
|
+
|
|
13341
|
+
// Register this transport and get cleanup function
|
|
13342
|
+
return _registerTransport({
|
|
13343
|
+
host,
|
|
13344
|
+
target,
|
|
13345
|
+
matcher: match,
|
|
13346
|
+
removeOriginal
|
|
13347
|
+
});
|
|
12993
13348
|
};
|
|
12994
13349
|
|
|
12995
|
-
var error = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
12996
|
-
|
|
12997
|
-
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
12998
|
-
|
|
12999
|
-
const _fetchMap = new Map();
|
|
13000
|
-
|
|
13001
13350
|
/**
|
|
13002
|
-
*
|
|
13003
|
-
*
|
|
13004
|
-
* @
|
|
13005
|
-
* @param {
|
|
13006
|
-
* @
|
|
13351
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
13352
|
+
*
|
|
13353
|
+
* @param {Object} params - The parameters object.
|
|
13354
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
13355
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
13356
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
13357
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
13358
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
13359
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
13360
|
+
* @private
|
|
13007
13361
|
*/
|
|
13362
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13363
|
+
// Initialize config for this host if it doesn't exist
|
|
13364
|
+
if (!_transportConfig.has(host)) {
|
|
13365
|
+
_transportConfig.set(host, {
|
|
13366
|
+
matchers: new Set(),
|
|
13367
|
+
targets: new Map()
|
|
13368
|
+
});
|
|
13369
|
+
}
|
|
13370
|
+
|
|
13371
|
+
const config = _transportConfig.get(host);
|
|
13372
|
+
|
|
13373
|
+
// Add the matcher to the set of matchers for this host
|
|
13374
|
+
config.matchers.add(matcher);
|
|
13375
|
+
|
|
13376
|
+
// Initialize target entry if it doesn't exist
|
|
13377
|
+
if (!config.targets.has(target)) {
|
|
13378
|
+
config.targets.set(target, new Map());
|
|
13379
|
+
}
|
|
13380
|
+
|
|
13381
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
13382
|
+
config.targets.get(target).set(matcher, {
|
|
13383
|
+
removeOriginal,
|
|
13384
|
+
currentAttributes: new Map()
|
|
13385
|
+
});
|
|
13386
|
+
|
|
13387
|
+
// Perform initial attribute transport
|
|
13388
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
13389
|
+
|
|
13390
|
+
// Attach observer
|
|
13391
|
+
_attachObserver(host);
|
|
13392
|
+
|
|
13393
|
+
// Return cleanup function and utility functions
|
|
13394
|
+
return {
|
|
13395
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
13396
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
13397
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
13398
|
+
}
|
|
13399
|
+
};
|
|
13008
13400
|
|
|
13009
13401
|
/**
|
|
13010
|
-
*
|
|
13011
|
-
*
|
|
13012
|
-
* @param {
|
|
13013
|
-
* @param {
|
|
13014
|
-
* @param {
|
|
13015
|
-
* @
|
|
13402
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
13403
|
+
*
|
|
13404
|
+
* @param {HTMLElement} host - The host element
|
|
13405
|
+
* @param {HTMLElement} target - The target element
|
|
13406
|
+
* @param {Function} matcher - The matcher function
|
|
13407
|
+
* @private
|
|
13408
|
+
*/
|
|
13409
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
13410
|
+
const config = _transportConfig.get(host);
|
|
13411
|
+
if (!config) return;
|
|
13412
|
+
|
|
13413
|
+
// Remove this matcher from this target
|
|
13414
|
+
const targetMatchers = config.targets.get(target);
|
|
13415
|
+
if (targetMatchers) {
|
|
13416
|
+
targetMatchers.delete(matcher);
|
|
13417
|
+
|
|
13418
|
+
// If this target has no more matchers, remove it
|
|
13419
|
+
if (targetMatchers.size === 0) {
|
|
13420
|
+
config.targets.delete(target);
|
|
13421
|
+
}
|
|
13422
|
+
}
|
|
13423
|
+
|
|
13424
|
+
// Check if this matcher is still used by any target
|
|
13425
|
+
let matcherStillUsed = false;
|
|
13426
|
+
for (const matcherMap of config.targets.values()) {
|
|
13427
|
+
if (matcherMap.has(matcher)) {
|
|
13428
|
+
matcherStillUsed = true;
|
|
13429
|
+
break;
|
|
13430
|
+
}
|
|
13431
|
+
}
|
|
13432
|
+
|
|
13433
|
+
// If not used anymore, remove from matchers set
|
|
13434
|
+
if (!matcherStillUsed) {
|
|
13435
|
+
config.matchers.delete(matcher);
|
|
13436
|
+
}
|
|
13437
|
+
|
|
13438
|
+
// If no more targets or matchers, detach observer
|
|
13439
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
13440
|
+
_detachObserver(host);
|
|
13441
|
+
}
|
|
13442
|
+
};
|
|
13443
|
+
|
|
13444
|
+
/**
|
|
13445
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
13446
|
+
*
|
|
13447
|
+
* @param {Object} params - The parameters object.
|
|
13448
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
13449
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13450
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
13451
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
13452
|
+
* @returns {void}
|
|
13453
|
+
* @private
|
|
13454
|
+
*/
|
|
13455
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13456
|
+
// Get a list of all matching attributes on the host element and their values
|
|
13457
|
+
const matchingAttributes = host.getAttributeNames()
|
|
13458
|
+
.filter(attr => matcher(attr))
|
|
13459
|
+
.reduce((acc, attr) => {
|
|
13460
|
+
acc[attr] = host.getAttribute(attr);
|
|
13461
|
+
return acc;
|
|
13462
|
+
}, {});
|
|
13463
|
+
|
|
13464
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
13465
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
13466
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
13467
|
+
target.setAttribute(key, value);
|
|
13468
|
+
if (removeOriginal) {
|
|
13469
|
+
host.removeAttribute(key);
|
|
13470
|
+
}
|
|
13471
|
+
});
|
|
13472
|
+
};
|
|
13473
|
+
|
|
13474
|
+
/**
|
|
13475
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
13476
|
+
*
|
|
13477
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
13478
|
+
* @returns {MutationObserver} The observer instance.
|
|
13479
|
+
* @private
|
|
13480
|
+
*/
|
|
13481
|
+
const _attachObserver = (host) => {
|
|
13482
|
+
// If an observer for this host already exists, return it
|
|
13483
|
+
if (_observers.has(host)) {
|
|
13484
|
+
return _observers.get(host);
|
|
13485
|
+
}
|
|
13486
|
+
|
|
13487
|
+
// Create a new MutationObserver
|
|
13488
|
+
const observer = new MutationObserver((mutations) => {
|
|
13489
|
+
const config = _transportConfig.get(host);
|
|
13490
|
+
if (!config) return;
|
|
13491
|
+
|
|
13492
|
+
// For each mutation affecting attributes
|
|
13493
|
+
mutations
|
|
13494
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
13495
|
+
.forEach(mutation => {
|
|
13496
|
+
const attributeName = mutation.attributeName;
|
|
13497
|
+
|
|
13498
|
+
// Find matchers that care about this attribute
|
|
13499
|
+
for (const matcher of config.matchers) {
|
|
13500
|
+
if (matcher(attributeName)) {
|
|
13501
|
+
// For each target that uses this matcher
|
|
13502
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
13503
|
+
if (matcherConfigs.has(matcher)) {
|
|
13504
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
13505
|
+
_transportAttributes({
|
|
13506
|
+
host,
|
|
13507
|
+
target,
|
|
13508
|
+
matcher,
|
|
13509
|
+
removeOriginal
|
|
13510
|
+
});
|
|
13511
|
+
}
|
|
13512
|
+
}
|
|
13513
|
+
}
|
|
13514
|
+
}
|
|
13515
|
+
});
|
|
13516
|
+
});
|
|
13517
|
+
|
|
13518
|
+
// Start observing attribute changes
|
|
13519
|
+
observer.observe(host, { attributes: true });
|
|
13520
|
+
|
|
13521
|
+
// Store the observer
|
|
13522
|
+
_observers.set(host, observer);
|
|
13523
|
+
|
|
13524
|
+
return observer;
|
|
13525
|
+
};
|
|
13526
|
+
|
|
13527
|
+
/**
|
|
13528
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
13529
|
+
*
|
|
13530
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
13531
|
+
* @private
|
|
13532
|
+
*/
|
|
13533
|
+
const _detachObserver = (host) => {
|
|
13534
|
+
if (_observers.has(host)) {
|
|
13535
|
+
const observer = _observers.get(host);
|
|
13536
|
+
observer.disconnect();
|
|
13537
|
+
_observers.delete(host);
|
|
13538
|
+
}
|
|
13539
|
+
|
|
13540
|
+
// Clean up the transport config as well
|
|
13541
|
+
if (_transportConfig.has(host)) {
|
|
13542
|
+
_transportConfig.delete(host);
|
|
13543
|
+
}
|
|
13544
|
+
};
|
|
13545
|
+
|
|
13546
|
+
/**
|
|
13547
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
13548
|
+
* @param {HTMLElement} host - The host element
|
|
13549
|
+
* @param {HTMLElement} target - The target element
|
|
13550
|
+
* @param {Function} matcher - The matcher function
|
|
13551
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
13552
|
+
* @private
|
|
13553
|
+
*/
|
|
13554
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
13555
|
+
const config = _transportConfig.get(host);
|
|
13556
|
+
if (!config) return undefined;
|
|
13557
|
+
|
|
13558
|
+
const targetMatchers = config.targets.get(target);
|
|
13559
|
+
if (!targetMatchers) return undefined;
|
|
13560
|
+
|
|
13561
|
+
return targetMatchers.get(matcher);
|
|
13562
|
+
};
|
|
13563
|
+
|
|
13564
|
+
/**
|
|
13565
|
+
* Sets an observed attribute value
|
|
13566
|
+
* @param {HTMLElement} host - The host element
|
|
13567
|
+
* @param {HTMLElement} target - The target element
|
|
13568
|
+
* @param {Function} matcher - The matcher function
|
|
13569
|
+
* @param {string} key - The attribute name
|
|
13570
|
+
* @param {string} value - The attribute value
|
|
13571
|
+
* @private
|
|
13572
|
+
*/
|
|
13573
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
13574
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13575
|
+
if (matcherConfig) {
|
|
13576
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
13577
|
+
}
|
|
13578
|
+
};
|
|
13579
|
+
|
|
13580
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
13581
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13582
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13583
|
+
return undefined;
|
|
13584
|
+
};
|
|
13585
|
+
|
|
13586
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
13587
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13588
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13589
|
+
return [];
|
|
13590
|
+
};
|
|
13591
|
+
|
|
13592
|
+
const _matchers = {
|
|
13593
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13594
|
+
'role': attr => attr.match(/^role$/)
|
|
13595
|
+
};
|
|
13596
|
+
|
|
13597
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
13598
|
+
return transportAttributes({
|
|
13599
|
+
host,
|
|
13600
|
+
target,
|
|
13601
|
+
match: attr => {
|
|
13602
|
+
for (const key in _matchers) {
|
|
13603
|
+
if (_matchers[key](attr)) return true;
|
|
13604
|
+
}
|
|
13605
|
+
return false;
|
|
13606
|
+
},
|
|
13607
|
+
removeOriginal
|
|
13608
|
+
});
|
|
13609
|
+
};
|
|
13610
|
+
|
|
13611
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
13612
|
+
|
|
13613
|
+
/**
|
|
13614
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13615
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13616
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13617
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
13618
|
+
* @private
|
|
13619
|
+
*/
|
|
13620
|
+
attributeWatcher;
|
|
13621
|
+
|
|
13622
|
+
static get properties() {
|
|
13623
|
+
return {
|
|
13624
|
+
|
|
13625
|
+
/**
|
|
13626
|
+
* Defines the layout of an element.
|
|
13627
|
+
* @default {'default'}
|
|
13628
|
+
*/
|
|
13629
|
+
layout: {
|
|
13630
|
+
type: String,
|
|
13631
|
+
attribute: "layout",
|
|
13632
|
+
reflect: true
|
|
13633
|
+
},
|
|
13634
|
+
|
|
13635
|
+
/**
|
|
13636
|
+
* Defines the shape of an element.
|
|
13637
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13638
|
+
* @default {'default'}
|
|
13639
|
+
*/
|
|
13640
|
+
shape: {
|
|
13641
|
+
type: String,
|
|
13642
|
+
attribute: "shape",
|
|
13643
|
+
reflect: true
|
|
13644
|
+
},
|
|
13645
|
+
|
|
13646
|
+
/**
|
|
13647
|
+
* Defines the size of an element.
|
|
13648
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13649
|
+
* @default {'md'}
|
|
13650
|
+
*/
|
|
13651
|
+
size: {
|
|
13652
|
+
type: String,
|
|
13653
|
+
attribute: "size",
|
|
13654
|
+
reflect: true
|
|
13655
|
+
},
|
|
13656
|
+
|
|
13657
|
+
/**
|
|
13658
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13659
|
+
* @default {false}
|
|
13660
|
+
*/
|
|
13661
|
+
onDark: {
|
|
13662
|
+
type: Boolean,
|
|
13663
|
+
attribute: "ondark",
|
|
13664
|
+
reflect: true
|
|
13665
|
+
},
|
|
13666
|
+
|
|
13667
|
+
/**
|
|
13668
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13669
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13670
|
+
* @type {HTMLElement|null}
|
|
13671
|
+
* @default {null}
|
|
13672
|
+
* @private
|
|
13673
|
+
*/
|
|
13674
|
+
wrapper: {
|
|
13675
|
+
type: HTMLElement,
|
|
13676
|
+
attribute: false,
|
|
13677
|
+
reflect: false
|
|
13678
|
+
}
|
|
13679
|
+
};
|
|
13680
|
+
}
|
|
13681
|
+
|
|
13682
|
+
|
|
13683
|
+
|
|
13684
|
+
resetShapeClasses() {
|
|
13685
|
+
if (this.shape && this.size) {
|
|
13686
|
+
|
|
13687
|
+
if (this.wrapper) {
|
|
13688
|
+
this.wrapper.classList.forEach((className) => {
|
|
13689
|
+
if (className.startsWith('shape-')) {
|
|
13690
|
+
this.wrapper.classList.remove(className);
|
|
13691
|
+
}
|
|
13692
|
+
});
|
|
13693
|
+
|
|
13694
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13695
|
+
}
|
|
13696
|
+
}
|
|
13697
|
+
}
|
|
13698
|
+
|
|
13699
|
+
resetLayoutClasses() {
|
|
13700
|
+
if (this.layout) {
|
|
13701
|
+
if (this.wrapper) {
|
|
13702
|
+
this.wrapper.classList.forEach((className) => {
|
|
13703
|
+
if (className.startsWith('layout-')) {
|
|
13704
|
+
this.wrapper.classList.remove(className);
|
|
13705
|
+
}
|
|
13706
|
+
});
|
|
13707
|
+
|
|
13708
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13709
|
+
}
|
|
13710
|
+
}
|
|
13711
|
+
}
|
|
13712
|
+
|
|
13713
|
+
updateComponentArchitecture() {
|
|
13714
|
+
this.resetLayoutClasses();
|
|
13715
|
+
this.resetShapeClasses();
|
|
13716
|
+
}
|
|
13717
|
+
|
|
13718
|
+
updated(changedProperties) {
|
|
13719
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13720
|
+
this.updateComponentArchitecture();
|
|
13721
|
+
}
|
|
13722
|
+
}
|
|
13723
|
+
|
|
13724
|
+
firstUpdated() {
|
|
13725
|
+
super.firstUpdated();
|
|
13726
|
+
|
|
13727
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13728
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13729
|
+
|
|
13730
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13731
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13732
|
+
}
|
|
13733
|
+
|
|
13734
|
+
disconnectedCallback() {
|
|
13735
|
+
super.disconnectedCallback();
|
|
13736
|
+
|
|
13737
|
+
// Cleanup the ARIA observer if it exists
|
|
13738
|
+
if (this.attributeWatcher) {
|
|
13739
|
+
this.attributeWatcher.cleanup();
|
|
13740
|
+
this.attributeWatcher = null;
|
|
13741
|
+
}
|
|
13742
|
+
}
|
|
13743
|
+
|
|
13744
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13745
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13746
|
+
render() {
|
|
13747
|
+
try {
|
|
13748
|
+
return this.renderLayout();
|
|
13749
|
+
} catch (error) {
|
|
13750
|
+
// failed to get the defined layout
|
|
13751
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
13752
|
+
|
|
13753
|
+
// fallback to the default layout
|
|
13754
|
+
return this.getLayout('default');
|
|
13755
|
+
}
|
|
13756
|
+
}
|
|
13757
|
+
};
|
|
13758
|
+
|
|
13759
|
+
var styleCss$3 = 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}::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);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;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;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=secondary]):not([variant=tertiary]),.auro-button:focus: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=ghost]:disabled{cursor:not-allowed;transform: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{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]),.auro-button--iconOnly:not(.auro-button--rounded):focus: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:padding 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,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}: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}`;
|
|
13760
|
+
|
|
13761
|
+
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=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]: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=ghost]: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:not([ondark])[variant=flat]: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[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=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]: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=ghost]: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}.auro-button[ondark][variant=flat]: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)}`;
|
|
13762
|
+
|
|
13763
|
+
var tokensCss$2 = css`:host(:not([onDark])){--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}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--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-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
13764
|
+
|
|
13765
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
13766
|
+
|
|
13767
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13768
|
+
// See LICENSE in the project root for license information.
|
|
13769
|
+
|
|
13770
|
+
// ---------------------------------------------------------------------
|
|
13771
|
+
|
|
13772
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13773
|
+
|
|
13774
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13775
|
+
|
|
13776
|
+
/* eslint-disable jsdoc/require-param */
|
|
13777
|
+
|
|
13778
|
+
/**
|
|
13779
|
+
* This will register a new custom element with the browser.
|
|
13780
|
+
* @param {String} name - The name of the custom element.
|
|
13781
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13782
|
+
* @returns {void}
|
|
13783
|
+
*/
|
|
13784
|
+
registerComponent(name, componentClass) {
|
|
13785
|
+
if (!customElements.get(name)) {
|
|
13786
|
+
customElements.define(name, class extends componentClass {});
|
|
13787
|
+
}
|
|
13788
|
+
}
|
|
13789
|
+
|
|
13790
|
+
/**
|
|
13791
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13792
|
+
* @returns {void}
|
|
13793
|
+
*/
|
|
13794
|
+
closestElement(
|
|
13795
|
+
selector, // selector like in .closest()
|
|
13796
|
+
base = this, // extra functionality to skip a parent
|
|
13797
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13798
|
+
!el || el === document || el === window
|
|
13799
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13800
|
+
: found
|
|
13801
|
+
? found // found a selector INside this element
|
|
13802
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13803
|
+
) {
|
|
13804
|
+
return __Closest(base);
|
|
13805
|
+
}
|
|
13806
|
+
/* eslint-enable jsdoc/require-param */
|
|
13807
|
+
|
|
13808
|
+
/**
|
|
13809
|
+
* 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.
|
|
13810
|
+
* @param {Object} elem - The element to check.
|
|
13811
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13812
|
+
* @returns {void}
|
|
13813
|
+
*/
|
|
13814
|
+
handleComponentTagRename(elem, tagName) {
|
|
13815
|
+
const tag = tagName.toLowerCase();
|
|
13816
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13817
|
+
|
|
13818
|
+
if (elemTag !== tag) {
|
|
13819
|
+
elem.setAttribute(tag, true);
|
|
13820
|
+
}
|
|
13821
|
+
}
|
|
13822
|
+
|
|
13823
|
+
/**
|
|
13824
|
+
* Validates if an element is a specific Auro component.
|
|
13825
|
+
* @param {Object} elem - The element to validate.
|
|
13826
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13827
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13828
|
+
*/
|
|
13829
|
+
elementMatch(elem, tagName) {
|
|
13830
|
+
const tag = tagName.toLowerCase();
|
|
13831
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13832
|
+
|
|
13833
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13834
|
+
}
|
|
13835
|
+
};
|
|
13836
|
+
|
|
13837
|
+
var styleCss$2 = 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}}`;
|
|
13838
|
+
|
|
13839
|
+
var colorCss$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}`;
|
|
13840
|
+
|
|
13841
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
13842
|
+
|
|
13843
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13844
|
+
// See LICENSE in the project root for license information.
|
|
13845
|
+
|
|
13846
|
+
|
|
13847
|
+
class AuroLoader extends LitElement {
|
|
13848
|
+
constructor() {
|
|
13849
|
+
super();
|
|
13850
|
+
|
|
13851
|
+
/**
|
|
13852
|
+
* @private
|
|
13853
|
+
*/
|
|
13854
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
13855
|
+
|
|
13856
|
+
/**
|
|
13857
|
+
* @private
|
|
13858
|
+
*/
|
|
13859
|
+
this.mdCount = 3;
|
|
13860
|
+
|
|
13861
|
+
/**
|
|
13862
|
+
* @private
|
|
13863
|
+
*/
|
|
13864
|
+
this.smCount = 2;
|
|
13865
|
+
|
|
13866
|
+
/**
|
|
13867
|
+
* @private
|
|
13868
|
+
*/
|
|
13869
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
13870
|
+
|
|
13871
|
+
this.orbit = false;
|
|
13872
|
+
this.ringworm = false;
|
|
13873
|
+
this.laser = false;
|
|
13874
|
+
this.pulse = false;
|
|
13875
|
+
}
|
|
13876
|
+
|
|
13877
|
+
// function to define props used within the scope of this component
|
|
13878
|
+
static get properties() {
|
|
13879
|
+
return {
|
|
13880
|
+
|
|
13881
|
+
/**
|
|
13882
|
+
* Sets loader to laser type.
|
|
13883
|
+
*/
|
|
13884
|
+
laser: {
|
|
13885
|
+
type: Boolean,
|
|
13886
|
+
reflect: true
|
|
13887
|
+
},
|
|
13888
|
+
|
|
13889
|
+
/**
|
|
13890
|
+
* Sets loader to orbit type.
|
|
13891
|
+
*/
|
|
13892
|
+
orbit: {
|
|
13893
|
+
type: Boolean,
|
|
13894
|
+
reflect: true
|
|
13895
|
+
},
|
|
13896
|
+
|
|
13897
|
+
/**
|
|
13898
|
+
* Sets loader to pulse type.
|
|
13899
|
+
*/
|
|
13900
|
+
pulse: {
|
|
13901
|
+
type: Boolean,
|
|
13902
|
+
reflect: true
|
|
13903
|
+
},
|
|
13904
|
+
|
|
13905
|
+
/**
|
|
13906
|
+
* Sets loader to ringworm type.
|
|
13907
|
+
*/
|
|
13908
|
+
ringworm: {
|
|
13909
|
+
type: Boolean,
|
|
13910
|
+
reflect: true
|
|
13911
|
+
}
|
|
13912
|
+
};
|
|
13913
|
+
}
|
|
13914
|
+
|
|
13915
|
+
static get styles() {
|
|
13916
|
+
return [
|
|
13917
|
+
css`${styleCss$2}`,
|
|
13918
|
+
css`${colorCss$1}`,
|
|
13919
|
+
css`${tokensCss$1}`
|
|
13920
|
+
];
|
|
13921
|
+
}
|
|
13922
|
+
|
|
13923
|
+
/**
|
|
13924
|
+
* This will register this element with the browser.
|
|
13925
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
13926
|
+
*
|
|
13927
|
+
* @example
|
|
13928
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
13929
|
+
*
|
|
13930
|
+
*/
|
|
13931
|
+
static register(name = "auro-loader") {
|
|
13932
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
13933
|
+
}
|
|
13934
|
+
|
|
13935
|
+
firstUpdated() {
|
|
13936
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
13937
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
13938
|
+
}
|
|
13939
|
+
|
|
13940
|
+
connectedCallback() {
|
|
13941
|
+
super.connectedCallback();
|
|
13942
|
+
}
|
|
13943
|
+
|
|
13944
|
+
/**
|
|
13945
|
+
* @private
|
|
13946
|
+
* @returns {Array} Numbered array for template map.
|
|
13947
|
+
*/
|
|
13948
|
+
defineTemplate() {
|
|
13949
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
13950
|
+
|
|
13951
|
+
if (this.orbit || this.laser) {
|
|
13952
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
13953
|
+
} else if (this.ringworm) {
|
|
13954
|
+
nodes = Array.from(Array(0).keys());
|
|
13955
|
+
}
|
|
13956
|
+
|
|
13957
|
+
return nodes;
|
|
13958
|
+
}
|
|
13959
|
+
|
|
13960
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
13961
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
13962
|
+
|
|
13963
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
13964
|
+
render() {
|
|
13965
|
+
return html$1`
|
|
13966
|
+
${this.defineTemplate().map((idx) => html$1`
|
|
13967
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
13968
|
+
`)}
|
|
13969
|
+
|
|
13970
|
+
<div class="no-animation">Loading...</div>
|
|
13971
|
+
|
|
13972
|
+
${this.ringworm ? html$1`
|
|
13973
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
13974
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
13975
|
+
</svg>`
|
|
13976
|
+
: ``
|
|
13977
|
+
}
|
|
13978
|
+
`;
|
|
13979
|
+
}
|
|
13980
|
+
}
|
|
13981
|
+
|
|
13982
|
+
var loaderVersion = '5.0.0';
|
|
13983
|
+
|
|
13984
|
+
/* eslint-disable max-lines, curly */
|
|
13985
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13986
|
+
// See LICENSE in the project root for license information.
|
|
13987
|
+
|
|
13988
|
+
|
|
13989
|
+
/**
|
|
13990
|
+
* @slot - Default slot for the text of the button.
|
|
13991
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
13992
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
13993
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
13994
|
+
* @csspart text - Apply CSS to text slot.
|
|
13995
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
13996
|
+
*/
|
|
13997
|
+
|
|
13998
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
13999
|
+
|
|
14000
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
14001
|
+
|
|
14002
|
+
/**
|
|
14003
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
14004
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
14005
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
14006
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
14007
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
14008
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
14009
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
14010
|
+
*/
|
|
14011
|
+
class AuroButton extends AuroElement$1 {
|
|
14012
|
+
|
|
14013
|
+
/**
|
|
14014
|
+
* Enables form association for this element.
|
|
14015
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
14016
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
14017
|
+
*/
|
|
14018
|
+
static get formAssociated() {
|
|
14019
|
+
return true;
|
|
14020
|
+
}
|
|
14021
|
+
|
|
14022
|
+
constructor() {
|
|
14023
|
+
super();
|
|
14024
|
+
this.autofocus = false;
|
|
14025
|
+
this.disabled = false;
|
|
14026
|
+
this.loading = false;
|
|
14027
|
+
this.size = "md";
|
|
14028
|
+
this.shape = "rounded";
|
|
14029
|
+
this.onDark = false;
|
|
14030
|
+
this.fluid = false;
|
|
14031
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
14032
|
+
|
|
14033
|
+
// Support for HTML5 forms
|
|
14034
|
+
if (typeof this.attachInternals === 'function') {
|
|
14035
|
+
this.internals = this.attachInternals();
|
|
14036
|
+
} else {
|
|
14037
|
+
this.internals = null;
|
|
14038
|
+
|
|
14039
|
+
// eslint-disable-next-line no-console
|
|
14040
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
14041
|
+
}
|
|
14042
|
+
|
|
14043
|
+
/**
|
|
14044
|
+
* Generate unique names for dependency components.
|
|
14045
|
+
*/
|
|
14046
|
+
const versioning = new AuroDependencyVersioning();
|
|
14047
|
+
|
|
14048
|
+
/**
|
|
14049
|
+
* @private
|
|
14050
|
+
*/
|
|
14051
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
14052
|
+
}
|
|
14053
|
+
|
|
14054
|
+
static get styles() {
|
|
14055
|
+
return [
|
|
14056
|
+
tokensCss$2,
|
|
14057
|
+
styleCss$3,
|
|
14058
|
+
colorCss$2,
|
|
14059
|
+
shapeSize
|
|
14060
|
+
];
|
|
14061
|
+
}
|
|
14062
|
+
|
|
14063
|
+
static get properties() {
|
|
14064
|
+
return {
|
|
14065
|
+
|
|
14066
|
+
...super.properties,
|
|
14067
|
+
|
|
14068
|
+
/**
|
|
14069
|
+
* Override layout since it isn't used in this component.
|
|
14070
|
+
* @private
|
|
14071
|
+
*/
|
|
14072
|
+
layout: {
|
|
14073
|
+
type: Boolean,
|
|
14074
|
+
attribute: false,
|
|
14075
|
+
reflect: false
|
|
14076
|
+
},
|
|
14077
|
+
|
|
14078
|
+
/**
|
|
14079
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
14080
|
+
*/
|
|
14081
|
+
autofocus: {
|
|
14082
|
+
type: Boolean,
|
|
14083
|
+
reflect: true
|
|
14084
|
+
},
|
|
14085
|
+
|
|
14086
|
+
/**
|
|
14087
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
14088
|
+
*/
|
|
14089
|
+
disabled: {
|
|
14090
|
+
type: Boolean,
|
|
14091
|
+
reflect: true
|
|
14092
|
+
},
|
|
14093
|
+
|
|
14094
|
+
/**
|
|
14095
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
14096
|
+
*/
|
|
14097
|
+
fluid: {
|
|
14098
|
+
type: Boolean,
|
|
14099
|
+
reflect: true
|
|
14100
|
+
},
|
|
14101
|
+
|
|
14102
|
+
/**
|
|
14103
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
14104
|
+
*/
|
|
14105
|
+
loading: {
|
|
14106
|
+
type: Boolean,
|
|
14107
|
+
reflect: true
|
|
14108
|
+
},
|
|
14109
|
+
|
|
14110
|
+
/**
|
|
14111
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
14112
|
+
*/
|
|
14113
|
+
loadingText: {
|
|
14114
|
+
type: String
|
|
14115
|
+
},
|
|
14116
|
+
|
|
14117
|
+
/**
|
|
14118
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
14119
|
+
*/
|
|
14120
|
+
tIndex: {
|
|
14121
|
+
type: String,
|
|
14122
|
+
reflect: true
|
|
14123
|
+
},
|
|
14124
|
+
|
|
14125
|
+
/**
|
|
14126
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
14127
|
+
*/
|
|
14128
|
+
title: {
|
|
14129
|
+
type: String,
|
|
14130
|
+
reflect: true
|
|
14131
|
+
},
|
|
14132
|
+
|
|
14133
|
+
/**
|
|
14134
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
14135
|
+
*/
|
|
14136
|
+
type: {
|
|
14137
|
+
type: String,
|
|
14138
|
+
reflect: true
|
|
14139
|
+
},
|
|
14140
|
+
|
|
14141
|
+
/**
|
|
14142
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
14143
|
+
*/
|
|
14144
|
+
value: {
|
|
14145
|
+
type: String,
|
|
14146
|
+
reflect: true
|
|
14147
|
+
},
|
|
14148
|
+
|
|
14149
|
+
/**
|
|
14150
|
+
* Sets button variant option.
|
|
14151
|
+
* @default primary
|
|
14152
|
+
*/
|
|
14153
|
+
variant: {
|
|
14154
|
+
type: String,
|
|
14155
|
+
reflect: true
|
|
14156
|
+
},
|
|
14157
|
+
};
|
|
14158
|
+
}
|
|
14159
|
+
|
|
14160
|
+
/**
|
|
14161
|
+
* This will register this element with the browser.
|
|
14162
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
14163
|
+
*
|
|
14164
|
+
* @example
|
|
14165
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
14166
|
+
*
|
|
14167
|
+
*/
|
|
14168
|
+
static register(name = "auro-button") {
|
|
14169
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
14170
|
+
}
|
|
14171
|
+
|
|
14172
|
+
/**
|
|
14173
|
+
* Internal method to apply focus to the HTML5 button.
|
|
14174
|
+
* @private
|
|
14175
|
+
* @returns {void}
|
|
14176
|
+
*/
|
|
14177
|
+
focus() {
|
|
14178
|
+
this.renderRoot.querySelector('button').focus();
|
|
14179
|
+
}
|
|
14180
|
+
|
|
14181
|
+
/**
|
|
14182
|
+
* Submits the form that this button is associated with.
|
|
14183
|
+
* @private
|
|
14184
|
+
* @returns {void}
|
|
14185
|
+
*/
|
|
14186
|
+
surfaceSubmitEvent() {
|
|
14187
|
+
if (this.form) {
|
|
14188
|
+
this.form.requestSubmit();
|
|
14189
|
+
}
|
|
14190
|
+
}
|
|
14191
|
+
|
|
14192
|
+
/**
|
|
14193
|
+
* Returns the form element that this button is associated with.
|
|
14194
|
+
* @private
|
|
14195
|
+
* @returns {HTMLFormElement | null}
|
|
14196
|
+
*/
|
|
14197
|
+
get form() {
|
|
14198
|
+
return this.internals ? this.internals.form : null;
|
|
14199
|
+
}
|
|
14200
|
+
|
|
14201
|
+
/**
|
|
14202
|
+
* @private
|
|
14203
|
+
* @returns {Boolean}
|
|
14204
|
+
*/
|
|
14205
|
+
get hideText() {
|
|
14206
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
14207
|
+
}
|
|
14208
|
+
|
|
14209
|
+
/**
|
|
14210
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
14211
|
+
* @returns {string | undefined}
|
|
14212
|
+
* @private
|
|
14213
|
+
*/
|
|
14214
|
+
get currentAriaLabel() {
|
|
14215
|
+
if (!this.attributeWatcher) return undefined;
|
|
14216
|
+
|
|
14217
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
14218
|
+
return ariaLabel || undefined;
|
|
14219
|
+
}
|
|
14220
|
+
|
|
14221
|
+
/**
|
|
14222
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
14223
|
+
* @returns {string | undefined}
|
|
14224
|
+
* @private
|
|
14225
|
+
*/
|
|
14226
|
+
get currentAriaLabelledBy() {
|
|
14227
|
+
if (!this.attributeWatcher) return undefined;
|
|
14228
|
+
|
|
14229
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
14230
|
+
return ariaLabelledBy || undefined;
|
|
14231
|
+
}
|
|
14232
|
+
|
|
14233
|
+
/**
|
|
14234
|
+
* Renders the default layout for the button.
|
|
14235
|
+
* @returns {TemplateResult}
|
|
14236
|
+
* @private
|
|
14237
|
+
*/
|
|
14238
|
+
renderLayoutDefault() {
|
|
14239
|
+
const classes = {
|
|
14240
|
+
"util_insetLg--squish": true,
|
|
14241
|
+
"auro-button": true,
|
|
14242
|
+
wrapper: true,
|
|
14243
|
+
loading: this.loading,
|
|
14244
|
+
};
|
|
14245
|
+
|
|
14246
|
+
return html`
|
|
14247
|
+
<button
|
|
14248
|
+
part="button"
|
|
14249
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
14250
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
14251
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
14252
|
+
?autofocus="${this.autofocus}"
|
|
14253
|
+
class="${classMap(classes)}"
|
|
14254
|
+
?disabled="${this.disabled || this.loading}"
|
|
14255
|
+
?onDark="${this.onDark}"
|
|
14256
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
14257
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
14258
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
14259
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
14260
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
14261
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
14262
|
+
>
|
|
14263
|
+
${ifDefined(this.loading ? html`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
14264
|
+
|
|
14265
|
+
<span class="contentWrapper">
|
|
14266
|
+
<span class="textSlot" part="text">
|
|
14267
|
+
${this.hideText ? undefined : html`<slot></slot>`}
|
|
14268
|
+
</span>
|
|
14269
|
+
|
|
14270
|
+
<span part="icon">
|
|
14271
|
+
<slot name="icon"></slot>
|
|
14272
|
+
</span>
|
|
14273
|
+
</span>
|
|
14274
|
+
</button>
|
|
14275
|
+
`;
|
|
14276
|
+
}
|
|
14277
|
+
|
|
14278
|
+
/**
|
|
14279
|
+
* Renders the layout of the button
|
|
14280
|
+
* @returns {TemplateResult}
|
|
14281
|
+
* @private
|
|
14282
|
+
*/
|
|
14283
|
+
renderLayout() {
|
|
14284
|
+
return this.renderLayoutDefault();
|
|
14285
|
+
}
|
|
14286
|
+
}
|
|
14287
|
+
|
|
14288
|
+
var buttonVersion = '10.0.0';
|
|
14289
|
+
|
|
14290
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14291
|
+
// See LICENSE in the project root for license information.
|
|
14292
|
+
|
|
14293
|
+
|
|
14294
|
+
/**
|
|
14295
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
14296
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
14297
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
14298
|
+
*/
|
|
14299
|
+
|
|
14300
|
+
let AuroElement$2 = class AuroElement extends LitElement {
|
|
14301
|
+
|
|
14302
|
+
// function to define props used within the scope of this component
|
|
14303
|
+
static get properties() {
|
|
14304
|
+
return {
|
|
14305
|
+
hidden: { type: Boolean,
|
|
14306
|
+
reflect: true },
|
|
14307
|
+
hiddenVisually: { type: Boolean,
|
|
14308
|
+
reflect: true },
|
|
14309
|
+
hiddenAudible: { type: Boolean,
|
|
14310
|
+
reflect: true },
|
|
14311
|
+
};
|
|
14312
|
+
}
|
|
14313
|
+
|
|
14314
|
+
/**
|
|
14315
|
+
* @private Function that determines state of aria-hidden
|
|
14316
|
+
*/
|
|
14317
|
+
hideAudible(value) {
|
|
14318
|
+
if (value) {
|
|
14319
|
+
return 'true'
|
|
14320
|
+
}
|
|
14321
|
+
|
|
14322
|
+
return 'false'
|
|
14323
|
+
}
|
|
14324
|
+
};
|
|
14325
|
+
|
|
14326
|
+
var error = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
14327
|
+
|
|
14328
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
14329
|
+
|
|
14330
|
+
const _fetchMap = new Map();
|
|
14331
|
+
|
|
14332
|
+
/**
|
|
14333
|
+
* A callback to parse Response body.
|
|
14334
|
+
*
|
|
14335
|
+
* @callback ResponseParser
|
|
14336
|
+
* @param {Fetch.Response} response
|
|
14337
|
+
* @returns {Promise}
|
|
14338
|
+
*/
|
|
14339
|
+
|
|
14340
|
+
/**
|
|
14341
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
14342
|
+
*
|
|
14343
|
+
* @param {String} uri
|
|
14344
|
+
* @param {Object} [options={}]
|
|
14345
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
14346
|
+
* @returns {Promise}
|
|
13016
14347
|
*/
|
|
13017
14348
|
const cacheFetch = (uri, options = {}) => {
|
|
13018
14349
|
const responseParser = options.responseParser || ((response) => response.text());
|
|
@@ -13034,7 +14365,7 @@ var styleCss$1$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
13034
14365
|
*/
|
|
13035
14366
|
|
|
13036
14367
|
// build the component class
|
|
13037
|
-
class BaseIcon extends AuroElement$
|
|
14368
|
+
class BaseIcon extends AuroElement$2 {
|
|
13038
14369
|
constructor() {
|
|
13039
14370
|
super();
|
|
13040
14371
|
this.onDark = false;
|
|
@@ -13106,9 +14437,9 @@ class BaseIcon extends AuroElement$1 {
|
|
|
13106
14437
|
}
|
|
13107
14438
|
}
|
|
13108
14439
|
|
|
13109
|
-
var tokensCss$
|
|
14440
|
+
var tokensCss$3 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
13110
14441
|
|
|
13111
|
-
var colorCss$
|
|
14442
|
+
var colorCss$4 = 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)}`;
|
|
13112
14443
|
|
|
13113
14444
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13114
14445
|
// See LICENSE in the project root for license information.
|
|
@@ -13266,9 +14597,9 @@ class AuroIcon extends BaseIcon {
|
|
|
13266
14597
|
static get styles() {
|
|
13267
14598
|
return [
|
|
13268
14599
|
super.styles,
|
|
13269
|
-
css`${tokensCss$
|
|
14600
|
+
css`${tokensCss$3}`,
|
|
13270
14601
|
css`${styleCss$1$1}`,
|
|
13271
|
-
css`${colorCss$
|
|
14602
|
+
css`${colorCss$4}`
|
|
13272
14603
|
];
|
|
13273
14604
|
}
|
|
13274
14605
|
|
|
@@ -13302,8 +14633,12 @@ class AuroIcon extends BaseIcon {
|
|
|
13302
14633
|
async firstUpdated() {
|
|
13303
14634
|
await super.firstUpdated();
|
|
13304
14635
|
|
|
13305
|
-
|
|
13306
|
-
|
|
14636
|
+
/**
|
|
14637
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
14638
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
14639
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
14640
|
+
*/
|
|
14641
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
13307
14642
|
const svgDesc = this.svg.querySelector('desc');
|
|
13308
14643
|
|
|
13309
14644
|
if (svgDesc) {
|
|
@@ -13347,7 +14682,7 @@ class AuroIcon extends BaseIcon {
|
|
|
13347
14682
|
}
|
|
13348
14683
|
}
|
|
13349
14684
|
|
|
13350
|
-
var iconVersion = '8.0.
|
|
14685
|
+
var iconVersion = '8.0.4';
|
|
13351
14686
|
|
|
13352
14687
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13353
14688
|
// See LICENSE in the project root for license information.
|
|
@@ -13356,7 +14691,7 @@ var iconVersion = '8.0.3';
|
|
|
13356
14691
|
|
|
13357
14692
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13358
14693
|
|
|
13359
|
-
let AuroLibraryRuntimeUtils$
|
|
14694
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
13360
14695
|
|
|
13361
14696
|
/* eslint-disable jsdoc/require-param */
|
|
13362
14697
|
|
|
@@ -13419,7 +14754,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
13419
14754
|
}
|
|
13420
14755
|
};
|
|
13421
14756
|
|
|
13422
|
-
var styleCss$
|
|
14757
|
+
var styleCss$5 = 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)}`;
|
|
13423
14758
|
|
|
13424
14759
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13425
14760
|
// See LICENSE in the project root for license information.
|
|
@@ -13448,7 +14783,7 @@ class AuroHeader extends LitElement {
|
|
|
13448
14783
|
/**
|
|
13449
14784
|
* @private
|
|
13450
14785
|
*/
|
|
13451
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
14786
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
13452
14787
|
}
|
|
13453
14788
|
|
|
13454
14789
|
// function to define props used within the scope of this component
|
|
@@ -13466,7 +14801,7 @@ class AuroHeader extends LitElement {
|
|
|
13466
14801
|
}
|
|
13467
14802
|
|
|
13468
14803
|
static get styles() {
|
|
13469
|
-
return [styleCss$
|
|
14804
|
+
return [styleCss$5];
|
|
13470
14805
|
}
|
|
13471
14806
|
|
|
13472
14807
|
/**
|
|
@@ -13478,7 +14813,7 @@ class AuroHeader extends LitElement {
|
|
|
13478
14813
|
*
|
|
13479
14814
|
*/
|
|
13480
14815
|
static register(name = "auro-header") {
|
|
13481
|
-
AuroLibraryRuntimeUtils$
|
|
14816
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
13482
14817
|
}
|
|
13483
14818
|
|
|
13484
14819
|
firstUpdated() {
|
|
@@ -13574,17 +14909,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
13574
14909
|
|
|
13575
14910
|
this.large = false;
|
|
13576
14911
|
|
|
13577
|
-
AuroLibraryRuntimeUtils$
|
|
14912
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13578
14913
|
|
|
13579
14914
|
const versioning = new AuroDependencyVersioning();
|
|
14915
|
+
|
|
14916
|
+
/**
|
|
14917
|
+
* @private
|
|
14918
|
+
*/
|
|
13580
14919
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
14920
|
+
|
|
14921
|
+
/**
|
|
14922
|
+
* @private
|
|
14923
|
+
*/
|
|
13581
14924
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
14925
|
+
|
|
14926
|
+
/**
|
|
14927
|
+
* @private
|
|
14928
|
+
*/
|
|
14929
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
13582
14930
|
}
|
|
13583
14931
|
|
|
13584
14932
|
static get styles() {
|
|
13585
14933
|
return [
|
|
13586
|
-
colorCss$
|
|
13587
|
-
styleCss$
|
|
14934
|
+
colorCss$3,
|
|
14935
|
+
styleCss$4,
|
|
13588
14936
|
tokenCss
|
|
13589
14937
|
];
|
|
13590
14938
|
}
|
|
@@ -13613,7 +14961,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13613
14961
|
*
|
|
13614
14962
|
*/
|
|
13615
14963
|
static register(name = "auro-bibtemplate") {
|
|
13616
|
-
AuroLibraryRuntimeUtils$
|
|
14964
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
13617
14965
|
}
|
|
13618
14966
|
|
|
13619
14967
|
/**
|
|
@@ -13671,9 +15019,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
13671
15019
|
<div id="bibTemplate" part="bibtemplate">
|
|
13672
15020
|
${this.isFullscreen ? html`
|
|
13673
15021
|
<div id="headerContainer">
|
|
13674
|
-
|
|
15022
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
13675
15023
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
13676
|
-
|
|
15024
|
+
</${this.buttonTag}>
|
|
13677
15025
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
13678
15026
|
<slot name="header"></slot>
|
|
13679
15027
|
</${this.headerTag}>
|
|
@@ -14076,7 +15424,7 @@ class AuroCombobox extends AuroElement {
|
|
|
14076
15424
|
this.noFlip = false;
|
|
14077
15425
|
this.autoPlacement = false;
|
|
14078
15426
|
|
|
14079
|
-
const versioning = new AuroDependencyVersioning$
|
|
15427
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
14080
15428
|
|
|
14081
15429
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
14082
15430
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|