@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.9 → 0.0.0-pr624.91
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/headerVersion.d.ts +1 -1
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1241 -94
- package/components/bibtemplate/dist/registered.js +1241 -94
- 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 +74 -46
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +74 -46
- 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 +73 -45
- package/components/checkbox/dist/registered.js +73 -45
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +115 -8
- package/components/combobox/demo/api.min.js +3305 -1002
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +8 -34
- package/components/combobox/demo/index.min.js +3305 -1002
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +57 -14
- package/components/combobox/dist/index.js +2992 -836
- package/components/combobox/dist/registered.js +2992 -836
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +158 -21
- package/components/counter/demo/api.min.js +3417 -765
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +3417 -765
- 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 +3420 -768
- package/components/counter/dist/registered.js +3420 -768
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +62 -28
- package/components/datepicker/demo/api.min.js +11956 -8070
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +75 -8
- package/components/datepicker/demo/index.min.js +11956 -8070
- 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 +13802 -9916
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +13802 -9916
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +82 -275
- package/components/dropdown/demo/api.min.js +450 -261
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +450 -261
- 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 +449 -260
- package/components/dropdown/dist/registered.js +449 -260
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.md +1 -1
- package/components/form/demo/api.min.js +3 -3
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +3 -3
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/auro-form.d.ts +1 -1
- package/components/form/dist/index.js +2 -2
- package/components/form/dist/registered.js +2 -2
- package/components/helptext/dist/auro-helptext.d.ts +0 -2
- package/components/helptext/dist/index.js +3 -5
- package/components/helptext/dist/registered.js +3 -5
- package/components/input/README.md +5 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +226 -132
- package/components/input/demo/api.min.js +1034 -297
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +1048 -311
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +24 -0
- package/components/input/dist/base-input.d.ts +45 -11
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +1047 -310
- package/components/input/dist/registered.js +1047 -310
- package/components/layoutElement/dist/index.js +11 -8
- package/components/layoutElement/dist/registered.js +97 -0
- package/components/menu/demo/api.html +17 -10
- package/components/menu/demo/api.md +65 -8
- package/components/menu/demo/api.min.js +305 -63
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +305 -63
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +53 -7
- package/components/menu/dist/auro-menuoption.d.ts +21 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +290 -48
- package/components/menu/dist/registered.js +290 -48
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/menu/dist/styles/shapeSize-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 +92 -96
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +92 -96
- 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 +91 -95
- package/components/radio/dist/registered.js +91 -95
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +149 -122
- package/components/select/demo/api.min.js +2283 -736
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1066 -259
- package/components/select/demo/index.min.js +2284 -725
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +74 -25
- package/components/select/dist/index.js +2165 -753
- package/components/select/dist/registered.js +2165 -753
- 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/{input/dist/styles/default/input-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{input/dist/styles/default/label-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/input-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-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,19 +171,22 @@ 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
|
|
|
183
|
+
if (this.shape && this.size) {
|
|
195
184
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
185
|
+
} else {
|
|
186
|
+
wrapper.classList.add('shape-none');
|
|
196
187
|
}
|
|
197
188
|
}
|
|
189
|
+
|
|
198
190
|
}
|
|
199
191
|
|
|
200
192
|
resetLayoutClasses() {
|
|
@@ -239,9 +231,9 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
239
231
|
}
|
|
240
232
|
};
|
|
241
233
|
|
|
242
|
-
var shapeSizeCss$
|
|
234
|
+
var shapeSizeCss$2 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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$5 = 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$5();
|
|
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:
|
|
4285
|
+
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:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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{position:relative;display:block}: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])
|
|
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{transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}: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)}: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`.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-2xl,.accent-xl{text-transform:uppercase}.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-lg,.accent-md{text-transform:uppercase}.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-sm,.accent-xs{text-transform:uppercase}.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);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.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$4 = class AuroLibraryRuntimeUtils {
|
|
4007
4313
|
|
|
4008
4314
|
/* eslint-disable jsdoc/require-param */
|
|
4009
4315
|
|
|
@@ -4072,8 +4378,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
4072
4378
|
|
|
4073
4379
|
/**
|
|
4074
4380
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
4075
|
-
*
|
|
4076
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
4077
4381
|
*/
|
|
4078
4382
|
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
4079
4383
|
|
|
@@ -4084,7 +4388,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4084
4388
|
this.onDark = false;
|
|
4085
4389
|
this.hasTextContent = false;
|
|
4086
4390
|
|
|
4087
|
-
AuroLibraryRuntimeUtils$
|
|
4391
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4088
4392
|
}
|
|
4089
4393
|
|
|
4090
4394
|
static get styles() {
|
|
@@ -4140,7 +4444,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4140
4444
|
*
|
|
4141
4445
|
*/
|
|
4142
4446
|
static register(name = "auro-helptext") {
|
|
4143
|
-
AuroLibraryRuntimeUtils$
|
|
4447
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
4144
4448
|
}
|
|
4145
4449
|
|
|
4146
4450
|
updated() {
|
|
@@ -4189,7 +4493,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4189
4493
|
// function that renders the HTML and CSS into the scope of the component
|
|
4190
4494
|
render() {
|
|
4191
4495
|
return x`
|
|
4192
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4496
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4193
4497
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4194
4498
|
</div>
|
|
4195
4499
|
`;
|
|
@@ -4198,7 +4502,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4198
4502
|
|
|
4199
4503
|
var helpTextVersion$1 = '1.0.0';
|
|
4200
4504
|
|
|
4201
|
-
let AuroElement$
|
|
4505
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4202
4506
|
static get properties() {
|
|
4203
4507
|
return {
|
|
4204
4508
|
|
|
@@ -4233,19 +4537,22 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4233
4537
|
}
|
|
4234
4538
|
|
|
4235
4539
|
resetShapeClasses() {
|
|
4236
|
-
|
|
4237
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4540
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4238
4541
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4542
|
+
if (wrapper) {
|
|
4543
|
+
wrapper.classList.forEach((className) => {
|
|
4544
|
+
if (className.startsWith('shape-')) {
|
|
4545
|
+
wrapper.classList.remove(className);
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4245
4548
|
|
|
4549
|
+
if (this.shape && this.size) {
|
|
4246
4550
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4551
|
+
} else {
|
|
4552
|
+
wrapper.classList.add('shape-none');
|
|
4247
4553
|
}
|
|
4248
4554
|
}
|
|
4555
|
+
|
|
4249
4556
|
}
|
|
4250
4557
|
|
|
4251
4558
|
resetLayoutClasses() {
|
|
@@ -4294,10 +4601,9 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4294
4601
|
// See LICENSE in the project root for license information.
|
|
4295
4602
|
|
|
4296
4603
|
|
|
4297
|
-
|
|
4298
|
-
|
|
4604
|
+
|
|
4605
|
+
/*
|
|
4299
4606
|
* @slot - Default slot for the popover content.
|
|
4300
|
-
* @slot label - Defines the content of the label.
|
|
4301
4607
|
* @slot helpText - Defines the content of the helpText.
|
|
4302
4608
|
* @slot trigger - Defines the content of the trigger.
|
|
4303
4609
|
* @csspart trigger - The trigger content container.
|
|
@@ -4307,7 +4613,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4307
4613
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4308
4614
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4309
4615
|
*/
|
|
4310
|
-
class AuroDropdown extends AuroElement$
|
|
4616
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4311
4617
|
constructor() {
|
|
4312
4618
|
super();
|
|
4313
4619
|
|
|
@@ -4316,23 +4622,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4622
|
this.matchWidth = false;
|
|
4317
4623
|
this.noHideOnThisFocusLoss = false;
|
|
4318
4624
|
|
|
4319
|
-
this.errorMessage =
|
|
4625
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4320
4626
|
|
|
4321
4627
|
// Layout Config
|
|
4322
|
-
this.layout =
|
|
4323
|
-
this.shape =
|
|
4324
|
-
this.size =
|
|
4628
|
+
this.layout = undefined;
|
|
4629
|
+
this.shape = undefined;
|
|
4630
|
+
this.size = undefined;
|
|
4631
|
+
|
|
4325
4632
|
this.parentBorder = false;
|
|
4326
4633
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4634
|
+
/** @private */
|
|
4635
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4329
4636
|
|
|
4330
|
-
|
|
4331
|
-
return {
|
|
4332
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4333
|
-
};
|
|
4637
|
+
this.privateDefaults();
|
|
4334
4638
|
}
|
|
4335
4639
|
|
|
4640
|
+
/**
|
|
4641
|
+
* @private
|
|
4642
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4643
|
+
*/
|
|
4336
4644
|
get commonWrapperClasses() {
|
|
4337
4645
|
return {
|
|
4338
4646
|
'trigger': true,
|
|
@@ -4350,13 +4658,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4350
4658
|
privateDefaults() {
|
|
4351
4659
|
this.chevron = false;
|
|
4352
4660
|
this.disabled = false;
|
|
4661
|
+
this.disableFocusTrap = false;
|
|
4353
4662
|
this.error = false;
|
|
4354
|
-
this.inset = false;
|
|
4355
|
-
this.rounded = false;
|
|
4356
4663
|
this.tabIndex = 0;
|
|
4357
4664
|
this.noToggle = false;
|
|
4358
|
-
this.a11yAutocomplete = 'none';
|
|
4359
|
-
this.labeled = true;
|
|
4360
4665
|
this.a11yRole = 'button';
|
|
4361
4666
|
this.onDark = false;
|
|
4362
4667
|
this.showTriggerBorders = true;
|
|
@@ -4452,6 +4757,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4452
4757
|
this.floater.showBib();
|
|
4453
4758
|
}
|
|
4454
4759
|
|
|
4760
|
+
/**
|
|
4761
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4762
|
+
* If not, trigger element will get focus.
|
|
4763
|
+
*/
|
|
4764
|
+
focus() {
|
|
4765
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4766
|
+
this.focusTrap.focusFirstElement();
|
|
4767
|
+
} else {
|
|
4768
|
+
this.trigger.focus();
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4455
4772
|
// function to define props used within the scope of this component
|
|
4456
4773
|
static get properties() {
|
|
4457
4774
|
return {
|
|
@@ -4465,6 +4782,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4465
4782
|
reflect: true
|
|
4466
4783
|
},
|
|
4467
4784
|
|
|
4785
|
+
/**
|
|
4786
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4787
|
+
* @default false
|
|
4788
|
+
*/
|
|
4789
|
+
disableEventShow: {
|
|
4790
|
+
type: Boolean,
|
|
4791
|
+
reflect: true
|
|
4792
|
+
},
|
|
4793
|
+
|
|
4468
4794
|
/**
|
|
4469
4795
|
* If declared, applies a border around the trigger slot.
|
|
4470
4796
|
*/
|
|
@@ -4483,17 +4809,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4483
4809
|
},
|
|
4484
4810
|
|
|
4485
4811
|
/**
|
|
4486
|
-
* If declared, the dropdown
|
|
4812
|
+
* If declared, the dropdown is not interactive.
|
|
4487
4813
|
*/
|
|
4488
|
-
|
|
4814
|
+
disabled: {
|
|
4489
4815
|
type: Boolean,
|
|
4490
4816
|
reflect: true
|
|
4491
4817
|
},
|
|
4492
4818
|
|
|
4493
4819
|
/**
|
|
4494
|
-
* If declared, the
|
|
4820
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4495
4821
|
*/
|
|
4496
|
-
|
|
4822
|
+
disableFocusTrap: {
|
|
4497
4823
|
type: Boolean,
|
|
4498
4824
|
reflect: true
|
|
4499
4825
|
},
|
|
@@ -4538,27 +4864,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4538
4864
|
reflect: true
|
|
4539
4865
|
},
|
|
4540
4866
|
|
|
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
4867
|
/**
|
|
4558
4868
|
* If true, the dropdown bib is displayed.
|
|
4559
4869
|
*/
|
|
4560
4870
|
isPopoverVisible: {
|
|
4561
|
-
type: Boolean
|
|
4871
|
+
type: Boolean,
|
|
4872
|
+
reflect: true,
|
|
4873
|
+
attribute: 'open'
|
|
4562
4874
|
},
|
|
4563
4875
|
|
|
4564
4876
|
/**
|
|
@@ -4597,15 +4909,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4597
4909
|
reflect: true
|
|
4598
4910
|
},
|
|
4599
4911
|
|
|
4600
|
-
/**
|
|
4601
|
-
* Defines if there is a label preset.
|
|
4602
|
-
* @private
|
|
4603
|
-
*/
|
|
4604
|
-
labeled: {
|
|
4605
|
-
type: Boolean,
|
|
4606
|
-
reflect: true
|
|
4607
|
-
},
|
|
4608
|
-
|
|
4609
4912
|
/**
|
|
4610
4913
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4611
4914
|
* @private
|
|
@@ -4666,6 +4969,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4666
4969
|
reflect: true
|
|
4667
4970
|
},
|
|
4668
4971
|
|
|
4972
|
+
/**
|
|
4973
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4974
|
+
*/
|
|
4669
4975
|
onSlotChange: {
|
|
4670
4976
|
type: Function,
|
|
4671
4977
|
reflect: false
|
|
@@ -4680,14 +4986,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4680
4986
|
reflect: true
|
|
4681
4987
|
},
|
|
4682
4988
|
|
|
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
4989
|
/**
|
|
4692
4990
|
* @private
|
|
4693
4991
|
*/
|
|
@@ -4702,22 +5000,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4702
5000
|
type: String || undefined,
|
|
4703
5001
|
attribute: false,
|
|
4704
5002
|
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
5003
|
}
|
|
4714
5004
|
};
|
|
4715
5005
|
}
|
|
4716
5006
|
|
|
4717
5007
|
static get styles() {
|
|
4718
5008
|
return [
|
|
5009
|
+
styleCss$1$2,
|
|
5010
|
+
tokensCss$1$2,
|
|
4719
5011
|
colorCss$1$2,
|
|
4720
|
-
tokensCss$1$1,
|
|
4721
5012
|
|
|
4722
5013
|
// default layout
|
|
4723
5014
|
classicColorCss,
|
|
@@ -4729,7 +5020,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4729
5020
|
// snowflake layout
|
|
4730
5021
|
styleSnowflakeCss,
|
|
4731
5022
|
|
|
4732
|
-
shapeSizeCss
|
|
5023
|
+
shapeSizeCss$1
|
|
4733
5024
|
];
|
|
4734
5025
|
}
|
|
4735
5026
|
|
|
@@ -4779,13 +5070,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4779
5070
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4780
5071
|
this.handleTriggerContentSlotChange();
|
|
4781
5072
|
}
|
|
5073
|
+
}
|
|
4782
5074
|
|
|
5075
|
+
/**
|
|
5076
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
5077
|
+
* @private
|
|
5078
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
5079
|
+
*/
|
|
5080
|
+
handleDropdownToggle(event) {
|
|
5081
|
+
this.updateFocusTrap();
|
|
5082
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
5083
|
+
const eventType = event.detail.eventType || "unknown";
|
|
5084
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5085
|
+
this.trigger.focus();
|
|
5086
|
+
}
|
|
4783
5087
|
}
|
|
4784
5088
|
|
|
4785
5089
|
firstUpdated() {
|
|
4786
5090
|
|
|
4787
5091
|
// Configure the floater to, this will generate the ID for the bib
|
|
4788
5092
|
this.floater.configure(this, 'auroDropdown');
|
|
5093
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4789
5094
|
|
|
4790
5095
|
/**
|
|
4791
5096
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4803,6 +5108,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4803
5108
|
|
|
4804
5109
|
// Add the tag name as an attribute if it is different than the component name
|
|
4805
5110
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
5111
|
+
|
|
5112
|
+
this.trigger.addEventListener('click', () => {
|
|
5113
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
5114
|
+
bubbles: true,
|
|
5115
|
+
composed: true
|
|
5116
|
+
}));
|
|
5117
|
+
});
|
|
4806
5118
|
}
|
|
4807
5119
|
|
|
4808
5120
|
/**
|
|
@@ -4846,70 +5158,33 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4846
5158
|
}
|
|
4847
5159
|
|
|
4848
5160
|
/**
|
|
4849
|
-
* Function to support @focusout event.
|
|
4850
5161
|
* @private
|
|
4851
|
-
* @return {void}
|
|
4852
5162
|
*/
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
5163
|
+
updateFocusTrap() {
|
|
5164
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5165
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5166
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5167
|
+
this.focusTrap.focusFirstElement();
|
|
5168
|
+
return;
|
|
5169
|
+
}
|
|
4856
5170
|
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
* @param {HTMLElement} element - Element to check.
|
|
4861
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4862
|
-
*/
|
|
4863
|
-
containsFocusableElement(element) {
|
|
4864
|
-
this.showTriggerBorders = true;
|
|
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
|
-
});
|
|
5171
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5172
|
+
if (!this.focusTrap) {
|
|
5173
|
+
return;
|
|
4910
5174
|
}
|
|
4911
5175
|
|
|
4912
|
-
|
|
5176
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5177
|
+
this.focusTrap.disconnect();
|
|
5178
|
+
this.focusTrap = undefined;
|
|
5179
|
+
}
|
|
5180
|
+
|
|
5181
|
+
/**
|
|
5182
|
+
* Function to support @focusout event.
|
|
5183
|
+
* @private
|
|
5184
|
+
* @return {void}
|
|
5185
|
+
*/
|
|
5186
|
+
handleFocusout() {
|
|
5187
|
+
this.hasFocus = false;
|
|
4913
5188
|
}
|
|
4914
5189
|
|
|
4915
5190
|
/**
|
|
@@ -5005,14 +5280,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5005
5280
|
* @returns {void}
|
|
5006
5281
|
*/
|
|
5007
5282
|
handleTriggerContentSlotChange(event) {
|
|
5008
|
-
|
|
5009
5283
|
this.floater.handleTriggerTabIndex();
|
|
5010
5284
|
|
|
5011
5285
|
// Get the trigger
|
|
5012
5286
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5013
5287
|
|
|
5014
5288
|
// Get the trigger slot
|
|
5015
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5289
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
5016
5290
|
|
|
5017
5291
|
// If there's a trigger slot
|
|
5018
5292
|
if (triggerSlot) {
|
|
@@ -5024,7 +5298,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5024
5298
|
if (triggerContentNodes) {
|
|
5025
5299
|
|
|
5026
5300
|
// See if any of them are focusable elements
|
|
5027
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5301
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5028
5302
|
|
|
5029
5303
|
// If any of them are focusable elements
|
|
5030
5304
|
if (this.triggerContentFocusable) {
|
|
@@ -5075,7 +5349,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5075
5349
|
*
|
|
5076
5350
|
* @private
|
|
5077
5351
|
* @method handleDefaultSlot
|
|
5078
|
-
* @param {Event} event - The event object representing the slot change.
|
|
5079
5352
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
5080
5353
|
*/
|
|
5081
5354
|
handleDefaultSlot() {
|
|
@@ -5085,29 +5358,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5085
5358
|
}
|
|
5086
5359
|
}
|
|
5087
5360
|
|
|
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
5361
|
/**
|
|
5112
5362
|
* Returns HTML for the common portion of the layouts.
|
|
5113
5363
|
* @private
|
|
@@ -5120,24 +5370,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5120
5370
|
<div
|
|
5121
5371
|
id="trigger"
|
|
5122
5372
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5123
|
-
tabindex="${this.tabIndex}"
|
|
5373
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5124
5374
|
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)}"
|
|
5375
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5376
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5127
5377
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5128
5378
|
@focusin="${this.handleFocusin}"
|
|
5129
5379
|
@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>
|
|
5380
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5381
|
+
<slot
|
|
5382
|
+
name="trigger"
|
|
5383
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5139
5384
|
</div>
|
|
5140
|
-
${this.chevron
|
|
5385
|
+
${this.chevron ? u`
|
|
5141
5386
|
<div
|
|
5142
5387
|
id="showStateIcon"
|
|
5143
5388
|
class="chevron"
|
|
@@ -5158,11 +5403,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5158
5403
|
<div id="bibSizer" part="size"></div>
|
|
5159
5404
|
<${this.dropdownBibTag}
|
|
5160
5405
|
id="bib"
|
|
5406
|
+
shape="${this.shape}"
|
|
5161
5407
|
?data-show="${this.isPopoverVisible}"
|
|
5162
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5163
|
-
?common="${this.common}"
|
|
5164
|
-
?rounded="${this.common || this.rounded}"
|
|
5165
|
-
?inset="${this.common || this.inset}">
|
|
5408
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5166
5409
|
<div class="slotContent">
|
|
5167
5410
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5168
5411
|
</div>
|
|
@@ -5177,62 +5420,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5177
5420
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5178
5421
|
*/
|
|
5179
5422
|
renderLayoutClassic() {
|
|
5423
|
+
// TODO: check with Doug why this was never used?
|
|
5424
|
+
const helpTextClasses = {
|
|
5425
|
+
'helpText': true
|
|
5426
|
+
};
|
|
5180
5427
|
|
|
5181
5428
|
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>
|
|
5429
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5236
5430
|
`;
|
|
5237
5431
|
}
|
|
5238
5432
|
|
|
@@ -5300,9 +5494,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5300
5494
|
|
|
5301
5495
|
var dropdownVersion = '3.0.0';
|
|
5302
5496
|
|
|
5303
|
-
var colorCss$
|
|
5497
|
+
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
5498
|
|
|
5305
|
-
var styleCss$
|
|
5499
|
+
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;padding:var(--ds-size-200, 1rem);padding-top:var(--ds-size-400, 2rem);padding-bottom:0}#headerContainer .titleRow{display:flex;flex-direction:row;justify-content:space-between;gap:var(--ds-size-100, 0.5rem)}#headerContainer .header{max-width:calc(100vw - var(--ds-size-900, 4.5rem));padding-top:var(--ds-size-200, 1rem)}#headerContainer .subheader{width:100%}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, 2.5rem)}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
5306
5500
|
|
|
5307
5501
|
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
5502
|
|
|
@@ -5313,7 +5507,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5313
5507
|
|
|
5314
5508
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5315
5509
|
|
|
5316
|
-
let AuroLibraryRuntimeUtils$
|
|
5510
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5317
5511
|
|
|
5318
5512
|
/* eslint-disable jsdoc/require-param */
|
|
5319
5513
|
|
|
@@ -5330,92 +5524,1186 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
5330
5524
|
}
|
|
5331
5525
|
|
|
5332
5526
|
/**
|
|
5333
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
5334
|
-
* @returns {void}
|
|
5527
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5528
|
+
* @returns {void}
|
|
5529
|
+
*/
|
|
5530
|
+
closestElement(
|
|
5531
|
+
selector, // selector like in .closest()
|
|
5532
|
+
base = this, // extra functionality to skip a parent
|
|
5533
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5534
|
+
!el || el === document || el === window
|
|
5535
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5536
|
+
: found
|
|
5537
|
+
? found // found a selector INside this element
|
|
5538
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5539
|
+
) {
|
|
5540
|
+
return __Closest(base);
|
|
5541
|
+
}
|
|
5542
|
+
/* eslint-enable jsdoc/require-param */
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* 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.
|
|
5546
|
+
* @param {Object} elem - The element to check.
|
|
5547
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5548
|
+
* @returns {void}
|
|
5549
|
+
*/
|
|
5550
|
+
handleComponentTagRename(elem, tagName) {
|
|
5551
|
+
const tag = tagName.toLowerCase();
|
|
5552
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5553
|
+
|
|
5554
|
+
if (elemTag !== tag) {
|
|
5555
|
+
elem.setAttribute(tag, true);
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
/**
|
|
5560
|
+
* Validates if an element is a specific Auro component.
|
|
5561
|
+
* @param {Object} elem - The element to validate.
|
|
5562
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5563
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5564
|
+
*/
|
|
5565
|
+
elementMatch(elem, tagName) {
|
|
5566
|
+
const tag = tagName.toLowerCase();
|
|
5567
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5568
|
+
|
|
5569
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5570
|
+
}
|
|
5571
|
+
};
|
|
5572
|
+
|
|
5573
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5574
|
+
// See LICENSE in the project root for license information.
|
|
5575
|
+
|
|
5576
|
+
|
|
5577
|
+
class AuroDependencyVersioning {
|
|
5578
|
+
|
|
5579
|
+
/**
|
|
5580
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5581
|
+
* @private
|
|
5582
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5583
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5584
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5585
|
+
*/
|
|
5586
|
+
generateElementName(baseName, version) {
|
|
5587
|
+
let result = baseName;
|
|
5588
|
+
|
|
5589
|
+
result += '-';
|
|
5590
|
+
result += version.replace(/[.]/g, '_');
|
|
5591
|
+
|
|
5592
|
+
return result;
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
/**
|
|
5596
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5597
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5598
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5599
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5600
|
+
*/
|
|
5601
|
+
generateTag(baseName, version, tagClass) {
|
|
5602
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5603
|
+
const tag = i`${s(elementName)}`;
|
|
5604
|
+
|
|
5605
|
+
if (!customElements.get(elementName)) {
|
|
5606
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
return tag;
|
|
5610
|
+
}
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
/**
|
|
5614
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5615
|
+
*/
|
|
5616
|
+
const _observers = new WeakMap();
|
|
5617
|
+
|
|
5618
|
+
/**
|
|
5619
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5620
|
+
* Structure: {
|
|
5621
|
+
* host: {
|
|
5622
|
+
* matchers: Set<Function>,
|
|
5623
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5624
|
+
* }
|
|
5625
|
+
* }
|
|
5626
|
+
*/
|
|
5627
|
+
const _transportConfig = new WeakMap();
|
|
5628
|
+
|
|
5629
|
+
/**
|
|
5630
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5631
|
+
*
|
|
5632
|
+
* @param {Object} params - The parameters for the function.
|
|
5633
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5634
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5635
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5636
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5637
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5638
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5639
|
+
*/
|
|
5640
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5641
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5642
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5643
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5644
|
+
}
|
|
5645
|
+
|
|
5646
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5647
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5648
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
// Guard Clause: Ensure match is a function
|
|
5652
|
+
if (typeof match !== 'function') {
|
|
5653
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5657
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5658
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
// Register this transport and get cleanup function
|
|
5662
|
+
return _registerTransport({
|
|
5663
|
+
host,
|
|
5664
|
+
target,
|
|
5665
|
+
matcher: match,
|
|
5666
|
+
removeOriginal
|
|
5667
|
+
});
|
|
5668
|
+
};
|
|
5669
|
+
|
|
5670
|
+
/**
|
|
5671
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5672
|
+
*
|
|
5673
|
+
* @param {Object} params - The parameters object.
|
|
5674
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5675
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5676
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5677
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5678
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5679
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5680
|
+
* @private
|
|
5681
|
+
*/
|
|
5682
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5683
|
+
// Initialize config for this host if it doesn't exist
|
|
5684
|
+
if (!_transportConfig.has(host)) {
|
|
5685
|
+
_transportConfig.set(host, {
|
|
5686
|
+
matchers: new Set(),
|
|
5687
|
+
targets: new Map()
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
const config = _transportConfig.get(host);
|
|
5692
|
+
|
|
5693
|
+
// Add the matcher to the set of matchers for this host
|
|
5694
|
+
config.matchers.add(matcher);
|
|
5695
|
+
|
|
5696
|
+
// Initialize target entry if it doesn't exist
|
|
5697
|
+
if (!config.targets.has(target)) {
|
|
5698
|
+
config.targets.set(target, new Map());
|
|
5699
|
+
}
|
|
5700
|
+
|
|
5701
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5702
|
+
config.targets.get(target).set(matcher, {
|
|
5703
|
+
removeOriginal,
|
|
5704
|
+
currentAttributes: new Map()
|
|
5705
|
+
});
|
|
5706
|
+
|
|
5707
|
+
// Perform initial attribute transport
|
|
5708
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5709
|
+
|
|
5710
|
+
// Attach observer
|
|
5711
|
+
_attachObserver(host);
|
|
5712
|
+
|
|
5713
|
+
// Return cleanup function and utility functions
|
|
5714
|
+
return {
|
|
5715
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5716
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5717
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5718
|
+
}
|
|
5719
|
+
};
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5723
|
+
*
|
|
5724
|
+
* @param {HTMLElement} host - The host element
|
|
5725
|
+
* @param {HTMLElement} target - The target element
|
|
5726
|
+
* @param {Function} matcher - The matcher function
|
|
5727
|
+
* @private
|
|
5728
|
+
*/
|
|
5729
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5730
|
+
const config = _transportConfig.get(host);
|
|
5731
|
+
if (!config) return;
|
|
5732
|
+
|
|
5733
|
+
// Remove this matcher from this target
|
|
5734
|
+
const targetMatchers = config.targets.get(target);
|
|
5735
|
+
if (targetMatchers) {
|
|
5736
|
+
targetMatchers.delete(matcher);
|
|
5737
|
+
|
|
5738
|
+
// If this target has no more matchers, remove it
|
|
5739
|
+
if (targetMatchers.size === 0) {
|
|
5740
|
+
config.targets.delete(target);
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
// Check if this matcher is still used by any target
|
|
5745
|
+
let matcherStillUsed = false;
|
|
5746
|
+
for (const matcherMap of config.targets.values()) {
|
|
5747
|
+
if (matcherMap.has(matcher)) {
|
|
5748
|
+
matcherStillUsed = true;
|
|
5749
|
+
break;
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
|
|
5753
|
+
// If not used anymore, remove from matchers set
|
|
5754
|
+
if (!matcherStillUsed) {
|
|
5755
|
+
config.matchers.delete(matcher);
|
|
5756
|
+
}
|
|
5757
|
+
|
|
5758
|
+
// If no more targets or matchers, detach observer
|
|
5759
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5760
|
+
_detachObserver(host);
|
|
5761
|
+
}
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5766
|
+
*
|
|
5767
|
+
* @param {Object} params - The parameters object.
|
|
5768
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5769
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5770
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5771
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5772
|
+
* @returns {void}
|
|
5773
|
+
* @private
|
|
5774
|
+
*/
|
|
5775
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5776
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5777
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5778
|
+
.filter(attr => matcher(attr))
|
|
5779
|
+
.reduce((acc, attr) => {
|
|
5780
|
+
acc[attr] = host.getAttribute(attr);
|
|
5781
|
+
return acc;
|
|
5782
|
+
}, {});
|
|
5783
|
+
|
|
5784
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5785
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5786
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5787
|
+
target.setAttribute(key, value);
|
|
5788
|
+
if (removeOriginal) {
|
|
5789
|
+
host.removeAttribute(key);
|
|
5790
|
+
}
|
|
5791
|
+
});
|
|
5792
|
+
};
|
|
5793
|
+
|
|
5794
|
+
/**
|
|
5795
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5796
|
+
*
|
|
5797
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5798
|
+
* @returns {MutationObserver} The observer instance.
|
|
5799
|
+
* @private
|
|
5800
|
+
*/
|
|
5801
|
+
const _attachObserver = (host) => {
|
|
5802
|
+
// If an observer for this host already exists, return it
|
|
5803
|
+
if (_observers.has(host)) {
|
|
5804
|
+
return _observers.get(host);
|
|
5805
|
+
}
|
|
5806
|
+
|
|
5807
|
+
// Create a new MutationObserver
|
|
5808
|
+
const observer = new MutationObserver((mutations) => {
|
|
5809
|
+
const config = _transportConfig.get(host);
|
|
5810
|
+
if (!config) return;
|
|
5811
|
+
|
|
5812
|
+
// For each mutation affecting attributes
|
|
5813
|
+
mutations
|
|
5814
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5815
|
+
.forEach(mutation => {
|
|
5816
|
+
const attributeName = mutation.attributeName;
|
|
5817
|
+
|
|
5818
|
+
// Find matchers that care about this attribute
|
|
5819
|
+
for (const matcher of config.matchers) {
|
|
5820
|
+
if (matcher(attributeName)) {
|
|
5821
|
+
// For each target that uses this matcher
|
|
5822
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5823
|
+
if (matcherConfigs.has(matcher)) {
|
|
5824
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5825
|
+
_transportAttributes({
|
|
5826
|
+
host,
|
|
5827
|
+
target,
|
|
5828
|
+
matcher,
|
|
5829
|
+
removeOriginal
|
|
5830
|
+
});
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
});
|
|
5836
|
+
});
|
|
5837
|
+
|
|
5838
|
+
// Start observing attribute changes
|
|
5839
|
+
observer.observe(host, { attributes: true });
|
|
5840
|
+
|
|
5841
|
+
// Store the observer
|
|
5842
|
+
_observers.set(host, observer);
|
|
5843
|
+
|
|
5844
|
+
return observer;
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
/**
|
|
5848
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5849
|
+
*
|
|
5850
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5851
|
+
* @private
|
|
5852
|
+
*/
|
|
5853
|
+
const _detachObserver = (host) => {
|
|
5854
|
+
if (_observers.has(host)) {
|
|
5855
|
+
const observer = _observers.get(host);
|
|
5856
|
+
observer.disconnect();
|
|
5857
|
+
_observers.delete(host);
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5860
|
+
// Clean up the transport config as well
|
|
5861
|
+
if (_transportConfig.has(host)) {
|
|
5862
|
+
_transportConfig.delete(host);
|
|
5863
|
+
}
|
|
5864
|
+
};
|
|
5865
|
+
|
|
5866
|
+
/**
|
|
5867
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5868
|
+
* @param {HTMLElement} host - The host element
|
|
5869
|
+
* @param {HTMLElement} target - The target element
|
|
5870
|
+
* @param {Function} matcher - The matcher function
|
|
5871
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5872
|
+
* @private
|
|
5873
|
+
*/
|
|
5874
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5875
|
+
const config = _transportConfig.get(host);
|
|
5876
|
+
if (!config) return undefined;
|
|
5877
|
+
|
|
5878
|
+
const targetMatchers = config.targets.get(target);
|
|
5879
|
+
if (!targetMatchers) return undefined;
|
|
5880
|
+
|
|
5881
|
+
return targetMatchers.get(matcher);
|
|
5882
|
+
};
|
|
5883
|
+
|
|
5884
|
+
/**
|
|
5885
|
+
* Sets an observed attribute value
|
|
5886
|
+
* @param {HTMLElement} host - The host element
|
|
5887
|
+
* @param {HTMLElement} target - The target element
|
|
5888
|
+
* @param {Function} matcher - The matcher function
|
|
5889
|
+
* @param {string} key - The attribute name
|
|
5890
|
+
* @param {string} value - The attribute value
|
|
5891
|
+
* @private
|
|
5892
|
+
*/
|
|
5893
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5894
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5895
|
+
if (matcherConfig) {
|
|
5896
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5897
|
+
}
|
|
5898
|
+
};
|
|
5899
|
+
|
|
5900
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5901
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5902
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5903
|
+
return undefined;
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5906
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5907
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5908
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5909
|
+
return [];
|
|
5910
|
+
};
|
|
5911
|
+
|
|
5912
|
+
const _matchers = {
|
|
5913
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5914
|
+
'role': attr => attr.match(/^role$/)
|
|
5915
|
+
};
|
|
5916
|
+
|
|
5917
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5918
|
+
return transportAttributes({
|
|
5919
|
+
host,
|
|
5920
|
+
target,
|
|
5921
|
+
match: attr => {
|
|
5922
|
+
for (const key in _matchers) {
|
|
5923
|
+
if (_matchers[key](attr)) return true;
|
|
5924
|
+
}
|
|
5925
|
+
return false;
|
|
5926
|
+
},
|
|
5927
|
+
removeOriginal
|
|
5928
|
+
});
|
|
5929
|
+
};
|
|
5930
|
+
|
|
5931
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5932
|
+
|
|
5933
|
+
/**
|
|
5934
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5935
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5936
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5937
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5938
|
+
* @private
|
|
5939
|
+
*/
|
|
5940
|
+
attributeWatcher;
|
|
5941
|
+
|
|
5942
|
+
static get properties() {
|
|
5943
|
+
return {
|
|
5944
|
+
|
|
5945
|
+
/**
|
|
5946
|
+
* Defines the layout of an element.
|
|
5947
|
+
* @default {'default'}
|
|
5948
|
+
*/
|
|
5949
|
+
layout: {
|
|
5950
|
+
type: String,
|
|
5951
|
+
attribute: "layout",
|
|
5952
|
+
reflect: true
|
|
5953
|
+
},
|
|
5954
|
+
|
|
5955
|
+
/**
|
|
5956
|
+
* Defines the shape of an element.
|
|
5957
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5958
|
+
* @default {'default'}
|
|
5959
|
+
*/
|
|
5960
|
+
shape: {
|
|
5961
|
+
type: String,
|
|
5962
|
+
attribute: "shape",
|
|
5963
|
+
reflect: true
|
|
5964
|
+
},
|
|
5965
|
+
|
|
5966
|
+
/**
|
|
5967
|
+
* Defines the size of an element.
|
|
5968
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5969
|
+
* @default {'md'}
|
|
5970
|
+
*/
|
|
5971
|
+
size: {
|
|
5972
|
+
type: String,
|
|
5973
|
+
attribute: "size",
|
|
5974
|
+
reflect: true
|
|
5975
|
+
},
|
|
5976
|
+
|
|
5977
|
+
/**
|
|
5978
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5979
|
+
* @default {false}
|
|
5980
|
+
*/
|
|
5981
|
+
onDark: {
|
|
5982
|
+
type: Boolean,
|
|
5983
|
+
attribute: "ondark",
|
|
5984
|
+
reflect: true
|
|
5985
|
+
},
|
|
5986
|
+
|
|
5987
|
+
/**
|
|
5988
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5989
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5990
|
+
* @type {HTMLElement|null}
|
|
5991
|
+
* @default {null}
|
|
5992
|
+
* @private
|
|
5993
|
+
*/
|
|
5994
|
+
wrapper: {
|
|
5995
|
+
attribute: false,
|
|
5996
|
+
reflect: false
|
|
5997
|
+
}
|
|
5998
|
+
};
|
|
5999
|
+
}
|
|
6000
|
+
|
|
6001
|
+
|
|
6002
|
+
|
|
6003
|
+
resetShapeClasses() {
|
|
6004
|
+
if (this.shape && this.size) {
|
|
6005
|
+
|
|
6006
|
+
if (this.wrapper) {
|
|
6007
|
+
this.wrapper.classList.forEach((className) => {
|
|
6008
|
+
if (className.startsWith('shape-')) {
|
|
6009
|
+
this.wrapper.classList.remove(className);
|
|
6010
|
+
}
|
|
6011
|
+
});
|
|
6012
|
+
|
|
6013
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
resetLayoutClasses() {
|
|
6019
|
+
if (this.layout) {
|
|
6020
|
+
if (this.wrapper) {
|
|
6021
|
+
this.wrapper.classList.forEach((className) => {
|
|
6022
|
+
if (className.startsWith('layout-')) {
|
|
6023
|
+
this.wrapper.classList.remove(className);
|
|
6024
|
+
}
|
|
6025
|
+
});
|
|
6026
|
+
|
|
6027
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6028
|
+
}
|
|
6029
|
+
}
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
updateComponentArchitecture() {
|
|
6033
|
+
this.resetLayoutClasses();
|
|
6034
|
+
this.resetShapeClasses();
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
updated(changedProperties) {
|
|
6038
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6039
|
+
this.updateComponentArchitecture();
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
|
|
6043
|
+
firstUpdated() {
|
|
6044
|
+
super.firstUpdated();
|
|
6045
|
+
|
|
6046
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6047
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6048
|
+
|
|
6049
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6050
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
disconnectedCallback() {
|
|
6054
|
+
super.disconnectedCallback();
|
|
6055
|
+
|
|
6056
|
+
// Cleanup the ARIA observer if it exists
|
|
6057
|
+
if (this.attributeWatcher) {
|
|
6058
|
+
this.attributeWatcher.cleanup();
|
|
6059
|
+
this.attributeWatcher = null;
|
|
6060
|
+
}
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6063
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6064
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6065
|
+
render() {
|
|
6066
|
+
try {
|
|
6067
|
+
return this.renderLayout();
|
|
6068
|
+
} catch (error) {
|
|
6069
|
+
// failed to get the defined layout
|
|
6070
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6071
|
+
|
|
6072
|
+
// fallback to the default layout
|
|
6073
|
+
return this.getLayout('default');
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
};
|
|
6077
|
+
|
|
6078
|
+
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}`;
|
|
6079
|
+
|
|
6080
|
+
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)}`;
|
|
6081
|
+
|
|
6082
|
+
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}`;
|
|
6083
|
+
|
|
6084
|
+
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}`;
|
|
6085
|
+
|
|
6086
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6087
|
+
// See LICENSE in the project root for license information.
|
|
6088
|
+
|
|
6089
|
+
// ---------------------------------------------------------------------
|
|
6090
|
+
|
|
6091
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6092
|
+
|
|
6093
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
6094
|
+
|
|
6095
|
+
/* eslint-disable jsdoc/require-param */
|
|
6096
|
+
|
|
6097
|
+
/**
|
|
6098
|
+
* This will register a new custom element with the browser.
|
|
6099
|
+
* @param {String} name - The name of the custom element.
|
|
6100
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6101
|
+
* @returns {void}
|
|
6102
|
+
*/
|
|
6103
|
+
registerComponent(name, componentClass) {
|
|
6104
|
+
if (!customElements.get(name)) {
|
|
6105
|
+
customElements.define(name, class extends componentClass {});
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6108
|
+
|
|
6109
|
+
/**
|
|
6110
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6111
|
+
* @returns {void}
|
|
6112
|
+
*/
|
|
6113
|
+
closestElement(
|
|
6114
|
+
selector, // selector like in .closest()
|
|
6115
|
+
base = this, // extra functionality to skip a parent
|
|
6116
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6117
|
+
!el || el === document || el === window
|
|
6118
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6119
|
+
: found
|
|
6120
|
+
? found // found a selector INside this element
|
|
6121
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6122
|
+
) {
|
|
6123
|
+
return __Closest(base);
|
|
6124
|
+
}
|
|
6125
|
+
/* eslint-enable jsdoc/require-param */
|
|
6126
|
+
|
|
6127
|
+
/**
|
|
6128
|
+
* 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.
|
|
6129
|
+
* @param {Object} elem - The element to check.
|
|
6130
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6131
|
+
* @returns {void}
|
|
6132
|
+
*/
|
|
6133
|
+
handleComponentTagRename(elem, tagName) {
|
|
6134
|
+
const tag = tagName.toLowerCase();
|
|
6135
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6136
|
+
|
|
6137
|
+
if (elemTag !== tag) {
|
|
6138
|
+
elem.setAttribute(tag, true);
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
/**
|
|
6143
|
+
* Validates if an element is a specific Auro component.
|
|
6144
|
+
* @param {Object} elem - The element to validate.
|
|
6145
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6146
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6147
|
+
*/
|
|
6148
|
+
elementMatch(elem, tagName) {
|
|
6149
|
+
const tag = tagName.toLowerCase();
|
|
6150
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6151
|
+
|
|
6152
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6153
|
+
}
|
|
6154
|
+
};
|
|
6155
|
+
|
|
6156
|
+
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}}`;
|
|
6157
|
+
|
|
6158
|
+
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}`;
|
|
6159
|
+
|
|
6160
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6161
|
+
|
|
6162
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6163
|
+
// See LICENSE in the project root for license information.
|
|
6164
|
+
|
|
6165
|
+
|
|
6166
|
+
class AuroLoader extends i$2 {
|
|
6167
|
+
constructor() {
|
|
6168
|
+
super();
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* @private
|
|
6172
|
+
*/
|
|
6173
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6174
|
+
|
|
6175
|
+
/**
|
|
6176
|
+
* @private
|
|
6177
|
+
*/
|
|
6178
|
+
this.mdCount = 3;
|
|
6179
|
+
|
|
6180
|
+
/**
|
|
6181
|
+
* @private
|
|
6182
|
+
*/
|
|
6183
|
+
this.smCount = 2;
|
|
6184
|
+
|
|
6185
|
+
/**
|
|
6186
|
+
* @private
|
|
6187
|
+
*/
|
|
6188
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
6189
|
+
|
|
6190
|
+
this.orbit = false;
|
|
6191
|
+
this.ringworm = false;
|
|
6192
|
+
this.laser = false;
|
|
6193
|
+
this.pulse = false;
|
|
6194
|
+
}
|
|
6195
|
+
|
|
6196
|
+
// function to define props used within the scope of this component
|
|
6197
|
+
static get properties() {
|
|
6198
|
+
return {
|
|
6199
|
+
|
|
6200
|
+
/**
|
|
6201
|
+
* Sets loader to laser type.
|
|
6202
|
+
*/
|
|
6203
|
+
laser: {
|
|
6204
|
+
type: Boolean,
|
|
6205
|
+
reflect: true
|
|
6206
|
+
},
|
|
6207
|
+
|
|
6208
|
+
/**
|
|
6209
|
+
* Sets loader to orbit type.
|
|
6210
|
+
*/
|
|
6211
|
+
orbit: {
|
|
6212
|
+
type: Boolean,
|
|
6213
|
+
reflect: true
|
|
6214
|
+
},
|
|
6215
|
+
|
|
6216
|
+
/**
|
|
6217
|
+
* Sets loader to pulse type.
|
|
6218
|
+
*/
|
|
6219
|
+
pulse: {
|
|
6220
|
+
type: Boolean,
|
|
6221
|
+
reflect: true
|
|
6222
|
+
},
|
|
6223
|
+
|
|
6224
|
+
/**
|
|
6225
|
+
* Sets loader to ringworm type.
|
|
6226
|
+
*/
|
|
6227
|
+
ringworm: {
|
|
6228
|
+
type: Boolean,
|
|
6229
|
+
reflect: true
|
|
6230
|
+
}
|
|
6231
|
+
};
|
|
6232
|
+
}
|
|
6233
|
+
|
|
6234
|
+
static get styles() {
|
|
6235
|
+
return [
|
|
6236
|
+
i$5`${styleCss$2$1}`,
|
|
6237
|
+
i$5`${colorCss$1$1}`,
|
|
6238
|
+
i$5`${tokensCss$1$1}`
|
|
6239
|
+
];
|
|
6240
|
+
}
|
|
6241
|
+
|
|
6242
|
+
/**
|
|
6243
|
+
* This will register this element with the browser.
|
|
6244
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6245
|
+
*
|
|
6246
|
+
* @example
|
|
6247
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6248
|
+
*
|
|
6249
|
+
*/
|
|
6250
|
+
static register(name = "auro-loader") {
|
|
6251
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroLoader);
|
|
6252
|
+
}
|
|
6253
|
+
|
|
6254
|
+
firstUpdated() {
|
|
6255
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6256
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6257
|
+
}
|
|
6258
|
+
|
|
6259
|
+
connectedCallback() {
|
|
6260
|
+
super.connectedCallback();
|
|
6261
|
+
}
|
|
6262
|
+
|
|
6263
|
+
/**
|
|
6264
|
+
* @private
|
|
6265
|
+
* @returns {Array} Numbered array for template map.
|
|
6266
|
+
*/
|
|
6267
|
+
defineTemplate() {
|
|
6268
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6269
|
+
|
|
6270
|
+
if (this.orbit || this.laser) {
|
|
6271
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6272
|
+
} else if (this.ringworm) {
|
|
6273
|
+
nodes = Array.from(Array(0).keys());
|
|
6274
|
+
}
|
|
6275
|
+
|
|
6276
|
+
return nodes;
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6280
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6281
|
+
|
|
6282
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6283
|
+
render() {
|
|
6284
|
+
return x`
|
|
6285
|
+
${this.defineTemplate().map((idx) => x`
|
|
6286
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6287
|
+
`)}
|
|
6288
|
+
|
|
6289
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6290
|
+
|
|
6291
|
+
${this.ringworm ? x`
|
|
6292
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6293
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6294
|
+
</svg>`
|
|
6295
|
+
: ``
|
|
6296
|
+
}
|
|
6297
|
+
`;
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
var loaderVersion = '5.1.0';
|
|
6302
|
+
|
|
6303
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6304
|
+
// See LICENSE in the project root for license information.
|
|
6305
|
+
|
|
6306
|
+
|
|
6307
|
+
/**
|
|
6308
|
+
* @slot - Default slot for the text of the button.
|
|
6309
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6310
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6311
|
+
* @csspart text - Apply CSS to text slot.
|
|
6312
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6313
|
+
*/
|
|
6314
|
+
|
|
6315
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6316
|
+
|
|
6317
|
+
/**
|
|
6318
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6319
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6320
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6321
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6322
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6323
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6324
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6325
|
+
*/
|
|
6326
|
+
class AuroButton extends AuroElement$1 {
|
|
6327
|
+
|
|
6328
|
+
/**
|
|
6329
|
+
* Enables form association for this element.
|
|
6330
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6331
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6332
|
+
*/
|
|
6333
|
+
static get formAssociated() {
|
|
6334
|
+
return true;
|
|
6335
|
+
}
|
|
6336
|
+
|
|
6337
|
+
constructor() {
|
|
6338
|
+
super();
|
|
6339
|
+
this.autofocus = false;
|
|
6340
|
+
this.disabled = false;
|
|
6341
|
+
this.loading = false;
|
|
6342
|
+
this.size = "md";
|
|
6343
|
+
this.shape = "rounded";
|
|
6344
|
+
this.onDark = false;
|
|
6345
|
+
this.fluid = false;
|
|
6346
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6347
|
+
this.variant = 'primary';
|
|
6348
|
+
|
|
6349
|
+
// Support for HTML5 forms
|
|
6350
|
+
if (typeof this.attachInternals === 'function') {
|
|
6351
|
+
this.internals = this.attachInternals();
|
|
6352
|
+
} else {
|
|
6353
|
+
this.internals = null;
|
|
6354
|
+
|
|
6355
|
+
// eslint-disable-next-line no-console
|
|
6356
|
+
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.');
|
|
6357
|
+
}
|
|
6358
|
+
|
|
6359
|
+
/**
|
|
6360
|
+
* Generate unique names for dependency components.
|
|
6361
|
+
*/
|
|
6362
|
+
const versioning = new AuroDependencyVersioning();
|
|
6363
|
+
|
|
6364
|
+
/**
|
|
6365
|
+
* @private
|
|
6366
|
+
*/
|
|
6367
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6368
|
+
|
|
6369
|
+
/**
|
|
6370
|
+
* @private
|
|
6371
|
+
*/
|
|
6372
|
+
this.buttonHref = undefined;
|
|
6373
|
+
|
|
6374
|
+
/**
|
|
6375
|
+
* @private
|
|
6376
|
+
*/
|
|
6377
|
+
this.buttonTarget = undefined;
|
|
6378
|
+
|
|
6379
|
+
/**
|
|
6380
|
+
* @private
|
|
6381
|
+
*/
|
|
6382
|
+
this.buttonRel = undefined;
|
|
6383
|
+
}
|
|
6384
|
+
|
|
6385
|
+
static get styles() {
|
|
6386
|
+
return [
|
|
6387
|
+
tokensCss$2$1,
|
|
6388
|
+
styleCss$3$1,
|
|
6389
|
+
colorCss$2$1,
|
|
6390
|
+
shapeSize
|
|
6391
|
+
];
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6394
|
+
static get properties() {
|
|
6395
|
+
return {
|
|
6396
|
+
|
|
6397
|
+
...super.properties,
|
|
6398
|
+
|
|
6399
|
+
/**
|
|
6400
|
+
* Override layout since it isn't used in this component.
|
|
6401
|
+
* @private
|
|
6402
|
+
*/
|
|
6403
|
+
layout: {
|
|
6404
|
+
type: Boolean,
|
|
6405
|
+
attribute: false,
|
|
6406
|
+
reflect: false
|
|
6407
|
+
},
|
|
6408
|
+
|
|
6409
|
+
/**
|
|
6410
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6411
|
+
*/
|
|
6412
|
+
autofocus: {
|
|
6413
|
+
type: Boolean,
|
|
6414
|
+
reflect: true
|
|
6415
|
+
},
|
|
6416
|
+
|
|
6417
|
+
/**
|
|
6418
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6419
|
+
*/
|
|
6420
|
+
disabled: {
|
|
6421
|
+
type: Boolean,
|
|
6422
|
+
reflect: true
|
|
6423
|
+
},
|
|
6424
|
+
|
|
6425
|
+
/**
|
|
6426
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6427
|
+
*/
|
|
6428
|
+
fluid: {
|
|
6429
|
+
type: Boolean,
|
|
6430
|
+
reflect: true
|
|
6431
|
+
},
|
|
6432
|
+
|
|
6433
|
+
/**
|
|
6434
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6435
|
+
*/
|
|
6436
|
+
loading: {
|
|
6437
|
+
type: Boolean,
|
|
6438
|
+
reflect: true
|
|
6439
|
+
},
|
|
6440
|
+
|
|
6441
|
+
/**
|
|
6442
|
+
* 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.
|
|
6443
|
+
*/
|
|
6444
|
+
loadingText: {
|
|
6445
|
+
type: String
|
|
6446
|
+
},
|
|
6447
|
+
|
|
6448
|
+
/**
|
|
6449
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6450
|
+
*/
|
|
6451
|
+
tIndex: {
|
|
6452
|
+
type: String,
|
|
6453
|
+
reflect: true
|
|
6454
|
+
},
|
|
6455
|
+
|
|
6456
|
+
/**
|
|
6457
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6458
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6459
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6460
|
+
*/
|
|
6461
|
+
tabindex: {
|
|
6462
|
+
type: String,
|
|
6463
|
+
reflect: false
|
|
6464
|
+
},
|
|
6465
|
+
|
|
6466
|
+
/**
|
|
6467
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6468
|
+
*/
|
|
6469
|
+
title: {
|
|
6470
|
+
type: String,
|
|
6471
|
+
reflect: true
|
|
6472
|
+
},
|
|
6473
|
+
|
|
6474
|
+
/**
|
|
6475
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6476
|
+
*/
|
|
6477
|
+
type: {
|
|
6478
|
+
type: String,
|
|
6479
|
+
reflect: true
|
|
6480
|
+
},
|
|
6481
|
+
|
|
6482
|
+
/**
|
|
6483
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6484
|
+
*/
|
|
6485
|
+
value: {
|
|
6486
|
+
type: String,
|
|
6487
|
+
reflect: true
|
|
6488
|
+
},
|
|
6489
|
+
|
|
6490
|
+
/**
|
|
6491
|
+
* Sets button variant option.
|
|
6492
|
+
* @default primary
|
|
6493
|
+
*/
|
|
6494
|
+
variant: {
|
|
6495
|
+
type: String,
|
|
6496
|
+
reflect: true
|
|
6497
|
+
},
|
|
6498
|
+
|
|
6499
|
+
/**
|
|
6500
|
+
* @private
|
|
6501
|
+
*/
|
|
6502
|
+
buttonHref: {
|
|
6503
|
+
type: String,
|
|
6504
|
+
},
|
|
6505
|
+
|
|
6506
|
+
/**
|
|
6507
|
+
* @private
|
|
6508
|
+
*/
|
|
6509
|
+
buttonTarget: {
|
|
6510
|
+
type: String,
|
|
6511
|
+
},
|
|
6512
|
+
|
|
6513
|
+
/**
|
|
6514
|
+
* @private
|
|
6515
|
+
*/
|
|
6516
|
+
buttonRel: {
|
|
6517
|
+
type: String,
|
|
6518
|
+
},
|
|
6519
|
+
};
|
|
6520
|
+
}
|
|
6521
|
+
|
|
6522
|
+
/**
|
|
6523
|
+
* This will register this element with the browser.
|
|
6524
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6525
|
+
*
|
|
6526
|
+
* @example
|
|
6527
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6528
|
+
*
|
|
6529
|
+
*/
|
|
6530
|
+
static register(name = "auro-button") {
|
|
6531
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6532
|
+
}
|
|
6533
|
+
|
|
6534
|
+
/**
|
|
6535
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6536
|
+
* @private
|
|
6537
|
+
* @returns {void}
|
|
6538
|
+
*/
|
|
6539
|
+
focus() {
|
|
6540
|
+
this.renderRoot.querySelector('button').focus();
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6543
|
+
/**
|
|
6544
|
+
* Submits the form that this button is associated with.
|
|
6545
|
+
* @private
|
|
6546
|
+
* @returns {void}
|
|
6547
|
+
*/
|
|
6548
|
+
surfaceSubmitEvent() {
|
|
6549
|
+
if (this.form) {
|
|
6550
|
+
this.form.requestSubmit();
|
|
6551
|
+
}
|
|
6552
|
+
}
|
|
6553
|
+
|
|
6554
|
+
/**
|
|
6555
|
+
* Returns the form element that this button is associated with.
|
|
6556
|
+
* @private
|
|
6557
|
+
* @returns {HTMLFormElement | null}
|
|
5335
6558
|
*/
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
base = this, // extra functionality to skip a parent
|
|
5339
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
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);
|
|
6559
|
+
get form() {
|
|
6560
|
+
return this.internals ? this.internals.form : null;
|
|
5347
6561
|
}
|
|
5348
|
-
/* eslint-enable jsdoc/require-param */
|
|
5349
6562
|
|
|
5350
6563
|
/**
|
|
5351
|
-
*
|
|
5352
|
-
* @
|
|
5353
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5354
|
-
* @returns {void}
|
|
6564
|
+
* @private
|
|
6565
|
+
* @returns {Boolean}
|
|
5355
6566
|
*/
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5359
|
-
|
|
5360
|
-
if (elemTag !== tag) {
|
|
5361
|
-
elem.setAttribute(tag, true);
|
|
5362
|
-
}
|
|
6567
|
+
get showText() {
|
|
6568
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5363
6569
|
}
|
|
5364
6570
|
|
|
5365
6571
|
/**
|
|
5366
|
-
*
|
|
5367
|
-
* @
|
|
5368
|
-
* @
|
|
5369
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6572
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6573
|
+
* @returns {string | undefined}
|
|
6574
|
+
* @private
|
|
5370
6575
|
*/
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6576
|
+
get currentAriaLabel() {
|
|
6577
|
+
if (!this.attributeWatcher) return undefined;
|
|
5374
6578
|
|
|
5375
|
-
|
|
6579
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6580
|
+
return ariaLabel || undefined;
|
|
5376
6581
|
}
|
|
5377
|
-
};
|
|
5378
6582
|
|
|
5379
|
-
|
|
5380
|
-
|
|
6583
|
+
/**
|
|
6584
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6585
|
+
* @returns {string | undefined}
|
|
6586
|
+
* @private
|
|
6587
|
+
*/
|
|
6588
|
+
get currentAriaLabelledBy() {
|
|
6589
|
+
if (!this.attributeWatcher) return undefined;
|
|
5381
6590
|
|
|
6591
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6592
|
+
return ariaLabelledBy || undefined;
|
|
6593
|
+
}
|
|
5382
6594
|
|
|
5383
|
-
|
|
6595
|
+
/**
|
|
6596
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6597
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6598
|
+
* @private
|
|
6599
|
+
*/
|
|
6600
|
+
get iconOnly() {
|
|
6601
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6602
|
+
}
|
|
5384
6603
|
|
|
5385
6604
|
/**
|
|
5386
|
-
*
|
|
6605
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6606
|
+
* @returns {string} - The font size class name.
|
|
5387
6607
|
* @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
6608
|
*/
|
|
5392
|
-
|
|
5393
|
-
let result = baseName;
|
|
6609
|
+
getFontSize() {
|
|
5394
6610
|
|
|
5395
|
-
|
|
5396
|
-
|
|
6611
|
+
// Size map for standard buttons
|
|
6612
|
+
const standardButtonSizeMap = {
|
|
6613
|
+
xs: 'body-xs',
|
|
6614
|
+
sm: 'body-sm',
|
|
6615
|
+
md: 'body-default',
|
|
6616
|
+
lg: 'body-lg',
|
|
6617
|
+
xl: 'body-lg'
|
|
6618
|
+
};
|
|
5397
6619
|
|
|
5398
|
-
|
|
6620
|
+
// Size map for icon-only buttons
|
|
6621
|
+
const iconOnlyButtonSizeMap = {
|
|
6622
|
+
xs: 'heading-xs',
|
|
6623
|
+
sm: 'heading-sm',
|
|
6624
|
+
md: 'heading-sm',
|
|
6625
|
+
lg: 'heading-md',
|
|
6626
|
+
xl: 'heading-lg'
|
|
6627
|
+
};
|
|
6628
|
+
|
|
6629
|
+
// Determine which map to use based on the shape
|
|
6630
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6631
|
+
|
|
6632
|
+
// Return the font size based on the button size and shape
|
|
6633
|
+
return sizeMap[this.size] || 'body-default';
|
|
5399
6634
|
}
|
|
5400
6635
|
|
|
5401
6636
|
/**
|
|
5402
|
-
*
|
|
5403
|
-
* @
|
|
5404
|
-
* @
|
|
5405
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6637
|
+
* Renders the default layout for the button.
|
|
6638
|
+
* @returns {TemplateResult}
|
|
6639
|
+
* @private
|
|
5406
6640
|
*/
|
|
5407
|
-
|
|
5408
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5409
|
-
const tag = i`${s(elementName)}`;
|
|
6641
|
+
renderLayoutDefault() {
|
|
5410
6642
|
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
6643
|
+
const fontSize = this.getFontSize();
|
|
6644
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6645
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5414
6646
|
|
|
5415
|
-
|
|
6647
|
+
const classes = {
|
|
6648
|
+
"auro-button": true,
|
|
6649
|
+
"inset": this.showText,
|
|
6650
|
+
wrapper: true,
|
|
6651
|
+
loading: this.loading,
|
|
6652
|
+
[`${fontSize}`]: true,
|
|
6653
|
+
|
|
6654
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6655
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6656
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6657
|
+
};
|
|
6658
|
+
|
|
6659
|
+
const contentClasses = {
|
|
6660
|
+
"contentWrapper": true,
|
|
6661
|
+
"util_displayHiddenVisually": this.loading
|
|
6662
|
+
};
|
|
6663
|
+
|
|
6664
|
+
return u`
|
|
6665
|
+
<${tag}
|
|
6666
|
+
part="${part}"
|
|
6667
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6668
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6669
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6670
|
+
?autofocus="${this.autofocus}"
|
|
6671
|
+
class=${e(classes)}
|
|
6672
|
+
?disabled="${this.disabled || this.loading}"
|
|
6673
|
+
?onDark="${this.onDark}"
|
|
6674
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6675
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6676
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6677
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6678
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6679
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6680
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6681
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6682
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6683
|
+
>
|
|
6684
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6685
|
+
|
|
6686
|
+
<span class="${e(contentClasses)}">
|
|
6687
|
+
<span class="textSlot" part="text">
|
|
6688
|
+
<slot></slot>
|
|
6689
|
+
</span>
|
|
6690
|
+
</span>
|
|
6691
|
+
</${tag}>
|
|
6692
|
+
`;
|
|
6693
|
+
}
|
|
6694
|
+
|
|
6695
|
+
/**
|
|
6696
|
+
* Renders the layout of the button.
|
|
6697
|
+
* @returns {TemplateResult}
|
|
6698
|
+
* @private
|
|
6699
|
+
*/
|
|
6700
|
+
renderLayout() {
|
|
6701
|
+
return this.renderLayoutDefault();
|
|
5416
6702
|
}
|
|
5417
6703
|
}
|
|
5418
6704
|
|
|
6705
|
+
var buttonVersion = '11.3.0';
|
|
6706
|
+
|
|
5419
6707
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5420
6708
|
// See LICENSE in the project root for license information.
|
|
5421
6709
|
|
|
@@ -5426,7 +6714,7 @@ class AuroDependencyVersioning {
|
|
|
5426
6714
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5427
6715
|
*/
|
|
5428
6716
|
|
|
5429
|
-
let AuroElement$
|
|
6717
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
5430
6718
|
|
|
5431
6719
|
// function to define props used within the scope of this component
|
|
5432
6720
|
static get properties() {
|
|
@@ -5494,7 +6782,7 @@ var styleCss$1$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
5494
6782
|
*/
|
|
5495
6783
|
|
|
5496
6784
|
// build the component class
|
|
5497
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
6785
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
5498
6786
|
constructor() {
|
|
5499
6787
|
super();
|
|
5500
6788
|
this.onDark = false;
|
|
@@ -5577,7 +6865,7 @@ var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5577
6865
|
|
|
5578
6866
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5579
6867
|
|
|
5580
|
-
let AuroLibraryRuntimeUtils$
|
|
6868
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5581
6869
|
|
|
5582
6870
|
/* eslint-disable jsdoc/require-param */
|
|
5583
6871
|
|
|
@@ -5659,7 +6947,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5659
6947
|
*/
|
|
5660
6948
|
privateDefaults() {
|
|
5661
6949
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5662
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6950
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
5663
6951
|
}
|
|
5664
6952
|
|
|
5665
6953
|
// function to define props used within the scope of this component
|
|
@@ -5741,7 +7029,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5741
7029
|
*
|
|
5742
7030
|
*/
|
|
5743
7031
|
static register(name = "auro-icon") {
|
|
5744
|
-
AuroLibraryRuntimeUtils$
|
|
7032
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
5745
7033
|
}
|
|
5746
7034
|
|
|
5747
7035
|
connectedCallback() {
|
|
@@ -5762,8 +7050,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5762
7050
|
async firstUpdated() {
|
|
5763
7051
|
await super.firstUpdated();
|
|
5764
7052
|
|
|
5765
|
-
|
|
5766
|
-
|
|
7053
|
+
/**
|
|
7054
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
7055
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
7056
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
7057
|
+
*/
|
|
7058
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5767
7059
|
const svgDesc = this.svg.querySelector('desc');
|
|
5768
7060
|
|
|
5769
7061
|
if (svgDesc) {
|
|
@@ -5807,9 +7099,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5807
7099
|
}
|
|
5808
7100
|
};
|
|
5809
7101
|
|
|
5810
|
-
var iconVersion$1 = '8.0
|
|
7102
|
+
var iconVersion$1 = '8.1.0';
|
|
5811
7103
|
|
|
5812
|
-
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)}`;
|
|
7104
|
+
var styleCss$5 = 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)}: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
7105
|
|
|
5814
7106
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5815
7107
|
// See LICENSE in the project root for license information.
|
|
@@ -5819,13 +7111,12 @@ var styleCss$5 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-head
|
|
|
5819
7111
|
* The auro-header component is a custom element to make using headers with the Auro Design System seamless and easy.
|
|
5820
7112
|
*
|
|
5821
7113
|
* @attr {Boolean} no-margin-block - if declared, margin-block will be set to `0`
|
|
5822
|
-
* @attr {String} level - Determines heading level for HTML element. Options are `1` - `6`
|
|
5823
|
-
* @attr {String} display - Determines presentation of header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
5824
7114
|
* @attr {String} color - Allows user to pass in CSS custom property or direct hex value to change the color of the header
|
|
7115
|
+
* @attr {String} display - Determines the visual appearance of the header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
7116
|
+
* @attr {String} level - Determines the semantic heading level of the HTML element. Options are `1` - `6`
|
|
5825
7117
|
* @attr {String} margin - Specify the margin(s) to be altered. Options are `top`, `bottom`, or `both`.
|
|
5826
7118
|
* @attr {String} size - Specify size of margin adjustment, either `none`, `25`, `50`, `100`, `150`, `200`, `300`, `400`, `600` or `800`.
|
|
5827
7119
|
*/
|
|
5828
|
-
|
|
5829
7120
|
/* eslint complexity: ["error", 21] */
|
|
5830
7121
|
|
|
5831
7122
|
// build the component class
|
|
@@ -5838,7 +7129,7 @@ class AuroHeader extends i$2 {
|
|
|
5838
7129
|
/**
|
|
5839
7130
|
* @private
|
|
5840
7131
|
*/
|
|
5841
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7132
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5842
7133
|
}
|
|
5843
7134
|
|
|
5844
7135
|
// function to define props used within the scope of this component
|
|
@@ -5859,6 +7150,22 @@ class AuroHeader extends i$2 {
|
|
|
5859
7150
|
return [styleCss$5];
|
|
5860
7151
|
}
|
|
5861
7152
|
|
|
7153
|
+
/**
|
|
7154
|
+
* Mapping of display values to their corresponding CSS classes
|
|
7155
|
+
* @private
|
|
7156
|
+
*/
|
|
7157
|
+
static get displayClassMap() {
|
|
7158
|
+
return {
|
|
7159
|
+
'display': 'heading-xl',
|
|
7160
|
+
'800': 'heading-xl',
|
|
7161
|
+
'700': 'heading-lg',
|
|
7162
|
+
'600': 'heading-md',
|
|
7163
|
+
'500': 'heading-sm',
|
|
7164
|
+
'400': 'heading-xs',
|
|
7165
|
+
'300': 'heading-2xs'
|
|
7166
|
+
};
|
|
7167
|
+
}
|
|
7168
|
+
|
|
5862
7169
|
/**
|
|
5863
7170
|
* This will register this element with the browser.
|
|
5864
7171
|
* @param {string} [name="auro-header"] - The name of element that you want to register to.
|
|
@@ -5868,7 +7175,7 @@ class AuroHeader extends i$2 {
|
|
|
5868
7175
|
*
|
|
5869
7176
|
*/
|
|
5870
7177
|
static register(name = "auro-header") {
|
|
5871
|
-
AuroLibraryRuntimeUtils$
|
|
7178
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHeader);
|
|
5872
7179
|
}
|
|
5873
7180
|
|
|
5874
7181
|
firstUpdated() {
|
|
@@ -5935,23 +7242,42 @@ class AuroHeader extends i$2 {
|
|
|
5935
7242
|
this.display = 'display';
|
|
5936
7243
|
}
|
|
5937
7244
|
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
7245
|
+
const headingLevel = level || '1';
|
|
7246
|
+
const spacingClasses = this.spacingDecision(this.size);
|
|
7247
|
+
|
|
7248
|
+
// Get the CSS class based on the display prop
|
|
7249
|
+
const headingClass = AuroHeader.displayClassMap[this.display];
|
|
7250
|
+
|
|
7251
|
+
const classObject = {
|
|
7252
|
+
'heading': true,
|
|
7253
|
+
[`heading--${this.display}`]: true,
|
|
7254
|
+
[headingClass]: true
|
|
7255
|
+
};
|
|
7256
|
+
|
|
7257
|
+
// Add spacing classes to the class object if they exist
|
|
7258
|
+
if (spacingClasses) {
|
|
7259
|
+
const spacingClassArray = spacingClasses.split(' ');
|
|
7260
|
+
spacingClassArray.forEach(cls => {
|
|
7261
|
+
if (cls.trim()) {
|
|
7262
|
+
classObject[cls.trim()] = true;
|
|
7263
|
+
}
|
|
7264
|
+
});
|
|
5945
7265
|
}
|
|
7266
|
+
|
|
7267
|
+
const headerClasses = e(classObject);
|
|
7268
|
+
|
|
7269
|
+
// unsafeStatic dynamically creates tag names at runtime
|
|
7270
|
+
const tag = s(`h${headingLevel}`);
|
|
7271
|
+
return u`<${tag} class="${headerClasses}" style="color: ${o(this.color ? this.color : undefined)}"><slot></slot></${tag}>`;
|
|
5946
7272
|
}
|
|
7273
|
+
|
|
5947
7274
|
// function that renders the HTML and CSS into the scope of the component
|
|
5948
|
-
|
|
5949
7275
|
render() {
|
|
5950
7276
|
return this.template(this.level);
|
|
5951
7277
|
}
|
|
5952
7278
|
}
|
|
5953
7279
|
|
|
5954
|
-
var headerVersion = '4.0.
|
|
7280
|
+
var headerVersion = '4.0.2';
|
|
5955
7281
|
|
|
5956
7282
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5957
7283
|
// See LICENSE in the project root for license information.
|
|
@@ -5964,17 +7290,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
5964
7290
|
|
|
5965
7291
|
this.large = false;
|
|
5966
7292
|
|
|
5967
|
-
AuroLibraryRuntimeUtils$
|
|
7293
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5968
7294
|
|
|
5969
7295
|
const versioning = new AuroDependencyVersioning();
|
|
7296
|
+
|
|
7297
|
+
/**
|
|
7298
|
+
* @private
|
|
7299
|
+
*/
|
|
5970
7300
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
7301
|
+
|
|
7302
|
+
/**
|
|
7303
|
+
* @private
|
|
7304
|
+
*/
|
|
5971
7305
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7306
|
+
|
|
7307
|
+
/**
|
|
7308
|
+
* @private
|
|
7309
|
+
*/
|
|
7310
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5972
7311
|
}
|
|
5973
7312
|
|
|
5974
7313
|
static get styles() {
|
|
5975
7314
|
return [
|
|
5976
|
-
colorCss$
|
|
5977
|
-
styleCss$
|
|
7315
|
+
colorCss$3$1,
|
|
7316
|
+
styleCss$4$1,
|
|
5978
7317
|
tokenCss
|
|
5979
7318
|
];
|
|
5980
7319
|
}
|
|
@@ -6003,7 +7342,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6003
7342
|
*
|
|
6004
7343
|
*/
|
|
6005
7344
|
static register(name = "auro-bibtemplate") {
|
|
6006
|
-
AuroLibraryRuntimeUtils$
|
|
7345
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
6007
7346
|
}
|
|
6008
7347
|
|
|
6009
7348
|
/**
|
|
@@ -6061,13 +7400,15 @@ class AuroBibtemplate extends i$2 {
|
|
|
6061
7400
|
<div id="bibTemplate" part="bibtemplate">
|
|
6062
7401
|
${this.isFullscreen ? u`
|
|
6063
7402
|
<div id="headerContainer">
|
|
6064
|
-
<
|
|
6065
|
-
<${this.
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
7403
|
+
<div class="titleRow">
|
|
7404
|
+
<${this.headerTag} class="header" display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7405
|
+
<slot name="header"></slot>
|
|
7406
|
+
</${this.headerTag}>
|
|
7407
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7408
|
+
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7409
|
+
</${this.buttonTag}>
|
|
7410
|
+
</div>
|
|
7411
|
+
<span class="subheader">
|
|
6071
7412
|
<slot name="subheader"></slot>
|
|
6072
7413
|
</span>
|
|
6073
7414
|
</div>` : null}
|
|
@@ -6087,9 +7428,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6087
7428
|
|
|
6088
7429
|
var bibTemplateVersion = '1.0.0';
|
|
6089
7430
|
|
|
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-
|
|
7431
|
+
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
7432
|
|
|
6092
|
-
var styleCss$4 = i$5`.
|
|
7433
|
+
var styleCss$4 = 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-2xl,.accent-xl{text-transform:uppercase}.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-lg,.accent-md{text-transform:uppercase}.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-sm,.accent-xs{text-transform:uppercase}.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);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.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
7434
|
|
|
6094
7435
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6095
7436
|
|
|
@@ -6169,8 +7510,6 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
6169
7510
|
|
|
6170
7511
|
/**
|
|
6171
7512
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6172
|
-
*
|
|
6173
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6174
7513
|
*/
|
|
6175
7514
|
class AuroHelpText extends i$2 {
|
|
6176
7515
|
|
|
@@ -6286,7 +7625,7 @@ class AuroHelpText extends i$2 {
|
|
|
6286
7625
|
// function that renders the HTML and CSS into the scope of the component
|
|
6287
7626
|
render() {
|
|
6288
7627
|
return x`
|
|
6289
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7628
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6290
7629
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6291
7630
|
</div>
|
|
6292
7631
|
`;
|
|
@@ -6295,68 +7634,7 @@ class AuroHelpText extends i$2 {
|
|
|
6295
7634
|
|
|
6296
7635
|
var helpTextVersion = '1.0.0';
|
|
6297
7636
|
|
|
6298
|
-
i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left: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([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
|
|
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}`;
|
|
7637
|
+
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}.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-2xl,.accent-xl{text-transform:uppercase}.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-lg,.accent-md{text-transform:uppercase}.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-sm,.accent-xs{text-transform:uppercase}.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);text-transform:uppercase}[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*=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;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}: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
7638
|
|
|
6361
7639
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6362
7640
|
// See LICENSE in the project root for license information.
|
|
@@ -6369,9 +7647,10 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6369
7647
|
* @slot - Default slot for the menu content.
|
|
6370
7648
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6371
7649
|
* @slot label - Defines the content of the label.
|
|
7650
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6372
7651
|
* @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
7652
|
* @slot valueText - Dropdown value text display.
|
|
7653
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6375
7654
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6376
7655
|
* @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
7656
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6379,7 +7658,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6379
7658
|
*/
|
|
6380
7659
|
|
|
6381
7660
|
// build the component class
|
|
6382
|
-
class AuroSelect extends AuroElement$
|
|
7661
|
+
class AuroSelect extends AuroElement$4 {
|
|
6383
7662
|
constructor() {
|
|
6384
7663
|
super();
|
|
6385
7664
|
|
|
@@ -6389,12 +7668,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6389
7668
|
const idSubstrEnd = 8;
|
|
6390
7669
|
const idSubstrStart = 2;
|
|
6391
7670
|
|
|
6392
|
-
this.matchWidth =
|
|
6393
|
-
|
|
6394
|
-
// Layout Config
|
|
6395
|
-
this.layout = 'classic';
|
|
6396
|
-
this.shape = 'classic';
|
|
6397
|
-
this.size = 'xl';
|
|
7671
|
+
this.matchWidth = false;
|
|
6398
7672
|
|
|
6399
7673
|
// floaterConfig
|
|
6400
7674
|
this.placement = 'bottom-start';
|
|
@@ -6419,7 +7693,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6419
7693
|
/**
|
|
6420
7694
|
* @private
|
|
6421
7695
|
*/
|
|
6422
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7696
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
6423
7697
|
|
|
6424
7698
|
/**
|
|
6425
7699
|
* Generate unique names for dependency components.
|
|
@@ -6469,6 +7743,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6469
7743
|
this.fullscreenBreakpoint = 'sm';
|
|
6470
7744
|
this.onDark = false;
|
|
6471
7745
|
this.isPopoverVisible = false;
|
|
7746
|
+
|
|
7747
|
+
// Layout Config
|
|
7748
|
+
this.layout = 'classic';
|
|
7749
|
+
this.shape = 'classic';
|
|
7750
|
+
this.size = 'lg';
|
|
6472
7751
|
}
|
|
6473
7752
|
|
|
6474
7753
|
// This function is to define props used within the scope of this component
|
|
@@ -6534,14 +7813,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6534
7813
|
reflect: true
|
|
6535
7814
|
},
|
|
6536
7815
|
|
|
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
7816
|
/**
|
|
6546
7817
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6547
7818
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6635,7 +7906,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6635
7906
|
* "top" | "right" | "bottom" | "left" |
|
|
6636
7907
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6637
7908
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6638
|
-
* "left-start" | "left-end"
|
|
7909
|
+
* "left-start" | "left-end".
|
|
6639
7910
|
* @default bottom-start
|
|
6640
7911
|
*/
|
|
6641
7912
|
placement: {
|
|
@@ -6643,6 +7914,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6643
7914
|
reflect: true
|
|
6644
7915
|
},
|
|
6645
7916
|
|
|
7917
|
+
/**
|
|
7918
|
+
* Define custom placeholder text.
|
|
7919
|
+
*/
|
|
7920
|
+
placeholder: {
|
|
7921
|
+
type: String,
|
|
7922
|
+
reflect: true
|
|
7923
|
+
},
|
|
7924
|
+
|
|
6646
7925
|
/**
|
|
6647
7926
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6648
7927
|
*/
|
|
@@ -6689,11 +7968,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6689
7968
|
},
|
|
6690
7969
|
|
|
6691
7970
|
/**
|
|
6692
|
-
* Value selected for the component.
|
|
6693
|
-
* @type {String|Array<String>}
|
|
7971
|
+
* Value selected for the component.
|
|
6694
7972
|
*/
|
|
6695
7973
|
value: {
|
|
6696
|
-
type:
|
|
7974
|
+
type: String,
|
|
7975
|
+
reflect: true,
|
|
7976
|
+
attribute: 'value'
|
|
6697
7977
|
},
|
|
6698
7978
|
|
|
6699
7979
|
/**
|
|
@@ -6739,21 +8019,83 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6739
8019
|
|
|
6740
8020
|
static get styles() {
|
|
6741
8021
|
return [
|
|
6742
|
-
i$5`${shapeSizeCss$
|
|
8022
|
+
i$5`${shapeSizeCss$2}`,
|
|
6743
8023
|
i$5`${tokensCss$5}`,
|
|
6744
8024
|
i$5`${styleCss$3}`,
|
|
6745
8025
|
];
|
|
6746
8026
|
}
|
|
6747
8027
|
|
|
6748
8028
|
/**
|
|
6749
|
-
*
|
|
8029
|
+
* Formatted value based on `multiSelect` state.
|
|
8030
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
6750
8031
|
* @private
|
|
6751
|
-
* @
|
|
8032
|
+
* @returns {String|Array<String>}
|
|
6752
8033
|
*/
|
|
6753
|
-
get
|
|
6754
|
-
|
|
6755
|
-
|
|
8034
|
+
get formattedValue() {
|
|
8035
|
+
if (this.multiSelect) {
|
|
8036
|
+
if (!this.value) {
|
|
8037
|
+
return undefined;
|
|
8038
|
+
}
|
|
8039
|
+
if (this.value.startsWith("[")) {
|
|
8040
|
+
return JSON.parse(this.value);
|
|
8041
|
+
}
|
|
8042
|
+
return [this.value];
|
|
8043
|
+
}
|
|
8044
|
+
return this.value;
|
|
8045
|
+
}
|
|
8046
|
+
|
|
8047
|
+
/**
|
|
8048
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
8049
|
+
* @private
|
|
8050
|
+
* @returns {void}
|
|
8051
|
+
*/
|
|
8052
|
+
get commonLabelClasses() {
|
|
8053
|
+
const obj = {
|
|
8054
|
+
'is-disabled': this.disabled,
|
|
8055
|
+
'withValue': false,
|
|
8056
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0,
|
|
8057
|
+
[this.labelFontClass]: true
|
|
6756
8058
|
};
|
|
8059
|
+
|
|
8060
|
+
if (this.placeholder) {
|
|
8061
|
+
obj.withValue = true;
|
|
8062
|
+
} else if (this.optionSelected) {
|
|
8063
|
+
if (Array.isArray(this.optionSelected)) {
|
|
8064
|
+
obj.withValue = this.optionSelected.length > 0;
|
|
8065
|
+
} else {
|
|
8066
|
+
obj.withValue = true;
|
|
8067
|
+
}
|
|
8068
|
+
}
|
|
8069
|
+
return obj;
|
|
8070
|
+
}
|
|
8071
|
+
|
|
8072
|
+
/**
|
|
8073
|
+
* Returns the label font class based on layout and selection state.
|
|
8074
|
+
* @private
|
|
8075
|
+
* @returns {string} - The font class for the label.
|
|
8076
|
+
*/
|
|
8077
|
+
get labelFontClass() {
|
|
8078
|
+
const isSelected = this.hasValue;
|
|
8079
|
+
|
|
8080
|
+
if (this.layout.startsWith('emphasized')) {
|
|
8081
|
+
return isSelected ? 'body-sm' : 'accent-xl';
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
if (this.layout === 'snowflake') {
|
|
8085
|
+
return isSelected ? 'body-xs' : 'body-lg';
|
|
8086
|
+
}
|
|
8087
|
+
|
|
8088
|
+
// classic layout (default)
|
|
8089
|
+
return isSelected ? 'body-xs' : 'body-default';
|
|
8090
|
+
}
|
|
8091
|
+
|
|
8092
|
+
/**
|
|
8093
|
+
* Whether or not the component has a value.
|
|
8094
|
+
* @returns {boolean} - Returns true if the component has a value or placeholder.
|
|
8095
|
+
* @private
|
|
8096
|
+
*/
|
|
8097
|
+
get hasValue() {
|
|
8098
|
+
return this.placeholder || (this.value && this.value.length > 0); // eslint-disable-line no-extra-parens
|
|
6757
8099
|
}
|
|
6758
8100
|
|
|
6759
8101
|
/**
|
|
@@ -6766,10 +8108,30 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6766
8108
|
|
|
6767
8109
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6768
8110
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8111
|
+
|
|
8112
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8113
|
+
this.updateMenuShapeSize();
|
|
8114
|
+
// wait til the bib gets fully rendered
|
|
8115
|
+
setTimeout(() => {
|
|
8116
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8117
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8118
|
+
this.dropdown.trigger.focus();
|
|
8119
|
+
|
|
8120
|
+
// default focus indicator on the first menu option
|
|
8121
|
+
if (this.menu.index < 0) {
|
|
8122
|
+
this.menu.navigateOptions('down');
|
|
8123
|
+
}
|
|
8124
|
+
}
|
|
8125
|
+
});
|
|
8126
|
+
}
|
|
8127
|
+
});
|
|
8128
|
+
|
|
8129
|
+
this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
|
|
8130
|
+
this.updateMenuShapeSize();
|
|
6769
8131
|
});
|
|
6770
8132
|
|
|
6771
8133
|
// setting up bibtemplate
|
|
6772
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
8134
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6773
8135
|
|
|
6774
8136
|
if (this.customBibWidth) {
|
|
6775
8137
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6788,7 +8150,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6788
8150
|
*
|
|
6789
8151
|
*/
|
|
6790
8152
|
static register(name = "auro-select") {
|
|
6791
|
-
AuroLibraryRuntimeUtils$
|
|
8153
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroSelect);
|
|
6792
8154
|
}
|
|
6793
8155
|
|
|
6794
8156
|
/**
|
|
@@ -6832,6 +8194,30 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6832
8194
|
this.dropdown.requestUpdate();
|
|
6833
8195
|
}
|
|
6834
8196
|
|
|
8197
|
+
/**
|
|
8198
|
+
* Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
|
|
8199
|
+
* @private
|
|
8200
|
+
*/
|
|
8201
|
+
updateMenuShapeSize() {
|
|
8202
|
+
if (!this.menu) {
|
|
8203
|
+
return;
|
|
8204
|
+
}
|
|
8205
|
+
|
|
8206
|
+
if (this.dropdown && this.dropdown.isBibFullscreen) {
|
|
8207
|
+
this.menu.setAttribute('size', 'md');
|
|
8208
|
+
this.menu.setAttribute('shape', 'box');
|
|
8209
|
+
} else {
|
|
8210
|
+
// set menu's default size if there it's not specified.
|
|
8211
|
+
if (!this.menu.getAttribute('size')) {
|
|
8212
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8213
|
+
}
|
|
8214
|
+
|
|
8215
|
+
if (!this.getAttribute('shape')) {
|
|
8216
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8217
|
+
}
|
|
8218
|
+
}
|
|
8219
|
+
}
|
|
8220
|
+
|
|
6835
8221
|
/**
|
|
6836
8222
|
* Binds all behavior needed to the menu after rendering.
|
|
6837
8223
|
* @private
|
|
@@ -6848,6 +8234,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6848
8234
|
return;
|
|
6849
8235
|
}
|
|
6850
8236
|
|
|
8237
|
+
this.updateMenuShapeSize();
|
|
8238
|
+
|
|
6851
8239
|
if (this.multiSelect) {
|
|
6852
8240
|
this.menu.multiSelect = this.multiSelect;
|
|
6853
8241
|
}
|
|
@@ -6885,7 +8273,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6885
8273
|
|
|
6886
8274
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
6887
8275
|
this.optionSelected = this.menu.optionSelected;
|
|
6888
|
-
this.
|
|
8276
|
+
this.validate(this);
|
|
6889
8277
|
});
|
|
6890
8278
|
|
|
6891
8279
|
this.menu.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
@@ -6907,46 +8295,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6907
8295
|
configureSelect() {
|
|
6908
8296
|
|
|
6909
8297
|
this.addEventListener('keydown', (evt) => {
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
8298
|
+
// when the focus is on trigger not on close button
|
|
8299
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8300
|
+
if (evt.key === 'ArrowUp') {
|
|
8301
|
+
evt.preventDefault();
|
|
6914
8302
|
|
|
6915
|
-
|
|
6916
|
-
this.menu.navigateOptions('up');
|
|
6917
|
-
}
|
|
8303
|
+
this.dropdown.show();
|
|
6918
8304
|
|
|
6919
|
-
|
|
6920
|
-
|
|
8305
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8306
|
+
this.menu.navigateOptions('up');
|
|
8307
|
+
}
|
|
6921
8308
|
|
|
6922
|
-
|
|
6923
|
-
|
|
8309
|
+
return;
|
|
8310
|
+
}
|
|
6924
8311
|
|
|
6925
|
-
|
|
8312
|
+
if (evt.key === 'ArrowDown') {
|
|
8313
|
+
evt.preventDefault();
|
|
6926
8314
|
|
|
6927
|
-
|
|
6928
|
-
this.menu.navigateOptions('down');
|
|
6929
|
-
}
|
|
8315
|
+
this.dropdown.show();
|
|
6930
8316
|
|
|
6931
|
-
|
|
6932
|
-
|
|
8317
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8318
|
+
this.menu.navigateOptions('down');
|
|
8319
|
+
}
|
|
6933
8320
|
|
|
6934
|
-
|
|
6935
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6936
|
-
evt.preventDefault();
|
|
6937
|
-
this.menu.makeSelection();
|
|
8321
|
+
return;
|
|
6938
8322
|
}
|
|
6939
8323
|
|
|
6940
|
-
|
|
8324
|
+
if (evt.key === 'Enter') {
|
|
8325
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8326
|
+
evt.preventDefault();
|
|
8327
|
+
this.menu.makeSelection();
|
|
8328
|
+
}
|
|
8329
|
+
|
|
8330
|
+
return;
|
|
8331
|
+
}
|
|
6941
8332
|
}
|
|
6942
8333
|
|
|
6943
|
-
if (evt.key === 'Tab') {
|
|
8334
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6944
8335
|
if (this.dropdown.isBibFullscreen) {
|
|
6945
8336
|
evt.preventDefault();
|
|
8337
|
+
|
|
8338
|
+
// when the focus is on trigger not on close button
|
|
8339
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8340
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8341
|
+
// when bib it not open, it will focus onto trigger.
|
|
8342
|
+
this.dropdown.focus();
|
|
8343
|
+
} else {
|
|
8344
|
+
// when close button has the focus, move focus back to the trigger
|
|
8345
|
+
this.dropdown.trigger.focus();
|
|
8346
|
+
}
|
|
6946
8347
|
} else {
|
|
6947
8348
|
this.dropdown.hide();
|
|
6948
8349
|
}
|
|
6949
|
-
|
|
6950
8350
|
return;
|
|
6951
8351
|
}
|
|
6952
8352
|
|
|
@@ -6957,7 +8357,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6957
8357
|
this.addEventListener('focusin', this.handleFocusin);
|
|
6958
8358
|
|
|
6959
8359
|
this.addEventListener('blur', () => {
|
|
6960
|
-
this.
|
|
8360
|
+
this.validate();
|
|
6961
8361
|
this.hasFocus = false;
|
|
6962
8362
|
});
|
|
6963
8363
|
}
|
|
@@ -7027,6 +8427,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7027
8427
|
}
|
|
7028
8428
|
}
|
|
7029
8429
|
|
|
8430
|
+
/**
|
|
8431
|
+
* Hides the dropdown bib if its open.
|
|
8432
|
+
* @returns {void}
|
|
8433
|
+
*/
|
|
8434
|
+
hideBib() {
|
|
8435
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8436
|
+
this.dropdown.hide();
|
|
8437
|
+
}
|
|
8438
|
+
}
|
|
8439
|
+
|
|
8440
|
+
/**
|
|
8441
|
+
* Shows the dropdown bib if there are options to show.
|
|
8442
|
+
* @returns {void}
|
|
8443
|
+
*/
|
|
8444
|
+
showBib() {
|
|
8445
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8446
|
+
this.dropdown.show();
|
|
8447
|
+
}
|
|
8448
|
+
}
|
|
8449
|
+
|
|
7030
8450
|
/**
|
|
7031
8451
|
* Function to support @focusin event.
|
|
7032
8452
|
* @private
|
|
@@ -7111,38 +8531,47 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7111
8531
|
// Add the tag name as an attribute if it is different than the component name
|
|
7112
8532
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7113
8533
|
|
|
7114
|
-
this.configureMenu();
|
|
7115
8534
|
this.configureDropdown();
|
|
8535
|
+
this.configureMenu();
|
|
7116
8536
|
this.configureSelect();
|
|
8537
|
+
}
|
|
8538
|
+
|
|
8539
|
+
/**
|
|
8540
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8541
|
+
* @param {string} value - The value to set in the menu.
|
|
8542
|
+
* @returns {void}
|
|
8543
|
+
* @private
|
|
8544
|
+
*/
|
|
8545
|
+
async updateMenuValue(value) {
|
|
8546
|
+
if (!this.menu) return;
|
|
7117
8547
|
|
|
7118
|
-
|
|
7119
|
-
if (
|
|
7120
|
-
this.value =
|
|
7121
|
-
|
|
8548
|
+
this.menu.setAttribute('value', value);
|
|
8549
|
+
if (value) {
|
|
8550
|
+
this.menu.value = value;
|
|
8551
|
+
} else {
|
|
8552
|
+
this.menu.reset();
|
|
7122
8553
|
}
|
|
8554
|
+
await this.menu.updateComplete;
|
|
7123
8555
|
}
|
|
7124
8556
|
|
|
7125
8557
|
async updated(changedProperties) {
|
|
7126
|
-
if (changedProperties.has('multiSelect')) {
|
|
8558
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
7127
8559
|
this.clearSelection();
|
|
7128
8560
|
}
|
|
7129
8561
|
|
|
7130
8562
|
if (changedProperties.has('value')) {
|
|
7131
8563
|
if (this.value) {
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
this.menu.value = this.value;
|
|
8564
|
+
await this.updateMenuValue(this.value);
|
|
7135
8565
|
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8566
|
+
if (this.menu) {
|
|
8567
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8568
|
+
}
|
|
7140
8569
|
} else {
|
|
7141
|
-
this.
|
|
8570
|
+
await this.updateMenuValue(undefined);
|
|
7142
8571
|
}
|
|
7143
8572
|
|
|
7144
8573
|
this._updateNativeSelect();
|
|
7145
|
-
this.
|
|
8574
|
+
this.validate();
|
|
7146
8575
|
|
|
7147
8576
|
// LEGACY EVENT
|
|
7148
8577
|
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|
|
@@ -7157,7 +8586,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7157
8586
|
composed: true,
|
|
7158
8587
|
detail: {
|
|
7159
8588
|
optionSelected: this.optionSelected,
|
|
7160
|
-
value: this.
|
|
8589
|
+
value: this.formattedValue
|
|
7161
8590
|
}
|
|
7162
8591
|
}));
|
|
7163
8592
|
}
|
|
@@ -7169,6 +8598,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7169
8598
|
if (changedProperties.has('error')) {
|
|
7170
8599
|
this.validate(true);
|
|
7171
8600
|
}
|
|
8601
|
+
|
|
8602
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8603
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8607
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8608
|
+
}
|
|
7172
8609
|
}
|
|
7173
8610
|
|
|
7174
8611
|
/**
|
|
@@ -7179,16 +8616,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7179
8616
|
this.validation.reset(this);
|
|
7180
8617
|
}
|
|
7181
8618
|
|
|
7182
|
-
/**
|
|
7183
|
-
* Hide dropdownbib.
|
|
7184
|
-
* @private
|
|
7185
|
-
*/
|
|
7186
|
-
hideBib() {
|
|
7187
|
-
if (this.dropdown) {
|
|
7188
|
-
this.dropdown.hide();
|
|
7189
|
-
}
|
|
7190
|
-
}
|
|
7191
|
-
|
|
7192
8619
|
/**
|
|
7193
8620
|
* Validates value.
|
|
7194
8621
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7208,13 +8635,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7208
8635
|
const selectedValue = selectedOption.value;
|
|
7209
8636
|
|
|
7210
8637
|
if (this.multiSelect) {
|
|
7211
|
-
const currentArray =
|
|
8638
|
+
const currentArray = this.formattedValue;
|
|
7212
8639
|
|
|
7213
8640
|
if (!currentArray.includes(selectedValue)) {
|
|
7214
|
-
this.value = [
|
|
8641
|
+
this.value = JSON.stringify([
|
|
7215
8642
|
...currentArray,
|
|
7216
8643
|
selectedValue
|
|
7217
|
-
];
|
|
8644
|
+
]);
|
|
7218
8645
|
}
|
|
7219
8646
|
} else {
|
|
7220
8647
|
const currentValue = this.value;
|
|
@@ -7237,12 +8664,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7237
8664
|
}
|
|
7238
8665
|
|
|
7239
8666
|
if (this.multiSelect) {
|
|
7240
|
-
nativeSelect.value = this.
|
|
8667
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7241
8668
|
} else {
|
|
7242
8669
|
nativeSelect.value = this.value || '';
|
|
7243
8670
|
}
|
|
7244
8671
|
}
|
|
7245
8672
|
|
|
8673
|
+
/**
|
|
8674
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8675
|
+
* @private
|
|
8676
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8677
|
+
*/
|
|
7246
8678
|
renderAriaHtml() {
|
|
7247
8679
|
return u`
|
|
7248
8680
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7263,9 +8695,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7263
8695
|
`;
|
|
7264
8696
|
}
|
|
7265
8697
|
|
|
8698
|
+
/**
|
|
8699
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8700
|
+
* @private
|
|
8701
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8702
|
+
*/
|
|
7266
8703
|
renderNativeSelect() {
|
|
7267
8704
|
return u`
|
|
7268
|
-
<div class="nativeSelectWrapper">
|
|
8705
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7269
8706
|
<select
|
|
7270
8707
|
tabindex="-1"
|
|
7271
8708
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7302,14 +8739,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7302
8739
|
? u`
|
|
7303
8740
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7304
8741
|
<p id="${this.uniqueId}" part="helpText">
|
|
7305
|
-
<slot name="
|
|
8742
|
+
<slot name="helpText"></slot>
|
|
7306
8743
|
</p>
|
|
7307
8744
|
</${this.helpTextTag}>
|
|
7308
8745
|
`
|
|
7309
8746
|
: u`
|
|
7310
8747
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7311
8748
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7312
|
-
|
|
8749
|
+
${this.errorMessage}
|
|
7313
8750
|
</p>
|
|
7314
8751
|
</${this.helpTextTag}>
|
|
7315
8752
|
`
|
|
@@ -7322,17 +8759,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7322
8759
|
* @private
|
|
7323
8760
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7324
8761
|
*/
|
|
7325
|
-
// TODO update to use util class
|
|
7326
8762
|
renderLayoutEmphasized() {
|
|
7327
8763
|
const placeholderClass = {
|
|
7328
|
-
|
|
8764
|
+
'util_displayHidden': this.value
|
|
7329
8765
|
};
|
|
7330
8766
|
|
|
7331
8767
|
const displayValueClasses = {
|
|
7332
8768
|
'displayValue': true,
|
|
7333
8769
|
'hasContent': this.hasDisplayValueContent,
|
|
7334
8770
|
'hasFocus': this.isPopoverVisible,
|
|
7335
|
-
'withValue': this.
|
|
8771
|
+
'withValue': this.commonLabelClasses.widthValue,
|
|
7336
8772
|
'force': this.forceDisplayValue,
|
|
7337
8773
|
};
|
|
7338
8774
|
|
|
@@ -7343,22 +8779,21 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7343
8779
|
|
|
7344
8780
|
return u`
|
|
7345
8781
|
<div
|
|
7346
|
-
class="${e(this.commonWrapperClasses)}"
|
|
7347
8782
|
part="wrapper">
|
|
7348
8783
|
<div id="slotHolder" aria-hidden="true">
|
|
7349
8784
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7350
8785
|
</div>
|
|
7351
8786
|
<${this.dropdownTag}
|
|
8787
|
+
a11yRole="select"
|
|
7352
8788
|
?autoPlacement="${this.autoPlacement}"
|
|
7353
8789
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7354
|
-
?matchWidth="${
|
|
8790
|
+
?matchWidth="${this.matchWidth}"
|
|
7355
8791
|
?noFlip="${this.noFlip}"
|
|
7356
8792
|
?onDark="${this.onDark}"
|
|
7357
8793
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7358
8794
|
.offset="${this.offset}"
|
|
7359
8795
|
.placement="${this.placement}"
|
|
7360
8796
|
chevron
|
|
7361
|
-
fluid
|
|
7362
8797
|
for="selectMenu"
|
|
7363
8798
|
layout="${this.layout}"
|
|
7364
8799
|
part="dropdown"
|
|
@@ -7370,15 +8805,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7370
8805
|
</div>
|
|
7371
8806
|
<div class="mainContent">
|
|
7372
8807
|
<div class="${e(valueContainerClasses)}">
|
|
7373
|
-
<label>
|
|
8808
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7374
8809
|
<slot name="label"></slot>
|
|
8810
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7375
8811
|
</label>
|
|
7376
8812
|
<div class="value" id="value"></div>
|
|
7377
|
-
${
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
</div>
|
|
7381
|
-
`}
|
|
8813
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8814
|
+
${this.placeholder}
|
|
8815
|
+
</div>
|
|
7382
8816
|
</div>
|
|
7383
8817
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7384
8818
|
<slot name="displayValue"></slot>
|
|
@@ -7405,14 +8839,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7405
8839
|
*/
|
|
7406
8840
|
renderLayoutSnowflake() {
|
|
7407
8841
|
const placeholderClass = {
|
|
7408
|
-
|
|
8842
|
+
'util_displayHidden': this.value
|
|
7409
8843
|
};
|
|
7410
8844
|
|
|
7411
8845
|
const displayValueClasses = {
|
|
7412
8846
|
'displayValue': true,
|
|
7413
8847
|
'hasContent': this.hasDisplayValueContent,
|
|
7414
8848
|
'hasFocus': this.isPopoverVisible,
|
|
7415
|
-
'withValue': this.
|
|
8849
|
+
'withValue': this.commonLabelClasses.widthValue,
|
|
7416
8850
|
'force': this.forceDisplayValue,
|
|
7417
8851
|
};
|
|
7418
8852
|
|
|
@@ -7423,7 +8857,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7423
8857
|
|
|
7424
8858
|
return u`
|
|
7425
8859
|
<div
|
|
7426
|
-
class="${e(this.commonWrapperClasses)}"
|
|
7427
8860
|
part="wrapper">
|
|
7428
8861
|
<div id="slotHolder" aria-hidden="true">
|
|
7429
8862
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -7431,14 +8864,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7431
8864
|
<${this.dropdownTag}
|
|
7432
8865
|
?autoPlacement="${this.autoPlacement}"
|
|
7433
8866
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7434
|
-
?matchWidth="${
|
|
8867
|
+
?matchWidth="${this.matchWidth}"
|
|
7435
8868
|
?noFlip="${this.noFlip}"
|
|
7436
8869
|
?onDark="${this.onDark}"
|
|
7437
8870
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7438
8871
|
.offset="${this.offset}"
|
|
7439
8872
|
.placement="${this.placement}"
|
|
7440
8873
|
chevron
|
|
7441
|
-
fluid
|
|
7442
8874
|
for="selectMenu"
|
|
7443
8875
|
layout="${this.layout}"
|
|
7444
8876
|
part="dropdown"
|
|
@@ -7450,15 +8882,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7450
8882
|
</div>
|
|
7451
8883
|
<div class="mainContent">
|
|
7452
8884
|
<div class="${e(valueContainerClasses)}">
|
|
7453
|
-
<label>
|
|
8885
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7454
8886
|
<slot name="label"></slot>
|
|
8887
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7455
8888
|
</label>
|
|
7456
8889
|
<div class="value" id="value"></div>
|
|
7457
|
-
${
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
</div>
|
|
7461
|
-
`}
|
|
8890
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8891
|
+
${this.placeholder}
|
|
8892
|
+
</div>
|
|
7462
8893
|
</div>
|
|
7463
8894
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7464
8895
|
<slot name="displayValue"></slot>
|
|
@@ -7474,6 +8905,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7474
8905
|
${this.renderHtmlHelpText()}
|
|
7475
8906
|
</div>
|
|
7476
8907
|
</${this.dropdownTag}>
|
|
8908
|
+
${this.renderNativeSelect()}
|
|
7477
8909
|
</div>
|
|
7478
8910
|
`;
|
|
7479
8911
|
}
|
|
@@ -7484,11 +8916,79 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7484
8916
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7485
8917
|
*/
|
|
7486
8918
|
renderLayoutClassic() {
|
|
8919
|
+
const placeholderClass = {
|
|
8920
|
+
'util_displayHidden': this.value
|
|
8921
|
+
};
|
|
8922
|
+
|
|
8923
|
+
const displayValueClasses = {
|
|
8924
|
+
'displayValue': true,
|
|
8925
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8926
|
+
'hasFocus': this.isPopoverVisible,
|
|
8927
|
+
'withValue': this.commonLabelClasses.widthValue,
|
|
8928
|
+
'force': this.forceDisplayValue,
|
|
8929
|
+
};
|
|
8930
|
+
|
|
8931
|
+
const valueContainerClasses = {
|
|
8932
|
+
'valueContainer': true,
|
|
8933
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8934
|
+
};
|
|
8935
|
+
|
|
8936
|
+
const valueClasses = {
|
|
8937
|
+
'value': true,
|
|
8938
|
+
'body-default': true
|
|
8939
|
+
};
|
|
8940
|
+
|
|
7487
8941
|
return u`
|
|
7488
8942
|
<div
|
|
7489
|
-
class="${e(this.commonWrapperClasses)} thin"
|
|
7490
8943
|
part="wrapper">
|
|
7491
|
-
|
|
8944
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8945
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8946
|
+
</div>
|
|
8947
|
+
<${this.dropdownTag}
|
|
8948
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8949
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8950
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8951
|
+
?noFlip="${this.noFlip}"
|
|
8952
|
+
?onDark="${this.onDark}"
|
|
8953
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8954
|
+
.offset="${this.offset}"
|
|
8955
|
+
.placement="${this.placement}"
|
|
8956
|
+
chevron
|
|
8957
|
+
for="selectMenu"
|
|
8958
|
+
layout="${this.layout}"
|
|
8959
|
+
part="dropdown"
|
|
8960
|
+
shape="${this.shape}"
|
|
8961
|
+
size="${this.size}">
|
|
8962
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8963
|
+
<div class="accents left">
|
|
8964
|
+
<slot name="typeIcon"></slot>
|
|
8965
|
+
</div>
|
|
8966
|
+
<div class="mainContent">
|
|
8967
|
+
<div class="${e(valueContainerClasses)}">
|
|
8968
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8969
|
+
<slot name="label"></slot>
|
|
8970
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8971
|
+
</label>
|
|
8972
|
+
<div class="${e(valueClasses)}" id="value"></div>
|
|
8973
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8974
|
+
${this.placeholder}
|
|
8975
|
+
</div>
|
|
8976
|
+
</div>
|
|
8977
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8978
|
+
<slot name="displayValue"></slot>
|
|
8979
|
+
</div>
|
|
8980
|
+
</div>
|
|
8981
|
+
<div class="accents right"></div>
|
|
8982
|
+
</div>
|
|
8983
|
+
<div class="menuWrapper"></div>
|
|
8984
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8985
|
+
<slot></slot>
|
|
8986
|
+
</${this.bibtemplateTag}>
|
|
8987
|
+
<div slot="helpText">
|
|
8988
|
+
${this.renderHtmlHelpText()}
|
|
8989
|
+
</div>
|
|
8990
|
+
</${this.dropdownTag}>
|
|
8991
|
+
${this.renderNativeSelect()}
|
|
7492
8992
|
</div>
|
|
7493
8993
|
`;
|
|
7494
8994
|
}
|
|
@@ -7522,112 +9022,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7522
9022
|
|
|
7523
9023
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7524
9024
|
// 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
9025
|
}
|
|
7625
9026
|
|
|
7626
|
-
var
|
|
9027
|
+
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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}`;
|
|
9028
|
+
|
|
9029
|
+
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{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);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.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);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{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);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.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);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-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);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);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{display:block;vertical-align:middle;line-height:0}:host .menuWrapper{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;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .menuWrapper.lg{padding:var(--ds-size-150, 0.75rem)}:host([root]) .menuWrapper.xl{padding:var(--ds-size-200, 1rem)}`;
|
|
7627
9030
|
|
|
7628
9031
|
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
9032
|
|
|
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)}`;
|
|
9033
|
+
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
9034
|
|
|
7632
9035
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7633
9036
|
// See LICENSE in the project root for license information.
|
|
@@ -7680,7 +9083,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7680
9083
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
7681
9084
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7682
9085
|
* @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
9086
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7685
9087
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7686
9088
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -7695,12 +9097,22 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7695
9097
|
|
|
7696
9098
|
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
7697
9099
|
|
|
7698
|
-
class AuroMenu extends
|
|
9100
|
+
class AuroMenu extends AuroElement$4 {
|
|
7699
9101
|
constructor() {
|
|
7700
9102
|
super();
|
|
7701
9103
|
|
|
7702
9104
|
// State properties (reactive)
|
|
7703
9105
|
|
|
9106
|
+
/**
|
|
9107
|
+
* @private
|
|
9108
|
+
*/
|
|
9109
|
+
this.shape = "box";
|
|
9110
|
+
|
|
9111
|
+
/**
|
|
9112
|
+
* @private
|
|
9113
|
+
*/
|
|
9114
|
+
this.size = "sm";
|
|
9115
|
+
|
|
7704
9116
|
// Value of the selected options
|
|
7705
9117
|
this.value = undefined;
|
|
7706
9118
|
// Currently selected option
|
|
@@ -7759,6 +9171,7 @@ class AuroMenu extends i$2 {
|
|
|
7759
9171
|
|
|
7760
9172
|
static get properties() {
|
|
7761
9173
|
return {
|
|
9174
|
+
...super.properties,
|
|
7762
9175
|
noCheckmark: {
|
|
7763
9176
|
type: Boolean,
|
|
7764
9177
|
reflect: true,
|
|
@@ -7789,15 +9202,31 @@ class AuroMenu extends i$2 {
|
|
|
7789
9202
|
reflect: true,
|
|
7790
9203
|
attribute: 'multiselect'
|
|
7791
9204
|
},
|
|
9205
|
+
|
|
9206
|
+
/**
|
|
9207
|
+
* Value selected for the component.
|
|
9208
|
+
*/
|
|
7792
9209
|
value: {
|
|
7793
|
-
|
|
7794
|
-
|
|
9210
|
+
type: String,
|
|
9211
|
+
reflect: true,
|
|
9212
|
+
attribute: 'value'
|
|
9213
|
+
},
|
|
9214
|
+
|
|
9215
|
+
/**
|
|
9216
|
+
* Indent level for submenus.
|
|
9217
|
+
* @private
|
|
9218
|
+
*/
|
|
9219
|
+
level: {
|
|
9220
|
+
type: Number,
|
|
9221
|
+
reflect: false,
|
|
9222
|
+
attribute: false
|
|
7795
9223
|
}
|
|
7796
9224
|
};
|
|
7797
9225
|
}
|
|
7798
9226
|
|
|
7799
9227
|
static get styles() {
|
|
7800
9228
|
return [
|
|
9229
|
+
shapeSizeCss,
|
|
7801
9230
|
styleCss$2,
|
|
7802
9231
|
colorCss$2,
|
|
7803
9232
|
tokensCss$1
|
|
@@ -7813,7 +9242,26 @@ class AuroMenu extends i$2 {
|
|
|
7813
9242
|
*
|
|
7814
9243
|
*/
|
|
7815
9244
|
static register(name = "auro-menu") {
|
|
7816
|
-
AuroLibraryRuntimeUtils$
|
|
9245
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
9246
|
+
}
|
|
9247
|
+
|
|
9248
|
+
/**
|
|
9249
|
+
* Formatted value based on `multiSelect` state.
|
|
9250
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
9251
|
+
* @private
|
|
9252
|
+
* @returns {String|Array<String>}
|
|
9253
|
+
*/
|
|
9254
|
+
get formattedValue() {
|
|
9255
|
+
if (this.multiSelect) {
|
|
9256
|
+
if (!this.value) {
|
|
9257
|
+
return undefined;
|
|
9258
|
+
}
|
|
9259
|
+
if (this.value.startsWith("[")) {
|
|
9260
|
+
return JSON.parse(this.value);
|
|
9261
|
+
}
|
|
9262
|
+
return [this.value];
|
|
9263
|
+
}
|
|
9264
|
+
return this.value;
|
|
7817
9265
|
}
|
|
7818
9266
|
|
|
7819
9267
|
// Lifecycle Methods
|
|
@@ -7825,6 +9273,7 @@ class AuroMenu extends i$2 {
|
|
|
7825
9273
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
7826
9274
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
7827
9275
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9276
|
+
this.setTagAttribute("auro-menu");
|
|
7828
9277
|
}
|
|
7829
9278
|
|
|
7830
9279
|
disconnectedCallback() {
|
|
@@ -7837,19 +9286,33 @@ class AuroMenu extends i$2 {
|
|
|
7837
9286
|
}
|
|
7838
9287
|
|
|
7839
9288
|
firstUpdated() {
|
|
7840
|
-
AuroLibraryRuntimeUtils$
|
|
9289
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7841
9290
|
|
|
7842
9291
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7843
9292
|
this.initializeMenu();
|
|
7844
9293
|
}
|
|
7845
9294
|
|
|
9295
|
+
/**
|
|
9296
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9297
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9298
|
+
* @private
|
|
9299
|
+
*/
|
|
9300
|
+
setTagAttribute(tagName) {
|
|
9301
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9302
|
+
this.setAttribute(tagName, true);
|
|
9303
|
+
}
|
|
9304
|
+
}
|
|
9305
|
+
|
|
7846
9306
|
updated(changedProperties) {
|
|
7847
|
-
|
|
9307
|
+
super.updated(changedProperties);
|
|
9308
|
+
|
|
9309
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
7848
9310
|
// Reset selection if multiSelect mode changes
|
|
7849
9311
|
this.clearSelection();
|
|
7850
9312
|
}
|
|
7851
9313
|
|
|
7852
|
-
|
|
9314
|
+
|
|
9315
|
+
if (changedProperties.has("value")) {
|
|
7853
9316
|
// Handle null/undefined case
|
|
7854
9317
|
if (this.value === undefined || this.value === null) {
|
|
7855
9318
|
this.optionSelected = undefined;
|
|
@@ -7857,7 +9320,7 @@ class AuroMenu extends i$2 {
|
|
|
7857
9320
|
} else {
|
|
7858
9321
|
if (this.multiSelect) {
|
|
7859
9322
|
// In multiselect mode, this.value should be an array of strings
|
|
7860
|
-
const valueArray =
|
|
9323
|
+
const valueArray = this.formattedValue;
|
|
7861
9324
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
7862
9325
|
|
|
7863
9326
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -7917,6 +9380,19 @@ class AuroMenu extends i$2 {
|
|
|
7917
9380
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7918
9381
|
}
|
|
7919
9382
|
|
|
9383
|
+
// Handle layout propagation to all menus and options
|
|
9384
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9385
|
+
[
|
|
9386
|
+
'size',
|
|
9387
|
+
'shape'
|
|
9388
|
+
].forEach((prop) => {
|
|
9389
|
+
if (changedProperties.has(prop)) {
|
|
9390
|
+
propagationTargets.forEach((el) => {
|
|
9391
|
+
el.setAttribute(prop, this[prop]);
|
|
9392
|
+
});
|
|
9393
|
+
}
|
|
9394
|
+
});
|
|
9395
|
+
|
|
7920
9396
|
// Regex for matchWord if needed
|
|
7921
9397
|
let regexWord = null;
|
|
7922
9398
|
|
|
@@ -8011,14 +9487,14 @@ class AuroMenu extends i$2 {
|
|
|
8011
9487
|
*/
|
|
8012
9488
|
handleSelectState(option) {
|
|
8013
9489
|
if (this.multiSelect) {
|
|
8014
|
-
const currentValue = this.
|
|
9490
|
+
const currentValue = this.formattedValue || [];
|
|
8015
9491
|
const currentSelected = this.optionSelected || [];
|
|
8016
9492
|
|
|
8017
9493
|
if (!currentValue.includes(option.value)) {
|
|
8018
|
-
this.value = [
|
|
9494
|
+
this.value = JSON.stringify([
|
|
8019
9495
|
...currentValue,
|
|
8020
9496
|
option.value
|
|
8021
|
-
];
|
|
9497
|
+
]);
|
|
8022
9498
|
}
|
|
8023
9499
|
if (!currentSelected.includes(option)) {
|
|
8024
9500
|
this.optionSelected = [
|
|
@@ -8041,13 +9517,15 @@ class AuroMenu extends i$2 {
|
|
|
8041
9517
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
8042
9518
|
*/
|
|
8043
9519
|
handleDeselectState(option) {
|
|
8044
|
-
if (this.multiSelect
|
|
9520
|
+
if (this.multiSelect) {
|
|
8045
9521
|
// Remove this option from array
|
|
8046
|
-
|
|
9522
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
8047
9523
|
|
|
8048
9524
|
// If array is empty after removal, set back to undefined
|
|
8049
|
-
if (
|
|
9525
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
8050
9526
|
this.value = undefined;
|
|
9527
|
+
} else {
|
|
9528
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
8051
9529
|
}
|
|
8052
9530
|
|
|
8053
9531
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -8113,21 +9591,20 @@ class AuroMenu extends i$2 {
|
|
|
8113
9591
|
* @param {HTMLElement} menu - Root menu element.
|
|
8114
9592
|
*/
|
|
8115
9593
|
handleNestedMenus(menu) {
|
|
8116
|
-
|
|
9594
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8117
9595
|
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
if (!
|
|
8122
|
-
|
|
9596
|
+
if (menu.level > 0) {
|
|
9597
|
+
menu.setAttribute('role', 'group');
|
|
9598
|
+
menu.removeAttribute("root");
|
|
9599
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9600
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8123
9601
|
}
|
|
9602
|
+
}
|
|
8124
9603
|
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
this.handleNestedMenus(nestedMenu);
|
|
9604
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9605
|
+
options.forEach((option) => {
|
|
9606
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9607
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8131
9608
|
});
|
|
8132
9609
|
}
|
|
8133
9610
|
|
|
@@ -8369,28 +9846,51 @@ class AuroMenu extends i$2 {
|
|
|
8369
9846
|
}
|
|
8370
9847
|
|
|
8371
9848
|
/**
|
|
8372
|
-
*
|
|
8373
|
-
* @returns {
|
|
9849
|
+
* Getter for wrapper classes based on size.
|
|
9850
|
+
* @returns {Object} - Class map for the wrapper element.
|
|
9851
|
+
* @private
|
|
8374
9852
|
*/
|
|
8375
|
-
|
|
9853
|
+
get wrapperClasses() {
|
|
9854
|
+
return e({
|
|
9855
|
+
'menuWrapper': true,
|
|
9856
|
+
[this.size]: true,
|
|
9857
|
+
});
|
|
9858
|
+
}
|
|
9859
|
+
|
|
9860
|
+
/**
|
|
9861
|
+
* Logic to determine the layout of the component.
|
|
9862
|
+
* @protected
|
|
9863
|
+
* @returns {void}
|
|
9864
|
+
*/
|
|
9865
|
+
renderLayout() {
|
|
8376
9866
|
if (this.loading) {
|
|
8377
9867
|
return x`
|
|
8378
|
-
<
|
|
8379
|
-
<
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
9868
|
+
<div class="${this.wrapperClasses}">
|
|
9869
|
+
<auro-menuoption
|
|
9870
|
+
disabled
|
|
9871
|
+
loadingplaceholder
|
|
9872
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9873
|
+
>
|
|
9874
|
+
<div>
|
|
9875
|
+
<slot name="loadingIcon" class="body-lg"></slot>
|
|
9876
|
+
<slot name="loadingText"></slot>
|
|
9877
|
+
</div>
|
|
9878
|
+
</auro-menuoption>
|
|
9879
|
+
</div>
|
|
8384
9880
|
`;
|
|
8385
9881
|
}
|
|
8386
9882
|
|
|
8387
|
-
return x
|
|
9883
|
+
return x`
|
|
9884
|
+
<div class="${this.wrapperClasses}">
|
|
9885
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9886
|
+
</div>
|
|
9887
|
+
`;
|
|
8388
9888
|
}
|
|
8389
9889
|
}
|
|
8390
9890
|
|
|
8391
|
-
var styleCss$1 = 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}`;
|
|
9891
|
+
var styleCss$1 = i$5`.body-default{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);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.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);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{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);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.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);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-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);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);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none}:host .wrapper{box-sizing:border-box;display:flex;align-items:center;padding-right:var(--ds-size-150, 0.75rem);padding-left:calc(var(--ds-size-100, 0.5rem) + 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 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-100, 0.5rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-100, 0.5rem) + 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
9892
|
|
|
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)}`;
|
|
9893
|
+
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
9894
|
|
|
8395
9895
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8396
9896
|
// See LICENSE in the project root for license information.
|
|
@@ -8738,8 +10238,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8738
10238
|
async firstUpdated() {
|
|
8739
10239
|
await super.firstUpdated();
|
|
8740
10240
|
|
|
8741
|
-
|
|
8742
|
-
|
|
10241
|
+
/**
|
|
10242
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
10243
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
10244
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
10245
|
+
*/
|
|
10246
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8743
10247
|
const svgDesc = this.svg.querySelector('desc');
|
|
8744
10248
|
|
|
8745
10249
|
if (svgDesc) {
|
|
@@ -8783,7 +10287,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8783
10287
|
}
|
|
8784
10288
|
}
|
|
8785
10289
|
|
|
8786
|
-
var iconVersion = '8.0
|
|
10290
|
+
var iconVersion = '8.1.0';
|
|
8787
10291
|
|
|
8788
10292
|
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
10293
|
|
|
@@ -8801,10 +10305,20 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8801
10305
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8802
10306
|
* @slot - Specifies text for an option, but is not the value.
|
|
8803
10307
|
*/
|
|
8804
|
-
class AuroMenuOption extends
|
|
10308
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8805
10309
|
constructor() {
|
|
8806
10310
|
super();
|
|
8807
10311
|
|
|
10312
|
+
/**
|
|
10313
|
+
* @private
|
|
10314
|
+
*/
|
|
10315
|
+
this.shape = undefined;
|
|
10316
|
+
|
|
10317
|
+
/**
|
|
10318
|
+
* @private
|
|
10319
|
+
*/
|
|
10320
|
+
this.size = undefined;
|
|
10321
|
+
|
|
8808
10322
|
/**
|
|
8809
10323
|
* Generate unique names for dependency components.
|
|
8810
10324
|
*/
|
|
@@ -8823,11 +10337,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8823
10337
|
/**
|
|
8824
10338
|
* @private
|
|
8825
10339
|
*/
|
|
8826
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10340
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
8827
10341
|
}
|
|
8828
10342
|
|
|
8829
10343
|
static get properties() {
|
|
8830
10344
|
return {
|
|
10345
|
+
...super.properties,
|
|
8831
10346
|
nocheckmark: {
|
|
8832
10347
|
type: Boolean,
|
|
8833
10348
|
reflect: true
|
|
@@ -8852,6 +10367,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8852
10367
|
|
|
8853
10368
|
static get styles() {
|
|
8854
10369
|
return [
|
|
10370
|
+
shapeSizeCss,
|
|
8855
10371
|
styleCss$1,
|
|
8856
10372
|
colorCss$1,
|
|
8857
10373
|
tokensCss$1
|
|
@@ -8867,13 +10383,20 @@ class AuroMenuOption extends i$2 {
|
|
|
8867
10383
|
*
|
|
8868
10384
|
*/
|
|
8869
10385
|
static register(name = "auro-menuoption") {
|
|
8870
|
-
AuroLibraryRuntimeUtils$
|
|
10386
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
8871
10387
|
}
|
|
8872
10388
|
|
|
8873
10389
|
firstUpdated() {
|
|
8874
10390
|
// Add the tag name as an attribute if it is different than the component name
|
|
8875
10391
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
|
|
8876
10392
|
|
|
10393
|
+
if (!this.hasAttribute('size')) {
|
|
10394
|
+
this.size = this.parentElement.getAttribute('size') || 'sm';
|
|
10395
|
+
}
|
|
10396
|
+
if (!this.hasAttribute('shape')) {
|
|
10397
|
+
this.shape = this.parentElement.getAttribute('shape') || 'box';
|
|
10398
|
+
}
|
|
10399
|
+
|
|
8877
10400
|
this.setAttribute('role', 'option');
|
|
8878
10401
|
this.setAttribute('aria-selected', 'false');
|
|
8879
10402
|
|
|
@@ -8889,6 +10412,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8889
10412
|
|
|
8890
10413
|
// observer for selected property changes
|
|
8891
10414
|
updated(changedProperties) {
|
|
10415
|
+
super.updated(changedProperties);
|
|
10416
|
+
|
|
8892
10417
|
if (changedProperties.has('selected')) {
|
|
8893
10418
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8894
10419
|
}
|
|
@@ -8907,13 +10432,36 @@ class AuroMenuOption extends i$2 {
|
|
|
8907
10432
|
|
|
8908
10433
|
svg.setAttribute('slot', 'svg');
|
|
8909
10434
|
|
|
8910
|
-
return u`<${this.iconTag} customColor customSvg
|
|
10435
|
+
return u`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
|
|
8911
10436
|
}
|
|
8912
10437
|
|
|
8913
|
-
|
|
10438
|
+
/**
|
|
10439
|
+
* Logic to determine the layout of the component.
|
|
10440
|
+
* @protected
|
|
10441
|
+
* @returns {void}
|
|
10442
|
+
*/
|
|
10443
|
+
renderLayout() {
|
|
10444
|
+
|
|
10445
|
+
const fontClassMap = {
|
|
10446
|
+
xs: 'body-sm',
|
|
10447
|
+
sm: 'body-default',
|
|
10448
|
+
md: 'body-default',
|
|
10449
|
+
lg: 'body-lg',
|
|
10450
|
+
xl: 'body-lg'
|
|
10451
|
+
};
|
|
10452
|
+
|
|
10453
|
+
const classes = e({
|
|
10454
|
+
'wrapper': true,
|
|
10455
|
+
[this.size ? fontClassMap[this.size] : 'body-sm']: true,
|
|
10456
|
+
});
|
|
10457
|
+
|
|
8914
10458
|
return u`
|
|
8915
|
-
${
|
|
8916
|
-
|
|
10459
|
+
<div class="${classes}">
|
|
10460
|
+
${this.selected && !this.nocheckmark
|
|
10461
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10462
|
+
: undefined}
|
|
10463
|
+
<slot></slot>
|
|
10464
|
+
</div>
|
|
8917
10465
|
`;
|
|
8918
10466
|
}
|
|
8919
10467
|
}
|
|
@@ -8935,7 +10483,6 @@ function initExamples(initCount) {
|
|
|
8935
10483
|
inDialogExample();
|
|
8936
10484
|
resetStateExample();
|
|
8937
10485
|
auroMenuLoadingExample();
|
|
8938
|
-
valueTextExample();
|
|
8939
10486
|
} catch (err) {
|
|
8940
10487
|
if (initCount <= 20) {
|
|
8941
10488
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|