@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.8 → 0.0.0-pr624.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1262 -81
- package/components/bibtemplate/dist/registered.js +1262 -81
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +49 -15
- package/components/checkbox/demo/api.min.js +74 -46
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +74 -46
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +73 -45
- package/components/checkbox/dist/registered.js +73 -45
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +115 -8
- package/components/combobox/demo/api.min.js +3148 -929
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +3148 -929
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/auro-combobox.d.ts +44 -12
- package/components/combobox/dist/index.js +2895 -816
- package/components/combobox/dist/registered.js +2895 -816
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +158 -21
- package/components/counter/demo/api.min.js +3413 -729
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +185 -34
- package/components/counter/demo/index.min.js +3413 -729
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +161 -11
- package/components/counter/dist/auro-counter.d.ts +16 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3416 -732
- package/components/counter/dist/registered.js +3416 -732
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +59 -28
- package/components/datepicker/demo/api.min.js +7096 -3260
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +75 -8
- package/components/datepicker/demo/index.min.js +7096 -3260
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +151 -12
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +6810 -2974
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +6810 -2974
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +82 -275
- package/components/dropdown/demo/api.min.js +450 -261
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +92 -362
- package/components/dropdown/demo/index.min.js +450 -261
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +43 -83
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +449 -260
- package/components/dropdown/dist/registered.js +449 -260
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.min.js +2 -2
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +2 -2
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/auro-helptext.d.ts +0 -2
- package/components/helptext/dist/index.js +3 -5
- package/components/helptext/dist/registered.js +3 -5
- package/components/input/README.md +5 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +228 -130
- package/components/input/demo/api.min.js +908 -248
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.md +48 -32
- package/components/input/demo/index.min.js +908 -248
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +5 -2
- package/components/input/dist/auro-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts +38 -10
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +907 -247
- package/components/input/dist/registered.js +907 -247
- 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 +298 -63
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +298 -63
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +53 -7
- package/components/menu/dist/auro-menuoption.d.ts +21 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +283 -48
- package/components/menu/dist/registered.js +283 -48
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/menu/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +39 -9
- package/components/radio/demo/api.min.js +92 -96
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +92 -96
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +9 -12
- package/components/radio/dist/index.js +91 -95
- package/components/radio/dist/registered.js +91 -95
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +150 -121
- package/components/select/demo/api.min.js +2213 -693
- package/components/select/demo/index.html +17 -11
- package/components/select/demo/index.md +1066 -259
- package/components/select/demo/index.min.js +2214 -682
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +59 -21
- package/components/select/dist/index.js +2108 -716
- package/components/select/dist/registered.js +2108 -716
- package/package.json +31 -28
- /package/components/{datepicker/dist/styles/default/color-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/classic}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/styles/{emphasized → classic}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -90,17 +90,6 @@ function auroMenuLoadingExample() {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
function valueTextExample() {
|
|
94
|
-
const onValueTextSelectInput = (e) => {
|
|
95
|
-
const valueText = e.target.querySelector("[slot=valueText]");
|
|
96
|
-
|
|
97
|
-
valueText.textContent = e.detail.optionSelected.dataset.display;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const select = document.querySelector("#valueTextExample");
|
|
101
|
-
select.addEventListener('input', onValueTextSelectInput);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
93
|
/**
|
|
105
94
|
* @license
|
|
106
95
|
* Copyright 2019 Google LLC
|
|
@@ -112,7 +101,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
112
101
|
* @license
|
|
113
102
|
* Copyright 2017 Google LLC
|
|
114
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
115
|
-
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e
|
|
104
|
+
*/const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
|
|
116
105
|
|
|
117
106
|
/**
|
|
118
107
|
* @license
|
|
@@ -147,7 +136,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
147
136
|
*/
|
|
148
137
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
149
138
|
|
|
150
|
-
let AuroElement$
|
|
139
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
151
140
|
static get properties() {
|
|
152
141
|
return {
|
|
153
142
|
|
|
@@ -182,19 +171,22 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
182
171
|
}
|
|
183
172
|
|
|
184
173
|
resetShapeClasses() {
|
|
185
|
-
|
|
186
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
174
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
187
175
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
176
|
+
if (wrapper) {
|
|
177
|
+
wrapper.classList.forEach((className) => {
|
|
178
|
+
if (className.startsWith('shape-')) {
|
|
179
|
+
wrapper.classList.remove(className);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
194
182
|
|
|
183
|
+
if (this.shape && this.size) {
|
|
195
184
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
185
|
+
} else {
|
|
186
|
+
wrapper.classList.add('shape-none');
|
|
196
187
|
}
|
|
197
188
|
}
|
|
189
|
+
|
|
198
190
|
}
|
|
199
191
|
|
|
200
192
|
resetLayoutClasses() {
|
|
@@ -239,9 +231,9 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
239
231
|
}
|
|
240
232
|
};
|
|
241
233
|
|
|
242
|
-
var shapeSizeCss$
|
|
234
|
+
var shapeSizeCss$2 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
243
235
|
|
|
244
|
-
var tokensCss$5 = i$5`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-
|
|
236
|
+
var tokensCss$5 = i$5`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-select-outline-color: transparent}`;
|
|
245
237
|
|
|
246
238
|
class DateFormatter {
|
|
247
239
|
|
|
@@ -659,7 +651,7 @@ const {
|
|
|
659
651
|
|
|
660
652
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
661
653
|
|
|
662
|
-
let AuroLibraryRuntimeUtils$
|
|
654
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
663
655
|
|
|
664
656
|
/* eslint-disable jsdoc/require-param */
|
|
665
657
|
|
|
@@ -729,7 +721,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
729
721
|
class AuroFormValidation {
|
|
730
722
|
|
|
731
723
|
constructor() {
|
|
732
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
724
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
733
725
|
}
|
|
734
726
|
|
|
735
727
|
/**
|
|
@@ -789,19 +781,19 @@ class AuroFormValidation {
|
|
|
789
781
|
{
|
|
790
782
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
791
783
|
validity: 'tooShort',
|
|
792
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
784
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
793
785
|
},
|
|
794
786
|
{
|
|
795
787
|
check: (e) => e.value?.length > e.maxLength,
|
|
796
788
|
validity: 'tooLong',
|
|
797
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
789
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
798
790
|
}
|
|
799
791
|
],
|
|
800
792
|
pattern: [
|
|
801
793
|
{
|
|
802
794
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
803
795
|
validity: 'patternMismatch',
|
|
804
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
796
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
805
797
|
}
|
|
806
798
|
]
|
|
807
799
|
},
|
|
@@ -948,13 +940,24 @@ class AuroFormValidation {
|
|
|
948
940
|
this.getInputElements(elem);
|
|
949
941
|
this.getAuroInputs(elem);
|
|
950
942
|
|
|
951
|
-
//
|
|
943
|
+
// Check if validation should run
|
|
952
944
|
let validationShouldRun =
|
|
945
|
+
|
|
946
|
+
// If the validation was forced
|
|
953
947
|
force ||
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
948
|
+
|
|
949
|
+
// If the validation should run on input
|
|
950
|
+
elem.validateOnInput ||
|
|
951
|
+
|
|
952
|
+
// State-based checks
|
|
953
|
+
(
|
|
954
|
+
// Element is not currently focused
|
|
955
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
956
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
957
|
+
|
|
958
|
+
// And element has been touched or is untouched but has a value
|
|
959
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
960
|
+
);
|
|
958
961
|
|
|
959
962
|
if (elem.hasAttribute('error')) {
|
|
960
963
|
elem.validity = 'customError';
|
|
@@ -996,10 +999,10 @@ class AuroFormValidation {
|
|
|
996
999
|
if (!hasValue && elem.required && elem.touched) {
|
|
997
1000
|
elem.validity = 'valueMissing';
|
|
998
1001
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
999
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1002
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1000
1003
|
this.validateType(elem);
|
|
1001
1004
|
this.validateElementAttributes(elem);
|
|
1002
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
1005
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
1003
1006
|
this.validateElementAttributes(elem);
|
|
1004
1007
|
}
|
|
1005
1008
|
}
|
|
@@ -1008,7 +1011,9 @@ class AuroFormValidation {
|
|
|
1008
1011
|
elem.validity = this.auroInputElements[0].validity;
|
|
1009
1012
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1010
1013
|
|
|
1011
|
-
|
|
1014
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1015
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1016
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1012
1017
|
elem.validity = this.auroInputElements[1].validity;
|
|
1013
1018
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1014
1019
|
}
|
|
@@ -2820,7 +2825,7 @@ class AuroFloatingUI {
|
|
|
2820
2825
|
*/
|
|
2821
2826
|
mirrorSize() {
|
|
2822
2827
|
// mirror the boxsize from bibSizer
|
|
2823
|
-
if (this.element.bibSizer) {
|
|
2828
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2824
2829
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2825
2830
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2826
2831
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2956,6 +2961,7 @@ class AuroFloatingUI {
|
|
|
2956
2961
|
this.element.bib.style.left = "0px";
|
|
2957
2962
|
this.element.bib.style.width = '';
|
|
2958
2963
|
this.element.bib.style.height = '';
|
|
2964
|
+
this.element.style.contain = '';
|
|
2959
2965
|
|
|
2960
2966
|
// reset the size that was mirroring `size` css-part
|
|
2961
2967
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2980,6 +2986,7 @@ class AuroFloatingUI {
|
|
|
2980
2986
|
this.element.bib.style.position = '';
|
|
2981
2987
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2982
2988
|
this.element.isBibFullscreen = false;
|
|
2989
|
+
this.element.style.contain = 'layout';
|
|
2983
2990
|
}
|
|
2984
2991
|
|
|
2985
2992
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -3032,13 +3039,13 @@ class AuroFloatingUI {
|
|
|
3032
3039
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
3033
3040
|
return;
|
|
3034
3041
|
}
|
|
3035
|
-
|
|
3042
|
+
|
|
3036
3043
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
3037
3044
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
3038
3045
|
return;
|
|
3039
3046
|
}
|
|
3040
3047
|
|
|
3041
|
-
this.hideBib();
|
|
3048
|
+
this.hideBib("keydown");
|
|
3042
3049
|
}
|
|
3043
3050
|
|
|
3044
3051
|
setupHideHandlers() {
|
|
@@ -3063,7 +3070,7 @@ class AuroFloatingUI {
|
|
|
3063
3070
|
document.expandedAuroFormkitDropdown = null;
|
|
3064
3071
|
document.expandedAuroFloater = this;
|
|
3065
3072
|
} else {
|
|
3066
|
-
this.hideBib();
|
|
3073
|
+
this.hideBib("click");
|
|
3067
3074
|
}
|
|
3068
3075
|
}
|
|
3069
3076
|
};
|
|
@@ -3076,7 +3083,7 @@ class AuroFloatingUI {
|
|
|
3076
3083
|
// if something else is open, let it handle itself
|
|
3077
3084
|
return;
|
|
3078
3085
|
}
|
|
3079
|
-
this.hideBib();
|
|
3086
|
+
this.hideBib("keydown");
|
|
3080
3087
|
}
|
|
3081
3088
|
};
|
|
3082
3089
|
|
|
@@ -3159,7 +3166,11 @@ class AuroFloatingUI {
|
|
|
3159
3166
|
}
|
|
3160
3167
|
}
|
|
3161
3168
|
|
|
3162
|
-
|
|
3169
|
+
/**
|
|
3170
|
+
* Hides the floating UI element.
|
|
3171
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3172
|
+
*/
|
|
3173
|
+
hideBib(eventType = "unknown") {
|
|
3163
3174
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3164
3175
|
this.lockScroll(false);
|
|
3165
3176
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3170,7 +3181,7 @@ class AuroFloatingUI {
|
|
|
3170
3181
|
if (this.showing) {
|
|
3171
3182
|
this.cleanupHideHandlers();
|
|
3172
3183
|
this.showing = false;
|
|
3173
|
-
this.dispatchEventDropdownToggle();
|
|
3184
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3174
3185
|
}
|
|
3175
3186
|
}
|
|
3176
3187
|
document.expandedAuroFloater = null;
|
|
@@ -3179,11 +3190,13 @@ class AuroFloatingUI {
|
|
|
3179
3190
|
/**
|
|
3180
3191
|
* @private
|
|
3181
3192
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3193
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3182
3194
|
*/
|
|
3183
|
-
dispatchEventDropdownToggle() {
|
|
3195
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3184
3196
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3185
3197
|
detail: {
|
|
3186
3198
|
expanded: this.showing,
|
|
3199
|
+
eventType: eventType || "unknown",
|
|
3187
3200
|
},
|
|
3188
3201
|
composed: true
|
|
3189
3202
|
});
|
|
@@ -3193,7 +3206,7 @@ class AuroFloatingUI {
|
|
|
3193
3206
|
|
|
3194
3207
|
handleClick() {
|
|
3195
3208
|
if (this.element.isPopoverVisible) {
|
|
3196
|
-
this.hideBib();
|
|
3209
|
+
this.hideBib("click");
|
|
3197
3210
|
} else {
|
|
3198
3211
|
this.showBib();
|
|
3199
3212
|
}
|
|
@@ -3216,8 +3229,9 @@ class AuroFloatingUI {
|
|
|
3216
3229
|
// Space is included as it's expected behavior for interactive elements
|
|
3217
3230
|
|
|
3218
3231
|
const origin = event.composedPath()[0];
|
|
3219
|
-
if (event.key === 'Enter' || (
|
|
3220
|
-
|
|
3232
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3233
|
+
|
|
3234
|
+
event.preventDefault();
|
|
3221
3235
|
this.handleClick();
|
|
3222
3236
|
}
|
|
3223
3237
|
break;
|
|
@@ -3228,7 +3242,7 @@ class AuroFloatingUI {
|
|
|
3228
3242
|
break;
|
|
3229
3243
|
case 'mouseleave':
|
|
3230
3244
|
if (this.element.hoverToggle) {
|
|
3231
|
-
this.hideBib();
|
|
3245
|
+
this.hideBib("mouseleave");
|
|
3232
3246
|
}
|
|
3233
3247
|
break;
|
|
3234
3248
|
case 'focus':
|
|
@@ -3371,6 +3385,267 @@ class AuroFloatingUI {
|
|
|
3371
3385
|
}
|
|
3372
3386
|
}
|
|
3373
3387
|
|
|
3388
|
+
// Selectors for focusable elements
|
|
3389
|
+
const FOCUSABLE_SELECTORS = [
|
|
3390
|
+
'a[href]',
|
|
3391
|
+
'button:not([disabled])',
|
|
3392
|
+
'textarea:not([disabled])',
|
|
3393
|
+
'input:not([disabled])',
|
|
3394
|
+
'select:not([disabled])',
|
|
3395
|
+
'[role="tab"]:not([disabled])',
|
|
3396
|
+
'[role="link"]:not([disabled])',
|
|
3397
|
+
'[role="button"]:not([disabled])',
|
|
3398
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3399
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3400
|
+
];
|
|
3401
|
+
|
|
3402
|
+
// List of custom components that are known to be focusable
|
|
3403
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3404
|
+
'auro-checkbox',
|
|
3405
|
+
'auro-radio',
|
|
3406
|
+
'auro-dropdown',
|
|
3407
|
+
'auro-button',
|
|
3408
|
+
'auro-combobox',
|
|
3409
|
+
'auro-input',
|
|
3410
|
+
'auro-counter',
|
|
3411
|
+
'auro-menu',
|
|
3412
|
+
'auro-select',
|
|
3413
|
+
'auro-datepicker',
|
|
3414
|
+
'auro-hyperlink',
|
|
3415
|
+
'auro-accordion',
|
|
3416
|
+
];
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* Determines if a given element is a custom focusable component.
|
|
3420
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3421
|
+
*
|
|
3422
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3423
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3424
|
+
*/
|
|
3425
|
+
function isFocusableComponent(element) {
|
|
3426
|
+
const componentName = element.tagName.toLowerCase();
|
|
3427
|
+
|
|
3428
|
+
// Guard Clause: Element is a focusable component
|
|
3429
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3430
|
+
|
|
3431
|
+
// Guard Clause: Element is not disabled
|
|
3432
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3433
|
+
|
|
3434
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3435
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3436
|
+
|
|
3437
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3438
|
+
return true;
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
/**
|
|
3442
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3443
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3444
|
+
*
|
|
3445
|
+
* @param {HTMLElement} container The container to search within
|
|
3446
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3447
|
+
*/
|
|
3448
|
+
function getFocusableElements(container) {
|
|
3449
|
+
// Get elements in DOM order by walking the tree
|
|
3450
|
+
const orderedFocusableElements = [];
|
|
3451
|
+
|
|
3452
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3453
|
+
const collectFocusableElements = (root) => {
|
|
3454
|
+
// Check if current element is focusable
|
|
3455
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3456
|
+
// Check if this is a custom component that is focusable
|
|
3457
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3458
|
+
|
|
3459
|
+
if (isComponentFocusable) {
|
|
3460
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3461
|
+
orderedFocusableElements.push(root);
|
|
3462
|
+
return; // Skip traversing inside this component
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3465
|
+
// Check if the element itself matches any selector
|
|
3466
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3467
|
+
if (root.matches?.(selector)) {
|
|
3468
|
+
orderedFocusableElements.push(root);
|
|
3469
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
// Process shadow DOM only for non-Auro components
|
|
3474
|
+
if (root.shadowRoot) {
|
|
3475
|
+
// Process shadow DOM children in order
|
|
3476
|
+
if (root.shadowRoot.children) {
|
|
3477
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3478
|
+
collectFocusableElements(child);
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
// Process slots and their assigned nodes in order
|
|
3484
|
+
if (root.tagName === 'SLOT') {
|
|
3485
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3486
|
+
for (const node of assignedNodes) {
|
|
3487
|
+
collectFocusableElements(node);
|
|
3488
|
+
}
|
|
3489
|
+
} else {
|
|
3490
|
+
// Process light DOM children in order
|
|
3491
|
+
if (root.children) {
|
|
3492
|
+
Array.from(root.children).forEach(child => {
|
|
3493
|
+
collectFocusableElements(child);
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
};
|
|
3499
|
+
|
|
3500
|
+
// Start the traversal from the container
|
|
3501
|
+
collectFocusableElements(container);
|
|
3502
|
+
|
|
3503
|
+
// Remove duplicates that might have been collected through different paths
|
|
3504
|
+
// while preserving order
|
|
3505
|
+
const uniqueElements = [];
|
|
3506
|
+
const seen = new Set();
|
|
3507
|
+
|
|
3508
|
+
for (const element of orderedFocusableElements) {
|
|
3509
|
+
if (!seen.has(element)) {
|
|
3510
|
+
seen.add(element);
|
|
3511
|
+
uniqueElements.push(element);
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
return uniqueElements;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3520
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3521
|
+
*/
|
|
3522
|
+
class FocusTrap {
|
|
3523
|
+
/**
|
|
3524
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3525
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3526
|
+
*
|
|
3527
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3528
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3529
|
+
*/
|
|
3530
|
+
constructor(container) {
|
|
3531
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3532
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
this.container = container;
|
|
3536
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3537
|
+
|
|
3538
|
+
this._init();
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
/**
|
|
3542
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3543
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3544
|
+
*
|
|
3545
|
+
* @private
|
|
3546
|
+
*/
|
|
3547
|
+
_init() {
|
|
3548
|
+
|
|
3549
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3550
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3551
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3552
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
// Track tab direction
|
|
3556
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
/**
|
|
3560
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3561
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3562
|
+
*
|
|
3563
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3564
|
+
* @private
|
|
3565
|
+
*/
|
|
3566
|
+
_onKeydown = (e) => {
|
|
3567
|
+
|
|
3568
|
+
if (e.key === 'Tab') {
|
|
3569
|
+
|
|
3570
|
+
// Set the tab direction based on the key pressed
|
|
3571
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3572
|
+
|
|
3573
|
+
// Get the active element(s) in the document and shadow root
|
|
3574
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3575
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3576
|
+
let activeElement = document.activeElement;
|
|
3577
|
+
const actives = [activeElement];
|
|
3578
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3579
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3580
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
// Update the focusable elements
|
|
3584
|
+
const focusables = this._getFocusableElements();
|
|
3585
|
+
|
|
3586
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3587
|
+
const focusIndex =
|
|
3588
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3589
|
+
? focusables.length - 1
|
|
3590
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3591
|
+
? 0
|
|
3592
|
+
: null;
|
|
3593
|
+
|
|
3594
|
+
if (focusIndex !== null) {
|
|
3595
|
+
focusables[focusIndex].focus();
|
|
3596
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3597
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
};
|
|
3601
|
+
|
|
3602
|
+
/**
|
|
3603
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3604
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3605
|
+
*
|
|
3606
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3607
|
+
* @private
|
|
3608
|
+
*/
|
|
3609
|
+
_getFocusableElements() {
|
|
3610
|
+
// Use the imported utility function to get focusable elements
|
|
3611
|
+
const elements = getFocusableElements(this.container);
|
|
3612
|
+
|
|
3613
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3614
|
+
return elements;
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* Moves focus to the first focusable element within the container.
|
|
3619
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3620
|
+
*/
|
|
3621
|
+
focusFirstElement() {
|
|
3622
|
+
const focusables = this._getFocusableElements();
|
|
3623
|
+
if (focusables.length) focusables[0].focus();
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
/**
|
|
3627
|
+
* Moves focus to the last focusable element within the container.
|
|
3628
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3629
|
+
*/
|
|
3630
|
+
focusLastElement() {
|
|
3631
|
+
const focusables = this._getFocusableElements();
|
|
3632
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3635
|
+
/**
|
|
3636
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3637
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3638
|
+
*/
|
|
3639
|
+
disconnect() {
|
|
3640
|
+
|
|
3641
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3642
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3374
3649
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3375
3650
|
// See LICENSE in the project root for license information.
|
|
3376
3651
|
|
|
@@ -3477,7 +3752,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
3477
3752
|
return _fetchMap$2.get(uri);
|
|
3478
3753
|
};
|
|
3479
3754
|
|
|
3480
|
-
var styleCss$
|
|
3755
|
+
var styleCss$3$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
3481
3756
|
|
|
3482
3757
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3483
3758
|
// See LICENSE in the project root for license information.
|
|
@@ -3520,7 +3795,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3520
3795
|
|
|
3521
3796
|
static get styles() {
|
|
3522
3797
|
return i$5`
|
|
3523
|
-
${styleCss$
|
|
3798
|
+
${styleCss$3$2}
|
|
3524
3799
|
`;
|
|
3525
3800
|
}
|
|
3526
3801
|
|
|
@@ -3561,9 +3836,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3561
3836
|
}
|
|
3562
3837
|
};
|
|
3563
3838
|
|
|
3564
|
-
var tokensCss$2$
|
|
3839
|
+
var tokensCss$2$2 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
3565
3840
|
|
|
3566
|
-
var colorCss$3$
|
|
3841
|
+
var colorCss$3$2 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
3567
3842
|
|
|
3568
3843
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3569
3844
|
// See LICENSE in the project root for license information.
|
|
@@ -3721,9 +3996,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3721
3996
|
static get styles() {
|
|
3722
3997
|
return [
|
|
3723
3998
|
super.styles,
|
|
3724
|
-
i$5`${tokensCss$2$
|
|
3725
|
-
i$5`${styleCss$
|
|
3726
|
-
i$5`${colorCss$3$
|
|
3999
|
+
i$5`${tokensCss$2$2}`,
|
|
4000
|
+
i$5`${styleCss$3$2}`,
|
|
4001
|
+
i$5`${colorCss$3$2}`
|
|
3727
4002
|
];
|
|
3728
4003
|
}
|
|
3729
4004
|
|
|
@@ -3757,8 +4032,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3757
4032
|
async firstUpdated() {
|
|
3758
4033
|
await super.firstUpdated();
|
|
3759
4034
|
|
|
3760
|
-
|
|
3761
|
-
|
|
4035
|
+
/**
|
|
4036
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
4037
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
4038
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
4039
|
+
*/
|
|
4040
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3762
4041
|
const svgDesc = this.svg.querySelector('desc');
|
|
3763
4042
|
|
|
3764
4043
|
if (svgDesc) {
|
|
@@ -3804,11 +4083,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3804
4083
|
|
|
3805
4084
|
var iconVersion$2 = '6.1.2';
|
|
3806
4085
|
|
|
3807
|
-
var styleCss$
|
|
4086
|
+
var styleCss$2$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
3808
4087
|
|
|
3809
|
-
var colorCss$2$
|
|
4088
|
+
var colorCss$2$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3810
4089
|
|
|
3811
|
-
var tokensCss$1$
|
|
4090
|
+
var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3812
4091
|
|
|
3813
4092
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3814
4093
|
// See LICENSE in the project root for license information.
|
|
@@ -3829,7 +4108,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3829
4108
|
*/
|
|
3830
4109
|
|
|
3831
4110
|
class AuroDropdownBib extends i$2 {
|
|
3832
|
-
|
|
4111
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3833
4112
|
constructor() {
|
|
3834
4113
|
super();
|
|
3835
4114
|
|
|
@@ -3839,13 +4118,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3839
4118
|
this._mobileBreakpointValue = undefined;
|
|
3840
4119
|
|
|
3841
4120
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4121
|
+
|
|
4122
|
+
this.shape = "rounded";
|
|
4123
|
+
this.matchWidth = false;
|
|
3842
4124
|
}
|
|
3843
4125
|
|
|
3844
4126
|
static get styles() {
|
|
3845
4127
|
return [
|
|
3846
|
-
styleCss$
|
|
3847
|
-
colorCss$2$
|
|
3848
|
-
tokensCss$1$
|
|
4128
|
+
styleCss$2$2,
|
|
4129
|
+
colorCss$2$2,
|
|
4130
|
+
tokensCss$1$2
|
|
3849
4131
|
];
|
|
3850
4132
|
}
|
|
3851
4133
|
|
|
@@ -3876,6 +4158,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3876
4158
|
reflect: true
|
|
3877
4159
|
},
|
|
3878
4160
|
|
|
4161
|
+
/**
|
|
4162
|
+
* If declared, the bib width will match the trigger width.
|
|
4163
|
+
* @private
|
|
4164
|
+
*/
|
|
4165
|
+
matchWidth: {
|
|
4166
|
+
type: Boolean,
|
|
4167
|
+
reflect: true
|
|
4168
|
+
},
|
|
4169
|
+
|
|
3879
4170
|
/**
|
|
3880
4171
|
* If declared, will apply border-radius to the bib.
|
|
3881
4172
|
*/
|
|
@@ -3889,6 +4180,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3889
4180
|
*/
|
|
3890
4181
|
bibTemplate: {
|
|
3891
4182
|
type: Object
|
|
4183
|
+
},
|
|
4184
|
+
|
|
4185
|
+
shape: {
|
|
4186
|
+
type: String,
|
|
4187
|
+
reflect: true
|
|
3892
4188
|
}
|
|
3893
4189
|
};
|
|
3894
4190
|
}
|
|
@@ -3968,8 +4264,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3968
4264
|
|
|
3969
4265
|
// function that renders the HTML and CSS into the scope of the component
|
|
3970
4266
|
render() {
|
|
4267
|
+
const classes = {
|
|
4268
|
+
container: true
|
|
4269
|
+
};
|
|
4270
|
+
|
|
4271
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4272
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4273
|
+
classes[`shape-${this.shape}`] = true;
|
|
4274
|
+
|
|
3971
4275
|
return u`
|
|
3972
|
-
<div class="
|
|
4276
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3973
4277
|
<slot></slot>
|
|
3974
4278
|
</div>
|
|
3975
4279
|
`;
|
|
@@ -3978,21 +4282,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
3978
4282
|
|
|
3979
4283
|
var dropdownVersion$1 = '3.0.0';
|
|
3980
4284
|
|
|
3981
|
-
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
4285
|
+
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-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}`;
|
|
3982
4286
|
|
|
3983
|
-
var colorCss$1$2 = i$5`:host .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,:host(:not([ondark])) .wrapper:
|
|
4287
|
+
var colorCss$1$2 = i$5`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
3984
4288
|
|
|
3985
|
-
var
|
|
4289
|
+
var styleCss$1$2 = i$5`:host{display:block;position:relative}:host([open]){z-index:var(--depth-tooltip, 400)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
3986
4290
|
|
|
3987
|
-
var
|
|
4291
|
+
var classicColorCss = i$5``;
|
|
3988
4292
|
|
|
3989
|
-
var
|
|
4293
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}`;
|
|
3990
4294
|
|
|
3991
|
-
var
|
|
4295
|
+
var styleEmphasizedCss = i$5`.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3992
4296
|
|
|
3993
|
-
var
|
|
4297
|
+
var styleSnowflakeCss = i$5`:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3994
4298
|
|
|
3995
|
-
var
|
|
4299
|
+
var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
4300
|
+
|
|
4301
|
+
var styleCss$6 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
3996
4302
|
|
|
3997
4303
|
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3998
4304
|
|
|
@@ -4003,7 +4309,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
4003
4309
|
|
|
4004
4310
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4005
4311
|
|
|
4006
|
-
let AuroLibraryRuntimeUtils$
|
|
4312
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
4007
4313
|
|
|
4008
4314
|
/* eslint-disable jsdoc/require-param */
|
|
4009
4315
|
|
|
@@ -4072,8 +4378,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
4072
4378
|
|
|
4073
4379
|
/**
|
|
4074
4380
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
4075
|
-
*
|
|
4076
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
4077
4381
|
*/
|
|
4078
4382
|
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
4079
4383
|
|
|
@@ -4084,7 +4388,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4084
4388
|
this.onDark = false;
|
|
4085
4389
|
this.hasTextContent = false;
|
|
4086
4390
|
|
|
4087
|
-
AuroLibraryRuntimeUtils$
|
|
4391
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4088
4392
|
}
|
|
4089
4393
|
|
|
4090
4394
|
static get styles() {
|
|
@@ -4140,7 +4444,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4140
4444
|
*
|
|
4141
4445
|
*/
|
|
4142
4446
|
static register(name = "auro-helptext") {
|
|
4143
|
-
AuroLibraryRuntimeUtils$
|
|
4447
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
4144
4448
|
}
|
|
4145
4449
|
|
|
4146
4450
|
updated() {
|
|
@@ -4189,7 +4493,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4189
4493
|
// function that renders the HTML and CSS into the scope of the component
|
|
4190
4494
|
render() {
|
|
4191
4495
|
return x`
|
|
4192
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4496
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4193
4497
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4194
4498
|
</div>
|
|
4195
4499
|
`;
|
|
@@ -4198,7 +4502,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4198
4502
|
|
|
4199
4503
|
var helpTextVersion$1 = '1.0.0';
|
|
4200
4504
|
|
|
4201
|
-
let AuroElement$
|
|
4505
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4202
4506
|
static get properties() {
|
|
4203
4507
|
return {
|
|
4204
4508
|
|
|
@@ -4233,19 +4537,22 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4233
4537
|
}
|
|
4234
4538
|
|
|
4235
4539
|
resetShapeClasses() {
|
|
4236
|
-
|
|
4237
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4540
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4238
4541
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4542
|
+
if (wrapper) {
|
|
4543
|
+
wrapper.classList.forEach((className) => {
|
|
4544
|
+
if (className.startsWith('shape-')) {
|
|
4545
|
+
wrapper.classList.remove(className);
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4245
4548
|
|
|
4549
|
+
if (this.shape && this.size) {
|
|
4246
4550
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4551
|
+
} else {
|
|
4552
|
+
wrapper.classList.add('shape-none');
|
|
4247
4553
|
}
|
|
4248
4554
|
}
|
|
4555
|
+
|
|
4249
4556
|
}
|
|
4250
4557
|
|
|
4251
4558
|
resetLayoutClasses() {
|
|
@@ -4294,10 +4601,9 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4294
4601
|
// See LICENSE in the project root for license information.
|
|
4295
4602
|
|
|
4296
4603
|
|
|
4297
|
-
|
|
4298
|
-
|
|
4604
|
+
|
|
4605
|
+
/*
|
|
4299
4606
|
* @slot - Default slot for the popover content.
|
|
4300
|
-
* @slot label - Defines the content of the label.
|
|
4301
4607
|
* @slot helpText - Defines the content of the helpText.
|
|
4302
4608
|
* @slot trigger - Defines the content of the trigger.
|
|
4303
4609
|
* @csspart trigger - The trigger content container.
|
|
@@ -4307,7 +4613,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4307
4613
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4308
4614
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4309
4615
|
*/
|
|
4310
|
-
class AuroDropdown extends AuroElement$
|
|
4616
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4311
4617
|
constructor() {
|
|
4312
4618
|
super();
|
|
4313
4619
|
|
|
@@ -4316,23 +4622,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4316
4622
|
this.matchWidth = false;
|
|
4317
4623
|
this.noHideOnThisFocusLoss = false;
|
|
4318
4624
|
|
|
4319
|
-
this.errorMessage =
|
|
4625
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4320
4626
|
|
|
4321
4627
|
// Layout Config
|
|
4322
|
-
this.layout =
|
|
4323
|
-
this.shape =
|
|
4324
|
-
this.size =
|
|
4628
|
+
this.layout = undefined;
|
|
4629
|
+
this.shape = undefined;
|
|
4630
|
+
this.size = undefined;
|
|
4631
|
+
|
|
4325
4632
|
this.parentBorder = false;
|
|
4326
4633
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4634
|
+
/** @private */
|
|
4635
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4329
4636
|
|
|
4330
|
-
|
|
4331
|
-
return {
|
|
4332
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4333
|
-
};
|
|
4637
|
+
this.privateDefaults();
|
|
4334
4638
|
}
|
|
4335
4639
|
|
|
4640
|
+
/**
|
|
4641
|
+
* @private
|
|
4642
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4643
|
+
*/
|
|
4336
4644
|
get commonWrapperClasses() {
|
|
4337
4645
|
return {
|
|
4338
4646
|
'trigger': true,
|
|
@@ -4350,13 +4658,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4350
4658
|
privateDefaults() {
|
|
4351
4659
|
this.chevron = false;
|
|
4352
4660
|
this.disabled = false;
|
|
4661
|
+
this.disableFocusTrap = false;
|
|
4353
4662
|
this.error = false;
|
|
4354
|
-
this.inset = false;
|
|
4355
|
-
this.rounded = false;
|
|
4356
4663
|
this.tabIndex = 0;
|
|
4357
4664
|
this.noToggle = false;
|
|
4358
|
-
this.a11yAutocomplete = 'none';
|
|
4359
|
-
this.labeled = true;
|
|
4360
4665
|
this.a11yRole = 'button';
|
|
4361
4666
|
this.onDark = false;
|
|
4362
4667
|
this.showTriggerBorders = true;
|
|
@@ -4452,6 +4757,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4452
4757
|
this.floater.showBib();
|
|
4453
4758
|
}
|
|
4454
4759
|
|
|
4760
|
+
/**
|
|
4761
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4762
|
+
* If not, trigger element will get focus.
|
|
4763
|
+
*/
|
|
4764
|
+
focus() {
|
|
4765
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4766
|
+
this.focusTrap.focusFirstElement();
|
|
4767
|
+
} else {
|
|
4768
|
+
this.trigger.focus();
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4455
4772
|
// function to define props used within the scope of this component
|
|
4456
4773
|
static get properties() {
|
|
4457
4774
|
return {
|
|
@@ -4465,6 +4782,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4465
4782
|
reflect: true
|
|
4466
4783
|
},
|
|
4467
4784
|
|
|
4785
|
+
/**
|
|
4786
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4787
|
+
* @default false
|
|
4788
|
+
*/
|
|
4789
|
+
disableEventShow: {
|
|
4790
|
+
type: Boolean,
|
|
4791
|
+
reflect: true
|
|
4792
|
+
},
|
|
4793
|
+
|
|
4468
4794
|
/**
|
|
4469
4795
|
* If declared, applies a border around the trigger slot.
|
|
4470
4796
|
*/
|
|
@@ -4483,17 +4809,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4483
4809
|
},
|
|
4484
4810
|
|
|
4485
4811
|
/**
|
|
4486
|
-
* If declared, the dropdown
|
|
4812
|
+
* If declared, the dropdown is not interactive.
|
|
4487
4813
|
*/
|
|
4488
|
-
|
|
4814
|
+
disabled: {
|
|
4489
4815
|
type: Boolean,
|
|
4490
4816
|
reflect: true
|
|
4491
4817
|
},
|
|
4492
4818
|
|
|
4493
4819
|
/**
|
|
4494
|
-
* If declared, the
|
|
4820
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4495
4821
|
*/
|
|
4496
|
-
|
|
4822
|
+
disableFocusTrap: {
|
|
4497
4823
|
type: Boolean,
|
|
4498
4824
|
reflect: true
|
|
4499
4825
|
},
|
|
@@ -4538,27 +4864,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4538
4864
|
reflect: true
|
|
4539
4865
|
},
|
|
4540
4866
|
|
|
4541
|
-
/**
|
|
4542
|
-
* Makes the trigger to be full width of its parent container.
|
|
4543
|
-
*/
|
|
4544
|
-
fluid: {
|
|
4545
|
-
type: Boolean,
|
|
4546
|
-
reflect: true
|
|
4547
|
-
},
|
|
4548
|
-
|
|
4549
|
-
/**
|
|
4550
|
-
* If declared, will apply padding around trigger slot content.
|
|
4551
|
-
*/
|
|
4552
|
-
inset: {
|
|
4553
|
-
type: Boolean,
|
|
4554
|
-
reflect: true
|
|
4555
|
-
},
|
|
4556
|
-
|
|
4557
4867
|
/**
|
|
4558
4868
|
* If true, the dropdown bib is displayed.
|
|
4559
4869
|
*/
|
|
4560
4870
|
isPopoverVisible: {
|
|
4561
|
-
type: Boolean
|
|
4871
|
+
type: Boolean,
|
|
4872
|
+
reflect: true,
|
|
4873
|
+
attribute: 'open'
|
|
4562
4874
|
},
|
|
4563
4875
|
|
|
4564
4876
|
/**
|
|
@@ -4597,15 +4909,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4597
4909
|
reflect: true
|
|
4598
4910
|
},
|
|
4599
4911
|
|
|
4600
|
-
/**
|
|
4601
|
-
* Defines if there is a label preset.
|
|
4602
|
-
* @private
|
|
4603
|
-
*/
|
|
4604
|
-
labeled: {
|
|
4605
|
-
type: Boolean,
|
|
4606
|
-
reflect: true
|
|
4607
|
-
},
|
|
4608
|
-
|
|
4609
4912
|
/**
|
|
4610
4913
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4611
4914
|
* @private
|
|
@@ -4666,6 +4969,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4666
4969
|
reflect: true
|
|
4667
4970
|
},
|
|
4668
4971
|
|
|
4972
|
+
/**
|
|
4973
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4974
|
+
*/
|
|
4669
4975
|
onSlotChange: {
|
|
4670
4976
|
type: Function,
|
|
4671
4977
|
reflect: false
|
|
@@ -4680,14 +4986,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4680
4986
|
reflect: true
|
|
4681
4987
|
},
|
|
4682
4988
|
|
|
4683
|
-
/**
|
|
4684
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4685
|
-
*/
|
|
4686
|
-
rounded: {
|
|
4687
|
-
type: Boolean,
|
|
4688
|
-
reflect: true
|
|
4689
|
-
},
|
|
4690
|
-
|
|
4691
4989
|
/**
|
|
4692
4990
|
* @private
|
|
4693
4991
|
*/
|
|
@@ -4702,22 +5000,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4702
5000
|
type: String || undefined,
|
|
4703
5001
|
attribute: false,
|
|
4704
5002
|
reflect: false
|
|
4705
|
-
},
|
|
4706
|
-
|
|
4707
|
-
/**
|
|
4708
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4709
|
-
*/
|
|
4710
|
-
a11yAutocomplete: {
|
|
4711
|
-
type: String,
|
|
4712
|
-
attribute: false,
|
|
4713
5003
|
}
|
|
4714
5004
|
};
|
|
4715
5005
|
}
|
|
4716
5006
|
|
|
4717
5007
|
static get styles() {
|
|
4718
5008
|
return [
|
|
5009
|
+
styleCss$1$2,
|
|
5010
|
+
tokensCss$1$2,
|
|
4719
5011
|
colorCss$1$2,
|
|
4720
|
-
tokensCss$1$1,
|
|
4721
5012
|
|
|
4722
5013
|
// default layout
|
|
4723
5014
|
classicColorCss,
|
|
@@ -4729,7 +5020,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4729
5020
|
// snowflake layout
|
|
4730
5021
|
styleSnowflakeCss,
|
|
4731
5022
|
|
|
4732
|
-
shapeSizeCss
|
|
5023
|
+
shapeSizeCss$1
|
|
4733
5024
|
];
|
|
4734
5025
|
}
|
|
4735
5026
|
|
|
@@ -4779,13 +5070,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4779
5070
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4780
5071
|
this.handleTriggerContentSlotChange();
|
|
4781
5072
|
}
|
|
5073
|
+
}
|
|
4782
5074
|
|
|
5075
|
+
/**
|
|
5076
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
5077
|
+
* @private
|
|
5078
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
5079
|
+
*/
|
|
5080
|
+
handleDropdownToggle(event) {
|
|
5081
|
+
this.updateFocusTrap();
|
|
5082
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
5083
|
+
const eventType = event.detail.eventType || "unknown";
|
|
5084
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
5085
|
+
this.trigger.focus();
|
|
5086
|
+
}
|
|
4783
5087
|
}
|
|
4784
5088
|
|
|
4785
5089
|
firstUpdated() {
|
|
4786
5090
|
|
|
4787
5091
|
// Configure the floater to, this will generate the ID for the bib
|
|
4788
5092
|
this.floater.configure(this, 'auroDropdown');
|
|
5093
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4789
5094
|
|
|
4790
5095
|
/**
|
|
4791
5096
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4803,6 +5108,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4803
5108
|
|
|
4804
5109
|
// Add the tag name as an attribute if it is different than the component name
|
|
4805
5110
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
5111
|
+
|
|
5112
|
+
this.trigger.addEventListener('click', () => {
|
|
5113
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
5114
|
+
bubbles: true,
|
|
5115
|
+
composed: true
|
|
5116
|
+
}));
|
|
5117
|
+
});
|
|
4806
5118
|
}
|
|
4807
5119
|
|
|
4808
5120
|
/**
|
|
@@ -4846,70 +5158,33 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4846
5158
|
}
|
|
4847
5159
|
|
|
4848
5160
|
/**
|
|
4849
|
-
* Function to support @focusout event.
|
|
4850
5161
|
* @private
|
|
4851
|
-
* @return {void}
|
|
4852
5162
|
*/
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
5163
|
+
updateFocusTrap() {
|
|
5164
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5165
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5166
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5167
|
+
this.focusTrap.focusFirstElement();
|
|
5168
|
+
return;
|
|
5169
|
+
}
|
|
4856
5170
|
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
* @param {HTMLElement} element - Element to check.
|
|
4861
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4862
|
-
*/
|
|
4863
|
-
containsFocusableElement(element) {
|
|
4864
|
-
this.showTriggerBorders = true;
|
|
4865
|
-
|
|
4866
|
-
const nodes = [
|
|
4867
|
-
element,
|
|
4868
|
-
...element.children
|
|
4869
|
-
];
|
|
4870
|
-
|
|
4871
|
-
const focusableElements = [
|
|
4872
|
-
'a',
|
|
4873
|
-
'auro-hyperlink',
|
|
4874
|
-
'button',
|
|
4875
|
-
'auro-button',
|
|
4876
|
-
'input',
|
|
4877
|
-
'auro-input',
|
|
4878
|
-
];
|
|
4879
|
-
|
|
4880
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4881
|
-
|
|
4882
|
-
const result = nodes.some((node) => {
|
|
4883
|
-
const tagName = node.tagName.toLowerCase();
|
|
4884
|
-
|
|
4885
|
-
if (node.tabIndex > -1) {
|
|
4886
|
-
return true;
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
if (focusableElements.includes(tagName)) {
|
|
4890
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4891
|
-
return true;
|
|
4892
|
-
}
|
|
4893
|
-
if (!node.hasAttribute('disabled')) {
|
|
4894
|
-
return true;
|
|
4895
|
-
}
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4899
|
-
return true;
|
|
4900
|
-
}
|
|
4901
|
-
|
|
4902
|
-
return false;
|
|
4903
|
-
});
|
|
4904
|
-
|
|
4905
|
-
if (result) {
|
|
4906
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4907
|
-
const tagName = node.tagName.toLowerCase();
|
|
4908
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4909
|
-
});
|
|
5171
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5172
|
+
if (!this.focusTrap) {
|
|
5173
|
+
return;
|
|
4910
5174
|
}
|
|
4911
5175
|
|
|
4912
|
-
|
|
5176
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5177
|
+
this.focusTrap.disconnect();
|
|
5178
|
+
this.focusTrap = undefined;
|
|
5179
|
+
}
|
|
5180
|
+
|
|
5181
|
+
/**
|
|
5182
|
+
* Function to support @focusout event.
|
|
5183
|
+
* @private
|
|
5184
|
+
* @return {void}
|
|
5185
|
+
*/
|
|
5186
|
+
handleFocusout() {
|
|
5187
|
+
this.hasFocus = false;
|
|
4913
5188
|
}
|
|
4914
5189
|
|
|
4915
5190
|
/**
|
|
@@ -5005,14 +5280,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5005
5280
|
* @returns {void}
|
|
5006
5281
|
*/
|
|
5007
5282
|
handleTriggerContentSlotChange(event) {
|
|
5008
|
-
|
|
5009
5283
|
this.floater.handleTriggerTabIndex();
|
|
5010
5284
|
|
|
5011
5285
|
// Get the trigger
|
|
5012
5286
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5013
5287
|
|
|
5014
5288
|
// Get the trigger slot
|
|
5015
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5289
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
5016
5290
|
|
|
5017
5291
|
// If there's a trigger slot
|
|
5018
5292
|
if (triggerSlot) {
|
|
@@ -5024,7 +5298,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5024
5298
|
if (triggerContentNodes) {
|
|
5025
5299
|
|
|
5026
5300
|
// See if any of them are focusable elements
|
|
5027
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5301
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
5028
5302
|
|
|
5029
5303
|
// If any of them are focusable elements
|
|
5030
5304
|
if (this.triggerContentFocusable) {
|
|
@@ -5075,7 +5349,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5075
5349
|
*
|
|
5076
5350
|
* @private
|
|
5077
5351
|
* @method handleDefaultSlot
|
|
5078
|
-
* @param {Event} event - The event object representing the slot change.
|
|
5079
5352
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
5080
5353
|
*/
|
|
5081
5354
|
handleDefaultSlot() {
|
|
@@ -5085,29 +5358,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5085
5358
|
}
|
|
5086
5359
|
}
|
|
5087
5360
|
|
|
5088
|
-
/**
|
|
5089
|
-
* @private
|
|
5090
|
-
* @method handleLabelSlotChange
|
|
5091
|
-
* @param {event} event - The event object representing the slot change.
|
|
5092
|
-
* @description Handles the slot change event for the label slot.
|
|
5093
|
-
*/
|
|
5094
|
-
handleLabelSlotChange (event) {
|
|
5095
|
-
|
|
5096
|
-
// Get the nodes from the event
|
|
5097
|
-
const nodes = event.target.assignedNodes();
|
|
5098
|
-
|
|
5099
|
-
// Guard clause for no nodes
|
|
5100
|
-
if (!nodes) {
|
|
5101
|
-
return;
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
5105
|
-
const nodesArr = Array.from(nodes);
|
|
5106
|
-
|
|
5107
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
5108
|
-
this.labeled = nodesArr.length > 0;
|
|
5109
|
-
}
|
|
5110
|
-
|
|
5111
5361
|
/**
|
|
5112
5362
|
* Returns HTML for the common portion of the layouts.
|
|
5113
5363
|
* @private
|
|
@@ -5120,24 +5370,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5120
5370
|
<div
|
|
5121
5371
|
id="trigger"
|
|
5122
5372
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5123
|
-
tabindex="${this.tabIndex}"
|
|
5373
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5124
5374
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5125
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5126
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5375
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5376
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5127
5377
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5128
5378
|
@focusin="${this.handleFocusin}"
|
|
5129
5379
|
@blur="${this.handleFocusOut}">
|
|
5130
|
-
<div class="triggerContentWrapper">
|
|
5131
|
-
<
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
<div class="triggerContent">
|
|
5135
|
-
<slot
|
|
5136
|
-
name="trigger"
|
|
5137
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5138
|
-
</div>
|
|
5380
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5381
|
+
<slot
|
|
5382
|
+
name="trigger"
|
|
5383
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5139
5384
|
</div>
|
|
5140
|
-
${this.chevron
|
|
5385
|
+
${this.chevron ? u`
|
|
5141
5386
|
<div
|
|
5142
5387
|
id="showStateIcon"
|
|
5143
5388
|
class="chevron"
|
|
@@ -5158,11 +5403,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5158
5403
|
<div id="bibSizer" part="size"></div>
|
|
5159
5404
|
<${this.dropdownBibTag}
|
|
5160
5405
|
id="bib"
|
|
5406
|
+
shape="${this.shape}"
|
|
5161
5407
|
?data-show="${this.isPopoverVisible}"
|
|
5162
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5163
|
-
?common="${this.common}"
|
|
5164
|
-
?rounded="${this.common || this.rounded}"
|
|
5165
|
-
?inset="${this.common || this.inset}">
|
|
5408
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5166
5409
|
<div class="slotContent">
|
|
5167
5410
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5168
5411
|
</div>
|
|
@@ -5177,62 +5420,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5177
5420
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5178
5421
|
*/
|
|
5179
5422
|
renderLayoutClassic() {
|
|
5423
|
+
// TODO: check with Doug why this was never used?
|
|
5424
|
+
const helpTextClasses = {
|
|
5425
|
+
'helpText': true
|
|
5426
|
+
};
|
|
5180
5427
|
|
|
5181
5428
|
return u`
|
|
5182
|
-
|
|
5183
|
-
<div
|
|
5184
|
-
id="trigger"
|
|
5185
|
-
class="trigger"
|
|
5186
|
-
part="trigger"
|
|
5187
|
-
tabindex="${this.tabIndex}"
|
|
5188
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5189
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5190
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5191
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5192
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5193
|
-
>
|
|
5194
|
-
<div class="triggerContentWrapper">
|
|
5195
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5196
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5197
|
-
</label>
|
|
5198
|
-
<div class="triggerContent">
|
|
5199
|
-
<slot
|
|
5200
|
-
name="trigger"
|
|
5201
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5202
|
-
</div>
|
|
5203
|
-
</div>
|
|
5204
|
-
${this.chevron || this.common ? u`
|
|
5205
|
-
<div
|
|
5206
|
-
id="showStateIcon"
|
|
5207
|
-
part="chevron">
|
|
5208
|
-
<${this.iconTag}
|
|
5209
|
-
category="interface"
|
|
5210
|
-
name="chevron-down"
|
|
5211
|
-
?onDark="${this.onDark}"
|
|
5212
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5213
|
-
>
|
|
5214
|
-
</${this.iconTag}>
|
|
5215
|
-
</div>
|
|
5216
|
-
` : undefined }
|
|
5217
|
-
</div>
|
|
5218
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5219
|
-
<slot name="helpText"></slot>
|
|
5220
|
-
</${this.helpTextTag}>
|
|
5221
|
-
|
|
5222
|
-
<div id="bibSizer" part="size"></div>
|
|
5223
|
-
<${this.dropdownBibTag}
|
|
5224
|
-
id="bib"
|
|
5225
|
-
?data-show="${this.isPopoverVisible}"
|
|
5226
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5227
|
-
?common="${this.common}"
|
|
5228
|
-
?rounded="${this.common || this.rounded}"
|
|
5229
|
-
?inset="${this.common || this.inset}"
|
|
5230
|
-
>
|
|
5231
|
-
<div class="slotContent">
|
|
5232
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5233
|
-
</div>
|
|
5234
|
-
</${this.dropdownBibTag}>
|
|
5235
|
-
</div>
|
|
5429
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5236
5430
|
`;
|
|
5237
5431
|
}
|
|
5238
5432
|
|
|
@@ -5300,9 +5494,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5300
5494
|
|
|
5301
5495
|
var dropdownVersion = '3.0.0';
|
|
5302
5496
|
|
|
5303
|
-
var colorCss$
|
|
5497
|
+
var colorCss$3$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
5304
5498
|
|
|
5305
|
-
var styleCss$
|
|
5499
|
+
var styleCss$4$1 = i$5`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){box-sizing:border-box;padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
5306
5500
|
|
|
5307
5501
|
var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
5308
5502
|
|
|
@@ -5313,7 +5507,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5313
5507
|
|
|
5314
5508
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5315
5509
|
|
|
5316
|
-
let AuroLibraryRuntimeUtils$
|
|
5510
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5317
5511
|
|
|
5318
5512
|
/* eslint-disable jsdoc/require-param */
|
|
5319
5513
|
|
|
@@ -5345,77 +5539,1171 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
5345
5539
|
) {
|
|
5346
5540
|
return __Closest(base);
|
|
5347
5541
|
}
|
|
5348
|
-
/* eslint-enable jsdoc/require-param */
|
|
5542
|
+
/* eslint-enable jsdoc/require-param */
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
5546
|
+
* @param {Object} elem - The element to check.
|
|
5547
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5548
|
+
* @returns {void}
|
|
5549
|
+
*/
|
|
5550
|
+
handleComponentTagRename(elem, tagName) {
|
|
5551
|
+
const tag = tagName.toLowerCase();
|
|
5552
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5553
|
+
|
|
5554
|
+
if (elemTag !== tag) {
|
|
5555
|
+
elem.setAttribute(tag, true);
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
/**
|
|
5560
|
+
* Validates if an element is a specific Auro component.
|
|
5561
|
+
* @param {Object} elem - The element to validate.
|
|
5562
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5563
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5564
|
+
*/
|
|
5565
|
+
elementMatch(elem, tagName) {
|
|
5566
|
+
const tag = tagName.toLowerCase();
|
|
5567
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5568
|
+
|
|
5569
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5570
|
+
}
|
|
5571
|
+
};
|
|
5572
|
+
|
|
5573
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5574
|
+
// See LICENSE in the project root for license information.
|
|
5575
|
+
|
|
5576
|
+
|
|
5577
|
+
class AuroDependencyVersioning {
|
|
5578
|
+
|
|
5579
|
+
/**
|
|
5580
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5581
|
+
* @private
|
|
5582
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5583
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5584
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5585
|
+
*/
|
|
5586
|
+
generateElementName(baseName, version) {
|
|
5587
|
+
let result = baseName;
|
|
5588
|
+
|
|
5589
|
+
result += '-';
|
|
5590
|
+
result += version.replace(/[.]/g, '_');
|
|
5591
|
+
|
|
5592
|
+
return result;
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
/**
|
|
5596
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5597
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5598
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5599
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5600
|
+
*/
|
|
5601
|
+
generateTag(baseName, version, tagClass) {
|
|
5602
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5603
|
+
const tag = i`${s(elementName)}`;
|
|
5604
|
+
|
|
5605
|
+
if (!customElements.get(elementName)) {
|
|
5606
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
return tag;
|
|
5610
|
+
}
|
|
5611
|
+
}
|
|
5612
|
+
|
|
5613
|
+
/**
|
|
5614
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5615
|
+
*/
|
|
5616
|
+
const _observers = new WeakMap();
|
|
5617
|
+
|
|
5618
|
+
/**
|
|
5619
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5620
|
+
* Structure: {
|
|
5621
|
+
* host: {
|
|
5622
|
+
* matchers: Set<Function>,
|
|
5623
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5624
|
+
* }
|
|
5625
|
+
* }
|
|
5626
|
+
*/
|
|
5627
|
+
const _transportConfig = new WeakMap();
|
|
5628
|
+
|
|
5629
|
+
/**
|
|
5630
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5631
|
+
*
|
|
5632
|
+
* @param {Object} params - The parameters for the function.
|
|
5633
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5634
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5635
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5636
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5637
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5638
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5639
|
+
*/
|
|
5640
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5641
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5642
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5643
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5644
|
+
}
|
|
5645
|
+
|
|
5646
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5647
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5648
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
// Guard Clause: Ensure match is a function
|
|
5652
|
+
if (typeof match !== 'function') {
|
|
5653
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5657
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5658
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
// Register this transport and get cleanup function
|
|
5662
|
+
return _registerTransport({
|
|
5663
|
+
host,
|
|
5664
|
+
target,
|
|
5665
|
+
matcher: match,
|
|
5666
|
+
removeOriginal
|
|
5667
|
+
});
|
|
5668
|
+
};
|
|
5669
|
+
|
|
5670
|
+
/**
|
|
5671
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5672
|
+
*
|
|
5673
|
+
* @param {Object} params - The parameters object.
|
|
5674
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5675
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5676
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5677
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5678
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5679
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5680
|
+
* @private
|
|
5681
|
+
*/
|
|
5682
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5683
|
+
// Initialize config for this host if it doesn't exist
|
|
5684
|
+
if (!_transportConfig.has(host)) {
|
|
5685
|
+
_transportConfig.set(host, {
|
|
5686
|
+
matchers: new Set(),
|
|
5687
|
+
targets: new Map()
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
const config = _transportConfig.get(host);
|
|
5692
|
+
|
|
5693
|
+
// Add the matcher to the set of matchers for this host
|
|
5694
|
+
config.matchers.add(matcher);
|
|
5695
|
+
|
|
5696
|
+
// Initialize target entry if it doesn't exist
|
|
5697
|
+
if (!config.targets.has(target)) {
|
|
5698
|
+
config.targets.set(target, new Map());
|
|
5699
|
+
}
|
|
5700
|
+
|
|
5701
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5702
|
+
config.targets.get(target).set(matcher, {
|
|
5703
|
+
removeOriginal,
|
|
5704
|
+
currentAttributes: new Map()
|
|
5705
|
+
});
|
|
5706
|
+
|
|
5707
|
+
// Perform initial attribute transport
|
|
5708
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5709
|
+
|
|
5710
|
+
// Attach observer
|
|
5711
|
+
_attachObserver(host);
|
|
5712
|
+
|
|
5713
|
+
// Return cleanup function and utility functions
|
|
5714
|
+
return {
|
|
5715
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5716
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5717
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5718
|
+
}
|
|
5719
|
+
};
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5723
|
+
*
|
|
5724
|
+
* @param {HTMLElement} host - The host element
|
|
5725
|
+
* @param {HTMLElement} target - The target element
|
|
5726
|
+
* @param {Function} matcher - The matcher function
|
|
5727
|
+
* @private
|
|
5728
|
+
*/
|
|
5729
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5730
|
+
const config = _transportConfig.get(host);
|
|
5731
|
+
if (!config) return;
|
|
5732
|
+
|
|
5733
|
+
// Remove this matcher from this target
|
|
5734
|
+
const targetMatchers = config.targets.get(target);
|
|
5735
|
+
if (targetMatchers) {
|
|
5736
|
+
targetMatchers.delete(matcher);
|
|
5737
|
+
|
|
5738
|
+
// If this target has no more matchers, remove it
|
|
5739
|
+
if (targetMatchers.size === 0) {
|
|
5740
|
+
config.targets.delete(target);
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
// Check if this matcher is still used by any target
|
|
5745
|
+
let matcherStillUsed = false;
|
|
5746
|
+
for (const matcherMap of config.targets.values()) {
|
|
5747
|
+
if (matcherMap.has(matcher)) {
|
|
5748
|
+
matcherStillUsed = true;
|
|
5749
|
+
break;
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
|
|
5753
|
+
// If not used anymore, remove from matchers set
|
|
5754
|
+
if (!matcherStillUsed) {
|
|
5755
|
+
config.matchers.delete(matcher);
|
|
5756
|
+
}
|
|
5757
|
+
|
|
5758
|
+
// If no more targets or matchers, detach observer
|
|
5759
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5760
|
+
_detachObserver(host);
|
|
5761
|
+
}
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5766
|
+
*
|
|
5767
|
+
* @param {Object} params - The parameters object.
|
|
5768
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5769
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5770
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5771
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5772
|
+
* @returns {void}
|
|
5773
|
+
* @private
|
|
5774
|
+
*/
|
|
5775
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5776
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5777
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5778
|
+
.filter(attr => matcher(attr))
|
|
5779
|
+
.reduce((acc, attr) => {
|
|
5780
|
+
acc[attr] = host.getAttribute(attr);
|
|
5781
|
+
return acc;
|
|
5782
|
+
}, {});
|
|
5783
|
+
|
|
5784
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5785
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5786
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5787
|
+
target.setAttribute(key, value);
|
|
5788
|
+
if (removeOriginal) {
|
|
5789
|
+
host.removeAttribute(key);
|
|
5790
|
+
}
|
|
5791
|
+
});
|
|
5792
|
+
};
|
|
5793
|
+
|
|
5794
|
+
/**
|
|
5795
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5796
|
+
*
|
|
5797
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5798
|
+
* @returns {MutationObserver} The observer instance.
|
|
5799
|
+
* @private
|
|
5800
|
+
*/
|
|
5801
|
+
const _attachObserver = (host) => {
|
|
5802
|
+
// If an observer for this host already exists, return it
|
|
5803
|
+
if (_observers.has(host)) {
|
|
5804
|
+
return _observers.get(host);
|
|
5805
|
+
}
|
|
5806
|
+
|
|
5807
|
+
// Create a new MutationObserver
|
|
5808
|
+
const observer = new MutationObserver((mutations) => {
|
|
5809
|
+
const config = _transportConfig.get(host);
|
|
5810
|
+
if (!config) return;
|
|
5811
|
+
|
|
5812
|
+
// For each mutation affecting attributes
|
|
5813
|
+
mutations
|
|
5814
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5815
|
+
.forEach(mutation => {
|
|
5816
|
+
const attributeName = mutation.attributeName;
|
|
5817
|
+
|
|
5818
|
+
// Find matchers that care about this attribute
|
|
5819
|
+
for (const matcher of config.matchers) {
|
|
5820
|
+
if (matcher(attributeName)) {
|
|
5821
|
+
// For each target that uses this matcher
|
|
5822
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5823
|
+
if (matcherConfigs.has(matcher)) {
|
|
5824
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5825
|
+
_transportAttributes({
|
|
5826
|
+
host,
|
|
5827
|
+
target,
|
|
5828
|
+
matcher,
|
|
5829
|
+
removeOriginal
|
|
5830
|
+
});
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
});
|
|
5836
|
+
});
|
|
5837
|
+
|
|
5838
|
+
// Start observing attribute changes
|
|
5839
|
+
observer.observe(host, { attributes: true });
|
|
5840
|
+
|
|
5841
|
+
// Store the observer
|
|
5842
|
+
_observers.set(host, observer);
|
|
5843
|
+
|
|
5844
|
+
return observer;
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
/**
|
|
5848
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5849
|
+
*
|
|
5850
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5851
|
+
* @private
|
|
5852
|
+
*/
|
|
5853
|
+
const _detachObserver = (host) => {
|
|
5854
|
+
if (_observers.has(host)) {
|
|
5855
|
+
const observer = _observers.get(host);
|
|
5856
|
+
observer.disconnect();
|
|
5857
|
+
_observers.delete(host);
|
|
5858
|
+
}
|
|
5859
|
+
|
|
5860
|
+
// Clean up the transport config as well
|
|
5861
|
+
if (_transportConfig.has(host)) {
|
|
5862
|
+
_transportConfig.delete(host);
|
|
5863
|
+
}
|
|
5864
|
+
};
|
|
5865
|
+
|
|
5866
|
+
/**
|
|
5867
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5868
|
+
* @param {HTMLElement} host - The host element
|
|
5869
|
+
* @param {HTMLElement} target - The target element
|
|
5870
|
+
* @param {Function} matcher - The matcher function
|
|
5871
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5872
|
+
* @private
|
|
5873
|
+
*/
|
|
5874
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5875
|
+
const config = _transportConfig.get(host);
|
|
5876
|
+
if (!config) return undefined;
|
|
5877
|
+
|
|
5878
|
+
const targetMatchers = config.targets.get(target);
|
|
5879
|
+
if (!targetMatchers) return undefined;
|
|
5880
|
+
|
|
5881
|
+
return targetMatchers.get(matcher);
|
|
5882
|
+
};
|
|
5883
|
+
|
|
5884
|
+
/**
|
|
5885
|
+
* Sets an observed attribute value
|
|
5886
|
+
* @param {HTMLElement} host - The host element
|
|
5887
|
+
* @param {HTMLElement} target - The target element
|
|
5888
|
+
* @param {Function} matcher - The matcher function
|
|
5889
|
+
* @param {string} key - The attribute name
|
|
5890
|
+
* @param {string} value - The attribute value
|
|
5891
|
+
* @private
|
|
5892
|
+
*/
|
|
5893
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5894
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5895
|
+
if (matcherConfig) {
|
|
5896
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5897
|
+
}
|
|
5898
|
+
};
|
|
5899
|
+
|
|
5900
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5901
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5902
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5903
|
+
return undefined;
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5906
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5907
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5908
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5909
|
+
return [];
|
|
5910
|
+
};
|
|
5911
|
+
|
|
5912
|
+
const _matchers = {
|
|
5913
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5914
|
+
'role': attr => attr.match(/^role$/)
|
|
5915
|
+
};
|
|
5916
|
+
|
|
5917
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5918
|
+
return transportAttributes({
|
|
5919
|
+
host,
|
|
5920
|
+
target,
|
|
5921
|
+
match: attr => {
|
|
5922
|
+
for (const key in _matchers) {
|
|
5923
|
+
if (_matchers[key](attr)) return true;
|
|
5924
|
+
}
|
|
5925
|
+
return false;
|
|
5926
|
+
},
|
|
5927
|
+
removeOriginal
|
|
5928
|
+
});
|
|
5929
|
+
};
|
|
5930
|
+
|
|
5931
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5932
|
+
|
|
5933
|
+
/**
|
|
5934
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5935
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5936
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5937
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5938
|
+
* @private
|
|
5939
|
+
*/
|
|
5940
|
+
attributeWatcher;
|
|
5941
|
+
|
|
5942
|
+
static get properties() {
|
|
5943
|
+
return {
|
|
5944
|
+
|
|
5945
|
+
/**
|
|
5946
|
+
* Defines the layout of an element.
|
|
5947
|
+
* @default {'default'}
|
|
5948
|
+
*/
|
|
5949
|
+
layout: {
|
|
5950
|
+
type: String,
|
|
5951
|
+
attribute: "layout",
|
|
5952
|
+
reflect: true
|
|
5953
|
+
},
|
|
5954
|
+
|
|
5955
|
+
/**
|
|
5956
|
+
* Defines the shape of an element.
|
|
5957
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5958
|
+
* @default {'default'}
|
|
5959
|
+
*/
|
|
5960
|
+
shape: {
|
|
5961
|
+
type: String,
|
|
5962
|
+
attribute: "shape",
|
|
5963
|
+
reflect: true
|
|
5964
|
+
},
|
|
5965
|
+
|
|
5966
|
+
/**
|
|
5967
|
+
* Defines the size of an element.
|
|
5968
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5969
|
+
* @default {'md'}
|
|
5970
|
+
*/
|
|
5971
|
+
size: {
|
|
5972
|
+
type: String,
|
|
5973
|
+
attribute: "size",
|
|
5974
|
+
reflect: true
|
|
5975
|
+
},
|
|
5976
|
+
|
|
5977
|
+
/**
|
|
5978
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5979
|
+
* @default {false}
|
|
5980
|
+
*/
|
|
5981
|
+
onDark: {
|
|
5982
|
+
type: Boolean,
|
|
5983
|
+
attribute: "ondark",
|
|
5984
|
+
reflect: true
|
|
5985
|
+
},
|
|
5986
|
+
|
|
5987
|
+
/**
|
|
5988
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5989
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5990
|
+
* @type {HTMLElement|null}
|
|
5991
|
+
* @default {null}
|
|
5992
|
+
* @private
|
|
5993
|
+
*/
|
|
5994
|
+
wrapper: {
|
|
5995
|
+
attribute: false,
|
|
5996
|
+
reflect: false
|
|
5997
|
+
}
|
|
5998
|
+
};
|
|
5999
|
+
}
|
|
6000
|
+
|
|
6001
|
+
|
|
6002
|
+
|
|
6003
|
+
resetShapeClasses() {
|
|
6004
|
+
if (this.shape && this.size) {
|
|
6005
|
+
|
|
6006
|
+
if (this.wrapper) {
|
|
6007
|
+
this.wrapper.classList.forEach((className) => {
|
|
6008
|
+
if (className.startsWith('shape-')) {
|
|
6009
|
+
this.wrapper.classList.remove(className);
|
|
6010
|
+
}
|
|
6011
|
+
});
|
|
6012
|
+
|
|
6013
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
resetLayoutClasses() {
|
|
6019
|
+
if (this.layout) {
|
|
6020
|
+
if (this.wrapper) {
|
|
6021
|
+
this.wrapper.classList.forEach((className) => {
|
|
6022
|
+
if (className.startsWith('layout-')) {
|
|
6023
|
+
this.wrapper.classList.remove(className);
|
|
6024
|
+
}
|
|
6025
|
+
});
|
|
6026
|
+
|
|
6027
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
6028
|
+
}
|
|
6029
|
+
}
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
updateComponentArchitecture() {
|
|
6033
|
+
this.resetLayoutClasses();
|
|
6034
|
+
this.resetShapeClasses();
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
updated(changedProperties) {
|
|
6038
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
6039
|
+
this.updateComponentArchitecture();
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
|
|
6043
|
+
firstUpdated() {
|
|
6044
|
+
super.firstUpdated();
|
|
6045
|
+
|
|
6046
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
6047
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
6048
|
+
|
|
6049
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
6050
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
disconnectedCallback() {
|
|
6054
|
+
super.disconnectedCallback();
|
|
6055
|
+
|
|
6056
|
+
// Cleanup the ARIA observer if it exists
|
|
6057
|
+
if (this.attributeWatcher) {
|
|
6058
|
+
this.attributeWatcher.cleanup();
|
|
6059
|
+
this.attributeWatcher = null;
|
|
6060
|
+
}
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6063
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
6064
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
6065
|
+
render() {
|
|
6066
|
+
try {
|
|
6067
|
+
return this.renderLayout();
|
|
6068
|
+
} catch (error) {
|
|
6069
|
+
// failed to get the defined layout
|
|
6070
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
6071
|
+
|
|
6072
|
+
// fallback to the default layout
|
|
6073
|
+
return this.getLayout('default');
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
};
|
|
6077
|
+
|
|
6078
|
+
var styleCss$3$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset{padding-inline:var(--ds-size-150, 0.75rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-150, 0.75rem)*2)}:host([size=sm]) .inset{padding-inline:var(--ds-size-200, 1rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-200, 1rem)*2)}:host([size=md]) .inset{padding-inline:var(--ds-size-300, 1.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-300, 1.5rem)*2)}:host([size=lg]) .inset{padding-inline:var(--ds-size-400, 2rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-400, 2rem)*2)}:host([size=xl]) .inset{padding-inline:var(--ds-size-500, 2.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-500, 2.5rem)*2)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(0.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}`;
|
|
6079
|
+
|
|
6080
|
+
var colorCss$2$1 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus,.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color: transparent}.auro-button:not([ondark])[variant=tertiary]:focus,.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color: transparent}.auro-button:not([ondark])[variant=ghost]:focus,.auro-button:not([ondark])[variant=ghost]:focus-visible{border-color:transparent;--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus,.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus,.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus,.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus,.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color: transparent}.auro-button[ondark][variant=ghost]:focus,.auro-button[ondark][variant=ghost]:focus-visible{border-color:transparent;--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus,.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
6081
|
+
|
|
6082
|
+
var tokensCss$2$1 = i$5`:host(:not([onDark])){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color: transparent}:host([onDark]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color: transparent}`;
|
|
6083
|
+
|
|
6084
|
+
var shapeSize = i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px 0 0 24px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:0 24px 24px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}`;
|
|
6085
|
+
|
|
6086
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6087
|
+
// See LICENSE in the project root for license information.
|
|
6088
|
+
|
|
6089
|
+
// ---------------------------------------------------------------------
|
|
6090
|
+
|
|
6091
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6092
|
+
|
|
6093
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6094
|
+
|
|
6095
|
+
/* eslint-disable jsdoc/require-param */
|
|
6096
|
+
|
|
6097
|
+
/**
|
|
6098
|
+
* This will register a new custom element with the browser.
|
|
6099
|
+
* @param {String} name - The name of the custom element.
|
|
6100
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6101
|
+
* @returns {void}
|
|
6102
|
+
*/
|
|
6103
|
+
registerComponent(name, componentClass) {
|
|
6104
|
+
if (!customElements.get(name)) {
|
|
6105
|
+
customElements.define(name, class extends componentClass {});
|
|
6106
|
+
}
|
|
6107
|
+
}
|
|
6108
|
+
|
|
6109
|
+
/**
|
|
6110
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6111
|
+
* @returns {void}
|
|
6112
|
+
*/
|
|
6113
|
+
closestElement(
|
|
6114
|
+
selector, // selector like in .closest()
|
|
6115
|
+
base = this, // extra functionality to skip a parent
|
|
6116
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6117
|
+
!el || el === document || el === window
|
|
6118
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6119
|
+
: found
|
|
6120
|
+
? found // found a selector INside this element
|
|
6121
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6122
|
+
) {
|
|
6123
|
+
return __Closest(base);
|
|
6124
|
+
}
|
|
6125
|
+
/* eslint-enable jsdoc/require-param */
|
|
6126
|
+
|
|
6127
|
+
/**
|
|
6128
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
6129
|
+
* @param {Object} elem - The element to check.
|
|
6130
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6131
|
+
* @returns {void}
|
|
6132
|
+
*/
|
|
6133
|
+
handleComponentTagRename(elem, tagName) {
|
|
6134
|
+
const tag = tagName.toLowerCase();
|
|
6135
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6136
|
+
|
|
6137
|
+
if (elemTag !== tag) {
|
|
6138
|
+
elem.setAttribute(tag, true);
|
|
6139
|
+
}
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
/**
|
|
6143
|
+
* Validates if an element is a specific Auro component.
|
|
6144
|
+
* @param {Object} elem - The element to validate.
|
|
6145
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6146
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6147
|
+
*/
|
|
6148
|
+
elementMatch(elem, tagName) {
|
|
6149
|
+
const tag = tagName.toLowerCase();
|
|
6150
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6151
|
+
|
|
6152
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6153
|
+
}
|
|
6154
|
+
};
|
|
6155
|
+
|
|
6156
|
+
var styleCss$2$1 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}`;
|
|
6157
|
+
|
|
6158
|
+
var colorCss$1$1 = i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
6159
|
+
|
|
6160
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6161
|
+
|
|
6162
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6163
|
+
// See LICENSE in the project root for license information.
|
|
6164
|
+
|
|
6165
|
+
|
|
6166
|
+
class AuroLoader extends i$2 {
|
|
6167
|
+
constructor() {
|
|
6168
|
+
super();
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* @private
|
|
6172
|
+
*/
|
|
6173
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6174
|
+
|
|
6175
|
+
/**
|
|
6176
|
+
* @private
|
|
6177
|
+
*/
|
|
6178
|
+
this.mdCount = 3;
|
|
6179
|
+
|
|
6180
|
+
/**
|
|
6181
|
+
* @private
|
|
6182
|
+
*/
|
|
6183
|
+
this.smCount = 2;
|
|
6184
|
+
|
|
6185
|
+
/**
|
|
6186
|
+
* @private
|
|
6187
|
+
*/
|
|
6188
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6189
|
+
|
|
6190
|
+
this.orbit = false;
|
|
6191
|
+
this.ringworm = false;
|
|
6192
|
+
this.laser = false;
|
|
6193
|
+
this.pulse = false;
|
|
6194
|
+
}
|
|
6195
|
+
|
|
6196
|
+
// function to define props used within the scope of this component
|
|
6197
|
+
static get properties() {
|
|
6198
|
+
return {
|
|
6199
|
+
|
|
6200
|
+
/**
|
|
6201
|
+
* Sets loader to laser type.
|
|
6202
|
+
*/
|
|
6203
|
+
laser: {
|
|
6204
|
+
type: Boolean,
|
|
6205
|
+
reflect: true
|
|
6206
|
+
},
|
|
6207
|
+
|
|
6208
|
+
/**
|
|
6209
|
+
* Sets loader to orbit type.
|
|
6210
|
+
*/
|
|
6211
|
+
orbit: {
|
|
6212
|
+
type: Boolean,
|
|
6213
|
+
reflect: true
|
|
6214
|
+
},
|
|
6215
|
+
|
|
6216
|
+
/**
|
|
6217
|
+
* Sets loader to pulse type.
|
|
6218
|
+
*/
|
|
6219
|
+
pulse: {
|
|
6220
|
+
type: Boolean,
|
|
6221
|
+
reflect: true
|
|
6222
|
+
},
|
|
6223
|
+
|
|
6224
|
+
/**
|
|
6225
|
+
* Sets loader to ringworm type.
|
|
6226
|
+
*/
|
|
6227
|
+
ringworm: {
|
|
6228
|
+
type: Boolean,
|
|
6229
|
+
reflect: true
|
|
6230
|
+
}
|
|
6231
|
+
};
|
|
6232
|
+
}
|
|
6233
|
+
|
|
6234
|
+
static get styles() {
|
|
6235
|
+
return [
|
|
6236
|
+
i$5`${styleCss$2$1}`,
|
|
6237
|
+
i$5`${colorCss$1$1}`,
|
|
6238
|
+
i$5`${tokensCss$1$1}`
|
|
6239
|
+
];
|
|
6240
|
+
}
|
|
6241
|
+
|
|
6242
|
+
/**
|
|
6243
|
+
* This will register this element with the browser.
|
|
6244
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6245
|
+
*
|
|
6246
|
+
* @example
|
|
6247
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6248
|
+
*
|
|
6249
|
+
*/
|
|
6250
|
+
static register(name = "auro-loader") {
|
|
6251
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6252
|
+
}
|
|
6253
|
+
|
|
6254
|
+
firstUpdated() {
|
|
6255
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6256
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6257
|
+
}
|
|
6258
|
+
|
|
6259
|
+
connectedCallback() {
|
|
6260
|
+
super.connectedCallback();
|
|
6261
|
+
}
|
|
6262
|
+
|
|
6263
|
+
/**
|
|
6264
|
+
* @private
|
|
6265
|
+
* @returns {Array} Numbered array for template map.
|
|
6266
|
+
*/
|
|
6267
|
+
defineTemplate() {
|
|
6268
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6269
|
+
|
|
6270
|
+
if (this.orbit || this.laser) {
|
|
6271
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6272
|
+
} else if (this.ringworm) {
|
|
6273
|
+
nodes = Array.from(Array(0).keys());
|
|
6274
|
+
}
|
|
6275
|
+
|
|
6276
|
+
return nodes;
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6280
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6281
|
+
|
|
6282
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6283
|
+
render() {
|
|
6284
|
+
return x`
|
|
6285
|
+
${this.defineTemplate().map((idx) => x`
|
|
6286
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6287
|
+
`)}
|
|
6288
|
+
|
|
6289
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6290
|
+
|
|
6291
|
+
${this.ringworm ? x`
|
|
6292
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6293
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6294
|
+
</svg>`
|
|
6295
|
+
: ``
|
|
6296
|
+
}
|
|
6297
|
+
`;
|
|
6298
|
+
}
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
var loaderVersion = '5.1.0';
|
|
6302
|
+
|
|
6303
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6304
|
+
// See LICENSE in the project root for license information.
|
|
6305
|
+
|
|
6306
|
+
|
|
6307
|
+
/**
|
|
6308
|
+
* @slot - Default slot for the text of the button.
|
|
6309
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6310
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6311
|
+
* @csspart text - Apply CSS to text slot.
|
|
6312
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6313
|
+
*/
|
|
6314
|
+
|
|
6315
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6316
|
+
|
|
6317
|
+
/**
|
|
6318
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6319
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6320
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6321
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6322
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6323
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6324
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6325
|
+
*/
|
|
6326
|
+
class AuroButton extends AuroElement$1 {
|
|
6327
|
+
|
|
6328
|
+
/**
|
|
6329
|
+
* Enables form association for this element.
|
|
6330
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6331
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6332
|
+
*/
|
|
6333
|
+
static get formAssociated() {
|
|
6334
|
+
return true;
|
|
6335
|
+
}
|
|
6336
|
+
|
|
6337
|
+
constructor() {
|
|
6338
|
+
super();
|
|
6339
|
+
this.autofocus = false;
|
|
6340
|
+
this.disabled = false;
|
|
6341
|
+
this.loading = false;
|
|
6342
|
+
this.size = "md";
|
|
6343
|
+
this.shape = "rounded";
|
|
6344
|
+
this.onDark = false;
|
|
6345
|
+
this.fluid = false;
|
|
6346
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6347
|
+
this.variant = 'primary';
|
|
6348
|
+
|
|
6349
|
+
// Support for HTML5 forms
|
|
6350
|
+
if (typeof this.attachInternals === 'function') {
|
|
6351
|
+
this.internals = this.attachInternals();
|
|
6352
|
+
} else {
|
|
6353
|
+
this.internals = null;
|
|
6354
|
+
|
|
6355
|
+
// eslint-disable-next-line no-console
|
|
6356
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
6357
|
+
}
|
|
6358
|
+
|
|
6359
|
+
/**
|
|
6360
|
+
* Generate unique names for dependency components.
|
|
6361
|
+
*/
|
|
6362
|
+
const versioning = new AuroDependencyVersioning();
|
|
6363
|
+
|
|
6364
|
+
/**
|
|
6365
|
+
* @private
|
|
6366
|
+
*/
|
|
6367
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6368
|
+
|
|
6369
|
+
/**
|
|
6370
|
+
* @private
|
|
6371
|
+
*/
|
|
6372
|
+
this.buttonHref = undefined;
|
|
6373
|
+
|
|
6374
|
+
/**
|
|
6375
|
+
* @private
|
|
6376
|
+
*/
|
|
6377
|
+
this.buttonTarget = undefined;
|
|
6378
|
+
|
|
6379
|
+
/**
|
|
6380
|
+
* @private
|
|
6381
|
+
*/
|
|
6382
|
+
this.buttonRel = undefined;
|
|
6383
|
+
}
|
|
6384
|
+
|
|
6385
|
+
static get styles() {
|
|
6386
|
+
return [
|
|
6387
|
+
tokensCss$2$1,
|
|
6388
|
+
styleCss$3$1,
|
|
6389
|
+
colorCss$2$1,
|
|
6390
|
+
shapeSize
|
|
6391
|
+
];
|
|
6392
|
+
}
|
|
6393
|
+
|
|
6394
|
+
static get properties() {
|
|
6395
|
+
return {
|
|
6396
|
+
|
|
6397
|
+
...super.properties,
|
|
6398
|
+
|
|
6399
|
+
/**
|
|
6400
|
+
* Override layout since it isn't used in this component.
|
|
6401
|
+
* @private
|
|
6402
|
+
*/
|
|
6403
|
+
layout: {
|
|
6404
|
+
type: Boolean,
|
|
6405
|
+
attribute: false,
|
|
6406
|
+
reflect: false
|
|
6407
|
+
},
|
|
6408
|
+
|
|
6409
|
+
/**
|
|
6410
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6411
|
+
*/
|
|
6412
|
+
autofocus: {
|
|
6413
|
+
type: Boolean,
|
|
6414
|
+
reflect: true
|
|
6415
|
+
},
|
|
6416
|
+
|
|
6417
|
+
/**
|
|
6418
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6419
|
+
*/
|
|
6420
|
+
disabled: {
|
|
6421
|
+
type: Boolean,
|
|
6422
|
+
reflect: true
|
|
6423
|
+
},
|
|
6424
|
+
|
|
6425
|
+
/**
|
|
6426
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6427
|
+
*/
|
|
6428
|
+
fluid: {
|
|
6429
|
+
type: Boolean,
|
|
6430
|
+
reflect: true
|
|
6431
|
+
},
|
|
6432
|
+
|
|
6433
|
+
/**
|
|
6434
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6435
|
+
*/
|
|
6436
|
+
loading: {
|
|
6437
|
+
type: Boolean,
|
|
6438
|
+
reflect: true
|
|
6439
|
+
},
|
|
6440
|
+
|
|
6441
|
+
/**
|
|
6442
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
6443
|
+
*/
|
|
6444
|
+
loadingText: {
|
|
6445
|
+
type: String
|
|
6446
|
+
},
|
|
6447
|
+
|
|
6448
|
+
/**
|
|
6449
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6450
|
+
*/
|
|
6451
|
+
tIndex: {
|
|
6452
|
+
type: String,
|
|
6453
|
+
reflect: true
|
|
6454
|
+
},
|
|
6455
|
+
|
|
6456
|
+
/**
|
|
6457
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6458
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6459
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6460
|
+
*/
|
|
6461
|
+
tabindex: {
|
|
6462
|
+
type: String,
|
|
6463
|
+
reflect: false
|
|
6464
|
+
},
|
|
6465
|
+
|
|
6466
|
+
/**
|
|
6467
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6468
|
+
*/
|
|
6469
|
+
title: {
|
|
6470
|
+
type: String,
|
|
6471
|
+
reflect: true
|
|
6472
|
+
},
|
|
6473
|
+
|
|
6474
|
+
/**
|
|
6475
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6476
|
+
*/
|
|
6477
|
+
type: {
|
|
6478
|
+
type: String,
|
|
6479
|
+
reflect: true
|
|
6480
|
+
},
|
|
6481
|
+
|
|
6482
|
+
/**
|
|
6483
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6484
|
+
*/
|
|
6485
|
+
value: {
|
|
6486
|
+
type: String,
|
|
6487
|
+
reflect: true
|
|
6488
|
+
},
|
|
6489
|
+
|
|
6490
|
+
/**
|
|
6491
|
+
* Sets button variant option.
|
|
6492
|
+
* @default primary
|
|
6493
|
+
*/
|
|
6494
|
+
variant: {
|
|
6495
|
+
type: String,
|
|
6496
|
+
reflect: true
|
|
6497
|
+
},
|
|
6498
|
+
|
|
6499
|
+
/**
|
|
6500
|
+
* @private
|
|
6501
|
+
*/
|
|
6502
|
+
buttonHref: {
|
|
6503
|
+
type: String,
|
|
6504
|
+
},
|
|
6505
|
+
|
|
6506
|
+
/**
|
|
6507
|
+
* @private
|
|
6508
|
+
*/
|
|
6509
|
+
buttonTarget: {
|
|
6510
|
+
type: String,
|
|
6511
|
+
},
|
|
6512
|
+
|
|
6513
|
+
/**
|
|
6514
|
+
* @private
|
|
6515
|
+
*/
|
|
6516
|
+
buttonRel: {
|
|
6517
|
+
type: String,
|
|
6518
|
+
},
|
|
6519
|
+
};
|
|
6520
|
+
}
|
|
6521
|
+
|
|
6522
|
+
/**
|
|
6523
|
+
* This will register this element with the browser.
|
|
6524
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6525
|
+
*
|
|
6526
|
+
* @example
|
|
6527
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6528
|
+
*
|
|
6529
|
+
*/
|
|
6530
|
+
static register(name = "auro-button") {
|
|
6531
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6532
|
+
}
|
|
6533
|
+
|
|
6534
|
+
/**
|
|
6535
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6536
|
+
* @private
|
|
6537
|
+
* @returns {void}
|
|
6538
|
+
*/
|
|
6539
|
+
focus() {
|
|
6540
|
+
this.renderRoot.querySelector('button').focus();
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6543
|
+
/**
|
|
6544
|
+
* Submits the form that this button is associated with.
|
|
6545
|
+
* @private
|
|
6546
|
+
* @returns {void}
|
|
6547
|
+
*/
|
|
6548
|
+
surfaceSubmitEvent() {
|
|
6549
|
+
if (this.form) {
|
|
6550
|
+
this.form.requestSubmit();
|
|
6551
|
+
}
|
|
6552
|
+
}
|
|
6553
|
+
|
|
6554
|
+
/**
|
|
6555
|
+
* Returns the form element that this button is associated with.
|
|
6556
|
+
* @private
|
|
6557
|
+
* @returns {HTMLFormElement | null}
|
|
6558
|
+
*/
|
|
6559
|
+
get form() {
|
|
6560
|
+
return this.internals ? this.internals.form : null;
|
|
6561
|
+
}
|
|
6562
|
+
|
|
6563
|
+
/**
|
|
6564
|
+
* @private
|
|
6565
|
+
* @returns {Boolean}
|
|
6566
|
+
*/
|
|
6567
|
+
get showText() {
|
|
6568
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
6569
|
+
}
|
|
5349
6570
|
|
|
5350
6571
|
/**
|
|
5351
|
-
*
|
|
5352
|
-
* @
|
|
5353
|
-
* @
|
|
5354
|
-
* @returns {void}
|
|
6572
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6573
|
+
* @returns {string | undefined}
|
|
6574
|
+
* @private
|
|
5355
6575
|
*/
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6576
|
+
get currentAriaLabel() {
|
|
6577
|
+
if (!this.attributeWatcher) return undefined;
|
|
5359
6578
|
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
}
|
|
6579
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6580
|
+
return ariaLabel || undefined;
|
|
5363
6581
|
}
|
|
5364
6582
|
|
|
5365
6583
|
/**
|
|
5366
|
-
*
|
|
5367
|
-
* @
|
|
5368
|
-
* @
|
|
5369
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6584
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6585
|
+
* @returns {string | undefined}
|
|
6586
|
+
* @private
|
|
5370
6587
|
*/
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6588
|
+
get currentAriaLabelledBy() {
|
|
6589
|
+
if (!this.attributeWatcher) return undefined;
|
|
5374
6590
|
|
|
5375
|
-
|
|
6591
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6592
|
+
return ariaLabelledBy || undefined;
|
|
5376
6593
|
}
|
|
5377
|
-
};
|
|
5378
|
-
|
|
5379
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5380
|
-
// See LICENSE in the project root for license information.
|
|
5381
6594
|
|
|
5382
|
-
|
|
5383
|
-
|
|
6595
|
+
/**
|
|
6596
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6597
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6598
|
+
* @private
|
|
6599
|
+
*/
|
|
6600
|
+
get iconOnly() {
|
|
6601
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6602
|
+
}
|
|
5384
6603
|
|
|
5385
6604
|
/**
|
|
5386
|
-
*
|
|
6605
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6606
|
+
* @returns {string} - The font size class name.
|
|
5387
6607
|
* @private
|
|
5388
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5389
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5390
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5391
6608
|
*/
|
|
5392
|
-
|
|
5393
|
-
let result = baseName;
|
|
6609
|
+
getFontSize() {
|
|
5394
6610
|
|
|
5395
|
-
|
|
5396
|
-
|
|
6611
|
+
// Size map for standard buttons
|
|
6612
|
+
const standardButtonSizeMap = {
|
|
6613
|
+
xs: 'body-xs',
|
|
6614
|
+
sm: 'body-sm',
|
|
6615
|
+
md: 'body-default',
|
|
6616
|
+
lg: 'body-lg',
|
|
6617
|
+
xl: 'body-lg'
|
|
6618
|
+
};
|
|
5397
6619
|
|
|
5398
|
-
|
|
6620
|
+
// Size map for icon-only buttons
|
|
6621
|
+
const iconOnlyButtonSizeMap = {
|
|
6622
|
+
xs: 'heading-xs',
|
|
6623
|
+
sm: 'heading-sm',
|
|
6624
|
+
md: 'heading-sm',
|
|
6625
|
+
lg: 'heading-md',
|
|
6626
|
+
xl: 'heading-lg'
|
|
6627
|
+
};
|
|
6628
|
+
|
|
6629
|
+
// Determine which map to use based on the shape
|
|
6630
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6631
|
+
|
|
6632
|
+
// Return the font size based on the button size and shape
|
|
6633
|
+
return sizeMap[this.size] || 'body-default';
|
|
5399
6634
|
}
|
|
5400
6635
|
|
|
5401
6636
|
/**
|
|
5402
|
-
*
|
|
5403
|
-
* @
|
|
5404
|
-
* @
|
|
5405
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6637
|
+
* Renders the default layout for the button.
|
|
6638
|
+
* @returns {TemplateResult}
|
|
6639
|
+
* @private
|
|
5406
6640
|
*/
|
|
5407
|
-
|
|
5408
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5409
|
-
const tag = i`${s(elementName)}`;
|
|
6641
|
+
renderLayoutDefault() {
|
|
5410
6642
|
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
6643
|
+
const fontSize = this.getFontSize();
|
|
6644
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6645
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5414
6646
|
|
|
5415
|
-
|
|
6647
|
+
const classes = {
|
|
6648
|
+
"auro-button": true,
|
|
6649
|
+
"inset": this.showText,
|
|
6650
|
+
wrapper: true,
|
|
6651
|
+
loading: this.loading,
|
|
6652
|
+
[`${fontSize}`]: true,
|
|
6653
|
+
|
|
6654
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6655
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6656
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6657
|
+
};
|
|
6658
|
+
|
|
6659
|
+
const contentClasses = {
|
|
6660
|
+
"contentWrapper": true,
|
|
6661
|
+
"util_displayHiddenVisually": this.loading
|
|
6662
|
+
};
|
|
6663
|
+
|
|
6664
|
+
return u`
|
|
6665
|
+
<${tag}
|
|
6666
|
+
part="${part}"
|
|
6667
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6668
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6669
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6670
|
+
?autofocus="${this.autofocus}"
|
|
6671
|
+
class=${e(classes)}
|
|
6672
|
+
?disabled="${this.disabled || this.loading}"
|
|
6673
|
+
?onDark="${this.onDark}"
|
|
6674
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6675
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6676
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6677
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6678
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6679
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6680
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6681
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6682
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6683
|
+
>
|
|
6684
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6685
|
+
|
|
6686
|
+
<span class="${e(contentClasses)}">
|
|
6687
|
+
<span class="textSlot" part="text">
|
|
6688
|
+
<slot></slot>
|
|
6689
|
+
</span>
|
|
6690
|
+
</span>
|
|
6691
|
+
</${tag}>
|
|
6692
|
+
`;
|
|
6693
|
+
}
|
|
6694
|
+
|
|
6695
|
+
/**
|
|
6696
|
+
* Renders the layout of the button.
|
|
6697
|
+
* @returns {TemplateResult}
|
|
6698
|
+
* @private
|
|
6699
|
+
*/
|
|
6700
|
+
renderLayout() {
|
|
6701
|
+
return this.renderLayoutDefault();
|
|
5416
6702
|
}
|
|
5417
6703
|
}
|
|
5418
6704
|
|
|
6705
|
+
var buttonVersion = '11.3.0';
|
|
6706
|
+
|
|
5419
6707
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5420
6708
|
// See LICENSE in the project root for license information.
|
|
5421
6709
|
|
|
@@ -5426,7 +6714,7 @@ class AuroDependencyVersioning {
|
|
|
5426
6714
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5427
6715
|
*/
|
|
5428
6716
|
|
|
5429
|
-
let AuroElement$
|
|
6717
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
5430
6718
|
|
|
5431
6719
|
// function to define props used within the scope of this component
|
|
5432
6720
|
static get properties() {
|
|
@@ -5494,7 +6782,7 @@ var styleCss$1$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
5494
6782
|
*/
|
|
5495
6783
|
|
|
5496
6784
|
// build the component class
|
|
5497
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
6785
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
5498
6786
|
constructor() {
|
|
5499
6787
|
super();
|
|
5500
6788
|
this.onDark = false;
|
|
@@ -5577,7 +6865,7 @@ var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5577
6865
|
|
|
5578
6866
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5579
6867
|
|
|
5580
|
-
let AuroLibraryRuntimeUtils$
|
|
6868
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5581
6869
|
|
|
5582
6870
|
/* eslint-disable jsdoc/require-param */
|
|
5583
6871
|
|
|
@@ -5659,7 +6947,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5659
6947
|
*/
|
|
5660
6948
|
privateDefaults() {
|
|
5661
6949
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5662
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6950
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5663
6951
|
}
|
|
5664
6952
|
|
|
5665
6953
|
// function to define props used within the scope of this component
|
|
@@ -5741,7 +7029,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5741
7029
|
*
|
|
5742
7030
|
*/
|
|
5743
7031
|
static register(name = "auro-icon") {
|
|
5744
|
-
AuroLibraryRuntimeUtils$
|
|
7032
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
5745
7033
|
}
|
|
5746
7034
|
|
|
5747
7035
|
connectedCallback() {
|
|
@@ -5762,8 +7050,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5762
7050
|
async firstUpdated() {
|
|
5763
7051
|
await super.firstUpdated();
|
|
5764
7052
|
|
|
5765
|
-
|
|
5766
|
-
|
|
7053
|
+
/**
|
|
7054
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
7055
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
7056
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
7057
|
+
*/
|
|
7058
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5767
7059
|
const svgDesc = this.svg.querySelector('desc');
|
|
5768
7060
|
|
|
5769
7061
|
if (svgDesc) {
|
|
@@ -5807,7 +7099,77 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5807
7099
|
}
|
|
5808
7100
|
};
|
|
5809
7101
|
|
|
5810
|
-
var iconVersion$1 = '8.0
|
|
7102
|
+
var iconVersion$1 = '8.1.0';
|
|
7103
|
+
|
|
7104
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7105
|
+
// See LICENSE in the project root for license information.
|
|
7106
|
+
|
|
7107
|
+
// ---------------------------------------------------------------------
|
|
7108
|
+
|
|
7109
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7110
|
+
|
|
7111
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7112
|
+
|
|
7113
|
+
/* eslint-disable jsdoc/require-param */
|
|
7114
|
+
|
|
7115
|
+
/**
|
|
7116
|
+
* This will register a new custom element with the browser.
|
|
7117
|
+
* @param {String} name - The name of the custom element.
|
|
7118
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7119
|
+
* @returns {void}
|
|
7120
|
+
*/
|
|
7121
|
+
registerComponent(name, componentClass) {
|
|
7122
|
+
if (!customElements.get(name)) {
|
|
7123
|
+
customElements.define(name, class extends componentClass {});
|
|
7124
|
+
}
|
|
7125
|
+
}
|
|
7126
|
+
|
|
7127
|
+
/**
|
|
7128
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7129
|
+
* @returns {void}
|
|
7130
|
+
*/
|
|
7131
|
+
closestElement(
|
|
7132
|
+
selector, // selector like in .closest()
|
|
7133
|
+
base = this, // extra functionality to skip a parent
|
|
7134
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7135
|
+
!el || el === document || el === window
|
|
7136
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7137
|
+
: found
|
|
7138
|
+
? found // found a selector INside this element
|
|
7139
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7140
|
+
) {
|
|
7141
|
+
return __Closest(base);
|
|
7142
|
+
}
|
|
7143
|
+
/* eslint-enable jsdoc/require-param */
|
|
7144
|
+
|
|
7145
|
+
/**
|
|
7146
|
+
* 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.
|
|
7147
|
+
* @param {Object} elem - The element to check.
|
|
7148
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7149
|
+
* @returns {void}
|
|
7150
|
+
*/
|
|
7151
|
+
handleComponentTagRename(elem, tagName) {
|
|
7152
|
+
const tag = tagName.toLowerCase();
|
|
7153
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7154
|
+
|
|
7155
|
+
if (elemTag !== tag) {
|
|
7156
|
+
elem.setAttribute(tag, true);
|
|
7157
|
+
}
|
|
7158
|
+
}
|
|
7159
|
+
|
|
7160
|
+
/**
|
|
7161
|
+
* Validates if an element is a specific Auro component.
|
|
7162
|
+
* @param {Object} elem - The element to validate.
|
|
7163
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7164
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7165
|
+
*/
|
|
7166
|
+
elementMatch(elem, tagName) {
|
|
7167
|
+
const tag = tagName.toLowerCase();
|
|
7168
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7169
|
+
|
|
7170
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7171
|
+
}
|
|
7172
|
+
};
|
|
5811
7173
|
|
|
5812
7174
|
var styleCss$5 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
5813
7175
|
|
|
@@ -5838,7 +7200,7 @@ class AuroHeader extends i$2 {
|
|
|
5838
7200
|
/**
|
|
5839
7201
|
* @private
|
|
5840
7202
|
*/
|
|
5841
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7203
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5842
7204
|
}
|
|
5843
7205
|
|
|
5844
7206
|
// function to define props used within the scope of this component
|
|
@@ -5868,7 +7230,7 @@ class AuroHeader extends i$2 {
|
|
|
5868
7230
|
*
|
|
5869
7231
|
*/
|
|
5870
7232
|
static register(name = "auro-header") {
|
|
5871
|
-
AuroLibraryRuntimeUtils$
|
|
7233
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5872
7234
|
}
|
|
5873
7235
|
|
|
5874
7236
|
firstUpdated() {
|
|
@@ -5964,17 +7326,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
5964
7326
|
|
|
5965
7327
|
this.large = false;
|
|
5966
7328
|
|
|
5967
|
-
AuroLibraryRuntimeUtils$
|
|
7329
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5968
7330
|
|
|
5969
7331
|
const versioning = new AuroDependencyVersioning();
|
|
7332
|
+
|
|
7333
|
+
/**
|
|
7334
|
+
* @private
|
|
7335
|
+
*/
|
|
5970
7336
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
7337
|
+
|
|
7338
|
+
/**
|
|
7339
|
+
* @private
|
|
7340
|
+
*/
|
|
5971
7341
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7342
|
+
|
|
7343
|
+
/**
|
|
7344
|
+
* @private
|
|
7345
|
+
*/
|
|
7346
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5972
7347
|
}
|
|
5973
7348
|
|
|
5974
7349
|
static get styles() {
|
|
5975
7350
|
return [
|
|
5976
|
-
colorCss$
|
|
5977
|
-
styleCss$
|
|
7351
|
+
colorCss$3$1,
|
|
7352
|
+
styleCss$4$1,
|
|
5978
7353
|
tokenCss
|
|
5979
7354
|
];
|
|
5980
7355
|
}
|
|
@@ -6003,7 +7378,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6003
7378
|
*
|
|
6004
7379
|
*/
|
|
6005
7380
|
static register(name = "auro-bibtemplate") {
|
|
6006
|
-
AuroLibraryRuntimeUtils$
|
|
7381
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
6007
7382
|
}
|
|
6008
7383
|
|
|
6009
7384
|
/**
|
|
@@ -6061,9 +7436,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6061
7436
|
<div id="bibTemplate" part="bibtemplate">
|
|
6062
7437
|
${this.isFullscreen ? u`
|
|
6063
7438
|
<div id="headerContainer">
|
|
6064
|
-
|
|
7439
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
6065
7440
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
6066
|
-
|
|
7441
|
+
</${this.buttonTag}>
|
|
6067
7442
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
6068
7443
|
<slot name="header"></slot>
|
|
6069
7444
|
</${this.headerTag}>
|
|
@@ -6087,9 +7462,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
6087
7462
|
|
|
6088
7463
|
var bibTemplateVersion = '1.0.0';
|
|
6089
7464
|
|
|
6090
|
-
var colorCss$3 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-
|
|
7465
|
+
var colorCss$3 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
6091
7466
|
|
|
6092
|
-
var styleCss$4 = i$5`.
|
|
7467
|
+
var styleCss$4 = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
6093
7468
|
|
|
6094
7469
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6095
7470
|
|
|
@@ -6169,8 +7544,6 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
6169
7544
|
|
|
6170
7545
|
/**
|
|
6171
7546
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6172
|
-
*
|
|
6173
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6174
7547
|
*/
|
|
6175
7548
|
class AuroHelpText extends i$2 {
|
|
6176
7549
|
|
|
@@ -6286,7 +7659,7 @@ class AuroHelpText extends i$2 {
|
|
|
6286
7659
|
// function that renders the HTML and CSS into the scope of the component
|
|
6287
7660
|
render() {
|
|
6288
7661
|
return x`
|
|
6289
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7662
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6290
7663
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6291
7664
|
</div>
|
|
6292
7665
|
`;
|
|
@@ -6295,68 +7668,7 @@ class AuroHelpText extends i$2 {
|
|
|
6295
7668
|
|
|
6296
7669
|
var helpTextVersion = '1.0.0';
|
|
6297
7670
|
|
|
6298
|
-
i$5
|
|
6299
|
-
|
|
6300
|
-
i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
6301
|
-
|
|
6302
|
-
i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
6303
|
-
|
|
6304
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6305
|
-
// See LICENSE in the project root for license information.
|
|
6306
|
-
|
|
6307
|
-
// ---------------------------------------------------------------------
|
|
6308
|
-
|
|
6309
|
-
/**
|
|
6310
|
-
* Converts value to an array.
|
|
6311
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6312
|
-
* If the value is already an array, it is returned.
|
|
6313
|
-
* If the value is undefined, it returns undefined.
|
|
6314
|
-
* @private
|
|
6315
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6316
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6317
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6318
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6319
|
-
*/
|
|
6320
|
-
function arrayConverter(value) {
|
|
6321
|
-
// Allow undefined
|
|
6322
|
-
if (value === undefined) {
|
|
6323
|
-
return undefined;
|
|
6324
|
-
}
|
|
6325
|
-
|
|
6326
|
-
// Return the value if it is already an array
|
|
6327
|
-
if (Array.isArray(value)) {
|
|
6328
|
-
return value;
|
|
6329
|
-
}
|
|
6330
|
-
|
|
6331
|
-
try {
|
|
6332
|
-
// If value is a JSON string, parse it
|
|
6333
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6334
|
-
|
|
6335
|
-
// Check if the parsed value is an array
|
|
6336
|
-
if (Array.isArray(parsed)) {
|
|
6337
|
-
return parsed;
|
|
6338
|
-
}
|
|
6339
|
-
} catch (error) {
|
|
6340
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6341
|
-
/* eslint-disable no-console */
|
|
6342
|
-
console.error('JSON parsing failed:', error);
|
|
6343
|
-
}
|
|
6344
|
-
|
|
6345
|
-
// Throw error if the input is not an array or undefined
|
|
6346
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6347
|
-
}
|
|
6348
|
-
|
|
6349
|
-
i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
6350
|
-
|
|
6351
|
-
i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
6352
|
-
|
|
6353
|
-
i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
6354
|
-
|
|
6355
|
-
i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
6356
|
-
|
|
6357
|
-
i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6358
|
-
|
|
6359
|
-
var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;justify-content:center;align-items:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
7671
|
+
var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host{display:inline-block}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
6360
7672
|
|
|
6361
7673
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6362
7674
|
// See LICENSE in the project root for license information.
|
|
@@ -6369,9 +7681,10 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6369
7681
|
* @slot - Default slot for the menu content.
|
|
6370
7682
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6371
7683
|
* @slot label - Defines the content of the label.
|
|
7684
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6372
7685
|
* @slot helpText - Defines the content of the helpText.
|
|
6373
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6374
7686
|
* @slot valueText - Dropdown value text display.
|
|
7687
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6375
7688
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6376
7689
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6377
7690
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6379,7 +7692,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6379
7692
|
*/
|
|
6380
7693
|
|
|
6381
7694
|
// build the component class
|
|
6382
|
-
class AuroSelect extends AuroElement$
|
|
7695
|
+
class AuroSelect extends AuroElement$4 {
|
|
6383
7696
|
constructor() {
|
|
6384
7697
|
super();
|
|
6385
7698
|
|
|
@@ -6389,11 +7702,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6389
7702
|
const idSubstrEnd = 8;
|
|
6390
7703
|
const idSubstrStart = 2;
|
|
6391
7704
|
|
|
6392
|
-
this.matchWidth =
|
|
7705
|
+
this.matchWidth = false;
|
|
6393
7706
|
|
|
6394
7707
|
// Layout Config
|
|
6395
|
-
this.layout = '
|
|
6396
|
-
this.shape = '
|
|
7708
|
+
this.layout = 'snowflake';
|
|
7709
|
+
this.shape = 'snowflake';
|
|
6397
7710
|
this.size = 'xl';
|
|
6398
7711
|
|
|
6399
7712
|
// floaterConfig
|
|
@@ -6404,6 +7717,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6404
7717
|
|
|
6405
7718
|
this.forceDisplayValue = false;
|
|
6406
7719
|
|
|
7720
|
+
this.layout = 'classic';
|
|
7721
|
+
this.shape = 'classic';
|
|
7722
|
+
this.size = 'xl';
|
|
7723
|
+
|
|
6407
7724
|
/**
|
|
6408
7725
|
* @private
|
|
6409
7726
|
*/
|
|
@@ -6419,7 +7736,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6419
7736
|
/**
|
|
6420
7737
|
* @private
|
|
6421
7738
|
*/
|
|
6422
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7739
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6423
7740
|
|
|
6424
7741
|
/**
|
|
6425
7742
|
* Generate unique names for dependency components.
|
|
@@ -6534,14 +7851,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6534
7851
|
reflect: true
|
|
6535
7852
|
},
|
|
6536
7853
|
|
|
6537
|
-
/**
|
|
6538
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6539
|
-
*/
|
|
6540
|
-
flexMenuWidth: {
|
|
6541
|
-
type: Boolean,
|
|
6542
|
-
reflect: true
|
|
6543
|
-
},
|
|
6544
|
-
|
|
6545
7854
|
/**
|
|
6546
7855
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6547
7856
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6635,7 +7944,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6635
7944
|
* "top" | "right" | "bottom" | "left" |
|
|
6636
7945
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6637
7946
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6638
|
-
* "left-start" | "left-end"
|
|
7947
|
+
* "left-start" | "left-end".
|
|
6639
7948
|
* @default bottom-start
|
|
6640
7949
|
*/
|
|
6641
7950
|
placement: {
|
|
@@ -6643,6 +7952,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6643
7952
|
reflect: true
|
|
6644
7953
|
},
|
|
6645
7954
|
|
|
7955
|
+
/**
|
|
7956
|
+
* Define custom placeholder text.
|
|
7957
|
+
*/
|
|
7958
|
+
placeholder: {
|
|
7959
|
+
type: String,
|
|
7960
|
+
reflect: true
|
|
7961
|
+
},
|
|
7962
|
+
|
|
6646
7963
|
/**
|
|
6647
7964
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6648
7965
|
*/
|
|
@@ -6689,11 +8006,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6689
8006
|
},
|
|
6690
8007
|
|
|
6691
8008
|
/**
|
|
6692
|
-
* Value selected for the component.
|
|
6693
|
-
* @type {String|Array<String>}
|
|
8009
|
+
* Value selected for the component.
|
|
6694
8010
|
*/
|
|
6695
8011
|
value: {
|
|
6696
|
-
type:
|
|
8012
|
+
type: String,
|
|
8013
|
+
reflect: true,
|
|
8014
|
+
attribute: 'value'
|
|
6697
8015
|
},
|
|
6698
8016
|
|
|
6699
8017
|
/**
|
|
@@ -6739,16 +8057,48 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6739
8057
|
|
|
6740
8058
|
static get styles() {
|
|
6741
8059
|
return [
|
|
6742
|
-
i$5`${shapeSizeCss$
|
|
8060
|
+
i$5`${shapeSizeCss$2}`,
|
|
6743
8061
|
i$5`${tokensCss$5}`,
|
|
6744
8062
|
i$5`${styleCss$3}`,
|
|
6745
8063
|
];
|
|
6746
8064
|
}
|
|
6747
8065
|
|
|
8066
|
+
/**
|
|
8067
|
+
* Formatted value based on `multiSelect` state.
|
|
8068
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
8069
|
+
* @private
|
|
8070
|
+
* @returns {String|Array<String>}
|
|
8071
|
+
*/
|
|
8072
|
+
get formattedValue() {
|
|
8073
|
+
if (this.multiSelect) {
|
|
8074
|
+
if (!this.value) {
|
|
8075
|
+
return undefined;
|
|
8076
|
+
}
|
|
8077
|
+
if (this.value.startsWith("[")) {
|
|
8078
|
+
return JSON.parse(this.value);
|
|
8079
|
+
}
|
|
8080
|
+
return [this.value];
|
|
8081
|
+
}
|
|
8082
|
+
return this.value;
|
|
8083
|
+
}
|
|
8084
|
+
|
|
8085
|
+
/**
|
|
8086
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
8087
|
+
* @private
|
|
8088
|
+
* @returns {void}
|
|
8089
|
+
*/
|
|
8090
|
+
get commonLabelClasses() {
|
|
8091
|
+
return {
|
|
8092
|
+
'is-disabled': this.disabled,
|
|
8093
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8094
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
8095
|
+
};
|
|
8096
|
+
}
|
|
8097
|
+
|
|
6748
8098
|
/**
|
|
6749
8099
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6750
8100
|
* @private
|
|
6751
|
-
* @
|
|
8101
|
+
* @returns {object} - Returns classmap.
|
|
6752
8102
|
*/
|
|
6753
8103
|
get commonWrapperClasses() {
|
|
6754
8104
|
return {
|
|
@@ -6766,10 +8116,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6766
8116
|
|
|
6767
8117
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6768
8118
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8119
|
+
|
|
8120
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8121
|
+
// wait til the bib gets fully rendered
|
|
8122
|
+
setTimeout(() => {
|
|
8123
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8124
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8125
|
+
this.dropdown.trigger.focus();
|
|
8126
|
+
|
|
8127
|
+
// default focus indicator on the first menu option
|
|
8128
|
+
if (this.menu.index < 0) {
|
|
8129
|
+
this.menu.navigateOptions('down');
|
|
8130
|
+
}
|
|
8131
|
+
}
|
|
8132
|
+
});
|
|
8133
|
+
}
|
|
6769
8134
|
});
|
|
6770
8135
|
|
|
6771
8136
|
// setting up bibtemplate
|
|
6772
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
8137
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6773
8138
|
|
|
6774
8139
|
if (this.customBibWidth) {
|
|
6775
8140
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6788,7 +8153,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6788
8153
|
*
|
|
6789
8154
|
*/
|
|
6790
8155
|
static register(name = "auro-select") {
|
|
6791
|
-
AuroLibraryRuntimeUtils$
|
|
8156
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6792
8157
|
}
|
|
6793
8158
|
|
|
6794
8159
|
/**
|
|
@@ -6848,6 +8213,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6848
8213
|
return;
|
|
6849
8214
|
}
|
|
6850
8215
|
|
|
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
|
+
|
|
6851
8225
|
if (this.multiSelect) {
|
|
6852
8226
|
this.menu.multiSelect = this.multiSelect;
|
|
6853
8227
|
}
|
|
@@ -6907,46 +8281,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6907
8281
|
configureSelect() {
|
|
6908
8282
|
|
|
6909
8283
|
this.addEventListener('keydown', (evt) => {
|
|
6910
|
-
|
|
6911
|
-
|
|
8284
|
+
// when the focus is on trigger not on close button
|
|
8285
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8286
|
+
if (evt.key === 'ArrowUp') {
|
|
8287
|
+
evt.preventDefault();
|
|
6912
8288
|
|
|
6913
|
-
|
|
8289
|
+
this.dropdown.show();
|
|
6914
8290
|
|
|
6915
|
-
|
|
6916
|
-
|
|
8291
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8292
|
+
this.menu.navigateOptions('up');
|
|
8293
|
+
}
|
|
8294
|
+
|
|
8295
|
+
return;
|
|
6917
8296
|
}
|
|
6918
8297
|
|
|
6919
|
-
|
|
6920
|
-
|
|
8298
|
+
if (evt.key === 'ArrowDown') {
|
|
8299
|
+
evt.preventDefault();
|
|
6921
8300
|
|
|
6922
|
-
|
|
6923
|
-
evt.preventDefault();
|
|
8301
|
+
this.dropdown.show();
|
|
6924
8302
|
|
|
6925
|
-
|
|
8303
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8304
|
+
this.menu.navigateOptions('down');
|
|
8305
|
+
}
|
|
6926
8306
|
|
|
6927
|
-
|
|
6928
|
-
this.menu.navigateOptions('down');
|
|
8307
|
+
return;
|
|
6929
8308
|
}
|
|
6930
8309
|
|
|
6931
|
-
|
|
6932
|
-
|
|
8310
|
+
if (evt.key === 'Enter') {
|
|
8311
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8312
|
+
evt.preventDefault();
|
|
8313
|
+
this.menu.makeSelection();
|
|
8314
|
+
}
|
|
6933
8315
|
|
|
6934
|
-
|
|
6935
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6936
|
-
evt.preventDefault();
|
|
6937
|
-
this.menu.makeSelection();
|
|
8316
|
+
return;
|
|
6938
8317
|
}
|
|
6939
|
-
|
|
6940
|
-
return;
|
|
6941
8318
|
}
|
|
6942
8319
|
|
|
6943
|
-
if (evt.key === 'Tab') {
|
|
8320
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6944
8321
|
if (this.dropdown.isBibFullscreen) {
|
|
6945
8322
|
evt.preventDefault();
|
|
8323
|
+
|
|
8324
|
+
// when the focus is on trigger not on close button
|
|
8325
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8326
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8327
|
+
// when bib it not open, it will focus onto trigger.
|
|
8328
|
+
this.dropdown.focus();
|
|
8329
|
+
} else {
|
|
8330
|
+
// when close button has the focus, move focus back to the trigger
|
|
8331
|
+
this.dropdown.trigger.focus();
|
|
8332
|
+
}
|
|
6946
8333
|
} else {
|
|
6947
8334
|
this.dropdown.hide();
|
|
6948
8335
|
}
|
|
6949
|
-
|
|
6950
8336
|
return;
|
|
6951
8337
|
}
|
|
6952
8338
|
|
|
@@ -7027,6 +8413,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7027
8413
|
}
|
|
7028
8414
|
}
|
|
7029
8415
|
|
|
8416
|
+
/**
|
|
8417
|
+
* Hides the dropdown bib if its open.
|
|
8418
|
+
* @returns {void}
|
|
8419
|
+
*/
|
|
8420
|
+
hideBib() {
|
|
8421
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8422
|
+
this.dropdown.hide();
|
|
8423
|
+
}
|
|
8424
|
+
}
|
|
8425
|
+
|
|
8426
|
+
/**
|
|
8427
|
+
* Shows the dropdown bib if there are options to show.
|
|
8428
|
+
* @returns {void}
|
|
8429
|
+
*/
|
|
8430
|
+
showBib() {
|
|
8431
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8432
|
+
this.dropdown.show();
|
|
8433
|
+
}
|
|
8434
|
+
}
|
|
8435
|
+
|
|
7030
8436
|
/**
|
|
7031
8437
|
* Function to support @focusin event.
|
|
7032
8438
|
* @private
|
|
@@ -7111,34 +8517,39 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7111
8517
|
// Add the tag name as an attribute if it is different than the component name
|
|
7112
8518
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7113
8519
|
|
|
7114
|
-
this.configureMenu();
|
|
7115
8520
|
this.configureDropdown();
|
|
8521
|
+
this.configureMenu();
|
|
7116
8522
|
this.configureSelect();
|
|
8523
|
+
}
|
|
7117
8524
|
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
8525
|
+
/**
|
|
8526
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8527
|
+
* @param {string} value - The value to set in the menu.
|
|
8528
|
+
* @returns {void}
|
|
8529
|
+
* @private
|
|
8530
|
+
*/
|
|
8531
|
+
async updateMenuValue(value) {
|
|
8532
|
+
if (!this.menu) return;
|
|
8533
|
+
|
|
8534
|
+
this.menu.setAttribute('value', value);
|
|
8535
|
+
this.menu.value = value;
|
|
8536
|
+
await this.menu.updateComplete;
|
|
7123
8537
|
}
|
|
7124
8538
|
|
|
7125
8539
|
async updated(changedProperties) {
|
|
7126
|
-
if (changedProperties.has('multiSelect')) {
|
|
8540
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
7127
8541
|
this.clearSelection();
|
|
7128
8542
|
}
|
|
7129
8543
|
|
|
7130
8544
|
if (changedProperties.has('value')) {
|
|
7131
8545
|
if (this.value) {
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
this.menu.value = this.value;
|
|
8546
|
+
await this.updateMenuValue(this.value);
|
|
7135
8547
|
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8548
|
+
if (this.menu) {
|
|
8549
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8550
|
+
}
|
|
7140
8551
|
} else {
|
|
7141
|
-
this.
|
|
8552
|
+
await this.updateMenuValue(undefined);
|
|
7142
8553
|
}
|
|
7143
8554
|
|
|
7144
8555
|
this._updateNativeSelect();
|
|
@@ -7157,7 +8568,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7157
8568
|
composed: true,
|
|
7158
8569
|
detail: {
|
|
7159
8570
|
optionSelected: this.optionSelected,
|
|
7160
|
-
value: this.
|
|
8571
|
+
value: this.formattedValue
|
|
7161
8572
|
}
|
|
7162
8573
|
}));
|
|
7163
8574
|
}
|
|
@@ -7169,6 +8580,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7169
8580
|
if (changedProperties.has('error')) {
|
|
7170
8581
|
this.validate(true);
|
|
7171
8582
|
}
|
|
8583
|
+
|
|
8584
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8585
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8586
|
+
}
|
|
8587
|
+
|
|
8588
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8589
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8590
|
+
}
|
|
7172
8591
|
}
|
|
7173
8592
|
|
|
7174
8593
|
/**
|
|
@@ -7179,16 +8598,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7179
8598
|
this.validation.reset(this);
|
|
7180
8599
|
}
|
|
7181
8600
|
|
|
7182
|
-
/**
|
|
7183
|
-
* Hide dropdownbib.
|
|
7184
|
-
* @private
|
|
7185
|
-
*/
|
|
7186
|
-
hideBib() {
|
|
7187
|
-
if (this.dropdown) {
|
|
7188
|
-
this.dropdown.hide();
|
|
7189
|
-
}
|
|
7190
|
-
}
|
|
7191
|
-
|
|
7192
8601
|
/**
|
|
7193
8602
|
* Validates value.
|
|
7194
8603
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7208,13 +8617,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7208
8617
|
const selectedValue = selectedOption.value;
|
|
7209
8618
|
|
|
7210
8619
|
if (this.multiSelect) {
|
|
7211
|
-
const currentArray =
|
|
8620
|
+
const currentArray = this.formattedValue;
|
|
7212
8621
|
|
|
7213
8622
|
if (!currentArray.includes(selectedValue)) {
|
|
7214
|
-
this.value = [
|
|
8623
|
+
this.value = JSON.stringify([
|
|
7215
8624
|
...currentArray,
|
|
7216
8625
|
selectedValue
|
|
7217
|
-
];
|
|
8626
|
+
]);
|
|
7218
8627
|
}
|
|
7219
8628
|
} else {
|
|
7220
8629
|
const currentValue = this.value;
|
|
@@ -7237,12 +8646,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7237
8646
|
}
|
|
7238
8647
|
|
|
7239
8648
|
if (this.multiSelect) {
|
|
7240
|
-
nativeSelect.value = this.
|
|
8649
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7241
8650
|
} else {
|
|
7242
8651
|
nativeSelect.value = this.value || '';
|
|
7243
8652
|
}
|
|
7244
8653
|
}
|
|
7245
8654
|
|
|
8655
|
+
/**
|
|
8656
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8657
|
+
* @private
|
|
8658
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8659
|
+
*/
|
|
7246
8660
|
renderAriaHtml() {
|
|
7247
8661
|
return u`
|
|
7248
8662
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7263,9 +8677,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7263
8677
|
`;
|
|
7264
8678
|
}
|
|
7265
8679
|
|
|
8680
|
+
/**
|
|
8681
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8682
|
+
* @private
|
|
8683
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8684
|
+
*/
|
|
7266
8685
|
renderNativeSelect() {
|
|
7267
8686
|
return u`
|
|
7268
|
-
<div class="nativeSelectWrapper">
|
|
8687
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7269
8688
|
<select
|
|
7270
8689
|
tabindex="-1"
|
|
7271
8690
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7302,14 +8721,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7302
8721
|
? u`
|
|
7303
8722
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7304
8723
|
<p id="${this.uniqueId}" part="helpText">
|
|
7305
|
-
<slot name="
|
|
8724
|
+
<slot name="helpText"></slot>
|
|
7306
8725
|
</p>
|
|
7307
8726
|
</${this.helpTextTag}>
|
|
7308
8727
|
`
|
|
7309
8728
|
: u`
|
|
7310
8729
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7311
8730
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7312
|
-
|
|
8731
|
+
${this.errorMessage}
|
|
7313
8732
|
</p>
|
|
7314
8733
|
</${this.helpTextTag}>
|
|
7315
8734
|
`
|
|
@@ -7322,17 +8741,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7322
8741
|
* @private
|
|
7323
8742
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7324
8743
|
*/
|
|
7325
|
-
// TODO update to use util class
|
|
7326
8744
|
renderLayoutEmphasized() {
|
|
7327
8745
|
const placeholderClass = {
|
|
7328
|
-
|
|
8746
|
+
'util_displayHidden': this.value
|
|
7329
8747
|
};
|
|
7330
8748
|
|
|
7331
8749
|
const displayValueClasses = {
|
|
7332
8750
|
'displayValue': true,
|
|
7333
8751
|
'hasContent': this.hasDisplayValueContent,
|
|
7334
8752
|
'hasFocus': this.isPopoverVisible,
|
|
7335
|
-
'withValue': this.value && this.value.length > 0,
|
|
8753
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7336
8754
|
'force': this.forceDisplayValue,
|
|
7337
8755
|
};
|
|
7338
8756
|
|
|
@@ -7349,16 +8767,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7349
8767
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7350
8768
|
</div>
|
|
7351
8769
|
<${this.dropdownTag}
|
|
8770
|
+
a11yRole="select"
|
|
7352
8771
|
?autoPlacement="${this.autoPlacement}"
|
|
7353
8772
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7354
|
-
?matchWidth="${
|
|
8773
|
+
?matchWidth="${this.matchWidth}"
|
|
7355
8774
|
?noFlip="${this.noFlip}"
|
|
7356
8775
|
?onDark="${this.onDark}"
|
|
7357
8776
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7358
8777
|
.offset="${this.offset}"
|
|
7359
8778
|
.placement="${this.placement}"
|
|
7360
8779
|
chevron
|
|
7361
|
-
fluid
|
|
7362
8780
|
for="selectMenu"
|
|
7363
8781
|
layout="${this.layout}"
|
|
7364
8782
|
part="dropdown"
|
|
@@ -7370,15 +8788,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7370
8788
|
</div>
|
|
7371
8789
|
<div class="mainContent">
|
|
7372
8790
|
<div class="${e(valueContainerClasses)}">
|
|
7373
|
-
<label>
|
|
8791
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7374
8792
|
<slot name="label"></slot>
|
|
8793
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7375
8794
|
</label>
|
|
7376
8795
|
<div class="value" id="value"></div>
|
|
7377
|
-
${
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
</div>
|
|
7381
|
-
`}
|
|
8796
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8797
|
+
${this.placeholder}
|
|
8798
|
+
</div>
|
|
7382
8799
|
</div>
|
|
7383
8800
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7384
8801
|
<slot name="displayValue"></slot>
|
|
@@ -7405,14 +8822,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7405
8822
|
*/
|
|
7406
8823
|
renderLayoutSnowflake() {
|
|
7407
8824
|
const placeholderClass = {
|
|
7408
|
-
|
|
8825
|
+
'util_displayHidden': this.value
|
|
7409
8826
|
};
|
|
7410
8827
|
|
|
7411
8828
|
const displayValueClasses = {
|
|
7412
8829
|
'displayValue': true,
|
|
7413
8830
|
'hasContent': this.hasDisplayValueContent,
|
|
7414
8831
|
'hasFocus': this.isPopoverVisible,
|
|
7415
|
-
'withValue': this.value && this.value.length > 0,
|
|
8832
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7416
8833
|
'force': this.forceDisplayValue,
|
|
7417
8834
|
};
|
|
7418
8835
|
|
|
@@ -7431,14 +8848,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7431
8848
|
<${this.dropdownTag}
|
|
7432
8849
|
?autoPlacement="${this.autoPlacement}"
|
|
7433
8850
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7434
|
-
?matchWidth="${
|
|
8851
|
+
?matchWidth="${this.matchWidth}"
|
|
7435
8852
|
?noFlip="${this.noFlip}"
|
|
7436
8853
|
?onDark="${this.onDark}"
|
|
7437
8854
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7438
8855
|
.offset="${this.offset}"
|
|
7439
8856
|
.placement="${this.placement}"
|
|
7440
8857
|
chevron
|
|
7441
|
-
fluid
|
|
7442
8858
|
for="selectMenu"
|
|
7443
8859
|
layout="${this.layout}"
|
|
7444
8860
|
part="dropdown"
|
|
@@ -7450,15 +8866,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7450
8866
|
</div>
|
|
7451
8867
|
<div class="mainContent">
|
|
7452
8868
|
<div class="${e(valueContainerClasses)}">
|
|
7453
|
-
<label>
|
|
8869
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7454
8870
|
<slot name="label"></slot>
|
|
8871
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7455
8872
|
</label>
|
|
7456
8873
|
<div class="value" id="value"></div>
|
|
7457
|
-
${
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
</div>
|
|
7461
|
-
`}
|
|
8874
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8875
|
+
${this.placeholder}
|
|
8876
|
+
</div>
|
|
7462
8877
|
</div>
|
|
7463
8878
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7464
8879
|
<slot name="displayValue"></slot>
|
|
@@ -7474,6 +8889,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7474
8889
|
${this.renderHtmlHelpText()}
|
|
7475
8890
|
</div>
|
|
7476
8891
|
</${this.dropdownTag}>
|
|
8892
|
+
${this.renderNativeSelect()}
|
|
7477
8893
|
</div>
|
|
7478
8894
|
`;
|
|
7479
8895
|
}
|
|
@@ -7484,11 +8900,75 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7484
8900
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7485
8901
|
*/
|
|
7486
8902
|
renderLayoutClassic() {
|
|
8903
|
+
const placeholderClass = {
|
|
8904
|
+
'util_displayHidden': this.value
|
|
8905
|
+
};
|
|
8906
|
+
|
|
8907
|
+
const displayValueClasses = {
|
|
8908
|
+
'displayValue': true,
|
|
8909
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8910
|
+
'hasFocus': this.isPopoverVisible,
|
|
8911
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8912
|
+
'force': this.forceDisplayValue,
|
|
8913
|
+
};
|
|
8914
|
+
|
|
8915
|
+
const valueContainerClasses = {
|
|
8916
|
+
'valueContainer': true,
|
|
8917
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8918
|
+
};
|
|
8919
|
+
|
|
7487
8920
|
return u`
|
|
7488
8921
|
<div
|
|
7489
|
-
class="${e(this.commonWrapperClasses)}
|
|
8922
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7490
8923
|
part="wrapper">
|
|
7491
|
-
|
|
8924
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8925
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8926
|
+
</div>
|
|
8927
|
+
<${this.dropdownTag}
|
|
8928
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8929
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8930
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8931
|
+
?noFlip="${this.noFlip}"
|
|
8932
|
+
?onDark="${this.onDark}"
|
|
8933
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8934
|
+
.offset="${this.offset}"
|
|
8935
|
+
.placement="${this.placement}"
|
|
8936
|
+
chevron
|
|
8937
|
+
for="selectMenu"
|
|
8938
|
+
layout="${this.layout}"
|
|
8939
|
+
part="dropdown"
|
|
8940
|
+
shape="${this.shape}"
|
|
8941
|
+
size="${this.size}">
|
|
8942
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8943
|
+
<div class="accents left">
|
|
8944
|
+
<slot name="typeIcon"></slot>
|
|
8945
|
+
</div>
|
|
8946
|
+
<div class="mainContent">
|
|
8947
|
+
<div class="${e(valueContainerClasses)}">
|
|
8948
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8949
|
+
<slot name="label"></slot>
|
|
8950
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8951
|
+
</label>
|
|
8952
|
+
<div class="value" id="value"></div>
|
|
8953
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8954
|
+
${this.placeholder}
|
|
8955
|
+
</div>
|
|
8956
|
+
</div>
|
|
8957
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8958
|
+
<slot name="displayValue"></slot>
|
|
8959
|
+
</div>
|
|
8960
|
+
</div>
|
|
8961
|
+
<div class="accents right"></div>
|
|
8962
|
+
</div>
|
|
8963
|
+
<div class="menuWrapper"></div>
|
|
8964
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8965
|
+
<slot></slot>
|
|
8966
|
+
</${this.bibtemplateTag}>
|
|
8967
|
+
<div slot="helpText">
|
|
8968
|
+
${this.renderHtmlHelpText()}
|
|
8969
|
+
</div>
|
|
8970
|
+
</${this.dropdownTag}>
|
|
8971
|
+
${this.renderNativeSelect()}
|
|
7492
8972
|
</div>
|
|
7493
8973
|
`;
|
|
7494
8974
|
}
|
|
@@ -7522,112 +9002,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7522
9002
|
|
|
7523
9003
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7524
9004
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7525
|
-
|
|
7526
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7527
|
-
renderBACKUP() {
|
|
7528
|
-
const placeholderClass = {
|
|
7529
|
-
hidden: this.value,
|
|
7530
|
-
};
|
|
7531
|
-
|
|
7532
|
-
return u`
|
|
7533
|
-
<div class="outerWrapper">
|
|
7534
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7535
|
-
${this.optionActive && this.options.length > 0
|
|
7536
|
-
? u`
|
|
7537
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7538
|
-
`
|
|
7539
|
-
: undefined
|
|
7540
|
-
};
|
|
7541
|
-
|
|
7542
|
-
${this.optionSelected && this.options.length > 0
|
|
7543
|
-
? u`
|
|
7544
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7545
|
-
`
|
|
7546
|
-
: undefined
|
|
7547
|
-
};
|
|
7548
|
-
</div>
|
|
7549
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7550
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7551
|
-
</div>
|
|
7552
|
-
<${this.dropdownTag}
|
|
7553
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7554
|
-
?disabled="${this.disabled}"
|
|
7555
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7556
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7557
|
-
?noFlip="${this.noFlip}"
|
|
7558
|
-
?onDark="${this.onDark}"
|
|
7559
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7560
|
-
.offset="${this.offset}"
|
|
7561
|
-
.placement="${this.placement}"
|
|
7562
|
-
chevron
|
|
7563
|
-
fluid
|
|
7564
|
-
for="selectMenu"
|
|
7565
|
-
layout="${this.layout}"
|
|
7566
|
-
part="dropdown"
|
|
7567
|
-
shape="${this.shape}"
|
|
7568
|
-
size="${this.size}">
|
|
7569
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7570
|
-
<span id="placeholder"
|
|
7571
|
-
class="${e(placeholderClass)}"
|
|
7572
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7573
|
-
>
|
|
7574
|
-
<slot name="placeholder"></slot>
|
|
7575
|
-
</span>
|
|
7576
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7577
|
-
</span>
|
|
7578
|
-
|
|
7579
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7580
|
-
<slot></slot>
|
|
7581
|
-
</${this.bibtemplateTag}>
|
|
7582
|
-
<slot name="label" slot="label"></slot>
|
|
7583
|
-
<p slot="helpText">
|
|
7584
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7585
|
-
? u`
|
|
7586
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7587
|
-
<slot name="helpText"></slot>
|
|
7588
|
-
</span>`
|
|
7589
|
-
: u`
|
|
7590
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7591
|
-
${this.errorMessage}
|
|
7592
|
-
</span>`
|
|
7593
|
-
}
|
|
7594
|
-
</p>
|
|
7595
|
-
</${this.dropdownTag}>
|
|
7596
|
-
<div class="nativeSelectWrapper">
|
|
7597
|
-
<select
|
|
7598
|
-
tabindex="-1"
|
|
7599
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7600
|
-
name="${this.name || ''}"
|
|
7601
|
-
?disabled="${this.disabled}"
|
|
7602
|
-
?required="${this.required}"
|
|
7603
|
-
aria-hidden="true"
|
|
7604
|
-
autocomplete="${o(this.autocomplete)}"
|
|
7605
|
-
@change="${this._handleNativeSelectChange}">
|
|
7606
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7607
|
-
${this.options.map((option) => {
|
|
7608
|
-
const optionValue = option.value || option.textContent;
|
|
7609
|
-
return u`
|
|
7610
|
-
<option
|
|
7611
|
-
value="${optionValue}"
|
|
7612
|
-
?selected="${this.value === optionValue}">
|
|
7613
|
-
${option.textContent}
|
|
7614
|
-
</option>
|
|
7615
|
-
`;
|
|
7616
|
-
})}
|
|
7617
|
-
</select>
|
|
7618
|
-
</div>
|
|
7619
|
-
<!-- Help text and error message template -->
|
|
7620
|
-
${this.renderHtmlHelpText()}
|
|
7621
|
-
</div>
|
|
7622
|
-
`;
|
|
7623
|
-
}
|
|
7624
9005
|
}
|
|
7625
9006
|
|
|
7626
|
-
var
|
|
9007
|
+
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-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}`;
|
|
9008
|
+
|
|
9009
|
+
var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.body-default{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{display:block;vertical-align:middle;line-height:0}:host .menuWrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .menuWrapper.lg{padding:var(--ds-size-150, 0.75rem)}:host([root]) .menuWrapper.xl{padding:var(--ds-size-200, 1rem)}`;
|
|
7627
9010
|
|
|
7628
9011
|
var colorCss$2 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
7629
9012
|
|
|
7630
|
-
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
9013
|
+
var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
7631
9014
|
|
|
7632
9015
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7633
9016
|
// See LICENSE in the project root for license information.
|
|
@@ -7680,7 +9063,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7680
9063
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
7681
9064
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7682
9065
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
7683
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
7684
9066
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7685
9067
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7686
9068
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -7695,12 +9077,22 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7695
9077
|
|
|
7696
9078
|
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
7697
9079
|
|
|
7698
|
-
class AuroMenu extends
|
|
9080
|
+
class AuroMenu extends AuroElement$4 {
|
|
7699
9081
|
constructor() {
|
|
7700
9082
|
super();
|
|
7701
9083
|
|
|
7702
9084
|
// State properties (reactive)
|
|
7703
9085
|
|
|
9086
|
+
/**
|
|
9087
|
+
* @private
|
|
9088
|
+
*/
|
|
9089
|
+
this.shape = "box";
|
|
9090
|
+
|
|
9091
|
+
/**
|
|
9092
|
+
* @private
|
|
9093
|
+
*/
|
|
9094
|
+
this.size = "sm";
|
|
9095
|
+
|
|
7704
9096
|
// Value of the selected options
|
|
7705
9097
|
this.value = undefined;
|
|
7706
9098
|
// Currently selected option
|
|
@@ -7759,6 +9151,7 @@ class AuroMenu extends i$2 {
|
|
|
7759
9151
|
|
|
7760
9152
|
static get properties() {
|
|
7761
9153
|
return {
|
|
9154
|
+
...super.properties,
|
|
7762
9155
|
noCheckmark: {
|
|
7763
9156
|
type: Boolean,
|
|
7764
9157
|
reflect: true,
|
|
@@ -7789,15 +9182,31 @@ class AuroMenu extends i$2 {
|
|
|
7789
9182
|
reflect: true,
|
|
7790
9183
|
attribute: 'multiselect'
|
|
7791
9184
|
},
|
|
9185
|
+
|
|
9186
|
+
/**
|
|
9187
|
+
* Value selected for the component.
|
|
9188
|
+
*/
|
|
7792
9189
|
value: {
|
|
7793
|
-
|
|
7794
|
-
|
|
9190
|
+
type: String,
|
|
9191
|
+
reflect: true,
|
|
9192
|
+
attribute: 'value'
|
|
9193
|
+
},
|
|
9194
|
+
|
|
9195
|
+
/**
|
|
9196
|
+
* Indent level for submenus.
|
|
9197
|
+
* @private
|
|
9198
|
+
*/
|
|
9199
|
+
level: {
|
|
9200
|
+
type: Number,
|
|
9201
|
+
reflect: false,
|
|
9202
|
+
attribute: false
|
|
7795
9203
|
}
|
|
7796
9204
|
};
|
|
7797
9205
|
}
|
|
7798
9206
|
|
|
7799
9207
|
static get styles() {
|
|
7800
9208
|
return [
|
|
9209
|
+
shapeSizeCss,
|
|
7801
9210
|
styleCss$2,
|
|
7802
9211
|
colorCss$2,
|
|
7803
9212
|
tokensCss$1
|
|
@@ -7813,7 +9222,26 @@ class AuroMenu extends i$2 {
|
|
|
7813
9222
|
*
|
|
7814
9223
|
*/
|
|
7815
9224
|
static register(name = "auro-menu") {
|
|
7816
|
-
AuroLibraryRuntimeUtils$
|
|
9225
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
|
|
9226
|
+
}
|
|
9227
|
+
|
|
9228
|
+
/**
|
|
9229
|
+
* Formatted value based on `multiSelect` state.
|
|
9230
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
9231
|
+
* @private
|
|
9232
|
+
* @returns {String|Array<String>}
|
|
9233
|
+
*/
|
|
9234
|
+
get formattedValue() {
|
|
9235
|
+
if (this.multiSelect) {
|
|
9236
|
+
if (!this.value) {
|
|
9237
|
+
return undefined;
|
|
9238
|
+
}
|
|
9239
|
+
if (this.value.startsWith("[")) {
|
|
9240
|
+
return JSON.parse(this.value);
|
|
9241
|
+
}
|
|
9242
|
+
return [this.value];
|
|
9243
|
+
}
|
|
9244
|
+
return this.value;
|
|
7817
9245
|
}
|
|
7818
9246
|
|
|
7819
9247
|
// Lifecycle Methods
|
|
@@ -7825,6 +9253,7 @@ class AuroMenu extends i$2 {
|
|
|
7825
9253
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
7826
9254
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
7827
9255
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9256
|
+
this.setTagAttribute("auro-menu");
|
|
7828
9257
|
}
|
|
7829
9258
|
|
|
7830
9259
|
disconnectedCallback() {
|
|
@@ -7837,19 +9266,33 @@ class AuroMenu extends i$2 {
|
|
|
7837
9266
|
}
|
|
7838
9267
|
|
|
7839
9268
|
firstUpdated() {
|
|
7840
|
-
AuroLibraryRuntimeUtils$
|
|
9269
|
+
AuroLibraryRuntimeUtils$6.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7841
9270
|
|
|
7842
9271
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7843
9272
|
this.initializeMenu();
|
|
7844
9273
|
}
|
|
7845
9274
|
|
|
9275
|
+
/**
|
|
9276
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9277
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9278
|
+
* @private
|
|
9279
|
+
*/
|
|
9280
|
+
setTagAttribute(tagName) {
|
|
9281
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9282
|
+
this.setAttribute(tagName, true);
|
|
9283
|
+
}
|
|
9284
|
+
}
|
|
9285
|
+
|
|
7846
9286
|
updated(changedProperties) {
|
|
7847
|
-
|
|
9287
|
+
super.updated(changedProperties);
|
|
9288
|
+
|
|
9289
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
7848
9290
|
// Reset selection if multiSelect mode changes
|
|
7849
9291
|
this.clearSelection();
|
|
7850
9292
|
}
|
|
7851
9293
|
|
|
7852
|
-
|
|
9294
|
+
|
|
9295
|
+
if (changedProperties.has("value")) {
|
|
7853
9296
|
// Handle null/undefined case
|
|
7854
9297
|
if (this.value === undefined || this.value === null) {
|
|
7855
9298
|
this.optionSelected = undefined;
|
|
@@ -7857,7 +9300,7 @@ class AuroMenu extends i$2 {
|
|
|
7857
9300
|
} else {
|
|
7858
9301
|
if (this.multiSelect) {
|
|
7859
9302
|
// In multiselect mode, this.value should be an array of strings
|
|
7860
|
-
const valueArray =
|
|
9303
|
+
const valueArray = this.formattedValue;
|
|
7861
9304
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
7862
9305
|
|
|
7863
9306
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -7917,6 +9360,19 @@ class AuroMenu extends i$2 {
|
|
|
7917
9360
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7918
9361
|
}
|
|
7919
9362
|
|
|
9363
|
+
// Handle layout propagation to all menus and options
|
|
9364
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9365
|
+
[
|
|
9366
|
+
'size',
|
|
9367
|
+
'shape'
|
|
9368
|
+
].forEach((prop) => {
|
|
9369
|
+
if (changedProperties.has(prop)) {
|
|
9370
|
+
propagationTargets.forEach((el) => {
|
|
9371
|
+
el.setAttribute(prop, this[prop]);
|
|
9372
|
+
});
|
|
9373
|
+
}
|
|
9374
|
+
});
|
|
9375
|
+
|
|
7920
9376
|
// Regex for matchWord if needed
|
|
7921
9377
|
let regexWord = null;
|
|
7922
9378
|
|
|
@@ -8011,14 +9467,14 @@ class AuroMenu extends i$2 {
|
|
|
8011
9467
|
*/
|
|
8012
9468
|
handleSelectState(option) {
|
|
8013
9469
|
if (this.multiSelect) {
|
|
8014
|
-
const currentValue = this.
|
|
9470
|
+
const currentValue = this.formattedValue || [];
|
|
8015
9471
|
const currentSelected = this.optionSelected || [];
|
|
8016
9472
|
|
|
8017
9473
|
if (!currentValue.includes(option.value)) {
|
|
8018
|
-
this.value = [
|
|
9474
|
+
this.value = JSON.stringify([
|
|
8019
9475
|
...currentValue,
|
|
8020
9476
|
option.value
|
|
8021
|
-
];
|
|
9477
|
+
]);
|
|
8022
9478
|
}
|
|
8023
9479
|
if (!currentSelected.includes(option)) {
|
|
8024
9480
|
this.optionSelected = [
|
|
@@ -8041,13 +9497,15 @@ class AuroMenu extends i$2 {
|
|
|
8041
9497
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
8042
9498
|
*/
|
|
8043
9499
|
handleDeselectState(option) {
|
|
8044
|
-
if (this.multiSelect
|
|
9500
|
+
if (this.multiSelect) {
|
|
8045
9501
|
// Remove this option from array
|
|
8046
|
-
|
|
9502
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
8047
9503
|
|
|
8048
9504
|
// If array is empty after removal, set back to undefined
|
|
8049
|
-
if (
|
|
9505
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
8050
9506
|
this.value = undefined;
|
|
9507
|
+
} else {
|
|
9508
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
8051
9509
|
}
|
|
8052
9510
|
|
|
8053
9511
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -8113,21 +9571,20 @@ class AuroMenu extends i$2 {
|
|
|
8113
9571
|
* @param {HTMLElement} menu - Root menu element.
|
|
8114
9572
|
*/
|
|
8115
9573
|
handleNestedMenus(menu) {
|
|
8116
|
-
|
|
9574
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8117
9575
|
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
if (!
|
|
8122
|
-
|
|
9576
|
+
if (menu.level > 0) {
|
|
9577
|
+
menu.setAttribute('role', 'group');
|
|
9578
|
+
menu.removeAttribute("root");
|
|
9579
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9580
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8123
9581
|
}
|
|
9582
|
+
}
|
|
8124
9583
|
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
this.handleNestedMenus(nestedMenu);
|
|
9584
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9585
|
+
options.forEach((option) => {
|
|
9586
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9587
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8131
9588
|
});
|
|
8132
9589
|
}
|
|
8133
9590
|
|
|
@@ -8369,28 +9826,51 @@ class AuroMenu extends i$2 {
|
|
|
8369
9826
|
}
|
|
8370
9827
|
|
|
8371
9828
|
/**
|
|
8372
|
-
*
|
|
8373
|
-
* @returns {
|
|
9829
|
+
* Getter for wrapper classes based on size.
|
|
9830
|
+
* @returns {Object} - Class map for the wrapper element.
|
|
9831
|
+
* @private
|
|
8374
9832
|
*/
|
|
8375
|
-
|
|
9833
|
+
get wrapperClasses() {
|
|
9834
|
+
return e({
|
|
9835
|
+
'menuWrapper': true,
|
|
9836
|
+
[this.size]: true,
|
|
9837
|
+
});
|
|
9838
|
+
}
|
|
9839
|
+
|
|
9840
|
+
/**
|
|
9841
|
+
* Logic to determine the layout of the component.
|
|
9842
|
+
* @protected
|
|
9843
|
+
* @returns {void}
|
|
9844
|
+
*/
|
|
9845
|
+
renderLayout() {
|
|
8376
9846
|
if (this.loading) {
|
|
8377
9847
|
return x`
|
|
8378
|
-
<
|
|
8379
|
-
<
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
9848
|
+
<div class="${this.wrapperClasses}">
|
|
9849
|
+
<auro-menuoption
|
|
9850
|
+
disabled
|
|
9851
|
+
loadingplaceholder
|
|
9852
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9853
|
+
>
|
|
9854
|
+
<div>
|
|
9855
|
+
<slot name="loadingIcon" class="body-lg"></slot>
|
|
9856
|
+
<slot name="loadingText"></slot>
|
|
9857
|
+
</div>
|
|
9858
|
+
</auro-menuoption>
|
|
9859
|
+
</div>
|
|
8384
9860
|
`;
|
|
8385
9861
|
}
|
|
8386
9862
|
|
|
8387
|
-
return x
|
|
9863
|
+
return x`
|
|
9864
|
+
<div class="${this.wrapperClasses}">
|
|
9865
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9866
|
+
</div>
|
|
9867
|
+
`;
|
|
8388
9868
|
}
|
|
8389
9869
|
}
|
|
8390
9870
|
|
|
8391
|
-
var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
9871
|
+
var styleCss$1 = i$5`.body-default{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none}:host .wrapper{box-sizing:border-box;display:flex;align-items:center;padding-right:var(--ds-size-150, 0.75rem);padding-left:calc(var(--ds-size-100, 0.5rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, 0.5rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-100, 0.5rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
8392
9872
|
|
|
8393
|
-
var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
9873
|
+
var colorCss$1 = i$5`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
8394
9874
|
|
|
8395
9875
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8396
9876
|
// See LICENSE in the project root for license information.
|
|
@@ -8738,8 +10218,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8738
10218
|
async firstUpdated() {
|
|
8739
10219
|
await super.firstUpdated();
|
|
8740
10220
|
|
|
8741
|
-
|
|
8742
|
-
|
|
10221
|
+
/**
|
|
10222
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
10223
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
10224
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
10225
|
+
*/
|
|
10226
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8743
10227
|
const svgDesc = this.svg.querySelector('desc');
|
|
8744
10228
|
|
|
8745
10229
|
if (svgDesc) {
|
|
@@ -8783,7 +10267,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8783
10267
|
}
|
|
8784
10268
|
}
|
|
8785
10269
|
|
|
8786
|
-
var iconVersion = '8.0
|
|
10270
|
+
var iconVersion = '8.1.0';
|
|
8787
10271
|
|
|
8788
10272
|
var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
8789
10273
|
|
|
@@ -8801,10 +10285,20 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8801
10285
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8802
10286
|
* @slot - Specifies text for an option, but is not the value.
|
|
8803
10287
|
*/
|
|
8804
|
-
class AuroMenuOption extends
|
|
10288
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8805
10289
|
constructor() {
|
|
8806
10290
|
super();
|
|
8807
10291
|
|
|
10292
|
+
/**
|
|
10293
|
+
* @private
|
|
10294
|
+
*/
|
|
10295
|
+
this.shape = "box";
|
|
10296
|
+
|
|
10297
|
+
/**
|
|
10298
|
+
* @private
|
|
10299
|
+
*/
|
|
10300
|
+
this.size = "sm";
|
|
10301
|
+
|
|
8808
10302
|
/**
|
|
8809
10303
|
* Generate unique names for dependency components.
|
|
8810
10304
|
*/
|
|
@@ -8823,11 +10317,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8823
10317
|
/**
|
|
8824
10318
|
* @private
|
|
8825
10319
|
*/
|
|
8826
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10320
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
8827
10321
|
}
|
|
8828
10322
|
|
|
8829
10323
|
static get properties() {
|
|
8830
10324
|
return {
|
|
10325
|
+
...super.properties,
|
|
8831
10326
|
nocheckmark: {
|
|
8832
10327
|
type: Boolean,
|
|
8833
10328
|
reflect: true
|
|
@@ -8852,6 +10347,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8852
10347
|
|
|
8853
10348
|
static get styles() {
|
|
8854
10349
|
return [
|
|
10350
|
+
shapeSizeCss,
|
|
8855
10351
|
styleCss$1,
|
|
8856
10352
|
colorCss$1,
|
|
8857
10353
|
tokensCss$1
|
|
@@ -8867,7 +10363,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8867
10363
|
*
|
|
8868
10364
|
*/
|
|
8869
10365
|
static register(name = "auro-menuoption") {
|
|
8870
|
-
AuroLibraryRuntimeUtils$
|
|
10366
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenuOption);
|
|
8871
10367
|
}
|
|
8872
10368
|
|
|
8873
10369
|
firstUpdated() {
|
|
@@ -8889,6 +10385,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8889
10385
|
|
|
8890
10386
|
// observer for selected property changes
|
|
8891
10387
|
updated(changedProperties) {
|
|
10388
|
+
super.updated(changedProperties);
|
|
10389
|
+
|
|
8892
10390
|
if (changedProperties.has('selected')) {
|
|
8893
10391
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8894
10392
|
}
|
|
@@ -8907,13 +10405,36 @@ class AuroMenuOption extends i$2 {
|
|
|
8907
10405
|
|
|
8908
10406
|
svg.setAttribute('slot', 'svg');
|
|
8909
10407
|
|
|
8910
|
-
return u`<${this.iconTag} customColor customSvg
|
|
10408
|
+
return u`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
|
|
8911
10409
|
}
|
|
8912
10410
|
|
|
8913
|
-
|
|
10411
|
+
/**
|
|
10412
|
+
* Logic to determine the layout of the component.
|
|
10413
|
+
* @protected
|
|
10414
|
+
* @returns {void}
|
|
10415
|
+
*/
|
|
10416
|
+
renderLayout() {
|
|
10417
|
+
|
|
10418
|
+
const fontClassMap = {
|
|
10419
|
+
xs: 'body-sm',
|
|
10420
|
+
sm: 'body-default',
|
|
10421
|
+
md: 'body-default',
|
|
10422
|
+
lg: 'body-lg',
|
|
10423
|
+
xl: 'body-lg'
|
|
10424
|
+
};
|
|
10425
|
+
|
|
10426
|
+
const classes = e({
|
|
10427
|
+
'wrapper': true,
|
|
10428
|
+
[this.size ? fontClassMap[this.size] : 'body-sm']: true,
|
|
10429
|
+
});
|
|
10430
|
+
|
|
8914
10431
|
return u`
|
|
8915
|
-
${
|
|
8916
|
-
|
|
10432
|
+
<div class="${classes}">
|
|
10433
|
+
${this.selected && !this.nocheckmark
|
|
10434
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10435
|
+
: undefined}
|
|
10436
|
+
<slot></slot>
|
|
10437
|
+
</div>
|
|
8917
10438
|
`;
|
|
8918
10439
|
}
|
|
8919
10440
|
}
|
|
@@ -8935,7 +10456,6 @@ function initExamples(initCount) {
|
|
|
8935
10456
|
inDialogExample();
|
|
8936
10457
|
resetStateExample();
|
|
8937
10458
|
auroMenuLoadingExample();
|
|
8938
|
-
valueTextExample();
|
|
8939
10459
|
} catch (err) {
|
|
8940
10460
|
if (initCount <= 20) {
|
|
8941
10461
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|