@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.8 → 0.0.0-pr624.80
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 +1262 -81
- package/components/bibtemplate/dist/registered.js +1262 -81
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +49 -15
- package/components/checkbox/demo/api.min.js +73 -43
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +73 -43
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +72 -42
- package/components/checkbox/dist/registered.js +72 -42
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +115 -8
- package/components/combobox/demo/api.min.js +3102 -921
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +3102 -921
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +44 -12
- package/components/combobox/dist/index.js +3080 -995
- package/components/combobox/dist/registered.js +3080 -995
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +158 -21
- package/components/counter/demo/api.min.js +3416 -728
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +3416 -728
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +161 -11
- package/components/counter/dist/auro-counter.d.ts +16 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3416 -728
- package/components/counter/dist/registered.js +3416 -728
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +59 -28
- package/components/datepicker/demo/api.min.js +8486 -4644
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +75 -8
- package/components/datepicker/demo/index.min.js +8486 -4644
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +151 -12
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +7033 -3191
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +7033 -3191
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +82 -275
- package/components/dropdown/demo/api.min.js +451 -260
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +451 -260
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +43 -83
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +450 -259
- package/components/dropdown/dist/registered.js +450 -259
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.min.js +2 -2
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +2 -2
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/README.md +5 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +228 -130
- package/components/input/demo/api.min.js +909 -247
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +909 -247
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts +38 -10
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +908 -246
- package/components/input/dist/registered.js +908 -246
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +32 -10
- package/components/menu/demo/api.md +69 -8
- package/components/menu/demo/api.min.js +239 -48
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +239 -48
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +41 -7
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +238 -47
- package/components/menu/dist/registered.js +238 -47
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +39 -9
- package/components/radio/demo/api.min.js +91 -93
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +91 -93
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +9 -12
- package/components/radio/dist/index.js +90 -92
- package/components/radio/dist/registered.js +90 -92
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +150 -121
- package/components/select/demo/api.min.js +2184 -704
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1066 -259
- package/components/select/demo/index.min.js +2186 -694
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +59 -21
- package/components/select/dist/index.js +2107 -711
- package/components/select/dist/registered.js +2107 -711
- package/package.json +31 -28
- /package/components/{datepicker/dist/styles/default/color-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/classic}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/styles/{emphasized → classic}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -90,17 +90,6 @@ function auroMenuLoadingExample() {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
function valueTextExample() {
|
|
94
|
-
const onValueTextSelectInput = (e) => {
|
|
95
|
-
const valueText = e.target.querySelector("[slot=valueText]");
|
|
96
|
-
|
|
97
|
-
valueText.textContent = e.detail.optionSelected.dataset.display;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const select = document.querySelector("#valueTextExample");
|
|
101
|
-
select.addEventListener('input', onValueTextSelectInput);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
93
|
/**
|
|
105
94
|
* @license
|
|
106
95
|
* Copyright 2019 Google LLC
|
|
@@ -112,7 +101,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
112
101
|
* @license
|
|
113
102
|
* Copyright 2017 Google LLC
|
|
114
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
115
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e
|
|
104
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
|
|
116
105
|
|
|
117
106
|
/**
|
|
118
107
|
* @license
|
|
@@ -147,7 +136,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
147
136
|
*/
|
|
148
137
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
149
138
|
|
|
150
|
-
let AuroElement$
|
|
139
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
151
140
|
static get properties() {
|
|
152
141
|
return {
|
|
153
142
|
|
|
@@ -182,18 +171,21 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
182
171
|
}
|
|
183
172
|
|
|
184
173
|
resetShapeClasses() {
|
|
185
|
-
|
|
186
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
174
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
187
175
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
176
|
+
if (wrapper) {
|
|
177
|
+
wrapper.classList.forEach((className) => {
|
|
178
|
+
if (className.startsWith('shape-')) {
|
|
179
|
+
wrapper.classList.remove(className);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
194
182
|
|
|
195
|
-
|
|
196
|
-
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (this.shape && this.size) {
|
|
186
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
187
|
+
} else {
|
|
188
|
+
wrapper.classList.add('shape-none');
|
|
197
189
|
}
|
|
198
190
|
}
|
|
199
191
|
|
|
@@ -239,9 +231,9 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
239
231
|
}
|
|
240
232
|
};
|
|
241
233
|
|
|
242
|
-
var shapeSizeCss$1 = 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}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
234
|
+
var shapeSizeCss$1 = 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}`;
|
|
243
235
|
|
|
244
|
-
var tokensCss$5 = i$5`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-
|
|
236
|
+
var tokensCss$5 = i$5`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-select-outline-color: transparent}`;
|
|
245
237
|
|
|
246
238
|
class DateFormatter {
|
|
247
239
|
|
|
@@ -659,7 +651,7 @@ const {
|
|
|
659
651
|
|
|
660
652
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
661
653
|
|
|
662
|
-
let AuroLibraryRuntimeUtils$
|
|
654
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
663
655
|
|
|
664
656
|
/* eslint-disable jsdoc/require-param */
|
|
665
657
|
|
|
@@ -729,7 +721,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
729
721
|
class AuroFormValidation {
|
|
730
722
|
|
|
731
723
|
constructor() {
|
|
732
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
724
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
733
725
|
}
|
|
734
726
|
|
|
735
727
|
/**
|
|
@@ -789,19 +781,19 @@ class AuroFormValidation {
|
|
|
789
781
|
{
|
|
790
782
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
791
783
|
validity: 'tooShort',
|
|
792
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
784
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
793
785
|
},
|
|
794
786
|
{
|
|
795
787
|
check: (e) => e.value?.length > e.maxLength,
|
|
796
788
|
validity: 'tooLong',
|
|
797
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
789
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
798
790
|
}
|
|
799
791
|
],
|
|
800
792
|
pattern: [
|
|
801
793
|
{
|
|
802
794
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
803
795
|
validity: 'patternMismatch',
|
|
804
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
796
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
805
797
|
}
|
|
806
798
|
]
|
|
807
799
|
},
|
|
@@ -948,13 +940,24 @@ class AuroFormValidation {
|
|
|
948
940
|
this.getInputElements(elem);
|
|
949
941
|
this.getAuroInputs(elem);
|
|
950
942
|
|
|
951
|
-
//
|
|
943
|
+
// Check if validation should run
|
|
952
944
|
let validationShouldRun =
|
|
945
|
+
|
|
946
|
+
// If the validation was forced
|
|
953
947
|
force ||
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
948
|
+
|
|
949
|
+
// If the validation should run on input
|
|
950
|
+
elem.validateOnInput ||
|
|
951
|
+
|
|
952
|
+
// State-based checks
|
|
953
|
+
(
|
|
954
|
+
// Element is not currently focused
|
|
955
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
956
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
957
|
+
|
|
958
|
+
// And element has been touched or is untouched but has a value
|
|
959
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
960
|
+
);
|
|
958
961
|
|
|
959
962
|
if (elem.hasAttribute('error')) {
|
|
960
963
|
elem.validity = 'customError';
|
|
@@ -996,10 +999,10 @@ class AuroFormValidation {
|
|
|
996
999
|
if (!hasValue && elem.required && elem.touched) {
|
|
997
1000
|
elem.validity = 'valueMissing';
|
|
998
1001
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
999
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1002
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1000
1003
|
this.validateType(elem);
|
|
1001
1004
|
this.validateElementAttributes(elem);
|
|
1002
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
1005
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
1003
1006
|
this.validateElementAttributes(elem);
|
|
1004
1007
|
}
|
|
1005
1008
|
}
|
|
@@ -1008,7 +1011,9 @@ class AuroFormValidation {
|
|
|
1008
1011
|
elem.validity = this.auroInputElements[0].validity;
|
|
1009
1012
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1010
1013
|
|
|
1011
|
-
|
|
1014
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1015
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1016
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1012
1017
|
elem.validity = this.auroInputElements[1].validity;
|
|
1013
1018
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1014
1019
|
}
|
|
@@ -2820,7 +2825,7 @@ class AuroFloatingUI {
|
|
|
2820
2825
|
*/
|
|
2821
2826
|
mirrorSize() {
|
|
2822
2827
|
// mirror the boxsize from bibSizer
|
|
2823
|
-
if (this.element.bibSizer) {
|
|
2828
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2824
2829
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2825
2830
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2826
2831
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2956,6 +2961,7 @@ class AuroFloatingUI {
|
|
|
2956
2961
|
this.element.bib.style.left = "0px";
|
|
2957
2962
|
this.element.bib.style.width = '';
|
|
2958
2963
|
this.element.bib.style.height = '';
|
|
2964
|
+
this.element.style.contain = '';
|
|
2959
2965
|
|
|
2960
2966
|
// reset the size that was mirroring `size` css-part
|
|
2961
2967
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2980,6 +2986,7 @@ class AuroFloatingUI {
|
|
|
2980
2986
|
this.element.bib.style.position = '';
|
|
2981
2987
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2982
2988
|
this.element.isBibFullscreen = false;
|
|
2989
|
+
this.element.style.contain = 'layout';
|
|
2983
2990
|
}
|
|
2984
2991
|
|
|
2985
2992
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3032,13 +3039,13 @@ class AuroFloatingUI {
|
|
|
3032
3039
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
3033
3040
|
return;
|
|
3034
3041
|
}
|
|
3035
|
-
|
|
3042
|
+
|
|
3036
3043
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
3037
3044
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
3038
3045
|
return;
|
|
3039
3046
|
}
|
|
3040
3047
|
|
|
3041
|
-
this.hideBib();
|
|
3048
|
+
this.hideBib("keydown");
|
|
3042
3049
|
}
|
|
3043
3050
|
|
|
3044
3051
|
setupHideHandlers() {
|
|
@@ -3063,7 +3070,7 @@ class AuroFloatingUI {
|
|
|
3063
3070
|
document.expandedAuroFormkitDropdown = null;
|
|
3064
3071
|
document.expandedAuroFloater = this;
|
|
3065
3072
|
} else {
|
|
3066
|
-
this.hideBib();
|
|
3073
|
+
this.hideBib("click");
|
|
3067
3074
|
}
|
|
3068
3075
|
}
|
|
3069
3076
|
};
|
|
@@ -3076,7 +3083,7 @@ class AuroFloatingUI {
|
|
|
3076
3083
|
// if something else is open, let it handle itself
|
|
3077
3084
|
return;
|
|
3078
3085
|
}
|
|
3079
|
-
this.hideBib();
|
|
3086
|
+
this.hideBib("keydown");
|
|
3080
3087
|
}
|
|
3081
3088
|
};
|
|
3082
3089
|
|
|
@@ -3159,7 +3166,11 @@ class AuroFloatingUI {
|
|
|
3159
3166
|
}
|
|
3160
3167
|
}
|
|
3161
3168
|
|
|
3162
|
-
|
|
3169
|
+
/**
|
|
3170
|
+
* Hides the floating UI element.
|
|
3171
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3172
|
+
*/
|
|
3173
|
+
hideBib(eventType = "unknown") {
|
|
3163
3174
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3164
3175
|
this.lockScroll(false);
|
|
3165
3176
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3170,7 +3181,7 @@ class AuroFloatingUI {
|
|
|
3170
3181
|
if (this.showing) {
|
|
3171
3182
|
this.cleanupHideHandlers();
|
|
3172
3183
|
this.showing = false;
|
|
3173
|
-
this.dispatchEventDropdownToggle();
|
|
3184
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3174
3185
|
}
|
|
3175
3186
|
}
|
|
3176
3187
|
document.expandedAuroFloater = null;
|
|
@@ -3179,11 +3190,13 @@ class AuroFloatingUI {
|
|
|
3179
3190
|
/**
|
|
3180
3191
|
* @private
|
|
3181
3192
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3193
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3182
3194
|
*/
|
|
3183
|
-
dispatchEventDropdownToggle() {
|
|
3195
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3184
3196
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3185
3197
|
detail: {
|
|
3186
3198
|
expanded: this.showing,
|
|
3199
|
+
eventType: eventType || "unknown",
|
|
3187
3200
|
},
|
|
3188
3201
|
composed: true
|
|
3189
3202
|
});
|
|
@@ -3193,7 +3206,7 @@ class AuroFloatingUI {
|
|
|
3193
3206
|
|
|
3194
3207
|
handleClick() {
|
|
3195
3208
|
if (this.element.isPopoverVisible) {
|
|
3196
|
-
this.hideBib();
|
|
3209
|
+
this.hideBib("click");
|
|
3197
3210
|
} else {
|
|
3198
3211
|
this.showBib();
|
|
3199
3212
|
}
|
|
@@ -3216,8 +3229,9 @@ class AuroFloatingUI {
|
|
|
3216
3229
|
// Space is included as it's expected behavior for interactive elements
|
|
3217
3230
|
|
|
3218
3231
|
const origin = event.composedPath()[0];
|
|
3219
|
-
if (event.key === 'Enter' || (
|
|
3220
|
-
|
|
3232
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3233
|
+
|
|
3234
|
+
event.preventDefault();
|
|
3221
3235
|
this.handleClick();
|
|
3222
3236
|
}
|
|
3223
3237
|
break;
|
|
@@ -3228,7 +3242,7 @@ class AuroFloatingUI {
|
|
|
3228
3242
|
break;
|
|
3229
3243
|
case 'mouseleave':
|
|
3230
3244
|
if (this.element.hoverToggle) {
|
|
3231
|
-
this.hideBib();
|
|
3245
|
+
this.hideBib("mouseleave");
|
|
3232
3246
|
}
|
|
3233
3247
|
break;
|
|
3234
3248
|
case 'focus':
|
|
@@ -3371,6 +3385,267 @@ class AuroFloatingUI {
|
|
|
3371
3385
|
}
|
|
3372
3386
|
}
|
|
3373
3387
|
|
|
3388
|
+
// Selectors for focusable elements
|
|
3389
|
+
const FOCUSABLE_SELECTORS = [
|
|
3390
|
+
'a[href]',
|
|
3391
|
+
'button:not([disabled])',
|
|
3392
|
+
'textarea:not([disabled])',
|
|
3393
|
+
'input:not([disabled])',
|
|
3394
|
+
'select:not([disabled])',
|
|
3395
|
+
'[role="tab"]:not([disabled])',
|
|
3396
|
+
'[role="link"]:not([disabled])',
|
|
3397
|
+
'[role="button"]:not([disabled])',
|
|
3398
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3399
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3400
|
+
];
|
|
3401
|
+
|
|
3402
|
+
// List of custom components that are known to be focusable
|
|
3403
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3404
|
+
'auro-checkbox',
|
|
3405
|
+
'auro-radio',
|
|
3406
|
+
'auro-dropdown',
|
|
3407
|
+
'auro-button',
|
|
3408
|
+
'auro-combobox',
|
|
3409
|
+
'auro-input',
|
|
3410
|
+
'auro-counter',
|
|
3411
|
+
'auro-menu',
|
|
3412
|
+
'auro-select',
|
|
3413
|
+
'auro-datepicker',
|
|
3414
|
+
'auro-hyperlink',
|
|
3415
|
+
'auro-accordion',
|
|
3416
|
+
];
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* Determines if a given element is a custom focusable component.
|
|
3420
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3421
|
+
*
|
|
3422
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3423
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3424
|
+
*/
|
|
3425
|
+
function isFocusableComponent(element) {
|
|
3426
|
+
const componentName = element.tagName.toLowerCase();
|
|
3427
|
+
|
|
3428
|
+
// Guard Clause: Element is a focusable component
|
|
3429
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3430
|
+
|
|
3431
|
+
// Guard Clause: Element is not disabled
|
|
3432
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3433
|
+
|
|
3434
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3435
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3436
|
+
|
|
3437
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3438
|
+
return true;
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
/**
|
|
3442
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3443
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3444
|
+
*
|
|
3445
|
+
* @param {HTMLElement} container The container to search within
|
|
3446
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3447
|
+
*/
|
|
3448
|
+
function getFocusableElements(container) {
|
|
3449
|
+
// Get elements in DOM order by walking the tree
|
|
3450
|
+
const orderedFocusableElements = [];
|
|
3451
|
+
|
|
3452
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3453
|
+
const collectFocusableElements = (root) => {
|
|
3454
|
+
// Check if current element is focusable
|
|
3455
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3456
|
+
// Check if this is a custom component that is focusable
|
|
3457
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3458
|
+
|
|
3459
|
+
if (isComponentFocusable) {
|
|
3460
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3461
|
+
orderedFocusableElements.push(root);
|
|
3462
|
+
return; // Skip traversing inside this component
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3465
|
+
// Check if the element itself matches any selector
|
|
3466
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3467
|
+
if (root.matches?.(selector)) {
|
|
3468
|
+
orderedFocusableElements.push(root);
|
|
3469
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
// Process shadow DOM only for non-Auro components
|
|
3474
|
+
if (root.shadowRoot) {
|
|
3475
|
+
// Process shadow DOM children in order
|
|
3476
|
+
if (root.shadowRoot.children) {
|
|
3477
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3478
|
+
collectFocusableElements(child);
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
// Process slots and their assigned nodes in order
|
|
3484
|
+
if (root.tagName === 'SLOT') {
|
|
3485
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3486
|
+
for (const node of assignedNodes) {
|
|
3487
|
+
collectFocusableElements(node);
|
|
3488
|
+
}
|
|
3489
|
+
} else {
|
|
3490
|
+
// Process light DOM children in order
|
|
3491
|
+
if (root.children) {
|
|
3492
|
+
Array.from(root.children).forEach(child => {
|
|
3493
|
+
collectFocusableElements(child);
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
};
|
|
3499
|
+
|
|
3500
|
+
// Start the traversal from the container
|
|
3501
|
+
collectFocusableElements(container);
|
|
3502
|
+
|
|
3503
|
+
// Remove duplicates that might have been collected through different paths
|
|
3504
|
+
// while preserving order
|
|
3505
|
+
const uniqueElements = [];
|
|
3506
|
+
const seen = new Set();
|
|
3507
|
+
|
|
3508
|
+
for (const element of orderedFocusableElements) {
|
|
3509
|
+
if (!seen.has(element)) {
|
|
3510
|
+
seen.add(element);
|
|
3511
|
+
uniqueElements.push(element);
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
return uniqueElements;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3520
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3521
|
+
*/
|
|
3522
|
+
class FocusTrap {
|
|
3523
|
+
/**
|
|
3524
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3525
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3526
|
+
*
|
|
3527
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3528
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3529
|
+
*/
|
|
3530
|
+
constructor(container) {
|
|
3531
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3532
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
this.container = container;
|
|
3536
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3537
|
+
|
|
3538
|
+
this._init();
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
/**
|
|
3542
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3543
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3544
|
+
*
|
|
3545
|
+
* @private
|
|
3546
|
+
*/
|
|
3547
|
+
_init() {
|
|
3548
|
+
|
|
3549
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3550
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3551
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3552
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
// Track tab direction
|
|
3556
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
/**
|
|
3560
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3561
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3562
|
+
*
|
|
3563
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3564
|
+
* @private
|
|
3565
|
+
*/
|
|
3566
|
+
_onKeydown = (e) => {
|
|
3567
|
+
|
|
3568
|
+
if (e.key === 'Tab') {
|
|
3569
|
+
|
|
3570
|
+
// Set the tab direction based on the key pressed
|
|
3571
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3572
|
+
|
|
3573
|
+
// Get the active element(s) in the document and shadow root
|
|
3574
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3575
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3576
|
+
let activeElement = document.activeElement;
|
|
3577
|
+
const actives = [activeElement];
|
|
3578
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3579
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3580
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
// Update the focusable elements
|
|
3584
|
+
const focusables = this._getFocusableElements();
|
|
3585
|
+
|
|
3586
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3587
|
+
const focusIndex =
|
|
3588
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3589
|
+
? focusables.length - 1
|
|
3590
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3591
|
+
? 0
|
|
3592
|
+
: null;
|
|
3593
|
+
|
|
3594
|
+
if (focusIndex !== null) {
|
|
3595
|
+
focusables[focusIndex].focus();
|
|
3596
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3597
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
};
|
|
3601
|
+
|
|
3602
|
+
/**
|
|
3603
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3604
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3605
|
+
*
|
|
3606
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3607
|
+
* @private
|
|
3608
|
+
*/
|
|
3609
|
+
_getFocusableElements() {
|
|
3610
|
+
// Use the imported utility function to get focusable elements
|
|
3611
|
+
const elements = getFocusableElements(this.container);
|
|
3612
|
+
|
|
3613
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3614
|
+
return elements;
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* Moves focus to the first focusable element within the container.
|
|
3619
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3620
|
+
*/
|
|
3621
|
+
focusFirstElement() {
|
|
3622
|
+
const focusables = this._getFocusableElements();
|
|
3623
|
+
if (focusables.length) focusables[0].focus();
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
/**
|
|
3627
|
+
* Moves focus to the last focusable element within the container.
|
|
3628
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3629
|
+
*/
|
|
3630
|
+
focusLastElement() {
|
|
3631
|
+
const focusables = this._getFocusableElements();
|
|
3632
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3637
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3638
|
+
*/
|
|
3639
|
+
disconnect() {
|
|
3640
|
+
|
|
3641
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3642
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3374
3649
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3375
3650
|
// See LICENSE in the project root for license information.
|
|
3376
3651
|
|
|
@@ -3477,7 +3752,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
3477
3752
|
return _fetchMap$2.get(uri);
|
|
3478
3753
|
};
|
|
3479
3754
|
|
|
3480
|
-
var styleCss$
|
|
3755
|
+
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}`;
|
|
3481
3756
|
|
|
3482
3757
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3483
3758
|
// See LICENSE in the project root for license information.
|
|
@@ -3520,7 +3795,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3520
3795
|
|
|
3521
3796
|
static get styles() {
|
|
3522
3797
|
return i$5`
|
|
3523
|
-
${styleCss$
|
|
3798
|
+
${styleCss$3$2}
|
|
3524
3799
|
`;
|
|
3525
3800
|
}
|
|
3526
3801
|
|
|
@@ -3561,9 +3836,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3561
3836
|
}
|
|
3562
3837
|
};
|
|
3563
3838
|
|
|
3564
|
-
var tokensCss$2$
|
|
3839
|
+
var tokensCss$2$2 = 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)}`;
|
|
3565
3840
|
|
|
3566
|
-
var colorCss$3$
|
|
3841
|
+
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)}`;
|
|
3567
3842
|
|
|
3568
3843
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3569
3844
|
// See LICENSE in the project root for license information.
|
|
@@ -3721,9 +3996,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3721
3996
|
static get styles() {
|
|
3722
3997
|
return [
|
|
3723
3998
|
super.styles,
|
|
3724
|
-
i$5`${tokensCss$2$
|
|
3725
|
-
i$5`${styleCss$
|
|
3726
|
-
i$5`${colorCss$3$
|
|
3999
|
+
i$5`${tokensCss$2$2}`,
|
|
4000
|
+
i$5`${styleCss$3$2}`,
|
|
4001
|
+
i$5`${colorCss$3$2}`
|
|
3727
4002
|
];
|
|
3728
4003
|
}
|
|
3729
4004
|
|
|
@@ -3757,8 +4032,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3757
4032
|
async firstUpdated() {
|
|
3758
4033
|
await super.firstUpdated();
|
|
3759
4034
|
|
|
3760
|
-
|
|
3761
|
-
|
|
4035
|
+
/**
|
|
4036
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
4037
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
4038
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
4039
|
+
*/
|
|
4040
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3762
4041
|
const svgDesc = this.svg.querySelector('desc');
|
|
3763
4042
|
|
|
3764
4043
|
if (svgDesc) {
|
|
@@ -3804,11 +4083,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3804
4083
|
|
|
3805
4084
|
var iconVersion$2 = '6.1.2';
|
|
3806
4085
|
|
|
3807
|
-
var styleCss$
|
|
4086
|
+
var styleCss$2$2 = 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}`;
|
|
3808
4087
|
|
|
3809
|
-
var colorCss$2$
|
|
4088
|
+
var colorCss$2$2 = 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)}`;
|
|
3810
4089
|
|
|
3811
|
-
var tokensCss$1$
|
|
4090
|
+
var tokensCss$1$2 = 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-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-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)}`;
|
|
3812
4091
|
|
|
3813
4092
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3814
4093
|
// See LICENSE in the project root for license information.
|
|
@@ -3829,7 +4108,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3829
4108
|
*/
|
|
3830
4109
|
|
|
3831
4110
|
class AuroDropdownBib extends i$2 {
|
|
3832
|
-
|
|
4111
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3833
4112
|
constructor() {
|
|
3834
4113
|
super();
|
|
3835
4114
|
|
|
@@ -3839,13 +4118,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3839
4118
|
this._mobileBreakpointValue = undefined;
|
|
3840
4119
|
|
|
3841
4120
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4121
|
+
|
|
4122
|
+
this.shape = "rounded";
|
|
4123
|
+
this.matchWidth = false;
|
|
3842
4124
|
}
|
|
3843
4125
|
|
|
3844
4126
|
static get styles() {
|
|
3845
4127
|
return [
|
|
3846
|
-
styleCss$
|
|
3847
|
-
colorCss$2$
|
|
3848
|
-
tokensCss$1$
|
|
4128
|
+
styleCss$2$2,
|
|
4129
|
+
colorCss$2$2,
|
|
4130
|
+
tokensCss$1$2
|
|
3849
4131
|
];
|
|
3850
4132
|
}
|
|
3851
4133
|
|
|
@@ -3876,6 +4158,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3876
4158
|
reflect: true
|
|
3877
4159
|
},
|
|
3878
4160
|
|
|
4161
|
+
/**
|
|
4162
|
+
* If declared, the bib width will match the trigger width.
|
|
4163
|
+
* @private
|
|
4164
|
+
*/
|
|
4165
|
+
matchWidth: {
|
|
4166
|
+
type: Boolean,
|
|
4167
|
+
reflect: true
|
|
4168
|
+
},
|
|
4169
|
+
|
|
3879
4170
|
/**
|
|
3880
4171
|
* If declared, will apply border-radius to the bib.
|
|
3881
4172
|
*/
|
|
@@ -3889,6 +4180,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3889
4180
|
*/
|
|
3890
4181
|
bibTemplate: {
|
|
3891
4182
|
type: Object
|
|
4183
|
+
},
|
|
4184
|
+
|
|
4185
|
+
shape: {
|
|
4186
|
+
type: String,
|
|
4187
|
+
reflect: true
|
|
3892
4188
|
}
|
|
3893
4189
|
};
|
|
3894
4190
|
}
|
|
@@ -3968,8 +4264,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3968
4264
|
|
|
3969
4265
|
// function that renders the HTML and CSS into the scope of the component
|
|
3970
4266
|
render() {
|
|
4267
|
+
const classes = {
|
|
4268
|
+
container: true
|
|
4269
|
+
};
|
|
4270
|
+
|
|
4271
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4272
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4273
|
+
classes[`shape-${this.shape}`] = true;
|
|
4274
|
+
|
|
3971
4275
|
return u`
|
|
3972
|
-
<div class="
|
|
4276
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3973
4277
|
<slot></slot>
|
|
3974
4278
|
</div>
|
|
3975
4279
|
`;
|
|
@@ -3978,21 +4282,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
3978
4282
|
|
|
3979
4283
|
var dropdownVersion$1 = '3.0.0';
|
|
3980
4284
|
|
|
3981
|
-
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}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
4285
|
+
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}`;
|
|
4286
|
+
|
|
4287
|
+
var colorCss$1$2 = i$5`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
3982
4288
|
|
|
3983
|
-
var
|
|
4289
|
+
var styleCss$1$2 = i$5`:host{display:block;position:relative}:host([open]){z-index:var(--depth-tooltip, 400)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
3984
4290
|
|
|
3985
|
-
var classicColorCss = i$5
|
|
4291
|
+
var classicColorCss = i$5``;
|
|
3986
4292
|
|
|
3987
|
-
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .
|
|
4293
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}`;
|
|
3988
4294
|
|
|
3989
|
-
var styleEmphasizedCss = i$5
|
|
4295
|
+
var styleEmphasizedCss = i$5`.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3990
4296
|
|
|
3991
|
-
var styleSnowflakeCss = i$5`:host
|
|
4297
|
+
var styleSnowflakeCss = i$5`:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3992
4298
|
|
|
3993
|
-
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-
|
|
4299
|
+
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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3994
4300
|
|
|
3995
|
-
var styleCss$6 = i$5
|
|
4301
|
+
var styleCss$6 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3996
4302
|
|
|
3997
4303
|
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3998
4304
|
|
|
@@ -4003,7 +4309,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
4003
4309
|
|
|
4004
4310
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4005
4311
|
|
|
4006
|
-
let AuroLibraryRuntimeUtils$
|
|
4312
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
4007
4313
|
|
|
4008
4314
|
/* eslint-disable jsdoc/require-param */
|
|
4009
4315
|
|
|
@@ -4084,7 +4390,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4084
4390
|
this.onDark = false;
|
|
4085
4391
|
this.hasTextContent = false;
|
|
4086
4392
|
|
|
4087
|
-
AuroLibraryRuntimeUtils$
|
|
4393
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4088
4394
|
}
|
|
4089
4395
|
|
|
4090
4396
|
static get styles() {
|
|
@@ -4140,7 +4446,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4140
4446
|
*
|
|
4141
4447
|
*/
|
|
4142
4448
|
static register(name = "auro-helptext") {
|
|
4143
|
-
AuroLibraryRuntimeUtils$
|
|
4449
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
4144
4450
|
}
|
|
4145
4451
|
|
|
4146
4452
|
updated() {
|
|
@@ -4198,7 +4504,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4198
4504
|
|
|
4199
4505
|
var helpTextVersion$1 = '1.0.0';
|
|
4200
4506
|
|
|
4201
|
-
let AuroElement$
|
|
4507
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4202
4508
|
static get properties() {
|
|
4203
4509
|
return {
|
|
4204
4510
|
|
|
@@ -4233,18 +4539,21 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4233
4539
|
}
|
|
4234
4540
|
|
|
4235
4541
|
resetShapeClasses() {
|
|
4236
|
-
|
|
4237
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4542
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4238
4543
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4544
|
+
if (wrapper) {
|
|
4545
|
+
wrapper.classList.forEach((className) => {
|
|
4546
|
+
if (className.startsWith('shape-')) {
|
|
4547
|
+
wrapper.classList.remove(className);
|
|
4548
|
+
}
|
|
4549
|
+
});
|
|
4245
4550
|
|
|
4246
|
-
|
|
4247
|
-
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
if (this.shape && this.size) {
|
|
4554
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4555
|
+
} else {
|
|
4556
|
+
wrapper.classList.add('shape-none');
|
|
4248
4557
|
}
|
|
4249
4558
|
}
|
|
4250
4559
|
|
|
@@ -4294,10 +4603,9 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4294
4603
|
// See LICENSE in the project root for license information.
|
|
4295
4604
|
|
|
4296
4605
|
|
|
4297
|
-
|
|
4298
|
-
|
|
4606
|
+
|
|
4607
|
+
/*
|
|
4299
4608
|
* @slot - Default slot for the popover content.
|
|
4300
|
-
* @slot label - Defines the content of the label.
|
|
4301
4609
|
* @slot helpText - Defines the content of the helpText.
|
|
4302
4610
|
* @slot trigger - Defines the content of the trigger.
|
|
4303
4611
|
* @csspart trigger - The trigger content container.
|
|
@@ -4307,7 +4615,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4307
4615
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4308
4616
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4309
4617
|
*/
|
|
4310
|
-
class AuroDropdown extends AuroElement$
|
|
4618
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4311
4619
|
constructor() {
|
|
4312
4620
|
super();
|
|
4313
4621
|
|
|
@@ -4316,23 +4624,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4624
|
this.matchWidth = false;
|
|
4317
4625
|
this.noHideOnThisFocusLoss = false;
|
|
4318
4626
|
|
|
4319
|
-
this.errorMessage =
|
|
4627
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4320
4628
|
|
|
4321
4629
|
// Layout Config
|
|
4322
|
-
this.layout =
|
|
4323
|
-
this.shape =
|
|
4324
|
-
this.size =
|
|
4630
|
+
this.layout = undefined;
|
|
4631
|
+
this.shape = undefined;
|
|
4632
|
+
this.size = undefined;
|
|
4633
|
+
|
|
4325
4634
|
this.parentBorder = false;
|
|
4326
4635
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4636
|
+
/** @private */
|
|
4637
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4329
4638
|
|
|
4330
|
-
|
|
4331
|
-
return {
|
|
4332
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4333
|
-
};
|
|
4639
|
+
this.privateDefaults();
|
|
4334
4640
|
}
|
|
4335
4641
|
|
|
4642
|
+
/**
|
|
4643
|
+
* @private
|
|
4644
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4645
|
+
*/
|
|
4336
4646
|
get commonWrapperClasses() {
|
|
4337
4647
|
return {
|
|
4338
4648
|
'trigger': true,
|
|
@@ -4350,13 +4660,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4350
4660
|
privateDefaults() {
|
|
4351
4661
|
this.chevron = false;
|
|
4352
4662
|
this.disabled = false;
|
|
4663
|
+
this.disableFocusTrap = false;
|
|
4353
4664
|
this.error = false;
|
|
4354
|
-
this.inset = false;
|
|
4355
|
-
this.rounded = false;
|
|
4356
4665
|
this.tabIndex = 0;
|
|
4357
4666
|
this.noToggle = false;
|
|
4358
|
-
this.a11yAutocomplete = 'none';
|
|
4359
|
-
this.labeled = true;
|
|
4360
4667
|
this.a11yRole = 'button';
|
|
4361
4668
|
this.onDark = false;
|
|
4362
4669
|
this.showTriggerBorders = true;
|
|
@@ -4452,6 +4759,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4452
4759
|
this.floater.showBib();
|
|
4453
4760
|
}
|
|
4454
4761
|
|
|
4762
|
+
/**
|
|
4763
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4764
|
+
* If not, trigger element will get focus.
|
|
4765
|
+
*/
|
|
4766
|
+
focus() {
|
|
4767
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4768
|
+
this.focusTrap.focusFirstElement();
|
|
4769
|
+
} else {
|
|
4770
|
+
this.trigger.focus();
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4455
4774
|
// function to define props used within the scope of this component
|
|
4456
4775
|
static get properties() {
|
|
4457
4776
|
return {
|
|
@@ -4465,6 +4784,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4465
4784
|
reflect: true
|
|
4466
4785
|
},
|
|
4467
4786
|
|
|
4787
|
+
/**
|
|
4788
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4789
|
+
* @default false
|
|
4790
|
+
*/
|
|
4791
|
+
disableEventShow: {
|
|
4792
|
+
type: Boolean,
|
|
4793
|
+
reflect: true
|
|
4794
|
+
},
|
|
4795
|
+
|
|
4468
4796
|
/**
|
|
4469
4797
|
* If declared, applies a border around the trigger slot.
|
|
4470
4798
|
*/
|
|
@@ -4483,17 +4811,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4483
4811
|
},
|
|
4484
4812
|
|
|
4485
4813
|
/**
|
|
4486
|
-
* If declared, the dropdown
|
|
4814
|
+
* If declared, the dropdown is not interactive.
|
|
4487
4815
|
*/
|
|
4488
|
-
|
|
4816
|
+
disabled: {
|
|
4489
4817
|
type: Boolean,
|
|
4490
4818
|
reflect: true
|
|
4491
4819
|
},
|
|
4492
4820
|
|
|
4493
4821
|
/**
|
|
4494
|
-
* If declared, the
|
|
4822
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4495
4823
|
*/
|
|
4496
|
-
|
|
4824
|
+
disableFocusTrap: {
|
|
4497
4825
|
type: Boolean,
|
|
4498
4826
|
reflect: true
|
|
4499
4827
|
},
|
|
@@ -4538,27 +4866,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4538
4866
|
reflect: true
|
|
4539
4867
|
},
|
|
4540
4868
|
|
|
4541
|
-
/**
|
|
4542
|
-
* Makes the trigger to be full width of its parent container.
|
|
4543
|
-
*/
|
|
4544
|
-
fluid: {
|
|
4545
|
-
type: Boolean,
|
|
4546
|
-
reflect: true
|
|
4547
|
-
},
|
|
4548
|
-
|
|
4549
|
-
/**
|
|
4550
|
-
* If declared, will apply padding around trigger slot content.
|
|
4551
|
-
*/
|
|
4552
|
-
inset: {
|
|
4553
|
-
type: Boolean,
|
|
4554
|
-
reflect: true
|
|
4555
|
-
},
|
|
4556
|
-
|
|
4557
4869
|
/**
|
|
4558
4870
|
* If true, the dropdown bib is displayed.
|
|
4559
4871
|
*/
|
|
4560
4872
|
isPopoverVisible: {
|
|
4561
|
-
type: Boolean
|
|
4873
|
+
type: Boolean,
|
|
4874
|
+
reflect: true,
|
|
4875
|
+
attribute: 'open'
|
|
4562
4876
|
},
|
|
4563
4877
|
|
|
4564
4878
|
/**
|
|
@@ -4597,15 +4911,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4597
4911
|
reflect: true
|
|
4598
4912
|
},
|
|
4599
4913
|
|
|
4600
|
-
/**
|
|
4601
|
-
* Defines if there is a label preset.
|
|
4602
|
-
* @private
|
|
4603
|
-
*/
|
|
4604
|
-
labeled: {
|
|
4605
|
-
type: Boolean,
|
|
4606
|
-
reflect: true
|
|
4607
|
-
},
|
|
4608
|
-
|
|
4609
4914
|
/**
|
|
4610
4915
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4611
4916
|
* @private
|
|
@@ -4666,6 +4971,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4666
4971
|
reflect: true
|
|
4667
4972
|
},
|
|
4668
4973
|
|
|
4974
|
+
/**
|
|
4975
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4976
|
+
*/
|
|
4669
4977
|
onSlotChange: {
|
|
4670
4978
|
type: Function,
|
|
4671
4979
|
reflect: false
|
|
@@ -4680,14 +4988,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4680
4988
|
reflect: true
|
|
4681
4989
|
},
|
|
4682
4990
|
|
|
4683
|
-
/**
|
|
4684
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4685
|
-
*/
|
|
4686
|
-
rounded: {
|
|
4687
|
-
type: Boolean,
|
|
4688
|
-
reflect: true
|
|
4689
|
-
},
|
|
4690
|
-
|
|
4691
4991
|
/**
|
|
4692
4992
|
* @private
|
|
4693
4993
|
*/
|
|
@@ -4702,22 +5002,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4702
5002
|
type: String || undefined,
|
|
4703
5003
|
attribute: false,
|
|
4704
5004
|
reflect: false
|
|
4705
|
-
},
|
|
4706
|
-
|
|
4707
|
-
/**
|
|
4708
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4709
|
-
*/
|
|
4710
|
-
a11yAutocomplete: {
|
|
4711
|
-
type: String,
|
|
4712
|
-
attribute: false,
|
|
4713
5005
|
}
|
|
4714
5006
|
};
|
|
4715
5007
|
}
|
|
4716
5008
|
|
|
4717
5009
|
static get styles() {
|
|
4718
5010
|
return [
|
|
5011
|
+
styleCss$1$2,
|
|
5012
|
+
tokensCss$1$2,
|
|
4719
5013
|
colorCss$1$2,
|
|
4720
|
-
tokensCss$1$1,
|
|
4721
5014
|
|
|
4722
5015
|
// default layout
|
|
4723
5016
|
classicColorCss,
|
|
@@ -4779,13 +5072,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4779
5072
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4780
5073
|
this.handleTriggerContentSlotChange();
|
|
4781
5074
|
}
|
|
5075
|
+
}
|
|
4782
5076
|
|
|
5077
|
+
/**
|
|
5078
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
5079
|
+
* @private
|
|
5080
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
5081
|
+
*/
|
|
5082
|
+
handleDropdownToggle(event) {
|
|
5083
|
+
this.updateFocusTrap();
|
|
5084
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
5085
|
+
const eventType = event.detail.eventType || "unknown";
|
|
5086
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5087
|
+
this.trigger.focus();
|
|
5088
|
+
}
|
|
4783
5089
|
}
|
|
4784
5090
|
|
|
4785
5091
|
firstUpdated() {
|
|
4786
5092
|
|
|
4787
5093
|
// Configure the floater to, this will generate the ID for the bib
|
|
4788
5094
|
this.floater.configure(this, 'auroDropdown');
|
|
5095
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4789
5096
|
|
|
4790
5097
|
/**
|
|
4791
5098
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4803,6 +5110,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4803
5110
|
|
|
4804
5111
|
// Add the tag name as an attribute if it is different than the component name
|
|
4805
5112
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
5113
|
+
|
|
5114
|
+
this.trigger.addEventListener('click', () => {
|
|
5115
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
5116
|
+
bubbles: true,
|
|
5117
|
+
composed: true
|
|
5118
|
+
}));
|
|
5119
|
+
});
|
|
4806
5120
|
}
|
|
4807
5121
|
|
|
4808
5122
|
/**
|
|
@@ -4846,70 +5160,33 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4846
5160
|
}
|
|
4847
5161
|
|
|
4848
5162
|
/**
|
|
4849
|
-
* Function to support @focusout event.
|
|
4850
5163
|
* @private
|
|
4851
|
-
* @return {void}
|
|
4852
5164
|
*/
|
|
4853
|
-
|
|
4854
|
-
|
|
5165
|
+
updateFocusTrap() {
|
|
5166
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5167
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5168
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5169
|
+
this.focusTrap.focusFirstElement();
|
|
5170
|
+
return;
|
|
5171
|
+
}
|
|
5172
|
+
|
|
5173
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5174
|
+
if (!this.focusTrap) {
|
|
5175
|
+
return;
|
|
5176
|
+
}
|
|
5177
|
+
|
|
5178
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5179
|
+
this.focusTrap.disconnect();
|
|
5180
|
+
this.focusTrap = undefined;
|
|
4855
5181
|
}
|
|
4856
5182
|
|
|
4857
5183
|
/**
|
|
4858
|
-
*
|
|
5184
|
+
* Function to support @focusout event.
|
|
4859
5185
|
* @private
|
|
4860
|
-
* @
|
|
4861
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5186
|
+
* @return {void}
|
|
4862
5187
|
*/
|
|
4863
|
-
|
|
4864
|
-
this.
|
|
4865
|
-
|
|
4866
|
-
const nodes = [
|
|
4867
|
-
element,
|
|
4868
|
-
...element.children
|
|
4869
|
-
];
|
|
4870
|
-
|
|
4871
|
-
const focusableElements = [
|
|
4872
|
-
'a',
|
|
4873
|
-
'auro-hyperlink',
|
|
4874
|
-
'button',
|
|
4875
|
-
'auro-button',
|
|
4876
|
-
'input',
|
|
4877
|
-
'auro-input',
|
|
4878
|
-
];
|
|
4879
|
-
|
|
4880
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4881
|
-
|
|
4882
|
-
const result = nodes.some((node) => {
|
|
4883
|
-
const tagName = node.tagName.toLowerCase();
|
|
4884
|
-
|
|
4885
|
-
if (node.tabIndex > -1) {
|
|
4886
|
-
return true;
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
if (focusableElements.includes(tagName)) {
|
|
4890
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4891
|
-
return true;
|
|
4892
|
-
}
|
|
4893
|
-
if (!node.hasAttribute('disabled')) {
|
|
4894
|
-
return true;
|
|
4895
|
-
}
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4899
|
-
return true;
|
|
4900
|
-
}
|
|
4901
|
-
|
|
4902
|
-
return false;
|
|
4903
|
-
});
|
|
4904
|
-
|
|
4905
|
-
if (result) {
|
|
4906
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4907
|
-
const tagName = node.tagName.toLowerCase();
|
|
4908
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4909
|
-
});
|
|
4910
|
-
}
|
|
4911
|
-
|
|
4912
|
-
return result;
|
|
5188
|
+
handleFocusout() {
|
|
5189
|
+
this.hasFocus = false;
|
|
4913
5190
|
}
|
|
4914
5191
|
|
|
4915
5192
|
/**
|
|
@@ -5005,14 +5282,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5005
5282
|
* @returns {void}
|
|
5006
5283
|
*/
|
|
5007
5284
|
handleTriggerContentSlotChange(event) {
|
|
5008
|
-
|
|
5009
5285
|
this.floater.handleTriggerTabIndex();
|
|
5010
5286
|
|
|
5011
5287
|
// Get the trigger
|
|
5012
5288
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5013
5289
|
|
|
5014
5290
|
// Get the trigger slot
|
|
5015
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5291
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
5016
5292
|
|
|
5017
5293
|
// If there's a trigger slot
|
|
5018
5294
|
if (triggerSlot) {
|
|
@@ -5024,7 +5300,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5024
5300
|
if (triggerContentNodes) {
|
|
5025
5301
|
|
|
5026
5302
|
// See if any of them are focusable elements
|
|
5027
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5303
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5028
5304
|
|
|
5029
5305
|
// If any of them are focusable elements
|
|
5030
5306
|
if (this.triggerContentFocusable) {
|
|
@@ -5075,7 +5351,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5075
5351
|
*
|
|
5076
5352
|
* @private
|
|
5077
5353
|
* @method handleDefaultSlot
|
|
5078
|
-
* @param {Event} event - The event object representing the slot change.
|
|
5079
5354
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
5080
5355
|
*/
|
|
5081
5356
|
handleDefaultSlot() {
|
|
@@ -5085,29 +5360,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5085
5360
|
}
|
|
5086
5361
|
}
|
|
5087
5362
|
|
|
5088
|
-
/**
|
|
5089
|
-
* @private
|
|
5090
|
-
* @method handleLabelSlotChange
|
|
5091
|
-
* @param {event} event - The event object representing the slot change.
|
|
5092
|
-
* @description Handles the slot change event for the label slot.
|
|
5093
|
-
*/
|
|
5094
|
-
handleLabelSlotChange (event) {
|
|
5095
|
-
|
|
5096
|
-
// Get the nodes from the event
|
|
5097
|
-
const nodes = event.target.assignedNodes();
|
|
5098
|
-
|
|
5099
|
-
// Guard clause for no nodes
|
|
5100
|
-
if (!nodes) {
|
|
5101
|
-
return;
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
5105
|
-
const nodesArr = Array.from(nodes);
|
|
5106
|
-
|
|
5107
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
5108
|
-
this.labeled = nodesArr.length > 0;
|
|
5109
|
-
}
|
|
5110
|
-
|
|
5111
5363
|
/**
|
|
5112
5364
|
* Returns HTML for the common portion of the layouts.
|
|
5113
5365
|
* @private
|
|
@@ -5120,24 +5372,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5120
5372
|
<div
|
|
5121
5373
|
id="trigger"
|
|
5122
5374
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5123
|
-
tabindex="${this.tabIndex}"
|
|
5375
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5124
5376
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5125
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5126
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5377
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5378
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5127
5379
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5128
5380
|
@focusin="${this.handleFocusin}"
|
|
5129
5381
|
@blur="${this.handleFocusOut}">
|
|
5130
|
-
<div class="triggerContentWrapper">
|
|
5131
|
-
<
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
<div class="triggerContent">
|
|
5135
|
-
<slot
|
|
5136
|
-
name="trigger"
|
|
5137
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5138
|
-
</div>
|
|
5382
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5383
|
+
<slot
|
|
5384
|
+
name="trigger"
|
|
5385
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5139
5386
|
</div>
|
|
5140
|
-
${this.chevron
|
|
5387
|
+
${this.chevron ? u`
|
|
5141
5388
|
<div
|
|
5142
5389
|
id="showStateIcon"
|
|
5143
5390
|
class="chevron"
|
|
@@ -5158,11 +5405,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5158
5405
|
<div id="bibSizer" part="size"></div>
|
|
5159
5406
|
<${this.dropdownBibTag}
|
|
5160
5407
|
id="bib"
|
|
5408
|
+
shape="${this.shape}"
|
|
5161
5409
|
?data-show="${this.isPopoverVisible}"
|
|
5162
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5163
|
-
?common="${this.common}"
|
|
5164
|
-
?rounded="${this.common || this.rounded}"
|
|
5165
|
-
?inset="${this.common || this.inset}">
|
|
5410
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5166
5411
|
<div class="slotContent">
|
|
5167
5412
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5168
5413
|
</div>
|
|
@@ -5177,62 +5422,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5177
5422
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5178
5423
|
*/
|
|
5179
5424
|
renderLayoutClassic() {
|
|
5425
|
+
// TODO: check with Doug why this was never used?
|
|
5426
|
+
const helpTextClasses = {
|
|
5427
|
+
'helpText': true
|
|
5428
|
+
};
|
|
5180
5429
|
|
|
5181
5430
|
return u`
|
|
5182
|
-
|
|
5183
|
-
<div
|
|
5184
|
-
id="trigger"
|
|
5185
|
-
class="trigger"
|
|
5186
|
-
part="trigger"
|
|
5187
|
-
tabindex="${this.tabIndex}"
|
|
5188
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5189
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5190
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5191
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5192
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5193
|
-
>
|
|
5194
|
-
<div class="triggerContentWrapper">
|
|
5195
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5196
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5197
|
-
</label>
|
|
5198
|
-
<div class="triggerContent">
|
|
5199
|
-
<slot
|
|
5200
|
-
name="trigger"
|
|
5201
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5202
|
-
</div>
|
|
5203
|
-
</div>
|
|
5204
|
-
${this.chevron || this.common ? u`
|
|
5205
|
-
<div
|
|
5206
|
-
id="showStateIcon"
|
|
5207
|
-
part="chevron">
|
|
5208
|
-
<${this.iconTag}
|
|
5209
|
-
category="interface"
|
|
5210
|
-
name="chevron-down"
|
|
5211
|
-
?onDark="${this.onDark}"
|
|
5212
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5213
|
-
>
|
|
5214
|
-
</${this.iconTag}>
|
|
5215
|
-
</div>
|
|
5216
|
-
` : undefined }
|
|
5217
|
-
</div>
|
|
5218
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5219
|
-
<slot name="helpText"></slot>
|
|
5220
|
-
</${this.helpTextTag}>
|
|
5221
|
-
|
|
5222
|
-
<div id="bibSizer" part="size"></div>
|
|
5223
|
-
<${this.dropdownBibTag}
|
|
5224
|
-
id="bib"
|
|
5225
|
-
?data-show="${this.isPopoverVisible}"
|
|
5226
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5227
|
-
?common="${this.common}"
|
|
5228
|
-
?rounded="${this.common || this.rounded}"
|
|
5229
|
-
?inset="${this.common || this.inset}"
|
|
5230
|
-
>
|
|
5231
|
-
<div class="slotContent">
|
|
5232
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5233
|
-
</div>
|
|
5234
|
-
</${this.dropdownBibTag}>
|
|
5235
|
-
</div>
|
|
5431
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5236
5432
|
`;
|
|
5237
5433
|
}
|
|
5238
5434
|
|
|
@@ -5300,9 +5496,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5300
5496
|
|
|
5301
5497
|
var dropdownVersion = '3.0.0';
|
|
5302
5498
|
|
|
5303
|
-
var colorCss$
|
|
5499
|
+
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)}`;
|
|
5304
5500
|
|
|
5305
|
-
var styleCss$
|
|
5501
|
+
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)}`;
|
|
5306
5502
|
|
|
5307
5503
|
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)}`;
|
|
5308
5504
|
|
|
@@ -5313,109 +5509,1203 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5313
5509
|
|
|
5314
5510
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5315
5511
|
|
|
5316
|
-
let AuroLibraryRuntimeUtils$
|
|
5512
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5317
5513
|
|
|
5318
5514
|
/* eslint-disable jsdoc/require-param */
|
|
5319
5515
|
|
|
5320
5516
|
/**
|
|
5321
|
-
* This will register a new custom element with the browser.
|
|
5322
|
-
* @param {String} name - The name of the custom element.
|
|
5323
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
5517
|
+
* This will register a new custom element with the browser.
|
|
5518
|
+
* @param {String} name - The name of the custom element.
|
|
5519
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5520
|
+
* @returns {void}
|
|
5521
|
+
*/
|
|
5522
|
+
registerComponent(name, componentClass) {
|
|
5523
|
+
if (!customElements.get(name)) {
|
|
5524
|
+
customElements.define(name, class extends componentClass {});
|
|
5525
|
+
}
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
/**
|
|
5529
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5530
|
+
* @returns {void}
|
|
5531
|
+
*/
|
|
5532
|
+
closestElement(
|
|
5533
|
+
selector, // selector like in .closest()
|
|
5534
|
+
base = this, // extra functionality to skip a parent
|
|
5535
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5536
|
+
!el || el === document || el === window
|
|
5537
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5538
|
+
: found
|
|
5539
|
+
? found // found a selector INside this element
|
|
5540
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5541
|
+
) {
|
|
5542
|
+
return __Closest(base);
|
|
5543
|
+
}
|
|
5544
|
+
/* eslint-enable jsdoc/require-param */
|
|
5545
|
+
|
|
5546
|
+
/**
|
|
5547
|
+
* 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.
|
|
5548
|
+
* @param {Object} elem - The element to check.
|
|
5549
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5550
|
+
* @returns {void}
|
|
5551
|
+
*/
|
|
5552
|
+
handleComponentTagRename(elem, tagName) {
|
|
5553
|
+
const tag = tagName.toLowerCase();
|
|
5554
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5555
|
+
|
|
5556
|
+
if (elemTag !== tag) {
|
|
5557
|
+
elem.setAttribute(tag, true);
|
|
5558
|
+
}
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
/**
|
|
5562
|
+
* Validates if an element is a specific Auro component.
|
|
5563
|
+
* @param {Object} elem - The element to validate.
|
|
5564
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5565
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5566
|
+
*/
|
|
5567
|
+
elementMatch(elem, tagName) {
|
|
5568
|
+
const tag = tagName.toLowerCase();
|
|
5569
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5570
|
+
|
|
5571
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5572
|
+
}
|
|
5573
|
+
};
|
|
5574
|
+
|
|
5575
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5576
|
+
// See LICENSE in the project root for license information.
|
|
5577
|
+
|
|
5578
|
+
|
|
5579
|
+
class AuroDependencyVersioning {
|
|
5580
|
+
|
|
5581
|
+
/**
|
|
5582
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5583
|
+
* @private
|
|
5584
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5585
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5586
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5587
|
+
*/
|
|
5588
|
+
generateElementName(baseName, version) {
|
|
5589
|
+
let result = baseName;
|
|
5590
|
+
|
|
5591
|
+
result += '-';
|
|
5592
|
+
result += version.replace(/[.]/g, '_');
|
|
5593
|
+
|
|
5594
|
+
return result;
|
|
5595
|
+
}
|
|
5596
|
+
|
|
5597
|
+
/**
|
|
5598
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5599
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5600
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5601
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5602
|
+
*/
|
|
5603
|
+
generateTag(baseName, version, tagClass) {
|
|
5604
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5605
|
+
const tag = i`${s(elementName)}`;
|
|
5606
|
+
|
|
5607
|
+
if (!customElements.get(elementName)) {
|
|
5608
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5611
|
+
return tag;
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
|
|
5615
|
+
/**
|
|
5616
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5617
|
+
*/
|
|
5618
|
+
const _observers = new WeakMap();
|
|
5619
|
+
|
|
5620
|
+
/**
|
|
5621
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5622
|
+
* Structure: {
|
|
5623
|
+
* host: {
|
|
5624
|
+
* matchers: Set<Function>,
|
|
5625
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5626
|
+
* }
|
|
5627
|
+
* }
|
|
5628
|
+
*/
|
|
5629
|
+
const _transportConfig = new WeakMap();
|
|
5630
|
+
|
|
5631
|
+
/**
|
|
5632
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5633
|
+
*
|
|
5634
|
+
* @param {Object} params - The parameters for the function.
|
|
5635
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5636
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5637
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5638
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5639
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5640
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5641
|
+
*/
|
|
5642
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5643
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5644
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5645
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5646
|
+
}
|
|
5647
|
+
|
|
5648
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5649
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5650
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5651
|
+
}
|
|
5652
|
+
|
|
5653
|
+
// Guard Clause: Ensure match is a function
|
|
5654
|
+
if (typeof match !== 'function') {
|
|
5655
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5656
|
+
}
|
|
5657
|
+
|
|
5658
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5659
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5660
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5661
|
+
}
|
|
5662
|
+
|
|
5663
|
+
// Register this transport and get cleanup function
|
|
5664
|
+
return _registerTransport({
|
|
5665
|
+
host,
|
|
5666
|
+
target,
|
|
5667
|
+
matcher: match,
|
|
5668
|
+
removeOriginal
|
|
5669
|
+
});
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5672
|
+
/**
|
|
5673
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5674
|
+
*
|
|
5675
|
+
* @param {Object} params - The parameters object.
|
|
5676
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5677
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5678
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5679
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5680
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5681
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5682
|
+
* @private
|
|
5683
|
+
*/
|
|
5684
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5685
|
+
// Initialize config for this host if it doesn't exist
|
|
5686
|
+
if (!_transportConfig.has(host)) {
|
|
5687
|
+
_transportConfig.set(host, {
|
|
5688
|
+
matchers: new Set(),
|
|
5689
|
+
targets: new Map()
|
|
5690
|
+
});
|
|
5691
|
+
}
|
|
5692
|
+
|
|
5693
|
+
const config = _transportConfig.get(host);
|
|
5694
|
+
|
|
5695
|
+
// Add the matcher to the set of matchers for this host
|
|
5696
|
+
config.matchers.add(matcher);
|
|
5697
|
+
|
|
5698
|
+
// Initialize target entry if it doesn't exist
|
|
5699
|
+
if (!config.targets.has(target)) {
|
|
5700
|
+
config.targets.set(target, new Map());
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5703
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5704
|
+
config.targets.get(target).set(matcher, {
|
|
5705
|
+
removeOriginal,
|
|
5706
|
+
currentAttributes: new Map()
|
|
5707
|
+
});
|
|
5708
|
+
|
|
5709
|
+
// Perform initial attribute transport
|
|
5710
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5711
|
+
|
|
5712
|
+
// Attach observer
|
|
5713
|
+
_attachObserver(host);
|
|
5714
|
+
|
|
5715
|
+
// Return cleanup function and utility functions
|
|
5716
|
+
return {
|
|
5717
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5718
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5719
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5720
|
+
}
|
|
5721
|
+
};
|
|
5722
|
+
|
|
5723
|
+
/**
|
|
5724
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5725
|
+
*
|
|
5726
|
+
* @param {HTMLElement} host - The host element
|
|
5727
|
+
* @param {HTMLElement} target - The target element
|
|
5728
|
+
* @param {Function} matcher - The matcher function
|
|
5729
|
+
* @private
|
|
5730
|
+
*/
|
|
5731
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5732
|
+
const config = _transportConfig.get(host);
|
|
5733
|
+
if (!config) return;
|
|
5734
|
+
|
|
5735
|
+
// Remove this matcher from this target
|
|
5736
|
+
const targetMatchers = config.targets.get(target);
|
|
5737
|
+
if (targetMatchers) {
|
|
5738
|
+
targetMatchers.delete(matcher);
|
|
5739
|
+
|
|
5740
|
+
// If this target has no more matchers, remove it
|
|
5741
|
+
if (targetMatchers.size === 0) {
|
|
5742
|
+
config.targets.delete(target);
|
|
5743
|
+
}
|
|
5744
|
+
}
|
|
5745
|
+
|
|
5746
|
+
// Check if this matcher is still used by any target
|
|
5747
|
+
let matcherStillUsed = false;
|
|
5748
|
+
for (const matcherMap of config.targets.values()) {
|
|
5749
|
+
if (matcherMap.has(matcher)) {
|
|
5750
|
+
matcherStillUsed = true;
|
|
5751
|
+
break;
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
// If not used anymore, remove from matchers set
|
|
5756
|
+
if (!matcherStillUsed) {
|
|
5757
|
+
config.matchers.delete(matcher);
|
|
5758
|
+
}
|
|
5759
|
+
|
|
5760
|
+
// If no more targets or matchers, detach observer
|
|
5761
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5762
|
+
_detachObserver(host);
|
|
5763
|
+
}
|
|
5764
|
+
};
|
|
5765
|
+
|
|
5766
|
+
/**
|
|
5767
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5768
|
+
*
|
|
5769
|
+
* @param {Object} params - The parameters object.
|
|
5770
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5771
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5772
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5773
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5774
|
+
* @returns {void}
|
|
5775
|
+
* @private
|
|
5776
|
+
*/
|
|
5777
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5778
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5779
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5780
|
+
.filter(attr => matcher(attr))
|
|
5781
|
+
.reduce((acc, attr) => {
|
|
5782
|
+
acc[attr] = host.getAttribute(attr);
|
|
5783
|
+
return acc;
|
|
5784
|
+
}, {});
|
|
5785
|
+
|
|
5786
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5787
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5788
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5789
|
+
target.setAttribute(key, value);
|
|
5790
|
+
if (removeOriginal) {
|
|
5791
|
+
host.removeAttribute(key);
|
|
5792
|
+
}
|
|
5793
|
+
});
|
|
5794
|
+
};
|
|
5795
|
+
|
|
5796
|
+
/**
|
|
5797
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5798
|
+
*
|
|
5799
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5800
|
+
* @returns {MutationObserver} The observer instance.
|
|
5801
|
+
* @private
|
|
5802
|
+
*/
|
|
5803
|
+
const _attachObserver = (host) => {
|
|
5804
|
+
// If an observer for this host already exists, return it
|
|
5805
|
+
if (_observers.has(host)) {
|
|
5806
|
+
return _observers.get(host);
|
|
5807
|
+
}
|
|
5808
|
+
|
|
5809
|
+
// Create a new MutationObserver
|
|
5810
|
+
const observer = new MutationObserver((mutations) => {
|
|
5811
|
+
const config = _transportConfig.get(host);
|
|
5812
|
+
if (!config) return;
|
|
5813
|
+
|
|
5814
|
+
// For each mutation affecting attributes
|
|
5815
|
+
mutations
|
|
5816
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5817
|
+
.forEach(mutation => {
|
|
5818
|
+
const attributeName = mutation.attributeName;
|
|
5819
|
+
|
|
5820
|
+
// Find matchers that care about this attribute
|
|
5821
|
+
for (const matcher of config.matchers) {
|
|
5822
|
+
if (matcher(attributeName)) {
|
|
5823
|
+
// For each target that uses this matcher
|
|
5824
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5825
|
+
if (matcherConfigs.has(matcher)) {
|
|
5826
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5827
|
+
_transportAttributes({
|
|
5828
|
+
host,
|
|
5829
|
+
target,
|
|
5830
|
+
matcher,
|
|
5831
|
+
removeOriginal
|
|
5832
|
+
});
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
});
|
|
5838
|
+
});
|
|
5839
|
+
|
|
5840
|
+
// Start observing attribute changes
|
|
5841
|
+
observer.observe(host, { attributes: true });
|
|
5842
|
+
|
|
5843
|
+
// Store the observer
|
|
5844
|
+
_observers.set(host, observer);
|
|
5845
|
+
|
|
5846
|
+
return observer;
|
|
5847
|
+
};
|
|
5848
|
+
|
|
5849
|
+
/**
|
|
5850
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5851
|
+
*
|
|
5852
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5853
|
+
* @private
|
|
5854
|
+
*/
|
|
5855
|
+
const _detachObserver = (host) => {
|
|
5856
|
+
if (_observers.has(host)) {
|
|
5857
|
+
const observer = _observers.get(host);
|
|
5858
|
+
observer.disconnect();
|
|
5859
|
+
_observers.delete(host);
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5862
|
+
// Clean up the transport config as well
|
|
5863
|
+
if (_transportConfig.has(host)) {
|
|
5864
|
+
_transportConfig.delete(host);
|
|
5865
|
+
}
|
|
5866
|
+
};
|
|
5867
|
+
|
|
5868
|
+
/**
|
|
5869
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5870
|
+
* @param {HTMLElement} host - The host element
|
|
5871
|
+
* @param {HTMLElement} target - The target element
|
|
5872
|
+
* @param {Function} matcher - The matcher function
|
|
5873
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5874
|
+
* @private
|
|
5875
|
+
*/
|
|
5876
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5877
|
+
const config = _transportConfig.get(host);
|
|
5878
|
+
if (!config) return undefined;
|
|
5879
|
+
|
|
5880
|
+
const targetMatchers = config.targets.get(target);
|
|
5881
|
+
if (!targetMatchers) return undefined;
|
|
5882
|
+
|
|
5883
|
+
return targetMatchers.get(matcher);
|
|
5884
|
+
};
|
|
5885
|
+
|
|
5886
|
+
/**
|
|
5887
|
+
* Sets an observed attribute value
|
|
5888
|
+
* @param {HTMLElement} host - The host element
|
|
5889
|
+
* @param {HTMLElement} target - The target element
|
|
5890
|
+
* @param {Function} matcher - The matcher function
|
|
5891
|
+
* @param {string} key - The attribute name
|
|
5892
|
+
* @param {string} value - The attribute value
|
|
5893
|
+
* @private
|
|
5894
|
+
*/
|
|
5895
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5896
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5897
|
+
if (matcherConfig) {
|
|
5898
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5899
|
+
}
|
|
5900
|
+
};
|
|
5901
|
+
|
|
5902
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5903
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5904
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5905
|
+
return undefined;
|
|
5906
|
+
};
|
|
5907
|
+
|
|
5908
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5909
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5910
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5911
|
+
return [];
|
|
5912
|
+
};
|
|
5913
|
+
|
|
5914
|
+
const _matchers = {
|
|
5915
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5916
|
+
'role': attr => attr.match(/^role$/)
|
|
5917
|
+
};
|
|
5918
|
+
|
|
5919
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5920
|
+
return transportAttributes({
|
|
5921
|
+
host,
|
|
5922
|
+
target,
|
|
5923
|
+
match: attr => {
|
|
5924
|
+
for (const key in _matchers) {
|
|
5925
|
+
if (_matchers[key](attr)) return true;
|
|
5926
|
+
}
|
|
5927
|
+
return false;
|
|
5928
|
+
},
|
|
5929
|
+
removeOriginal
|
|
5930
|
+
});
|
|
5931
|
+
};
|
|
5932
|
+
|
|
5933
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5934
|
+
|
|
5935
|
+
/**
|
|
5936
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5937
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5938
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5939
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5940
|
+
* @private
|
|
5941
|
+
*/
|
|
5942
|
+
attributeWatcher;
|
|
5943
|
+
|
|
5944
|
+
static get properties() {
|
|
5945
|
+
return {
|
|
5946
|
+
|
|
5947
|
+
/**
|
|
5948
|
+
* Defines the layout of an element.
|
|
5949
|
+
* @default {'default'}
|
|
5950
|
+
*/
|
|
5951
|
+
layout: {
|
|
5952
|
+
type: String,
|
|
5953
|
+
attribute: "layout",
|
|
5954
|
+
reflect: true
|
|
5955
|
+
},
|
|
5956
|
+
|
|
5957
|
+
/**
|
|
5958
|
+
* Defines the shape of an element.
|
|
5959
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5960
|
+
* @default {'default'}
|
|
5961
|
+
*/
|
|
5962
|
+
shape: {
|
|
5963
|
+
type: String,
|
|
5964
|
+
attribute: "shape",
|
|
5965
|
+
reflect: true
|
|
5966
|
+
},
|
|
5967
|
+
|
|
5968
|
+
/**
|
|
5969
|
+
* Defines the size of an element.
|
|
5970
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5971
|
+
* @default {'md'}
|
|
5972
|
+
*/
|
|
5973
|
+
size: {
|
|
5974
|
+
type: String,
|
|
5975
|
+
attribute: "size",
|
|
5976
|
+
reflect: true
|
|
5977
|
+
},
|
|
5978
|
+
|
|
5979
|
+
/**
|
|
5980
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5981
|
+
* @default {false}
|
|
5982
|
+
*/
|
|
5983
|
+
onDark: {
|
|
5984
|
+
type: Boolean,
|
|
5985
|
+
attribute: "ondark",
|
|
5986
|
+
reflect: true
|
|
5987
|
+
},
|
|
5988
|
+
|
|
5989
|
+
/**
|
|
5990
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5991
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5992
|
+
* @type {HTMLElement|null}
|
|
5993
|
+
* @default {null}
|
|
5994
|
+
* @private
|
|
5995
|
+
*/
|
|
5996
|
+
wrapper: {
|
|
5997
|
+
attribute: false,
|
|
5998
|
+
reflect: false
|
|
5999
|
+
}
|
|
6000
|
+
};
|
|
6001
|
+
}
|
|
6002
|
+
|
|
6003
|
+
|
|
6004
|
+
|
|
6005
|
+
resetShapeClasses() {
|
|
6006
|
+
if (this.shape && this.size) {
|
|
6007
|
+
|
|
6008
|
+
if (this.wrapper) {
|
|
6009
|
+
this.wrapper.classList.forEach((className) => {
|
|
6010
|
+
if (className.startsWith('shape-')) {
|
|
6011
|
+
this.wrapper.classList.remove(className);
|
|
6012
|
+
}
|
|
6013
|
+
});
|
|
6014
|
+
|
|
6015
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6016
|
+
}
|
|
6017
|
+
}
|
|
6018
|
+
}
|
|
6019
|
+
|
|
6020
|
+
resetLayoutClasses() {
|
|
6021
|
+
if (this.layout) {
|
|
6022
|
+
if (this.wrapper) {
|
|
6023
|
+
this.wrapper.classList.forEach((className) => {
|
|
6024
|
+
if (className.startsWith('layout-')) {
|
|
6025
|
+
this.wrapper.classList.remove(className);
|
|
6026
|
+
}
|
|
6027
|
+
});
|
|
6028
|
+
|
|
6029
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6030
|
+
}
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
|
|
6034
|
+
updateComponentArchitecture() {
|
|
6035
|
+
this.resetLayoutClasses();
|
|
6036
|
+
this.resetShapeClasses();
|
|
6037
|
+
}
|
|
6038
|
+
|
|
6039
|
+
updated(changedProperties) {
|
|
6040
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6041
|
+
this.updateComponentArchitecture();
|
|
6042
|
+
}
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6045
|
+
firstUpdated() {
|
|
6046
|
+
super.firstUpdated();
|
|
6047
|
+
|
|
6048
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6049
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6050
|
+
|
|
6051
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6052
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6053
|
+
}
|
|
6054
|
+
|
|
6055
|
+
disconnectedCallback() {
|
|
6056
|
+
super.disconnectedCallback();
|
|
6057
|
+
|
|
6058
|
+
// Cleanup the ARIA observer if it exists
|
|
6059
|
+
if (this.attributeWatcher) {
|
|
6060
|
+
this.attributeWatcher.cleanup();
|
|
6061
|
+
this.attributeWatcher = null;
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
|
|
6065
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6066
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6067
|
+
render() {
|
|
6068
|
+
try {
|
|
6069
|
+
return this.renderLayout();
|
|
6070
|
+
} catch (error) {
|
|
6071
|
+
// failed to get the defined layout
|
|
6072
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6073
|
+
|
|
6074
|
+
// fallback to the default layout
|
|
6075
|
+
return this.getLayout('default');
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
};
|
|
6079
|
+
|
|
6080
|
+
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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}.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([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset{padding-inline:var(--ds-size-150, 0.75rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-150, 0.75rem)*2)}:host([size=sm]) .inset{padding-inline:var(--ds-size-200, 1rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-200, 1rem)*2)}:host([size=md]) .inset{padding-inline:var(--ds-size-300, 1.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-300, 1.5rem)*2)}:host([size=lg]) .inset{padding-inline:var(--ds-size-400, 2rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-400, 2rem)*2)}:host([size=xl]) .inset{padding-inline:var(--ds-size-500, 2.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-500, 2.5rem)*2)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display: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:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(0.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}`;
|
|
6081
|
+
|
|
6082
|
+
var colorCss$2$1 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.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,.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,.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,.auro-button:not([ondark])[variant=ghost]:focus-visible{border-color:transparent;--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,.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,.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,.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,.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));--ds-auro-button-border-color: transparent}.auro-button[ondark][variant=ghost]:focus,.auro-button[ondark][variant=ghost]:focus-visible{border-color:transparent;--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,.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)}`;
|
|
6083
|
+
|
|
6084
|
+
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}`;
|
|
6085
|
+
|
|
6086
|
+
var shapeSize = i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;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;overflow:hidden;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;overflow:hidden;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-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;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-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.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;overflow:hidden;border-radius:24px 0 0 24px}.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;overflow:hidden;border-radius:0 24px 24px 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}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}`;
|
|
6087
|
+
|
|
6088
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6089
|
+
// See LICENSE in the project root for license information.
|
|
6090
|
+
|
|
6091
|
+
// ---------------------------------------------------------------------
|
|
6092
|
+
|
|
6093
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6094
|
+
|
|
6095
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6096
|
+
|
|
6097
|
+
/* eslint-disable jsdoc/require-param */
|
|
6098
|
+
|
|
6099
|
+
/**
|
|
6100
|
+
* This will register a new custom element with the browser.
|
|
6101
|
+
* @param {String} name - The name of the custom element.
|
|
6102
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6103
|
+
* @returns {void}
|
|
6104
|
+
*/
|
|
6105
|
+
registerComponent(name, componentClass) {
|
|
6106
|
+
if (!customElements.get(name)) {
|
|
6107
|
+
customElements.define(name, class extends componentClass {});
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
|
|
6111
|
+
/**
|
|
6112
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6113
|
+
* @returns {void}
|
|
6114
|
+
*/
|
|
6115
|
+
closestElement(
|
|
6116
|
+
selector, // selector like in .closest()
|
|
6117
|
+
base = this, // extra functionality to skip a parent
|
|
6118
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6119
|
+
!el || el === document || el === window
|
|
6120
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6121
|
+
: found
|
|
6122
|
+
? found // found a selector INside this element
|
|
6123
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6124
|
+
) {
|
|
6125
|
+
return __Closest(base);
|
|
6126
|
+
}
|
|
6127
|
+
/* eslint-enable jsdoc/require-param */
|
|
6128
|
+
|
|
6129
|
+
/**
|
|
6130
|
+
* 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.
|
|
6131
|
+
* @param {Object} elem - The element to check.
|
|
6132
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6133
|
+
* @returns {void}
|
|
6134
|
+
*/
|
|
6135
|
+
handleComponentTagRename(elem, tagName) {
|
|
6136
|
+
const tag = tagName.toLowerCase();
|
|
6137
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6138
|
+
|
|
6139
|
+
if (elemTag !== tag) {
|
|
6140
|
+
elem.setAttribute(tag, true);
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6144
|
+
/**
|
|
6145
|
+
* Validates if an element is a specific Auro component.
|
|
6146
|
+
* @param {Object} elem - The element to validate.
|
|
6147
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6148
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6149
|
+
*/
|
|
6150
|
+
elementMatch(elem, tagName) {
|
|
6151
|
+
const tag = tagName.toLowerCase();
|
|
6152
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6153
|
+
|
|
6154
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6155
|
+
}
|
|
6156
|
+
};
|
|
6157
|
+
|
|
6158
|
+
var styleCss$2$1 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}: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}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}`;
|
|
6159
|
+
|
|
6160
|
+
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}`;
|
|
6161
|
+
|
|
6162
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6163
|
+
|
|
6164
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6165
|
+
// See LICENSE in the project root for license information.
|
|
6166
|
+
|
|
6167
|
+
|
|
6168
|
+
class AuroLoader extends i$2 {
|
|
6169
|
+
constructor() {
|
|
6170
|
+
super();
|
|
6171
|
+
|
|
6172
|
+
/**
|
|
6173
|
+
* @private
|
|
6174
|
+
*/
|
|
6175
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6176
|
+
|
|
6177
|
+
/**
|
|
6178
|
+
* @private
|
|
6179
|
+
*/
|
|
6180
|
+
this.mdCount = 3;
|
|
6181
|
+
|
|
6182
|
+
/**
|
|
6183
|
+
* @private
|
|
6184
|
+
*/
|
|
6185
|
+
this.smCount = 2;
|
|
6186
|
+
|
|
6187
|
+
/**
|
|
6188
|
+
* @private
|
|
6189
|
+
*/
|
|
6190
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6191
|
+
|
|
6192
|
+
this.orbit = false;
|
|
6193
|
+
this.ringworm = false;
|
|
6194
|
+
this.laser = false;
|
|
6195
|
+
this.pulse = false;
|
|
6196
|
+
}
|
|
6197
|
+
|
|
6198
|
+
// function to define props used within the scope of this component
|
|
6199
|
+
static get properties() {
|
|
6200
|
+
return {
|
|
6201
|
+
|
|
6202
|
+
/**
|
|
6203
|
+
* Sets loader to laser type.
|
|
6204
|
+
*/
|
|
6205
|
+
laser: {
|
|
6206
|
+
type: Boolean,
|
|
6207
|
+
reflect: true
|
|
6208
|
+
},
|
|
6209
|
+
|
|
6210
|
+
/**
|
|
6211
|
+
* Sets loader to orbit type.
|
|
6212
|
+
*/
|
|
6213
|
+
orbit: {
|
|
6214
|
+
type: Boolean,
|
|
6215
|
+
reflect: true
|
|
6216
|
+
},
|
|
6217
|
+
|
|
6218
|
+
/**
|
|
6219
|
+
* Sets loader to pulse type.
|
|
6220
|
+
*/
|
|
6221
|
+
pulse: {
|
|
6222
|
+
type: Boolean,
|
|
6223
|
+
reflect: true
|
|
6224
|
+
},
|
|
6225
|
+
|
|
6226
|
+
/**
|
|
6227
|
+
* Sets loader to ringworm type.
|
|
6228
|
+
*/
|
|
6229
|
+
ringworm: {
|
|
6230
|
+
type: Boolean,
|
|
6231
|
+
reflect: true
|
|
6232
|
+
}
|
|
6233
|
+
};
|
|
6234
|
+
}
|
|
6235
|
+
|
|
6236
|
+
static get styles() {
|
|
6237
|
+
return [
|
|
6238
|
+
i$5`${styleCss$2$1}`,
|
|
6239
|
+
i$5`${colorCss$1$1}`,
|
|
6240
|
+
i$5`${tokensCss$1$1}`
|
|
6241
|
+
];
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
/**
|
|
6245
|
+
* This will register this element with the browser.
|
|
6246
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6247
|
+
*
|
|
6248
|
+
* @example
|
|
6249
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6250
|
+
*
|
|
6251
|
+
*/
|
|
6252
|
+
static register(name = "auro-loader") {
|
|
6253
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6254
|
+
}
|
|
6255
|
+
|
|
6256
|
+
firstUpdated() {
|
|
6257
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6258
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6259
|
+
}
|
|
6260
|
+
|
|
6261
|
+
connectedCallback() {
|
|
6262
|
+
super.connectedCallback();
|
|
6263
|
+
}
|
|
6264
|
+
|
|
6265
|
+
/**
|
|
6266
|
+
* @private
|
|
6267
|
+
* @returns {Array} Numbered array for template map.
|
|
6268
|
+
*/
|
|
6269
|
+
defineTemplate() {
|
|
6270
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6271
|
+
|
|
6272
|
+
if (this.orbit || this.laser) {
|
|
6273
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6274
|
+
} else if (this.ringworm) {
|
|
6275
|
+
nodes = Array.from(Array(0).keys());
|
|
6276
|
+
}
|
|
6277
|
+
|
|
6278
|
+
return nodes;
|
|
6279
|
+
}
|
|
6280
|
+
|
|
6281
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6282
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6283
|
+
|
|
6284
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6285
|
+
render() {
|
|
6286
|
+
return x`
|
|
6287
|
+
${this.defineTemplate().map((idx) => x`
|
|
6288
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6289
|
+
`)}
|
|
6290
|
+
|
|
6291
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6292
|
+
|
|
6293
|
+
${this.ringworm ? x`
|
|
6294
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6295
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6296
|
+
</svg>`
|
|
6297
|
+
: ``
|
|
6298
|
+
}
|
|
6299
|
+
`;
|
|
6300
|
+
}
|
|
6301
|
+
}
|
|
6302
|
+
|
|
6303
|
+
var loaderVersion = '5.1.0';
|
|
6304
|
+
|
|
6305
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6306
|
+
// See LICENSE in the project root for license information.
|
|
6307
|
+
|
|
6308
|
+
|
|
6309
|
+
/**
|
|
6310
|
+
* @slot - Default slot for the text of the button.
|
|
6311
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6312
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6313
|
+
* @csspart text - Apply CSS to text slot.
|
|
6314
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6315
|
+
*/
|
|
6316
|
+
|
|
6317
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6318
|
+
|
|
6319
|
+
/**
|
|
6320
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6321
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6322
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6323
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6324
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6325
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6326
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6327
|
+
*/
|
|
6328
|
+
class AuroButton extends AuroElement$1 {
|
|
6329
|
+
|
|
6330
|
+
/**
|
|
6331
|
+
* Enables form association for this element.
|
|
6332
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6333
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6334
|
+
*/
|
|
6335
|
+
static get formAssociated() {
|
|
6336
|
+
return true;
|
|
6337
|
+
}
|
|
6338
|
+
|
|
6339
|
+
constructor() {
|
|
6340
|
+
super();
|
|
6341
|
+
this.autofocus = false;
|
|
6342
|
+
this.disabled = false;
|
|
6343
|
+
this.loading = false;
|
|
6344
|
+
this.size = "md";
|
|
6345
|
+
this.shape = "rounded";
|
|
6346
|
+
this.onDark = false;
|
|
6347
|
+
this.fluid = false;
|
|
6348
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6349
|
+
this.variant = 'primary';
|
|
6350
|
+
|
|
6351
|
+
// Support for HTML5 forms
|
|
6352
|
+
if (typeof this.attachInternals === 'function') {
|
|
6353
|
+
this.internals = this.attachInternals();
|
|
6354
|
+
} else {
|
|
6355
|
+
this.internals = null;
|
|
6356
|
+
|
|
6357
|
+
// eslint-disable-next-line no-console
|
|
6358
|
+
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.');
|
|
6359
|
+
}
|
|
6360
|
+
|
|
6361
|
+
/**
|
|
6362
|
+
* Generate unique names for dependency components.
|
|
6363
|
+
*/
|
|
6364
|
+
const versioning = new AuroDependencyVersioning();
|
|
6365
|
+
|
|
6366
|
+
/**
|
|
6367
|
+
* @private
|
|
6368
|
+
*/
|
|
6369
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6370
|
+
|
|
6371
|
+
/**
|
|
6372
|
+
* @private
|
|
6373
|
+
*/
|
|
6374
|
+
this.buttonHref = undefined;
|
|
6375
|
+
|
|
6376
|
+
/**
|
|
6377
|
+
* @private
|
|
6378
|
+
*/
|
|
6379
|
+
this.buttonTarget = undefined;
|
|
6380
|
+
|
|
6381
|
+
/**
|
|
6382
|
+
* @private
|
|
6383
|
+
*/
|
|
6384
|
+
this.buttonRel = undefined;
|
|
6385
|
+
}
|
|
6386
|
+
|
|
6387
|
+
static get styles() {
|
|
6388
|
+
return [
|
|
6389
|
+
tokensCss$2$1,
|
|
6390
|
+
styleCss$3$1,
|
|
6391
|
+
colorCss$2$1,
|
|
6392
|
+
shapeSize
|
|
6393
|
+
];
|
|
6394
|
+
}
|
|
6395
|
+
|
|
6396
|
+
static get properties() {
|
|
6397
|
+
return {
|
|
6398
|
+
|
|
6399
|
+
...super.properties,
|
|
6400
|
+
|
|
6401
|
+
/**
|
|
6402
|
+
* Override layout since it isn't used in this component.
|
|
6403
|
+
* @private
|
|
6404
|
+
*/
|
|
6405
|
+
layout: {
|
|
6406
|
+
type: Boolean,
|
|
6407
|
+
attribute: false,
|
|
6408
|
+
reflect: false
|
|
6409
|
+
},
|
|
6410
|
+
|
|
6411
|
+
/**
|
|
6412
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6413
|
+
*/
|
|
6414
|
+
autofocus: {
|
|
6415
|
+
type: Boolean,
|
|
6416
|
+
reflect: true
|
|
6417
|
+
},
|
|
6418
|
+
|
|
6419
|
+
/**
|
|
6420
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6421
|
+
*/
|
|
6422
|
+
disabled: {
|
|
6423
|
+
type: Boolean,
|
|
6424
|
+
reflect: true
|
|
6425
|
+
},
|
|
6426
|
+
|
|
6427
|
+
/**
|
|
6428
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6429
|
+
*/
|
|
6430
|
+
fluid: {
|
|
6431
|
+
type: Boolean,
|
|
6432
|
+
reflect: true
|
|
6433
|
+
},
|
|
6434
|
+
|
|
6435
|
+
/**
|
|
6436
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6437
|
+
*/
|
|
6438
|
+
loading: {
|
|
6439
|
+
type: Boolean,
|
|
6440
|
+
reflect: true
|
|
6441
|
+
},
|
|
6442
|
+
|
|
6443
|
+
/**
|
|
6444
|
+
* 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.
|
|
6445
|
+
*/
|
|
6446
|
+
loadingText: {
|
|
6447
|
+
type: String
|
|
6448
|
+
},
|
|
6449
|
+
|
|
6450
|
+
/**
|
|
6451
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6452
|
+
*/
|
|
6453
|
+
tIndex: {
|
|
6454
|
+
type: String,
|
|
6455
|
+
reflect: true
|
|
6456
|
+
},
|
|
6457
|
+
|
|
6458
|
+
/**
|
|
6459
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6460
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6461
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6462
|
+
*/
|
|
6463
|
+
tabindex: {
|
|
6464
|
+
type: String,
|
|
6465
|
+
reflect: false
|
|
6466
|
+
},
|
|
6467
|
+
|
|
6468
|
+
/**
|
|
6469
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6470
|
+
*/
|
|
6471
|
+
title: {
|
|
6472
|
+
type: String,
|
|
6473
|
+
reflect: true
|
|
6474
|
+
},
|
|
6475
|
+
|
|
6476
|
+
/**
|
|
6477
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6478
|
+
*/
|
|
6479
|
+
type: {
|
|
6480
|
+
type: String,
|
|
6481
|
+
reflect: true
|
|
6482
|
+
},
|
|
6483
|
+
|
|
6484
|
+
/**
|
|
6485
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6486
|
+
*/
|
|
6487
|
+
value: {
|
|
6488
|
+
type: String,
|
|
6489
|
+
reflect: true
|
|
6490
|
+
},
|
|
6491
|
+
|
|
6492
|
+
/**
|
|
6493
|
+
* Sets button variant option.
|
|
6494
|
+
* @default primary
|
|
6495
|
+
*/
|
|
6496
|
+
variant: {
|
|
6497
|
+
type: String,
|
|
6498
|
+
reflect: true
|
|
6499
|
+
},
|
|
6500
|
+
|
|
6501
|
+
/**
|
|
6502
|
+
* @private
|
|
6503
|
+
*/
|
|
6504
|
+
buttonHref: {
|
|
6505
|
+
type: String,
|
|
6506
|
+
},
|
|
6507
|
+
|
|
6508
|
+
/**
|
|
6509
|
+
* @private
|
|
6510
|
+
*/
|
|
6511
|
+
buttonTarget: {
|
|
6512
|
+
type: String,
|
|
6513
|
+
},
|
|
6514
|
+
|
|
6515
|
+
/**
|
|
6516
|
+
* @private
|
|
6517
|
+
*/
|
|
6518
|
+
buttonRel: {
|
|
6519
|
+
type: String,
|
|
6520
|
+
},
|
|
6521
|
+
};
|
|
6522
|
+
}
|
|
6523
|
+
|
|
6524
|
+
/**
|
|
6525
|
+
* This will register this element with the browser.
|
|
6526
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6527
|
+
*
|
|
6528
|
+
* @example
|
|
6529
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6530
|
+
*
|
|
6531
|
+
*/
|
|
6532
|
+
static register(name = "auro-button") {
|
|
6533
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
/**
|
|
6537
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6538
|
+
* @private
|
|
5324
6539
|
* @returns {void}
|
|
5325
6540
|
*/
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
customElements.define(name, class extends componentClass {});
|
|
5329
|
-
}
|
|
6541
|
+
focus() {
|
|
6542
|
+
this.renderRoot.querySelector('button').focus();
|
|
5330
6543
|
}
|
|
5331
6544
|
|
|
5332
6545
|
/**
|
|
5333
|
-
*
|
|
6546
|
+
* Submits the form that this button is associated with.
|
|
6547
|
+
* @private
|
|
5334
6548
|
* @returns {void}
|
|
5335
6549
|
*/
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
!el || el === document || el === window
|
|
5341
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
5342
|
-
: found
|
|
5343
|
-
? found // found a selector INside this element
|
|
5344
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5345
|
-
) {
|
|
5346
|
-
return __Closest(base);
|
|
6550
|
+
surfaceSubmitEvent() {
|
|
6551
|
+
if (this.form) {
|
|
6552
|
+
this.form.requestSubmit();
|
|
6553
|
+
}
|
|
5347
6554
|
}
|
|
5348
|
-
/* eslint-enable jsdoc/require-param */
|
|
5349
6555
|
|
|
5350
6556
|
/**
|
|
5351
|
-
*
|
|
5352
|
-
* @
|
|
5353
|
-
* @
|
|
5354
|
-
* @returns {void}
|
|
6557
|
+
* Returns the form element that this button is associated with.
|
|
6558
|
+
* @private
|
|
6559
|
+
* @returns {HTMLFormElement | null}
|
|
5355
6560
|
*/
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
6561
|
+
get form() {
|
|
6562
|
+
return this.internals ? this.internals.form : null;
|
|
6563
|
+
}
|
|
5359
6564
|
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
6565
|
+
/**
|
|
6566
|
+
* @private
|
|
6567
|
+
* @returns {Boolean}
|
|
6568
|
+
*/
|
|
6569
|
+
get showText() {
|
|
6570
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5363
6571
|
}
|
|
5364
6572
|
|
|
5365
6573
|
/**
|
|
5366
|
-
*
|
|
5367
|
-
* @
|
|
5368
|
-
* @
|
|
5369
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6574
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6575
|
+
* @returns {string | undefined}
|
|
6576
|
+
* @private
|
|
5370
6577
|
*/
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6578
|
+
get currentAriaLabel() {
|
|
6579
|
+
if (!this.attributeWatcher) return undefined;
|
|
5374
6580
|
|
|
5375
|
-
|
|
6581
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6582
|
+
return ariaLabel || undefined;
|
|
5376
6583
|
}
|
|
5377
|
-
};
|
|
5378
6584
|
|
|
5379
|
-
|
|
5380
|
-
|
|
6585
|
+
/**
|
|
6586
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6587
|
+
* @returns {string | undefined}
|
|
6588
|
+
* @private
|
|
6589
|
+
*/
|
|
6590
|
+
get currentAriaLabelledBy() {
|
|
6591
|
+
if (!this.attributeWatcher) return undefined;
|
|
5381
6592
|
|
|
6593
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6594
|
+
return ariaLabelledBy || undefined;
|
|
6595
|
+
}
|
|
5382
6596
|
|
|
5383
|
-
|
|
6597
|
+
/**
|
|
6598
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6599
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6600
|
+
* @private
|
|
6601
|
+
*/
|
|
6602
|
+
get iconOnly() {
|
|
6603
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6604
|
+
}
|
|
5384
6605
|
|
|
5385
6606
|
/**
|
|
5386
|
-
*
|
|
6607
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6608
|
+
* @returns {string} - The font size class name.
|
|
5387
6609
|
* @private
|
|
5388
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5389
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5390
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5391
6610
|
*/
|
|
5392
|
-
|
|
5393
|
-
let result = baseName;
|
|
6611
|
+
getFontSize() {
|
|
5394
6612
|
|
|
5395
|
-
|
|
5396
|
-
|
|
6613
|
+
// Size map for standard buttons
|
|
6614
|
+
const standardButtonSizeMap = {
|
|
6615
|
+
xs: 'body-xs',
|
|
6616
|
+
sm: 'body-sm',
|
|
6617
|
+
md: 'body-default',
|
|
6618
|
+
lg: 'body-lg',
|
|
6619
|
+
xl: 'body-lg'
|
|
6620
|
+
};
|
|
5397
6621
|
|
|
5398
|
-
|
|
6622
|
+
// Size map for icon-only buttons
|
|
6623
|
+
const iconOnlyButtonSizeMap = {
|
|
6624
|
+
xs: 'heading-xs',
|
|
6625
|
+
sm: 'heading-sm',
|
|
6626
|
+
md: 'heading-sm',
|
|
6627
|
+
lg: 'heading-md',
|
|
6628
|
+
xl: 'heading-lg'
|
|
6629
|
+
};
|
|
6630
|
+
|
|
6631
|
+
// Determine which map to use based on the shape
|
|
6632
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6633
|
+
|
|
6634
|
+
// Return the font size based on the button size and shape
|
|
6635
|
+
return sizeMap[this.size] || 'body-default';
|
|
5399
6636
|
}
|
|
5400
6637
|
|
|
5401
6638
|
/**
|
|
5402
|
-
*
|
|
5403
|
-
* @
|
|
5404
|
-
* @
|
|
5405
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6639
|
+
* Renders the default layout for the button.
|
|
6640
|
+
* @returns {TemplateResult}
|
|
6641
|
+
* @private
|
|
5406
6642
|
*/
|
|
5407
|
-
|
|
5408
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5409
|
-
const tag = i`${s(elementName)}`;
|
|
6643
|
+
renderLayoutDefault() {
|
|
5410
6644
|
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
6645
|
+
const fontSize = this.getFontSize();
|
|
6646
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6647
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5414
6648
|
|
|
5415
|
-
|
|
6649
|
+
const classes = {
|
|
6650
|
+
"auro-button": true,
|
|
6651
|
+
"inset": this.showText,
|
|
6652
|
+
wrapper: true,
|
|
6653
|
+
loading: this.loading,
|
|
6654
|
+
[`${fontSize}`]: true,
|
|
6655
|
+
|
|
6656
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6657
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6658
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6659
|
+
};
|
|
6660
|
+
|
|
6661
|
+
const contentClasses = {
|
|
6662
|
+
"contentWrapper": true,
|
|
6663
|
+
"util_displayHiddenVisually": this.loading
|
|
6664
|
+
};
|
|
6665
|
+
|
|
6666
|
+
return u`
|
|
6667
|
+
<${tag}
|
|
6668
|
+
part="${part}"
|
|
6669
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6670
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6671
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6672
|
+
?autofocus="${this.autofocus}"
|
|
6673
|
+
class=${e(classes)}
|
|
6674
|
+
?disabled="${this.disabled || this.loading}"
|
|
6675
|
+
?onDark="${this.onDark}"
|
|
6676
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6677
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6678
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6679
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6680
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6681
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6682
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6683
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6684
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6685
|
+
>
|
|
6686
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6687
|
+
|
|
6688
|
+
<span class="${e(contentClasses)}">
|
|
6689
|
+
<span class="textSlot" part="text">
|
|
6690
|
+
<slot></slot>
|
|
6691
|
+
</span>
|
|
6692
|
+
</span>
|
|
6693
|
+
</${tag}>
|
|
6694
|
+
`;
|
|
6695
|
+
}
|
|
6696
|
+
|
|
6697
|
+
/**
|
|
6698
|
+
* Renders the layout of the button.
|
|
6699
|
+
* @returns {TemplateResult}
|
|
6700
|
+
* @private
|
|
6701
|
+
*/
|
|
6702
|
+
renderLayout() {
|
|
6703
|
+
return this.renderLayoutDefault();
|
|
5416
6704
|
}
|
|
5417
6705
|
}
|
|
5418
6706
|
|
|
6707
|
+
var buttonVersion = '11.3.0';
|
|
6708
|
+
|
|
5419
6709
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5420
6710
|
// See LICENSE in the project root for license information.
|
|
5421
6711
|
|
|
@@ -5426,7 +6716,7 @@ class AuroDependencyVersioning {
|
|
|
5426
6716
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5427
6717
|
*/
|
|
5428
6718
|
|
|
5429
|
-
let AuroElement$
|
|
6719
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
5430
6720
|
|
|
5431
6721
|
// function to define props used within the scope of this component
|
|
5432
6722
|
static get properties() {
|
|
@@ -5494,7 +6784,7 @@ var styleCss$1$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
5494
6784
|
*/
|
|
5495
6785
|
|
|
5496
6786
|
// build the component class
|
|
5497
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
6787
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
5498
6788
|
constructor() {
|
|
5499
6789
|
super();
|
|
5500
6790
|
this.onDark = false;
|
|
@@ -5577,7 +6867,7 @@ var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5577
6867
|
|
|
5578
6868
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5579
6869
|
|
|
5580
|
-
let AuroLibraryRuntimeUtils$
|
|
6870
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5581
6871
|
|
|
5582
6872
|
/* eslint-disable jsdoc/require-param */
|
|
5583
6873
|
|
|
@@ -5659,7 +6949,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5659
6949
|
*/
|
|
5660
6950
|
privateDefaults() {
|
|
5661
6951
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5662
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6952
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5663
6953
|
}
|
|
5664
6954
|
|
|
5665
6955
|
// function to define props used within the scope of this component
|
|
@@ -5741,7 +7031,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5741
7031
|
*
|
|
5742
7032
|
*/
|
|
5743
7033
|
static register(name = "auro-icon") {
|
|
5744
|
-
AuroLibraryRuntimeUtils$
|
|
7034
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
5745
7035
|
}
|
|
5746
7036
|
|
|
5747
7037
|
connectedCallback() {
|
|
@@ -5762,8 +7052,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5762
7052
|
async firstUpdated() {
|
|
5763
7053
|
await super.firstUpdated();
|
|
5764
7054
|
|
|
5765
|
-
|
|
5766
|
-
|
|
7055
|
+
/**
|
|
7056
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
7057
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
7058
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
7059
|
+
*/
|
|
7060
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5767
7061
|
const svgDesc = this.svg.querySelector('desc');
|
|
5768
7062
|
|
|
5769
7063
|
if (svgDesc) {
|
|
@@ -5807,7 +7101,77 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5807
7101
|
}
|
|
5808
7102
|
};
|
|
5809
7103
|
|
|
5810
|
-
var iconVersion$1 = '8.0.
|
|
7104
|
+
var iconVersion$1 = '8.0.4';
|
|
7105
|
+
|
|
7106
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7107
|
+
// See LICENSE in the project root for license information.
|
|
7108
|
+
|
|
7109
|
+
// ---------------------------------------------------------------------
|
|
7110
|
+
|
|
7111
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7112
|
+
|
|
7113
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7114
|
+
|
|
7115
|
+
/* eslint-disable jsdoc/require-param */
|
|
7116
|
+
|
|
7117
|
+
/**
|
|
7118
|
+
* This will register a new custom element with the browser.
|
|
7119
|
+
* @param {String} name - The name of the custom element.
|
|
7120
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7121
|
+
* @returns {void}
|
|
7122
|
+
*/
|
|
7123
|
+
registerComponent(name, componentClass) {
|
|
7124
|
+
if (!customElements.get(name)) {
|
|
7125
|
+
customElements.define(name, class extends componentClass {});
|
|
7126
|
+
}
|
|
7127
|
+
}
|
|
7128
|
+
|
|
7129
|
+
/**
|
|
7130
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7131
|
+
* @returns {void}
|
|
7132
|
+
*/
|
|
7133
|
+
closestElement(
|
|
7134
|
+
selector, // selector like in .closest()
|
|
7135
|
+
base = this, // extra functionality to skip a parent
|
|
7136
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7137
|
+
!el || el === document || el === window
|
|
7138
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7139
|
+
: found
|
|
7140
|
+
? found // found a selector INside this element
|
|
7141
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7142
|
+
) {
|
|
7143
|
+
return __Closest(base);
|
|
7144
|
+
}
|
|
7145
|
+
/* eslint-enable jsdoc/require-param */
|
|
7146
|
+
|
|
7147
|
+
/**
|
|
7148
|
+
* 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.
|
|
7149
|
+
* @param {Object} elem - The element to check.
|
|
7150
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7151
|
+
* @returns {void}
|
|
7152
|
+
*/
|
|
7153
|
+
handleComponentTagRename(elem, tagName) {
|
|
7154
|
+
const tag = tagName.toLowerCase();
|
|
7155
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7156
|
+
|
|
7157
|
+
if (elemTag !== tag) {
|
|
7158
|
+
elem.setAttribute(tag, true);
|
|
7159
|
+
}
|
|
7160
|
+
}
|
|
7161
|
+
|
|
7162
|
+
/**
|
|
7163
|
+
* Validates if an element is a specific Auro component.
|
|
7164
|
+
* @param {Object} elem - The element to validate.
|
|
7165
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7166
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7167
|
+
*/
|
|
7168
|
+
elementMatch(elem, tagName) {
|
|
7169
|
+
const tag = tagName.toLowerCase();
|
|
7170
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7171
|
+
|
|
7172
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7173
|
+
}
|
|
7174
|
+
};
|
|
5811
7175
|
|
|
5812
7176
|
var styleCss$5 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
5813
7177
|
|
|
@@ -5838,7 +7202,7 @@ class AuroHeader extends i$2 {
|
|
|
5838
7202
|
/**
|
|
5839
7203
|
* @private
|
|
5840
7204
|
*/
|
|
5841
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7205
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5842
7206
|
}
|
|
5843
7207
|
|
|
5844
7208
|
// function to define props used within the scope of this component
|
|
@@ -5868,7 +7232,7 @@ class AuroHeader extends i$2 {
|
|
|
5868
7232
|
*
|
|
5869
7233
|
*/
|
|
5870
7234
|
static register(name = "auro-header") {
|
|
5871
|
-
AuroLibraryRuntimeUtils$
|
|
7235
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5872
7236
|
}
|
|
5873
7237
|
|
|
5874
7238
|
firstUpdated() {
|
|
@@ -5964,17 +7328,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
5964
7328
|
|
|
5965
7329
|
this.large = false;
|
|
5966
7330
|
|
|
5967
|
-
AuroLibraryRuntimeUtils$
|
|
7331
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5968
7332
|
|
|
5969
7333
|
const versioning = new AuroDependencyVersioning();
|
|
7334
|
+
|
|
7335
|
+
/**
|
|
7336
|
+
* @private
|
|
7337
|
+
*/
|
|
5970
7338
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
7339
|
+
|
|
7340
|
+
/**
|
|
7341
|
+
* @private
|
|
7342
|
+
*/
|
|
5971
7343
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7344
|
+
|
|
7345
|
+
/**
|
|
7346
|
+
* @private
|
|
7347
|
+
*/
|
|
7348
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5972
7349
|
}
|
|
5973
7350
|
|
|
5974
7351
|
static get styles() {
|
|
5975
7352
|
return [
|
|
5976
|
-
colorCss$
|
|
5977
|
-
styleCss$
|
|
7353
|
+
colorCss$3$1,
|
|
7354
|
+
styleCss$4$1,
|
|
5978
7355
|
tokenCss
|
|
5979
7356
|
];
|
|
5980
7357
|
}
|
|
@@ -6003,7 +7380,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6003
7380
|
*
|
|
6004
7381
|
*/
|
|
6005
7382
|
static register(name = "auro-bibtemplate") {
|
|
6006
|
-
AuroLibraryRuntimeUtils$
|
|
7383
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
6007
7384
|
}
|
|
6008
7385
|
|
|
6009
7386
|
/**
|
|
@@ -6061,9 +7438,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6061
7438
|
<div id="bibTemplate" part="bibtemplate">
|
|
6062
7439
|
${this.isFullscreen ? u`
|
|
6063
7440
|
<div id="headerContainer">
|
|
6064
|
-
|
|
7441
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
6065
7442
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
6066
|
-
|
|
7443
|
+
</${this.buttonTag}>
|
|
6067
7444
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
6068
7445
|
<slot name="header"></slot>
|
|
6069
7446
|
</${this.headerTag}>
|
|
@@ -6087,9 +7464,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6087
7464
|
|
|
6088
7465
|
var bibTemplateVersion = '1.0.0';
|
|
6089
7466
|
|
|
6090
|
-
var colorCss$3 = 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-
|
|
7467
|
+
var colorCss$3 = 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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6091
7468
|
|
|
6092
|
-
var styleCss$4 = i$5
|
|
7469
|
+
var styleCss$4 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6093
7470
|
|
|
6094
7471
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6095
7472
|
|
|
@@ -6295,68 +7672,7 @@ class AuroHelpText extends i$2 {
|
|
|
6295
7672
|
|
|
6296
7673
|
var helpTextVersion = '1.0.0';
|
|
6297
7674
|
|
|
6298
|
-
i$5
|
|
6299
|
-
|
|
6300
|
-
i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
6301
|
-
|
|
6302
|
-
i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
6303
|
-
|
|
6304
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6305
|
-
// See LICENSE in the project root for license information.
|
|
6306
|
-
|
|
6307
|
-
// ---------------------------------------------------------------------
|
|
6308
|
-
|
|
6309
|
-
/**
|
|
6310
|
-
* Converts value to an array.
|
|
6311
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6312
|
-
* If the value is already an array, it is returned.
|
|
6313
|
-
* If the value is undefined, it returns undefined.
|
|
6314
|
-
* @private
|
|
6315
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6316
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6317
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6318
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6319
|
-
*/
|
|
6320
|
-
function arrayConverter(value) {
|
|
6321
|
-
// Allow undefined
|
|
6322
|
-
if (value === undefined) {
|
|
6323
|
-
return undefined;
|
|
6324
|
-
}
|
|
6325
|
-
|
|
6326
|
-
// Return the value if it is already an array
|
|
6327
|
-
if (Array.isArray(value)) {
|
|
6328
|
-
return value;
|
|
6329
|
-
}
|
|
6330
|
-
|
|
6331
|
-
try {
|
|
6332
|
-
// If value is a JSON string, parse it
|
|
6333
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6334
|
-
|
|
6335
|
-
// Check if the parsed value is an array
|
|
6336
|
-
if (Array.isArray(parsed)) {
|
|
6337
|
-
return parsed;
|
|
6338
|
-
}
|
|
6339
|
-
} catch (error) {
|
|
6340
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6341
|
-
/* eslint-disable no-console */
|
|
6342
|
-
console.error('JSON parsing failed:', error);
|
|
6343
|
-
}
|
|
6344
|
-
|
|
6345
|
-
// Throw error if the input is not an array or undefined
|
|
6346
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6347
|
-
}
|
|
6348
|
-
|
|
6349
|
-
i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
6350
|
-
|
|
6351
|
-
i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
6352
|
-
|
|
6353
|
-
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}`;
|
|
6354
|
-
|
|
6355
|
-
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)}`;
|
|
6356
|
-
|
|
6357
|
-
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)}`;
|
|
6358
|
-
|
|
6359
|
-
var styleCss$3 = 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}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;justify-content:center;align-items:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
7675
|
+
var styleCss$3 = 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}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host{display:inline-block}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
6360
7676
|
|
|
6361
7677
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6362
7678
|
// See LICENSE in the project root for license information.
|
|
@@ -6369,9 +7685,10 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6369
7685
|
* @slot - Default slot for the menu content.
|
|
6370
7686
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6371
7687
|
* @slot label - Defines the content of the label.
|
|
7688
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6372
7689
|
* @slot helpText - Defines the content of the helpText.
|
|
6373
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6374
7690
|
* @slot valueText - Dropdown value text display.
|
|
7691
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6375
7692
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6376
7693
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6377
7694
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6379,7 +7696,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6379
7696
|
*/
|
|
6380
7697
|
|
|
6381
7698
|
// build the component class
|
|
6382
|
-
class AuroSelect extends AuroElement$
|
|
7699
|
+
class AuroSelect extends AuroElement$4 {
|
|
6383
7700
|
constructor() {
|
|
6384
7701
|
super();
|
|
6385
7702
|
|
|
@@ -6389,11 +7706,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6389
7706
|
const idSubstrEnd = 8;
|
|
6390
7707
|
const idSubstrStart = 2;
|
|
6391
7708
|
|
|
6392
|
-
this.matchWidth =
|
|
7709
|
+
this.matchWidth = false;
|
|
6393
7710
|
|
|
6394
7711
|
// Layout Config
|
|
6395
|
-
this.layout = '
|
|
6396
|
-
this.shape = '
|
|
7712
|
+
this.layout = 'snowflake';
|
|
7713
|
+
this.shape = 'snowflake';
|
|
6397
7714
|
this.size = 'xl';
|
|
6398
7715
|
|
|
6399
7716
|
// floaterConfig
|
|
@@ -6404,6 +7721,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6404
7721
|
|
|
6405
7722
|
this.forceDisplayValue = false;
|
|
6406
7723
|
|
|
7724
|
+
this.layout = 'classic';
|
|
7725
|
+
this.shape = 'classic';
|
|
7726
|
+
this.size = 'xl';
|
|
7727
|
+
|
|
6407
7728
|
/**
|
|
6408
7729
|
* @private
|
|
6409
7730
|
*/
|
|
@@ -6419,7 +7740,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6419
7740
|
/**
|
|
6420
7741
|
* @private
|
|
6421
7742
|
*/
|
|
6422
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7743
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6423
7744
|
|
|
6424
7745
|
/**
|
|
6425
7746
|
* Generate unique names for dependency components.
|
|
@@ -6534,14 +7855,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6534
7855
|
reflect: true
|
|
6535
7856
|
},
|
|
6536
7857
|
|
|
6537
|
-
/**
|
|
6538
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6539
|
-
*/
|
|
6540
|
-
flexMenuWidth: {
|
|
6541
|
-
type: Boolean,
|
|
6542
|
-
reflect: true
|
|
6543
|
-
},
|
|
6544
|
-
|
|
6545
7858
|
/**
|
|
6546
7859
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6547
7860
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6635,7 +7948,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6635
7948
|
* "top" | "right" | "bottom" | "left" |
|
|
6636
7949
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6637
7950
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6638
|
-
* "left-start" | "left-end"
|
|
7951
|
+
* "left-start" | "left-end".
|
|
6639
7952
|
* @default bottom-start
|
|
6640
7953
|
*/
|
|
6641
7954
|
placement: {
|
|
@@ -6643,6 +7956,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6643
7956
|
reflect: true
|
|
6644
7957
|
},
|
|
6645
7958
|
|
|
7959
|
+
/**
|
|
7960
|
+
* Define custom placeholder text.
|
|
7961
|
+
*/
|
|
7962
|
+
placeholder: {
|
|
7963
|
+
type: String,
|
|
7964
|
+
reflect: true
|
|
7965
|
+
},
|
|
7966
|
+
|
|
6646
7967
|
/**
|
|
6647
7968
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6648
7969
|
*/
|
|
@@ -6689,11 +8010,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6689
8010
|
},
|
|
6690
8011
|
|
|
6691
8012
|
/**
|
|
6692
|
-
* Value selected for the component.
|
|
6693
|
-
* @type {String|Array<String>}
|
|
8013
|
+
* Value selected for the component.
|
|
6694
8014
|
*/
|
|
6695
8015
|
value: {
|
|
6696
|
-
type:
|
|
8016
|
+
type: String,
|
|
8017
|
+
reflect: true,
|
|
8018
|
+
attribute: 'value'
|
|
6697
8019
|
},
|
|
6698
8020
|
|
|
6699
8021
|
/**
|
|
@@ -6745,10 +8067,42 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6745
8067
|
];
|
|
6746
8068
|
}
|
|
6747
8069
|
|
|
8070
|
+
/**
|
|
8071
|
+
* Formatted value based on `multiSelect` state.
|
|
8072
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
8073
|
+
* @private
|
|
8074
|
+
* @returns {String|Array<String>}
|
|
8075
|
+
*/
|
|
8076
|
+
get formattedValue() {
|
|
8077
|
+
if (this.multiSelect) {
|
|
8078
|
+
if (!this.value) {
|
|
8079
|
+
return undefined;
|
|
8080
|
+
}
|
|
8081
|
+
if (this.value.startsWith("[")) {
|
|
8082
|
+
return JSON.parse(this.value);
|
|
8083
|
+
}
|
|
8084
|
+
return [this.value];
|
|
8085
|
+
}
|
|
8086
|
+
return this.value;
|
|
8087
|
+
}
|
|
8088
|
+
|
|
8089
|
+
/**
|
|
8090
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
8091
|
+
* @private
|
|
8092
|
+
* @returns {void}
|
|
8093
|
+
*/
|
|
8094
|
+
get commonLabelClasses() {
|
|
8095
|
+
return {
|
|
8096
|
+
'is-disabled': this.disabled,
|
|
8097
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8098
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
8099
|
+
};
|
|
8100
|
+
}
|
|
8101
|
+
|
|
6748
8102
|
/**
|
|
6749
8103
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6750
8104
|
* @private
|
|
6751
|
-
* @
|
|
8105
|
+
* @returns {object} - Returns classmap.
|
|
6752
8106
|
*/
|
|
6753
8107
|
get commonWrapperClasses() {
|
|
6754
8108
|
return {
|
|
@@ -6766,10 +8120,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6766
8120
|
|
|
6767
8121
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6768
8122
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8123
|
+
|
|
8124
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8125
|
+
// wait til the bib gets fully rendered
|
|
8126
|
+
setTimeout(() => {
|
|
8127
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8128
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8129
|
+
this.dropdown.trigger.focus();
|
|
8130
|
+
|
|
8131
|
+
// default focus indicator on the first menu option
|
|
8132
|
+
if (this.menu.index < 0) {
|
|
8133
|
+
this.menu.navigateOptions('down');
|
|
8134
|
+
}
|
|
8135
|
+
}
|
|
8136
|
+
});
|
|
8137
|
+
}
|
|
6769
8138
|
});
|
|
6770
8139
|
|
|
6771
8140
|
// setting up bibtemplate
|
|
6772
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
8141
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6773
8142
|
|
|
6774
8143
|
if (this.customBibWidth) {
|
|
6775
8144
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6788,7 +8157,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6788
8157
|
*
|
|
6789
8158
|
*/
|
|
6790
8159
|
static register(name = "auro-select") {
|
|
6791
|
-
AuroLibraryRuntimeUtils$
|
|
8160
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6792
8161
|
}
|
|
6793
8162
|
|
|
6794
8163
|
/**
|
|
@@ -6848,6 +8217,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6848
8217
|
return;
|
|
6849
8218
|
}
|
|
6850
8219
|
|
|
8220
|
+
// set menu's default size if there it's not specified.
|
|
8221
|
+
if (!this.menu.getAttribute('size')) {
|
|
8222
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8223
|
+
}
|
|
8224
|
+
|
|
8225
|
+
if (!this.getAttribute('shape')) {
|
|
8226
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8227
|
+
}
|
|
8228
|
+
|
|
6851
8229
|
if (this.multiSelect) {
|
|
6852
8230
|
this.menu.multiSelect = this.multiSelect;
|
|
6853
8231
|
}
|
|
@@ -6907,46 +8285,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6907
8285
|
configureSelect() {
|
|
6908
8286
|
|
|
6909
8287
|
this.addEventListener('keydown', (evt) => {
|
|
6910
|
-
|
|
6911
|
-
|
|
8288
|
+
// when the focus is on trigger not on close button
|
|
8289
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8290
|
+
if (evt.key === 'ArrowUp') {
|
|
8291
|
+
evt.preventDefault();
|
|
6912
8292
|
|
|
6913
|
-
|
|
8293
|
+
this.dropdown.show();
|
|
8294
|
+
|
|
8295
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8296
|
+
this.menu.navigateOptions('up');
|
|
8297
|
+
}
|
|
6914
8298
|
|
|
6915
|
-
|
|
6916
|
-
this.menu.navigateOptions('up');
|
|
8299
|
+
return;
|
|
6917
8300
|
}
|
|
6918
8301
|
|
|
6919
|
-
|
|
6920
|
-
|
|
8302
|
+
if (evt.key === 'ArrowDown') {
|
|
8303
|
+
evt.preventDefault();
|
|
6921
8304
|
|
|
6922
|
-
|
|
6923
|
-
evt.preventDefault();
|
|
8305
|
+
this.dropdown.show();
|
|
6924
8306
|
|
|
6925
|
-
|
|
8307
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8308
|
+
this.menu.navigateOptions('down');
|
|
8309
|
+
}
|
|
6926
8310
|
|
|
6927
|
-
|
|
6928
|
-
this.menu.navigateOptions('down');
|
|
8311
|
+
return;
|
|
6929
8312
|
}
|
|
6930
8313
|
|
|
6931
|
-
|
|
6932
|
-
|
|
8314
|
+
if (evt.key === 'Enter') {
|
|
8315
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8316
|
+
evt.preventDefault();
|
|
8317
|
+
this.menu.makeSelection();
|
|
8318
|
+
}
|
|
6933
8319
|
|
|
6934
|
-
|
|
6935
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6936
|
-
evt.preventDefault();
|
|
6937
|
-
this.menu.makeSelection();
|
|
8320
|
+
return;
|
|
6938
8321
|
}
|
|
6939
|
-
|
|
6940
|
-
return;
|
|
6941
8322
|
}
|
|
6942
8323
|
|
|
6943
|
-
if (evt.key === 'Tab') {
|
|
8324
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6944
8325
|
if (this.dropdown.isBibFullscreen) {
|
|
6945
8326
|
evt.preventDefault();
|
|
8327
|
+
|
|
8328
|
+
// when the focus is on trigger not on close button
|
|
8329
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8330
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8331
|
+
// when bib it not open, it will focus onto trigger.
|
|
8332
|
+
this.dropdown.focus();
|
|
8333
|
+
} else {
|
|
8334
|
+
// when close button has the focus, move focus back to the trigger
|
|
8335
|
+
this.dropdown.trigger.focus();
|
|
8336
|
+
}
|
|
6946
8337
|
} else {
|
|
6947
8338
|
this.dropdown.hide();
|
|
6948
8339
|
}
|
|
6949
|
-
|
|
6950
8340
|
return;
|
|
6951
8341
|
}
|
|
6952
8342
|
|
|
@@ -7027,6 +8417,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7027
8417
|
}
|
|
7028
8418
|
}
|
|
7029
8419
|
|
|
8420
|
+
/**
|
|
8421
|
+
* Hides the dropdown bib if its open.
|
|
8422
|
+
* @returns {void}
|
|
8423
|
+
*/
|
|
8424
|
+
hideBib() {
|
|
8425
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8426
|
+
this.dropdown.hide();
|
|
8427
|
+
}
|
|
8428
|
+
}
|
|
8429
|
+
|
|
8430
|
+
/**
|
|
8431
|
+
* Shows the dropdown bib if there are options to show.
|
|
8432
|
+
* @returns {void}
|
|
8433
|
+
*/
|
|
8434
|
+
showBib() {
|
|
8435
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8436
|
+
this.dropdown.show();
|
|
8437
|
+
}
|
|
8438
|
+
}
|
|
8439
|
+
|
|
7030
8440
|
/**
|
|
7031
8441
|
* Function to support @focusin event.
|
|
7032
8442
|
* @private
|
|
@@ -7111,34 +8521,39 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7111
8521
|
// Add the tag name as an attribute if it is different than the component name
|
|
7112
8522
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7113
8523
|
|
|
7114
|
-
this.configureMenu();
|
|
7115
8524
|
this.configureDropdown();
|
|
8525
|
+
this.configureMenu();
|
|
7116
8526
|
this.configureSelect();
|
|
8527
|
+
}
|
|
7117
8528
|
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
8529
|
+
/**
|
|
8530
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8531
|
+
* @param {string} value - The value to set in the menu.
|
|
8532
|
+
* @returns {void}
|
|
8533
|
+
* @private
|
|
8534
|
+
*/
|
|
8535
|
+
async updateMenuValue(value) {
|
|
8536
|
+
if (!this.menu) return;
|
|
8537
|
+
|
|
8538
|
+
this.menu.setAttribute('value', value);
|
|
8539
|
+
this.menu.value = value;
|
|
8540
|
+
await this.menu.updateComplete;
|
|
7123
8541
|
}
|
|
7124
8542
|
|
|
7125
8543
|
async updated(changedProperties) {
|
|
7126
|
-
if (changedProperties.has('multiSelect')) {
|
|
8544
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
7127
8545
|
this.clearSelection();
|
|
7128
8546
|
}
|
|
7129
8547
|
|
|
7130
8548
|
if (changedProperties.has('value')) {
|
|
7131
8549
|
if (this.value) {
|
|
7132
|
-
|
|
8550
|
+
await this.updateMenuValue(this.value);
|
|
7133
8551
|
|
|
7134
|
-
this.menu
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
await this.menu.updateComplete;
|
|
7138
|
-
|
|
7139
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8552
|
+
if (this.menu) {
|
|
8553
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8554
|
+
}
|
|
7140
8555
|
} else {
|
|
7141
|
-
this.
|
|
8556
|
+
await this.updateMenuValue(undefined);
|
|
7142
8557
|
}
|
|
7143
8558
|
|
|
7144
8559
|
this._updateNativeSelect();
|
|
@@ -7157,7 +8572,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7157
8572
|
composed: true,
|
|
7158
8573
|
detail: {
|
|
7159
8574
|
optionSelected: this.optionSelected,
|
|
7160
|
-
value: this.
|
|
8575
|
+
value: this.formattedValue
|
|
7161
8576
|
}
|
|
7162
8577
|
}));
|
|
7163
8578
|
}
|
|
@@ -7169,6 +8584,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7169
8584
|
if (changedProperties.has('error')) {
|
|
7170
8585
|
this.validate(true);
|
|
7171
8586
|
}
|
|
8587
|
+
|
|
8588
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8589
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8590
|
+
}
|
|
8591
|
+
|
|
8592
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8593
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8594
|
+
}
|
|
7172
8595
|
}
|
|
7173
8596
|
|
|
7174
8597
|
/**
|
|
@@ -7179,16 +8602,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7179
8602
|
this.validation.reset(this);
|
|
7180
8603
|
}
|
|
7181
8604
|
|
|
7182
|
-
/**
|
|
7183
|
-
* Hide dropdownbib.
|
|
7184
|
-
* @private
|
|
7185
|
-
*/
|
|
7186
|
-
hideBib() {
|
|
7187
|
-
if (this.dropdown) {
|
|
7188
|
-
this.dropdown.hide();
|
|
7189
|
-
}
|
|
7190
|
-
}
|
|
7191
|
-
|
|
7192
8605
|
/**
|
|
7193
8606
|
* Validates value.
|
|
7194
8607
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7208,13 +8621,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7208
8621
|
const selectedValue = selectedOption.value;
|
|
7209
8622
|
|
|
7210
8623
|
if (this.multiSelect) {
|
|
7211
|
-
const currentArray =
|
|
8624
|
+
const currentArray = this.formattedValue;
|
|
7212
8625
|
|
|
7213
8626
|
if (!currentArray.includes(selectedValue)) {
|
|
7214
|
-
this.value = [
|
|
8627
|
+
this.value = JSON.stringify([
|
|
7215
8628
|
...currentArray,
|
|
7216
8629
|
selectedValue
|
|
7217
|
-
];
|
|
8630
|
+
]);
|
|
7218
8631
|
}
|
|
7219
8632
|
} else {
|
|
7220
8633
|
const currentValue = this.value;
|
|
@@ -7237,12 +8650,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7237
8650
|
}
|
|
7238
8651
|
|
|
7239
8652
|
if (this.multiSelect) {
|
|
7240
|
-
nativeSelect.value = this.
|
|
8653
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7241
8654
|
} else {
|
|
7242
8655
|
nativeSelect.value = this.value || '';
|
|
7243
8656
|
}
|
|
7244
8657
|
}
|
|
7245
8658
|
|
|
8659
|
+
/**
|
|
8660
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8661
|
+
* @private
|
|
8662
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8663
|
+
*/
|
|
7246
8664
|
renderAriaHtml() {
|
|
7247
8665
|
return u`
|
|
7248
8666
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7263,9 +8681,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7263
8681
|
`;
|
|
7264
8682
|
}
|
|
7265
8683
|
|
|
8684
|
+
/**
|
|
8685
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8686
|
+
* @private
|
|
8687
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8688
|
+
*/
|
|
7266
8689
|
renderNativeSelect() {
|
|
7267
8690
|
return u`
|
|
7268
|
-
<div class="nativeSelectWrapper">
|
|
8691
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7269
8692
|
<select
|
|
7270
8693
|
tabindex="-1"
|
|
7271
8694
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7302,14 +8725,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7302
8725
|
? u`
|
|
7303
8726
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7304
8727
|
<p id="${this.uniqueId}" part="helpText">
|
|
7305
|
-
<slot name="
|
|
8728
|
+
<slot name="helpText"></slot>
|
|
7306
8729
|
</p>
|
|
7307
8730
|
</${this.helpTextTag}>
|
|
7308
8731
|
`
|
|
7309
8732
|
: u`
|
|
7310
8733
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7311
8734
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7312
|
-
|
|
8735
|
+
${this.errorMessage}
|
|
7313
8736
|
</p>
|
|
7314
8737
|
</${this.helpTextTag}>
|
|
7315
8738
|
`
|
|
@@ -7322,17 +8745,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7322
8745
|
* @private
|
|
7323
8746
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7324
8747
|
*/
|
|
7325
|
-
// TODO update to use util class
|
|
7326
8748
|
renderLayoutEmphasized() {
|
|
7327
8749
|
const placeholderClass = {
|
|
7328
|
-
|
|
8750
|
+
'util_displayHidden': this.value
|
|
7329
8751
|
};
|
|
7330
8752
|
|
|
7331
8753
|
const displayValueClasses = {
|
|
7332
8754
|
'displayValue': true,
|
|
7333
8755
|
'hasContent': this.hasDisplayValueContent,
|
|
7334
8756
|
'hasFocus': this.isPopoverVisible,
|
|
7335
|
-
'withValue': this.value && this.value.length > 0,
|
|
8757
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7336
8758
|
'force': this.forceDisplayValue,
|
|
7337
8759
|
};
|
|
7338
8760
|
|
|
@@ -7349,16 +8771,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7349
8771
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7350
8772
|
</div>
|
|
7351
8773
|
<${this.dropdownTag}
|
|
8774
|
+
a11yRole="select"
|
|
7352
8775
|
?autoPlacement="${this.autoPlacement}"
|
|
7353
8776
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7354
|
-
?matchWidth="${
|
|
8777
|
+
?matchWidth="${this.matchWidth}"
|
|
7355
8778
|
?noFlip="${this.noFlip}"
|
|
7356
8779
|
?onDark="${this.onDark}"
|
|
7357
8780
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7358
8781
|
.offset="${this.offset}"
|
|
7359
8782
|
.placement="${this.placement}"
|
|
7360
8783
|
chevron
|
|
7361
|
-
fluid
|
|
7362
8784
|
for="selectMenu"
|
|
7363
8785
|
layout="${this.layout}"
|
|
7364
8786
|
part="dropdown"
|
|
@@ -7370,15 +8792,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7370
8792
|
</div>
|
|
7371
8793
|
<div class="mainContent">
|
|
7372
8794
|
<div class="${e(valueContainerClasses)}">
|
|
7373
|
-
<label>
|
|
8795
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7374
8796
|
<slot name="label"></slot>
|
|
8797
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7375
8798
|
</label>
|
|
7376
8799
|
<div class="value" id="value"></div>
|
|
7377
|
-
${
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
</div>
|
|
7381
|
-
`}
|
|
8800
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8801
|
+
${this.placeholder}
|
|
8802
|
+
</div>
|
|
7382
8803
|
</div>
|
|
7383
8804
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7384
8805
|
<slot name="displayValue"></slot>
|
|
@@ -7405,14 +8826,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7405
8826
|
*/
|
|
7406
8827
|
renderLayoutSnowflake() {
|
|
7407
8828
|
const placeholderClass = {
|
|
7408
|
-
|
|
8829
|
+
'util_displayHidden': this.value
|
|
7409
8830
|
};
|
|
7410
8831
|
|
|
7411
8832
|
const displayValueClasses = {
|
|
7412
8833
|
'displayValue': true,
|
|
7413
8834
|
'hasContent': this.hasDisplayValueContent,
|
|
7414
8835
|
'hasFocus': this.isPopoverVisible,
|
|
7415
|
-
'withValue': this.value && this.value.length > 0,
|
|
8836
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7416
8837
|
'force': this.forceDisplayValue,
|
|
7417
8838
|
};
|
|
7418
8839
|
|
|
@@ -7431,14 +8852,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7431
8852
|
<${this.dropdownTag}
|
|
7432
8853
|
?autoPlacement="${this.autoPlacement}"
|
|
7433
8854
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7434
|
-
?matchWidth="${
|
|
8855
|
+
?matchWidth="${this.matchWidth}"
|
|
7435
8856
|
?noFlip="${this.noFlip}"
|
|
7436
8857
|
?onDark="${this.onDark}"
|
|
7437
8858
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7438
8859
|
.offset="${this.offset}"
|
|
7439
8860
|
.placement="${this.placement}"
|
|
7440
8861
|
chevron
|
|
7441
|
-
fluid
|
|
7442
8862
|
for="selectMenu"
|
|
7443
8863
|
layout="${this.layout}"
|
|
7444
8864
|
part="dropdown"
|
|
@@ -7450,15 +8870,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7450
8870
|
</div>
|
|
7451
8871
|
<div class="mainContent">
|
|
7452
8872
|
<div class="${e(valueContainerClasses)}">
|
|
7453
|
-
<label>
|
|
8873
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7454
8874
|
<slot name="label"></slot>
|
|
8875
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7455
8876
|
</label>
|
|
7456
8877
|
<div class="value" id="value"></div>
|
|
7457
|
-
${
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
</div>
|
|
7461
|
-
`}
|
|
8878
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8879
|
+
${this.placeholder}
|
|
8880
|
+
</div>
|
|
7462
8881
|
</div>
|
|
7463
8882
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7464
8883
|
<slot name="displayValue"></slot>
|
|
@@ -7474,6 +8893,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7474
8893
|
${this.renderHtmlHelpText()}
|
|
7475
8894
|
</div>
|
|
7476
8895
|
</${this.dropdownTag}>
|
|
8896
|
+
${this.renderNativeSelect()}
|
|
7477
8897
|
</div>
|
|
7478
8898
|
`;
|
|
7479
8899
|
}
|
|
@@ -7484,11 +8904,75 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7484
8904
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7485
8905
|
*/
|
|
7486
8906
|
renderLayoutClassic() {
|
|
8907
|
+
const placeholderClass = {
|
|
8908
|
+
'util_displayHidden': this.value
|
|
8909
|
+
};
|
|
8910
|
+
|
|
8911
|
+
const displayValueClasses = {
|
|
8912
|
+
'displayValue': true,
|
|
8913
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8914
|
+
'hasFocus': this.isPopoverVisible,
|
|
8915
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8916
|
+
'force': this.forceDisplayValue,
|
|
8917
|
+
};
|
|
8918
|
+
|
|
8919
|
+
const valueContainerClasses = {
|
|
8920
|
+
'valueContainer': true,
|
|
8921
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8922
|
+
};
|
|
8923
|
+
|
|
7487
8924
|
return u`
|
|
7488
8925
|
<div
|
|
7489
|
-
class="${e(this.commonWrapperClasses)}
|
|
8926
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7490
8927
|
part="wrapper">
|
|
7491
|
-
|
|
8928
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8929
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8930
|
+
</div>
|
|
8931
|
+
<${this.dropdownTag}
|
|
8932
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8933
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8934
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8935
|
+
?noFlip="${this.noFlip}"
|
|
8936
|
+
?onDark="${this.onDark}"
|
|
8937
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8938
|
+
.offset="${this.offset}"
|
|
8939
|
+
.placement="${this.placement}"
|
|
8940
|
+
chevron
|
|
8941
|
+
for="selectMenu"
|
|
8942
|
+
layout="${this.layout}"
|
|
8943
|
+
part="dropdown"
|
|
8944
|
+
shape="${this.shape}"
|
|
8945
|
+
size="${this.size}">
|
|
8946
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8947
|
+
<div class="accents left">
|
|
8948
|
+
<slot name="typeIcon"></slot>
|
|
8949
|
+
</div>
|
|
8950
|
+
<div class="mainContent">
|
|
8951
|
+
<div class="${e(valueContainerClasses)}">
|
|
8952
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8953
|
+
<slot name="label"></slot>
|
|
8954
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8955
|
+
</label>
|
|
8956
|
+
<div class="value" id="value"></div>
|
|
8957
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8958
|
+
${this.placeholder}
|
|
8959
|
+
</div>
|
|
8960
|
+
</div>
|
|
8961
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8962
|
+
<slot name="displayValue"></slot>
|
|
8963
|
+
</div>
|
|
8964
|
+
</div>
|
|
8965
|
+
<div class="accents right"></div>
|
|
8966
|
+
</div>
|
|
8967
|
+
<div class="menuWrapper"></div>
|
|
8968
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8969
|
+
<slot></slot>
|
|
8970
|
+
</${this.bibtemplateTag}>
|
|
8971
|
+
<div slot="helpText">
|
|
8972
|
+
${this.renderHtmlHelpText()}
|
|
8973
|
+
</div>
|
|
8974
|
+
</${this.dropdownTag}>
|
|
8975
|
+
${this.renderNativeSelect()}
|
|
7492
8976
|
</div>
|
|
7493
8977
|
`;
|
|
7494
8978
|
}
|
|
@@ -7522,112 +9006,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7522
9006
|
|
|
7523
9007
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7524
9008
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7525
|
-
|
|
7526
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7527
|
-
renderBACKUP() {
|
|
7528
|
-
const placeholderClass = {
|
|
7529
|
-
hidden: this.value,
|
|
7530
|
-
};
|
|
7531
|
-
|
|
7532
|
-
return u`
|
|
7533
|
-
<div class="outerWrapper">
|
|
7534
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7535
|
-
${this.optionActive && this.options.length > 0
|
|
7536
|
-
? u`
|
|
7537
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7538
|
-
`
|
|
7539
|
-
: undefined
|
|
7540
|
-
};
|
|
7541
|
-
|
|
7542
|
-
${this.optionSelected && this.options.length > 0
|
|
7543
|
-
? u`
|
|
7544
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7545
|
-
`
|
|
7546
|
-
: undefined
|
|
7547
|
-
};
|
|
7548
|
-
</div>
|
|
7549
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7550
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7551
|
-
</div>
|
|
7552
|
-
<${this.dropdownTag}
|
|
7553
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7554
|
-
?disabled="${this.disabled}"
|
|
7555
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7556
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7557
|
-
?noFlip="${this.noFlip}"
|
|
7558
|
-
?onDark="${this.onDark}"
|
|
7559
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7560
|
-
.offset="${this.offset}"
|
|
7561
|
-
.placement="${this.placement}"
|
|
7562
|
-
chevron
|
|
7563
|
-
fluid
|
|
7564
|
-
for="selectMenu"
|
|
7565
|
-
layout="${this.layout}"
|
|
7566
|
-
part="dropdown"
|
|
7567
|
-
shape="${this.shape}"
|
|
7568
|
-
size="${this.size}">
|
|
7569
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7570
|
-
<span id="placeholder"
|
|
7571
|
-
class="${e(placeholderClass)}"
|
|
7572
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7573
|
-
>
|
|
7574
|
-
<slot name="placeholder"></slot>
|
|
7575
|
-
</span>
|
|
7576
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7577
|
-
</span>
|
|
7578
|
-
|
|
7579
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7580
|
-
<slot></slot>
|
|
7581
|
-
</${this.bibtemplateTag}>
|
|
7582
|
-
<slot name="label" slot="label"></slot>
|
|
7583
|
-
<p slot="helpText">
|
|
7584
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7585
|
-
? u`
|
|
7586
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7587
|
-
<slot name="helpText"></slot>
|
|
7588
|
-
</span>`
|
|
7589
|
-
: u`
|
|
7590
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7591
|
-
${this.errorMessage}
|
|
7592
|
-
</span>`
|
|
7593
|
-
}
|
|
7594
|
-
</p>
|
|
7595
|
-
</${this.dropdownTag}>
|
|
7596
|
-
<div class="nativeSelectWrapper">
|
|
7597
|
-
<select
|
|
7598
|
-
tabindex="-1"
|
|
7599
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7600
|
-
name="${this.name || ''}"
|
|
7601
|
-
?disabled="${this.disabled}"
|
|
7602
|
-
?required="${this.required}"
|
|
7603
|
-
aria-hidden="true"
|
|
7604
|
-
autocomplete="${o(this.autocomplete)}"
|
|
7605
|
-
@change="${this._handleNativeSelectChange}">
|
|
7606
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7607
|
-
${this.options.map((option) => {
|
|
7608
|
-
const optionValue = option.value || option.textContent;
|
|
7609
|
-
return u`
|
|
7610
|
-
<option
|
|
7611
|
-
value="${optionValue}"
|
|
7612
|
-
?selected="${this.value === optionValue}">
|
|
7613
|
-
${option.textContent}
|
|
7614
|
-
</option>
|
|
7615
|
-
`;
|
|
7616
|
-
})}
|
|
7617
|
-
</select>
|
|
7618
|
-
</div>
|
|
7619
|
-
<!-- Help text and error message template -->
|
|
7620
|
-
${this.renderHtmlHelpText()}
|
|
7621
|
-
</div>
|
|
7622
|
-
`;
|
|
7623
|
-
}
|
|
7624
9009
|
}
|
|
7625
9010
|
|
|
7626
|
-
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:
|
|
9011
|
+
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
|
|
7627
9012
|
|
|
7628
9013
|
var colorCss$2 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
7629
9014
|
|
|
7630
|
-
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
9015
|
+
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
7631
9016
|
|
|
7632
9017
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7633
9018
|
// See LICENSE in the project root for license information.
|
|
@@ -7680,7 +9065,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7680
9065
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
7681
9066
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7682
9067
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
7683
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
7684
9068
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7685
9069
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7686
9070
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -7693,14 +9077,17 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7693
9077
|
* @slot - Slot for insertion of menu options.
|
|
7694
9078
|
*/
|
|
7695
9079
|
|
|
7696
|
-
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
9080
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens, no-inline-comments, line-comment-position */
|
|
7697
9081
|
|
|
7698
|
-
class AuroMenu extends
|
|
9082
|
+
class AuroMenu extends AuroElement$4 {
|
|
7699
9083
|
constructor() {
|
|
7700
9084
|
super();
|
|
7701
9085
|
|
|
7702
9086
|
// State properties (reactive)
|
|
7703
9087
|
|
|
9088
|
+
this.shape = ""; // box, rounded, pill
|
|
9089
|
+
this.size = ""; // md, lg, xl
|
|
9090
|
+
|
|
7704
9091
|
// Value of the selected options
|
|
7705
9092
|
this.value = undefined;
|
|
7706
9093
|
// Currently selected option
|
|
@@ -7759,6 +9146,7 @@ class AuroMenu extends i$2 {
|
|
|
7759
9146
|
|
|
7760
9147
|
static get properties() {
|
|
7761
9148
|
return {
|
|
9149
|
+
...super.properties,
|
|
7762
9150
|
noCheckmark: {
|
|
7763
9151
|
type: Boolean,
|
|
7764
9152
|
reflect: true,
|
|
@@ -7789,9 +9177,24 @@ class AuroMenu extends i$2 {
|
|
|
7789
9177
|
reflect: true,
|
|
7790
9178
|
attribute: 'multiselect'
|
|
7791
9179
|
},
|
|
9180
|
+
|
|
9181
|
+
/**
|
|
9182
|
+
* Value selected for the component.
|
|
9183
|
+
*/
|
|
7792
9184
|
value: {
|
|
7793
|
-
|
|
7794
|
-
|
|
9185
|
+
type: String,
|
|
9186
|
+
reflect: true,
|
|
9187
|
+
attribute: 'value'
|
|
9188
|
+
},
|
|
9189
|
+
|
|
9190
|
+
/**
|
|
9191
|
+
* Indent level for submenus.
|
|
9192
|
+
* @private
|
|
9193
|
+
*/
|
|
9194
|
+
level: {
|
|
9195
|
+
type: Number,
|
|
9196
|
+
reflect: false,
|
|
9197
|
+
attribute: false
|
|
7795
9198
|
}
|
|
7796
9199
|
};
|
|
7797
9200
|
}
|
|
@@ -7813,7 +9216,26 @@ class AuroMenu extends i$2 {
|
|
|
7813
9216
|
*
|
|
7814
9217
|
*/
|
|
7815
9218
|
static register(name = "auro-menu") {
|
|
7816
|
-
AuroLibraryRuntimeUtils$
|
|
9219
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
|
|
9220
|
+
}
|
|
9221
|
+
|
|
9222
|
+
/**
|
|
9223
|
+
* Formatted value based on `multiSelect` state.
|
|
9224
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
9225
|
+
* @private
|
|
9226
|
+
* @returns {String|Array<String>}
|
|
9227
|
+
*/
|
|
9228
|
+
get formattedValue() {
|
|
9229
|
+
if (this.multiSelect) {
|
|
9230
|
+
if (!this.value) {
|
|
9231
|
+
return undefined;
|
|
9232
|
+
}
|
|
9233
|
+
if (this.value.startsWith("[")) {
|
|
9234
|
+
return JSON.parse(this.value);
|
|
9235
|
+
}
|
|
9236
|
+
return [this.value];
|
|
9237
|
+
}
|
|
9238
|
+
return this.value;
|
|
7817
9239
|
}
|
|
7818
9240
|
|
|
7819
9241
|
// Lifecycle Methods
|
|
@@ -7825,6 +9247,7 @@ class AuroMenu extends i$2 {
|
|
|
7825
9247
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
7826
9248
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
7827
9249
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9250
|
+
this.setTagAttribute("auro-menu");
|
|
7828
9251
|
}
|
|
7829
9252
|
|
|
7830
9253
|
disconnectedCallback() {
|
|
@@ -7837,19 +9260,33 @@ class AuroMenu extends i$2 {
|
|
|
7837
9260
|
}
|
|
7838
9261
|
|
|
7839
9262
|
firstUpdated() {
|
|
7840
|
-
AuroLibraryRuntimeUtils$
|
|
9263
|
+
AuroLibraryRuntimeUtils$6.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7841
9264
|
|
|
7842
9265
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7843
9266
|
this.initializeMenu();
|
|
7844
9267
|
}
|
|
7845
9268
|
|
|
9269
|
+
/**
|
|
9270
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9271
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9272
|
+
* @private
|
|
9273
|
+
*/
|
|
9274
|
+
setTagAttribute(tagName) {
|
|
9275
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9276
|
+
this.setAttribute(tagName, true);
|
|
9277
|
+
}
|
|
9278
|
+
}
|
|
9279
|
+
|
|
7846
9280
|
updated(changedProperties) {
|
|
7847
|
-
|
|
9281
|
+
super.updated(changedProperties);
|
|
9282
|
+
|
|
9283
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
7848
9284
|
// Reset selection if multiSelect mode changes
|
|
7849
9285
|
this.clearSelection();
|
|
7850
9286
|
}
|
|
7851
9287
|
|
|
7852
|
-
|
|
9288
|
+
|
|
9289
|
+
if (changedProperties.has("value")) {
|
|
7853
9290
|
// Handle null/undefined case
|
|
7854
9291
|
if (this.value === undefined || this.value === null) {
|
|
7855
9292
|
this.optionSelected = undefined;
|
|
@@ -7857,7 +9294,7 @@ class AuroMenu extends i$2 {
|
|
|
7857
9294
|
} else {
|
|
7858
9295
|
if (this.multiSelect) {
|
|
7859
9296
|
// In multiselect mode, this.value should be an array of strings
|
|
7860
|
-
const valueArray =
|
|
9297
|
+
const valueArray = this.formattedValue;
|
|
7861
9298
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
7862
9299
|
|
|
7863
9300
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -7917,6 +9354,19 @@ class AuroMenu extends i$2 {
|
|
|
7917
9354
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7918
9355
|
}
|
|
7919
9356
|
|
|
9357
|
+
// Handle layout propagation to all menus and options
|
|
9358
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9359
|
+
[
|
|
9360
|
+
'size',
|
|
9361
|
+
'shape'
|
|
9362
|
+
].forEach((prop) => {
|
|
9363
|
+
if (changedProperties.has(prop)) {
|
|
9364
|
+
propagationTargets.forEach((el) => {
|
|
9365
|
+
el.setAttribute(prop, this[prop]);
|
|
9366
|
+
});
|
|
9367
|
+
}
|
|
9368
|
+
});
|
|
9369
|
+
|
|
7920
9370
|
// Regex for matchWord if needed
|
|
7921
9371
|
let regexWord = null;
|
|
7922
9372
|
|
|
@@ -8011,14 +9461,14 @@ class AuroMenu extends i$2 {
|
|
|
8011
9461
|
*/
|
|
8012
9462
|
handleSelectState(option) {
|
|
8013
9463
|
if (this.multiSelect) {
|
|
8014
|
-
const currentValue = this.
|
|
9464
|
+
const currentValue = this.formattedValue || [];
|
|
8015
9465
|
const currentSelected = this.optionSelected || [];
|
|
8016
9466
|
|
|
8017
9467
|
if (!currentValue.includes(option.value)) {
|
|
8018
|
-
this.value = [
|
|
9468
|
+
this.value = JSON.stringify([
|
|
8019
9469
|
...currentValue,
|
|
8020
9470
|
option.value
|
|
8021
|
-
];
|
|
9471
|
+
]);
|
|
8022
9472
|
}
|
|
8023
9473
|
if (!currentSelected.includes(option)) {
|
|
8024
9474
|
this.optionSelected = [
|
|
@@ -8041,13 +9491,15 @@ class AuroMenu extends i$2 {
|
|
|
8041
9491
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
8042
9492
|
*/
|
|
8043
9493
|
handleDeselectState(option) {
|
|
8044
|
-
if (this.multiSelect
|
|
9494
|
+
if (this.multiSelect) {
|
|
8045
9495
|
// Remove this option from array
|
|
8046
|
-
|
|
9496
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
8047
9497
|
|
|
8048
9498
|
// If array is empty after removal, set back to undefined
|
|
8049
|
-
if (
|
|
9499
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
8050
9500
|
this.value = undefined;
|
|
9501
|
+
} else {
|
|
9502
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
8051
9503
|
}
|
|
8052
9504
|
|
|
8053
9505
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -8113,21 +9565,20 @@ class AuroMenu extends i$2 {
|
|
|
8113
9565
|
* @param {HTMLElement} menu - Root menu element.
|
|
8114
9566
|
*/
|
|
8115
9567
|
handleNestedMenus(menu) {
|
|
8116
|
-
|
|
9568
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8117
9569
|
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
if (!
|
|
8122
|
-
|
|
9570
|
+
if (menu.level > 0) {
|
|
9571
|
+
menu.setAttribute('role', 'group');
|
|
9572
|
+
menu.removeAttribute("root");
|
|
9573
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9574
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8123
9575
|
}
|
|
9576
|
+
}
|
|
8124
9577
|
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
this.handleNestedMenus(nestedMenu);
|
|
9578
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9579
|
+
options.forEach((option) => {
|
|
9580
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9581
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8131
9582
|
});
|
|
8132
9583
|
}
|
|
8133
9584
|
|
|
@@ -8369,28 +9820,39 @@ class AuroMenu extends i$2 {
|
|
|
8369
9820
|
}
|
|
8370
9821
|
|
|
8371
9822
|
/**
|
|
8372
|
-
*
|
|
8373
|
-
* @
|
|
9823
|
+
* Logic to determine the layout of the component.
|
|
9824
|
+
* @protected
|
|
9825
|
+
* @returns {void}
|
|
8374
9826
|
*/
|
|
8375
|
-
|
|
9827
|
+
renderLayout() {
|
|
8376
9828
|
if (this.loading) {
|
|
8377
9829
|
return x`
|
|
8378
|
-
<
|
|
8379
|
-
<
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
9830
|
+
<div class="wrapper">
|
|
9831
|
+
<auro-menuoption
|
|
9832
|
+
disabled
|
|
9833
|
+
loadingplaceholder
|
|
9834
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9835
|
+
>
|
|
9836
|
+
<div>
|
|
9837
|
+
<slot name="loadingIcon"></slot>
|
|
9838
|
+
<slot name="loadingText"></slot>
|
|
9839
|
+
</div>
|
|
9840
|
+
</auro-menuoption>
|
|
9841
|
+
</div>
|
|
8384
9842
|
`;
|
|
8385
9843
|
}
|
|
8386
9844
|
|
|
8387
|
-
return x
|
|
9845
|
+
return x`
|
|
9846
|
+
<div class="wrapper">
|
|
9847
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9848
|
+
</div>
|
|
9849
|
+
`;
|
|
8388
9850
|
}
|
|
8389
9851
|
}
|
|
8390
9852
|
|
|
8391
|
-
var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-
|
|
9853
|
+
var styleCss$1 = i$5`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem)}:host .wrapper[class*=-lg]:not(:last-child){margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem)}:host .wrapper[class*=-xl]:not(:last-child){margin-bottom:var(--ds-size-100, 0.5rem)}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
8392
9854
|
|
|
8393
|
-
var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
9855
|
+
var colorCss$1 = i$5`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
8394
9856
|
|
|
8395
9857
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8396
9858
|
// See LICENSE in the project root for license information.
|
|
@@ -8738,8 +10200,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8738
10200
|
async firstUpdated() {
|
|
8739
10201
|
await super.firstUpdated();
|
|
8740
10202
|
|
|
8741
|
-
|
|
8742
|
-
|
|
10203
|
+
/**
|
|
10204
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
10205
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
10206
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
10207
|
+
*/
|
|
10208
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8743
10209
|
const svgDesc = this.svg.querySelector('desc');
|
|
8744
10210
|
|
|
8745
10211
|
if (svgDesc) {
|
|
@@ -8783,7 +10249,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8783
10249
|
}
|
|
8784
10250
|
}
|
|
8785
10251
|
|
|
8786
|
-
var iconVersion = '8.0.
|
|
10252
|
+
var iconVersion = '8.0.4';
|
|
8787
10253
|
|
|
8788
10254
|
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>"};
|
|
8789
10255
|
|
|
@@ -8801,10 +10267,13 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8801
10267
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8802
10268
|
* @slot - Specifies text for an option, but is not the value.
|
|
8803
10269
|
*/
|
|
8804
|
-
class AuroMenuOption extends
|
|
10270
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8805
10271
|
constructor() {
|
|
8806
10272
|
super();
|
|
8807
10273
|
|
|
10274
|
+
this.size = ""; // md, lg, xl
|
|
10275
|
+
this.shape = ""; // box, rounded, pill
|
|
10276
|
+
|
|
8808
10277
|
/**
|
|
8809
10278
|
* Generate unique names for dependency components.
|
|
8810
10279
|
*/
|
|
@@ -8823,11 +10292,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8823
10292
|
/**
|
|
8824
10293
|
* @private
|
|
8825
10294
|
*/
|
|
8826
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10295
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
8827
10296
|
}
|
|
8828
10297
|
|
|
8829
10298
|
static get properties() {
|
|
8830
10299
|
return {
|
|
10300
|
+
...super.properties,
|
|
8831
10301
|
nocheckmark: {
|
|
8832
10302
|
type: Boolean,
|
|
8833
10303
|
reflect: true
|
|
@@ -8867,7 +10337,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8867
10337
|
*
|
|
8868
10338
|
*/
|
|
8869
10339
|
static register(name = "auro-menuoption") {
|
|
8870
|
-
AuroLibraryRuntimeUtils$
|
|
10340
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenuOption);
|
|
8871
10341
|
}
|
|
8872
10342
|
|
|
8873
10343
|
firstUpdated() {
|
|
@@ -8889,6 +10359,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8889
10359
|
|
|
8890
10360
|
// observer for selected property changes
|
|
8891
10361
|
updated(changedProperties) {
|
|
10362
|
+
super.updated(changedProperties);
|
|
10363
|
+
|
|
8892
10364
|
if (changedProperties.has('selected')) {
|
|
8893
10365
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8894
10366
|
}
|
|
@@ -8910,10 +10382,19 @@ class AuroMenuOption extends i$2 {
|
|
|
8910
10382
|
return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
|
|
8911
10383
|
}
|
|
8912
10384
|
|
|
8913
|
-
|
|
10385
|
+
/**
|
|
10386
|
+
* Logic to determine the layout of the component.
|
|
10387
|
+
* @protected
|
|
10388
|
+
* @returns {void}
|
|
10389
|
+
*/
|
|
10390
|
+
renderLayout() {
|
|
8914
10391
|
return u`
|
|
8915
|
-
|
|
8916
|
-
|
|
10392
|
+
<div class="wrapper">
|
|
10393
|
+
${this.selected && !this.nocheckmark
|
|
10394
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10395
|
+
: undefined}
|
|
10396
|
+
<slot></slot>
|
|
10397
|
+
</div>
|
|
8917
10398
|
`;
|
|
8918
10399
|
}
|
|
8919
10400
|
}
|
|
@@ -8935,7 +10416,6 @@ function initExamples(initCount) {
|
|
|
8935
10416
|
inDialogExample();
|
|
8936
10417
|
resetStateExample();
|
|
8937
10418
|
auroMenuLoadingExample();
|
|
8938
|
-
valueTextExample();
|
|
8939
10419
|
} catch (err) {
|
|
8940
10420
|
if (initCount <= 20) {
|
|
8941
10421
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|