@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
|
@@ -213,7 +213,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$1=t=>(...e)=>({_$litDirective$:t,values:e});cl
|
|
|
213
213
|
// See LICENSE in the project root for license information.
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
let AuroDependencyVersioning$
|
|
216
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3343,7 +3343,7 @@ class AuroFloatingUI {
|
|
|
3343
3343
|
// See LICENSE in the project root for license information.
|
|
3344
3344
|
|
|
3345
3345
|
|
|
3346
|
-
let AuroDependencyVersioning$
|
|
3346
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
3347
3347
|
|
|
3348
3348
|
/**
|
|
3349
3349
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -3389,7 +3389,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
3389
3389
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
3390
3390
|
*/
|
|
3391
3391
|
|
|
3392
|
-
let AuroElement$1$
|
|
3392
|
+
let AuroElement$1$3 = class AuroElement extends i$2 {
|
|
3393
3393
|
|
|
3394
3394
|
// function to define props used within the scope of this component
|
|
3395
3395
|
static get properties() {
|
|
@@ -3457,7 +3457,7 @@ var styleCss$2$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
3457
3457
|
*/
|
|
3458
3458
|
|
|
3459
3459
|
// build the component class
|
|
3460
|
-
let BaseIcon$3 = class BaseIcon extends AuroElement$1$
|
|
3460
|
+
let BaseIcon$3 = class BaseIcon extends AuroElement$1$3 {
|
|
3461
3461
|
constructor() {
|
|
3462
3462
|
super();
|
|
3463
3463
|
this.onDark = false;
|
|
@@ -3529,9 +3529,9 @@ let BaseIcon$3 = class BaseIcon extends AuroElement$1$2 {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
};
|
|
3531
3531
|
|
|
3532
|
-
var tokensCss$2$
|
|
3532
|
+
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)}`;
|
|
3533
3533
|
|
|
3534
|
-
var colorCss$3$
|
|
3534
|
+
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)}`;
|
|
3535
3535
|
|
|
3536
3536
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3537
3537
|
// See LICENSE in the project root for license information.
|
|
@@ -3689,9 +3689,9 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3689
3689
|
static get styles() {
|
|
3690
3690
|
return [
|
|
3691
3691
|
super.styles,
|
|
3692
|
-
i$5`${tokensCss$2$
|
|
3692
|
+
i$5`${tokensCss$2$3}`,
|
|
3693
3693
|
i$5`${styleCss$2$3}`,
|
|
3694
|
-
i$5`${colorCss$3$
|
|
3694
|
+
i$5`${colorCss$3$3}`
|
|
3695
3695
|
];
|
|
3696
3696
|
}
|
|
3697
3697
|
|
|
@@ -3725,8 +3725,12 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
3725
3725
|
async firstUpdated() {
|
|
3726
3726
|
await super.firstUpdated();
|
|
3727
3727
|
|
|
3728
|
-
|
|
3729
|
-
|
|
3728
|
+
/**
|
|
3729
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3730
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3731
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3732
|
+
*/
|
|
3733
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3730
3734
|
const svgDesc = this.svg.querySelector('desc');
|
|
3731
3735
|
|
|
3732
3736
|
if (svgDesc) {
|
|
@@ -3774,9 +3778,9 @@ var iconVersion$3 = '6.1.2';
|
|
|
3774
3778
|
|
|
3775
3779
|
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}`;
|
|
3776
3780
|
|
|
3777
|
-
var colorCss$2$
|
|
3781
|
+
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)}`;
|
|
3778
3782
|
|
|
3779
|
-
var tokensCss$1$
|
|
3783
|
+
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)}`;
|
|
3780
3784
|
|
|
3781
3785
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3782
3786
|
// See LICENSE in the project root for license information.
|
|
@@ -3815,8 +3819,8 @@ class AuroDropdownBib extends i$2 {
|
|
|
3815
3819
|
static get styles() {
|
|
3816
3820
|
return [
|
|
3817
3821
|
styleCss$1$3,
|
|
3818
|
-
colorCss$2$
|
|
3819
|
-
tokensCss$1$
|
|
3822
|
+
colorCss$2$3,
|
|
3823
|
+
tokensCss$1$3
|
|
3820
3824
|
];
|
|
3821
3825
|
}
|
|
3822
3826
|
|
|
@@ -4392,7 +4396,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4392
4396
|
/**
|
|
4393
4397
|
* Generate unique names for dependency components.
|
|
4394
4398
|
*/
|
|
4395
|
-
const versioning = new AuroDependencyVersioning$
|
|
4399
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
4396
4400
|
|
|
4397
4401
|
/**
|
|
4398
4402
|
* @private
|
|
@@ -4708,7 +4712,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
4708
4712
|
static get styles() {
|
|
4709
4713
|
return [
|
|
4710
4714
|
colorCss$1$3,
|
|
4711
|
-
tokensCss$1$
|
|
4715
|
+
tokensCss$1$3,
|
|
4712
4716
|
|
|
4713
4717
|
// default layout
|
|
4714
4718
|
classicColorCss$1,
|
|
@@ -5228,7 +5232,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
|
|
|
5228
5232
|
|
|
5229
5233
|
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}`;
|
|
5230
5234
|
|
|
5231
|
-
var styleCss$4$
|
|
5235
|
+
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}`;
|
|
5232
5236
|
|
|
5233
5237
|
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}`;
|
|
5234
5238
|
|
|
@@ -5307,6 +5311,8 @@ const stringsES = {
|
|
|
5307
5311
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
5308
5312
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
5309
5313
|
'clearInput': 'Borrar campo de entrada',
|
|
5314
|
+
'showPassword': 'Mostrar contraseña',
|
|
5315
|
+
'hidePassword': 'Ocultar contraseña'
|
|
5310
5316
|
};
|
|
5311
5317
|
|
|
5312
5318
|
const stringsEN = {
|
|
@@ -5331,6 +5337,8 @@ const stringsEN = {
|
|
|
5331
5337
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
5332
5338
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
5333
5339
|
'clearInput': 'Clear input field',
|
|
5340
|
+
'showPassword': 'Show password',
|
|
5341
|
+
'hidePassword': 'Hide password'
|
|
5334
5342
|
};
|
|
5335
5343
|
|
|
5336
5344
|
/**
|
|
@@ -9625,7 +9633,7 @@ const {
|
|
|
9625
9633
|
|
|
9626
9634
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
9627
9635
|
|
|
9628
|
-
let AuroLibraryRuntimeUtils$
|
|
9636
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
9629
9637
|
|
|
9630
9638
|
/* eslint-disable jsdoc/require-param */
|
|
9631
9639
|
|
|
@@ -9695,7 +9703,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
9695
9703
|
class AuroFormValidation {
|
|
9696
9704
|
|
|
9697
9705
|
constructor() {
|
|
9698
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9706
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3$1();
|
|
9699
9707
|
}
|
|
9700
9708
|
|
|
9701
9709
|
/**
|
|
@@ -10056,7 +10064,7 @@ class AuroFormValidation {
|
|
|
10056
10064
|
}
|
|
10057
10065
|
}
|
|
10058
10066
|
|
|
10059
|
-
let AuroElement$
|
|
10067
|
+
let AuroElement$2$1 = class AuroElement extends i$2 {
|
|
10060
10068
|
static get properties() {
|
|
10061
10069
|
return {
|
|
10062
10070
|
|
|
@@ -10176,7 +10184,7 @@ let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
|
10176
10184
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
10177
10185
|
*/
|
|
10178
10186
|
|
|
10179
|
-
class BaseInput extends AuroElement$
|
|
10187
|
+
class BaseInput extends AuroElement$2$1 {
|
|
10180
10188
|
|
|
10181
10189
|
constructor() {
|
|
10182
10190
|
super();
|
|
@@ -11285,7 +11293,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
11285
11293
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
11286
11294
|
*/
|
|
11287
11295
|
|
|
11288
|
-
let AuroElement$
|
|
11296
|
+
let AuroElement$1$2 = class AuroElement extends i$2 {
|
|
11289
11297
|
|
|
11290
11298
|
// function to define props used within the scope of this component
|
|
11291
11299
|
static get properties() {
|
|
@@ -11341,7 +11349,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
11341
11349
|
return _fetchMap$2.get(uri);
|
|
11342
11350
|
};
|
|
11343
11351
|
|
|
11344
|
-
var styleCss$3$
|
|
11352
|
+
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}`;
|
|
11345
11353
|
|
|
11346
11354
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11347
11355
|
// See LICENSE in the project root for license information.
|
|
@@ -11353,7 +11361,7 @@ var styleCss$3$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
11353
11361
|
*/
|
|
11354
11362
|
|
|
11355
11363
|
// build the component class
|
|
11356
|
-
let BaseIcon$2 = class BaseIcon extends AuroElement$
|
|
11364
|
+
let BaseIcon$2 = class BaseIcon extends AuroElement$1$2 {
|
|
11357
11365
|
constructor() {
|
|
11358
11366
|
super();
|
|
11359
11367
|
this.onDark = false;
|
|
@@ -11384,7 +11392,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11384
11392
|
|
|
11385
11393
|
static get styles() {
|
|
11386
11394
|
return i$5`
|
|
11387
|
-
${styleCss$3$
|
|
11395
|
+
${styleCss$3$2}
|
|
11388
11396
|
`;
|
|
11389
11397
|
}
|
|
11390
11398
|
|
|
@@ -11427,7 +11435,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
11427
11435
|
|
|
11428
11436
|
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)}`;
|
|
11429
11437
|
|
|
11430
|
-
var colorCss$3$
|
|
11438
|
+
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)}`;
|
|
11431
11439
|
|
|
11432
11440
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11433
11441
|
// See LICENSE in the project root for license information.
|
|
@@ -11436,7 +11444,7 @@ var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]
|
|
|
11436
11444
|
|
|
11437
11445
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11438
11446
|
|
|
11439
|
-
let AuroLibraryRuntimeUtils$
|
|
11447
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
11440
11448
|
|
|
11441
11449
|
/* eslint-disable jsdoc/require-param */
|
|
11442
11450
|
|
|
@@ -11518,7 +11526,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11518
11526
|
*/
|
|
11519
11527
|
privateDefaults() {
|
|
11520
11528
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
11521
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
11529
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
11522
11530
|
}
|
|
11523
11531
|
|
|
11524
11532
|
// function to define props used within the scope of this component
|
|
@@ -11586,8 +11594,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11586
11594
|
return [
|
|
11587
11595
|
super.styles,
|
|
11588
11596
|
i$5`${tokensCss$3$1}`,
|
|
11589
|
-
i$5`${styleCss$3$
|
|
11590
|
-
i$5`${colorCss$3$
|
|
11597
|
+
i$5`${styleCss$3$2}`,
|
|
11598
|
+
i$5`${colorCss$3$2}`
|
|
11591
11599
|
];
|
|
11592
11600
|
}
|
|
11593
11601
|
|
|
@@ -11600,7 +11608,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11600
11608
|
*
|
|
11601
11609
|
*/
|
|
11602
11610
|
static register(name = "auro-icon") {
|
|
11603
|
-
AuroLibraryRuntimeUtils$
|
|
11611
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroIcon);
|
|
11604
11612
|
}
|
|
11605
11613
|
|
|
11606
11614
|
connectedCallback() {
|
|
@@ -11621,8 +11629,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11621
11629
|
async firstUpdated() {
|
|
11622
11630
|
await super.firstUpdated();
|
|
11623
11631
|
|
|
11624
|
-
|
|
11625
|
-
|
|
11632
|
+
/**
|
|
11633
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
11634
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
11635
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
11636
|
+
*/
|
|
11637
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11626
11638
|
const svgDesc = this.svg.querySelector('desc');
|
|
11627
11639
|
|
|
11628
11640
|
if (svgDesc) {
|
|
@@ -11668,46 +11680,480 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
11668
11680
|
|
|
11669
11681
|
var iconVersion$2 = '8.0.1';
|
|
11670
11682
|
|
|
11671
|
-
|
|
11672
|
-
|
|
11683
|
+
/**
|
|
11684
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
11685
|
+
*/
|
|
11686
|
+
const _observers$1 = new WeakMap();
|
|
11673
11687
|
|
|
11688
|
+
/**
|
|
11689
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
11690
|
+
* Structure: {
|
|
11691
|
+
* host: {
|
|
11692
|
+
* matchers: Set<Function>,
|
|
11693
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
11694
|
+
* }
|
|
11695
|
+
* }
|
|
11696
|
+
*/
|
|
11697
|
+
const _transportConfig$1 = new WeakMap();
|
|
11674
11698
|
|
|
11675
|
-
|
|
11699
|
+
/**
|
|
11700
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
11701
|
+
*
|
|
11702
|
+
* @param {Object} params - The parameters for the function.
|
|
11703
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
11704
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11705
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
11706
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
11707
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
11708
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
11709
|
+
*/
|
|
11710
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
11711
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
11712
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
11713
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
11714
|
+
}
|
|
11715
|
+
|
|
11716
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
11717
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
11718
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
11719
|
+
}
|
|
11720
|
+
|
|
11721
|
+
// Guard Clause: Ensure match is a function
|
|
11722
|
+
if (typeof match !== 'function') {
|
|
11723
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
11724
|
+
}
|
|
11725
|
+
|
|
11726
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
11727
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11728
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
11729
|
+
}
|
|
11730
|
+
|
|
11731
|
+
// Register this transport and get cleanup function
|
|
11732
|
+
return _registerTransport$1({
|
|
11733
|
+
host,
|
|
11734
|
+
target,
|
|
11735
|
+
matcher: match,
|
|
11736
|
+
removeOriginal
|
|
11737
|
+
});
|
|
11738
|
+
};
|
|
11739
|
+
|
|
11740
|
+
/**
|
|
11741
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11742
|
+
*
|
|
11743
|
+
* @param {Object} params - The parameters object.
|
|
11744
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11745
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11746
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11747
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11748
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11749
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11750
|
+
* @private
|
|
11751
|
+
*/
|
|
11752
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11753
|
+
// Initialize config for this host if it doesn't exist
|
|
11754
|
+
if (!_transportConfig$1.has(host)) {
|
|
11755
|
+
_transportConfig$1.set(host, {
|
|
11756
|
+
matchers: new Set(),
|
|
11757
|
+
targets: new Map()
|
|
11758
|
+
});
|
|
11759
|
+
}
|
|
11760
|
+
|
|
11761
|
+
const config = _transportConfig$1.get(host);
|
|
11762
|
+
|
|
11763
|
+
// Add the matcher to the set of matchers for this host
|
|
11764
|
+
config.matchers.add(matcher);
|
|
11765
|
+
|
|
11766
|
+
// Initialize target entry if it doesn't exist
|
|
11767
|
+
if (!config.targets.has(target)) {
|
|
11768
|
+
config.targets.set(target, new Map());
|
|
11769
|
+
}
|
|
11770
|
+
|
|
11771
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11772
|
+
config.targets.get(target).set(matcher, {
|
|
11773
|
+
removeOriginal,
|
|
11774
|
+
currentAttributes: new Map()
|
|
11775
|
+
});
|
|
11776
|
+
|
|
11777
|
+
// Perform initial attribute transport
|
|
11778
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
11779
|
+
|
|
11780
|
+
// Attach observer
|
|
11781
|
+
_attachObserver$1(host);
|
|
11782
|
+
|
|
11783
|
+
// Return cleanup function and utility functions
|
|
11784
|
+
return {
|
|
11785
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
11786
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
11787
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
11788
|
+
}
|
|
11789
|
+
};
|
|
11790
|
+
|
|
11791
|
+
/**
|
|
11792
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11793
|
+
*
|
|
11794
|
+
* @param {HTMLElement} host - The host element
|
|
11795
|
+
* @param {HTMLElement} target - The target element
|
|
11796
|
+
* @param {Function} matcher - The matcher function
|
|
11797
|
+
* @private
|
|
11798
|
+
*/
|
|
11799
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
11800
|
+
const config = _transportConfig$1.get(host);
|
|
11801
|
+
if (!config) return;
|
|
11802
|
+
|
|
11803
|
+
// Remove this matcher from this target
|
|
11804
|
+
const targetMatchers = config.targets.get(target);
|
|
11805
|
+
if (targetMatchers) {
|
|
11806
|
+
targetMatchers.delete(matcher);
|
|
11807
|
+
|
|
11808
|
+
// If this target has no more matchers, remove it
|
|
11809
|
+
if (targetMatchers.size === 0) {
|
|
11810
|
+
config.targets.delete(target);
|
|
11811
|
+
}
|
|
11812
|
+
}
|
|
11813
|
+
|
|
11814
|
+
// Check if this matcher is still used by any target
|
|
11815
|
+
let matcherStillUsed = false;
|
|
11816
|
+
for (const matcherMap of config.targets.values()) {
|
|
11817
|
+
if (matcherMap.has(matcher)) {
|
|
11818
|
+
matcherStillUsed = true;
|
|
11819
|
+
break;
|
|
11820
|
+
}
|
|
11821
|
+
}
|
|
11822
|
+
|
|
11823
|
+
// If not used anymore, remove from matchers set
|
|
11824
|
+
if (!matcherStillUsed) {
|
|
11825
|
+
config.matchers.delete(matcher);
|
|
11826
|
+
}
|
|
11827
|
+
|
|
11828
|
+
// If no more targets or matchers, detach observer
|
|
11829
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11830
|
+
_detachObserver$1(host);
|
|
11831
|
+
}
|
|
11832
|
+
};
|
|
11833
|
+
|
|
11834
|
+
/**
|
|
11835
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11836
|
+
*
|
|
11837
|
+
* @param {Object} params - The parameters object.
|
|
11838
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11839
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11840
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11841
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11842
|
+
* @returns {void}
|
|
11843
|
+
* @private
|
|
11844
|
+
*/
|
|
11845
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11846
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11847
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11848
|
+
.filter(attr => matcher(attr))
|
|
11849
|
+
.reduce((acc, attr) => {
|
|
11850
|
+
acc[attr] = host.getAttribute(attr);
|
|
11851
|
+
return acc;
|
|
11852
|
+
}, {});
|
|
11853
|
+
|
|
11854
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11855
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11856
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
11857
|
+
target.setAttribute(key, value);
|
|
11858
|
+
if (removeOriginal) {
|
|
11859
|
+
host.removeAttribute(key);
|
|
11860
|
+
}
|
|
11861
|
+
});
|
|
11862
|
+
};
|
|
11863
|
+
|
|
11864
|
+
/**
|
|
11865
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11866
|
+
*
|
|
11867
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11868
|
+
* @returns {MutationObserver} The observer instance.
|
|
11869
|
+
* @private
|
|
11870
|
+
*/
|
|
11871
|
+
const _attachObserver$1 = (host) => {
|
|
11872
|
+
// If an observer for this host already exists, return it
|
|
11873
|
+
if (_observers$1.has(host)) {
|
|
11874
|
+
return _observers$1.get(host);
|
|
11875
|
+
}
|
|
11876
|
+
|
|
11877
|
+
// Create a new MutationObserver
|
|
11878
|
+
const observer = new MutationObserver((mutations) => {
|
|
11879
|
+
const config = _transportConfig$1.get(host);
|
|
11880
|
+
if (!config) return;
|
|
11881
|
+
|
|
11882
|
+
// For each mutation affecting attributes
|
|
11883
|
+
mutations
|
|
11884
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11885
|
+
.forEach(mutation => {
|
|
11886
|
+
const attributeName = mutation.attributeName;
|
|
11887
|
+
|
|
11888
|
+
// Find matchers that care about this attribute
|
|
11889
|
+
for (const matcher of config.matchers) {
|
|
11890
|
+
if (matcher(attributeName)) {
|
|
11891
|
+
// For each target that uses this matcher
|
|
11892
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11893
|
+
if (matcherConfigs.has(matcher)) {
|
|
11894
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11895
|
+
_transportAttributes$1({
|
|
11896
|
+
host,
|
|
11897
|
+
target,
|
|
11898
|
+
matcher,
|
|
11899
|
+
removeOriginal
|
|
11900
|
+
});
|
|
11901
|
+
}
|
|
11902
|
+
}
|
|
11903
|
+
}
|
|
11904
|
+
}
|
|
11905
|
+
});
|
|
11906
|
+
});
|
|
11907
|
+
|
|
11908
|
+
// Start observing attribute changes
|
|
11909
|
+
observer.observe(host, { attributes: true });
|
|
11910
|
+
|
|
11911
|
+
// Store the observer
|
|
11912
|
+
_observers$1.set(host, observer);
|
|
11913
|
+
|
|
11914
|
+
return observer;
|
|
11915
|
+
};
|
|
11916
|
+
|
|
11917
|
+
/**
|
|
11918
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11919
|
+
*
|
|
11920
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11921
|
+
* @private
|
|
11922
|
+
*/
|
|
11923
|
+
const _detachObserver$1 = (host) => {
|
|
11924
|
+
if (_observers$1.has(host)) {
|
|
11925
|
+
const observer = _observers$1.get(host);
|
|
11926
|
+
observer.disconnect();
|
|
11927
|
+
_observers$1.delete(host);
|
|
11928
|
+
}
|
|
11929
|
+
|
|
11930
|
+
// Clean up the transport config as well
|
|
11931
|
+
if (_transportConfig$1.has(host)) {
|
|
11932
|
+
_transportConfig$1.delete(host);
|
|
11933
|
+
}
|
|
11934
|
+
};
|
|
11935
|
+
|
|
11936
|
+
/**
|
|
11937
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11938
|
+
* @param {HTMLElement} host - The host element
|
|
11939
|
+
* @param {HTMLElement} target - The target element
|
|
11940
|
+
* @param {Function} matcher - The matcher function
|
|
11941
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11942
|
+
* @private
|
|
11943
|
+
*/
|
|
11944
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
11945
|
+
const config = _transportConfig$1.get(host);
|
|
11946
|
+
if (!config) return undefined;
|
|
11947
|
+
|
|
11948
|
+
const targetMatchers = config.targets.get(target);
|
|
11949
|
+
if (!targetMatchers) return undefined;
|
|
11950
|
+
|
|
11951
|
+
return targetMatchers.get(matcher);
|
|
11952
|
+
};
|
|
11953
|
+
|
|
11954
|
+
/**
|
|
11955
|
+
* Sets an observed attribute value
|
|
11956
|
+
* @param {HTMLElement} host - The host element
|
|
11957
|
+
* @param {HTMLElement} target - The target element
|
|
11958
|
+
* @param {Function} matcher - The matcher function
|
|
11959
|
+
* @param {string} key - The attribute name
|
|
11960
|
+
* @param {string} value - The attribute value
|
|
11961
|
+
* @private
|
|
11962
|
+
*/
|
|
11963
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
11964
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11965
|
+
if (matcherConfig) {
|
|
11966
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11967
|
+
}
|
|
11968
|
+
};
|
|
11969
|
+
|
|
11970
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
11971
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11972
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11973
|
+
return undefined;
|
|
11974
|
+
};
|
|
11975
|
+
|
|
11976
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
11977
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
11978
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11979
|
+
return [];
|
|
11980
|
+
};
|
|
11981
|
+
|
|
11982
|
+
const _matchers$1 = {
|
|
11983
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11984
|
+
'role': attr => attr.match(/^role$/)
|
|
11985
|
+
};
|
|
11986
|
+
|
|
11987
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
11988
|
+
return transportAttributes$1({
|
|
11989
|
+
host,
|
|
11990
|
+
target,
|
|
11991
|
+
match: attr => {
|
|
11992
|
+
for (const key in _matchers$1) {
|
|
11993
|
+
if (_matchers$1[key](attr)) return true;
|
|
11994
|
+
}
|
|
11995
|
+
return false;
|
|
11996
|
+
},
|
|
11997
|
+
removeOriginal
|
|
11998
|
+
});
|
|
11999
|
+
};
|
|
12000
|
+
|
|
12001
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
11676
12002
|
|
|
11677
12003
|
/**
|
|
11678
|
-
*
|
|
12004
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
12005
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
12006
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
12007
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11679
12008
|
* @private
|
|
11680
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11681
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11682
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11683
12009
|
*/
|
|
11684
|
-
|
|
11685
|
-
let result = baseName;
|
|
12010
|
+
attributeWatcher;
|
|
11686
12011
|
|
|
11687
|
-
|
|
11688
|
-
|
|
12012
|
+
static get properties() {
|
|
12013
|
+
return {
|
|
11689
12014
|
|
|
11690
|
-
|
|
12015
|
+
/**
|
|
12016
|
+
* Defines the layout of an element.
|
|
12017
|
+
* @default {'default'}
|
|
12018
|
+
*/
|
|
12019
|
+
layout: {
|
|
12020
|
+
type: String,
|
|
12021
|
+
attribute: "layout",
|
|
12022
|
+
reflect: true
|
|
12023
|
+
},
|
|
12024
|
+
|
|
12025
|
+
/**
|
|
12026
|
+
* Defines the shape of an element.
|
|
12027
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
12028
|
+
* @default {'default'}
|
|
12029
|
+
*/
|
|
12030
|
+
shape: {
|
|
12031
|
+
type: String,
|
|
12032
|
+
attribute: "shape",
|
|
12033
|
+
reflect: true
|
|
12034
|
+
},
|
|
12035
|
+
|
|
12036
|
+
/**
|
|
12037
|
+
* Defines the size of an element.
|
|
12038
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
12039
|
+
* @default {'md'}
|
|
12040
|
+
*/
|
|
12041
|
+
size: {
|
|
12042
|
+
type: String,
|
|
12043
|
+
attribute: "size",
|
|
12044
|
+
reflect: true
|
|
12045
|
+
},
|
|
12046
|
+
|
|
12047
|
+
/**
|
|
12048
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
12049
|
+
* @default {false}
|
|
12050
|
+
*/
|
|
12051
|
+
onDark: {
|
|
12052
|
+
type: Boolean,
|
|
12053
|
+
attribute: "ondark",
|
|
12054
|
+
reflect: true
|
|
12055
|
+
},
|
|
12056
|
+
|
|
12057
|
+
/**
|
|
12058
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
12059
|
+
* This is used to apply layout and shape classes dynamically.
|
|
12060
|
+
* @type {HTMLElement|null}
|
|
12061
|
+
* @default {null}
|
|
12062
|
+
* @private
|
|
12063
|
+
*/
|
|
12064
|
+
wrapper: {
|
|
12065
|
+
type: HTMLElement,
|
|
12066
|
+
attribute: false,
|
|
12067
|
+
reflect: false
|
|
12068
|
+
}
|
|
12069
|
+
};
|
|
11691
12070
|
}
|
|
11692
12071
|
|
|
11693
|
-
|
|
11694
|
-
* Generates a unique string to be used for child auro element naming.
|
|
11695
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11696
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11697
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11698
|
-
*/
|
|
11699
|
-
generateTag(baseName, version, tagClass) {
|
|
11700
|
-
const elementName = this.generateElementName(baseName, version);
|
|
11701
|
-
const tag = i$1`${s$1(elementName)}`;
|
|
12072
|
+
|
|
11702
12073
|
|
|
11703
|
-
|
|
11704
|
-
|
|
12074
|
+
resetShapeClasses() {
|
|
12075
|
+
if (this.shape && this.size) {
|
|
12076
|
+
|
|
12077
|
+
if (this.wrapper) {
|
|
12078
|
+
this.wrapper.classList.forEach((className) => {
|
|
12079
|
+
if (className.startsWith('shape-')) {
|
|
12080
|
+
this.wrapper.classList.remove(className);
|
|
12081
|
+
}
|
|
12082
|
+
});
|
|
12083
|
+
|
|
12084
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
12085
|
+
}
|
|
11705
12086
|
}
|
|
12087
|
+
}
|
|
11706
12088
|
|
|
11707
|
-
|
|
12089
|
+
resetLayoutClasses() {
|
|
12090
|
+
if (this.layout) {
|
|
12091
|
+
if (this.wrapper) {
|
|
12092
|
+
this.wrapper.classList.forEach((className) => {
|
|
12093
|
+
if (className.startsWith('layout-')) {
|
|
12094
|
+
this.wrapper.classList.remove(className);
|
|
12095
|
+
}
|
|
12096
|
+
});
|
|
12097
|
+
|
|
12098
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
12099
|
+
}
|
|
12100
|
+
}
|
|
12101
|
+
}
|
|
12102
|
+
|
|
12103
|
+
updateComponentArchitecture() {
|
|
12104
|
+
this.resetLayoutClasses();
|
|
12105
|
+
this.resetShapeClasses();
|
|
12106
|
+
}
|
|
12107
|
+
|
|
12108
|
+
updated(changedProperties) {
|
|
12109
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
12110
|
+
this.updateComponentArchitecture();
|
|
12111
|
+
}
|
|
12112
|
+
}
|
|
12113
|
+
|
|
12114
|
+
firstUpdated() {
|
|
12115
|
+
super.firstUpdated();
|
|
12116
|
+
|
|
12117
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
12118
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
12119
|
+
|
|
12120
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
12121
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
12122
|
+
}
|
|
12123
|
+
|
|
12124
|
+
disconnectedCallback() {
|
|
12125
|
+
super.disconnectedCallback();
|
|
12126
|
+
|
|
12127
|
+
// Cleanup the ARIA observer if it exists
|
|
12128
|
+
if (this.attributeWatcher) {
|
|
12129
|
+
this.attributeWatcher.cleanup();
|
|
12130
|
+
this.attributeWatcher = null;
|
|
12131
|
+
}
|
|
12132
|
+
}
|
|
12133
|
+
|
|
12134
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
12135
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
12136
|
+
render() {
|
|
12137
|
+
try {
|
|
12138
|
+
return this.renderLayout();
|
|
12139
|
+
} catch (error) {
|
|
12140
|
+
// failed to get the defined layout
|
|
12141
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
12142
|
+
|
|
12143
|
+
// fallback to the default layout
|
|
12144
|
+
return this.getLayout('default');
|
|
12145
|
+
}
|
|
11708
12146
|
}
|
|
11709
12147
|
};
|
|
11710
12148
|
|
|
12149
|
+
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}`;
|
|
12150
|
+
|
|
12151
|
+
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)}`;
|
|
12152
|
+
|
|
12153
|
+
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}`;
|
|
12154
|
+
|
|
12155
|
+
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}`;
|
|
12156
|
+
|
|
11711
12157
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11712
12158
|
// See LICENSE in the project root for license information.
|
|
11713
12159
|
|
|
@@ -11715,7 +12161,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
11715
12161
|
|
|
11716
12162
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11717
12163
|
|
|
11718
|
-
let AuroLibraryRuntimeUtils$2
|
|
12164
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
11719
12165
|
|
|
11720
12166
|
/* eslint-disable jsdoc/require-param */
|
|
11721
12167
|
|
|
@@ -11778,100 +12224,24 @@ let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
|
11778
12224
|
}
|
|
11779
12225
|
};
|
|
11780
12226
|
|
|
11781
|
-
var styleCss$
|
|
12227
|
+
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}}`;
|
|
11782
12228
|
|
|
11783
|
-
var colorCss$2
|
|
12229
|
+
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}`;
|
|
11784
12230
|
|
|
11785
|
-
var tokensCss$2
|
|
12231
|
+
var tokensCss$1$2 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11786
12232
|
|
|
11787
|
-
// Copyright (c) Alaska
|
|
12233
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11788
12234
|
// See LICENSE in the project root for license information.
|
|
11789
12235
|
|
|
11790
|
-
// ---------------------------------------------------------------------
|
|
11791
|
-
|
|
11792
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11793
12236
|
|
|
11794
|
-
let
|
|
12237
|
+
let AuroLoader$1 = class AuroLoader extends i$2 {
|
|
12238
|
+
constructor() {
|
|
12239
|
+
super();
|
|
11795
12240
|
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
* @param {String} name - The name of the custom element.
|
|
11801
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
11802
|
-
* @returns {void}
|
|
11803
|
-
*/
|
|
11804
|
-
registerComponent(name, componentClass) {
|
|
11805
|
-
if (!customElements.get(name)) {
|
|
11806
|
-
customElements.define(name, class extends componentClass {});
|
|
11807
|
-
}
|
|
11808
|
-
}
|
|
11809
|
-
|
|
11810
|
-
/**
|
|
11811
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
11812
|
-
* @returns {void}
|
|
11813
|
-
*/
|
|
11814
|
-
closestElement(
|
|
11815
|
-
selector, // selector like in .closest()
|
|
11816
|
-
base = this, // extra functionality to skip a parent
|
|
11817
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11818
|
-
!el || el === document || el === window
|
|
11819
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
11820
|
-
: found
|
|
11821
|
-
? found // found a selector INside this element
|
|
11822
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11823
|
-
) {
|
|
11824
|
-
return __Closest(base);
|
|
11825
|
-
}
|
|
11826
|
-
/* eslint-enable jsdoc/require-param */
|
|
11827
|
-
|
|
11828
|
-
/**
|
|
11829
|
-
* 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.
|
|
11830
|
-
* @param {Object} elem - The element to check.
|
|
11831
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
11832
|
-
* @returns {void}
|
|
11833
|
-
*/
|
|
11834
|
-
handleComponentTagRename(elem, tagName) {
|
|
11835
|
-
const tag = tagName.toLowerCase();
|
|
11836
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11837
|
-
|
|
11838
|
-
if (elemTag !== tag) {
|
|
11839
|
-
elem.setAttribute(tag, true);
|
|
11840
|
-
}
|
|
11841
|
-
}
|
|
11842
|
-
|
|
11843
|
-
/**
|
|
11844
|
-
* Validates if an element is a specific Auro component.
|
|
11845
|
-
* @param {Object} elem - The element to validate.
|
|
11846
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
11847
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
11848
|
-
*/
|
|
11849
|
-
elementMatch(elem, tagName) {
|
|
11850
|
-
const tag = tagName.toLowerCase();
|
|
11851
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
11852
|
-
|
|
11853
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
11854
|
-
}
|
|
11855
|
-
};
|
|
11856
|
-
|
|
11857
|
-
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}}`;
|
|
11858
|
-
|
|
11859
|
-
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}`;
|
|
11860
|
-
|
|
11861
|
-
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11862
|
-
|
|
11863
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11864
|
-
// See LICENSE in the project root for license information.
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
class AuroLoader extends i$2 {
|
|
11868
|
-
constructor() {
|
|
11869
|
-
super();
|
|
11870
|
-
|
|
11871
|
-
/**
|
|
11872
|
-
* @private
|
|
11873
|
-
*/
|
|
11874
|
-
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
12241
|
+
/**
|
|
12242
|
+
* @private
|
|
12243
|
+
*/
|
|
12244
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11875
12245
|
|
|
11876
12246
|
/**
|
|
11877
12247
|
* @private
|
|
@@ -11936,7 +12306,7 @@ class AuroLoader extends i$2 {
|
|
|
11936
12306
|
return [
|
|
11937
12307
|
i$5`${styleCss$1$2}`,
|
|
11938
12308
|
i$5`${colorCss$1$2}`,
|
|
11939
|
-
i$5`${tokensCss$1$
|
|
12309
|
+
i$5`${tokensCss$1$2}`
|
|
11940
12310
|
];
|
|
11941
12311
|
}
|
|
11942
12312
|
|
|
@@ -11997,11 +12367,11 @@ class AuroLoader extends i$2 {
|
|
|
11997
12367
|
}
|
|
11998
12368
|
`;
|
|
11999
12369
|
}
|
|
12000
|
-
}
|
|
12370
|
+
};
|
|
12001
12371
|
|
|
12002
|
-
var loaderVersion = '5.0.0';
|
|
12372
|
+
var loaderVersion$1 = '5.0.0';
|
|
12003
12373
|
|
|
12004
|
-
/* eslint-disable max-lines */
|
|
12374
|
+
/* eslint-disable max-lines, curly */
|
|
12005
12375
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12006
12376
|
// See LICENSE in the project root for license information.
|
|
12007
12377
|
|
|
@@ -12017,7 +12387,18 @@ var loaderVersion = '5.0.0';
|
|
|
12017
12387
|
|
|
12018
12388
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
12019
12389
|
|
|
12020
|
-
|
|
12390
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
12391
|
+
|
|
12392
|
+
/**
|
|
12393
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
12394
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
12395
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
12396
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
12397
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
12398
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
12399
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
12400
|
+
*/
|
|
12401
|
+
let AuroButton$1 = class AuroButton extends AuroElement$3 {
|
|
12021
12402
|
|
|
12022
12403
|
/**
|
|
12023
12404
|
* Enables form association for this element.
|
|
@@ -12032,13 +12413,10 @@ class AuroButton extends i$2 {
|
|
|
12032
12413
|
super();
|
|
12033
12414
|
this.autofocus = false;
|
|
12034
12415
|
this.disabled = false;
|
|
12035
|
-
this.iconOnly = false;
|
|
12036
12416
|
this.loading = false;
|
|
12417
|
+
this.size = "md";
|
|
12418
|
+
this.shape = "rounded";
|
|
12037
12419
|
this.onDark = false;
|
|
12038
|
-
this.secondary = false;
|
|
12039
|
-
this.tertiary = false;
|
|
12040
|
-
this.rounded = false;
|
|
12041
|
-
this.slim = false;
|
|
12042
12420
|
this.fluid = false;
|
|
12043
12421
|
this.loadingText = this.loadingText || 'Loading...';
|
|
12044
12422
|
|
|
@@ -12055,55 +12433,50 @@ class AuroButton extends i$2 {
|
|
|
12055
12433
|
/**
|
|
12056
12434
|
* Generate unique names for dependency components.
|
|
12057
12435
|
*/
|
|
12058
|
-
const versioning = new AuroDependencyVersioning$
|
|
12436
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
12059
12437
|
|
|
12060
12438
|
/**
|
|
12061
12439
|
* @private
|
|
12062
12440
|
*/
|
|
12063
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
12441
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
12064
12442
|
}
|
|
12065
12443
|
|
|
12066
12444
|
static get styles() {
|
|
12067
12445
|
return [
|
|
12068
|
-
tokensCss$2$
|
|
12446
|
+
tokensCss$2$2,
|
|
12069
12447
|
styleCss$2$2,
|
|
12070
|
-
colorCss$2$
|
|
12448
|
+
colorCss$2$2,
|
|
12449
|
+
shapeSize$1
|
|
12071
12450
|
];
|
|
12072
12451
|
}
|
|
12073
12452
|
|
|
12074
12453
|
static get properties() {
|
|
12075
12454
|
return {
|
|
12076
12455
|
|
|
12077
|
-
|
|
12078
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12079
|
-
*/
|
|
12080
|
-
autofocus: {
|
|
12081
|
-
type: Boolean,
|
|
12082
|
-
reflect: true
|
|
12083
|
-
},
|
|
12456
|
+
...super.properties,
|
|
12084
12457
|
|
|
12085
12458
|
/**
|
|
12086
|
-
*
|
|
12459
|
+
* Override layout since it isn't used in this component.
|
|
12460
|
+
* @private
|
|
12087
12461
|
*/
|
|
12088
|
-
|
|
12462
|
+
layout: {
|
|
12089
12463
|
type: Boolean,
|
|
12090
|
-
|
|
12464
|
+
attribute: false,
|
|
12465
|
+
reflect: false
|
|
12091
12466
|
},
|
|
12092
12467
|
|
|
12093
12468
|
/**
|
|
12094
|
-
*
|
|
12095
|
-
* @deprecated
|
|
12469
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12096
12470
|
*/
|
|
12097
|
-
|
|
12471
|
+
autofocus: {
|
|
12098
12472
|
type: Boolean,
|
|
12099
12473
|
reflect: true
|
|
12100
12474
|
},
|
|
12101
12475
|
|
|
12102
12476
|
/**
|
|
12103
|
-
*
|
|
12104
|
-
* @deprecated
|
|
12477
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
12105
12478
|
*/
|
|
12106
|
-
|
|
12479
|
+
disabled: {
|
|
12107
12480
|
type: Boolean,
|
|
12108
12481
|
reflect: true
|
|
12109
12482
|
},
|
|
@@ -12111,15 +12484,7 @@ class AuroButton extends i$2 {
|
|
|
12111
12484
|
/**
|
|
12112
12485
|
* Alters the shape of the button to be full width of its parent container.
|
|
12113
12486
|
*/
|
|
12114
|
-
fluid:
|
|
12115
|
-
type: Boolean,
|
|
12116
|
-
reflect: true
|
|
12117
|
-
},
|
|
12118
|
-
|
|
12119
|
-
/**
|
|
12120
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
12121
|
-
*/
|
|
12122
|
-
iconOnly: {
|
|
12487
|
+
fluid: {
|
|
12123
12488
|
type: Boolean,
|
|
12124
12489
|
reflect: true
|
|
12125
12490
|
},
|
|
@@ -12127,7 +12492,7 @@ class AuroButton extends i$2 {
|
|
|
12127
12492
|
/**
|
|
12128
12493
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
12129
12494
|
*/
|
|
12130
|
-
loading:
|
|
12495
|
+
loading: {
|
|
12131
12496
|
type: Boolean,
|
|
12132
12497
|
reflect: true
|
|
12133
12498
|
},
|
|
@@ -12135,34 +12500,10 @@ class AuroButton extends i$2 {
|
|
|
12135
12500
|
/**
|
|
12136
12501
|
* 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.
|
|
12137
12502
|
*/
|
|
12138
|
-
loadingText:
|
|
12503
|
+
loadingText: {
|
|
12139
12504
|
type: String
|
|
12140
12505
|
},
|
|
12141
12506
|
|
|
12142
|
-
/**
|
|
12143
|
-
* Set value for on-dark version of auro-button.
|
|
12144
|
-
*/
|
|
12145
|
-
onDark: {
|
|
12146
|
-
type: Boolean,
|
|
12147
|
-
reflect: true
|
|
12148
|
-
},
|
|
12149
|
-
|
|
12150
|
-
/**
|
|
12151
|
-
* If set to true, the button will have a rounded shape.
|
|
12152
|
-
*/
|
|
12153
|
-
rounded: {
|
|
12154
|
-
type: Boolean,
|
|
12155
|
-
reflect: true
|
|
12156
|
-
},
|
|
12157
|
-
|
|
12158
|
-
/**
|
|
12159
|
-
* Set value for slim version of auro-button.
|
|
12160
|
-
*/
|
|
12161
|
-
slim: {
|
|
12162
|
-
type: Boolean,
|
|
12163
|
-
reflect: true
|
|
12164
|
-
},
|
|
12165
|
-
|
|
12166
12507
|
/**
|
|
12167
12508
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
12168
12509
|
*/
|
|
@@ -12171,48 +12512,10 @@ class AuroButton extends i$2 {
|
|
|
12171
12512
|
reflect: true
|
|
12172
12513
|
},
|
|
12173
12514
|
|
|
12174
|
-
/**
|
|
12175
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
12176
|
-
*/
|
|
12177
|
-
ariahidden: {
|
|
12178
|
-
type: String,
|
|
12179
|
-
reflect: true,
|
|
12180
|
-
},
|
|
12181
|
-
|
|
12182
|
-
/**
|
|
12183
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
12184
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
12185
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
12186
|
-
*/
|
|
12187
|
-
arialabel: {
|
|
12188
|
-
type: String,
|
|
12189
|
-
reflect: true
|
|
12190
|
-
},
|
|
12191
|
-
|
|
12192
|
-
/**
|
|
12193
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
12194
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
12195
|
-
* List multiple element IDs in a space delimited fashion.
|
|
12196
|
-
*/
|
|
12197
|
-
arialabelledby: {
|
|
12198
|
-
type: String,
|
|
12199
|
-
reflect: true
|
|
12200
|
-
},
|
|
12201
|
-
|
|
12202
|
-
/**
|
|
12203
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
12204
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
12205
|
-
* This is an optional attribute for buttons.
|
|
12206
|
-
*/
|
|
12207
|
-
ariaexpanded: {
|
|
12208
|
-
type: Boolean,
|
|
12209
|
-
reflect: true
|
|
12210
|
-
},
|
|
12211
|
-
|
|
12212
12515
|
/**
|
|
12213
12516
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12214
12517
|
*/
|
|
12215
|
-
title:
|
|
12518
|
+
title: {
|
|
12216
12519
|
type: String,
|
|
12217
12520
|
reflect: true
|
|
12218
12521
|
},
|
|
@@ -12220,7 +12523,7 @@ class AuroButton extends i$2 {
|
|
|
12220
12523
|
/**
|
|
12221
12524
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
12222
12525
|
*/
|
|
12223
|
-
type:
|
|
12526
|
+
type: {
|
|
12224
12527
|
type: String,
|
|
12225
12528
|
reflect: true
|
|
12226
12529
|
},
|
|
@@ -12228,19 +12531,19 @@ class AuroButton extends i$2 {
|
|
|
12228
12531
|
/**
|
|
12229
12532
|
* Defines the value associated with the button which is submitted with the form data.
|
|
12230
12533
|
*/
|
|
12231
|
-
value:
|
|
12534
|
+
value: {
|
|
12232
12535
|
type: String,
|
|
12233
12536
|
reflect: true
|
|
12234
12537
|
},
|
|
12235
12538
|
|
|
12236
12539
|
/**
|
|
12237
|
-
* Sets button variant option.
|
|
12540
|
+
* Sets button variant option.
|
|
12541
|
+
* @default primary
|
|
12238
12542
|
*/
|
|
12239
|
-
variant:
|
|
12543
|
+
variant: {
|
|
12240
12544
|
type: String,
|
|
12241
12545
|
reflect: true
|
|
12242
12546
|
},
|
|
12243
|
-
ready: { type: Boolean },
|
|
12244
12547
|
};
|
|
12245
12548
|
}
|
|
12246
12549
|
|
|
@@ -12253,7 +12556,7 @@ class AuroButton extends i$2 {
|
|
|
12253
12556
|
*
|
|
12254
12557
|
*/
|
|
12255
12558
|
static register(name = "auro-button") {
|
|
12256
|
-
AuroLibraryRuntimeUtils$
|
|
12559
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
12257
12560
|
}
|
|
12258
12561
|
|
|
12259
12562
|
/**
|
|
@@ -12265,17 +12568,6 @@ class AuroButton extends i$2 {
|
|
|
12265
12568
|
this.renderRoot.querySelector('button').focus();
|
|
12266
12569
|
}
|
|
12267
12570
|
|
|
12268
|
-
updated() {
|
|
12269
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12270
|
-
if (this.secondary) {
|
|
12271
|
-
this.setAttribute('variant', 'secondary');
|
|
12272
|
-
}
|
|
12273
|
-
|
|
12274
|
-
if (this.tertiary) {
|
|
12275
|
-
this.setAttribute('variant', 'tertiary');
|
|
12276
|
-
}
|
|
12277
|
-
}
|
|
12278
|
-
|
|
12279
12571
|
/**
|
|
12280
12572
|
* Submits the form that this button is associated with.
|
|
12281
12573
|
* @private
|
|
@@ -12296,25 +12588,56 @@ class AuroButton extends i$2 {
|
|
|
12296
12588
|
return this.internals ? this.internals.form : null;
|
|
12297
12589
|
}
|
|
12298
12590
|
|
|
12299
|
-
|
|
12591
|
+
/**
|
|
12592
|
+
* @private
|
|
12593
|
+
* @returns {Boolean}
|
|
12594
|
+
*/
|
|
12595
|
+
get hideText() {
|
|
12596
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
12597
|
+
}
|
|
12598
|
+
|
|
12599
|
+
/**
|
|
12600
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
12601
|
+
* @returns {string | undefined}
|
|
12602
|
+
* @private
|
|
12603
|
+
*/
|
|
12604
|
+
get currentAriaLabel() {
|
|
12605
|
+
if (!this.attributeWatcher) return undefined;
|
|
12606
|
+
|
|
12607
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
12608
|
+
return ariaLabel || undefined;
|
|
12609
|
+
}
|
|
12610
|
+
|
|
12611
|
+
/**
|
|
12612
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
12613
|
+
* @returns {string | undefined}
|
|
12614
|
+
* @private
|
|
12615
|
+
*/
|
|
12616
|
+
get currentAriaLabelledBy() {
|
|
12617
|
+
if (!this.attributeWatcher) return undefined;
|
|
12618
|
+
|
|
12619
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
12620
|
+
return ariaLabelledBy || undefined;
|
|
12621
|
+
}
|
|
12622
|
+
|
|
12623
|
+
/**
|
|
12624
|
+
* Renders the default layout for the button.
|
|
12625
|
+
* @returns {TemplateResult}
|
|
12626
|
+
* @private
|
|
12627
|
+
*/
|
|
12628
|
+
renderLayoutDefault() {
|
|
12300
12629
|
const classes = {
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
'auro-button--slim': this.slim,
|
|
12306
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12307
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12308
|
-
'loading': this.loading
|
|
12630
|
+
"util_insetLg--squish": true,
|
|
12631
|
+
"auro-button": true,
|
|
12632
|
+
wrapper: true,
|
|
12633
|
+
loading: this.loading,
|
|
12309
12634
|
};
|
|
12310
12635
|
|
|
12311
12636
|
return u$2`
|
|
12312
12637
|
<button
|
|
12313
12638
|
part="button"
|
|
12314
|
-
aria-
|
|
12315
|
-
aria-
|
|
12316
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12317
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
12639
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
12640
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12318
12641
|
tabIndex="${o(this.tIndex)}"
|
|
12319
12642
|
?autofocus="${this.autofocus}"
|
|
12320
12643
|
class="${e(classes)}"
|
|
@@ -12331,7 +12654,7 @@ class AuroButton extends i$2 {
|
|
|
12331
12654
|
|
|
12332
12655
|
<span class="contentWrapper">
|
|
12333
12656
|
<span class="textSlot" part="text">
|
|
12334
|
-
${this.
|
|
12657
|
+
${this.hideText ? undefined : u$2`<slot></slot>`}
|
|
12335
12658
|
</span>
|
|
12336
12659
|
|
|
12337
12660
|
<span part="icon">
|
|
@@ -12341,9 +12664,18 @@ class AuroButton extends i$2 {
|
|
|
12341
12664
|
</button>
|
|
12342
12665
|
`;
|
|
12343
12666
|
}
|
|
12344
|
-
}
|
|
12345
12667
|
|
|
12346
|
-
|
|
12668
|
+
/**
|
|
12669
|
+
* Renders the layout of the button
|
|
12670
|
+
* @returns {TemplateResult}
|
|
12671
|
+
* @private
|
|
12672
|
+
*/
|
|
12673
|
+
renderLayout() {
|
|
12674
|
+
return this.renderLayoutDefault();
|
|
12675
|
+
}
|
|
12676
|
+
};
|
|
12677
|
+
|
|
12678
|
+
var buttonVersion$1 = '9.3.0';
|
|
12347
12679
|
|
|
12348
12680
|
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)}`;
|
|
12349
12681
|
|
|
@@ -12571,7 +12903,7 @@ class AuroInput extends BaseInput {
|
|
|
12571
12903
|
/**
|
|
12572
12904
|
* @private
|
|
12573
12905
|
*/
|
|
12574
|
-
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
12906
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$1, AuroButton$1);
|
|
12575
12907
|
|
|
12576
12908
|
/**
|
|
12577
12909
|
* @private
|
|
@@ -12595,7 +12927,7 @@ class AuroInput extends BaseInput {
|
|
|
12595
12927
|
i$5`${classicColorCss}`,
|
|
12596
12928
|
i$5`${shapeSizeCss}`,
|
|
12597
12929
|
i$5`${colorBaseCss}`,
|
|
12598
|
-
i$5`${styleCss$4$
|
|
12930
|
+
i$5`${styleCss$4$2}`,
|
|
12599
12931
|
i$5`${styleDefaultCss}`,
|
|
12600
12932
|
i$5`${tokensCss$4}`,
|
|
12601
12933
|
i$5`${emphasizedStyleCss}`,
|
|
@@ -12687,7 +13019,7 @@ class AuroInput extends BaseInput {
|
|
|
12687
13019
|
*
|
|
12688
13020
|
*/
|
|
12689
13021
|
static register(name = "auro-input") {
|
|
12690
|
-
AuroLibraryRuntimeUtils$
|
|
13022
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroInput);
|
|
12691
13023
|
}
|
|
12692
13024
|
|
|
12693
13025
|
/**
|
|
@@ -12817,11 +13149,12 @@ class AuroInput extends BaseInput {
|
|
|
12817
13149
|
?onDark="${this.onDark}"
|
|
12818
13150
|
aria-label="${i18n(this.lang, 'clearInput')}"
|
|
12819
13151
|
class="notificationBtn clearBtn"
|
|
12820
|
-
|
|
12821
|
-
|
|
13152
|
+
shape="circle"
|
|
13153
|
+
size="sm"
|
|
13154
|
+
variant="ghost">
|
|
12822
13155
|
<${this.iconTag}
|
|
13156
|
+
customColor="${this.onDark}"
|
|
12823
13157
|
category="interface"
|
|
12824
|
-
customColor
|
|
12825
13158
|
name="x-lg"
|
|
12826
13159
|
>
|
|
12827
13160
|
</${this.iconTag}>
|
|
@@ -12841,20 +13174,21 @@ class AuroInput extends BaseInput {
|
|
|
12841
13174
|
<${this.buttonTag}
|
|
12842
13175
|
@click="${this.handleClickShowPassword}"
|
|
12843
13176
|
?onDark="${this.onDark}"
|
|
12844
|
-
aria-hidden="true"
|
|
12845
13177
|
class="notificationBtn passwordBtn"
|
|
12846
|
-
|
|
12847
|
-
|
|
13178
|
+
aria-label="${this.showPassword ? i18n(this.lang, "hidePassword") : i18n(this.lang, "showPassword")}"
|
|
13179
|
+
shape="circle"
|
|
13180
|
+
size="sm"
|
|
13181
|
+
variant="ghost">
|
|
12848
13182
|
<${this.iconTag}
|
|
13183
|
+
customColor="${this.onDark}"
|
|
12849
13184
|
?hidden=${!this.showPassword}
|
|
12850
13185
|
category="interface"
|
|
12851
|
-
customColor
|
|
12852
13186
|
name="hide-password-stroke">
|
|
12853
13187
|
</${this.iconTag}>
|
|
12854
13188
|
<${this.iconTag}
|
|
13189
|
+
customColor="${this.onDark}"
|
|
12855
13190
|
?hidden=${this.showPassword}
|
|
12856
13191
|
category="interface"
|
|
12857
|
-
customColor
|
|
12858
13192
|
name="view-password-stroke">
|
|
12859
13193
|
</${this.iconTag}>
|
|
12860
13194
|
</${this.buttonTag}>
|
|
@@ -12967,219 +13301,1216 @@ class AuroInput extends BaseInput {
|
|
|
12967
13301
|
}
|
|
12968
13302
|
|
|
12969
13303
|
/**
|
|
12970
|
-
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
12971
|
-
* @private
|
|
12972
|
-
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13304
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
13305
|
+
* @private
|
|
13306
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13307
|
+
*/
|
|
13308
|
+
renderLayoutEmphasized() {
|
|
13309
|
+
return u$2`
|
|
13310
|
+
<div
|
|
13311
|
+
@click="${this.handleClick}"
|
|
13312
|
+
class="${e(this.commonWrapperClasses)}"
|
|
13313
|
+
part="wrapper">
|
|
13314
|
+
<div class="accents left ${this.commonAccentClasses}">
|
|
13315
|
+
${this.layout.includes('left') ? u$2`
|
|
13316
|
+
${this.renderValidationErrorIconHtml()}
|
|
13317
|
+
` : undefined}
|
|
13318
|
+
</div>
|
|
13319
|
+
<div class="mainContent">
|
|
13320
|
+
${this.renderHtmlInput()}
|
|
13321
|
+
</div>
|
|
13322
|
+
<div class="accents right ${this.commonAccentClasses}">
|
|
13323
|
+
${this.layout.includes('right') || this.layout === "emphasized" ? u$2`
|
|
13324
|
+
${this.renderValidationErrorIconHtml()}
|
|
13325
|
+
` : undefined}
|
|
13326
|
+
${this.hasValue ? u$2`
|
|
13327
|
+
${!this.disabled && !this.readonly ? u$2`
|
|
13328
|
+
${this.renderHtmlActionClear()}
|
|
13329
|
+
` : undefined}
|
|
13330
|
+
` : undefined}
|
|
13331
|
+
</div>
|
|
13332
|
+
</div>
|
|
13333
|
+
<div class="${e(this.helpTextClasses)}" part="inputHelpText">
|
|
13334
|
+
${this.renderHtmlHelpText()}
|
|
13335
|
+
</div>
|
|
13336
|
+
`;
|
|
13337
|
+
}
|
|
13338
|
+
|
|
13339
|
+
/**
|
|
13340
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
13341
|
+
* @private
|
|
13342
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
13343
|
+
*/
|
|
13344
|
+
renderLayoutSnowflake() {
|
|
13345
|
+
return u$2`
|
|
13346
|
+
<div
|
|
13347
|
+
@click="${this.handleClick}"
|
|
13348
|
+
class="${e(this.commonWrapperClasses)}"
|
|
13349
|
+
part="wrapper">
|
|
13350
|
+
<div class="accents left">
|
|
13351
|
+
${this.renderHtmlTypeIcon()}
|
|
13352
|
+
</div>
|
|
13353
|
+
<div class="mainContent">
|
|
13354
|
+
${this.renderHtmlInput()}
|
|
13355
|
+
</div>
|
|
13356
|
+
<div class="accents right">
|
|
13357
|
+
${this.renderValidationErrorIconHtml()}
|
|
13358
|
+
${this.hasValue ? u$2`
|
|
13359
|
+
${!this.disabled && !this.readonly ? u$2`
|
|
13360
|
+
${this.renderHtmlActionClear()}
|
|
13361
|
+
` : undefined}
|
|
13362
|
+
` : undefined}
|
|
13363
|
+
</div>
|
|
13364
|
+
</div>
|
|
13365
|
+
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
13366
|
+
${this.renderHtmlHelpText()}
|
|
13367
|
+
</div>
|
|
13368
|
+
`;
|
|
13369
|
+
}
|
|
13370
|
+
|
|
13371
|
+
/**
|
|
13372
|
+
* Logic to determine the layout of the component.
|
|
13373
|
+
* @private
|
|
13374
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
13375
|
+
* @returns {void}
|
|
13376
|
+
*/
|
|
13377
|
+
renderLayout(ForcedLayout) {
|
|
13378
|
+
const layout = ForcedLayout || this.layout;
|
|
13379
|
+
|
|
13380
|
+
switch (layout) {
|
|
13381
|
+
case 'emphasized':
|
|
13382
|
+
return this.renderLayoutEmphasized();
|
|
13383
|
+
case 'emphasized-left':
|
|
13384
|
+
return this.renderLayoutEmphasized();
|
|
13385
|
+
case 'emphasized-right':
|
|
13386
|
+
return this.renderLayoutEmphasized();
|
|
13387
|
+
case 'snowflake':
|
|
13388
|
+
return this.renderLayoutSnowflake();
|
|
13389
|
+
case 'snowflake-left':
|
|
13390
|
+
return this.renderLayoutSnowflake();
|
|
13391
|
+
case 'snowflake-right':
|
|
13392
|
+
return this.renderLayoutSnowflake();
|
|
13393
|
+
default:
|
|
13394
|
+
return this.renderLayoutClassic();
|
|
13395
|
+
}
|
|
13396
|
+
}
|
|
13397
|
+
}
|
|
13398
|
+
|
|
13399
|
+
var inputVersion = '4.2.0';
|
|
13400
|
+
|
|
13401
|
+
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)}`;
|
|
13402
|
+
|
|
13403
|
+
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)}`;
|
|
13404
|
+
|
|
13405
|
+
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)}`;
|
|
13406
|
+
|
|
13407
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13408
|
+
// See LICENSE in the project root for license information.
|
|
13409
|
+
|
|
13410
|
+
// ---------------------------------------------------------------------
|
|
13411
|
+
|
|
13412
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13413
|
+
|
|
13414
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
13415
|
+
|
|
13416
|
+
/* eslint-disable jsdoc/require-param */
|
|
13417
|
+
|
|
13418
|
+
/**
|
|
13419
|
+
* This will register a new custom element with the browser.
|
|
13420
|
+
* @param {String} name - The name of the custom element.
|
|
13421
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
13422
|
+
* @returns {void}
|
|
13423
|
+
*/
|
|
13424
|
+
registerComponent(name, componentClass) {
|
|
13425
|
+
if (!customElements.get(name)) {
|
|
13426
|
+
customElements.define(name, class extends componentClass {});
|
|
13427
|
+
}
|
|
13428
|
+
}
|
|
13429
|
+
|
|
13430
|
+
/**
|
|
13431
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
13432
|
+
* @returns {void}
|
|
13433
|
+
*/
|
|
13434
|
+
closestElement(
|
|
13435
|
+
selector, // selector like in .closest()
|
|
13436
|
+
base = this, // extra functionality to skip a parent
|
|
13437
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13438
|
+
!el || el === document || el === window
|
|
13439
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
13440
|
+
: found
|
|
13441
|
+
? found // found a selector INside this element
|
|
13442
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13443
|
+
) {
|
|
13444
|
+
return __Closest(base);
|
|
13445
|
+
}
|
|
13446
|
+
/* eslint-enable jsdoc/require-param */
|
|
13447
|
+
|
|
13448
|
+
/**
|
|
13449
|
+
* 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.
|
|
13450
|
+
* @param {Object} elem - The element to check.
|
|
13451
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
13452
|
+
* @returns {void}
|
|
13453
|
+
*/
|
|
13454
|
+
handleComponentTagRename(elem, tagName) {
|
|
13455
|
+
const tag = tagName.toLowerCase();
|
|
13456
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13457
|
+
|
|
13458
|
+
if (elemTag !== tag) {
|
|
13459
|
+
elem.setAttribute(tag, true);
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
|
|
13463
|
+
/**
|
|
13464
|
+
* Validates if an element is a specific Auro component.
|
|
13465
|
+
* @param {Object} elem - The element to validate.
|
|
13466
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
13467
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
13468
|
+
*/
|
|
13469
|
+
elementMatch(elem, tagName) {
|
|
13470
|
+
const tag = tagName.toLowerCase();
|
|
13471
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
13472
|
+
|
|
13473
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
13474
|
+
}
|
|
13475
|
+
};
|
|
13476
|
+
|
|
13477
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13478
|
+
// See LICENSE in the project root for license information.
|
|
13479
|
+
|
|
13480
|
+
|
|
13481
|
+
class AuroDependencyVersioning {
|
|
13482
|
+
|
|
13483
|
+
/**
|
|
13484
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13485
|
+
* @private
|
|
13486
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13487
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13488
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13489
|
+
*/
|
|
13490
|
+
generateElementName(baseName, version) {
|
|
13491
|
+
let result = baseName;
|
|
13492
|
+
|
|
13493
|
+
result += '-';
|
|
13494
|
+
result += version.replace(/[.]/g, '_');
|
|
13495
|
+
|
|
13496
|
+
return result;
|
|
13497
|
+
}
|
|
13498
|
+
|
|
13499
|
+
/**
|
|
13500
|
+
* Generates a unique string to be used for child auro element naming.
|
|
13501
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13502
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13503
|
+
* @returns {string} - Unique string to be used for naming.
|
|
13504
|
+
*/
|
|
13505
|
+
generateTag(baseName, version, tagClass) {
|
|
13506
|
+
const elementName = this.generateElementName(baseName, version);
|
|
13507
|
+
const tag = i$1`${s$1(elementName)}`;
|
|
13508
|
+
|
|
13509
|
+
if (!customElements.get(elementName)) {
|
|
13510
|
+
customElements.define(elementName, class extends tagClass {});
|
|
13511
|
+
}
|
|
13512
|
+
|
|
13513
|
+
return tag;
|
|
13514
|
+
}
|
|
13515
|
+
}
|
|
13516
|
+
|
|
13517
|
+
/**
|
|
13518
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
13519
|
+
*/
|
|
13520
|
+
const _observers = new WeakMap();
|
|
13521
|
+
|
|
13522
|
+
/**
|
|
13523
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
13524
|
+
* Structure: {
|
|
13525
|
+
* host: {
|
|
13526
|
+
* matchers: Set<Function>,
|
|
13527
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
13528
|
+
* }
|
|
13529
|
+
* }
|
|
13530
|
+
*/
|
|
13531
|
+
const _transportConfig = new WeakMap();
|
|
13532
|
+
|
|
13533
|
+
/**
|
|
13534
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
13535
|
+
*
|
|
13536
|
+
* @param {Object} params - The parameters for the function.
|
|
13537
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
13538
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13539
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
13540
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
13541
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
13542
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
13543
|
+
*/
|
|
13544
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
13545
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
13546
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
13547
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
13548
|
+
}
|
|
13549
|
+
|
|
13550
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
13551
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
13552
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
13553
|
+
}
|
|
13554
|
+
|
|
13555
|
+
// Guard Clause: Ensure match is a function
|
|
13556
|
+
if (typeof match !== 'function') {
|
|
13557
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
13558
|
+
}
|
|
13559
|
+
|
|
13560
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
13561
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
13562
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
13563
|
+
}
|
|
13564
|
+
|
|
13565
|
+
// Register this transport and get cleanup function
|
|
13566
|
+
return _registerTransport({
|
|
13567
|
+
host,
|
|
13568
|
+
target,
|
|
13569
|
+
matcher: match,
|
|
13570
|
+
removeOriginal
|
|
13571
|
+
});
|
|
13572
|
+
};
|
|
13573
|
+
|
|
13574
|
+
/**
|
|
13575
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
13576
|
+
*
|
|
13577
|
+
* @param {Object} params - The parameters object.
|
|
13578
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
13579
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
13580
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
13581
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
13582
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
13583
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
13584
|
+
* @private
|
|
13585
|
+
*/
|
|
13586
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13587
|
+
// Initialize config for this host if it doesn't exist
|
|
13588
|
+
if (!_transportConfig.has(host)) {
|
|
13589
|
+
_transportConfig.set(host, {
|
|
13590
|
+
matchers: new Set(),
|
|
13591
|
+
targets: new Map()
|
|
13592
|
+
});
|
|
13593
|
+
}
|
|
13594
|
+
|
|
13595
|
+
const config = _transportConfig.get(host);
|
|
13596
|
+
|
|
13597
|
+
// Add the matcher to the set of matchers for this host
|
|
13598
|
+
config.matchers.add(matcher);
|
|
13599
|
+
|
|
13600
|
+
// Initialize target entry if it doesn't exist
|
|
13601
|
+
if (!config.targets.has(target)) {
|
|
13602
|
+
config.targets.set(target, new Map());
|
|
13603
|
+
}
|
|
13604
|
+
|
|
13605
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
13606
|
+
config.targets.get(target).set(matcher, {
|
|
13607
|
+
removeOriginal,
|
|
13608
|
+
currentAttributes: new Map()
|
|
13609
|
+
});
|
|
13610
|
+
|
|
13611
|
+
// Perform initial attribute transport
|
|
13612
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
13613
|
+
|
|
13614
|
+
// Attach observer
|
|
13615
|
+
_attachObserver(host);
|
|
13616
|
+
|
|
13617
|
+
// Return cleanup function and utility functions
|
|
13618
|
+
return {
|
|
13619
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
13620
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
13621
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
13622
|
+
}
|
|
13623
|
+
};
|
|
13624
|
+
|
|
13625
|
+
/**
|
|
13626
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
13627
|
+
*
|
|
13628
|
+
* @param {HTMLElement} host - The host element
|
|
13629
|
+
* @param {HTMLElement} target - The target element
|
|
13630
|
+
* @param {Function} matcher - The matcher function
|
|
13631
|
+
* @private
|
|
13632
|
+
*/
|
|
13633
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
13634
|
+
const config = _transportConfig.get(host);
|
|
13635
|
+
if (!config) return;
|
|
13636
|
+
|
|
13637
|
+
// Remove this matcher from this target
|
|
13638
|
+
const targetMatchers = config.targets.get(target);
|
|
13639
|
+
if (targetMatchers) {
|
|
13640
|
+
targetMatchers.delete(matcher);
|
|
13641
|
+
|
|
13642
|
+
// If this target has no more matchers, remove it
|
|
13643
|
+
if (targetMatchers.size === 0) {
|
|
13644
|
+
config.targets.delete(target);
|
|
13645
|
+
}
|
|
13646
|
+
}
|
|
13647
|
+
|
|
13648
|
+
// Check if this matcher is still used by any target
|
|
13649
|
+
let matcherStillUsed = false;
|
|
13650
|
+
for (const matcherMap of config.targets.values()) {
|
|
13651
|
+
if (matcherMap.has(matcher)) {
|
|
13652
|
+
matcherStillUsed = true;
|
|
13653
|
+
break;
|
|
13654
|
+
}
|
|
13655
|
+
}
|
|
13656
|
+
|
|
13657
|
+
// If not used anymore, remove from matchers set
|
|
13658
|
+
if (!matcherStillUsed) {
|
|
13659
|
+
config.matchers.delete(matcher);
|
|
13660
|
+
}
|
|
13661
|
+
|
|
13662
|
+
// If no more targets or matchers, detach observer
|
|
13663
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
13664
|
+
_detachObserver(host);
|
|
13665
|
+
}
|
|
13666
|
+
};
|
|
13667
|
+
|
|
13668
|
+
/**
|
|
13669
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
13670
|
+
*
|
|
13671
|
+
* @param {Object} params - The parameters object.
|
|
13672
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
13673
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
13674
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
13675
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
13676
|
+
* @returns {void}
|
|
13677
|
+
* @private
|
|
13678
|
+
*/
|
|
13679
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
13680
|
+
// Get a list of all matching attributes on the host element and their values
|
|
13681
|
+
const matchingAttributes = host.getAttributeNames()
|
|
13682
|
+
.filter(attr => matcher(attr))
|
|
13683
|
+
.reduce((acc, attr) => {
|
|
13684
|
+
acc[attr] = host.getAttribute(attr);
|
|
13685
|
+
return acc;
|
|
13686
|
+
}, {});
|
|
13687
|
+
|
|
13688
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
13689
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
13690
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
13691
|
+
target.setAttribute(key, value);
|
|
13692
|
+
if (removeOriginal) {
|
|
13693
|
+
host.removeAttribute(key);
|
|
13694
|
+
}
|
|
13695
|
+
});
|
|
13696
|
+
};
|
|
13697
|
+
|
|
13698
|
+
/**
|
|
13699
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
13700
|
+
*
|
|
13701
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
13702
|
+
* @returns {MutationObserver} The observer instance.
|
|
13703
|
+
* @private
|
|
13704
|
+
*/
|
|
13705
|
+
const _attachObserver = (host) => {
|
|
13706
|
+
// If an observer for this host already exists, return it
|
|
13707
|
+
if (_observers.has(host)) {
|
|
13708
|
+
return _observers.get(host);
|
|
13709
|
+
}
|
|
13710
|
+
|
|
13711
|
+
// Create a new MutationObserver
|
|
13712
|
+
const observer = new MutationObserver((mutations) => {
|
|
13713
|
+
const config = _transportConfig.get(host);
|
|
13714
|
+
if (!config) return;
|
|
13715
|
+
|
|
13716
|
+
// For each mutation affecting attributes
|
|
13717
|
+
mutations
|
|
13718
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
13719
|
+
.forEach(mutation => {
|
|
13720
|
+
const attributeName = mutation.attributeName;
|
|
13721
|
+
|
|
13722
|
+
// Find matchers that care about this attribute
|
|
13723
|
+
for (const matcher of config.matchers) {
|
|
13724
|
+
if (matcher(attributeName)) {
|
|
13725
|
+
// For each target that uses this matcher
|
|
13726
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
13727
|
+
if (matcherConfigs.has(matcher)) {
|
|
13728
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
13729
|
+
_transportAttributes({
|
|
13730
|
+
host,
|
|
13731
|
+
target,
|
|
13732
|
+
matcher,
|
|
13733
|
+
removeOriginal
|
|
13734
|
+
});
|
|
13735
|
+
}
|
|
13736
|
+
}
|
|
13737
|
+
}
|
|
13738
|
+
}
|
|
13739
|
+
});
|
|
13740
|
+
});
|
|
13741
|
+
|
|
13742
|
+
// Start observing attribute changes
|
|
13743
|
+
observer.observe(host, { attributes: true });
|
|
13744
|
+
|
|
13745
|
+
// Store the observer
|
|
13746
|
+
_observers.set(host, observer);
|
|
13747
|
+
|
|
13748
|
+
return observer;
|
|
13749
|
+
};
|
|
13750
|
+
|
|
13751
|
+
/**
|
|
13752
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
13753
|
+
*
|
|
13754
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
13755
|
+
* @private
|
|
13756
|
+
*/
|
|
13757
|
+
const _detachObserver = (host) => {
|
|
13758
|
+
if (_observers.has(host)) {
|
|
13759
|
+
const observer = _observers.get(host);
|
|
13760
|
+
observer.disconnect();
|
|
13761
|
+
_observers.delete(host);
|
|
13762
|
+
}
|
|
13763
|
+
|
|
13764
|
+
// Clean up the transport config as well
|
|
13765
|
+
if (_transportConfig.has(host)) {
|
|
13766
|
+
_transportConfig.delete(host);
|
|
13767
|
+
}
|
|
13768
|
+
};
|
|
13769
|
+
|
|
13770
|
+
/**
|
|
13771
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
13772
|
+
* @param {HTMLElement} host - The host element
|
|
13773
|
+
* @param {HTMLElement} target - The target element
|
|
13774
|
+
* @param {Function} matcher - The matcher function
|
|
13775
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
13776
|
+
* @private
|
|
13777
|
+
*/
|
|
13778
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
13779
|
+
const config = _transportConfig.get(host);
|
|
13780
|
+
if (!config) return undefined;
|
|
13781
|
+
|
|
13782
|
+
const targetMatchers = config.targets.get(target);
|
|
13783
|
+
if (!targetMatchers) return undefined;
|
|
13784
|
+
|
|
13785
|
+
return targetMatchers.get(matcher);
|
|
13786
|
+
};
|
|
13787
|
+
|
|
13788
|
+
/**
|
|
13789
|
+
* Sets an observed attribute value
|
|
13790
|
+
* @param {HTMLElement} host - The host element
|
|
13791
|
+
* @param {HTMLElement} target - The target element
|
|
13792
|
+
* @param {Function} matcher - The matcher function
|
|
13793
|
+
* @param {string} key - The attribute name
|
|
13794
|
+
* @param {string} value - The attribute value
|
|
13795
|
+
* @private
|
|
13796
|
+
*/
|
|
13797
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
13798
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13799
|
+
if (matcherConfig) {
|
|
13800
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
13801
|
+
}
|
|
13802
|
+
};
|
|
13803
|
+
|
|
13804
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
13805
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13806
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13807
|
+
return undefined;
|
|
13808
|
+
};
|
|
13809
|
+
|
|
13810
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
13811
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
13812
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13813
|
+
return [];
|
|
13814
|
+
};
|
|
13815
|
+
|
|
13816
|
+
const _matchers = {
|
|
13817
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13818
|
+
'role': attr => attr.match(/^role$/)
|
|
13819
|
+
};
|
|
13820
|
+
|
|
13821
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
13822
|
+
return transportAttributes({
|
|
13823
|
+
host,
|
|
13824
|
+
target,
|
|
13825
|
+
match: attr => {
|
|
13826
|
+
for (const key in _matchers) {
|
|
13827
|
+
if (_matchers[key](attr)) return true;
|
|
13828
|
+
}
|
|
13829
|
+
return false;
|
|
13830
|
+
},
|
|
13831
|
+
removeOriginal
|
|
13832
|
+
});
|
|
13833
|
+
};
|
|
13834
|
+
|
|
13835
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
13836
|
+
|
|
13837
|
+
/**
|
|
13838
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13839
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13840
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13841
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
13842
|
+
* @private
|
|
13843
|
+
*/
|
|
13844
|
+
attributeWatcher;
|
|
13845
|
+
|
|
13846
|
+
static get properties() {
|
|
13847
|
+
return {
|
|
13848
|
+
|
|
13849
|
+
/**
|
|
13850
|
+
* Defines the layout of an element.
|
|
13851
|
+
* @default {'default'}
|
|
13852
|
+
*/
|
|
13853
|
+
layout: {
|
|
13854
|
+
type: String,
|
|
13855
|
+
attribute: "layout",
|
|
13856
|
+
reflect: true
|
|
13857
|
+
},
|
|
13858
|
+
|
|
13859
|
+
/**
|
|
13860
|
+
* Defines the shape of an element.
|
|
13861
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13862
|
+
* @default {'default'}
|
|
13863
|
+
*/
|
|
13864
|
+
shape: {
|
|
13865
|
+
type: String,
|
|
13866
|
+
attribute: "shape",
|
|
13867
|
+
reflect: true
|
|
13868
|
+
},
|
|
13869
|
+
|
|
13870
|
+
/**
|
|
13871
|
+
* Defines the size of an element.
|
|
13872
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13873
|
+
* @default {'md'}
|
|
13874
|
+
*/
|
|
13875
|
+
size: {
|
|
13876
|
+
type: String,
|
|
13877
|
+
attribute: "size",
|
|
13878
|
+
reflect: true
|
|
13879
|
+
},
|
|
13880
|
+
|
|
13881
|
+
/**
|
|
13882
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13883
|
+
* @default {false}
|
|
13884
|
+
*/
|
|
13885
|
+
onDark: {
|
|
13886
|
+
type: Boolean,
|
|
13887
|
+
attribute: "ondark",
|
|
13888
|
+
reflect: true
|
|
13889
|
+
},
|
|
13890
|
+
|
|
13891
|
+
/**
|
|
13892
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13893
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13894
|
+
* @type {HTMLElement|null}
|
|
13895
|
+
* @default {null}
|
|
13896
|
+
* @private
|
|
13897
|
+
*/
|
|
13898
|
+
wrapper: {
|
|
13899
|
+
type: HTMLElement,
|
|
13900
|
+
attribute: false,
|
|
13901
|
+
reflect: false
|
|
13902
|
+
}
|
|
13903
|
+
};
|
|
13904
|
+
}
|
|
13905
|
+
|
|
13906
|
+
|
|
13907
|
+
|
|
13908
|
+
resetShapeClasses() {
|
|
13909
|
+
if (this.shape && this.size) {
|
|
13910
|
+
|
|
13911
|
+
if (this.wrapper) {
|
|
13912
|
+
this.wrapper.classList.forEach((className) => {
|
|
13913
|
+
if (className.startsWith('shape-')) {
|
|
13914
|
+
this.wrapper.classList.remove(className);
|
|
13915
|
+
}
|
|
13916
|
+
});
|
|
13917
|
+
|
|
13918
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13919
|
+
}
|
|
13920
|
+
}
|
|
13921
|
+
}
|
|
13922
|
+
|
|
13923
|
+
resetLayoutClasses() {
|
|
13924
|
+
if (this.layout) {
|
|
13925
|
+
if (this.wrapper) {
|
|
13926
|
+
this.wrapper.classList.forEach((className) => {
|
|
13927
|
+
if (className.startsWith('layout-')) {
|
|
13928
|
+
this.wrapper.classList.remove(className);
|
|
13929
|
+
}
|
|
13930
|
+
});
|
|
13931
|
+
|
|
13932
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13933
|
+
}
|
|
13934
|
+
}
|
|
13935
|
+
}
|
|
13936
|
+
|
|
13937
|
+
updateComponentArchitecture() {
|
|
13938
|
+
this.resetLayoutClasses();
|
|
13939
|
+
this.resetShapeClasses();
|
|
13940
|
+
}
|
|
13941
|
+
|
|
13942
|
+
updated(changedProperties) {
|
|
13943
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13944
|
+
this.updateComponentArchitecture();
|
|
13945
|
+
}
|
|
13946
|
+
}
|
|
13947
|
+
|
|
13948
|
+
firstUpdated() {
|
|
13949
|
+
super.firstUpdated();
|
|
13950
|
+
|
|
13951
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13952
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13953
|
+
|
|
13954
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13955
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13956
|
+
}
|
|
13957
|
+
|
|
13958
|
+
disconnectedCallback() {
|
|
13959
|
+
super.disconnectedCallback();
|
|
13960
|
+
|
|
13961
|
+
// Cleanup the ARIA observer if it exists
|
|
13962
|
+
if (this.attributeWatcher) {
|
|
13963
|
+
this.attributeWatcher.cleanup();
|
|
13964
|
+
this.attributeWatcher = null;
|
|
13965
|
+
}
|
|
13966
|
+
}
|
|
13967
|
+
|
|
13968
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13969
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13970
|
+
render() {
|
|
13971
|
+
try {
|
|
13972
|
+
return this.renderLayout();
|
|
13973
|
+
} catch (error) {
|
|
13974
|
+
// failed to get the defined layout
|
|
13975
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
13976
|
+
|
|
13977
|
+
// fallback to the default layout
|
|
13978
|
+
return this.getLayout('default');
|
|
13979
|
+
}
|
|
13980
|
+
}
|
|
13981
|
+
};
|
|
13982
|
+
|
|
13983
|
+
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}`;
|
|
13984
|
+
|
|
13985
|
+
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)}`;
|
|
13986
|
+
|
|
13987
|
+
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}`;
|
|
13988
|
+
|
|
13989
|
+
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}`;
|
|
13990
|
+
|
|
13991
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13992
|
+
// See LICENSE in the project root for license information.
|
|
13993
|
+
|
|
13994
|
+
// ---------------------------------------------------------------------
|
|
13995
|
+
|
|
13996
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13997
|
+
|
|
13998
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13999
|
+
|
|
14000
|
+
/* eslint-disable jsdoc/require-param */
|
|
14001
|
+
|
|
14002
|
+
/**
|
|
14003
|
+
* This will register a new custom element with the browser.
|
|
14004
|
+
* @param {String} name - The name of the custom element.
|
|
14005
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
14006
|
+
* @returns {void}
|
|
14007
|
+
*/
|
|
14008
|
+
registerComponent(name, componentClass) {
|
|
14009
|
+
if (!customElements.get(name)) {
|
|
14010
|
+
customElements.define(name, class extends componentClass {});
|
|
14011
|
+
}
|
|
14012
|
+
}
|
|
14013
|
+
|
|
14014
|
+
/**
|
|
14015
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
14016
|
+
* @returns {void}
|
|
14017
|
+
*/
|
|
14018
|
+
closestElement(
|
|
14019
|
+
selector, // selector like in .closest()
|
|
14020
|
+
base = this, // extra functionality to skip a parent
|
|
14021
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
14022
|
+
!el || el === document || el === window
|
|
14023
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
14024
|
+
: found
|
|
14025
|
+
? found // found a selector INside this element
|
|
14026
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
14027
|
+
) {
|
|
14028
|
+
return __Closest(base);
|
|
14029
|
+
}
|
|
14030
|
+
/* eslint-enable jsdoc/require-param */
|
|
14031
|
+
|
|
14032
|
+
/**
|
|
14033
|
+
* 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.
|
|
14034
|
+
* @param {Object} elem - The element to check.
|
|
14035
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
14036
|
+
* @returns {void}
|
|
14037
|
+
*/
|
|
14038
|
+
handleComponentTagRename(elem, tagName) {
|
|
14039
|
+
const tag = tagName.toLowerCase();
|
|
14040
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
14041
|
+
|
|
14042
|
+
if (elemTag !== tag) {
|
|
14043
|
+
elem.setAttribute(tag, true);
|
|
14044
|
+
}
|
|
14045
|
+
}
|
|
14046
|
+
|
|
14047
|
+
/**
|
|
14048
|
+
* Validates if an element is a specific Auro component.
|
|
14049
|
+
* @param {Object} elem - The element to validate.
|
|
14050
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
14051
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
14052
|
+
*/
|
|
14053
|
+
elementMatch(elem, tagName) {
|
|
14054
|
+
const tag = tagName.toLowerCase();
|
|
14055
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
14056
|
+
|
|
14057
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
14058
|
+
}
|
|
14059
|
+
};
|
|
14060
|
+
|
|
14061
|
+
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}}`;
|
|
14062
|
+
|
|
14063
|
+
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}`;
|
|
14064
|
+
|
|
14065
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
14066
|
+
|
|
14067
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
14068
|
+
// See LICENSE in the project root for license information.
|
|
14069
|
+
|
|
14070
|
+
|
|
14071
|
+
class AuroLoader extends i$2 {
|
|
14072
|
+
constructor() {
|
|
14073
|
+
super();
|
|
14074
|
+
|
|
14075
|
+
/**
|
|
14076
|
+
* @private
|
|
14077
|
+
*/
|
|
14078
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
14079
|
+
|
|
14080
|
+
/**
|
|
14081
|
+
* @private
|
|
14082
|
+
*/
|
|
14083
|
+
this.mdCount = 3;
|
|
14084
|
+
|
|
14085
|
+
/**
|
|
14086
|
+
* @private
|
|
14087
|
+
*/
|
|
14088
|
+
this.smCount = 2;
|
|
14089
|
+
|
|
14090
|
+
/**
|
|
14091
|
+
* @private
|
|
14092
|
+
*/
|
|
14093
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
14094
|
+
|
|
14095
|
+
this.orbit = false;
|
|
14096
|
+
this.ringworm = false;
|
|
14097
|
+
this.laser = false;
|
|
14098
|
+
this.pulse = false;
|
|
14099
|
+
}
|
|
14100
|
+
|
|
14101
|
+
// function to define props used within the scope of this component
|
|
14102
|
+
static get properties() {
|
|
14103
|
+
return {
|
|
14104
|
+
|
|
14105
|
+
/**
|
|
14106
|
+
* Sets loader to laser type.
|
|
14107
|
+
*/
|
|
14108
|
+
laser: {
|
|
14109
|
+
type: Boolean,
|
|
14110
|
+
reflect: true
|
|
14111
|
+
},
|
|
14112
|
+
|
|
14113
|
+
/**
|
|
14114
|
+
* Sets loader to orbit type.
|
|
14115
|
+
*/
|
|
14116
|
+
orbit: {
|
|
14117
|
+
type: Boolean,
|
|
14118
|
+
reflect: true
|
|
14119
|
+
},
|
|
14120
|
+
|
|
14121
|
+
/**
|
|
14122
|
+
* Sets loader to pulse type.
|
|
14123
|
+
*/
|
|
14124
|
+
pulse: {
|
|
14125
|
+
type: Boolean,
|
|
14126
|
+
reflect: true
|
|
14127
|
+
},
|
|
14128
|
+
|
|
14129
|
+
/**
|
|
14130
|
+
* Sets loader to ringworm type.
|
|
14131
|
+
*/
|
|
14132
|
+
ringworm: {
|
|
14133
|
+
type: Boolean,
|
|
14134
|
+
reflect: true
|
|
14135
|
+
}
|
|
14136
|
+
};
|
|
14137
|
+
}
|
|
14138
|
+
|
|
14139
|
+
static get styles() {
|
|
14140
|
+
return [
|
|
14141
|
+
i$5`${styleCss$2$1}`,
|
|
14142
|
+
i$5`${colorCss$1$1}`,
|
|
14143
|
+
i$5`${tokensCss$1$1}`
|
|
14144
|
+
];
|
|
14145
|
+
}
|
|
14146
|
+
|
|
14147
|
+
/**
|
|
14148
|
+
* This will register this element with the browser.
|
|
14149
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
14150
|
+
*
|
|
14151
|
+
* @example
|
|
14152
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
14153
|
+
*
|
|
14154
|
+
*/
|
|
14155
|
+
static register(name = "auro-loader") {
|
|
14156
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
14157
|
+
}
|
|
14158
|
+
|
|
14159
|
+
firstUpdated() {
|
|
14160
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
14161
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
14162
|
+
}
|
|
14163
|
+
|
|
14164
|
+
connectedCallback() {
|
|
14165
|
+
super.connectedCallback();
|
|
14166
|
+
}
|
|
14167
|
+
|
|
14168
|
+
/**
|
|
14169
|
+
* @private
|
|
14170
|
+
* @returns {Array} Numbered array for template map.
|
|
14171
|
+
*/
|
|
14172
|
+
defineTemplate() {
|
|
14173
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
14174
|
+
|
|
14175
|
+
if (this.orbit || this.laser) {
|
|
14176
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
14177
|
+
} else if (this.ringworm) {
|
|
14178
|
+
nodes = Array.from(Array(0).keys());
|
|
14179
|
+
}
|
|
14180
|
+
|
|
14181
|
+
return nodes;
|
|
14182
|
+
}
|
|
14183
|
+
|
|
14184
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
14185
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
14186
|
+
|
|
14187
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
14188
|
+
render() {
|
|
14189
|
+
return x`
|
|
14190
|
+
${this.defineTemplate().map((idx) => x`
|
|
14191
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
14192
|
+
`)}
|
|
14193
|
+
|
|
14194
|
+
<div class="no-animation">Loading...</div>
|
|
14195
|
+
|
|
14196
|
+
${this.ringworm ? x`
|
|
14197
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
14198
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
14199
|
+
</svg>`
|
|
14200
|
+
: ``
|
|
14201
|
+
}
|
|
14202
|
+
`;
|
|
14203
|
+
}
|
|
14204
|
+
}
|
|
14205
|
+
|
|
14206
|
+
var loaderVersion = '5.0.0';
|
|
14207
|
+
|
|
14208
|
+
/* eslint-disable max-lines, curly */
|
|
14209
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
14210
|
+
// See LICENSE in the project root for license information.
|
|
14211
|
+
|
|
14212
|
+
|
|
14213
|
+
/**
|
|
14214
|
+
* @slot - Default slot for the text of the button.
|
|
14215
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
14216
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
14217
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
14218
|
+
* @csspart text - Apply CSS to text slot.
|
|
14219
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
14220
|
+
*/
|
|
14221
|
+
|
|
14222
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
14223
|
+
|
|
14224
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
14225
|
+
|
|
14226
|
+
/**
|
|
14227
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
14228
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
14229
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
14230
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
14231
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
14232
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
14233
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
14234
|
+
*/
|
|
14235
|
+
class AuroButton extends AuroElement$1$1 {
|
|
14236
|
+
|
|
14237
|
+
/**
|
|
14238
|
+
* Enables form association for this element.
|
|
14239
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
14240
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
14241
|
+
*/
|
|
14242
|
+
static get formAssociated() {
|
|
14243
|
+
return true;
|
|
14244
|
+
}
|
|
14245
|
+
|
|
14246
|
+
constructor() {
|
|
14247
|
+
super();
|
|
14248
|
+
this.autofocus = false;
|
|
14249
|
+
this.disabled = false;
|
|
14250
|
+
this.loading = false;
|
|
14251
|
+
this.size = "md";
|
|
14252
|
+
this.shape = "rounded";
|
|
14253
|
+
this.onDark = false;
|
|
14254
|
+
this.fluid = false;
|
|
14255
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
14256
|
+
|
|
14257
|
+
// Support for HTML5 forms
|
|
14258
|
+
if (typeof this.attachInternals === 'function') {
|
|
14259
|
+
this.internals = this.attachInternals();
|
|
14260
|
+
} else {
|
|
14261
|
+
this.internals = null;
|
|
14262
|
+
|
|
14263
|
+
// eslint-disable-next-line no-console
|
|
14264
|
+
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.');
|
|
14265
|
+
}
|
|
14266
|
+
|
|
14267
|
+
/**
|
|
14268
|
+
* Generate unique names for dependency components.
|
|
14269
|
+
*/
|
|
14270
|
+
const versioning = new AuroDependencyVersioning();
|
|
14271
|
+
|
|
14272
|
+
/**
|
|
14273
|
+
* @private
|
|
14274
|
+
*/
|
|
14275
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
14276
|
+
}
|
|
14277
|
+
|
|
14278
|
+
static get styles() {
|
|
14279
|
+
return [
|
|
14280
|
+
tokensCss$2$1,
|
|
14281
|
+
styleCss$3$1,
|
|
14282
|
+
colorCss$2$1,
|
|
14283
|
+
shapeSize
|
|
14284
|
+
];
|
|
14285
|
+
}
|
|
14286
|
+
|
|
14287
|
+
static get properties() {
|
|
14288
|
+
return {
|
|
14289
|
+
|
|
14290
|
+
...super.properties,
|
|
14291
|
+
|
|
14292
|
+
/**
|
|
14293
|
+
* Override layout since it isn't used in this component.
|
|
14294
|
+
* @private
|
|
14295
|
+
*/
|
|
14296
|
+
layout: {
|
|
14297
|
+
type: Boolean,
|
|
14298
|
+
attribute: false,
|
|
14299
|
+
reflect: false
|
|
14300
|
+
},
|
|
14301
|
+
|
|
14302
|
+
/**
|
|
14303
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
14304
|
+
*/
|
|
14305
|
+
autofocus: {
|
|
14306
|
+
type: Boolean,
|
|
14307
|
+
reflect: true
|
|
14308
|
+
},
|
|
14309
|
+
|
|
14310
|
+
/**
|
|
14311
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
14312
|
+
*/
|
|
14313
|
+
disabled: {
|
|
14314
|
+
type: Boolean,
|
|
14315
|
+
reflect: true
|
|
14316
|
+
},
|
|
14317
|
+
|
|
14318
|
+
/**
|
|
14319
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
14320
|
+
*/
|
|
14321
|
+
fluid: {
|
|
14322
|
+
type: Boolean,
|
|
14323
|
+
reflect: true
|
|
14324
|
+
},
|
|
14325
|
+
|
|
14326
|
+
/**
|
|
14327
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
14328
|
+
*/
|
|
14329
|
+
loading: {
|
|
14330
|
+
type: Boolean,
|
|
14331
|
+
reflect: true
|
|
14332
|
+
},
|
|
14333
|
+
|
|
14334
|
+
/**
|
|
14335
|
+
* 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.
|
|
14336
|
+
*/
|
|
14337
|
+
loadingText: {
|
|
14338
|
+
type: String
|
|
14339
|
+
},
|
|
14340
|
+
|
|
14341
|
+
/**
|
|
14342
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
14343
|
+
*/
|
|
14344
|
+
tIndex: {
|
|
14345
|
+
type: String,
|
|
14346
|
+
reflect: true
|
|
14347
|
+
},
|
|
14348
|
+
|
|
14349
|
+
/**
|
|
14350
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
14351
|
+
*/
|
|
14352
|
+
title: {
|
|
14353
|
+
type: String,
|
|
14354
|
+
reflect: true
|
|
14355
|
+
},
|
|
14356
|
+
|
|
14357
|
+
/**
|
|
14358
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
14359
|
+
*/
|
|
14360
|
+
type: {
|
|
14361
|
+
type: String,
|
|
14362
|
+
reflect: true
|
|
14363
|
+
},
|
|
14364
|
+
|
|
14365
|
+
/**
|
|
14366
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
14367
|
+
*/
|
|
14368
|
+
value: {
|
|
14369
|
+
type: String,
|
|
14370
|
+
reflect: true
|
|
14371
|
+
},
|
|
14372
|
+
|
|
14373
|
+
/**
|
|
14374
|
+
* Sets button variant option.
|
|
14375
|
+
* @default primary
|
|
14376
|
+
*/
|
|
14377
|
+
variant: {
|
|
14378
|
+
type: String,
|
|
14379
|
+
reflect: true
|
|
14380
|
+
},
|
|
14381
|
+
};
|
|
14382
|
+
}
|
|
14383
|
+
|
|
14384
|
+
/**
|
|
14385
|
+
* This will register this element with the browser.
|
|
14386
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
14387
|
+
*
|
|
14388
|
+
* @example
|
|
14389
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
14390
|
+
*
|
|
12973
14391
|
*/
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
<div
|
|
12977
|
-
@click="${this.handleClick}"
|
|
12978
|
-
class="${e(this.commonWrapperClasses)}"
|
|
12979
|
-
part="wrapper">
|
|
12980
|
-
<div class="accents left ${this.commonAccentClasses}">
|
|
12981
|
-
${this.layout.includes('left') ? u$2`
|
|
12982
|
-
${this.renderValidationErrorIconHtml()}
|
|
12983
|
-
` : undefined}
|
|
12984
|
-
</div>
|
|
12985
|
-
<div class="mainContent">
|
|
12986
|
-
${this.renderHtmlInput()}
|
|
12987
|
-
</div>
|
|
12988
|
-
<div class="accents right ${this.commonAccentClasses}">
|
|
12989
|
-
${this.layout.includes('right') || this.layout === "emphasized" ? u$2`
|
|
12990
|
-
${this.renderValidationErrorIconHtml()}
|
|
12991
|
-
` : undefined}
|
|
12992
|
-
${this.hasValue ? u$2`
|
|
12993
|
-
${!this.disabled && !this.readonly ? u$2`
|
|
12994
|
-
${this.renderHtmlActionClear()}
|
|
12995
|
-
` : undefined}
|
|
12996
|
-
` : undefined}
|
|
12997
|
-
</div>
|
|
12998
|
-
</div>
|
|
12999
|
-
<div class="${e(this.helpTextClasses)}" part="inputHelpText">
|
|
13000
|
-
${this.renderHtmlHelpText()}
|
|
13001
|
-
</div>
|
|
13002
|
-
`;
|
|
14392
|
+
static register(name = "auro-button") {
|
|
14393
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
13003
14394
|
}
|
|
13004
14395
|
|
|
13005
14396
|
/**
|
|
13006
|
-
*
|
|
14397
|
+
* Internal method to apply focus to the HTML5 button.
|
|
13007
14398
|
* @private
|
|
13008
|
-
* @returns {
|
|
14399
|
+
* @returns {void}
|
|
13009
14400
|
*/
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
<div
|
|
13013
|
-
@click="${this.handleClick}"
|
|
13014
|
-
class="${e(this.commonWrapperClasses)}"
|
|
13015
|
-
part="wrapper">
|
|
13016
|
-
<div class="accents left">
|
|
13017
|
-
${this.renderHtmlTypeIcon()}
|
|
13018
|
-
</div>
|
|
13019
|
-
<div class="mainContent">
|
|
13020
|
-
${this.renderHtmlInput()}
|
|
13021
|
-
</div>
|
|
13022
|
-
<div class="accents right">
|
|
13023
|
-
${this.renderValidationErrorIconHtml()}
|
|
13024
|
-
${this.hasValue ? u$2`
|
|
13025
|
-
${!this.disabled && !this.readonly ? u$2`
|
|
13026
|
-
${this.renderHtmlActionClear()}
|
|
13027
|
-
` : undefined}
|
|
13028
|
-
` : undefined}
|
|
13029
|
-
</div>
|
|
13030
|
-
</div>
|
|
13031
|
-
<div class="helpTextWrapper leftIndent rightIndent" part="inputHelpText">
|
|
13032
|
-
${this.renderHtmlHelpText()}
|
|
13033
|
-
</div>
|
|
13034
|
-
`;
|
|
14401
|
+
focus() {
|
|
14402
|
+
this.renderRoot.querySelector('button').focus();
|
|
13035
14403
|
}
|
|
13036
14404
|
|
|
13037
14405
|
/**
|
|
13038
|
-
*
|
|
14406
|
+
* Submits the form that this button is associated with.
|
|
13039
14407
|
* @private
|
|
13040
|
-
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
13041
14408
|
* @returns {void}
|
|
13042
14409
|
*/
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
switch (layout) {
|
|
13047
|
-
case 'emphasized':
|
|
13048
|
-
return this.renderLayoutEmphasized();
|
|
13049
|
-
case 'emphasized-left':
|
|
13050
|
-
return this.renderLayoutEmphasized();
|
|
13051
|
-
case 'emphasized-right':
|
|
13052
|
-
return this.renderLayoutEmphasized();
|
|
13053
|
-
case 'snowflake':
|
|
13054
|
-
return this.renderLayoutSnowflake();
|
|
13055
|
-
case 'snowflake-left':
|
|
13056
|
-
return this.renderLayoutSnowflake();
|
|
13057
|
-
case 'snowflake-right':
|
|
13058
|
-
return this.renderLayoutSnowflake();
|
|
13059
|
-
default:
|
|
13060
|
-
return this.renderLayoutClassic();
|
|
14410
|
+
surfaceSubmitEvent() {
|
|
14411
|
+
if (this.form) {
|
|
14412
|
+
this.form.requestSubmit();
|
|
13061
14413
|
}
|
|
13062
14414
|
}
|
|
13063
|
-
}
|
|
13064
|
-
|
|
13065
|
-
var inputVersion = '4.2.0';
|
|
13066
|
-
|
|
13067
|
-
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)}`;
|
|
13068
|
-
|
|
13069
|
-
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)}`;
|
|
13070
|
-
|
|
13071
|
-
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)}`;
|
|
13072
|
-
|
|
13073
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13074
|
-
// See LICENSE in the project root for license information.
|
|
13075
|
-
|
|
13076
|
-
// ---------------------------------------------------------------------
|
|
13077
|
-
|
|
13078
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13079
|
-
|
|
13080
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
13081
|
-
|
|
13082
|
-
/* eslint-disable jsdoc/require-param */
|
|
13083
14415
|
|
|
13084
14416
|
/**
|
|
13085
|
-
*
|
|
13086
|
-
* @
|
|
13087
|
-
* @
|
|
13088
|
-
* @returns {void}
|
|
14417
|
+
* Returns the form element that this button is associated with.
|
|
14418
|
+
* @private
|
|
14419
|
+
* @returns {HTMLFormElement | null}
|
|
13089
14420
|
*/
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
customElements.define(name, class extends componentClass {});
|
|
13093
|
-
}
|
|
14421
|
+
get form() {
|
|
14422
|
+
return this.internals ? this.internals.form : null;
|
|
13094
14423
|
}
|
|
13095
14424
|
|
|
13096
14425
|
/**
|
|
13097
|
-
*
|
|
13098
|
-
* @returns {
|
|
14426
|
+
* @private
|
|
14427
|
+
* @returns {Boolean}
|
|
13099
14428
|
*/
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
base = this, // extra functionality to skip a parent
|
|
13103
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
13104
|
-
!el || el === document || el === window
|
|
13105
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
13106
|
-
: found
|
|
13107
|
-
? found // found a selector INside this element
|
|
13108
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
13109
|
-
) {
|
|
13110
|
-
return __Closest(base);
|
|
14429
|
+
get hideText() {
|
|
14430
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
13111
14431
|
}
|
|
13112
|
-
/* eslint-enable jsdoc/require-param */
|
|
13113
14432
|
|
|
13114
14433
|
/**
|
|
13115
|
-
*
|
|
13116
|
-
* @
|
|
13117
|
-
* @
|
|
13118
|
-
* @returns {void}
|
|
14434
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
14435
|
+
* @returns {string | undefined}
|
|
14436
|
+
* @private
|
|
13119
14437
|
*/
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
14438
|
+
get currentAriaLabel() {
|
|
14439
|
+
if (!this.attributeWatcher) return undefined;
|
|
13123
14440
|
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
}
|
|
14441
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
14442
|
+
return ariaLabel || undefined;
|
|
13127
14443
|
}
|
|
13128
14444
|
|
|
13129
14445
|
/**
|
|
13130
|
-
*
|
|
13131
|
-
* @
|
|
13132
|
-
* @
|
|
13133
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
14446
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
14447
|
+
* @returns {string | undefined}
|
|
14448
|
+
* @private
|
|
13134
14449
|
*/
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
14450
|
+
get currentAriaLabelledBy() {
|
|
14451
|
+
if (!this.attributeWatcher) return undefined;
|
|
13138
14452
|
|
|
13139
|
-
|
|
14453
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
14454
|
+
return ariaLabelledBy || undefined;
|
|
13140
14455
|
}
|
|
13141
|
-
};
|
|
13142
|
-
|
|
13143
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13144
|
-
// See LICENSE in the project root for license information.
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
class AuroDependencyVersioning {
|
|
13148
14456
|
|
|
13149
14457
|
/**
|
|
13150
|
-
*
|
|
14458
|
+
* Renders the default layout for the button.
|
|
14459
|
+
* @returns {TemplateResult}
|
|
13151
14460
|
* @private
|
|
13152
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
13153
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
13154
|
-
* @returns {string} - Unique string to be used for naming.
|
|
13155
14461
|
*/
|
|
13156
|
-
|
|
13157
|
-
|
|
14462
|
+
renderLayoutDefault() {
|
|
14463
|
+
const classes = {
|
|
14464
|
+
"util_insetLg--squish": true,
|
|
14465
|
+
"auro-button": true,
|
|
14466
|
+
wrapper: true,
|
|
14467
|
+
loading: this.loading,
|
|
14468
|
+
};
|
|
13158
14469
|
|
|
13159
|
-
|
|
13160
|
-
|
|
14470
|
+
return u$2`
|
|
14471
|
+
<button
|
|
14472
|
+
part="button"
|
|
14473
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
14474
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
14475
|
+
tabIndex="${o(this.tIndex)}"
|
|
14476
|
+
?autofocus="${this.autofocus}"
|
|
14477
|
+
class="${e(classes)}"
|
|
14478
|
+
?disabled="${this.disabled || this.loading}"
|
|
14479
|
+
?onDark="${this.onDark}"
|
|
14480
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
14481
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
14482
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
14483
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
14484
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
14485
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
14486
|
+
>
|
|
14487
|
+
${o(this.loading ? u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
13161
14488
|
|
|
13162
|
-
|
|
14489
|
+
<span class="contentWrapper">
|
|
14490
|
+
<span class="textSlot" part="text">
|
|
14491
|
+
${this.hideText ? undefined : u$2`<slot></slot>`}
|
|
14492
|
+
</span>
|
|
14493
|
+
|
|
14494
|
+
<span part="icon">
|
|
14495
|
+
<slot name="icon"></slot>
|
|
14496
|
+
</span>
|
|
14497
|
+
</span>
|
|
14498
|
+
</button>
|
|
14499
|
+
`;
|
|
13163
14500
|
}
|
|
13164
14501
|
|
|
13165
14502
|
/**
|
|
13166
|
-
*
|
|
13167
|
-
* @
|
|
13168
|
-
* @
|
|
13169
|
-
* @returns {string} - Unique string to be used for naming.
|
|
14503
|
+
* Renders the layout of the button
|
|
14504
|
+
* @returns {TemplateResult}
|
|
14505
|
+
* @private
|
|
13170
14506
|
*/
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
const tag = i$1`${s$1(elementName)}`;
|
|
13174
|
-
|
|
13175
|
-
if (!customElements.get(elementName)) {
|
|
13176
|
-
customElements.define(elementName, class extends tagClass {});
|
|
13177
|
-
}
|
|
13178
|
-
|
|
13179
|
-
return tag;
|
|
14507
|
+
renderLayout() {
|
|
14508
|
+
return this.renderLayoutDefault();
|
|
13180
14509
|
}
|
|
13181
14510
|
}
|
|
13182
14511
|
|
|
14512
|
+
var buttonVersion = '10.0.0';
|
|
14513
|
+
|
|
13183
14514
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
13184
14515
|
// See LICENSE in the project root for license information.
|
|
13185
14516
|
|
|
@@ -13526,8 +14857,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13526
14857
|
async firstUpdated() {
|
|
13527
14858
|
await super.firstUpdated();
|
|
13528
14859
|
|
|
13529
|
-
|
|
13530
|
-
|
|
14860
|
+
/**
|
|
14861
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
14862
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
14863
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
14864
|
+
*/
|
|
14865
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
13531
14866
|
const svgDesc = this.svg.querySelector('desc');
|
|
13532
14867
|
|
|
13533
14868
|
if (svgDesc) {
|
|
@@ -13571,7 +14906,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
13571
14906
|
}
|
|
13572
14907
|
};
|
|
13573
14908
|
|
|
13574
|
-
var iconVersion$1 = '8.0.
|
|
14909
|
+
var iconVersion$1 = '8.0.4';
|
|
13575
14910
|
|
|
13576
14911
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13577
14912
|
// See LICENSE in the project root for license information.
|
|
@@ -13580,7 +14915,7 @@ var iconVersion$1 = '8.0.3';
|
|
|
13580
14915
|
|
|
13581
14916
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
13582
14917
|
|
|
13583
|
-
let AuroLibraryRuntimeUtils$
|
|
14918
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
13584
14919
|
|
|
13585
14920
|
/* eslint-disable jsdoc/require-param */
|
|
13586
14921
|
|
|
@@ -13672,7 +15007,7 @@ class AuroHeader extends i$2 {
|
|
|
13672
15007
|
/**
|
|
13673
15008
|
* @private
|
|
13674
15009
|
*/
|
|
13675
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
15010
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
13676
15011
|
}
|
|
13677
15012
|
|
|
13678
15013
|
// function to define props used within the scope of this component
|
|
@@ -13702,7 +15037,7 @@ class AuroHeader extends i$2 {
|
|
|
13702
15037
|
*
|
|
13703
15038
|
*/
|
|
13704
15039
|
static register(name = "auro-header") {
|
|
13705
|
-
AuroLibraryRuntimeUtils$
|
|
15040
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
13706
15041
|
}
|
|
13707
15042
|
|
|
13708
15043
|
firstUpdated() {
|
|
@@ -13798,17 +15133,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
13798
15133
|
|
|
13799
15134
|
this.large = false;
|
|
13800
15135
|
|
|
13801
|
-
AuroLibraryRuntimeUtils$
|
|
15136
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
13802
15137
|
|
|
13803
15138
|
const versioning = new AuroDependencyVersioning();
|
|
15139
|
+
|
|
15140
|
+
/**
|
|
15141
|
+
* @private
|
|
15142
|
+
*/
|
|
13804
15143
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
15144
|
+
|
|
15145
|
+
/**
|
|
15146
|
+
* @private
|
|
15147
|
+
*/
|
|
13805
15148
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
15149
|
+
|
|
15150
|
+
/**
|
|
15151
|
+
* @private
|
|
15152
|
+
*/
|
|
15153
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
13806
15154
|
}
|
|
13807
15155
|
|
|
13808
15156
|
static get styles() {
|
|
13809
15157
|
return [
|
|
13810
|
-
colorCss$
|
|
13811
|
-
styleCss$
|
|
15158
|
+
colorCss$3$1,
|
|
15159
|
+
styleCss$4$1,
|
|
13812
15160
|
tokenCss
|
|
13813
15161
|
];
|
|
13814
15162
|
}
|
|
@@ -13837,7 +15185,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
13837
15185
|
*
|
|
13838
15186
|
*/
|
|
13839
15187
|
static register(name = "auro-bibtemplate") {
|
|
13840
|
-
AuroLibraryRuntimeUtils$
|
|
15188
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
13841
15189
|
}
|
|
13842
15190
|
|
|
13843
15191
|
/**
|
|
@@ -13895,9 +15243,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
13895
15243
|
<div id="bibTemplate" part="bibtemplate">
|
|
13896
15244
|
${this.isFullscreen ? u$2`
|
|
13897
15245
|
<div id="headerContainer">
|
|
13898
|
-
|
|
15246
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
13899
15247
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
13900
|
-
|
|
15248
|
+
</${this.buttonTag}>
|
|
13901
15249
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
13902
15250
|
<slot name="header"></slot>
|
|
13903
15251
|
</${this.headerTag}>
|
|
@@ -14300,7 +15648,7 @@ class AuroCombobox extends AuroElement$1 {
|
|
|
14300
15648
|
this.noFlip = false;
|
|
14301
15649
|
this.autoPlacement = false;
|
|
14302
15650
|
|
|
14303
|
-
const versioning = new AuroDependencyVersioning$
|
|
15651
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
14304
15652
|
|
|
14305
15653
|
this.dropdownTag = versioning.generateTag('auro-formkit-combobox-dropdown', dropdownVersion, AuroDropdown);
|
|
14306
15654
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-combobox-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
@@ -16456,8 +17804,12 @@ class AuroIcon extends BaseIcon {
|
|
|
16456
17804
|
async firstUpdated() {
|
|
16457
17805
|
await super.firstUpdated();
|
|
16458
17806
|
|
|
16459
|
-
|
|
16460
|
-
|
|
17807
|
+
/**
|
|
17808
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
17809
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
17810
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
17811
|
+
*/
|
|
17812
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
16461
17813
|
const svgDesc = this.svg.querySelector('desc');
|
|
16462
17814
|
|
|
16463
17815
|
if (svgDesc) {
|
|
@@ -16501,7 +17853,7 @@ class AuroIcon extends BaseIcon {
|
|
|
16501
17853
|
}
|
|
16502
17854
|
}
|
|
16503
17855
|
|
|
16504
|
-
var iconVersion = '8.0.
|
|
17856
|
+
var iconVersion = '8.0.4';
|
|
16505
17857
|
|
|
16506
17858
|
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>"};
|
|
16507
17859
|
|
|
@@ -16529,7 +17881,7 @@ class AuroMenuOption extends AuroElement$1 {
|
|
|
16529
17881
|
/**
|
|
16530
17882
|
* Generate unique names for dependency components.
|
|
16531
17883
|
*/
|
|
16532
|
-
const versioning = new AuroDependencyVersioning$
|
|
17884
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
16533
17885
|
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
16534
17886
|
|
|
16535
17887
|
this.selected = false;
|