@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
|
@@ -71,7 +71,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$1=t=>(...e)=>({_$litDirective$:t,values:e});cl
|
|
|
71
71
|
// See LICENSE in the project root for license information.
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
let AuroDependencyVersioning$
|
|
74
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3201,7 +3201,7 @@ class AuroFloatingUI {
|
|
|
3201
3201
|
// See LICENSE in the project root for license information.
|
|
3202
3202
|
|
|
3203
3203
|
|
|
3204
|
-
let AuroDependencyVersioning$
|
|
3204
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
3205
3205
|
|
|
3206
3206
|
/**
|
|
3207
3207
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3247,7 +3247,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
3247
3247
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3248
3248
|
*/
|
|
3249
3249
|
|
|
3250
|
-
let AuroElement$1$
|
|
3250
|
+
let AuroElement$1$3 = class AuroElement extends i$2 {
|
|
3251
3251
|
|
|
3252
3252
|
// function to define props used within the scope of this component
|
|
3253
3253
|
static get properties() {
|
|
@@ -3315,7 +3315,7 @@ var styleCss$2$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3315
3315
|
*/
|
|
3316
3316
|
|
|
3317
3317
|
// build the component class
|
|
3318
|
-
let BaseIcon$3 = class BaseIcon extends AuroElement$1$
|
|
3318
|
+
let BaseIcon$3 = class BaseIcon extends AuroElement$1$3 {
|
|
3319
3319
|
constructor() {
|
|
3320
3320
|
super();
|
|
3321
3321
|
this.onDark = false;
|
|
@@ -3387,9 +3387,9 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
};
|
|
3389
3389
|
|
|
3390
|
-
var tokensCss$2$
|
|
3390
|
+
var tokensCss$2$3 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3391
3391
|
|
|
3392
|
-
var colorCss$3$
|
|
3392
|
+
var colorCss$3$3 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3393
3393
|
|
|
3394
3394
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3395
3395
|
// See LICENSE in the project root for license information.
|
|
@@ -3547,9 +3547,9 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3547
3547
|
static get styles() {
|
|
3548
3548
|
return [
|
|
3549
3549
|
super.styles,
|
|
3550
|
-
i$5`${tokensCss$2$
|
|
3550
|
+
i$5`${tokensCss$2$3}`,
|
|
3551
3551
|
i$5`${styleCss$2$3}`,
|
|
3552
|
-
i$5`${colorCss$3$
|
|
3552
|
+
i$5`${colorCss$3$3}`
|
|
3553
3553
|
];
|
|
3554
3554
|
}
|
|
3555
3555
|
|
|
@@ -3583,8 +3583,12 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3583
3583
|
async firstUpdated() {
|
|
3584
3584
|
await super.firstUpdated();
|
|
3585
3585
|
|
|
3586
|
-
|
|
3587
|
-
|
|
3586
|
+
/**
|
|
3587
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3588
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3589
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3590
|
+
*/
|
|
3591
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3588
3592
|
const svgDesc = this.svg.querySelector('desc');
|
|
3589
3593
|
|
|
3590
3594
|
if (svgDesc) {
|
|
@@ -3632,9 +3636,9 @@ var iconVersion$3 = '6.1.2';
|
|
|
3632
3636
|
|
|
3633
3637
|
var styleCss$1$3 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
3634
3638
|
|
|
3635
|
-
var colorCss$2$
|
|
3639
|
+
var colorCss$2$3 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3636
3640
|
|
|
3637
|
-
var tokensCss$1$
|
|
3641
|
+
var tokensCss$1$3 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3638
3642
|
|
|
3639
3643
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3640
3644
|
// See LICENSE in the project root for license information.
|
|
@@ -3673,8 +3677,8 @@ class AuroDropdownBib extends i$2 {
|
|
|
3673
3677
|
static get styles() {
|
|
3674
3678
|
return [
|
|
3675
3679
|
styleCss$1$3,
|
|
3676
|
-
colorCss$2$
|
|
3677
|
-
tokensCss$1$
|
|
3680
|
+
colorCss$2$3,
|
|
3681
|
+
tokensCss$1$3
|
|
3678
3682
|
];
|
|
3679
3683
|
}
|
|
3680
3684
|
|
|
@@ -4250,7 +4254,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4250
4254
|
/**
|
|
4251
4255
|
* Generate unique names for dependency components.
|
|
4252
4256
|
*/
|
|
4253
|
-
const versioning = new AuroDependencyVersioning$
|
|
4257
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
4254
4258
|
|
|
4255
4259
|
/**
|
|
4256
4260
|
* @private
|
|
@@ -4566,7 +4570,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4566
4570
|
static get styles() {
|
|
4567
4571
|
return [
|
|
4568
4572
|
colorCss$1$3,
|
|
4569
|
-
tokensCss$1$
|
|
4573
|
+
tokensCss$1$3,
|
|
4570
4574
|
|
|
4571
4575
|
// default layout
|
|
4572
4576
|
classicColorCss$1,
|
|
@@ -5086,7 +5090,7 @@ const u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c
|
|
|
5086
5090
|
|
|
5087
5091
|
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;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}`;
|
|
5088
5092
|
|
|
5089
|
-
var styleCss$4$
|
|
5093
|
+
var styleCss$4$2 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block}.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}`;
|
|
5090
5094
|
|
|
5091
5095
|
var styleDefaultCss = i$5`.layoutDefault .typeIcon,:host(:not([layout])) .typeIcon{display:flex;flex-direction:row;align-items:center}.layoutDefault .typeIcon [auro-icon],:host(:not([layout])) .typeIcon [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem)}.layoutDefault .notificationIcons,:host(:not([layout])) .notificationIcons{display:flex;flex-direction:row;padding-right:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .typeIcon,:host(:not([layout])[bordered]) .typeIcon{padding-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .notificationIcons,:host(:not([layout])[bordered]) .notificationIcons{align-items:center}:host([class=layoutDefault][bordered]) .notification:not(:first-of-type),:host(:not([layout])[bordered]) .notification:not(:first-of-type){margin-left:var(--ds-size-100, 0.5rem)}:host([class=layoutDefault][bordered]) .alertNotification,:host(:not([layout])[bordered]) .alertNotification{width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-25, 0.125rem))}:host([class=layoutDefault][bordered]) .passwordBtn,:host(:not([layout])[bordered]) .passwordBtn{width:calc(var(--ds-size-300, 1.5rem));height:calc(var(--ds-size-300, 1.5rem))}:host([class=layoutDefault][bordered]) .notificationBtn,:host(:not([layout])[bordered]) .notificationBtn{display:block;width:var(--ds-size-300, 1.5rem);height:var(--ds-size-300, 1.5rem);padding:0;border:0;background:unset;cursor:pointer}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon],:host(:not([layout])[bordered]) .notificationBtn [auro-icon]{display:block;height:var(--ds-size-300, 1.5rem);--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([class=layoutDefault][bordered]) .notificationBtn [auro-icon][hidden],:host(:not([layout])[bordered]) .notificationBtn [auro-icon][hidden]{display:none}:host([class=layoutDefault]:not([bordered])) .typeIcon,:host([class=layoutDefault]:not([bordered])) .notificationIcons,:host(:not([layout]):not([bordered])) .typeIcon,:host(:not([layout]):not([bordered])) .notificationIcons{align-items:flex-end;padding-bottom:var(--ds-size-50, 0.25rem)}:host([class=layoutDefault]:not([bordered])) .clearBtn,:host(:not([layout]):not([bordered])) .clearBtn{transition:all .3s cubic-bezier(0.215, 0.61, 0.355, 1);overflow:hidden;width:0;opacity:0}.layoutDefault .wrapper:hover .clearBtn,.layoutDefault .wrapper:focus-within .clearBtn,:host(:not([layout])) .wrapper:hover .clearBtn,:host(:not([layout])) .wrapper:focus-within .clearBtn{width:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-25, 0.125rem));opacity:1}:host([class=layoutDefault]:focus-within[type=password]) .notificationIcons[hasValue] .alertNotification,:host(:not([layout]):focus-within[type=password]) .notificationIcons[hasValue] .alertNotification{overflow:hidden;width:0;height:0;padding:0;margin:0;visibility:hidden}.layoutDefault input,:host(:not([layout])) input{border:unset}.layoutDefault .wrapper,:host(:not([layout])) .wrapper{position:relative;overflow:hidden;border-style:solid}:host([class=layoutDefault]:not([bordered],[borderless])) .wrapper,:host(:not([layout]):not([bordered],[borderless])) .wrapper{border-width:1px 0}:host([class=layoutDefault][bordered]) .wrapper,:host(:not([layout])[bordered]) .wrapper{border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}:host([class=layoutDefault]:not([borderless])) .wrapper:focus-within:before,:host(:not([layout]):not([borderless])) .wrapper:focus-within:before{position:absolute;display:block;border-bottom-width:1px;border-bottom-style:solid;content:"";inset:0;pointer-events:none}:host([class=layoutDefault][validity]:not([validity=valid])) .wrapper:before,:host(:not([layout])[validity]:not([validity=valid])) .wrapper:before{border-bottom:0}: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}`;
|
|
5092
5096
|
|
|
@@ -5165,6 +5169,8 @@ const stringsES = {
|
|
|
5165
5169
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
5166
5170
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
5167
5171
|
'clearInput': 'Borrar campo de entrada',
|
|
5172
|
+
'showPassword': 'Mostrar contraseña',
|
|
5173
|
+
'hidePassword': 'Ocultar contraseña'
|
|
5168
5174
|
};
|
|
5169
5175
|
|
|
5170
5176
|
const stringsEN = {
|
|
@@ -5189,6 +5195,8 @@ const stringsEN = {
|
|
|
5189
5195
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
5190
5196
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
5191
5197
|
'clearInput': 'Clear input field',
|
|
5198
|
+
'showPassword': 'Show password',
|
|
5199
|
+
'hidePassword': 'Hide password'
|
|
5192
5200
|
};
|
|
5193
5201
|
|
|
5194
5202
|
/**
|
|
@@ -9483,7 +9491,7 @@ const {
|
|
|
9483
9491
|
|
|
9484
9492
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9485
9493
|
|
|
9486
|
-
let AuroLibraryRuntimeUtils$
|
|
9494
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
9487
9495
|
|
|
9488
9496
|
/* eslint-disable jsdoc/require-param */
|
|
9489
9497
|
|
|
@@ -9553,7 +9561,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
9553
9561
|
class AuroFormValidation {
|
|
9554
9562
|
|
|
9555
9563
|
constructor() {
|
|
9556
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9564
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3$1();
|
|
9557
9565
|
}
|
|
9558
9566
|
|
|
9559
9567
|
/**
|
|
@@ -9914,7 +9922,7 @@ class AuroFormValidation {
|
|
|
9914
9922
|
}
|
|
9915
9923
|
}
|
|
9916
9924
|
|
|
9917
|
-
let AuroElement$
|
|
9925
|
+
let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
9918
9926
|
static get properties() {
|
|
9919
9927
|
return {
|
|
9920
9928
|
|
|
@@ -10034,7 +10042,7 @@ let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
|
10034
10042
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
10035
10043
|
*/
|
|
10036
10044
|
|
|
10037
|
-
class BaseInput extends AuroElement$
|
|
10045
|
+
class BaseInput extends AuroElement$2$1 {
|
|
10038
10046
|
|
|
10039
10047
|
constructor() {
|
|
10040
10048
|
super();
|
|
@@ -11143,7 +11151,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
11143
11151
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
11144
11152
|
*/
|
|
11145
11153
|
|
|
11146
|
-
let AuroElement$
|
|
11154
|
+
let AuroElement$1$2 = class AuroElement extends i$2 {
|
|
11147
11155
|
|
|
11148
11156
|
// function to define props used within the scope of this component
|
|
11149
11157
|
static get properties() {
|
|
@@ -11199,7 +11207,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
11199
11207
|
return _fetchMap$2.get(uri);
|
|
11200
11208
|
};
|
|
11201
11209
|
|
|
11202
|
-
var styleCss$3$
|
|
11210
|
+
var styleCss$3$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
11203
11211
|
|
|
11204
11212
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11205
11213
|
// See LICENSE in the project root for license information.
|
|
@@ -11211,7 +11219,7 @@ var styleCss$3$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
11211
11219
|
*/
|
|
11212
11220
|
|
|
11213
11221
|
// build the component class
|
|
11214
|
-
let BaseIcon$2 = class BaseIcon extends AuroElement$
|
|
11222
|
+
let BaseIcon$2 = class BaseIcon extends AuroElement$1$2 {
|
|
11215
11223
|
constructor() {
|
|
11216
11224
|
super();
|
|
11217
11225
|
this.onDark = false;
|
|
@@ -11242,7 +11250,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11242
11250
|
|
|
11243
11251
|
static get styles() {
|
|
11244
11252
|
return i$5`
|
|
11245
|
-
${styleCss$3$
|
|
11253
|
+
${styleCss$3$2}
|
|
11246
11254
|
`;
|
|
11247
11255
|
}
|
|
11248
11256
|
|
|
@@ -11285,7 +11293,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11285
11293
|
|
|
11286
11294
|
var tokensCss$3$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
11287
11295
|
|
|
11288
|
-
var colorCss$3$
|
|
11296
|
+
var colorCss$3$2 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11289
11297
|
|
|
11290
11298
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11291
11299
|
// See LICENSE in the project root for license information.
|
|
@@ -11294,7 +11302,7 @@ var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]
|
|
|
11294
11302
|
|
|
11295
11303
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11296
11304
|
|
|
11297
|
-
let AuroLibraryRuntimeUtils$
|
|
11305
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
11298
11306
|
|
|
11299
11307
|
/* eslint-disable jsdoc/require-param */
|
|
11300
11308
|
|
|
@@ -11376,7 +11384,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11376
11384
|
*/
|
|
11377
11385
|
privateDefaults() {
|
|
11378
11386
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11379
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11387
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11380
11388
|
}
|
|
11381
11389
|
|
|
11382
11390
|
// function to define props used within the scope of this component
|
|
@@ -11444,8 +11452,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11444
11452
|
return [
|
|
11445
11453
|
super.styles,
|
|
11446
11454
|
i$5`${tokensCss$3$1}`,
|
|
11447
|
-
i$5`${styleCss$3$
|
|
11448
|
-
i$5`${colorCss$3$
|
|
11455
|
+
i$5`${styleCss$3$2}`,
|
|
11456
|
+
i$5`${colorCss$3$2}`
|
|
11449
11457
|
];
|
|
11450
11458
|
}
|
|
11451
11459
|
|
|
@@ -11458,7 +11466,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11458
11466
|
*
|
|
11459
11467
|
*/
|
|
11460
11468
|
static register(name = "auro-icon") {
|
|
11461
|
-
AuroLibraryRuntimeUtils$
|
|
11469
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroIcon);
|
|
11462
11470
|
}
|
|
11463
11471
|
|
|
11464
11472
|
connectedCallback() {
|
|
@@ -11479,8 +11487,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11479
11487
|
async firstUpdated() {
|
|
11480
11488
|
await super.firstUpdated();
|
|
11481
11489
|
|
|
11482
|
-
|
|
11483
|
-
|
|
11490
|
+
/**
|
|
11491
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
11492
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
11493
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
11494
|
+
*/
|
|
11495
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11484
11496
|
const svgDesc = this.svg.querySelector('desc');
|
|
11485
11497
|
|
|
11486
11498
|
if (svgDesc) {
|
|
@@ -11526,46 +11538,480 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11526
11538
|
|
|
11527
11539
|
var iconVersion$2 = '8.0.1';
|
|
11528
11540
|
|
|
11529
|
-
|
|
11530
|
-
|
|
11541
|
+
/**
|
|
11542
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
11543
|
+
*/
|
|
11544
|
+
const _observers$1 = new WeakMap();
|
|
11531
11545
|
|
|
11546
|
+
/**
|
|
11547
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
11548
|
+
* Structure: {
|
|
11549
|
+
* host: {
|
|
11550
|
+
* matchers: Set<Function>,
|
|
11551
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
11552
|
+
* }
|
|
11553
|
+
* }
|
|
11554
|
+
*/
|
|
11555
|
+
const _transportConfig$1 = new WeakMap();
|
|
11532
11556
|
|
|
11533
|
-
|
|
11557
|
+
/**
|
|
11558
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
11559
|
+
*
|
|
11560
|
+
* @param {Object} params - The parameters for the function.
|
|
11561
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
11562
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11563
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
11564
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
11565
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
11566
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
11567
|
+
*/
|
|
11568
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
11569
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
11570
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
11571
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
11572
|
+
}
|
|
11573
|
+
|
|
11574
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
11575
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
11576
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
11577
|
+
}
|
|
11578
|
+
|
|
11579
|
+
// Guard Clause: Ensure match is a function
|
|
11580
|
+
if (typeof match !== 'function') {
|
|
11581
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
11582
|
+
}
|
|
11583
|
+
|
|
11584
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
11585
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11586
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
11587
|
+
}
|
|
11588
|
+
|
|
11589
|
+
// Register this transport and get cleanup function
|
|
11590
|
+
return _registerTransport$1({
|
|
11591
|
+
host,
|
|
11592
|
+
target,
|
|
11593
|
+
matcher: match,
|
|
11594
|
+
removeOriginal
|
|
11595
|
+
});
|
|
11596
|
+
};
|
|
11597
|
+
|
|
11598
|
+
/**
|
|
11599
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11600
|
+
*
|
|
11601
|
+
* @param {Object} params - The parameters object.
|
|
11602
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11603
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11604
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11605
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11606
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11607
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11608
|
+
* @private
|
|
11609
|
+
*/
|
|
11610
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11611
|
+
// Initialize config for this host if it doesn't exist
|
|
11612
|
+
if (!_transportConfig$1.has(host)) {
|
|
11613
|
+
_transportConfig$1.set(host, {
|
|
11614
|
+
matchers: new Set(),
|
|
11615
|
+
targets: new Map()
|
|
11616
|
+
});
|
|
11617
|
+
}
|
|
11618
|
+
|
|
11619
|
+
const config = _transportConfig$1.get(host);
|
|
11620
|
+
|
|
11621
|
+
// Add the matcher to the set of matchers for this host
|
|
11622
|
+
config.matchers.add(matcher);
|
|
11623
|
+
|
|
11624
|
+
// Initialize target entry if it doesn't exist
|
|
11625
|
+
if (!config.targets.has(target)) {
|
|
11626
|
+
config.targets.set(target, new Map());
|
|
11627
|
+
}
|
|
11628
|
+
|
|
11629
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11630
|
+
config.targets.get(target).set(matcher, {
|
|
11631
|
+
removeOriginal,
|
|
11632
|
+
currentAttributes: new Map()
|
|
11633
|
+
});
|
|
11634
|
+
|
|
11635
|
+
// Perform initial attribute transport
|
|
11636
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
11637
|
+
|
|
11638
|
+
// Attach observer
|
|
11639
|
+
_attachObserver$1(host);
|
|
11640
|
+
|
|
11641
|
+
// Return cleanup function and utility functions
|
|
11642
|
+
return {
|
|
11643
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
11644
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
11645
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
11646
|
+
}
|
|
11647
|
+
};
|
|
11648
|
+
|
|
11649
|
+
/**
|
|
11650
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11651
|
+
*
|
|
11652
|
+
* @param {HTMLElement} host - The host element
|
|
11653
|
+
* @param {HTMLElement} target - The target element
|
|
11654
|
+
* @param {Function} matcher - The matcher function
|
|
11655
|
+
* @private
|
|
11656
|
+
*/
|
|
11657
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
11658
|
+
const config = _transportConfig$1.get(host);
|
|
11659
|
+
if (!config) return;
|
|
11660
|
+
|
|
11661
|
+
// Remove this matcher from this target
|
|
11662
|
+
const targetMatchers = config.targets.get(target);
|
|
11663
|
+
if (targetMatchers) {
|
|
11664
|
+
targetMatchers.delete(matcher);
|
|
11665
|
+
|
|
11666
|
+
// If this target has no more matchers, remove it
|
|
11667
|
+
if (targetMatchers.size === 0) {
|
|
11668
|
+
config.targets.delete(target);
|
|
11669
|
+
}
|
|
11670
|
+
}
|
|
11671
|
+
|
|
11672
|
+
// Check if this matcher is still used by any target
|
|
11673
|
+
let matcherStillUsed = false;
|
|
11674
|
+
for (const matcherMap of config.targets.values()) {
|
|
11675
|
+
if (matcherMap.has(matcher)) {
|
|
11676
|
+
matcherStillUsed = true;
|
|
11677
|
+
break;
|
|
11678
|
+
}
|
|
11679
|
+
}
|
|
11680
|
+
|
|
11681
|
+
// If not used anymore, remove from matchers set
|
|
11682
|
+
if (!matcherStillUsed) {
|
|
11683
|
+
config.matchers.delete(matcher);
|
|
11684
|
+
}
|
|
11685
|
+
|
|
11686
|
+
// If no more targets or matchers, detach observer
|
|
11687
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11688
|
+
_detachObserver$1(host);
|
|
11689
|
+
}
|
|
11690
|
+
};
|
|
11691
|
+
|
|
11692
|
+
/**
|
|
11693
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11694
|
+
*
|
|
11695
|
+
* @param {Object} params - The parameters object.
|
|
11696
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11697
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11698
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11699
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11700
|
+
* @returns {void}
|
|
11701
|
+
* @private
|
|
11702
|
+
*/
|
|
11703
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11704
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11705
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11706
|
+
.filter(attr => matcher(attr))
|
|
11707
|
+
.reduce((acc, attr) => {
|
|
11708
|
+
acc[attr] = host.getAttribute(attr);
|
|
11709
|
+
return acc;
|
|
11710
|
+
}, {});
|
|
11711
|
+
|
|
11712
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11713
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11714
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
11715
|
+
target.setAttribute(key, value);
|
|
11716
|
+
if (removeOriginal) {
|
|
11717
|
+
host.removeAttribute(key);
|
|
11718
|
+
}
|
|
11719
|
+
});
|
|
11720
|
+
};
|
|
11721
|
+
|
|
11722
|
+
/**
|
|
11723
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11724
|
+
*
|
|
11725
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11726
|
+
* @returns {MutationObserver} The observer instance.
|
|
11727
|
+
* @private
|
|
11728
|
+
*/
|
|
11729
|
+
const _attachObserver$1 = (host) => {
|
|
11730
|
+
// If an observer for this host already exists, return it
|
|
11731
|
+
if (_observers$1.has(host)) {
|
|
11732
|
+
return _observers$1.get(host);
|
|
11733
|
+
}
|
|
11734
|
+
|
|
11735
|
+
// Create a new MutationObserver
|
|
11736
|
+
const observer = new MutationObserver((mutations) => {
|
|
11737
|
+
const config = _transportConfig$1.get(host);
|
|
11738
|
+
if (!config) return;
|
|
11739
|
+
|
|
11740
|
+
// For each mutation affecting attributes
|
|
11741
|
+
mutations
|
|
11742
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11743
|
+
.forEach(mutation => {
|
|
11744
|
+
const attributeName = mutation.attributeName;
|
|
11745
|
+
|
|
11746
|
+
// Find matchers that care about this attribute
|
|
11747
|
+
for (const matcher of config.matchers) {
|
|
11748
|
+
if (matcher(attributeName)) {
|
|
11749
|
+
// For each target that uses this matcher
|
|
11750
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11751
|
+
if (matcherConfigs.has(matcher)) {
|
|
11752
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11753
|
+
_transportAttributes$1({
|
|
11754
|
+
host,
|
|
11755
|
+
target,
|
|
11756
|
+
matcher,
|
|
11757
|
+
removeOriginal
|
|
11758
|
+
});
|
|
11759
|
+
}
|
|
11760
|
+
}
|
|
11761
|
+
}
|
|
11762
|
+
}
|
|
11763
|
+
});
|
|
11764
|
+
});
|
|
11765
|
+
|
|
11766
|
+
// Start observing attribute changes
|
|
11767
|
+
observer.observe(host, { attributes: true });
|
|
11768
|
+
|
|
11769
|
+
// Store the observer
|
|
11770
|
+
_observers$1.set(host, observer);
|
|
11771
|
+
|
|
11772
|
+
return observer;
|
|
11773
|
+
};
|
|
11774
|
+
|
|
11775
|
+
/**
|
|
11776
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11777
|
+
*
|
|
11778
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11779
|
+
* @private
|
|
11780
|
+
*/
|
|
11781
|
+
const _detachObserver$1 = (host) => {
|
|
11782
|
+
if (_observers$1.has(host)) {
|
|
11783
|
+
const observer = _observers$1.get(host);
|
|
11784
|
+
observer.disconnect();
|
|
11785
|
+
_observers$1.delete(host);
|
|
11786
|
+
}
|
|
11787
|
+
|
|
11788
|
+
// Clean up the transport config as well
|
|
11789
|
+
if (_transportConfig$1.has(host)) {
|
|
11790
|
+
_transportConfig$1.delete(host);
|
|
11791
|
+
}
|
|
11792
|
+
};
|
|
11793
|
+
|
|
11794
|
+
/**
|
|
11795
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11796
|
+
* @param {HTMLElement} host - The host element
|
|
11797
|
+
* @param {HTMLElement} target - The target element
|
|
11798
|
+
* @param {Function} matcher - The matcher function
|
|
11799
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11800
|
+
* @private
|
|
11801
|
+
*/
|
|
11802
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
11803
|
+
const config = _transportConfig$1.get(host);
|
|
11804
|
+
if (!config) return undefined;
|
|
11805
|
+
|
|
11806
|
+
const targetMatchers = config.targets.get(target);
|
|
11807
|
+
if (!targetMatchers) return undefined;
|
|
11808
|
+
|
|
11809
|
+
return targetMatchers.get(matcher);
|
|
11810
|
+
};
|
|
11811
|
+
|
|
11812
|
+
/**
|
|
11813
|
+
* Sets an observed attribute value
|
|
11814
|
+
* @param {HTMLElement} host - The host element
|
|
11815
|
+
* @param {HTMLElement} target - The target element
|
|
11816
|
+
* @param {Function} matcher - The matcher function
|
|
11817
|
+
* @param {string} key - The attribute name
|
|
11818
|
+
* @param {string} value - The attribute value
|
|
11819
|
+
* @private
|
|
11820
|
+
*/
|
|
11821
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
11822
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11823
|
+
if (matcherConfig) {
|
|
11824
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11825
|
+
}
|
|
11826
|
+
};
|
|
11827
|
+
|
|
11828
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
11829
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11830
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11831
|
+
return undefined;
|
|
11832
|
+
};
|
|
11833
|
+
|
|
11834
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
11835
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11836
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11837
|
+
return [];
|
|
11838
|
+
};
|
|
11839
|
+
|
|
11840
|
+
const _matchers$1 = {
|
|
11841
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11842
|
+
'role': attr => attr.match(/^role$/)
|
|
11843
|
+
};
|
|
11844
|
+
|
|
11845
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
11846
|
+
return transportAttributes$1({
|
|
11847
|
+
host,
|
|
11848
|
+
target,
|
|
11849
|
+
match: attr => {
|
|
11850
|
+
for (const key in _matchers$1) {
|
|
11851
|
+
if (_matchers$1[key](attr)) return true;
|
|
11852
|
+
}
|
|
11853
|
+
return false;
|
|
11854
|
+
},
|
|
11855
|
+
removeOriginal
|
|
11856
|
+
});
|
|
11857
|
+
};
|
|
11858
|
+
|
|
11859
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
11534
11860
|
|
|
11535
11861
|
/**
|
|
11536
|
-
*
|
|
11862
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
11863
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
11864
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
11865
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11537
11866
|
* @private
|
|
11538
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11539
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11540
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11541
11867
|
*/
|
|
11542
|
-
|
|
11543
|
-
let result = baseName;
|
|
11868
|
+
attributeWatcher;
|
|
11544
11869
|
|
|
11545
|
-
|
|
11546
|
-
|
|
11870
|
+
static get properties() {
|
|
11871
|
+
return {
|
|
11547
11872
|
|
|
11548
|
-
|
|
11873
|
+
/**
|
|
11874
|
+
* Defines the layout of an element.
|
|
11875
|
+
* @default {'default'}
|
|
11876
|
+
*/
|
|
11877
|
+
layout: {
|
|
11878
|
+
type: String,
|
|
11879
|
+
attribute: "layout",
|
|
11880
|
+
reflect: true
|
|
11881
|
+
},
|
|
11882
|
+
|
|
11883
|
+
/**
|
|
11884
|
+
* Defines the shape of an element.
|
|
11885
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
11886
|
+
* @default {'default'}
|
|
11887
|
+
*/
|
|
11888
|
+
shape: {
|
|
11889
|
+
type: String,
|
|
11890
|
+
attribute: "shape",
|
|
11891
|
+
reflect: true
|
|
11892
|
+
},
|
|
11893
|
+
|
|
11894
|
+
/**
|
|
11895
|
+
* Defines the size of an element.
|
|
11896
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
11897
|
+
* @default {'md'}
|
|
11898
|
+
*/
|
|
11899
|
+
size: {
|
|
11900
|
+
type: String,
|
|
11901
|
+
attribute: "size",
|
|
11902
|
+
reflect: true
|
|
11903
|
+
},
|
|
11904
|
+
|
|
11905
|
+
/**
|
|
11906
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
11907
|
+
* @default {false}
|
|
11908
|
+
*/
|
|
11909
|
+
onDark: {
|
|
11910
|
+
type: Boolean,
|
|
11911
|
+
attribute: "ondark",
|
|
11912
|
+
reflect: true
|
|
11913
|
+
},
|
|
11914
|
+
|
|
11915
|
+
/**
|
|
11916
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
11917
|
+
* This is used to apply layout and shape classes dynamically.
|
|
11918
|
+
* @type {HTMLElement|null}
|
|
11919
|
+
* @default {null}
|
|
11920
|
+
* @private
|
|
11921
|
+
*/
|
|
11922
|
+
wrapper: {
|
|
11923
|
+
type: HTMLElement,
|
|
11924
|
+
attribute: false,
|
|
11925
|
+
reflect: false
|
|
11926
|
+
}
|
|
11927
|
+
};
|
|
11549
11928
|
}
|
|
11550
11929
|
|
|
11551
|
-
|
|
11552
|
-
* Generates a unique string to be used for child auro element naming.
|
|
11553
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11554
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11555
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11556
|
-
*/
|
|
11557
|
-
generateTag(baseName, version, tagClass) {
|
|
11558
|
-
const elementName = this.generateElementName(baseName, version);
|
|
11559
|
-
const tag = i$1`${s$1(elementName)}`;
|
|
11930
|
+
|
|
11560
11931
|
|
|
11561
|
-
|
|
11562
|
-
|
|
11932
|
+
resetShapeClasses() {
|
|
11933
|
+
if (this.shape && this.size) {
|
|
11934
|
+
|
|
11935
|
+
if (this.wrapper) {
|
|
11936
|
+
this.wrapper.classList.forEach((className) => {
|
|
11937
|
+
if (className.startsWith('shape-')) {
|
|
11938
|
+
this.wrapper.classList.remove(className);
|
|
11939
|
+
}
|
|
11940
|
+
});
|
|
11941
|
+
|
|
11942
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
11943
|
+
}
|
|
11563
11944
|
}
|
|
11945
|
+
}
|
|
11564
11946
|
|
|
11565
|
-
|
|
11947
|
+
resetLayoutClasses() {
|
|
11948
|
+
if (this.layout) {
|
|
11949
|
+
if (this.wrapper) {
|
|
11950
|
+
this.wrapper.classList.forEach((className) => {
|
|
11951
|
+
if (className.startsWith('layout-')) {
|
|
11952
|
+
this.wrapper.classList.remove(className);
|
|
11953
|
+
}
|
|
11954
|
+
});
|
|
11955
|
+
|
|
11956
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
11957
|
+
}
|
|
11958
|
+
}
|
|
11959
|
+
}
|
|
11960
|
+
|
|
11961
|
+
updateComponentArchitecture() {
|
|
11962
|
+
this.resetLayoutClasses();
|
|
11963
|
+
this.resetShapeClasses();
|
|
11964
|
+
}
|
|
11965
|
+
|
|
11966
|
+
updated(changedProperties) {
|
|
11967
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
11968
|
+
this.updateComponentArchitecture();
|
|
11969
|
+
}
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11972
|
+
firstUpdated() {
|
|
11973
|
+
super.firstUpdated();
|
|
11974
|
+
|
|
11975
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
11976
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
11977
|
+
|
|
11978
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
11979
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11982
|
+
disconnectedCallback() {
|
|
11983
|
+
super.disconnectedCallback();
|
|
11984
|
+
|
|
11985
|
+
// Cleanup the ARIA observer if it exists
|
|
11986
|
+
if (this.attributeWatcher) {
|
|
11987
|
+
this.attributeWatcher.cleanup();
|
|
11988
|
+
this.attributeWatcher = null;
|
|
11989
|
+
}
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11992
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
11993
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
11994
|
+
render() {
|
|
11995
|
+
try {
|
|
11996
|
+
return this.renderLayout();
|
|
11997
|
+
} catch (error) {
|
|
11998
|
+
// failed to get the defined layout
|
|
11999
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
12000
|
+
|
|
12001
|
+
// fallback to the default layout
|
|
12002
|
+
return this.getLayout('default');
|
|
12003
|
+
}
|
|
11566
12004
|
}
|
|
11567
12005
|
};
|
|
11568
12006
|
|
|
12007
|
+
var styleCss$2$2 = i$5`: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}`;
|
|
12008
|
+
|
|
12009
|
+
var colorCss$2$2 = i$5`[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)}`;
|
|
12010
|
+
|
|
12011
|
+
var tokensCss$2$2 = i$5`: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}`;
|
|
12012
|
+
|
|
12013
|
+
var shapeSize$1 = i$5`.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}`;
|
|
12014
|
+
|
|
11569
12015
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11570
12016
|
// See LICENSE in the project root for license information.
|
|
11571
12017
|
|
|
@@ -11573,7 +12019,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
11573
12019
|
|
|
11574
12020
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11575
12021
|
|
|
11576
|
-
let AuroLibraryRuntimeUtils$2
|
|
12022
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
11577
12023
|
|
|
11578
12024
|
/* eslint-disable jsdoc/require-param */
|
|
11579
12025
|
|
|
@@ -11636,100 +12082,24 @@ let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
|
11636
12082
|
}
|
|
11637
12083
|
};
|
|
11638
12084
|
|
|
11639
|
-
var styleCss$
|
|
12085
|
+
var styleCss$1$2 = i$5`: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}}`;
|
|
11640
12086
|
|
|
11641
|
-
var colorCss$2
|
|
12087
|
+
var colorCss$1$2 = i$5`: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}`;
|
|
11642
12088
|
|
|
11643
|
-
var tokensCss$2
|
|
12089
|
+
var tokensCss$1$2 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11644
12090
|
|
|
11645
|
-
// Copyright (c) Alaska
|
|
12091
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11646
12092
|
// See LICENSE in the project root for license information.
|
|
11647
12093
|
|
|
11648
|
-
// ---------------------------------------------------------------------
|
|
11649
|
-
|
|
11650
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11651
12094
|
|
|
11652
|
-
let
|
|
12095
|
+
let AuroLoader$1 = class AuroLoader extends i$2 {
|
|
12096
|
+
constructor() {
|
|
12097
|
+
super();
|
|
11653
12098
|
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
* @param {String} name - The name of the custom element.
|
|
11659
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
11660
|
-
* @returns {void}
|
|
11661
|
-
*/
|
|
11662
|
-
registerComponent(name, componentClass) {
|
|
11663
|
-
if (!customElements.get(name)) {
|
|
11664
|
-
customElements.define(name, class extends componentClass {});
|
|
11665
|
-
}
|
|
11666
|
-
}
|
|
11667
|
-
|
|
11668
|
-
/**
|
|
11669
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
11670
|
-
* @returns {void}
|
|
11671
|
-
*/
|
|
11672
|
-
closestElement(
|
|
11673
|
-
selector, // selector like in .closest()
|
|
11674
|
-
base = this, // extra functionality to skip a parent
|
|
11675
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11676
|
-
!el || el === document || el === window
|
|
11677
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
11678
|
-
: found
|
|
11679
|
-
? found // found a selector INside this element
|
|
11680
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11681
|
-
) {
|
|
11682
|
-
return __Closest(base);
|
|
11683
|
-
}
|
|
11684
|
-
/* eslint-enable jsdoc/require-param */
|
|
11685
|
-
|
|
11686
|
-
/**
|
|
11687
|
-
* 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.
|
|
11688
|
-
* @param {Object} elem - The element to check.
|
|
11689
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11690
|
-
* @returns {void}
|
|
11691
|
-
*/
|
|
11692
|
-
handleComponentTagRename(elem, tagName) {
|
|
11693
|
-
const tag = tagName.toLowerCase();
|
|
11694
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11695
|
-
|
|
11696
|
-
if (elemTag !== tag) {
|
|
11697
|
-
elem.setAttribute(tag, true);
|
|
11698
|
-
}
|
|
11699
|
-
}
|
|
11700
|
-
|
|
11701
|
-
/**
|
|
11702
|
-
* Validates if an element is a specific Auro component.
|
|
11703
|
-
* @param {Object} elem - The element to validate.
|
|
11704
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
11705
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11706
|
-
*/
|
|
11707
|
-
elementMatch(elem, tagName) {
|
|
11708
|
-
const tag = tagName.toLowerCase();
|
|
11709
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11710
|
-
|
|
11711
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
11712
|
-
}
|
|
11713
|
-
};
|
|
11714
|
-
|
|
11715
|
-
var styleCss$1$2 = i$5`: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}}`;
|
|
11716
|
-
|
|
11717
|
-
var colorCss$1$2 = i$5`: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}`;
|
|
11718
|
-
|
|
11719
|
-
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11720
|
-
|
|
11721
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11722
|
-
// See LICENSE in the project root for license information.
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
class AuroLoader extends i$2 {
|
|
11726
|
-
constructor() {
|
|
11727
|
-
super();
|
|
11728
|
-
|
|
11729
|
-
/**
|
|
11730
|
-
* @private
|
|
11731
|
-
*/
|
|
11732
|
-
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
12099
|
+
/**
|
|
12100
|
+
* @private
|
|
12101
|
+
*/
|
|
12102
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11733
12103
|
|
|
11734
12104
|
/**
|
|
11735
12105
|
* @private
|
|
@@ -11794,7 +12164,7 @@ class AuroLoader extends i$2 {
|
|
|
11794
12164
|
return [
|
|
11795
12165
|
i$5`${styleCss$1$2}`,
|
|
11796
12166
|
i$5`${colorCss$1$2}`,
|
|
11797
|
-
i$5`${tokensCss$1$
|
|
12167
|
+
i$5`${tokensCss$1$2}`
|
|
11798
12168
|
];
|
|
11799
12169
|
}
|
|
11800
12170
|
|
|
@@ -11855,11 +12225,11 @@ class AuroLoader extends i$2 {
|
|
|
11855
12225
|
}
|
|
11856
12226
|
`;
|
|
11857
12227
|
}
|
|
11858
|
-
}
|
|
12228
|
+
};
|
|
11859
12229
|
|
|
11860
|
-
var loaderVersion = '5.0.0';
|
|
12230
|
+
var loaderVersion$1 = '5.0.0';
|
|
11861
12231
|
|
|
11862
|
-
/* eslint-disable max-lines */
|
|
12232
|
+
/* eslint-disable max-lines, curly */
|
|
11863
12233
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11864
12234
|
// See LICENSE in the project root for license information.
|
|
11865
12235
|
|
|
@@ -11875,7 +12245,18 @@ var loaderVersion = '5.0.0';
|
|
|
11875
12245
|
|
|
11876
12246
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
11877
12247
|
|
|
11878
|
-
|
|
12248
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
12249
|
+
|
|
12250
|
+
/**
|
|
12251
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
12252
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
12253
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
12254
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
12255
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
12256
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
12257
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
12258
|
+
*/
|
|
12259
|
+
let AuroButton$1 = class AuroButton extends AuroElement$3 {
|
|
11879
12260
|
|
|
11880
12261
|
/**
|
|
11881
12262
|
* Enables form association for this element.
|
|
@@ -11890,13 +12271,10 @@ class AuroButton extends i$2 {
|
|
|
11890
12271
|
super();
|
|
11891
12272
|
this.autofocus = false;
|
|
11892
12273
|
this.disabled = false;
|
|
11893
|
-
this.iconOnly = false;
|
|
11894
12274
|
this.loading = false;
|
|
12275
|
+
this.size = "md";
|
|
12276
|
+
this.shape = "rounded";
|
|
11895
12277
|
this.onDark = false;
|
|
11896
|
-
this.secondary = false;
|
|
11897
|
-
this.tertiary = false;
|
|
11898
|
-
this.rounded = false;
|
|
11899
|
-
this.slim = false;
|
|
11900
12278
|
this.fluid = false;
|
|
11901
12279
|
this.loadingText = this.loadingText || 'Loading...';
|
|
11902
12280
|
|
|
@@ -11913,55 +12291,50 @@ class AuroButton extends i$2 {
|
|
|
11913
12291
|
/**
|
|
11914
12292
|
* Generate unique names for dependency components.
|
|
11915
12293
|
*/
|
|
11916
|
-
const versioning = new AuroDependencyVersioning$
|
|
12294
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
11917
12295
|
|
|
11918
12296
|
/**
|
|
11919
12297
|
* @private
|
|
11920
12298
|
*/
|
|
11921
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
12299
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
11922
12300
|
}
|
|
11923
12301
|
|
|
11924
12302
|
static get styles() {
|
|
11925
12303
|
return [
|
|
11926
|
-
tokensCss$2$
|
|
12304
|
+
tokensCss$2$2,
|
|
11927
12305
|
styleCss$2$2,
|
|
11928
|
-
colorCss$2$
|
|
12306
|
+
colorCss$2$2,
|
|
12307
|
+
shapeSize$1
|
|
11929
12308
|
];
|
|
11930
12309
|
}
|
|
11931
12310
|
|
|
11932
12311
|
static get properties() {
|
|
11933
12312
|
return {
|
|
11934
12313
|
|
|
11935
|
-
|
|
11936
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11937
|
-
*/
|
|
11938
|
-
autofocus: {
|
|
11939
|
-
type: Boolean,
|
|
11940
|
-
reflect: true
|
|
11941
|
-
},
|
|
12314
|
+
...super.properties,
|
|
11942
12315
|
|
|
11943
12316
|
/**
|
|
11944
|
-
*
|
|
12317
|
+
* Override layout since it isn't used in this component.
|
|
12318
|
+
* @private
|
|
11945
12319
|
*/
|
|
11946
|
-
|
|
12320
|
+
layout: {
|
|
11947
12321
|
type: Boolean,
|
|
11948
|
-
|
|
12322
|
+
attribute: false,
|
|
12323
|
+
reflect: false
|
|
11949
12324
|
},
|
|
11950
12325
|
|
|
11951
12326
|
/**
|
|
11952
|
-
*
|
|
11953
|
-
* @deprecated
|
|
12327
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11954
12328
|
*/
|
|
11955
|
-
|
|
12329
|
+
autofocus: {
|
|
11956
12330
|
type: Boolean,
|
|
11957
12331
|
reflect: true
|
|
11958
12332
|
},
|
|
11959
12333
|
|
|
11960
12334
|
/**
|
|
11961
|
-
*
|
|
11962
|
-
* @deprecated
|
|
12335
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
11963
12336
|
*/
|
|
11964
|
-
|
|
12337
|
+
disabled: {
|
|
11965
12338
|
type: Boolean,
|
|
11966
12339
|
reflect: true
|
|
11967
12340
|
},
|
|
@@ -11969,15 +12342,7 @@ class AuroButton extends i$2 {
|
|
|
11969
12342
|
/**
|
|
11970
12343
|
* Alters the shape of the button to be full width of its parent container.
|
|
11971
12344
|
*/
|
|
11972
|
-
fluid:
|
|
11973
|
-
type: Boolean,
|
|
11974
|
-
reflect: true
|
|
11975
|
-
},
|
|
11976
|
-
|
|
11977
|
-
/**
|
|
11978
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
11979
|
-
*/
|
|
11980
|
-
iconOnly: {
|
|
12345
|
+
fluid: {
|
|
11981
12346
|
type: Boolean,
|
|
11982
12347
|
reflect: true
|
|
11983
12348
|
},
|
|
@@ -11985,7 +12350,7 @@ class AuroButton extends i$2 {
|
|
|
11985
12350
|
/**
|
|
11986
12351
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
11987
12352
|
*/
|
|
11988
|
-
loading:
|
|
12353
|
+
loading: {
|
|
11989
12354
|
type: Boolean,
|
|
11990
12355
|
reflect: true
|
|
11991
12356
|
},
|
|
@@ -11993,34 +12358,10 @@ class AuroButton extends i$2 {
|
|
|
11993
12358
|
/**
|
|
11994
12359
|
* 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.
|
|
11995
12360
|
*/
|
|
11996
|
-
loadingText:
|
|
12361
|
+
loadingText: {
|
|
11997
12362
|
type: String
|
|
11998
12363
|
},
|
|
11999
12364
|
|
|
12000
|
-
/**
|
|
12001
|
-
* Set value for on-dark version of auro-button.
|
|
12002
|
-
*/
|
|
12003
|
-
onDark: {
|
|
12004
|
-
type: Boolean,
|
|
12005
|
-
reflect: true
|
|
12006
|
-
},
|
|
12007
|
-
|
|
12008
|
-
/**
|
|
12009
|
-
* If set to true, the button will have a rounded shape.
|
|
12010
|
-
*/
|
|
12011
|
-
rounded: {
|
|
12012
|
-
type: Boolean,
|
|
12013
|
-
reflect: true
|
|
12014
|
-
},
|
|
12015
|
-
|
|
12016
|
-
/**
|
|
12017
|
-
* Set value for slim version of auro-button.
|
|
12018
|
-
*/
|
|
12019
|
-
slim: {
|
|
12020
|
-
type: Boolean,
|
|
12021
|
-
reflect: true
|
|
12022
|
-
},
|
|
12023
|
-
|
|
12024
12365
|
/**
|
|
12025
12366
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
12026
12367
|
*/
|
|
@@ -12029,48 +12370,10 @@ class AuroButton extends i$2 {
|
|
|
12029
12370
|
reflect: true
|
|
12030
12371
|
},
|
|
12031
12372
|
|
|
12032
|
-
/**
|
|
12033
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
12034
|
-
*/
|
|
12035
|
-
ariahidden: {
|
|
12036
|
-
type: String,
|
|
12037
|
-
reflect: true,
|
|
12038
|
-
},
|
|
12039
|
-
|
|
12040
|
-
/**
|
|
12041
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
12042
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
12043
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
12044
|
-
*/
|
|
12045
|
-
arialabel: {
|
|
12046
|
-
type: String,
|
|
12047
|
-
reflect: true
|
|
12048
|
-
},
|
|
12049
|
-
|
|
12050
|
-
/**
|
|
12051
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
12052
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
12053
|
-
* List multiple element IDs in a space delimited fashion.
|
|
12054
|
-
*/
|
|
12055
|
-
arialabelledby: {
|
|
12056
|
-
type: String,
|
|
12057
|
-
reflect: true
|
|
12058
|
-
},
|
|
12059
|
-
|
|
12060
|
-
/**
|
|
12061
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
12062
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
12063
|
-
* This is an optional attribute for buttons.
|
|
12064
|
-
*/
|
|
12065
|
-
ariaexpanded: {
|
|
12066
|
-
type: Boolean,
|
|
12067
|
-
reflect: true
|
|
12068
|
-
},
|
|
12069
|
-
|
|
12070
12373
|
/**
|
|
12071
12374
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12072
12375
|
*/
|
|
12073
|
-
title:
|
|
12376
|
+
title: {
|
|
12074
12377
|
type: String,
|
|
12075
12378
|
reflect: true
|
|
12076
12379
|
},
|
|
@@ -12078,7 +12381,7 @@ class AuroButton extends i$2 {
|
|
|
12078
12381
|
/**
|
|
12079
12382
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
12080
12383
|
*/
|
|
12081
|
-
type:
|
|
12384
|
+
type: {
|
|
12082
12385
|
type: String,
|
|
12083
12386
|
reflect: true
|
|
12084
12387
|
},
|
|
@@ -12086,19 +12389,19 @@ class AuroButton extends i$2 {
|
|
|
12086
12389
|
/**
|
|
12087
12390
|
* Defines the value associated with the button which is submitted with the form data.
|
|
12088
12391
|
*/
|
|
12089
|
-
value:
|
|
12392
|
+
value: {
|
|
12090
12393
|
type: String,
|
|
12091
12394
|
reflect: true
|
|
12092
12395
|
},
|
|
12093
12396
|
|
|
12094
12397
|
/**
|
|
12095
|
-
* Sets button variant option.
|
|
12398
|
+
* Sets button variant option.
|
|
12399
|
+
* @default primary
|
|
12096
12400
|
*/
|
|
12097
|
-
variant:
|
|
12401
|
+
variant: {
|
|
12098
12402
|
type: String,
|
|
12099
12403
|
reflect: true
|
|
12100
12404
|
},
|
|
12101
|
-
ready: { type: Boolean },
|
|
12102
12405
|
};
|
|
12103
12406
|
}
|
|
12104
12407
|
|
|
@@ -12111,7 +12414,7 @@ class AuroButton extends i$2 {
|
|
|
12111
12414
|
*
|
|
12112
12415
|
*/
|
|
12113
12416
|
static register(name = "auro-button") {
|
|
12114
|
-
AuroLibraryRuntimeUtils$
|
|
12417
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
12115
12418
|
}
|
|
12116
12419
|
|
|
12117
12420
|
/**
|
|
@@ -12123,17 +12426,6 @@ class AuroButton extends i$2 {
|
|
|
12123
12426
|
this.renderRoot.querySelector('button').focus();
|
|
12124
12427
|
}
|
|
12125
12428
|
|
|
12126
|
-
updated() {
|
|
12127
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12128
|
-
if (this.secondary) {
|
|
12129
|
-
this.setAttribute('variant', 'secondary');
|
|
12130
|
-
}
|
|
12131
|
-
|
|
12132
|
-
if (this.tertiary) {
|
|
12133
|
-
this.setAttribute('variant', 'tertiary');
|
|
12134
|
-
}
|
|
12135
|
-
}
|
|
12136
|
-
|
|
12137
12429
|
/**
|
|
12138
12430
|
* Submits the form that this button is associated with.
|
|
12139
12431
|
* @private
|
|
@@ -12154,25 +12446,56 @@ class AuroButton extends i$2 {
|
|
|
12154
12446
|
return this.internals ? this.internals.form : null;
|
|
12155
12447
|
}
|
|
12156
12448
|
|
|
12157
|
-
|
|
12449
|
+
/**
|
|
12450
|
+
* @private
|
|
12451
|
+
* @returns {Boolean}
|
|
12452
|
+
*/
|
|
12453
|
+
get hideText() {
|
|
12454
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
12455
|
+
}
|
|
12456
|
+
|
|
12457
|
+
/**
|
|
12458
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
12459
|
+
* @returns {string | undefined}
|
|
12460
|
+
* @private
|
|
12461
|
+
*/
|
|
12462
|
+
get currentAriaLabel() {
|
|
12463
|
+
if (!this.attributeWatcher) return undefined;
|
|
12464
|
+
|
|
12465
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
12466
|
+
return ariaLabel || undefined;
|
|
12467
|
+
}
|
|
12468
|
+
|
|
12469
|
+
/**
|
|
12470
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
12471
|
+
* @returns {string | undefined}
|
|
12472
|
+
* @private
|
|
12473
|
+
*/
|
|
12474
|
+
get currentAriaLabelledBy() {
|
|
12475
|
+
if (!this.attributeWatcher) return undefined;
|
|
12476
|
+
|
|
12477
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
12478
|
+
return ariaLabelledBy || undefined;
|
|
12479
|
+
}
|
|
12480
|
+
|
|
12481
|
+
/**
|
|
12482
|
+
* Renders the default layout for the button.
|
|
12483
|
+
* @returns {TemplateResult}
|
|
12484
|
+
* @private
|
|
12485
|
+
*/
|
|
12486
|
+
renderLayoutDefault() {
|
|
12158
12487
|
const classes = {
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
'auro-button--slim': this.slim,
|
|
12164
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12165
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12166
|
-
'loading': this.loading
|
|
12488
|
+
"util_insetLg--squish": true,
|
|
12489
|
+
"auro-button": true,
|
|
12490
|
+
wrapper: true,
|
|
12491
|
+
loading: this.loading,
|
|
12167
12492
|
};
|
|
12168
12493
|
|
|
12169
12494
|
return u$2`
|
|
12170
12495
|
<button
|
|
12171
12496
|
part="button"
|
|
12172
|
-
aria-
|
|
12173
|
-
aria-
|
|
12174
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12175
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
12497
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
12498
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12176
12499
|
tabIndex="${o(this.tIndex)}"
|
|
12177
12500
|
?autofocus="${this.autofocus}"
|
|
12178
12501
|
class="${e(classes)}"
|
|
@@ -12189,7 +12512,7 @@ class AuroButton extends i$2 {
|
|
|
12189
12512
|
|
|
12190
12513
|
<span class="contentWrapper">
|
|
12191
12514
|
<span class="textSlot" part="text">
|
|
12192
|
-
${this.
|
|
12515
|
+
${this.hideText ? undefined : u$2`<slot></slot>`}
|
|
12193
12516
|
</span>
|
|
12194
12517
|
|
|
12195
12518
|
<span part="icon">
|
|
@@ -12199,9 +12522,18 @@ class AuroButton extends i$2 {
|
|
|
12199
12522
|
</button>
|
|
12200
12523
|
`;
|
|
12201
12524
|
}
|
|
12202
|
-
}
|
|
12203
12525
|
|
|
12204
|
-
|
|
12526
|
+
/**
|
|
12527
|
+
* Renders the layout of the button
|
|
12528
|
+
* @returns {TemplateResult}
|
|
12529
|
+
* @private
|
|
12530
|
+
*/
|
|
12531
|
+
renderLayout() {
|
|
12532
|
+
return this.renderLayoutDefault();
|
|
12533
|
+
}
|
|
12534
|
+
};
|
|
12535
|
+
|
|
12536
|
+
var buttonVersion$1 = '9.3.0';
|
|
12205
12537
|
|
|
12206
12538
|
var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
12207
12539
|
|
|
@@ -12429,7 +12761,7 @@ class AuroInput extends BaseInput {
|
|
|
12429
12761
|
/**
|
|
12430
12762
|
* @private
|
|
12431
12763
|
*/
|
|
12432
|
-
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
12764
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$1, AuroButton$1);
|
|
12433
12765
|
|
|
12434
12766
|
/**
|
|
12435
12767
|
* @private
|
|
@@ -12453,7 +12785,7 @@ class AuroInput extends BaseInput {
|
|
|
12453
12785
|
i$5`${classicColorCss}`,
|
|
12454
12786
|
i$5`${shapeSizeCss}`,
|
|
12455
12787
|
i$5`${colorBaseCss}`,
|
|
12456
|
-
i$5`${styleCss$4$
|
|
12788
|
+
i$5`${styleCss$4$2}`,
|
|
12457
12789
|
i$5`${styleDefaultCss}`,
|
|
12458
12790
|
i$5`${tokensCss$4}`,
|
|
12459
12791
|
i$5`${emphasizedStyleCss}`,
|
|
@@ -12545,7 +12877,7 @@ class AuroInput extends BaseInput {
|
|
|
12545
12877
|
*
|
|
12546
12878
|
*/
|
|
12547
12879
|
static register(name = "auro-input") {
|
|
12548
|
-
AuroLibraryRuntimeUtils$
|
|
12880
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroInput);
|
|
12549
12881
|
}
|
|
12550
12882
|
|
|
12551
12883
|
/**
|
|
@@ -12675,11 +13007,12 @@ class AuroInput extends BaseInput {
|
|
|
12675
13007
|
?onDark="${this.onDark}"
|
|
12676
13008
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
12677
13009
|
class="notificationBtn clearBtn"
|
|
12678
|
-
|
|
12679
|
-
|
|
13010
|
+
shape="circle"
|
|
13011
|
+
size="sm"
|
|
13012
|
+
variant="ghost">
|
|
12680
13013
|
<${this.iconTag}
|
|
13014
|
+
customColor="${this.onDark}"
|
|
12681
13015
|
category="interface"
|
|
12682
|
-
customColor
|
|
12683
13016
|
name="x-lg"
|
|
12684
13017
|
>
|
|
12685
13018
|
</${this.iconTag}>
|
|
@@ -12699,20 +13032,21 @@ class AuroInput extends BaseInput {
|
|
|
12699
13032
|
<${this.buttonTag}
|
|
12700
13033
|
@click="${this.handleClickShowPassword}"
|
|
12701
13034
|
?onDark="${this.onDark}"
|
|
12702
|
-
aria-hidden="true"
|
|
12703
13035
|
class="notificationBtn passwordBtn"
|
|
12704
|
-
|
|
12705
|
-
|
|
13036
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
13037
|
+
shape="circle"
|
|
13038
|
+
size="sm"
|
|
13039
|
+
variant="ghost">
|
|
12706
13040
|
<${this.iconTag}
|
|
13041
|
+
customColor="${this.onDark}"
|
|
12707
13042
|
?hidden=${!this.showPassword}
|
|
12708
13043
|
category="interface"
|
|
12709
|
-
customColor
|
|
12710
13044
|
name="hide-password-stroke">
|
|
12711
13045
|
</${this.iconTag}>
|
|
12712
13046
|
<${this.iconTag}
|
|
13047
|
+
customColor="${this.onDark}"
|
|
12713
13048
|
?hidden=${this.showPassword}
|
|
12714
13049
|
category="interface"
|
|
12715
|
-
customColor
|
|
12716
13050
|
name="view-password-stroke">
|
|
12717
13051
|
</${this.iconTag}>
|
|
12718
13052
|
</${this.buttonTag}>
|
|
@@ -12825,219 +13159,1216 @@ class AuroInput extends BaseInput {
|
|
|
12825
13159
|
}
|
|
12826
13160
|
|
|
12827
13161
|
/**
|
|
12828
|
-
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
12829
|
-
* @private
|
|
12830
|
-
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13162
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
13163
|
+
* @private
|
|
13164
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13165
|
+
*/
|
|
13166
|
+
renderLayoutEmphasized() {
|
|
13167
|
+
return u$2`
|
|
13168
|
+
<div
|
|
13169
|
+
@click="${this.handleClick}"
|
|
13170
|
+
class="${e(this.commonWrapperClasses)}"
|
|
13171
|
+
part="wrapper">
|
|
13172
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
13173
|
+
${this.layout.includes('left') ? u$2`
|
|
13174
|
+
${this.renderValidationErrorIconHtml()}
|
|
13175
|
+
` : undefined}
|
|
13176
|
+
</div>
|
|
13177
|
+
<div class="mainContent">
|
|
13178
|
+
${this.renderHtmlInput()}
|
|
13179
|
+
</div>
|
|
13180
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
13181
|
+
${this.layout.includes('right') || this.layout === "emphasized" ? u$2`
|
|
13182
|
+
${this.renderValidationErrorIconHtml()}
|
|
13183
|
+
` : undefined}
|
|
13184
|
+
${this.hasValue ? u$2`
|
|
13185
|
+
${!this.disabled && !this.readonly ? u$2`
|
|
13186
|
+
${this.renderHtmlActionClear()}
|
|
13187
|
+
` : undefined}
|
|
13188
|
+
` : undefined}
|
|
13189
|
+
</div>
|
|
13190
|
+
</div>
|
|
13191
|
+
<div class="${e(this.helpTextClasses)}" part="inputHelpText">
|
|
13192
|
+
${this.renderHtmlHelpText()}
|
|
13193
|
+
</div>
|
|
13194
|
+
`;
|
|
13195
|
+
}
|
|
13196
|
+
|
|
13197
|
+
/**
|
|
13198
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
13199
|
+
* @private
|
|
13200
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13201
|
+
*/
|
|
13202
|
+
renderLayoutSnowflake() {
|
|
13203
|
+
return u$2`
|
|
13204
|
+
<div
|
|
13205
|
+
@click="${this.handleClick}"
|
|
13206
|
+
class="${e(this.commonWrapperClasses)}"
|
|
13207
|
+
part="wrapper">
|
|
13208
|
+
<div class="accents left">
|
|
13209
|
+
${this.renderHtmlTypeIcon()}
|
|
13210
|
+
</div>
|
|
13211
|
+
<div class="mainContent">
|
|
13212
|
+
${this.renderHtmlInput()}
|
|
13213
|
+
</div>
|
|
13214
|
+
<div class="accents right">
|
|
13215
|
+
${this.renderValidationErrorIconHtml()}
|
|
13216
|
+
${this.hasValue ? u$2`
|
|
13217
|
+
${!this.disabled && !this.readonly ? u$2`
|
|
13218
|
+
${this.renderHtmlActionClear()}
|
|
13219
|
+
` : undefined}
|
|
13220
|
+
` : undefined}
|
|
13221
|
+
</div>
|
|
13222
|
+
</div>
|
|
13223
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
13224
|
+
${this.renderHtmlHelpText()}
|
|
13225
|
+
</div>
|
|
13226
|
+
`;
|
|
13227
|
+
}
|
|
13228
|
+
|
|
13229
|
+
/**
|
|
13230
|
+
* Logic to determine the layout of the component.
|
|
13231
|
+
* @private
|
|
13232
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
13233
|
+
* @returns {void}
|
|
13234
|
+
*/
|
|
13235
|
+
renderLayout(ForcedLayout) {
|
|
13236
|
+
const layout = ForcedLayout || this.layout;
|
|
13237
|
+
|
|
13238
|
+
switch (layout) {
|
|
13239
|
+
case 'emphasized':
|
|
13240
|
+
return this.renderLayoutEmphasized();
|
|
13241
|
+
case 'emphasized-left':
|
|
13242
|
+
return this.renderLayoutEmphasized();
|
|
13243
|
+
case 'emphasized-right':
|
|
13244
|
+
return this.renderLayoutEmphasized();
|
|
13245
|
+
case 'snowflake':
|
|
13246
|
+
return this.renderLayoutSnowflake();
|
|
13247
|
+
case 'snowflake-left':
|
|
13248
|
+
return this.renderLayoutSnowflake();
|
|
13249
|
+
case 'snowflake-right':
|
|
13250
|
+
return this.renderLayoutSnowflake();
|
|
13251
|
+
default:
|
|
13252
|
+
return this.renderLayoutClassic();
|
|
13253
|
+
}
|
|
13254
|
+
}
|
|
13255
|
+
}
|
|
13256
|
+
|
|
13257
|
+
var inputVersion = '4.2.0';
|
|
13258
|
+
|
|
13259
|
+
var colorCss$3$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
13260
|
+
|
|
13261
|
+
var styleCss$4$1 = i$5`#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)}`;
|
|
13262
|
+
|
|
13263
|
+
var tokenCss = i$5`: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)}`;
|
|
13264
|
+
|
|
13265
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13266
|
+
// See LICENSE in the project root for license information.
|
|
13267
|
+
|
|
13268
|
+
// ---------------------------------------------------------------------
|
|
13269
|
+
|
|
13270
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13271
|
+
|
|
13272
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
13273
|
+
|
|
13274
|
+
/* eslint-disable jsdoc/require-param */
|
|
13275
|
+
|
|
13276
|
+
/**
|
|
13277
|
+
* This will register a new custom element with the browser.
|
|
13278
|
+
* @param {String} name - The name of the custom element.
|
|
13279
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13280
|
+
* @returns {void}
|
|
13281
|
+
*/
|
|
13282
|
+
registerComponent(name, componentClass) {
|
|
13283
|
+
if (!customElements.get(name)) {
|
|
13284
|
+
customElements.define(name, class extends componentClass {});
|
|
13285
|
+
}
|
|
13286
|
+
}
|
|
13287
|
+
|
|
13288
|
+
/**
|
|
13289
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13290
|
+
* @returns {void}
|
|
13291
|
+
*/
|
|
13292
|
+
closestElement(
|
|
13293
|
+
selector, // selector like in .closest()
|
|
13294
|
+
base = this, // extra functionality to skip a parent
|
|
13295
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13296
|
+
!el || el === document || el === window
|
|
13297
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13298
|
+
: found
|
|
13299
|
+
? found // found a selector INside this element
|
|
13300
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13301
|
+
) {
|
|
13302
|
+
return __Closest(base);
|
|
13303
|
+
}
|
|
13304
|
+
/* eslint-enable jsdoc/require-param */
|
|
13305
|
+
|
|
13306
|
+
/**
|
|
13307
|
+
* 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.
|
|
13308
|
+
* @param {Object} elem - The element to check.
|
|
13309
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13310
|
+
* @returns {void}
|
|
13311
|
+
*/
|
|
13312
|
+
handleComponentTagRename(elem, tagName) {
|
|
13313
|
+
const tag = tagName.toLowerCase();
|
|
13314
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13315
|
+
|
|
13316
|
+
if (elemTag !== tag) {
|
|
13317
|
+
elem.setAttribute(tag, true);
|
|
13318
|
+
}
|
|
13319
|
+
}
|
|
13320
|
+
|
|
13321
|
+
/**
|
|
13322
|
+
* Validates if an element is a specific Auro component.
|
|
13323
|
+
* @param {Object} elem - The element to validate.
|
|
13324
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13325
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13326
|
+
*/
|
|
13327
|
+
elementMatch(elem, tagName) {
|
|
13328
|
+
const tag = tagName.toLowerCase();
|
|
13329
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13330
|
+
|
|
13331
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13332
|
+
}
|
|
13333
|
+
};
|
|
13334
|
+
|
|
13335
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13336
|
+
// See LICENSE in the project root for license information.
|
|
13337
|
+
|
|
13338
|
+
|
|
13339
|
+
class AuroDependencyVersioning {
|
|
13340
|
+
|
|
13341
|
+
/**
|
|
13342
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13343
|
+
* @private
|
|
13344
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13345
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13346
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13347
|
+
*/
|
|
13348
|
+
generateElementName(baseName, version) {
|
|
13349
|
+
let result = baseName;
|
|
13350
|
+
|
|
13351
|
+
result += '-';
|
|
13352
|
+
result += version.replace(/[.]/g, '_');
|
|
13353
|
+
|
|
13354
|
+
return result;
|
|
13355
|
+
}
|
|
13356
|
+
|
|
13357
|
+
/**
|
|
13358
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13359
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13360
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13361
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13362
|
+
*/
|
|
13363
|
+
generateTag(baseName, version, tagClass) {
|
|
13364
|
+
const elementName = this.generateElementName(baseName, version);
|
|
13365
|
+
const tag = i$1`${s$1(elementName)}`;
|
|
13366
|
+
|
|
13367
|
+
if (!customElements.get(elementName)) {
|
|
13368
|
+
customElements.define(elementName, class extends tagClass {});
|
|
13369
|
+
}
|
|
13370
|
+
|
|
13371
|
+
return tag;
|
|
13372
|
+
}
|
|
13373
|
+
}
|
|
13374
|
+
|
|
13375
|
+
/**
|
|
13376
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
13377
|
+
*/
|
|
13378
|
+
const _observers = new WeakMap();
|
|
13379
|
+
|
|
13380
|
+
/**
|
|
13381
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
13382
|
+
* Structure: {
|
|
13383
|
+
* host: {
|
|
13384
|
+
* matchers: Set<Function>,
|
|
13385
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
13386
|
+
* }
|
|
13387
|
+
* }
|
|
13388
|
+
*/
|
|
13389
|
+
const _transportConfig = new WeakMap();
|
|
13390
|
+
|
|
13391
|
+
/**
|
|
13392
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
13393
|
+
*
|
|
13394
|
+
* @param {Object} params - The parameters for the function.
|
|
13395
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
13396
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13397
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
13398
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
13399
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
13400
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
13401
|
+
*/
|
|
13402
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
13403
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
13404
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
13405
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
13406
|
+
}
|
|
13407
|
+
|
|
13408
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
13409
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
13410
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
13411
|
+
}
|
|
13412
|
+
|
|
13413
|
+
// Guard Clause: Ensure match is a function
|
|
13414
|
+
if (typeof match !== 'function') {
|
|
13415
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
13416
|
+
}
|
|
13417
|
+
|
|
13418
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
13419
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
13420
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
13421
|
+
}
|
|
13422
|
+
|
|
13423
|
+
// Register this transport and get cleanup function
|
|
13424
|
+
return _registerTransport({
|
|
13425
|
+
host,
|
|
13426
|
+
target,
|
|
13427
|
+
matcher: match,
|
|
13428
|
+
removeOriginal
|
|
13429
|
+
});
|
|
13430
|
+
};
|
|
13431
|
+
|
|
13432
|
+
/**
|
|
13433
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
13434
|
+
*
|
|
13435
|
+
* @param {Object} params - The parameters object.
|
|
13436
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
13437
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
13438
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
13439
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
13440
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
13441
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
13442
|
+
* @private
|
|
13443
|
+
*/
|
|
13444
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13445
|
+
// Initialize config for this host if it doesn't exist
|
|
13446
|
+
if (!_transportConfig.has(host)) {
|
|
13447
|
+
_transportConfig.set(host, {
|
|
13448
|
+
matchers: new Set(),
|
|
13449
|
+
targets: new Map()
|
|
13450
|
+
});
|
|
13451
|
+
}
|
|
13452
|
+
|
|
13453
|
+
const config = _transportConfig.get(host);
|
|
13454
|
+
|
|
13455
|
+
// Add the matcher to the set of matchers for this host
|
|
13456
|
+
config.matchers.add(matcher);
|
|
13457
|
+
|
|
13458
|
+
// Initialize target entry if it doesn't exist
|
|
13459
|
+
if (!config.targets.has(target)) {
|
|
13460
|
+
config.targets.set(target, new Map());
|
|
13461
|
+
}
|
|
13462
|
+
|
|
13463
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
13464
|
+
config.targets.get(target).set(matcher, {
|
|
13465
|
+
removeOriginal,
|
|
13466
|
+
currentAttributes: new Map()
|
|
13467
|
+
});
|
|
13468
|
+
|
|
13469
|
+
// Perform initial attribute transport
|
|
13470
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
13471
|
+
|
|
13472
|
+
// Attach observer
|
|
13473
|
+
_attachObserver(host);
|
|
13474
|
+
|
|
13475
|
+
// Return cleanup function and utility functions
|
|
13476
|
+
return {
|
|
13477
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
13478
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
13479
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
13480
|
+
}
|
|
13481
|
+
};
|
|
13482
|
+
|
|
13483
|
+
/**
|
|
13484
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
13485
|
+
*
|
|
13486
|
+
* @param {HTMLElement} host - The host element
|
|
13487
|
+
* @param {HTMLElement} target - The target element
|
|
13488
|
+
* @param {Function} matcher - The matcher function
|
|
13489
|
+
* @private
|
|
13490
|
+
*/
|
|
13491
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
13492
|
+
const config = _transportConfig.get(host);
|
|
13493
|
+
if (!config) return;
|
|
13494
|
+
|
|
13495
|
+
// Remove this matcher from this target
|
|
13496
|
+
const targetMatchers = config.targets.get(target);
|
|
13497
|
+
if (targetMatchers) {
|
|
13498
|
+
targetMatchers.delete(matcher);
|
|
13499
|
+
|
|
13500
|
+
// If this target has no more matchers, remove it
|
|
13501
|
+
if (targetMatchers.size === 0) {
|
|
13502
|
+
config.targets.delete(target);
|
|
13503
|
+
}
|
|
13504
|
+
}
|
|
13505
|
+
|
|
13506
|
+
// Check if this matcher is still used by any target
|
|
13507
|
+
let matcherStillUsed = false;
|
|
13508
|
+
for (const matcherMap of config.targets.values()) {
|
|
13509
|
+
if (matcherMap.has(matcher)) {
|
|
13510
|
+
matcherStillUsed = true;
|
|
13511
|
+
break;
|
|
13512
|
+
}
|
|
13513
|
+
}
|
|
13514
|
+
|
|
13515
|
+
// If not used anymore, remove from matchers set
|
|
13516
|
+
if (!matcherStillUsed) {
|
|
13517
|
+
config.matchers.delete(matcher);
|
|
13518
|
+
}
|
|
13519
|
+
|
|
13520
|
+
// If no more targets or matchers, detach observer
|
|
13521
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
13522
|
+
_detachObserver(host);
|
|
13523
|
+
}
|
|
13524
|
+
};
|
|
13525
|
+
|
|
13526
|
+
/**
|
|
13527
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
13528
|
+
*
|
|
13529
|
+
* @param {Object} params - The parameters object.
|
|
13530
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
13531
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13532
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
13533
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
13534
|
+
* @returns {void}
|
|
13535
|
+
* @private
|
|
13536
|
+
*/
|
|
13537
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13538
|
+
// Get a list of all matching attributes on the host element and their values
|
|
13539
|
+
const matchingAttributes = host.getAttributeNames()
|
|
13540
|
+
.filter(attr => matcher(attr))
|
|
13541
|
+
.reduce((acc, attr) => {
|
|
13542
|
+
acc[attr] = host.getAttribute(attr);
|
|
13543
|
+
return acc;
|
|
13544
|
+
}, {});
|
|
13545
|
+
|
|
13546
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
13547
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
13548
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
13549
|
+
target.setAttribute(key, value);
|
|
13550
|
+
if (removeOriginal) {
|
|
13551
|
+
host.removeAttribute(key);
|
|
13552
|
+
}
|
|
13553
|
+
});
|
|
13554
|
+
};
|
|
13555
|
+
|
|
13556
|
+
/**
|
|
13557
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
13558
|
+
*
|
|
13559
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
13560
|
+
* @returns {MutationObserver} The observer instance.
|
|
13561
|
+
* @private
|
|
13562
|
+
*/
|
|
13563
|
+
const _attachObserver = (host) => {
|
|
13564
|
+
// If an observer for this host already exists, return it
|
|
13565
|
+
if (_observers.has(host)) {
|
|
13566
|
+
return _observers.get(host);
|
|
13567
|
+
}
|
|
13568
|
+
|
|
13569
|
+
// Create a new MutationObserver
|
|
13570
|
+
const observer = new MutationObserver((mutations) => {
|
|
13571
|
+
const config = _transportConfig.get(host);
|
|
13572
|
+
if (!config) return;
|
|
13573
|
+
|
|
13574
|
+
// For each mutation affecting attributes
|
|
13575
|
+
mutations
|
|
13576
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
13577
|
+
.forEach(mutation => {
|
|
13578
|
+
const attributeName = mutation.attributeName;
|
|
13579
|
+
|
|
13580
|
+
// Find matchers that care about this attribute
|
|
13581
|
+
for (const matcher of config.matchers) {
|
|
13582
|
+
if (matcher(attributeName)) {
|
|
13583
|
+
// For each target that uses this matcher
|
|
13584
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
13585
|
+
if (matcherConfigs.has(matcher)) {
|
|
13586
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
13587
|
+
_transportAttributes({
|
|
13588
|
+
host,
|
|
13589
|
+
target,
|
|
13590
|
+
matcher,
|
|
13591
|
+
removeOriginal
|
|
13592
|
+
});
|
|
13593
|
+
}
|
|
13594
|
+
}
|
|
13595
|
+
}
|
|
13596
|
+
}
|
|
13597
|
+
});
|
|
13598
|
+
});
|
|
13599
|
+
|
|
13600
|
+
// Start observing attribute changes
|
|
13601
|
+
observer.observe(host, { attributes: true });
|
|
13602
|
+
|
|
13603
|
+
// Store the observer
|
|
13604
|
+
_observers.set(host, observer);
|
|
13605
|
+
|
|
13606
|
+
return observer;
|
|
13607
|
+
};
|
|
13608
|
+
|
|
13609
|
+
/**
|
|
13610
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
13611
|
+
*
|
|
13612
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
13613
|
+
* @private
|
|
13614
|
+
*/
|
|
13615
|
+
const _detachObserver = (host) => {
|
|
13616
|
+
if (_observers.has(host)) {
|
|
13617
|
+
const observer = _observers.get(host);
|
|
13618
|
+
observer.disconnect();
|
|
13619
|
+
_observers.delete(host);
|
|
13620
|
+
}
|
|
13621
|
+
|
|
13622
|
+
// Clean up the transport config as well
|
|
13623
|
+
if (_transportConfig.has(host)) {
|
|
13624
|
+
_transportConfig.delete(host);
|
|
13625
|
+
}
|
|
13626
|
+
};
|
|
13627
|
+
|
|
13628
|
+
/**
|
|
13629
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
13630
|
+
* @param {HTMLElement} host - The host element
|
|
13631
|
+
* @param {HTMLElement} target - The target element
|
|
13632
|
+
* @param {Function} matcher - The matcher function
|
|
13633
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
13634
|
+
* @private
|
|
13635
|
+
*/
|
|
13636
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
13637
|
+
const config = _transportConfig.get(host);
|
|
13638
|
+
if (!config) return undefined;
|
|
13639
|
+
|
|
13640
|
+
const targetMatchers = config.targets.get(target);
|
|
13641
|
+
if (!targetMatchers) return undefined;
|
|
13642
|
+
|
|
13643
|
+
return targetMatchers.get(matcher);
|
|
13644
|
+
};
|
|
13645
|
+
|
|
13646
|
+
/**
|
|
13647
|
+
* Sets an observed attribute value
|
|
13648
|
+
* @param {HTMLElement} host - The host element
|
|
13649
|
+
* @param {HTMLElement} target - The target element
|
|
13650
|
+
* @param {Function} matcher - The matcher function
|
|
13651
|
+
* @param {string} key - The attribute name
|
|
13652
|
+
* @param {string} value - The attribute value
|
|
13653
|
+
* @private
|
|
13654
|
+
*/
|
|
13655
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
13656
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13657
|
+
if (matcherConfig) {
|
|
13658
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
13659
|
+
}
|
|
13660
|
+
};
|
|
13661
|
+
|
|
13662
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
13663
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13664
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13665
|
+
return undefined;
|
|
13666
|
+
};
|
|
13667
|
+
|
|
13668
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
13669
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13670
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13671
|
+
return [];
|
|
13672
|
+
};
|
|
13673
|
+
|
|
13674
|
+
const _matchers = {
|
|
13675
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13676
|
+
'role': attr => attr.match(/^role$/)
|
|
13677
|
+
};
|
|
13678
|
+
|
|
13679
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
13680
|
+
return transportAttributes({
|
|
13681
|
+
host,
|
|
13682
|
+
target,
|
|
13683
|
+
match: attr => {
|
|
13684
|
+
for (const key in _matchers) {
|
|
13685
|
+
if (_matchers[key](attr)) return true;
|
|
13686
|
+
}
|
|
13687
|
+
return false;
|
|
13688
|
+
},
|
|
13689
|
+
removeOriginal
|
|
13690
|
+
});
|
|
13691
|
+
};
|
|
13692
|
+
|
|
13693
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
13694
|
+
|
|
13695
|
+
/**
|
|
13696
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13697
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13698
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13699
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
13700
|
+
* @private
|
|
13701
|
+
*/
|
|
13702
|
+
attributeWatcher;
|
|
13703
|
+
|
|
13704
|
+
static get properties() {
|
|
13705
|
+
return {
|
|
13706
|
+
|
|
13707
|
+
/**
|
|
13708
|
+
* Defines the layout of an element.
|
|
13709
|
+
* @default {'default'}
|
|
13710
|
+
*/
|
|
13711
|
+
layout: {
|
|
13712
|
+
type: String,
|
|
13713
|
+
attribute: "layout",
|
|
13714
|
+
reflect: true
|
|
13715
|
+
},
|
|
13716
|
+
|
|
13717
|
+
/**
|
|
13718
|
+
* Defines the shape of an element.
|
|
13719
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13720
|
+
* @default {'default'}
|
|
13721
|
+
*/
|
|
13722
|
+
shape: {
|
|
13723
|
+
type: String,
|
|
13724
|
+
attribute: "shape",
|
|
13725
|
+
reflect: true
|
|
13726
|
+
},
|
|
13727
|
+
|
|
13728
|
+
/**
|
|
13729
|
+
* Defines the size of an element.
|
|
13730
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13731
|
+
* @default {'md'}
|
|
13732
|
+
*/
|
|
13733
|
+
size: {
|
|
13734
|
+
type: String,
|
|
13735
|
+
attribute: "size",
|
|
13736
|
+
reflect: true
|
|
13737
|
+
},
|
|
13738
|
+
|
|
13739
|
+
/**
|
|
13740
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13741
|
+
* @default {false}
|
|
13742
|
+
*/
|
|
13743
|
+
onDark: {
|
|
13744
|
+
type: Boolean,
|
|
13745
|
+
attribute: "ondark",
|
|
13746
|
+
reflect: true
|
|
13747
|
+
},
|
|
13748
|
+
|
|
13749
|
+
/**
|
|
13750
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13751
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13752
|
+
* @type {HTMLElement|null}
|
|
13753
|
+
* @default {null}
|
|
13754
|
+
* @private
|
|
13755
|
+
*/
|
|
13756
|
+
wrapper: {
|
|
13757
|
+
type: HTMLElement,
|
|
13758
|
+
attribute: false,
|
|
13759
|
+
reflect: false
|
|
13760
|
+
}
|
|
13761
|
+
};
|
|
13762
|
+
}
|
|
13763
|
+
|
|
13764
|
+
|
|
13765
|
+
|
|
13766
|
+
resetShapeClasses() {
|
|
13767
|
+
if (this.shape && this.size) {
|
|
13768
|
+
|
|
13769
|
+
if (this.wrapper) {
|
|
13770
|
+
this.wrapper.classList.forEach((className) => {
|
|
13771
|
+
if (className.startsWith('shape-')) {
|
|
13772
|
+
this.wrapper.classList.remove(className);
|
|
13773
|
+
}
|
|
13774
|
+
});
|
|
13775
|
+
|
|
13776
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13777
|
+
}
|
|
13778
|
+
}
|
|
13779
|
+
}
|
|
13780
|
+
|
|
13781
|
+
resetLayoutClasses() {
|
|
13782
|
+
if (this.layout) {
|
|
13783
|
+
if (this.wrapper) {
|
|
13784
|
+
this.wrapper.classList.forEach((className) => {
|
|
13785
|
+
if (className.startsWith('layout-')) {
|
|
13786
|
+
this.wrapper.classList.remove(className);
|
|
13787
|
+
}
|
|
13788
|
+
});
|
|
13789
|
+
|
|
13790
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13791
|
+
}
|
|
13792
|
+
}
|
|
13793
|
+
}
|
|
13794
|
+
|
|
13795
|
+
updateComponentArchitecture() {
|
|
13796
|
+
this.resetLayoutClasses();
|
|
13797
|
+
this.resetShapeClasses();
|
|
13798
|
+
}
|
|
13799
|
+
|
|
13800
|
+
updated(changedProperties) {
|
|
13801
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13802
|
+
this.updateComponentArchitecture();
|
|
13803
|
+
}
|
|
13804
|
+
}
|
|
13805
|
+
|
|
13806
|
+
firstUpdated() {
|
|
13807
|
+
super.firstUpdated();
|
|
13808
|
+
|
|
13809
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13810
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13811
|
+
|
|
13812
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13813
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13814
|
+
}
|
|
13815
|
+
|
|
13816
|
+
disconnectedCallback() {
|
|
13817
|
+
super.disconnectedCallback();
|
|
13818
|
+
|
|
13819
|
+
// Cleanup the ARIA observer if it exists
|
|
13820
|
+
if (this.attributeWatcher) {
|
|
13821
|
+
this.attributeWatcher.cleanup();
|
|
13822
|
+
this.attributeWatcher = null;
|
|
13823
|
+
}
|
|
13824
|
+
}
|
|
13825
|
+
|
|
13826
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13827
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13828
|
+
render() {
|
|
13829
|
+
try {
|
|
13830
|
+
return this.renderLayout();
|
|
13831
|
+
} catch (error) {
|
|
13832
|
+
// failed to get the defined layout
|
|
13833
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
13834
|
+
|
|
13835
|
+
// fallback to the default layout
|
|
13836
|
+
return this.getLayout('default');
|
|
13837
|
+
}
|
|
13838
|
+
}
|
|
13839
|
+
};
|
|
13840
|
+
|
|
13841
|
+
var styleCss$3$1 = i$5`: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}`;
|
|
13842
|
+
|
|
13843
|
+
var colorCss$2$1 = i$5`[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)}`;
|
|
13844
|
+
|
|
13845
|
+
var tokensCss$2$1 = i$5`: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}`;
|
|
13846
|
+
|
|
13847
|
+
var shapeSize = i$5`.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}`;
|
|
13848
|
+
|
|
13849
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13850
|
+
// See LICENSE in the project root for license information.
|
|
13851
|
+
|
|
13852
|
+
// ---------------------------------------------------------------------
|
|
13853
|
+
|
|
13854
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13855
|
+
|
|
13856
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13857
|
+
|
|
13858
|
+
/* eslint-disable jsdoc/require-param */
|
|
13859
|
+
|
|
13860
|
+
/**
|
|
13861
|
+
* This will register a new custom element with the browser.
|
|
13862
|
+
* @param {String} name - The name of the custom element.
|
|
13863
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13864
|
+
* @returns {void}
|
|
13865
|
+
*/
|
|
13866
|
+
registerComponent(name, componentClass) {
|
|
13867
|
+
if (!customElements.get(name)) {
|
|
13868
|
+
customElements.define(name, class extends componentClass {});
|
|
13869
|
+
}
|
|
13870
|
+
}
|
|
13871
|
+
|
|
13872
|
+
/**
|
|
13873
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13874
|
+
* @returns {void}
|
|
13875
|
+
*/
|
|
13876
|
+
closestElement(
|
|
13877
|
+
selector, // selector like in .closest()
|
|
13878
|
+
base = this, // extra functionality to skip a parent
|
|
13879
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13880
|
+
!el || el === document || el === window
|
|
13881
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13882
|
+
: found
|
|
13883
|
+
? found // found a selector INside this element
|
|
13884
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13885
|
+
) {
|
|
13886
|
+
return __Closest(base);
|
|
13887
|
+
}
|
|
13888
|
+
/* eslint-enable jsdoc/require-param */
|
|
13889
|
+
|
|
13890
|
+
/**
|
|
13891
|
+
* 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.
|
|
13892
|
+
* @param {Object} elem - The element to check.
|
|
13893
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13894
|
+
* @returns {void}
|
|
13895
|
+
*/
|
|
13896
|
+
handleComponentTagRename(elem, tagName) {
|
|
13897
|
+
const tag = tagName.toLowerCase();
|
|
13898
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13899
|
+
|
|
13900
|
+
if (elemTag !== tag) {
|
|
13901
|
+
elem.setAttribute(tag, true);
|
|
13902
|
+
}
|
|
13903
|
+
}
|
|
13904
|
+
|
|
13905
|
+
/**
|
|
13906
|
+
* Validates if an element is a specific Auro component.
|
|
13907
|
+
* @param {Object} elem - The element to validate.
|
|
13908
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13909
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13910
|
+
*/
|
|
13911
|
+
elementMatch(elem, tagName) {
|
|
13912
|
+
const tag = tagName.toLowerCase();
|
|
13913
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13914
|
+
|
|
13915
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13916
|
+
}
|
|
13917
|
+
};
|
|
13918
|
+
|
|
13919
|
+
var styleCss$2$1 = i$5`: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}}`;
|
|
13920
|
+
|
|
13921
|
+
var colorCss$1$1 = i$5`: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}`;
|
|
13922
|
+
|
|
13923
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
13924
|
+
|
|
13925
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13926
|
+
// See LICENSE in the project root for license information.
|
|
13927
|
+
|
|
13928
|
+
|
|
13929
|
+
class AuroLoader extends i$2 {
|
|
13930
|
+
constructor() {
|
|
13931
|
+
super();
|
|
13932
|
+
|
|
13933
|
+
/**
|
|
13934
|
+
* @private
|
|
13935
|
+
*/
|
|
13936
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
13937
|
+
|
|
13938
|
+
/**
|
|
13939
|
+
* @private
|
|
13940
|
+
*/
|
|
13941
|
+
this.mdCount = 3;
|
|
13942
|
+
|
|
13943
|
+
/**
|
|
13944
|
+
* @private
|
|
13945
|
+
*/
|
|
13946
|
+
this.smCount = 2;
|
|
13947
|
+
|
|
13948
|
+
/**
|
|
13949
|
+
* @private
|
|
13950
|
+
*/
|
|
13951
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
13952
|
+
|
|
13953
|
+
this.orbit = false;
|
|
13954
|
+
this.ringworm = false;
|
|
13955
|
+
this.laser = false;
|
|
13956
|
+
this.pulse = false;
|
|
13957
|
+
}
|
|
13958
|
+
|
|
13959
|
+
// function to define props used within the scope of this component
|
|
13960
|
+
static get properties() {
|
|
13961
|
+
return {
|
|
13962
|
+
|
|
13963
|
+
/**
|
|
13964
|
+
* Sets loader to laser type.
|
|
13965
|
+
*/
|
|
13966
|
+
laser: {
|
|
13967
|
+
type: Boolean,
|
|
13968
|
+
reflect: true
|
|
13969
|
+
},
|
|
13970
|
+
|
|
13971
|
+
/**
|
|
13972
|
+
* Sets loader to orbit type.
|
|
13973
|
+
*/
|
|
13974
|
+
orbit: {
|
|
13975
|
+
type: Boolean,
|
|
13976
|
+
reflect: true
|
|
13977
|
+
},
|
|
13978
|
+
|
|
13979
|
+
/**
|
|
13980
|
+
* Sets loader to pulse type.
|
|
13981
|
+
*/
|
|
13982
|
+
pulse: {
|
|
13983
|
+
type: Boolean,
|
|
13984
|
+
reflect: true
|
|
13985
|
+
},
|
|
13986
|
+
|
|
13987
|
+
/**
|
|
13988
|
+
* Sets loader to ringworm type.
|
|
13989
|
+
*/
|
|
13990
|
+
ringworm: {
|
|
13991
|
+
type: Boolean,
|
|
13992
|
+
reflect: true
|
|
13993
|
+
}
|
|
13994
|
+
};
|
|
13995
|
+
}
|
|
13996
|
+
|
|
13997
|
+
static get styles() {
|
|
13998
|
+
return [
|
|
13999
|
+
i$5`${styleCss$2$1}`,
|
|
14000
|
+
i$5`${colorCss$1$1}`,
|
|
14001
|
+
i$5`${tokensCss$1$1}`
|
|
14002
|
+
];
|
|
14003
|
+
}
|
|
14004
|
+
|
|
14005
|
+
/**
|
|
14006
|
+
* This will register this element with the browser.
|
|
14007
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
14008
|
+
*
|
|
14009
|
+
* @example
|
|
14010
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
14011
|
+
*
|
|
14012
|
+
*/
|
|
14013
|
+
static register(name = "auro-loader") {
|
|
14014
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
14015
|
+
}
|
|
14016
|
+
|
|
14017
|
+
firstUpdated() {
|
|
14018
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
14019
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
14020
|
+
}
|
|
14021
|
+
|
|
14022
|
+
connectedCallback() {
|
|
14023
|
+
super.connectedCallback();
|
|
14024
|
+
}
|
|
14025
|
+
|
|
14026
|
+
/**
|
|
14027
|
+
* @private
|
|
14028
|
+
* @returns {Array} Numbered array for template map.
|
|
14029
|
+
*/
|
|
14030
|
+
defineTemplate() {
|
|
14031
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
14032
|
+
|
|
14033
|
+
if (this.orbit || this.laser) {
|
|
14034
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
14035
|
+
} else if (this.ringworm) {
|
|
14036
|
+
nodes = Array.from(Array(0).keys());
|
|
14037
|
+
}
|
|
14038
|
+
|
|
14039
|
+
return nodes;
|
|
14040
|
+
}
|
|
14041
|
+
|
|
14042
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
14043
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
14044
|
+
|
|
14045
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
14046
|
+
render() {
|
|
14047
|
+
return x`
|
|
14048
|
+
${this.defineTemplate().map((idx) => x`
|
|
14049
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
14050
|
+
`)}
|
|
14051
|
+
|
|
14052
|
+
<div class="no-animation">Loading...</div>
|
|
14053
|
+
|
|
14054
|
+
${this.ringworm ? x`
|
|
14055
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
14056
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
14057
|
+
</svg>`
|
|
14058
|
+
: ``
|
|
14059
|
+
}
|
|
14060
|
+
`;
|
|
14061
|
+
}
|
|
14062
|
+
}
|
|
14063
|
+
|
|
14064
|
+
var loaderVersion = '5.0.0';
|
|
14065
|
+
|
|
14066
|
+
/* eslint-disable max-lines, curly */
|
|
14067
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
14068
|
+
// See LICENSE in the project root for license information.
|
|
14069
|
+
|
|
14070
|
+
|
|
14071
|
+
/**
|
|
14072
|
+
* @slot - Default slot for the text of the button.
|
|
14073
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
14074
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
14075
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
14076
|
+
* @csspart text - Apply CSS to text slot.
|
|
14077
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
14078
|
+
*/
|
|
14079
|
+
|
|
14080
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
14081
|
+
|
|
14082
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
14083
|
+
|
|
14084
|
+
/**
|
|
14085
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
14086
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
14087
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
14088
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
14089
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
14090
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
14091
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
14092
|
+
*/
|
|
14093
|
+
class AuroButton extends AuroElement$1$1 {
|
|
14094
|
+
|
|
14095
|
+
/**
|
|
14096
|
+
* Enables form association for this element.
|
|
14097
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
14098
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
14099
|
+
*/
|
|
14100
|
+
static get formAssociated() {
|
|
14101
|
+
return true;
|
|
14102
|
+
}
|
|
14103
|
+
|
|
14104
|
+
constructor() {
|
|
14105
|
+
super();
|
|
14106
|
+
this.autofocus = false;
|
|
14107
|
+
this.disabled = false;
|
|
14108
|
+
this.loading = false;
|
|
14109
|
+
this.size = "md";
|
|
14110
|
+
this.shape = "rounded";
|
|
14111
|
+
this.onDark = false;
|
|
14112
|
+
this.fluid = false;
|
|
14113
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
14114
|
+
|
|
14115
|
+
// Support for HTML5 forms
|
|
14116
|
+
if (typeof this.attachInternals === 'function') {
|
|
14117
|
+
this.internals = this.attachInternals();
|
|
14118
|
+
} else {
|
|
14119
|
+
this.internals = null;
|
|
14120
|
+
|
|
14121
|
+
// eslint-disable-next-line no-console
|
|
14122
|
+
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.');
|
|
14123
|
+
}
|
|
14124
|
+
|
|
14125
|
+
/**
|
|
14126
|
+
* Generate unique names for dependency components.
|
|
14127
|
+
*/
|
|
14128
|
+
const versioning = new AuroDependencyVersioning();
|
|
14129
|
+
|
|
14130
|
+
/**
|
|
14131
|
+
* @private
|
|
14132
|
+
*/
|
|
14133
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
14134
|
+
}
|
|
14135
|
+
|
|
14136
|
+
static get styles() {
|
|
14137
|
+
return [
|
|
14138
|
+
tokensCss$2$1,
|
|
14139
|
+
styleCss$3$1,
|
|
14140
|
+
colorCss$2$1,
|
|
14141
|
+
shapeSize
|
|
14142
|
+
];
|
|
14143
|
+
}
|
|
14144
|
+
|
|
14145
|
+
static get properties() {
|
|
14146
|
+
return {
|
|
14147
|
+
|
|
14148
|
+
...super.properties,
|
|
14149
|
+
|
|
14150
|
+
/**
|
|
14151
|
+
* Override layout since it isn't used in this component.
|
|
14152
|
+
* @private
|
|
14153
|
+
*/
|
|
14154
|
+
layout: {
|
|
14155
|
+
type: Boolean,
|
|
14156
|
+
attribute: false,
|
|
14157
|
+
reflect: false
|
|
14158
|
+
},
|
|
14159
|
+
|
|
14160
|
+
/**
|
|
14161
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
14162
|
+
*/
|
|
14163
|
+
autofocus: {
|
|
14164
|
+
type: Boolean,
|
|
14165
|
+
reflect: true
|
|
14166
|
+
},
|
|
14167
|
+
|
|
14168
|
+
/**
|
|
14169
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
14170
|
+
*/
|
|
14171
|
+
disabled: {
|
|
14172
|
+
type: Boolean,
|
|
14173
|
+
reflect: true
|
|
14174
|
+
},
|
|
14175
|
+
|
|
14176
|
+
/**
|
|
14177
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
14178
|
+
*/
|
|
14179
|
+
fluid: {
|
|
14180
|
+
type: Boolean,
|
|
14181
|
+
reflect: true
|
|
14182
|
+
},
|
|
14183
|
+
|
|
14184
|
+
/**
|
|
14185
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
14186
|
+
*/
|
|
14187
|
+
loading: {
|
|
14188
|
+
type: Boolean,
|
|
14189
|
+
reflect: true
|
|
14190
|
+
},
|
|
14191
|
+
|
|
14192
|
+
/**
|
|
14193
|
+
* 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.
|
|
14194
|
+
*/
|
|
14195
|
+
loadingText: {
|
|
14196
|
+
type: String
|
|
14197
|
+
},
|
|
14198
|
+
|
|
14199
|
+
/**
|
|
14200
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
14201
|
+
*/
|
|
14202
|
+
tIndex: {
|
|
14203
|
+
type: String,
|
|
14204
|
+
reflect: true
|
|
14205
|
+
},
|
|
14206
|
+
|
|
14207
|
+
/**
|
|
14208
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
14209
|
+
*/
|
|
14210
|
+
title: {
|
|
14211
|
+
type: String,
|
|
14212
|
+
reflect: true
|
|
14213
|
+
},
|
|
14214
|
+
|
|
14215
|
+
/**
|
|
14216
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
14217
|
+
*/
|
|
14218
|
+
type: {
|
|
14219
|
+
type: String,
|
|
14220
|
+
reflect: true
|
|
14221
|
+
},
|
|
14222
|
+
|
|
14223
|
+
/**
|
|
14224
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
14225
|
+
*/
|
|
14226
|
+
value: {
|
|
14227
|
+
type: String,
|
|
14228
|
+
reflect: true
|
|
14229
|
+
},
|
|
14230
|
+
|
|
14231
|
+
/**
|
|
14232
|
+
* Sets button variant option.
|
|
14233
|
+
* @default primary
|
|
14234
|
+
*/
|
|
14235
|
+
variant: {
|
|
14236
|
+
type: String,
|
|
14237
|
+
reflect: true
|
|
14238
|
+
},
|
|
14239
|
+
};
|
|
14240
|
+
}
|
|
14241
|
+
|
|
14242
|
+
/**
|
|
14243
|
+
* This will register this element with the browser.
|
|
14244
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
14245
|
+
*
|
|
14246
|
+
* @example
|
|
14247
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
14248
|
+
*
|
|
12831
14249
|
*/
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
<div
|
|
12835
|
-
@click="${this.handleClick}"
|
|
12836
|
-
class="${e(this.commonWrapperClasses)}"
|
|
12837
|
-
part="wrapper">
|
|
12838
|
-
<div class="accents left ${this.commonAccentClasses}">
|
|
12839
|
-
${this.layout.includes('left') ? u$2`
|
|
12840
|
-
${this.renderValidationErrorIconHtml()}
|
|
12841
|
-
` : undefined}
|
|
12842
|
-
</div>
|
|
12843
|
-
<div class="mainContent">
|
|
12844
|
-
${this.renderHtmlInput()}
|
|
12845
|
-
</div>
|
|
12846
|
-
<div class="accents right ${this.commonAccentClasses}">
|
|
12847
|
-
${this.layout.includes('right') || this.layout === "emphasized" ? u$2`
|
|
12848
|
-
${this.renderValidationErrorIconHtml()}
|
|
12849
|
-
` : undefined}
|
|
12850
|
-
${this.hasValue ? u$2`
|
|
12851
|
-
${!this.disabled && !this.readonly ? u$2`
|
|
12852
|
-
${this.renderHtmlActionClear()}
|
|
12853
|
-
` : undefined}
|
|
12854
|
-
` : undefined}
|
|
12855
|
-
</div>
|
|
12856
|
-
</div>
|
|
12857
|
-
<div class="${e(this.helpTextClasses)}" part="inputHelpText">
|
|
12858
|
-
${this.renderHtmlHelpText()}
|
|
12859
|
-
</div>
|
|
12860
|
-
`;
|
|
14250
|
+
static register(name = "auro-button") {
|
|
14251
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
12861
14252
|
}
|
|
12862
14253
|
|
|
12863
14254
|
/**
|
|
12864
|
-
*
|
|
14255
|
+
* Internal method to apply focus to the HTML5 button.
|
|
12865
14256
|
* @private
|
|
12866
|
-
* @returns {
|
|
14257
|
+
* @returns {void}
|
|
12867
14258
|
*/
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
<div
|
|
12871
|
-
@click="${this.handleClick}"
|
|
12872
|
-
class="${e(this.commonWrapperClasses)}"
|
|
12873
|
-
part="wrapper">
|
|
12874
|
-
<div class="accents left">
|
|
12875
|
-
${this.renderHtmlTypeIcon()}
|
|
12876
|
-
</div>
|
|
12877
|
-
<div class="mainContent">
|
|
12878
|
-
${this.renderHtmlInput()}
|
|
12879
|
-
</div>
|
|
12880
|
-
<div class="accents right">
|
|
12881
|
-
${this.renderValidationErrorIconHtml()}
|
|
12882
|
-
${this.hasValue ? u$2`
|
|
12883
|
-
${!this.disabled && !this.readonly ? u$2`
|
|
12884
|
-
${this.renderHtmlActionClear()}
|
|
12885
|
-
` : undefined}
|
|
12886
|
-
` : undefined}
|
|
12887
|
-
</div>
|
|
12888
|
-
</div>
|
|
12889
|
-
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
12890
|
-
${this.renderHtmlHelpText()}
|
|
12891
|
-
</div>
|
|
12892
|
-
`;
|
|
14259
|
+
focus() {
|
|
14260
|
+
this.renderRoot.querySelector('button').focus();
|
|
12893
14261
|
}
|
|
12894
14262
|
|
|
12895
14263
|
/**
|
|
12896
|
-
*
|
|
14264
|
+
* Submits the form that this button is associated with.
|
|
12897
14265
|
* @private
|
|
12898
|
-
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
12899
14266
|
* @returns {void}
|
|
12900
14267
|
*/
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
switch (layout) {
|
|
12905
|
-
case 'emphasized':
|
|
12906
|
-
return this.renderLayoutEmphasized();
|
|
12907
|
-
case 'emphasized-left':
|
|
12908
|
-
return this.renderLayoutEmphasized();
|
|
12909
|
-
case 'emphasized-right':
|
|
12910
|
-
return this.renderLayoutEmphasized();
|
|
12911
|
-
case 'snowflake':
|
|
12912
|
-
return this.renderLayoutSnowflake();
|
|
12913
|
-
case 'snowflake-left':
|
|
12914
|
-
return this.renderLayoutSnowflake();
|
|
12915
|
-
case 'snowflake-right':
|
|
12916
|
-
return this.renderLayoutSnowflake();
|
|
12917
|
-
default:
|
|
12918
|
-
return this.renderLayoutClassic();
|
|
14268
|
+
surfaceSubmitEvent() {
|
|
14269
|
+
if (this.form) {
|
|
14270
|
+
this.form.requestSubmit();
|
|
12919
14271
|
}
|
|
12920
14272
|
}
|
|
12921
|
-
}
|
|
12922
|
-
|
|
12923
|
-
var inputVersion = '4.2.0';
|
|
12924
|
-
|
|
12925
|
-
var colorCss$1$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
12926
|
-
|
|
12927
|
-
var styleCss$2$1 = i$5`#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}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, 2.5rem)}#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)}`;
|
|
12928
|
-
|
|
12929
|
-
var tokenCss = i$5`: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)}`;
|
|
12930
|
-
|
|
12931
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12932
|
-
// See LICENSE in the project root for license information.
|
|
12933
|
-
|
|
12934
|
-
// ---------------------------------------------------------------------
|
|
12935
|
-
|
|
12936
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12937
|
-
|
|
12938
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
12939
|
-
|
|
12940
|
-
/* eslint-disable jsdoc/require-param */
|
|
12941
14273
|
|
|
12942
14274
|
/**
|
|
12943
|
-
*
|
|
12944
|
-
* @
|
|
12945
|
-
* @
|
|
12946
|
-
* @returns {void}
|
|
14275
|
+
* Returns the form element that this button is associated with.
|
|
14276
|
+
* @private
|
|
14277
|
+
* @returns {HTMLFormElement | null}
|
|
12947
14278
|
*/
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
customElements.define(name, class extends componentClass {});
|
|
12951
|
-
}
|
|
14279
|
+
get form() {
|
|
14280
|
+
return this.internals ? this.internals.form : null;
|
|
12952
14281
|
}
|
|
12953
14282
|
|
|
12954
14283
|
/**
|
|
12955
|
-
*
|
|
12956
|
-
* @returns {
|
|
14284
|
+
* @private
|
|
14285
|
+
* @returns {Boolean}
|
|
12957
14286
|
*/
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
base = this, // extra functionality to skip a parent
|
|
12961
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12962
|
-
!el || el === document || el === window
|
|
12963
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
12964
|
-
: found
|
|
12965
|
-
? found // found a selector INside this element
|
|
12966
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12967
|
-
) {
|
|
12968
|
-
return __Closest(base);
|
|
14287
|
+
get hideText() {
|
|
14288
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
12969
14289
|
}
|
|
12970
|
-
/* eslint-enable jsdoc/require-param */
|
|
12971
14290
|
|
|
12972
14291
|
/**
|
|
12973
|
-
*
|
|
12974
|
-
* @
|
|
12975
|
-
* @
|
|
12976
|
-
* @returns {void}
|
|
14292
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
14293
|
+
* @returns {string | undefined}
|
|
14294
|
+
* @private
|
|
12977
14295
|
*/
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
14296
|
+
get currentAriaLabel() {
|
|
14297
|
+
if (!this.attributeWatcher) return undefined;
|
|
12981
14298
|
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
}
|
|
14299
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
14300
|
+
return ariaLabel || undefined;
|
|
12985
14301
|
}
|
|
12986
14302
|
|
|
12987
14303
|
/**
|
|
12988
|
-
*
|
|
12989
|
-
* @
|
|
12990
|
-
* @
|
|
12991
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
14304
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
14305
|
+
* @returns {string | undefined}
|
|
14306
|
+
* @private
|
|
12992
14307
|
*/
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
14308
|
+
get currentAriaLabelledBy() {
|
|
14309
|
+
if (!this.attributeWatcher) return undefined;
|
|
12996
14310
|
|
|
12997
|
-
|
|
14311
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
14312
|
+
return ariaLabelledBy || undefined;
|
|
12998
14313
|
}
|
|
12999
|
-
};
|
|
13000
|
-
|
|
13001
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13002
|
-
// See LICENSE in the project root for license information.
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
class AuroDependencyVersioning {
|
|
13006
14314
|
|
|
13007
14315
|
/**
|
|
13008
|
-
*
|
|
14316
|
+
* Renders the default layout for the button.
|
|
14317
|
+
* @returns {TemplateResult}
|
|
13009
14318
|
* @private
|
|
13010
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13011
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13012
|
-
* @returns {string} - Unique string to be used for naming.
|
|
13013
14319
|
*/
|
|
13014
|
-
|
|
13015
|
-
|
|
14320
|
+
renderLayoutDefault() {
|
|
14321
|
+
const classes = {
|
|
14322
|
+
"util_insetLg--squish": true,
|
|
14323
|
+
"auro-button": true,
|
|
14324
|
+
wrapper: true,
|
|
14325
|
+
loading: this.loading,
|
|
14326
|
+
};
|
|
13016
14327
|
|
|
13017
|
-
|
|
13018
|
-
|
|
14328
|
+
return u$2`
|
|
14329
|
+
<button
|
|
14330
|
+
part="button"
|
|
14331
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
14332
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
14333
|
+
tabIndex="${o(this.tIndex)}"
|
|
14334
|
+
?autofocus="${this.autofocus}"
|
|
14335
|
+
class="${e(classes)}"
|
|
14336
|
+
?disabled="${this.disabled || this.loading}"
|
|
14337
|
+
?onDark="${this.onDark}"
|
|
14338
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
14339
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
14340
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
14341
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
14342
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
14343
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
14344
|
+
>
|
|
14345
|
+
${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
13019
14346
|
|
|
13020
|
-
|
|
14347
|
+
<span class="contentWrapper">
|
|
14348
|
+
<span class="textSlot" part="text">
|
|
14349
|
+
${this.hideText ? undefined : u$2`<slot></slot>`}
|
|
14350
|
+
</span>
|
|
14351
|
+
|
|
14352
|
+
<span part="icon">
|
|
14353
|
+
<slot name="icon"></slot>
|
|
14354
|
+
</span>
|
|
14355
|
+
</span>
|
|
14356
|
+
</button>
|
|
14357
|
+
`;
|
|
13021
14358
|
}
|
|
13022
14359
|
|
|
13023
14360
|
/**
|
|
13024
|
-
*
|
|
13025
|
-
* @
|
|
13026
|
-
* @
|
|
13027
|
-
* @returns {string} - Unique string to be used for naming.
|
|
14361
|
+
* Renders the layout of the button
|
|
14362
|
+
* @returns {TemplateResult}
|
|
14363
|
+
* @private
|
|
13028
14364
|
*/
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
const tag = i$1`${s$1(elementName)}`;
|
|
13032
|
-
|
|
13033
|
-
if (!customElements.get(elementName)) {
|
|
13034
|
-
customElements.define(elementName, class extends tagClass {});
|
|
13035
|
-
}
|
|
13036
|
-
|
|
13037
|
-
return tag;
|
|
14365
|
+
renderLayout() {
|
|
14366
|
+
return this.renderLayoutDefault();
|
|
13038
14367
|
}
|
|
13039
14368
|
}
|
|
13040
14369
|
|
|
14370
|
+
var buttonVersion = '10.0.0';
|
|
14371
|
+
|
|
13041
14372
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13042
14373
|
// See LICENSE in the project root for license information.
|
|
13043
14374
|
|
|
@@ -13384,8 +14715,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13384
14715
|
async firstUpdated() {
|
|
13385
14716
|
await super.firstUpdated();
|
|
13386
14717
|
|
|
13387
|
-
|
|
13388
|
-
|
|
14718
|
+
/**
|
|
14719
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
14720
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
14721
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
14722
|
+
*/
|
|
14723
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
13389
14724
|
const svgDesc = this.svg.querySelector('desc');
|
|
13390
14725
|
|
|
13391
14726
|
if (svgDesc) {
|
|
@@ -13429,7 +14764,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13429
14764
|
}
|
|
13430
14765
|
};
|
|
13431
14766
|
|
|
13432
|
-
var iconVersion$1 = '8.0.
|
|
14767
|
+
var iconVersion$1 = '8.0.4';
|
|
13433
14768
|
|
|
13434
14769
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13435
14770
|
// See LICENSE in the project root for license information.
|
|
@@ -13438,7 +14773,7 @@ var iconVersion$1 = '8.0.3';
|
|
|
13438
14773
|
|
|
13439
14774
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13440
14775
|
|
|
13441
|
-
let AuroLibraryRuntimeUtils$
|
|
14776
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
13442
14777
|
|
|
13443
14778
|
/* eslint-disable jsdoc/require-param */
|
|
13444
14779
|
|
|
@@ -13530,7 +14865,7 @@ class AuroHeader extends i$2 {
|
|
|
13530
14865
|
/**
|
|
13531
14866
|
* @private
|
|
13532
14867
|
*/
|
|
13533
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
14868
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
13534
14869
|
}
|
|
13535
14870
|
|
|
13536
14871
|
// function to define props used within the scope of this component
|
|
@@ -13560,7 +14895,7 @@ class AuroHeader extends i$2 {
|
|
|
13560
14895
|
*
|
|
13561
14896
|
*/
|
|
13562
14897
|
static register(name = "auro-header") {
|
|
13563
|
-
AuroLibraryRuntimeUtils$
|
|
14898
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
13564
14899
|
}
|
|
13565
14900
|
|
|
13566
14901
|
firstUpdated() {
|
|
@@ -13656,17 +14991,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
13656
14991
|
|
|
13657
14992
|
this.large = false;
|
|
13658
14993
|
|
|
13659
|
-
AuroLibraryRuntimeUtils$
|
|
14994
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13660
14995
|
|
|
13661
14996
|
const versioning = new AuroDependencyVersioning();
|
|
14997
|
+
|
|
14998
|
+
/**
|
|
14999
|
+
* @private
|
|
15000
|
+
*/
|
|
13662
15001
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
15002
|
+
|
|
15003
|
+
/**
|
|
15004
|
+
* @private
|
|
15005
|
+
*/
|
|
13663
15006
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
15007
|
+
|
|
15008
|
+
/**
|
|
15009
|
+
* @private
|
|
15010
|
+
*/
|
|
15011
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
13664
15012
|
}
|
|
13665
15013
|
|
|
13666
15014
|
static get styles() {
|
|
13667
15015
|
return [
|
|
13668
|
-
colorCss$
|
|
13669
|
-
styleCss$
|
|
15016
|
+
colorCss$3$1,
|
|
15017
|
+
styleCss$4$1,
|
|
13670
15018
|
tokenCss
|
|
13671
15019
|
];
|
|
13672
15020
|
}
|
|
@@ -13695,7 +15043,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13695
15043
|
*
|
|
13696
15044
|
*/
|
|
13697
15045
|
static register(name = "auro-bibtemplate") {
|
|
13698
|
-
AuroLibraryRuntimeUtils$
|
|
15046
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
13699
15047
|
}
|
|
13700
15048
|
|
|
13701
15049
|
/**
|
|
@@ -13753,9 +15101,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
13753
15101
|
<div id="bibTemplate" part="bibtemplate">
|
|
13754
15102
|
${this.isFullscreen ? u$2`
|
|
13755
15103
|
<div id="headerContainer">
|
|
13756
|
-
|
|
15104
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
13757
15105
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
13758
|
-
|
|
15106
|
+
</${this.buttonTag}>
|
|
13759
15107
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
13760
15108
|
<slot name="header"></slot>
|
|
13761
15109
|
</${this.headerTag}>
|
|
@@ -14158,7 +15506,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14158
15506
|
this.noFlip = false;
|
|
14159
15507
|
this.autoPlacement = false;
|
|
14160
15508
|
|
|
14161
|
-
const versioning = new AuroDependencyVersioning$
|
|
15509
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
14162
15510
|
|
|
14163
15511
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
14164
15512
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
@@ -16314,8 +17662,12 @@ class AuroIcon extends BaseIcon {
|
|
|
16314
17662
|
async firstUpdated() {
|
|
16315
17663
|
await super.firstUpdated();
|
|
16316
17664
|
|
|
16317
|
-
|
|
16318
|
-
|
|
17665
|
+
/**
|
|
17666
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
17667
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
17668
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
17669
|
+
*/
|
|
17670
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
16319
17671
|
const svgDesc = this.svg.querySelector('desc');
|
|
16320
17672
|
|
|
16321
17673
|
if (svgDesc) {
|
|
@@ -16359,7 +17711,7 @@ class AuroIcon extends BaseIcon {
|
|
|
16359
17711
|
}
|
|
16360
17712
|
}
|
|
16361
17713
|
|
|
16362
|
-
var iconVersion = '8.0.
|
|
17714
|
+
var iconVersion = '8.0.4';
|
|
16363
17715
|
|
|
16364
17716
|
var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" 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=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
16365
17717
|
|
|
@@ -16387,7 +17739,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
16387
17739
|
/**
|
|
16388
17740
|
* Generate unique names for dependency components.
|
|
16389
17741
|
*/
|
|
16390
|
-
const versioning = new AuroDependencyVersioning$
|
|
17742
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
16391
17743
|
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
16392
17744
|
|
|
16393
17745
|
this.selected = false;
|