@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.11 → 0.0.0-pr624.111
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 +1244 -95
- package/components/bibtemplate/dist/registered.js +1244 -95
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +54 -19
- package/components/checkbox/demo/api.min.js +70 -45
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +70 -45
- 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 +6 -3
- package/components/checkbox/dist/index.js +69 -44
- package/components/checkbox/dist/registered.js +69 -44
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +121 -8
- package/components/combobox/demo/api.min.js +3283 -963
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +20 -34
- package/components/combobox/demo/index.min.js +3283 -963
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +59 -14
- package/components/combobox/dist/index.js +3024 -848
- package/components/combobox/dist/registered.js +3024 -848
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +167 -21
- package/components/counter/demo/api.min.js +3428 -777
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +191 -34
- package/components/counter/demo/index.min.js +3428 -777
- 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 +162 -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 +3427 -776
- package/components/counter/dist/registered.js +3427 -776
- package/components/datepicker/README.md +2 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +70 -28
- package/components/datepicker/demo/api.min.js +7082 -3165
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +87 -8
- package/components/datepicker/demo/index.min.js +7082 -3165
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +2 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +152 -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 +14635 -10718
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +14635 -10718
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +89 -281
- package/components/dropdown/demo/api.min.js +452 -271
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +452 -271
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +43 -82
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +451 -270
- package/components/dropdown/dist/registered.js +451 -270
- 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 +2 -4
- package/components/helptext/dist/registered.js +2 -4
- package/components/input/README.md +6 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +234 -136
- package/components/input/demo/api.min.js +1057 -299
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +55 -32
- package/components/input/demo/index.min.js +1071 -313
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +6 -2
- package/components/input/dist/auro-input.d.ts +36 -2
- package/components/input/dist/base-input.d.ts +47 -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 +1070 -312
- package/components/input/dist/registered.js +1070 -312
- 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 +303 -64
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +303 -64
- 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 +288 -49
- package/components/menu/dist/registered.js +288 -49
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +41 -9
- package/components/radio/demo/api.min.js +93 -95
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +93 -95
- 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 +11 -12
- package/components/radio/dist/index.js +92 -94
- package/components/radio/dist/registered.js +92 -94
- package/components/select/README.md +1 -0
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +159 -125
- package/components/select/demo/api.min.js +2284 -729
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1074 -259
- package/components/select/demo/index.min.js +2286 -719
- package/components/select/demo/readme.html +16 -9
- package/components/select/demo/readme.md +1 -0
- package/components/select/dist/auro-select.d.ts +86 -25
- package/components/select/dist/index.js +2178 -755
- package/components/select/dist/registered.js +2178 -755
- 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/datepicker/dist/styles/{emphasized/style-css.d.ts → classic/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/default/input-css.d.ts → datepicker/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{input/dist/styles/default/label-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/input-css.d.ts → datepicker/dist/styles/snowflake/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$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:
|
|
234
|
+
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height: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, #
|
|
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-muted, #ccd2db);--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-advanced-color-state-error-inverse, #f9a4a8);--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
|
+
// multiple input in one components (datepicker)
|
|
1015
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1016
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
|
|
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,22 +3039,16 @@ 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() {
|
|
3045
|
-
this.preventFocusLoseOnBibClick = (event) => {
|
|
3046
|
-
event.preventDefault();
|
|
3047
|
-
event.stopPropagation();
|
|
3048
|
-
};
|
|
3049
|
-
this.element.bib.addEventListener('mousedown', this.preventFocusLoseOnBibClick);
|
|
3050
|
-
|
|
3051
3052
|
// Define handlers & store references
|
|
3052
3053
|
this.focusHandler = () => this.handleFocusLoss();
|
|
3053
3054
|
|
|
@@ -3063,7 +3064,7 @@ class AuroFloatingUI {
|
|
|
3063
3064
|
document.expandedAuroFormkitDropdown = null;
|
|
3064
3065
|
document.expandedAuroFloater = this;
|
|
3065
3066
|
} else {
|
|
3066
|
-
this.hideBib();
|
|
3067
|
+
this.hideBib("click");
|
|
3067
3068
|
}
|
|
3068
3069
|
}
|
|
3069
3070
|
};
|
|
@@ -3076,7 +3077,7 @@ class AuroFloatingUI {
|
|
|
3076
3077
|
// if something else is open, let it handle itself
|
|
3077
3078
|
return;
|
|
3078
3079
|
}
|
|
3079
|
-
this.hideBib();
|
|
3080
|
+
this.hideBib("keydown");
|
|
3080
3081
|
}
|
|
3081
3082
|
};
|
|
3082
3083
|
|
|
@@ -3097,11 +3098,6 @@ class AuroFloatingUI {
|
|
|
3097
3098
|
cleanupHideHandlers() {
|
|
3098
3099
|
// Remove event listeners if they exist
|
|
3099
3100
|
|
|
3100
|
-
if (this.preventFocusLoseOnBibClick) {
|
|
3101
|
-
this.element.bib.removeEventListener('mousedown', this.preventFocusLoseOnBibClick);
|
|
3102
|
-
delete this.preventFocusLoseOnBibClick;
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
3101
|
if (this.focusHandler) {
|
|
3106
3102
|
document.removeEventListener('focusin', this.focusHandler);
|
|
3107
3103
|
this.focusHandler = null;
|
|
@@ -3159,7 +3155,11 @@ class AuroFloatingUI {
|
|
|
3159
3155
|
}
|
|
3160
3156
|
}
|
|
3161
3157
|
|
|
3162
|
-
|
|
3158
|
+
/**
|
|
3159
|
+
* Hides the floating UI element.
|
|
3160
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3161
|
+
*/
|
|
3162
|
+
hideBib(eventType = "unknown") {
|
|
3163
3163
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3164
3164
|
this.lockScroll(false);
|
|
3165
3165
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3170,7 +3170,7 @@ class AuroFloatingUI {
|
|
|
3170
3170
|
if (this.showing) {
|
|
3171
3171
|
this.cleanupHideHandlers();
|
|
3172
3172
|
this.showing = false;
|
|
3173
|
-
this.dispatchEventDropdownToggle();
|
|
3173
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
document.expandedAuroFloater = null;
|
|
@@ -3179,11 +3179,13 @@ class AuroFloatingUI {
|
|
|
3179
3179
|
/**
|
|
3180
3180
|
* @private
|
|
3181
3181
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3182
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3182
3183
|
*/
|
|
3183
|
-
dispatchEventDropdownToggle() {
|
|
3184
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3184
3185
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3185
3186
|
detail: {
|
|
3186
3187
|
expanded: this.showing,
|
|
3188
|
+
eventType: eventType || "unknown",
|
|
3187
3189
|
},
|
|
3188
3190
|
composed: true
|
|
3189
3191
|
});
|
|
@@ -3193,7 +3195,7 @@ class AuroFloatingUI {
|
|
|
3193
3195
|
|
|
3194
3196
|
handleClick() {
|
|
3195
3197
|
if (this.element.isPopoverVisible) {
|
|
3196
|
-
this.hideBib();
|
|
3198
|
+
this.hideBib("click");
|
|
3197
3199
|
} else {
|
|
3198
3200
|
this.showBib();
|
|
3199
3201
|
}
|
|
@@ -3216,8 +3218,9 @@ class AuroFloatingUI {
|
|
|
3216
3218
|
// Space is included as it's expected behavior for interactive elements
|
|
3217
3219
|
|
|
3218
3220
|
const origin = event.composedPath()[0];
|
|
3219
|
-
if (event.key === 'Enter' || (
|
|
3220
|
-
|
|
3221
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3222
|
+
|
|
3223
|
+
event.preventDefault();
|
|
3221
3224
|
this.handleClick();
|
|
3222
3225
|
}
|
|
3223
3226
|
break;
|
|
@@ -3228,7 +3231,7 @@ class AuroFloatingUI {
|
|
|
3228
3231
|
break;
|
|
3229
3232
|
case 'mouseleave':
|
|
3230
3233
|
if (this.element.hoverToggle) {
|
|
3231
|
-
this.hideBib();
|
|
3234
|
+
this.hideBib("mouseleave");
|
|
3232
3235
|
}
|
|
3233
3236
|
break;
|
|
3234
3237
|
case 'focus':
|
|
@@ -3371,6 +3374,267 @@ class AuroFloatingUI {
|
|
|
3371
3374
|
}
|
|
3372
3375
|
}
|
|
3373
3376
|
|
|
3377
|
+
// Selectors for focusable elements
|
|
3378
|
+
const FOCUSABLE_SELECTORS = [
|
|
3379
|
+
'a[href]',
|
|
3380
|
+
'button:not([disabled])',
|
|
3381
|
+
'textarea:not([disabled])',
|
|
3382
|
+
'input:not([disabled])',
|
|
3383
|
+
'select:not([disabled])',
|
|
3384
|
+
'[role="tab"]:not([disabled])',
|
|
3385
|
+
'[role="link"]:not([disabled])',
|
|
3386
|
+
'[role="button"]:not([disabled])',
|
|
3387
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3388
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3389
|
+
];
|
|
3390
|
+
|
|
3391
|
+
// List of custom components that are known to be focusable
|
|
3392
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3393
|
+
'auro-checkbox',
|
|
3394
|
+
'auro-radio',
|
|
3395
|
+
'auro-dropdown',
|
|
3396
|
+
'auro-button',
|
|
3397
|
+
'auro-combobox',
|
|
3398
|
+
'auro-input',
|
|
3399
|
+
'auro-counter',
|
|
3400
|
+
'auro-menu',
|
|
3401
|
+
'auro-select',
|
|
3402
|
+
'auro-datepicker',
|
|
3403
|
+
'auro-hyperlink',
|
|
3404
|
+
'auro-accordion',
|
|
3405
|
+
];
|
|
3406
|
+
|
|
3407
|
+
/**
|
|
3408
|
+
* Determines if a given element is a custom focusable component.
|
|
3409
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3410
|
+
*
|
|
3411
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3412
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3413
|
+
*/
|
|
3414
|
+
function isFocusableComponent(element) {
|
|
3415
|
+
const componentName = element.tagName.toLowerCase();
|
|
3416
|
+
|
|
3417
|
+
// Guard Clause: Element is a focusable component
|
|
3418
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3419
|
+
|
|
3420
|
+
// Guard Clause: Element is not disabled
|
|
3421
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3422
|
+
|
|
3423
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3424
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3425
|
+
|
|
3426
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3427
|
+
return true;
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3432
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3433
|
+
*
|
|
3434
|
+
* @param {HTMLElement} container The container to search within
|
|
3435
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3436
|
+
*/
|
|
3437
|
+
function getFocusableElements(container) {
|
|
3438
|
+
// Get elements in DOM order by walking the tree
|
|
3439
|
+
const orderedFocusableElements = [];
|
|
3440
|
+
|
|
3441
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3442
|
+
const collectFocusableElements = (root) => {
|
|
3443
|
+
// Check if current element is focusable
|
|
3444
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3445
|
+
// Check if this is a custom component that is focusable
|
|
3446
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3447
|
+
|
|
3448
|
+
if (isComponentFocusable) {
|
|
3449
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3450
|
+
orderedFocusableElements.push(root);
|
|
3451
|
+
return; // Skip traversing inside this component
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
// Check if the element itself matches any selector
|
|
3455
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3456
|
+
if (root.matches?.(selector)) {
|
|
3457
|
+
orderedFocusableElements.push(root);
|
|
3458
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3462
|
+
// Process shadow DOM only for non-Auro components
|
|
3463
|
+
if (root.shadowRoot) {
|
|
3464
|
+
// Process shadow DOM children in order
|
|
3465
|
+
if (root.shadowRoot.children) {
|
|
3466
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3467
|
+
collectFocusableElements(child);
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
// Process slots and their assigned nodes in order
|
|
3473
|
+
if (root.tagName === 'SLOT') {
|
|
3474
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3475
|
+
for (const node of assignedNodes) {
|
|
3476
|
+
collectFocusableElements(node);
|
|
3477
|
+
}
|
|
3478
|
+
} else {
|
|
3479
|
+
// Process light DOM children in order
|
|
3480
|
+
if (root.children) {
|
|
3481
|
+
Array.from(root.children).forEach(child => {
|
|
3482
|
+
collectFocusableElements(child);
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
};
|
|
3488
|
+
|
|
3489
|
+
// Start the traversal from the container
|
|
3490
|
+
collectFocusableElements(container);
|
|
3491
|
+
|
|
3492
|
+
// Remove duplicates that might have been collected through different paths
|
|
3493
|
+
// while preserving order
|
|
3494
|
+
const uniqueElements = [];
|
|
3495
|
+
const seen = new Set();
|
|
3496
|
+
|
|
3497
|
+
for (const element of orderedFocusableElements) {
|
|
3498
|
+
if (!seen.has(element)) {
|
|
3499
|
+
seen.add(element);
|
|
3500
|
+
uniqueElements.push(element);
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
return uniqueElements;
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
/**
|
|
3508
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3509
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3510
|
+
*/
|
|
3511
|
+
class FocusTrap {
|
|
3512
|
+
/**
|
|
3513
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3514
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3515
|
+
*
|
|
3516
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3517
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3518
|
+
*/
|
|
3519
|
+
constructor(container) {
|
|
3520
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3521
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
this.container = container;
|
|
3525
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3526
|
+
|
|
3527
|
+
this._init();
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
/**
|
|
3531
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3532
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3533
|
+
*
|
|
3534
|
+
* @private
|
|
3535
|
+
*/
|
|
3536
|
+
_init() {
|
|
3537
|
+
|
|
3538
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3539
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3540
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3541
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3544
|
+
// Track tab direction
|
|
3545
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3550
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3551
|
+
*
|
|
3552
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3553
|
+
* @private
|
|
3554
|
+
*/
|
|
3555
|
+
_onKeydown = (e) => {
|
|
3556
|
+
|
|
3557
|
+
if (e.key === 'Tab') {
|
|
3558
|
+
|
|
3559
|
+
// Set the tab direction based on the key pressed
|
|
3560
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3561
|
+
|
|
3562
|
+
// Get the active element(s) in the document and shadow root
|
|
3563
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3564
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3565
|
+
let activeElement = document.activeElement;
|
|
3566
|
+
const actives = [activeElement];
|
|
3567
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3568
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3569
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
// Update the focusable elements
|
|
3573
|
+
const focusables = this._getFocusableElements();
|
|
3574
|
+
|
|
3575
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3576
|
+
const focusIndex =
|
|
3577
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3578
|
+
? focusables.length - 1
|
|
3579
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3580
|
+
? 0
|
|
3581
|
+
: null;
|
|
3582
|
+
|
|
3583
|
+
if (focusIndex !== null) {
|
|
3584
|
+
focusables[focusIndex].focus();
|
|
3585
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3586
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
};
|
|
3590
|
+
|
|
3591
|
+
/**
|
|
3592
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3593
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3594
|
+
*
|
|
3595
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3596
|
+
* @private
|
|
3597
|
+
*/
|
|
3598
|
+
_getFocusableElements() {
|
|
3599
|
+
// Use the imported utility function to get focusable elements
|
|
3600
|
+
const elements = getFocusableElements(this.container);
|
|
3601
|
+
|
|
3602
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3603
|
+
return elements;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
/**
|
|
3607
|
+
* Moves focus to the first focusable element within the container.
|
|
3608
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3609
|
+
*/
|
|
3610
|
+
focusFirstElement() {
|
|
3611
|
+
const focusables = this._getFocusableElements();
|
|
3612
|
+
if (focusables.length) focusables[0].focus();
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* Moves focus to the last focusable element within the container.
|
|
3617
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3618
|
+
*/
|
|
3619
|
+
focusLastElement() {
|
|
3620
|
+
const focusables = this._getFocusableElements();
|
|
3621
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
/**
|
|
3625
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3626
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3627
|
+
*/
|
|
3628
|
+
disconnect() {
|
|
3629
|
+
|
|
3630
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3631
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3374
3638
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3375
3639
|
// See LICENSE in the project root for license information.
|
|
3376
3640
|
|
|
@@ -3477,7 +3741,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
3477
3741
|
return _fetchMap$2.get(uri);
|
|
3478
3742
|
};
|
|
3479
3743
|
|
|
3480
|
-
var styleCss$
|
|
3744
|
+
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
3745
|
|
|
3482
3746
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3483
3747
|
// See LICENSE in the project root for license information.
|
|
@@ -3520,7 +3784,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3520
3784
|
|
|
3521
3785
|
static get styles() {
|
|
3522
3786
|
return i$5`
|
|
3523
|
-
${styleCss$
|
|
3787
|
+
${styleCss$3$2}
|
|
3524
3788
|
`;
|
|
3525
3789
|
}
|
|
3526
3790
|
|
|
@@ -3561,9 +3825,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3561
3825
|
}
|
|
3562
3826
|
};
|
|
3563
3827
|
|
|
3564
|
-
var tokensCss$2$
|
|
3828
|
+
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
3829
|
|
|
3566
|
-
var colorCss$3$
|
|
3830
|
+
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
3831
|
|
|
3568
3832
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3569
3833
|
// See LICENSE in the project root for license information.
|
|
@@ -3682,7 +3946,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3682
3946
|
* Allows custom color to be set.
|
|
3683
3947
|
*/
|
|
3684
3948
|
customColor: {
|
|
3685
|
-
type: Boolean
|
|
3949
|
+
type: Boolean,
|
|
3950
|
+
reflect: true
|
|
3686
3951
|
},
|
|
3687
3952
|
|
|
3688
3953
|
/**
|
|
@@ -3721,9 +3986,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3721
3986
|
static get styles() {
|
|
3722
3987
|
return [
|
|
3723
3988
|
super.styles,
|
|
3724
|
-
i$5`${tokensCss$2$
|
|
3725
|
-
i$5`${styleCss$
|
|
3726
|
-
i$5`${colorCss$3$
|
|
3989
|
+
i$5`${tokensCss$2$2}`,
|
|
3990
|
+
i$5`${styleCss$3$2}`,
|
|
3991
|
+
i$5`${colorCss$3$2}`
|
|
3727
3992
|
];
|
|
3728
3993
|
}
|
|
3729
3994
|
|
|
@@ -3757,8 +4022,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3757
4022
|
async firstUpdated() {
|
|
3758
4023
|
await super.firstUpdated();
|
|
3759
4024
|
|
|
3760
|
-
|
|
3761
|
-
|
|
4025
|
+
/**
|
|
4026
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
4027
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
4028
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
4029
|
+
*/
|
|
4030
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3762
4031
|
const svgDesc = this.svg.querySelector('desc');
|
|
3763
4032
|
|
|
3764
4033
|
if (svgDesc) {
|
|
@@ -3804,11 +4073,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3804
4073
|
|
|
3805
4074
|
var iconVersion$2 = '6.1.2';
|
|
3806
4075
|
|
|
3807
|
-
var styleCss$
|
|
4076
|
+
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
4077
|
|
|
3809
|
-
var colorCss$2$
|
|
4078
|
+
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
4079
|
|
|
3811
|
-
var tokensCss$1$
|
|
4080
|
+
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
4081
|
|
|
3813
4082
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3814
4083
|
// See LICENSE in the project root for license information.
|
|
@@ -3829,7 +4098,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3829
4098
|
*/
|
|
3830
4099
|
|
|
3831
4100
|
class AuroDropdownBib extends i$2 {
|
|
3832
|
-
|
|
4101
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3833
4102
|
constructor() {
|
|
3834
4103
|
super();
|
|
3835
4104
|
|
|
@@ -3839,13 +4108,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3839
4108
|
this._mobileBreakpointValue = undefined;
|
|
3840
4109
|
|
|
3841
4110
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4111
|
+
|
|
4112
|
+
this.shape = "rounded";
|
|
4113
|
+
this.matchWidth = false;
|
|
3842
4114
|
}
|
|
3843
4115
|
|
|
3844
4116
|
static get styles() {
|
|
3845
4117
|
return [
|
|
3846
|
-
styleCss$
|
|
3847
|
-
colorCss$2$
|
|
3848
|
-
tokensCss$1$
|
|
4118
|
+
styleCss$2$2,
|
|
4119
|
+
colorCss$2$2,
|
|
4120
|
+
tokensCss$1$2
|
|
3849
4121
|
];
|
|
3850
4122
|
}
|
|
3851
4123
|
|
|
@@ -3876,6 +4148,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3876
4148
|
reflect: true
|
|
3877
4149
|
},
|
|
3878
4150
|
|
|
4151
|
+
/**
|
|
4152
|
+
* If declared, the bib width will match the trigger width.
|
|
4153
|
+
* @private
|
|
4154
|
+
*/
|
|
4155
|
+
matchWidth: {
|
|
4156
|
+
type: Boolean,
|
|
4157
|
+
reflect: true
|
|
4158
|
+
},
|
|
4159
|
+
|
|
3879
4160
|
/**
|
|
3880
4161
|
* If declared, will apply border-radius to the bib.
|
|
3881
4162
|
*/
|
|
@@ -3889,6 +4170,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3889
4170
|
*/
|
|
3890
4171
|
bibTemplate: {
|
|
3891
4172
|
type: Object
|
|
4173
|
+
},
|
|
4174
|
+
|
|
4175
|
+
shape: {
|
|
4176
|
+
type: String,
|
|
4177
|
+
reflect: true
|
|
3892
4178
|
}
|
|
3893
4179
|
};
|
|
3894
4180
|
}
|
|
@@ -3968,8 +4254,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3968
4254
|
|
|
3969
4255
|
// function that renders the HTML and CSS into the scope of the component
|
|
3970
4256
|
render() {
|
|
4257
|
+
const classes = {
|
|
4258
|
+
container: true
|
|
4259
|
+
};
|
|
4260
|
+
|
|
4261
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4262
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4263
|
+
classes[`shape-${this.shape}`] = true;
|
|
4264
|
+
|
|
3971
4265
|
return u`
|
|
3972
|
-
<div class="
|
|
4266
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3973
4267
|
<slot></slot>
|
|
3974
4268
|
</div>
|
|
3975
4269
|
`;
|
|
@@ -3978,21 +4272,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
3978
4272
|
|
|
3979
4273
|
var dropdownVersion$1 = '3.0.0';
|
|
3980
4274
|
|
|
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:
|
|
4275
|
+
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}`;
|
|
4276
|
+
|
|
4277
|
+
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,:host([onDark]) .helpText{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-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3982
4278
|
|
|
3983
|
-
var
|
|
4279
|
+
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
4280
|
|
|
3985
|
-
var classicColorCss = i$5
|
|
4281
|
+
var classicColorCss = i$5``;
|
|
3986
4282
|
|
|
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])
|
|
4283
|
+
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
4284
|
|
|
3989
|
-
var styleEmphasizedCss = i$5
|
|
4285
|
+
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
4286
|
|
|
3991
|
-
var styleSnowflakeCss = i$5`:host
|
|
4287
|
+
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)}:host([layout*=snowflake]) .trigger,:host([layout*=snowflake]) .helpText{text-align:center}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3992
4288
|
|
|
3993
4289
|
var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
3994
4290
|
|
|
3995
|
-
var styleCss$6 = i$5`.
|
|
4291
|
+
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
4292
|
|
|
3997
4293
|
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3998
4294
|
|
|
@@ -4003,7 +4299,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
4003
4299
|
|
|
4004
4300
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4005
4301
|
|
|
4006
|
-
let AuroLibraryRuntimeUtils$
|
|
4302
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
4007
4303
|
|
|
4008
4304
|
/* eslint-disable jsdoc/require-param */
|
|
4009
4305
|
|
|
@@ -4072,8 +4368,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
4072
4368
|
|
|
4073
4369
|
/**
|
|
4074
4370
|
* 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
4371
|
*/
|
|
4078
4372
|
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
4079
4373
|
|
|
@@ -4084,7 +4378,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4084
4378
|
this.onDark = false;
|
|
4085
4379
|
this.hasTextContent = false;
|
|
4086
4380
|
|
|
4087
|
-
AuroLibraryRuntimeUtils$
|
|
4381
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4088
4382
|
}
|
|
4089
4383
|
|
|
4090
4384
|
static get styles() {
|
|
@@ -4140,7 +4434,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4140
4434
|
*
|
|
4141
4435
|
*/
|
|
4142
4436
|
static register(name = "auro-helptext") {
|
|
4143
|
-
AuroLibraryRuntimeUtils$
|
|
4437
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
4144
4438
|
}
|
|
4145
4439
|
|
|
4146
4440
|
updated() {
|
|
@@ -4189,7 +4483,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4189
4483
|
// function that renders the HTML and CSS into the scope of the component
|
|
4190
4484
|
render() {
|
|
4191
4485
|
return x`
|
|
4192
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4486
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4193
4487
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4194
4488
|
</div>
|
|
4195
4489
|
`;
|
|
@@ -4198,7 +4492,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4198
4492
|
|
|
4199
4493
|
var helpTextVersion$1 = '1.0.0';
|
|
4200
4494
|
|
|
4201
|
-
let AuroElement$
|
|
4495
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4202
4496
|
static get properties() {
|
|
4203
4497
|
return {
|
|
4204
4498
|
|
|
@@ -4233,19 +4527,22 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4233
4527
|
}
|
|
4234
4528
|
|
|
4235
4529
|
resetShapeClasses() {
|
|
4236
|
-
|
|
4237
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4530
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4238
4531
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4532
|
+
if (wrapper) {
|
|
4533
|
+
wrapper.classList.forEach((className) => {
|
|
4534
|
+
if (className.startsWith('shape-')) {
|
|
4535
|
+
wrapper.classList.remove(className);
|
|
4536
|
+
}
|
|
4537
|
+
});
|
|
4245
4538
|
|
|
4539
|
+
if (this.shape && this.size) {
|
|
4246
4540
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4541
|
+
} else {
|
|
4542
|
+
wrapper.classList.add('shape-none');
|
|
4247
4543
|
}
|
|
4248
4544
|
}
|
|
4545
|
+
|
|
4249
4546
|
}
|
|
4250
4547
|
|
|
4251
4548
|
resetLayoutClasses() {
|
|
@@ -4294,20 +4591,20 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4294
4591
|
// See LICENSE in the project root for license information.
|
|
4295
4592
|
|
|
4296
4593
|
|
|
4297
|
-
|
|
4298
|
-
|
|
4594
|
+
|
|
4595
|
+
/*
|
|
4299
4596
|
* @slot - Default slot for the popover content.
|
|
4300
|
-
* @slot label - Defines the content of the label.
|
|
4301
4597
|
* @slot helpText - Defines the content of the helpText.
|
|
4302
4598
|
* @slot trigger - Defines the content of the trigger.
|
|
4303
4599
|
* @csspart trigger - The trigger content container.
|
|
4304
4600
|
* @csspart chevron - The collapsed/expanded state icon container.
|
|
4601
|
+
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
4305
4602
|
* @csspart helpText - The helpText content container.
|
|
4306
4603
|
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
4307
4604
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4308
4605
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4309
4606
|
*/
|
|
4310
|
-
class AuroDropdown extends AuroElement$
|
|
4607
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4311
4608
|
constructor() {
|
|
4312
4609
|
super();
|
|
4313
4610
|
|
|
@@ -4316,23 +4613,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4613
|
this.matchWidth = false;
|
|
4317
4614
|
this.noHideOnThisFocusLoss = false;
|
|
4318
4615
|
|
|
4319
|
-
this.errorMessage =
|
|
4616
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4320
4617
|
|
|
4321
4618
|
// Layout Config
|
|
4322
|
-
this.layout =
|
|
4323
|
-
this.shape =
|
|
4324
|
-
this.size =
|
|
4619
|
+
this.layout = undefined;
|
|
4620
|
+
this.shape = undefined;
|
|
4621
|
+
this.size = undefined;
|
|
4622
|
+
|
|
4325
4623
|
this.parentBorder = false;
|
|
4326
4624
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4625
|
+
/** @private */
|
|
4626
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4329
4627
|
|
|
4330
|
-
|
|
4331
|
-
return {
|
|
4332
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4333
|
-
};
|
|
4628
|
+
this.privateDefaults();
|
|
4334
4629
|
}
|
|
4335
4630
|
|
|
4631
|
+
/**
|
|
4632
|
+
* @private
|
|
4633
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4634
|
+
*/
|
|
4336
4635
|
get commonWrapperClasses() {
|
|
4337
4636
|
return {
|
|
4338
4637
|
'trigger': true,
|
|
@@ -4350,13 +4649,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4350
4649
|
privateDefaults() {
|
|
4351
4650
|
this.chevron = false;
|
|
4352
4651
|
this.disabled = false;
|
|
4652
|
+
this.disableFocusTrap = false;
|
|
4353
4653
|
this.error = false;
|
|
4354
|
-
this.inset = false;
|
|
4355
|
-
this.rounded = false;
|
|
4356
4654
|
this.tabIndex = 0;
|
|
4357
4655
|
this.noToggle = false;
|
|
4358
|
-
this.a11yAutocomplete = 'none';
|
|
4359
|
-
this.labeled = true;
|
|
4360
4656
|
this.a11yRole = 'button';
|
|
4361
4657
|
this.onDark = false;
|
|
4362
4658
|
this.showTriggerBorders = true;
|
|
@@ -4452,6 +4748,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4452
4748
|
this.floater.showBib();
|
|
4453
4749
|
}
|
|
4454
4750
|
|
|
4751
|
+
/**
|
|
4752
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4753
|
+
* If not, trigger element will get focus.
|
|
4754
|
+
*/
|
|
4755
|
+
focus() {
|
|
4756
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4757
|
+
this.focusTrap.focusFirstElement();
|
|
4758
|
+
} else {
|
|
4759
|
+
this.trigger.focus();
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
|
|
4455
4763
|
// function to define props used within the scope of this component
|
|
4456
4764
|
static get properties() {
|
|
4457
4765
|
return {
|
|
@@ -4465,6 +4773,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4465
4773
|
reflect: true
|
|
4466
4774
|
},
|
|
4467
4775
|
|
|
4776
|
+
/**
|
|
4777
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4778
|
+
* @default false
|
|
4779
|
+
*/
|
|
4780
|
+
disableEventShow: {
|
|
4781
|
+
type: Boolean,
|
|
4782
|
+
reflect: true
|
|
4783
|
+
},
|
|
4784
|
+
|
|
4468
4785
|
/**
|
|
4469
4786
|
* If declared, applies a border around the trigger slot.
|
|
4470
4787
|
*/
|
|
@@ -4483,17 +4800,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4483
4800
|
},
|
|
4484
4801
|
|
|
4485
4802
|
/**
|
|
4486
|
-
* If declared, the dropdown
|
|
4803
|
+
* If declared, the dropdown is not interactive.
|
|
4487
4804
|
*/
|
|
4488
|
-
|
|
4805
|
+
disabled: {
|
|
4489
4806
|
type: Boolean,
|
|
4490
4807
|
reflect: true
|
|
4491
4808
|
},
|
|
4492
4809
|
|
|
4493
4810
|
/**
|
|
4494
|
-
* If declared, the
|
|
4811
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4495
4812
|
*/
|
|
4496
|
-
|
|
4813
|
+
disableFocusTrap: {
|
|
4497
4814
|
type: Boolean,
|
|
4498
4815
|
reflect: true
|
|
4499
4816
|
},
|
|
@@ -4538,27 +4855,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4538
4855
|
reflect: true
|
|
4539
4856
|
},
|
|
4540
4857
|
|
|
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
4858
|
/**
|
|
4558
4859
|
* If true, the dropdown bib is displayed.
|
|
4559
4860
|
*/
|
|
4560
4861
|
isPopoverVisible: {
|
|
4561
|
-
type: Boolean
|
|
4862
|
+
type: Boolean,
|
|
4863
|
+
reflect: true,
|
|
4864
|
+
attribute: 'open'
|
|
4562
4865
|
},
|
|
4563
4866
|
|
|
4564
4867
|
/**
|
|
@@ -4597,15 +4900,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4597
4900
|
reflect: true
|
|
4598
4901
|
},
|
|
4599
4902
|
|
|
4600
|
-
/**
|
|
4601
|
-
* Defines if there is a label preset.
|
|
4602
|
-
* @private
|
|
4603
|
-
*/
|
|
4604
|
-
labeled: {
|
|
4605
|
-
type: Boolean,
|
|
4606
|
-
reflect: true
|
|
4607
|
-
},
|
|
4608
|
-
|
|
4609
4903
|
/**
|
|
4610
4904
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4611
4905
|
* @private
|
|
@@ -4666,6 +4960,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4666
4960
|
reflect: true
|
|
4667
4961
|
},
|
|
4668
4962
|
|
|
4963
|
+
/**
|
|
4964
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4965
|
+
*/
|
|
4669
4966
|
onSlotChange: {
|
|
4670
4967
|
type: Function,
|
|
4671
4968
|
reflect: false
|
|
@@ -4680,14 +4977,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4680
4977
|
reflect: true
|
|
4681
4978
|
},
|
|
4682
4979
|
|
|
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
4980
|
/**
|
|
4692
4981
|
* @private
|
|
4693
4982
|
*/
|
|
@@ -4702,22 +4991,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4702
4991
|
type: String || undefined,
|
|
4703
4992
|
attribute: false,
|
|
4704
4993
|
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
4994
|
}
|
|
4714
4995
|
};
|
|
4715
4996
|
}
|
|
4716
4997
|
|
|
4717
4998
|
static get styles() {
|
|
4718
4999
|
return [
|
|
5000
|
+
styleCss$1$2,
|
|
5001
|
+
tokensCss$1$2,
|
|
4719
5002
|
colorCss$1$2,
|
|
4720
|
-
tokensCss$1$1,
|
|
4721
5003
|
|
|
4722
5004
|
// default layout
|
|
4723
5005
|
classicColorCss,
|
|
@@ -4779,13 +5061,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4779
5061
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4780
5062
|
this.handleTriggerContentSlotChange();
|
|
4781
5063
|
}
|
|
5064
|
+
}
|
|
4782
5065
|
|
|
5066
|
+
/**
|
|
5067
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
5068
|
+
* @private
|
|
5069
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
5070
|
+
*/
|
|
5071
|
+
handleDropdownToggle(event) {
|
|
5072
|
+
this.updateFocusTrap();
|
|
5073
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
5074
|
+
const eventType = event.detail.eventType || "unknown";
|
|
5075
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5076
|
+
this.trigger.focus();
|
|
5077
|
+
}
|
|
4783
5078
|
}
|
|
4784
5079
|
|
|
4785
5080
|
firstUpdated() {
|
|
4786
5081
|
|
|
4787
5082
|
// Configure the floater to, this will generate the ID for the bib
|
|
4788
5083
|
this.floater.configure(this, 'auroDropdown');
|
|
5084
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4789
5085
|
|
|
4790
5086
|
/**
|
|
4791
5087
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4803,6 +5099,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4803
5099
|
|
|
4804
5100
|
// Add the tag name as an attribute if it is different than the component name
|
|
4805
5101
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
5102
|
+
|
|
5103
|
+
this.trigger.addEventListener('click', () => {
|
|
5104
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
5105
|
+
bubbles: true,
|
|
5106
|
+
composed: true
|
|
5107
|
+
}));
|
|
5108
|
+
});
|
|
4806
5109
|
}
|
|
4807
5110
|
|
|
4808
5111
|
/**
|
|
@@ -4846,70 +5149,33 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4846
5149
|
}
|
|
4847
5150
|
|
|
4848
5151
|
/**
|
|
4849
|
-
* Function to support @focusout event.
|
|
4850
5152
|
* @private
|
|
4851
|
-
* @return {void}
|
|
4852
5153
|
*/
|
|
4853
|
-
|
|
4854
|
-
|
|
5154
|
+
updateFocusTrap() {
|
|
5155
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5156
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5157
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5158
|
+
this.focusTrap.focusFirstElement();
|
|
5159
|
+
return;
|
|
5160
|
+
}
|
|
5161
|
+
|
|
5162
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5163
|
+
if (!this.focusTrap) {
|
|
5164
|
+
return;
|
|
5165
|
+
}
|
|
5166
|
+
|
|
5167
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5168
|
+
this.focusTrap.disconnect();
|
|
5169
|
+
this.focusTrap = undefined;
|
|
4855
5170
|
}
|
|
4856
5171
|
|
|
4857
5172
|
/**
|
|
4858
|
-
*
|
|
5173
|
+
* Function to support @focusout event.
|
|
4859
5174
|
* @private
|
|
4860
|
-
* @
|
|
4861
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
5175
|
+
* @return {void}
|
|
4862
5176
|
*/
|
|
4863
|
-
|
|
4864
|
-
this.
|
|
4865
|
-
|
|
4866
|
-
const nodes = [
|
|
4867
|
-
element,
|
|
4868
|
-
...element.children
|
|
4869
|
-
];
|
|
4870
|
-
|
|
4871
|
-
const focusableElements = [
|
|
4872
|
-
'a',
|
|
4873
|
-
'auro-hyperlink',
|
|
4874
|
-
'button',
|
|
4875
|
-
'auro-button',
|
|
4876
|
-
'input',
|
|
4877
|
-
'auro-input',
|
|
4878
|
-
];
|
|
4879
|
-
|
|
4880
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4881
|
-
|
|
4882
|
-
const result = nodes.some((node) => {
|
|
4883
|
-
const tagName = node.tagName.toLowerCase();
|
|
4884
|
-
|
|
4885
|
-
if (node.tabIndex > -1) {
|
|
4886
|
-
return true;
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
if (focusableElements.includes(tagName)) {
|
|
4890
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4891
|
-
return true;
|
|
4892
|
-
}
|
|
4893
|
-
if (!node.hasAttribute('disabled')) {
|
|
4894
|
-
return true;
|
|
4895
|
-
}
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4899
|
-
return true;
|
|
4900
|
-
}
|
|
4901
|
-
|
|
4902
|
-
return false;
|
|
4903
|
-
});
|
|
4904
|
-
|
|
4905
|
-
if (result) {
|
|
4906
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4907
|
-
const tagName = node.tagName.toLowerCase();
|
|
4908
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4909
|
-
});
|
|
4910
|
-
}
|
|
4911
|
-
|
|
4912
|
-
return result;
|
|
5177
|
+
handleFocusout() {
|
|
5178
|
+
this.hasFocus = false;
|
|
4913
5179
|
}
|
|
4914
5180
|
|
|
4915
5181
|
/**
|
|
@@ -5005,14 +5271,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5005
5271
|
* @returns {void}
|
|
5006
5272
|
*/
|
|
5007
5273
|
handleTriggerContentSlotChange(event) {
|
|
5008
|
-
|
|
5009
5274
|
this.floater.handleTriggerTabIndex();
|
|
5010
5275
|
|
|
5011
5276
|
// Get the trigger
|
|
5012
5277
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5013
5278
|
|
|
5014
5279
|
// Get the trigger slot
|
|
5015
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5280
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
5016
5281
|
|
|
5017
5282
|
// If there's a trigger slot
|
|
5018
5283
|
if (triggerSlot) {
|
|
@@ -5024,7 +5289,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5024
5289
|
if (triggerContentNodes) {
|
|
5025
5290
|
|
|
5026
5291
|
// See if any of them are focusable elements
|
|
5027
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5292
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5028
5293
|
|
|
5029
5294
|
// If any of them are focusable elements
|
|
5030
5295
|
if (this.triggerContentFocusable) {
|
|
@@ -5084,29 +5349,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5084
5349
|
}
|
|
5085
5350
|
}
|
|
5086
5351
|
|
|
5087
|
-
/**
|
|
5088
|
-
* @private
|
|
5089
|
-
* @method handleLabelSlotChange
|
|
5090
|
-
* @param {event} event - The event object representing the slot change.
|
|
5091
|
-
* @description Handles the slot change event for the label slot.
|
|
5092
|
-
*/
|
|
5093
|
-
handleLabelSlotChange (event) {
|
|
5094
|
-
|
|
5095
|
-
// Get the nodes from the event
|
|
5096
|
-
const nodes = event.target.assignedNodes();
|
|
5097
|
-
|
|
5098
|
-
// Guard clause for no nodes
|
|
5099
|
-
if (!nodes) {
|
|
5100
|
-
return;
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
5104
|
-
const nodesArr = Array.from(nodes);
|
|
5105
|
-
|
|
5106
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
5107
|
-
this.labeled = nodesArr.length > 0;
|
|
5108
|
-
}
|
|
5109
|
-
|
|
5110
5352
|
/**
|
|
5111
5353
|
* Returns HTML for the common portion of the layouts.
|
|
5112
5354
|
* @private
|
|
@@ -5119,24 +5361,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5119
5361
|
<div
|
|
5120
5362
|
id="trigger"
|
|
5121
5363
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5122
|
-
tabindex="${this.tabIndex}"
|
|
5364
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5123
5365
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5124
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5125
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5366
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5367
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5126
5368
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5127
5369
|
@focusin="${this.handleFocusin}"
|
|
5128
5370
|
@blur="${this.handleFocusOut}">
|
|
5129
|
-
<div class="triggerContentWrapper">
|
|
5130
|
-
<
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
<div class="triggerContent">
|
|
5134
|
-
<slot
|
|
5135
|
-
name="trigger"
|
|
5136
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5137
|
-
</div>
|
|
5371
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5372
|
+
<slot
|
|
5373
|
+
name="trigger"
|
|
5374
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5138
5375
|
</div>
|
|
5139
|
-
${this.chevron
|
|
5376
|
+
${this.chevron ? u`
|
|
5140
5377
|
<div
|
|
5141
5378
|
id="showStateIcon"
|
|
5142
5379
|
class="chevron"
|
|
@@ -5157,11 +5394,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5157
5394
|
<div id="bibSizer" part="size"></div>
|
|
5158
5395
|
<${this.dropdownBibTag}
|
|
5159
5396
|
id="bib"
|
|
5397
|
+
shape="${this.shape}"
|
|
5160
5398
|
?data-show="${this.isPopoverVisible}"
|
|
5161
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5162
|
-
?common="${this.common}"
|
|
5163
|
-
?rounded="${this.common || this.rounded}"
|
|
5164
|
-
?inset="${this.common || this.inset}">
|
|
5399
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5165
5400
|
<div class="slotContent">
|
|
5166
5401
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5167
5402
|
</div>
|
|
@@ -5176,62 +5411,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5176
5411
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5177
5412
|
*/
|
|
5178
5413
|
renderLayoutClassic() {
|
|
5414
|
+
// TODO: check with Doug why this was never used?
|
|
5415
|
+
const helpTextClasses = {
|
|
5416
|
+
'helpText': true
|
|
5417
|
+
};
|
|
5179
5418
|
|
|
5180
5419
|
return u`
|
|
5181
|
-
|
|
5182
|
-
<div
|
|
5183
|
-
id="trigger"
|
|
5184
|
-
class="trigger"
|
|
5185
|
-
part="trigger"
|
|
5186
|
-
tabindex="${this.tabIndex}"
|
|
5187
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5188
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5189
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5190
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5191
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5192
|
-
>
|
|
5193
|
-
<div class="triggerContentWrapper">
|
|
5194
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5195
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5196
|
-
</label>
|
|
5197
|
-
<div class="triggerContent">
|
|
5198
|
-
<slot
|
|
5199
|
-
name="trigger"
|
|
5200
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5201
|
-
</div>
|
|
5202
|
-
</div>
|
|
5203
|
-
${this.chevron || this.common ? u`
|
|
5204
|
-
<div
|
|
5205
|
-
id="showStateIcon"
|
|
5206
|
-
part="chevron">
|
|
5207
|
-
<${this.iconTag}
|
|
5208
|
-
category="interface"
|
|
5209
|
-
name="chevron-down"
|
|
5210
|
-
?onDark="${this.onDark}"
|
|
5211
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5212
|
-
>
|
|
5213
|
-
</${this.iconTag}>
|
|
5214
|
-
</div>
|
|
5215
|
-
` : undefined }
|
|
5216
|
-
</div>
|
|
5217
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5218
|
-
<slot name="helpText"></slot>
|
|
5219
|
-
</${this.helpTextTag}>
|
|
5220
|
-
|
|
5221
|
-
<div id="bibSizer" part="size"></div>
|
|
5222
|
-
<${this.dropdownBibTag}
|
|
5223
|
-
id="bib"
|
|
5224
|
-
?data-show="${this.isPopoverVisible}"
|
|
5225
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5226
|
-
?common="${this.common}"
|
|
5227
|
-
?rounded="${this.common || this.rounded}"
|
|
5228
|
-
?inset="${this.common || this.inset}"
|
|
5229
|
-
>
|
|
5230
|
-
<div class="slotContent">
|
|
5231
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5232
|
-
</div>
|
|
5233
|
-
</${this.dropdownBibTag}>
|
|
5234
|
-
</div>
|
|
5420
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5235
5421
|
`;
|
|
5236
5422
|
}
|
|
5237
5423
|
|
|
@@ -5299,9 +5485,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5299
5485
|
|
|
5300
5486
|
var dropdownVersion = '3.0.0';
|
|
5301
5487
|
|
|
5302
|
-
var colorCss$
|
|
5488
|
+
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)}`;
|
|
5303
5489
|
|
|
5304
|
-
var styleCss$
|
|
5490
|
+
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)}`;
|
|
5305
5491
|
|
|
5306
5492
|
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)}`;
|
|
5307
5493
|
|
|
@@ -5312,7 +5498,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5312
5498
|
|
|
5313
5499
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5314
5500
|
|
|
5315
|
-
let AuroLibraryRuntimeUtils$
|
|
5501
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5316
5502
|
|
|
5317
5503
|
/* eslint-disable jsdoc/require-param */
|
|
5318
5504
|
|
|
@@ -5344,77 +5530,1171 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
5344
5530
|
) {
|
|
5345
5531
|
return __Closest(base);
|
|
5346
5532
|
}
|
|
5347
|
-
/* eslint-enable jsdoc/require-param */
|
|
5533
|
+
/* eslint-enable jsdoc/require-param */
|
|
5534
|
+
|
|
5535
|
+
/**
|
|
5536
|
+
* 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.
|
|
5537
|
+
* @param {Object} elem - The element to check.
|
|
5538
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5539
|
+
* @returns {void}
|
|
5540
|
+
*/
|
|
5541
|
+
handleComponentTagRename(elem, tagName) {
|
|
5542
|
+
const tag = tagName.toLowerCase();
|
|
5543
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5544
|
+
|
|
5545
|
+
if (elemTag !== tag) {
|
|
5546
|
+
elem.setAttribute(tag, true);
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5550
|
+
/**
|
|
5551
|
+
* Validates if an element is a specific Auro component.
|
|
5552
|
+
* @param {Object} elem - The element to validate.
|
|
5553
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5554
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5555
|
+
*/
|
|
5556
|
+
elementMatch(elem, tagName) {
|
|
5557
|
+
const tag = tagName.toLowerCase();
|
|
5558
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5559
|
+
|
|
5560
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5561
|
+
}
|
|
5562
|
+
};
|
|
5563
|
+
|
|
5564
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5565
|
+
// See LICENSE in the project root for license information.
|
|
5566
|
+
|
|
5567
|
+
|
|
5568
|
+
class AuroDependencyVersioning {
|
|
5569
|
+
|
|
5570
|
+
/**
|
|
5571
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5572
|
+
* @private
|
|
5573
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5574
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5575
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5576
|
+
*/
|
|
5577
|
+
generateElementName(baseName, version) {
|
|
5578
|
+
let result = baseName;
|
|
5579
|
+
|
|
5580
|
+
result += '-';
|
|
5581
|
+
result += version.replace(/[.]/g, '_');
|
|
5582
|
+
|
|
5583
|
+
return result;
|
|
5584
|
+
}
|
|
5585
|
+
|
|
5586
|
+
/**
|
|
5587
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5588
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5589
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5590
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5591
|
+
*/
|
|
5592
|
+
generateTag(baseName, version, tagClass) {
|
|
5593
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5594
|
+
const tag = i`${s(elementName)}`;
|
|
5595
|
+
|
|
5596
|
+
if (!customElements.get(elementName)) {
|
|
5597
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
return tag;
|
|
5601
|
+
}
|
|
5602
|
+
}
|
|
5603
|
+
|
|
5604
|
+
/**
|
|
5605
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5606
|
+
*/
|
|
5607
|
+
const _observers = new WeakMap();
|
|
5608
|
+
|
|
5609
|
+
/**
|
|
5610
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5611
|
+
* Structure: {
|
|
5612
|
+
* host: {
|
|
5613
|
+
* matchers: Set<Function>,
|
|
5614
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5615
|
+
* }
|
|
5616
|
+
* }
|
|
5617
|
+
*/
|
|
5618
|
+
const _transportConfig = new WeakMap();
|
|
5619
|
+
|
|
5620
|
+
/**
|
|
5621
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5622
|
+
*
|
|
5623
|
+
* @param {Object} params - The parameters for the function.
|
|
5624
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5625
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5626
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5627
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5628
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5629
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5630
|
+
*/
|
|
5631
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5632
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5633
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5634
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5635
|
+
}
|
|
5636
|
+
|
|
5637
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5638
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5639
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5640
|
+
}
|
|
5641
|
+
|
|
5642
|
+
// Guard Clause: Ensure match is a function
|
|
5643
|
+
if (typeof match !== 'function') {
|
|
5644
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5645
|
+
}
|
|
5646
|
+
|
|
5647
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5648
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5649
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
// Register this transport and get cleanup function
|
|
5653
|
+
return _registerTransport({
|
|
5654
|
+
host,
|
|
5655
|
+
target,
|
|
5656
|
+
matcher: match,
|
|
5657
|
+
removeOriginal
|
|
5658
|
+
});
|
|
5659
|
+
};
|
|
5660
|
+
|
|
5661
|
+
/**
|
|
5662
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5663
|
+
*
|
|
5664
|
+
* @param {Object} params - The parameters object.
|
|
5665
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5666
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5667
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5668
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5669
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5670
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5671
|
+
* @private
|
|
5672
|
+
*/
|
|
5673
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5674
|
+
// Initialize config for this host if it doesn't exist
|
|
5675
|
+
if (!_transportConfig.has(host)) {
|
|
5676
|
+
_transportConfig.set(host, {
|
|
5677
|
+
matchers: new Set(),
|
|
5678
|
+
targets: new Map()
|
|
5679
|
+
});
|
|
5680
|
+
}
|
|
5681
|
+
|
|
5682
|
+
const config = _transportConfig.get(host);
|
|
5683
|
+
|
|
5684
|
+
// Add the matcher to the set of matchers for this host
|
|
5685
|
+
config.matchers.add(matcher);
|
|
5686
|
+
|
|
5687
|
+
// Initialize target entry if it doesn't exist
|
|
5688
|
+
if (!config.targets.has(target)) {
|
|
5689
|
+
config.targets.set(target, new Map());
|
|
5690
|
+
}
|
|
5691
|
+
|
|
5692
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5693
|
+
config.targets.get(target).set(matcher, {
|
|
5694
|
+
removeOriginal,
|
|
5695
|
+
currentAttributes: new Map()
|
|
5696
|
+
});
|
|
5697
|
+
|
|
5698
|
+
// Perform initial attribute transport
|
|
5699
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5700
|
+
|
|
5701
|
+
// Attach observer
|
|
5702
|
+
_attachObserver(host);
|
|
5703
|
+
|
|
5704
|
+
// Return cleanup function and utility functions
|
|
5705
|
+
return {
|
|
5706
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5707
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5708
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5709
|
+
}
|
|
5710
|
+
};
|
|
5711
|
+
|
|
5712
|
+
/**
|
|
5713
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5714
|
+
*
|
|
5715
|
+
* @param {HTMLElement} host - The host element
|
|
5716
|
+
* @param {HTMLElement} target - The target element
|
|
5717
|
+
* @param {Function} matcher - The matcher function
|
|
5718
|
+
* @private
|
|
5719
|
+
*/
|
|
5720
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5721
|
+
const config = _transportConfig.get(host);
|
|
5722
|
+
if (!config) return;
|
|
5723
|
+
|
|
5724
|
+
// Remove this matcher from this target
|
|
5725
|
+
const targetMatchers = config.targets.get(target);
|
|
5726
|
+
if (targetMatchers) {
|
|
5727
|
+
targetMatchers.delete(matcher);
|
|
5728
|
+
|
|
5729
|
+
// If this target has no more matchers, remove it
|
|
5730
|
+
if (targetMatchers.size === 0) {
|
|
5731
|
+
config.targets.delete(target);
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
|
|
5735
|
+
// Check if this matcher is still used by any target
|
|
5736
|
+
let matcherStillUsed = false;
|
|
5737
|
+
for (const matcherMap of config.targets.values()) {
|
|
5738
|
+
if (matcherMap.has(matcher)) {
|
|
5739
|
+
matcherStillUsed = true;
|
|
5740
|
+
break;
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
// If not used anymore, remove from matchers set
|
|
5745
|
+
if (!matcherStillUsed) {
|
|
5746
|
+
config.matchers.delete(matcher);
|
|
5747
|
+
}
|
|
5748
|
+
|
|
5749
|
+
// If no more targets or matchers, detach observer
|
|
5750
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5751
|
+
_detachObserver(host);
|
|
5752
|
+
}
|
|
5753
|
+
};
|
|
5754
|
+
|
|
5755
|
+
/**
|
|
5756
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5757
|
+
*
|
|
5758
|
+
* @param {Object} params - The parameters object.
|
|
5759
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5760
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5761
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5762
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5763
|
+
* @returns {void}
|
|
5764
|
+
* @private
|
|
5765
|
+
*/
|
|
5766
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5767
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5768
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5769
|
+
.filter(attr => matcher(attr))
|
|
5770
|
+
.reduce((acc, attr) => {
|
|
5771
|
+
acc[attr] = host.getAttribute(attr);
|
|
5772
|
+
return acc;
|
|
5773
|
+
}, {});
|
|
5774
|
+
|
|
5775
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5776
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5777
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5778
|
+
target.setAttribute(key, value);
|
|
5779
|
+
if (removeOriginal) {
|
|
5780
|
+
host.removeAttribute(key);
|
|
5781
|
+
}
|
|
5782
|
+
});
|
|
5783
|
+
};
|
|
5784
|
+
|
|
5785
|
+
/**
|
|
5786
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5787
|
+
*
|
|
5788
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5789
|
+
* @returns {MutationObserver} The observer instance.
|
|
5790
|
+
* @private
|
|
5791
|
+
*/
|
|
5792
|
+
const _attachObserver = (host) => {
|
|
5793
|
+
// If an observer for this host already exists, return it
|
|
5794
|
+
if (_observers.has(host)) {
|
|
5795
|
+
return _observers.get(host);
|
|
5796
|
+
}
|
|
5797
|
+
|
|
5798
|
+
// Create a new MutationObserver
|
|
5799
|
+
const observer = new MutationObserver((mutations) => {
|
|
5800
|
+
const config = _transportConfig.get(host);
|
|
5801
|
+
if (!config) return;
|
|
5802
|
+
|
|
5803
|
+
// For each mutation affecting attributes
|
|
5804
|
+
mutations
|
|
5805
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5806
|
+
.forEach(mutation => {
|
|
5807
|
+
const attributeName = mutation.attributeName;
|
|
5808
|
+
|
|
5809
|
+
// Find matchers that care about this attribute
|
|
5810
|
+
for (const matcher of config.matchers) {
|
|
5811
|
+
if (matcher(attributeName)) {
|
|
5812
|
+
// For each target that uses this matcher
|
|
5813
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5814
|
+
if (matcherConfigs.has(matcher)) {
|
|
5815
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5816
|
+
_transportAttributes({
|
|
5817
|
+
host,
|
|
5818
|
+
target,
|
|
5819
|
+
matcher,
|
|
5820
|
+
removeOriginal
|
|
5821
|
+
});
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
});
|
|
5827
|
+
});
|
|
5828
|
+
|
|
5829
|
+
// Start observing attribute changes
|
|
5830
|
+
observer.observe(host, { attributes: true });
|
|
5831
|
+
|
|
5832
|
+
// Store the observer
|
|
5833
|
+
_observers.set(host, observer);
|
|
5834
|
+
|
|
5835
|
+
return observer;
|
|
5836
|
+
};
|
|
5837
|
+
|
|
5838
|
+
/**
|
|
5839
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5840
|
+
*
|
|
5841
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5842
|
+
* @private
|
|
5843
|
+
*/
|
|
5844
|
+
const _detachObserver = (host) => {
|
|
5845
|
+
if (_observers.has(host)) {
|
|
5846
|
+
const observer = _observers.get(host);
|
|
5847
|
+
observer.disconnect();
|
|
5848
|
+
_observers.delete(host);
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5851
|
+
// Clean up the transport config as well
|
|
5852
|
+
if (_transportConfig.has(host)) {
|
|
5853
|
+
_transportConfig.delete(host);
|
|
5854
|
+
}
|
|
5855
|
+
};
|
|
5856
|
+
|
|
5857
|
+
/**
|
|
5858
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5859
|
+
* @param {HTMLElement} host - The host element
|
|
5860
|
+
* @param {HTMLElement} target - The target element
|
|
5861
|
+
* @param {Function} matcher - The matcher function
|
|
5862
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5863
|
+
* @private
|
|
5864
|
+
*/
|
|
5865
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5866
|
+
const config = _transportConfig.get(host);
|
|
5867
|
+
if (!config) return undefined;
|
|
5868
|
+
|
|
5869
|
+
const targetMatchers = config.targets.get(target);
|
|
5870
|
+
if (!targetMatchers) return undefined;
|
|
5871
|
+
|
|
5872
|
+
return targetMatchers.get(matcher);
|
|
5873
|
+
};
|
|
5874
|
+
|
|
5875
|
+
/**
|
|
5876
|
+
* Sets an observed attribute value
|
|
5877
|
+
* @param {HTMLElement} host - The host element
|
|
5878
|
+
* @param {HTMLElement} target - The target element
|
|
5879
|
+
* @param {Function} matcher - The matcher function
|
|
5880
|
+
* @param {string} key - The attribute name
|
|
5881
|
+
* @param {string} value - The attribute value
|
|
5882
|
+
* @private
|
|
5883
|
+
*/
|
|
5884
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5885
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5886
|
+
if (matcherConfig) {
|
|
5887
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5888
|
+
}
|
|
5889
|
+
};
|
|
5890
|
+
|
|
5891
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5892
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5893
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5894
|
+
return undefined;
|
|
5895
|
+
};
|
|
5896
|
+
|
|
5897
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5898
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5899
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5900
|
+
return [];
|
|
5901
|
+
};
|
|
5902
|
+
|
|
5903
|
+
const _matchers = {
|
|
5904
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5905
|
+
'role': attr => attr.match(/^role$/)
|
|
5906
|
+
};
|
|
5907
|
+
|
|
5908
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5909
|
+
return transportAttributes({
|
|
5910
|
+
host,
|
|
5911
|
+
target,
|
|
5912
|
+
match: attr => {
|
|
5913
|
+
for (const key in _matchers) {
|
|
5914
|
+
if (_matchers[key](attr)) return true;
|
|
5915
|
+
}
|
|
5916
|
+
return false;
|
|
5917
|
+
},
|
|
5918
|
+
removeOriginal
|
|
5919
|
+
});
|
|
5920
|
+
};
|
|
5921
|
+
|
|
5922
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5923
|
+
|
|
5924
|
+
/**
|
|
5925
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5926
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5927
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5928
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5929
|
+
* @private
|
|
5930
|
+
*/
|
|
5931
|
+
attributeWatcher;
|
|
5932
|
+
|
|
5933
|
+
static get properties() {
|
|
5934
|
+
return {
|
|
5935
|
+
|
|
5936
|
+
/**
|
|
5937
|
+
* Defines the layout of an element.
|
|
5938
|
+
* @default {'default'}
|
|
5939
|
+
*/
|
|
5940
|
+
layout: {
|
|
5941
|
+
type: String,
|
|
5942
|
+
attribute: "layout",
|
|
5943
|
+
reflect: true
|
|
5944
|
+
},
|
|
5945
|
+
|
|
5946
|
+
/**
|
|
5947
|
+
* Defines the shape of an element.
|
|
5948
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5949
|
+
* @default {'default'}
|
|
5950
|
+
*/
|
|
5951
|
+
shape: {
|
|
5952
|
+
type: String,
|
|
5953
|
+
attribute: "shape",
|
|
5954
|
+
reflect: true
|
|
5955
|
+
},
|
|
5956
|
+
|
|
5957
|
+
/**
|
|
5958
|
+
* Defines the size of an element.
|
|
5959
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5960
|
+
* @default {'md'}
|
|
5961
|
+
*/
|
|
5962
|
+
size: {
|
|
5963
|
+
type: String,
|
|
5964
|
+
attribute: "size",
|
|
5965
|
+
reflect: true
|
|
5966
|
+
},
|
|
5967
|
+
|
|
5968
|
+
/**
|
|
5969
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5970
|
+
* @default {false}
|
|
5971
|
+
*/
|
|
5972
|
+
onDark: {
|
|
5973
|
+
type: Boolean,
|
|
5974
|
+
attribute: "ondark",
|
|
5975
|
+
reflect: true
|
|
5976
|
+
},
|
|
5977
|
+
|
|
5978
|
+
/**
|
|
5979
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5980
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5981
|
+
* @type {HTMLElement|null}
|
|
5982
|
+
* @default {null}
|
|
5983
|
+
* @private
|
|
5984
|
+
*/
|
|
5985
|
+
wrapper: {
|
|
5986
|
+
attribute: false,
|
|
5987
|
+
reflect: false
|
|
5988
|
+
}
|
|
5989
|
+
};
|
|
5990
|
+
}
|
|
5991
|
+
|
|
5992
|
+
|
|
5993
|
+
|
|
5994
|
+
resetShapeClasses() {
|
|
5995
|
+
if (this.shape && this.size) {
|
|
5996
|
+
|
|
5997
|
+
if (this.wrapper) {
|
|
5998
|
+
this.wrapper.classList.forEach((className) => {
|
|
5999
|
+
if (className.startsWith('shape-')) {
|
|
6000
|
+
this.wrapper.classList.remove(className);
|
|
6001
|
+
}
|
|
6002
|
+
});
|
|
6003
|
+
|
|
6004
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6005
|
+
}
|
|
6006
|
+
}
|
|
6007
|
+
}
|
|
6008
|
+
|
|
6009
|
+
resetLayoutClasses() {
|
|
6010
|
+
if (this.layout) {
|
|
6011
|
+
if (this.wrapper) {
|
|
6012
|
+
this.wrapper.classList.forEach((className) => {
|
|
6013
|
+
if (className.startsWith('layout-')) {
|
|
6014
|
+
this.wrapper.classList.remove(className);
|
|
6015
|
+
}
|
|
6016
|
+
});
|
|
6017
|
+
|
|
6018
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
6021
|
+
}
|
|
6022
|
+
|
|
6023
|
+
updateComponentArchitecture() {
|
|
6024
|
+
this.resetLayoutClasses();
|
|
6025
|
+
this.resetShapeClasses();
|
|
6026
|
+
}
|
|
6027
|
+
|
|
6028
|
+
updated(changedProperties) {
|
|
6029
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6030
|
+
this.updateComponentArchitecture();
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
|
|
6034
|
+
firstUpdated() {
|
|
6035
|
+
super.firstUpdated();
|
|
6036
|
+
|
|
6037
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6038
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6039
|
+
|
|
6040
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6041
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6042
|
+
}
|
|
6043
|
+
|
|
6044
|
+
disconnectedCallback() {
|
|
6045
|
+
super.disconnectedCallback();
|
|
6046
|
+
|
|
6047
|
+
// Cleanup the ARIA observer if it exists
|
|
6048
|
+
if (this.attributeWatcher) {
|
|
6049
|
+
this.attributeWatcher.cleanup();
|
|
6050
|
+
this.attributeWatcher = null;
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
|
|
6054
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6055
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6056
|
+
render() {
|
|
6057
|
+
try {
|
|
6058
|
+
return this.renderLayout();
|
|
6059
|
+
} catch (error) {
|
|
6060
|
+
// failed to get the defined layout
|
|
6061
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6062
|
+
|
|
6063
|
+
// fallback to the default layout
|
|
6064
|
+
return this.getLayout('default');
|
|
6065
|
+
}
|
|
6066
|
+
}
|
|
6067
|
+
};
|
|
6068
|
+
|
|
6069
|
+
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}`;
|
|
6070
|
+
|
|
6071
|
+
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)}`;
|
|
6072
|
+
|
|
6073
|
+
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}`;
|
|
6074
|
+
|
|
6075
|
+
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}`;
|
|
6076
|
+
|
|
6077
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6078
|
+
// See LICENSE in the project root for license information.
|
|
6079
|
+
|
|
6080
|
+
// ---------------------------------------------------------------------
|
|
6081
|
+
|
|
6082
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6083
|
+
|
|
6084
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
6085
|
+
|
|
6086
|
+
/* eslint-disable jsdoc/require-param */
|
|
6087
|
+
|
|
6088
|
+
/**
|
|
6089
|
+
* This will register a new custom element with the browser.
|
|
6090
|
+
* @param {String} name - The name of the custom element.
|
|
6091
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6092
|
+
* @returns {void}
|
|
6093
|
+
*/
|
|
6094
|
+
registerComponent(name, componentClass) {
|
|
6095
|
+
if (!customElements.get(name)) {
|
|
6096
|
+
customElements.define(name, class extends componentClass {});
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
|
|
6100
|
+
/**
|
|
6101
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6102
|
+
* @returns {void}
|
|
6103
|
+
*/
|
|
6104
|
+
closestElement(
|
|
6105
|
+
selector, // selector like in .closest()
|
|
6106
|
+
base = this, // extra functionality to skip a parent
|
|
6107
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6108
|
+
!el || el === document || el === window
|
|
6109
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6110
|
+
: found
|
|
6111
|
+
? found // found a selector INside this element
|
|
6112
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6113
|
+
) {
|
|
6114
|
+
return __Closest(base);
|
|
6115
|
+
}
|
|
6116
|
+
/* eslint-enable jsdoc/require-param */
|
|
6117
|
+
|
|
6118
|
+
/**
|
|
6119
|
+
* 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.
|
|
6120
|
+
* @param {Object} elem - The element to check.
|
|
6121
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6122
|
+
* @returns {void}
|
|
6123
|
+
*/
|
|
6124
|
+
handleComponentTagRename(elem, tagName) {
|
|
6125
|
+
const tag = tagName.toLowerCase();
|
|
6126
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6127
|
+
|
|
6128
|
+
if (elemTag !== tag) {
|
|
6129
|
+
elem.setAttribute(tag, true);
|
|
6130
|
+
}
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
/**
|
|
6134
|
+
* Validates if an element is a specific Auro component.
|
|
6135
|
+
* @param {Object} elem - The element to validate.
|
|
6136
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6137
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6138
|
+
*/
|
|
6139
|
+
elementMatch(elem, tagName) {
|
|
6140
|
+
const tag = tagName.toLowerCase();
|
|
6141
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6142
|
+
|
|
6143
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6144
|
+
}
|
|
6145
|
+
};
|
|
6146
|
+
|
|
6147
|
+
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}}`;
|
|
6148
|
+
|
|
6149
|
+
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}`;
|
|
6150
|
+
|
|
6151
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6152
|
+
|
|
6153
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6154
|
+
// See LICENSE in the project root for license information.
|
|
6155
|
+
|
|
6156
|
+
|
|
6157
|
+
class AuroLoader extends i$2 {
|
|
6158
|
+
constructor() {
|
|
6159
|
+
super();
|
|
6160
|
+
|
|
6161
|
+
/**
|
|
6162
|
+
* @private
|
|
6163
|
+
*/
|
|
6164
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6165
|
+
|
|
6166
|
+
/**
|
|
6167
|
+
* @private
|
|
6168
|
+
*/
|
|
6169
|
+
this.mdCount = 3;
|
|
6170
|
+
|
|
6171
|
+
/**
|
|
6172
|
+
* @private
|
|
6173
|
+
*/
|
|
6174
|
+
this.smCount = 2;
|
|
6175
|
+
|
|
6176
|
+
/**
|
|
6177
|
+
* @private
|
|
6178
|
+
*/
|
|
6179
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
6180
|
+
|
|
6181
|
+
this.orbit = false;
|
|
6182
|
+
this.ringworm = false;
|
|
6183
|
+
this.laser = false;
|
|
6184
|
+
this.pulse = false;
|
|
6185
|
+
}
|
|
6186
|
+
|
|
6187
|
+
// function to define props used within the scope of this component
|
|
6188
|
+
static get properties() {
|
|
6189
|
+
return {
|
|
6190
|
+
|
|
6191
|
+
/**
|
|
6192
|
+
* Sets loader to laser type.
|
|
6193
|
+
*/
|
|
6194
|
+
laser: {
|
|
6195
|
+
type: Boolean,
|
|
6196
|
+
reflect: true
|
|
6197
|
+
},
|
|
6198
|
+
|
|
6199
|
+
/**
|
|
6200
|
+
* Sets loader to orbit type.
|
|
6201
|
+
*/
|
|
6202
|
+
orbit: {
|
|
6203
|
+
type: Boolean,
|
|
6204
|
+
reflect: true
|
|
6205
|
+
},
|
|
6206
|
+
|
|
6207
|
+
/**
|
|
6208
|
+
* Sets loader to pulse type.
|
|
6209
|
+
*/
|
|
6210
|
+
pulse: {
|
|
6211
|
+
type: Boolean,
|
|
6212
|
+
reflect: true
|
|
6213
|
+
},
|
|
6214
|
+
|
|
6215
|
+
/**
|
|
6216
|
+
* Sets loader to ringworm type.
|
|
6217
|
+
*/
|
|
6218
|
+
ringworm: {
|
|
6219
|
+
type: Boolean,
|
|
6220
|
+
reflect: true
|
|
6221
|
+
}
|
|
6222
|
+
};
|
|
6223
|
+
}
|
|
6224
|
+
|
|
6225
|
+
static get styles() {
|
|
6226
|
+
return [
|
|
6227
|
+
i$5`${styleCss$2$1}`,
|
|
6228
|
+
i$5`${colorCss$1$1}`,
|
|
6229
|
+
i$5`${tokensCss$1$1}`
|
|
6230
|
+
];
|
|
6231
|
+
}
|
|
6232
|
+
|
|
6233
|
+
/**
|
|
6234
|
+
* This will register this element with the browser.
|
|
6235
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6236
|
+
*
|
|
6237
|
+
* @example
|
|
6238
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6239
|
+
*
|
|
6240
|
+
*/
|
|
6241
|
+
static register(name = "auro-loader") {
|
|
6242
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroLoader);
|
|
6243
|
+
}
|
|
6244
|
+
|
|
6245
|
+
firstUpdated() {
|
|
6246
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6247
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6248
|
+
}
|
|
6249
|
+
|
|
6250
|
+
connectedCallback() {
|
|
6251
|
+
super.connectedCallback();
|
|
6252
|
+
}
|
|
6253
|
+
|
|
6254
|
+
/**
|
|
6255
|
+
* @private
|
|
6256
|
+
* @returns {Array} Numbered array for template map.
|
|
6257
|
+
*/
|
|
6258
|
+
defineTemplate() {
|
|
6259
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6260
|
+
|
|
6261
|
+
if (this.orbit || this.laser) {
|
|
6262
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6263
|
+
} else if (this.ringworm) {
|
|
6264
|
+
nodes = Array.from(Array(0).keys());
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
return nodes;
|
|
6268
|
+
}
|
|
6269
|
+
|
|
6270
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6271
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6272
|
+
|
|
6273
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6274
|
+
render() {
|
|
6275
|
+
return x`
|
|
6276
|
+
${this.defineTemplate().map((idx) => x`
|
|
6277
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6278
|
+
`)}
|
|
6279
|
+
|
|
6280
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6281
|
+
|
|
6282
|
+
${this.ringworm ? x`
|
|
6283
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6284
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6285
|
+
</svg>`
|
|
6286
|
+
: ``
|
|
6287
|
+
}
|
|
6288
|
+
`;
|
|
6289
|
+
}
|
|
6290
|
+
}
|
|
6291
|
+
|
|
6292
|
+
var loaderVersion = '5.1.0';
|
|
6293
|
+
|
|
6294
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6295
|
+
// See LICENSE in the project root for license information.
|
|
6296
|
+
|
|
6297
|
+
|
|
6298
|
+
/**
|
|
6299
|
+
* @slot - Default slot for the text of the button.
|
|
6300
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6301
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6302
|
+
* @csspart text - Apply CSS to text slot.
|
|
6303
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6304
|
+
*/
|
|
6305
|
+
|
|
6306
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6307
|
+
|
|
6308
|
+
/**
|
|
6309
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6310
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6311
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6312
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6313
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6314
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6315
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6316
|
+
*/
|
|
6317
|
+
class AuroButton extends AuroElement$1 {
|
|
6318
|
+
|
|
6319
|
+
/**
|
|
6320
|
+
* Enables form association for this element.
|
|
6321
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6322
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6323
|
+
*/
|
|
6324
|
+
static get formAssociated() {
|
|
6325
|
+
return true;
|
|
6326
|
+
}
|
|
6327
|
+
|
|
6328
|
+
constructor() {
|
|
6329
|
+
super();
|
|
6330
|
+
this.autofocus = false;
|
|
6331
|
+
this.disabled = false;
|
|
6332
|
+
this.loading = false;
|
|
6333
|
+
this.size = "md";
|
|
6334
|
+
this.shape = "rounded";
|
|
6335
|
+
this.onDark = false;
|
|
6336
|
+
this.fluid = false;
|
|
6337
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6338
|
+
this.variant = 'primary';
|
|
6339
|
+
|
|
6340
|
+
// Support for HTML5 forms
|
|
6341
|
+
if (typeof this.attachInternals === 'function') {
|
|
6342
|
+
this.internals = this.attachInternals();
|
|
6343
|
+
} else {
|
|
6344
|
+
this.internals = null;
|
|
6345
|
+
|
|
6346
|
+
// eslint-disable-next-line no-console
|
|
6347
|
+
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.');
|
|
6348
|
+
}
|
|
6349
|
+
|
|
6350
|
+
/**
|
|
6351
|
+
* Generate unique names for dependency components.
|
|
6352
|
+
*/
|
|
6353
|
+
const versioning = new AuroDependencyVersioning();
|
|
6354
|
+
|
|
6355
|
+
/**
|
|
6356
|
+
* @private
|
|
6357
|
+
*/
|
|
6358
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6359
|
+
|
|
6360
|
+
/**
|
|
6361
|
+
* @private
|
|
6362
|
+
*/
|
|
6363
|
+
this.buttonHref = undefined;
|
|
6364
|
+
|
|
6365
|
+
/**
|
|
6366
|
+
* @private
|
|
6367
|
+
*/
|
|
6368
|
+
this.buttonTarget = undefined;
|
|
6369
|
+
|
|
6370
|
+
/**
|
|
6371
|
+
* @private
|
|
6372
|
+
*/
|
|
6373
|
+
this.buttonRel = undefined;
|
|
6374
|
+
}
|
|
6375
|
+
|
|
6376
|
+
static get styles() {
|
|
6377
|
+
return [
|
|
6378
|
+
tokensCss$2$1,
|
|
6379
|
+
styleCss$3$1,
|
|
6380
|
+
colorCss$2$1,
|
|
6381
|
+
shapeSize
|
|
6382
|
+
];
|
|
6383
|
+
}
|
|
6384
|
+
|
|
6385
|
+
static get properties() {
|
|
6386
|
+
return {
|
|
6387
|
+
|
|
6388
|
+
...super.properties,
|
|
6389
|
+
|
|
6390
|
+
/**
|
|
6391
|
+
* Override layout since it isn't used in this component.
|
|
6392
|
+
* @private
|
|
6393
|
+
*/
|
|
6394
|
+
layout: {
|
|
6395
|
+
type: Boolean,
|
|
6396
|
+
attribute: false,
|
|
6397
|
+
reflect: false
|
|
6398
|
+
},
|
|
6399
|
+
|
|
6400
|
+
/**
|
|
6401
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6402
|
+
*/
|
|
6403
|
+
autofocus: {
|
|
6404
|
+
type: Boolean,
|
|
6405
|
+
reflect: true
|
|
6406
|
+
},
|
|
6407
|
+
|
|
6408
|
+
/**
|
|
6409
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6410
|
+
*/
|
|
6411
|
+
disabled: {
|
|
6412
|
+
type: Boolean,
|
|
6413
|
+
reflect: true
|
|
6414
|
+
},
|
|
6415
|
+
|
|
6416
|
+
/**
|
|
6417
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6418
|
+
*/
|
|
6419
|
+
fluid: {
|
|
6420
|
+
type: Boolean,
|
|
6421
|
+
reflect: true
|
|
6422
|
+
},
|
|
6423
|
+
|
|
6424
|
+
/**
|
|
6425
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6426
|
+
*/
|
|
6427
|
+
loading: {
|
|
6428
|
+
type: Boolean,
|
|
6429
|
+
reflect: true
|
|
6430
|
+
},
|
|
6431
|
+
|
|
6432
|
+
/**
|
|
6433
|
+
* 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.
|
|
6434
|
+
*/
|
|
6435
|
+
loadingText: {
|
|
6436
|
+
type: String
|
|
6437
|
+
},
|
|
6438
|
+
|
|
6439
|
+
/**
|
|
6440
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6441
|
+
*/
|
|
6442
|
+
tIndex: {
|
|
6443
|
+
type: String,
|
|
6444
|
+
reflect: true
|
|
6445
|
+
},
|
|
6446
|
+
|
|
6447
|
+
/**
|
|
6448
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6449
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6450
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6451
|
+
*/
|
|
6452
|
+
tabindex: {
|
|
6453
|
+
type: String,
|
|
6454
|
+
reflect: false
|
|
6455
|
+
},
|
|
6456
|
+
|
|
6457
|
+
/**
|
|
6458
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6459
|
+
*/
|
|
6460
|
+
title: {
|
|
6461
|
+
type: String,
|
|
6462
|
+
reflect: true
|
|
6463
|
+
},
|
|
6464
|
+
|
|
6465
|
+
/**
|
|
6466
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6467
|
+
*/
|
|
6468
|
+
type: {
|
|
6469
|
+
type: String,
|
|
6470
|
+
reflect: true
|
|
6471
|
+
},
|
|
6472
|
+
|
|
6473
|
+
/**
|
|
6474
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6475
|
+
*/
|
|
6476
|
+
value: {
|
|
6477
|
+
type: String,
|
|
6478
|
+
reflect: true
|
|
6479
|
+
},
|
|
6480
|
+
|
|
6481
|
+
/**
|
|
6482
|
+
* Sets button variant option.
|
|
6483
|
+
* @default primary
|
|
6484
|
+
*/
|
|
6485
|
+
variant: {
|
|
6486
|
+
type: String,
|
|
6487
|
+
reflect: true
|
|
6488
|
+
},
|
|
6489
|
+
|
|
6490
|
+
/**
|
|
6491
|
+
* @private
|
|
6492
|
+
*/
|
|
6493
|
+
buttonHref: {
|
|
6494
|
+
type: String,
|
|
6495
|
+
},
|
|
6496
|
+
|
|
6497
|
+
/**
|
|
6498
|
+
* @private
|
|
6499
|
+
*/
|
|
6500
|
+
buttonTarget: {
|
|
6501
|
+
type: String,
|
|
6502
|
+
},
|
|
6503
|
+
|
|
6504
|
+
/**
|
|
6505
|
+
* @private
|
|
6506
|
+
*/
|
|
6507
|
+
buttonRel: {
|
|
6508
|
+
type: String,
|
|
6509
|
+
},
|
|
6510
|
+
};
|
|
6511
|
+
}
|
|
6512
|
+
|
|
6513
|
+
/**
|
|
6514
|
+
* This will register this element with the browser.
|
|
6515
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6516
|
+
*
|
|
6517
|
+
* @example
|
|
6518
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6519
|
+
*
|
|
6520
|
+
*/
|
|
6521
|
+
static register(name = "auro-button") {
|
|
6522
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
6523
|
+
}
|
|
6524
|
+
|
|
6525
|
+
/**
|
|
6526
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6527
|
+
* @private
|
|
6528
|
+
* @returns {void}
|
|
6529
|
+
*/
|
|
6530
|
+
focus() {
|
|
6531
|
+
this.renderRoot.querySelector('button').focus();
|
|
6532
|
+
}
|
|
6533
|
+
|
|
6534
|
+
/**
|
|
6535
|
+
* Submits the form that this button is associated with.
|
|
6536
|
+
* @private
|
|
6537
|
+
* @returns {void}
|
|
6538
|
+
*/
|
|
6539
|
+
surfaceSubmitEvent() {
|
|
6540
|
+
if (this.form) {
|
|
6541
|
+
this.form.requestSubmit();
|
|
6542
|
+
}
|
|
6543
|
+
}
|
|
5348
6544
|
|
|
5349
6545
|
/**
|
|
5350
|
-
*
|
|
5351
|
-
* @
|
|
5352
|
-
* @
|
|
5353
|
-
* @returns {void}
|
|
6546
|
+
* Returns the form element that this button is associated with.
|
|
6547
|
+
* @private
|
|
6548
|
+
* @returns {HTMLFormElement | null}
|
|
5354
6549
|
*/
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
6550
|
+
get form() {
|
|
6551
|
+
return this.internals ? this.internals.form : null;
|
|
6552
|
+
}
|
|
5358
6553
|
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
6554
|
+
/**
|
|
6555
|
+
* @private
|
|
6556
|
+
* @returns {Boolean}
|
|
6557
|
+
*/
|
|
6558
|
+
get showText() {
|
|
6559
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
5362
6560
|
}
|
|
5363
6561
|
|
|
5364
6562
|
/**
|
|
5365
|
-
*
|
|
5366
|
-
* @
|
|
5367
|
-
* @
|
|
5368
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6563
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6564
|
+
* @returns {string | undefined}
|
|
6565
|
+
* @private
|
|
5369
6566
|
*/
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6567
|
+
get currentAriaLabel() {
|
|
6568
|
+
if (!this.attributeWatcher) return undefined;
|
|
5373
6569
|
|
|
5374
|
-
|
|
6570
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6571
|
+
return ariaLabel || undefined;
|
|
5375
6572
|
}
|
|
5376
|
-
};
|
|
5377
6573
|
|
|
5378
|
-
|
|
5379
|
-
|
|
6574
|
+
/**
|
|
6575
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6576
|
+
* @returns {string | undefined}
|
|
6577
|
+
* @private
|
|
6578
|
+
*/
|
|
6579
|
+
get currentAriaLabelledBy() {
|
|
6580
|
+
if (!this.attributeWatcher) return undefined;
|
|
5380
6581
|
|
|
6582
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6583
|
+
return ariaLabelledBy || undefined;
|
|
6584
|
+
}
|
|
5381
6585
|
|
|
5382
|
-
|
|
6586
|
+
/**
|
|
6587
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6588
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6589
|
+
* @private
|
|
6590
|
+
*/
|
|
6591
|
+
get iconOnly() {
|
|
6592
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6593
|
+
}
|
|
5383
6594
|
|
|
5384
6595
|
/**
|
|
5385
|
-
*
|
|
6596
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6597
|
+
* @returns {string} - The font size class name.
|
|
5386
6598
|
* @private
|
|
5387
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5388
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5389
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5390
6599
|
*/
|
|
5391
|
-
|
|
5392
|
-
let result = baseName;
|
|
6600
|
+
getFontSize() {
|
|
5393
6601
|
|
|
5394
|
-
|
|
5395
|
-
|
|
6602
|
+
// Size map for standard buttons
|
|
6603
|
+
const standardButtonSizeMap = {
|
|
6604
|
+
xs: 'body-xs',
|
|
6605
|
+
sm: 'body-sm',
|
|
6606
|
+
md: 'body-default',
|
|
6607
|
+
lg: 'body-lg',
|
|
6608
|
+
xl: 'body-lg'
|
|
6609
|
+
};
|
|
5396
6610
|
|
|
5397
|
-
|
|
6611
|
+
// Size map for icon-only buttons
|
|
6612
|
+
const iconOnlyButtonSizeMap = {
|
|
6613
|
+
xs: 'heading-xs',
|
|
6614
|
+
sm: 'heading-sm',
|
|
6615
|
+
md: 'heading-sm',
|
|
6616
|
+
lg: 'heading-md',
|
|
6617
|
+
xl: 'heading-lg'
|
|
6618
|
+
};
|
|
6619
|
+
|
|
6620
|
+
// Determine which map to use based on the shape
|
|
6621
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6622
|
+
|
|
6623
|
+
// Return the font size based on the button size and shape
|
|
6624
|
+
return sizeMap[this.size] || 'body-default';
|
|
5398
6625
|
}
|
|
5399
6626
|
|
|
5400
6627
|
/**
|
|
5401
|
-
*
|
|
5402
|
-
* @
|
|
5403
|
-
* @
|
|
5404
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6628
|
+
* Renders the default layout for the button.
|
|
6629
|
+
* @returns {TemplateResult}
|
|
6630
|
+
* @private
|
|
5405
6631
|
*/
|
|
5406
|
-
|
|
5407
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5408
|
-
const tag = i`${s(elementName)}`;
|
|
6632
|
+
renderLayoutDefault() {
|
|
5409
6633
|
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
6634
|
+
const fontSize = this.getFontSize();
|
|
6635
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6636
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5413
6637
|
|
|
5414
|
-
|
|
6638
|
+
const classes = {
|
|
6639
|
+
"auro-button": true,
|
|
6640
|
+
"inset": this.showText,
|
|
6641
|
+
wrapper: true,
|
|
6642
|
+
loading: this.loading,
|
|
6643
|
+
[`${fontSize}`]: true,
|
|
6644
|
+
|
|
6645
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6646
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6647
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6648
|
+
};
|
|
6649
|
+
|
|
6650
|
+
const contentClasses = {
|
|
6651
|
+
"contentWrapper": true,
|
|
6652
|
+
"util_displayHiddenVisually": this.loading
|
|
6653
|
+
};
|
|
6654
|
+
|
|
6655
|
+
return u`
|
|
6656
|
+
<${tag}
|
|
6657
|
+
part="${part}"
|
|
6658
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6659
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6660
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6661
|
+
?autofocus="${this.autofocus}"
|
|
6662
|
+
class=${e(classes)}
|
|
6663
|
+
?disabled="${this.disabled || this.loading}"
|
|
6664
|
+
?onDark="${this.onDark}"
|
|
6665
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6666
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6667
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6668
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6669
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6670
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6671
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6672
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6673
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6674
|
+
>
|
|
6675
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6676
|
+
|
|
6677
|
+
<span class="${e(contentClasses)}">
|
|
6678
|
+
<span class="textSlot" part="text">
|
|
6679
|
+
<slot></slot>
|
|
6680
|
+
</span>
|
|
6681
|
+
</span>
|
|
6682
|
+
</${tag}>
|
|
6683
|
+
`;
|
|
6684
|
+
}
|
|
6685
|
+
|
|
6686
|
+
/**
|
|
6687
|
+
* Renders the layout of the button.
|
|
6688
|
+
* @returns {TemplateResult}
|
|
6689
|
+
* @private
|
|
6690
|
+
*/
|
|
6691
|
+
renderLayout() {
|
|
6692
|
+
return this.renderLayoutDefault();
|
|
5415
6693
|
}
|
|
5416
6694
|
}
|
|
5417
6695
|
|
|
6696
|
+
var buttonVersion = '11.3.0';
|
|
6697
|
+
|
|
5418
6698
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5419
6699
|
// See LICENSE in the project root for license information.
|
|
5420
6700
|
|
|
@@ -5425,7 +6705,7 @@ class AuroDependencyVersioning {
|
|
|
5425
6705
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5426
6706
|
*/
|
|
5427
6707
|
|
|
5428
|
-
let AuroElement$
|
|
6708
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
5429
6709
|
|
|
5430
6710
|
// function to define props used within the scope of this component
|
|
5431
6711
|
static get properties() {
|
|
@@ -5493,7 +6773,7 @@ var styleCss$1$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
5493
6773
|
*/
|
|
5494
6774
|
|
|
5495
6775
|
// build the component class
|
|
5496
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
6776
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
5497
6777
|
constructor() {
|
|
5498
6778
|
super();
|
|
5499
6779
|
this.onDark = false;
|
|
@@ -5576,7 +6856,7 @@ var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5576
6856
|
|
|
5577
6857
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5578
6858
|
|
|
5579
|
-
let AuroLibraryRuntimeUtils$
|
|
6859
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5580
6860
|
|
|
5581
6861
|
/* eslint-disable jsdoc/require-param */
|
|
5582
6862
|
|
|
@@ -5658,7 +6938,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5658
6938
|
*/
|
|
5659
6939
|
privateDefaults() {
|
|
5660
6940
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5661
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6941
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
5662
6942
|
}
|
|
5663
6943
|
|
|
5664
6944
|
// function to define props used within the scope of this component
|
|
@@ -5686,7 +6966,8 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5686
6966
|
* Allows custom color to be set.
|
|
5687
6967
|
*/
|
|
5688
6968
|
customColor: {
|
|
5689
|
-
type: Boolean
|
|
6969
|
+
type: Boolean,
|
|
6970
|
+
reflect: true
|
|
5690
6971
|
},
|
|
5691
6972
|
|
|
5692
6973
|
/**
|
|
@@ -5740,7 +7021,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5740
7021
|
*
|
|
5741
7022
|
*/
|
|
5742
7023
|
static register(name = "auro-icon") {
|
|
5743
|
-
AuroLibraryRuntimeUtils$
|
|
7024
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroIcon);
|
|
5744
7025
|
}
|
|
5745
7026
|
|
|
5746
7027
|
connectedCallback() {
|
|
@@ -5761,8 +7042,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5761
7042
|
async firstUpdated() {
|
|
5762
7043
|
await super.firstUpdated();
|
|
5763
7044
|
|
|
5764
|
-
|
|
5765
|
-
|
|
7045
|
+
/**
|
|
7046
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
7047
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
7048
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
7049
|
+
*/
|
|
7050
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5766
7051
|
const svgDesc = this.svg.querySelector('desc');
|
|
5767
7052
|
|
|
5768
7053
|
if (svgDesc) {
|
|
@@ -5806,9 +7091,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5806
7091
|
}
|
|
5807
7092
|
};
|
|
5808
7093
|
|
|
5809
|
-
var iconVersion$1 = '8.
|
|
7094
|
+
var iconVersion$1 = '8.1.1';
|
|
5810
7095
|
|
|
5811
|
-
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)}`;
|
|
7096
|
+
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)}`;
|
|
5812
7097
|
|
|
5813
7098
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5814
7099
|
// See LICENSE in the project root for license information.
|
|
@@ -5818,13 +7103,12 @@ var styleCss$5 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-head
|
|
|
5818
7103
|
* The auro-header component is a custom element to make using headers with the Auro Design System seamless and easy.
|
|
5819
7104
|
*
|
|
5820
7105
|
* @attr {Boolean} no-margin-block - if declared, margin-block will be set to `0`
|
|
5821
|
-
* @attr {String} level - Determines heading level for HTML element. Options are `1` - `6`
|
|
5822
|
-
* @attr {String} display - Determines presentation of header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
5823
7106
|
* @attr {String} color - Allows user to pass in CSS custom property or direct hex value to change the color of the header
|
|
7107
|
+
* @attr {String} display - Determines the visual appearance of the header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
7108
|
+
* @attr {String} level - Determines the semantic heading level of the HTML element. Options are `1` - `6`
|
|
5824
7109
|
* @attr {String} margin - Specify the margin(s) to be altered. Options are `top`, `bottom`, or `both`.
|
|
5825
7110
|
* @attr {String} size - Specify size of margin adjustment, either `none`, `25`, `50`, `100`, `150`, `200`, `300`, `400`, `600` or `800`.
|
|
5826
7111
|
*/
|
|
5827
|
-
|
|
5828
7112
|
/* eslint complexity: ["error", 21] */
|
|
5829
7113
|
|
|
5830
7114
|
// build the component class
|
|
@@ -5837,7 +7121,7 @@ class AuroHeader extends i$2 {
|
|
|
5837
7121
|
/**
|
|
5838
7122
|
* @private
|
|
5839
7123
|
*/
|
|
5840
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7124
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5841
7125
|
}
|
|
5842
7126
|
|
|
5843
7127
|
// function to define props used within the scope of this component
|
|
@@ -5858,6 +7142,22 @@ class AuroHeader extends i$2 {
|
|
|
5858
7142
|
return [styleCss$5];
|
|
5859
7143
|
}
|
|
5860
7144
|
|
|
7145
|
+
/**
|
|
7146
|
+
* Mapping of display values to their corresponding CSS classes
|
|
7147
|
+
* @private
|
|
7148
|
+
*/
|
|
7149
|
+
static get displayClassMap() {
|
|
7150
|
+
return {
|
|
7151
|
+
'display': 'heading-xl',
|
|
7152
|
+
'800': 'heading-xl',
|
|
7153
|
+
'700': 'heading-lg',
|
|
7154
|
+
'600': 'heading-md',
|
|
7155
|
+
'500': 'heading-sm',
|
|
7156
|
+
'400': 'heading-xs',
|
|
7157
|
+
'300': 'heading-2xs'
|
|
7158
|
+
};
|
|
7159
|
+
}
|
|
7160
|
+
|
|
5861
7161
|
/**
|
|
5862
7162
|
* This will register this element with the browser.
|
|
5863
7163
|
* @param {string} [name="auro-header"] - The name of element that you want to register to.
|
|
@@ -5867,7 +7167,7 @@ class AuroHeader extends i$2 {
|
|
|
5867
7167
|
*
|
|
5868
7168
|
*/
|
|
5869
7169
|
static register(name = "auro-header") {
|
|
5870
|
-
AuroLibraryRuntimeUtils$
|
|
7170
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHeader);
|
|
5871
7171
|
}
|
|
5872
7172
|
|
|
5873
7173
|
firstUpdated() {
|
|
@@ -5934,23 +7234,42 @@ class AuroHeader extends i$2 {
|
|
|
5934
7234
|
this.display = 'display';
|
|
5935
7235
|
}
|
|
5936
7236
|
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
7237
|
+
const headingLevel = level || '1';
|
|
7238
|
+
const spacingClasses = this.spacingDecision(this.size);
|
|
7239
|
+
|
|
7240
|
+
// Get the CSS class based on the display prop
|
|
7241
|
+
const headingClass = AuroHeader.displayClassMap[this.display];
|
|
7242
|
+
|
|
7243
|
+
const classObject = {
|
|
7244
|
+
'heading': true,
|
|
7245
|
+
[`heading--${this.display}`]: true,
|
|
7246
|
+
[headingClass]: true
|
|
7247
|
+
};
|
|
7248
|
+
|
|
7249
|
+
// Add spacing classes to the class object if they exist
|
|
7250
|
+
if (spacingClasses) {
|
|
7251
|
+
const spacingClassArray = spacingClasses.split(' ');
|
|
7252
|
+
spacingClassArray.forEach(cls => {
|
|
7253
|
+
if (cls.trim()) {
|
|
7254
|
+
classObject[cls.trim()] = true;
|
|
7255
|
+
}
|
|
7256
|
+
});
|
|
5944
7257
|
}
|
|
7258
|
+
|
|
7259
|
+
const headerClasses = e(classObject);
|
|
7260
|
+
|
|
7261
|
+
// unsafeStatic dynamically creates tag names at runtime
|
|
7262
|
+
const tag = s(`h${headingLevel}`);
|
|
7263
|
+
return u`<${tag} class="${headerClasses}" style="color: ${o(this.color ? this.color : undefined)}"><slot></slot></${tag}>`;
|
|
5945
7264
|
}
|
|
7265
|
+
|
|
5946
7266
|
// function that renders the HTML and CSS into the scope of the component
|
|
5947
|
-
|
|
5948
7267
|
render() {
|
|
5949
7268
|
return this.template(this.level);
|
|
5950
7269
|
}
|
|
5951
7270
|
}
|
|
5952
7271
|
|
|
5953
|
-
var headerVersion = '4.0.
|
|
7272
|
+
var headerVersion = '4.0.2';
|
|
5954
7273
|
|
|
5955
7274
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5956
7275
|
// See LICENSE in the project root for license information.
|
|
@@ -5963,17 +7282,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
5963
7282
|
|
|
5964
7283
|
this.large = false;
|
|
5965
7284
|
|
|
5966
|
-
AuroLibraryRuntimeUtils$
|
|
7285
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5967
7286
|
|
|
5968
7287
|
const versioning = new AuroDependencyVersioning();
|
|
7288
|
+
|
|
7289
|
+
/**
|
|
7290
|
+
* @private
|
|
7291
|
+
*/
|
|
5969
7292
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
7293
|
+
|
|
7294
|
+
/**
|
|
7295
|
+
* @private
|
|
7296
|
+
*/
|
|
5970
7297
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7298
|
+
|
|
7299
|
+
/**
|
|
7300
|
+
* @private
|
|
7301
|
+
*/
|
|
7302
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5971
7303
|
}
|
|
5972
7304
|
|
|
5973
7305
|
static get styles() {
|
|
5974
7306
|
return [
|
|
5975
|
-
colorCss$
|
|
5976
|
-
styleCss$
|
|
7307
|
+
colorCss$3$1,
|
|
7308
|
+
styleCss$4$1,
|
|
5977
7309
|
tokenCss
|
|
5978
7310
|
];
|
|
5979
7311
|
}
|
|
@@ -6002,7 +7334,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6002
7334
|
*
|
|
6003
7335
|
*/
|
|
6004
7336
|
static register(name = "auro-bibtemplate") {
|
|
6005
|
-
AuroLibraryRuntimeUtils$
|
|
7337
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
6006
7338
|
}
|
|
6007
7339
|
|
|
6008
7340
|
/**
|
|
@@ -6060,13 +7392,16 @@ class AuroBibtemplate extends i$2 {
|
|
|
6060
7392
|
<div id="bibTemplate" part="bibtemplate">
|
|
6061
7393
|
${this.isFullscreen ? u`
|
|
6062
7394
|
<div id="headerContainer">
|
|
6063
|
-
<
|
|
6064
|
-
<${this.
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
7395
|
+
<div class="titleRow">
|
|
7396
|
+
<${this.headerTag} class="header" display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7397
|
+
<slot name="header"></slot>
|
|
7398
|
+
</${this.headerTag}>
|
|
7399
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7400
|
+
<span><slot name="ariaLabel.close">Close</slot></span>
|
|
7401
|
+
<${this.iconTag} aria-hidden="true" category="interface" name="x-lg"></${this.iconTag}>
|
|
7402
|
+
</${this.buttonTag}>
|
|
7403
|
+
</div>
|
|
7404
|
+
<span class="subheader">
|
|
6070
7405
|
<slot name="subheader"></slot>
|
|
6071
7406
|
</span>
|
|
6072
7407
|
</div>` : null}
|
|
@@ -6088,7 +7423,7 @@ var bibTemplateVersion = '1.0.0';
|
|
|
6088
7423
|
|
|
6089
7424
|
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6090
7425
|
|
|
6091
|
-
var styleCss$4 = i$5`.
|
|
7426
|
+
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}`;
|
|
6092
7427
|
|
|
6093
7428
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6094
7429
|
|
|
@@ -6168,8 +7503,6 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
6168
7503
|
|
|
6169
7504
|
/**
|
|
6170
7505
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6171
|
-
*
|
|
6172
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6173
7506
|
*/
|
|
6174
7507
|
class AuroHelpText extends i$2 {
|
|
6175
7508
|
|
|
@@ -6285,7 +7618,7 @@ class AuroHelpText extends i$2 {
|
|
|
6285
7618
|
// function that renders the HTML and CSS into the scope of the component
|
|
6286
7619
|
render() {
|
|
6287
7620
|
return x`
|
|
6288
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7621
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6289
7622
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6290
7623
|
</div>
|
|
6291
7624
|
`;
|
|
@@ -6294,68 +7627,7 @@ class AuroHelpText extends i$2 {
|
|
|
6294
7627
|
|
|
6295
7628
|
var helpTextVersion = '1.0.0';
|
|
6296
7629
|
|
|
6297
|
-
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)}`;
|
|
6298
|
-
|
|
6299
|
-
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)}`;
|
|
6300
|
-
|
|
6301
|
-
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)}`;
|
|
6302
|
-
|
|
6303
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6304
|
-
// See LICENSE in the project root for license information.
|
|
6305
|
-
|
|
6306
|
-
// ---------------------------------------------------------------------
|
|
6307
|
-
|
|
6308
|
-
/**
|
|
6309
|
-
* Converts value to an array.
|
|
6310
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6311
|
-
* If the value is already an array, it is returned.
|
|
6312
|
-
* If the value is undefined, it returns undefined.
|
|
6313
|
-
* @private
|
|
6314
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6315
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6316
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6317
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6318
|
-
*/
|
|
6319
|
-
function arrayConverter(value) {
|
|
6320
|
-
// Allow undefined
|
|
6321
|
-
if (value === undefined) {
|
|
6322
|
-
return undefined;
|
|
6323
|
-
}
|
|
6324
|
-
|
|
6325
|
-
// Return the value if it is already an array
|
|
6326
|
-
if (Array.isArray(value)) {
|
|
6327
|
-
return value;
|
|
6328
|
-
}
|
|
6329
|
-
|
|
6330
|
-
try {
|
|
6331
|
-
// If value is a JSON string, parse it
|
|
6332
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6333
|
-
|
|
6334
|
-
// Check if the parsed value is an array
|
|
6335
|
-
if (Array.isArray(parsed)) {
|
|
6336
|
-
return parsed;
|
|
6337
|
-
}
|
|
6338
|
-
} catch (error) {
|
|
6339
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6340
|
-
/* eslint-disable no-console */
|
|
6341
|
-
console.error('JSON parsing failed:', error);
|
|
6342
|
-
}
|
|
6343
|
-
|
|
6344
|
-
// Throw error if the input is not an array or undefined
|
|
6345
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6346
|
-
}
|
|
6347
|
-
|
|
6348
|
-
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}`;
|
|
6349
|
-
|
|
6350
|
-
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)}`;
|
|
6351
|
-
|
|
6352
|
-
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}`;
|
|
6353
|
-
|
|
6354
|
-
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)}`;
|
|
6355
|
-
|
|
6356
|
-
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)}`;
|
|
6357
|
-
|
|
6358
|
-
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: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:8px}.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;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;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}`;
|
|
7630
|
+
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}label{color:var(--ds-auro-select-label-text-color)}: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([fluid]){width:100%}: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}`;
|
|
6359
7631
|
|
|
6360
7632
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6361
7633
|
// See LICENSE in the project root for license information.
|
|
@@ -6366,19 +7638,25 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6366
7638
|
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
6367
7639
|
*
|
|
6368
7640
|
* @slot - Default slot for the menu content.
|
|
7641
|
+
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
6369
7642
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6370
7643
|
* @slot label - Defines the content of the label.
|
|
7644
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6371
7645
|
* @slot helpText - Defines the content of the helpText.
|
|
6372
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6373
7646
|
* @slot valueText - Dropdown value text display.
|
|
7647
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6374
7648
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6375
7649
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6376
7650
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
7651
|
+
*
|
|
7652
|
+
* @csspart dropdownTrigger - Apply CSS to the trigger content container.
|
|
7653
|
+
* @csspart dropdownChevron - Apply CSS to the collapsed/expanded state icon container.
|
|
7654
|
+
* @csspart dropdownSize - Apply size styles to the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
6377
7655
|
* @csspart helpText - Apply CSS to the help text.
|
|
6378
7656
|
*/
|
|
6379
7657
|
|
|
6380
7658
|
// build the component class
|
|
6381
|
-
class AuroSelect extends AuroElement$
|
|
7659
|
+
class AuroSelect extends AuroElement$4 {
|
|
6382
7660
|
constructor() {
|
|
6383
7661
|
super();
|
|
6384
7662
|
|
|
@@ -6388,12 +7666,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6388
7666
|
const idSubstrEnd = 8;
|
|
6389
7667
|
const idSubstrStart = 2;
|
|
6390
7668
|
|
|
6391
|
-
this.matchWidth =
|
|
6392
|
-
|
|
6393
|
-
// Layout Config
|
|
6394
|
-
this.layout = 'classic';
|
|
6395
|
-
this.shape = 'classic';
|
|
6396
|
-
this.size = 'xl';
|
|
7669
|
+
this.matchWidth = false;
|
|
6397
7670
|
|
|
6398
7671
|
// floaterConfig
|
|
6399
7672
|
this.placement = 'bottom-start';
|
|
@@ -6418,7 +7691,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6418
7691
|
/**
|
|
6419
7692
|
* @private
|
|
6420
7693
|
*/
|
|
6421
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7694
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
6422
7695
|
|
|
6423
7696
|
/**
|
|
6424
7697
|
* Generate unique names for dependency components.
|
|
@@ -6468,6 +7741,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6468
7741
|
this.fullscreenBreakpoint = 'sm';
|
|
6469
7742
|
this.onDark = false;
|
|
6470
7743
|
this.isPopoverVisible = false;
|
|
7744
|
+
|
|
7745
|
+
// Layout Config
|
|
7746
|
+
this.layout = 'classic';
|
|
7747
|
+
this.shape = 'classic';
|
|
7748
|
+
this.size = 'lg';
|
|
6471
7749
|
}
|
|
6472
7750
|
|
|
6473
7751
|
// This function is to define props used within the scope of this component
|
|
@@ -6509,6 +7787,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6509
7787
|
reflect: true
|
|
6510
7788
|
},
|
|
6511
7789
|
|
|
7790
|
+
/**
|
|
7791
|
+
* When attribute is present, element will be 100% width of container element.
|
|
7792
|
+
*/
|
|
7793
|
+
fluid: {
|
|
7794
|
+
type: Boolean,
|
|
7795
|
+
reflect: true
|
|
7796
|
+
},
|
|
7797
|
+
|
|
6512
7798
|
/**
|
|
6513
7799
|
* @private
|
|
6514
7800
|
*/
|
|
@@ -6533,14 +7819,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6533
7819
|
reflect: true
|
|
6534
7820
|
},
|
|
6535
7821
|
|
|
6536
|
-
/**
|
|
6537
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6538
|
-
*/
|
|
6539
|
-
flexMenuWidth: {
|
|
6540
|
-
type: Boolean,
|
|
6541
|
-
reflect: true
|
|
6542
|
-
},
|
|
6543
|
-
|
|
6544
7822
|
/**
|
|
6545
7823
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6546
7824
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6634,7 +7912,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6634
7912
|
* "top" | "right" | "bottom" | "left" |
|
|
6635
7913
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6636
7914
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6637
|
-
* "left-start" | "left-end"
|
|
7915
|
+
* "left-start" | "left-end".
|
|
6638
7916
|
* @default bottom-start
|
|
6639
7917
|
*/
|
|
6640
7918
|
placement: {
|
|
@@ -6642,6 +7920,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6642
7920
|
reflect: true
|
|
6643
7921
|
},
|
|
6644
7922
|
|
|
7923
|
+
/**
|
|
7924
|
+
* Define custom placeholder text.
|
|
7925
|
+
*/
|
|
7926
|
+
placeholder: {
|
|
7927
|
+
type: String,
|
|
7928
|
+
reflect: true
|
|
7929
|
+
},
|
|
7930
|
+
|
|
6645
7931
|
/**
|
|
6646
7932
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6647
7933
|
*/
|
|
@@ -6688,11 +7974,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6688
7974
|
},
|
|
6689
7975
|
|
|
6690
7976
|
/**
|
|
6691
|
-
* Value selected for the component.
|
|
6692
|
-
* @type {String|Array<String>}
|
|
7977
|
+
* Value selected for the component.
|
|
6693
7978
|
*/
|
|
6694
7979
|
value: {
|
|
6695
|
-
type:
|
|
7980
|
+
type: String,
|
|
7981
|
+
reflect: true,
|
|
7982
|
+
attribute: 'value'
|
|
6696
7983
|
},
|
|
6697
7984
|
|
|
6698
7985
|
/**
|
|
@@ -6745,14 +8032,76 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6745
8032
|
}
|
|
6746
8033
|
|
|
6747
8034
|
/**
|
|
6748
|
-
*
|
|
8035
|
+
* Formatted value based on `multiSelect` state.
|
|
8036
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
6749
8037
|
* @private
|
|
6750
|
-
* @returns {
|
|
8038
|
+
* @returns {String|Array<String>}
|
|
6751
8039
|
*/
|
|
6752
|
-
get
|
|
6753
|
-
|
|
6754
|
-
|
|
8040
|
+
get formattedValue() {
|
|
8041
|
+
if (this.multiSelect) {
|
|
8042
|
+
if (!this.value) {
|
|
8043
|
+
return undefined;
|
|
8044
|
+
}
|
|
8045
|
+
if (this.value.startsWith("[")) {
|
|
8046
|
+
return JSON.parse(this.value);
|
|
8047
|
+
}
|
|
8048
|
+
return [this.value];
|
|
8049
|
+
}
|
|
8050
|
+
return this.value;
|
|
8051
|
+
}
|
|
8052
|
+
|
|
8053
|
+
/**
|
|
8054
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
8055
|
+
* @private
|
|
8056
|
+
* @returns {Record<string, boolean>}
|
|
8057
|
+
*/
|
|
8058
|
+
get commonLabelClasses() {
|
|
8059
|
+
const obj = {
|
|
8060
|
+
'is-disabled': this.disabled,
|
|
8061
|
+
'withValue': false,
|
|
8062
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0,
|
|
8063
|
+
[this.labelFontClass]: true
|
|
6755
8064
|
};
|
|
8065
|
+
|
|
8066
|
+
if (this.placeholder) {
|
|
8067
|
+
obj.withValue = true;
|
|
8068
|
+
} else if (this.optionSelected) {
|
|
8069
|
+
if (Array.isArray(this.optionSelected)) {
|
|
8070
|
+
obj.withValue = this.optionSelected.length > 0;
|
|
8071
|
+
} else {
|
|
8072
|
+
obj.withValue = true;
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
8075
|
+
return obj;
|
|
8076
|
+
}
|
|
8077
|
+
|
|
8078
|
+
/**
|
|
8079
|
+
* Returns the label font class based on layout and selection state.
|
|
8080
|
+
* @private
|
|
8081
|
+
* @returns {string} - The font class for the label.
|
|
8082
|
+
*/
|
|
8083
|
+
get labelFontClass() {
|
|
8084
|
+
const isSelected = this.hasValue;
|
|
8085
|
+
|
|
8086
|
+
if (this.layout.startsWith('emphasized')) {
|
|
8087
|
+
return isSelected ? 'body-sm' : 'accent-xl';
|
|
8088
|
+
}
|
|
8089
|
+
|
|
8090
|
+
if (this.layout === 'snowflake') {
|
|
8091
|
+
return isSelected ? 'body-xs' : 'body-lg';
|
|
8092
|
+
}
|
|
8093
|
+
|
|
8094
|
+
// classic layout (default)
|
|
8095
|
+
return isSelected ? 'body-xs' : 'body-default';
|
|
8096
|
+
}
|
|
8097
|
+
|
|
8098
|
+
/**
|
|
8099
|
+
* Whether or not the component has a value.
|
|
8100
|
+
* @returns {boolean} - Returns true if the component has a value or placeholder.
|
|
8101
|
+
* @private
|
|
8102
|
+
*/
|
|
8103
|
+
get hasValue() {
|
|
8104
|
+
return this.placeholder || (this.value && this.value.length > 0); // eslint-disable-line no-extra-parens
|
|
6756
8105
|
}
|
|
6757
8106
|
|
|
6758
8107
|
/**
|
|
@@ -6765,6 +8114,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6765
8114
|
|
|
6766
8115
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6767
8116
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8117
|
+
|
|
8118
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8119
|
+
this.updateMenuShapeSize();
|
|
8120
|
+
// wait til the bib gets fully rendered
|
|
8121
|
+
setTimeout(() => {
|
|
8122
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8123
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8124
|
+
this.dropdown.trigger.focus();
|
|
8125
|
+
|
|
8126
|
+
// default focus indicator on the first menu option
|
|
8127
|
+
if (this.menu.index < 0) {
|
|
8128
|
+
this.menu.navigateOptions('down');
|
|
8129
|
+
}
|
|
8130
|
+
}
|
|
8131
|
+
});
|
|
8132
|
+
}
|
|
8133
|
+
});
|
|
8134
|
+
|
|
8135
|
+
this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
|
|
8136
|
+
this.updateMenuShapeSize();
|
|
6768
8137
|
});
|
|
6769
8138
|
|
|
6770
8139
|
// setting up bibtemplate
|
|
@@ -6787,7 +8156,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6787
8156
|
*
|
|
6788
8157
|
*/
|
|
6789
8158
|
static register(name = "auro-select") {
|
|
6790
|
-
AuroLibraryRuntimeUtils$
|
|
8159
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroSelect);
|
|
6791
8160
|
}
|
|
6792
8161
|
|
|
6793
8162
|
/**
|
|
@@ -6831,6 +8200,30 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6831
8200
|
this.dropdown.requestUpdate();
|
|
6832
8201
|
}
|
|
6833
8202
|
|
|
8203
|
+
/**
|
|
8204
|
+
* Update menu to default for fullscreen bib, otherwise to this.size and this.shape.
|
|
8205
|
+
* @private
|
|
8206
|
+
*/
|
|
8207
|
+
updateMenuShapeSize() {
|
|
8208
|
+
if (!this.menu) {
|
|
8209
|
+
return;
|
|
8210
|
+
}
|
|
8211
|
+
|
|
8212
|
+
if (this.dropdown && this.dropdown.isBibFullscreen) {
|
|
8213
|
+
this.menu.setAttribute('size', 'md');
|
|
8214
|
+
this.menu.setAttribute('shape', 'box');
|
|
8215
|
+
} else {
|
|
8216
|
+
// set menu's default size if there it's not specified.
|
|
8217
|
+
if (!this.menu.getAttribute('size')) {
|
|
8218
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8219
|
+
}
|
|
8220
|
+
|
|
8221
|
+
if (!this.getAttribute('shape')) {
|
|
8222
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8223
|
+
}
|
|
8224
|
+
}
|
|
8225
|
+
}
|
|
8226
|
+
|
|
6834
8227
|
/**
|
|
6835
8228
|
* Binds all behavior needed to the menu after rendering.
|
|
6836
8229
|
* @private
|
|
@@ -6847,6 +8240,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6847
8240
|
return;
|
|
6848
8241
|
}
|
|
6849
8242
|
|
|
8243
|
+
this.updateMenuShapeSize();
|
|
8244
|
+
|
|
6850
8245
|
if (this.multiSelect) {
|
|
6851
8246
|
this.menu.multiSelect = this.multiSelect;
|
|
6852
8247
|
}
|
|
@@ -6884,7 +8279,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6884
8279
|
|
|
6885
8280
|
this.menu.addEventListener('auroMenu-selectValueReset', () => {
|
|
6886
8281
|
this.optionSelected = this.menu.optionSelected;
|
|
6887
|
-
this.
|
|
8282
|
+
this.validate(this);
|
|
6888
8283
|
});
|
|
6889
8284
|
|
|
6890
8285
|
this.menu.addEventListener('auroMenu-activatedOption', (evt) => {
|
|
@@ -6906,46 +8301,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6906
8301
|
configureSelect() {
|
|
6907
8302
|
|
|
6908
8303
|
this.addEventListener('keydown', (evt) => {
|
|
6909
|
-
|
|
6910
|
-
|
|
8304
|
+
// when the focus is on trigger not on close button
|
|
8305
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8306
|
+
if (evt.key === 'ArrowUp') {
|
|
8307
|
+
evt.preventDefault();
|
|
6911
8308
|
|
|
6912
|
-
|
|
8309
|
+
this.dropdown.show();
|
|
8310
|
+
|
|
8311
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8312
|
+
this.menu.navigateOptions('up');
|
|
8313
|
+
}
|
|
6913
8314
|
|
|
6914
|
-
|
|
6915
|
-
this.menu.navigateOptions('up');
|
|
8315
|
+
return;
|
|
6916
8316
|
}
|
|
6917
8317
|
|
|
6918
|
-
|
|
6919
|
-
|
|
8318
|
+
if (evt.key === 'ArrowDown') {
|
|
8319
|
+
evt.preventDefault();
|
|
6920
8320
|
|
|
6921
|
-
|
|
6922
|
-
evt.preventDefault();
|
|
8321
|
+
this.dropdown.show();
|
|
6923
8322
|
|
|
6924
|
-
|
|
8323
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8324
|
+
this.menu.navigateOptions('down');
|
|
8325
|
+
}
|
|
6925
8326
|
|
|
6926
|
-
|
|
6927
|
-
this.menu.navigateOptions('down');
|
|
8327
|
+
return;
|
|
6928
8328
|
}
|
|
6929
8329
|
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
evt.preventDefault();
|
|
6936
|
-
this.menu.makeSelection();
|
|
6937
|
-
}
|
|
8330
|
+
if (evt.key === 'Enter') {
|
|
8331
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8332
|
+
evt.preventDefault();
|
|
8333
|
+
this.menu.makeSelection();
|
|
8334
|
+
}
|
|
6938
8335
|
|
|
6939
|
-
|
|
8336
|
+
return;
|
|
8337
|
+
}
|
|
6940
8338
|
}
|
|
6941
8339
|
|
|
6942
|
-
if (evt.key === 'Tab') {
|
|
8340
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6943
8341
|
if (this.dropdown.isBibFullscreen) {
|
|
6944
8342
|
evt.preventDefault();
|
|
8343
|
+
|
|
8344
|
+
// when the focus is on trigger not on close button
|
|
8345
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8346
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8347
|
+
// when bib it not open, it will focus onto trigger.
|
|
8348
|
+
this.dropdown.focus();
|
|
8349
|
+
} else {
|
|
8350
|
+
// when close button has the focus, move focus back to the trigger
|
|
8351
|
+
this.dropdown.trigger.focus();
|
|
8352
|
+
}
|
|
6945
8353
|
} else {
|
|
6946
8354
|
this.dropdown.hide();
|
|
6947
8355
|
}
|
|
6948
|
-
|
|
6949
8356
|
return;
|
|
6950
8357
|
}
|
|
6951
8358
|
|
|
@@ -6956,7 +8363,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6956
8363
|
this.addEventListener('focusin', this.handleFocusin);
|
|
6957
8364
|
|
|
6958
8365
|
this.addEventListener('blur', () => {
|
|
6959
|
-
this.
|
|
8366
|
+
this.validate();
|
|
6960
8367
|
this.hasFocus = false;
|
|
6961
8368
|
});
|
|
6962
8369
|
}
|
|
@@ -7026,6 +8433,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7026
8433
|
}
|
|
7027
8434
|
}
|
|
7028
8435
|
|
|
8436
|
+
/**
|
|
8437
|
+
* Hides the dropdown bib if its open.
|
|
8438
|
+
* @returns {void}
|
|
8439
|
+
*/
|
|
8440
|
+
hideBib() {
|
|
8441
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8442
|
+
this.dropdown.hide();
|
|
8443
|
+
}
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8446
|
+
/**
|
|
8447
|
+
* Shows the dropdown bib if there are options to show.
|
|
8448
|
+
* @returns {void}
|
|
8449
|
+
*/
|
|
8450
|
+
showBib() {
|
|
8451
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8452
|
+
this.dropdown.show();
|
|
8453
|
+
}
|
|
8454
|
+
}
|
|
8455
|
+
|
|
7029
8456
|
/**
|
|
7030
8457
|
* Function to support @focusin event.
|
|
7031
8458
|
* @private
|
|
@@ -7110,38 +8537,47 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7110
8537
|
// Add the tag name as an attribute if it is different than the component name
|
|
7111
8538
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7112
8539
|
|
|
7113
|
-
this.configureMenu();
|
|
7114
8540
|
this.configureDropdown();
|
|
8541
|
+
this.configureMenu();
|
|
7115
8542
|
this.configureSelect();
|
|
8543
|
+
}
|
|
8544
|
+
|
|
8545
|
+
/**
|
|
8546
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8547
|
+
* @param {string} value - The value to set in the menu.
|
|
8548
|
+
* @returns {void}
|
|
8549
|
+
* @private
|
|
8550
|
+
*/
|
|
8551
|
+
async updateMenuValue(value) {
|
|
8552
|
+
if (!this.menu) return;
|
|
7116
8553
|
|
|
7117
|
-
|
|
7118
|
-
if (
|
|
7119
|
-
this.value =
|
|
7120
|
-
|
|
8554
|
+
this.menu.setAttribute('value', value);
|
|
8555
|
+
if (value) {
|
|
8556
|
+
this.menu.value = value;
|
|
8557
|
+
} else {
|
|
8558
|
+
this.menu.reset();
|
|
7121
8559
|
}
|
|
8560
|
+
await this.menu.updateComplete;
|
|
7122
8561
|
}
|
|
7123
8562
|
|
|
7124
8563
|
async updated(changedProperties) {
|
|
7125
|
-
if (changedProperties.has('multiSelect')) {
|
|
8564
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
7126
8565
|
this.clearSelection();
|
|
7127
8566
|
}
|
|
7128
8567
|
|
|
7129
8568
|
if (changedProperties.has('value')) {
|
|
7130
8569
|
if (this.value) {
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
this.menu.value = this.value;
|
|
8570
|
+
await this.updateMenuValue(this.value);
|
|
7134
8571
|
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8572
|
+
if (this.menu) {
|
|
8573
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8574
|
+
}
|
|
7139
8575
|
} else {
|
|
7140
|
-
this.
|
|
8576
|
+
await this.updateMenuValue(undefined);
|
|
7141
8577
|
}
|
|
7142
8578
|
|
|
7143
8579
|
this._updateNativeSelect();
|
|
7144
|
-
this.
|
|
8580
|
+
this.validate();
|
|
7145
8581
|
|
|
7146
8582
|
// LEGACY EVENT
|
|
7147
8583
|
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|
|
@@ -7156,7 +8592,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7156
8592
|
composed: true,
|
|
7157
8593
|
detail: {
|
|
7158
8594
|
optionSelected: this.optionSelected,
|
|
7159
|
-
value: this.
|
|
8595
|
+
value: this.formattedValue
|
|
7160
8596
|
}
|
|
7161
8597
|
}));
|
|
7162
8598
|
}
|
|
@@ -7168,6 +8604,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7168
8604
|
if (changedProperties.has('error')) {
|
|
7169
8605
|
this.validate(true);
|
|
7170
8606
|
}
|
|
8607
|
+
|
|
8608
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8609
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8610
|
+
}
|
|
8611
|
+
|
|
8612
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8613
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8614
|
+
}
|
|
7171
8615
|
}
|
|
7172
8616
|
|
|
7173
8617
|
/**
|
|
@@ -7178,16 +8622,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7178
8622
|
this.validation.reset(this);
|
|
7179
8623
|
}
|
|
7180
8624
|
|
|
7181
|
-
/**
|
|
7182
|
-
* Hide dropdownbib.
|
|
7183
|
-
* @private
|
|
7184
|
-
*/
|
|
7185
|
-
hideBib() {
|
|
7186
|
-
if (this.dropdown) {
|
|
7187
|
-
this.dropdown.hide();
|
|
7188
|
-
}
|
|
7189
|
-
}
|
|
7190
|
-
|
|
7191
8625
|
/**
|
|
7192
8626
|
* Validates value.
|
|
7193
8627
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7207,13 +8641,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7207
8641
|
const selectedValue = selectedOption.value;
|
|
7208
8642
|
|
|
7209
8643
|
if (this.multiSelect) {
|
|
7210
|
-
const currentArray =
|
|
8644
|
+
const currentArray = this.formattedValue;
|
|
7211
8645
|
|
|
7212
8646
|
if (!currentArray.includes(selectedValue)) {
|
|
7213
|
-
this.value = [
|
|
8647
|
+
this.value = JSON.stringify([
|
|
7214
8648
|
...currentArray,
|
|
7215
8649
|
selectedValue
|
|
7216
|
-
];
|
|
8650
|
+
]);
|
|
7217
8651
|
}
|
|
7218
8652
|
} else {
|
|
7219
8653
|
const currentValue = this.value;
|
|
@@ -7236,12 +8670,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7236
8670
|
}
|
|
7237
8671
|
|
|
7238
8672
|
if (this.multiSelect) {
|
|
7239
|
-
nativeSelect.value = this.
|
|
8673
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7240
8674
|
} else {
|
|
7241
8675
|
nativeSelect.value = this.value || '';
|
|
7242
8676
|
}
|
|
7243
8677
|
}
|
|
7244
8678
|
|
|
8679
|
+
/**
|
|
8680
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8681
|
+
* @private
|
|
8682
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8683
|
+
*/
|
|
7245
8684
|
renderAriaHtml() {
|
|
7246
8685
|
return u`
|
|
7247
8686
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7262,10 +8701,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7262
8701
|
`;
|
|
7263
8702
|
}
|
|
7264
8703
|
|
|
8704
|
+
/**
|
|
8705
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8706
|
+
* @private
|
|
8707
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8708
|
+
*/
|
|
7265
8709
|
renderNativeSelect() {
|
|
7266
8710
|
return u`
|
|
7267
|
-
<div class="nativeSelectWrapper">
|
|
7268
|
-
<select
|
|
8711
|
+
<div class="nativeSelectWrapper util_displayHiddenVisually">
|
|
8712
|
+
<select
|
|
7269
8713
|
tabindex="-1"
|
|
7270
8714
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7271
8715
|
name="${this.name || ''}"
|
|
@@ -7278,8 +8722,8 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7278
8722
|
${this.options.map((option) => {
|
|
7279
8723
|
const optionValue = option.value || option.textContent;
|
|
7280
8724
|
return u`
|
|
7281
|
-
<option
|
|
7282
|
-
value="${optionValue}"
|
|
8725
|
+
<option
|
|
8726
|
+
value="${optionValue}"
|
|
7283
8727
|
?selected="${this.value === optionValue}">
|
|
7284
8728
|
${option.textContent}
|
|
7285
8729
|
</option>
|
|
@@ -7301,14 +8745,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7301
8745
|
? u`
|
|
7302
8746
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7303
8747
|
<p id="${this.uniqueId}" part="helpText">
|
|
7304
|
-
<slot name="
|
|
8748
|
+
<slot name="helpText"></slot>
|
|
7305
8749
|
</p>
|
|
7306
8750
|
</${this.helpTextTag}>
|
|
7307
8751
|
`
|
|
7308
8752
|
: u`
|
|
7309
8753
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7310
8754
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7311
|
-
|
|
8755
|
+
${this.errorMessage}
|
|
7312
8756
|
</p>
|
|
7313
8757
|
</${this.helpTextTag}>
|
|
7314
8758
|
`
|
|
@@ -7323,14 +8767,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7323
8767
|
*/
|
|
7324
8768
|
renderLayoutEmphasized() {
|
|
7325
8769
|
const placeholderClass = {
|
|
7326
|
-
|
|
8770
|
+
'util_displayHidden': this.value
|
|
7327
8771
|
};
|
|
7328
8772
|
|
|
7329
8773
|
const displayValueClasses = {
|
|
7330
8774
|
'displayValue': true,
|
|
7331
8775
|
'hasContent': this.hasDisplayValueContent,
|
|
7332
8776
|
'hasFocus': this.isPopoverVisible,
|
|
7333
|
-
'withValue': this.
|
|
8777
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
7334
8778
|
'force': this.forceDisplayValue,
|
|
7335
8779
|
};
|
|
7336
8780
|
|
|
@@ -7341,22 +8785,21 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7341
8785
|
|
|
7342
8786
|
return u`
|
|
7343
8787
|
<div
|
|
7344
|
-
class="${e(this.commonWrapperClasses)}"
|
|
7345
8788
|
part="wrapper">
|
|
7346
8789
|
<div id="slotHolder" aria-hidden="true">
|
|
7347
8790
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7348
8791
|
</div>
|
|
7349
8792
|
<${this.dropdownTag}
|
|
8793
|
+
a11yRole="select"
|
|
7350
8794
|
?autoPlacement="${this.autoPlacement}"
|
|
7351
8795
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7352
|
-
?matchWidth="${
|
|
8796
|
+
?matchWidth="${this.matchWidth}"
|
|
7353
8797
|
?noFlip="${this.noFlip}"
|
|
7354
8798
|
?onDark="${this.onDark}"
|
|
7355
8799
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7356
8800
|
.offset="${this.offset}"
|
|
7357
8801
|
.placement="${this.placement}"
|
|
7358
8802
|
chevron
|
|
7359
|
-
fluid
|
|
7360
8803
|
for="selectMenu"
|
|
7361
8804
|
layout="${this.layout}"
|
|
7362
8805
|
part="dropdown"
|
|
@@ -7368,15 +8811,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7368
8811
|
</div>
|
|
7369
8812
|
<div class="mainContent">
|
|
7370
8813
|
<div class="${e(valueContainerClasses)}">
|
|
7371
|
-
<label>
|
|
8814
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7372
8815
|
<slot name="label"></slot>
|
|
8816
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7373
8817
|
</label>
|
|
7374
8818
|
<div class="value" id="value"></div>
|
|
7375
|
-
${
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
</div>
|
|
7379
|
-
`}
|
|
8819
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8820
|
+
${this.placeholder}
|
|
8821
|
+
</div>
|
|
7380
8822
|
</div>
|
|
7381
8823
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7382
8824
|
<slot name="displayValue"></slot>
|
|
@@ -7386,6 +8828,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7386
8828
|
</div>
|
|
7387
8829
|
<div class="menuWrapper"></div>
|
|
7388
8830
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8831
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
7389
8832
|
<slot></slot>
|
|
7390
8833
|
</${this.bibtemplateTag}>
|
|
7391
8834
|
<div slot="helpText">
|
|
@@ -7403,14 +8846,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7403
8846
|
*/
|
|
7404
8847
|
renderLayoutSnowflake() {
|
|
7405
8848
|
const placeholderClass = {
|
|
7406
|
-
|
|
8849
|
+
'util_displayHidden': this.value
|
|
7407
8850
|
};
|
|
7408
8851
|
|
|
7409
8852
|
const displayValueClasses = {
|
|
7410
8853
|
'displayValue': true,
|
|
7411
8854
|
'hasContent': this.hasDisplayValueContent,
|
|
7412
8855
|
'hasFocus': this.isPopoverVisible,
|
|
7413
|
-
'withValue': this.
|
|
8856
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
7414
8857
|
'force': this.forceDisplayValue,
|
|
7415
8858
|
};
|
|
7416
8859
|
|
|
@@ -7421,7 +8864,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7421
8864
|
|
|
7422
8865
|
return u`
|
|
7423
8866
|
<div
|
|
7424
|
-
class="${e(this.commonWrapperClasses)}"
|
|
7425
8867
|
part="wrapper">
|
|
7426
8868
|
<div id="slotHolder" aria-hidden="true">
|
|
7427
8869
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -7429,14 +8871,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7429
8871
|
<${this.dropdownTag}
|
|
7430
8872
|
?autoPlacement="${this.autoPlacement}"
|
|
7431
8873
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7432
|
-
?matchWidth="${
|
|
8874
|
+
?matchWidth="${this.matchWidth}"
|
|
7433
8875
|
?noFlip="${this.noFlip}"
|
|
7434
8876
|
?onDark="${this.onDark}"
|
|
7435
8877
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7436
8878
|
.offset="${this.offset}"
|
|
7437
8879
|
.placement="${this.placement}"
|
|
7438
8880
|
chevron
|
|
7439
|
-
fluid
|
|
7440
8881
|
for="selectMenu"
|
|
7441
8882
|
layout="${this.layout}"
|
|
7442
8883
|
part="dropdown"
|
|
@@ -7448,15 +8889,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7448
8889
|
</div>
|
|
7449
8890
|
<div class="mainContent">
|
|
7450
8891
|
<div class="${e(valueContainerClasses)}">
|
|
7451
|
-
<label>
|
|
8892
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7452
8893
|
<slot name="label"></slot>
|
|
8894
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7453
8895
|
</label>
|
|
7454
8896
|
<div class="value" id="value"></div>
|
|
7455
|
-
${
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
</div>
|
|
7459
|
-
`}
|
|
8897
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8898
|
+
${this.placeholder}
|
|
8899
|
+
</div>
|
|
7460
8900
|
</div>
|
|
7461
8901
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7462
8902
|
<slot name="displayValue"></slot>
|
|
@@ -7466,12 +8906,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7466
8906
|
</div>
|
|
7467
8907
|
<div class="menuWrapper"></div>
|
|
7468
8908
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8909
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
7469
8910
|
<slot></slot>
|
|
7470
8911
|
</${this.bibtemplateTag}>
|
|
7471
8912
|
<div slot="helpText">
|
|
7472
8913
|
${this.renderHtmlHelpText()}
|
|
7473
8914
|
</div>
|
|
7474
8915
|
</${this.dropdownTag}>
|
|
8916
|
+
${this.renderNativeSelect()}
|
|
7475
8917
|
</div>
|
|
7476
8918
|
`;
|
|
7477
8919
|
}
|
|
@@ -7482,11 +8924,80 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7482
8924
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7483
8925
|
*/
|
|
7484
8926
|
renderLayoutClassic() {
|
|
8927
|
+
const placeholderClass = {
|
|
8928
|
+
'util_displayHidden': this.value
|
|
8929
|
+
};
|
|
8930
|
+
|
|
8931
|
+
const displayValueClasses = {
|
|
8932
|
+
'displayValue': true,
|
|
8933
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8934
|
+
'hasFocus': this.isPopoverVisible,
|
|
8935
|
+
'withValue': this.commonLabelClasses.withValue,
|
|
8936
|
+
'force': this.forceDisplayValue,
|
|
8937
|
+
};
|
|
8938
|
+
|
|
8939
|
+
const valueContainerClasses = {
|
|
8940
|
+
'valueContainer': true,
|
|
8941
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8942
|
+
};
|
|
8943
|
+
|
|
8944
|
+
const valueClasses = {
|
|
8945
|
+
'value': true,
|
|
8946
|
+
'body-default': true
|
|
8947
|
+
};
|
|
8948
|
+
|
|
7485
8949
|
return u`
|
|
7486
8950
|
<div
|
|
7487
|
-
class="${e(this.commonWrapperClasses)} thin"
|
|
7488
8951
|
part="wrapper">
|
|
7489
|
-
|
|
8952
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8953
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8954
|
+
</div>
|
|
8955
|
+
<${this.dropdownTag}
|
|
8956
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8957
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8958
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8959
|
+
?noFlip="${this.noFlip}"
|
|
8960
|
+
?onDark="${this.onDark}"
|
|
8961
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8962
|
+
.offset="${this.offset}"
|
|
8963
|
+
.placement="${this.placement}"
|
|
8964
|
+
chevron
|
|
8965
|
+
for="selectMenu"
|
|
8966
|
+
layout="${this.layout}"
|
|
8967
|
+
part="dropdown"
|
|
8968
|
+
shape="${this.shape}"
|
|
8969
|
+
size="${this.size}">
|
|
8970
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8971
|
+
<div class="accents left">
|
|
8972
|
+
<slot name="typeIcon"></slot>
|
|
8973
|
+
</div>
|
|
8974
|
+
<div class="mainContent">
|
|
8975
|
+
<div class="${e(valueContainerClasses)}">
|
|
8976
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8977
|
+
<slot name="label"></slot>
|
|
8978
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8979
|
+
</label>
|
|
8980
|
+
<div class="${e(valueClasses)}" id="value"></div>
|
|
8981
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8982
|
+
${this.placeholder}
|
|
8983
|
+
</div>
|
|
8984
|
+
</div>
|
|
8985
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8986
|
+
<slot name="displayValue"></slot>
|
|
8987
|
+
</div>
|
|
8988
|
+
</div>
|
|
8989
|
+
<div class="accents right"></div>
|
|
8990
|
+
</div>
|
|
8991
|
+
<div class="menuWrapper"></div>
|
|
8992
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8993
|
+
<slot name="ariaLabel.bib.close" slot="ariaLabel.close">Close</slot>
|
|
8994
|
+
<slot></slot>
|
|
8995
|
+
</${this.bibtemplateTag}>
|
|
8996
|
+
<div slot="helpText">
|
|
8997
|
+
${this.renderHtmlHelpText()}
|
|
8998
|
+
</div>
|
|
8999
|
+
</${this.dropdownTag}>
|
|
9000
|
+
${this.renderNativeSelect()}
|
|
7490
9001
|
</div>
|
|
7491
9002
|
`;
|
|
7492
9003
|
}
|
|
@@ -7520,112 +9031,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7520
9031
|
|
|
7521
9032
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7522
9033
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7523
|
-
|
|
7524
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7525
|
-
renderBACKUP() {
|
|
7526
|
-
const placeholderClass = {
|
|
7527
|
-
hidden: this.value,
|
|
7528
|
-
};
|
|
7529
|
-
|
|
7530
|
-
return u`
|
|
7531
|
-
<div class="outerWrapper">
|
|
7532
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7533
|
-
${this.optionActive && this.options.length > 0
|
|
7534
|
-
? u`
|
|
7535
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7536
|
-
`
|
|
7537
|
-
: undefined
|
|
7538
|
-
};
|
|
7539
|
-
|
|
7540
|
-
${this.optionSelected && this.options.length > 0
|
|
7541
|
-
? u`
|
|
7542
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7543
|
-
`
|
|
7544
|
-
: undefined
|
|
7545
|
-
};
|
|
7546
|
-
</div>
|
|
7547
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7548
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7549
|
-
</div>
|
|
7550
|
-
<${this.dropdownTag}
|
|
7551
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7552
|
-
?disabled="${this.disabled}"
|
|
7553
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7554
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7555
|
-
?noFlip="${this.noFlip}"
|
|
7556
|
-
?onDark="${this.onDark}"
|
|
7557
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7558
|
-
.offset="${this.offset}"
|
|
7559
|
-
.placement="${this.placement}"
|
|
7560
|
-
chevron
|
|
7561
|
-
fluid
|
|
7562
|
-
for="selectMenu"
|
|
7563
|
-
layout="${this.layout}"
|
|
7564
|
-
part="dropdown"
|
|
7565
|
-
shape="${this.shape}"
|
|
7566
|
-
size="${this.size}">
|
|
7567
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7568
|
-
<span id="placeholder"
|
|
7569
|
-
class="${e(placeholderClass)}"
|
|
7570
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7571
|
-
>
|
|
7572
|
-
<slot name="placeholder"></slot>
|
|
7573
|
-
</span>
|
|
7574
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7575
|
-
</span>
|
|
7576
|
-
|
|
7577
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7578
|
-
<slot></slot>
|
|
7579
|
-
</${this.bibtemplateTag}>
|
|
7580
|
-
<slot name="label" slot="label"></slot>
|
|
7581
|
-
<p slot="helpText">
|
|
7582
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7583
|
-
? u`
|
|
7584
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7585
|
-
<slot name="helpText"></slot>
|
|
7586
|
-
</span>`
|
|
7587
|
-
: u`
|
|
7588
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7589
|
-
${this.errorMessage}
|
|
7590
|
-
</span>`
|
|
7591
|
-
}
|
|
7592
|
-
</p>
|
|
7593
|
-
</${this.dropdownTag}>
|
|
7594
|
-
<div class="nativeSelectWrapper">
|
|
7595
|
-
<select
|
|
7596
|
-
tabindex="-1"
|
|
7597
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7598
|
-
name="${this.name || ''}"
|
|
7599
|
-
?disabled="${this.disabled}"
|
|
7600
|
-
?required="${this.required}"
|
|
7601
|
-
aria-hidden="true"
|
|
7602
|
-
autocomplete="${o(this.autocomplete)}"
|
|
7603
|
-
@change="${this._handleNativeSelectChange}">
|
|
7604
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7605
|
-
${this.options.map((option) => {
|
|
7606
|
-
const optionValue = option.value || option.textContent;
|
|
7607
|
-
return u`
|
|
7608
|
-
<option
|
|
7609
|
-
value="${optionValue}"
|
|
7610
|
-
?selected="${this.value === optionValue}">
|
|
7611
|
-
${option.textContent}
|
|
7612
|
-
</option>
|
|
7613
|
-
`;
|
|
7614
|
-
})}
|
|
7615
|
-
</select>
|
|
7616
|
-
</div>
|
|
7617
|
-
<!-- Help text and error message template -->
|
|
7618
|
-
${this.renderHtmlHelpText()}
|
|
7619
|
-
</div>
|
|
7620
|
-
`;
|
|
7621
|
-
}
|
|
7622
9034
|
}
|
|
7623
9035
|
|
|
7624
|
-
var styleCss$2 = 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)}`;
|
|
9036
|
+
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:flex;flex-direction:column;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);gap:var(--ds-size-50, 0.25rem)}:host([root]) .menuWrapper.xl{padding:var(--ds-size-200, 1rem);gap:var(--ds-size-100, 0.5rem)}`;
|
|
7625
9037
|
|
|
7626
9038
|
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)}`;
|
|
7627
9039
|
|
|
7628
|
-
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)}`;
|
|
9040
|
+
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)}`;
|
|
7629
9041
|
|
|
7630
9042
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7631
9043
|
// See LICENSE in the project root for license information.
|
|
@@ -7678,7 +9090,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7678
9090
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
7679
9091
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7680
9092
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
7681
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
7682
9093
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7683
9094
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7684
9095
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -7693,12 +9104,22 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7693
9104
|
|
|
7694
9105
|
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
7695
9106
|
|
|
7696
|
-
class AuroMenu extends
|
|
9107
|
+
class AuroMenu extends AuroElement$4 {
|
|
7697
9108
|
constructor() {
|
|
7698
9109
|
super();
|
|
7699
9110
|
|
|
7700
9111
|
// State properties (reactive)
|
|
7701
9112
|
|
|
9113
|
+
/**
|
|
9114
|
+
* @private
|
|
9115
|
+
*/
|
|
9116
|
+
this.shape = "box";
|
|
9117
|
+
|
|
9118
|
+
/**
|
|
9119
|
+
* @private
|
|
9120
|
+
*/
|
|
9121
|
+
this.size = "sm";
|
|
9122
|
+
|
|
7702
9123
|
// Value of the selected options
|
|
7703
9124
|
this.value = undefined;
|
|
7704
9125
|
// Currently selected option
|
|
@@ -7757,6 +9178,7 @@ class AuroMenu extends i$2 {
|
|
|
7757
9178
|
|
|
7758
9179
|
static get properties() {
|
|
7759
9180
|
return {
|
|
9181
|
+
...super.properties,
|
|
7760
9182
|
noCheckmark: {
|
|
7761
9183
|
type: Boolean,
|
|
7762
9184
|
reflect: true,
|
|
@@ -7787,9 +9209,24 @@ class AuroMenu extends i$2 {
|
|
|
7787
9209
|
reflect: true,
|
|
7788
9210
|
attribute: 'multiselect'
|
|
7789
9211
|
},
|
|
9212
|
+
|
|
9213
|
+
/**
|
|
9214
|
+
* Value selected for the component.
|
|
9215
|
+
*/
|
|
7790
9216
|
value: {
|
|
7791
|
-
|
|
7792
|
-
|
|
9217
|
+
type: String,
|
|
9218
|
+
reflect: true,
|
|
9219
|
+
attribute: 'value'
|
|
9220
|
+
},
|
|
9221
|
+
|
|
9222
|
+
/**
|
|
9223
|
+
* Indent level for submenus.
|
|
9224
|
+
* @private
|
|
9225
|
+
*/
|
|
9226
|
+
level: {
|
|
9227
|
+
type: Number,
|
|
9228
|
+
reflect: false,
|
|
9229
|
+
attribute: false
|
|
7793
9230
|
}
|
|
7794
9231
|
};
|
|
7795
9232
|
}
|
|
@@ -7811,7 +9248,26 @@ class AuroMenu extends i$2 {
|
|
|
7811
9248
|
*
|
|
7812
9249
|
*/
|
|
7813
9250
|
static register(name = "auro-menu") {
|
|
7814
|
-
AuroLibraryRuntimeUtils$
|
|
9251
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
9252
|
+
}
|
|
9253
|
+
|
|
9254
|
+
/**
|
|
9255
|
+
* Formatted value based on `multiSelect` state.
|
|
9256
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
9257
|
+
* @private
|
|
9258
|
+
* @returns {String|Array<String>}
|
|
9259
|
+
*/
|
|
9260
|
+
get formattedValue() {
|
|
9261
|
+
if (this.multiSelect) {
|
|
9262
|
+
if (!this.value) {
|
|
9263
|
+
return undefined;
|
|
9264
|
+
}
|
|
9265
|
+
if (this.value.startsWith("[")) {
|
|
9266
|
+
return JSON.parse(this.value);
|
|
9267
|
+
}
|
|
9268
|
+
return [this.value];
|
|
9269
|
+
}
|
|
9270
|
+
return this.value;
|
|
7815
9271
|
}
|
|
7816
9272
|
|
|
7817
9273
|
// Lifecycle Methods
|
|
@@ -7823,6 +9279,7 @@ class AuroMenu extends i$2 {
|
|
|
7823
9279
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
7824
9280
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
7825
9281
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9282
|
+
this.setTagAttribute("auro-menu");
|
|
7826
9283
|
}
|
|
7827
9284
|
|
|
7828
9285
|
disconnectedCallback() {
|
|
@@ -7835,19 +9292,33 @@ class AuroMenu extends i$2 {
|
|
|
7835
9292
|
}
|
|
7836
9293
|
|
|
7837
9294
|
firstUpdated() {
|
|
7838
|
-
AuroLibraryRuntimeUtils$
|
|
9295
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7839
9296
|
|
|
7840
9297
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7841
9298
|
this.initializeMenu();
|
|
7842
9299
|
}
|
|
7843
9300
|
|
|
9301
|
+
/**
|
|
9302
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9303
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9304
|
+
* @private
|
|
9305
|
+
*/
|
|
9306
|
+
setTagAttribute(tagName) {
|
|
9307
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9308
|
+
this.setAttribute(tagName, true);
|
|
9309
|
+
}
|
|
9310
|
+
}
|
|
9311
|
+
|
|
7844
9312
|
updated(changedProperties) {
|
|
7845
|
-
|
|
9313
|
+
super.updated(changedProperties);
|
|
9314
|
+
|
|
9315
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
7846
9316
|
// Reset selection if multiSelect mode changes
|
|
7847
9317
|
this.clearSelection();
|
|
7848
9318
|
}
|
|
7849
9319
|
|
|
7850
|
-
|
|
9320
|
+
|
|
9321
|
+
if (changedProperties.has("value")) {
|
|
7851
9322
|
// Handle null/undefined case
|
|
7852
9323
|
if (this.value === undefined || this.value === null) {
|
|
7853
9324
|
this.optionSelected = undefined;
|
|
@@ -7855,7 +9326,7 @@ class AuroMenu extends i$2 {
|
|
|
7855
9326
|
} else {
|
|
7856
9327
|
if (this.multiSelect) {
|
|
7857
9328
|
// In multiselect mode, this.value should be an array of strings
|
|
7858
|
-
const valueArray =
|
|
9329
|
+
const valueArray = this.formattedValue;
|
|
7859
9330
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
7860
9331
|
|
|
7861
9332
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -7915,6 +9386,19 @@ class AuroMenu extends i$2 {
|
|
|
7915
9386
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7916
9387
|
}
|
|
7917
9388
|
|
|
9389
|
+
// Handle layout propagation to all menus and options
|
|
9390
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9391
|
+
[
|
|
9392
|
+
'size',
|
|
9393
|
+
'shape'
|
|
9394
|
+
].forEach((prop) => {
|
|
9395
|
+
if (changedProperties.has(prop)) {
|
|
9396
|
+
propagationTargets.forEach((el) => {
|
|
9397
|
+
el.setAttribute(prop, this[prop]);
|
|
9398
|
+
});
|
|
9399
|
+
}
|
|
9400
|
+
});
|
|
9401
|
+
|
|
7918
9402
|
// Regex for matchWord if needed
|
|
7919
9403
|
let regexWord = null;
|
|
7920
9404
|
|
|
@@ -8009,14 +9493,14 @@ class AuroMenu extends i$2 {
|
|
|
8009
9493
|
*/
|
|
8010
9494
|
handleSelectState(option) {
|
|
8011
9495
|
if (this.multiSelect) {
|
|
8012
|
-
const currentValue = this.
|
|
9496
|
+
const currentValue = this.formattedValue || [];
|
|
8013
9497
|
const currentSelected = this.optionSelected || [];
|
|
8014
9498
|
|
|
8015
9499
|
if (!currentValue.includes(option.value)) {
|
|
8016
|
-
this.value = [
|
|
9500
|
+
this.value = JSON.stringify([
|
|
8017
9501
|
...currentValue,
|
|
8018
9502
|
option.value
|
|
8019
|
-
];
|
|
9503
|
+
]);
|
|
8020
9504
|
}
|
|
8021
9505
|
if (!currentSelected.includes(option)) {
|
|
8022
9506
|
this.optionSelected = [
|
|
@@ -8039,13 +9523,15 @@ class AuroMenu extends i$2 {
|
|
|
8039
9523
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
8040
9524
|
*/
|
|
8041
9525
|
handleDeselectState(option) {
|
|
8042
|
-
if (this.multiSelect
|
|
9526
|
+
if (this.multiSelect) {
|
|
8043
9527
|
// Remove this option from array
|
|
8044
|
-
|
|
9528
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
8045
9529
|
|
|
8046
9530
|
// If array is empty after removal, set back to undefined
|
|
8047
|
-
if (
|
|
9531
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
8048
9532
|
this.value = undefined;
|
|
9533
|
+
} else {
|
|
9534
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
8049
9535
|
}
|
|
8050
9536
|
|
|
8051
9537
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -8111,21 +9597,20 @@ class AuroMenu extends i$2 {
|
|
|
8111
9597
|
* @param {HTMLElement} menu - Root menu element.
|
|
8112
9598
|
*/
|
|
8113
9599
|
handleNestedMenus(menu) {
|
|
8114
|
-
|
|
9600
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8115
9601
|
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
if (!
|
|
8120
|
-
|
|
9602
|
+
if (menu.level > 0) {
|
|
9603
|
+
menu.setAttribute('role', 'group');
|
|
9604
|
+
menu.removeAttribute("root");
|
|
9605
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9606
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8121
9607
|
}
|
|
9608
|
+
}
|
|
8122
9609
|
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
this.handleNestedMenus(nestedMenu);
|
|
9610
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9611
|
+
options.forEach((option) => {
|
|
9612
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9613
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8129
9614
|
});
|
|
8130
9615
|
}
|
|
8131
9616
|
|
|
@@ -8367,28 +9852,51 @@ class AuroMenu extends i$2 {
|
|
|
8367
9852
|
}
|
|
8368
9853
|
|
|
8369
9854
|
/**
|
|
8370
|
-
*
|
|
8371
|
-
* @returns {
|
|
9855
|
+
* Getter for wrapper classes based on size.
|
|
9856
|
+
* @returns {Object} - Class map for the wrapper element.
|
|
9857
|
+
* @private
|
|
8372
9858
|
*/
|
|
8373
|
-
|
|
9859
|
+
get wrapperClasses() {
|
|
9860
|
+
return e({
|
|
9861
|
+
'menuWrapper': true,
|
|
9862
|
+
[this.size]: true,
|
|
9863
|
+
});
|
|
9864
|
+
}
|
|
9865
|
+
|
|
9866
|
+
/**
|
|
9867
|
+
* Logic to determine the layout of the component.
|
|
9868
|
+
* @protected
|
|
9869
|
+
* @returns {void}
|
|
9870
|
+
*/
|
|
9871
|
+
renderLayout() {
|
|
8374
9872
|
if (this.loading) {
|
|
8375
9873
|
return x`
|
|
8376
|
-
<
|
|
8377
|
-
<
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
9874
|
+
<div class="${this.wrapperClasses}">
|
|
9875
|
+
<auro-menuoption
|
|
9876
|
+
disabled
|
|
9877
|
+
loadingplaceholder
|
|
9878
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9879
|
+
>
|
|
9880
|
+
<div>
|
|
9881
|
+
<slot name="loadingIcon" class="body-lg"></slot>
|
|
9882
|
+
<slot name="loadingText"></slot>
|
|
9883
|
+
</div>
|
|
9884
|
+
</auro-menuoption>
|
|
9885
|
+
</div>
|
|
8382
9886
|
`;
|
|
8383
9887
|
}
|
|
8384
9888
|
|
|
8385
|
-
return x
|
|
9889
|
+
return x`
|
|
9890
|
+
<div class="${this.wrapperClasses}">
|
|
9891
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9892
|
+
</div>
|
|
9893
|
+
`;
|
|
8386
9894
|
}
|
|
8387
9895
|
}
|
|
8388
9896
|
|
|
8389
|
-
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}`;
|
|
9897
|
+
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{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}: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([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
8390
9898
|
|
|
8391
|
-
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-
|
|
9899
|
+
var colorCss$1 = i$5`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected]:hover),:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus:hover),:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]:focus:hover),:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}`;
|
|
8392
9900
|
|
|
8393
9901
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8394
9902
|
// See LICENSE in the project root for license information.
|
|
@@ -8661,7 +10169,8 @@ class AuroIcon extends BaseIcon {
|
|
|
8661
10169
|
* Allows custom color to be set.
|
|
8662
10170
|
*/
|
|
8663
10171
|
customColor: {
|
|
8664
|
-
type: Boolean
|
|
10172
|
+
type: Boolean,
|
|
10173
|
+
reflect: true
|
|
8665
10174
|
},
|
|
8666
10175
|
|
|
8667
10176
|
/**
|
|
@@ -8736,8 +10245,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8736
10245
|
async firstUpdated() {
|
|
8737
10246
|
await super.firstUpdated();
|
|
8738
10247
|
|
|
8739
|
-
|
|
8740
|
-
|
|
10248
|
+
/**
|
|
10249
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
10250
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
10251
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
10252
|
+
*/
|
|
10253
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8741
10254
|
const svgDesc = this.svg.querySelector('desc');
|
|
8742
10255
|
|
|
8743
10256
|
if (svgDesc) {
|
|
@@ -8781,7 +10294,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8781
10294
|
}
|
|
8782
10295
|
}
|
|
8783
10296
|
|
|
8784
|
-
var iconVersion = '8.
|
|
10297
|
+
var iconVersion = '8.1.1';
|
|
8785
10298
|
|
|
8786
10299
|
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>"};
|
|
8787
10300
|
|
|
@@ -8799,10 +10312,20 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8799
10312
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8800
10313
|
* @slot - Specifies text for an option, but is not the value.
|
|
8801
10314
|
*/
|
|
8802
|
-
class AuroMenuOption extends
|
|
10315
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8803
10316
|
constructor() {
|
|
8804
10317
|
super();
|
|
8805
10318
|
|
|
10319
|
+
/**
|
|
10320
|
+
* @private
|
|
10321
|
+
*/
|
|
10322
|
+
this.shape = undefined;
|
|
10323
|
+
|
|
10324
|
+
/**
|
|
10325
|
+
* @private
|
|
10326
|
+
*/
|
|
10327
|
+
this.size = undefined;
|
|
10328
|
+
|
|
8806
10329
|
/**
|
|
8807
10330
|
* Generate unique names for dependency components.
|
|
8808
10331
|
*/
|
|
@@ -8821,11 +10344,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8821
10344
|
/**
|
|
8822
10345
|
* @private
|
|
8823
10346
|
*/
|
|
8824
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10347
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
8825
10348
|
}
|
|
8826
10349
|
|
|
8827
10350
|
static get properties() {
|
|
8828
10351
|
return {
|
|
10352
|
+
...super.properties,
|
|
8829
10353
|
nocheckmark: {
|
|
8830
10354
|
type: Boolean,
|
|
8831
10355
|
reflect: true
|
|
@@ -8865,13 +10389,20 @@ class AuroMenuOption extends i$2 {
|
|
|
8865
10389
|
*
|
|
8866
10390
|
*/
|
|
8867
10391
|
static register(name = "auro-menuoption") {
|
|
8868
|
-
AuroLibraryRuntimeUtils$
|
|
10392
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
8869
10393
|
}
|
|
8870
10394
|
|
|
8871
10395
|
firstUpdated() {
|
|
8872
10396
|
// Add the tag name as an attribute if it is different than the component name
|
|
8873
10397
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
|
|
8874
10398
|
|
|
10399
|
+
if (!this.hasAttribute('size')) {
|
|
10400
|
+
this.size = this.parentElement.getAttribute('size') || 'sm';
|
|
10401
|
+
}
|
|
10402
|
+
if (!this.hasAttribute('shape')) {
|
|
10403
|
+
this.shape = this.parentElement.getAttribute('shape') || 'box';
|
|
10404
|
+
}
|
|
10405
|
+
|
|
8875
10406
|
this.setAttribute('role', 'option');
|
|
8876
10407
|
this.setAttribute('aria-selected', 'false');
|
|
8877
10408
|
|
|
@@ -8887,6 +10418,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8887
10418
|
|
|
8888
10419
|
// observer for selected property changes
|
|
8889
10420
|
updated(changedProperties) {
|
|
10421
|
+
super.updated(changedProperties);
|
|
10422
|
+
|
|
8890
10423
|
if (changedProperties.has('selected')) {
|
|
8891
10424
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8892
10425
|
}
|
|
@@ -8905,13 +10438,36 @@ class AuroMenuOption extends i$2 {
|
|
|
8905
10438
|
|
|
8906
10439
|
svg.setAttribute('slot', 'svg');
|
|
8907
10440
|
|
|
8908
|
-
return u`<${this.iconTag} customColor customSvg
|
|
10441
|
+
return u`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
|
|
8909
10442
|
}
|
|
8910
10443
|
|
|
8911
|
-
|
|
10444
|
+
/**
|
|
10445
|
+
* Logic to determine the layout of the component.
|
|
10446
|
+
* @protected
|
|
10447
|
+
* @returns {void}
|
|
10448
|
+
*/
|
|
10449
|
+
renderLayout() {
|
|
10450
|
+
|
|
10451
|
+
const fontClassMap = {
|
|
10452
|
+
xs: 'body-sm',
|
|
10453
|
+
sm: 'body-default',
|
|
10454
|
+
md: 'body-default',
|
|
10455
|
+
lg: 'body-lg',
|
|
10456
|
+
xl: 'body-lg'
|
|
10457
|
+
};
|
|
10458
|
+
|
|
10459
|
+
const classes = e({
|
|
10460
|
+
'wrapper': true,
|
|
10461
|
+
[this.size ? fontClassMap[this.size] : 'body-sm']: true,
|
|
10462
|
+
});
|
|
10463
|
+
|
|
8912
10464
|
return u`
|
|
8913
|
-
${
|
|
8914
|
-
|
|
10465
|
+
<div class="${classes}">
|
|
10466
|
+
${this.selected && !this.nocheckmark
|
|
10467
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10468
|
+
: undefined}
|
|
10469
|
+
<slot></slot>
|
|
10470
|
+
</div>
|
|
8915
10471
|
`;
|
|
8916
10472
|
}
|
|
8917
10473
|
}
|
|
@@ -8933,7 +10489,6 @@ function initExamples(initCount) {
|
|
|
8933
10489
|
inDialogExample();
|
|
8934
10490
|
resetStateExample();
|
|
8935
10491
|
auroMenuLoadingExample();
|
|
8936
|
-
valueTextExample();
|
|
8937
10492
|
} catch (err) {
|
|
8938
10493
|
if (initCount <= 20) {
|
|
8939
10494
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|